Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3896 → Rev 3897

/branches/v3.01-serpe/widget/modules/manager/squelettes/js/geoloc.js
New file
0,0 → 1,140
import {valeurOk} from './utils.js';
 
export const initGeoloc = () => {
onGeoloc();
onGeolocManuelle();
geolocValidationEtStockage();
};
 
const onGeoloc = () => {
// Empêcher que le module carto ne bind ses events partout
$('#tb-geolocation').on('submit blur click focus mousedown mouseleave mouseup change', '*', evt => {
evt.preventDefault();
return false;
});
// evenement location
$('#tb-geolocation').on('location', location => {
const locDatas = location.originalEvent.detail;
 
if (valeurOk( locDatas )) {
let latitude = '',
longitude = '';
 
console.dir( locDatas );
if (valeurOk( locDatas.geometry.coordinates)) {
if ('Point' === locDatas.geometry.type) {
if (valeurOk( locDatas.geometry.coordinates[0])) {
longitude = locDatas.geometry.coordinates[0].toFixed(5);
}
if (valeurOk( locDatas.geometry.coordinates[1])) {
latitude = locDatas.geometry.coordinates[1].toFixed(5);
}
} else if ('LineString' === locDatas.geometry.type) {
if (valeurOk( locDatas.centroid.coordinates )){
if (valeurOk( locDatas.centroid.coordinates[0])) {
longitude = locDatas.centroid.coordinates[0];
}
if (valeurOk( locDatas.centroid.coordinates[1])) {
latitude = locDatas.centroid.coordinates[1];
}
} else {// on ne prend qu'un point de la ligne
if (valeurOk( locDatas.geometry.coordinates[0][0])) {
longitude = locDatas.geometry.coordinates[0][0];
longitude = longitude.toFixed(5);
}
if (valeurOk( locDatas.geometry.coordinates[0][1])){
latitude = locDatas.geometry.coordinates[0][1];
latitude = latitude.toFixed(5);
}
}
}
}
if (valeurOk(latitude) && valeurOk(longitude)) {
$('#latitude').val(latitude);
$('#longitude').val(longitude);
}
}
});
}
 
const onGeolocManuelle = () => {
const coords = ['latitude','longitude','zoom'];
 
$('#latitude,#longitude,#zoom').on('change', function(event) {
const thisCoord = this.id,
thisVal = $(this).val();
let valeur = '';
 
if ($.isNumeric(thisVal)) {
switch(thisCoord) {
case 'zoom':
if (0 < parseInt(thisVal, 10) && 18 >= parseInt(thisVal, 10)) {
valeur = thisVal;
}
break;
case 'latitude':
if ( 90 > Math.abs( parseInt(thisVal, 10))) {
valeur = parseFloat(thisVal, 10).toFixed(5);
$('#latitude').val(valeur);
}
break;
case 'longitude':
if ( 180 >= Math.abs( parseInt(thisVal, 10))) {
valeur = parseFloat(thisVal, 10).toFixed(5);
$('#longitude').val(valeur);
}
break;
default:
break;
}
}
//un champ vide n'est pas une erreur
if ($.isNumeric(valeur)) {
$(this).siblings('span.error').remove();
} else if (0 <= $.inArray(thisCoord, coords)) {
// on ne signale pas d'erreur si il n'y a rien dans le champ
if (!valeurOk($(this).siblings('span.error')) && valeurOk($(this).val())) {
$(this).after('<span class="error">mauvais format pour ce champ<span>');
} else {
$(this).siblings('span.error').remove();
}
}
});
}
 
const geolocValidationEtStockage = () => {
$('#signup_submit').off().on('click', event => {
let localisation = '';
const latitude = $('#latitude').val(),
longitude = $('#longitude').val(),
zoom = $('#zoom').val(),
$warning = $('.warning-carto');
 
if ((valeurOk(longitude) && !valeurOk(latitude)) || (!valeurOk(longitude) && valeurOk(latitude))) {
if (!valeurOk($warning)) {
$('#new-fields-buttons').after(
`<p class="message warning-carto">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>&nbsp;Vous avez entré des coordonnées incomplètes<br>
Complétez latitude ou longitude, ou placez un marqueur sur la carto, ou effacez ces deux champs
</p>`
);
}
return false;
} else if (valeurOk($warning)) {
$warning.remove();
}
if (valeurOk(latitude) && valeurOk(longitude)) {
localisation += 'latitude:'+latitude+';';
localisation += 'longitude:'+longitude;
}
if (valeurOk(zoom)) {
if (valeurOk(localisation)) {
localisation += ';';
}
localisation += 'zoom:'+zoom;
}
if (valeurOk(localisation)) {
$('#localisation').val(localisation);
}
});
};
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/manager.js
1,1867 → 1,24
"use strict";
import {potDeMiel} from './utils.js';
import {displayFields} from './display.js';
import {initGeoloc} from './geoloc.js';
import {displayClassicFields} from './preview.js';
import {ChampsSupp} from './ChampsSupp.js';
 
/*************************************
* Fonctions de Style et Affichage *
* des éléments "spéciaux" *
*************************************/
jQuery( document ).ready(function () {
const champsSupp = new ChampsSupp();
 
// Logique d'affichage pour le input type=file
function inputFile() {
// Initialisation des variables
var $fileInput = $( '.input-file' ),
$button = $( '.label-file' ),
thisId = '';
// Action lorsque la "barre d'espace" ou "Entrée" est pressée
$( '.label-file' ).keydown( function( event ) {
if ( event.keyCode == 13 || event.keyCode == 32 ) {
$( '#' + $( this ).attr( 'for' ) + '.input-file' ).focus();
}
});
// Action lorsque le label est cliqué
$( '.label-file' ).click( function(event) {
$( '#' + $( this ).attr( 'for' ) + '.input-file' ).focus();
return false;
});
// Affiche un retour visuel dès que input:file change
$fileInput.change( function( event ) {
// Il est possible de supprimer un fichier
// donc on vérifie que le 'change' est un ajout ou modificationis-defaut-value
if( !$.isEmptyObject( event.target.files[0] ) ) {
 
var file = event.target.files[0],
fileInputId = $( this ).attr( 'id' ),
$theReturn = $( '.' + fileInputId );
// Affichage du nom du fichier
$theReturn.text( file.name ).removeClass( 'hidden') ;
 
if( 5242880 < file.size ) {
$theReturn.append(
'<p class="message">'+
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i> '+
'La taille du fichier ne doit pas dépasser 5Mo'+
'</p>'
)
.addClass( 'invalid' );
// lib : https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js
$( this ).clearInputs();
console.log(file);
 
} else if( file.type.match( 'image/*' ) && 'especes' !== fileInputId ) {
// Si le fichier est une image (et qu'on est pas sur "especes") on l'affiche
// Chemin temporaire de l'image et affichage
var tmppath = URL.createObjectURL( file );
$theReturn.append( '<img src="' + tmppath + '" width="50%">' ).removeClass( 'invalid' );;
 
} else if ( !( 'especes' === fileInputId && file.type.match( 'text/(:?csv|tab-separated-values)' ) ) ) {
// on a pas un type image, ou on est sur une liste d'espèces mais on a pas un csv
console.log(file.type);
 
if( 'especes' === fileInputId ) {// cas où on demandait un csv
$theReturn.append(
'<p class="message">'+
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i> '+
'Le fichier doit être au format csv ou tsv'+
'</p>'
)
.addClass( 'invalid' );
} else { // cas où on demandait un format image
$theReturn.append(
'<p class="message">'+
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i> '+
'Le fichier doit être au format image (jpg, png, etc.)'+
'</p>'
)
.addClass( 'invalid' );
}
// lib : https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js
$( this ).clearInputs();
console.log(file);
} else {// file "especes" csv ok
$theReturn.append( ' <i class="fa fa-check-circle" aria-hidden="true" style="color:#B3C954;font-size:1.3rem"></i>' ).removeClass( 'invalid' );
}
}
});
// Annuler le téléchargement
$( '.remove-file' ).click( function() {
var $thisFileInput = $( this ).prev( '.input-file-container' ).find( '.input-file' );
// lib : https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js
$thisFileInput.clearInputs();
$thisFileInput.triggerHandler( 'change' );
// $thisFileInput.unwrap();
$( this ).next( '.file-return' ).addClass( 'hidden' ).empty();
});
}
 
// Style et affichage des list-checkboxes
function inputListCheckbox() {
// On écoute le click sur une list-checkbox ('.selectBox')
// à tout moment de son insertion dans le dom
$( '#zone-appli' ).on( 'click' , '.selectBox' , function() {
$( '.checkboxes[data-id="' + $(this).data( 'id' ) + '"]' ).toggleClass( 'hidden' );
});
}
 
// Style et affichage des input type="range"
function inputRangeDisplayNumber() {
$( '#zone-appli' ).on( 'input' , 'input[type="range"]' , function () {
$( this ).siblings( '.range-live-value' ).text( $( this ).val() );
});
}
 
/***********************************************************
* Fonctions pour la création des champs supplémentaires *
***********************************************************/
 
// Logique globale pour l'ajout de nouveaux champs
function onClickAddNewFields( fieldIndex ) {
// Bouton ajouter un champ
$( '#add-fields' ).click( function() {
// Affichage du formulaire pour un champ
displayNewField( fieldIndex );
// Affichage du nom du champ
onChangeDisplayFieldLabel( fieldIndex );
// Empêcher de créer plus d'une fois la même clé
onChangeCheckKeyUnique();
// Affichage des images/nom des documents importés dans les champs ajoutés
inputFile();
// Recueil des informations correspondantes au nouveau champ
onChangeFieldTypeCollectDetails( fieldIndex );
// Suppression d'un champ
onClickRemoveField();
 
fieldIndex++;
});
}
 
// Création/affichage du formulaire d'un nouveau champ
function displayNewField( fieldIndex ) {
// Html du formulaire du nouveaux champs inséré dans le dom
$( '#new-fields' ).append(
'<fieldset data-id="' + fieldIndex + '" class="new-field">'+
'<h3>Nouveau champ :<br><strong class="field-title" data-id="' + fieldIndex + '"></strong></h3>'+
// Nom du champ
'<div class="row">'+
'<div class="col-sm-12 mt-3 mb-3">'+
'<label for="field-name" title="Donnez un titre à votre champ">Nom du champ *</label>'+
'<input type="text" name="field-name" data-id="' + fieldIndex + '" class="field-name form-control" placeholder="Titre de votre champ" title="Le titre du champ" required>'+
'</div>'+
// Clé du champ
'<div class="col-sm-12 mt-3 mb-3">'+
'<label for="field-key" title="Nom du champ dans la base de données">'+
'Clé du champ *'+
'</label>'+
'<input type="text" name="field-key" data-id="' + fieldIndex + '" class="field-key form-control" placeholder="Clé du champ" pattern="^(?:[a-z]+(?:(?:[A-Z]+[a-z]+)+)?|[a-z]+(?:(?:-[a-z]+)+)?)$" title="Clé Unique en Camelcase ou minuscule séparés par tirets, pas d\'accents pas de caractères spéciaux." required>'+
'</div>'+
'<p class="message m-2">' +
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i> '+
'Une clé doit être unique<br>' +
'En "camelCase" (ecriture chameau)<br>'+
'Ou en minuscule avec tirets ("-") si nécessaire<br>'+
'Pas d\'espaces, aucuns caractères spéciaux (accents, cédilles, etc.).' +
'</p>' +
// Type de champ
'<div class="col-sm-12 mt-3 mb-3 add-field-select" data-id="' + fieldIndex + '">'+
'<label for="field-element" title="Quel type de champ">Type de champ *</label>'+
'<select name="field-element" data-id="' + fieldIndex + '" class="field-element form-control custom-select">'+
'<option value="text">Champ texte</option>'+
'<option value="email">Champ email</option>'+
'<option value="textarea">Champ rédaction</option>'+
'<option value="select">Menu déroulant</option>'+
'<option value="checkbox">Cases à cocher</option>'+
'<option value="list-checkbox">Liste de cases à cocher</option>'+
'<option value="radio">Boutons radio</option>'+
'<option value="date">Calendrier</option>'+
'<option value="range">Curseur (entre 2 bornes)</option>'+
'<option value="number">Nombre</option>'+
'</select>'+
'</div>'+
// Checkbox "champ requis"
'<div class="col-sm-12 radio mt-3 mb-3">'+
'<label class="radio-label" for="field-is_mandatory" title="Ce champ est obligatoire">'+
'<input type="checkbox" name="field-is_mandatory" data-id="' + fieldIndex + '" class="field-is_mandatory form-control">'+
'Champ requis ?'+
'</label>'+
'</div>'+
// Unité des valeurs
'<div class="col-sm-12 mt-3 mb-3">'+
'<label for="field-unit" title="Unité de mesure de vos valeurs">Unités ( cm, kg, ha, etc.)</label>'+
'<input type="text" name="field-unit" data-id="' + fieldIndex + '" class="field-unit form-control" placeholder="symbole de vos unités">'+
'</div>'+
// Tooltip
'<div class="col-sm-12 mt-3 mb-3">'+
'<label for="field-description" title="Ajoutez une info-bulle">Info-bulle</label>'+
'<input type="text" name="field-description" data-id="' + fieldIndex + '" class="field-description form-control" placeholder="Quelques mots">'+
'</div>'+
// Import d'une image d'aide à afficher en popup
'<div class="input-file-row row">'+
'<div class="input-file-container col-sm-10">'+
'<input type="file" class="input-file field-help" name="field-help' + fieldIndex + '" data-id="' + fieldIndex + '" id="help-doc-' + fieldIndex + '" accept="image/*">'+
'<label for="field-help' + fieldIndex + '" class="label-file"><i class="fas fa-download"></i> Popup aide image (.jpg)</label>'+
'</div>'+
'<div class="btn btn-danger btn-sm remove-file" name="remove-file" data-id="' + fieldIndex + '" title="Supprimer le fichier"><i class="fas fa-times" aria-hidden="true"></i></div>'+
'<div class="file-return help-doc-' + fieldIndex + ' hidden"></div>'+
'</div>'+
// Boutons supprimer
'<div class="col-sm-12 mt-3 mb-3">'+
'<label for="remove-field">Supprimer</label>'+
'<div class="remove-field button" name="remove-field" data-id="' + fieldIndex + '" title="Supprimer un champ"><i class="fa fa-skull" aria-hidden="true"></i></div>'+
'</div>'+
'</div>'+
'</fieldset>'
);
// Animation de l'affichage
$( 'fieldset.new-field[data-id="' + fieldIndex + '"]').hide().show( 200 );
$( 'html, body' ).stop().animate({
scrollTop: $( 'fieldset.new-field[data-id="' + fieldIndex + '"]' ).offset().top
}, 300 );
}
 
// Affichage du nom du champ dès qu'il est renseigné
function onChangeDisplayFieldLabel( fieldIndex ) {
$('.field-name[data-id="' + fieldIndex + '"]').change( function() {
$( '.field-title[data-id="' + fieldIndex + '"]' ).text( $( this ).val() );
});
}
 
// Supprimer un nouveau champ
function onClickRemoveField () {
$( '.remove-field' ).click( function() {
$( this ).closest('fieldset').hide( 200 , function () {
$( this ).remove();
});
});
}
 
 
/**** Recueil des informations et détails qui dépendent du type de champ choisi ****/
 
// Logique de recueil d'informations en fonction du type de champ choisi
function onChangeFieldTypeCollectDetails( fieldIndex ) {
// On insère les champs par défaut de recueil d'informations
displayFieldDetailsCollect(
fieldIndex,
// Placeholder (champ type text par défaut)
'<div class="col-sm-12 mt-3">'+
'<label for="aide-saisie" title="Aidez les utilisateurs en deux ou 3 mots ou chiffres à comprendre ce que doit contenir ce champ">Texte d\'aide à la saisie</label>'+
'<input type="text" name="aide-saisie" data-id="' + fieldIndex + '" class="aide-saisie form-control" placeholder="Ce que doit contenir ce champ">'+
'</div>'
);
// Sinon :
$( '.field-element[data-id="' + fieldIndex + '"]' ).change( function() {
// On intialise l'index pour les listes la variable qui contiendra un id pour chaque option
var valueIndex = 0;
// Si on hésite on qu'on se trompe dans la liste :
// les champs de détails de l'option précédente doivent être supprimés
$( '.field-details[data-id="' + fieldIndex + '"]' ).hide( 200 , function () {
$( this ).remove();
});
 
// Html de recueil de données en fonction de l'élément choisi
switch( $( this ).val() ) {
case 'range':
case 'number':
displayFieldDetailsCollect(
fieldIndex,
'<p class="message">'+
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i> '+
'Ne pas oublier de prévisualiser !!<br>'+
'Vérifier le bon fonctionnement et changer, si nécessaire, les valeurs de défaut, incrémentation (step), min et max.<br>'+
'Si le navigateur considère que certaines valeurs sont incohérentes il pourrait les modifier automatiquement'+
'</p>' +
// Placeholder
'<div class="col-sm-12 mt-3">'+
'<label for="aide-saisie" title="Deux ou 3 mots ou chiffres pour comprendre ce que doit contenir ce champ (ex: min 20, 10 par 10, etc.)">Texte d\'aide à la saisie</label>'+
'<input type="text" name="aide-saisie" data-id="' + fieldIndex + '" class="aide-saisie form-control" placeholder="Ce que doit contenir ce champ">'+
'</div>'+
// Valeur par défaut
'<div class="col-sm-12 mt-3">'+
'<label for="default" title="Valeur par défaut">Valeur par défaut</label>'+
'<input type="number" name="default" data-id="' + fieldIndex + '" class="default form-control" step="0.01" lang="en">'+
'</div>'+
// Incrémentation ( attribut step="" )
'<div class="col-sm-12 mt-3">'+
'<label for="step" title="De 10 en 10, de 0.5 en 0.5, etc.">Incrémentation (step)</label>'+
'<input type="number" name="step" data-id="' + fieldIndex + '" class="step form-control" step="0.01" value="1" lang="en">'+
'</div>'+
// Min
'<div class="col-sm-12 mt-3">'+
'<label for="min" title="valeur min">Valeur minimale</label>'+
'<input type="number" name="min" data-id="' + fieldIndex + '" class="min form-control" step="0.01" value="0" lang="en">'+
'</div>'+
// Max
'<div class="col-sm-12 mt-3">'+
'<label for="max" title="valeur max">Valeur maximale</label>'+
'<input type="number" name="max" data-id="' + fieldIndex + '" class="max form-control" step="0.01" value="1" lang="en">'+
'</div>'
);
break;
 
case 'date':
displayFieldDetailsCollect(
fieldIndex,
// Date min
'<div class="col-sm-12 mt-3">'+
'<label for="min" title="date min">Date minimale</label>'+
'<input type="date" name="min" data-id="' + fieldIndex + '" class="min form-control" pattern="(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)" title="jj/mm/aaaa">'+
'</div>'+
// Date max
'<div class="col-sm-12 mt-3">'+
'<label for="max" title="date max">Date maximale</label>'+
'<input type="date" name="max" data-id="' + fieldIndex + '" class="max form-control" pattern="(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)" title="jj/mm/aaaa">'+
'</div>'
);
break;
 
case 'select':
case 'checkbox':
case 'list-checkbox':
case 'radio':
displayFieldDetailsCollect(
fieldIndex,
'<p class="message element-message">' +
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i> ' +
'Entrez au moins une valeur de ' + $( this ).children( 'option:selected' ).text() +
'<br>Si aucun label à afficher n\'est indiqué, la valeur entrée sera utilisée (première lettre en majuscule).'+
'</p>'+
// Première option
'<div class="new-value center-block row" data-list-value-id="' + valueIndex +'">'+
// Recueil d'une valeur de la liste
'<div class="col-sm-12 mt-3">'+
'<label for="list-value">Valeur *</label>'+
'<input type="text" name="list-value" data-id="' + fieldIndex + '" class="list-value form-control" data-list-value-id="' + valueIndex +'" placeholder="Une des valeurs de la liste" required>'+
'</div>' +
// Recueil du label à afficher
'<div class="col-sm-12 mt-3">'+
'<label for="displayed-label">Label</label>'+
'<input type="text" name="displayed-label" data-id="' + fieldIndex + '" class="displayed-label form-control" data-list-value-id="' + valueIndex +'" placeholder="Label à afficher">'+
'</div>' +
// Checkbox valeur par défaut
'<div class="col-sm-12 radio mt-3">'+
'<label for="is-defaut-value" title="Ceci est la valeur par défaut" class="radio-label">'+
'<input type="checkbox" name="is-defaut-value" data-id="' + fieldIndex + '" class="is-defaut-value" title="entrez une valeur pour activer cette case" data-list-value-id="' + valueIndex +'" disabled >'+
'Valeur par défaut'+
'</label>'+
'</div>' +
'</div>' +
// Bouton ajout d'une valeur à la liste
'<div class="col-sm-12 mt-3 add-value-container" data-id="' + fieldIndex + '">'+
'<label for="add-value" class="add-value" data-id="' + fieldIndex + '" title="Ajouter une valeur à la liste">Ajouter une valeur</label>'+
'<div class="button add-value-button" name="add-value" data-id="' + fieldIndex + '" title="Ajouter une valeur à la liste"><i class="fa fa-puzzle-piece" aria-hidden="true"></i></div>'+
'</div>' +
// checkbox ajouter une valeur "Autre:"
'<div class="col-sm-12 radio mt-3">'+
'<label for="option-other-value" title="Ajouter une option \'Autre:\' à la fin" class="radio-label">'+
'<input type="checkbox" name="option-other-value" data-id="' + fieldIndex + '" class="option-other-value" title="Ajouter une option \'Autre\' à la fin">'+
'Valeur "Autre"'+
'</label>'+
'</div>'
);
break;
 
case 'email':
case 'text':
case 'textarea':
default:
displayFieldDetailsCollect(
fieldIndex,
// Placeholder
'<div class="col-sm-12 mt-3">'+
'<label for="aide-saisie" title="Aidez les utilisateurs en deux ou 3 mots ou chiffres à comprendre ce que doit contenir ce champ">Texte d\'aide à la saisie</label>'+
'<input type="text" name="aide-saisie" data-id="' + fieldIndex + '" class="aide-saisie form-control" placeholder="Ce que doit contenir ce champ">'+
'</div>'
);
break;
}
// Ajout des valeurs possibles
// lorsque le champ est une liste ou case à cocher
onClickAddNewValueToList( fieldIndex , valueIndex );
});
}
 
// Insertion dans le dom des champs de recueil d'informations
function displayFieldDetailsCollect( fieldIndex , fieldDetails ) {
$( '.add-field-select[data-id="' + fieldIndex + '"]' ).after(
'<div class="field-details col-sm-11 mt-3 row" data-id="' + fieldIndex + '">' +
fieldDetails +
'</div>'
).hide().show( 200);
}
 
/**** Ajout des valeurs (options) des "champs de listes" (select, checkbox, radio, etc.) ****/
 
// Ajout des options des listes (deroulantes, cases à cocher etc.)
function onClickAddNewValueToList( fieldIndex , valueIndex ) {
$( '.add-value-button[data-id="' + fieldIndex + '"]' ).click( function() {
valueIndex++;
$( '.add-value-container[data-id="' + fieldIndex + '"]' ).before(
'<div class="new-value center-block row" data-list-value-id="' + valueIndex +'">'+
// Recueil d'une valeur de la liste
'<div class="col-sm-12 mt-3">'+
'<label for="list-value">Valeur *</label>'+
'<input type="text" name="list-value" data-id="' + fieldIndex + '" class="list-value form-control" data-list-value-id="' + valueIndex +'" placeholder="Une des valeurs de la liste" required>'+
'</div>' +
// Recueil du label à afficher
'<div class="col-sm-12 mt-3">'+
'<label for="displayed-label">Label</label>'+
'<input type="text" name="displayed-label" data-id="' + fieldIndex + '" class="displayed-label form-control" data-list-value-id="' + valueIndex +'" placeholder="Label à afficher">'+
'</div>' +
// Checkbox valeur par défaut+bouton supprimer
'<div class="col-sm-12 mt-3 row">'+
// Bouton supprimer une option
'<div class="col-sm-5">'+
'<div class="remove-value button" name="remove-value" data-id="' + fieldIndex + '" data-list-value-id="' + valueIndex + '" title="Supprimer une valeur"><i class="fa fa-trash" aria-hidden="true"></i></div>'+
'</div>'+
// Valeur par défaut
'<div class="col-sm-7 radio">'+
'<label for="is-defaut-value" title="Ceci est la valeur par défaut" class="radio-label">'+
'<input type="checkbox" name="is-defaut-value" data-id="' + fieldIndex + '" class="is-defaut-value" title="entrez une valeur pour activer cette case" data-list-value-id="' + valueIndex +'" disabled >'+
'Valeur défaut'+
'</label>'+
'</div>'+
'</div>'+
'</div>'
).hide().show( 200);
// Une seule valeur par défaut pour select et radio
onClickDefaultValueRemoveOthers( fieldIndex );
// Supprimer une valeur
onClickRemoveListValue( fieldIndex );
});
}
 
// Activer la checkbox de valeur par default uniquement si une valeur est entrée
function onInputListValueLabelEnableDefaultCheckbox() {
$( '#new-fields' ).on( 'input' , '.list-value' , function() {
var $thisDefautValue = $( '.is-defaut-value[data-id="' + $( this ).data( 'id' ) + '"][data-list-value-id="' + $( this ).data( 'list-value-id' ) + '"]' );
if( '' !== $( this ).val() ) {
$thisDefautValue.removeAttr( 'disabled' );
} else {
$thisDefautValue.attr( 'disabled', true ).attr( 'checked' , false );
}
});
}
 
// Pour les éléments "select" et "radio" il ne peut y avoir qu'une valeur par défaut cochée
function onClickDefaultValueRemoveOthers( fieldIndex ) {
var selectedFieldElement = $( '.field-element[data-id="' + fieldIndex + '"]' ).val();
 
if( selectedFieldElement === 'select' || selectedFieldElement === 'radio' ) {
$( '.is-defaut-value[data-id="' + fieldIndex + '"]' ).click( function() {
if( $( this ).is( ':checked' ) ) {
// Décocher tous les autres
$( '.is-defaut-value[data-id="' + fieldIndex + '"]:checked' ).not( $( this) ).attr( 'checked' , false );
}
});
}
}
 
// Bouton supprimer une valeur
function onClickRemoveListValue( fieldIndex ) {
$( '.remove-value.button[data-id="' + fieldIndex + '"]' ).click( function() {
$( '.new-value[data-list-value-id="' + $( this ).data( 'list-value-id' ) + '"]' ).hide( 200 , function () {
$( this ).remove();
});
});
}
 
/*********************************************
* Validation et envoi des nouveaux champs *
*********************************************/
 
// Empêcher de créer plus d'une fois la même clé
function onChangeCheckKeyUnique() {
if( 1 < $( '.field-key' ).length ) {
// Marqueur de valeur dupliquée
var notUnique = false;
 
$( '.field-key' ).change( function () {
let count = $( '.field-key' ).length;
 
for(var index = 0 ; index < count ; index++) {
let thisFieldKey = $( '.field-key[data-id="' + index + '"]' );
// Le champ avec cet index pourrait avoir été supprimé
if( 0 < thisFieldKey.length ) {
for( var otherIndex = 0 ; otherIndex < count ; otherIndex++ ) {
let otherFieldKey = $( '.field-key[data-id="' + otherIndex + '"]' );
// Le champ avec cet index pourrait avoir été supprimé
// On vérifie qu'on ne compare pas un champ avec lui-même
// Que les champs ne sont pas vides
// Les champs dupliqués déclanchent le marqueur et les alertes
if(
0 < otherFieldKey.length &&
index !== otherIndex &&
'' !== otherFieldKey.val() &&
'' !== thisFieldKey.val() &&
thisFieldKey.val() === otherFieldKey.val()
) {
// Le marqueur de valeur dupliquée passe à true
notUnique = true;
if( 0 === $( '.invalid-field-key[data-id="' + index + '"]' ).length ) {
// Le champ est signalé en rouge
// Un message d'alerte apparait sous le champ
thisFieldKey.addClass( 'invalid-key' );
thisFieldKey.after(
'<p class="message invalid-field-key" data-id="' + index + '">' +
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>' +
' Vérifiez qu\'aucune clé n\'ait été utilisée plus d\'une fois' +
'</p>'
);
}
}
}
}
}
if( notUnique ) {
// Un message d'alerte apparait au dessus des boutons prévisualiser/valider
if( 0 === $( '.invalid-field-key-bottom' ).length ) {
$( '#new-fields' ).after(
'<p class="message invalid-field-key-bottom">' +
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>' +
' Une clé a été utilisée plusieurs fois' +
'</p>'
);
}
// Les boutons prévisualiser/valider sont désactivés et signalés en rouge
$( '#preview-field , #validate-new-fields' ).addClass( 'invalid-key' ).css( 'pointer-events', 'none' );
} else {// Si on est ok on retire toutes les alertes
// signalements rouges
$( '.field-key' ).each( function() {
$( this ).removeClass( 'invalid-key' );
});
$( '#preview-field , #validate-new-fields' ).removeClass( 'invalid-key' );
// messages d'alerte
$( '.invalid-field-key' ).each( function() {
$( this ).hide( 200 , function () {
$( this ).remove();
});
});
$( '.invalid-field-key-bottom' ).hide( 200 , function () {
$( this ).remove();
});
//réactivation des boutons prévisualiser/valider
$( '#preview-field' )[0].style.removeProperty( 'pointer-events' );
$( '#validate-new-fields' )[0].style.removeProperty( 'pointer-events' )
}
// Réinitialisation
notUnique = false;
});
}
}
 
// Activation/desactivation des champs valider/previsualiser
function onClickButtonsTagMissingValues() {
$( '#preview-field , #validate-new-fields' ).on( 'click' , function() {
var $button = $( this );
//S'il n'y a pas (plus) de bloc nouveau champ
if( 0 === $( 'fieldset' ).length ) {
return;
}
// Classe "invalid"
missingValuesClass();
if( !$( this ).hasClass( 'invalid' ) ) {
if( $( this ).is( '#validate-new-fields') ) {
// Lancement de l'enregistrement des valeurs à transmettre
onClickStoreNewFields();
} else if( $( this ).is( '#preview-field') ) {
// Lancement de la prévisualisation
newFieldsPreview();
}
}
});
// Si un champ manquant est renseigné
// ou on choisit nouvel élément liste (au moins une option)
// Cette action doit être prise en compte dans la validation
$( '#new-fields' ).on( 'change' , '.invalid[type="text"] , .field-element' , function() {
// S'il on a pas encore cliqué sur prévisualiser/valider
// changer l'élément ne doit pas déclancher le signalement en rouge
if( $( this ).is( '.field-element' ) && !$( '#preview-field , #validate-new-fields' ).hasClass( 'invalid' ) ) {
return;
} else {
// Classe "invalid"
missingValuesClass();
}
});
}
 
// Classe "invalid"
function missingValuesClass() {
// Si au moins un champ "required" n'est pas rempli
$( '#new-fields input[required]' ).each( function() {
if( 0 === $( this ).val().length ) {
// Le champ est signalé en rouge
$( this ).addClass( 'invalid' );
// Un message d'alerte apparait après le champ
if( 0 === $( this ).next( '.validation-warning' ).length ) {
$( this ).after(
'<p class="validation-warning message">' +
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>' +
'&nbsp;Ce champ est requis' +
'</p>'
);
}
} else {
// Le champ est signalé en rouge
$( this ).removeClass( 'invalid' );
// Le message d'alerte du champ est supprimé
if( 0 < $( this ).next( '.validation-warning' ).length ) {
$( this ).next( '.validation-warning' ).hide( 200 , function () {
$( this ).remove();
});
}
}
});
// Si on a des champs à compléter
if( 0 < $( '.invalid[type="text"]' ).length ) {
// Les boutons sont signalés en rouge
$( '#preview-field , #validate-new-fields' ).addClass( 'invalid' );
// Un message d'alerte apparait avant les boutons
if( 0 === $( '#new-fields' ).next( '.validation-warning' ).length ) {
$( '#new-fields' ).after(
'<p class="validation-warning message">' +
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>' +
'&nbsp;Des informations sont manquantes pour certains champs,' +
' vérifiez ceux signalés en rouge' +
'</p>'
);
}
} else {
// Les signalements et messages sont supprimés
$( '#preview-field , #validate-new-fields' ).removeClass( 'invalid' );
$( '#new-fields' ).next( '.validation-warning' ).hide( 200 , function () {
$( this ).remove();
});
}
}
 
/**** Envoi des nouveaux champs ****/
 
// Enregistrement des valeurs à transmettre
function onClickStoreNewFields() {
// Lorsqu'on valide
var resultArrayIndex = 0;
var count = $( 'fieldset' ).last().data( 'id' );
var helpFileExists = false;
// Savoir si au moins un fichier "aide" est enregistré
$( '.field-help' ).each( function () {
if( '' !== $( this ).val() ){
helpFileExists = true;
}
})
// dans ce cas intégrer dans le formulaire à soumettre un bloc
// qui contiendra une copie de chacun de ces input[type="file"]
if( helpFileExists ){
$( '#submit-button' ).before( '<div id="help-doc-submit" style="position:fixed;visibility:hidden;"></div>' );
}
// On déroule les blocs de champs supplémentaires
for( var index = $( 'fieldset' ).first().data( 'id' ) ; index <= count ; index++ ) {
var thisFieldset = $( 'fieldset[data-id="' + index + '"]');
// Certains indices peuvent correspondre à un champ supprimé
if( 0 < $( thisFieldset ).length ) {
// initialisation du tableau de résultats
datasToSubmit[ resultArrayIndex ] = { fieldValues:{} };
// Ajout de la clé au tableau de resultats
datasToSubmit[ resultArrayIndex ].key = $( '.field-key' , thisFieldset ).val();
// Ajout de le nom au tableau de resultats
datasToSubmit[ resultArrayIndex ].name = $( '.field-name' , thisFieldset ).val();
// Recueil de l'élément choisi pour le tableau de resultats
datasToSubmit[ resultArrayIndex ].element = $( '.field-element' , thisFieldset ).val();
// Ajout de la valeur 'requis' ou non au tableau de resultats
datasToSubmit[ resultArrayIndex ].mandatory = $( '.field-is_mandatory' , thisFieldset ).is( ':checked' );
// Ajout de l'unité au tableau de resultats
datasToSubmit[ resultArrayIndex ].unit = $( '.field-unit' , thisFieldset ).val() || null;
// Ajout du tooltip au tableau de resultats
datasToSubmit[ resultArrayIndex ].description = $( '.field-description' , thisFieldset ).val() || null;
// Collecte les des données dépendantes de l'élément choisi
// sous forme d'un tableau de resultats
onSelectCollectDataValuesToSubmit( datasToSubmit[ resultArrayIndex ] , thisFieldset );
 
if( $.isEmptyObject( datasToSubmit[ resultArrayIndex ].fieldValues ) ){
delete datasToSubmit[ resultArrayIndex ].fieldValues;
}
// Copie d'un champ de fichier d'aide dans le bloc d'envoi
if( 0 < $( '.field-help' , thisFieldset ).get(0).files.length ) {
// Présence d'un document d'aide
datasToSubmit[ resultArrayIndex ].help = $( '.field-help' , thisFieldset ).get(0).files[0].type;
$( '.field-help' , thisFieldset ).clone()
.attr( 'name' , 'help-' + datasToSubmit[ resultArrayIndex ].key )// l'attribut name prend la valeur de la clé
.appendTo( '#help-doc-submit' );
} else {
datasToSubmit[ resultArrayIndex ].help = null;
}
resultArrayIndex++;
}
}
 
var resultsArrayJson = JSON.stringify( datasToSubmit , replacer );
 
// JSON.stringify : Gestion des apostrophes dans les valeurs :
function replacer( key , value ) {
if ( 'fieldValues' === key && 'object' === typeof value ) {
for ( var i in value ) {
if ( typeof value[i] === 'string' ) {
// value[i] = value[i].replace( /\u0027/g, "&apos;&apos;" );
// La solution ci-dessus convient pour stockage dans la base mais pas pour la lecture dans saisie
// du coup astuce moisie:
value[i] = value[i].replace( /\u0027/g, "@apos@" ).replace( /\u0022/g, '@quot@' )
}
}
} else if ( typeof value === 'string' ) {
// value = value.replace( /\u0027/g, "&apos;&apos;" );
// La solution ci-dessus convient pour stockage dans la base mais pas pour la lecture dans saisie
// du coup astuce moisie:
value = value.replace( /\u0027/g, "@apos@" ).replace( /\u0022/g, '@quot@' )
}
return value;
}
 
console.log( resultsArrayJson );
 
// Désactivation de tous les champs et boutons (nouveaux champs)
$( '#new-fields, #new-fields .button , #add-fields , #preview-field' ).addClass( 'disabled' );
$( '#validate-new-fields' ).addClass( 'validated' );
$( '.validate-new-fields' ).text( 'Champs validés' );
// Mise à disposition des données pour le bouron submit
$( '#submit-button' ).before(
//la value est passée avec des apostrophes pour que les guillemets de la string json passent bien en string de l'attribut
'<input type="hidden" name="champs-supp" id="champs-supp" value=\'' + resultsArrayJson + '\'>'
);
}
 
// Renseigne le tableau de resultat
// pour les données dépendant de l'élément choisi
function onSelectCollectDataValuesToSubmit( datasToSubmitObject , thisFieldset ) {
switch( datasToSubmitObject.element ) {
case 'select':
case 'checkbox':
case 'list-checkbox':
case 'radio':
datasToSubmitObject.fieldValues.listValue = [];
// Ajout des valeurs de liste
onChangeStoreListValueLabel( datasToSubmitObject , thisFieldset );
// S'il y a une valeur 'autre' on l'indique à la fin de la liste
if( $( '.option-other-value' , thisFieldset ).is( ':checked' ) && -1 === datasToSubmitObject.fieldValues.listValue.indexOf( 'other' ) ) {
datasToSubmitObject.fieldValues.listValue.push( 'other' );
}
break;
 
case 'number':
case 'range':
// Placeholder
datasToSubmitObject.fieldValues.placeholder = $( '.aide-saisie' , thisFieldset ).val() || null;
// Valeur par défaut
datasToSubmitObject.fieldValues.default = $( '.default' , thisFieldset ).val() || null;
// Incrémentation ( attribut step="" )
datasToSubmitObject.fieldValues.step = $( '.step' , thisFieldset ).val() || null;
// Min
datasToSubmitObject.fieldValues.min = $( '.min' , thisFieldset ).val() || null;
// Max
datasToSubmitObject.fieldValues.max = $( '.max' , thisFieldset ).val() || null;
break;
 
case 'date':
// Min
datasToSubmitObject.fieldValues.min = $( '.min' , thisFieldset ).val() || null;
// Max
datasToSubmitObject.fieldValues.max = $( '.max' , thisFieldset ).val() || null;
break;
 
case 'email':
case 'text':
case 'textarea':
default:
// Placeholder
datasToSubmitObject.fieldValues.placeholder = $( '.aide-saisie' , thisFieldset ).val() || null;
break;
}
return datasToSubmitObject;
}
 
// Ajout d'une valeur d'un élément liste (select, checkbox etc.)
// dans le tableau de resultats
function onChangeStoreListValueLabel( datasToSubmitObject , thisFieldset ) {
$( '.list-value' , thisFieldset ).each( function() {
var valueId = $( this ).data( 'list-value-id' );
var selectedFieldElement = $( '.field-element' , thisFieldset ).val();
var displayedLabel = '';
 
if ( valeurOk( $( '.displayed-label[data-list-value-id="' + valueId + '"]', thisFieldset ).val() ) ) {
displayedLabel = $( '.displayed-label[data-list-value-id="' + valueId + '"]', thisFieldset ).val();
}
if( $( this ).val() ){
// Is-default-value non cochée
if( !$( '.is-defaut-value[data-list-value-id="' + valueId + '"]' , thisFieldset ).is( ':checked' ) ) {
datasToSubmitObject.fieldValues.listValue.push( [ $( this ).val(), displayedLabel ] );
// Is-default-value cochée pour select/radio
} else if( 'select' === selectedFieldElement || 'radio' === selectedFieldElement ) {
// Une seule valeur par defaut, devient la première valeur du tableau + '#'
datasToSubmitObject.fieldValues.listValue.unshift( [ $( this ).val() + '#', displayedLabel ] );
// Is-default-value cochée pour checkbox/list-checkbox
} else {
// On ajoute simplement la valeur au tableau + '#'
datasToSubmitObject.fieldValues.listValue.push( [ $( this ).val() + '#', displayedLabel ] );
}
}
});
}
 
/************************************************
* Fonction d'affichage des champs classiques *
************************************************/
 
// Prévisualisation
function DisplayClassicFields() {
// Affichage du titre du widget
renderFields( $( '#titre' ) , $( '.widget-renderer h1' ) );
// Affichage de la description
renderFields( $( '#description' ) , $( '.preview-description' ) );
// Affichage referentiel
$( '#label-taxon span' ).text( ' (' + $( '#referentiel' ).val() + ')' );
$( '#referentiel' ).change( function() {
$( '#label-taxon span' ).text( ' (' + $( this ).val() + ')' );
});
 
// Affichage du logo s'il existe déjà
if( 0 !== $( '#logo' ).val().length || $( '#logo' )[0].defaultValue ) {
$( '#preview-logo' ).append(
'<img src="' +
$( '#group-settings-form .logo img' ).prop( 'src' ) +
'" width="75%"' +
'>'
);
}
// Affichage du logo chargé
$( '#logo.input-file' ).change( function( event ) {
// Si le 'change' n'était pas une suppression
if( $.isEmptyObject( event.target.files[0] ) ) {
$( '#preview-logo img' ).remove();
// Si on a chargé un logo ou changé le fichier
} else {
$( '#preview-logo' ).append(
'<img src="' +
URL.createObjectURL( event.target.files[0] ) +
'" width="75%"' +
'>'
);
}
});
// Affichage de l'image de fond
$('#image_fond.input-file').change( function ( event ) {
if( !$.isEmptyObject( event.target.files[0] ) ) {
$( '.widget-renderer' ).css('background' ,'url(' + URL.createObjectURL( event.target.files[0] ) + ') no-repeat fixed center center');
} else {
$( '.widget-renderer' )[0].style.removeProperty( 'background' );
}
});
}
 
// Affichage des infos dès que disponibles
// pour les champs classiques
function renderFields( $source , $taget ) {
var text = new DOMParser().parseFromString($source.val(), 'text/html');
 
text = text.body.textContent || '';
if( $source.val() ) {
$taget.text( text );
}
$source.change( function () {
$taget.text( text );
});
}
 
 
/*****************************************************
* Fonction d'affichage des champs supplémentaires *
*****************************************************/
 
// Construction des éléments à visualiser
function onClickPreviewField( thisFieldset , index ) {
// Récupération des données
// Tous les champs
var fieldLabel = $( '.field-name' , thisFieldset ).val() || '',//nom
fieldKey = $( '.field-key' , thisFieldset ).val() || '',//clé
fieldElement = $( '.field-element' , thisFieldset ).val() || '',//élément
fieldIsMandatory = $( '.field-is_mandatory' , thisFieldset ).is( ':checked' ),//champ requis
fieldUnit = $( '.field-unit' , thisFieldset ).val() || '',//unités
fieldTooltip = $( '.field-description' , thisFieldset ).val() || '',//info-bulle
fieldHelp = $( '.file-return.help-doc-' + index ).text() || '',//nom du fichier d'aide
fieldPlaceholder = $( '.aide-saisie' , thisFieldset ).val() || '',//placeholder
// Champs à valeur numérique ou date
fieldStep = $( '.step' , thisFieldset ).val() || '',
fieldMin = $( '.min' , thisFieldset ).val() || '',
fieldMax = $( '.max' , thisFieldset ).val() || '',
// Champs "listes"
fieldDefaultNum = $( '.default' , thisFieldset ).val() || '',// value range/number par default
fieldOtherValue = $( '.option-other-value' , thisFieldset ).is( ':checked' ),//option autre
fieldOptions = collectListOptions( thisFieldset );//Array: toutes les options
// Variables d'affichage
var fieldHtml = '',//variable contenant tout le html à afficher
commonFieldsHtml = {},//Éléments simples ou chaînes communes aux "listes"
listFieldsHtml = {},//chaînes & html pour les listes mais non spécifiques
listFieldsHtml = {},//chaînes & html spécifiques aux listes
count = fieldOptions.length;//nombre d'options, pour les boucles for
fieldLabel = fieldLabel.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' );
fieldTooltip = fieldTooltip.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' );
fieldPlaceholder = fieldPlaceholder.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' );
 
//valeurs initiales des chaînes de caractères
//Éléments simples ou chaînes communes aux "listes"
commonFieldsHtml = {
dataIdAttr : ' data-id="' + index + '"',
helpButton : '',//bouton aide
helpClass : '',//classe de l'élément associé au bouton aide
titleAttr : '',//info-bulle
fieldInput : {//attributs de l'élément
typeAttr : ' type="' + fieldElement + '"',
nameAttr : ' name="' + fieldKey + '"',
classAttr : ' class="' + fieldKey + '"',
placeholderAttr : '',
mandatoryAttr : '',//required
otherAttr : ''
},
fieldLabel : {//attributs et contenu du label
labelContent : fieldLabel,//label
forAttr : ' for="' + fieldKey + '"',//attribut for
classAttr : '',//classe du label
otherAttr : ''//tous autres attributs
}
}
// Pour les éléments de listes (select, checkbox, etc.)
listFieldsHtml = {
containerContent : fieldLabel,//les options peuvent avoir chacune un label
containerClass : '',//une classe pour le conteneur
forAttr : '',//correspond à l'id d'une checkbox/radio/list-checkbox
optionIdAttr : '',//value-id
defaultAttr : ''//default
};
// Changement d'un élément existant:
// supprimer le précédent pour ajouter le nouveau
if( 0 < $( '.preview-fields' , thisFieldset ).length ) {
$( '.preview-fields' , thisFieldset ).remove();
}
// Élément requis
if( fieldIsMandatory ) {
// Attribut required pour le listes
commonFieldsHtml.fieldInput.mandatoryAttr = ' required="required"';
// Nom du champ (éléments listes)
listFieldsHtml.containerContent = '* ' + listFieldsHtml.containerContent;
// Nom du champ (éléments simples)
commonFieldsHtml.fieldLabel.labelContent = '* ' + commonFieldsHtml.fieldLabel.labelContent;
}
// Infobulle
if( '' !== fieldTooltip ) {
commonFieldsHtml.titleAttr = ' title="' + fieldTooltip + '"';
}
// Placeholder
if( '' !== fieldPlaceholder ) {
commonFieldsHtml.fieldInput.placeholderAttr = ' placeholder="' + fieldPlaceholder + '"';
}
// Fichier d'aide
if( '' !== fieldHelp ) {
// Bouton 'aide'
commonFieldsHtml.helpButton = '<div class="help-button btn btn-outline-info btn-sm border-0"><i class="fas fa-info-circle"></i></div>';
// classe 'aide'
commonFieldsHtml.helpClass = ' and-help';
}
// html à ajouter en fonction de l'élément choisi
switch( fieldElement ) {
case 'checkbox' :
case 'radio' :
listFieldsHtml.containerClass = ' class="' + fieldElement +'"';
commonFieldsHtml.fieldLabel.classAttr = ' class="radio-label"';
fieldHtml =
// Conteneur
'<div style="width:100%"' +
// Class="L'élément choisi"
listFieldsHtml.containerClass +
// DataId
commonFieldsHtml.dataIdAttr +
// Required
commonFieldsHtml.fieldInput.mandatoryAttr +
// Info bulle
commonFieldsHtml.titleAttr +
' >'+
// Nom du champ
// Classe 'and-help'
'<div class="mt-3 list-label' + commonFieldsHtml.helpClass + '">' +
// Label
listFieldsHtml.containerContent +
// Bouton 'help'
commonFieldsHtml.helpButton +
'</div>';
// On déroule les différentes valeurs
for( let i = 0; i < count; i++ ) {
let fieldOption = fieldOptions[i];
// L'id de input
listFieldsHtml.inputIdAttr = ' id="' + fieldOption.optionValue + '"';
listFieldsHtml.forAttr = ' for="' + fieldOption.optionValue + '"';
// Default
listFieldsHtml.defaultAttr = '';//réinitialisation
if( fieldOption.isDefault ) {//affectation
listFieldsHtml.defaultAttr = ' checked';
}
// L'indice de chaque option
// L'option "autre" n'en a pas
if( '' !== fieldOption.optionIndex ) {
listFieldsHtml.optionIdAttr = ' value-id="' + fieldOption.optionIndex + '"';
}
 
fieldHtml +=
'<label' +
// For
listFieldsHtml.forAttr +
// value-id
listFieldsHtml.optionIdAttr +
// Class du label
commonFieldsHtml.fieldLabel.classAttr +
'>' +
'<input' +
// Type
commonFieldsHtml.fieldInput.typeAttr +
// Id
listFieldsHtml.inputIdAttr +
// DataId
commonFieldsHtml.dataIdAttr +
// value-id
listFieldsHtml.optionIdAttr +
// Name
commonFieldsHtml.fieldInput.nameAttr +
// Value
' value="' + fieldOption.optionValue.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ) + '"' +
// Checked
listFieldsHtml.defaultAttr +
// Class="nom du champ"
commonFieldsHtml.fieldInput.classAttr +
'>' +
// Label de l'option
fieldOption.optionText.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ) +
'</label>';
}
// Si valeur "autre" est cochée
if( fieldOtherValue ) {
fieldHtml +=
'<label for="other"' +
commonFieldsHtml.dataIdAttr +
commonFieldsHtml.fieldLabel.classAttr +
'>' +
'<input' +
commonFieldsHtml.fieldInput.typeAttr +
' id="other-' + fieldElement + '-' + index + '"' +
commonFieldsHtml.fieldInput.nameAttr +
' value="other"' +
commonFieldsHtml.fieldInput.classAttr +
commonFieldsHtml.dataIdAttr +
'>' +
'Autre</label>';
}
// Fin du conteneur
fieldHtml += '</div>';
break;
 
case 'list-checkbox':
commonFieldsHtml.fieldLabel.classAttr = ' class="radio-label"';
fieldHtml =
// Classe 'and-help'
'<div class="multiselect add-field-select' + commonFieldsHtml.helpClass + '"' +
// DataId
commonFieldsHtml.dataIdAttr +
'>' +
'<label style="width:100%">' +
// Nom du champ
listFieldsHtml.containerContent +
// Bouton 'help'
commonFieldsHtml.helpButton +
'</label>' +
'<div class="mt-3">'+
'<div class="selectBox"' +
// DataId
commonFieldsHtml.dataIdAttr +
'>' +
'<select' +
// DataId
commonFieldsHtml.dataIdAttr +
// Required
commonFieldsHtml.fieldInput.mandatoryAttr +
// Info bulle
commonFieldsHtml.titleAttr +
// Class
' class="form-control custom-select ' + fieldElement + '"' +
'>' +
// Apparait dans la barre de sélection
'<option>Plusieurs choix possibles</option>' +
'</select>' +
'<div class="overSelect"></div>' +
'</div>' +
'<div class="checkboxes hidden"' +
// DataId
commonFieldsHtml.dataIdAttr +
'>';
// On déroule les différentes valeurs
for( let i = 0; i < count; i++ ) {
let fieldOption = fieldOptions[i];
// Type="checkbox"
commonFieldsHtml.fieldInput.typeAttr = ' type="checkbox"';
// Id
listFieldsHtml.inputIdAttr = ' id="' + fieldOption.optionValue.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ).toLowerCase() + '"';
// For
listFieldsHtml.forAttr = ' for="' + fieldOption.optionValue.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ).toLowerCase() + '"';
// Default
listFieldsHtml.defaultAttr = '';//réinitialisation
if( fieldOption.isDefault ) {
listFieldsHtml.defaultAttr = ' checked';//affectation
}
// value-id
if( '' !== fieldOption.optionIndex ) {
listFieldsHtml.optionIdAttr = ' value-id="' + fieldOption.optionIndex + '"';
}
 
fieldHtml +=
'<label' +
// For
listFieldsHtml.forAttr +
// value-id
listFieldsHtml.optionIdAttr +
// Class du label
commonFieldsHtml.fieldLabel.classAttr+
'>' +
'<input type="checkbox"' +
// Id
listFieldsHtml.inputIdAttr +
// value-id
listFieldsHtml.optionIdAttr +
// Name
commonFieldsHtml.fieldInput.nameAttr +
// Value
' value="' + fieldOption.optionValue.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ) + '"' +
// Checked
listFieldsHtml.defaultAttr +
// Class="nom du champ"
commonFieldsHtml.fieldInput.classAttr +
// DataId
commonFieldsHtml.dataIdAttr +
'>' +
// Label de l'option
fieldOption.optionText.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ) +
'</label>';
}
// Si valeur "autre" est cochée
if( fieldOtherValue ) {
fieldHtml +=
'<label for="other"' +
// DataId
commonFieldsHtml.dataIdAttr +
'>' +
'<input type="checkbox"' +
' id="other-' + fieldElement + '-' + index + '"' +
commonFieldsHtml.fieldInput.nameAttr +
' value="other"' +
commonFieldsHtml.fieldInput.classAttr +
// DataId
commonFieldsHtml.dataIdAttr +
'>' +
'Autre</label>';
}
// Fermeture des conteneurs .multiselect .checkboxes
fieldHtml +=
'</div>'+
'</div>'+
'</div>';
break;
 
case 'select':
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
commonFieldsHtml.fieldInput.classAttr += ' form-control custom-select"';
fieldHtml =
// Conteneur/Wrapper
// +Classe 'and-help'
'<div class="add-field-select ' + fieldElement + commonFieldsHtml.helpClass + '"' +
// DataID
commonFieldsHtml.dataIdAttr +
'>' +
'<label class="mt-3" style="width:100%"' +
commonFieldsHtml.fieldLabel.forAttr +
// Info bulle
commonFieldsHtml.titleAttr +
'>' +
// Nom du champ
listFieldsHtml.containerContent +
// Bouton 'help'
commonFieldsHtml.helpButton +
'</label>' +
'<select' +
commonFieldsHtml.fieldInput.nameAttr +
' id="' + fieldKey + '"' +
// Class
commonFieldsHtml.fieldInput.classAttr +
// Required
commonFieldsHtml.fieldInput.mandatoryAttr +
// DataId
commonFieldsHtml.dataIdAttr +
'>';
 
// On déroule les différentes valeurs
for( let i = 0; i < count; i++ ) {
let fieldOption = fieldOptions[i];
// Default
listFieldsHtml.defaultAttr = '';//réinitialisation
if( fieldOption.isDefault ) {//affectation
listFieldsHtml.defaultAttr = ' selected="selected"';
}
// value-id
if( '' !== fieldOption.optionIndex ) {
listFieldsHtml.optionIdAttr = ' value-id="' + fieldOption.optionIndex + '"';
}
 
fieldHtml +=
'<option' +
// Value
' value="' + fieldOption.optionValue.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ) + '"' +
// Value-id
listFieldsHtml.optionIdAttr +
// Selected
listFieldsHtml.defaultAttr +
'>' +
// Option
fieldOption.optionText.replace( /(')/gm, '&apos;' ).replace( /(")/gm, '&quot;' ) +
'</option>';
}
// Si valeur "autre" est cochée
if( fieldOtherValue ) {
fieldHtml +=
'<option class="other" value="other"' + commonFieldsHtml.dataIdAttr + '>' +
'Autre' +
'</option>';
}
// Fermeture des conteneurs
fieldHtml +=
'</select>' +
// Fin du conteneur/wrapper
'</div>';
break;
 
case 'textarea':
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'custom-range'
commonFieldsHtml.fieldInput.classAttr += ' form-control"';
// Classe 'and-help'
commonFieldsHtml.fieldLabel.classAttr = ' class="mt-3 ' + commonFieldsHtml.helpClass + '"';
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr += ' id="' + fieldKey + '"';
 
fieldHtml =
'<label style="width:100%"' +
// For
commonFieldsHtml.fieldLabel.forAttr +
// Class
commonFieldsHtml.fieldLabel.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr +
'>' +
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent +
// Bouton 'help'
commonFieldsHtml.helpButton +
'</label>' +
'<textarea' +
// Name
commonFieldsHtml.fieldInput.nameAttr +
// DataId
commonFieldsHtml.dataIdAttr +
// Class
commonFieldsHtml.fieldInput.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Info-bulle
commonFieldsHtml.fieldInput.placeholderAttr +
// Required
commonFieldsHtml.fieldInput.mandatoryAttr +
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr +
'></textarea>';
break;
 
case 'range':
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'custom-range'
commonFieldsHtml.fieldInput.classAttr += ' custom-range form-control pl-3"';
// Classe 'and-help'
commonFieldsHtml.fieldLabel.classAttr = ' class="mt-3 ' + commonFieldsHtml.helpClass + '"';
// Step
if( '' !== fieldStep ) {
commonFieldsHtml.fieldInput.otherAttr += ' step="' + fieldStep + '"';
}
// Min
if( '' !== fieldMin ) {
commonFieldsHtml.fieldInput.otherAttr += ' min="' + fieldMin + '"';
}
//Max
if( '' !== fieldMax ) {
commonFieldsHtml.fieldInput.otherAttr += ' max="' + fieldMax + '"';
}
fieldHtml =
'<div' +
' class="range"' +
' id="' + fieldKey + '"' +
'>' +
'<label style="width:100%"' +
// For
commonFieldsHtml.fieldLabel.forAttr +
// Class
commonFieldsHtml.fieldLabel.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr +
'>' +
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent +
// Bouton 'help'
commonFieldsHtml.helpButton +
'</label>' +
'<div class="col-sm-12 row" style="max-width=100%">' +
// Visualiser min max et la valeur de range
'<p class="col-sm-2 range-values text-center font-weight-bold">'+
'Min ' + fieldMin +
'</p>'+
'<div class="range-live-value range-values text-center font-weight-bold col-sm-7">'+
fieldDefaultNum +
'</div>'+
'<p class="col-sm-2 range-values text-center font-weight-bold">'+
'Max ' + fieldMax +
'</p>' +
 
'<input' +
// Type
commonFieldsHtml.fieldInput.typeAttr +
// Name
commonFieldsHtml.fieldInput.nameAttr +
// DataId
commonFieldsHtml.dataIdAttr +
// Class
commonFieldsHtml.fieldInput.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Required
commonFieldsHtml.fieldInput.mandatoryAttr +
// Default
' value="' + fieldDefaultNum + '"' +
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr +
'>' +
'</div>'
'</div>';
break;
 
case 'number':
// Step
if( '' !== fieldStep ) {
commonFieldsHtml.fieldInput.otherAttr += ' step="' + fieldStep + '"';
}
case 'date':
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'and-help'
commonFieldsHtml.fieldInput.classAttr += commonFieldsHtml.helpClass + ' form-control"';
// Min
if( '' !== fieldMin ) {
commonFieldsHtml.fieldInput.otherAttr += ' min="' + fieldMin + '"';
}
// Max
if( '' !== fieldMax ) {
commonFieldsHtml.fieldInput.otherAttr += ' max="' + fieldMax + '"';
}
// Class du label
commonFieldsHtml.fieldLabel.classAttr = 'class="mt-3"';
fieldHtml =
'<div class="number">' +
'<label style="width:100%"' +
// For
commonFieldsHtml.fieldLabel.forAttr +
// Class
commonFieldsHtml.fieldLabel.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr +
'>' +
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent +
// Bouton 'help'
commonFieldsHtml.helpButton +
'</label>' +
'<input' +
// Type
commonFieldsHtml.fieldInput.typeAttr +
// Name
commonFieldsHtml.fieldInput.nameAttr +
// DataId
commonFieldsHtml.dataIdAttr +
// Class
commonFieldsHtml.fieldInput.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Placeholder
commonFieldsHtml.fieldInput.placeholderAttr +
// Required
commonFieldsHtml.fieldInput.mandatoryAttr +
// Default
' value="' + fieldDefaultNum + '"' +
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr +
'>' +
'</div>';
break;
 
case 'text' :
case 'email':
default:
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'and-help'
commonFieldsHtml.fieldInput.classAttr += commonFieldsHtml.helpClass + ' form-control"';
// Class du label
commonFieldsHtml.fieldLabel.classAttr = 'class="mt-3"';
 
fieldHtml =
'<label style="width:100%"' +
// For
commonFieldsHtml.fieldLabel.forAttr +
// Class
commonFieldsHtml.fieldLabel.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr +
'>' +
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent +
// Bouton 'help'
commonFieldsHtml.helpButton +
'</label>' +
'<input' +
// Type
commonFieldsHtml.fieldInput.typeAttr +
// Name
commonFieldsHtml.fieldInput.nameAttr +
// DataId
commonFieldsHtml.dataIdAttr +
// Class
commonFieldsHtml.fieldInput.classAttr +
// Info-bulle
commonFieldsHtml.titleAttr +
// Placeholder
commonFieldsHtml.fieldInput.placeholderAttr +
// Required
commonFieldsHtml.fieldInput.mandatoryAttr +
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr +
'>';
break;
}
return fieldHtml;
}
 
// Construire un tableau des options pour chaque élément de listes
function collectListOptions( thisFieldset ) {
var $details = $( '.field-details' , thisFieldset ),
options = [];
 
$details.find( '.new-value' ).each( function() {
options.push({
// Valeur transmise (value)
optionValue : $( this ).find( '.list-value' ).val().toLowerCase(),
// Valeur Visible
optionText : $( this ).find( '.displayed-label' ).val(),
// Booléen "default"
isDefault : $( this ).find( '.is-defaut-value' ).is( ':checked' ),
// Indice de l'option
optionIndex : $( this ).data( 'list-value-id' )
});
});
return options;
}
 
// Faire apparaitre un champ text "Autre"
function onOtherOption( thisFieldset , index ) {
// Ce champ (dans la prévisualisation)
var thisPreviewFieldset = $( '.preview-fields[data-id="' + index + '"]'),
// L'élément choisi
element = $('.field-element' , thisFieldset ).val(),
// Où insérer le champ "Autre"
$element = $( '.' + element , thisPreviewFieldset ),
// html du champ "Autre"
collectOther =
'<div class="col-sm-12 mt-1 collect-other-block">'+
'<label data-id="' + index + '" for="collect-other" style="font-weight:300">Autre option :</label>' +
'<input type="text" name="collect-other" data-id="' + index + '" class="collect-other form-control" >'+
'</div>';
// Pouvoir supprimer le champ "Autre"
function optionRemove( thisPreviewFieldset ) {
$( '.collect-other-block' , thisPreviewFieldset ).remove();
}
 
switch( element ) {
case 'radio' :
// Lorsqu'un nouveau bouton est coché
$( 'input' , thisPreviewFieldset ).on( 'change' , function () {
if( 'other' === $( this ).val() ) {
// Insertion du champ "Autre" après les boutons
$element.after( collectOther );
} else {
// Suppression du champ autre
optionRemove( thisPreviewFieldset );
}
});
break;
 
case 'select' :
// Lorsque l'option "Autre" est selectionnée
$( 'select' , thisPreviewFieldset ).on( 'change' , function () {
if( 'other' === $( this).val() ) {
// Insertion du champ "Autre" après les boutons
$element.after( collectOther );
// Suppression du champ autre
} else {
optionRemove( thisPreviewFieldset );
}
});
break;
 
case 'list-checkbox' :
// Lorsque "Autre" est coché
$( 'input#other-' + element + '-' + index, thisPreviewFieldset ).on( 'click' , function () {
// Insertion du champ "Autre" après les boutons
if( $( this ).is( ':checked' ) ) {
$( '.checkboxes', thisPreviewFieldset ).append( collectOther );
} else {
// Suppression du champ autre
optionRemove( thisPreviewFieldset );
}
});
break;
case 'checkbox' :
// Lorsque "Autre" est coché
$( 'input#other-' + element + '-' + index, thisPreviewFieldset ).on( 'click' , function () {
// Insertion du champ "Autre" après les boutons
if( $( this ).is( ':checked' ) ) {
$element.after( collectOther );
} else {
// Suppression du champ autre
optionRemove( thisPreviewFieldset );
}
});
break;
 
default :
break;
}
}
 
// Prévisualisation des nouveaux champs
function newFieldsPreview() {
var count = $( 'fieldset' ).last().data( 'id' );
// Si on a déjà prévisualisé on efface tout pour recommencer
if( 0 < $( '.preview-fields' ).length ) {
$( '.preview-fields' ).each( function () {
$( this ).remove();
});
}
// Au premier ajout d'un champ dans la prévisualisation on ajoute un titre et un message
if( true === firstClick ) {
$( '#zone-supp' ).prepend(
'<h2>Informations propres au projet</h2>' +
'<div class="message">L\'objectif principal de cet aperçu est de vérifier les contenus et repérer d\'éventuelles erreurs</div>'
);
}
// Parcourir tous les blocs d'infos de champs supplémentaires
for( var index = $( 'fieldset' ).first().data( 'id' ) ; index <= count ; index++ ) {
var thisFieldset = $( 'fieldset[data-id="' + index + '"]');
// Certains indices peuvent correspondre à un champ supprimé
if( 0 < $( thisFieldset ).length ) {
// Prévisualisation d'un champ
$( '#zone-supp .preview-container' ).append(
'<div class="preview-fields col-sm-12 row" data-id="' + index + '">'+
onClickPreviewField( thisFieldset , index ) +
'</div>'
);
// Ajout/suppression d'un champ texte "Autre"
if( $( '.option-other-value' , thisFieldset ).is( ':checked' ) ) {
onOtherOption( thisFieldset , index);
}
}
}
// Le titre + message de la section prévisualisation ne sont ajoutés qu'une fois
firstClick = false;
}
 
// Activation/Desactivation et contenu de la modale Bootstrap
// https://getbootstrap.com/docs/3.3/javascript/#modals
function previewFieldHelpModal() {
$( '#zone-supp' ).on( 'click' , '.help-button' , function ( event ) {
var index = $( this ).closest( '.preview-fields' ).data( 'id' ),
thisFieldset = $( '.new-field[data-id="' + index + '"]' ),
file = $( '.field-help' , thisFieldset )[0].files[0],
tmppath = URL.createObjectURL( file );
// Titre
$( '#help-modal-label' ).text( 'Aide pour : ' + $( '.field-name' , thisFieldset ).val() );
// Contenu
if( file.type.match( 'image/*' ) ) {
$( '#print_content' ).append( '<img src="' + tmppath + '" style="max-width:100%">' );
} else {
$( '#print_content' ).append( '<p>Erreur : le fichier n\'est pas une image</p>' );
}
// Sortie avec la touche escape
$( '#help-modal' ).modal( { keyboard : true } );
// Affichage
$( '#help-modal' ).modal({ show: true });
// Remplacer l'autofocus qui ne fonctionne plus en HTML5
// Message dans la doc de bootstrap :
// Due to how HTML5 defines its semantics,
// the autofocus HTML attribute has no effect in Bootstrap modals.
// To achieve the same effect, use some custom JavaScript
$( '#help-modal' ).on( 'shown.bs.modal' , function () {
$( '#myInput' ).trigger( 'focus' );
})
// Réinitialisation
$( '#help-modal' ).on( 'hidden.bs.modal' , function () {
$( '#help-modal-label' ).text();
$( '#print_content' ).empty();
})
});
}
 
function potDeMiel() {
if( !valeurOk( $( '#basic-widget-form #email' ).val() ) ) {
$( '#signup_submit' ).prop( 'disabled', false );
}
$( '#signup_submit' ).off().on( 'click dblclick mousedown submit focus keydown keypress keyup touchstart touchend', function() {
if( valeurOk( $( '#basic-widget-form #email' ).val() ) ) {
return false;
}
});
$( '#basic-widget-form #email' ).css({ position : 'absolute', left : '-2000px' }).on( 'input blur change', function( event ) {
event.preventDefault();
if( valeurOk( $( this ).val() ) ) {
$( 'form' ).each( function() {
$( this )[0].reset();
});
$( '#signup_submit' ).prop( 'disabled', true );
}
});
}
 
function onGeoloc() {
// Empêcher que le module carto ne bind ses events partout
$( '#tb-geolocation' ).on( 'submit blur click focus mousedown mouseleave mouseup change', '*', function( event ) {
event.preventDefault();
return false;
});
// evenement location
$( '#tb-geolocation' ).on( 'location' , function( location ) {
var locDatas = location.originalEvent.detail;
 
if ( valeurOk( locDatas ) ) {
console.dir( locDatas );
 
var latitude = '';
var longitude = '';
if ( valeurOk( locDatas.geometry.coordinates ) ) {
if ( 'Point' === locDatas.geometry.type ) {
if ( valeurOk( locDatas.geometry.coordinates[0] ) ) {
longitude = locDatas.geometry.coordinates[0].toFixed( 5 );
}
if ( valeurOk( locDatas.geometry.coordinates[1] ) ) {
latitude = locDatas.geometry.coordinates[1].toFixed( 5 );
}
} else if ( 'LineString' === locDatas.geometry.type ) {
if(this.valOk( locDatas.centroid.coordinates )){
if ( this.valOk( locDatas.centroid.coordinates[0] ) ) {
longitude = locDatas.centroid.coordinates[0];
}
if ( this.valOk( locDatas.centroid.coordinates[1] ) ) {
latitude = locDatas.centroid.coordinates[1];
}
} else {// on ne prend qu'un point de la ligne
if ( valeurOk( locDatas.geometry.coordinates[0][0] ) ) {
longitude = locDatas.geometry.coordinates[0][0];
longitude = longitude.toFixed( 5 );
}
if ( valeurOk( locDatas.geometry.coordinates[0][1] ) ){
latitude = locDatas.geometry.coordinates[0][1];
latitude = latitude.toFixed( 5 );
}
}
}
}
if ( valeurOk( latitude ) && valeurOk( longitude ) ) {
$( '#latitude' ).val( latitude );
$( '#longitude' ).val( longitude );
}
}
});
}
 
function onGeolocManuelle() {
const coords = ['latitude','longitude','zoom'];
$( '#latitude,#longitude,#zoom' ).on( 'change', function( event ) {
var thisCoord = this.id,
thisVal = $( this ).val(),
valeur = '';
 
if ( $.isNumeric( thisVal ) ) {
switch( thisCoord ) {
case 'zoom':
if( 0 < parseInt( thisVal, 10 ) && 18 >= parseInt( thisVal, 10 ) ) {
valeur = thisVal;
}
break;
case 'latitude':
if ( 90 > Math.abs( parseInt( thisVal, 10 ) ) ) {
valeur = parseFloat( thisVal, 10 ).toFixed( 5 );
$( '#latitude' ).val( valeur );
}
break;
case 'longitude':
if ( 180 >= Math.abs( parseInt( thisVal, 10 ) ) ) {
valeur = parseFloat( thisVal, 10 ).toFixed( 5 );
$( '#longitude' ).val( valeur );
}
break;
default:
break;
}
}
//un champ vide n'est pas une erreur
if ( $.isNumeric( valeur ) ) {
$( this ).siblings( 'span.error' ).remove();
} else if ( 0 <= $.inArray( thisCoord, coords ) ) {
// on ne signale pas d'erreur si il n'y a rien dans le champ
if ( !valeurOk( $( this ).siblings( 'span.error' ) ) && valeurOk( $( this ).val() ) ) {
$( this ).after( '<span class="error">mauvais format pour ce champ<span>' );
} else {
$( this ).siblings( 'span.error' ).remove();
}
}
});
}
 
function geolocValidationEtStockage() {
$( '#signup_submit' ).off().on( 'click', function( event ) {
var localisation = '',
latitude = $( '#latitude' ).val(),
longitude = $( '#longitude' ).val(),
zoom = $( '#zoom' ).val();
 
if ( ( valeurOk( longitude ) && !valeurOk( latitude ) ) || ( !valeurOk( longitude ) && valeurOk( latitude ) ) ) {
if( !valeurOk( $( '.warning-carto' ) ) ) {
$( '#new-fields-buttons' ).after(
'<p class="message warning-carto">'+
'<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>&nbsp;Vous avez entré des coordonnées incomplètes<br>'+
'Complétez latitude ou longitude, ou placez un marqueur sur la carto, ou effacez ces deux champs'+
'</p>'
);
}
return false;
} else if( valeurOk( $( '.warning-carto' ) ) ) {
$( '.warning-carto' ).remove();
}
if ( valeurOk( latitude ) && valeurOk( longitude ) ) {
localisation += 'latitude:' + latitude + ';';
localisation += 'longitude:' + longitude;
}
if ( valeurOk( zoom ) ) {
if( valeurOk( localisation ) ) {
localisation += ';';
}
localisation += 'zoom:' + zoom;
}
if ( valeurOk( localisation ) ) {
$( '#localisation' ).val( localisation );
}
});
}
 
/**
* Permet à la fois de vérifier qu'une valeur ou objet existe et n'est pas vide
* et de comparer à une autre valeur :
* Vérifie qu'une variable ou objet n'est pas : vide, null, undefined, NaN
* Si comparer est défini on le compare à valeur en fonction de sensComparaison
* Un booléen est une variable valide : on retourne true
* @param { string || number || object || undefined } valeur
* @param { boolean } sensComparaison : true = rechercher, false = refuser
* @param { string || number || object || undefined || boolean } comparer :valeur à comparer
* @returns {boolean}
*/
function valeurOk( valeur, sensComparaison = true, comparer = undefined ) {
var retour;
if ( 'boolean' !== typeof valeur ) {
switch( typeof valeur ) {
case 'string' :
retour = ( '' !== valeur );
break;
case 'number' :
retour = ( NaN !== valeur );
break;
case 'object' :
retour = ( null !== valeur && undefined !== valeur && !$.isEmptyObject( valeur ) );
if ( undefined !== valeur.length ) {
retour = ( retour && 0 < valeur.length );
}
break;
case 'undefined' :
default :
retour = false;
}
if ( retour && comparer !== undefined ) {
var resultComparaison = ( comparer === valeur );
retour = ( sensComparaison ) ? resultComparaison : !resultComparaison ;
}
return retour;
} else {
// Un booléen est une valeur valable
return true;
}
}
 
/***************************
* Lancement des scripts *
***************************/
 
// Tableau d'envoi des données
var datasToSubmit = new Array();
// Variable permettant un seul affichage du titre
// de la prévisualisation pour les nouveaux champs
var firstClick = true;
 
jQuery( document ).ready( function() {
// reset de tous les formulaires
$( 'form' ).each( function() {
$( this )[0].reset();
$('form').each(function () {
$(this)[0].reset();
});
// Gestion du champ pot de miel
potDeMiel();
// Geoloc
onGeoloc();
onGeolocManuelle();
geolocValidationEtStockage();
// Identifiant de champ
var fieldIndex = 0;
// Ajout de nouveaux champs
onClickAddNewFields( fieldIndex );
// Activation/Desactivation des boutons valider et prévisualiser
onClickButtonsTagMissingValues();
initGeoloc();
// style et affichage de certains champs
displayFields();
// affichage et recueil des données des champs supp
champsSupp.init();
// Prévisualisation des champs classiques
DisplayClassicFields();
// Affichage des images ou nom des documents importés
inputFile();
// Affichage des List-checkbox
inputListCheckbox();
// Activer la checkbox de valeur par default uniquement si une valeur est entrée
onInputListValueLabelEnableDefaultCheckbox();
// Affichage des Range
inputRangeDisplayNumber();
// Modale "aide"
previewFieldHelpModal();
});
displayClassicFields();
});
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/validation.js
New file
0,0 → 1,136
import {hideNRemove} from './utils.js';
 
/*********************************************
* Validation et envoi des nouveaux champs *
*********************************************/
 
// Empêcher de créer plus d'une fois la même clé
export const onChangeCheckKeyUnique = () => {
if ( 1 < $('.field-key').length) {
// Marqueur de valeur dupliquée
let notUnique = false,
thisFieldKey,
otherFieldKey;
 
$('.field-key').change(function () {
const count = $('.field-key').length;
 
for(let index = 0; index < count; index++) {
thisFieldKey = $(`.field-key[data-id="${index}"]`);
// Le champ avec cet index pourrait avoir été supprimé
if (0 < thisFieldKey.length) {
for( let otherIndex = 0; otherIndex < count; otherIndex++) {
otherFieldKey = $(`.field-key[data-id="${otherIndex}"]`);
// Le champ avec cet index pourrait avoir été supprimé
// On vérifie qu'on ne compare pas un champ avec lui-même
// Que les champs ne sont pas vides
// Les champs dupliqués déclanchent le marqueur et les alertes
if (
0 < otherFieldKey.length &&
index !== otherIndex &&
'' !== otherFieldKey.val() &&
'' !== thisFieldKey.val() &&
thisFieldKey.val() === otherFieldKey.val()
) {
// Le marqueur de valeur dupliquée passe à true
notUnique = true;
if (0 === $(`.invalid-field-key[data-id="${index}"]`).length) {
// Le champ est signalé en rouge
// Un message d'alerte apparait sous le champ
thisFieldKey.addClass('invalid-key');
thisFieldKey.after(
`<p class="message invalid-field-key" data-id="${index}">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Vérifiez qu’aucune clé n’ait été utilisée plus d’une fois
</p>`
);
}
}
}
}
}
if ( notUnique) {
// Un message d'alerte apparait au dessus des boutons prévisualiser/valider
if (0 === $('.invalid-field-key-bottom').length) {
$('#new-fields').after(
`<p class="message invalid-field-key-bottom">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Une clé a été utilisée plusieurs fois
</p>`
);
}
// Les boutons prévisualiser/valider sont désactivés et signalés en rouge
$('#preview-field, #validate-new-fields').addClass('invalid-key').css('pointer-events', 'none');
} else {// Si on est ok on retire toutes les alertes
// signalements rouges
$('.field-key').each(function () {
$(this).removeClass('invalid-key');
});
$('#preview-field, #validate-new-fields').removeClass('invalid-key');
// messages d'alerte
$('.invalid-field-key').each(function() {
hideNRemove($(this));
});
hideNRemove($('.invalid-field-key-bottom'));
//réactivation des boutons prévisualiser/valider
$('#preview-field')[0].style.removeProperty('pointer-events');
$('#validate-new-fields')[0].style.removeProperty('pointer-events')
}
// Réinitialisation
notUnique = false;
});
}
};
 
// Classe "invalid"
export const missingValuesClass = () => {
const $newFields = $('#new-fields');
 
// Si au moins un champ "required" n'est pas rempli
$('input[required]', $newFields).each(function () {
const $inputValidationWarning = $(this).next('.validation-warning');
 
if (0 === $(this).val().length) {
// Le champ est signalé en rouge
$(this).addClass('invalid');
// Un message d'alerte apparait après le champ
if (0 === $inputValidationWarning.length) {
$(this).after(
`<p class="validation-warning message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
&nbsp;Ce champ est requis
</p>`
);
}
} else {
// Le champ est signalé en rouge
$(this).removeClass('invalid');
// Le message d'alerte du champ est supprimé
if (0 < $inputValidationWarning.length) {
hideNRemove($inputValidationWarning);
}
}
});
const $validationWarning = $newFields.next('.validation-warning'),
$buttons = $('#preview-field , #validate-new-fields');
 
// Si on a des champs à compléter
if (0 < $('.invalid[type="text"]').length) {
// Les boutons sont signalés en rouge
$buttons.addClass('invalid');
// Un message d'alerte apparait avant les boutons
if (0 === $validationWarning.length) {
$newFields.after(
`<p class="validation-warning message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
&nbsp;Des informations sont manquantes pour certains champs,
vérifiez ceux signalés en rouge
</p>`
);
}
} else {
// Les signalements et messages sont supprimés
$buttons.removeClass('invalid');
hideNRemove($validationWarning);
}
};
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/tb-geoloc/tb-geoloc-lib-app.js
1,4 → 1,4
!function(r){function e(e){for(var t,p,c=e[0],a=e[1],f=e[2],l=0,s=[];l<c.length;l++)o[p=c[l]]&&s.push(o[p][0]),o[p]=0;for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&(r[t]=a[t]);for(i&&i(e);s.length;)s.shift()();return u.push.apply(u,f||[]),n()}function n(){for(var r,e=0;e<u.length;e++){for(var n=u[e],t=!0,c=1;c<n.length;c++)0!==o[n[c]]&&(t=!1);t&&(u.splice(e--,1),r=p(p.s=n[0]))}return r}var t={},o={0:0},u=[];function p(e){if(t[e])return t[e].exports;var n=t[e]={i:e,l:!1,exports:{}};return r[e].call(n.exports,n,n.exports,p),n.l=!0,n.exports}p.m=r,p.c=t,p.d=function(r,e,n){p.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},p.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},p.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return p.d(e,"a",e),e},p.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},p.p="";var c=window.webpackJsonp=window.webpackJsonp||[],a=c.push.bind(c);c.push=e,c=c.slice();for(var f=0;f<c.length;f++)e(c[f]);var i=a;n()}([]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+rLv":function(e,t,n){var r=n("dyZX").document;e.exports=r&&r.documentElement},"0/R4":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"0TWp":function(e,t,n){!function(e,t){t()}(0,function(){"use strict";!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");var o=!0===e.__zone_symbol__forceDuplicateZoneCheck;if(e.Zone){if(o||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var i,a=function(){function t(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==S.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return P.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return j},enumerable:!0,configurable:!0}),t.__load_patch=function(i,a){if(S.hasOwnProperty(i)){if(o)throw Error("Already loaded patch: "+i)}else if(!e["__Zone_disable_"+i]){var c="Zone:"+i;n(c),S[i]=a(e,t,D),r(c,c)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){P={parent:P,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{P=P.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),P={parent:P,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{P=P.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state!==_||e.type!==O&&e.type!==x){var r=e.state!=b;r&&e._transitionTo(b,k),e.runCount++;var o=j;j=e,P={parent:P,zone:this};try{e.type==x&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==_&&e.state!==T&&(e.type==O||e.data&&e.data.isPeriodic?r&&e._transitionTo(k,b):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(_,b,_))),P=P.parent,j=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(m,_);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(T,m,_),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(k,m),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new s(E,e,t,n,r,void 0))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new s(x,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new s(O,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");e._transitionTo(w,k,b);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(T,w),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(_,w),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t.__symbol__=C,t}(),c={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},u=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new a(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=E)throw new Error("Task is missing scheduleFn.");d(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),s=function(){function t(n,r,o,i,a,c){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=c,this.callback=o;var u=this;this.invoke=n===O&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,u,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),Z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==Z&&y(),Z--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(_,m)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==_&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),l=C("setTimeout"),f=C("Promise"),p=C("then"),h=[],v=!1;function d(t){if(0===Z&&0===h.length)if(i||e[f]&&(i=e[f].resolve(0)),i){var n=i[p];n||(n=i.then),n.call(i,y)}else e[l](y,0);t&&h.push(t)}function y(){if(!v){for(v=!0;h.length;){var e=h;h=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){D.onUnhandledError(e)}}}D.microtaskDrainDone(),v=!1}}var g={name:"NO ZONE"},_="notScheduled",m="scheduling",k="scheduled",b="running",w="canceling",T="unknown",E="microTask",x="macroTask",O="eventTask",S={},D={symbol:C,currentZoneFrame:function(){return P},onUnhandledError:z,microtaskDrainDone:z,scheduleMicroTask:d,showUncaughtError:function(){return!a[C("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:z,patchMethod:function(){return z},bindArguments:function(){return[]},patchThen:function(){return z},setNativePromise:function(e){e&&"function"==typeof e.resolve&&(i=e.resolve(0))}},P={parent:null,zone:new a(null,null)},j=null,Z=0;function z(){}function C(e){return"__zone_symbol__"+e}r("Zone","Zone"),e.Zone=a}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);var e=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}};Zone.__load_patch("ZoneAwarePromise",function(t,n,r){var o=Object.getOwnPropertyDescriptor,i=Object.defineProperty,a=r.symbol,c=[],u=a("Promise"),s=a("then"),l="__creationTrace__";r.onUnhandledError=function(e){if(r.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},r.microtaskDrainDone=function(){for(;c.length;)for(var e=function(){var e=c.shift();try{e.zone.runGuarded(function(){throw e})}catch(e){p(e)}};c.length;)e()};var f=a("unhandledPromiseRejectionHandler");function p(e){r.onUnhandledError(e);try{var t=n[f];t&&"function"==typeof t&&t.call(this,e)}catch(e){}}function h(e){return e&&e.then}function v(e){return e}function d(e){return M.reject(e)}var y=a("state"),g=a("value"),_=a("finally"),m=a("parentPromiseValue"),k=a("parentPromiseState"),b="Promise.then",w=null,T=!0,E=!1,x=0;function O(e,t){return function(n){try{j(e,t,n)}catch(t){j(e,!1,t)}}}var S=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},D="Promise resolved with itself",P=a("currentTaskTrace");function j(e,t,o){var a=S();if(e===o)throw new TypeError(D);if(e[y]===w){var u=null;try{"object"!=typeof o&&"function"!=typeof o||(u=o&&o.then)}catch(t){return a(function(){j(e,!1,t)})(),e}if(t!==E&&o instanceof M&&o.hasOwnProperty(y)&&o.hasOwnProperty(g)&&o[y]!==w)z(o),j(e,o[y],o[g]);else if(t!==E&&"function"==typeof u)try{u.call(o,a(O(e,t)),a(O(e,!1)))}catch(t){a(function(){j(e,!1,t)})()}else{e[y]=t;var s=e[g];if(e[g]=o,e[_]===_&&t===T&&(e[y]=e[k],e[g]=e[m]),t===E&&o instanceof Error){var f=n.currentTask&&n.currentTask.data&&n.currentTask.data[l];f&&i(o,P,{configurable:!0,enumerable:!1,writable:!0,value:f})}for(var p=0;p<s.length;)C(e,s[p++],s[p++],s[p++],s[p++]);if(0==s.length&&t==E){e[y]=x;try{throw new Error("Uncaught (in promise): "+function(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||"")+": "+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}(o)+(o&&o.stack?"\n"+o.stack:""))}catch(t){var h=t;h.rejection=o,h.promise=e,h.zone=n.current,h.task=n.currentTask,c.push(h),r.scheduleMicroTask()}}}}return e}var Z=a("rejectionHandledHandler");function z(e){if(e[y]===x){try{var t=n[Z];t&&"function"==typeof t&&t.call(this,{rejection:e[g],promise:e})}catch(e){}e[y]=E;for(var r=0;r<c.length;r++)e===c[r].promise&&c.splice(r,1)}}function C(e,t,n,r,o){z(e);var i=e[y],a=i?"function"==typeof r?r:v:"function"==typeof o?o:d;t.scheduleMicroTask(b,function(){try{var r=e[g],o=n&&_===n[_];o&&(n[m]=r,n[k]=i);var c=t.run(a,void 0,o&&a!==d&&a!==v?[]:[r]);j(n,!0,c)}catch(e){j(n,!1,e)}},n)}var M=function(){function t(e){if(!(this instanceof t))throw new Error("Must be an instanceof Promise.");this[y]=w,this[g]=[];try{e&&e(O(this,T),O(this,E))}catch(e){j(this,!1,e)}}return t.toString=function(){return"function ZoneAwarePromise() { [native code] }"},t.resolve=function(e){return j(new this(null),T,e)},t.reject=function(e){return j(new this(null),E,e)},t.race=function(t){var n,r,o,i,a=new this(function(e,t){o=e,i=t});function c(e){a&&(a=o(e))}function u(e){a&&(a=i(e))}try{for(var s=e(t),l=s.next();!l.done;l=s.next()){var f=l.value;h(f)||(f=this.resolve(f)),f.then(c,u)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a},t.all=function(t){var n,r,o,i,a=new this(function(e,t){o=e,i=t}),c=2,u=0,s=[],l=function(e){h(e)||(e=f.resolve(e));var t=u;e.then(function(e){s[t]=e,0==--c&&o(s)},i),c++,u++},f=this;try{for(var p=e(t),v=p.next();!v.done;v=p.next())l(v.value)}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}return 0==(c-=2)&&o(s),a},t.prototype.then=function(e,t){var r=new this.constructor(null),o=n.current;return this[y]==w?this[g].push(o,r,e,t):C(this,o,r,e,t),r},t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(e){var t=new this.constructor(null);t[_]=_;var r=n.current;return this[y]==w?this[g].push(r,t,e,e):C(this,r,t,e,e),t},t}();M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;var I=t[u]=t.Promise,F=n.__symbol__("ZoneAwarePromise"),R=o(t,"Promise");R&&!R.configurable||(R&&delete R.writable,R&&delete R.value,R||(R={configurable:!0,enumerable:!0}),R.get=function(){return t[F]?t[F]:t[u]},R.set=function(e){e===M?t[F]=e:(t[u]=e,e.prototype[s]||A(e),r.setNativePromise(e))},i(t,"Promise",R)),t.Promise=M;var L=a("thenPatched");function A(e){var t=e.prototype,n=o(t,"then");if(!n||!1!==n.writable&&n.configurable){var r=t.then;t[s]=r,e.prototype.then=function(e,t){var n=this;return new M(function(e,t){r.call(n,e,t)}).then(e,t)},e[L]=!0}}return r.patchThen=A,I&&A(I),Promise[n.__symbol__("uncaughtPromiseErrors")]=c,M}),Zone.__load_patch("fetch",function(e,t,n){var r=e.fetch,o=e.Promise,i=n.symbol("thenPatched"),a=n.symbol("fetchTaskScheduling"),c=n.symbol("fetchTaskAborting");if("function"==typeof r){var u=e.AbortController,s="function"==typeof u,l=null;s&&(e.AbortController=function(){var e=new u;return e.signal.abortController=e,e},l=n.patchMethod(u.prototype,"abort",function(e){return function(t,n){return t.task?t.task.zone.cancelTask(t.task):e.apply(t,n)}}));var f=function(){};e.fetch=function(){var e=this,u=Array.prototype.slice.call(arguments),p=u.length>1?u[1]:null,h=p&&p.signal;return new Promise(function(p,v){var d=t.current.scheduleMacroTask("fetch",f,u,function(){var c,s=t.current;try{s[a]=!0,c=r.apply(e,u)}catch(e){return void v(e)}finally{s[a]=!1}if(!(c instanceof o)){var l=c.constructor;l[i]||n.patchThen(l)}c.then(function(e){"notScheduled"!==d.state&&d.invoke(),p(e)},function(e){"notScheduled"!==d.state&&d.invoke(),v(e)})},function(){if(s)if(h&&h.abortController&&!h.aborted&&"function"==typeof h.abortController.abort&&l)try{t.current[c]=!0,l.call(h.abortController)}finally{t.current[c]=!1}else v("cancel fetch need a AbortController.signal");else v("No AbortController supported, can not cancel fetch")});h&&h.abortController&&(h.abortController.task=d)})}}});var t=Object.getOwnPropertyDescriptor,n=Object.defineProperty,r=Object.getPrototypeOf,o=Object.create,i=Array.prototype.slice,a="addEventListener",c="removeEventListener",u=Zone.__symbol__(a),s=Zone.__symbol__(c),l="true",f="false",p="__zone_symbol__";function h(e,t){return Zone.current.wrap(e,t)}function v(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var d=Zone.__symbol__,y="undefined"!=typeof window,g=y?window:void 0,_=y&&g||"object"==typeof self&&self||global,m="removeAttribute",k=[null];function b(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=h(e[n],t+"_"+n));return e}function w(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var T="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,E=!("nw"in _)&&void 0!==_.process&&"[object process]"==={}.toString.call(_.process),x=!E&&!T&&!(!y||!g.HTMLElement),O=void 0!==_.process&&"[object process]"==={}.toString.call(_.process)&&!T&&!(!y||!g.HTMLElement),S={},D=function(e){if(e=e||_.event){var t=S[e.type];t||(t=S[e.type]=d("ON_PROPERTY"+e.type));var n,r=this||e.target||_,o=r[t];return x&&r===g&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():void 0==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function P(e,r,o){var i=t(e,r);if(!i&&o&&t(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=d("on"+r+"patched");if(!e.hasOwnProperty(a)||!e[a]){delete i.writable,delete i.value;var c=i.get,u=i.set,s=r.substr(2),l=S[s];l||(l=S[s]=d("ON_PROPERTY"+s)),i.set=function(t){var n=this;n||e!==_||(n=_),n&&(n[l]&&n.removeEventListener(s,D),u&&u.apply(n,k),"function"==typeof t?(n[l]=t,n.addEventListener(s,D,!1)):n[l]=null)},i.get=function(){var t=this;if(t||e!==_||(t=_),!t)return null;var n=t[l];if(n)return n;if(c){var o=c&&c.call(this);if(o)return i.set.call(this,o),"function"==typeof t[m]&&t.removeAttribute(r),o}return null},n(e,r,i),e[a]=!0}}}function j(e,t,n){if(t)for(var r=0;r<t.length;r++)P(e,"on"+t[r],n);else{var o=[];for(var i in e)"on"==i.substr(0,2)&&o.push(i);for(var a=0;a<o.length;a++)P(e,o[a],n)}}var Z=d("originalInstance");function z(e){var t=_[e];if(t){_[d(e)]=t,_[e]=function(){var n=b(arguments,e);switch(n.length){case 0:this[Z]=new t;break;case 1:this[Z]=new t(n[0]);break;case 2:this[Z]=new t(n[0],n[1]);break;case 3:this[Z]=new t(n[0],n[1],n[2]);break;case 4:this[Z]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},I(_[e],t);var r,o=new t(function(){});for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(t){"function"==typeof o[t]?_[e].prototype[t]=function(){return this[Z][t].apply(this[Z],arguments)}:n(_[e].prototype,t,{set:function(n){"function"==typeof n?(this[Z][t]=h(n,e+"."+t),I(this[Z][t],n)):this[Z][t]=n},get:function(){return this[Z][t]}})}(r);for(r in t)"prototype"!==r&&t.hasOwnProperty(r)&&(_[e][r]=t[r])}}var C=!1;function M(e,n,o){for(var i=e;i&&!i.hasOwnProperty(n);)i=r(i);!i&&e[n]&&(i=e);var a=d(n),c=null;if(i&&!(c=i[a])&&(c=i[a]=i[n],w(i&&t(i,n)))){var u=o(c,a,n);i[n]=function(){return u(this,arguments)},I(i[n],c),C&&function(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!r||r.writable&&"function"==typeof r.set)&&(e[n]=t)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})})}(c,i[n])}return c}function I(e,t){e[d("OriginalDelegate")]=t}var F=!1,R=!1;function L(){try{var e=g.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function A(){if(F)return R;F=!0;try{var e=g.navigator.userAgent;return-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(R=!0),R}catch(e){}}Zone.__load_patch("toString",function(e){var t=Function.prototype.toString,n=d("OriginalDelegate"),r=d("Promise"),o=d("Error"),i=function(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?t.apply(this[n],arguments):Object.prototype.toString.call(i);if(this===Promise){var a=e[r];if(a)return t.apply(a,arguments)}if(this===Error){var c=e[o];if(c)return t.apply(c,arguments)}}return t.apply(this,arguments)};i[n]=t,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":a.apply(this,arguments)}});var q=!1;if("undefined"!=typeof window)try{var N=Object.defineProperty({},"passive",{get:function(){q=!0}});window.addEventListener("test",N,N),window.removeEventListener("test",N,N)}catch(e){q=!1}var H={useG:!0},W={},K={},U=/^__zone_symbol__(\w+)(true|false)$/,X="__zone_symbol__propagationStopped";function B(e,t,n){var o=n&&n.add||a,i=n&&n.rm||c,u=n&&n.listeners||"eventListeners",s=n&&n.rmAll||"removeAllListeners",h=d(o),v="."+o+":",y="prependListener",g="."+y+":",_=function(e,t,n){if(!e.isRemoved){var r=e.callback;"object"==typeof r&&r.handleEvent&&(e.callback=function(e){return r.handleEvent(e)},e.originalDelegate=r),e.invoke(e,t,[n]);var o=e.options;o&&"object"==typeof o&&o.once&&t[i].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,o)}},m=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[W[t.type][f]];if(r)if(1===r.length)_(r[0],n,t);else for(var o=r.slice(),i=0;i<o.length&&(!t||!0!==t[X]);i++)_(o[i],n,t)}},k=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[W[t.type][l]];if(r)if(1===r.length)_(r[0],n,t);else for(var o=r.slice(),i=0;i<o.length&&(!t||!0!==t[X]);i++)_(o[i],n,t)}};function b(t,n){if(!t)return!1;var a=!0;n&&void 0!==n.useG&&(a=n.useG);var c=n&&n.vh,_=!0;n&&void 0!==n.chkDup&&(_=n.chkDup);var b=!1;n&&void 0!==n.rt&&(b=n.rt);for(var w=t;w&&!w.hasOwnProperty(o);)w=r(w);if(!w&&t[o]&&(w=t),!w)return!1;if(w[h])return!1;var T,x=n&&n.eventNameToString,O={},S=w[h]=w[o],D=w[d(i)]=w[i],P=w[d(u)]=w[u],j=w[d(s)]=w[s];function Z(e){q||"boolean"==typeof O.options||void 0===O.options||null===O.options||(e.options=!!O.options.capture,O.options=e.options)}n&&n.prepend&&(T=w[d(n.prepend)]=w[n.prepend]);var z=a?function(e){if(!O.isExisting)return Z(e),S.call(O.target,O.eventName,O.capture?k:m,O.options)}:function(e){return Z(e),S.call(O.target,O.eventName,e.invoke,O.options)},C=a?function(e){if(!e.isRemoved){var t=W[e.eventName],n=void 0;t&&(n=t[e.capture?l:f]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return D.call(e.target,e.eventName,e.capture?k:m,e.options)}:function(e){return D.call(e.target,e.eventName,e.invoke,e.options)},M=n&&n.diff?n.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},F=Zone[Zone.__symbol__("BLACK_LISTED_EVENTS")],R=function(t,n,r,o,i,u){return void 0===i&&(i=!1),void 0===u&&(u=!1),function(){var s=this||e,h=arguments[0],v=arguments[1];if(!v)return t.apply(this,arguments);if(E&&"uncaughtException"===h)return t.apply(this,arguments);var d=!1;if("function"!=typeof v){if(!v.handleEvent)return t.apply(this,arguments);d=!0}if(!c||c(t,v,s,arguments)){var y,g=arguments[2];if(F)for(var m=0;m<F.length;m++)if(h===F[m])return t.apply(this,arguments);var k=!1;void 0===g?y=!1:!0===g?y=!0:!1===g?y=!1:(y=!!g&&!!g.capture,k=!!g&&!!g.once);var b,w=Zone.current,T=W[h];if(T)b=T[y?l:f];else{var S=(x?x(h):h)+f,D=(x?x(h):h)+l,P=p+S,j=p+D;W[h]={},W[h][f]=P,W[h][l]=j,b=y?j:P}var Z,z=s[b],C=!1;if(z){if(C=!0,_)for(m=0;m<z.length;m++)if(M(z[m],v))return}else z=s[b]=[];var I=s.constructor.name,R=K[I];R&&(Z=R[h]),Z||(Z=I+n+(x?x(h):h)),O.options=g,k&&(O.options.once=!1),O.target=s,O.capture=y,O.eventName=h,O.isExisting=C;var L=a?H:void 0;L&&(L.taskData=O);var A=w.scheduleEventTask(Z,v,L,r,o);return O.target=null,L&&(L.taskData=null),k&&(g.once=!0),(q||"boolean"!=typeof A.options)&&(A.options=g),A.target=s,A.capture=y,A.eventName=h,d&&(A.originalDelegate=v),u?z.unshift(A):z.push(A),i?s:void 0}}};return w[o]=R(S,v,z,C,b),T&&(w[y]=R(T,g,function(e){return T.call(O.target,O.eventName,e.invoke,O.options)},C,b,!0)),w[i]=function(){var t,n=this||e,r=arguments[0],o=arguments[2];t=void 0!==o&&(!0===o||!1!==o&&!!o&&!!o.capture);var i=arguments[1];if(!i)return D.apply(this,arguments);if(!c||c(D,i,n,arguments)){var a,u=W[r];u&&(a=u[t?l:f]);var s=a&&n[a];if(s)for(var p=0;p<s.length;p++){var h=s[p];if(M(h,i))return s.splice(p,1),h.isRemoved=!0,0===s.length&&(h.allRemoved=!0,n[a]=null),h.zone.cancelTask(h),b?n:void 0}return D.apply(this,arguments)}},w[u]=function(){for(var t=arguments[0],n=[],r=Y(this||e,x?x(t):t),o=0;o<r.length;o++){var i=r[o];n.push(i.originalDelegate?i.originalDelegate:i.callback)}return n},w[s]=function(){var t=this||e,n=arguments[0];if(n){var r=W[n];if(r){var o=t[r[f]],a=t[r[l]];if(o){var c=o.slice();for(h=0;h<c.length;h++)this[i].call(this,n,(u=c[h]).originalDelegate?u.originalDelegate:u.callback,u.options)}if(a)for(c=a.slice(),h=0;h<c.length;h++){var u;this[i].call(this,n,(u=c[h]).originalDelegate?u.originalDelegate:u.callback,u.options)}}}else{for(var p=Object.keys(t),h=0;h<p.length;h++){var v=U.exec(p[h]),d=v&&v[1];d&&"removeListener"!==d&&this[s].call(this,d)}this[s].call(this,"removeListener")}if(b)return this},I(w[o],S),I(w[i],D),j&&I(w[s],j),P&&I(w[u],P),!0}for(var w=[],T=0;T<t.length;T++)w[T]=b(t[T],n);return w}function Y(e,t){var n=[];for(var r in e){var o=U.exec(r),i=o&&o[1];if(i&&(!t||i===t)){var a=e[r];if(a)for(var c=0;c<a.length;c++)n.push(a[c])}}return n}var J=d("zoneTask");function V(e,t,n,r){var o=null,i=null;n+=r;var a={};function c(t){var n=t.data;return n.args[0]=function(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete a[n.handleId]:n.handleId&&(n.handleId[J]=null))}},n.handleId=o.apply(e,n.args),t}function u(e){return i(e.data.handleId)}o=M(e,t+=r,function(n){return function(o,i){if("function"==typeof i[0]){var s=v(t,i[0],{isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},c,u);if(!s)return s;var l=s.data.handleId;return"number"==typeof l?a[l]=s:l&&(l[J]=s),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(s.ref=l.ref.bind(l),s.unref=l.unref.bind(l)),"number"==typeof l||l?l:s}return n.apply(e,i)}}),i=M(e,n,function(t){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[J])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[J]=null),o.zone.cancelTask(o)):t.apply(e,r)}})}var G=Object[d("defineProperty")]=Object.defineProperty,Q=Object[d("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,$=Object.create,ee=d("unconfigurables");function te(e,t){return e&&e[ee]&&e[ee][t]}function ne(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[ee]||Object.isFrozen(e)||G(e,ee,{writable:!0,value:{}}),e[ee]&&(e[ee][t]=!0)),n}function re(e,t,n,r){try{return G(e,t,n)}catch(i){if(!n.configurable)throw i;void 0===r?delete n.configurable:n.configurable=r;try{return G(e,t,n)}catch(r){var o=null;try{o=JSON.stringify(n)}catch(e){o=n.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+o+"' on object '"+e+"' and got error, giving up: "+r)}}}var oe=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],ie=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],ae=["load"],ce=["blur","error","focus","load","resize","scroll","messageerror"],ue=["bounce","finish","start"],se=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],le=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],fe=["close","error","open","message"],pe=["error","message"],he=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],oe,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function ve(e,t,n,r){e&&j(e,function(e,t,n){if(!n||0===n.length)return t;var r=n.filter(function(t){return t.target===e});if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter(function(e){return-1===o.indexOf(e)})}(e,t,n),r)}function de(e,u){if(!E||O){var s="undefined"!=typeof WebSocket;if(function(){if((x||O)&&!t(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=t(Element.prototype,"onclick");if(e&&!e.configurable)return!1}var r=XMLHttpRequest.prototype,o=t(r,"onreadystatechange");if(o){n(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var i=!!(c=new XMLHttpRequest).onreadystatechange;return n(r,"onreadystatechange",o||{}),i}var a=d("fake");n(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[a]},set:function(e){this[a]=e}});var c,u=function(){};return(c=new XMLHttpRequest).onreadystatechange=u,i=c[a]===u,c.onreadystatechange=null,i}()){var l=u.__Zone_ignore_on_properties;if(x){var f=window,p=L?[{target:f,ignoreProperties:["error"]}]:[];ve(f,he.concat(["messageerror"]),l?l.concat(p):l,r(f)),ve(Document.prototype,he,l),void 0!==f.SVGElement&&ve(f.SVGElement.prototype,he,l),ve(Element.prototype,he,l),ve(HTMLElement.prototype,he,l),ve(HTMLMediaElement.prototype,ie,l),ve(HTMLFrameSetElement.prototype,oe.concat(ce),l),ve(HTMLBodyElement.prototype,oe.concat(ce),l),ve(HTMLFrameElement.prototype,ae,l),ve(HTMLIFrameElement.prototype,ae,l);var v=f.HTMLMarqueeElement;v&&ve(v.prototype,ue,l);var y=f.Worker;y&&ve(y.prototype,pe,l)}ve(XMLHttpRequest.prototype,se,l);var g=u.XMLHttpRequestEventTarget;g&&ve(g&&g.prototype,se,l),"undefined"!=typeof IDBIndex&&(ve(IDBIndex.prototype,le,l),ve(IDBRequest.prototype,le,l),ve(IDBOpenDBRequest.prototype,le,l),ve(IDBDatabase.prototype,le,l),ve(IDBTransaction.prototype,le,l),ve(IDBCursor.prototype,le,l)),s&&ve(WebSocket.prototype,fe,l)}else!function(){for(var e=function(e){var t=he[e],n="on"+t;self.addEventListener(t,function(e){var t,r,o=e.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][ye]&&((t=h(o[n],r))[ye]=o[n],o[n]=t),o=o.parentElement},!0)},t=0;t<he.length;t++)e(t)}(),z("XMLHttpRequest"),s&&function(e,n){var r=n.WebSocket;n.EventTarget||B(n,[r.prototype]),n.WebSocket=function(e,n){var u,s,l=arguments.length>1?new r(e,n):new r(e),f=t(l,"onmessage");return f&&!1===f.configurable?(u=o(l),s=l,[a,c,"send","close"].forEach(function(e){u[e]=function(){var t=i.call(arguments);if(e===a||e===c){var n=t.length>0?t[0]:void 0;if(n){var r=Zone.__symbol__("ON_PROPERTY"+n);l[r]=u[r]}}return l[e].apply(l,t)}})):u=l,j(u,["close","error","message","open"],s),u};var u=n.WebSocket;for(var s in r)u[s]=r[s]}(0,u)}}var ye=d("unbound");function ge(e,n,r,o){var i=Zone.__symbol__(r);if(!e[i]){var a=e[i]=e[r];e[r]=function(i,c,u){return c&&c.prototype&&o.forEach(function(e){var o=n+"."+r+"::"+e,i=c.prototype;if(i.hasOwnProperty(e)){var a=t(i,e);a&&a.value?(a.value=h(a.value,o),function(t,n,r){var o=a.configurable;re(t,e,ne(t,e,a),o)}(c.prototype)):i[e]=h(i[e],o)}else i[e]&&(i[e]=h(i[e],o))}),a.call(e,i,c,u)},I(e[r],a)}}Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=j,n.patchMethod=M,n.bindArguments=b}),Zone.__load_patch("timers",function(e){V(e,"set","clear","Timeout"),V(e,"set","clear","Interval"),V(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e){V(e,"request","cancel","AnimationFrame"),V(e,"mozRequest","mozCancel","AnimationFrame"),V(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)M(e,n[r],function(n,r,o){return function(r,i){return t.current.run(n,e,i,o)}})}),Zone.__load_patch("EventTarget",function(e,t,n){var r=t.__symbol__("BLACK_LISTED_EVENTS");e[r]&&(t[r]=e[r]),function(e,t){!function(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",function(e){return function(t,n){t[X]=!0,e&&e.apply(t,n)}})}(e,t)}(e,n),function(e,t){var n="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",r="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),o=[],i=e.wtf,a=n.split(",");i?o=a.map(function(e){return"HTML"+e+"Element"}).concat(r):e.EventTarget?o.push("EventTarget"):o=r;for(var c=e.__Zone_disable_IE_check||!1,u=e.__Zone_enable_cross_context_check||!1,s=A(),h="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",v=0;v<he.length;v++){var d=p+((k=he[v])+f),y=p+(k+l);W[k]={},W[k][f]=d,W[k][l]=y}for(v=0;v<n.length;v++)for(var g=a[v],_=K[g]={},m=0;m<he.length;m++){var k;_[k=he[m]]=g+".addEventListener:"+k}var b=[];for(v=0;v<o.length;v++){var w=e[o[v]];b.push(w&&w.prototype)}B(e,b,{vh:function(e,t,n,r){if(!c&&s){if(u)try{var o;if("[object FunctionWrapper]"===(o=t.toString())||o==h)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=t.toString())||o==h)return e.apply(n,r),!1}else if(u)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0}}),t.patchEventTarget=B}(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,[o.prototype]),z("MutationObserver"),z("WebKitMutationObserver"),z("IntersectionObserver"),z("FileReader")}),Zone.__load_patch("on_property",function(e,t,n){de(0,e),Object.defineProperty=function(e,t,n){if(te(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=ne(e,t,n)),re(e,t,n,r)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=ne(e,n,t[n])}),$(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=Q(e,t);return n&&te(e,t)&&(n.configurable=!1),n}}),Zone.__load_patch("customElements",function(e,t,n){(x||O)&&"registerElement"in e.document&&ge(document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"]),(x||O)&&"customElements"in e&&ge(e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}),Zone.__load_patch("canvas",function(e){var t=e.HTMLCanvasElement;void 0!==t&&t.prototype&&t.prototype.toBlob&&function(e,n,r){var o=null;function i(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=M(t.prototype,"toBlob",function(e){return function(t,n){var r=function(e,t){return{name:"HTMLCanvasElement.toBlob",target:e,cbIdx:0,args:t}}(t,n);return r.cbIdx>=0&&"function"==typeof n[r.cbIdx]?v(r.name,n[r.cbIdx],r,i):e.apply(t,n)}})}()}),Zone.__load_patch("XHR",function(e,t){!function(l){var f=XMLHttpRequest.prototype,p=f[u],h=f[s];if(!p){var y=e.XMLHttpRequestEventTarget;if(y){var g=y.prototype;p=g[u],h=g[s]}}var _="readystatechange",m="scheduled";function k(e){var t=e.data,r=t.target;r[i]=!1,r[c]=!1;var a=r[o];p||(p=r[u],h=r[s]),a&&h.call(r,_,a);var l=r[o]=function(){if(r.readyState===r.DONE)if(!t.aborted&&r[i]&&e.state===m){var n=r.__zone_symbol__loadfalse;if(n&&n.length>0){var o=e.invoke;e.invoke=function(){for(var n=r.__zone_symbol__loadfalse,i=0;i<n.length;i++)n[i]===e&&n.splice(i,1);t.aborted||e.state!==m||o.call(e)},n.push(e)}else e.invoke()}else t.aborted||!1!==r[i]||(r[c]=!0)};return p.call(r,_,l),r[n]||(r[n]=e),O.apply(r,t.args),r[i]=!0,e}function b(){}function w(e){var t=e.data;return t.aborted=!0,S.apply(t.target,t.args)}var T=M(f,"open",function(){return function(e,t){return e[r]=0==t[2],e[a]=t[1],T.apply(e,t)}}),E=d("fetchTaskAborting"),x=d("fetchTaskScheduling"),O=M(f,"send",function(){return function(e,n){if(!0===t.current[x])return O.apply(e,n);if(e[r])return O.apply(e,n);var o={target:e,url:e[a],isPeriodic:!1,args:n,aborted:!1},i=v("XMLHttpRequest.send",b,o,k,w);e&&!0===e[c]&&!o.aborted&&i.state===m&&i.invoke()}}),S=M(f,"abort",function(){return function(e,r){var o=e[n];if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[E])return S.apply(e,r)}})}();var n=d("xhrTask"),r=d("xhrSync"),o=d("xhrListener"),i=d("xhrScheduled"),a=d("xhrURL"),c=d("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",function(e){e.navigator&&e.navigator.geolocation&&function(e,n){for(var r=e.constructor.name,o=function(o){var i=n[o],a=e[i];if(a){if(!w(t(e,i)))return"continue";e[i]=function(e){var t=function(){return e.apply(this,b(arguments,r+"."+i))};return I(t,e),t}(a)}},i=0;i<n.length;i++)o(i)}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(e,t){function n(t){return function(n){Y(e,t).forEach(function(r){var o=e.PromiseRejectionEvent;if(o){var i=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(i)}})}}e.PromiseRejectionEvent&&(t[d("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[d("rejectionHandledHandler")]=n("rejectionhandled"))})})},1:function(e,t,n){e.exports=n("hN/g")},"1TsA":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},"2OiF":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"3Lyj":function(e,t,n){var r=n("KroJ");e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},"45Tv":function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=n("OP3Y"),a=r.has,c=r.get,u=r.key,s=function(e,t,n){if(a(e,t,n))return c(e,t,n);var r=i(t);return null!==r?s(e,r,n):void 0};r.exp({getMetadata:function(e,t){return s(e,o(t),arguments.length<3?void 0:u(arguments[2]))}})},"49D4":function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,o(n),i(r))}})},"4LiD":function(e,t,n){"use strict";var r=n("dyZX"),o=n("XKFU"),i=n("KroJ"),a=n("3Lyj"),c=n("Z6vF"),u=n("SlkY"),s=n("9gX7"),l=n("0/R4"),f=n("eeVq"),p=n("XMVh"),h=n("fyDq"),v=n("Xbzi");e.exports=function(e,t,n,d,y,g){var _=r[e],m=_,k=y?"set":"add",b=m&&m.prototype,w={},T=function(e){var t=b[e];i(b,e,"delete"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof m&&(g||b.forEach&&!f(function(){(new m).entries().next()}))){var E=new m,x=E[k](g?{}:-0,1)!=E,O=f(function(){E.has(1)}),S=p(function(e){new m(e)}),D=!g&&f(function(){for(var e=new m,t=5;t--;)e[k](t,t);return!e.has(-0)});S||((m=t(function(t,n){s(t,m,e);var r=v(new _,t,m);return void 0!=n&&u(n,y,r[k],r),r})).prototype=b,b.constructor=m),(O||D)&&(T("delete"),T("has"),y&&T("get")),(D||x)&&T(k),g&&b.clear&&delete b.clear}else m=d.getConstructor(t,e,y,k),a(m.prototype,n),c.NEED=!0;return h(m,e),w[e]=m,o(o.G+o.W+o.F*(m!=_),w),g||d.setStrong(m,e,y),m}},"4R4u":function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"6FMO":function(e,t,n){var r=n("0/R4"),o=n("EWmC"),i=n("K0xU")("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},"7Dlh":function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},"9AAn":function(e,t,n){"use strict";var r=n("wmvG"),o=n("s5qY");e.exports=n("4LiD")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(o(this,"Map"),0===e?0:e,t)}},r,!0)},"9gX7":function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},Afnz:function(e,t,n){"use strict";var r=n("LQAc"),o=n("XKFU"),i=n("KroJ"),a=n("Mukb"),c=n("hPIQ"),u=n("QaDb"),s=n("fyDq"),l=n("OP3Y"),f=n("K0xU")("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,v,d,y,g){u(n,t,v);var _,m,k,b=function(e){if(!p&&e in x)return x[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",T="values"==d,E=!1,x=e.prototype,O=x[f]||x["@@iterator"]||d&&x[d],S=O||b(d),D=d?T?b("entries"):S:void 0,P="Array"==t&&x.entries||O;if(P&&(k=l(P.call(new e)))!==Object.prototype&&k.next&&(s(k,w,!0),r||"function"==typeof k[f]||a(k,f,h)),T&&O&&"values"!==O.name&&(E=!0,S=function(){return O.call(this)}),r&&!g||!p&&!E&&x[f]||a(x,f,S),c[t]=S,c[w]=h,d)if(_={values:T?S:b("values"),keys:y?S:b("keys"),entries:D},g)for(m in _)m in x||i(x,m,_[m]);else o(o.P+o.F*(p||E),t,_);return _}},BqfV:function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},CkkT:function(e,t,n){var r=n("m0Pp"),o=n("Ymqv"),i=n("S/j/"),a=n("ne8i"),c=n("zRwo");e.exports=function(e,t){var n=1==e,u=2==e,s=3==e,l=4==e,f=6==e,p=5==e||f,h=t||c;return function(t,c,v){for(var d,y,g=i(t),_=o(g),m=r(c,v,3),k=a(_.length),b=0,w=n?h(t,k):u?h(t,0):void 0;k>b;b++)if((p||b in _)&&(y=m(d=_[b],b,g),e))if(n)w[b]=y;else if(y)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:w.push(d)}else if(l)return!1;return f?-1:s||l?l:w}}},DVgA:function(e,t,n){var r=n("zhAb"),o=n("4R4u");e.exports=Object.keys||function(e){return r(e,o)}},EK0E:function(e,t,n){"use strict";var r,o=n("CkkT")(0),i=n("KroJ"),a=n("Z6vF"),c=n("czNK"),u=n("ZD67"),s=n("0/R4"),l=n("eeVq"),f=n("s5qY"),p=a.getWeak,h=Object.isExtensible,v=u.ufstore,d={},y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(s(e)){var t=p(e);return!0===t?v(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(f(this,"WeakMap"),e,t)}},_=e.exports=n("4LiD")("WeakMap",y,g,u,!0,!0);l(function(){return 7!=(new _).set((Object.freeze||Object)(d),7).get(d)})&&(c((r=u.getConstructor(y,"WeakMap")).prototype,g),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=_.prototype,n=t[e];i(t,e,function(t,o){if(s(t)&&!h(t)){this._f||(this._f=new r);var i=this._f[e](t,o);return"set"==e?this:i}return n.call(this,t,o)})}))},EWmC:function(e,t,n){var r=n("LZWt");e.exports=Array.isArray||function(e){return"Array"==r(e)}},EemH:function(e,t,n){var r=n("UqcF"),o=n("RjD/"),i=n("aCFj"),a=n("apmT"),c=n("aagx"),u=n("xpql"),s=Object.getOwnPropertyDescriptor;t.f=n("nh4g")?s:function(e,t){if(e=i(e),t=a(t,!0),u)try{return s(e,t)}catch(e){}if(c(e,t))return o(!r.f.call(e,t),e[t])}},FJW5:function(e,t,n){var r=n("hswa"),o=n("y3w9"),i=n("DVgA");e.exports=n("nh4g")?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),c=a.length,u=0;c>u;)r.f(e,n=a[u++],t[n]);return e}},FZcq:function(e,t,n){n("49D4"),n("zq+C"),n("45Tv"),n("uAtd"),n("BqfV"),n("fN/3"),n("iW+S"),n("7Dlh"),n("Opxb"),e.exports=n("g3g5").Reflect},H6hf:function(e,t,n){var r=n("y3w9");e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},"I8a+":function(e,t,n){var r=n("LZWt"),o=n("K0xU")("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},Iw71:function(e,t,n){var r=n("0/R4"),o=n("dyZX").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"J+6e":function(e,t,n){var r=n("I8a+"),o=n("K0xU")("iterator"),i=n("hPIQ");e.exports=n("g3g5").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},JiEa:function(e,t){t.f=Object.getOwnPropertySymbols},K0xU:function(e,t,n){var r=n("VTer")("wks"),o=n("ylqs"),i=n("dyZX").Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},KroJ:function(e,t,n){var r=n("dyZX"),o=n("Mukb"),i=n("aagx"),a=n("ylqs")("src"),c=Function.toString,u=(""+c).split("toString");n("g3g5").inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(i(n,a)||o(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||c.call(this)})},Kuth:function(e,t,n){var r=n("y3w9"),o=n("FJW5"),i=n("4R4u"),a=n("YTvA")("IE_PROTO"),c=function(){},u=function(){var e,t=n("Iw71")("iframe"),r=i.length;for(t.style.display="none",n("+rLv").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[i[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[a]=e):n=u(),void 0===t?n:o(n,t)}},LQAc:function(e,t){e.exports=!1},LZWt:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},M6Qj:function(e,t,n){var r=n("hPIQ"),o=n("K0xU")("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},Mukb:function(e,t,n){var r=n("hswa"),o=n("RjD/");e.exports=n("nh4g")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},N6cJ:function(e,t,n){var r=n("9AAn"),o=n("XKFU"),i=n("VTer")("metadata"),a=i.store||(i.store=new(n("EK0E"))),c=function(e,t,n){var o=a.get(e);if(!o){if(!n)return;a.set(e,o=new r)}var i=o.get(t);if(!i){if(!n)return;o.set(t,i=new r)}return i};e.exports={store:a,map:c,has:function(e,t,n){var r=c(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=c(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){c(n,r,!0).set(e,t)},keys:function(e,t){var n=c(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},key:function(e){return void 0===e||"symbol"==typeof e?e:String(e)},exp:function(e){o(o.S,"Reflect",e)}}},OP3Y:function(e,t,n){var r=n("aagx"),o=n("S/j/"),i=n("YTvA")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},Opxb:function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=n("2OiF"),a=r.key,c=r.set;r.exp({metadata:function(e,t){return function(n,r){c(e,t,(void 0!==r?o:i)(n),a(r))}}})},Q3ne:function(e,t,n){var r=n("SlkY");e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},QaDb:function(e,t,n){"use strict";var r=n("Kuth"),o=n("RjD/"),i=n("fyDq"),a={};n("Mukb")(a,n("K0xU")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},RYi7:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"RjD/":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"S/j/":function(e,t,n){var r=n("vhPU");e.exports=function(e){return Object(r(e))}},SlkY:function(e,t,n){var r=n("m0Pp"),o=n("H6hf"),i=n("M6Qj"),a=n("y3w9"),c=n("ne8i"),u=n("J+6e"),s={},l={};(t=e.exports=function(e,t,n,f,p){var h,v,d,y,g=p?function(){return e}:u(e),_=r(n,f,t?2:1),m=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(h=c(e.length);h>m;m++)if((y=t?_(a(v=e[m])[0],v[1]):_(e[m]))===s||y===l)return y}else for(d=g.call(e);!(v=d.next()).done;)if((y=o(d,_,v.value,t))===s||y===l)return y}).BREAK=s,t.RETURN=l},T39b:function(e,t,n){"use strict";var r=n("wmvG"),o=n("s5qY");e.exports=n("4LiD")("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(o(this,"Set"),e=0===e?0:e,e)}},r)},UqcF:function(e,t){t.f={}.propertyIsEnumerable},VTer:function(e,t,n){var r=n("g3g5"),o=n("dyZX"),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("LQAc")?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},XKFU:function(e,t,n){var r=n("dyZX"),o=n("g3g5"),i=n("Mukb"),a=n("KroJ"),c=n("m0Pp"),u=function(e,t,n){var s,l,f,p,h=e&u.F,v=e&u.G,d=e&u.P,y=e&u.B,g=v?r:e&u.S?r[t]||(r[t]={}):(r[t]||{}).prototype,_=v?o:o[t]||(o[t]={}),m=_.prototype||(_.prototype={});for(s in v&&(n=t),n)f=((l=!h&&g&&void 0!==g[s])?g:n)[s],p=y&&l?c(f,r):d&&"function"==typeof f?c(Function.call,f):f,g&&a(g,s,f,e&u.U),_[s]!=f&&i(_,s,p),d&&m[s]!=f&&(m[s]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},XMVh:function(e,t,n){var r=n("K0xU")("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},Xbzi:function(e,t,n){var r=n("0/R4"),o=n("i5dc").set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},YTvA:function(e,t,n){var r=n("VTer")("keys"),o=n("ylqs");e.exports=function(e){return r[e]||(r[e]=o(e))}},Ymqv:function(e,t,n){var r=n("LZWt");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},Z6vF:function(e,t,n){var r=n("ylqs")("meta"),o=n("0/R4"),i=n("aagx"),a=n("hswa").f,c=0,u=Object.isExtensible||function(){return!0},s=!n("eeVq")(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++c,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return s&&f.NEED&&u(e)&&!i(e,r)&&l(e),e}}},ZD67:function(e,t,n){"use strict";var r=n("3Lyj"),o=n("Z6vF").getWeak,i=n("y3w9"),a=n("0/R4"),c=n("9gX7"),u=n("SlkY"),s=n("CkkT"),l=n("aagx"),f=n("s5qY"),p=s(5),h=s(6),v=0,d=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return p(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var s=e(function(e,r){c(e,s,t,"_i"),e._t=t,e._i=v++,e._l=void 0,void 0!=r&&u(r,n,e[i],e)});return r(s.prototype,{delete:function(e){if(!a(e))return!1;var n=o(e);return!0===n?d(f(this,t)).delete(e):n&&l(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=o(e);return!0===n?d(f(this,t)).has(e):n&&l(n,this._i)}}),s},def:function(e,t,n){var r=o(i(t),!0);return!0===r?d(e).set(t,n):r[e._i]=n,e},ufstore:d}},aCFj:function(e,t,n){var r=n("Ymqv"),o=n("vhPU");e.exports=function(e){return r(o(e))}},aagx:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},apmT:function(e,t,n){var r=n("0/R4");e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},czNK:function(e,t,n){"use strict";var r=n("DVgA"),o=n("JiEa"),i=n("UqcF"),a=n("S/j/"),c=n("Ymqv"),u=Object.assign;e.exports=!u||n("eeVq")(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=a(e),u=arguments.length,s=1,l=o.f,f=i.f;u>s;)for(var p,h=c(arguments[s++]),v=l?r(h).concat(l(h)):r(h),d=v.length,y=0;d>y;)f.call(h,p=v[y++])&&(n[p]=h[p]);return n}:u},"d/Gc":function(e,t,n){var r=n("RYi7"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},dyZX:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},eeVq:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},elZq:function(e,t,n){"use strict";var r=n("dyZX"),o=n("hswa"),i=n("nh4g"),a=n("K0xU")("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},"fN/3":function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return i(o(e),arguments.length<2?void 0:a(arguments[1]))}})},fyDq:function(e,t,n){var r=n("hswa").f,o=n("aagx"),i=n("K0xU")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},g3g5:function(e,t){var n=e.exports={version:"2.6.3"};"number"==typeof __e&&(__e=n)},"hN/g":function(e,t,n){"use strict";n.r(t),n("FZcq"),n("0TWp")},hPIQ:function(e,t){e.exports={}},hswa:function(e,t,n){var r=n("y3w9"),o=n("xpql"),i=n("apmT"),a=Object.defineProperty;t.f=n("nh4g")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},i5dc:function(e,t,n){var r=n("0/R4"),o=n("y3w9"),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n("m0Pp")(Function.call,n("EemH").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},"iW+S":function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=n("OP3Y"),a=r.has,c=r.key,u=function(e,t,n){if(a(e,t,n))return!0;var r=i(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,o(t),arguments.length<3?void 0:c(arguments[2]))}})},m0Pp:function(e,t,n){var r=n("2OiF");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},ne8i:function(e,t,n){var r=n("RYi7"),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},nh4g:function(e,t,n){e.exports=!n("eeVq")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},s5qY:function(e,t,n){var r=n("0/R4");e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},uAtd:function(e,t,n){var r=n("T39b"),o=n("Q3ne"),i=n("N6cJ"),a=n("y3w9"),c=n("OP3Y"),u=i.keys,s=i.key,l=function(e,t){var n=u(e,t),i=c(e);if(null===i)return n;var a=l(i,t);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(e){return l(a(e),arguments.length<2?void 0:s(arguments[1]))}})},vhPU:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},w2a5:function(e,t,n){var r=n("aCFj"),o=n("ne8i"),i=n("d/Gc");e.exports=function(e){return function(t,n,a){var c,u=r(t),s=o(u.length),l=i(a,s);if(e&&n!=n){for(;s>l;)if((c=u[l++])!=c)return!0}else for(;s>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},wmvG:function(e,t,n){"use strict";var r=n("hswa").f,o=n("Kuth"),i=n("3Lyj"),a=n("m0Pp"),c=n("9gX7"),u=n("SlkY"),s=n("Afnz"),l=n("1TsA"),f=n("elZq"),p=n("nh4g"),h=n("Z6vF").fastKey,v=n("s5qY"),d=p?"_s":"size",y=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,s){var l=e(function(e,r){c(e,l,t,"_i"),e._t=t,e._i=o(null),e._f=void 0,e._l=void 0,e[d]=0,void 0!=r&&u(r,n,e[s],e)});return i(l.prototype,{clear:function(){for(var e=v(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[d]=0},delete:function(e){var n=v(this,t),r=y(n,e);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[d]--}return!!r},forEach:function(e){v(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(v(this,t),e)}}),p&&r(l.prototype,"size",{get:function(){return v(this,t)[d]}}),l},def:function(e,t,n){var r,o,i=y(e,t);return i?i.v=n:(e._l=i={i:o=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[d]++,"F"!==o&&(e._i[o]=i)),e},getEntry:y,setStrong:function(e,t,n){s(e,t,function(e,n){this._t=v(e,t),this._k=n,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?l(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,l(1))},n?"entries":"values",!n,!0),f(t)}}},xpql:function(e,t,n){e.exports=!n("nh4g")&&!n("eeVq")(function(){return 7!=Object.defineProperty(n("Iw71")("div"),"a",{get:function(){return 7}}).a})},y3w9:function(e,t,n){var r=n("0/R4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},ylqs:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},zRwo:function(e,t,n){var r=n("6FMO");e.exports=function(e,t){return new(r(e))(t)}},zhAb:function(e,t,n){var r=n("aagx"),o=n("aCFj"),i=n("w2a5")(!1),a=n("YTvA")("IE_PROTO");e.exports=function(e,t){var n,c=o(e),u=0,s=[];for(n in c)n!=a&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~i(s,n)||s.push(n));return s}},"zq+C":function(e,t,n){var r=n("N6cJ"),o=n("y3w9"),i=r.key,a=r.map,c=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=c.get(t);return u.delete(n),!!u.size||c.delete(t)}})}},[[1,0]]]);
!function(e,t){"use strict";function n(){var e=C.splice(0,C.length);for($e=0;e.length;)e.shift().call(null,e.shift())}function r(e,t){for(var n=0,r=e.length;n<r;n++)d(e[n],t)}function o(e){return function(t){Pe(t)&&(d(t,e),oe.length&&r(t.querySelectorAll(oe),e))}}function l(e){var t=xe.call(e,"is"),n=e.nodeName.toUpperCase(),r=ae.call(ne,t?J+t.toUpperCase():Y+n);return t&&-1<r&&!a(n,t)?-1:r}function a(e,t){return-1<oe.indexOf(e+'[is="'+t+'"]')}function i(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,o=e.target,l=e[K]||2,a=e[X]||3;!tt||o&&o!==t||!t[q]||"style"===r||e.prevValue===e.newValue&&(""!==e.newValue||n!==l&&n!==a)||t[q](r,n===l?null:e.prevValue,n===a?null:e.newValue)}function u(e){var t=o(e);return function(e){C.push(t,e.target),$e&&clearTimeout($e),$e=setTimeout(n,1)}}function c(e){et&&(et=!1,e.currentTarget.removeEventListener(Q,c)),oe.length&&r((e.target||g).querySelectorAll(oe),e.detail===_?_:U),Se&&function(){for(var e,t=0,n=Re.length;t<n;t++)le.contains(e=Re[t])||(n--,Re.splice(t--,1),d(e,_))}()}function s(e,t){var n=this;Ze.call(n,e,t),w.call(n,{target:n})}function m(e,t,n){var r=t.apply(e,n),o=l(r);return-1<o&&F(r,re[o]),n.pop()&&oe.length&&function(e){for(var t,n=0,r=e.length;n<r;n++)F(t=e[n],re[l(t)])}(r.querySelectorAll(oe)),r}function f(e,t){Ne(e,t),N?N.observe(e,Ke):(Je&&(e.setAttribute=s,e[P]=O(e),e[R](W,w)),e[R]($,i)),e[G]&&tt&&(e.created=!0,e[G](),e.created=!1)}function p(e){throw new Error("A "+e+" type is already registered")}function d(e,t){var n,r,o=l(e);-1<o&&(I(e,re[o]),o=0,t!==U||e[U]?t!==_||e[_]||(e[U]=!1,e[_]=!0,r="disconnected",o=1):(e[_]=!1,e[U]=!0,r="connected",o=1,Se&&ae.call(Re,e)<0&&Re.push(e)),o&&(n=e[t+k]||e[r+k])&&n.call(e))}function h(){}function T(e,t,n){var r=n&&n[x]||"",o=t.prototype,l=Oe(o),a=t.observedAttributes||me,i={prototype:l};Ve(l,G,{value:function(){if(be)be=!1;else if(!this[Le]){this[Le]=!0,new t(this),o[G]&&o[G].call(this);var e=ye[we.get(t)];(!Ee||e.create.length>1)&&E(this)}}}),Ve(l,q,{value:function(e){-1<ae.call(a,e)&&o[q]&&o[q].apply(this,arguments)}}),o[Z]&&Ve(l,B,{value:o[Z]}),o[j]&&Ve(l,z,{value:o[j]}),r&&(i[x]=r),e=e.toUpperCase(),ye[e]={constructor:t,create:r?[r,Ae(e)]:[e]},we.set(t,e),g[V](e.toLowerCase(),i),v(e),Ce[e].r()}function L(e){var t=ye[e.toUpperCase()];return t&&t.constructor}function M(e){return"string"==typeof e?e:e&&e.is||""}function E(e){for(var t,n=e[q],r=n?e.attributes:me,o=r.length;o--;)n.call(e,(t=r[o]).name||t.nodeName,null,t.value||t.nodeValue)}function v(e){return(e=e.toUpperCase())in Ce||(Ce[e]={},Ce[e].p=new ge(function(t){Ce[e].r=t})),Ce[e].p}function H(){Me&&delete e.customElements,se(e,"customElements",{configurable:!0,value:new h}),se(e,"CustomElementRegistry",{configurable:!0,value:h});for(var t=y.get(/^HTML[A-Z]*[a-z]/),n=t.length;n--;function(t){var n=e[t];if(n){e[t]=function(e){var t,r;return e||(e=this),e[Le]||(be=!0,t=ye[we.get(e.constructor)],(e=(r=Ee&&1===t.create.length)?Reflect.construct(n,me,t.constructor):g.createElement.apply(g,t.create))[Le]=!0,be=!1,r||E(e)),e},e[t].prototype=n.prototype;try{n.prototype.constructor=e[t]}catch(r){se(n,Le,{value:e[t]})}}}(t[n]));g.createElement=function(e,t){var n=M(t);return n?ze.call(this,e,Ae(n)):ze.call(this,e)},Qe||(Ye=!0,g[V](""))}var g=e.document,b=e.Object,y=function(e){var t,n,r,o,l=/^[A-Z]+[a-z]/,a=function(e,t){(t=t.toLowerCase())in i||(i[e]=(i[e]||[]).concat(t),i[t]=i[t.toUpperCase()]=e)},i=(b.create||b)(null),u={};for(n in e)for(o in e[n])for(i[o]=r=e[n][o],t=0;t<r.length;t++)i[r[t].toLowerCase()]=i[r[t].toUpperCase()]=o;return u.get=function(e){return"string"==typeof e?i[e]||(l.test(e)?[]:""):function(e){var t,n=[];for(t in i)e.test(t)&&n.push(t);return n}(e)},u.set=function(e,t){return l.test(e)?a(e,t):a(t,e),u},u}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});"object"!=typeof t&&(t={type:t||"auto"});var C,w,A,O,N,D,I,F,S,V="registerElement",P="__"+V+(1e5*e.Math.random()>>0),R="addEventListener",U="attached",k="Callback",_="detached",x="extends",q="attributeChanged"+k,B=U+k,Z="connected"+k,j="disconnected"+k,G="created"+k,z=_+k,K="ADDITION",X="REMOVAL",$="DOMAttrModified",Q="DOMContentLoaded",W="DOMSubtreeModified",Y="<",J="=",ee=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,te=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],ne=[],re=[],oe="",le=g.documentElement,ae=ne.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},ie=b.prototype,ue=ie.hasOwnProperty,ce=ie.isPrototypeOf,se=b.defineProperty,me=[],fe=b.getOwnPropertyDescriptor,pe=b.getOwnPropertyNames,de=b.getPrototypeOf,he=b.setPrototypeOf,Te=!!b.__proto__,Le="__dreCEv1",Me=e.customElements,Ee=!/^force/.test(t.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),ve=b.create||b,He=e.Map||function(){var e,t=[],n=[];return{get:function(e){return n[ae.call(t,e)]},set:function(r,o){(e=ae.call(t,r))<0?n[t.push(r)-1]=o:n[e]=o}}},ge=e.Promise||function(e){function t(e){for(r=!0;n.length;)n.shift()(e)}var n=[],r=!1,o={catch:function(){return o},then:function(e){return n.push(e),r&&setTimeout(t,1),o}};return e(t),o},be=!1,ye=ve(null),Ce=ve(null),we=new He,Ae=function(e){return e.toLowerCase()},Oe=b.create||function e(t){return t?(e.prototype=t,new e):this},Ne=he||(Te?function(e,t){return e.__proto__=t,e}:pe&&fe?function(){function e(e,t){for(var n,r=pe(t),o=0,l=r.length;o<l;o++)ue.call(e,n=r[o])||se(e,n,fe(t,n))}return function(t,n){do{e(t,n)}while((n=de(n))&&!ce.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),De=e.MutationObserver||e.WebKitMutationObserver,Ie=e.HTMLAnchorElement,Fe=(e.HTMLElement||e.Element||e.Node).prototype,Se=!ce.call(Fe,le),Ve=Se?function(e,t,n){return e[t]=n.value,e}:se,Pe=Se?function(e){return 1===e.nodeType}:function(e){return ce.call(Fe,e)},Re=Se&&[],Ue=Fe.attachShadow,ke=Fe.cloneNode,_e=Fe.dispatchEvent,xe=Fe.getAttribute,qe=Fe.hasAttribute,Be=Fe.removeAttribute,Ze=Fe.setAttribute,je=g.createElement,Ge=g.importNode,ze=je,Ke=De&&{attributes:!0,characterData:!0,attributeOldValue:!0},Xe=De||function(e){Je=!1,le.removeEventListener($,Xe)},$e=0,Qe=V in g&&!/^force-all/.test(t.type),We=!0,Ye=!1,Je=!0,et=!0,tt=!0;if(De&&((S=g.createElement("div")).innerHTML="<div><div></div></div>",new De(function(e,t){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var n=(S=fe(Fe,"innerHTML"))&&S.set;n&&se(Fe,"innerHTML",{set:function(e){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,e)}})}t.disconnect(),S=null}).observe(S,{childList:!0,subtree:!0}),S.innerHTML=""),Qe||(he||Te?(I=function(e,t){ce.call(t,e)||f(e,t)},F=f):F=I=function(e,t){e[P]||(e[P]=b(!0),f(e,t))},Se?(Je=!1,function(){var e=fe(Fe,R),t=e.value,n=function(e){var t=new CustomEvent($,{bubbles:!0});t.attrName=e,t.prevValue=xe.call(this,e),t.newValue=null,t[X]=t.attrChange=2,Be.call(this,e),_e.call(this,t)},r=function(e,t){var n=qe.call(this,e),r=n&&xe.call(this,e),o=new CustomEvent($,{bubbles:!0});Ze.call(this,e,t),o.attrName=e,o.prevValue=n?r:null,o.newValue=t,n?o.MODIFICATION=o.attrChange=1:o[K]=o.attrChange=0,_e.call(this,o)},o=function(e){var t,n=e.currentTarget,r=n[P],o=e.propertyName;r.hasOwnProperty(o)&&(r=r[o],(t=new CustomEvent($,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[o]||null,null==t.prevValue?t[K]=t.attrChange=0:t.MODIFICATION=t.attrChange=1,_e.call(n,t))};e.value=function(e,l,a){e===$&&this[q]&&this.setAttribute!==r&&(this[P]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",o)),t.call(this,e,l,a)},se(Fe,R,e)}()):De||(le[R]($,Xe),le.setAttribute(P,1),le.removeAttribute(P),Je&&(w=function(e){var t,n,r,o=this;if(o===e.target){for(r in t=o[P],o[P]=n=O(o),n){if(!(r in t))return A(0,o,r,t[r],n[r],K);if(n[r]!==t[r])return A(1,o,r,t[r],n[r],"MODIFICATION")}for(r in t)if(!(r in n))return A(2,o,r,t[r],n[r],X)}},A=function(e,t,n,r,o,l){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:o};a[l]=e,i(a)},O=function(e){for(var t,n,r={},o=e.attributes,l=0,a=o.length;l<a;l++)"setAttribute"!==(n=(t=o[l]).name)&&(r[n]=t.value);return r})),g[V]=function(e,t){if(n=e.toUpperCase(),We&&(We=!1,De?(N=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new De(function(r){for(var o,l,a,i=0,u=r.length;i<u;i++)"childList"===(o=r[i]).type?(n(o.addedNodes,e),n(o.removedNodes,t)):(l=o.target,tt&&l[q]&&"style"!==o.attributeName&&(a=xe.call(l,o.attributeName))!==o.oldValue&&l[q](o.attributeName,o.oldValue,a))})}(o(U),o(_)),(D=function(e){return N.observe(e,{childList:!0,subtree:!0}),e})(g),Ue&&(Fe.attachShadow=function(){return D(Ue.apply(this,arguments))})):(C=[],g[R]("DOMNodeInserted",u(U)),g[R]("DOMNodeRemoved",u(_))),g[R](Q,c),g[R]("readystatechange",c),g.importNode=function(e,t){switch(e.nodeType){case 1:return m(g,Ge,[e,!!t]);case 11:for(var n=g.createDocumentFragment(),r=e.childNodes,o=r.length,l=0;l<o;l++)n.appendChild(g.importNode(r[l],!!t));return n;default:return ke.call(e,!!t)}},Fe.cloneNode=function(e){return m(this,ke,[!!e])}),Ye)return Ye=!1;if(-2<ae.call(ne,J+n)+ae.call(ne,Y+n)&&p(e),!ee.test(n)||-1<ae.call(te,n))throw new Error("The type "+e+" is invalid");var n,l,a=function(){return s?g.createElement(f,n):g.createElement(f)},i=t||ie,s=ue.call(i,x),f=s?t[x].toUpperCase():n;return s&&-1<ae.call(ne,Y+f)&&p(f),l=ne.push((s?J:Y)+n)-1,oe=oe.concat(oe.length?",":"",s?f+'[is="'+e.toLowerCase()+'"]':f),a.prototype=re[l]=ue.call(i,"prototype")?i.prototype:Oe(Fe),oe.length&&r(g.querySelectorAll(oe),U),a},g.createElement=ze=function(e,t){var n=M(t),r=n?je.call(g,e,Ae(n)):je.call(g,e),o=""+e,l=ae.call(ne,(n?J:Y)+(n||o).toUpperCase()),i=-1<l;return n&&(r.setAttribute("is",n=n.toLowerCase()),i&&(i=a(o.toUpperCase(),n))),tt=!g.createElement.innerHTMLHelper,i&&F(r,re[l]),r}),h.prototype={constructor:h,define:Ee?function(e,t,n){if(n)T(e,t,n);else{var r=e.toUpperCase();ye[r]={constructor:t,create:[r]},we.set(t,r),Me.define(e,t)}}:T,get:Ee?function(e){return Me.get(e)||L(e)}:L,whenDefined:Ee?function(e){return ge.race([Me.whenDefined(e),v(e)])}:v},!Me||/^force/.test(t.type))H();else if(!t.noBuiltIn)try{!function(t,n,r){var o=new RegExp("^<a\\s+is=('|\")"+r+"\\1></a>$");if(n[x]="a",(t.prototype=Oe(Ie.prototype)).constructor=t,e.customElements.define(r,t,n),!o.test(g.createElement("a",{is:r}).outerHTML)||!o.test((new t).outerHTML))throw n}(function e(){return Reflect.construct(Ie,[],e)},{},"document-register-element-a")}catch(e){H()}if(!t.noBuiltIn)try{if(je.call(g,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(e){Ae=function(e){return{is:e.toLowerCase()}}}}(window);
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{2:function(t,e,n){t.exports=n("zUnb")},"4R65":function(t,e,n){!function(t){"use strict";var e=Object.freeze;function n(t){var e,n,i,s;for(n=1,i=arguments.length;n<i;n++)for(e in s=arguments[n])t[e]=s[e];return t}Object.freeze=function(t){return t};var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function s(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var o=0;function r(t){return t._leaflet_id=t._leaflet_id||++o,t._leaflet_id}function a(t,e,n){var i,s,o,r;return r=function(){i=!1,s&&(o.apply(n,s),s=!1)},o=function(){i?s=arguments:(t.apply(n,arguments),setTimeout(r,e),i=!0)}}function l(t,e,n){var i=e[1],s=e[0],o=i-s;return t===i&&n?t:((t-s)%o+o)%o+s}function h(){return!1}function u(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return c(t).split(/\s+/)}function p(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function m(t,e,n){var i=[];for(var s in t)i.push(encodeURIComponent(n?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var f=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(f,function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function E(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var x=window.requestAnimationFrame||b("RequestAnimationFrame")||E,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,e,n){if(!n||x!==E)return x.call(window,s(t,e));t.call(e)}function S(t){t&&C.call(window,t)}var T=(Object.freeze||Object)({freeze:e,extend:n,create:i,bind:s,lastId:o,stamp:r,throttle:a,wrapNum:l,falseFn:h,formatNum:u,trim:c,splitWords:d,setOptions:p,getParamString:m,template:_,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:x,cancelFn:C,requestAnimFrame:k,cancelAnimFrame:S});function I(){}I.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=e.__super__=this.prototype,o=i(s);for(var r in o.constructor=e,e.prototype=o,this)this.hasOwnProperty(r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),n.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=n(i(o.options),t.options)),n(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},I.include=function(t){return n(this.prototype,t),this},I.mergeOptions=function(t){return n(this.prototype.options,t),this},I.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var P={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var s=0,o=(t=d(t)).length;s<o;s++)this._on(t[s],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var s=0,o=(t=d(t)).length;s<o;s++)this._off(t[s],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(this._events[t]=i=[]),n===this&&(n=void 0);for(var s={fn:e,ctx:n},o=i,r=0,a=o.length;r<a;r++)if(o[r].fn===e&&o[r].ctx===n)return;o.push(s)},_off:function(t,e,n){var i,s,o;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(s=0,o=i.length;s<o;s++){var r=i[s];if(r.ctx===n&&r.fn===e)return r.fn=h,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(s,1)}}else{for(s=0,o=i.length;s<o;s++)i[s].fn=h;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var s=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var r=0,a=o.length;r<a;r++){var l=o[r];l.fn.call(l.ctx||this,s)}this._firingCount--}}return i&&this._propagateEvent(s),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var o=s(function(){this.off(t,e,n).off(t,o,n)},this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};P.addEventListener=P.on,P.removeEventListener=P.clearAllEventListeners=P.off,P.addOneTimeEventListener=P.once,P.fireEvent=P.fire,P.hasEventListeners=P.listens;var M=I.extend(P);function A(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,e,n){return t instanceof A?t:g(t)?new A(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new A(t.x,t.y):new A(t,e,n)}function R(t,e){if(t)for(var n=e?[t,e]:t,i=0,s=n.length;i<s;i++)this.extend(n[i])}function N(t,e){return!t||t instanceof R?t:new R(t,e)}function F(t,e){if(t)for(var n=e?[t,e]:t,i=0,s=n.length;i<s;i++)this.extend(n[i])}function z(t,e){return t instanceof F?t:new F(t,e)}function V(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function B(t,e,n){return t instanceof V?t:g(t)&&"object"!=typeof t[0]?3===t.length?new V(t[0],t[1],t[2]):2===t.length?new V(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new V(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new V(t,e,n)}A.prototype={clone:function(){return new A(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new A(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new A(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=O(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},R.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new A((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new A(this.min.x,this.max.y)},getTopRight:function(){return new A(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof A?O(t):N(t))instanceof R?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,s=t.max;return s.x>=e.x&&i.x<=n.x&&s.y>=e.y&&i.y<=n.y},overlaps:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,s=t.max;return s.x>e.x&&i.x<n.x&&s.y>e.y&&i.y<n.y},isValid:function(){return!(!this.min||!this.max)}},F.prototype={extend:function(t){var e,n,i=this._southWest,s=this._northEast;if(t instanceof V)e=t,n=t;else{if(!(t instanceof F))return t?this.extend(B(t)||z(t)):this;if(n=t._northEast,!(e=t._southWest)||!n)return this}return i||s?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),s.lat=Math.max(n.lat,s.lat),s.lng=Math.max(n.lng,s.lng)):(this._southWest=new V(e.lat,e.lng),this._northEast=new V(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,s=Math.abs(e.lng-n.lng)*t;return new F(new V(e.lat-i,e.lng-s),new V(n.lat+i,n.lng+s))},getCenter:function(){return new V((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new V(this.getNorth(),this.getWest())},getSouthEast:function(){return new V(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof V||"lat"in t?B(t):z(t);var e,n,i=this._southWest,s=this._northEast;return t instanceof F?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=s.lat&&e.lng>=i.lng&&n.lng<=s.lng},intersects:function(t){t=z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),s=t.getNorthEast();return s.lat>=e.lat&&i.lat<=n.lat&&s.lng>=e.lng&&i.lng<=n.lng},overlaps:function(t){t=z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),s=t.getNorthEast();return s.lat>e.lat&&i.lat<n.lat&&s.lng>e.lng&&i.lng<n.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},V.prototype={equals:function(t,e){return!!t&&(t=B(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,B(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return z([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new V(this.lat,this.lng,this.alt)}};var j={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new R(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new V(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,s=e.lng-n.lng;if(0===i&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new F(new V(o.lat-i,o.lng-s),new V(r.lat-i,r.lng-s))}},H=n({},j,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,s=e.lat*n,o=Math.sin((e.lat-t.lat)*n/2),r=Math.sin((e.lng-t.lng)*n/2),a=o*o+Math.cos(i)*Math.cos(s)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),U={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),s=Math.sin(i*e);return new A(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new V((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new R([-t,-t],[t,t])}()};function Z(t,e,n,i){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function G(t,e,n,i){return new Z(t,e,n,i)}Z.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new A((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var $=n({},H,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return G(t,.5,-t,.5)}()}),q=n({},$,{code:"EPSG:900913"});function W(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,e){var n,i,s,o,r,a,l="";for(n=0,s=t.length;n<s;n++){for(i=0,o=(r=t[n]).length;i<o;i++)a=r[i],l+=(i?"L":"M")+a.x+" "+a.y;l+=e?kt?"z":"x":""}return l||"M0 0"}var Y=document.documentElement.style,Q="ActiveXObject"in window,X=Q&&!document.addEventListener,J="msLaunchUri"in navigator&&!("documentMode"in document),tt=Tt("webkit"),et=Tt("android"),nt=Tt("android 2")||Tt("android 3"),it=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=et&&Tt("Google")&&it<537&&!("AudioNode"in window),ot=!!window.opera,rt=Tt("chrome"),at=Tt("gecko")&&!tt&&!ot&&!Q,lt=!rt&&Tt("safari"),ht=Tt("phantom"),ut="OTransition"in Y,ct=0===navigator.platform.indexOf("Win"),dt=Q&&"transition"in Y,pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,mt="MozPerspective"in Y,ft=!window.L_DISABLE_3D&&(dt||pt||mt)&&!ut&&!ht,_t="undefined"!=typeof orientation||Tt("mobile"),gt=_t&&tt,yt=_t&&pt,vt=!window.PointerEvent&&window.MSPointerEvent,bt=!(!window.PointerEvent&&!vt),wt=!window.L_NO_TOUCH&&(bt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Et=_t&&ot,xt=_t&&at,Ct=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=!!document.createElement("canvas").getContext,kt=!(!document.createElementNS||!W("svg").createSVGRect),St=!kt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Tt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var It=(Object.freeze||Object)({ie:Q,ielt9:X,edge:J,webkit:tt,android:et,android23:nt,androidStock:st,opera:ot,chrome:rt,gecko:at,safari:lt,phantom:ht,opera12:ut,win:ct,ie3d:dt,webkit3d:pt,gecko3d:mt,any3d:ft,mobile:_t,mobileWebkit:gt,mobileWebkit3d:yt,msPointer:vt,pointer:bt,touch:wt,mobileOpera:Et,mobileGecko:xt,retina:Ct,canvas:Lt,svg:kt,vml:St}),Pt=vt?"MSPointerDown":"pointerdown",Mt=vt?"MSPointerMove":"pointermove",At=vt?"MSPointerUp":"pointerup",Dt=vt?"MSPointerCancel":"pointercancel",Ot=["INPUT","SELECT","OPTION"],Rt={},Nt=!1,Ft=0;function zt(t){Rt[t.pointerId]=t,Ft++}function Vt(t){Rt[t.pointerId]&&(Rt[t.pointerId]=t)}function Bt(t){delete Rt[t.pointerId],Ft--}function jt(t,e){for(var n in t.touches=[],Rt)t.touches.push(Rt[n]);t.changedTouches=[t],e(t)}var Ht=vt?"MSPointerDown":bt?"pointerdown":"touchstart",Ut=vt?"MSPointerUp":bt?"pointerup":"touchend",Zt="_leaflet_";function Gt(t,e,n){var i,s,o=!1,r=250;function a(t){var e;if(bt){if(!J||"mouse"===t.pointerType)return;e=Ft}else e=t.touches.length;if(!(e>1)){var n=Date.now(),a=n-(i||n);s=t.touches?t.touches[0]:t,o=a>0&&a<=r,i=n}}function l(t){if(o&&!s.cancelBubble){if(bt){if(!J||"mouse"===t.pointerType)return;var n,r,a={};for(r in s)a[r]=(n=s[r])&&n.bind?n.bind(s):n;s=a}s.type="dblclick",e(s),i=null}}return t[Zt+Ht+n]=a,t[Zt+Ut+n]=l,t[Zt+"dblclick"+n]=e,t.addEventListener(Ht,a,!1),t.addEventListener(Ut,l,!1),t.addEventListener("dblclick",e,!1),this}function $t(t,e){var n=t[Zt+Ut+e],i=t[Zt+"dblclick"+e];return t.removeEventListener(Ht,t[Zt+Ht+e],!1),t.removeEventListener(Ut,n,!1),J||t.removeEventListener("dblclick",i,!1),this}var qt,Wt,Kt,Yt,Qt,Xt=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),te="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function ee(t){return"string"==typeof t?document.getElementById(t):t}function ne(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ie(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function se(t){var e=t.parentNode;e&&e.removeChild(t)}function oe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function re(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ae(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function le(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=de(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function he(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,s=n.length;i<s;i++)t.classList.add(n[i]);else if(!le(t,e)){var o=de(t);ce(t,(o?o+" ":"")+e)}}function ue(t,e){void 0!==t.classList?t.classList.remove(e):ce(t,c((" "+de(t)+" ").replace(" "+e+" "," ")))}function ce(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function de(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function fe(t,e,n){var i=e||new A(0,0);t.style[Xt]=(dt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function _e(t,e){t._leaflet_pos=e,ft?fe(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ge(t){return t._leaflet_pos||new A(0,0)}if("onselectstart"in document)qt=function(){ke(window,"selectstart",Oe)},Wt=function(){Te(window,"selectstart",Oe)};else{var ye=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);qt=function(){if(ye){var t=document.documentElement.style;Kt=t[ye],t[ye]="none"}},Wt=function(){ye&&(document.documentElement.style[ye]=Kt,Kt=void 0)}}function ve(){ke(window,"dragstart",Oe)}function be(){Te(window,"dragstart",Oe)}function we(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ee(),Yt=t,Qt=t.style.outline,t.style.outline="none",ke(window,"keydown",Ee))}function Ee(){Yt&&(Yt.style.outline=Qt,Yt=void 0,Qt=void 0,Te(window,"keydown",Ee))}function xe(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ce(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Le=(Object.freeze||Object)({TRANSFORM:Xt,TRANSITION:Jt,TRANSITION_END:te,get:ee,getStyle:ne,create:ie,remove:se,empty:oe,toFront:re,toBack:ae,hasClass:le,addClass:he,removeClass:ue,setClass:ce,getClass:de,setOpacity:pe,testProp:me,setTransform:fe,setPosition:_e,getPosition:ge,disableTextSelection:qt,enableTextSelection:Wt,disableImageDrag:ve,enableImageDrag:be,preventOutline:we,restoreOutline:Ee,getSizedParentNode:xe,getScale:Ce});function ke(t,e,n,i){if("object"==typeof e)for(var s in e)Ie(t,s,e[s],n);else for(var o=0,r=(e=d(e)).length;o<r;o++)Ie(t,e[o],n,i);return this}var Se="_leaflet_events";function Te(t,e,n,i){if("object"==typeof e)for(var s in e)Pe(t,s,e[s],n);else if(e)for(var o=0,r=(e=d(e)).length;o<r;o++)Pe(t,e[o],n,i);else{for(var a in t[Se])Pe(t,a,t[Se][a]);delete t[Se]}return this}function Ie(t,e,n,i){var o=e+r(n)+(i?"_"+r(i):"");if(t[Se]&&t[Se][o])return this;var a=function(e){return n.call(i||t,e||window.event)},l=a;bt&&0===e.indexOf("touch")?function(t,e,n,i){"touchstart"===e?function(t,e,n){var i=s(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Ot.indexOf(t.target.tagName)<0))return;Oe(t)}jt(t,e)});t["_leaflet_touchstart"+n]=i,t.addEventListener(Pt,i,!1),Nt||(document.documentElement.addEventListener(Pt,zt,!0),document.documentElement.addEventListener(Mt,Vt,!0),document.documentElement.addEventListener(At,Bt,!0),document.documentElement.addEventListener(Dt,Bt,!0),Nt=!0)}(t,n,i):"touchmove"===e?function(t,e,n){var i=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&jt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(Mt,i,!1)}(t,n,i):"touchend"===e&&function(t,e,n){var i=function(t){jt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(At,i,!1),t.addEventListener(Dt,i,!1)}(t,n,i)}(t,e,a,o):!wt||"dblclick"!==e||!Gt||bt&&rt?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,Ue(t,e)&&l(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1)):("click"===e&&et&&(a=function(t){!function(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=Ve&&n-Ve;i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?Re(t):(Ve=n,e(t))}(t,l)}),t.addEventListener(e,a,!1)):"attachEvent"in t&&t.attachEvent("on"+e,a):Gt(t,a,o),t[Se]=t[Se]||{},t[Se][o]=a}function Pe(t,e,n,i){var s=e+r(n)+(i?"_"+r(i):""),o=t[Se]&&t[Se][s];if(!o)return this;bt&&0===e.indexOf("touch")?function(t,e,n){var i=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(Pt,i,!1):"touchmove"===e?t.removeEventListener(Mt,i,!1):"touchend"===e&&(t.removeEventListener(At,i,!1),t.removeEventListener(Dt,i,!1))}(t,e,s):!wt||"dblclick"!==e||!$t||bt&&rt?"removeEventListener"in t?t.removeEventListener("mousewheel"===e?"onwheel"in t?"wheel":"mousewheel":"mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,o,!1):"detachEvent"in t&&t.detachEvent("on"+e,o):$t(t,s),t[Se][s]=null}function Me(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,He(t),this}function Ae(t){return Ie(t,"mousewheel",Me),this}function De(t){return ke(t,"mousedown touchstart dblclick",Me),Ie(t,"click",je),this}function Oe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Re(t){return Oe(t),Me(t),this}function Ne(t,e){if(!e)return new A(t.clientX,t.clientY);var n=Ce(e),i=n.boundingClientRect;return new A((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Fe=ct&&rt?2*window.devicePixelRatio:at?window.devicePixelRatio:1;function ze(t){return J?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Fe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ve,Be={};function je(t){Be[t.type]=!0}function He(t){var e=Be[t.type];return Be[t.type]=!1,e}function Ue(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Ze=(Object.freeze||Object)({on:ke,off:Te,stopPropagation:Me,disableScrollPropagation:Ae,disableClickPropagation:De,preventDefault:Oe,stop:Re,getMousePosition:Ne,getWheelDelta:ze,fakeStop:je,skipped:He,isExternalTarget:Ue,addListener:ke,removeListener:Te}),Ge=M.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=ge(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=k(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),_e(this._el,n),this.fire("step")},_complete:function(){S(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),$e=M.extend({options:{crs:$,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(B(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Jt&&ft&&!Et&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ke(this._proxy,te,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(B(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t=t||(ft?this.options.zoomDelta:1)),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t=t||(ft?this.options.zoomDelta:1)),e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),s=this.getSize().divideBy(2),o=(t instanceof A?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/i),r=this.containerPointToLatLng(s.add(o));return this.setView(r,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():z(t);var n=O(e.paddingTopLeft||e.padding||[0,0]),i=O(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,n.add(i));if((s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=i.subtract(n).divideBy(2),r=this.project(t.getSouthWest(),s),a=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(a).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,e){if(!(t=z(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=O(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ge,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){he(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!ft)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),r=this._zoom;t=B(t),e=void 0===e?r:e;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(r,e),h=s.distanceTo(i)||1,u=2.0164;function c(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=c(0),f=Date.now(),_=(c(1)-m)/1.42,g=n.duration?1e3*n.duration:1e3*_*.8;return this._moveStart(!0,n.noMoveStart),(function n(){var o=(Date.now()-f)/g,l=function(t){return 1-Math.pow(1-t,1.5)}(o)*_;o<=1?(this._flyToFrame=k(n,this),this._move(this.unproject(i.add(s.subtract(i).multiplyBy(function(t){return a*(p(m)*function(t){return d(t)/p(t)}(m+1.42*t)-d(m))/u}(l)/h)),r),this.getScaleZoom(a/function(t){return a*(p(m)/p(m+1.42*t))}(l),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}).call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,z(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=O((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=O(e.paddingBottomRight||e.padding||[0,0]),s=this.getCenter(),o=this.project(s),r=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),h=N([a.min.add(n),a.max.subtract(i)]);if(!h.contains(r)){this._enforcingBounds=!0;var u=o.subtract(r),c=O(r.x+u.x,r.y+u.y);(r.x<h.min.x||r.x>h.max.x)&&(c.x=o.x-u.x,u.x>0?c.x+=l.x-n.x:c.x-=l.x-i.x),(r.y<h.min.y||r.y>h.max.y)&&(c.y=o.y-u.y,u.y>0?c.y+=l.y-n.y:c.y-=l.y-i.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),r=i.divideBy(2).round(),a=o.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=s(this._handleGeolocationResponse,this),i=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new V(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var s=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(s,i.maxZoom):s)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),se(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(S(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)se(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ie("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=z(t),n=O(n||[0,0]);var i=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),h=N(this.project(a,i),this.project(r,i)).getSize(),u=ft?this.options.zoomSnap:1,c=l.x/h.x,d=l.y/h.y,p=e?Math.max(c,d):Math.min(c,d);return i=this.getScaleZoom(p,i),u&&(i=Math.round(i/(u/100))*(u/100),i=e?Math.ceil(i/u)*u:Math.floor(i/u)*u),Math.max(s,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new R(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs,i=n.zoom(t*n.scale(e=void 0===e?this._zoom:e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(B(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){var e=O(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(B(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(B(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(z(t))},distance:function(t,e){return this.options.crs.distance(B(t),B(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(B(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ee(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ke(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ft,he(t,"leaflet-container"+(wt?" leaflet-touch":"")+(Ct?" leaflet-retina":"")+(X?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ne(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),_e(this._mapPane,new A(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(he(t.markerPane,"leaflet-zoom-hide"),he(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){_e(this._mapPane,new A(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return S(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){_e(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Te:ke;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),ft&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){S(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],s="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,a=!1;o;){if((n=this._targets[r(o)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(s&&!Ue(o,t))break;if(i.push(n),s)break}if(o===this._container)break;o=o.parentNode}return i.length||a||s||!Ue(o,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!He(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||we(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var s=n({},t);s.type="preclick",this._fireDOMEvent(s,s.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var o=i[0];"contextmenu"===e&&o.listens(e,!0)&&Oe(t);var r={originalEvent:t};if("keypress"!==t.type){var a=o.getLatLng&&(!o._radius||o._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?o.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,r,!0),r.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ge(this._mapPane)||new A(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),s=this.getSize().divideBy(2),o=new R(i.subtract(s),i.add(s)),r=this._getBoundsOffset(o,n,e);return r.round().equals([0,0])?t:this.unproject(i.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new R(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),s=i.min.subtract(t.min),o=i.max.subtract(t.max);return new A(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=ft?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ue(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=ie("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Xt,n=this._proxy.style[e];fe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();fe(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){se(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(s)||(k(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,he(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ue(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),k(function(){this._moveEnd(!0)},this))}}),qe=I.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return he(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this},remove:function(){return this._map?(se(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),We=function(t){return new qe(t)};$e.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=ie("div",e+"control-container",this._container);function i(i,s){t[i+s]=ie("div",e+i+" "+e+s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)se(this._controlCorners[t]);se(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ke=qe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return qe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){he(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(he(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ue(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ue(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ie("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),De(e),Ae(e);var i=this._section=ie("section",t+"-list");n&&(this._map.on("click",this.collapse,this),et||ke(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var s=this._layersLink=ie("a",t+"-toggle",e);s.href="#",s.title="Layers",wt?(ke(s,"click",Re),ke(s,"click",this.expand,this)):ke(s,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ie("div",t+"-base",i),this._separator=ie("div",t+"-separator",i),this._overlaysList=ie("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(s(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;oe(this._baseLayersList),oe(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,s=0;for(n=0;n<this._layers.length;n++)this._addItem(i=this._layers[n]),e=e||i.overlay,t=t||!i.overlay,s+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&s>1)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers",i),this._layerControlInputs.push(e),e.layerId=r(t.layer),ke(e,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var o=document.createElement("div");return n.appendChild(o),o.appendChild(e),o.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],s=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)e=this._getLayer((t=n[o]).layerId).layer,t.checked?i.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])||this._map.addLayer(i[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),s=n.length-1;s>=0;s--)e=this._getLayer((t=n[s]).layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Ye=qe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ie("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,s){var o=ie("a",n,i);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),De(o),ke(o,"click",Re),ke(o,"click",s,this),ke(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ue(this._zoomInButton,e),ue(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&he(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&he(this._zoomInButton,e)}});$e.mergeOptions({zoomControl:!0}),$e.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ye,this.addControl(this.zoomControl))});var Qe=qe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=ie("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ie("div",e,n)),t.imperial&&(this._iScale=ie("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n,i,s=3.2808399*t;s>5280?(n=this._getRoundNum(e=s/5280),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(s),this._updateScale(this._iScale,i+" ft",i/s))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Xe=qe.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ie("div","leaflet-control-attribution"),De(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});$e.mergeOptions({attributionControl:!0}),$e.addInitHook(function(){this.options.attributionControl&&(new Xe).addTo(this)}),qe.Layers=Ke,qe.Zoom=Ye,qe.Scale=Qe,qe.Attribution=Xe,We.layers=function(t,e,n){return new Ke(t,e,n)},We.zoom=function(t){return new Ye(t)},We.scale=function(t){return new Qe(t)},We.attribution=function(t){return new Xe(t)};var Je=I.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Je.addTo=function(t,e){return t.addHandler(e,this),this};var tn,en={Events:P},nn=wt?"touchstart mousedown":"mousedown",sn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},on={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},rn=M.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(ke(this._dragStartTarget,nn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(rn._dragging===this&&this.finishDrag(),Te(this._dragStartTarget,nn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!le(this._element,"leaflet-zoom-anim")&&!(rn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(rn._dragging=this,this._preventOutline&&we(this._element),ve(),qt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=xe(this._element);this._startPoint=new A(e.clientX,e.clientY),this._parentScale=Ce(n),ke(document,on[t.type],this._onMove,this),ke(document,sn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new A(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Oe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ge(this._element).subtract(n),he(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),he(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,S(this._animRequest),this._lastEvent=t,this._animRequest=k(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),_e(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ue(document.body,"leaflet-dragging"),this._lastTarget&&(ue(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),on)Te(document,on[t],this._onMove,this),Te(document,sn[t],this._onUp,this);be(),Wt(),this._moved&&this._moving&&(S(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,rn._dragging=!1}});function an(t,e){if(!e||!t.length)return t.slice();var n=e*e;return function(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,function t(e,n,i,s,o){var r,a,l,h=0;for(a=s+1;a<=o-1;a++)(l=pn(e[a],e[s],e[o],!0))>h&&(r=a,h=l);h>i&&(n[r]=1,t(e,n,i,s,r),t(e,n,i,r,o))}(t,i,e,0,n-1);var s,o=[];for(s=0;s<n;s++)i[s]&&o.push(t[s]);return o}(t=function(t,e){for(var n=[t[0]],i=1,s=0,o=t.length;i<o;i++)dn(t[i],t[s])>e&&(n.push(t[i]),s=i);return s<o-1&&n.push(t[o-1]),n}(t,n),n)}function ln(t,e,n){return Math.sqrt(pn(t,e,n,!0))}function hn(t,e,n,i,s){var o,r,a,l=i?tn:cn(t,n),h=cn(e,n);for(tn=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=cn(r=un(t,e,o=l||h,n,s),n),o===l?(t=r,l=a):(e=r,h=a)}}function un(t,e,n,i,s){var o,r,a=e.x-t.x,l=e.y-t.y,h=i.min,u=i.max;return 8&n?(o=t.x+a*(u.y-t.y)/l,r=u.y):4&n?(o=t.x+a*(h.y-t.y)/l,r=h.y):2&n?(o=u.x,r=t.y+l*(u.x-t.x)/a):1&n&&(o=h.x,r=t.y+l*(h.x-t.x)/a),new A(o,r,s)}function cn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function dn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function pn(t,e,n,i){var s,o=e.x,r=e.y,a=n.x-o,l=n.y-r,h=a*a+l*l;return h>0&&((s=((t.x-o)*a+(t.y-r)*l)/h)>1?(o=n.x,r=n.y):s>0&&(o+=a*s,r+=l*s)),a=t.x-o,l=t.y-r,i?a*a+l*l:new A(o,r)}function mn(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function fn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mn(t)}var _n=(Object.freeze||Object)({simplify:an,pointToSegmentDistance:ln,closestPointOnSegment:function(t,e,n){return pn(t,e,n)},clipSegment:hn,_getEdgeIntersection:un,_getBitCode:cn,_sqClosestPointOnSegment:pn,isFlat:mn,_flat:fn});function gn(t,e,n){var i,s,o,r,a,l,h,u,c,d=[1,4,2,8];for(s=0,h=t.length;s<h;s++)t[s]._code=cn(t[s],e);for(r=0;r<4;r++){for(u=d[r],i=[],s=0,o=(h=t.length)-1;s<h;o=s++)l=t[o],(a=t[s])._code&u?l._code&u||((c=un(l,a,u,e,n))._code=cn(c,e),i.push(c)):(l._code&u&&((c=un(l,a,u,e,n))._code=cn(c,e),i.push(c)),i.push(a));t=i}return t}var yn=(Object.freeze||Object)({clipPolygon:gn}),vn={project:function(t){return new A(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new R([-180,-90],[180,90])},bn={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=o*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-r)/(1+r),o/2);return i=-n*Math.log(Math.max(a,1e-10)),new A(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=o*Math.sin(a),e=Math.pow((1-e)/(1+e),o/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new V(a*n,t.x*n/i)}},wn=(Object.freeze||Object)({LonLat:vn,Mercator:bn,SphericalMercator:U}),En=n({},H,{code:"EPSG:3395",projection:bn,transformation:function(){var t=.5/(Math.PI*bn.R);return G(t,.5,-t,.5)}()}),xn=n({},H,{code:"EPSG:4326",projection:vn,transformation:G(1/180,1,-1/180,.5)}),Cn=n({},j,{projection:vn,transformation:G(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});j.Earth=H,j.EPSG3395=En,j.EPSG3857=$,j.EPSG900913=q,j.EPSG4326=xn,j.Simple=Cn;var Ln=M.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});$e.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var s=this._zoomBoundLayers[i].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),e=void 0===s.maxZoom?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var kn=Ln.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r(t)}}),Sn=kn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),kn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),kn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new F;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Tn=I.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var s=O(i),o=O("shadow"===e&&n.shadowAnchor||n.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ct&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),In=Tn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return In.imagePath||(In.imagePath=this._detectIconPath()),(this.options.imagePath||In.imagePath)+Tn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ie("div","leaflet-default-icon-path",document.body),e=ne(t,"background-image")||ne(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Pn=Je.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new rn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),he(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ue(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=ge(e._icon),r=n.getPixelBounds(),a=n.getPixelOrigin(),l=N(r.min._subtract(a).add(s),r.max._subtract(a).subtract(s));if(!l.contains(o)){var h=O((Math.max(l.max.x,o.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(i);n.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),_e(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=k(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(S(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=ge(e._icon),s=e._map.layerPointToLatLng(i);n&&_e(n,i),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){S(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Mn=Ln.extend({options:{icon:new In,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=B(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=B(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),he(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(he(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),se(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&se(this._shadow),this._shadow=null},_setPos:function(t){_e(this._icon,t),this._shadow&&_e(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(he(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Pn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Pn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;pe(this._icon,t),this._shadow&&pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),An=Ln.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Dn=An.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=B(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=B(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return An.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new R(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),On=Dn.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),p(this,e),this._latlng=B(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:An.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,r=n.project([e+o,t]),a=n.project([e-o,t]),l=r.add(a).divideBy(2),h=n.unproject(l).lat,u=Math.acos((Math.cos(o*s)-Math.sin(e*s)*Math.sin(h*s))/(Math.cos(e*s)*Math.cos(h*s)))/s;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([h,t-u]).x,this._radiusY=l.y-r.y}else{var c=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(c).x}this._updateBounds()}}),Rn=An.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,s=null,o=pn,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,u=l.length;h<u;h++){var c=o(t,e=l[h-1],n=l[h],!0);c<i&&(i=c,s=o(t,e,n))}return s&&(s.distance=Math.sqrt(i)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,s,o,r,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<l-1;t++)if((i+=n=(s=a[t]).distanceTo(o=a[t+1]))>e)return this._map.layerPointToLatLng([o.x-(r=(i-e)/n)*(o.x-s.x),o.y-r*(o.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=B(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new F,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return mn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=mn(t),i=0,s=t.length;i<s;i++)n?(e[i]=B(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new R;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),n=new A(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(n),t.max._add(n),this._pxBounds=t)},_projectLatlngs:function(t,e,n){var i,s,o=t.length;if(t[0]instanceof V){for(s=[],i=0;i<o;i++)s[i]=this._map.latLngToLayerPoint(t[i]),n.extend(s[i]);e.push(s)}else for(i=0;i<o;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,s,o,r,a,l=this._parts;for(e=0,i=0,s=this._rings.length;e<s;e++)for(n=0,o=(a=this._rings[e]).length;n<o-1;n++)(r=hn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(r[0]),r[1]===a[n+1]&&n!==o-2||(l[i].push(r[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=an(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,s,o,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(i=0,s=(r=(a=this._parts[n]).length)-1;i<r;s=i++)if((e||0!==i)&&ln(t,a[s],a[i])<=l)return!0;return!1}});Rn._flat=fn;var Nn=Rn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,s,o,r,a,l=this._rings[0],h=l.length;if(!h)return null;for(o=r=a=0,t=0,e=h-1;t<h;e=t++)r+=((n=l[t]).x+(i=l[e]).x)*(s=n.y*i.x-i.y*n.x),a+=(n.y+i.y)*s,o+=3*s;return this._map.layerPointToLatLng(0===o?l[0]:[r/o,a/o])},_convertLatLngs:function(t){var e=Rn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof V&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Rn.prototype._setLatLngs.call(this,t),mn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new A(e,e);if(t=new R(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,s=0,o=this._rings.length;s<o;s++)(i=gn(this._rings[s],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,s,o,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,a=this._parts.length;s<a;s++)for(o=0,r=(l=(e=this._parts[s]).length)-1;o<l;r=o++)(n=e[o]).y>t.y!=(i=e[r]).y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(h=!h);return h||Rn.prototype._containsPoint.call(this,t,!0)}}),Fn=Sn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,s=g(t)?t:t.features;if(s){for(e=0,n=s.length;e<n;e++)((i=s[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=zn(t,o);return r?(r.feature=Zn(t),r.defaultOptions=r.options,this.resetStyle(r),o.onEachFeature&&o.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}});function zn(t,e){var n,i,s,o,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Vn;if(!a&&!r)return null;switch(r.type){case"Point":return n=u(a),h?h(t,n):new Mn(n);case"MultiPoint":for(s=0,o=a.length;s<o;s++)n=u(a[s]),l.push(h?h(t,n):new Mn(n));return new Sn(l);case"LineString":case"MultiLineString":return i=Bn(a,"LineString"===r.type?0:1,u),new Rn(i,e);case"Polygon":case"MultiPolygon":return i=Bn(a,"Polygon"===r.type?1:2,u),new Nn(i,e);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var c=zn({geometry:r.geometries[s],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Sn(l);default:throw new Error("Invalid GeoJSON object.")}}function Vn(t){return new V(t[1],t[0],t[2])}function Bn(t,e,n){for(var i,s=[],o=0,r=t.length;o<r;o++)i=e?Bn(t[o],e-1,n):(n||Vn)(t[o]),s.push(i);return s}function jn(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Hn(t,e,n,i){for(var s=[],o=0,r=t.length;o<r;o++)s.push(e?Hn(t[o],e-1,n,i):jn(t[o],i));return!e&&n&&s.push(s[0]),s}function Un(t,e){return t.feature?n({},t.feature,{geometry:e}):Zn(e)}function Zn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Gn={toGeoJSON:function(t){return Un(this,{type:"Point",coordinates:jn(this.getLatLng(),t)})}};function $n(t,e){return new Fn(t,e)}Mn.include(Gn),On.include(Gn),Dn.include(Gn),Rn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=Hn(this._latlngs,e?1:0,!1,t);return Un(this,{type:(e?"Multi":"")+"LineString",coordinates:n})}}),Nn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=e&&!mn(this._latlngs[0]),i=Hn(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Un(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),kn.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),Un(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer(function(e){if(e.toGeoJSON){var s=e.toGeoJSON(t);if(n)i.push(s.geometry);else{var o=Zn(s);"FeatureCollection"===o.type?i.push.apply(i,o.features):i.push(o)}}}),n?Un(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var qn=$n,Wn=Ln.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=z(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(he(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){se(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&re(this._image),this},bringToBack:function(){return this._map&&ae(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ie("img");he(e,"leaflet-image-layer"),this._zoomAnimated&&he(e,"leaflet-zoom-animated"),this.options.className&&he(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=s(this.fire,this,"load"),e.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;fe(this._image,n,e)},_reset:function(){var t=this._image,e=new R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();_e(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Kn=Wn.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ie("video");if(he(e,"leaflet-image-layer"),this._zoomAnimated&&he(e,"leaflet-zoom-animated"),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=s(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var r=0;r<this._url.length;r++){var a=ie("source");a.src=this._url[r],e.appendChild(a)}}}}),Yn=Ln.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){p(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&pe(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(pe(this._container,0),this._removeTimeout=setTimeout(s(se,void 0,this._container),200)):se(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=B(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&re(this._container),this},bringToBack:function(){return this._map&&ae(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=O(this.options.offset),n=this._getAnchor();this._zoomAnimated?_e(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),Qn=Yn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Yn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof An||this._source.on("preclick",Me))},onRemove:function(t){Yn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof An||this._source.off("preclick",Me))},getEvents:function(){var t=Yn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ie("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ie("div",t+"-content-wrapper",e);if(this._contentNode=ie("div",t+"-content",n),De(n),Ae(this._contentNode),ke(n,"contextmenu",Me),this._tipContainer=ie("div",t+"-tip-container",e),this._tip=ie("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ie("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",ke(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=this.options.maxHeight;i&&t.offsetHeight>i?(e.height=i+"px",he(t,"leaflet-popup-scrolled")):ue(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();_e(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ne(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,s=new A(this._containerLeft,-n-this._containerBottom);s._add(ge(this._container));var o=t.layerPointToContainerPoint(s),r=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||r),l=O(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),u=0,c=0;o.x+i+l.x>h.x&&(u=o.x+i-h.x+l.x),o.x-u-a.x<0&&(u=o.x-a.x),o.y+n+l.y>h.y&&(c=o.y+n-h.y+l.y),o.y-c-a.y<0&&(c=o.y-a.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),Re(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});$e.mergeOptions({closePopupOnClick:!0}),$e.include({openPopup:function(t,e,n){return t instanceof Qn||(t=new Qn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Ln.include({bindPopup:function(t,e){return t instanceof Qn?(p(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Qn(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof Ln||(e=t,t=this),t instanceof Sn)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Re(t),e instanceof An?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Xn=Yn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Yn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Yn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Yn.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){this._contentNode=this._container=ie("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,i=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),o=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,l=O(this.options.offset),h=this._getAnchor();"top"===o?t=t.add(O(-r/2+l.x,-a+l.y+h.y,!0)):"bottom"===o?t=t.subtract(O(r/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(O(r/2+l.x,a/2-h.y+l.y,!0)):"right"===o||"auto"===o&&s.x<i.x?(o="right",t=t.add(O(l.x+h.x,h.y-a/2+l.y,!0))):(o="left",t=t.subtract(O(r+h.x-l.x,a/2-h.y-l.y,!0))),ue(n,"leaflet-tooltip-right"),ue(n,"leaflet-tooltip-left"),ue(n,"leaflet-tooltip-top"),ue(n,"leaflet-tooltip-bottom"),he(n,"leaflet-tooltip-"+o),_e(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});$e.include({openTooltip:function(t,e,n){return t instanceof Xn||(t=new Xn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Ln.include({bindTooltip:function(t,e){return t instanceof Xn?(p(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Xn(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),wt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof Ln||(e=t,t=this),t instanceof Sn)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(he(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ue(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){this._tooltip&&this._map&&this.openTooltip(t.layer||t.target,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Jn=Tn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=O(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Tn.Default=In;var ti=Ln.extend({options:{tileSize:256,opacity:1,updateWhenIdle:_t,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),se(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(re(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ae(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof A?t:new A(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),s=0,o=n.length;s<o;s++)e=n[s].style.zIndex,n[s]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!X){pe(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var s=this._tiles[i];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);pe(s.el,o),o<1?e=!0:(s.active?n=!0:this._onOpaqueTile(s),s.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(S(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=ie("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(se(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],s=this._map;return i||((i=this._levels[t]={}).el=ie("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,s.getCenter(),s.getZoom()),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)se(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var s=Math.floor(t/2),o=Math.floor(e/2),r=n-1,a=new A(+s,+o);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>i&&this._retainParent(s,o,r,i))},_retainChildren:function(t,e,n,i){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var r=new A(s,o);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(s,o,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var s=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom)&&(s=void 0),i&&!(this.options.updateWhenZooming&&s!==this._tileZoom)||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),s=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();ft?fe(t.el,s,i):_e(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),s=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*i);return new R(s.subtract(o),s.add(o))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(i),o=s.getCenter(),r=[],a=this.options.keepBuffer,l=new R(s.getBottomLeft().subtract([a,-a]),s.getTopRight().add([a,-a]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var u=this._tiles[h].coords;u.z===this._tileZoom&&l.contains(new A(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var c=s.min.y;c<=s.max.y;c++)for(var d=s.min.x;d<=s.max.x;d++){var p=new A(d,c);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return z(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),s=i.add(n);return[e.unproject(i,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new F(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new A(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(se(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){he(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,X&&this.options.opacity<1&&pe(t,this.options.opacity),et&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&k(s(this._tileReady,this,t,null,o)),_e(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(pe(n.el,0),S(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(he(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),X||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new A(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new R(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),ei=ti.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Ct&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),et||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ke(n,"load",s(this._tileOnLoad,this,e,n)),ke(n,"error",s(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ct?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){X?setTimeout(s(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=v,se(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return st||e.el.setAttribute("src",v),ti.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return ti.prototype._tileReady.call(this,t,e,n)}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var s in e)s in this.options||(i[s]=e[s]);var o=(e=p(this,e)).detectRetina&&Ct?2:1,r=this.getTileSize();i.width=r.x*o,i.height=r.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,ei.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=N(n.project(e[0]),n.project(e[1])),s=i.min,o=i.max,r=(this._wmsVersion>=1.3&&this._crs===xn?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),a=ei.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});ei.WMS=ii,ni.wms=function(t,e){return new ii(t,e)};var si=Ln.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&he(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=ge(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=this._map.project(t,e).subtract(o),a=s.multiplyBy(-n).add(i).add(s).subtract(r);ft?fe(this._container,a,n):_e(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new R(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),oi=si.extend({getEvents:function(){var t=si.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){si.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ke(t,"mousemove",a(this._onMouseMove,32,this),this),ke(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ke(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){S(this._redrawRequest),delete this._ctx,se(this._container),Te(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){si.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ct?2:1;_e(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ct&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){si.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),s=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;s.push(e)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,s,o,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,s=r[n].length;i<s;i++)o=r[n][i],l[i?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==s&&(n.save(),n.scale(1,s)),n.beginPath(),n.arc(e.x,e.y/s,i,0,2*Math.PI,!1),1!==s&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(i)&&!this._map._draggableMoved(e)&&(n=e);n&&(je(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ue(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var n,i,s=this._drawFirst;s;s=s.next)(n=s.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(he(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function ri(t){return Lt?new oi(t):null}var ai=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),li={_initContainer:function(){this._container=ie("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(si.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=ai("shape");he(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=ai("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;se(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,s=t._container;s.stroked=!!i.stroke,s.filled=!!i.fill,i.stroke?(e||(e=t._stroke=ai("stroke")),s.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,e.dashStyle=i.dashArray?g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(s.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=ai("fill")),s.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(s.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){re(t._container)},_bringToBack:function(t){ae(t._container)}},hi=St?ai:W,ui=si.extend({getEvents:function(){var t=si.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=hi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=hi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){se(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){si.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),_e(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=hi("path");t.options.className&&he(e,t.options.className),t.options.interactive&&he(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){se(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,K(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){re(t._path)},_bringToBack:function(t){ae(t._path)}});function ci(t){return kt||St?new ui(t):null}St&&ui.include(li),$e.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ri(t)||ci(t)}});var di=Nn.extend({initialize:function(t,e){Nn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});ui.create=hi,ui.pointsToPath=K,Fn.geometryToLayer=zn,Fn.coordsToLatLng=Vn,Fn.coordsToLatLngs=Bn,Fn.latLngToCoords=jn,Fn.latLngsToCoords=Hn,Fn.getFeature=Un,Fn.asFeature=Zn,$e.mergeOptions({boxZoom:!0});var pi=Je.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){se(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),qt(),ve(),this._startPoint=this._map.mouseEventToContainerPoint(t),ke(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ie("div","leaflet-zoom-box",this._container),he(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new R(this._point,this._startPoint),n=e.getSize();_e(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(se(this._box),ue(this._container,"leaflet-crosshair")),Wt(),be(),Te(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});$e.addInitHook("addHandler","boxZoom",pi),$e.mergeOptions({doubleClickZoom:!0});var mi=Je.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,s=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});$e.addInitHook("addHandler","doubleClickZoom",mi),$e.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var fi=Je.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new rn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}he(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ue(this._map._container,"leaflet-grab"),ue(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=z(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,s=(i-e+n)%t+e-n,o=(i+e+n)%t-e-n,r=Math.abs(s+n)<Math.abs(o+n)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=n.easeLinearity,r=s.multiplyBy(o/((this._lastTime-this._times[0])/1e3)),a=r.distanceTo([0,0]),l=Math.min(n.inertiaMaxSpeed,a),h=r.multiplyBy(l/a),u=l/(n.inertiaDeceleration*o),c=h.multiplyBy(-u/2).round();c.x||c.y?(c=e._limitOffset(c,e.options.maxBounds),k(function(){e.panBy(c,{duration:u,easeLinearity:o,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});$e.addInitHook("addHandler","dragging",fi),$e.mergeOptions({keyboard:!0,keyboardPanDelta:80});var _i=Je.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ke(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Te(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},s=this.keyCodes;for(e=0,n=s.left.length;e<n;e++)i[s.left[e]]=[-1*t,0];for(e=0,n=s.right.length;e<n;e++)i[s.right[e]]=[t,0];for(e=0,n=s.down.length;e<n;e++)i[s.down[e]]=[0,t];for(e=0,n=s.up.length;e<n;e++)i[s.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},s=this.keyCodes;for(e=0,n=s.zoomIn.length;e<n;e++)i[s.zoomIn[e]]=t;for(e=0,n=s.zoomOut.length;e<n;e++)i[s.zoomOut[e]]=-t},_addHooks:function(){ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Te(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=O(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Re(t)}}});$e.addInitHook("addHandler","keyboard",_i),$e.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var gi=Je.extend({addHooks:function(){ke(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Te(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ze(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),i),Re(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,s=n?Math.ceil(i/n)*n:i,o=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))}});$e.addInitHook("addHandler","scrollWheelZoom",gi),$e.mergeOptions({tap:!0,tapTolerance:15});var yi=Je.extend({addHooks:function(){ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Oe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new A(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&he(n,"leaflet-active"),this._holdTimeout=setTimeout(s(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),ke(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Te(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ue(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new A(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});wt&&!bt&&$e.addInitHook("addHandler","tap",yi),$e.mergeOptions({touchZoom:wt&&!nt,bounceAtZoomLimits:!0});var vi=Je.extend({addHooks:function(){he(this._map._container,"leaflet-touch-zoom"),ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ue(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ke(document,"touchmove",this._onTouchMove,this),ke(document,"touchend",this._onTouchEnd,this),Oe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),S(this._animRequest);var a=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=k(a,this,!0),Oe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,S(this._animRequest),Te(document,"touchmove",this._onTouchMove),Te(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});$e.addInitHook("addHandler","touchZoom",vi),$e.BoxZoom=pi,$e.DoubleClickZoom=mi,$e.Drag=fi,$e.Keyboard=_i,$e.ScrollWheelZoom=gi,$e.Tap=yi,$e.TouchZoom=vi,Object.freeze=e,t.version="1.4.0",t.Control=qe,t.control=We,t.Browser=It,t.Evented=M,t.Mixin=en,t.Util=T,t.Class=I,t.Handler=Je,t.extend=n,t.bind=s,t.stamp=r,t.setOptions=p,t.DomEvent=Ze,t.DomUtil=Le,t.PosAnimation=Ge,t.Draggable=rn,t.LineUtil=_n,t.PolyUtil=yn,t.Point=A,t.point=O,t.Bounds=R,t.bounds=N,t.Transformation=Z,t.transformation=G,t.Projection=wn,t.LatLng=V,t.latLng=B,t.LatLngBounds=F,t.latLngBounds=z,t.CRS=j,t.GeoJSON=Fn,t.geoJSON=$n,t.geoJson=qn,t.Layer=Ln,t.LayerGroup=kn,t.layerGroup=function(t,e){return new kn(t,e)},t.FeatureGroup=Sn,t.featureGroup=function(t){return new Sn(t)},t.ImageOverlay=Wn,t.imageOverlay=function(t,e,n){return new Wn(t,e,n)},t.VideoOverlay=Kn,t.videoOverlay=function(t,e,n){return new Kn(t,e,n)},t.DivOverlay=Yn,t.Popup=Qn,t.popup=function(t,e){return new Qn(t,e)},t.Tooltip=Xn,t.tooltip=function(t,e){return new Xn(t,e)},t.Icon=Tn,t.icon=function(t){return new Tn(t)},t.DivIcon=Jn,t.divIcon=function(t){return new Jn(t)},t.Marker=Mn,t.marker=function(t,e){return new Mn(t,e)},t.TileLayer=ei,t.tileLayer=ni,t.GridLayer=ti,t.gridLayer=function(t){return new ti(t)},t.SVG=ui,t.svg=ci,t.Renderer=si,t.Canvas=oi,t.canvas=ri,t.Path=An,t.CircleMarker=Dn,t.circleMarker=function(t,e){return new Dn(t,e)},t.Circle=On,t.circle=function(t,e,n){return new On(t,e,n)},t.Polyline=Rn,t.polyline=function(t,e){return new Rn(t,e)},t.Polygon=Nn,t.polygon=function(t,e){return new Nn(t,e)},t.Rectangle=di,t.rectangle=function(t,e){return new di(t,e)},t.Map=$e,t.map=function(t,e){return new $e(t,e)};var bi=window.L;t.noConflict=function(){return window.L=bi,this},window.L=t}(e)},GPNb:function(t,e){function n(t){var e=new Error('Cannot find module "'+t+'".');throw e.code="MODULE_NOT_FOUND",e}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="GPNb"},INa4:function(t,e){!function(t,e,n){L.drawVersion="0.4.14",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,n=e.getLatLngs(),i=n.splice(-1,1)[0];this._poly.setLatLngs(n),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(i,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._currentLatLng=n,this._updateTooltip(n),this._updateGuide(e),this._mouseMarker.setLatLng(n),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent;this._startPoint.call(this,e.clientX,e.clientY)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent;this._endPoint.call(this,e.clientX,e.clientY,t),this._clickHandled=null},_endPoint:function(e,n,i){if(this._mouseDownOrigin){var s=L.point(e,n).distanceTo(this._mouseDownOrigin),o=this._calculateFinishDistance(i.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(i.latlng),this._finishShape()):o<10&&L.Browser.touch?this._finishShape():Math.abs(s)<9*(t.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,n,i=t.originalEvent;!i.touches||!i.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=i.touches[0].clientX,n=i.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,n),this._endPoint.call(this,e,n,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var n;if(this.type===L.Draw.Polyline.TYPE)n=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;n=this._markers[0]}var i=this._map.latLngToContainerPoint(n.getLatLng()),s=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),o=this._map.latLngToContainerPoint(s.getLatLng());e=i.distanceTo(o)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var n,i,s,o=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),r=this.options.maxGuideLineLength,a=o>r?o-r:this.options.guidelineDistance;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));a<o;a+=this.options.guidelineDistance)n=a/o,i={x:Math.floor(t.x*(1-n)+n*e.x),y:Math.floor(t.y*(1-n)+n*e.y)},(s=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(s,i)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,n=this._guidesContainer.childNodes.length;e<n;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=this.options.showLength?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var n,i,s=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(n=s-(e?2:1),i=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[n].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[n].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=i*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,n=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?n&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(n)*(this.options.factor||1):this._measurementRunningTotal||0:n&&e?this._measurementRunningTotal+this._map.distance(e,n)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout((function(){this._disableMarkers=!1}).bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var n;!this.options.allowIntersection&&this.options.showArea&&(n=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(n)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,showArea:!0,clickable:!0},metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains("leaflet-pane"););return t}(t.target)||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,n,i=L.Draw.SimpleShape.prototype._getTooltipText.call(this),s=this.options.showArea;return this._shape&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),n=s?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:i.text,subtext:n}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,n=t.latlng,i=this.options.showRadius,s=this.options.metric;if(this._tooltip.updatePosition(n),this._isDrawing){this._drawShape(n),e=this._shape.getRadius().toFixed(1);var o="";i&&(o=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,s,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:o})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var n=parseInt(t.style.marginTop,10)-e,i=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=n+"px",t.style.marginLeft=i+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(t){t.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(t){t.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,n){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,n&&n.drawError&&(n.drawError=L.Util.extend({},this.options.drawError,n.drawError)),this._latlngs=e,L.setOptions(this,n)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,n,i,s,o,r=this._defaultShape();for(t=0,n=r.length;t<n;t++)(i=this._createMarker(r[t],t)).on("click",this._onMarkerClick,this),i.on("contextmenu",this._onContextMenu,this),this._markers.push(i);for(t=0,e=n-1;t<n;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(this._createMiddleMarker(s=this._markers[e],o=this._markers[t]),this._updatePrevNext(s,o))},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return n._origLatLng=t,n._index=e,n.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(n),n},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,n=this._poly;if(L.extend(e._origLatLng,e._latlng),e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),n.options.poly){var i=n._map._editTooltip;if(!n.options.poly.allowIntersection&&n.intersects()){var s=n.options.color;n.setStyle({color:this.options.drawError.color}),0!==L.version.indexOf("0.7")&&e.dragging._draggable._onUp(t),this._onMarkerClick(t),i&&i.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){n.setStyle({color:s}),i&&i.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var o=this._poly.getLatLngs();this._poly._convertLatLngs(o,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,n=t.target;this._defaultShape().length<e||(this._removeMarker(n),this._updatePrevNext(n._prev,n._next),n._middleLeft&&this._markerGroup.removeLayer(n._middleLeft),n._middleRight&&this._markerGroup.removeLayer(n._middleRight),n._prev&&n._next?this._createMiddleMarker(n._prev,n._next):n._prev?n._next||(n._prev._middleRight=null):n._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:t.target,layers:this._markerGroup,poly:this._poly}),L},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e),i=t.target;L.extend(i._origLatLng,n),i._middleLeft&&i._middleLeft.setLatLng(this._getMiddleLatLng(i._prev,i)),i._middleRight&&i._middleRight.setLatLng(this._getMiddleLatLng(i,i._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer(function(n){n._index>t&&(n._index+=e)})},_createMiddleMarker:function(t,e){var n,i,s,o=this._getMiddleLatLng(t,e),r=this._createMarker(o);r.setOpacity(.6),t._middleRight=e._middleLeft=r,i=function(){r.off("touchmove",i,this);var s=e._index;r._index=s,r.off("click",n,this).on("click",this._onMarkerClick,this),o.lat=r.getLatLng().lat,o.lng=r.getLatLng().lng,this._spliceLatLngs(s,0,o),this._markers.splice(s,0,r),r.setOpacity(1),this._updateIndexes(s,1),e._index++,this._updatePrevNext(t,r),this._updatePrevNext(r,e),this._poly.fire("editstart")},s=function(){r.off("dragstart",i,this),r.off("dragend",s,this),r.off("touchmove",i,this),this._createMiddleMarker(t,r),this._createMiddleMarker(r,e)},r.on("click",n=function(){i.call(this),s.call(this),this._fireEdit()},this).on("dragstart",i,this).on("dragend",s,this).on("touchmove",i,this),this._markerGroup.addLayer(r)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var n=this._poly._map,i=n.project(t.getLatLng()),s=n.project(e.getLatLng());return n.unproject(i._add(s)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(n),this._markerGroup.addLayer(n),n},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,n=e.getLatLng();e===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),n=t.target,i=n._cornerIndex;n.setOpacity(0),this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,n=t.length;e<n;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),n=t.target._cornerIndex;this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)},_onMarkerDragEnd:function(t){var e,n=t.target;n===this._moveMarker&&(e=this._shape.getBounds().getCenter(),n.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,n=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),i=this._shape.getBounds().getCenter(),s=[],o=0,r=n.length;o<r;o++)s.push([t.lat+(e=[n[o].lat-i.lat,n[o].lng-i.lng])[0],t.lng+e[1]]);this._shape.setLatLngs(s),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),n=this._map.project(t);return this._map.unproject([n.x+e,n.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart),L.DomEvent.off(this._container,"touchend",this._onTouchEnd),L.DomEvent.off(this._container,"touchmove",this._onTouchMove),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDowm",this._onTouchStart),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave))},_touchEvent:function(t,e){var n={};if(void 0!==t.touches){if(!t.touches.length)return;n=t.touches[0]}else{if("touch"!==t.pointerType)return;if(n=t,!this._filterClick(t))return}var i=this._map.mouseEventToContainerPoint(n),s=this._map.mouseEventToLayerPoint(n),o=this._map.layerPointToLatLng(s);this._map.fire(e,{latlng:o,layerPoint:s,containerPoint:i,pageX:n.pageX,pageY:n.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,n=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var s=e.indexOf("Edge/");return s>0&&parseInt(e.substring(s+5,e.indexOf(".",s)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];e.concat(this._detectIE?["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]:["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var n=0;n<e.length;n++)L.DomEvent.on(t,e[n],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var s=e.indexOf("Edge/");return s>0&&parseInt(e.substring(s+5,e.indexOf(".",s)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],n=0,i=t.length;n<i;n++)Array.isArray(t[n])?e.push(L.LatLngUtil.cloneLatLngs(t[n])):e.push(this.cloneLatLng(t[n]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,n,i=t.length,s=0,o=Math.PI/180;if(i>2){for(var r=0;r<i;r++)s+=((n=t[(r+1)%i]).lng-(e=t[r]).lng)*o*(2+Math.sin(e.lat*o)+Math.sin(n.lat*o));s=6378137*s*6378137/2}return Math.abs(s)},formattedNumber:function(t,e){var n=parseFloat(t).toFixed(e),i=L.drawLocal.format&&L.drawLocal.format.numeric,s=i&&i.delimiters,o=s&&s.thousands,r=s&&s.decimal;if(o||r){var a=n.split(".");n=o?a[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+o):a[0],r=r||".",a.length>1&&(n=n+r+a[1])}return n},readableArea:function(e,n,i){var s,o;return i=L.Util.extend({},t,i),n?(o=["ha","m"],type=typeof n,"string"===type?o=[n]:"boolean"!==type&&(o=n),s=e>=1e6&&-1!==o.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,i.km)+" km\xb2":e>=1e4&&-1!==o.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,i.ha)+" ha":L.GeometryUtil.formattedNumber(e,i.m)+" m\xb2"):s=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,i.mi)+" mi\xb2":e>=4840?L.GeometryUtil.formattedNumber(e/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(e,i.yd)+" yd\xb2",s},readableDistance:function(e,n,i,s,o){var r;switch(o=L.Util.extend({},t,o),n?"string"==typeof n?n:"metric":i?"feet":s?"nauticalMile":"yards"){case"metric":r=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,o.km)+" km":L.GeometryUtil.formattedNumber(e,o.m)+" m";break;case"feet":e*=3.28083,r=L.GeometryUtil.formattedNumber(e,o.ft)+" ft";break;case"nauticalMile":e*=.53996,r=L.GeometryUtil.formattedNumber(e/1e3,o.nm)+" nm";break;case"yards":default:r=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,o.mi)+" miles":L.GeometryUtil.formattedNumber(e,o.yd)+" yd"}return r},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,n,i){return this._checkCounterclockwise(t,n,i)!==this._checkCounterclockwise(e,n,i)&&this._checkCounterclockwise(t,e,n)!==this._checkCounterclockwise(t,e,i)},_checkCounterclockwise:function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e=this._getProjectedPoints(),n=e?e.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(this._lineSegmentsIntersectsRange(e[t-1],e[t],t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var n=this._getProjectedPoints(),i=n?n.length:0,s=n?n[i-1]:null,o=i-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(s,t,o,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),n=e?e.length:0;return!e||(n+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,n,i){var s=this._getProjectedPoints();i=i||0;for(var o=n;o>i;o--)if(L.LineUtil.segmentsIntersect(t,e,s[o-1],s[o]))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),n=0;n<e.length;n++)t.push(this._map.latLngToLayerPoint(e[n]));return t}}),L.Polygon.include({intersects:function(){var t,e=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||this._lineSegmentsIntersectsRange(e[(t=e.length)-1],e[0],t-2,1))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,n=L.DomUtil.create("div","leaflet-draw"),i=!1;for(var s in this._toolbars)this._toolbars.hasOwnProperty(s)&&(e=this._toolbars[s].addToolbar(t))&&(i||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),i=!0),n.appendChild(e));return n},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var n in this._toolbars)this._toolbars[n]!==e&&this._toolbars[n].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,n=L.DomUtil.create("div","leaflet-draw-section"),i=0,s=this._toolbarClass||"",o=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<o.length;e++)o[e].enabled&&this._initModeHandler(o[e].handler,this._toolbarContainer,i++,s,o[e].title);if(i)return this._lastButtonIndex=--i,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),n.appendChild(this._toolbarContainer),n.appendChild(this._actionsContainer),n},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,n=this._actionButtons.length;e<n;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,n,i,s){var o=t.type;this._modes[o]={},this._modes[o].handler=t,this._modes[o].button=this._createButton({type:o,title:s,className:i+"-"+o,container:e,callback:this._modes[o].handler.enable,context:this._modes[o].handler}),this._modes[o].buttonIndex=n,this._modes[o].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),n=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(n),t.title&&(e.title=t.title,n.innerHTML=t.title),t.text&&(e.innerHTML=t.text,n.innerHTML=t.text);var i=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,i,t.callback,t.context),e},_disposeButton:function(t,e){var n=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,n,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,n,i,s,o=this._actionsContainer,r=this.getActions(t),a=r.length;for(n=0,i=this._actionButtons.length;n<i;n++)this._disposeButton(this._actionButtons[n].button,this._actionButtons[n].callback);for(this._actionButtons=[];o.firstChild;)o.removeChild(o.firstChild);for(var l=0;l<a;l++)"enabled"in r[l]&&!r[l].enabled||(e=L.DomUtil.create("li","",o),s=this._createButton({title:r[l].title,text:r[l].text,container:e,callback:r[l].callback,context:r[l].context}),this._actionButtons.push({button:s,callback:r[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,n=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=n+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),n=this._container;return this._container&&(this._visible&&(n.style.visibility="inherit"),L.DomUtil.setPosition(n,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer(function(e){e.edited&&(t.addLayer(e),e.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,n,i=t.layer||t.target||t;this._backupLayer(i),this.options.poly&&(n=L.Util.extend({},this.options.poly),i.options.poly=n),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=i.options.color,e.fillColor=i.options.fillColor),i.options.original=L.extend({},i.options),i.options.editing=e),i instanceof L.Marker?(i.editing&&i.editing.enable(),i.dragging.enable(),i.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):i.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.changedTouches[0]),n=this._map.layerPointToLatLng(e);t.target.setLatLng(n)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},Yoyx:function(t,e,n){var i,s;!function(o){if("object"==typeof t&&"object"==typeof t.exports){var r=o(n("GPNb"),e);void 0!==r&&(t.exports=r)}else void 0===(s="function"==typeof(i=o)?i.apply(e,[n,e]):i)||(t.exports=s)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=/-+([a-z0-9])/g;function i(t,e,n){var i=t.indexOf(e);return-1==i?n:[t.slice(0,i).trim(),t.slice(i+1).trim()]}function s(t,e,n){return Array.isArray(t)?e.visitArray(t,n):"object"==typeof t&&null!==t&&Object.getPrototypeOf(t)===l?e.visitStringMap(t,n):null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t?e.visitPrimitive(t,n):e.visitOther(t,n)}e.dashCaseToCamelCase=function(t){return t.replace(n,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})},e.splitAtColon=function(t,e){return i(t,":",e)},e.splitAtPeriod=function(t,e){return i(t,".",e)},e.visitValue=s,e.isDefined=function(t){return null!==t&&void 0!==t},e.noUndefined=function(t){return void 0===t?null:t};var o=function(){function t(){}return t.prototype.visitArray=function(t,e){var n=this;return t.map(function(t){return s(t,n,e)})},t.prototype.visitStringMap=function(t,e){var n=this,i={};return Object.keys(t).forEach(function(o){i[o]=s(t[o],n,e)}),i},t.prototype.visitPrimitive=function(t,e){return t},t.prototype.visitOther=function(t,e){return t},t}();e.ValueTransformer=o,e.SyncAsync={assertSync:function(t){if(h(t))throw new Error("Illegal state: value cannot be a promise");return t},then:function(t,e){return h(t)?t.then(e):e(t)},all:function(t){return t.some(h)?Promise.all(t):t}},e.error=function(t){throw new Error("Internal Error: "+t)},e.syntaxError=function(t,e){var n=Error(t);return n[r]=!0,e&&(n[a]=e),n};var r="ngSyntaxError",a="ngParseErrors";e.isSyntaxError=function(t){return t[r]},e.getParseErrors=function(t){return t[a]||[]},e.escapeRegExp=function(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var l=Object.getPrototypeOf({});function h(t){return!!t&&"function"==typeof t.then}e.utf8Encode=function(t){for(var e="",n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i>=55296&&i<=56319&&t.length>n+1){var s=t.charCodeAt(n+1);s>=56320&&s<=57343&&(n++,i=(i-55296<<10)+s-56320+65536)}i<=127?e+=String.fromCharCode(i):i<=2047?e+=String.fromCharCode(i>>6&31|192,63&i|128):i<=65535?e+=String.fromCharCode(i>>12|224,i>>6&63|128,63&i|128):i<=2097151&&(e+=String.fromCharCode(i>>18&7|240,i>>12&63|128,i>>6&63|128,63&i|128))}return e},e.stringify=function t(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(t).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var n=e.toString();if(null==n)return""+n;var i=n.indexOf("\n");return-1===i?n:n.substring(0,i)},e.resolveForwardRef=function(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")?t():t},e.isPromise=h,e.Version=function(t){this.full=t;var e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}})},crnd:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error('Cannot find module "'+t+'".');throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="crnd"},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);let s=!1;const o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function r(t){setTimeout(()=>{throw t})}const a={closed:!0,next(t){},error(t){if(o.useDeprecatedSynchronousErrorHandling)throw t},complete(){}},l=Array.isArray||(t=>t&&"number"==typeof t.length);function h(t){return null!=t&&"object"==typeof t}const u={e:{}};let c;function d(){try{return c.apply(this,arguments)}catch(t){return u.e=t,u}}function p(t){return c=t,d}class m extends Error{constructor(t){super(t?`${t.length} errors occurred during unsubscription:\n ${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:""),this.errors=t,this.name="UnsubscriptionError",Object.setPrototypeOf(this,m.prototype)}}class f{constructor(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let t,e=!1;if(this.closed)return;let{_parent:n,_parents:s,_unsubscribe:o,_subscriptions:r}=this;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;let a=-1,c=s?s.length:0;for(;n;)n.remove(this),n=++a<c&&s[a]||null;if(i(o)&&p(o).call(this)===u&&(e=!0,t=t||(u.e instanceof m?_(u.e.errors):[u.e])),l(r))for(a=-1,c=r.length;++a<c;){const n=r[a];if(h(n)&&p(n.unsubscribe).call(n)===u){e=!0,t=t||[];let n=u.e;n instanceof m?t=t.concat(_(n.errors)):t.push(n)}}if(e)throw new m(t)}add(t){if(!t||t===f.EMPTY)return f.EMPTY;if(t===this)return this;let e=t;switch(typeof t){case"function":e=new f(t);case"object":if(e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if("function"!=typeof e._addParent){const t=e;(e=new f)._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(e),e._addParent(this),e}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}_addParent(t){let{_parent:e,_parents:n}=this;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t}}function _(t){return t.reduce((t,e)=>t.concat(e instanceof m?e.errors:e),[])}f.EMPTY=function(t){return t.closed=!0,t}(new f);const g="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber";class y extends f{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){if(t instanceof y||"syncErrorThrowable"in t&&t[g]){const e=t[g]();this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)}else this.syncErrorThrowable=!0,this.destination=new v(this,t);break}default:this.syncErrorThrowable=!0,this.destination=new v(this,t,e,n)}}[g](){return this}static create(t,e,n){const i=new y(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parent:t,_parents:e}=this;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this}}class v extends y{constructor(t,e,n,s){let o;super(),this._parentSubscriber=t;let r=this;i(e)?o=e:e&&(o=e.next,n=e.error,s=e.complete,e!==a&&(i((r=Object.create(e)).unsubscribe)&&this.add(r.unsubscribe.bind(r)),r.unsubscribe=this.unsubscribe.bind(this))),this._context=r,this._next=o,this._error=n,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;o.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=o;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):r(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;r(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);o.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),o.useDeprecatedSynchronousErrorHandling)throw t;r(t)}}__tryOrSetError(t,e,n){if(!o.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return o.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(r(e),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const b="function"==typeof Symbol&&Symbol.observable||"@@observable";function w(){}class E{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const e=new E;return e.source=this,e.operator=t,e}subscribe(t,e,n){const{operator:i}=this,s=function(t,e,n){if(t){if(t instanceof y)return t;if(t[g])return t[g]()}return t||e||n?new y(t,e,n):new y(a)}(t,e,n);if(i?i.call(s,this.source):s.add(this.source||!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),o.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(e){o.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),t.error(e)}}forEach(t,e){return new(e=x(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(t){n(t),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[b](){return this}pipe(...t){return 0===t.length?this:function(t){return t?1===t.length?t[0]:function(e){return t.reduce((t,e)=>e(t),e)}:w}(t)(this)}toPromise(t){return new(t=x(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}function x(t){if(t||(t=o.Promise||Promise),!t)throw new Error("no Promise impl found");return t}E.create=(t=>new E(t));class C extends Error{constructor(){super("object unsubscribed"),this.name="ObjectUnsubscribedError",Object.setPrototypeOf(this,C.prototype)}}class L extends f{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class k extends y{constructor(t){super(t),this.destination=t}}class S extends E{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[g](){return new k(this)}lift(t){const e=new T(this,this);return e.operator=t,e}next(t){if(this.closed)throw new C;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].next(t)}}error(t){if(this.closed)throw new C;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].error(t);this.observers.length=0}complete(){if(this.closed)throw new C;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let i=0;i<e;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new C;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new C;return this.hasError?(t.error(this.thrownError),f.EMPTY):this.isStopped?(t.complete(),f.EMPTY):(this.observers.push(t),new L(this,t))}asObservable(){const t=new E;return t.source=this,t}}S.create=((t,e)=>new T(t,e));class T extends S{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):f.EMPTY}}function I(t){return t&&"function"==typeof t.schedule}class P extends y{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const M=t=>e=>{for(let n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()},A=t=>e=>(t.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,r),e),D=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),O=t=>e=>{const n=t[D]();for(;;){const t=n.next();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},R=t=>e=>{const n=t[b]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)},N=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function F(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const z=t=>{if(t instanceof E)return e=>t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e);if(N(t))return M(t);if(F(t))return A(t);if(t&&"function"==typeof t[D])return O(t);if(t&&"function"==typeof t[b])return R(t);{const e=`You provided ${h(t)?"an invalid object":`'${t}'`} where a stream was expected.`+" You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(e)}};function V(t,e,n,i){const s=new P(t,n,i);return z(e)(s)}class B extends y{notifyNext(t,e,n,i,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}function j(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new H(t,e))}}class H{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new U(t,this.project,this.thisArg))}}class U extends y{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}function Z(t,e){return new E(e?n=>{const i=new f;let s=0;return i.add(e.schedule(function(){s!==t.length?(n.next(t[s++]),n.closed||i.add(this.schedule())):n.complete()})),i}:M(t))}function G(t,e){if(!e)return t instanceof E?t:new E(z(t));if(null!=t){if(function(t){return t&&"function"==typeof t[b]}(t))return function(t,e){return new E(e?n=>{const i=new f;return i.add(e.schedule(()=>{const s=t[b]();i.add(s.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i}:R(t))}(t,e);if(F(t))return function(t,e){return new E(e?n=>{const i=new f;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i}:A(t))}(t,e);if(N(t))return Z(t,e);if(function(t){return t&&"function"==typeof t[D]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new E(e?n=>{const i=new f;let s;return i.add(()=>{s&&"function"==typeof s.return&&s.return()}),i.add(e.schedule(()=>{s=t[D](),i.add(e.schedule(function(){if(n.closed)return;let t,e;try{const i=s.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}))})),i}:O(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function $(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe($((n,i)=>G(t(n,i)).pipe(j((t,s)=>e(n,t,i,s))),n)):("number"==typeof e&&(n=e),e=>e.lift(new q(t,n)))}class q{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new W(t,this.project,this.concurrent))}}class W extends B{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)}_innerSub(t,e,n){this.add(V(this,t,e,n))}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()}notifyNext(t,e,n,i,s){this.destination.next(e)}notifyComplete(t){const e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function K(t){return t}function Y(t=Number.POSITIVE_INFINITY){return $(K,t)}function Q(...t){let e=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return I(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof i&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof E?t[0]:Y(e)(Z(t,n))}function X(){return function(t){return t.lift(new J(t))}}class J{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new tt(t,n),s=e.subscribe(i);return i.closed||(i.connection=n.connect()),s}}class tt extends y{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}const et=class extends E{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new f).add(this.source.subscribe(new class extends k{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}(this.getSubject(),this))),t.closed?(this._connection=null,t=f.EMPTY):this._connection=t),t}refCount(){return X()(this)}}.prototype,nt={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:et._subscribe},_isComplete:{value:et._isComplete,writable:!0},getSubject:{value:et.getSubject},connect:{value:et.connect},refCount:{value:et.refCount}};function it(){return new S}function st(){return t=>X()(function(t,e){return function(e){let n;n="function"==typeof t?t:function(){return t};const i=Object.create(e,nt);return i.source=e,i.subjectFactory=n,i}}(it)(t))}function ot(t){return{providedIn:t.providedIn||null,factory:t.factory,value:void 0}}class rt{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==e?ot({providedIn:e.providedIn||"root",factory:e.factory}):void 0}toString(){return`InjectionToken ${this._desc}`}}const at="__parameters__";function lt(t,e,n){const i=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function s(...t){if(this instanceof s)return i.apply(this,t),this;const e=new s(...t);return n.annotation=e,n;function n(t,n,i){const s=t.hasOwnProperty(at)?t[at]:Object.defineProperty(t,at,{value:[]})[at];for(;s.length<=i;)s.push(null);return(s[i]=s[i]||[]).push(e),t}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s}const ht=Function;function ut(t){return"function"==typeof t}const ct="undefined"!=typeof window&&window,dt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,pt="undefined"!=typeof global&&global,mt=ct||pt||dt,ft=Promise.resolve(0);let _t=null;function gt(){if(!_t){const t=mt.Symbol;if(t&&t.iterator)_t=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(_t=n)}}}return _t}function yt(t){"undefined"==typeof Zone?ft.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}function vt(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}function bt(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(bt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}const wt=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,Et=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{/,xt=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{[\s\S]*constructor\s*\(/;function Ct(t){return t?t.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function Lt(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}function kt(t){return t.__forward_ref__=kt,t.toString=function(){return bt(this())},t}function St(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")&&t.__forward_ref__===kt?t():t}const Tt=lt("Inject",t=>({token:t})),It=lt("Optional"),Pt=lt("Self"),Mt=lt("SkipSelf"),At="__source",Dt=new Object,Ot=Dt,Rt=new rt("INJECTOR");class Nt{static create(t,e){return Array.isArray(t)?new Wt(t,e):new Wt(t.providers,t.parent,t.name||null)}}Nt.THROW_IF_NOT_FOUND=Dt,Nt.NULL=new class{get(t,e=Dt){if(e===Dt)throw new Error(`NullInjectorError: No provider for ${bt(t)}!`);return e}},Nt.ngInjectableDef=ot({providedIn:"any",factory:()=>te(Rt)});const Ft=function(t){return t},zt=[],Vt=Ft,Bt=function(){return Array.prototype.slice.call(arguments)},jt={},Ht=function(t){for(let e in t)if(t[e]===jt)return e;throw Error("!prop")}({provide:String,useValue:jt}),Ut="ngTokenPath",Zt="ngTempTokenPath",Gt=Nt.NULL,$t=/\n/gm,qt="\u0275";class Wt{constructor(t,e=Gt,n=null){this.parent=e,this.source=n;const i=this._records=new Map;i.set(Nt,{token:Nt,fn:Ft,deps:zt,value:this,useNew:!1}),i.set(Rt,{token:Rt,fn:Ft,deps:zt,value:this,useNew:!1}),function t(e,n){if(n)if((n=St(n))instanceof Array)for(let i=0;i<n.length;i++)t(e,n[i]);else{if("function"==typeof n)throw Qt("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw Qt("Unexpected provider",n);{let t=St(n.provide);const i=function(t){const e=function(t){let e=zt;const n=t.deps;if(n&&n.length){e=[];for(let t=0;t<n.length;t++){let i=6,s=St(n[t]);if(s instanceof Array)for(let t=0,e=s;t<e.length;t++){const n=e[t];n instanceof It||n==It?i|=1:n instanceof Mt||n==Mt?i&=-3:n instanceof Pt||n==Pt?i&=-5:s=n instanceof Tt?n.token:St(n)}e.push({token:s,options:i})}}else if(t.useExisting)e=[{token:St(t.useExisting),options:6}];else if(!(n||Ht in t))throw Qt("'deps' required",t);return e}(t);let n=Ft,i=zt,s=!1,o=St(t.provide);if(Ht in t)i=t.useValue;else if(t.useFactory)n=t.useFactory;else if(t.useExisting);else if(t.useClass)s=!0,n=St(t.useClass);else{if("function"!=typeof o)throw Qt("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",t);s=!0,n=o}return{deps:e,fn:n,useNew:s,value:i}}(n);if(!0===n.multi){let i=e.get(t);if(i){if(i.fn!==Bt)throw Kt(t)}else e.set(t,i={token:n.provide,deps:[],useNew:!1,fn:Bt,value:zt});i.deps.push({token:t=n,options:6})}const s=e.get(t);if(s&&s.fn==Bt)throw Kt(t);e.set(t,i)}}}(i,t)}get(t,e,n=0){const i=this._records.get(t);try{return function t(e,n,i,s,o,r){try{return function(e,n,i,s,o,r){let a;if(!n||4&r)2&r||(a=s.get(e,o,0));else{if((a=n.value)==Vt)throw Error(qt+"Circular dependency");if(a===zt){n.value=Vt;let e=void 0,o=n.useNew,r=n.fn,l=n.deps,h=zt;if(l.length){h=[];for(let e=0;e<l.length;e++){const n=l[e],o=n.options,r=2&o?i.get(n.token):void 0;h.push(t(n.token,r,i,r||4&o?s:Gt,1&o?null:Nt.THROW_IF_NOT_FOUND,0))}}n.value=a=o?new r(...h):r.apply(e,h)}}return a}(e,n,i,s,o,r)}catch(t){throw t instanceof Error||(t=new Error(t)),(t[Zt]=t[Zt]||[]).unshift(e),n&&n.value==Vt&&(n.value=zt),t}}(t,i,this._records,this.parent,e,n)}catch(e){const n=e[Zt];throw t[At]&&n.unshift(t[At]),e.message=Yt("\n"+e.message,n,this.source),e[Ut]=n,e[Zt]=null,e}}toString(){const t=[];return this._records.forEach((e,n)=>t.push(bt(n))),`StaticInjector[${t.join(", ")}]`}}function Kt(t){return Qt("Cannot mix multi providers and regular providers",t)}function Yt(t,e,n=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==qt?t.substr(2):t;let i=bt(e);if(e instanceof Array)i=e.map(bt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t.push(n+":"+("string"==typeof i?JSON.stringify(i):bt(i)))}i=`{${t.join(", ")}}`}return`StaticInjectorError${n?"("+n+")":""}[${i}]: ${t.replace($t,"\n ")}`}function Qt(t,e){return new Error(Yt(t,e))}let Xt=void 0;function Jt(t){const e=Xt;return Xt=t,e}function te(t,e=0){if(void 0===Xt)throw new Error("inject() must be called from an injection context");if(null===Xt){const e=t.ngInjectableDef;if(e&&"root"==e.providedIn)return void 0===e.value?e.value=e.factory():e.value;throw new Error(`Injector: NOT_FOUND [${bt(t)}]`)}return Xt.get(t,8&e?null:void 0,e)}String;const ee=function(){var t={Emulated:0,Native:1,None:2};return t[t.Emulated]="Emulated",t[t.Native]="Native",t[t.None]="None",t}(),ne=new class{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}("6.0.3"),ie="ngDebugContext",se="ngOriginalError",oe="ngErrorLogger";function re(t){return t[ie]}function ae(t){return t[se]}function le(t,...e){t.error(...e)}class he{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t[oe]||le}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?re(t)?re(t):this._findContext(ae(t)):null}_findOriginalError(t){let e=ae(t);for(;e&&ae(e);)e=ae(e);return e}}function ue(t){return t.length>1?" ("+function(t){const e=[];for(let n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(t=>bt(t.token)).join(" -> ")+")":""}function ce(t,e,n,i){const s=[e],o=n(s),r=i?function(t,e){const n=`${o} caused by: ${e instanceof Error?e.message:e}`,i=Error(n);return i[se]=e,i}(0,i):Error(o);return r.addKey=de,r.keys=s,r.injectors=[t],r.constructResolvingMessage=n,r[se]=i,r}function de(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function pe(t,e){const n=[];for(let i=0,s=e.length;i<s;i++){const t=e[i];n.push(t&&0!=t.length?t.map(bt).join(" "):"?")}return Error("Cannot resolve all parameters for '"+bt(t)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+bt(t)+"' is decorated with Injectable.")}function me(t,e){return Error(`Cannot mix multi providers and regular providers, got: ${t} ${e}`)}class fe{constructor(t,e){if(this.token=t,this.id=e,!t)throw new Error("Token must be defined!");this.displayName=bt(this.token)}static get(t){return _e.get(St(t))}static get numberOfKeys(){return _e.numberOfKeys}}const _e=new class{constructor(){this._allKeys=new Map}get(t){if(t instanceof fe)return t;if(this._allKeys.has(t))return this._allKeys.get(t);const e=new fe(t,fe.numberOfKeys);return this._allKeys.set(t,e),e}get numberOfKeys(){return this._allKeys.size}},ge=new class{constructor(t){this.reflectionCapabilities=t}updateCapabilities(t){this.reflectionCapabilities=t}factory(t){return this.reflectionCapabilities.factory(t)}parameters(t){return this.reflectionCapabilities.parameters(t)}annotations(t){return this.reflectionCapabilities.annotations(t)}propMetadata(t){return this.reflectionCapabilities.propMetadata(t)}hasLifecycleHook(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)}getter(t){return this.reflectionCapabilities.getter(t)}setter(t){return this.reflectionCapabilities.setter(t)}method(t){return this.reflectionCapabilities.method(t)}importUri(t){return this.reflectionCapabilities.importUri(t)}resourceUri(t){return this.reflectionCapabilities.resourceUri(t)}resolveIdentifier(t,e,n,i){return this.reflectionCapabilities.resolveIdentifier(t,e,n,i)}resolveEnum(t,e){return this.reflectionCapabilities.resolveEnum(t,e)}}(new class{constructor(t){this._reflect=t||mt.Reflect}isReflectionEnabled(){return!0}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let n;n=void 0===t?new Array(e.length):new Array(t.length);for(let i=0;i<n.length;i++)n[i]=void 0===t?[]:t[i]!=Object?[t[i]]:[],e&&null!=e[i]&&(n[i]=n[i].concat(e[i]));return n}_ownParameters(t,e){const n=t.toString();if(wt.exec(n)||Et.exec(n)&&!xt.exec(n))return null;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;const i=t.ctorParameters;if(i&&i!==e.ctorParameters){const t="function"==typeof i?i():i,e=t.map(t=>t&&t.type),n=t.map(t=>t&&Ct(t.decorators));return this._zipTypesAndAnnotations(e,n)}const s=t.hasOwnProperty(at)&&t[at],o=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return o||s?this._zipTypesAndAnnotations(o,s):new Array(t.length).fill(void 0)}parameters(t){if(!ut(t))return[];const e=Lt(t);let n=this._ownParameters(t,e);return n||e===Object||(n=this.parameters(e)),n||[]}_ownAnnotations(t,e){if(t.annotations&&t.annotations!==e.annotations){let e=t.annotations;return"function"==typeof e&&e.annotations&&(e=e.annotations),e}return t.decorators&&t.decorators!==e.decorators?Ct(t.decorators):t.hasOwnProperty("__annotations__")?t.__annotations__:null}annotations(t){if(!ut(t))return[];const e=Lt(t),n=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(n)}_ownPropMetadata(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){let e=t.propMetadata;return"function"==typeof e&&e.propMetadata&&(e=e.propMetadata),e}if(t.propDecorators&&t.propDecorators!==e.propDecorators){const e=t.propDecorators,n={};return Object.keys(e).forEach(t=>{n[t]=Ct(e[t])}),n}return t.hasOwnProperty("__prop__metadata__")?t.__prop__metadata__:null}propMetadata(t){if(!ut(t))return{};const e=Lt(t),n={};if(e!==Object){const t=this.propMetadata(e);Object.keys(t).forEach(e=>{n[e]=t[e]})}const i=this._ownPropMetadata(t,e);return i&&Object.keys(i).forEach(t=>{const e=[];n.hasOwnProperty(t)&&e.push(...n[t]),e.push(...i[t]),n[t]=e}),n}hasLifecycleHook(t,e){return t instanceof ht&&e in t.prototype}guards(t){return{}}getter(t){return new Function("o","return o."+t+";")}setter(t){return new Function("o","v","return o."+t+" = v;")}method(t){const e=`if (!o.${t}) throw new Error('"${t}" is undefined');\n return o.${t}.apply(o, args);`;return new Function("o","args",e)}importUri(t){return"object"==typeof t&&t.filePath?t.filePath:`./${bt(t)}`}resourceUri(t){return`./${bt(t)}`}resolveIdentifier(t,e,n,i){return i}resolveEnum(t,e){return t[e]}});class ye{constructor(t,e,n){this.key=t,this.optional=e,this.visibility=n}static fromKey(t){return new ye(t,!1,null)}}const ve=[];class be{constructor(t,e,n){this.key=t,this.resolvedFactories=e,this.multiProvider=n,this.resolvedFactory=this.resolvedFactories[0]}}class we{constructor(t,e){this.factory=t,this.dependencies=e}}function Ee(t){return new be(fe.get(t.provide),[function(t){let e,n;if(t.useClass){const i=St(t.useClass);e=ge.factory(i),n=xe(i)}else t.useExisting?(e=(t=>t),n=[ye.fromKey(fe.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function(t,e){if(e){const n=e.map(t=>[t]);return e.map(e=>Ce(t,e,n))}return xe(t)}(t.useFactory,t.deps)):(e=(()=>t.useValue),n=ve);return new we(e,n)}(t)],t.multi||!1)}function xe(t){const e=ge.parameters(t);if(!e)return[];if(e.some(t=>null==t))throw pe(t,e);return e.map(n=>Ce(t,n,e))}function Ce(t,e,n){let i=null,s=!1;if(!Array.isArray(e))return Le(e instanceof Tt?e.token:e,s,null);let o=null;for(let r=0;r<e.length;++r){const t=e[r];t instanceof ht?i=t:t instanceof Tt?i=t.token:t instanceof It?s=!0:t instanceof Pt||t instanceof Mt?o=t:t instanceof rt&&(i=t)}if(null!=(i=St(i)))return Le(i,s,o);throw pe(t,n)}function Le(t,e,n){return new ye(fe.get(t),e,n)}const ke=new Object;class Se{static resolve(t){return function(t){const e=function(t,e){for(let n=0;n<t.length;n++){const i=t[n],s=e.get(i.key.id);if(s){if(i.multiProvider!==s.multiProvider)throw me(s,i);if(i.multiProvider)for(let t=0;t<i.resolvedFactories.length;t++)s.resolvedFactories.push(i.resolvedFactories[t]);else e.set(i.key.id,i)}else{let t;t=i.multiProvider?new be(i.key,i.resolvedFactories.slice(),i.multiProvider):i,e.set(i.key.id,t)}}return e}(function t(e,n){return e.forEach(e=>{if(e instanceof ht)n.push({provide:e,useClass:e});else if(e&&"object"==typeof e&&void 0!==e.provide)n.push(e);else{if(!(e instanceof Array))throw Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${e}`);t(e,n)}}),n}(t,[]).map(Ee),new Map);return Array.from(e.values())}(t)}static resolveAndCreate(t,e){const n=Se.resolve(t);return Se.fromResolvedProviders(n,e)}static fromResolvedProviders(t,e){return new Te(t,e)}}class Te{constructor(t,e){this._constructionCounter=0,this._providers=t,this.parent=e||null;const n=t.length;this.keyIds=new Array(n),this.objs=new Array(n);for(let i=0;i<n;i++)this.keyIds[i]=t[i].key.id,this.objs[i]=ke}get(t,e=Ot){return this._getByKey(fe.get(t),null,e)}resolveAndCreateChild(t){const e=Se.resolve(t);return this.createChildFromResolved(e)}createChildFromResolved(t){const e=new Te(t);return e.parent=this,e}resolveAndInstantiate(t){return this.instantiateResolved(Se.resolve([t])[0])}instantiateResolved(t){return this._instantiateProvider(t)}getProviderAtIndex(t){if(t<0||t>=this._providers.length)throw function(t){return Error(`Index ${t} is out-of-bounds.`)}(t);return this._providers[t]}_new(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function(e,n){return ce(e,t.key,function(t){return`Cannot instantiate cyclic dependency!${ue(t)}`})}(this);return this._instantiateProvider(t)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(t){if(t.multiProvider){const e=new Array(t.resolvedFactories.length);for(let n=0;n<t.resolvedFactories.length;++n)e[n]=this._instantiate(t,t.resolvedFactories[n]);return e}return this._instantiate(t,t.resolvedFactories[0])}_instantiate(t,e){const n=e.factory;let i,s;try{i=e.dependencies.map(t=>this._getByReflectiveDependency(t))}catch(e){throw e.addKey&&e.addKey(this,t.key),e}try{s=n(...i)}catch(e){throw function(e,n,i,s){return ce(e,t.key,function(t){const e=bt(t[0].token);return`${n.message}: Error during instantiation of ${e}!${ue(t)}.`},n)}(this,e)}return s}_getByReflectiveDependency(t){return this._getByKey(t.key,t.visibility,t.optional?null:Ot)}_getByKey(t,e,n){return t===Te.INJECTOR_KEY?this:e instanceof Pt?this._getByKeySelf(t,n):this._getByKeyDefault(t,n,e)}_getObjByKeyId(t){for(let e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===ke&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return ke}_throwOrNull(t,e){if(e!==Ot)return e;throw function(t,e){return ce(t,e,function(t){return`No provider for ${bt(t[0].token)}!${ue(t)}`})}(this,t)}_getByKeySelf(t,e){const n=this._getObjByKeyId(t.id);return n!==ke?n:this._throwOrNull(t,e)}_getByKeyDefault(t,e,n){let i;for(i=n instanceof Mt?this.parent:this;i instanceof Te;){const e=i,n=e._getObjByKeyId(t.id);if(n!==ke)return n;i=e.parent}return null!==i?i.get(t.token,e):this._throwOrNull(t,e)}get displayName(){return`ReflectiveInjector(providers: [${function(t,e){const n=new Array(t._providers.length);for(let i=0;i<t._providers.length;++i)n[i]=e(t.getProviderAtIndex(i));return n}(this,t=>' "'+t.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}Te.INJECTOR_KEY=fe.get(Nt);const Ie=new rt("The presence of this token marks an injector as being the root injector.");function Pe(t){return!!t&&"function"==typeof t.then}function Me(t){return!!t&&"function"==typeof t.subscribe}const Ae=new rt("Application Initializer");class De{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();Pe(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}const Oe=new rt("AppId");function Re(){return`${Ne()}${Ne()}${Ne()}`}function Ne(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Fe=new rt("Platform Initializer"),ze=new rt("Platform ID"),Ve=new rt("appBootstrapListener");class Be{log(t){console.log(t)}warn(t){console.warn(t)}}function je(){throw new Error("Runtime compiler is not loaded")}Be.ctorParameters=(()=>[]);class He{compileModuleSync(t){throw je()}compileModuleAsync(t){throw je()}compileModuleAndAllComponentsSync(t){throw je()}compileModuleAndAllComponentsAsync(t){throw je()}clearCache(){}clearCacheFor(t){}}class Ue{}class Ze{}class Ge{}function $e(t){const e=Error(`No component factory found for ${bt(t)}. Did you add it to @NgModule.entryComponents?`);return e[qe]=t,e}const qe="ngComponent";class We{}We.NULL=new class{resolveComponentFactory(t){throw $e(t)}};class Ke{constructor(t,e,n){this._parent=e,this._ngModule=n,this._factories=new Map;for(let i=0;i<t.length;i++){const e=t[i];this._factories.set(e.componentType,e)}}resolveComponentFactory(t){let e=this._factories.get(t);if(!e&&this._parent&&(e=this._parent.resolveComponentFactory(t)),!e)throw $e(t);return new Ye(e,this._ngModule)}}class Ye extends Ge{constructor(t,e){super(),this.factory=t,this.ngModule=e,this.selector=t.selector,this.componentType=t.componentType,this.ngContentSelectors=t.ngContentSelectors,this.inputs=t.inputs,this.outputs=t.outputs}create(t,e,n,i){return this.factory.create(t,e,n,i||this.ngModule)}}class Qe{}class Xe{}let Je,tn;const en=function(){const t=mt.wtf;return!(!t||!(Je=t.trace)||(tn=Je.events,0))}(),nn=en?function(t,e=null){return tn.createScope(t,e)}:(t,e)=>(function(t,e){return null}),sn=en?function(t,e){return Je.leaveScope(t,e),e}:(t,e)=>e;class on extends S{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let i,s=t=>null,o=()=>null;t&&"object"==typeof t?(i=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(o=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const r=super.subscribe(i,s,o);return t instanceof f&&t.add(r),r}}class rn{constructor({enableLongStackTrace:t=!1}){if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new on(!1),this.onMicrotaskEmpty=new on(!1),this.onStable=new on(!1),this.onError=new on(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),function(t){t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,i,s,o,r)=>{try{return un(t),e.invokeTask(i,s,o,r)}finally{cn(t)}},onInvoke:(e,n,i,s,o,r,a)=>{try{return un(t),e.invoke(i,s,o,r,a)}finally{cn(t)}},onHasTask:(e,n,i,s)=>{e.hasTask(i,s),n===i&&("microTask"==s.change?(t.hasPendingMicrotasks=s.microTask,hn(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,i,s)=>(e.handleError(i,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!rn.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(rn.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,ln,an,an);try{return s.runTask(o,e,n)}finally{s.cancelTask(o)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function an(){}const ln={};function hn(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function un(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function cn(t){t._nesting--,hn(t)}class dn{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new on,this.onMicrotaskEmpty=new on,this.onStable=new on,this.onError=new on}run(t){return t()}runGuarded(t){return t()}runOutsideAngular(t){return t()}runTask(t){return t()}}class pn{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{rn.assertNotInAngularZone(),yt(()=>{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())yt(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,isPeriodic:t.data.isPeriodic,delay:t.data.delay,creationLocation:t.creationLocation,xhr:t.data.target})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,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(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}class mn{constructor(){this._applications=new Map,_n.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return _n.findTestabilityInTree(this,t,e)}}mn.ctorParameters=(()=>[]);let fn,_n=new class{addToWindow(t){}findTestabilityInTree(t,e,n){return null}},gn=!0,yn=!1;const vn=new rt("AllowMultipleToken");function bn(){return yn=!0,gn}class wn{constructor(t,e){this.name=t,this.token=e}}function En(t,e,n=[]){const i=`Platform: ${e}`,s=new rt(i);return(e=[])=>{let o=xn();if(!o||o.injector.get(vn,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0});!function(t){if(fn&&!fn.destroyed&&!fn.injector.get(vn,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");fn=t.get(Cn);const e=t.get(Fe,null);e&&e.forEach(t=>t())}(Nt.create({providers:t,name:i}))}return function(t){const e=xn();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(s)}}function xn(){return fn&&!fn.destroyed?fn:null}class Cn{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t){return"noop"===t?new dn:("zone.js"===t?void 0:t)||new rn({enableLongStackTrace:bn()})}(e?e.ngZone:void 0),i=[{provide:rn,useValue:n}];return n.run(()=>{const e=Nt.create({providers:i,parent:this.injector,name:t.moduleType.name}),s=t.create(e),o=s.injector.get(he,null);if(!o)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return s.onDestroy(()=>Sn(this._modules,s)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{o.handleError(t)}})),function(t,e,n){try{const i=n();return Pe(i)?i.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):i}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}(o,n,()=>{const t=s.injector.get(De);return t.runInitializers(),t.donePromise.then(()=>(this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=this.injector.get(Ue),i=Ln({},e);return n.createCompiler([i]).compileModuleAsync(t).then(t=>this.bootstrapModuleFactory(t,i))}_moduleDoBootstrap(t){const e=t.injector.get(kn);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${bt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. `+"Please define one of these.");t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}function Ln(t,e){return Array.isArray(e)?e.reduce(Ln,t):Object.assign({},t,e)}class kn{constructor(t,e,n,i,s,o){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=s,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=bn(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const r=new E(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new E(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{rn.assertNotInAngularZone(),yt(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{rn.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=Q(r,a.pipe(st()))}bootstrap(t,e){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=t instanceof Ge?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=n instanceof Ye?null:this._injector.get(Qe),s=n.create(Nt.NULL,[],e||n.selector,i);s.onDestroy(()=>{this._unloadComponent(s)});const o=s.injector.get(pn,null);return o&&s.injector.get(mn).registerApplication(s.location.nativeElement,o),this._loadComponent(s),bn()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");const t=kn._tickScope();try{this._runningTick=!0,this._views.forEach(t=>t.detectChanges()),this._enforceNoNewChanges&&this._views.forEach(t=>t.checkNoChanges())}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1,sn(t)}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Sn(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Ve,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),Sn(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}function Sn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}kn._tickScope=nn("ApplicationRef#tick()");class Tn{}const In=function(){var t={Important:1,DashCase:2};return t[t.Important]="Important",t[t.DashCase]="DashCase",t}();class Pn{}class Mn{constructor(t){this.nativeElement=t}}class An{constructor(){this.dirty=!0,this._results=[],this.changes=new on,this.length=0}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}[gt()](){return this._results[gt()]()}toString(){return this._results.toString()}reset(t){this._results=function t(e){return e.reduce((e,n)=>{const i=Array.isArray(n)?t(n):n;return e.concat(i)},[])}(t),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 Dn{}class On{}class Rn{}class Nn{constructor(t,e){this.name=t,this.callback=e}}class Fn{constructor(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof zn?e.addChild(this):this.parent=null,this.listeners=[]}get injector(){return this._debugContext.injector}get componentInstance(){return this._debugContext.component}get context(){return this._debugContext.context}get references(){return this._debugContext.references}get providerTokens(){return this._debugContext.providerTokens}}class zn extends Fn{constructor(t,e,n){super(t,e,n),this.properties={},this.attributes={},this.classes={},this.styles={},this.childNodes=[],this.nativeElement=t}addChild(t){t&&(this.childNodes.push(t),t.parent=this)}removeChild(t){const e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))}insertChildrenAfter(t,e){const n=this.childNodes.indexOf(t);-1!==n&&(this.childNodes.splice(n+1,0,...e),e.forEach(t=>{t.parent&&t.parent.removeChild(t),t.parent=this}))}insertBefore(t,e){const n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))}query(t){return this.queryAll(t)[0]||null}queryAll(t){const e=[];return function t(e,n,i){e.childNodes.forEach(e=>{e instanceof zn&&(n(e)&&i.push(e),t(e,n,i))})}(this,t,e),e}queryAllNodes(t){const e=[];return function t(e,n,i){e instanceof zn&&e.childNodes.forEach(e=>{n(e)&&i.push(e),e instanceof zn&&t(e,n,i)})}(this,t,e),e}get children(){return this.childNodes.filter(t=>t instanceof zn)}triggerEventHandler(t,e){this.listeners.forEach(n=>{n.name==t&&n.callback(e)})}}const Vn=new Map;function Bn(t){return Vn.get(t)||null}function jn(t){Vn.set(t.nativeNode,t)}function Hn(t,e){const n=Gn(t),i=Gn(e);return n&&i?function(t,e,n){const i=t[gt()](),s=e[gt()]();for(;;){const t=i.next(),e=s.next();if(t.done&&e.done)return!0;if(t.done||e.done)return!1;if(!n(t.value,e.value))return!1}}(t,e,Hn):!(n||!t||"object"!=typeof t&&"function"!=typeof t||i||!e||"object"!=typeof e&&"function"!=typeof e)||vt(t,e)}class Un{constructor(t){this.wrapped=t}static wrap(t){return new Un(t)}static unwrap(t){return Un.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof Un}}class Zn{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Gn(t){return!!$n(t)&&(Array.isArray(t)||!(t instanceof Map)&&gt()in t)}function $n(t){return null!==t&&("function"==typeof t||"object"==typeof t)}class qn{constructor(){}supports(t){return Gn(t)}create(t){return new Kn(t)}}const Wn=(t,e)=>e;class Kn{constructor(t){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=t||Wn}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,s=null;for(;e||n;){const o=!n||e&&e.currentIndex<Jn(n,i,s)?e:n,r=Jn(o,i,s),a=o.currentIndex;if(o===n)i--,n=n._nextRemoved;else if(e=e._next,null==o.previousIndex)i++;else{s||(s=[]);const t=r-i,e=a-i;if(t!=e){for(let n=0;n<t;n++){const i=n<s.length?s[n]:s[n]=0,o=i+n;e<=o&&o<t&&(s[n]=i+1)}s[o.previousIndex]=e-t}}r!==a&&t(o,r,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Gn(t))throw new Error(`Error trying to diff '${bt(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,i,s=this._itHead,o=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)i=this._trackByFn(e,n=t[e]),null!==s&&vt(s.trackById,i)?(o&&(s=this._verifyReinsertion(s,n,i,e)),vt(s.item,n)||this._addIdentityChange(s,n)):(s=this._mismatch(s,n,i,e),o=!0),s=s._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[gt()]();let i;for(;!(i=n.next()).done;)e(i.value)}}(t,t=>{i=this._trackByFn(e,t),null!==s&&vt(s.trackById,i)?(o&&(s=this._verifyReinsertion(s,t,i,e)),vt(s.item,t)||this._addIdentityChange(s,t)):(s=this._mismatch(s,t,i,e),o=!0),s=s._next,e++}),this.length=e;return this._truncate(s),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(vt(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(vt(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,i)):t=this._addAfter(new Yn(e,n),s,i),t}_verifyReinsertion(t,e,n,i){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?t=this._reinsertAfter(s,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,s=t._nextRemoved;return null===i?this._removalsHead=s:i._nextRemoved=s,null===s?this._removalsTail=i:s._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Xn),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e?t:(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t,t)}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Xn),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Yn{constructor(t,e){this.item=t,this.trackById=e,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 Qn{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&vt(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class Xn{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Qn,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Jn(t,e,n){const i=t.previousIndex;if(null===i)return i;let s=0;return n&&i<n.length&&(s=n[i]),i+e+s}class ti{constructor(t){this.factories=t}static create(t,e){if(null!=e){const n=e.factories.slice();t=t.concat(n)}return new ti(t)}static extend(t){return{provide:ti,useFactory:e=>{if(!e)throw new Error("Cannot extend IterableDiffers without a parent injector");return ti.create(t,e)},deps:[[ti,new Mt,new It]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${t.name||typeof t}'`)}}ti.ngInjectableDef=ot({providedIn:"root",factory:()=>new ti([new qn])});class ei{constructor(t){this.factories=t}static create(t,e){if(e){const n=e.factories.slice();t=t.concat(n)}return new ei(t)}static extend(t){return{provide:ei,useFactory:e=>{if(!e)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return ei.create(t,e)},deps:[[ei,new Mt,new It]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}const ni=[new class{constructor(){}supports(t){return t instanceof Map||$n(t)}create(){return new class{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(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||$n(t)))throw new Error(`Error trying to diff '${bt(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,s=n._next;return i&&(i._next=s),s&&(s._prev=i),n._next=null,n._prev=null,n}const n=new class{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){vt(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}}}],ii=new ti([new qn]),si=new ei(ni),oi=En(null,"core",[{provide:ze,useValue:"unknown"},{provide:Cn,deps:[Nt]},{provide:mn,deps:[]},{provide:Be,deps:[]}]),ri=new rt("LocaleId");function ai(){return ii}function li(){return si}function hi(t){return t||"en-US"}class ui{constructor(t){}}class ci{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),this.inertBodyElement=this.inertDocument.body,null==this.inertBodyElement){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t),this.inertBodyElement=this.inertDocument.createElement("body"),t.appendChild(this.inertBodyElement)}this.inertBodyElement.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}getInertBodyElement_XHR(t){t="<body><remove></remove>"+t+"</body>";try{t=encodeURI(t)}catch(t){return null}const e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(null);const n=e.response.body;return n.removeChild(n.firstChild),n}getInertBodyElement_DOMParser(t){t="<body><remove></remove>"+t+"</body>";try{const e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(t){return null}}getInertBodyElement_InertDocument(t){const e=this.inertDocument.createElement("template");return"content"in e?(e.innerHTML=t,e):(this.inertBodyElement.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)}stripCustomNsAttrs(t){const e=t.attributes;for(let i=e.length-1;0<i;i--){const n=e.item(i).name;"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||t.removeAttribute(n)}let n=t.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const di=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,pi=/^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 mi(t){return(t=String(t)).match(di)||t.match(pi)?t:(bn()&&console.warn(`WARNING: sanitizing unsafe URL value ${t} (see http://g.co/ng/security#xss)`),"unsafe:"+t)}function fi(t){return(t=String(t)).split(",").map(t=>mi(t.trim())).join(", ")}function _i(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function gi(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const yi=_i("area,br,col,hr,img,wbr"),vi=_i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),bi=_i("rp,rt"),wi=gi(bi,vi),Ei=gi(yi,gi(vi,_i("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")),gi(bi,_i("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")),wi),xi=_i("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Ci=_i("srcset"),Li=gi(xi,Ci,_i("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"));class ki{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!Ei.hasOwnProperty(e))return void(this.sanitizedSomething=!0);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let i=0;i<n.length;i++){const t=n.item(i),e=t.name,s=e.toLowerCase();if(!Li.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let o=t.value;xi[s]&&(o=mi(o)),Ci[s]&&(o=fi(o)),this.buf.push(" ",e,'="',Ii(o),'"')}this.buf.push(">")}endElement(t){const e=t.nodeName.toLowerCase();Ei.hasOwnProperty(e)&&!yi.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(Ii(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const Si=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ti=/([^\#-~ |!])/g;function Ii(t){return t.replace(/&/g,"&amp;").replace(Si,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Ti,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Pi;function Mi(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}const Ai=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Di=/^url\(([^)]+)\)$/,Oi=function(){var t={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return t[t.NONE]="NONE",t[t.HTML]="HTML",t[t.STYLE]="STYLE",t[t.SCRIPT]="SCRIPT",t[t.URL]="URL",t[t.RESOURCE_URL]="RESOURCE_URL",t}();class Ri{}function Ni(t,e,n){const i=t.state,s=1792&i;return s===e?(t.state=-1793&i|n,t.initIndex=-1,!0):s===n}function Fi(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function zi(t,e){return t.nodes[e]}function Vi(t,e){return t.nodes[e]}function Bi(t,e){return t.nodes[e]}function ji(t,e){return t.nodes[e]}function Hi(t,e){return t.nodes[e]}const Ui={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function Zi(t,e,n,i){let s=`ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${e}'. Current value: '${n}'.`;return i&&(s+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(t,e){const n=new Error(t);return Gi(n,e),n}(s,t)}function Gi(t,e){t[ie]=e,t[oe]=e.logError.bind(e)}function $i(t){return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${t}`)}const qi=()=>{},Wi=new Map;function Ki(t){let e=Wi.get(t);return e||(e=bt(t)+"_"+Wi.size,Wi.set(t,e)),e}function Yi(t,e,n,i){if(Un.isWrapped(i)){i=Un.unwrap(i);const s=t.def.nodes[e].bindingIndex+n,o=Un.unwrap(t.oldValues[s]);t.oldValues[s]=new Un(o)}return i}const Qi="$$undefined",Xi="$$empty";function Ji(t){return{id:Qi,styles:t.styles,encapsulation:t.encapsulation,data:t.data}}let ts=0;function es(t,e,n,i){return!(!(2&t.state)&&vt(t.oldValues[e.bindingIndex+n],i))}function ns(t,e,n,i){return!!es(t,e,n,i)&&(t.oldValues[e.bindingIndex+n]=i,!0)}function is(t,e,n,i){const s=t.oldValues[e.bindingIndex+n];if(1&t.state||!Hn(s,i)){const o=e.bindings[n].name;throw Zi(Ui.createDebugContext(t,e.nodeIndex),`${o}: ${s}`,`${o}: ${i}`,0!=(1&t.state))}}function ss(t){let e=t;for(;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function os(t,e){let n=t;for(;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function rs(t,e,n,i){try{return ss(33554432&t.def.nodes[e].flags?Vi(t,e).componentView:t),Ui.handleEvent(t,e,n,i)}catch(e){t.root.errorHandler.handleError(e)}}function as(t){return t.parent?Vi(t.parent,t.parentNodeDef.nodeIndex):null}function ls(t){return t.parent?t.parentNodeDef.parent:null}function hs(t,e){switch(201347067&e.flags){case 1:return Vi(t,e.nodeIndex).renderElement;case 2:return zi(t,e.nodeIndex).renderText}}function us(t,e){return t?`${t}:${e}`:e}function cs(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function ds(t){return!(!t.parent||32768&t.parentNodeDef.flags)}function ps(t){return 1<<t%32}function ms(t){const e={};let n=0;const i={};return t&&t.forEach(([t,s])=>{"number"==typeof t?(e[t]=s,n|=ps(t)):i[t]=s}),{matchedQueries:e,references:i,matchedQueryIds:n}}function fs(t,e){return t.map(t=>{let n,i;return Array.isArray(t)?[i,n]=t:(i=0,n=t),n&&("function"==typeof n||"object"==typeof n)&&e&&Object.defineProperty(n,At,{value:e,configurable:!0}),{flags:i,token:n,tokenKey:Ki(n)}})}function _s(t,e,n){let i=n.renderParent;return i?0==(1&i.flags)||0==(33554432&i.flags)||i.element.componentRendererType&&i.element.componentRendererType.encapsulation===ee.Native?Vi(t,n.renderParent.nodeIndex).renderElement:void 0:e}const gs=new WeakMap;function ys(t){let e=gs.get(t);return e||((e=t(()=>qi)).factory=t,gs.set(t,e)),e}function vs(t,e,n,i,s){3===e&&(n=t.renderer.parentNode(hs(t,t.def.lastRenderRootNode))),bs(t,e,0,t.def.nodes.length-1,n,i,s)}function bs(t,e,n,i,s,o,r){for(let a=n;a<=i;a++){const n=t.def.nodes[a];11&n.flags&&Es(t,n,e,s,o,r),a+=n.childCount}}function ws(t,e,n,i,s,o){let r=t;for(;r&&!cs(r);)r=r.parent;const a=r.parent,l=ls(r),h=l.nodeIndex+l.childCount;for(let u=l.nodeIndex+1;u<=h;u++){const t=a.def.nodes[u];t.ngContentIndex===e&&Es(a,t,n,i,s,o),u+=t.childCount}if(!a.parent){const r=t.root.projectableNodes[e];if(r)for(let e=0;e<r.length;e++)xs(t,r[e],n,i,s,o)}}function Es(t,e,n,i,s,o){if(8&e.flags)ws(t,e.ngContent.index,n,i,s,o);else{const r=hs(t,e);if(3===n&&33554432&e.flags&&48&e.bindingFlags?(16&e.bindingFlags&&xs(t,r,n,i,s,o),32&e.bindingFlags&&xs(Vi(t,e.nodeIndex).componentView,r,n,i,s,o)):xs(t,r,n,i,s,o),16777216&e.flags){const r=Vi(t,e.nodeIndex).viewContainer._embeddedViews;for(let t=0;t<r.length;t++)vs(r[t],n,i,s,o)}1&e.flags&&!e.element.name&&bs(t,n,e.nodeIndex+1,e.nodeIndex+e.childCount,i,s,o)}}function xs(t,e,n,i,s,o){const r=t.renderer;switch(n){case 1:r.appendChild(i,e);break;case 2:r.insertBefore(i,e,s);break;case 3:r.removeChild(i,e);break;case 0:o.push(e)}}const Cs=/^:([^:]+):(.+)$/;function Ls(t){if(":"===t[0]){const e=t.match(Cs);return[e[1],e[2]]}return["",t]}function ks(t){let e=0;for(let n=0;n<t.length;n++)e|=t[n].flags;return e}function Ss(t,e,n,i,s,o){t|=1;const{matchedQueries:r,references:a,matchedQueryIds:l}=ms(e);return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:t,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:r,matchedQueryIds:l,references:a,ngContentIndex:n,childCount:i,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:o?ys(o):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:s||qi},provider:null,text:null,query:null,ngContent:null}}function Ts(t,e,n,i,s,o,r=[],a,l,h,u,c){h||(h=qi);const{matchedQueries:d,references:p,matchedQueryIds:m}=ms(n);let f=null,_=null;o&&([f,_]=Ls(o)),a=a||[];const g=new Array(a.length);for(let b=0;b<a.length;b++){const[t,e,n]=a[b],[i,s]=Ls(e);let o=void 0,r=void 0;switch(15&t){case 4:r=n;break;case 1:case 8:o=n}g[b]={flags:t,ns:i,name:s,nonMinifiedName:s,securityContext:o,suffix:r}}l=l||[];const y=new Array(l.length);for(let b=0;b<l.length;b++){const[t,e]=l[b];y[b]={type:0,target:t,eventName:e,propName:null}}const v=(r=r||[]).map(([t,e])=>{const[n,i]=Ls(t);return[n,i,e]});return c=function(t){if(t&&t.id===Qi){const e=null!=t.encapsulation&&t.encapsulation!==ee.None||t.styles.length||Object.keys(t.data).length;t.id=e?`c${ts++}`:Xi}return t&&t.id===Xi&&(t=null),t||null}(c),u&&(e|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:d,matchedQueryIds:m,references:p,ngContentIndex:i,childCount:s,bindings:g,bindingFlags:ks(g),outputs:y,element:{ns:f,name:_,attrs:v,template:null,componentProvider:null,componentView:u||null,componentRendererType:c,publicProviders:null,allProviders:null,handleEvent:h||qi},provider:null,text:null,query:null,ngContent:null}}function Is(t,e,n){const i=n.element,s=t.root.selectorOrNode,o=t.renderer;let r;if(t.parent||!s){r=i.name?o.createElement(i.name,i.ns):o.createComment("");const s=_s(t,e,n);s&&o.appendChild(s,r)}else r=o.selectRootElement(s);if(i.attrs)for(let a=0;a<i.attrs.length;a++){const[t,e,n]=i.attrs[a];o.setAttribute(r,e,n,t)}return r}function Ps(t,e,n,i){for(let s=0;s<n.outputs.length;s++){const o=n.outputs[s],r=Ms(t,n.nodeIndex,us(o.target,o.eventName));let a=o.target,l=t;"component"===o.target&&(a=null,l=e);const h=l.renderer.listen(a||i,o.eventName,r);t.disposables[n.outputIndex+s]=h}}function Ms(t,e,n){return i=>rs(t,e,n,i)}function As(t,e,n,i){if(!ns(t,e,n,i))return!1;const s=e.bindings[n],o=Vi(t,e.nodeIndex),r=o.renderElement,a=s.name;switch(15&s.flags){case 1:!function(t,e,n,i,s,o){const r=e.securityContext;let a=r?t.root.sanitizer.sanitize(r,o):o;a=null!=a?a.toString():null;const l=t.renderer;null!=o?l.setAttribute(n,s,a,i):l.removeAttribute(n,s,i)}(t,s,r,s.ns,a,i);break;case 2:!function(t,e,n,i){const s=t.renderer;i?s.addClass(e,n):s.removeClass(e,n)}(t,r,a,i);break;case 4:!function(t,e,n,i,s){let o=t.root.sanitizer.sanitize(Oi.STYLE,s);if(null!=o){o=o.toString();const t=e.suffix;null!=t&&(o+=t)}else o=null;const r=t.renderer;null!=o?r.setStyle(n,i,o):r.removeStyle(n,i)}(t,s,r,a,i);break;case 8:!function(t,e,n,i,s){const o=e.securityContext;let r=o?t.root.sanitizer.sanitize(o,s):s;t.renderer.setProperty(n,i,r)}(33554432&e.flags&&32&s.flags?o.componentView:t,s,r,a,i)}return!0}const Ds=new Object,Os=Ki(Nt),Rs=Ki(Rt),Ns=Ki(Qe);function Fs(t,e,n,i){return n=St(n),{index:-1,deps:fs(i,bt(e)),flags:t,token:e,value:n}}function zs(t,e,n=Nt.THROW_IF_NOT_FOUND){const i=Jt(t);try{if(8&e.flags)return e.token;if(2&e.flags&&(n=null),1&e.flags)return t._parent.get(e.token,n);const s=e.tokenKey;switch(s){case Os:case Rs:case Ns:return t}const o=t._def.providersByKey[s];if(o){let e=t._providers[o.index];return void 0===e&&(e=t._providers[o.index]=Vs(t,o)),e===Ds?void 0:e}if(e.token.ngInjectableDef&&function(t,e){return null!=e.providedIn&&(function(t,n){return t._def.modules.indexOf(e.providedIn)>-1}(t)||"root"===e.providedIn&&t._def.isRoot)}(t,e.token.ngInjectableDef)){const n=t._providers.length;return t._def.providersByKey[e.tokenKey]={flags:5120,value:e.token.ngInjectableDef.factory,deps:[],index:n,token:e.token},t._providers[n]=Ds,t._providers[n]=Vs(t,t._def.providersByKey[e.tokenKey])}return t._parent.get(e.token,n)}finally{Jt(i)}}function Vs(t,e){let n;switch(201347067&e.flags){case 512:n=function(t,e,n){const i=n.length;switch(i){case 0:return new e;case 1:return new e(zs(t,n[0]));case 2:return new e(zs(t,n[0]),zs(t,n[1]));case 3:return new e(zs(t,n[0]),zs(t,n[1]),zs(t,n[2]));default:const s=new Array(i);for(let e=0;e<i;e++)s[e]=zs(t,n[e]);return new e(...s)}}(t,e.value,e.deps);break;case 1024:n=function(t,e,n){const i=n.length;switch(i){case 0:return e();case 1:return e(zs(t,n[0]));case 2:return e(zs(t,n[0]),zs(t,n[1]));case 3:return e(zs(t,n[0]),zs(t,n[1]),zs(t,n[2]));default:const s=Array(i);for(let e=0;e<i;e++)s[e]=zs(t,n[e]);return e(...s)}}(t,e.value,e.deps);break;case 2048:n=zs(t,e.deps[0]);break;case 256:n=e.value}return n===Ds||null==n||"object"!=typeof n||131072&e.flags||"function"!=typeof n.ngOnDestroy||(e.flags|=131072),void 0===n?Ds:n}function Bs(t,e){const n=t.viewContainer._embeddedViews;if((null==e||e>=n.length)&&(e=n.length-1),e<0)return null;const i=n[e];return i.viewContainerParent=null,Zs(n,e),Ui.dirtyParentQueries(i),Hs(i),i}function js(t,e,n){const i=e?hs(e,e.def.lastRenderRootNode):t.renderElement;vs(n,2,n.renderer.parentNode(i),n.renderer.nextSibling(i),void 0)}function Hs(t){vs(t,3,null,null,void 0)}function Us(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Zs(t,e){e>=t.length-1?t.pop():t.splice(e,1)}const Gs=new Object;function $s(t,e,n,i,s,o){return new qs(t,e,n,i,s,o)}class qs extends Ge{constructor(t,e,n,i,s,o){super(),this.selector=t,this.componentType=e,this._inputs=i,this._outputs=s,this.ngContentSelectors=o,this.viewDefFactory=n}get inputs(){const t=[],e=this._inputs;for(let n in e)t.push({propName:n,templateName:e[n]});return t}get outputs(){const t=[];for(let e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t}create(t,e,n,i){if(!i)throw new Error("ngModule should be provided");const s=ys(this.viewDefFactory),o=s.nodes[0].element.componentProvider.nodeIndex,r=Ui.createRootView(t,e||[],n,s,i,Gs),a=Bi(r,o).instance;return n&&r.renderer.setAttribute(Vi(r,0).renderElement,"ng-version",ne.full),new Ws(r,new Xs(r),a)}}class Ws extends Ze{constructor(t,e,n){super(),this._view=t,this._viewRef=e,this._component=n,this._elDef=this._view.def.nodes[0],this.hostView=e,this.changeDetectorRef=e,this.instance=n}get location(){return new Mn(Vi(this._view,this._elDef.nodeIndex).renderElement)}get injector(){return new no(this._view,this._elDef)}get componentType(){return this._component.constructor}destroy(){this._viewRef.destroy()}onDestroy(t){this._viewRef.onDestroy(t)}}function Ks(t,e,n){return new Ys(t,e,n)}class Ys{constructor(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}get element(){return new Mn(this._data.renderElement)}get injector(){return new no(this._view,this._elDef)}get parentInjector(){let t=this._view,e=this._elDef.parent;for(;!e&&t;)e=ls(t),t=t.parent;return t?new no(t,e):new no(this._view,null)}clear(){for(let t=this._embeddedViews.length-1;t>=0;t--){const e=Bs(this._data,t);Ui.destroyView(e)}}get(t){const e=this._embeddedViews[t];if(e){const t=new Xs(e);return t.attachToViewContainerRef(this),t}return null}get length(){return this._embeddedViews.length}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,s){const o=n||this.parentInjector;s||t instanceof Ye||(s=o.get(Qe));const r=t.create(o,i,void 0,s);return this.insert(r.hostView,e),r}insert(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");const n=t;return function(t,e,n,i){let s=e.viewContainer._embeddedViews;null!==n&&void 0!==n||(n=s.length),i.viewContainerParent=t,Us(s,n,i),function(t,e){const n=as(e);if(!n||n===t||16&e.state)return;e.state|=16;let i=n.template._projectedViews;i||(i=n.template._projectedViews=[]),i.push(e),function(t,e){if(4&e.flags)return;t.nodeFlags|=4,e.flags|=4;let n=e.parent;for(;n;)n.childFlags|=4,n=n.parent}(e.parent.def,e.parentNodeDef)}(e,i),Ui.dirtyParentQueries(i),js(e,n>0?s[n-1]:null,i)}(this._view,this._data,e,n._view),n.attachToViewContainerRef(this),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");const n=this._embeddedViews.indexOf(t._view);return function(t,e,i){const s=t.viewContainer._embeddedViews,o=s[n];Zs(s,n),null==i&&(i=s.length),Us(s,i,o),Ui.dirtyParentQueries(o),Hs(o),js(t,i>0?s[i-1]:null,o)}(this._data,0,e),t}indexOf(t){return this._embeddedViews.indexOf(t._view)}remove(t){const e=Bs(this._data,t);e&&Ui.destroyView(e)}detach(t){const e=Bs(this._data,t);return e?new Xs(e):null}}function Qs(t){return new Xs(t)}class Xs{constructor(t){this._view=t,this._viewContainerRef=null,this._appRef=null}get rootNodes(){return function(t){const e=[];return vs(t,0,void 0,void 0,e),e}(this._view)}get context(){return this._view.context}get destroyed(){return 0!=(128&this._view.state)}markForCheck(){ss(this._view)}detach(){this._view.state&=-5}detectChanges(){const t=this._view.root.rendererFactory;t.begin&&t.begin();try{Ui.checkAndUpdateView(this._view)}finally{t.end&&t.end()}}checkNoChanges(){Ui.checkNoChangesView(this._view)}reattach(){this._view.state|=4}onDestroy(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)}destroy(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Ui.destroyView(this._view)}detachFromAppRef(){this._appRef=null,Hs(this._view),Ui.dirtyParentQueries(this._view)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}}function Js(t,e){return new to(t,e)}class to extends Dn{constructor(t,e){super(),this._parentView=t,this._def=e}createEmbeddedView(t){return new Xs(Ui.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))}get elementRef(){return new Mn(Vi(this._parentView,this._def.nodeIndex).renderElement)}}function eo(t,e){return new no(t,e)}class no{constructor(t,e){this.view=t,this.elDef=e}get(t,e=Nt.THROW_IF_NOT_FOUND){return Ui.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:Ki(t)},e)}}function io(t,e){const n=t.def.nodes[e];if(1&n.flags){const e=Vi(t,n.nodeIndex);return n.element.template?e.template:e.renderElement}if(2&n.flags)return zi(t,n.nodeIndex).renderText;if(20240&n.flags)return Bi(t,n.nodeIndex).instance;throw new Error(`Illegal state: read nodeValue for node index ${e}`)}function so(t){return new oo(t.renderer)}class oo{constructor(t){this.delegate=t}selectRootElement(t){return this.delegate.selectRootElement(t)}createElement(t,e){const[n,i]=Ls(e),s=this.delegate.createElement(i,n);return t&&this.delegate.appendChild(t,s),s}createViewRoot(t){return t}createTemplateAnchor(t){const e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e}createText(t,e){const n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n}projectNodes(t,e){for(let n=0;n<e.length;n++)this.delegate.appendChild(t,e[n])}attachViewAfter(t,e){const n=this.delegate.parentNode(t),i=this.delegate.nextSibling(t);for(let s=0;s<e.length;s++)this.delegate.insertBefore(n,e[s],i)}detachView(t){for(let e=0;e<t.length;e++){const n=t[e],i=this.delegate.parentNode(n);this.delegate.removeChild(i,n)}}destroyView(t,e){for(let n=0;n<e.length;n++)this.delegate.destroyNode(e[n])}listen(t,e,n){return this.delegate.listen(t,e,n)}listenGlobal(t,e,n){return this.delegate.listen(t,e,n)}setElementProperty(t,e,n){this.delegate.setProperty(t,e,n)}setElementAttribute(t,e,n){const[i,s]=Ls(e);null!=n?this.delegate.setAttribute(t,s,n,i):this.delegate.removeAttribute(t,s,i)}setBindingDebugInfo(t,e,n){}setElementClass(t,e,n){n?this.delegate.addClass(t,e):this.delegate.removeClass(t,e)}setElementStyle(t,e,n){null!=n?this.delegate.setStyle(t,e,n):this.delegate.removeStyle(t,e)}invokeElementMethod(t,e,n){t[e].apply(t,n)}setText(t,e){this.delegate.setValue(t,e)}animate(){throw new Error("Renderer.animate is no longer supported!")}}function ro(t,e,n,i){return new ao(t,e,n,i)}class ao{constructor(t,e,n,i){this._moduleType=t,this._parent=e,this._bootstrapComponents=n,this._def=i,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(t){const e=t._def,n=t._providers=new Array(e.providers.length);for(let i=0;i<e.providers.length;i++){const s=e.providers[i];4096&s.flags||void 0===n[i]&&(n[i]=Vs(t,s))}}(this)}get(t,e=Nt.THROW_IF_NOT_FOUND,n=0){let i=0;return 4&n?i|=1:2&n&&(i|=4),zs(this,{token:t,tokenKey:Ki(t),flags:i},e)}get instance(){return this.get(this._moduleType)}get componentFactoryResolver(){return this.get(We)}destroy(){if(this._destroyed)throw new Error(`The ng module ${bt(this.instance.constructor)} has already been destroyed.`);this._destroyed=!0,function(t,e){const n=t._def,i=new Set;for(let s=0;s<n.providers.length;s++)if(131072&n.providers[s].flags){const e=t._providers[s];if(e&&e!==Ds){const t=e.ngOnDestroy;"function"!=typeof t||i.has(e)||(t.apply(e),i.add(e))}}}(this),this._destroyListeners.forEach(t=>t())}onDestroy(t){this._destroyListeners.push(t)}}const lo=Ki(class{}),ho=Ki(Pn),uo=Ki(Mn),co=Ki(On),po=Ki(Dn),mo=Ki(Rn),fo=Ki(Nt),_o=Ki(Rt);function go(t,e,n,i,s,o,r,a){const l=[];if(r)for(let u in r){const[t,e]=r[u];l[t]={flags:8,name:u,nonMinifiedName:e,ns:null,securityContext:null,suffix:null}}const h=[];if(a)for(let u in a)h.push({type:1,propName:u,target:null,eventName:a[u]});return bo(t,e|=16384,n,i,s,s,o,l,h)}function yo(t,e,n){return bo(-1,t|=16,null,0,e,e,n)}function vo(t,e,n,i,s){return bo(-1,t,e,0,n,i,s)}function bo(t,e,n,i,s,o,r,a,l){const{matchedQueries:h,references:u,matchedQueryIds:c}=ms(n);l||(l=[]),a||(a=[]),o=St(o);const d=fs(r,bt(s));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:h,matchedQueryIds:c,references:u,ngContentIndex:-1,childCount:i,bindings:a,bindingFlags:ks(a),outputs:l,element:null,provider:{token:s,value:o,deps:d},text:null,query:null,ngContent:null}}function wo(t,e){return Lo(t,e)}function Eo(t,e){let n=t;for(;n.parent&&!cs(n);)n=n.parent;return ko(n.parent,ls(n),!0,e.provider.value,e.provider.deps)}function xo(t,e){const n=ko(t,e.parent,(32768&e.flags)>0,e.provider.value,e.provider.deps);if(e.outputs.length)for(let i=0;i<e.outputs.length;i++){const s=e.outputs[i],o=n[s.propName].subscribe(Co(t,e.parent.nodeIndex,s.eventName));t.disposables[e.outputIndex+i]=o.unsubscribe.bind(o)}return n}function Co(t,e,n){return i=>rs(t,e,n,i)}function Lo(t,e){const n=(8192&e.flags)>0,i=e.provider;switch(201347067&e.flags){case 512:return ko(t,e.parent,n,i.value,i.deps);case 1024:return function(t,e,n,i,s){const o=s.length;switch(o){case 0:return i();case 1:return i(To(t,e,n,s[0]));case 2:return i(To(t,e,n,s[0]),To(t,e,n,s[1]));case 3:return i(To(t,e,n,s[0]),To(t,e,n,s[1]),To(t,e,n,s[2]));default:const r=Array(o);for(let i=0;i<o;i++)r[i]=To(t,e,n,s[i]);return i(...r)}}(t,e.parent,n,i.value,i.deps);case 2048:return To(t,e.parent,n,i.deps[0]);case 256:return i.value}}function ko(t,e,n,i,s){const o=s.length;switch(o){case 0:return new i;case 1:return new i(To(t,e,n,s[0]));case 2:return new i(To(t,e,n,s[0]),To(t,e,n,s[1]));case 3:return new i(To(t,e,n,s[0]),To(t,e,n,s[1]),To(t,e,n,s[2]));default:const r=new Array(o);for(let i=0;i<o;i++)r[i]=To(t,e,n,s[i]);return new i(...r)}}const So={};function To(t,e,n,i,s=Nt.THROW_IF_NOT_FOUND){if(8&i.flags)return i.token;const o=t;2&i.flags&&(s=null);const r=i.tokenKey;r===mo&&(n=!(!e||!e.element.componentView)),e&&1&i.flags&&(n=!1,e=e.parent);let a=t;for(;a;){if(e)switch(r){case lo:return so(Io(a,e,n));case ho:return Io(a,e,n).renderer;case uo:return new Mn(Vi(a,e.nodeIndex).renderElement);case co:return Vi(a,e.nodeIndex).viewContainer;case po:if(e.element.template)return Vi(a,e.nodeIndex).template;break;case mo:return Qs(Io(a,e,n));case fo:case _o:return eo(a,e);default:const t=(n?e.element.allProviders:e.element.publicProviders)[r];if(t){let e=Bi(a,t.nodeIndex);return e||(e={instance:Lo(a,t)},a.nodes[t.nodeIndex]=e),e.instance}}n=cs(a),e=ls(a),a=a.parent,4&i.flags&&(a=null)}const l=o.root.injector.get(i.token,So);return l!==So||s===So?l:o.root.ngModule.injector.get(i.token,s)}function Io(t,e,n){let i;if(n)i=Vi(t,e.nodeIndex).componentView;else for(i=t;i.parent&&!cs(i);)i=i.parent;return i}function Po(t,e,n,i,s,o){if(32768&n.flags){const e=Vi(t,n.parent.nodeIndex).componentView;2&e.def.flags&&(e.state|=8)}if(e.instance[n.bindings[i].name]=s,524288&n.flags){o=o||{};const e=Un.unwrap(t.oldValues[n.bindingIndex+i]);o[n.bindings[i].nonMinifiedName]=new Zn(e,s,0!=(2&t.state))}return t.oldValues[n.bindingIndex+i]=s,o}function Mo(t,e){if(!(t.def.nodeFlags&e))return;const n=t.def.nodes;let i=0;for(let s=0;s<n.length;s++){const o=n[s];let r=o.parent;for(!r&&o.flags&e&&Do(t,s,o.flags&e,i++),0==(o.childFlags&e)&&(s+=o.childCount);r&&1&r.flags&&s===r.nodeIndex+r.childCount;)r.directChildFlags&e&&(i=Ao(t,r,e,i)),r=r.parent}}function Ao(t,e,n,i){for(let s=e.nodeIndex+1;s<=e.nodeIndex+e.childCount;s++){const e=t.def.nodes[s];e.flags&n&&Do(t,s,e.flags&n,i++),s+=e.childCount}return i}function Do(t,e,n,i){const s=Bi(t,e);if(!s)return;const o=s.instance;o&&(Ui.setCurrentNode(t,e),1048576&n&&Fi(t,512,i)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&Fi(t,768,i)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}function Oo(t,e,n){let i=[];for(let s in n)i.push({propName:s,bindingType:n[s]});return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,ngContentIndex:-1,matchedQueries:{},matchedQueryIds:0,references:{},childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:{id:e,filterId:ps(e),bindings:i},ngContent:null}}function Ro(t){const e=t.def.nodeMatchedQueries;for(;t.parent&&ds(t);){let n=t.parentNodeDef;t=t.parent;const i=n.nodeIndex+n.childCount;for(let s=0;s<=i;s++){const i=t.def.nodes[s];67108864&i.flags&&536870912&i.flags&&(i.query.filterId&e)===i.query.filterId&&Hi(t,s).setDirty(),!(1&i.flags&&s+i.childCount<n.nodeIndex)&&67108864&i.childFlags&&536870912&i.childFlags||(s+=i.childCount)}}if(134217728&t.def.nodeFlags)for(let n=0;n<t.def.nodes.length;n++){const e=t.def.nodes[n];134217728&e.flags&&536870912&e.flags&&Hi(t,n).setDirty(),n+=e.childCount}}function No(t,e){const n=Hi(t,e.nodeIndex);if(!n.dirty)return;let i,s=void 0;if(67108864&e.flags){const n=e.parent.parent;s=Fo(t,n.nodeIndex,n.nodeIndex+n.childCount,e.query,[]),i=Bi(t,e.parent.nodeIndex).instance}else 134217728&e.flags&&(s=Fo(t,0,t.def.nodes.length-1,e.query,[]),i=t.component);n.reset(s);const o=e.query.bindings;let r=!1;for(let a=0;a<o.length;a++){const t=o[a];let e;switch(t.bindingType){case 0:e=n.first;break;case 1:e=n,r=!0}i[t.propName]=e}r&&n.notifyOnChanges()}function Fo(t,e,n,i,s){for(let o=e;o<=n;o++){const e=t.def.nodes[o],n=e.matchedQueries[i.id];if(null!=n&&s.push(zo(t,e,n)),1&e.flags&&e.element.template&&(e.element.template.nodeMatchedQueries&i.filterId)===i.filterId){const n=Vi(t,o);if((e.childMatchedQueries&i.filterId)===i.filterId&&(Fo(t,o+1,o+e.childCount,i,s),o+=e.childCount),16777216&e.flags){const t=n.viewContainer._embeddedViews;for(let e=0;e<t.length;e++){const o=t[e],r=as(o);r&&r===n&&Fo(o,0,o.def.nodes.length-1,i,s)}}const r=n.template._projectedViews;if(r)for(let t=0;t<r.length;t++){const e=r[t];Fo(e,0,e.def.nodes.length-1,i,s)}}(e.childMatchedQueries&i.filterId)!==i.filterId&&(o+=e.childCount)}return s}function zo(t,e,n){if(null!=n)switch(n){case 1:return Vi(t,e.nodeIndex).renderElement;case 0:return new Mn(Vi(t,e.nodeIndex).renderElement);case 2:return Vi(t,e.nodeIndex).template;case 3:return Vi(t,e.nodeIndex).viewContainer;case 4:return Bi(t,e.nodeIndex).instance}}function Vo(t,e){return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:t,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:e}}}function Bo(t,e,n){const i=_s(t,e,n);i&&ws(t,n.ngContent.index,1,i,null,void 0)}function jo(t,e){return function(t,e,n){const i=new Array(n.length);for(let s=0;s<n.length;s++){const t=n[s];i[s]={flags:8,name:t,ns:null,nonMinifiedName:t,securityContext:null,suffix:null}}return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:128,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:-1,childCount:0,bindings:i,bindingFlags:ks(i),outputs:[],element:null,provider:null,text:null,query:null,ngContent:null}}(0,t,new Array(e+1))}function Ho(t,e,n){const i=new Array(n.length-1);for(let s=1;s<n.length;s++)i[s-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:n[s]};return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:e,childCount:0,bindings:i,bindingFlags:8,outputs:[],element:null,provider:null,text:{prefix:n[0]},query:null,ngContent:null}}function Uo(t,e,n){let i;const s=t.renderer;i=s.createText(n.text.prefix);const o=_s(t,e,n);return o&&s.appendChild(o,i),{renderText:i}}function Zo(t,e){return(null!=t?t.toString():"")+e.suffix}function Go(t,e,n,i){let s=0,o=0,r=0,a=0,l=0,h=null,u=null,c=!1,d=!1,p=null;for(let m=0;m<e.length;m++){const t=e[m];if(t.nodeIndex=m,t.parent=h,t.bindingIndex=s,t.outputIndex=o,t.renderParent=u,r|=t.flags,l|=t.matchedQueryIds,t.element){const e=t.element;e.publicProviders=h?h.element.publicProviders:Object.create(null),e.allProviders=e.publicProviders,c=!1,d=!1,t.element.template&&(l|=t.element.template.nodeMatchedQueries)}if(qo(h,t,e.length),s+=t.bindings.length,o+=t.outputs.length,!u&&3&t.flags&&(p=t),20224&t.flags){c||(c=!0,h.element.publicProviders=Object.create(h.element.publicProviders),h.element.allProviders=h.element.publicProviders);const e=0!=(32768&t.flags);0==(8192&t.flags)||e?h.element.publicProviders[Ki(t.provider.token)]=t:(d||(d=!0,h.element.allProviders=Object.create(h.element.publicProviders)),h.element.allProviders[Ki(t.provider.token)]=t),e&&(h.element.componentProvider=t)}if(h?(h.childFlags|=t.flags,h.directChildFlags|=t.flags,h.childMatchedQueries|=t.matchedQueryIds,t.element&&t.element.template&&(h.childMatchedQueries|=t.element.template.nodeMatchedQueries)):a|=t.flags,t.childCount>0)h=t,$o(t)||(u=t);else for(;h&&m===h.nodeIndex+h.childCount;){const t=h.parent;t&&(t.childFlags|=h.childFlags,t.childMatchedQueries|=h.childMatchedQueries),u=(h=t)&&$o(h)?h.renderParent:h}}return{factory:null,nodeFlags:r,rootNodeFlags:a,nodeMatchedQueries:l,flags:t,nodes:e,updateDirectives:n||qi,updateRenderer:i||qi,handleEvent:(t,n,i,s)=>e[n].element.handleEvent(t,i,s),bindingCount:s,outputCount:o,lastRenderRootNode:p}}function $o(t){return 0!=(1&t.flags)&&null===t.element.name}function qo(t,e,n){const i=e.element&&e.element.template;if(i){if(!i.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(i.lastRenderRootNode&&16777216&i.lastRenderRootNode.flags)throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${e.nodeIndex}!`)}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${e.nodeIndex}!`);if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${e.nodeIndex}!`);if(134217728&e.flags&&t)throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${e.nodeIndex}!`)}if(e.childCount){const i=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=i&&e.nodeIndex+e.childCount>i)throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${e.nodeIndex}!`)}}function Wo(t,e,n,i){const s=Qo(t.root,t.renderer,t,e,n);return Xo(s,t.component,i),Jo(s),s}function Ko(t,e,n){const i=Qo(t,t.renderer,null,null,e);return Xo(i,n,n),Jo(i),i}function Yo(t,e,n,i){const s=e.element.componentRendererType;let o;return o=s?t.root.rendererFactory.createRenderer(i,s):t.root.renderer,Qo(t.root,o,t,e.element.componentProvider,n)}function Qo(t,e,n,i,s){const o=new Array(s.nodes.length),r=s.outputCount?new Array(s.outputCount):null;return{def:s,parent:n,viewContainerParent:null,parentNodeDef:i,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(s.bindingCount),disposables:r,initIndex:-1}}function Xo(t,e,n){t.component=e,t.context=n}function Jo(t){let e;cs(t)&&(e=Vi(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);const n=t.def,i=t.nodes;for(let s=0;s<n.nodes.length;s++){const o=n.nodes[s];let r;switch(Ui.setCurrentNode(t,s),201347067&o.flags){case 1:const n=Is(t,e,o);let a=void 0;if(33554432&o.flags){const e=ys(o.element.componentView);a=Ui.createComponentView(t,o,e,n)}Ps(t,a,o,n),r={renderElement:n,componentView:a,viewContainer:null,template:o.element.template?Js(t,o):void 0},16777216&o.flags&&(r.viewContainer=Ks(t,o,r));break;case 2:r=Uo(t,e,o);break;case 512:case 1024:case 2048:case 256:(r=i[s])||4096&o.flags||(r={instance:wo(t,o)});break;case 16:r={instance:Eo(t,o)};break;case 16384:(r=i[s])||(r={instance:xo(t,o)}),32768&o.flags&&Xo(Vi(t,o.parent.nodeIndex).componentView,r.instance,r.instance);break;case 32:case 64:case 128:r={value:void 0};break;case 67108864:case 134217728:r=new An;break;case 8:Bo(t,e,o),r=void 0}i[s]=r}lr(t,ar.CreateViewNodes),dr(t,201326592,268435456,0)}function tr(t){ir(t),Ui.updateDirectives(t,1),hr(t,ar.CheckNoChanges),Ui.updateRenderer(t,1),lr(t,ar.CheckNoChanges),t.state&=-97}function er(t){1&t.state?(t.state&=-2,t.state|=2):t.state&=-3,Ni(t,0,256),ir(t),Ui.updateDirectives(t,0),hr(t,ar.CheckAndUpdate),dr(t,67108864,536870912,0);let e=Ni(t,256,512);Mo(t,2097152|(e?1048576:0)),Ui.updateRenderer(t,0),lr(t,ar.CheckAndUpdate),dr(t,134217728,536870912,0),Mo(t,8388608|((e=Ni(t,512,768))?4194304:0)),2&t.def.flags&&(t.state&=-9),t.state&=-97,Ni(t,768,1024)}function nr(t,e,n,i,s,o,r,a,l,h,u,c,d){return 0===n?function(t,e,n,i,s,o,r,a,l,h,u,c){switch(201347067&e.flags){case 1:return function(t,e,n,i,s,o,r,a,l,h,u,c){const d=e.bindings.length;let p=!1;return d>0&&As(t,e,0,n)&&(p=!0),d>1&&As(t,e,1,i)&&(p=!0),d>2&&As(t,e,2,s)&&(p=!0),d>3&&As(t,e,3,o)&&(p=!0),d>4&&As(t,e,4,r)&&(p=!0),d>5&&As(t,e,5,a)&&(p=!0),d>6&&As(t,e,6,l)&&(p=!0),d>7&&As(t,e,7,h)&&(p=!0),d>8&&As(t,e,8,u)&&(p=!0),d>9&&As(t,e,9,c)&&(p=!0),p}(t,e,n,i,s,o,r,a,l,h,u,c);case 2:return function(t,e,n,i,s,o,r,a,l,h,u,c){let d=!1;const p=e.bindings,m=p.length;if(m>0&&ns(t,e,0,n)&&(d=!0),m>1&&ns(t,e,1,i)&&(d=!0),m>2&&ns(t,e,2,s)&&(d=!0),m>3&&ns(t,e,3,o)&&(d=!0),m>4&&ns(t,e,4,r)&&(d=!0),m>5&&ns(t,e,5,a)&&(d=!0),m>6&&ns(t,e,6,l)&&(d=!0),m>7&&ns(t,e,7,h)&&(d=!0),m>8&&ns(t,e,8,u)&&(d=!0),m>9&&ns(t,e,9,c)&&(d=!0),d){let d=e.text.prefix;m>0&&(d+=Zo(n,p[0])),m>1&&(d+=Zo(i,p[1])),m>2&&(d+=Zo(s,p[2])),m>3&&(d+=Zo(o,p[3])),m>4&&(d+=Zo(r,p[4])),m>5&&(d+=Zo(a,p[5])),m>6&&(d+=Zo(l,p[6])),m>7&&(d+=Zo(h,p[7])),m>8&&(d+=Zo(u,p[8])),m>9&&(d+=Zo(c,p[9]));const f=zi(t,e.nodeIndex).renderText;t.renderer.setValue(f,d)}return d}(t,e,n,i,s,o,r,a,l,h,u,c);case 16384:return function(t,e,n,i,s,o,r,a,l,h,u,c){const d=Bi(t,e.nodeIndex),p=d.instance;let m=!1,f=void 0;const _=e.bindings.length;return _>0&&es(t,e,0,n)&&(m=!0,f=Po(t,d,e,0,n,f)),_>1&&es(t,e,1,i)&&(m=!0,f=Po(t,d,e,1,i,f)),_>2&&es(t,e,2,s)&&(m=!0,f=Po(t,d,e,2,s,f)),_>3&&es(t,e,3,o)&&(m=!0,f=Po(t,d,e,3,o,f)),_>4&&es(t,e,4,r)&&(m=!0,f=Po(t,d,e,4,r,f)),_>5&&es(t,e,5,a)&&(m=!0,f=Po(t,d,e,5,a,f)),_>6&&es(t,e,6,l)&&(m=!0,f=Po(t,d,e,6,l,f)),_>7&&es(t,e,7,h)&&(m=!0,f=Po(t,d,e,7,h,f)),_>8&&es(t,e,8,u)&&(m=!0,f=Po(t,d,e,8,u,f)),_>9&&es(t,e,9,c)&&(m=!0,f=Po(t,d,e,9,c,f)),f&&p.ngOnChanges(f),65536&e.flags&&Fi(t,256,e.nodeIndex)&&p.ngOnInit(),262144&e.flags&&p.ngDoCheck(),m}(t,e,n,i,s,o,r,a,l,h,u,c);case 32:case 64:case 128:return function(t,e,n,i,s,o,r,a,l,h,u,c){const d=e.bindings;let p=!1;const m=d.length;if(m>0&&ns(t,e,0,n)&&(p=!0),m>1&&ns(t,e,1,i)&&(p=!0),m>2&&ns(t,e,2,s)&&(p=!0),m>3&&ns(t,e,3,o)&&(p=!0),m>4&&ns(t,e,4,r)&&(p=!0),m>5&&ns(t,e,5,a)&&(p=!0),m>6&&ns(t,e,6,l)&&(p=!0),m>7&&ns(t,e,7,h)&&(p=!0),m>8&&ns(t,e,8,u)&&(p=!0),m>9&&ns(t,e,9,c)&&(p=!0),p){const p=ji(t,e.nodeIndex);let f;switch(201347067&e.flags){case 32:f=new Array(d.length),m>0&&(f[0]=n),m>1&&(f[1]=i),m>2&&(f[2]=s),m>3&&(f[3]=o),m>4&&(f[4]=r),m>5&&(f[5]=a),m>6&&(f[6]=l),m>7&&(f[7]=h),m>8&&(f[8]=u),m>9&&(f[9]=c);break;case 64:f={},m>0&&(f[d[0].name]=n),m>1&&(f[d[1].name]=i),m>2&&(f[d[2].name]=s),m>3&&(f[d[3].name]=o),m>4&&(f[d[4].name]=r),m>5&&(f[d[5].name]=a),m>6&&(f[d[6].name]=l),m>7&&(f[d[7].name]=h),m>8&&(f[d[8].name]=u),m>9&&(f[d[9].name]=c);break;case 128:const t=n;switch(m){case 1:f=t.transform(n);break;case 2:f=t.transform(i);break;case 3:f=t.transform(i,s);break;case 4:f=t.transform(i,s,o);break;case 5:f=t.transform(i,s,o,r);break;case 6:f=t.transform(i,s,o,r,a);break;case 7:f=t.transform(i,s,o,r,a,l);break;case 8:f=t.transform(i,s,o,r,a,l,h);break;case 9:f=t.transform(i,s,o,r,a,l,h,u);break;case 10:f=t.transform(i,s,o,r,a,l,h,u,c)}}p.value=f}return p}(t,e,n,i,s,o,r,a,l,h,u,c);default:throw"unreachable"}}(t,e,i,s,o,r,a,l,h,u,c,d):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){let i=!1;for(let s=0;s<n.length;s++)As(t,e,s,n[s])&&(i=!0);return i}(t,e,n);case 2:return function(t,e,n){const i=e.bindings;let s=!1;for(let o=0;o<n.length;o++)ns(t,e,o,n[o])&&(s=!0);if(s){let s="";for(let t=0;t<n.length;t++)s+=Zo(n[t],i[t]);s=e.text.prefix+s;const o=zi(t,e.nodeIndex).renderText;t.renderer.setValue(o,s)}return s}(t,e,n);case 16384:return function(t,e,n){const i=Bi(t,e.nodeIndex),s=i.instance;let o=!1,r=void 0;for(let a=0;a<n.length;a++)es(t,e,a,n[a])&&(o=!0,r=Po(t,i,e,a,n[a],r));return r&&s.ngOnChanges(r),65536&e.flags&&Fi(t,256,e.nodeIndex)&&s.ngOnInit(),262144&e.flags&&s.ngDoCheck(),o}(t,e,n);case 32:case 64:case 128:return function(t,e,n){const i=e.bindings;let s=!1;for(let o=0;o<n.length;o++)ns(t,e,o,n[o])&&(s=!0);if(s){const s=ji(t,e.nodeIndex);let o;switch(201347067&e.flags){case 32:o=n;break;case 64:o={};for(let e=0;e<n.length;e++)o[i[e].name]=n[e];break;case 128:const t=n[0],s=n.slice(1);o=t.transform(...s)}s.value=o}return s}(t,e,n);default:throw"unreachable"}}(t,e,i)}function ir(t){const e=t.def;if(4&e.nodeFlags)for(let n=0;n<e.nodes.length;n++){const i=e.nodes[n];if(4&i.flags){const e=Vi(t,n).template._projectedViews;if(e)for(let n=0;n<e.length;n++){const i=e[n];i.state|=32,os(i,t)}}else 0==(4&i.childFlags)&&(n+=i.childCount)}}function sr(t,e,n,i,s,o,r,a,l,h,u,c,d){return 0===n?function(t,e,n,i,s,o,r,a,l,h,u,c){const d=e.bindings.length;d>0&&is(t,e,0,n),d>1&&is(t,e,1,i),d>2&&is(t,e,2,s),d>3&&is(t,e,3,o),d>4&&is(t,e,4,r),d>5&&is(t,e,5,a),d>6&&is(t,e,6,l),d>7&&is(t,e,7,h),d>8&&is(t,e,8,u),d>9&&is(t,e,9,c)}(t,e,i,s,o,r,a,l,h,u,c,d):function(t,e,n){for(let i=0;i<n.length;i++)is(t,e,i,n[i])}(t,e,i),!1}function or(t,e){if(Hi(t,e.nodeIndex).dirty)throw Zi(Ui.createDebugContext(t,e.nodeIndex),`Query ${e.query.id} not dirty`,`Query ${e.query.id} dirty`,0!=(1&t.state))}function rr(t){if(!(128&t.state)){if(hr(t,ar.Destroy),lr(t,ar.Destroy),Mo(t,131072),t.disposables)for(let e=0;e<t.disposables.length;e++)t.disposables[e]();!function(t){if(!(16&t.state))return;const e=as(t);if(e){const n=e.template._projectedViews;n&&(Zs(n,n.indexOf(t)),Ui.dirtyParentQueries(t))}}(t),t.renderer.destroyNode&&function(t){const e=t.def.nodes.length;for(let n=0;n<e;n++){const e=t.def.nodes[n];1&e.flags?t.renderer.destroyNode(Vi(t,n).renderElement):2&e.flags?t.renderer.destroyNode(zi(t,n).renderText):(67108864&e.flags||134217728&e.flags)&&Hi(t,n).destroy()}}(t),cs(t)&&t.renderer.destroy(),t.state|=128}}const ar=function(){var t={CreateViewNodes:0,CheckNoChanges:1,CheckNoChangesProjectedViews:2,CheckAndUpdate:3,CheckAndUpdateProjectedViews:4,Destroy:5};return t[t.CreateViewNodes]="CreateViewNodes",t[t.CheckNoChanges]="CheckNoChanges",t[t.CheckNoChangesProjectedViews]="CheckNoChangesProjectedViews",t[t.CheckAndUpdate]="CheckAndUpdate",t[t.CheckAndUpdateProjectedViews]="CheckAndUpdateProjectedViews",t[t.Destroy]="Destroy",t}();function lr(t,e){const n=t.def;if(33554432&n.nodeFlags)for(let i=0;i<n.nodes.length;i++){const s=n.nodes[i];33554432&s.flags?ur(Vi(t,i).componentView,e):0==(33554432&s.childFlags)&&(i+=s.childCount)}}function hr(t,e){const n=t.def;if(16777216&n.nodeFlags)for(let i=0;i<n.nodes.length;i++){const s=n.nodes[i];if(16777216&s.flags){const n=Vi(t,i).viewContainer._embeddedViews;for(let t=0;t<n.length;t++)ur(n[t],e)}else 0==(16777216&s.childFlags)&&(i+=s.childCount)}}function ur(t,e){const n=t.state;switch(e){case ar.CheckNoChanges:0==(128&n)&&(12==(12&n)?tr(t):64&n&&cr(t,ar.CheckNoChangesProjectedViews));break;case ar.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?tr(t):64&n&&cr(t,e));break;case ar.CheckAndUpdate:0==(128&n)&&(12==(12&n)?er(t):64&n&&cr(t,ar.CheckAndUpdateProjectedViews));break;case ar.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?er(t):64&n&&cr(t,e));break;case ar.Destroy:rr(t);break;case ar.CreateViewNodes:Jo(t)}}function cr(t,e){hr(t,e),lr(t,e)}function dr(t,e,n,i){if(!(t.def.nodeFlags&e&&t.def.nodeFlags&n))return;const s=t.def.nodes.length;for(let o=0;o<s;o++){const s=t.def.nodes[o];if(s.flags&e&&s.flags&n)switch(Ui.setCurrentNode(t,s.nodeIndex),i){case 0:No(t,s);break;case 1:or(t,s)}s.childFlags&e&&s.childFlags&n||(o+=s.childCount)}}let pr=!1;function mr(t,e,n,i,s,o){return Ko(_r(t,s,s.injector.get(Tn),e,n),i,o)}function fr(t,e,n,i,s,o){const r=s.injector.get(Tn),a=_r(t,s,new Qr(r),e,n),l=kr(i);return Kr(Ar.create,Ko,null,[a,l,o])}function _r(t,e,n,i,s){const o=e.injector.get(Ri),r=e.injector.get(he);return{ngModule:e,injector:t,projectableNodes:i,selectorOrNode:s,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:r}}function gr(t,e,n,i){const s=kr(n);return Kr(Ar.create,Wo,null,[t,e,s,i])}function yr(t,e,n,i){return n=Er.get(e.element.componentProvider.provider.token)||kr(n),Kr(Ar.create,Yo,null,[t,e,n,i])}function vr(t,e,n,i){return ro(t,e,n,function(t){const{hasOverrides:e,hasDeprecatedOverrides:n}=function(t){let e=!1,n=!1;return 0===br.size?{hasOverrides:e,hasDeprecatedOverrides:n}:(t.providers.forEach(t=>{const i=br.get(t.token);3840&t.flags&&i&&(e=!0,n=n||i.deprecatedBehavior)}),t.modules.forEach(t=>{wr.forEach((i,s)=>{s.ngInjectableDef.providedIn===t&&(e=!0,n=n||i.deprecatedBehavior)})}),{hasOverrides:e,hasDeprecatedOverrides:n})}(t);return e?(function(t){for(let e=0;e<t.providers.length;e++){const i=t.providers[e];n&&(i.flags|=4096);const s=br.get(i.token);s&&(i.flags=-3841&i.flags|s.flags,i.deps=fs(s.deps),i.value=s.value)}if(wr.size>0){let e=new Set(t.modules);wr.forEach((i,s)=>{if(e.has(s.ngInjectableDef.providedIn)){let e={token:s,flags:i.flags|(n?4096:0),deps:fs(i.deps),value:i.value,index:t.providers.length};t.providers.push(e),t.providersByKey[Ki(s)]=e}})}}(t=t.factory(()=>qi)),t):t}(i))}const br=new Map,wr=new Map,Er=new Map;function xr(t){br.set(t.token,t),"function"==typeof t.token&&t.token.ngInjectableDef&&"function"==typeof t.token.ngInjectableDef.providedIn&&wr.set(t.token,t)}function Cr(t,e){const n=ys(ys(e.viewDefFactory).nodes[0].element.componentView);Er.set(t,n)}function Lr(){br.clear(),wr.clear(),Er.clear()}function kr(t){if(0===br.size)return t;const e=function(t){const e=[];let n=null;for(let i=0;i<t.nodes.length;i++){const s=t.nodes[i];1&s.flags&&(n=s),n&&3840&s.flags&&br.has(s.provider.token)&&(e.push(n.nodeIndex),n=null)}return e}(t);if(0===e.length)return t;t=t.factory(()=>qi);for(let i=0;i<e.length;i++)n(t,e[i]);return t;function n(t,e){for(let n=e+1;n<t.nodes.length;n++){const e=t.nodes[n];if(1&e.flags)return;if(3840&e.flags){const t=e.provider,n=br.get(t.token);n&&(e.flags=-3841&e.flags|n.flags,t.deps=fs(n.deps),t.value=n.value)}}}}function Sr(t,e,n,i,s,o,r,a,l,h,u,c,d){const p=t.def.nodes[e];return nr(t,p,n,i,s,o,r,a,l,h,u,c,d),224&p.flags?ji(t,e).value:void 0}function Tr(t,e,n,i,s,o,r,a,l,h,u,c,d){const p=t.def.nodes[e];return sr(t,p,n,i,s,o,r,a,l,h,u,c,d),224&p.flags?ji(t,e).value:void 0}function Ir(t){return Kr(Ar.detectChanges,er,null,[t])}function Pr(t){return Kr(Ar.checkNoChanges,tr,null,[t])}function Mr(t){return Kr(Ar.destroy,rr,null,[t])}const Ar=function(){var t={create:0,detectChanges:1,checkNoChanges:2,destroy:3,handleEvent:4};return t[t.create]="create",t[t.detectChanges]="detectChanges",t[t.checkNoChanges]="checkNoChanges",t[t.destroy]="destroy",t[t.handleEvent]="handleEvent",t}();let Dr,Or,Rr;function Nr(t,e){Or=t,Rr=e}function Fr(t,e,n,i){return Nr(t,e),Kr(Ar.handleEvent,t.def.handleEvent,null,[t,e,n,i])}function zr(t,e){if(128&t.state)throw $i(Ar[Dr]);return Nr(t,Gr(t,0)),t.def.updateDirectives(function(t,n,i,...s){const o=t.def.nodes[n];return 0===e?Br(t,o,i,s):jr(t,o,i,s),16384&o.flags&&Nr(t,Gr(t,n)),224&o.flags?ji(t,o.nodeIndex).value:void 0},t)}function Vr(t,e){if(128&t.state)throw $i(Ar[Dr]);return Nr(t,$r(t,0)),t.def.updateRenderer(function(t,n,i,...s){const o=t.def.nodes[n];return 0===e?Br(t,o,i,s):jr(t,o,i,s),3&o.flags&&Nr(t,$r(t,n)),224&o.flags?ji(t,o.nodeIndex).value:void 0},t)}function Br(t,e,n,i){if(nr(t,e,n,...i)){const s=1===n?i[0]:i;if(16384&e.flags){const n={};for(let t=0;t<e.bindings.length;t++){const i=e.bindings[t],o=s[t];8&i.flags&&(n[Hr(i.nonMinifiedName)]=Zr(o))}const i=e.parent,o=Vi(t,i.nodeIndex).renderElement;if(i.element.name)for(let e in n){const i=n[e];null!=i?t.renderer.setAttribute(o,e,i):t.renderer.removeAttribute(o,e)}else t.renderer.setValue(o,`bindings=${JSON.stringify(n,null,2)}`)}}}function jr(t,e,n,i){sr(t,e,n,...i)}function Hr(t){return`ng-reflect-${t=t.replace(/[$@]/g,"_").replace(Ur,(...t)=>"-"+t[1].toLowerCase())}`}const Ur=/([A-Z])/g;function Zr(t){try{return null!=t?t.toString().slice(0,30):t}catch(t){return"[ERROR] Exception while trying to serialize the value"}}function Gr(t,e){for(let n=e;n<t.def.nodes.length;n++){const e=t.def.nodes[n];if(16384&e.flags&&e.bindings&&e.bindings.length)return n}return null}function $r(t,e){for(let n=e;n<t.def.nodes.length;n++){const e=t.def.nodes[n];if(3&e.flags&&e.bindings&&e.bindings.length)return n}return null}class qr{constructor(t,e){this.view=t,this.nodeIndex=e,null==e&&(this.nodeIndex=e=0),this.nodeDef=t.def.nodes[e];let n=this.nodeDef,i=t;for(;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&i;)n=ls(i),i=i.parent;this.elDef=n,this.elView=i}get elOrCompView(){return Vi(this.elView,this.elDef.nodeIndex).componentView||this.view}get injector(){return eo(this.elView,this.elDef)}get component(){return this.elOrCompView.component}get context(){return this.elOrCompView.context}get providerTokens(){const t=[];if(this.elDef)for(let e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){const n=this.elView.def.nodes[e];20224&n.flags&&t.push(n.provider.token),e+=n.childCount}return t}get references(){const t={};if(this.elDef){Wr(this.elView,this.elDef,t);for(let e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){const n=this.elView.def.nodes[e];20224&n.flags&&Wr(this.elView,n,t),e+=n.childCount}}return t}get componentRenderElement(){const t=function(t){for(;t&&!cs(t);)t=t.parent;return t.parent?Vi(t.parent,ls(t).nodeIndex):null}(this.elOrCompView);return t?t.renderElement:void 0}get renderNode(){return 2&this.nodeDef.flags?hs(this.view,this.nodeDef):hs(this.elView,this.elDef)}logError(t,...e){let n,i;2&this.nodeDef.flags?(n=this.view.def,i=this.nodeDef.nodeIndex):(n=this.elView.def,i=this.elDef.nodeIndex);const s=function(t,e){let n=-1;for(let i=0;i<=e;i++)3&t.nodes[i].flags&&n++;return n}(n,i);let o=-1;n.factory(()=>++o===s?t.error.bind(t,...e):qi),o<s&&(t.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),t.error(...e))}}function Wr(t,e,n){for(let i in e.references)n[i]=zo(t,e,e.references[i])}function Kr(t,e,n,i){const s=Dr,o=Or,r=Rr;try{Dr=t;const a=e.apply(n,i);return Or=o,Rr=r,Dr=s,a}catch(t){if(re(t)||!Or)throw t;throw function(t,e){return t instanceof Error||(t=new Error(t.toString())),Gi(t,e),t}(t,Yr())}}function Yr(){return Or?new qr(Or,Rr):null}class Qr{constructor(t){this.delegate=t}createRenderer(t,e){return new Xr(this.delegate.createRenderer(t,e))}begin(){this.delegate.begin&&this.delegate.begin()}end(){this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)}}class Xr{constructor(t){this.delegate=t,this.data=this.delegate.data}destroyNode(t){!function(t){Vn.delete(t.nativeNode)}(Bn(t)),this.delegate.destroyNode&&this.delegate.destroyNode(t)}destroy(){this.delegate.destroy()}createElement(t,e){const n=this.delegate.createElement(t,e),i=Yr();if(i){const e=new zn(n,null,i);e.name=t,jn(e)}return n}createComment(t){const e=this.delegate.createComment(t),n=Yr();return n&&jn(new Fn(e,null,n)),e}createText(t){const e=this.delegate.createText(t),n=Yr();return n&&jn(new Fn(e,null,n)),e}appendChild(t,e){const n=Bn(t),i=Bn(e);n&&i&&n instanceof zn&&n.addChild(i),this.delegate.appendChild(t,e)}insertBefore(t,e,n){const i=Bn(t),s=Bn(e),o=Bn(n);i&&s&&i instanceof zn&&i.insertBefore(o,s),this.delegate.insertBefore(t,e,n)}removeChild(t,e){const n=Bn(t),i=Bn(e);n&&i&&n instanceof zn&&n.removeChild(i),this.delegate.removeChild(t,e)}selectRootElement(t){const e=this.delegate.selectRootElement(t),n=Yr();return n&&jn(new zn(e,null,n)),e}setAttribute(t,e,n,i){const s=Bn(t);s&&s instanceof zn&&(s.attributes[i?i+":"+e:e]=n),this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){const i=Bn(t);i&&i instanceof zn&&(i.attributes[n?n+":"+e:e]=null),this.delegate.removeAttribute(t,e,n)}addClass(t,e){const n=Bn(t);n&&n instanceof zn&&(n.classes[e]=!0),this.delegate.addClass(t,e)}removeClass(t,e){const n=Bn(t);n&&n instanceof zn&&(n.classes[e]=!1),this.delegate.removeClass(t,e)}setStyle(t,e,n,i){const s=Bn(t);s&&s instanceof zn&&(s.styles[e]=n),this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){const i=Bn(t);i&&i instanceof zn&&(i.styles[e]=null),this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){const i=Bn(t);i&&i instanceof zn&&(i.properties[e]=n),this.delegate.setProperty(t,e,n)}listen(t,e,n){if("string"!=typeof t){const i=Bn(t);i&&i.listeners.push(new Nn(e,n))}return this.delegate.listen(t,e,n)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setValue(t,e){return this.delegate.setValue(t,e)}}"undefined"==typeof ngDevMode&&("undefined"!=typeof window&&(window.ngDevMode=!0),"undefined"!=typeof self&&(self.ngDevMode=!0),"undefined"!=typeof global&&(global.ngDevMode=!0));const Jr=Element.prototype,ta=Jr.matches||Jr.matchesSelector||Jr.mozMatchesSelector||Jr.msMatchesSelector||Jr.oMatchesSelector||Jr.webkitMatchesSelector,ea={schedule(t,e){const n=setTimeout(t,e);return()=>clearTimeout(n)},scheduleBeforeRender(t){if("undefined"==typeof window)return ea.schedule(t,0);if(void 0===window.requestAnimationFrame)return ea.schedule(t,16);const e=window.requestAnimationFrame(t);return()=>window.cancelAnimationFrame(e)}};function na(t,e,n){let i=n;return function(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}(t)&&e.some((e,n)=>!("*"===e||!function(e,n){return ta.call(t,n)}(0,e)||(i=n,0))),i}const ia=10;class sa{constructor(t,e){this.component=t,this.injector=e,this.componentFactory=e.get(We).resolveComponentFactory(t)}create(t){return new oa(this.componentFactory,t)}}class oa{constructor(t,e){this.componentFactory=t,this.injector=e,this.inputChanges=null,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.uninitializedInputs=new Set}connect(t){if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);this.componentRef||this.initializeComponent(t)}disconnect(){this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=ea.schedule(()=>{this.componentRef&&(this.componentRef.destroy(),this.componentRef=null)},ia))}getInputValue(t){return this.componentRef?this.componentRef.instance[t]:this.initialInputValues.get(t)}setInputValue(t,e){(function(t,e){return t===e||t!=t&&e!=e})(e,this.getInputValue(t))||(this.componentRef?(this.recordInputChange(t,e),this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e))}initializeComponent(t){const e=Nt.create({providers:[],parent:this.injector}),n=function(e,n){const i=t.childNodes,s=n.map(()=>[]);let o=-1;n.some((t,e)=>"*"===t&&(o=e,!0));for(let t=0,r=i.length;t<r;++t){const e=i[t],r=na(e,n,o);-1!==r&&s[r].push(e)}return s}(0,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,n,t),this.implementsOnChanges=function(t){return"function"==typeof t}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(),this.detectChanges(),this.injector.get(kn).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:t})=>{const e=this.initialInputValues.get(t);e?this.setInputValue(t,e):this.uninitializedInputs.add(t)}),this.initialInputValues.clear()}initializeOutputs(){const t=this.componentFactory.outputs.map(({propName:t,templateName:e})=>this.componentRef.instance[t].pipe(j(t=>({name:e,value:t}))));this.events=Q(...t)}callNgOnChanges(){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,this.componentRef.instance.ngOnChanges(t)}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=ea.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(this.componentRef&&!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const n=this.inputChanges[t];if(n)return void(n.currentValue=e);const i=this.uninitializedInputs.has(t);this.uninitializedInputs.delete(t);const s=i?void 0:this.getInputValue(t);this.inputChanges[t]=new Zn(s,e,i)}detectChanges(){this.componentRef&&(this.callNgOnChanges(),this.componentRef.changeDetectorRef.detectChanges())}}class ra extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}class aa{constructor(){this.layers_to_add=["osm"],this.allow_edit_drawn_items=!0,this.zoom_init=4,this.lng_lat_init=[2.9,46.5],this.lat_lng_format="dec",this.elevation_provider="openelevation",this.geolocation_provider="osm",this.location=new on,this.httpError=new on,this._osm_class_filters=[],this._geometry_filters=[],this._osm_nominatim_api_url="https://nominatim.openstreetmap.org",this._map_quest_nominatim_api_url="https://open.mapquestapi.com/nominatim/v1",this._open_elevation_api_url="https://api.open-elevation.com/api/v1",this._map_quest_elevation_api_url="https://open.mapquestapi.com/elevation/v1",this._fr_geo_api_url="https://geo.api.gouv.fr"}set layer(t){this.layers_to_add=[t]}set osm_class_filter(t){this._osm_class_filters=[t]}set geometry_filter(t){this._geometry_filters=[t]}set marker(t){"true"===t&&(this._marker=!0)}set polyline(t){"true"===t&&(this._polyline=!0)}set polygon(t){"true"===t&&(this._polygon=!0)}set lat_init(t){this.lng_lat_init[1]=t}set lng_init(t){this.lng_lat_init[0]=t}set get_osm_simple_line(t){"true"===t&&(this._get_osm_simple_line=!0)}set show_lat_lng_elevation_inputs(t){"true"===t&&(this._show_lat_lng_elevation_inputs=!0)}set osm_nominatim_api_url(t){t&&""!==t&&(this._osm_nominatim_api_url=t)}set map_quest_nominatim_api_url(t){t&&""!==t&&(this._map_quest_nominatim_api_url=t)}set open_elevation_api_url(t){t&&""!==t&&(this._open_elevation_api_url=t)}set map_quest_elevation_api_url(t){t&&""!==t&&(this._map_quest_elevation_api_url=t)}set fr_geo_api_url(t){t&&""!==t&&(this._fr_geo_api_url=t)}set reset(t){"true"===t&&(this._reset=!0)}set patchAddress(t){t&&""!==t&&(this._patch_address=t)}set setAddress(t){t&&""!==t&&(this._set_address=t)}set patchElevation(t){t&&(this._patch_elevation=t)}set patchLngLatDec(t){t&&(this._patch_lng_lat_dec=t)}set drawMarker(t){t&&(this._draw_marker=t)}set patchGeometry(t){t&&(this._patch_geometry=t)}set enabled(t){"true"===t&&(this._enabled=!0)}set height(t){t&&""!==t&&(this._height=t)}set width(t){t&&""!==t&&(this._width=t)}set inputFocus(t){"true"===t&&(this._input_focus=!0)}newLocation(t){this.location.emit(t)}newHttpError(t){this.httpError.emit(t)}}class la{constructor(t){this.injector=t;const e=function(t,e){const n=function(t,n){return e.injector.get(We).resolveComponentFactory(t).inputs}(t),i=e.strategyFactory||new sa(t,e.injector),s=function(t){const e={};return t.forEach(({propName:t,templateName:n})=>{e[n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)]=t}),e}(n);class o extends ra{constructor(t){super(),this.ngElementStrategy=i.create(t||e.injector)}attributeChangedCallback(t,n,o,r){this.ngElementStrategy||(this.ngElementStrategy=i.create(e.injector)),this.ngElementStrategy.setInputValue(s[t],o)}connectedCallback(){this.ngElementStrategy||(this.ngElementStrategy=i.create(e.injector)),this.ngElementStrategy.connect(this),this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(t=>{const e=function(t,e,n){if("function"!=typeof CustomEvent){const i=t.createEvent("CustomEvent");return i.initCustomEvent(e,!1,!1,n),i}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:n})}(this.ownerDocument,t.name,t.value);this.dispatchEvent(e)})}disconnectedCallback(){this.ngElementStrategy&&this.ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}}return o.observedAttributes=Object.keys(s),n.map(({propName:t})=>t).forEach(t=>{Object.defineProperty(o.prototype,t,{get:function(){return this.ngElementStrategy.getInputValue(t)},set:function(e){this.ngElementStrategy.setInputValue(t,e)},configurable:!0,enumerable:!0})}),o}(aa,{injector:this.injector});customElements.define("tb-geolocation-element",e)}ngDoBootstrap(){}}class ha{}class ua{}const ca="*";function da(t,e=null){return{type:2,steps:t,options:e}}function pa(t){return{type:6,styles:t,offset:null}}function ma(t){Promise.resolve(null).then(t)}class fa{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){ma(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class _a{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const s=this.players.length;0==s?ma(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==s&&this._onFinish()}),t.onDestroy(()=>{++n==s&&this._onDestroy()}),t.onStart(()=>{++i==s&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}const ga="!";function ya(t){return null!=t&&"false"!==`${t}`}function va(t,e=0){return function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):e}function ba(t){return Array.isArray(t)?t:[t]}function wa(t){return null==t?"":"string"==typeof t?t:`${t}px`}const Ea=9,xa=13,Ca=27,La=32,ka=37,Sa=38,Ta=39,Ia=40,Pa=48,Ma=57,Aa=65,Da=90;class Oa{}const Ra=void 0;var Na=["en",[["a","p"],["AM","PM"],Ra],[["AM","PM"],Ra,Ra],[["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"]],Ra,[["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"]],Ra,[["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}",Ra,"{1} 'at' {0}",Ra],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];const Fa={},za=function(){var t={Decimal:0,Percent:1,Currency:2,Scientific:3};return t[t.Decimal]="Decimal",t[t.Percent]="Percent",t[t.Currency]="Currency",t[t.Scientific]="Scientific",t}(),Va=function(){var t={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return t[t.Zero]="Zero",t[t.One]="One",t[t.Two]="Two",t[t.Few]="Few",t[t.Many]="Many",t[t.Other]="Other",t}(),Ba=function(){var t={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};return t[t.Decimal]="Decimal",t[t.Group]="Group",t[t.List]="List",t[t.PercentSign]="PercentSign",t[t.PlusSign]="PlusSign",t[t.MinusSign]="MinusSign",t[t.Exponential]="Exponential",t[t.SuperscriptingExponent]="SuperscriptingExponent",t[t.PerMille]="PerMille",t[t.Infinity]="Infinity",t[t.NaN]="NaN",t[t.TimeSeparator]="TimeSeparator",t[t.CurrencyDecimal]="CurrencyDecimal",t[t.CurrencyGroup]="CurrencyGroup",t}();function ja(t,e){const n=Ha(t),i=n[13][e];if(void 0===i){if(e===Ba.CurrencyDecimal)return n[13][Ba.Decimal];if(e===Ba.CurrencyGroup)return n[13][Ba.Group]}return i}function Ha(t){const e=t.toLowerCase().replace(/_/g,"-");let n=Fa[e];if(n)return n;const i=e.split("-")[0];if(n=Fa[i])return n;if("en"===i)return Na;throw new Error(`Missing locale data for the locale "${t}".`)}const Ua=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Za=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Ga=22,$a=".",qa="0",Wa=";",Ka=",",Ya="#";function Qa(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}const Xa=new rt("UseV4Plurals");class Ja{}class tl extends Ja{constructor(t,e){super(),this.locale=t,this.deprecatedPluralFn=e}getPluralCategory(t,e){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(e||this.locale,t):function(t){return Ha(t)[18]}(e||this.locale)(t)){case Va.Zero:return"zero";case Va.One:return"one";case Va.Two:return"two";case Va.Few:return"few";case Va.Many:return"many";default:return"other"}}}function el(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,s]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(s)}return null}class nl{constructor(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._initialClasses=[]}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Gn(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${bt(t.item)}`);this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}class il{constructor(t,e,n,i){this.$implicit=t,this.ngForOf=e,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}}class sl{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._differ=null}set ngForTrackBy(t){bn()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. `+"See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngOnChanges(t){if("ngForOf"in t){const e=t.ngForOf.currentValue;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(t){throw new Error(`Cannot find a differ supporting object '${e}' of type '${e.name||typeof e}'. NgFor only supports binding to Iterables such as Arrays.`)}}}ngDoCheck(){if(this._differ){const t=this._differ.diff(this.ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,i)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new il(null,this.ngForOf,-1,-1),i),s=new ol(t,n);e.push(s)}else if(null==i)this._viewContainer.remove(n);else{const s=this._viewContainer.get(n);this._viewContainer.move(s,i);const o=new ol(t,s);e.push(o)}});for(let n=0;n<e.length;n++)this._perViewChange(e[n].view,e[n].record);for(let n=0,i=this._viewContainer.length;n<i;n++){const t=this._viewContainer.get(n);t.context.index=n,t.context.count=i}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}}class ol{constructor(t,e){this.record=t,this.view=e}}class rl{constructor(t,e){this._viewContainer=t,this._context=new al,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){ll("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){ll("ngIfElse",t),this._elseTemplateRef=t,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)))}}class al{constructor(){this.$implicit=null,this.ngIf=null}}function ll(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bt(e)}'.`)}class hl{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}class ul{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}}class cl{constructor(t,e,n){this.ngSwitch=n,n._addCase(),this._view=new hl(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}function dl(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${bt(t)}'`)}const pl=/((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/,ml={yMMMdjms:Cl(xl([wl("year",1),El("month",3),wl("day",1),wl("hour",1),wl("minute",1),wl("second",1)])),yMdjm:Cl(xl([wl("year",1),wl("month",1),wl("day",1),wl("hour",1),wl("minute",1)])),yMMMMEEEEd:Cl(xl([wl("year",1),El("month",4),El("weekday",4),wl("day",1)])),yMMMMd:Cl(xl([wl("year",1),El("month",4),wl("day",1)])),yMMMd:Cl(xl([wl("year",1),El("month",3),wl("day",1)])),yMd:Cl(xl([wl("year",1),wl("month",1),wl("day",1)])),jms:Cl(xl([wl("hour",1),wl("second",1),wl("minute",1)])),jm:Cl(xl([wl("hour",1),wl("minute",1)]))},fl={yyyy:Cl(wl("year",4)),yy:Cl(wl("year",2)),y:Cl(wl("year",1)),MMMM:Cl(El("month",4)),MMM:Cl(El("month",3)),MM:Cl(wl("month",2)),M:Cl(wl("month",1)),LLLL:Cl(El("month",4)),L:Cl(El("month",1)),dd:Cl(wl("day",2)),d:Cl(wl("day",1)),HH:_l(gl(Cl(bl(wl("hour",2),!1)))),H:gl(Cl(bl(wl("hour",1),!1))),hh:_l(gl(Cl(bl(wl("hour",2),!0)))),h:gl(Cl(bl(wl("hour",1),!0))),jj:Cl(wl("hour",2)),j:Cl(wl("hour",1)),mm:_l(Cl(wl("minute",2))),m:Cl(wl("minute",1)),ss:_l(Cl(wl("second",2))),s:Cl(wl("second",1)),sss:Cl(wl("second",3)),EEEE:Cl(El("weekday",4)),EEE:Cl(El("weekday",3)),EE:Cl(El("weekday",2)),E:Cl(El("weekday",1)),a:function(t){return function(e,n){return t(e,n).split(" ")[1]}}(Cl(bl(wl("hour",1),!0))),Z:vl("short"),z:vl("long"),ww:Cl({}),w:Cl({}),G:Cl(El("era",1)),GG:Cl(El("era",2)),GGG:Cl(El("era",3)),GGGG:Cl(El("era",4))};function _l(t){return function(e,n){const i=t(e,n);return 1==i.length?"0"+i:i}}function gl(t){return function(e,n){return t(e,n).split(" ")[0]}}function yl(t,e,n){return new Intl.DateTimeFormat(e,n).format(t).replace(/[\u200e\u200f]/g,"")}function vl(t){const e={hour:"2-digit",hour12:!1,timeZoneName:t};return function(t,n){const i=yl(t,n,e);return i?i.substring(3):""}}function bl(t,e){return t.hour12=e,t}function wl(t,e){const n={};return n[t]=2===e?"2-digit":"numeric",n}function El(t,e){const n={};return n[t]=e<4?e>1?"short":"narrow":"long",n}function xl(t){return t.reduce((t,e)=>Object.assign({},t,e),{})}function Cl(t){return(e,n)=>yl(e,n,t)}const Ll=new Map;class kl{static format(t,e,n){return function(t,e,n){const i=ml[t];if(i)return i(e,n);const s=t;let o=Ll.get(s);if(!o){let e;o=[],pl.exec(t);let n=t;for(;n;)(e=pl.exec(n))?n=(o=o.concat(e.slice(1))).pop():(o.push(n),n=null);Ll.set(s,o)}return o.reduce((t,i)=>{const s=fl[i];return t+(s?s(e,n):function(t){return"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}(i))},"")}(n,t,e)}}class Sl{constructor(t){this._locale=t}transform(t,e="mediumDate"){if(null==t||""===t||t!=t)return null;let n;if("string"==typeof t&&(t=t.trim()),Tl(t))n=t;else if(isNaN(t-parseFloat(t)))if("string"==typeof t&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){const[e,i,s]=t.split("-").map(t=>parseInt(t,10));n=new Date(e,i-1,s)}else n=new Date(t);else n=new Date(parseFloat(t));if(!Tl(n)){let e;if("string"!=typeof t||!(e=t.match(Ua)))throw dl(Sl,t);n=function(t){const e=new Date(0);let n=0,i=0;const s=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),s.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const r=Number(t[4]||0)-n,a=Number(t[5]||0)-i,l=Number(t[6]||0),h=Math.round(1e3*parseFloat("0."+(t[7]||0)));return o.call(e,r,a,l,h),e}(e)}return kl.format(n,this._locale,Sl._ALIASES[e]||e)}}function Tl(t){return t instanceof Date&&!isNaN(t.valueOf())}Sl._ALIASES={medium:"yMMMdjms",short:"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"};const Il=new class{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}},Pl=new class{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}};class Ml{constructor(t){this._ref=t,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,Un.wrap(this._latestValue)):(t&&this._subscribe(t),this._latestReturnedValue=this._latestValue,this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,e=>this._updateLatestValue(t,e))}_selectStrategy(t){if(Pe(t))return Il;if(Me(t))return Pl;throw dl(Ml,t)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}class Al{constructor(t){this._locale=t}transform(t,e,n){if(function(t){return null==t||""===t||t!=t}(t))return null;n=n||this._locale;try{return function(t,e,n){return function(t,e,n,i,s,o,r=!1){let a="",l=!1;if(isFinite(t)){let h=function(e){let n,i,s,o,r,a=Math.abs(t)+"",l=0;for((i=a.indexOf($a))>-1&&(a=a.replace($a,"")),(s=a.search(/e/i))>0?(i<0&&(i=s),i+=+a.slice(s+1),a=a.substring(0,s)):i<0&&(i=a.length),s=0;a.charAt(s)===qa;s++);if(s===(r=a.length))n=[0],i=1;else{for(r--;a.charAt(r)===qa;)r--;for(i-=s,n=[],o=0;s<=r;s++,o++)n[o]=Number(a.charAt(s))}return i>Ga&&(n=n.splice(0,Ga-1),l=i-1,i=1),{digits:n,exponent:l,integerLen:i}}();r&&(h=function(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(h));let u=e.minInt,c=e.minFrac,d=e.maxFrac;if(o){const t=o.match(Za);if(null===t)throw new Error(`${o} is not a valid digit info`);const e=t[1],n=t[3],i=t[5];null!=e&&(u=Qa(e)),null!=n&&(c=Qa(n)),null!=i?d=Qa(i):null!=n&&c>d&&(d=c)}!function(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let i=t.digits,s=i.length-t.integerLen;const o=Math.min(Math.max(e,s),n);let r=o+t.integerLen,a=i[r];if(r>0){i.splice(Math.max(t.integerLen,r));for(let t=r;t<i.length;t++)i[t]=0}else{s=Math.max(0,s),t.integerLen=1,i.length=Math.max(1,r=o+1),i[0]=0;for(let t=1;t<r;t++)i[t]=0}if(a>=5)if(r-1<0){for(let e=0;e>r;e--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[r-1]++;for(;s<Math.max(0,o);s++)i.push(0);let l=0!==o;const h=e+t.integerLen,u=i.reduceRight(function(t,e,n,i){return i[n]=(e+=t)<10?e:e-10,l&&(0===i[n]&&n>=h?i.pop():l=!1),e>=10?1:0},0);u&&(i.unshift(u),t.integerLen++)}(h,c,d);let p=h.digits,m=h.integerLen;const f=h.exponent;let _=[];for(l=p.every(t=>!t);m<u;m++)p.unshift(0);for(;m<0;m++)p.unshift(0);m>0?_=p.splice(m,p.length):(_=p,p=[0]);const g=[];for(p.length>=e.lgSize&&g.unshift(p.splice(-e.lgSize,p.length).join(""));p.length>e.gSize;)g.unshift(p.splice(-e.gSize,p.length).join(""));p.length&&g.unshift(p.join("")),a=g.join(ja(n,i)),_.length&&(a+=ja(n,s)+_.join("")),f&&(a+=ja(n,Ba.Exponential)+"+"+f)}else a=ja(n,Ba.Infinity);return t<0&&!l?e.negPre+a+e.negSuf:e.posPre+a+e.posSuf}(t,function(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(Wa),s=i[0],o=i[1],r=-1!==s.indexOf($a)?s.split($a):[s.substring(0,s.lastIndexOf(qa)+1),s.substring(s.lastIndexOf(qa)+1)],a=r[0],l=r[1]||"";n.posPre=a.substr(0,a.indexOf(Ya));for(let u=0;u<l.length;u++){const t=l.charAt(u);t===qa?n.minFrac=n.maxFrac=u+1:t===Ya?n.maxFrac=u+1:n.posSuf+=t}const h=a.split(Ka);if(n.gSize=h[1]?h[1].length:0,n.lgSize=h[2]||h[1]?(h[2]||h[1]).length:0,o){const t=s.length-n.posPre.length-n.posSuf.length,e=o.indexOf(Ya);n.negPre=o.substr(0,e).replace(/'/g,""),n.negSuf=o.substr(e+t).replace(/'/g,"")}else n.negPre=e+n.posPre,n.negSuf=n.posSuf;return n}(function(t,e){return Ha(t)[14][e]}(e,za.Decimal),ja(e,Ba.MinusSign)),e,Ba.Group,Ba.Decimal,n)}(function(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error(`${t} is not a number`);return t}(t),n,e)}catch(t){throw dl(Al,t.message)}}}class Dl{}const Ol=new rt("DocumentToken"),Rl="browser",Nl="undefined"!=typeof Intl&&Intl.v8BreakIterator;class Fl{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function(t){return t===Rl}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Nl)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}let zl,Vl;function Bl(){if(null==zl&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>zl=!0}))}finally{zl=zl||!1}return zl}Fl.ngInjectableDef=ot({factory:function(){return new Fl(te(ze,8))},token:Fl,providedIn:"root"});const jl=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Hl(){if(Vl)return Vl;if("object"!=typeof document||!document)return Vl=new Set(jl);let t=document.createElement("input");return Vl=new Set(jl.filter(e=>(t.setAttribute("type",e),t.type===e)))}class Ul{}const Zl={};class Gl{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new $l(t,this.resultSelector))}}class $l extends B{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(Zl),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n<e;n++){const e=t[n];this.add(V(this,e,e,n))}}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,n,i,s){const o=this.values,r=this.toRespond?o[n]===Zl?--this.toRespond:this.toRespond:0;o[n]=e,0===r&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}function ql(t){return e=>e.lift(new Wl(t))}class Wl{constructor(t){this.notifier=t}call(t,e){const n=new Kl(t),i=V(n,this.notifier);return i&&!i.closed?(n.add(i),e.subscribe(n)):n}}class Kl extends B{constructor(t){super(t)}notifyNext(t,e,n,i,s){this.complete()}notifyComplete(){}}function Yl(t){const e=new E(e=>{e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}const Ql=new E(t=>t.complete());function Xl(t){return t?function(t){return new E(e=>t.schedule(()=>e.complete()))}(t):Ql}function Jl(...t){let e=t[t.length-1];switch(I(e)?t.pop():e=void 0,t.length){case 0:return Xl(e);case 1:return e?Z(t,e):Yl(t[0]);default:return Z(t,e)}}function th(...t){return e=>{let n=t[t.length-1];I(n)?t.pop():n=null;const i=t.length;return function(...t){return 1===t.length||2===t.length&&I(t[1])?G(t[0]):Y(1)(Jl(...t))}(1!==i||n?i>0?Z(t,n):Xl(n):Yl(t[0]),e)}}const eh=new Set;let nh;class ih{constructor(t){this.platform=t,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):sh}matchMedia(t){return this.platform.WEBKIT&&function(t){if(!eh.has(t))try{nh||((nh=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(nh)),nh.sheet&&(nh.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),eh.add(t))}catch(t){console.error(t)}}(t),this._matchMedia(t)}}function sh(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}ih.ngInjectableDef=ot({factory:function(){return new ih(te(Fl))},token:ih,providedIn:"root"});class oh{constructor(t,e){this.mediaMatcher=t,this.zone=e,this._queries=new Map,this._destroySubject=new S}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return rh(ba(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){return function(...t){let e=null,n=null;return I(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),Z(t,n).lift(new Gl(e))}(rh(ba(t)).map(t=>this._registerQuery(t).observable)).pipe(j(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(t=>{e.matches=e.matches||t.matches,e.breakpoints[t.query]=t.matches}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this.mediaMatcher.matchMedia(t),n={observable:function t(e,n,s){return s?t(e,n).pipe(j(t=>l(t)?s(...t):s(t))):new E(t=>{const s=(...e)=>t.next(1===e.length?e[0]:e);let o;try{o=e(s)}catch(e){return void t.error(e)}if(i(n))return()=>n(s,o)})}(t=>{e.addListener(e=>this.zone.run(()=>t(e)))},t=>{e.removeListener(e=>this.zone.run(()=>t(e)))}).pipe(ql(this._destroySubject),th(e),j(e=>({query:t,matches:e.matches}))),mql:e};return this._queries.set(t,n),n}}function rh(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}oh.ngInjectableDef=ot({factory:function(){return new oh(te(ih),te(rn))},token:oh,providedIn:"root"});const ah={XSmall:"(max-width: 599px)",Small:"(min-width: 600px) and (max-width: 959px)",Medium:"(min-width: 960px) and (max-width: 1279px)",Large:"(min-width: 1280px) and (max-width: 1919px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599px) and (orientation: portrait), (max-width: 959px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};function lh(t,e,n,s){return i(n)&&(s=n,n=void 0),s?lh(t,e,n).pipe(j(t=>l(t)?s(...t):s(t))):new E(i=>{!function t(e,n,i,s,o){let r;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){const t=e;e.addEventListener(n,i,o),r=(()=>t.removeEventListener(n,i,o))}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){const t=e;e.on(n,i),r=(()=>t.off(n,i))}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){const t=e;e.addListener(n,i),r=(()=>t.removeListener(n,i))}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(let r=0,a=e.length;r<a;r++)t(e[r],n,i,s,o)}s.add(r)}(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}Object;class hh extends f{constructor(t,e){super()}schedule(t,e=0){return this}}class uh extends hh{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,i=void 0;try{this.work(t)}catch(t){n=!0,i=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}class ch{constructor(t,e=ch.now){this.SchedulerAction=t,this.now=e}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}ch.now=Date.now?Date.now:()=>+new Date;class dh extends ch{constructor(t,e=ch.now){super(t,()=>dh.delegate&&dh.delegate!==this?dh.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return dh.delegate&&dh.delegate!==this?dh.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const ph=new dh(uh);class mh{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new fh(t,this.durationSelector))}}class fh extends B{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){const e=p(this.durationSelector)(t);if(e===u)this.destination.error(u.e);else{const t=V(this,e);t.closed?this.clearThrottle():this.add(this.throttled=t)}}}clearThrottle(){const{value:t,hasValue:e,throttled:n}=this;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))}notifyNext(t,e,n,i){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function _h(t){return!l(t)&&t-parseFloat(t)+1>=0}function gh(t){const{index:e,period:n,subscriber:i}=t;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function yh(t,e=ph){return function(t){return function(e){return e.lift(new mh(t))}}(()=>(function(t=0,e,n){let i=-1;return _h(e)?i=Number(e)<1?1:Number(e):I(e)&&(n=e),I(n)||(n=ph),new E(e=>{const s=_h(t)?t:+t-n.now();return n.schedule(gh,s,{index:0,period:i,subscriber:e})})})(t,e))}function vh(t,e){return function(n){return n.lift(new bh(t,e))}}class bh{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new wh(t,this.predicate,this.thisArg))}}class wh extends y{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)}}const Eh=20;class xh{constructor(t,e){this._ngZone=t,this._platform=e,this._scrolled=new S,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}register(t){const e=t.elementScrolled().subscribe(()=>this._scrolled.next(t));this.scrollContainers.set(t,e)}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=Eh){return this._platform.isBrowser?E.create(e=>{this._globalSubscription||this._addGlobalListener();const n=t>0?this._scrolled.pipe(yh(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Jl()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(vh(t=>!t||n.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((n,i)=>{this._scrollableContainsElement(i,t)&&e.push(i)}),e}_scrollableContainsElement(t,e){let n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>lh(window.document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}xh.ngInjectableDef=ot({factory:function(){return new xh(te(rn),te(Fl))},token:xh,providedIn:"root"});const Ch=20;class Lh{constructor(t,e){this._platform=t,this._change=t.isBrowser?e.runOutsideAngular(()=>Q(lh(window,"resize"),lh(window,"orientationchange"))):Jl(),this._invalidateCache=this.change().subscribe(()=>this._updateViewportSize())}ngOnDestroy(){this._invalidateCache.unsubscribe()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:n}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+n,right:t.left+e,height:n,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=document.documentElement.getBoundingClientRect();return{top:-t.top||document.body.scrollTop||window.scrollY||document.documentElement.scrollTop||0,left:-t.left||document.body.scrollLeft||window.scrollX||document.documentElement.scrollLeft||0}}change(t=Ch){return t>0?this._change.pipe(yh(t)):this._change}_updateViewportSize(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}}}Lh.ngInjectableDef=ot({factory:function(){return new Lh(te(Fl),te(rn))},token:Lh,providedIn:"root"});class kh{}class Sh extends Error{constructor(){super("argument out of range"),this.name="ArgumentOutOfRangeError",Object.setPrototypeOf(this,Sh.prototype)}}function Th(t){return e=>0===t?Xl():e.lift(new Ih(t))}class Ih{constructor(t){if(this.total=t,this.total<0)throw new Sh}call(t,e){return e.subscribe(new Ph(t,this.total))}}class Ph extends y{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function Mh(){throw Error("Host already has a portal attached")}class Ah{attach(t){return null==t&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),t.hasAttached()&&Mh(),this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null==t?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class Dh extends Ah{constructor(t,e,n){super(),this.component=t,this.viewContainerRef=e,this.injector=n}}class Oh extends Ah{constructor(t,e,n){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class Rh{constructor(){this._isDisposed=!1}hasAttached(){return!!this._attachedPortal}attach(t){return t||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&Mh(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),t instanceof Dh?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Oh?(this._attachedPortal=t,this.attachTemplatePortal(t)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Nh extends Rh{constructor(t,e,n,i){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=n,this._defaultInjector=i}attachComponentPortal(t){let e,n=this._componentFactoryResolver.resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(n,t.viewContainerRef.length,t.injector||t.viewContainerRef.parentInjector),this.setDisposeFn(()=>e.destroy())):(e=n.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(()=>{this._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context);return n.detectChanges(),n.rootNodes.forEach(t=>this.outletElement.appendChild(t)),this.setDisposeFn(()=>{let t=e.indexOf(n);-1!==t&&e.remove(t)}),n}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}class Fh{}class zh{enable(){}disable(){}attach(){}}class Vh{constructor(t){this.scrollStrategy=new zh,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",t&&Object.keys(t).filter(e=>void 0!==t[e]).forEach(e=>this[e]=t[e])}}class Bh{constructor(t,e,n,i){this.offsetX=n,this.offsetY=i,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class jh{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}function Hh(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error(`ConnectedPosition: Invalid ${t} "${e}". `+'Expected "top", "bottom" or "center".')}function Uh(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error(`ConnectedPosition: Invalid ${t} "${e}". `+'Expected "start", "end" or "center".')}class Zh{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=wa(-this._previousScrollPosition.left),t.style.top=wa(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=this._document.body,n=t.style.scrollBehavior||"",i=e.style.scrollBehavior||"";this._isEnabled=!1,t.style.left=this._previousHTMLStyles.left,t.style.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),t.style.scrollBehavior=e.style.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),t.style.scrollBehavior=n,e.style.scrollBehavior=i}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}function Gh(){return Error("Scroll strategy has already been attached.")}class $h{constructor(t,e,n,i){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=i,this._scrollSubscription=null,this._detach=(()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())})}attach(t){if(this._overlayRef)throw Gh();this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}}function qh(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function Wh(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class Kh{constructor(t,e,n,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=i,this._scrollSubscription=null}attach(t){if(this._overlayRef)throw Gh();this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:n}=this._viewportRuler.getViewportSize();qh(t,[{width:e,height:n,bottom:n,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}}class Yh{constructor(t,e,n,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=(()=>new zh),this.close=(t=>new $h(this._scrollDispatcher,this._ngZone,this._viewportRuler,t)),this.block=(()=>new Zh(this._viewportRuler,this._document)),this.reposition=(t=>new Kh(this._scrollDispatcher,this._viewportRuler,this._ngZone,t)),this._document=i}}Yh.ngInjectableDef=ot({factory:function(){return new Yh(te(xh),te(Lh),te(rn),te(Ol))},token:Yh,providedIn:"root"});class Qh{constructor(t){this._attachedOverlays=[],this._keydownListener=(t=>{const e=this._attachedOverlays;for(let n=e.length-1;n>-1;n--)if(e[n]._keydownEventSubscriptions>0){e[n]._keydownEvents.next(t);break}}),this._document=t}ngOnDestroy(){this._detach()}add(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener,!0),this._isAttached=!0),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()}_detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener,!0),this._isAttached=!1)}}Qh.ngInjectableDef=ot({factory:function(){return new Qh(te(Ol))},token:Qh,providedIn:"root"});class Xh{constructor(t){this._document=t}ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t}}Xh.ngInjectableDef=ot({factory:function(){return new Xh(te(Ol))},token:Xh,providedIn:"root"});class Jh{constructor(t,e,n,i,s,o,r){this._portalOutlet=t,this._host=e,this._pane=n,this._config=i,this._ngZone=s,this._keyboardDispatcher=o,this._document=r,this._backdropElement=null,this._backdropClick=new S,this._attachments=new S,this._detachments=new S,this._keydownEventsObservable=E.create(t=>{const e=this._keydownEvents.subscribe(t);return this._keydownEventSubscriptions++,()=>{e.unsubscribe(),this._keydownEventSubscriptions--}}),this._keydownEvents=new S,this._keydownEventSubscriptions=0,i.scrollStrategy&&i.scrollStrategy.attach(this)}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){let e=this._portalOutlet.attach(t);return this._config.positionStrategy&&this._config.positionStrategy.attach(this),!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(Th(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._config.positionStrategy&&this._config.positionStrategy.detach&&this._config.positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1);const t=this._portalOutlet.detach();this._detachments.next(),this._keyboardDispatcher.remove(this);const e=this._ngZone.onStable.asObservable().pipe(ql(Q(this._attachments,this._detachments))).subscribe(()=>{this._pane&&this._host&&0!==this._pane.children.length||(this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._previousHostParent.removeChild(this._host)),e.unsubscribe())});return t}dispose(){const t=this.hasAttached();this._config.positionStrategy&&this._config.positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick.asObservable()}attachments(){return this._attachments.asObservable()}detachments(){return this._detachments.asObservable()}keydownEvents(){return this._keydownEventsObservable}getConfig(){return this._config}updatePosition(){this._config.positionStrategy&&this._config.positionStrategy.apply()}updateSize(t){this._config=Object.assign({},this._config,t),this._updateElementSize()}setDirection(t){this._config=Object.assign({},this._config,{direction:t}),this._updateElementDirection()}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){const t=this._pane.style;t.width=wa(this._config.width),t.height=wa(this._config.height),t.minWidth=wa(this._config.minWidth),t.minHeight=wa(this._config.minHeight),t.maxWidth=wa(this._config.maxWidth),t.maxHeight=wa(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"auto":"none"}_attachBackdrop(){this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",t=>this._backdropClick.next(t)),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t=this._backdropElement;if(t){let e,n=()=>{t&&t.parentNode&&t.parentNode.removeChild(t),this._backdropElement==t&&(this._backdropElement=null),clearTimeout(e)};t.classList.remove("cdk-overlay-backdrop-showing"),this._config.backdropClass&&this._toggleClasses(t,this._config.backdropClass,!1),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",n)}),t.style.pointerEvents="none",e=this._ngZone.runOutsideAngular(()=>setTimeout(n,500))}}_toggleClasses(t,e,n){const i=t.classList;ba(e).forEach(t=>{n?i.add(t):i.remove(t)})}}class tu{constructor(t,e,n,i,s){this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=s,this._isInitialRender=!0,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this.scrollables=[],this._preferredPositions=[],this._positionChanges=new S,this._resizeSubscription=f.EMPTY,this._offsetX=0,this._offsetY=0,this._positionChangeSubscriptions=0,this.positionChanges=E.create(t=>{const e=this._positionChanges.subscribe(t);return this._positionChangeSubscriptions++,()=>{e.unsubscribe(),this._positionChangeSubscriptions--}}),this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>this.apply())}apply(){if(this._isDisposed||this._platform&&!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect();const t=this._originRect,e=this._overlayRect,n=this._viewportRect,i=[];let s;for(let o of this._preferredPositions){let r=this._getOriginPoint(t,o),a=this._getOverlayPoint(r,e,o),l=this._getOverlayFit(a,e,n,o);if(l.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(o,r);this._canFitWithFlexibleDimensions(l,a,n)?i.push({position:o,origin:r,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(r,o)}):(!s||s.overlayFit.visibleArea<l.visibleArea)&&(s={overlayFit:l,overlayPoint:a,originPoint:r,position:o,overlayRect:e})}if(i.length){let t=null,e=-1;for(const n of i){const i=n.boundingBoxRect.width*n.boundingBoxRect.height*(n.position.weight||1);i>e&&(e=i,t=n)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(s.position,s.originPoint);this._applyPosition(s.position,s.originPoint)}detach(){this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this.detach(),this._boundingBox=null,this._positionChanges.complete(),this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){this.scrollables=t}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t instanceof Mn?t.nativeElement:t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let n,i;if("center"==e.originX)n=t.left+t.width/2;else{const i=this._isRtl()?t.right:t.left,s=this._isRtl()?t.left:t.right;n="start"==e.originX?i:s}return{x:n,y:i="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}_getOverlayPoint(t,e,n){let i,s;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+(s="center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}}_getOverlayFit(t,e,n,i){let{x:s,y:o}=t,r=this._getOffset(i,"x"),a=this._getOffset(i,"y");r&&(s+=r),a&&(o+=a);let l=0-o,h=o+e.height-n.height,u=this._subtractOverflows(e.width,0-s,s+e.width-n.width),c=this._subtractOverflows(e.height,l,h),d=u*c;return{visibleArea:d,isCompletelyWithinViewport:e.width*e.height===d,fitsInViewportVertically:c===e.height,fitsInViewportHorizontally:u==e.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){const i=n.bottom-e.y,s=n.right-e.x,o=this._overlayRef.getConfig().minHeight,r=this._overlayRef.getConfig().minWidth;return(t.fitsInViewportVertically||null!=o&&o<=i)&&(t.fitsInViewportHorizontally||null!=r&&r<=s)}}_pushOverlayOnScreen(t,e){const n=this._viewportRect,i=Math.max(t.x+e.width-n.right,0),s=Math.max(t.y+e.height-n.bottom,0),o=Math.max(n.top-t.y,0),r=Math.max(n.left-t.x,0);let a,l=0;return{x:t.x+(a=e.width<=n.width?r||-i:n.left-t.x),y:t.y+(l=e.height<=n.height?o||-s:n.top-t.y)}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),this._lastPosition=t,this._positionChangeSubscriptions>0){const e=this._getScrollVisibility(),n=new jh(t,e);this._positionChanges.next(n)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let n,i=t.overlayY;n="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let s=0;s<e.length;s++)e[s].style.transformOrigin=`${n} ${i}`}_calculateBoundingBoxRect(t,e){const n=this._viewportRect,i=this._isRtl();let s,o,r,a,l,h;if("top"===e.overlayY)o=t.y,s=n.bottom-t.y;else if("bottom"===e.overlayY)s=n.height-(r=n.height-t.y+2*this._viewportMargin)+this._viewportMargin;else{const e=Math.min(n.bottom-t.y,t.y-n.left),i=this._lastBoundingBoxSize.height;o=t.y-e,(s=2*e)>i&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-i/2)}if("end"===e.overlayX&&!i||"start"===e.overlayX&&i)h=n.right-t.x+this._viewportMargin,a=t.x-n.left;else if("start"===e.overlayX&&!i||"end"===e.overlayX&&i)l=t.x,a=n.right-t.x;else{const e=Math.min(n.right-t.x,t.x-n.top),i=this._lastBoundingBoxSize.width;l=t.x-e,(a=2*e)>i&&!this._isInitialRender&&!this._growAfterOpen&&(l=t.x-i/2)}return{top:o,left:l,bottom:r,right:h,width:a,height:s}}_setBoundingBoxStyles(t,e){const n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));const i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right="",i.width=i.height="100%";else{const t=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=wa(n.height),i.top=wa(n.top),i.bottom=wa(n.bottom),i.width=wa(n.width),i.left=wa(n.left),i.right=wa(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(i.maxHeight=wa(t)),s&&(i.maxWidth=wa(s))}this._lastBoundingBoxSize=n,eu(this._boundingBox.style,i)}_resetBoundingBoxStyles(){eu(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){eu(this._pane.style,{top:"",left:"",bottom:"",right:"",position:""})}_setOverlayElementStyles(t,e){const n={};this._hasExactPosition()?(eu(n,this._getExactOverlayY(e,t)),eu(n,this._getExactOverlayX(e,t))):n.position="static";let i="",s=this._getOffset(e,"x"),o=this._getOffset(e,"y");s&&(i+=`translateX(${s}px) `),o&&(i+=`translateY(${o}px)`),n.transform=i.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),eu(this._pane.style,n)}_getExactOverlayY(t,e){let n={top:null,bottom:null},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect));let s=this._overlayContainer?this._overlayContainer.getContainerElement().getBoundingClientRect().top:0;return i.y-=s,"bottom"===t.overlayY?n.bottom=`${this._document.documentElement.clientHeight-(i.y+this._overlayRect.height)}px`:n.top=wa(i.y),n}_getExactOverlayX(t,e){let n,i={left:null,right:null},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect)),"right"==(n=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right=`${this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)}px`:i.left=wa(s.x),i}_getScrollVisibility(){const t=this._origin.getBoundingClientRect(),e=this._pane.getBoundingClientRect(),n=this.scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Wh(t,n),isOriginOutsideView:qh(t,n),isOverlayClipped:Wh(e,n),isOverlayOutsideView:qh(e,n)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){if(!this._preferredPositions.length)throw Error("FlexibleConnectedPositionStrategy: At least one position is required.");this._preferredPositions.forEach(t=>{Uh("originX",t.originX),Hh("originY",t.originY),Uh("overlayX",t.overlayX),Hh("overlayY",t.overlayY)})}}function eu(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}class nu{constructor(t,e,n,i,s,o){this._preferredPositions=[],this._positionStrategy=new tu(n,i,s,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e)}get _isRtl(){return"rtl"===this._overlayRef.getDirection()}get onPositionChange(){return this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,n,i){const s=new Bh(t,e,n,i);return this._preferredPositions.push(s),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}class iu{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper")}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig();t.position=this._cssPosition,t.marginLeft="100%"===n.width?"0":this._leftOffset,t.marginTop="100%"===n.height?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,"100%"===n.width?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems="100%"===n.height?"flex-start":this._alignItems}dispose(){}}class su{constructor(t,e,n,i){this._viewportRuler=t,this._document=e,this._platform=n,this._overlayContainer=i}global(){return new iu}connectedTo(t,e,n){return new nu(e,n,t,this._viewportRuler,this._document)}flexibleConnectedTo(t){return new tu(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}su.ngInjectableDef=ot({factory:function(){return new su(te(Lh),te(Ol),te(Fl,8),te(Xh,8))},token:su,providedIn:"root"});let ou=0;class ru{constructor(t,e,n,i,s,o,r,a,l){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=n,this._positionBuilder=i,this._keyboardDispatcher=s,this._injector=o,this._ngZone=r,this._document=a,this._directionality=l}create(t){const e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),s=new Vh(t);return s.direction=s.direction||this._directionality.value,new Jh(i,e,n,s,this._ngZone,this._keyboardDispatcher,this._document)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id=`cdk-overlay-${ou++}`,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(kn)),new Nh(t,this._componentFactoryResolver,this._appRef,this._injector)}}const au=new rt("cdk-connected-overlay-scroll-strategy");function lu(t){return()=>t.scrollStrategies.reposition()}class hu{}const uu=20,cu="mat-tooltip-panel";function du(t){return Error(`Tooltip position "${t}" is invalid.`)}const pu=new rt("mat-tooltip-scroll-strategy");function mu(t){return()=>t.scrollStrategies.reposition({scrollThrottle:uu})}const fu=new rt("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}});class _u{constructor(t,e,n,i,s,o,r,a,l,h,u){this._overlay=t,this._elementRef=e,this._scrollDispatcher=n,this._viewContainerRef=i,this._ngZone=s,this._platform=o,this._ariaDescriber=r,this._focusMonitor=a,this._scrollStrategy=l,this._dir=h,this._defaultOptions=u,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this._message="",this._manualListeners=new Map,this._destroyed=new S;const c=e.nativeElement;o.IOS?"INPUT"!==c.nodeName&&"TEXTAREA"!==c.nodeName||(c.style.webkitUserSelect=c.style.userSelect=""):(this._manualListeners.set("mouseenter",()=>this.show()),this._manualListeners.set("mouseleave",()=>this.hide()),this._manualListeners.forEach((t,n)=>e.nativeElement.addEventListener(n,t))),c.draggable&&"none"===c.style.webkitUserDrag&&(c.style.webkitUserDrag=""),a.monitor(c).pipe(ql(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&s.run(()=>this.show()):s.run(()=>this.hide(0))})}get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}get disabled(){return this._disabled}set disabled(t){this._disabled=ya(t),this._disabled&&this.hide(0)}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?`${t}`.trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ariaDescriber.describe(this._elementRef.nativeElement,this.message))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._platform.IOS||(this._manualListeners.forEach((t,e)=>this._elementRef.nativeElement.removeEventListener(e,t)),this._manualListeners.clear()),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)}show(t=this.showDelay){if(this.disabled||!this.message)return;const e=this._createOverlay();this._detach(),this._portal=this._portal||new Dh(gu,this._viewContainerRef),this._tooltipInstance=e.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(ql(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}hide(t=this.hideDelay){this._tooltipInstance&&this._tooltipInstance.hide(t)}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_handleKeydown(t){this._isTooltipVisible()&&t.keyCode===Ca&&(t.stopPropagation(),this.hide(0))}_handleTouchend(){this.hide(this._defaultOptions.touchendHideDelay)}_createOverlay(){if(this._overlayRef)return this._overlayRef;const t=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8),e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);return t.withScrollableContainers(e),t.positionChanges.pipe(ql(this._destroyed)).subscribe(t=>{this._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:t,panelClass:cu,scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(ql(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(){const t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign({},e.main,n.main),Object.assign({},e.fallback,n.fallback)])}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let n;if("above"==e||"below"==e)n={originX:"center",originY:"above"==e?"top":"bottom"};else if("before"==e||"left"==e&&t||"right"==e&&!t)n={originX:"start",originY:"center"};else{if(!("after"==e||"right"==e&&t||"left"==e&&!t))throw du(e);n={originX:"end",originY:"center"}}const{x:i,y:s}=this._invertPosition(n.originX,n.originY);return{main:n,fallback:{originX:i,originY:s}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let n;if("above"==e)n={overlayX:"center",overlayY:"bottom"};else if("below"==e)n={overlayX:"center",overlayY:"top"};else if("before"==e||"left"==e&&t||"right"==e&&!t)n={overlayX:"end",overlayY:"center"};else{if(!("after"==e||"right"==e&&t||"left"==e&&!t))throw du(e);n={overlayX:"start",overlayY:"center"}}const{x:i,y:s}=this._invertPosition(n.overlayX,n.overlayY);return{main:n,fallback:{overlayX:i,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(Th(1),ql(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}}class gu{constructor(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new S,this._isHandset=this._breakpointObserver.observe(ah.Handset)}show(t){this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(()=>{this._visibility="visible",this._markForCheck()},t)}hide(t){this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._visibility="hidden",this._markForCheck()},t)}afterHidden(){return this._onHide.asObservable()}isVisible(){return"visible"===this._visibility}_animationStart(){this._closeOnInteraction=!1}_animationDone(t){const e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}}class yu{}function vu(t,e=ph){return n=>n.lift(new bu(t,e))}class bu{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new wu(t,this.dueTime,this.scheduler))}}class wu extends y{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Eu,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function Eu(t){t.debouncedNext()}class xu{create(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}xu.ngInjectableDef=ot({factory:function(){return new xu},token:xu,providedIn:"root"});class Cu{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,e)=>this._cleanupObserver(e))}observe(t){return E.create(e=>{const n=this._observeElement(t).subscribe(e);return()=>{n.unsubscribe(),this._unobserveElement(t)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const e=new S,n=this._mutationObserverFactory.create(t=>e.next(t));n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:e,stream:n}=this._observedElements.get(t);e&&e.disconnect(),n.complete(),this._observedElements.delete(t)}}}Cu.ngInjectableDef=ot({factory:function(){return new Cu(te(xu))},token:Cu,providedIn:"root"});class Lu{}const ku=new rt("cdk-dir-doc",{providedIn:"root",factory:function(){return te(Ol)}});class Su{constructor(t){if(this.value="ltr",this.change=new on,t){const e=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===e||"rtl"===e?e:"ltr"}}ngOnDestroy(){this.change.complete()}}Su.ngInjectableDef=ot({factory:function(){return new Su(te(ku,8))},token:Su,providedIn:"root"});class Tu{}function Iu(t,e,n){return function(i){return i.lift(new Pu(t,e,n))}}class Pu{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new Mu(t,this.nextOrObserver,this.error,this.complete))}}class Mu extends y{constructor(t,e,n,s){super(t),this._tapNext=w,this._tapError=w,this._tapComplete=w,this._tapError=n||w,this._tapComplete=s||w,i(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||w,this._tapError=e.error||w,this._tapComplete=e.complete||w)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}const Au=" ";function Du(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}const Ou="cdk-describedby-message-container",Ru="cdk-describedby-message",Nu="cdk-describedby-host";let Fu=0;const zu=new Map;let Vu=null;class Bu{constructor(t){this._document=t}describe(t,e){this._canBeDescribed(t,e)&&(zu.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))}removeDescription(t,e){if(!this._canBeDescribed(t,e))return;this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e);const n=zu.get(e);n&&0===n.referenceCount&&this._deleteMessageElement(e),Vu&&0===Vu.childNodes.length&&this._deleteMessagesContainer()}ngOnDestroy(){const t=this._document.querySelectorAll(`[${Nu}]`);for(let e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute(Nu);Vu&&this._deleteMessagesContainer(),zu.clear()}_createMessageElement(t){const e=this._document.createElement("div");e.setAttribute("id",`${Ru}-${Fu++}`),e.appendChild(this._document.createTextNode(t)),this._createMessagesContainer(),Vu.appendChild(e),zu.set(t,{messageElement:e,referenceCount:0})}_deleteMessageElement(t){const e=zu.get(t),n=e&&e.messageElement;Vu&&n&&Vu.removeChild(n),zu.delete(t)}_createMessagesContainer(){if(!Vu){const t=this._document.getElementById(Ou);t&&t.parentNode.removeChild(t),(Vu=this._document.createElement("div")).id=Ou,Vu.setAttribute("aria-hidden","true"),Vu.style.display="none",this._document.body.appendChild(Vu)}}_deleteMessagesContainer(){Vu&&Vu.parentNode&&(Vu.parentNode.removeChild(Vu),Vu=null)}_removeCdkDescribedByReferenceIds(t){const e=Du(t,"aria-describedby").filter(t=>0!=t.indexOf(Ru));t.setAttribute("aria-describedby",e.join(" "))}_addMessageReference(t,e){const n=zu.get(e);!function(t,e,n){const i=Du(t,e);i.some(t=>t.trim()==n.trim())||(i.push(n.trim()),t.setAttribute(e,i.join(Au)))}(t,"aria-describedby",n.messageElement.id),t.setAttribute(Nu,""),n.referenceCount++}_removeMessageReference(t,e){const n=zu.get(e);n.referenceCount--,function(t,e,n){const i=Du(t,e).filter(t=>t!=n.trim());t.setAttribute(e,i.join(Au))}(t,"aria-describedby",n.messageElement.id),t.removeAttribute(Nu)}_isElementDescribedByMessage(t,e){const n=Du(t,"aria-describedby"),i=zu.get(e),s=i&&i.messageElement.id;return!!s&&-1!=n.indexOf(s)}_canBeDescribed(t,e){return t.nodeType===this._document.ELEMENT_NODE&&null!=e&&!!`${e}`.trim()}}Bu.ngInjectableDef=ot({factory:function(){return new Bu(te(Ol))},token:Bu,providedIn:"root"});class ju{constructor(t){this._items=t,this._activeItemIndex=-1,this._wrap=!1,this._letterKeyStream=new S,this._typeaheadSubscription=f.EMPTY,this._vertical=!0,this._skipPredicateFn=(t=>t.disabled),this._pressedLetters=[],this.tabOut=new S,this.change=new S,t instanceof An&&t.changes.subscribe(t=>{if(this._activeItem){const e=t.toArray().indexOf(this._activeItem);e>-1&&e!==this._activeItemIndex&&(this._activeItemIndex=e)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withTypeAhead(t=200){if(this._items.length&&this._items.some(t=>"function"!=typeof t.getLabel))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Iu(t=>this._pressedLetters.push(t)),vu(t),vh(()=>this._pressedLetters.length>0),j(()=>this._pressedLetters.join(""))).subscribe(t=>{const e=this._getItemsArray();for(let n=1;n<e.length+1;n++){const i=(this._activeItemIndex+n)%e.length,s=e[i];if(!this._skipPredicateFn(s)&&0===s.getLabel().toUpperCase().trim().indexOf(t)){this.setActiveItem(i);break}}this._pressedLetters=[]}),this}setActiveItem(t){const e=this._activeItemIndex;this.updateActiveItem(t),this._activeItemIndex!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){const e=t.keyCode;switch(e){case Ea:return void this.tabOut.next();case Ia:if(this._vertical){this.setNextItemActive();break}return;case Sa:if(this._vertical){this.setPreviousItemActive();break}return;case Ta:if("ltr"===this._horizontal){this.setNextItemActive();break}if("rtl"===this._horizontal){this.setPreviousItemActive();break}return;case ka:if("ltr"===this._horizontal){this.setPreviousItemActive();break}if("rtl"===this._horizontal){this.setNextItemActive();break}return;default:return void(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=Aa&&e<=Da||e>=Pa&&e<=Ma)&&this._letterKeyStream.next(String.fromCharCode(e)))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t);this._activeItemIndex=n,this._activeItem=e[n]}updateActiveItemIndex(t){this.updateActiveItem(t)}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let n=1;n<=e.length;n++){const i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof An?this._items.toArray():this._items}}class Hu extends ju{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class Uu extends ju{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}class Zu{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const e=function(t){try{return t.frameElement}catch(t){return null}}(t.ownerDocument.defaultView||window);if(e){const t=e&&e.nodeName.toLowerCase();if(-1===$u(e))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===t)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(e))return!1}let n=t.nodeName.toLowerCase(),i=$u(t);if(t.hasAttribute("contenteditable"))return-1!==i;if("iframe"===n)return!1;if("audio"===n){if(!t.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===n){if(!t.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==n||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){let e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&t.tabIndex>=0}isFocusable(t){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){let e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||Gu(t))}(t)&&!this.isDisabled(t)&&this.isVisible(t)}}function Gu(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function $u(t){if(!Gu(t))return null;const e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}Zu.ngInjectableDef=ot({factory:function(){return new Zu(te(Fl))},token:Zu,providedIn:"root"});class qu{constructor(t,e,n,i,s=!1){this._element=t,this._checker=e,this._ngZone=n,this._document=i,this._hasAttached=!1,this._enabled=!0,s||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._startAnchor.tabIndex=this._endAnchor.tabIndex=this._enabled?0:-1)}destroy(){this._startAnchor&&this._startAnchor.parentNode&&this._startAnchor.parentNode.removeChild(this._startAnchor),this._endAnchor&&this._endAnchor.parentNode&&this._endAnchor.parentNode.removeChild(this._endAnchor),this._startAnchor=this._endAnchor=null}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",()=>this.focusLastTabbableElement())),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",()=>this.focusFirstTabbableElement()))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement()))})}focusFirstTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement()))})}focusLastTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement()))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], `+`[cdkFocusRegion${t}], `+`[cdk-focus-${t}]`);for(let n=0;n<e.length;n++)e[n].hasAttribute(`cdk-focus-${t}`)?console.warn(`Found use of deprecated attribute 'cdk-focus-${t}', `+`use 'cdkFocusRegion${t}' instead. The deprecated `+"attribute will be removed in 7.0.0.",e[n]):e[n].hasAttribute(`cdk-focus-region-${t}`)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${t}', `+`use 'cdkFocusRegion${t}' instead. The deprecated attribute `+"will be removed in 7.0.0.",e[n]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return t?(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 7.0.0",t),t.focus(),!0):this.focusFirstTabbableElement()}focusFirstTabbableElement(){const t=this._getRegionBoundary("start");return t&&t.focus(),!!t}focusLastTabbableElement(){const t=this._getRegionBoundary("end");return t&&t.focus(),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let n=0;n<e.length;n++){let t=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(t)return t}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let n=e.length-1;n>=0;n--){let t=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(t)return t}return null}_createAnchor(){const t=this._document.createElement("div");return t.tabIndex=this._enabled?0:-1,t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.asObservable().pipe(Th(1)).subscribe(t)}}class Wu{constructor(t,e,n){this._checker=t,this._ngZone=e,this._document=n}create(t,e=!1){return new qu(t,this._checker,this._ngZone,this._document,e)}}Wu.ngInjectableDef=ot({factory:function(){return new Wu(te(Zu),te(rn),te(Ol))},token:Wu,providedIn:"root"});const Ku=new rt("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}});class Yu{constructor(t,e){this._document=e,this._liveElement=t||this._createLiveElement()}announce(t,e="polite"){return this._liveElement.textContent="",this._liveElement.setAttribute("aria-live",e),new Promise(e=>{setTimeout(()=>{this._liveElement.textContent=t,e()},100)})}ngOnDestroy(){this._liveElement&&this._liveElement.parentNode&&this._liveElement.parentNode.removeChild(this._liveElement)}_createLiveElement(){const t=this._document.getElementsByClassName("cdk-live-announcer-element");for(let n=0;n<t.length;n++)t[n].parentNode.removeChild(t[n]);const e=this._document.createElement("div");return e.classList.add("cdk-live-announcer-element"),e.classList.add("cdk-visually-hidden"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),e}}Yu.ngInjectableDef=ot({factory:function(){return new Yu(te(Ku,8),te(Ol))},token:Yu,providedIn:"root"});const Qu=650;class Xu{constructor(t,e){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._unregisterGlobalListeners=(()=>{}),this._monitoredElementCount=0}monitor(t,e=!1){if(!this._platform.isBrowser)return Jl(null);if(this._elementInfo.has(t)){let n=this._elementInfo.get(t);return n.checkChildren=e,n.subject.asObservable()}let n={unlisten:()=>{},checkChildren:e,subject:new S};this._elementInfo.set(t,n),this._incrementMonitoredElementCount();let i=e=>this._onFocus(e,t),s=e=>this._onBlur(e,t);return this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",i,!0),t.addEventListener("blur",s,!0)}),n.unlisten=(()=>{t.removeEventListener("focus",i,!0),t.removeEventListener("blur",s,!0)}),n.subject.asObservable()}stopMonitoring(t){const e=this._elementInfo.get(t);e&&(e.unlisten(),e.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._decrementMonitoredElementCount())}focusVia(t,e,n){this._setOriginForCurrentEventQueue(e),"function"==typeof t.focus&&t.focus(n)}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_registerGlobalListeners(){if(!this._platform.isBrowser)return;let t=()=>{this._lastTouchTarget=null,this._setOriginForCurrentEventQueue("keyboard")},e=()=>{this._lastTouchTarget||this._setOriginForCurrentEventQueue("mouse")},n=t=>{null!=this._touchTimeoutId&&clearTimeout(this._touchTimeoutId),this._lastTouchTarget=t.target,this._touchTimeoutId=setTimeout(()=>this._lastTouchTarget=null,Qu)},i=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};this._ngZone.runOutsideAngular(()=>{document.addEventListener("keydown",t,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",n,!Bl()||{passive:!0,capture:!0}),window.addEventListener("focus",i)}),this._unregisterGlobalListeners=(()=>{document.removeEventListener("keydown",t,!0),document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",n,!Bl()||{passive:!0,capture:!0}),window.removeEventListener("focus",i),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)})}_toggleClass(t,e,n){n?t.classList.add(e):t.classList.remove(e)}_setClasses(t,e){this._elementInfo.get(t)&&(this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e))}_setOriginForCurrentEventQueue(t){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originTimeoutId=setTimeout(()=>this._origin=null,1)})}_wasCausedByTouch(t){let e=t.target;return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}_onFocus(t,e){const n=this._elementInfo.get(e);if(!n||!n.checkChildren&&e!==t.target)return;let i=this._origin;i||(i=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"),this._setClasses(e,i),this._emitOrigin(n.subject,i),this._lastFocusOrigin=i}_onBlur(t,e){const n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}_emitOrigin(t,e){this._ngZone.run(()=>t.next(e))}_incrementMonitoredElementCount(){1==++this._monitoredElementCount&&this._registerGlobalListeners()}_decrementMonitoredElementCount(){--this._monitoredElementCount||(this._unregisterGlobalListeners(),this._unregisterGlobalListeners=(()=>{}))}}Xu.ngInjectableDef=ot({factory:function(){return new Xu(te(rn),te(Fl))},token:Xu,providedIn:"root"});class Ju{}let tc=null;function ec(){return tc}class nc{constructor(){this.resourceLoaderType=null}get attrToPropMap(){return this._attrToPropMap}set attrToPropMap(t){this._attrToPropMap=t}}class ic extends nc{constructor(){super(),this._animationPrefix=null,this._transitionEnd=null;try{const t=this.createElement("div",document);if(null!=this.getStyle(t,"animationName"))this._animationPrefix="";else{const e=["Webkit","Moz","O","ms"];for(let n=0;n<e.length;n++)if(null!=this.getStyle(t,e[n]+"AnimationName")){this._animationPrefix="-"+e[n].toLowerCase()+"-";break}}const e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(e).forEach(n=>{null!=this.getStyle(t,n)&&(this._transitionEnd=e[n])})}catch(t){this._animationPrefix=null,this._transitionEnd=null}}getDistributedNodes(t){return t.getDistributedNodes()}resolveAndSetHref(t,e,n){t.href=null==n?e:e+"/../"+n}supportsDOMEvents(){return!0}supportsNativeShadowDOM(){return"function"==typeof document.body.createShadowRoot}getAnimationPrefix(){return this._animationPrefix?this._animationPrefix:""}getTransitionEnd(){return this._transitionEnd?this._transitionEnd:""}supportsAnimation(){return null!=this._animationPrefix&&null!=this._transitionEnd}}const sc={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},oc=3,rc={"\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"},ac={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"};let lc;mt.Node&&(lc=mt.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))});class hc extends ic{parse(t){throw new Error("parse not implemented")}static makeCurrent(){!function(t){tc||(tc=t)}(new hc)}hasProperty(t,e){return e in t}setProperty(t,e,n){t[e]=n}getProperty(t,e){return t[e]}invoke(t,e,n){t[e](...n)}logError(t){window.console&&(console.error?console.error(t):console.log(t))}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}get attrToPropMap(){return sc}contains(t,e){return lc.call(t,e)}querySelector(t,e){return t.querySelector(e)}querySelectorAll(t,e){return t.querySelectorAll(e)}on(t,e,n){t.addEventListener(e,n,!1)}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}createMouseEvent(t){const e=this.getDefaultDocument().createEvent("MouseEvent");return e.initEvent(t,!0,!0),e}createEvent(t){const e=this.getDefaultDocument().createEvent("Event");return e.initEvent(t,!0,!0),e}preventDefault(t){t.preventDefault(),t.returnValue=!1}isPrevented(t){return t.defaultPrevented||null!=t.returnValue&&!t.returnValue}getInnerHTML(t){return t.innerHTML}getTemplateContent(t){return"content"in t&&this.isTemplateElement(t)?t.content:null}getOuterHTML(t){return t.outerHTML}nodeName(t){return t.nodeName}nodeValue(t){return t.nodeValue}type(t){return t.type}content(t){return this.hasProperty(t,"content")?t.content:t}firstChild(t){return t.firstChild}nextSibling(t){return t.nextSibling}parentElement(t){return t.parentNode}childNodes(t){return t.childNodes}childNodesAsList(t){const e=t.childNodes,n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=e[i];return n}clearNodes(t){for(;t.firstChild;)t.removeChild(t.firstChild)}appendChild(t,e){t.appendChild(e)}removeChild(t,e){t.removeChild(e)}replaceChild(t,e,n){t.replaceChild(e,n)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}insertBefore(t,e,n){t.insertBefore(n,e)}insertAllBefore(t,e,n){n.forEach(n=>t.insertBefore(n,e))}insertAfter(t,e,n){t.insertBefore(n,e.nextSibling)}setInnerHTML(t,e){t.innerHTML=e}getText(t){return t.textContent}setText(t,e){t.textContent=e}getValue(t){return t.value}setValue(t,e){t.value=e}getChecked(t){return t.checked}setChecked(t,e){t.checked=e}createComment(t){return this.getDefaultDocument().createComment(t)}createTemplate(t){const e=this.getDefaultDocument().createElement("template");return e.innerHTML=t,e}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createElementNS(t,e,n){return(n=n||this.getDefaultDocument()).createElementNS(t,e)}createTextNode(t,e){return(e=e||this.getDefaultDocument()).createTextNode(t)}createScriptTag(t,e,n){const i=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return i.setAttribute(t,e),i}createStyleElement(t,e){const n=(e=e||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(t,e)),n}createShadowRoot(t){return t.createShadowRoot()}getShadowRoot(t){return t.shadowRoot}getHost(t){return t.host}clone(t){return t.cloneNode(!0)}getElementsByClassName(t,e){return t.getElementsByClassName(e)}getElementsByTagName(t,e){return t.getElementsByTagName(e)}classList(t){return Array.prototype.slice.call(t.classList,0)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}hasClass(t,e){return t.classList.contains(e)}setStyle(t,e,n){t.style[e]=n}removeStyle(t,e){t.style[e]=""}getStyle(t,e){return t.style[e]}hasStyle(t,e,n){const i=this.getStyle(t,e)||"";return n?i==n:i.length>0}tagName(t){return t.tagName}attributeMap(t){const e=new Map,n=t.attributes;for(let i=0;i<n.length;i++){const t=n.item(i);e.set(t.name,t.value)}return e}hasAttribute(t,e){return t.hasAttribute(e)}hasAttributeNS(t,e,n){return t.hasAttributeNS(e,n)}getAttribute(t,e){return t.getAttribute(e)}getAttributeNS(t,e,n){return t.getAttributeNS(e,n)}setAttribute(t,e,n){t.setAttribute(e,n)}setAttributeNS(t,e,n,i){t.setAttributeNS(e,n,i)}removeAttribute(t,e){t.removeAttribute(e)}removeAttributeNS(t,e,n){t.removeAttributeNS(e,n)}templateAwareRoot(t){return this.isTemplateElement(t)?this.content(t):t}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}getBoundingClientRect(t){try{return t.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}}getTitle(t){return t.title}setTitle(t,e){t.title=e||""}elementMatches(t,e){return!!this.isElementNode(t)&&(t.matches&&t.matches(e)||t.msMatchesSelector&&t.msMatchesSelector(e)||t.webkitMatchesSelector&&t.webkitMatchesSelector(e))}isTemplateElement(t){return this.isElementNode(t)&&"TEMPLATE"===t.nodeName}isTextNode(t){return t.nodeType===Node.TEXT_NODE}isCommentNode(t){return t.nodeType===Node.COMMENT_NODE}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}hasShadowRoot(t){return null!=t.shadowRoot&&t instanceof HTMLElement}isShadowRoot(t){return t instanceof DocumentFragment}importIntoDoc(t){return document.importNode(this.templateAwareRoot(t),!0)}adoptNode(t){return document.adoptNode(t)}getHref(t){return t.getAttribute("href")}getEventKey(t){let e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),t.location===oc&&ac.hasOwnProperty(e)&&(e=ac[e]))}return rc[e]||e}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=cc||(cc=document.querySelector("base"))?cc.getAttribute("href"):null;return null==e?null:function(t){return uc||(uc=document.createElement("a")),uc.setAttribute("href",t),"/"===uc.pathname.charAt(0)?uc.pathname:"/"+uc.pathname}(e)}resetBaseElement(){cc=null}getUserAgent(){return window.navigator.userAgent}setData(t,e,n){this.setAttribute(t,"data-"+e,n)}getData(t,e){return this.getAttribute(t,"data-"+e)}getComputedStyle(t){return getComputedStyle(t)}supportsWebAnimation(){return"function"==typeof Element.prototype.animate}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return el(document.cookie,t)}setCookie(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)}}let uc,cc=null;const dc=Ol;function pc(){return!!window.history.pushState}class mc extends Oa{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=ec().getLocation(),this._history=ec().getHistory()}getBaseHrefFromDOM(){return ec().getBaseHref(this._doc)}onPopState(t){ec().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){ec().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){pc()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){pc()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}}mc.ctorParameters=(()=>[{type:void 0,decorators:[{type:Tt,args:[dc]}]}]);class fc{constructor(t){this._doc=t,this._dom=ec()}addTag(t,e=!1){return t?this._getOrCreateElement(t,e):null}addTags(t,e=!1){return t?t.reduce((t,n)=>(n&&t.push(this._getOrCreateElement(n,e)),t),[]):[]}getTag(t){return t&&this._dom.querySelector(this._doc,`meta[${t}]`)||null}getTags(t){if(!t)return[];const e=this._dom.querySelectorAll(this._doc,`meta[${t}]`);return e?[].slice.call(e):[]}updateTag(t,e){if(!t)return null;e=e||this._parseSelector(t);const n=this.getTag(e);return n?this._setMetaElementAttributes(t,n):this._getOrCreateElement(t,!0)}removeTag(t){this.removeTagElement(this.getTag(t))}removeTagElement(t){t&&this._dom.remove(t)}_getOrCreateElement(t,e=!1){if(!e){const e=this._parseSelector(t),n=this.getTag(e);if(n&&this._containsAttributes(t,n))return n}const n=this._dom.createElement("meta");this._setMetaElementAttributes(t,n);const i=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(i,n),n}_setMetaElementAttributes(t,e){return Object.keys(t).forEach(n=>this._dom.setAttribute(e,n,t[n])),e}_parseSelector(t){const e=t.name?"name":"property";return`${e}="${t[e]}"`}_containsAttributes(t,e){return Object.keys(t).every(n=>this._dom.getAttribute(e,n)===t[n])}}const _c=new rt("TRANSITION_ID"),gc=[{provide:Ae,useFactory:function(t,e,n){return()=>{n.get(De).donePromise.then(()=>{const n=ec();Array.prototype.slice.apply(n.querySelectorAll(e,"style[ng-transition]")).filter(e=>n.getAttribute(e,"ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[_c,dc,Nt],multi:!0}];class yc{static init(){!function(t){_n=t}(new yc)}addToWindow(t){mt.getAngularTestability=((e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i}),mt.getAllAngularTestabilities=(()=>t.getAllTestabilities()),mt.getAllAngularRootElements=(()=>t.getAllRootElements()),mt.frameworkStabilizers||(mt.frameworkStabilizers=[]),mt.frameworkStabilizers.push(t=>{const e=mt.getAllAngularTestabilities();let n=e.length,i=!1;const s=function(e){i=i||e,0==--n&&t(i)};e.forEach(function(t){t.whenStable(s)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const i=t.getTestability(e);return null!=i?i:n?ec().isShadowRoot(e)?this.findTestabilityInTree(t,ec().getHost(e),!0):this.findTestabilityInTree(t,ec().parentElement(e),!0):null}}class vc{constructor(t){this._doc=t}getTitle(){return ec().getTitle(this._doc)}setTitle(t){ec().setTitle(this._doc,t)}}function bc(t,e){"undefined"!=typeof COMPILED&&COMPILED||((mt.ng=mt.ng||{})[t]=e)}const wc={ApplicationRef:kn,NgZone:rn};function Ec(t){return Bn(t)}const xc=new rt("EventManagerPlugins");class Cc{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i<n.length;i++){const e=n[i];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error(`No event manager plugin found for event ${t}`)}}class Lc{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const i=ec().getGlobalEventTarget(this._doc,t);if(!i)throw new Error(`Unsupported event target ${i} for event ${e}`);return this.addEventListener(i,e,n)}}class kc{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}class Sc extends kc{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>ec().remove(t))}}const Tc={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/"},Ic=/%COMP%/g,Pc="_nghost-%COMP%",Mc="_ngcontent-%COMP%";function Ac(t,e,n){for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?Ac(t,s,n):(s=s.replace(Ic,t),n.push(s))}return n}function Dc(t){return e=>{!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}class Oc{constructor(t,e){this.eventManager=t,this.sharedStylesHost=e,this.rendererByCompId=new Map,this.defaultRenderer=new Rc(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ee.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new zc(this.eventManager,this.sharedStylesHost,e),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case ee.Native:return new Vc(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=Ac(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}class Rc{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Tc[e],t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t){let e="string"==typeof t?document.querySelector(t):t;if(!e)throw new Error(`The selector "${t}" did not match any elements`);return e.textContent="",e}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=`${i}:${e}`;const s=Tc[i];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=Tc[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&In.DashCase?t.style.setProperty(e,n,i&In.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&In.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){Fc(e,"property"),t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return Fc(e,"listener"),"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Dc(n)):this.eventManager.addEventListener(t,e,Dc(n))}}const Nc="@".charCodeAt(0);function Fc(t,e){if(t.charCodeAt(0)===Nc)throw new Error(`Found the synthetic ${e} ${t}. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.`)}class zc extends Rc{constructor(t,e,n){super(t),this.component=n;const i=Ac(n.id,n.styles,[]);e.addStyles(i),this.contentAttr=Mc.replace(Ic,n.id),this.hostAttr=Pc.replace(Ic,n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Vc extends Rc{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.component=i,this.shadowRoot=n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=Ac(i.id,i.styles,[]);for(let o=0;o<s.length;o++){const t=document.createElement("style");t.textContent=s[o],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}const Bc="undefined"!=typeof Zone&&Zone.__symbol__||function(t){return"__zone_symbol__"+t},jc=Bc("addEventListener"),Hc=Bc("removeEventListener"),Uc={},Zc="__zone_symbol__propagationStopped";let Gc;"undefined"!=typeof Zone&&Zone[Bc("BLACK_LISTED_EVENTS")]&&(Gc={});const $c=function(t){return!!Gc&&Gc.hasOwnProperty(t)},qc=function(t){const e=Uc[t.type];if(!e)return;const n=this[e];if(!n)return;const i=[t];if(1===n.length){const t=n[0];return t.zone!==Zone.current?t.zone.run(t.handler,this,i):t.handler.apply(this,i)}{const e=n.slice();for(let n=0;n<e.length&&!0!==t[Zc];n++){const t=e[n];t.zone!==Zone.current?t.zone.run(t.handler,this,i):t.handler.apply(this,i)}}},Wc={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},Kc=new rt("HammerGestureConfig");class Yc{constructor(){this.events=[],this.overrides={}}buildHammer(t){const e=new Hammer(t,this.options);e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0});for(const n in this.overrides)e.get(n).set(this.overrides[n]);return e}}const Qc=["alt","control","meta","shift"],Xc={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class Jc extends Lc{constructor(t){super(t)}supports(t){return null!=Jc.parseEventName(t)}addEventListener(t,e,n){const i=Jc.parseEventName(e),s=Jc.eventCallback(i.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ec().onAndCancel(t,i.domEventName,s))}static parseEventName(t){const e=t.toLowerCase().split("."),n=e.shift();if(0===e.length||"keydown"!==n&&"keyup"!==n)return null;const i=Jc._normalizeKey(e.pop());let s="";if(Qc.forEach(t=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),s+=t+".")}),s+=i,0!=e.length||0===i.length)return null;const o={};return o.domEventName=n,o.fullKey=s,o}static getEventFullKey(t){let e="",n=ec().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Qc.forEach(i=>{i!=n&&(0,Xc[i])(t)&&(e+=i+".")}),e+=n}static eventCallback(t,e,n){return i=>{Jc.getEventFullKey(i)===t&&n.runGuarded(()=>e(i))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}class td{}class ed extends td{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case Oi.NONE:return e;case Oi.HTML:return e instanceof id?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){let n=null;try{Pi=Pi||new ci(t);let i=e?String(e):"";n=Pi.getInertBodyElement(i);let s=5,o=i;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,i=o,o=n.innerHTML,n=Pi.getInertBodyElement(i)}while(i!==o);const r=new ki,a=r.sanitizeChildren(Mi(n)||n);return bn()&&r.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n){const t=Mi(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}(this._doc,String(e)));case Oi.STYLE:return e instanceof sd?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";const e=t.match(Di);return e&&mi(e[1])===e[1]||t.match(Ai)&&function(t){let e=!0,n=!0;for(let i=0;i<t.length;i++){const s=t.charAt(i);"'"===s&&n?e=!e:'"'===s&&e&&(n=!n)}return e&&n}(t)?t:(bn()&&console.warn(`WARNING: sanitizing unsafe style value ${t} (see http://g.co/ng/security#xss).`),"unsafe")}(e));case Oi.SCRIPT:if(e instanceof od)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"Script"),new Error("unsafe value used in a script context");case Oi.URL:return e instanceof ad||e instanceof rd?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"URL"),mi(String(e)));case Oi.RESOURCE_URL:if(e instanceof ad)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}checkNotSafeValue(t,e){if(t instanceof nd)throw new Error(`Required a safe ${e}, got a ${t.getTypeName()} `+"(see http://g.co/ng/security#xss)")}bypassSecurityTrustHtml(t){return new id(t)}bypassSecurityTrustStyle(t){return new sd(t)}bypassSecurityTrustScript(t){return new od(t)}bypassSecurityTrustUrl(t){return new rd(t)}bypassSecurityTrustResourceUrl(t){return new ad(t)}}class nd{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}`+" (see http://g.co/ng/security#xss)"}}class id extends nd{getTypeName(){return"HTML"}}class sd extends nd{getTypeName(){return"Style"}}class od extends nd{getTypeName(){return"Script"}}class rd extends nd{getTypeName(){return"URL"}}class ad extends nd{getTypeName(){return"ResourceURL"}}const ld=En(oi,"browser",[{provide:ze,useValue:Rl},{provide:Fe,useValue:function(){hc.makeCurrent(),yc.init()},multi:!0},{provide:Oa,useClass:mc,deps:[dc]},{provide:dc,useFactory:function(){return document},deps:[]}]);function hd(){return new he}class ud{constructor(t){if(t)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:ud,providers:[{provide:Oe,useValue:t.appId},{provide:_c,useExisting:Oe},gc]}}}"undefined"!=typeof window&&window;class cd{}cd.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",cd.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",cd.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",cd.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";class dd{}dd.COMPLEX="375ms",dd.ENTERING="225ms",dd.EXITING="195ms";const pd=new rt("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});class md{constructor(t){this._sanityChecksEnabled=t,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._hasDoneGlobalChecks=!0)}_areChecksEnabled(){return this._sanityChecksEnabled&&bn()&&!this._isTestEnv()}_isTestEnv(){return this._window&&(this._window.__karma__||this._window.jasmine)}_checkDoctypeIsDefined(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){const t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);const e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}}_checkHammerIsAvailable(){!this._hasCheckedHammer&&this._window&&(this._areChecksEnabled()&&!this._window.Hammer&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)}}function fd(t){return class extends t{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=ya(t)}}}function _d(t,e){return class extends t{get color(){return this._color}set color(t){const n=t||e;n!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),n&&this._elementRef.nativeElement.classList.add(`mat-${n}`),this._color=n)}constructor(...t){super(...t),this.color=e}}}function gd(t){return class extends t{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=ya(t)}}}class yd{isErrorState(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}yd.ngInjectableDef=ot({factory:function(){return new yd},token:yd,providedIn:"root"});const vd=function(){var t={FADING_IN:0,VISIBLE:1,FADING_OUT:2,HIDDEN:3};return t[t.FADING_IN]="FADING_IN",t[t.VISIBLE]="VISIBLE",t[t.FADING_OUT]="FADING_OUT",t[t.HIDDEN]="HIDDEN",t}();class bd{constructor(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=vd.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const wd={enterDuration:450,exitDuration:400},Ed=800;class xd{constructor(t,e,n,i){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this._eventOptions=!!Bl()&&{passive:!0},this.onMousedown=(t=>{const e=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+Ed;this._target.rippleDisabled||e||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}),this.onTouchStart=(t=>{this._target.rippleDisabled||(this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0,this.fadeInRipple(t.touches[0].clientX,t.touches[0].clientY,this._target.rippleConfig))}),this.onPointerUp=(()=>{this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(t=>{!t.config.persistent&&(t.state===vd.VISIBLE||t.config.terminateOnPointerUp&&t.state===vd.FADING_IN)&&t.fadeOut()}))}),i.isBrowser&&(this._containerElement=n.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown),this._triggerEvents.set("mouseup",this.onPointerUp),this._triggerEvents.set("mouseleave",this.onPointerUp),this._triggerEvents.set("touchstart",this.onTouchStart),this._triggerEvents.set("touchend",this.onPointerUp))}fadeInRipple(t,e,n={}){const i=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=Object.assign({},wd,n.animation);n.centered&&(t=i.left+i.width/2,e=i.top+i.height/2);const o=n.radius||function(t,e,n){const i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),s=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+s*s)}(t,e,i),r=t-i.left,a=e-i.top,l=s.enterDuration/(n.speedFactor||1),h=document.createElement("div");h.classList.add("mat-ripple-element"),h.style.left=`${r-o}px`,h.style.top=`${a-o}px`,h.style.height=`${2*o}px`,h.style.width=`${2*o}px`,h.style.backgroundColor=n.color||null,h.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(h),window.getComputedStyle(h).getPropertyValue("opacity"),h.style.transform="scale(1)";const u=new bd(this,h,n);return u.state=vd.FADING_IN,this._activeRipples.add(u),n.persistent||(this._mostRecentTransientRipple=u),this.runTimeoutOutsideZone(()=>{const t=u===this._mostRecentTransientRipple;u.state=vd.VISIBLE,n.persistent||t&&this._isPointerDown||u.fadeOut()},l),u}fadeOutRipple(t){const e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!e)return;const n=t.element,i=Object.assign({},wd,t.config.animation);n.style.transitionDuration=`${i.exitDuration}ms`,n.style.opacity="0",t.state=vd.FADING_OUT,this.runTimeoutOutsideZone(()=>{t.state=vd.HIDDEN,n.parentNode.removeChild(n)},i.exitDuration)}fadeOutAll(){this._activeRipples.forEach(t=>t.fadeOut())}setupTriggerEvents(t){t&&t!==this._triggerElement&&(this._removeTriggerEvents(),this._ngZone.runOutsideAngular(()=>{this._triggerEvents.forEach((e,n)=>t.addEventListener(n,e,this._eventOptions))}),this._triggerElement=t)}runTimeoutOutsideZone(t,e=0){this._ngZone.runOutsideAngular(()=>setTimeout(t,e))}_removeTriggerEvents(){this._triggerElement&&this._triggerEvents.forEach((t,e)=>{this._triggerElement.removeEventListener(e,t,this._eventOptions)})}}const Cd=new rt("mat-ripple-global-options");class Ld{constructor(t,e,n,i,s){this._elementRef=t,this.radius=0,this.speedFactor=1,this._disabled=!1,this._isInitialized=!1,this._globalOptions=i||{},this._rippleRenderer=new xd(this,e,t,n),"NoopAnimations"===s&&(this._globalOptions.animation={enterDuration:0,exitDuration:0})}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign({},this._globalOptions.animation,this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1)}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,e=0,n){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign({},this.rippleConfig,n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign({},this.rippleConfig,t))}}class kd{}class Sd{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1}}class Td{}const Id=fd(class{});let Pd=0;class Md extends Id{constructor(){super(...arguments),this._labelId=`mat-optgroup-label-${Pd++}`}}let Ad=0;class Dd{constructor(t,e=!1){this.source=t,this.isUserInput=e}}const Od=new rt("MAT_OPTION_PARENT_COMPONENT");class Rd{constructor(t,e,n,i){this._element=t,this._changeDetectorRef=e,this._parent=n,this.group=i,this._selected=!1,this._active=!1,this._disabled=!1,this._id=`mat-option-${Ad++}`,this._mostRecentViewValue="",this.onSelectionChange=new on,this._stateChanges=new S}get multiple(){return this._parent&&this._parent.multiple}get id(){return this._id}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=ya(t)}get disableRipple(){return this._parent&&this._parent.disableRipple}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(){const t=this._getHostElement();"function"==typeof t.focus&&t.focus()}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){t.keyCode!==xa&&t.keyCode!==La||(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new Dd(this,t))}}class Nd{}const Fd=new rt("mat-label-global-options");var zd=Ji({encapsulation:2,styles:[".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:2px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}@media screen and (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],data:{animation:[{type:7,name:"state",definitions:[{type:0,name:"initial, void, hidden",styles:{type:6,styles:{transform:"scale(0)"},offset:null},options:void 0},{type:0,name:"visible",styles:{type:6,styles:{transform:"scale(1)"},offset:null},options:void 0},{type:1,expr:"* => visible",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.0, 0.0, 0.2, 1)"},options:null},{type:1,expr:"* => hidden",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.4, 0.0, 1, 1)"},options:null}],options:{}}]}});function Vd(t){return Go(2,[(t()(),Ts(0,0,null,null,3,"div",[["class","mat-tooltip"]],[[2,"mat-tooltip-handset",null],[24,"@state",0]],[[null,"@state.start"],[null,"@state.done"]],function(t,e,n){var i=!0,s=t.component;return"@state.start"===e&&(i=!1!==s._animationStart()&&i),"@state.done"===e&&(i=!1!==s._animationDone(n)&&i),i},null,null)),go(1,278528,null,0,nl,[ti,ei,Mn,Pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),yo(131072,Ml,[Rn]),(t()(),Ho(3,null,["",""]))],function(t,e){t(e,1,0,"mat-tooltip",e.component.tooltipClass)},function(t,e){var n=e.component;t(e,0,0,Yi(e,0,0,io(e,2).transform(n._isHandset)).matches,n._visibility),t(e,3,0,n.message)})}var Bd=$s("mat-tooltip-component",gu,function(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"mat-tooltip-component",[["aria-hidden","true"]],[[4,"zoom",null]],[["body","click"]],function(t,e,n){var i=!0;return"body:click"===e&&(i=!1!==io(t,1)._handleBodyInteraction()&&i),i},Vd,zd)),go(1,49152,null,0,gu,[Rn,oh],null,null)],null,function(t,e){t(e,0,0,"visible"===io(e,1)._visibility?1:null)})},{},{},[]),jd=n("4R65");class Hd{}class Ud{}class Zd{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),i=n.toLowerCase(),s=t.slice(e+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(s):this.headers.set(i,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const i=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(e,i))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Zd?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Zd;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Zd?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const i=("a"===t.op?this.headers.get(e):void 0)||[];i.push(...n),this.headers.set(e,i);break;case"d":const s=t.value;if(s){let t=this.headers.get(e);if(!t)return;0===(t=t.filter(t=>-1===s.indexOf(t))).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class Gd{encodeKey(t){return $d(t)}encodeValue(t){return $d(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function $d(t){return encodeURIComponent(t).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 qd{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Gd,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const i=t.indexOf("="),[s,o]=-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],r=n.get(s)||[];r.push(o),n.set(s,r)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).join("&")}clone(t){const e=new qd({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=null)}}function Wd(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Kd(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Yd(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Qd{constructor(t,e,n,i){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){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,s=i):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.params&&(this.params=s.params)),this.headers||(this.headers=new Zd),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":n<e.length-1?"&":"")+t}}else this.params=new qd,this.urlWithParams=e}serializeBody(){return null===this.body?null:Wd(this.body)||Kd(this.body)||Yd(this.body)||"string"==typeof this.body?this.body:this.body instanceof qd?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?null:Yd(this.body)?null:Kd(this.body)?this.body.type||null:Wd(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof qd?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,n=t.url||this.url,i=t.responseType||this.responseType,s=void 0!==t.body?t.body:this.body,o=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,r=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let a=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(a=Object.keys(t.setHeaders).reduce((e,n)=>e.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new Qd(e,n,s,{params:l,headers:a,reportProgress:r,responseType:i,withCredentials:o})}}const Xd=function(){var t={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};return t[t.Sent]="Sent",t[t.UploadProgress]="UploadProgress",t[t.ResponseHeader]="ResponseHeader",t[t.DownloadProgress]="DownloadProgress",t[t.Response]="Response",t[t.User]="User",t}();class Jd{constructor(t,e=200,n="OK"){this.headers=t.headers||new Zd,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class tp extends Jd{constructor(t={}){super(t),this.type=Xd.ResponseHeader}clone(t={}){return new tp({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class ep extends Jd{constructor(t={}){super(t),this.type=Xd.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new ep({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class np extends Jd{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function ip(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}class sp{constructor(t){this.handler=t}request(t,e,n={}){let i;if(t instanceof Qd)i=t;else{let s=void 0;s=n.headers instanceof Zd?n.headers:new Zd(n.headers);let o=void 0;n.params&&(o=n.params instanceof qd?n.params:new qd({fromObject:n.params})),i=new Qd(t,e,void 0!==n.body?n.body:null,{headers:s,params:o,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const s=Jl(i).pipe(function(t,e){return $(t,void 0,1)}(t=>this.handler.handle(t)));if(t instanceof Qd||"events"===n.observe)return s;const o=s.pipe(vh(t=>t instanceof ep));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return o.pipe(j(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return o.pipe(j(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return o.pipe(j(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return o.pipe(j(t=>t.body))}case"response":return o;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new qd).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,ip(n,e))}post(t,e,n={}){return this.request("POST",t,ip(n,e))}put(t,e,n={}){return this.request("PUT",t,ip(n,e))}}class op{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const rp=new rt("HTTP_INTERCEPTORS");class ap{intercept(t,e){return e.handle(t)}}const lp=/^\)\]\}',?\n/;class hp{}class up{constructor(){}build(){return new XMLHttpRequest}}class cp{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new E(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const i=t.serializeBody();let s=null;const o=()=>{if(null!==s)return s;const e=1223===n.status?204:n.status,i=n.statusText||"OK",o=new Zd(n.getAllResponseHeaders()),r=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return s=new tp({headers:o,status:e,statusText:i,url:r})},r=()=>{let{headers:i,status:s,statusText:r,url:a}=o(),l=null;204!==s&&(l=void 0===n.response?n.responseText:n.response),0===s&&(s=l?200:0);let h=s>=200&&s<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(lp,"");try{l=""!==l?JSON.parse(l):null}catch(e){l=t,h&&(h=!1,l={error:e,text:l})}}h?(e.next(new ep({body:l,headers:i,status:s,statusText:r,url:a||void 0})),e.complete()):e.error(new np({error:l,headers:i,status:s,statusText:r,url:a||void 0}))},a=t=>{const i=new np({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error"});e.error(i)};let l=!1;const h=i=>{l||(e.next(o()),l=!0);let s={type:Xd.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(s.total=i.total),"text"===t.responseType&&n.responseText&&(s.partialText=n.responseText),e.next(s)},u=t=>{let n={type:Xd.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",r),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",h),null!==i&&n.upload&&n.upload.addEventListener("progress",u)),n.send(i),e.next({type:Xd.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",r),t.reportProgress&&(n.removeEventListener("progress",h),null!==i&&n.upload&&n.upload.removeEventListener("progress",u)),n.abort()}})}}const dp=new rt("XSRF_COOKIE_NAME"),pp=new rt("XSRF_HEADER_NAME");class mp{}class fp{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=el(t,this.cookieName),this.lastCookieString=t),this.lastToken}}class _p{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}class gp{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(rp,[]);this.chain=t.reduceRight((t,e)=>new op(t,e),this.backend)}return this.chain.handle(t)}}class yp{static disable(){return{ngModule:yp,providers:[{provide:_p,useClass:ap}]}}static withOptions(t={}){return{ngModule:yp,providers:[t.cookieName?{provide:dp,useValue:t.cookieName}:[],t.headerName?{provide:pp,useValue:t.headerName}:[]]}}}class vp{}class bp extends S{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new C;return this._value}next(t){super.next(this._value=t)}}function wp(...t){const e=t[t.length-1];return"function"==typeof e&&t.pop(),Z(t,void 0).lift(new Ep(e))}class Ep{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new xp(t,this.resultSelector))}}class xp extends y{constructor(t,e,n=Object.create(null)){super(t),this.iterators=[],this.active=0,this.resultSelector="function"==typeof e?e:null,this.values=n}_next(t){const e=this.iterators;l(t)?e.push(new Lp(t)):e.push("function"==typeof t[D]?new Cp(t[D]()):new kp(this.destination,this,t))}_complete(){const t=this.iterators,e=t.length;if(0!==e){this.active=e;for(let n=0;n<e;n++){let e=t[n];e.stillUnsubscribed?this.add(e.subscribe(e,n)):this.active--}}else this.destination.complete()}notifyInactive(){this.active--,0===this.active&&this.destination.complete()}checkIterators(){const t=this.iterators,e=t.length,n=this.destination;for(let o=0;o<e;o++){let e=t[o];if("function"==typeof e.hasValue&&!e.hasValue())return}let i=!1;const s=[];for(let o=0;o<e;o++){let e=t[o],r=e.next();if(e.hasCompleted()&&(i=!0),r.done)return void n.complete();s.push(r.value)}this.resultSelector?this._tryresultSelector(s):n.next(s),i&&n.complete()}_tryresultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}class Cp{constructor(t){this.iterator=t,this.nextResult=t.next()}hasValue(){return!0}next(){const t=this.nextResult;return this.nextResult=this.iterator.next(),t}hasCompleted(){const t=this.nextResult;return t&&t.done}}class Lp{constructor(t){this.array=t,this.index=0,this.length=0,this.length=t.length}[D](){return this}next(t){const e=this.index++;return e<this.length?{value:this.array[e],done:!1}:{value:null,done:!0}}hasValue(){return this.array.length>this.index}hasCompleted(){return this.array.length===this.index}}class kp extends B{constructor(t,e,n){super(t),this.parent=e,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[D](){return this}next(){const t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(t,e,n,i,s){this.buffer.push(e),this.parent.checkIterators()}subscribe(t,e){return V(this,this.observable,this,e)}}class Sp{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new Tp(t,this.compare,this.keySelector))}}class Tp extends y{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e=t;if(this.keySelector&&(e=p(this.keySelector)(t))===u)return this.destination.error(u.e);let n=!1;if(this.hasKey){if((n=p(this.compare)(this.key,e))===u)return this.destination.error(u.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))}}function Ip(t,e){return"function"==typeof e?n=>n.pipe(Ip((n,i)=>G(t(n,i)).pipe(j((t,s)=>e(n,t,i,s))))):e=>e.lift(new Pp(t))}class Pp{constructor(t){this.project=t}call(t,e){return e.subscribe(new Mp(t,this.project))}}class Mp extends B{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)}_innerSub(t,e,n){const i=this.innerSubscription;i&&i.unsubscribe(),this.add(this.innerSubscription=V(this,t,e,n))}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete()}_unsubscribe(){this.innerSubscription=null}notifyComplete(t){this.remove(t),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(t,e,n,i,s){this.destination.next(e)}}var Ap=n("Yoyx");function Dp(...t){let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),0===t.length?Ql:e?Dp(t).pipe(j(t=>e(...t))):new E(e=>new Op(e,t))}class Op extends B{constructor(t,e){super(t),this.sources=e,this.completed=0,this.haveValues=0;const n=e.length;this.values=new Array(n);for(let i=0;i<n;i++){const t=V(this,e[i],null,i);t&&this.add(t)}}notifyNext(t,e,n,i,s){this.values[n]=e,s._hasValue||(s._hasValue=!0,this.haveValues++)}notifyComplete(t){const{destination:e,haveValues:n,values:i}=this,s=i.length;t._hasValue?(this.completed++,this.completed===s&&(n===s&&e.next(i),e.complete())):e.complete()}}class Rp{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(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Np extends Rp{get formDirective(){return null}get path(){return null}}function Fp(t){return null==t||0===t.length}const zp=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[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 Vp{static min(t){return e=>{if(Fp(e.value)||Fp(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}static max(t){return e=>{if(Fp(e.value)||Fp(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return Fp(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return Fp(t.value)?null:zp.test(t.value)?null:{email:!0}}static minLength(t){return e=>{if(Fp(e.value))return null;const n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}}static maxLength(t){return e=>{const n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}}static pattern(t){if(!t)return Vp.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(Fp(t.value))return null;const i=t.value;return e.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(Bp);return 0==e.length?null:function(t){return Hp(function(t,n){return e.map(e=>e(t))}(t))}}static composeAsync(t){if(!t)return null;const e=t.filter(Bp);return 0==e.length?null:function(t){return Dp(function(t,n){return e.map(e=>e(t))}(t).map(jp)).pipe(j(Hp))}}}function Bp(t){return null!=t}function jp(t){const e=Pe(t)?G(t):t;if(!Me(e))throw new Error("Expected validator to return Promise or Observable.");return e}function Hp(t){const e=t.reduce((t,e)=>null!=e?Object.assign({},t,e):t,{});return 0===Object.keys(e).length?null:e}const Up=new rt("NgValueAccessor"),Zp=new rt("CompositionEventMode");class Gp{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=(t=>{}),this.onTouched=(()=>{}),this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=ec()?ec().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}function $p(t){return t.validate?e=>t.validate(e):t}function qp(t){return t.validate?e=>t.validate(e):t}function Wp(){throw new Error("unimplemented")}class Kp extends Rp{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){return Wp()}get asyncValidator(){return Wp()}}class Yp{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}const Qp={formControlName:'\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',formGroupName:'\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',formArrayName:'\n <div [formGroup]="myGroup">\n <div formArrayName="cities">\n <div *ngFor="let city of cityArray.controls; index as i">\n <input [formControlName]="i">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });',ngModelGroup:'\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',ngModelWithFormGroup:'\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n '};class Xp{static controlParentException(){throw new Error(`formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Qp.formControlName}`)}static ngModelGroupException(){throw new Error(`formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${Qp.formGroupName}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${Qp.ngModelGroup}`)}static missingFormException(){throw new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${Qp.formControlName}`)}static groupParentException(){throw new Error(`formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Qp.formGroupName}`)}static arrayParentException(){throw new Error(`formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Qp.formArrayName}`)}static disabledAttrWarning(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")}static ngModelWarning(t){console.warn(`\n It looks like you're using ngModel on the same form field as ${t}. \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/${"formControl"===t?"FormControlDirective":"FormControlName"}#use-with-ngmodel\n `)}}function Jp(t,e){return[...e.path,t]}function tm(t,e){t||sm(e,"Cannot find control with"),e.valueAccessor||sm(e,"No value accessor for form control with"),t.validator=Vp.compose([t.validator,e.validator]),t.asyncValidator=Vp.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&em(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&em(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function em(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function nm(t,e){null==t&&sm(e,"Cannot find control with"),t.validator=Vp.compose([t.validator,e.validator]),t.asyncValidator=Vp.composeAsync([t.asyncValidator,e.asyncValidator])}function im(t){return sm(t,"There is no FormControl instance attached to form control element with")}function sm(t,e){let n;throw n=t.path.length>1?`path: '${t.path.join(" -> ")}'`:t.path[0]?`name: '${t.path}'`:"unspecified name attribute",new Error(`${e} ${n}`)}function om(t){return null!=t?Vp.compose(t.map($p)):null}function rm(t){return null!=t?Vp.composeAsync(t.map(qp)):null}function am(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!vt(e,n.currentValue)}const lm=[class{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=(t=>{}),this.onTouched=(()=>{})}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=(t=>{}),this.onTouched=(()=>{})}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=(e=>{t(""==e?null:parseFloat(e))})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=(t=>{}),this.onTouched=(()=>{})}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=(e=>{t(""==e?null:parseFloat(e))})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=(t=>{}),this.onTouched=(()=>{}),this._compareWith=vt}set compareWith(t){if("function"!=typeof t)throw new Error(`compareWith must be a function, but received ${JSON.stringify(t)}`);this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=function(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=(e=>{this.value=this._getOptionValue(e),t(this.value)})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=(t=>{}),this.onTouched=(()=>{}),this._compareWith=vt}set compareWith(t){if("function"!=typeof t)throw new Error(`compareWith must be a function, but received ${JSON.stringify(t)}`);this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=((t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)})}else e=((t,e)=>{t._setSelected(!1)});this._optionMap.forEach(e)}registerOnChange(t){this.onChange=(e=>{const n=[];if(e.hasOwnProperty("selectedOptions")){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const i=t.item(e),s=this._getOptionValue(i.value);n.push(s)}}else{const t=e.options;for(let e=0;e<t.length;e++){const i=t.item(e);if(i.selected){const t=this._getOptionValue(i.value);n.push(t)}}}this.value=n,t(n)})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}},class{constructor(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=(()=>{}),this.onTouched=(()=>{})}ngOnInit(){this._control=this._injector.get(Kp),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=(()=>{t(this.value),this._registry.select(this)})}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}_throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')}}];function hm(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function um(t,e){if(!e)return null;Array.isArray(e)||sm(t,"Value accessor was not provided as an array for form control with");let n=void 0,i=void 0,s=void 0;return e.forEach(e=>{e.constructor===Gp?n=e:function(t){return lm.some(e=>t.constructor===e)}(e)?(i&&sm(t,"More than one built-in value accessor matches form control with"),i=e):(s&&sm(t,"More than one custom value accessor matches form control with"),s=e)}),s||i||n||(sm(t,"No valid value accessor for form control with"),null)}function cm(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function dm(t,e,n,i){bn()&&"never"!==i&&((null!==i&&"once"!==i||e._ngModelWarningSentOnce)&&("always"!==i||n._ngModelWarningSent)||(Xp.ngModelWarning(t),e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}class pm extends Np{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Jp(this.name,this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return om(this._validators)}get asyncValidator(){return rm(this._asyncValidators)}_checkParentType(){}}class mm{constructor(t){this._cd=t}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}}class fm extends mm{constructor(t){super(t)}}class _m extends mm{constructor(t){super(t)}}const gm="VALID",ym="INVALID",vm="PENDING",bm="DISABLED";function wm(t){const e=xm(t)?t.validators:t;return Array.isArray(e)?om(e):e||null}function Em(t,e){const n=xm(e)?e.asyncValidators:t;return Array.isArray(n)?rm(n):n||null}function xm(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class Cm{constructor(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=(()=>{}),this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}get parent(){return this._parent}get valid(){return this.status===gm}get invalid(){return this.status===ym}get pending(){return this.status==vm}get disabled(){return this.status===bm}get enabled(){return this.status!==bm}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this.validator=wm(t)}setAsyncValidators(t){this.asyncValidator=Em(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=vm,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){this.status=bm,this.errors=null,this._forEachChild(e=>{e.disable(Object.assign({},t,{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(t),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){this.status=gm,this._forEachChild(e=>{e.enable(Object.assign({},t,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(t),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==gm&&this.status!==vm||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?bm:gm}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=vm;const e=jp(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>this.setErrors(e,{emitEvent:t}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){return null==e?null:(e instanceof Array||(e=e.split(".")),e instanceof Array&&0===e.length?null:e.reduce((t,e)=>t instanceof km?t.controls[e]||null:t instanceof Sm&&t.at(e)||null,t))}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new on,this.statusChanges=new on}_calculateStatus(){return this._allControlsDisabled()?bm:this.errors?ym:this._anyControlsHaveStatus(vm)?vm:this._anyControlsHaveStatus(ym)?ym:gm}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){xm(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}}class Lm extends Cm{constructor(t=null,e,n){super(wm(e),Em(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=(()=>{})}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_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(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class km extends Cm{constructor(t,e,n){super(wm(e),Em(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof Lm?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){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[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){let e=!1;return this._forEachChild((n,i)=>{e=e||this.contains(i)&&t(n)}),e}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,i)=>{n=e(n,t,i)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class Sm extends Cm{constructor(t,e,n){super(wm(e),Em(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)}getRawValue(){return this.controls.map(t=>t instanceof Lm?t.value:t.getRawValue())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){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(t))throw new Error(`Cannot find form control at index ${t}`)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const Tm=Promise.resolve(null);class Im extends Np{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new on,this.form=new km({},om(t),rm(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Tm.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),tm(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Tm.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),cm(this._directives,t)})}addFormGroup(t){Tm.then(()=>{const e=this._findContainer(t.path),n=new km({});nm(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Tm.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){Tm.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,hm(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}const Pm=new rt("NgModelWithFormControlWarning");class Mm extends Kp{constructor(t,e,n,i){super(),this._ngModelWarningConfig=i,this.update=new on,this._ngModelWarningSent=!1,this._rawValidators=t||[],this._rawAsyncValidators=e||[],this.valueAccessor=um(this,n)}set isDisabled(t){Xp.disabledAttrWarning()}ngOnChanges(t){this._isControlChanged(t)&&(tm(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),am(t,this.viewModel)&&(dm("formControl",Mm,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}get path(){return[]}get validator(){return om(this._rawValidators)}get asyncValidator(){return rm(this._rawAsyncValidators)}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}}Mm._ngModelWarningSentOnce=!1;class Am extends Np{constructor(t,e){super(),this._validators=t,this._asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new on}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return tm(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){cm(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);nm(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);nm(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,hm(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){e.valueAccessor.registerOnChange(()=>im(e)),e.valueAccessor.registerOnTouched(()=>im(e)),e._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(t.control,t),e&&tm(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const t=om(this._validators);this.form.validator=Vp.compose([this.form.validator,t]);const e=rm(this._asyncValidators);this.form.asyncValidator=Vp.composeAsync([this.form.asyncValidator,e])}_checkFormPresent(){this.form||Xp.missingFormException()}}class Dm extends pm{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}_checkParentType(){Rm(this._parent)&&Xp.groupParentException()}}class Om extends Np{constructor(t,e,n){super(),this._parent=t,this._validators=e,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 Jp(this.name,this._parent)}get validator(){return om(this._validators)}get asyncValidator(){return rm(this._asyncValidators)}_checkParentType(){Rm(this._parent)&&Xp.arrayParentException()}}function Rm(t){return!(t instanceof Dm||t instanceof Am||t instanceof Om)}class Nm extends Kp{constructor(t,e,n,i,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new on,this._ngModelWarningSent=!1,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=n||[],this.valueAccessor=um(this,i)}set isDisabled(t){Xp.disabledAttrWarning()}ngOnChanges(t){this._added||this._setUpControl(),am(t,this.viewModel)&&(dm("formControlName",Nm,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return Jp(this.name,this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return om(this._rawValidators)}get asyncValidator(){return rm(this._rawAsyncValidators)}_checkParentType(){!(this._parent instanceof Dm)&&this._parent instanceof pm?Xp.ngModelGroupException():this._parent instanceof Dm||this._parent instanceof Am||this._parent instanceof Om||Xp.controlParentException()}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}Nm._ngModelWarningSentOnce=!1;class Fm{group(t,e=null){const n=this._reduceControls(t);return new km(n,null!=e?e.validator:null,null!=e?e.asyncValidator:null)}control(t,e,n){return new Lm(t,e,n)}array(t,e,n){const i=t.map(t=>this._createControl(t));return new Sm(i,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof Lm||t instanceof km||t instanceof Sm?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}class zm{}class Vm{}class Bm{static withConfig(t){return{ngModule:Bm,providers:[{provide:Pm,useValue:t.warnOnNgModelWithFormControl}]}}}n("INa4");var jm=function(){function t(){}return t.mapToArray=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},t.handleEvent=function(t,e,n){0<e.observers.length&&t.run(function(){e.emit(n)})},t}(),Hm=function(){function t(t,e){this.element=t,this.zone=e,this.DEFAULT_ZOOM=1,this.DEFAULT_CENTER=Object(jd.latLng)(38.907192,-77.036871),this.DEFAULT_FPZ_OPTIONS={},this.fitBoundsOptions=this.DEFAULT_FPZ_OPTIONS,this.panOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomPanOptions=this.DEFAULT_FPZ_OPTIONS,this.options={},this.mapReady=new on,this.zoomChange=new on,this.centerChange=new on,this.onClick=new on,this.onDoubleClick=new on,this.onMouseDown=new on,this.onMouseUp=new on,this.onMouseMove=new on,this.onMouseOver=new on,this.onMapMove=new on,this.onMapMoveStart=new on,this.onMapMoveEnd=new on,this.onMapZoom=new on,this.onMapZoomStart=new on,this.onMapZoomEnd=new on}return t.prototype.ngOnInit=function(){var t=this;this.zone.runOutsideAngular(function(){t.map=Object(jd.map)(t.element.nativeElement,t.options),t.addMapEventListeners()}),null!=this.center&&null!=this.zoom&&this.setView(this.center,this.zoom),null!=this.fitBounds&&this.setFitBounds(this.fitBounds),null!=this.maxBounds&&this.setMaxBounds(this.maxBounds),null!=this.minZoom&&this.setMinZoom(this.minZoom),null!=this.maxZoom&&this.setMaxZoom(this.maxZoom),this.doResize(),this.mapReady.emit(this.map)},t.prototype.ngOnChanges=function(t){t.zoom&&t.center&&null!=this.zoom&&null!=this.center?this.setView(t.center.currentValue,t.zoom.currentValue):t.zoom?this.setZoom(t.zoom.currentValue):t.center&&this.setCenter(t.center.currentValue),t.fitBounds&&this.setFitBounds(t.fitBounds.currentValue),t.maxBounds&&this.setMaxBounds(t.maxBounds.currentValue),t.minZoom&&this.setMinZoom(t.minZoom.currentValue),t.maxZoom&&this.setMaxZoom(t.maxZoom.currentValue)},t.prototype.getMap=function(){return this.map},t.prototype.onResize=function(){this.delayResize()},t.prototype.addMapEventListeners=function(){var t=this;this.map.on("click",function(e){return jm.handleEvent(t.zone,t.onClick,e)}),this.map.on("dblclick",function(e){return jm.handleEvent(t.zone,t.onDoubleClick,e)}),this.map.on("mousedown",function(e){return jm.handleEvent(t.zone,t.onMouseDown,e)}),this.map.on("mouseup",function(e){return jm.handleEvent(t.zone,t.onMouseUp,e)}),this.map.on("mouseover",function(e){return jm.handleEvent(t.zone,t.onMouseOver,e)}),this.map.on("mousemove",function(e){return jm.handleEvent(t.zone,t.onMouseMove,e)}),this.map.on("zoomstart",function(e){return jm.handleEvent(t.zone,t.onMapZoomStart,e)}),this.map.on("zoom",function(e){return jm.handleEvent(t.zone,t.onMapZoom,e)}),this.map.on("zoomend",function(e){return jm.handleEvent(t.zone,t.onMapZoomEnd,e)}),this.map.on("movestart",function(e){return jm.handleEvent(t.zone,t.onMapMoveStart,e)}),this.map.on("move",function(e){return jm.handleEvent(t.zone,t.onMapMove,e)}),this.map.on("moveend",function(e){return jm.handleEvent(t.zone,t.onMapMoveEnd,e)}),this.map.on("zoomend moveend",function(){var e=t.map.getZoom();e!==t.zoom&&(t.zoom=e,jm.handleEvent(t.zone,t.zoomChange,e));var n=t.map.getCenter();null==n&&null==t.center||(null!=n&&null!=t.center||n===t.center)&&n.lat===t.center.lat&&n.lng===t.center.lng||(t.center=n,jm.handleEvent(t.zone,t.centerChange,n))})},t.prototype.doResize=function(){var t=this;this.zone.runOutsideAngular(function(){t.map.invalidateSize({})})},t.prototype.delayResize=function(){null!=this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(this.doResize.bind(this),200)},t.prototype.setView=function(t,e){this.map&&null!=t&&null!=e&&this.map.setView(t,e,this.zoomPanOptions)},t.prototype.setZoom=function(t){this.map&&null!=t&&this.map.setZoom(t,this.zoomOptions)},t.prototype.setCenter=function(t){this.map&&null!=t&&this.map.panTo(t,this.panOptions)},t.prototype.setFitBounds=function(t){this.map&&null!=t&&this.map.fitBounds(t,this.fitBoundsOptions)},t.prototype.setMaxBounds=function(t){this.map&&null!=t&&this.map.setMaxBounds(t)},t.prototype.setMinZoom=function(t){this.map&&null!=t&&this.map.setMinZoom(t)},t.prototype.setMaxZoom=function(t){this.map&&null!=t&&this.map.setMaxZoom(t)},t}(),Um=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[]}},t}(),Zm=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[]}},t}();const Gm=function(t,e){switch(typeof t){case"number":this.lonDeg=this.dec2deg(t,this.MAX_LON),this.lonDec=t;break;case"string":this.decode(t)&&(this.lonDeg=t),this.lonDec=this.deg2dec(t,this.MAX_LON)}switch(typeof e){case"number":this.latDeg=this.dec2deg(e,this.MAX_LAT),this.latDec=e;break;case"string":this.decode(e)&&(this.latDeg=e),this.latDec=this.deg2dec(e,this.MAX_LAT)}};Gm.prototype={CHAR_DEG:"\xb0",CHAR_MIN:"'",CHAR_SEC:'"',CHAR_SEP:" ",MAX_LON:180,MAX_LAT:90,lonDec:NaN,latDec:NaN,lonDeg:NaN,latDeg:NaN,dec2deg:function(t,e){const n=t<0?-1:1,i=Math.abs(Math.round(1e6*t));if(i>1e6*e)return NaN;const s=i%1e6/1e6,o=Math.floor(i/1e6)*n,r=Math.floor(60*s);let a="";return a+=o,a+=this.CHAR_DEG,a+=this.CHAR_SEP,a+=r,a+=this.CHAR_MIN,a+=this.CHAR_SEP,(a+=(3600*(s-r/60)).toFixed(2))+this.CHAR_SEC},deg2dec:function(t){const e=this.decode(t);if(!e)return NaN;const n=parseFloat(e[1]),i=parseFloat(e[2]),s=parseFloat(e[3]);return isNaN(n)||isNaN(i)||isNaN(s)?NaN:n+i/60+s/3600},decode:function(t){let e="";return e+="(-?\\d+)",e+=this.CHAR_DEG,e+="\\s*",e+="(\\d+)",e+=this.CHAR_MIN,e+="\\s*",e+="(\\d+(?:\\.\\d+)?)",e+=this.CHAR_SEC,t.match(new RegExp(e))},getLonDec:function(){return this.lonDec},getLatDec:function(){return this.latDec},getLonDeg:function(){return this.lonDeg},getLatDeg:function(){return this.latDeg}};const $m=function(t,e,n){const i=qm(),s=Object(jd.marker)([t,e],{icon:i,draggable:!0});return s.on("dragend",function(t){return n(t)}),s},qm=function(){return Object(jd.icon)({iconUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/marker-icon.png",shadowUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/marker-shadow.png",iconAnchor:[13,40]})},Wm={radius:6,fillColor:"#ff7800",color:"#000",weight:1,opacity:1,fillOpacity:.8},Km={color:"#ff7800",weight:5,opacity:.65},Ym=()=>Object(jd.icon)({iconUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/photo-marker-icon.png",shadowUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/marker-shadow.png",iconSize:[33,41],iconAnchor:[13,40],popupAnchor:[5,-41]});function Qm(t){try{let e;" "===(t=t.replace(/\s\s+/g," ")).charAt(0)&&(t=t.slice(1,t.length-1)),t=(t=t.replace(",",".")).replace(/[^0-9\-.,\xb0\'"\s]/g,"");let n="",i="",s="",o=t.split(" ");" "===t.charAt(t.length-1)&&(o=o.slice(0,o.length-1)),""===o[o.length-1]&&(o=o.slice(0,o.length-1)),1===o.length&&(-1!==(n=o[0]).indexOf(".")&&(n=n.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90")),2===o.length&&(i=o[1],-1!==(n=o[0]).indexOf(".")&&(n=n.slice(0,n.indexOf("."))),-1!==i.indexOf(".")&&(i=i.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90"),Number(i)<-90&&(i="-90"),Number(i)>90&&(i="90")),3===o.length&&(i=o[1],s=o[2],-1!==(n=o[0]).indexOf(".")&&(n=n.slice(0,n.indexOf("."))),-1!==i.indexOf(".")&&(i=i.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90"),Number(i)<-90&&(i="-90"),Number(i)>90&&(i="90")),o.length>=4&&(o=o.slice(0,2),-1!==n.indexOf(".")&&(n=n.slice(0,n.indexOf("."))),-1!==i.indexOf(".")&&(i=i.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90"),Number(i)<-90&&(i="-90"),Number(i)>90&&(i="90"));try{e=t.match(/\s/g).length}catch(t){e=0}if(0===e&&1===o.length);else if(1===e&&o.length>=1)"\xb0"!==(n=n.replace(" ","")).slice(n.length-1,n.length)?n+="\xb0 ":n+=" ";else if(2===e&&o.length>=2)n=n.replace(" ",""),i=i.replace(" ",""),"\xb0"!==n.slice(n.length-1,n.length)?n+="\xb0 ":n+=" ","'"!==i.slice(i.length-1,i.length)?i+="' ":i+=" ";else{if(!(3===e&&o.length>=3))throw{error:"Can't manage input string."};n=n.replace(" ",""),i=i.replace(" ",""),s=s.replace(" ",""),"\xb0"!==n.slice(n.length-1,n.length)?n+="\xb0 ":n+=" ","'"!==i.slice(i.length-1,i.length)?i+="' ":i+=" ",'"'!==s.slice(s.length-1,s.length)&&(s+='"')}return n+i+s}catch(e){return t}}class Xm{constructor(t){this.http=t,this.mapQuestApiKey=new bp(""),this.osmNominatimApiUrl="https://nominatim.openstreetmap.org",this.mapQuestNominatimApiUrl="https://open.mapquestapi.com/nominatim/v1/search.php",this.frGeoApiUrl=null}setMapQuestApiKey(t){null!==t&&this.mapQuestApiKey.next(t)}geocode(t,e){return null===t?Xl():"osm"===e.toLowerCase()?this.geocodeUsingOSM(t):"mapquest"===e.toLowerCase()?this.geocodeUsingMapQuest(t):void 0}geocodeSpecificUsingOSM(t,e,n,i,s){const o=`?format=json&addressdetails=1&format=json&polygon_geojson=1${s?"&limit="+s:""}`;if(!(n||e||t||i))return Jl([]);let r=o;return n&&(r+=`&city=${n}`),e&&(r+=`&county=${e}`),t&&(r+=`&country=${t}`),i&&(r+=`&place=${i}`),this.http.get(`${this.osmNominatimApiUrl}/${r}`)}geocodeSpecificUsingMapQuest(t,e,n,i,s,o){const r=`?key=${t}&format=json&addressdetails=1&format=json&polygon_geojson=1${o?"&limit="+o:""}`;if(!(i||n||e||s))return Jl([]);let a=r;return i&&(a+=`&city=${i}`),n&&(a+=`&county=${n}`),e&&(a+=`&country=${e}`),s&&(a+=`&place=${s}`),this.http.get(`${this.mapQuestNominatimApiUrl}/${a}`)}reverse(t,e,n){return"osm"===n.toLowerCase()?this.reverseUsingOSM(t,e):"mapquest"===n.toLowerCase()?this.reverseUsingMapQuest(t,e):void 0}getReadbleAddress(t,e){if("osm"===e.toLowerCase())return this.getNominatimReadbleAddress(t);if("mapquest"===e.toLowerCase()){if(Object(Ap.isDefined)(t.results))return this.getMapQuestReadableAddress(t);if(Object(Ap.isDefined)(t.address))return this.getNominatimReadbleAddress(t)}}geocodeUsingOSM(t){return this.http.get(`${this.osmNominatimApiUrl}/?format=json&addressdetails=1&q=${t}&format=json&limit=10&polygon_geojson=1`)}geocodeUsingMapQuest(t,e){const n=`${this.mapQuestNominatimApiUrl}/search.php?key=${this.mapQuestApiKey.getValue()}&addressdetails=1&q=${t}&format=json&limit=10&polygon_geojson=1`;return this.http.get(n)}reverseUsingOSM(t,e){return this.http.get(`${this.osmNominatimApiUrl}/reverse?format=json&lat=${t}&lon=${e}&polygon_geojson=1`)}reverseUsingMapQuest(t,e){const n=`${this.mapQuestNominatimApiUrl}/reverse?key=${this.mapQuestApiKey.getValue()}&lat=${t}&lon=${e}`;return this.http.get(n)}getNominatimReadbleAddress(t){let e=null,n=null,i=null,s=null;const o=void 0!==t.address.city?t.address.city:null,r=void 0!==t.address.town?t.address.town:null,a=void 0!==t.address.village?t.address.village:null,l=void 0!==t.address.hamlet?t.address.hamlet:null;o?e=o+(null!==l?` (${t.address.hamlet})`:""):null!==r?e=r+(null!==l?` (${t.address.hamlet})`:""):null!==a?e=a+(null!==l?` (${t.address.hamlet})`:""):null!==t.address.hamlet&&(e=t.address.hamlet),Object(Ap.isDefined)(t.address.suburb)&&Object(Ap.isDefined)(t.address.postcode)&&null!==e?n=t.address.suburb+", "+t.address.postcode:!Object(Ap.isDefined)(t.address.suburb)&&Object(Ap.isDefined)(t.address.postcode)&&null!==e&&(n=t.address.postcode),Object(Ap.isDefined)(t.address.road)?i=t.address.road:Object(Ap.isDefined)(t.address.pedestrian)&&(i=t.address.pedestrian),Object(Ap.isDefined)(t.address.neighbourhood)&&(s=t.address.neighbourhood);const h=t.address.country,u="France"!==h?" ("+h+")":"";return i&&s&&n&&e?i+" ("+s+") "+n+" "+e+u:i&&!s&&n&&e?i+" "+n+" "+e+u:i&&!s&&!n&&e?i+", "+e+u:!i&&s&&n&&e?s+" "+n+" "+e:!i&&!s&&n&&e?n+" "+e+u:i||s||n||!e?t.display_name+u:e+u}getMapQuestReadableAddress(t){const e=t.results[0].locations[0];let n=null,i=null,s=null,o=null;return n=e.adminArea5,i=e.adminArea4,o=e.adminArea6,(s=e.street)&&o&&i&&n?s+" ("+o+") "+i+" "+n:s&&!o&&i&&n?s+" "+i+" "+n:s&&!o&&!i&&n?s+", "+n:!s&&o&&i&&n?o+" "+i+" "+n:!s&&!o&&i&&n?i+" "+n:s||o||i||!n?void 0:n}osmClassFilter(t,e){const n=[];return t.length>0&&e.length>0?(e.forEach(e=>{let i=0,s=!1;t.forEach(t=>{const n=t.split(":")[0],o=t.split(":")[1];"*"===o?e.class===n&&i++:"!"===o.substr(0,1)?e.class===n&&"!"+e.type===o&&(s=!0):e.class===n&&e.type===o&&i++}),i>0&&!s&&n.push(e)}),Jl(n)):Jl(e)}geometryFilter(t,e){const n=[];return t.length>0&&e.length>0?(e.forEach(e=>{e.geojson&&-1!==t.indexOf(e.geojson.type.toLowerCase())&&n.push(e)}),n):e}reverseCorrdinatesArray(t){if(t.length>0)return t.forEach(t=>{t.reverse()}),t}simplifyPolyline(t){return t.length>1?[t[0],t[t.length-1]]:t}getInseeData(t,e){return this.http.get(`${this.frGeoApiUrl}/communes?lat=${t}&lon=${e}`).pipe(j(t=>t[0]))}setOsmNominatimApiUrl(t){this.osmNominatimApiUrl=t}setMapQuestNominatimApiUrl(t){this.mapQuestNominatimApiUrl=t}setFrGeoApiUrl(t){this.frGeoApiUrl=t}}Xm.ngInjectableDef=ot({factory:function(){return new Xm(te(sp))},token:Xm,providedIn:"root"});class Jm{constructor(t){this.http=t,this.mapQuestApiKey=null,this.openElevationApiUrl=null,this.elevationApiIoApiUrl=null,this.mapQuestElevationApiUrl=null}setMapQuestApiKey(t){null!==t&&(this.mapQuestApiKey=t)}getElevation(t,e,n){return"openelevation"===n.toLowerCase()?this.getOpenElevation(t,e):"elevationapiio"===n.toLowerCase()?this.getElevationApiIo(t,e):"mapquest"===n.toLowerCase()&&null!==this.mapQuestApiKey?this.getMapQuestElevation(t,e):Jl(-1)}getOpenElevation(t,e){return this.http.get(`${this.openElevationApiUrl}/lookup?locations=${t},${e}`).pipe(j(t=>t.results[0].elevation))}getElevationApiIo(t,e){return this.http.get(`${this.elevationApiIoApiUrl}?points=${t},${e}`).pipe(j(t=>t.elevations[0].elevation))}getMapQuestElevation(t,e){return this.http.get(`${this.mapQuestElevationApiUrl}/profile?key=${this.mapQuestApiKey}&shapeFormat=raw&latLngCollection=${t},${e}`).pipe(j(t=>t.elevationProfile[0].height))}setOpenElevationApiUrl(t){this.openElevationApiUrl=t}setElevationApiIoApiUrl(t){this.elevationApiIoApiUrl=t}setMapQuestElevationApiUrl(t){this.mapQuestElevationApiUrl=t}}Jm.ngInjectableDef=ot({factory:function(){return new Jm(te(sp))},token:Jm,providedIn:"root"});const tf={PRECISE:"Pr\xe9cise",PLACE:"Lieu-dit",CITY:"Commune",DEPARTEMENT:"D\xe9partement",REGION:"R\xe9gion",COUNTRY:"Pays",OTHER:"Autre/inconnu"};class ef{constructor(t,e,n,i){this.fb=t,this.geocodeService=e,this.elevationService=n,this.zone=i,this.layersToAdd=["osm"],this.osmClassFilter=[],this.geometryFilter=[],this.allowEditDrawnItems=!1,this.marker=!0,this.polyline=!0,this.polygon=!0,this.lngLatInit=[2.98828125,46.5588603],this.zoomInit=4,this.getOsmSimpleLine=!1,this.showLatLngElevationInputs=!0,this.latLngFormat="dec",this.elevationProvider="openElevation",this.geolocationProvider="osm",this.osmNominatimApiUrl="https://nominatim.openstreetmap.org",this.mapQuestNominatimApiUrl="https://open.mapquestapi.com/nominatim/v1",this.openElevationApiUrl="https://api.open-elevation.com/api/v1",this.elevationApiIoApiUrl="https://elevation-api.io/api/elevation",this.mapQuestElevationApiUrl="https://open.mapquestapi.com/elevation/v1",this.frGeoApiUrl="https://geo.api.gouv.fr",this.osmTilesLayerApi="https://{s}.tile.openstreetmap.org",this.height='"400px"',this.width='"100%"',this.placeMarkerWhenReverseGeocoding=!0,this.location=new on,this.httpError=new on,this._location={},this.osmPlace=null,this.inseeData=null,this._geolocatedPhotoLatLng=new on,this.geolocatedPhotoLatLngData=[],this.geolocatedPhotoLatLngDisplayedColumnsTable=["select","fileName","lat","lng","altitude"],this.isLoadingAddress=!1,this.isLoadingLatitude=!1,this.isLoadingLongitude=!1,this.isLoadingElevation=!1,this.geoSearchSubscription=new f,this.latDmsInputSubscription=new f,this.lngDmsInputSubscription=new f,this.elevationInputSubscription=new f,this.mapLat=0,this.mapLng=0,this.osmLayer=Object(jd.tileLayer)(`${this.osmTilesLayerApi}/{z}/{x}/{y}.png`,{maxZoom:18,attribution:'<a href="https://www.openstreetmap.org/copyright" target="_blank">\xa9 les contributeurs d\u2019OpenStreetMap</a> - Tuiles : <a href="https://www.openstreetmap.fr" target="_blank">OsmFr</a>'}),this.openTopoMapLayer=Object(jd.tileLayer)("https://a.tile.opentopomap.org/{z}/{x}/{y}.png",{maxZoom:17,attribution:'<a href="https://opentopomap.org" target="_blank">\xa9 OpenTopoMap</a>'}),this.googleHybridLayer=Object(jd.tileLayer)("https://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}",{maxZoom:20,subdomains:["mt0","mt1","mt2","mt3"],attribution:'<a href="https://www.google.com" target="_blank">\xa9 Google Maps</a>'}),this.brgmLayer=jd.tileLayer.wms("https://geoservices.brgm.fr/geologie",{version:"1.3.0",layers:"Geologie",attribution:'<a href="https://www.brgm.fr/" target="_blank">\xa9 BRMG</a>'}),this.mapLayers={},this.geoResultsLayer=Object(jd.geoJSON)(null,{style:function(){return{color:"#ff7800",weight:5,opacity:.65}}}),this.geolocatedPhotoLatLngLayer=Object(jd.geoJSON)(),this.drawnItems=new jd.FeatureGroup,this.circleMarkerOpt=Wm,this.geoResultsOpt=Km}set geolocatedPhotoLatLng(t){this._geolocatedPhotoLatLng.emit(t)}set reset(t){!0===t&&this.resetComponent()}set patchAddress(t){t&&null!==t&&this._patchAddress(t)}set setAddress(t){t&&null!==t&&this._setAddress(t)}set patchElevation(t){t&&null!==t&&this._patchElevation(t)}set patchLngLatDec(t){t&&null!==t&&this._patchLatLngDec(t[1],t[0])}set patchGeometry(t){t&&null!==t&&this._patchGeometry(t)}set drawMarker(t){t&&null!==t&&this._drawMarker(t[1],t[0])}set enabled(t){try{!0===t&&this.enableComponent(),!1===t&&this.disableComponent()}catch(t){}}set inputFocus(t){t&&null!==t&&!0===t&&this.setFocusOnInput()}ngOnInit(){switch(this.initApi(),this.latlngFormGroup=this.fb.group({latInput:this.fb.control("",[Vp.required,this.latLngDecValidator]),lngInput:this.fb.control("",[Vp.required,this.latLngDecValidator]),dmsLatInput:this.fb.control("",[Vp.required,this.latLngDmsValidator]),dmsLngInput:this.fb.control("",[Vp.required,this.latLngDmsValidator])}),this.elevationFormGroup=this.fb.group({elevationInput:this.fb.control("",null)}),this.geoSearchFormGroup=this.fb.group({placeInput:this.fb.control("",null)}),this.geoSearchSubscription=this.geoSearchFormGroup.controls.placeInput.valueChanges.pipe(vu(400),t=>t.lift(new Sp(void 0,void 0)),Ip(t=>(this.isLoadingAddress=!0,this.geocodeService.geocode(t,this.geolocationProvider)))).subscribe(t=>{for(const n of t)n.score=0,"fr"===n.address.country_code&&(n.score+=20),"city"===n.type&&(n.score+=10);t.sort((t,e)=>e.score-t.score),this.isLoadingAddress=!1;let e=[];this.osmClassFilter.length>0?this.geocodeService.osmClassFilter(this.osmClassFilter,t).subscribe(t=>{e=t}):e=t,this.geoSearchResults=this.geometryFilter.length>0?this.geocodeService.geometryFilter(this.geometryFilter,t):e},t=>{this.httpError.next(t),this.isLoadingAddress=!1}),this._geolocatedPhotoLatLng.subscribe(t=>{this.geolocatedPhotoLatLngLayer.clearLayers(),this.geolocatedPhotoLatLngData=t,this.geolocatedPhotoLatLngData.forEach(t=>{const e=new Gm(t.lng.deg+"\xb0 "+t.lng.min+"'"+t.lng.sec+'"',t.lat.deg+"\xb0 "+t.lat.min+"'"+t.lat.sec+'"');t.latDec=e.latDec,t.lngDec=e.lonDec;const n=Object(jd.latLng)(t.latDec,t.lngDec),i=new jd.Marker(n,{icon:Ym()});i.bindPopup(`\n <b>Fichier "${t.fileName}"</b><br>\n Lat. : ${e.latDeg}<br />\n Lng. : ${e.lonDeg}<br />\n Alt. : ${t.altitude} m<br /><br />\n <b>Cliquez sur le point pour utiliser ces coordonn\xe9es</b>`).openPopup(),i.on("click",e=>{this.gpsMarkerSetValues(t.latDec,t.lngDec,t.altitude)}),i.on("mouseover",t=>{i.openPopup()}),i.on("mouseout",t=>{i.closePopup()}),i.addTo(this.geolocatedPhotoLatLngLayer)}),this.flyToGeolocatedPhotoItems()}),this.elevationInputSubscription=this.elevationFormGroup.controls.elevationInput.valueChanges.pipe(vu(500)).subscribe(t=>{null!==this.osmPlace&&this.bindLocationOutput([t,this.osmPlace,this.inseeData])}),this.mapOptions={layers:[],zoom:this.zoomInit,center:Object(jd.latLng)({lat:this.lngLatInit[1],lng:this.lngLatInit[0]})},this.drawControlEdit=function(t,e){return new jd.Control.Draw({position:"topleft",draw:{marker:!1,polyline:!1,polygon:!1,rectangle:!1,circle:!1,circlemarker:!1},edit:{featureGroup:t,edit:!0===e&&{},remove:{}}})}(this.drawnItems,this.allowEditDrawnItems),this.drawControlFull=function(t,e,n){return new jd.Control.Draw({position:"topleft",draw:{marker:!!t&&{icon:qm()},polyline:!!e&&{},polygon:!!n&&{showArea:!0,metric:!1},rectangle:!1,circle:!1,circlemarker:!1}})}(this.marker,this.polyline,this.polygon),-1!==this.layersToAdd.indexOf("osm")&&(this.mapLayers.OSM=this.osmLayer),-1!==this.layersToAdd.indexOf("opentopomap")&&(this.mapLayers.OpenTopoMap=this.openTopoMapLayer),-1!==this.layersToAdd.indexOf("google hybrid")&&(this.mapLayers["Google hybride"]=this.googleHybridLayer),-1!==this.layersToAdd.indexOf("brgm")&&(this.mapLayers.BRGM=this.brgmLayer),this.layersToAdd[0]){case"osm":this.mapOptions.layers.push(this.osmLayer);break;case"opentopomap":this.mapOptions.layers.push(this.openTopoMapLayer);break;case"google hybrid":this.mapOptions.layers.push(this.googleHybridLayer);break;case"brgm":this.mapOptions.layers.push(this.brgmLayer)}this.latDmsInputSubscription=this.latlngFormGroup.controls.dmsLatInput.valueChanges.subscribe(t=>{this.latlngFormGroup.controls.dmsLatInput.setValue(Qm(t),{emitEvent:!1})}),this.lngDmsInputSubscription=this.latlngFormGroup.controls.dmsLngInput.valueChanges.subscribe(t=>{this.latlngFormGroup.controls.dmsLngInput.setValue(Qm(t),{emitEvent:!1})})}enableComponent(){this.geoSearchFormGroup.enable(),this.latlngFormGroup.enable(),this.elevationFormGroup.enable(),this.map.dragging.enable(),this.map.touchZoom.enable(),this.map.doubleClickZoom.enable(),this.map.scrollWheelZoom.enable(),this.map.boxZoom.enable(),this.map.keyboard.enable(),this.map.addControl(this.drawControlFull)}disableComponent(){this.geoSearchFormGroup.disable(),this.latlngFormGroup.disable(),this.elevationFormGroup.disable(),this.map.dragging.disable(),this.map.touchZoom.disable(),this.map.doubleClickZoom.disable(),this.map.scrollWheelZoom.disable(),this.map.boxZoom.disable(),this.map.keyboard.disable(),this.map.removeControl(this.drawControlFull)}initApi(){this.geocodeService.setOsmNominatimApiUrl(this.osmNominatimApiUrl),this.geocodeService.setMapQuestNominatimApiUrl(this.mapQuestNominatimApiUrl),this.elevationService.setOpenElevationApiUrl(this.openElevationApiUrl),this.elevationService.setElevationApiIoApiUrl(this.elevationApiIoApiUrl),this.elevationService.setMapQuestElevationApiUrl(this.mapQuestElevationApiUrl),this.geocodeService.setFrGeoApiUrl(this.frGeoApiUrl),this.elevationService.setMapQuestApiKey(this.mapQuestApiKey),this.geocodeService.setMapQuestApiKey(this.mapQuestApiKey)}ngOnDestroy(){this.geoSearchSubscription.unsubscribe(),this.latDmsInputSubscription.unsubscribe(),this.lngDmsInputSubscription.unsubscribe(),this.elevationInputSubscription.unsubscribe(),this._geolocatedPhotoLatLng.unsubscribe()}onMapReady(t){this.map=t,this.map.addControl(jd.control.layers(null,this.mapLayers,{position:"topright"})),this.map.addLayer(this.drawnItems),this.map.addLayer(this.geoResultsLayer),this.map.addLayer(this.geolocatedPhotoLatLngLayer),this.map.addControl(this.drawControlFull),this.map.on("draw:created",t=>{if(this.drawnItem=t.layer,this.drawType=t.layerType,this.setLocationAccuracy("10 \xe0 100 m"),this._location.vlLocationAccuracy=tf.PRECISE,"marker"===this.drawType){const t=this.drawnItem._latlng;$m(t.lat,t.lng,t=>{this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()}),this.setLocationAccuracy("10 \xe0 100 m"),this._location.vlLocationAccuracy=tf.PRECISE}).addTo(this.drawnItems)}else this.inputValuePrepend="G\xe9om\xe9trie avec comme centro\xefde ",this.drawnItems.addLayer(this.drawnItem);this.drawnItems.getLayers().length>0&&this.setMapEditMode(),1===this.drawnItems.getLayers().length&&this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()}),this.flyToDrawnItems()}),this.map.on("draw:edited",t=>{this.drawnItem=t.layer,this.drawType=t.layerType,1===this.drawnItems.getLayers().length&&this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()}),this.flyToDrawnItems()}),this.map.on("draw:deleted",t=>{this.clearGeoResultsLayer(),this.clearDrawnItemsLayer(),this.resetLocation(),this.setMapDrawMode(),this.zone.run(()=>{this.clearForm()}),this.location.next(null)}),this.redrawMap(100)}redrawMap(t){t?window.setTimeout(()=>this.map.invalidateSize(),t):this.map.invalidateSize()}setMapEditMode(){this.map.removeControl(this.drawControlFull),this.map.addControl(this.drawControlEdit)}setMapDrawMode(){this.map.removeControl(this.drawControlEdit),this.map.addControl(this.drawControlFull)}flyToDrawnItems(t=14){const e=this.drawnItems.getBounds();this.map.flyToBounds(e,{maxZoom:t,animate:!1})}flyToGeoResultsItems(){const t=this.geoResultsLayer.getBounds();this.map.flyToBounds(t,{maxZoom:14,animate:!1})}flyToGeolocatedPhotoItems(){const t=this.geolocatedPhotoLatLngLayer.getBounds();this.map.flyToBounds(t,{maxZoom:14,animate:!1})}addMarkerFromDmsCoord(){this.clearDrawnItemsLayer(),this.setMapEditMode();const t=new Gm(this.latlngFormGroup.controls.dmsLngInput.value,this.latlngFormGroup.controls.dmsLatInput.value);$m(t.getLatDec(),t.getLonDec(),t=>{this.clearGeoResultsLayer(),this.callGeolocElevationApisUsingLatLngInputsValues(),this.setLocationAccuracy("10 \xe0 100 m"),this._location.vlLocationAccuracy=tf.PRECISE}).addTo(this.drawnItems),this.latlngFormGroup.controls.latInput.setValue(t.getLatDec(),{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(t.getLonDec(),{emitEvent:!1}),this.setLocationAccuracy("10 \xe0 100 m"),this._location.vlLocationAccuracy=tf.PRECISE,this.inputValue=`${this.latlngFormGroup.controls.dmsLatInput.value} ${this.latlngFormGroup.controls.dmsLngInput.value}`,this.flyToDrawnItems()}addMarkerFromLatLngCoord(){this.clearDrawnItemsLayer(),this.setMapEditMode();const t=new Gm(Number(this.latlngFormGroup.controls.lngInput.value),Number(this.latlngFormGroup.controls.latInput.value));$m(t.getLatDec(),t.getLonDec(),t=>{this.clearGeoResultsLayer(),this.callGeolocElevationApisUsingLatLngInputsValues(),this.setLocationAccuracy("10 \xe0 100 m"),this._location.vlLocationAccuracy=tf.PRECISE}).addTo(this.drawnItems),this.latlngFormGroup.controls.dmsLatInput.setValue(t.getLatDeg(),{emitEvent:!1}),this.latlngFormGroup.controls.dmsLngInput.setValue(t.getLonDeg(),{emitEvent:!1}),this.setLocationAccuracy("10 \xe0 100 m"),this._location.vlLocationAccuracy=tf.PRECISE,this.inputValue=`N${this.latlngFormGroup.controls.latInput.value} E${this.latlngFormGroup.controls.lngInput.value}`,this.flyToDrawnItems()}addPolyline(t){this.clearDrawnItemsLayer(),this.setMapEditMode(),Object(jd.polyline)(t).addTo(this.drawnItems),this.flyToDrawnItems(18)}callGeolocElevationApisUsingLatLngInputsValues(t=!1,e=!1,n){let i,s,o,r;if(this.osmPlace=null,this.inseeData=null,this.setLatLngInputFromDrawnItems(),this.setLatLngDmsInputFromDrawnItems(),this.inputValue=(null!==this.inputValuePrepend?this.inputValuePrepend:"")+`N${this.latlngFormGroup.controls.latInput.value} E${this.latlngFormGroup.controls.lngInput.value}`,this.inputValuePrepend=null,t&&!e)i=wp(this.reverseGeocodingFromInputValue(),this.geocodeService.getInseeData(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value));else if(e&&!t)i=wp(this.getElevationFromInputValue(),this.geocodeService.getInseeData(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value));else if(t||e){if(t&&e)return}else i=wp(this.getElevationFromInputValue(),this.reverseGeocodingFromInputValue(),this.geocodeService.getInseeData(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value));this.isLoadingAddress=!e,this.isLoadingElevation=!t,i.subscribe(i=>{this.isLoadingElevation=!1,this.isLoadingAddress=!1,t&&!e?(s=null,o=i[0],r=i[1]):e&&!t?(s=i,o=null,s=i[0],r=i[1]):e||e||(s=i[0],o=i[1],r=i[2]),this.osmPlace=o,this.inseeData=r,t||this.elevationFormGroup.controls.elevationInput.setValue(s,{emitEvent:!1}),e||this.geoSearchFormGroup.controls.placeInput.patchValue(this.geocodeService.getReadbleAddress(o,this.geolocationProvider),{emitEvent:!1}),Object(Ap.isDefined)(n)?n(s,o):this.bindLocationOutput([s,o,r])},t=>{this.httpError.next(t),this.isLoadingAddress=!1,this.isLoadingElevation=!1})}setLatLngInputFromDrawnItems(){const t=this.drawnItems.getBounds().getCenter();this.latlngFormGroup.controls.latInput.setValue(t.lat),this.latlngFormGroup.controls.lngInput.setValue(t.lng)}setLatLngDmsInputFromDrawnItems(){const t=this.drawnItems.getBounds().getCenter(),e=new Gm(t.lng,t.lat);this.latlngFormGroup.controls.dmsLatInput.patchValue(e.getLatDeg()),this.latlngFormGroup.controls.dmsLngInput.patchValue(e.getLonDeg())}getElevationFromInputValue(){return this.elevationService.getElevation(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value,this.elevationProvider)}reverseGeocodingFromInputValue(){return this.geocodeService.reverse(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value,this.geolocationProvider)}latLngDmsValidator(t){return new RegExp("^(\\-)?[0-9]{1,2}\\\xb0 [0-9]{1,2}\\' [0-9]{1,2}(\\.[0-9]{1,12})?\\\"").test(t.value)?null:{malformedLatLngDmsFormat:!0}}latLngDecValidator(t){return new RegExp("^(\\-)?[0-9]{1,2}(\\.[0-9]{1,20})?").test(t.value)?null:{malformedLatLngDecFormat:!0}}addressSelectedChanged(t){const e=t.option.value,n=new jd.LatLng(e.boundingbox[0],e.boundingbox[2]),i=new jd.LatLng(e.boundingbox[1],e.boundingbox[3]);this.map.fitBounds(Object(jd.latLngBounds)(n,i)),this.clearGeoResultsLayer(),this.geoResultsLayer.addData(e.geojson),this.flyToGeoResultsItems(),this.geoSearchFormGroup.controls.placeInput.patchValue(this.geocodeService.getReadbleAddress(e,this.geolocationProvider),{emitEvent:!1});const s=new Gm(Number(e.lon),Number(e.lat));this.latlngFormGroup.controls.latInput.setValue(e.lat,{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(e.lon,{emitEvent:!1}),this.latlngFormGroup.controls.dmsLatInput.setValue(s.getLatDeg(),{emitEvent:!1}),this.latlngFormGroup.controls.dmsLngInput.setValue(s.getLonDeg(),{emitEvent:!1}),this.elevationFormGroup.controls.elevationInput.setValue(e.elevation,{emitEvent:!1}),"LineString"===e.geojson.type?(this.addPolyline(this.geocodeService.reverseCorrdinatesArray(this.getOsmSimpleLine?this.geocodeService.simplifyPolyline(e.geojson.coordinates):e.geojson.coordinates)),this.clearGeoResultsLayer()):this.placeMarkerWhenReverseGeocoding?this.addMarkerFromLatLngCoord():Object(jd.geoJSON)().addTo(this.drawnItems).addData(e.geojson),this.callGeolocElevationApisUsingLatLngInputsValues(!1,!0,t=>{let n;n=Array.isArray(t)?t[0]:t,this.osmPlace=e,this.bindLocationOutput([n,e,this.inseeData])}),this.setLocationAccuracy("Localit\xe9"),this.setVlLocationAccuracy(e),this.inputValue=this.geoSearchFormGroup.controls.placeInput.value}clearForm(){this.latlngFormGroup.controls.latInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.controls.dmsLatInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.controls.dmsLngInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.reset("",{emitEvent:!1}),this.elevationFormGroup.controls.elevationInput.setValue("",{emitEvent:!1}),this.elevationFormGroup.reset("",{emitEvent:!1}),this.geoSearchFormGroup.controls.placeInput.setValue("",{emitEvent:!1})}clearGeoResultsLayer(){this.geoResultsLayer.clearLayers()}clearDrawnItemsLayer(){this.drawnItems.clearLayers()}resetLocation(){this._location={},this.inputValue=null,this.inputValuePrepend=null}setLocationAccuracy(t){this._location.locationAccuracy=t}setVlLocationAccuracy(t){this._location.vlLocationAccuracy=this.getVlAccuracyByNominatimObject(t)}bindLocationOutput(t){let e,n,i;e=t[0],n=t[1],i=t[2];const s=this.drawnItems.toGeoJSON();this._location.geometry=s.features[0].geometry;const o=this.drawnItems.getBounds().getCenter();if(this._location.centroid={type:"Point",coordinates:[o.lng,o.lat]},this._location.elevation=e,this._location.localityConsistency=!!this._location.localityConsistency||null,this._location.inseeData=i,Object(Ap.isDefined)(n.address)&&(this._location.osmCountry=n.address.country,this._location.osmCountryCode=n.address.country_code,this._location.osmCounty=n.address.county,this._location.osmPostcode=n.address.postcode,n.address.city&&(this._location.locality=n.address.city),n.address.town&&(this._location.locality=n.address.town),n.address.village&&(this._location.locality=n.address.village),this._location.sublocality=n.hamlet,this._location.osmRoad=n.address.road,this._location.osmState=n.address.state,this._location.osmSuburb=n.address.suburb,this._location.osmId=n.osm_id,this._location.osmNeighbourhood=null,this._location.osmPlaceId=n.place_id,this._location.publishedLocation=null,this._location.station=null),Object(Ap.isDefined)(n.results)){const t=n.results[0].locations[0];this._location.osmCountry=t.adminArea1,this._location.osmCountryCode=t.adminArea1,this._location.osmCounty=t.adminArea4,this._location.osmPostcode=t.postalCode,this._location.locality=t.adminArea5,this._location.sublocality=null,this._location.osmRoad=t.street,this._location.osmState=t.adminArea3,this._location.osmSuburb=null,this._location.osmId=null,this._location.osmNeighbourhood=t.adminArea6,this._location.osmPlaceId=null,this._location.publishedLocation=null,this._location.station=null}this._location.inputLocation=null!==this.inputValue?this.inputValue:null,this.location.next(this._location)}getVlAccuracyByNominatimObject(t){const e=t.class;let n;if(-1!==e.toLowerCase().indexOf("way"))return tf.PLACE;switch(e){case"boundary":n=t.address.city||t.address.town||t.address.village||t.address.hamlet?tf.CITY:t.address.county?tf.DEPARTEMENT:t.address.state?tf.REGION:t.address.country?tf.COUNTRY:tf.OTHER;break;case"landuse":case"place":case"amenity":case"building":case"historic":n=tf.PLACE;break;default:n=tf.OTHER}return n}setLatLngInputFormat(t){"dec"!==t&&"dms"!==t||(this.latLngFormat=t)}gpsMarkerSetValues(t,e,n){this.latlngFormGroup.controls.latInput.setValue(t),this.latlngFormGroup.controls.lngInput.setValue(e),this.elevationFormGroup.controls.elevationInput.setValue(n,{emitEvent:!1}),this.addMarkerFromLatLngCoord(),this.callGeolocElevationApisUsingLatLngInputsValues(!0,!1),this.geolocatedPhotoLatLngLayer.clearLayers()}resetComponent(){this.clearForm(),this.resetLocation(),this.clearGeoResultsLayer(),this.clearDrawnItemsLayer(),this.setMapDrawMode(),this.map.flyTo({lat:this.lngLatInit[1],lng:this.lngLatInit[0]},this.zoomInit,{animate:!1})}_patchAddress(t){this.geoSearchFormGroup.controls.placeInput.setValue(t,{emitEvent:!1})}_setAddress(t){this.geoSearchFormGroup.controls.placeInput.setValue(t,{emitEvent:!0})}_patchElevation(t){this.elevationFormGroup.controls.elevationInput.setValue(t,{emitEvent:!1})}_patchLatLngDec(t,e){this.latlngFormGroup.controls.latInput.setValue(t,{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(e,{emitEvent:!1});const n=new Gm(e,t);this.latlngFormGroup.controls.dmsLatInput.patchValue(n.getLatDeg()),this.latlngFormGroup.controls.dmsLngInput.patchValue(n.getLonDeg())}_drawMarker(t,e){this.latlngFormGroup.controls.latInput.setValue(t,{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(e,{emitEvent:!1});const n=new Gm(e,t);this.latlngFormGroup.controls.dmsLatInput.patchValue(n.getLatDeg()),this.latlngFormGroup.controls.dmsLngInput.patchValue(n.getLonDeg()),this.addMarkerFromLatLngCoord(),this.callGeolocElevationApisUsingLatLngInputsValues()}_patchGeometry(t){this.clearDrawnItemsLayer();for(const e of t){if("point"===e.type.toLowerCase()||"multipoint"===e.type.toLowerCase()){const n=Object(jd.latLng)(e.coordinates[1],e.coordinates[0]);let i;1===t.length?i=$m(e.coordinates[1],e.coordinates[0],()=>{this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()}),this.setLocationAccuracy("10 \xe0 100 m"),this._location.vlLocationAccuracy=tf.PRECISE}):t.length>1&&(i=new jd.Marker(n,{icon:qm()})),i.addTo(this.drawnItems)}if("linestring"===e.type.toLowerCase()||"multilinestring"===e.type.toLowerCase()){const t=[];for(const n of e.coordinates)t.push(new jd.LatLng(n[1],n[0]));new jd.Polyline(t).addTo(this.drawnItems),this._location.vlLocationAccuracy=tf.PRECISE}if("polygon"===e.type.toLowerCase()||"multipolygon"===e.type.toLowerCase()){let t=[];if("polygon"===e.type.toLowerCase()){for(const n of e.coordinates)t.push(new jd.LatLng(n[1],n[0]));new jd.Polygon(t).addTo(this.drawnItems)}else if("multipolygon"===e.type.toLowerCase()){const n=Array(e.coordinates);for(const e of n)for(const n of e)for(const e of n){t=[];for(const n of e)t.push(new jd.LatLng(n[1],n[0]));new jd.Polygon(t).addTo(this.drawnItems)}}this._location.vlLocationAccuracy=tf.PRECISE}}this.setMapEditMode(),this.flyToDrawnItems()}setFocusOnInput(){this.locationInput.nativeElement.focus()}}class nf{constructor(t){this.geocodeService=t}transform(t,e){return this.geocodeService.getReadbleAddress(t,e)}}class sf{}function of(t){switch(t.length){case 0:return new fa;case 1:return t[0];default:return new _a(t)}}function rf(t,e,n,i,s={},o={}){const r=[],a=[];let l=-1,h=null;if(i.forEach(t=>{const n=t.offset,i=n==l,u=i&&h||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,r),a){case ga:a=s[n];break;case ca:a=o[n];break;default:a=e.normalizeStyleValue(n,i,a,r)}u[i]=a}),i||a.push(u),h=u,l=n}),r.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${r.join(t)}`)}return a}function af(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&lf(n,"start",t)));break;case"done":t.onDone(()=>i(n&&lf(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&lf(n,"destroy",t)))}}function lf(t,e,n){const i=n.totalTime,s=hf(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,void 0==i?t.totalTime:i,!!n.disabled),o=t._data;return null!=o&&(s._data=o),s}function hf(t,e,n,i,s="",o=0,r){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:s,totalTime:o,disabled:!!r}}function uf(t,e,n){let i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function cf(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let df=(t,e)=>!1,pf=(t,e)=>!1,mf=(t,e,n)=>[];if("undefined"!=typeof Element){if(df=((t,e)=>t.contains(e)),Element.prototype.matches)pf=((t,e)=>t.matches(e));else{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;e&&(pf=((t,n)=>e.apply(t,[n])))}mf=((t,e,n)=>{let i=[];if(n)i.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&i.push(n)}return i})}let ff=null,_f=!1;function gf(t){ff||(ff=yf()||{},_f=!!ff.style&&"WebkitAppearance"in ff.style);let e=!0;return ff.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&!(e=t in ff.style)&&_f&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in ff.style),e}function yf(){return"undefined"!=typeof document?document.body:null}const vf=pf,bf=df,wf=mf;function Ef(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}class xf{}xf.NOOP=new class{validateStyleProperty(t){return gf(t)}matchesElement(t,e){return vf(t,e)}containsElement(t,e){return bf(t,e)}query(t,e,n){return wf(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,s,o=[],r){return new fa(n,i)}};const Cf=1e3,Lf="{{",kf="ng-enter",Sf="ng-leave",Tf="ng-trigger",If=".ng-trigger",Pf="ng-animating",Mf=".ng-animating";function Af(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Df(parseFloat(e[1]),e[2])}function Df(t,e){switch(e){case"s":return t*Cf;default:return t}}function Of(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,s=0,o="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};i=Df(parseFloat(n[1]),n[2]);const r=n[3];null!=r&&(s=Df(Math.floor(parseFloat(r)),n[4]));const a=n[5];a&&(o=a)}else i=t;if(!n){let n=!1,o=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(o,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:s,easing:o}}(t,e,n)}function Rf(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function Nf(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else Rf(t,n);return n}function Ff(t,e){t.style&&Object.keys(e).forEach(n=>{const i=Gf(n);t.style[i]=e[n]})}function zf(t,e){t.style&&Object.keys(e).forEach(e=>{const n=Gf(e);t.style[n]=""})}function Vf(t){return Array.isArray(t)?1==t.length?t[0]:da(t):t}const Bf=new RegExp(`${Lf}\\s*(.+?)\\s*}}`,"g");function jf(t){let e=[];if("string"==typeof t){const n=t.toString();let i;for(;i=Bf.exec(n);)e.push(i[1]);Bf.lastIndex=0}return e}function Hf(t,e,n){const i=t.toString(),s=i.replace(Bf,(t,i)=>{let s=e[i];return e.hasOwnProperty(i)||(n.push(`Please provide a value for the animation param ${i}`),s=""),s.toString()});return s==i?t:s}function Uf(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Zf=/-+([a-z0-9])/g;function Gf(t){return t.replace(Zf,(...t)=>t[1].toUpperCase())}function $f(t,e){return 0===t||0===e}function qf(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let o=e[0],r=[];if(i.forEach(t=>{o.hasOwnProperty(t)||r.push(t),o[t]=n[t]}),r.length)for(var s=1;s<e.length;s++){let n=e[s];r.forEach(function(e){n[e]=Kf(t,e)})}}return e}function Wf(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function Kf(t,e){return window.getComputedStyle(t)[e]}const Yf="*",Qf=new Set(["true","1"]),Xf=new Set(["false","0"]);function Jf(t,e){const n=Qf.has(t)||Xf.has(t),i=Qf.has(e)||Xf.has(e);return(s,o)=>{let r=t==Yf||t==s,a=e==Yf||e==o;return!r&&n&&"boolean"==typeof s&&(r=s?Qf.has(t):Xf.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Qf.has(e):Xf.has(e)),r&&a}}const t_=":self",e_=new RegExp(`s*${t_}s*,?`,"g");function n_(t,e,n){return new s_(t).build(e,n)}const i_="";class s_{constructor(t){this._driver=t}build(t,e){const n=new o_(e);return this._resetContextStyleTimingState(n),Wf(this,Vf(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector=i_,t.collectedStyles={},t.collectedStyles[i_]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const s=[],o=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,s.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const s=this.visitTransition(t,e);n+=s.queryCount,i+=s.depCount,o.push(s)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:s,transitions:o,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const s=new Set,o=i||{};if(n.styles.forEach(t=>{if(r_(t)){const e=t;Object.keys(e).forEach(t=>{jf(e[t]).forEach(t=>{o.hasOwnProperty(t)||s.add(t)})})}}),s.size){const n=Uf(s.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Wf(this,Vf(t.animation),e);return{type:1,matchers:function(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>(function(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const s=i[1],o=i[2],r=i[3];e.push(Jf(s,r)),"<"!=o[0]||s==Yf&&r==Yf||e.push(Jf(r,s))})(t,n,e)):n.push(t),n}(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:a_(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Wf(this,t,e)),options:a_(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const s=t.steps.map(t=>{e.currentTime=n;const s=Wf(this,t,e);return i=Math.max(i,e.currentTime),s});return e.currentTime=i,{type:3,steps:s,options:a_(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return l_(Of(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=l_(0,0,"");return t.dynamic=!0,t.strValue=i,t}return l_((n=n||Of(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);let i;e.currentAnimateTimings=n;let s=t.styles?t.styles:pa({});if(5==s.type)i=this.visitKeyframes(s,e);else{let s=t.styles,o=!1;if(!s){o=!0;const t={};n.easing&&(t.easing=n.easing),s=pa(t)}e.currentTime+=n.duration+n.delay;const r=this.visitStyle(s,e);r.isEmptyStep=o,i=r}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==ca?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,s=null;return n.forEach(t=>{if(r_(t)){const e=t,n=e.easing;if(n&&(s=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf(Lf)>=0){i=!0;break}}}),{type:6,styles:n,easing:s,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,s=e.currentTime;n&&s>0&&(s-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const o=e.collectedStyles[e.currentQuerySelector],r=o[n];let a=!0;r&&(s!=i&&s>=r.startTime&&i<=r.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${r.startTime}ms" and "${r.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${i}ms"`),a=!1),s=r.startTime),a&&(o[n]={startTime:s,endTime:i}),e.options&&function(i,s,o){const r=e.options.params||{},a=jf(t[n]);a.length&&a.forEach(t=>{r.hasOwnProperty(t)||o.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(0,0,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const s=[];let o=!1,r=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(r_(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(r_(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),h=0;return null!=l&&(i++,h=n.offset=l),r=r||h<0||h>1,o=o||h<a,a=h,s.push(h),n});r&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),o&&e.errors.push("Please ensure that all keyframe offsets are in order");const h=t.steps.length;let u=0;i>0&&i<h?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(u=1/(h-1));const c=h-1,d=e.currentTime,p=e.currentAnimateTimings,m=p.duration;return l.forEach((t,i)=>{const o=u>0?i==c?1:u*i:s[i],r=o*m;e.currentTime=d+p.delay+r,p.duration=r,this._validateStyleAst(t,e),t.offset=o,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Wf(this,Vf(t.animation),e),options:a_(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:a_(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:a_(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>t==t_);return e&&(t=t.replace(e_,"")),[t=t.replace(/@\*/g,If).replace(/@\w+/g,t=>If+"-"+t.substr(1)).replace(/:animating/g,Mf),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,uf(e.collectedStyles,e.currentQuerySelector,{});const r=Wf(this,Vf(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:r,originalSelector:t.selector,options:a_(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Of(t.timings,e.errors,!0);return{type:12,animation:Wf(this,Vf(t.animation),e),timings:n,options:null}}}class o_{constructor(t){this.errors=t,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 r_(t){return!Array.isArray(t)&&"object"==typeof t}function a_(t){return t?(t=Rf(t)).params&&(t.params=function(t){return t?Rf(t):null}(t.params)):t={},t}function l_(t,e,n){return{duration:t,delay:e,easing:n}}function h_(t,e,n,i,s,o,r=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:s,delay:o,totalTime:s+o,easing:r,subTimeline:a}}class u_{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const c_=1,d_=new RegExp(":enter","g"),p_=new RegExp(":leave","g");function m_(t,e,n,i,s,o={},r={},a,l,h=[]){return(new f_).buildKeyframes(t,e,n,i,s,o,r,a,l,h)}class f_{buildKeyframes(t,e,n,i,s,o,r,a,l,h=[]){l=l||new u_;const u=new g_(t,e,l,i,s,h,[]);u.options=a,u.currentTimeline.setStyles([o],null,u.errors,a),Wf(this,n,u);const c=u.timelines.filter(t=>t.containsAnimation());if(c.length&&Object.keys(r).length){const t=c[c.length-1];t.allowOnlyTimelineStyles()||t.setStyles([r],null,u.errors,a)}return c.length?c.map(t=>t.buildKeyframes()):[h_(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),s=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);s!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const s=null!=n.duration?Af(n.duration):null,o=null!=n.delay?Af(n.delay):null;return 0!==s&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,s,o);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),Wf(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const s=t.options;if(s&&(s.params||s.delay)&&((i=e.createSubContext(s)).transformIntoNewTimeline(),null!=s.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=__);const t=Af(s.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Wf(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?Af(t.options.delay):0;t.steps.forEach(o=>{const r=e.createSubContext(t.options);s&&r.delayNextStep(s),Wf(this,o,r),i=Math.max(i,r.currentTimeline.currentTime),n.push(r.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Of(e.params?Hf(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(n.duration),this.visitStyle(s,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const s=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(s):n.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,s=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(t=>{o.forwardTime((t.offset||0)*s),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(i+s),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},s=i.delay?Af(i.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=__);let o=n;const r=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=r.length;let a=null;r.forEach((n,i)=>{e.currentQueryIndex=i;const r=e.createSubContext(t.options,n);s&&r.delayNextStep(s),n===e.element&&(a=r.currentTimeline),Wf(this,t.animation,r),r.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,r.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,s=t.timings,o=Math.abs(s.duration),r=o*(e.currentQueryTotal-1);let a=o*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":a=r-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const h=l.currentTime;Wf(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-h+(i.startTime-n.currentTimeline.startTime)}}const __={};class g_{constructor(t,e,n,i,s,o,r,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=s,this.errors=o,this.timelines=r,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=__,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new y_(this._driver,e,0),r.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=Af(n.duration)),null!=n.delay&&(i.delay=Af(n.delay));const s=n.params;if(s){let t=i.params;t||(t=this.options.params={}),Object.keys(s).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=Hf(s[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,s=new g_(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=__,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},s=new v_(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(s),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,s,o){let r=[];if(i&&r.push(this.element),t.length>0){t=(t=t.replace(d_,"."+this._enterClassName)).replace(p_,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),r.push(...e)}return s||0!=r.length||o.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),r}}class y_{constructor(t,e,n,i){this._driver=t,this.element=e,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(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,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(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new y_(this._driver,t,e||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+=c_,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||ca,this._currentKeyframe[t]=ca}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const s=i&&i.params||{},o=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e)).forEach(t=>{n[t]=ca}):Nf(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(o).forEach(t=>{const e=Hf(o[t],s,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:ca),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((s,o)=>{const r=Nf(s,!0);Object.keys(r).forEach(n=>{const i=r[n];i==ga?t.add(n):i==ca&&e.add(n)}),n||(r.offset=o/this.duration),i.push(r)});const s=t.size?Uf(t.values()):[],o=e.size?Uf(e.values()):[];if(n){const t=i[0],e=Rf(t);t.offset=0,e.offset=1,i=[t,e]}return h_(this.element,i,s,o,this.duration,this.startTime,this.easing,!1)}}class v_ extends y_{constructor(t,e,n,i,s,o,r=!1){super(t,e,o.delay),this.element=e,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=s,this._stretchStartingKeyframe=r,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],o=n+e,r=e/o,a=Nf(t[0],!1);a.offset=0,s.push(a);const l=Nf(t[0],!1);l.offset=b_(r),s.push(l);const h=t.length-1;for(let i=1;i<=h;i++){let r=Nf(t[i],!1);r.offset=b_((e+r.offset*n)/o),s.push(r)}n=o,e=0,i="",t=s}return h_(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function b_(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class w_{}class E_ extends w_{normalizePropertyName(t,e){return Gf(t)}normalizeStyleValue(t,e,n,i){let s="";const o=n.toString().trim();if(x_[e]&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return o+s}}const x_=function(t){const e={};return"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(",").forEach(t=>e[t]=!0),e}();function C_(t,e,n,i,s,o,r,a,l,h,u,c,d){return{type:0,element:t,triggerName:e,isRemovalTransition:s,fromState:n,fromStyles:o,toState:i,toStyles:r,timelines:a,queriedElements:l,preStyleProps:h,postStyleProps:u,totalTime:c,errors:d}}const L_={};class k_{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,s){return t.some(t=>t(e,n,i,s))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],s=this._stateStyles[t],o=i?i.buildStyles(e,n):{};return s?s.buildStyles(e,n):o}build(t,e,n,i,s,o,r,a,l){const h=[],u=this.ast.options&&this.ast.options.params||L_,c=this.buildStyles(n,r&&r.params||L_,h),d=a&&a.params||L_,p=this.buildStyles(i,d,h),m=new Set,f=new Map,_=new Map,g="void"===i,y={params:Object.assign({},u,d)},v=m_(t,e,this.ast.animation,s,o,c,p,y,l,h);let b=0;if(v.forEach(t=>{b=Math.max(t.duration+t.delay,b)}),h.length)return C_(e,this._triggerName,n,i,g,c,p,[],[],f,_,b,h);v.forEach(t=>{const n=t.element,i=uf(f,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const s=uf(_,n,{});t.postStyleProps.forEach(t=>s[t]=!0),n!==e&&m.add(n)});const w=Uf(m.values());return C_(e,this._triggerName,n,i,g,c,p,v,w,f,_,b)}}class S_{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},i=Rf(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const s=t;Object.keys(s).forEach(t=>{let o=s[t];o.length>1&&(o=Hf(o,i,e)),n[t]=o})}}),n}}class T_{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new S_(t.style,t.options&&t.options.params||{})}),I_(this.states,"true","1"),I_(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new k_(t,e,this.states))}),this.fallbackTransition=function(e,n){return new k_(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},n)}(0,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(s=>s.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function I_(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const P_=new u_;class M_{constructor(t,e){this._driver=t,this._normalizer=e,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=n_(this._driver,e,n);if(n.length)throw new Error(`Unable to build the animation due to the following errors: ${n.join("\n")}`);this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,s=rf(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],s=this._animations[t];let o;const r=new Map;if(s?(o=m_(this._driver,e,s,kf,Sf,{},{},n,P_,i)).forEach(t=>{const e=uf(r,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)}):(i.push("The requested animation doesn't exist or has already been destroyed"),o=[]),i.length)throw new Error(`Unable to create the animation due to the following errors: ${i.join("\n")}`);r.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,ca)})});const a=of(o.map(t=>{const e=r.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,n,i){const s=hf(e,"","","");return af(this._getPlayer(t),n,s,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const s=this._getPlayer(t);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const A_="ng-animate-queued",D_=".ng-animate-queued",O_="ng-animate-disabled",R_=".ng-animate-disabled",N_="ng-star-inserted",F_=".ng-star-inserted",z_=[],V_={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},B_={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},j_="__ng_removed";class H_{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function(t){return null!=t?t:null}(n?t.value:t),n){const e=Rf(t);delete e.value,this.options=e}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const U_="void",Z_=new H_(U_),G_=new H_("DELETED");class $_{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,tg(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=n&&"done"!=n)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);const s=uf(this._elementListeners,t,[]),o={name:e,phase:n,callback:i};s.push(o);const r=uf(this._engine.statesByElement,t,{});return r.hasOwnProperty(e)||(tg(t,Tf),tg(t,Tf+"-"+e),r[e]=Z_),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete r[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const s=this._getTrigger(e),o=new W_(this.id,e,t);let r=this._engine.statesByElement.get(t);r||(tg(t,Tf),tg(t,Tf+"-"+e),this._engine.statesByElement.set(t,r={}));let a=r[e];const l=new H_(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),r[e]=l,a){if(a===G_)return o}else a=Z_;if(l.value!==U_&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let s=0;s<n.length;s++){const i=n[s];if(!e.hasOwnProperty(i)||t[i]!==e[i])return!1}return!0}(a.params,l.params)){const e=[],n=s.matchStyles(a.value,a.params,e),i=s.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{zf(t,n),Ff(t,i)})}return}const h=uf(this._engine.playersByElement,t,[]);h.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=s.matchTransition(a.value,l.value,t,l.params),c=!1;if(!u){if(!i)return;u=s.fallbackTransition,c=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:o,isFallbackTransition:c}),c||(tg(t,A_),o.onStart(()=>{eg(t,A_)})),o.onDone(()=>{let e=this.players.indexOf(o);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(o);t>=0&&n.splice(t,1)}}),this.players.push(o),h.push(o),o}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e,n=!1){this._engine.driver.query(t,If,!0).forEach(t=>{if(t[j_])return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)})}triggerLeaveAnimation(t,e,n,i){const s=this._engine.statesByElement.get(t);if(s){const o=[];if(Object.keys(s).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,U_,i);n&&o.push(n)}}),o.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&of(o).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const i=e.name;if(n.has(i))return;n.add(i);const s=this._triggers[i].fallbackTransition,o=this._engine.statesByElement.get(t)[i]||Z_,r=new H_(U_),a=new W_(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:s,fromState:o,toState:r,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e,!0),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}this.prepareLeaveAnimationListeners(t),i?n.markElementAsRemoved(this.id,t,!1,e):(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}insertNode(t,e){tg(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const s=n.element,o=this._elementListeners.get(s);o&&o.forEach(e=>{if(e.name==n.triggerName){const i=hf(s,n.triggerName,n.fromState.value,n.toState.value);i._data=t,af(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find(e=>e.element===t)||e}}class q_{constructor(t,e){this.driver=t,this._normalizer=e,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=((t,e)=>{})}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new $_(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let s=n;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,e)){this._namespaceList.splice(s+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i<t.length;i++){const s=n[t[i]].namespaceId;if(s){const t=this._fetchNamespace(s);t&&e.add(t)}}}return e}trigger(t,e,n,i){if(K_(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,i),!0}return!1}insertNode(t,e,n,i){if(!K_(e))return;const s=e[j_];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),tg(t,O_)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),eg(t,O_))}removeNode(t,e,n){if(!K_(e))return void this._onRemovalComplete(e,n);const i=t?this._fetchNamespace(t):null;i?i.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e[j_]={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,s){return K_(e)?this._fetchNamespace(t).listen(e,n,i,s):()=>{}}_buildInstruction(t,e,n,i){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e)}destroyInnerAnimations(t){let e=this.driver.query(t,If,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,Mf,!0)).forEach(t=>this.finishActiveQueriedAnimationOnElement(t))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()});const n=this.statesByElement.get(t);n&&Object.keys(n).forEach(t=>n[t]=G_)}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return of(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[j_];if(e&&e.setForRemoval){if(t[j_]=V_,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,R_)&&this.markElementAsDisabled(t,!1),this.driver.query(t,R_,!0).forEach(e=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)tg(this.collectedEnterElements[n],N_);if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}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(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?of(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const n=new u_,i=[],s=new Map,o=[],r=new Map,a=new Map,l=new Map,h=new Set;this.disabledNodes.forEach(t=>{h.add(t);const e=this.driver.query(t,D_,!0);for(let n=0;n<e.length;n++)h.add(e[n])});const u=yf(),c=Array.from(this.statesByElement.keys()),d=X_(c,this.collectedEnterElements),p=new Map;let m=0;d.forEach((t,e)=>{const n=kf+m++;p.set(e,n),t.forEach(t=>tg(t,n))});const f=[],_=new Set,g=new Set;for(let P=0;P<this.collectedLeaveElements.length;P++){const t=this.collectedLeaveElements[P],e=t[j_];e&&e.setForRemoval&&(f.push(t),_.add(t),e.hasAnimation?this.driver.query(t,F_,!0).forEach(t=>_.add(t)):g.add(t))}const y=new Map,v=X_(c,Array.from(_));v.forEach((t,e)=>{const n=Sf+m++;y.set(e,n),t.forEach(t=>tg(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=p.get(e);t.forEach(t=>eg(t,n))}),v.forEach((t,e)=>{const n=y.get(e);t.forEach(t=>eg(t,n))}),f.forEach(t=>{this.processLeaveNode(t)})});const b=[],w=[];for(let P=this._namespaceList.length-1;P>=0;P--)this._namespaceList[P].drainQueuedTransitions(e).forEach(t=>{const e=t.player,s=t.element;if(b.push(e),this.collectedEnterElements.length){const t=s[j_];if(t&&t.setForMove)return void e.destroy()}if(!u||!this.driver.containsElement(u,s))return void e.destroy();const h=y.get(s),c=p.get(s),d=this._buildInstruction(t,n,c,h);if(!d.errors||!d.errors.length)return t.isFallbackTransition?(e.onStart(()=>zf(s,d.fromStyles)),e.onDestroy(()=>Ff(s,d.toStyles)),void i.push(e)):(d.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(s,d.timelines),o.push({instruction:d,player:e,element:s}),d.queriedElements.forEach(t=>uf(r,t,[]).push(e)),d.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),void d.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=l.get(e);i||l.set(e,i=new Set),n.forEach(t=>i.add(t))}));w.push(d)});if(w.length){const t=[];w.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),b.forEach(t=>t.destroy()),this.reportError(t)}const E=new Map,x=new Map;o.forEach(t=>{const e=t.element;n.has(e)&&(x.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,E))}),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{uf(E,e,[]).push(t),t.destroy()})});const C=f.filter(t=>ig(t,a,l)),L=new Map;Q_(L,this.driver,g,l,ca).forEach(t=>{ig(t,a,l)&&C.push(t)});const k=new Map;d.forEach((t,e)=>{Q_(k,this.driver,new Set(t),a,ga)}),C.forEach(t=>{const e=L.get(t),n=k.get(t);L.set(t,Object.assign({},e,n))});const S=[],T=[],I={};o.forEach(t=>{const{element:e,player:o,instruction:r}=t;if(n.has(e)){if(h.has(e))return o.onDestroy(()=>Ff(e,r.toStyles)),o.disabled=!0,o.overrideTotalTime(r.totalTime),void i.push(o);let t=I;if(x.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=x.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>x.set(e,t))}const n=this._buildAnimation(o.namespaceId,r,E,s,k,L);if(o.setRealPlayer(n),t===I)S.push(o);else{const e=this.playersByElement.get(t);e&&e.length&&(o.parentPlayer=of(e)),i.push(o)}}else zf(e,r.fromStyles),o.onDestroy(()=>Ff(e,r.toStyles)),T.push(o),h.has(e)&&i.push(o)}),T.forEach(t=>{const e=s.get(t.element);if(e&&e.length){const n=of(e);t.setRealPlayer(n)}}),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let P=0;P<f.length;P++){const t=f[P],e=t[j_];if(eg(t,Sf),e&&e.hasAnimation)continue;let n=[];if(r.size){let e=r.get(t);e&&e.length&&n.push(...e);let i=this.driver.query(t,Mf,!0);for(let t=0;t<i.length;t++){let e=r.get(i[t]);e&&e.length&&n.push(...e)}}const i=n.filter(t=>!t.destroyed);i.length?ng(this,t,i):this.processLeaveNode(t)}return f.length=0,S.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),S}elementContainsData(t,e){let n=!1;const i=e[j_];return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,s){let o=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(o=e)}else{const e=this.playersByElement.get(t);if(e){const t=!s||s==U_;e.forEach(e=>{e.queued||(t||e.triggerName==i)&&o.push(e)})}}return(n||i)&&(o=o.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),o}_beforeAnimationBuild(t,e,n){const i=e.element,s=e.isRemovalTransition?void 0:t,o=e.isRemovalTransition?void 0:e.triggerName;for(const r of e.timelines){const t=r.element,a=t!==i,l=uf(n,t,[]);this._getPreviousPlayers(t,a,s,o,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}zf(i,e.fromStyles)}_buildAnimation(t,e,n,i,s,o){const r=e.triggerName,a=e.element,l=[],h=new Set,u=new Set,c=e.timelines.map(e=>{const c=e.element;h.add(c);const d=c[j_];if(d&&d.removedBeforeQueried)return new fa(e.duration,e.delay);const p=c!==a,m=function(t){const e=[];return function t(e,n){for(let i=0;i<e.length;i++){const s=e[i];s instanceof _a?t(s.players,n):n.push(s)}}((n.get(c)||z_).map(t=>t.getRealPlayer()),e),e}().filter(t=>!!t.element&&t.element===c),f=s.get(c),_=o.get(c),g=rf(0,this._normalizer,0,e.keyframes,f,_),y=this._buildPlayer(e,g,m);if(e.subTimeline&&i&&u.add(c),p){const e=new W_(t,r,c);e.setRealPlayer(y),l.push(e)}return y});l.forEach(t=>{uf(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>(function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e)){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e]){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i})(this.playersByQueriedElement,t.element,t))}),h.forEach(t=>tg(t,Pf));const d=of(c);return d.onDestroy(()=>{h.forEach(t=>eg(t,Pf)),Ff(a,e.toStyles)}),u.forEach(t=>{uf(i,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new fa(t.duration,t.delay)}}class W_{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new fa,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>af(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){uf(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function K_(t){return t&&1===t.nodeType}function Y_(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function Q_(t,e,n,i,s){const o=[];n.forEach(t=>o.push(Y_(t)));const r=[];i.forEach((n,i)=>{const o={};n.forEach(t=>{const n=o[t]=e.computeStyle(i,t,s);n&&0!=n.length||(i[j_]=B_,r.push(i))}),t.set(i,o)});let a=0;return n.forEach(t=>Y_(t,o[a++])),r}function X_(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),s=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let o=s.get(e);if(o)return o;const r=e.parentNode;return o=n.has(r)?r:i.has(r)?1:t(r),s.set(e,o),o}(t);1!==e&&n.get(e).push(t)}),n}const J_="$$classes";function tg(t,e){if(t.classList)t.classList.add(e);else{let n=t[J_];n||(n=t[J_]={}),n[e]=!0}}function eg(t,e){if(t.classList)t.classList.remove(e);else{let n=t[J_];n&&delete n[e]}}function ng(t,e,n){of(n).onDone(()=>t.processLeaveNode(e))}function ig(t,e,n){const i=n.get(t);if(!i)return!1;let s=e.get(t);return s?i.forEach(t=>s.add(t)):e.set(t,i),n.delete(t),!0}class sg{constructor(t,e){this._driver=t,this._triggerCache={},this.onRemovalComplete=((t,e)=>{}),this._transitionEngine=new q_(t,e),this._timelineEngine=new M_(t,e),this._transitionEngine.onRemovalComplete=((t,e)=>this.onRemovalComplete(t,e))}registerTrigger(t,e,n,i,s){const o=t+"-"+i;let r=this._triggerCache[o];if(!r){const t=[],e=n_(this._driver,s,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);r=function(t,e){return new T_(t,e)}(i,e),this._triggerCache[o]=r}this._transitionEngine.registerTrigger(e,i,r)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n){this._transitionEngine.removeNode(t,e,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,s]=cf(n);this._timelineEngine.command(t,e,s,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,s){if("@"==n.charAt(0)){const[t,i]=cf(n);return this._timelineEngine.listen(t,e,i,s)}return this._transitionEngine.listen(t,e,n,i,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}const og=3,rg="animation",ag="animationend",lg=1e3;class hg{constructor(t,e,n,i,s,o,r){this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=s,this._fillMode=o,this._onDoneFn=r,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=(t=>this._handleCallback(t))}apply(){!function(t,e){const n=fg(t,"").trim();n.length&&(function(t,e){let n=0;for(let i=0;i<t.length;i++)","===t.charAt(i)&&n++}(n),e=`${n}, ${e}`),mg(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),pg(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){ug(this._element,this._name,"paused")}resume(){ug(this._element,this._name,"running")}setPosition(t){const e=cg(this._element,this._name);this._position=t*this._duration,mg(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=parseFloat(t.elapsedTime.toFixed(og))*lg;t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),pg(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=fg(t,"").split(","),i=dg(n,e);i>=0&&(n.splice(i,1),mg(t,"",n.join(",")))}(this._element,this._name))}}function ug(t,e,n){mg(t,"PlayState",n,cg(t,e))}function cg(t,e){const n=fg(t,"");return n.indexOf(",")>0?dg(n.split(","),e):dg([n],e)}function dg(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function pg(t,e,n){n?t.removeEventListener(ag,e):t.addEventListener(ag,e)}function mg(t,e,n,i){const s=rg+e;if(null!=i){const e=t.style[s];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[s]=n}function fg(t,e){return t.style[rg+e]}const _g="forwards",gg="linear",yg=function(){var t={INITIALIZED:1,STARTED:2,FINISHED:3,DESTROYED:4};return t[t.INITIALIZED]="INITIALIZED",t[t.STARTED]="STARTED",t[t.FINISHED]="FINISHED",t[t.DESTROYED]="DESTROYED",t}();class vg{constructor(t,e,n,i,s,o,r){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=s,this._finalStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this.state=0,this.easing=o||gg,this.totalTime=i+s,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this.state>=yg.DESTROYED||(this.state=yg.DESTROYED,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this.state>=yg.FINISHED||(this.state=yg.FINISHED,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this.state>=yg.STARTED}init(){this.state>=yg.INITIALIZED||(this.state=yg.INITIALIZED,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this.state=yg.STARTED),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 hg(this.element,this.animationName,this._duration,this._delay,this.easing,_g,()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this.state>=yg.FINISHED;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Kf(this.element,n))})}this.currentSnapshot=t}}class bg extends fa{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=Ef(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}const wg="gen_css_kf_",Eg=" ";class xg{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return gf(t)}matchesElement(t,e){return vf(t,e)}containsElement(t,e){return bf(t,e)}query(t,e,n){return wf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){let i=`@keyframes ${e} {\n`,s="";(n=n.map(t=>Ef(t))).forEach(t=>{s=Eg;const e=parseFloat(t.offset);i+=`${s}${100*e}% {\n`,s+=Eg,Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${s}animation-timing-function: ${n};\n`));default:return void(i+=`${s}${e}: ${n};\n`)}}),i+=`${s}}\n`}),i+="}\n";const o=document.createElement("style");return o.innerHTML=i,o}animate(t,e,n,i,s,o=[],r){r&&this._notifyFaultyScrubber();const a=o.filter(t=>t instanceof vg),l={};$f(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const h=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=qf(t,e,l));if(0==n)return new bg(t,h);const u=`${wg}${this._count++}`,c=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(c);const d=new vg(t,e,u,n,i,s,h);return d.onDestroy(()=>void c.parentNode.removeChild(c)),d}_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 Cg{constructor(t,e,n){this.element=t,this.keyframes=e,this.options=n,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(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),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._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Kf(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class Lg{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(kg().toString()),this._cssKeyframesDriver=new xg}validateStyleProperty(t){return gf(t)}matchesElement(t,e){return vf(t,e)}containsElement(t,e){return bf(t,e)}query(t,e,n){return wf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,s,o=[],r){if(!r&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,s,o);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};s&&(a.easing=s);const l={},h=o.filter(t=>t instanceof Cg);return $f(n,i)&&h.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])}),e=qf(t,e=e.map(t=>Nf(t,!1)),l),new Cg(t,e,a)}}function kg(){return"undefined"!=typeof Element&&Element.prototype.animate||{}}class Sg extends ha{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:ee.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?da(t):t;return Pg(this._renderer,null,e,"register",[n]),new Tg(e,this._renderer)}}class Tg extends ua{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new Ig(this._id,t,e||{},this._renderer)}}class Ig{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return Pg(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}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(t){this._command("setPosition",t)}getPosition(){return 0}}function Pg(t,e,n,i,s){return t.setProperty(e,`@@${n}:${i}`,s)}const Mg="@",Ag="@.disabled";class Dg{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=((t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)})}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new Og("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,s=e.id+"-"+this._currentId;return this._currentId++,this.engine.register(s,t),e.data.animation.forEach(e=>this.engine.registerTrigger(i,s,t,e.name,e)),new Rg(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,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()}}class Og{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e){this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(t){return this.delegate.selectRootElement(t)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==Mg&&e==Ag?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class Rg extends Og{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==Mg?"."==e.charAt(1)&&e==Ag?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==Mg){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let s=e.substr(1),o="";return s.charAt(0)!=Mg&&([s,o]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,i,s,o,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}class Ng extends sg{constructor(t,e){super(t,e)}}function Fg(){return"function"==typeof kg()?new Lg:new xg}function zg(){return new E_}function Vg(t,e,n){return new Dg(t,e,n)}const Bg=new rt("AnimationModuleType");class jg{}class Hg{constructor(){this._listeners=[]}notify(t,e){for(let n of this._listeners)n(t,e)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(e=>t!==e)}}ngOnDestroy(){this._listeners=[]}}Hg.ngInjectableDef=ot({factory:function(){return new Hg},token:Hg,providedIn:"root"});const Ug=new rt("mat-select-scroll-strategy");function Zg(t){return()=>t.scrollStrategies.reposition()}class Gg{}function $g(t,e){return new E(e?n=>e.schedule(qg,0,{error:t,subscriber:n}):e=>e.error(t))}function qg({error:t,subscriber:e}){e.error(t)}class Wg{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return Jl(this.value);case"E":return $g(this.error);case"C":return Xl()}throw new Error("unexpected notification kind value")}static createNext(t){return void 0!==t?new Wg("N",t):Wg.undefinedValueNotification}static createError(t){return new Wg("E",void 0,t)}static createComplete(){return Wg.completeNotification}}function Kg(t,e=ph){const n=t instanceof Date&&!isNaN(+t)?+t-e.now():Math.abs(t);return t=>t.lift(new Yg(n,e))}Wg.completeNotification=new Wg("C"),Wg.undefinedValueNotification=new Wg("N",void 0);class Yg{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new Qg(t,this.delay,this.scheduler))}}class Qg extends y{constructor(t,e,n){super(t),this.delay=e,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,n=e.queue,i=t.scheduler,s=t.destination;for(;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(s);if(n.length>0){const e=Math.max(0,n[0].time-i.now());this.schedule(t,e)}else e.active=!1}_schedule(t){this.active=!0,this.add(t.schedule(Qg.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,n=new Xg(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(Wg.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t)}_complete(){this.scheduleNotification(Wg.createComplete())}}class Xg{constructor(t,e){this.time=t,this.notification=e}}let Jg=0;class ty{constructor(t,e){this.source=t,this.option=e}}const ey=gd(class{}),ny=new rt("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});class iy extends ey{constructor(t,e,n){super(),this._changeDetectorRef=t,this._elementRef=e,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new on,this.opened=new on,this.closed=new on,this._classList={},this.id=`mat-autocomplete-${Jg++}`,this._autoActiveFirstOption=!!n.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(t){this._autoActiveFirstOption=ya(t)}set classList(t){t&&t.length&&(t.split(" ").forEach(t=>this._classList[t.trim()]=!0),this._elementRef.nativeElement.className="")}ngAfterContentInit(){this._keyManager=new Hu(this.options).withWrap(),this._setVisibility()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._classList["mat-autocomplete-visible"]=this.showPanel,this._classList["mat-autocomplete-hidden"]=!this.showPanel,this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const e=new ty(this,t);this.optionSelected.emit(e)}}const sy=48,oy=256,ry=new rt("mat-autocomplete-scroll-strategy");function ay(t){return()=>t.scrollStrategies.reposition()}class ly{constructor(t,e,n,i,s,o,r,a,l,h){this._element=t,this._overlay=e,this._viewContainerRef=n,this._zone=i,this._changeDetectorRef=s,this._scrollStrategy=o,this._dir=r,this._formField=a,this._document=l,this._viewportRuler=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=f.EMPTY,this._closeKeyEventStream=new S,this._onChange=(()=>{}),this._onTouched=(()=>{}),this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=function(t){return new E(e=>{let n;try{n=t()}catch(t){return void e.error(t)}return(n?G(n):Xl()).subscribe(e)})}(()=>this.autocomplete&&this.autocomplete.options?Q(...this.autocomplete.options.map(t=>t.onSelectionChange)):this._zone.onStable.asObservable().pipe(Th(1),Ip(()=>this.optionSelections)))}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(t){this._autocompleteDisabled=ya(t)}ngOnDestroy(){this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}get panelClosingActions(){return Q(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(vh(()=>this._overlayAttached)),this._closeKeyEventStream,this._outsideClickStream,this._overlayRef?this._overlayRef.detachments().pipe(vh(()=>this._overlayAttached)):Jl()).pipe(j(t=>t instanceof Dd?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}get _outsideClickStream(){return this._document?Q(lh(this._document,"click"),lh(this._document,"touchend")).pipe(vh(t=>{const e=t.target,n=this._formField?this._formField._elementRef.nativeElement:null;return this._overlayAttached&&e!==this._element.nativeElement&&(!n||!n.contains(e))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(e)})):Jl(null)}writeValue(t){Promise.resolve(null).then(()=>this._setTriggerValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const e=t.keyCode;if(e===Ca&&t.preventDefault(),this.panelOpen&&(e===Ca||e===Sa&&t.altKey))this._resetActiveItem(),this._closeKeyEventStream.next(),t.stopPropagation();else if(this.activeOption&&e===xa&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const n=this.autocomplete._keyManager.activeItem,i=e===Sa||e===Ia;this.panelOpen||e===Ea?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption()}}_handleInput(t){let e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&document.activeElement===t.target&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this.openPanel())}_handleFocus(){this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0))}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_scrollToOption(){const t=this.autocomplete._keyManager.activeItemIndex||0,e=function(t,e,n,i){const s=t*e;return s<n?s:s+e>n+oy?Math.max(0,s-oy+e):n}(t+function(t,e,n){if(n.length){let i=e.toArray(),s=n.toArray(),o=0;for(let e=0;e<t+1;e++)i[e].group&&i[e].group===s[o]&&o++;return o}return 0}(t,this.autocomplete.options,this.autocomplete.optionGroups),sy,this.autocomplete._getScrollTop());this.autocomplete._setScrollTop(e)}_subscribeToClosingActions(){return Q(this._zone.onStable.asObservable().pipe(Th(1)),this.autocomplete.options.changes.pipe(Iu(()=>this._positionStrategy.reapplyLastPosition()),Kg(0))).pipe(Ip(()=>(this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&this._overlayRef.updatePosition(),this.panelClosingActions)),Th(1)).subscribe(t=>this._setValueAndClose(t))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(t){const e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n}_setValueAndClose(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}_clearPreviousSelectedOption(t){this.autocomplete.options.forEach(e=>{e!=t&&e.selected&&e.deselect()})}_attachOverlay(){if(!this.autocomplete)throw Error("Attempting to open an undefined instance of `mat-autocomplete`. Make sure that the id passed to the `matAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.");this._overlayRef?this._overlayRef.updateSize({width:this._getPanelWidth()}):(this._portal=new Oh(this.autocomplete.template,this._viewContainerRef),this._overlayRef=this._overlay.create(this._getOverlayConfig()),this._viewportRuler&&(this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&this._overlayRef&&this._overlayRef.updateSize({width:this._getPanelWidth()})}))),this._overlayRef&&!this._overlayRef.hasAttached()&&(this._overlayRef.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const t=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&t!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new Vh({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir})}_getOverlayPosition(){return this._positionStrategy=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}]),this._positionStrategy}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}_canOpen(){const t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}}class hy{}let uy=0;const cy={},dy={setImmediate(t){const e=uy++;return cy[e]=t,e},clearImmediate(t){delete cy[t]}},py=new class extends dh{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let n,i=-1,s=e.length;t=t||e.shift();do{if(n=t.execute(t.state,t.delay))break}while(++i<s&&(t=e.shift()));if(this.active=!1,n){for(;++i<s&&(t=e.shift());)t.unsubscribe();throw n}}}(class extends uh{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return null!==n&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t.scheduled||(t.scheduled=dy.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(t,e,n);0===t.actions.length&&(dy.clearImmediate(e),t.scheduled=void 0)}}),my=new rt("MAT_MENU_PANEL"),fy=gd(fd(class{}));class _y extends fy{constructor(t,e,n,i){super(),this._elementRef=t,this._focusMonitor=n,this._parentMenu=i,this._hovered=new S,this._highlighted=!1,this._triggersSubmenu=!1,n&&n.monitor(this._getHostElement(),!1),i&&i.addItem&&i.addItem(this),this._document=e}focus(t="program"){this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t):this._getHostElement().focus()}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._getHostElement()),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3;let n="";if(t.childNodes){const i=t.childNodes.length;for(let s=0;s<i;s++)t.childNodes[s].nodeType===e&&(n+=t.childNodes[s].textContent)}return n.trim()}}const gy=new rt("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!0,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),yy=2;class vy{constructor(t,e,n){this._elementRef=t,this._ngZone=e,this._defaultOptions=n,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._items=[],this._itemChanges=new S,this._tabSubscription=f.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new S,this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new on,this.close=this.closed}get xPosition(){return this._xPosition}set xPosition(t){"before"!==t&&"after"!==t&&function(){throw Error('x-position value must be either \'before\' or after\'.\n Example: <mat-menu x-position="before" #menu="matMenu"></mat-menu>')}(),this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){"above"!==t&&"below"!==t&&function(){throw Error('y-position value must be either \'above\' or below\'.\n Example: <mat-menu y-position="above" #menu="matMenu"></mat-menu>')}(),this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=ya(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=ya(t)}set panelClass(t){t&&t.length&&(this._classList=t.split(" ").reduce((t,e)=>(t[e]=!0,t),{}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._keyManager=new Uu(this._items).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab"))}ngOnDestroy(){this._tabSubscription.unsubscribe(),this.closed.complete()}_hovered(){return this._itemChanges.pipe(th(this._items),Ip(t=>Q(...t.map(t=>t._hovered))))}_handleKeydown(t){const e=t.keyCode;switch(e){case Ca:this.closed.emit("keydown"),t.stopPropagation();break;case ka:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case Ta:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:e!==Sa&&e!==Ia||this._keyManager.setFocusOrigin("keyboard"),this._keyManager.onKeydown(t)}}focusFirstItem(t="program"){this.lazyContent?this._ngZone.onStable.asObservable().pipe(Th(1)).subscribe(()=>this._keyManager.setFocusOrigin(t).setFirstItemActive()):this._keyManager.setFocusOrigin(t).setFirstItemActive()}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const e=`mat-elevation-z${yy+t}`,n=Object.keys(this._classList).find(t=>t.startsWith("mat-elevation-z"));n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}addItem(t){-1===this._items.indexOf(t)&&(this._items.push(t),this._itemChanges.next(this._items))}removeItem(t){const e=this._items.indexOf(t);this._items.indexOf(t)>-1&&(this._items.splice(e,1),this._itemChanges.next(this._items))}setPositionClasses(t=this.xPosition,e=this.yPosition){const n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}}const by=new rt("mat-menu-scroll-strategy");function wy(t){return()=>t.scrollStrategies.reposition()}const Ey=8;class xy{constructor(t,e,n,i,s,o,r,a){this._overlay=t,this._element=e,this._viewContainerRef=n,this._scrollStrategy=i,this._parentMenu=s,this._menuItemInstance=o,this._dir=r,this._focusMonitor=a,this._overlayRef=null,this._menuOpen=!1,this._closeSubscription=f.EMPTY,this._hoverSubscription=f.EMPTY,this._openedByMouse=!1,this.menuOpened=new on,this.onMenuOpen=this.menuOpened,this.menuClosed=new on,this.onMenuClose=this.menuClosed,o&&(o._triggersSubmenu=this.triggersSubmenu())}get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}ngAfterContentInit(){this._checkMenu(),this.menu.close.subscribe(t=>{this._destroyMenu(),"click"!==t&&"tab"!==t||!this._parentMenu||this._parentMenu.closed.emit(t)}),this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._cleanUpSubscriptions()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!(!this._menuItemInstance||!this._parentMenu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){if(this._menuOpen)return;const t=this._createOverlay();this._setPosition(t.getConfig().positionStrategy),t.attach(this._portal),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closeSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(),this.menu instanceof vy&&this.menu._startAnimation()}closeMenu(){this.menu.close.emit()}focus(t="program"){this._focusMonitor?this._focusMonitor.focusVia(this._element.nativeElement,t):this._element.nativeElement.focus()}_destroyMenu(){if(!this._overlayRef||!this.menuOpen)return;const t=this.menu;this._closeSubscription.unsubscribe(),this._overlayRef.detach(),t instanceof vy?(t._resetAnimation(),t.lazyContent?t._animationDone.pipe(vh(t=>"void"===t.toState),Th(1),ql(t.lazyContent._attached)).subscribe(()=>t.lazyContent.detach(),void 0,()=>{this._resetMenu()}):this._resetMenu()):(this._resetMenu(),t.lazyContent&&t.lazyContent.detach())}_initMenu(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedByMouse?"mouse":"program")}_setMenuElevation(){if(this.menu.setElevation){let t=0,e=this.menu.parentMenu;for(;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}_resetMenu(){this._setIsMenuOpen(!1),this._openedByMouse?this.triggersSubmenu()||this.focus("mouse"):this.focus(),this._openedByMouse=!1}_setIsMenuOpen(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}_checkMenu(){this.menu||function(){throw Error('mat-menu-trigger: must pass in an mat-menu instance.\n\n Example:\n <mat-menu #menu="matMenu"></mat-menu>\n <button [matMenuTriggerFor]="menu"></button>')}()}_createOverlay(){if(!this._overlayRef){this._portal=new Oh(this.menu.templateRef,this._viewContainerRef);const t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t)}return this._overlayRef}_getOverlayConfig(){return new Vh({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withTransformOriginOn(".mat-menu-panel"),hasBackdrop:null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t){this.menu.setPositionClasses&&t.positionChanges.subscribe(t=>{this.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}_setPosition(t){let[e,n]="before"===this.menu.xPosition?["end","start"]:["start","end"],[i,s]="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],[o,r]=[i,s],[a,l]=[e,n],h=0;this.triggersSubmenu()?(l=e="before"===this.menu.xPosition?"start":"end",n=a="end"===e?"start":"end",h="bottom"===i?Ey:-Ey):this.menu.overlapTrigger||(o="top"===i?"bottom":"top",r="top"===s?"bottom":"top"),t.withPositions([{originX:e,originY:o,overlayX:a,overlayY:i,offsetY:h},{originX:n,originY:o,overlayX:l,overlayY:i,offsetY:h},{originX:e,originY:r,overlayX:a,overlayY:s,offsetY:-h},{originX:n,originY:r,overlayX:l,overlayY:s,offsetY:-h}])}_cleanUpSubscriptions(){this._closeSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}_menuClosingActions(){const t=this._overlayRef.backdropClick(),e=this._overlayRef.detachments();return Q(t,this._parentMenu?this._parentMenu.closed:Jl(),this._parentMenu?this._parentMenu._hovered().pipe(vh(t=>t!==this._menuItemInstance),vh(()=>this._menuOpen)):Jl(),e)}_handleMousedown(t){(function(t){return 0===t.buttons})(t)||(this._openedByMouse=!0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const e=t.keyCode;this.triggersSubmenu()&&(e===Ta&&"ltr"===this.dir||e===ka&&"rtl"===this.dir)&&this.openMenu()}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(vh(t=>t===this._menuItemInstance&&!t.disabled),Kg(0,py)).subscribe(()=>{this._openedByMouse=!0,this.menu instanceof vy&&this.menu._isAnimating?this.menu._animationDone.pipe(Th(1),ql(this._parentMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}}class Cy{}let Ly=0;class ky{constructor(){this.id=`mat-error-${Ly++}`}}class Sy{}function Ty(t){return Error(`A hint was already declared for 'align="${t}"'.`)}class Iy{}class Py{}let My=0;const Ay=.75,Dy=5,Oy=_d(class{constructor(t){this._elementRef=t}},"primary"),Ry=new rt("MAT_FORM_FIELD_DEFAULT_OPTIONS");class Ny extends Oy{constructor(t,e,n,i,s,o,r,a){super(t),this._elementRef=t,this._changeDetectorRef=e,this._dir=i,this._defaultOptions=s,this._platform=o,this._ngZone=r,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId=`mat-hint-${My++}`,this._labelId=`mat-form-field-label-${My++}`,this._outlineGapWidth=0,this._outlineGapStart=0,this._initialGapCalculated=!1,this._labelOptions=n||{},this.floatLabel=this._labelOptions.float||"auto",this._animationsEnabled="NoopAnimations"!==a}get appearance(){return this._appearance||this._defaultOptions&&this._defaultOptions.appearance||"legacy"}set appearance(t){t!==this._appearance&&"outline"===t&&(this._initialGapCalculated=!1),this._appearance=t}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=ya(t)}get _shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}get _canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t||this._labelOptions.float||"auto",this._changeDetectorRef.markForCheck())}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild(),this._control.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${this._control.controlType}`),this._control.stateChanges.pipe(th(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),Q(this._control.ngControl&&this._control.ngControl.valueChanges||Ql,this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>this._changeDetectorRef.markForCheck()),this._hintChildren.changes.pipe(th(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(th(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()})}ngAfterContentChecked(){this._validateControlChild(),this._initialGapCalculated||(this._ngZone?this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.updateOutlineGap())}):Promise.resolve().then(()=>this.updateOutlineGap()))}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}_shouldForward(t){const e=this._control?this._control.ngControl:null;return e&&e[t]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!!this._labelChild}_shouldLabelFloat(){return this._canLabelFloat&&(this._control.shouldLabelFloat||this._shouldAlwaysFloat)}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat&&(this._animationsEnabled&&(this._showAlwaysAnimate=!0,lh(this._label.nativeElement,"transitionend").pipe(Th(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){if(this._control.placeholder&&this._placeholderChild)throw Error("Placeholder attribute and child element were both specified.")}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){if(this._hintChildren){let t,e;this._hintChildren.forEach(n=>{if("start"===n.align){if(t||this.hintLabel)throw Ty("start");t=n}else if("end"===n.align){if(e)throw Ty("end");e=n}})}}_syncDescribedByIds(){if(this._control){let t=[];if("hint"===this._getDisplayedMessages()){let e=this._hintChildren?this._hintChildren.find(t=>"start"===t.align):null,n=this._hintChildren?this._hintChildren.find(t=>"end"===t.align):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&(t=this._errorChildren.map(t=>t.id));this._control.setDescribedByIds(t)}}_validateControlChild(){if(!this._control)throw Error("mat-form-field must contain a MatFormFieldControl.")}updateOutlineGap(){if("outline"===this.appearance&&this._label&&this._label.nativeElement.children.length){if(this._platform&&!this._platform.isBrowser)return void(this._initialGapCalculated=!0);if(!document.documentElement.contains(this._elementRef.nativeElement))return;const t=this._getStartEnd(this._connectionContainerRef.nativeElement.getBoundingClientRect()),e=this._getStartEnd(this._label.nativeElement.children[0].getBoundingClientRect());let n=0;for(const i of this._label.nativeElement.children)n+=i.offsetWidth;this._outlineGapStart=e-t-Dy,this._outlineGapWidth=n*Ay+2*Dy}else this._outlineGapStart=0,this._outlineGapWidth=0;this._initialGapCalculated=!0,this._changeDetectorRef.markForCheck()}_getStartEnd(t){return this._dir&&"rtl"===this._dir.value?t.right:t.left}}class Fy{}const zy=!!Bl()&&{passive:!0};class Vy{constructor(t,e){this._platform=t,this._ngZone=e,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return Ql;const e=this._monitoredElements.get(t);if(e)return e.subject.asObservable();const n=new S,i="cdk-text-field-autofilled",s=e=>{"cdk-text-field-autofill-start"!==e.animationName||t.classList.contains(i)?"cdk-text-field-autofill-end"===e.animationName&&t.classList.contains(i)&&(t.classList.remove(i),this._ngZone.run(()=>n.next({target:e.target,isAutofilled:!1}))):(t.classList.add(i),this._ngZone.run(()=>n.next({target:e.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{t.addEventListener("animationstart",s,zy),t.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(t,{subject:n,unlisten:()=>{t.removeEventListener("animationstart",s,zy)}}),n.asObservable()}stopMonitoring(t){const e=this._monitoredElements.get(t);e&&(e.unlisten(),e.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((t,e)=>this.stopMonitoring(e))}}Vy.ngInjectableDef=ot({factory:function(){return new Vy(te(Fl),te(rn))},token:Vy,providedIn:"root"});class By{}const jy=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Hy=0;const Uy=function(t){return class extends class{constructor(t,e,n,i){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=n,this.ngControl=i}}{constructor(...t){super(...t),this.errorState=!1,this.stateChanges=new S}updateErrorState(){const t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}}();class Zy extends Uy{constructor(t,e,n,i,s,o,r,a,l){super(o,i,s,n),this._elementRef=t,this._platform=e,this.ngControl=n,this._autofillMonitor=a,this._uid=`mat-input-${Hy++}`,this._isServer=!1,this.focused=!1,this.stateChanges=new S,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._required=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(t=>Hl().has(t)),this._inputValueAccessor=r||this._elementRef.nativeElement,this._previousNativeValue=this.value,this.id=this.id,e.IOS&&l.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",t=>{let e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),this._isServer=!this._platform.isBrowser}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=ya(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required}set required(t){this._required=ya(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea()&&Hl().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=ya(t)}ngOnInit(){this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}ngDoCheck(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue()}focus(){this._elementRef.nativeElement.focus()}_focusChanged(t){t===this.focused||this.readonly||(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_validateType(){if(jy.indexOf(this._type)>-1)throw function(t){return Error(`Input type "${t}" isn't supported by matInput.`)}(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}_isTextarea(){return"textarea"===this._elementRef.nativeElement.nodeName.toLowerCase()}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){return this.focused||!this.empty}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}onContainerClick(){this.focus()}}class Gy{}const $y=100,qy=10,Wy=_d(class{constructor(t){this._elementRef=t}},"primary"),Ky=new rt("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:$y}}}),Yy="\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n";class Qy extends Wy{constructor(t,e,n,i,s){super(t),this._elementRef=t,this._document=n,this.animationMode=i,this.defaults=s,this._value=0,this._fallbackAnimation=!1,this._noopAnimations="NoopAnimations"===this.animationMode&&!!this.defaults&&!this.defaults._forceAnimations,this._diameter=$y,this.mode="determinate",this._fallbackAnimation=e.EDGE||e.TRIDENT,s&&(s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth)),t.nativeElement.classList.add(`mat-progress-spinner-indeterminate${this._fallbackAnimation?"-fallback":""}-animation`)}get diameter(){return this._diameter}set diameter(t){this._diameter=va(t),this._fallbackAnimation||Qy.diameters.has(this._diameter)||this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=va(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,va(t)))}get _circleRadius(){return(this.diameter-qy)/2}get _viewBox(){const t=2*this._circleRadius+this.strokeWidth;return`0 0 ${t} ${t}`}get _strokeCircumference(){return 2*Math.PI*this._circleRadius}get _strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._strokeCircumference:null}get _circleStrokeWidth(){return this.strokeWidth/this.diameter*100}_attachStyleNode(){let t=Qy.styleTag;t||(t=this._document.createElement("style"),this._document.head.appendChild(t),Qy.styleTag=t),t&&t.sheet&&t.sheet.insertRule(this._getAnimationText(),0),Qy.diameters.add(this.diameter)}_getAnimationText(){return Yy.replace(/START_VALUE/g,`${.95*this._strokeCircumference}`).replace(/END_VALUE/g,`${.2*this._strokeCircumference}`).replace(/DIAMETER/g,`${this.diameter}`)}}Qy.diameters=new Set([$y]),Qy.styleTag=null;class Xy extends Qy{constructor(t,e,n,i,s){super(t,e,n,i,s),this.mode="indeterminate"}}class Jy{}const tv=new rt("mat-chips-default-options");class ev{}class nv{constructor(t){this.selector=t}call(t,e){return e.subscribe(new iv(t,this.selector,this.caught))}}class iv extends B{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let e;try{e=this.selector(t,this.caught)}catch(t){return void super.error(t)}this._unsubscribeAndRecycle(),this.add(V(this,e))}}}class sv{constructor(t){this.callback=t}call(t,e){return e.subscribe(new ov(t,this.callback))}}class ov extends y{constructor(t,e){super(t),this.add(new f(e))}}function rv(t){return Error(`Unable to find icon with the name "${t}"`)}function av(t){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL "+`via Angular's DomSanitizer. Attempted URL was "${t}".`)}function lv(t){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by "+`Angular's DomSanitizer. Attempted literal was "${t}".`)}class hv{constructor(t){t.nodeName?this.svgElement=t:this.url=t}}class uv{constructor(t,e,n){this._httpClient=t,this._sanitizer=e,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=n}addSvgIcon(t,e){return this.addSvgIconInNamespace("",t,e)}addSvgIconLiteral(t,e){return this.addSvgIconLiteralInNamespace("",t,e)}addSvgIconInNamespace(t,e,n){return this._addSvgIconConfig(t,e,new hv(n))}addSvgIconLiteralInNamespace(t,e,n){const i=this._sanitizer.sanitize(Oi.HTML,n);if(!i)throw lv(n);const s=this._createSvgElementForSingleIcon(i);return this._addSvgIconConfig(t,e,new hv(s))}addSvgIconSet(t){return this.addSvgIconSetInNamespace("",t)}addSvgIconSetLiteral(t){return this.addSvgIconSetLiteralInNamespace("",t)}addSvgIconSetInNamespace(t,e){return this._addSvgIconSetConfig(t,new hv(e))}addSvgIconSetLiteralInNamespace(t,e){const n=this._sanitizer.sanitize(Oi.HTML,e);if(!n)throw lv(e);const i=this._svgElementFromString(n);return this._addSvgIconSetConfig(t,new hv(i))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(Oi.RESOURCE_URL,t);if(!e)throw av(t);const n=this._cachedIconsByUrl.get(e);return n?Jl(cv(n)):this._loadSvgIconFromConfig(new hv(t)).pipe(Iu(t=>this._cachedIconsByUrl.set(e,t)),j(t=>cv(t)))}getNamedSvgIcon(t,e=""){const n=dv(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);const s=this._iconSetConfigs.get(e);return s?this._getSvgFromIconSetConfigs(t,s):$g(rv(n))}_getSvgFromConfig(t){return t.svgElement?Jl(cv(t.svgElement)):this._loadSvgIconFromConfig(t).pipe(Iu(e=>t.svgElement=e),j(t=>cv(t)))}_getSvgFromIconSetConfigs(t,e){const n=this._extractIconWithNameFromAnySet(t,e);return n?Jl(n):Dp(e.filter(t=>!t.svgElement).map(t=>this._loadSvgIconSetFromConfig(t).pipe(function(t){return function(e){const n=new nv(t),i=e.lift(n);return n.caught=i}}(e=>{const n=this._sanitizer.sanitize(Oi.RESOURCE_URL,t.url);return console.error(`Loading icon set URL: ${n} failed: ${e.message}`),Jl(null)})))).pipe(j(()=>{const n=this._extractIconWithNameFromAnySet(t,e);if(!n)throw rv(t);return n}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){const i=e[n];if(i.svgElement){const e=this._extractSvgIconFromSet(i.svgElement,t);if(e)return e}}return null}_loadSvgIconFromConfig(t){return this._fetchUrl(t.url).pipe(j(t=>this._createSvgElementForSingleIcon(t)))}_loadSvgIconSetFromConfig(t){return t.svgElement?Jl(t.svgElement):this._fetchUrl(t.url).pipe(j(e=>(t.svgElement||(t.svgElement=this._svgElementFromString(e)),t.svgElement)))}_createSvgElementForSingleIcon(t){const e=this._svgElementFromString(t);return this._setSvgAttributes(e),e}_extractSvgIconFromSet(t,e){const n=t.querySelector("#"+e);if(!n)return null;const i=n.cloneNode(!0);if(i.removeAttribute("id"),"svg"===i.nodeName.toLowerCase())return this._setSvgAttributes(i);if("symbol"===i.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(i));const s=this._svgElementFromString("<svg></svg>");return s.appendChild(i),this._setSvgAttributes(s)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString("<svg></svg>");for(let n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e}_setSvgAttributes(t){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),t}_fetchUrl(t){if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==t)throw Error(`Cannot fetch icon from URL "${t}".`);const e=this._sanitizer.sanitize(Oi.RESOURCE_URL,t);if(!e)throw av(t);const n=this._inProgressUrlFetches.get(e);if(n)return n;const i=this._httpClient.get(e,{responseType:"text"}).pipe(function(t){return e=>e.lift(new sv(t))}(()=>this._inProgressUrlFetches.delete(e)),st());return this._inProgressUrlFetches.set(e,i),i}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(dv(t,e),n),this}_addSvgIconSetConfig(t,e){const n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}}function cv(t){return t.cloneNode(!0)}function dv(t,e){return t+":"+e}uv.ngInjectableDef=ot({factory:function(){return new uv(te(sp,8),te(td),te(Ol,8))},token:uv,providedIn:"root"});const pv=_d(class{constructor(t){this._elementRef=t}});class mv extends pv{constructor(t,e,n){super(t),this._iconRegistry=e,this._inline=!1,n||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=ya(t)}get fontSet(){return this._fontSet}set fontSet(t){this._fontSet=this._cleanupFontValue(t)}get fontIcon(){return this._fontIcon}set fontIcon(t){this._fontIcon=this._cleanupFontValue(t)}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnChanges(t){if(t.svgIcon)if(this.svgIcon){const[t,e]=this._splitIconName(this.svgIcon);this._iconRegistry.getNamedSvgIcon(e,t).pipe(Th(1)).subscribe(t=>this._setSvgElement(t),t=>console.log(`Error retrieving icon: ${t.message}`))}else this._clearSvgElement();this._usingFontIcon()&&this._updateFontIconClasses()}ngOnInit(){this._usingFontIcon()&&this._updateFontIconClasses()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let n=0;n<e.length;n++)e[n].textContent+=" ";this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(;e--;){const n=t.childNodes[e];1===n.nodeType&&"svg"!==n.nodeName.toLowerCase()||t.removeChild(n)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}}class fv{}const _v="accent",gv="primary",yv=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],vv=_d(fd(gd(class{constructor(t){this._elementRef=t}})));class bv extends vv{constructor(t,e,n,i){super(t),this._platform=e,this._focusMonitor=n,this._animationMode=i,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const s of yv)this._hasHostAttributes(s)&&t.nativeElement.classList.add(s);this._focusMonitor.monitor(this._elementRef.nativeElement,!0),this.isRoundButton?this.color=_v:this._hasHostAttributes("mat-flat-button")&&(this.color=gv)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)}focus(){this._getHostElement().focus()}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(t=>this._getHostElement().hasAttribute(t))}}class wv{}class Ev{}class xv{}class Cv{constructor(t){this._viewContainer=t,Cv.mostRecentCellOutlet=this}ngOnDestroy(){Cv.mostRecentCellOutlet===this&&(Cv.mostRecentCellOutlet=null)}}Cv.mostRecentCellOutlet=null;class Lv{}class kv{}var Sv=Ji({encapsulation:2,styles:[".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],data:{}});function Tv(t){return Go(0,[(t()(),Ts(0,0,null,null,0,":svg:circle",[["cx","50%"],["cy","50%"]],[[1,"r",0],[4,"animation-name",null],[4,"stroke-dashoffset","px"],[4,"stroke-dasharray","px"],[4,"stroke-width","%"]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,n._circleRadius,"mat-progress-spinner-stroke-rotate-"+n.diameter,n._strokeDashOffset,n._strokeCircumference,n._circleStrokeWidth)})}function Iv(t){return Go(0,[(t()(),Ts(0,0,null,null,0,":svg:circle",[["cx","50%"],["cy","50%"]],[[1,"r",0],[4,"stroke-dashoffset","px"],[4,"stroke-dasharray","px"],[4,"stroke-width","%"]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,n._circleRadius,n._strokeDashOffset,n._strokeCircumference,n._circleStrokeWidth)})}function Pv(t){return Go(2,[(t()(),Ts(0,0,null,null,5,":svg:svg",[["focusable","false"],["preserveAspectRatio","xMidYMid meet"]],[[4,"width","px"],[4,"height","px"],[1,"viewBox",0]],null,null,null,null)),go(1,16384,null,0,ul,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ss(16777216,null,null,1,null,Tv)),go(3,278528,null,0,cl,[On,Dn,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Iv)),go(5,278528,null,0,cl,[On,Dn,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(t,e){t(e,1,0,"indeterminate"===e.component.mode),t(e,3,0,!0),t(e,5,0,!1)},function(t,e){var n=e.component;t(e,0,0,n.diameter,n.diameter,n._viewBox)})}var Mv=Ji({encapsulation:2,styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}@media screen and (-ms-high-contrast:active){.mat-option{margin:0 1px}.mat-option.mat-active{border:solid 1px currentColor;margin:0}}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],data:{}});function Av(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"mat-pseudo-checkbox",[["class","mat-option-pseudo-checkbox mat-pseudo-checkbox"]],[[2,"mat-pseudo-checkbox-indeterminate",null],[2,"mat-pseudo-checkbox-checked",null],[2,"mat-pseudo-checkbox-disabled",null],[2,"_mat-animation-noopable",null]],null,null,Rv,Ov)),go(1,49152,null,0,Sd,[[2,Bg]],{state:[0,"state"],disabled:[1,"disabled"]},null)],function(t,e){var n=e.component;t(e,1,0,n.selected?"checked":"",n.disabled)},function(t,e){t(e,0,0,"indeterminate"===io(e,1).state,"checked"===io(e,1).state,io(e,1).disabled,"NoopAnimations"===io(e,1)._animationMode)})}function Dv(t){return Go(2,[(t()(),Ss(16777216,null,null,1,null,Av)),go(1,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(2,0,null,null,1,"span",[["class","mat-option-text"]],null,null,null,null,null)),Vo(null,0),(t()(),Ts(4,0,null,null,1,"div",[["class","mat-option-ripple mat-ripple"],["mat-ripple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),go(5,212992,null,0,Ld,[Mn,rn,Fl,[2,Cd],[2,Bg]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,1,0,n.multiple),t(e,5,0,n.disabled||n.disableRipple,n._getHostElement())},function(t,e){t(e,4,0,io(e,5).unbounded)})}var Ov=Ji({encapsulation:2,styles:[".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:7px;left:0;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:3px;left:1px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],data:{}});function Rv(t){return Go(2,[],null,null)}var Nv=Ji({encapsulation:2,styles:[".mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:1}@media (hover:none){.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:0}}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-raised-button:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-raised-button[disabled]{box-shadow:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-flat-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-fab::-moz-focus-inner{border:0}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-fab[disabled]{box-shadow:none}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-mini-fab[disabled]{box-shadow:none}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button-focus-overlay,.mat-button-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-focus-overlay{background-color:rgba(0,0,0,.12);border-radius:inherit;opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}@media screen and (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],data:{}});function Fv(t){return Go(2,[Oo(402653184,1,{ripple:0}),(t()(),Ts(1,0,null,null,1,"span",[["class","mat-button-wrapper"]],null,null,null,null,null)),Vo(null,0),(t()(),Ts(3,0,null,null,1,"div",[["class","mat-button-ripple mat-ripple"],["matRipple",""]],[[2,"mat-button-ripple-round",null],[2,"mat-ripple-unbounded",null]],null,null,null,null)),go(4,212992,[[1,4]],0,Ld,[Mn,rn,Fl,[2,Cd],[2,Bg]],{centered:[0,"centered"],disabled:[1,"disabled"],trigger:[2,"trigger"]},null),(t()(),Ts(5,0,null,null,0,"div",[["class","mat-button-focus-overlay"]],null,null,null,null,null))],function(t,e){var n=e.component;t(e,4,0,n.isIconButton,n._isRippleDisabled(),n._getHostElement())},function(t,e){var n=e.component;t(e,3,0,n.isRoundButton||n.isIconButton,io(e,4).unbounded)})}var zv=Ji({encapsulation:2,styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1,1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],data:{}});function Vv(t){return Go(2,[Vo(null,0)],null,null)}var Bv=Ji({encapsulation:2,styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}@media screen and (-ms-high-contrast:active){.mat-form-field-infix{border-image:linear-gradient(transparent,transparent)}}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),color .4s cubic-bezier(.25,.8,.25,1),width .4s cubic-bezier(.25,.8,.25,1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,.mat-form-field-empty.mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scaleY(1.0001)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(.5);opacity:0;transition:background-color .3s cubic-bezier(.55,0,.55,.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-label-wrapper .mat-icon,.mat-form-field-subscript-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}",".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:'';display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}",".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-start{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start{border-width:2px;transition:border-color .3s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity .1s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline{transition:none}",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}",".mat-input-element{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=month]::after,.mat-input-element[type=time]::after,.mat-input-element[type=week]::after{content:' ';white-space:pre;width:1px}.mat-input-element::placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-moz-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-webkit-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element:-ms-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}"],data:{animation:[{type:7,name:"transitionMessages",definitions:[{type:0,name:"enter",styles:{type:6,styles:{opacity:1,transform:"translateY(0%)"},offset:null},options:void 0},{type:1,expr:"void => enter",animation:[{type:6,styles:{opacity:0,transform:"translateY(-100%)"},offset:null},{type:4,styles:null,timings:"300ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function jv(t){return Go(0,[(t()(),Ts(0,0,null,null,8,null,null,null,null,null,null,null)),(t()(),Ts(1,0,null,null,3,"div",[["class","mat-form-field-outline"]],null,null,null,null,null)),(t()(),Ts(2,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(3,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(4,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null)),(t()(),Ts(5,0,null,null,3,"div",[["class","mat-form-field-outline mat-form-field-outline-thick"]],null,null,null,null,null)),(t()(),Ts(6,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(7,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(8,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null))],null,function(t,e){var n=e.component;t(e,2,0,n._outlineGapStart),t(e,3,0,n._outlineGapWidth),t(e,6,0,n._outlineGapStart),t(e,7,0,n._outlineGapWidth)})}function Hv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[["class","mat-form-field-prefix"]],null,null,null,null,null)),Vo(null,0)],null,null)}function Uv(t){return Go(0,[(t()(),Ts(0,0,null,null,2,null,null,null,null,null,null,null)),Vo(null,2),(t()(),Ho(2,null,["",""]))],null,function(t,e){t(e,2,0,e.component._control.placeholder)})}function Zv(t){return Go(0,[Vo(null,3),(t()(),Ss(0,null,null,0))],null,null)}function Gv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"span",[["aria-hidden","true"],["class","mat-placeholder-required mat-form-field-required-marker"]],null,null,null,null,null)),(t()(),Ho(-1,null,["\xa0*"]))],null,null)}function $v(t){return Go(0,[(t()(),Ts(0,0,[[4,0],["label",1]],null,7,"label",[["class","mat-form-field-label"]],[[8,"id",0],[1,"for",0],[1,"aria-owns",0],[2,"mat-empty",null],[2,"mat-form-field-empty",null],[2,"mat-accent",null],[2,"mat-warn",null]],null,null,null,null)),go(1,16384,null,0,ul,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ss(16777216,null,null,1,null,Uv)),go(3,278528,null,0,cl,[On,Dn,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Zv)),go(5,278528,null,0,cl,[On,Dn,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Gv)),go(7,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,n._hasLabel()),t(e,3,0,!1),t(e,5,0,!0),t(e,7,0,!n.hideRequiredMarker&&n._control.required&&!n._control.disabled)},function(t,e){var n=e.component;t(e,0,0,n._labelId,n._control.id,n._control.id,n._control.empty&&!n._shouldAlwaysFloat,n._control.empty&&!n._shouldAlwaysFloat,"accent"==n.color,"warn"==n.color)})}function qv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[["class","mat-form-field-suffix"]],null,null,null,null,null)),Vo(null,4)],null,null)}function Wv(t){return Go(0,[(t()(),Ts(0,0,[[1,0],["underline",1]],null,1,"div",[["class","mat-form-field-underline"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,0,"span",[["class","mat-form-field-ripple"]],[[2,"mat-accent",null],[2,"mat-warn",null]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,1,0,"accent"==n.color,"warn"==n.color)})}function Kv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[],[[24,"@transitionMessages",0]],null,null,null,null)),Vo(null,5)],null,function(t,e){t(e,0,0,e.component._subscriptAnimationState)})}function Yv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[["class","mat-hint"]],[[8,"id",0]],null,null,null,null)),(t()(),Ho(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,n._hintLabelId),t(e,1,0,n.hintLabel)})}function Qv(t){return Go(0,[(t()(),Ts(0,0,null,null,5,"div",[["class","mat-form-field-hint-wrapper"]],[[24,"@transitionMessages",0]],null,null,null,null)),(t()(),Ss(16777216,null,null,1,null,Yv)),go(2,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),Vo(null,6),(t()(),Ts(4,0,null,null,0,"div",[["class","mat-form-field-hint-spacer"]],null,null,null,null,null)),Vo(null,7)],function(t,e){t(e,2,0,e.component.hintLabel)},function(t,e){t(e,0,0,e.component._subscriptAnimationState)})}function Xv(t){return Go(2,[Oo(671088640,1,{underlineRef:0}),Oo(402653184,2,{_connectionContainerRef:0}),Oo(402653184,3,{_inputContainerRef:0}),Oo(671088640,4,{_label:0}),(t()(),Ts(4,0,null,null,20,"div",[["class","mat-form-field-wrapper"]],null,null,null,null,null)),(t()(),Ts(5,0,[[2,0],["connectionContainer",1]],null,11,"div",[["class","mat-form-field-flex"]],null,[[null,"click"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(i=!1!==(s._control.onContainerClick&&s._control.onContainerClick(n))&&i),i},null,null)),(t()(),Ss(16777216,null,null,1,null,jv)),go(7,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,Hv)),go(9,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(10,0,[[3,0],["inputContainer",1]],null,4,"div",[["class","mat-form-field-infix"]],null,null,null,null,null)),Vo(null,1),(t()(),Ts(12,0,null,null,2,"span",[["class","mat-form-field-label-wrapper"]],null,null,null,null,null)),(t()(),Ss(16777216,null,null,1,null,$v)),go(14,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,qv)),go(16,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,Wv)),go(18,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(19,0,null,null,5,"div",[["class","mat-form-field-subscript-wrapper"]],null,null,null,null,null)),go(20,16384,null,0,ul,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ss(16777216,null,null,1,null,Kv)),go(22,278528,null,0,cl,[On,Dn,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Qv)),go(24,278528,null,0,cl,[On,Dn,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(t,e){var n=e.component;t(e,7,0,"outline"==n.appearance),t(e,9,0,n._prefixChildren.length),t(e,14,0,n._hasFloatingLabel()),t(e,16,0,n._suffixChildren.length),t(e,18,0,"outline"!=n.appearance),t(e,20,0,n._getDisplayedMessages()),t(e,22,0,"error"),t(e,24,0,"hint")},null)}var Jv=Ji({encapsulation:2,styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px;outline:0}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}@media screen and (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}.mat-menu-panel.ng-animating .mat-menu-item-submenu-trigger{pointer-events:none}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],data:{animation:[{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.01, 0.01)"},offset:null},options:void 0},{type:1,expr:"void => enter",animation:{type:2,steps:[{type:11,selector:".mat-menu-content",animation:{type:6,styles:{opacity:0},offset:null},options:null},{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1, 0.5)"},offset:null},timings:"100ms linear"},{type:3,steps:[{type:11,selector:".mat-menu-content",animation:{type:4,styles:{type:6,styles:{opacity:1},offset:null},timings:"400ms cubic-bezier(0.55, 0, 0.55, 0.2)"},options:null},{type:4,styles:{type:6,styles:{transform:"scale(1, 1)"},offset:null},timings:"300ms cubic-bezier(0.25, 0.8, 0.25, 1)"}],options:null}],options:null},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"150ms 50ms linear"},options:null}],options:{}},{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null},options:void 0},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function tb(t){return Go(0,[(t()(),Ts(0,0,null,null,3,"div",[["class","mat-menu-panel"],["role","menu"],["tabindex","-1"]],[[24,"@transformMenu",0]],[[null,"keydown"],[null,"click"],[null,"@transformMenu.start"],[null,"@transformMenu.done"]],function(t,e,n){var i=!0,s=t.component;return"keydown"===e&&(i=!1!==s._handleKeydown(n)&&i),"click"===e&&(i=!1!==s.closed.emit("click")&&i),"@transformMenu.start"===e&&(i=0!=(s._isAnimating=!0)&&i),"@transformMenu.done"===e&&(i=!1!==s._onAnimationDone(n)&&i),i},null,null)),go(1,278528,null,0,nl,[ti,ei,Mn,Pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),Ts(2,0,null,null,1,"div",[["class","mat-menu-content"]],null,null,null,null,null)),Vo(null,0)],function(t,e){t(e,1,0,"mat-menu-panel",e.component._classList)},function(t,e){t(e,0,0,e.component._panelAnimationState)})}function eb(t){return Go(2,[Oo(402653184,1,{templateRef:0}),(t()(),Ss(0,[[1,2]],null,0,null,tb))],null,null)}var nb=Ji({encapsulation:2,styles:[],data:{}});function ib(t){return Go(2,[Vo(null,0),(t()(),Ts(1,0,null,null,1,"div",[["class","mat-menu-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),go(2,212992,null,0,Ld,[Mn,rn,Fl,[2,Cd],[2,Bg]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,2,0,n.disableRipple||n.disabled,n._getHostElement())},function(t,e){t(e,1,0,io(e,2).unbounded)})}var sb=Ji({encapsulation:2,styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%}.mat-autocomplete-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}@media screen and (-ms-high-contrast:active){.mat-autocomplete-panel{outline:solid 1px}}"],data:{}});function ob(t){return Go(0,[(t()(),Ts(0,0,[[2,0],["panel",1]],null,2,"div",[["class","mat-autocomplete-panel"],["role","listbox"]],[[8,"id",0]],null,null,null,null)),go(1,278528,null,0,nl,[ti,ei,Mn,Pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Vo(null,0)],function(t,e){t(e,1,0,"mat-autocomplete-panel",e.component._classList)},function(t,e){t(e,0,0,e.component.id)})}function rb(t){return Go(2,[Oo(402653184,1,{template:0}),Oo(671088640,2,{panel:0}),(t()(),Ss(0,[[1,2]],null,0,null,ob))],null,null)}var ab=Ji({encapsulation:0,styles:["[hidden][_ngcontent-%COMP%]{display:none!important}#geoloc-map[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:200px}#geoloc-map[_ngcontent-%COMP%] #geoloc-map-meta[_ngcontent-%COMP%]{flex:1;padding-left:15px;padding-right:15px;padding-bottom:0}#geoloc-map[_ngcontent-%COMP%] #geoloc-map-meta[_ngcontent-%COMP%] .geolocationInputs[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around}#geoloc-map[_ngcontent-%COMP%] #geoloc-map-meta[_ngcontent-%COMP%] .geolocationInputs[_ngcontent-%COMP%] .longitude-input-group[_ngcontent-%COMP%]{margin-left:5px}#geoloc-map[_ngcontent-%COMP%] #geoloc-map-draw[_ngcontent-%COMP%]{position:relative;flex:3}#geoloc-map[_ngcontent-%COMP%] #httpTasksRunningSpinner[_ngcontent-%COMP%]{flex:1}button[_ngcontent-%COMP%] .mini[_ngcontent-%COMP%]{min-width:0;line-height:30px}.geolocatedPhotoMetadataTable[_ngcontent-%COMP%]{width:100%}.sub-map-infos[_ngcontent-%COMP%]{color:#c5c5c5;display:flex;justify-content:space-between;flex-direction:row;padding:5px}.sub-map-infos.has-data[_ngcontent-%COMP%]{color:#000}.lat-lng-dec-wrapper[_ngcontent-%COMP%], .lat-lng-dms-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap}@media only screen and (max-width:600px){.lat-lng-dec-wrapper[_ngcontent-%COMP%], .lat-lng-dms-wrapper[_ngcontent-%COMP%]{justify-content:center}.lat-lng-dec-wrapper[_ngcontent-%COMP%] .longitude-wrapper[_ngcontent-%COMP%], .lat-lng-dms-wrapper[_ngcontent-%COMP%] .longitude-wrapper[_ngcontent-%COMP%]{margin-left:70px}}@media only screen and (max-width:360px){.lat-lng-dec-wrapper[_ngcontent-%COMP%], .lat-lng-dms-wrapper[_ngcontent-%COMP%]{justify-content:center}.lat-lng-dec-wrapper[_ngcontent-%COMP%] .longitude-wrapper[_ngcontent-%COMP%], .lat-lng-dms-wrapper[_ngcontent-%COMP%] .longitude-wrapper[_ngcontent-%COMP%]{display:flex;align-items:baseline;flex-wrap:nowrap;margin-left:37px}.lat-lng-dec-wrapper[_ngcontent-%COMP%] .longitude-wrapper[_ngcontent-%COMP%] .mat-form-field-wrapper, .lat-lng-dms-wrapper[_ngcontent-%COMP%] .longitude-wrapper[_ngcontent-%COMP%] .mat-form-field-wrapper{max-width:160px}.lat-lng-dec-wrapper[_ngcontent-%COMP%] .latitude-wrapper[_ngcontent-%COMP%], .lat-lng-dms-wrapper[_ngcontent-%COMP%] .latitude-wrapper[_ngcontent-%COMP%]{display:flex;align-items:baseline;flex-wrap:nowrap;margin-left:-37px}.lat-lng-dec-wrapper[_ngcontent-%COMP%] .latitude-wrapper[_ngcontent-%COMP%] .mat-form-field-wrapper, .lat-lng-dms-wrapper[_ngcontent-%COMP%] .latitude-wrapper[_ngcontent-%COMP%] .mat-form-field-wrapper{max-width:160px}}"],data:{}});function lb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Pv,Sv)),go(1,16384,[[8,4]],0,Py,[],null,null),go(2,49152,null,0,Xy,[Mn,Fl,[2,Ol],[2,Bg],Ky],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function hb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"span",[],null,null,null,null,null)),(t()(),Ho(1,null,["",""])),jo(2,2)],null,function(t,e){t(e,1,0,Yi(e,1,0,t(e,2,0,io(e.parent.parent,0),e.parent.context.$implicit,"osm")))})}function ub(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"span",[],null,null,null,null,null)),(t()(),Ho(1,null,["",""])),jo(2,2)],null,function(t,e){t(e,1,0,Yi(e,1,0,t(e,2,0,io(e.parent.parent,0),e.parent.context.$implicit,"mapQuest")))})}function cb(t){return Go(0,[(t()(),Ts(0,0,null,null,5,"mat-option",[["class","mat-option"],["role","option"]],[[1,"tabindex",0],[2,"mat-selected",null],[2,"mat-option-multiple",null],[2,"mat-active",null],[8,"id",0],[1,"aria-selected",0],[1,"aria-disabled",0],[2,"mat-option-disabled",null]],[[null,"click"],[null,"keydown"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==io(t,1)._selectViaInteraction()&&i),"keydown"===e&&(i=!1!==io(t,1)._handleKeydown(n)&&i),i},Dv,Mv)),go(1,8568832,[[9,4]],0,Rd,[Mn,Rn,[2,Od],[2,Md]],{value:[0,"value"]},null),(t()(),Ss(16777216,null,0,1,null,hb)),go(3,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,0,1,null,ub)),go(5,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,e.context.$implicit),t(e,3,0,"osm"==n.geolocationProvider),t(e,5,0,"mapQuest"==n.geolocationProvider)},function(t,e){t(e,0,0,io(e,1)._getTabIndex(),io(e,1).selected,io(e,1).multiple,io(e,1).active,io(e,1).id,io(e,1).selected.toString(),io(e,1).disabled.toString(),io(e,1).disabled)})}function db(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Pv,Sv)),go(1,16384,[[17,4]],0,Py,[],null,null),go(2,49152,null,0,Xy,[Mn,Fl,[2,Ol],[2,Bg],Ky],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function pb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[14,4]],0,ky,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function mb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Pv,Sv)),go(1,16384,[[24,4]],0,Py,[],null,null),go(2,49152,null,0,Xy,[Mn,Fl,[2,Ol],[2,Bg],Ky],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function fb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[21,4]],0,ky,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function _b(t){return Go(0,[(t()(),Ts(0,0,null,null,58,"div",[["class","lat-lng-dec-wrapper"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,28,"div",[["class","latitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(2,16777216,null,null,5,"button",[["aria-haspopup","true"],["mat-icon-button",""],["type","button"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null],[1,"aria-expanded",0]],[[null,"click"],[null,"mousedown"],[null,"keydown"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==io(t,4)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==io(t,4)._handleKeydown(n)&&i),"click"===e&&(i=!1!==io(t,4)._handleClick(n)&&i),"click"===e&&(i=!1!==n.preventDefault()&&i),i},Fv,Nv)),go(3,180224,null,0,bv,[Mn,Fl,Xu,[2,Bg]],null,null),go(4,1196032,null,0,xy,[ru,Mn,On,by,[2,vy],[8,null],[2,Su],Xu],{menu:[0,"menu"]},null),(t()(),Ts(5,0,null,0,2,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Vv,zv)),go(6,638976,null,0,mv,[Mn,uv,[8,null]],null,null),(t()(),Ho(-1,0,["more_vert"])),(t()(),Ts(8,0,null,null,21,"mat-form-field",[["class","latitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Xv,Bv)),go(9,7389184,null,7,Ny,[Mn,Rn,[2,Fd],[2,Su],[2,Ry],Fl,rn,[2,Bg]],null,null),Oo(335544320,11,{_control:0}),Oo(335544320,12,{_placeholderChild:0}),Oo(335544320,13,{_labelChild:0}),Oo(603979776,14,{_errorChildren:1}),Oo(603979776,15,{_hintChildren:1}),Oo(603979776,16,{_prefixChildren:1}),Oo(603979776,17,{_suffixChildren:1}),(t()(),Ts(17,16777216,null,1,8,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","latInput"],["matInput",""],["matTooltip","Saisir les coordonn\xe9es g\xe9ographiques"],["placeholder","latitude"]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,18)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,18).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,18)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,18)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,22)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,22)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,22)._onInput()&&i),"longpress"===e&&(i=!1!==io(t,23).show()&&i),"keydown"===e&&(i=!1!==io(t,23)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,23)._handleTouchend()&&i),i},null,null)),go(18,16384,null,0,Gp,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Up,function(t){return[t]},[Gp]),go(20,671744,null,0,Nm,[[3,Np],[8,null],[8,null],[6,Up],[2,Pm]],{name:[0,"name"]},null),vo(2048,null,Kp,null,[Nm]),go(22,999424,null,0,Zy,[Mn,Fl,[6,Kp],[2,Im],[2,Am],yd,[8,null],Vy,rn],{placeholder:[0,"placeholder"]},null),go(23,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(24,16384,null,0,fm,[[4,Kp]],null,null),vo(2048,[[11,4]],Sy,null,[Zy]),(t()(),Ss(16777216,null,4,1,null,db)),go(27,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,pb)),go(29,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(30,0,null,null,28,"div",[["class","longitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(31,0,null,null,21,"mat-form-field",[["class","longitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Xv,Bv)),go(32,7389184,null,7,Ny,[Mn,Rn,[2,Fd],[2,Su],[2,Ry],Fl,rn,[2,Bg]],null,null),Oo(335544320,18,{_control:0}),Oo(335544320,19,{_placeholderChild:0}),Oo(335544320,20,{_labelChild:0}),Oo(603979776,21,{_errorChildren:1}),Oo(603979776,22,{_hintChildren:1}),Oo(603979776,23,{_prefixChildren:1}),Oo(603979776,24,{_suffixChildren:1}),(t()(),Ts(40,16777216,null,1,8,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","lngInput"],["matInput",""],["matTooltip","Saisir les coordonn\xe9es g\xe9ographiques"],["placeholder","longitude"]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,41)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,41).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,41)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,41)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,45)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,45)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,45)._onInput()&&i),"longpress"===e&&(i=!1!==io(t,46).show()&&i),"keydown"===e&&(i=!1!==io(t,46)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,46)._handleTouchend()&&i),i},null,null)),go(41,16384,null,0,Gp,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Up,function(t){return[t]},[Gp]),go(43,671744,null,0,Nm,[[3,Np],[8,null],[8,null],[6,Up],[2,Pm]],{name:[0,"name"]},null),vo(2048,null,Kp,null,[Nm]),go(45,999424,null,0,Zy,[Mn,Fl,[6,Kp],[2,Im],[2,Am],yd,[8,null],Vy,rn],{placeholder:[0,"placeholder"]},null),go(46,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(47,16384,null,0,fm,[[4,Kp]],null,null),vo(2048,[[18,4]],Sy,null,[Zy]),(t()(),Ss(16777216,null,4,1,null,mb)),go(50,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,fb)),go(52,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(53,0,null,null,5,"button",[["color","primary"],["mat-icon-button",""],["type","button"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(n.preventDefault(),s.addMarkerFromLatLngCoord(),i=!1!==s.callGeolocElevationApisUsingLatLngInputsValues()&&i),i},Fv,Nv)),go(54,180224,null,0,bv,[Mn,Fl,Xu,[2,Bg]],{disabled:[0,"disabled"],color:[1,"color"]},null),(t()(),Ts(55,16777216,null,0,3,"mat-icon",[["class","mat-icon"],["matTooltip","Utiliser ces coordonn\xe9es"],["role","img"]],[[2,"mat-icon-inline",null]],[[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"longpress"===e&&(i=!1!==io(t,56).show()&&i),"keydown"===e&&(i=!1!==io(t,56)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,56)._handleTouchend()&&i),i},Vv,zv)),go(56,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(57,638976,null,0,mv,[Mn,uv,[8,null]],null,null),(t()(),Ho(-1,0,["where_to_vote"]))],function(t,e){var n=e.component;t(e,4,0,io(e.parent,10)),t(e,6,0),t(e,20,0,"latInput"),t(e,22,0,"latitude"),t(e,23,0,"Saisir les coordonn\xe9es g\xe9ographiques"),t(e,27,0,n.isLoadingLatitude),t(e,29,0,n.latlngFormGroup.controls.latInput.dirty&&n.latlngFormGroup.controls.latInput.hasError("malformedLatLngDecFormat")),t(e,43,0,"lngInput"),t(e,45,0,"longitude"),t(e,46,0,"Saisir les coordonn\xe9es g\xe9ographiques"),t(e,50,0,n.isLoadingLongitude),t(e,52,0,n.latlngFormGroup.controls.latInput.dirty&&n.latlngFormGroup.controls.latInput.hasError("malformedLatLngDecFormat")),t(e,54,0,!n.latlngFormGroup.controls.latInput.valid||!n.latlngFormGroup.controls.lngInput.valid,"primary"),t(e,56,0,"Utiliser ces coordonn\xe9es"),t(e,57,0)},function(t,e){t(e,2,0,io(e,3).disabled||null,"NoopAnimations"===io(e,3)._animationMode,io(e,4).menuOpen||null),t(e,5,0,io(e,6).inline),t(e,8,1,["standard"==io(e,9).appearance,"fill"==io(e,9).appearance,"outline"==io(e,9).appearance,"legacy"==io(e,9).appearance,io(e,9)._control.errorState,io(e,9)._canLabelFloat,io(e,9)._shouldLabelFloat(),io(e,9)._hideControlPlaceholder(),io(e,9)._control.disabled,io(e,9)._control.autofilled,io(e,9)._control.focused,"accent"==io(e,9).color,"warn"==io(e,9).color,io(e,9)._shouldForward("untouched"),io(e,9)._shouldForward("touched"),io(e,9)._shouldForward("pristine"),io(e,9)._shouldForward("dirty"),io(e,9)._shouldForward("valid"),io(e,9)._shouldForward("invalid"),io(e,9)._shouldForward("pending"),!io(e,9)._animationsEnabled]),t(e,17,1,[io(e,22)._isServer,io(e,22).id,io(e,22).placeholder,io(e,22).disabled,io(e,22).required,io(e,22).readonly,io(e,22)._ariaDescribedby||null,io(e,22).errorState,io(e,22).required.toString(),io(e,24).ngClassUntouched,io(e,24).ngClassTouched,io(e,24).ngClassPristine,io(e,24).ngClassDirty,io(e,24).ngClassValid,io(e,24).ngClassInvalid,io(e,24).ngClassPending]),t(e,31,1,["standard"==io(e,32).appearance,"fill"==io(e,32).appearance,"outline"==io(e,32).appearance,"legacy"==io(e,32).appearance,io(e,32)._control.errorState,io(e,32)._canLabelFloat,io(e,32)._shouldLabelFloat(),io(e,32)._hideControlPlaceholder(),io(e,32)._control.disabled,io(e,32)._control.autofilled,io(e,32)._control.focused,"accent"==io(e,32).color,"warn"==io(e,32).color,io(e,32)._shouldForward("untouched"),io(e,32)._shouldForward("touched"),io(e,32)._shouldForward("pristine"),io(e,32)._shouldForward("dirty"),io(e,32)._shouldForward("valid"),io(e,32)._shouldForward("invalid"),io(e,32)._shouldForward("pending"),!io(e,32)._animationsEnabled]),t(e,40,1,[io(e,45)._isServer,io(e,45).id,io(e,45).placeholder,io(e,45).disabled,io(e,45).required,io(e,45).readonly,io(e,45)._ariaDescribedby||null,io(e,45).errorState,io(e,45).required.toString(),io(e,47).ngClassUntouched,io(e,47).ngClassTouched,io(e,47).ngClassPristine,io(e,47).ngClassDirty,io(e,47).ngClassValid,io(e,47).ngClassInvalid,io(e,47).ngClassPending]),t(e,53,0,io(e,54).disabled||null,"NoopAnimations"===io(e,54)._animationMode),t(e,55,0,io(e,57).inline)})}function gb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Pv,Sv)),go(1,16384,[[31,4]],0,Py,[],null,null),go(2,49152,null,0,Xy,[Mn,Fl,[2,Ol],[2,Bg],Ky],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function yb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[28,4]],0,ky,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function vb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Pv,Sv)),go(1,16384,[[38,4]],0,Py,[],null,null),go(2,49152,null,0,Xy,[Mn,Fl,[2,Ol],[2,Bg],Ky],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function bb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[35,4]],0,ky,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function wb(t){return Go(0,[(t()(),Ts(0,0,null,null,64,"div",[["class","lat-lng-dms-wrapper"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,31,"div",[["class","latitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(2,16777216,null,null,5,"button",[["aria-haspopup","true"],["mat-icon-button",""],["type","button"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null],[1,"aria-expanded",0]],[[null,"click"],[null,"mousedown"],[null,"keydown"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==io(t,4)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==io(t,4)._handleKeydown(n)&&i),"click"===e&&(i=!1!==io(t,4)._handleClick(n)&&i),"click"===e&&(i=!1!==n.preventDefault()&&i),i},Fv,Nv)),go(3,180224,null,0,bv,[Mn,Fl,Xu,[2,Bg]],null,null),go(4,1196032,null,0,xy,[ru,Mn,On,by,[2,vy],[8,null],[2,Su],Xu],{menu:[0,"menu"]},null),(t()(),Ts(5,0,null,0,2,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Vv,zv)),go(6,638976,null,0,mv,[Mn,uv,[8,null]],null,null),(t()(),Ho(-1,0,["more_vert"])),(t()(),Ts(8,0,null,null,24,"mat-form-field",[["class","latitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Xv,Bv)),go(9,7389184,null,7,Ny,[Mn,Rn,[2,Fd],[2,Su],[2,Ry],Fl,rn,[2,Bg]],null,null),Oo(335544320,25,{_control:0}),Oo(335544320,26,{_placeholderChild:0}),Oo(335544320,27,{_labelChild:0}),Oo(603979776,28,{_errorChildren:1}),Oo(603979776,29,{_hintChildren:1}),Oo(603979776,30,{_prefixChildren:1}),Oo(603979776,31,{_suffixChildren:1}),(t()(),Ts(17,16777216,null,1,8,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","dmsLatInput"],["matInput",""],["matTooltip","Saisir les coordonn\xe9es g\xe9ographiques"],["placeholder","(deg)\xb0 (min)' (sec)\""]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,18)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,18).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,18)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,18)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,22)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,22)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,22)._onInput()&&i),"longpress"===e&&(i=!1!==io(t,23).show()&&i),"keydown"===e&&(i=!1!==io(t,23)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,23)._handleTouchend()&&i),i},null,null)),go(18,16384,null,0,Gp,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Up,function(t){return[t]},[Gp]),go(20,671744,null,0,Nm,[[3,Np],[8,null],[8,null],[6,Up],[2,Pm]],{name:[0,"name"]},null),vo(2048,null,Kp,null,[Nm]),go(22,999424,null,0,Zy,[Mn,Fl,[6,Kp],[2,Im],[2,Am],yd,[8,null],Vy,rn],{placeholder:[0,"placeholder"]},null),go(23,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(24,16384,null,0,fm,[[4,Kp]],null,null),vo(2048,[[25,4]],Sy,null,[Zy]),(t()(),Ts(26,0,null,0,2,"span",[["matPrefix",""]],null,null,null,null,null)),go(27,16384,[[30,4]],0,Iy,[],null,null),(t()(),Ho(-1,null,["N\xa0"])),(t()(),Ss(16777216,null,4,1,null,gb)),go(30,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,yb)),go(32,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(33,0,null,null,31,"div",[["class","longitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(34,0,null,null,24,"mat-form-field",[["class","longitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Xv,Bv)),go(35,7389184,null,7,Ny,[Mn,Rn,[2,Fd],[2,Su],[2,Ry],Fl,rn,[2,Bg]],null,null),Oo(335544320,32,{_control:0}),Oo(335544320,33,{_placeholderChild:0}),Oo(335544320,34,{_labelChild:0}),Oo(603979776,35,{_errorChildren:1}),Oo(603979776,36,{_hintChildren:1}),Oo(603979776,37,{_prefixChildren:1}),Oo(603979776,38,{_suffixChildren:1}),(t()(),Ts(43,16777216,null,1,8,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","dmsLngInput"],["matInput",""],["matTooltip","Saisir les coordonn\xe9es g\xe9ographiques"],["placeholder","(deg)\xb0 (min)' (sec)\""]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,44)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,44).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,44)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,44)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,48)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,48)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,48)._onInput()&&i),"longpress"===e&&(i=!1!==io(t,49).show()&&i),"keydown"===e&&(i=!1!==io(t,49)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,49)._handleTouchend()&&i),i},null,null)),go(44,16384,null,0,Gp,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Up,function(t){return[t]},[Gp]),go(46,671744,null,0,Nm,[[3,Np],[8,null],[8,null],[6,Up],[2,Pm]],{name:[0,"name"]},null),vo(2048,null,Kp,null,[Nm]),go(48,999424,null,0,Zy,[Mn,Fl,[6,Kp],[2,Im],[2,Am],yd,[8,null],Vy,rn],{placeholder:[0,"placeholder"]},null),go(49,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(50,16384,null,0,fm,[[4,Kp]],null,null),vo(2048,[[32,4]],Sy,null,[Zy]),(t()(),Ts(52,0,null,0,2,"span",[["matPrefix",""]],null,null,null,null,null)),go(53,16384,[[37,4]],0,Iy,[],null,null),(t()(),Ho(-1,null,["E\xa0"])),(t()(),Ss(16777216,null,4,1,null,vb)),go(56,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,bb)),go(58,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(59,0,null,null,5,"button",[["color","primary"],["mat-icon-button",""],["type","button"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(n.preventDefault(),s.addMarkerFromDmsCoord(),i=!1!==s.callGeolocElevationApisUsingLatLngInputsValues()&&i),i},Fv,Nv)),go(60,180224,null,0,bv,[Mn,Fl,Xu,[2,Bg]],{disabled:[0,"disabled"],color:[1,"color"]},null),(t()(),Ts(61,16777216,null,0,3,"mat-icon",[["class","mat-icon"],["matTooltip","Utiliser ces coordonn\xe9es"],["role","img"]],[[2,"mat-icon-inline",null]],[[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"longpress"===e&&(i=!1!==io(t,62).show()&&i),"keydown"===e&&(i=!1!==io(t,62)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,62)._handleTouchend()&&i),i},Vv,zv)),go(62,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(63,638976,null,0,mv,[Mn,uv,[8,null]],null,null),(t()(),Ho(-1,0,["where_to_vote"]))],function(t,e){var n=e.component;t(e,4,0,io(e.parent,10)),t(e,6,0),t(e,20,0,"dmsLatInput"),t(e,22,0,"(deg)\xb0 (min)' (sec)\""),t(e,23,0,"Saisir les coordonn\xe9es g\xe9ographiques"),t(e,30,0,n.isLoadingLatitude),t(e,32,0,n.latlngFormGroup.controls.dmsLatInput.dirty&&n.latlngFormGroup.controls.dmsLatInput.hasError("malformedLatLngDmsFormat")),t(e,46,0,"dmsLngInput"),t(e,48,0,"(deg)\xb0 (min)' (sec)\""),t(e,49,0,"Saisir les coordonn\xe9es g\xe9ographiques"),t(e,56,0,n.isLoadingLongitude),t(e,58,0,n.latlngFormGroup.controls.dmsLatInput.dirty&&n.latlngFormGroup.controls.dmsLatInput.hasError("malformedLatLngDmsFormat")),t(e,60,0,!n.latlngFormGroup.controls.dmsLatInput.valid||!n.latlngFormGroup.controls.dmsLngInput.valid,"primary"),t(e,62,0,"Utiliser ces coordonn\xe9es"),t(e,63,0)},function(t,e){t(e,2,0,io(e,3).disabled||null,"NoopAnimations"===io(e,3)._animationMode,io(e,4).menuOpen||null),t(e,5,0,io(e,6).inline),t(e,8,1,["standard"==io(e,9).appearance,"fill"==io(e,9).appearance,"outline"==io(e,9).appearance,"legacy"==io(e,9).appearance,io(e,9)._control.errorState,io(e,9)._canLabelFloat,io(e,9)._shouldLabelFloat(),io(e,9)._hideControlPlaceholder(),io(e,9)._control.disabled,io(e,9)._control.autofilled,io(e,9)._control.focused,"accent"==io(e,9).color,"warn"==io(e,9).color,io(e,9)._shouldForward("untouched"),io(e,9)._shouldForward("touched"),io(e,9)._shouldForward("pristine"),io(e,9)._shouldForward("dirty"),io(e,9)._shouldForward("valid"),io(e,9)._shouldForward("invalid"),io(e,9)._shouldForward("pending"),!io(e,9)._animationsEnabled]),t(e,17,1,[io(e,22)._isServer,io(e,22).id,io(e,22).placeholder,io(e,22).disabled,io(e,22).required,io(e,22).readonly,io(e,22)._ariaDescribedby||null,io(e,22).errorState,io(e,22).required.toString(),io(e,24).ngClassUntouched,io(e,24).ngClassTouched,io(e,24).ngClassPristine,io(e,24).ngClassDirty,io(e,24).ngClassValid,io(e,24).ngClassInvalid,io(e,24).ngClassPending]),t(e,34,1,["standard"==io(e,35).appearance,"fill"==io(e,35).appearance,"outline"==io(e,35).appearance,"legacy"==io(e,35).appearance,io(e,35)._control.errorState,io(e,35)._canLabelFloat,io(e,35)._shouldLabelFloat(),io(e,35)._hideControlPlaceholder(),io(e,35)._control.disabled,io(e,35)._control.autofilled,io(e,35)._control.focused,"accent"==io(e,35).color,"warn"==io(e,35).color,io(e,35)._shouldForward("untouched"),io(e,35)._shouldForward("touched"),io(e,35)._shouldForward("pristine"),io(e,35)._shouldForward("dirty"),io(e,35)._shouldForward("valid"),io(e,35)._shouldForward("invalid"),io(e,35)._shouldForward("pending"),!io(e,35)._animationsEnabled]),t(e,43,1,[io(e,48)._isServer,io(e,48).id,io(e,48).placeholder,io(e,48).disabled,io(e,48).required,io(e,48).readonly,io(e,48)._ariaDescribedby||null,io(e,48).errorState,io(e,48).required.toString(),io(e,50).ngClassUntouched,io(e,50).ngClassTouched,io(e,50).ngClassPristine,io(e,50).ngClassDirty,io(e,50).ngClassValid,io(e,50).ngClassInvalid,io(e,50).ngClassPending]),t(e,59,0,io(e,60).disabled||null,"NoopAnimations"===io(e,60)._animationMode),t(e,61,0,io(e,63).inline)})}function Eb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Pv,Sv)),go(1,16384,[[47,4]],0,Py,[],null,null),go(2,49152,null,0,Xy,[Mn,Fl,[2,Ol],[2,Bg],Ky],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function xb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"span",[["matSuffix",""]],null,null,null,null,null)),go(1,16384,[[47,4]],0,Py,[],null,null),(t()(),Ho(-1,null,["m"]))],null,null)}function Cb(t){return Go(0,[(t()(),Ts(0,0,null,null,45,"div",[["class","geolocationInputs"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,18,"div",[],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==io(t,2).onSubmit(n)&&i),"reset"===e&&(i=!1!==io(t,2).onReset()&&i),i},null,null)),go(2,540672,null,0,Am,[[8,null],[8,null]],{form:[0,"form"]},null),vo(2048,null,Np,null,[Am]),go(4,16384,null,0,_m,[[4,Np]],null,null),(t()(),Ss(16777216,null,null,1,null,_b)),go(6,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,wb)),go(8,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(9,0,null,null,10,"mat-menu",[],null,null,null,eb,Jv)),go(10,1294336,[["menu",4]],2,vy,[Mn,rn,gy],null,null),Oo(603979776,39,{items:1}),Oo(335544320,40,{lazyContent:0}),vo(2048,null,my,null,[vy]),(t()(),Ts(14,0,null,0,2,"button",[["class","mat-menu-item"],["mat-menu-item",""],["role","menuitem"],["type","button"]],[[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(i=!1!==io(t,15)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==io(t,15)._handleMouseEnter()&&i),"click"===e&&(n.preventDefault(),i=!1!==s.setLatLngInputFormat("dec")&&i),i},ib,nb)),go(15,180224,[[39,4]],0,_y,[Mn,Ol,Xu,[2,my]],null,null),(t()(),Ho(-1,0,["D\xe9cimal"])),(t()(),Ts(17,0,null,0,2,"button",[["class","mat-menu-item"],["mat-menu-item",""],["role","menuitem"],["type","button"]],[[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(i=!1!==io(t,18)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==io(t,18)._handleMouseEnter()&&i),"click"===e&&(n.preventDefault(),i=!1!==s.setLatLngInputFormat("dms")&&i),i},ib,nb)),go(18,180224,[[39,4]],0,_y,[Mn,Ol,Xu,[2,my]],null,null),(t()(),Ho(-1,0,["Degr\xe9s minutes secondes"])),(t()(),Ts(20,0,null,null,25,"div",[["class","elevationInput"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==io(t,21).onSubmit(n)&&i),"reset"===e&&(i=!1!==io(t,21).onReset()&&i),i},null,null)),go(21,540672,null,0,Am,[[8,null],[8,null]],{form:[0,"form"]},null),vo(2048,null,Np,null,[Am]),go(23,16384,null,0,_m,[[4,Np]],null,null),(t()(),Ts(24,0,null,null,21,"mat-form-field",[["class","mat-form-field"],["style","width: 100px;"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Xv,Bv)),go(25,7389184,null,7,Ny,[Mn,Rn,[2,Fd],[2,Su],[2,Ry],Fl,rn,[2,Bg]],null,null),Oo(335544320,41,{_control:0}),Oo(335544320,42,{_placeholderChild:0}),Oo(335544320,43,{_labelChild:0}),Oo(603979776,44,{_errorChildren:1}),Oo(603979776,45,{_hintChildren:1}),Oo(603979776,46,{_prefixChildren:1}),Oo(603979776,47,{_suffixChildren:1}),(t()(),Ts(33,16777216,null,1,8,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","elevationInput"],["matInput",""],["matTooltip","Saisir l'altitude"],["placeholder","altitude"]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,34)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,34).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,34)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,34)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,38)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,38)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,38)._onInput()&&i),"longpress"===e&&(i=!1!==io(t,39).show()&&i),"keydown"===e&&(i=!1!==io(t,39)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,39)._handleTouchend()&&i),i},null,null)),go(34,16384,null,0,Gp,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Up,function(t){return[t]},[Gp]),go(36,671744,null,0,Nm,[[3,Np],[8,null],[8,null],[6,Up],[2,Pm]],{name:[0,"name"]},null),vo(2048,null,Kp,null,[Nm]),go(38,999424,null,0,Zy,[Mn,Fl,[6,Kp],[2,Im],[2,Am],yd,[8,null],Vy,rn],{placeholder:[0,"placeholder"]},null),go(39,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(40,16384,null,0,fm,[[4,Kp]],null,null),vo(2048,[[41,4]],Sy,null,[Zy]),(t()(),Ss(16777216,null,4,1,null,Eb)),go(43,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,4,1,null,xb)),go(45,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,n.latlngFormGroup),t(e,6,0,"dec"==n.latLngFormat),t(e,8,0,"dms"==n.latLngFormat),t(e,10,0),t(e,21,0,n.elevationFormGroup),t(e,36,0,"elevationInput"),t(e,38,0,"altitude"),t(e,39,0,"Saisir l'altitude"),t(e,43,0,n.isLoadingElevation),t(e,45,0,!n.isLoadingElevation)},function(t,e){t(e,1,0,io(e,4).ngClassUntouched,io(e,4).ngClassTouched,io(e,4).ngClassPristine,io(e,4).ngClassDirty,io(e,4).ngClassValid,io(e,4).ngClassInvalid,io(e,4).ngClassPending),t(e,14,0,io(e,15)._highlighted,io(e,15)._triggersSubmenu,io(e,15)._getTabIndex(),io(e,15).disabled.toString(),io(e,15).disabled||null),t(e,17,0,io(e,18)._highlighted,io(e,18)._triggersSubmenu,io(e,18)._getTabIndex(),io(e,18).disabled.toString(),io(e,18).disabled||null),t(e,20,0,io(e,23).ngClassUntouched,io(e,23).ngClassTouched,io(e,23).ngClassPristine,io(e,23).ngClassDirty,io(e,23).ngClassValid,io(e,23).ngClassInvalid,io(e,23).ngClassPending),t(e,24,1,["standard"==io(e,25).appearance,"fill"==io(e,25).appearance,"outline"==io(e,25).appearance,"legacy"==io(e,25).appearance,io(e,25)._control.errorState,io(e,25)._canLabelFloat,io(e,25)._shouldLabelFloat(),io(e,25)._hideControlPlaceholder(),io(e,25)._control.disabled,io(e,25)._control.autofilled,io(e,25)._control.focused,"accent"==io(e,25).color,"warn"==io(e,25).color,io(e,25)._shouldForward("untouched"),io(e,25)._shouldForward("touched"),io(e,25)._shouldForward("pristine"),io(e,25)._shouldForward("dirty"),io(e,25)._shouldForward("valid"),io(e,25)._shouldForward("invalid"),io(e,25)._shouldForward("pending"),!io(e,25)._animationsEnabled]),t(e,33,1,[io(e,38)._isServer,io(e,38).id,io(e,38).placeholder,io(e,38).disabled,io(e,38).required,io(e,38).readonly,io(e,38)._ariaDescribedby||null,io(e,38).errorState,io(e,38).required.toString(),io(e,40).ngClassUntouched,io(e,40).ngClassTouched,io(e,40).ngClassPristine,io(e,40).ngClassDirty,io(e,40).ngClassValid,io(e,40).ngClassInvalid,io(e,40).ngClassPending])})}function Lb(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ho(1,null,["altitude : "," m"]))],null,function(t,e){t(e,1,0,e.component.elevationFormGroup.controls.elevationInput.value)})}function kb(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ho(-1,null,["altitude : calcul en cours..."]))],null,null)}function Sb(t){return Go(0,[(t()(),Ts(0,0,null,null,10,"div",[["class","sub-map-infos"]],[[2,"has-data",null]],null,null,null,null)),(t()(),Ts(1,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),Ho(2,null,["latitude : ",""])),jo(3,2),(t()(),Ts(4,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),Ho(5,null,["longitude : ",""])),jo(6,2),(t()(),Ss(16777216,null,null,1,null,Lb)),go(8,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,kb)),go(10,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,8,0,!n.isLoadingElevation),t(e,10,0,n.isLoadingElevation)},function(t,e){var n=e.component;t(e,0,0,""!==n.latlngFormGroup.controls.latInput.value&&""!==n.latlngFormGroup.controls.lngInput.value),t(e,2,0,Yi(e,2,0,t(e,3,0,io(e.parent,1),n.latlngFormGroup.controls.latInput.value,"2.0-6"))),t(e,5,0,Yi(e,5,0,t(e,6,0,io(e.parent,1),n.latlngFormGroup.controls.lngInput.value,"2.0-6")))})}function Tb(t){return Go(0,[yo(0,nf,[Xm]),yo(0,Al,[ri]),Oo(402653184,1,{locationInput:0}),(t()(),Ts(3,0,null,null,35,"div",[["id","geoloc-map"]],null,null,null,null,null)),(t()(),Ts(4,0,null,null,30,"div",[["id","geoloc-map-meta"]],null,null,null,null,null)),(t()(),Ts(5,0,null,null,27,"mat-form-field",[["class","mat-form-field"],["style","width: 100%;"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Xv,Bv)),go(6,7389184,null,7,Ny,[Mn,Rn,[2,Fd],[2,Su],[2,Ry],Fl,rn,[2,Bg]],null,null),Oo(335544320,2,{_control:0}),Oo(335544320,3,{_placeholderChild:0}),Oo(335544320,4,{_labelChild:0}),Oo(603979776,5,{_errorChildren:1}),Oo(603979776,6,{_hintChildren:1}),Oo(603979776,7,{_prefixChildren:1}),Oo(603979776,8,{_suffixChildren:1}),(t()(),Ts(14,16777216,[[1,0],["locationInput",1]],1,9,"input",[["aria-label","Trouver un lieu"],["class","mat-input-element mat-form-field-autofill-control"],["matInput",""],["matTooltip","Trouver un lieu"],["placeholder","Trouver un lieu"]],[[1,"autocomplete",0],[1,"role",0],[1,"aria-autocomplete",0],[1,"aria-activedescendant",0],[1,"aria-expanded",0],[1,"aria-owns",0],[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focusin"],[null,"blur"],[null,"input"],[null,"keydown"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"],[null,"longpress"],[null,"touchend"]],function(t,e,n){var i=!0;return"focusin"===e&&(i=!1!==io(t,15)._handleFocus()&&i),"blur"===e&&(i=!1!==io(t,15)._onTouched()&&i),"input"===e&&(i=!1!==io(t,15)._handleInput(n)&&i),"keydown"===e&&(i=!1!==io(t,15)._handleKeydown(n)&&i),"input"===e&&(i=!1!==io(t,16)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,16).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,16)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,16)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,20)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,20)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,20)._onInput()&&i),"longpress"===e&&(i=!1!==io(t,21).show()&&i),"keydown"===e&&(i=!1!==io(t,21)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,21)._handleTouchend()&&i),i},null,null)),go(15,147456,null,0,ly,[Mn,ru,On,rn,Rn,ry,[2,Su],[2,Ny],[2,Ol],Lh],{autocomplete:[0,"autocomplete"]},null),go(16,16384,null,0,Gp,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Up,function(t,e){return[t,e]},[ly,Gp]),go(18,540672,null,0,Mm,[[8,null],[8,null],[6,Up],[2,Pm]],{form:[0,"form"]},null),vo(2048,null,Kp,null,[Mm]),go(20,999424,null,0,Zy,[Mn,Fl,[6,Kp],[2,Im],[2,Am],yd,[8,null],Vy,rn],{placeholder:[0,"placeholder"]},null),go(21,147456,null,0,_u,[ru,Mn,xh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(22,16384,null,0,fm,[[4,Kp]],null,null),vo(2048,[[2,4]],Sy,null,[Zy]),(t()(),Ss(16777216,null,4,1,null,lb)),go(25,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(26,0,null,1,6,"mat-autocomplete",[["class","mat-autocomplete"]],null,[[null,"optionSelected"]],function(t,e,n){var i=!0;return"optionSelected"===e&&(i=!1!==t.component.addressSelectedChanged(n)&&i),i},rb,sb)),vo(6144,null,Od,null,[iy]),go(28,1097728,[["auto",4]],2,iy,[Rn,Mn,ny],null,{optionSelected:"optionSelected"}),Oo(603979776,9,{options:1}),Oo(603979776,10,{optionGroups:1}),(t()(),Ss(16777216,null,0,1,null,cb)),go(32,802816,null,0,sl,[On,Dn,ti],{ngForOf:[0,"ngForOf"]},null),(t()(),Ss(16777216,null,null,1,null,Cb)),go(34,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ts(35,0,null,null,1,"div",[["id","geoloc-map-draw"],["leaflet",""]],[[4,"height",null],[4,"minHeight",null],[4,"width",null],[4,"maxWidth",null]],[[null,"leafletMapReady"],["window","resize"]],function(t,e,n){var i=!0,s=t.component;return"window:resize"===e&&(i=!1!==io(t,36).onResize()&&i),"leafletMapReady"===e&&(i=!1!==s.onMapReady(n)&&i),i},null,null)),go(36,606208,null,0,Hm,[Mn,rn],{options:[0,"options"]},{mapReady:"leafletMapReady"}),(t()(),Ss(16777216,null,null,1,null,Sb)),go(38,16384,null,0,rl,[On,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,15,0,io(e,28)),t(e,18,0,n.geoSearchFormGroup.controls.placeInput),t(e,20,0,"Trouver un lieu"),t(e,21,0,"Trouver un lieu"),t(e,25,0,n.isLoadingAddress),t(e,32,0,n.geoSearchResults),t(e,34,0,n.showLatLngElevationInputs),t(e,36,0,n.mapOptions),t(e,38,0,!n.showLatLngElevationInputs)},function(t,e){var n=e.component;t(e,5,1,["standard"==io(e,6).appearance,"fill"==io(e,6).appearance,"outline"==io(e,6).appearance,"legacy"==io(e,6).appearance,io(e,6)._control.errorState,io(e,6)._canLabelFloat,io(e,6)._shouldLabelFloat(),io(e,6)._hideControlPlaceholder(),io(e,6)._control.disabled,io(e,6)._control.autofilled,io(e,6)._control.focused,"accent"==io(e,6).color,"warn"==io(e,6).color,io(e,6)._shouldForward("untouched"),io(e,6)._shouldForward("touched"),io(e,6)._shouldForward("pristine"),io(e,6)._shouldForward("dirty"),io(e,6)._shouldForward("valid"),io(e,6)._shouldForward("invalid"),io(e,6)._shouldForward("pending"),!io(e,6)._animationsEnabled]),t(e,14,1,[io(e,15).autocompleteAttribute,io(e,15).autocompleteDisabled?null:"combobox",io(e,15).autocompleteDisabled?null:"list",null==io(e,15).activeOption?null:io(e,15).activeOption.id,io(e,15).autocompleteDisabled?null:io(e,15).panelOpen.toString(),io(e,15).autocompleteDisabled||!io(e,15).panelOpen?null:null==io(e,15).autocomplete?null:io(e,15).autocomplete.id,io(e,20)._isServer,io(e,20).id,io(e,20).placeholder,io(e,20).disabled,io(e,20).required,io(e,20).readonly,io(e,20)._ariaDescribedby||null,io(e,20).errorState,io(e,20).required.toString(),io(e,22).ngClassUntouched,io(e,22).ngClassTouched,io(e,22).ngClassPristine,io(e,22).ngClassDirty,io(e,22).ngClassValid,io(e,22).ngClassInvalid,io(e,22).ngClassPending]),t(e,35,0,n.height,n.height,n.width,n.width)})}var Ib=Ji({encapsulation:0,styles:[[""]],data:{}});function Pb(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"tb-geoloc-map",[],null,[[null,"location"],[null,"httpError"]],function(t,e,n){var i=!0,s=t.component;return"location"===e&&(i=!1!==s.newLocation(n)&&i),"httpError"===e&&(i=!1!==s.newHttpError(n)&&i),i},Tb,ab)),go(1,245760,null,0,ef,[Fm,Xm,Jm,rn],{layersToAdd:[0,"layersToAdd"],geolocatedPhotoLatLng:[1,"geolocatedPhotoLatLng"],osmClassFilter:[2,"osmClassFilter"],geometryFilter:[3,"geometryFilter"],allowEditDrawnItems:[4,"allowEditDrawnItems"],marker:[5,"marker"],polyline:[6,"polyline"],polygon:[7,"polygon"],lngLatInit:[8,"lngLatInit"],zoomInit:[9,"zoomInit"],getOsmSimpleLine:[10,"getOsmSimpleLine"],showLatLngElevationInputs:[11,"showLatLngElevationInputs"],latLngFormat:[12,"latLngFormat"],reset:[13,"reset"],elevationProvider:[14,"elevationProvider"],geolocationProvider:[15,"geolocationProvider"],mapQuestApiKey:[16,"mapQuestApiKey"],osmNominatimApiUrl:[17,"osmNominatimApiUrl"],mapQuestNominatimApiUrl:[18,"mapQuestNominatimApiUrl"],openElevationApiUrl:[19,"openElevationApiUrl"],mapQuestElevationApiUrl:[20,"mapQuestElevationApiUrl"],frGeoApiUrl:[21,"frGeoApiUrl"],patchAddress:[22,"patchAddress"],setAddress:[23,"setAddress"],patchElevation:[24,"patchElevation"],patchLngLatDec:[25,"patchLngLatDec"],patchGeometry:[26,"patchGeometry"],drawMarker:[27,"drawMarker"],enabled:[28,"enabled"],height:[29,"height"],width:[30,"width"],inputFocus:[31,"inputFocus"]},{location:"location",httpError:"httpError"})],function(t,e){var n=e.component;t(e,1,1,[n.layers_to_add,n.geolocated_photo_lat_lng,n._osm_class_filters,n._geometry_filters,n.allow_edit_drawn_items,n._marker,n._polyline,n._polygon,n.lng_lat_init,n.zoom_init,n._get_osm_simple_line,n._show_lat_lng_elevation_inputs,n.lat_lng_format,n._reset,n.elevation_provider,n.geolocation_provider,n.map_quest_api_key,n._osm_nominatim_api_url,n._map_quest_nominatim_api_url,n._open_elevation_api_url,n._map_quest_elevation_api_url,n._fr_geo_api_url,n._patch_address,n._set_address,n._patch_elevation,n._patch_lng_lat_dec,n._patch_geometry,n._draw_marker,n._enabled,n._height,n._width,n._input_focus])},null)}var Mb=$s("app-root",aa,function(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"app-root",[],null,null,null,Pb,Ib)),go(1,49152,null,0,aa,[],null,null)],null,null)},{layer:"layer",layers_to_add:"layers_to_add",geolocated_photo_lat_lng:"geolocated_photo_lat_lng",osm_class_filter:"osm_class_filter",geometry_filter:"geometry_filter",allow_edit_drawn_items:"allow_edit_drawn_items",marker:"marker",polyline:"polyline",polygon:"polygon",zoom_init:"zoom_init",lat_init:"lat_init",lng_init:"lng_init",lng_lat_init:"lng_lat_init",get_osm_simple_line:"get_osm_simple_line",show_lat_lng_elevation_inputs:"show_lat_lng_elevation_inputs",lat_lng_format:"lat_lng_format",elevation_provider:"elevation_provider",geolocation_provider:"geolocation_provider",map_quest_api_key:"map_quest_api_key",osm_nominatim_api_url:"osm_nominatim_api_url",map_quest_nominatim_api_url:"map_quest_nominatim_api_url",open_elevation_api_url:"open_elevation_api_url",map_quest_elevation_api_url:"map_quest_elevation_api_url",fr_geo_api_url:"fr_geo_api_url",reset:"reset",patchAddress:"patchAddress",setAddress:"setAddress",patchElevation:"patchElevation",patchLngLatDec:"patchLngLatDec",drawMarker:"drawMarker",patchGeometry:"patchGeometry",enabled:"enabled",height:"height",width:"width",inputFocus:"inputFocus"},{location:"location",httpError:"httpError"},[]),Ab=function(t,e,n){return new class extends Xe{constructor(t,e,n){super(),this.moduleType=t,this._bootstrapComponents=e,this._ngModuleDefFactory=n}create(t){!function(){if(pr)return;pr=!0;const t=bn()?{setCurrentNode:Nr,createRootView:fr,createEmbeddedView:gr,createComponentView:yr,createNgModuleRef:vr,overrideProvider:xr,overrideComponentView:Cr,clearOverrides:Lr,checkAndUpdateView:Ir,checkNoChangesView:Pr,destroyView:Mr,createDebugContext:(t,e)=>new qr(t,e),handleEvent:Fr,updateDirectives:zr,updateRenderer:Vr}:{setCurrentNode:()=>{},createRootView:mr,createEmbeddedView:Wo,createComponentView:Yo,createNgModuleRef:ro,overrideProvider:qi,overrideComponentView:qi,clearOverrides:qi,checkAndUpdateView:er,checkNoChangesView:tr,destroyView:rr,createDebugContext:(t,e)=>new qr(t,e),handleEvent:(t,e,n,i)=>t.def.handleEvent(t,e,n,i),updateDirectives:(t,e)=>t.def.updateDirectives(0===e?Sr:Tr,t),updateRenderer:(t,e)=>t.def.updateRenderer(0===e?Sr:Tr,t)};Ui.setCurrentNode=t.setCurrentNode,Ui.createRootView=t.createRootView,Ui.createEmbeddedView=t.createEmbeddedView,Ui.createComponentView=t.createComponentView,Ui.createNgModuleRef=t.createNgModuleRef,Ui.overrideProvider=t.overrideProvider,Ui.overrideComponentView=t.overrideComponentView,Ui.clearOverrides=t.clearOverrides,Ui.checkAndUpdateView=t.checkAndUpdateView,Ui.checkNoChangesView=t.checkNoChangesView,Ui.destroyView=t.destroyView,Ui.resolveDep=To,Ui.createDebugContext=t.createDebugContext,Ui.handleEvent=t.handleEvent,Ui.updateDirectives=t.updateDirectives,Ui.updateRenderer=t.updateRenderer,Ui.dirtyParentQueries=Ro}();const e=ys(this._ngModuleDefFactory);return Ui.createNgModuleRef(this.moduleType,t||Nt.NULL,this._bootstrapComponents,e)}}(la,[],function(t){return function(t){const e={},n=[];let i=!1;for(let s=0;s<t.length;s++){const o=t[s];o.token===Ie&&(i=!0),1073741824&o.flags&&n.push(o.token),o.index=s,e[Ki(o.token)]=o}return{factory:null,providersByKey:e,providers:t,modules:n,isRoot:i}}([Fs(512,We,Ke,[[8,[Bd,Mb]],[3,We],Qe]),Fs(5120,ri,hi,[[3,ri]]),Fs(4608,Ja,tl,[ri,[2,Xa]]),Fs(4608,He,He,[]),Fs(5120,Oe,Re,[]),Fs(5120,ti,ai,[]),Fs(5120,ei,li,[]),Fs(4608,td,ed,[Ol]),Fs(6144,Ri,null,[td]),Fs(4608,Kc,Yc,[]),Fs(5120,xc,function(t,e,n,i,s,o){return[new class extends Lc{constructor(t,e){super(t),this.ngZone=e,this.patchEvent()}patchEvent(){if(!Event||!Event.prototype)return;if(Event.prototype.__zone_symbol__stopImmediatePropagation)return;const t=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[Zc]=!0),t&&t.apply(this,arguments)}}supports(t){return!0}addEventListener(t,e,n){let i=n;if(!t[jc]||rn.isInAngularZone()&&!$c(e))t.addEventListener(e,i,!1);else{let n=Uc[e];n||(n=Uc[e]=Bc("ANGULAR"+e+"FALSE"));let s=t[n];const o=s&&s.length>0;s||(s=t[n]=[]);const r=$c(e)?Zone.root:Zone.current;if(0===s.length)s.push({zone:r,handler:i});else{let t=!1;for(let e=0;e<s.length;e++)if(s[e].handler===i){t=!0;break}t||s.push({zone:r,handler:i})}o||t[jc](e,qc,!1)}return()=>this.removeEventListener(t,e,i)}removeEventListener(t,e,n){let i=t[Hc];if(!i)return t.removeEventListener.apply(t,[e,n,!1]);let s=Uc[e],o=s&&t[s];if(!o)return t.removeEventListener.apply(t,[e,n,!1]);let r=!1;for(let a=0;a<o.length;a++)if(o[a].handler===n){r=!0,o.splice(a,1);break}r?0===o.length&&i.apply(t,[e,qc,!1]):t.removeEventListener.apply(t,[e,n,!1])}}(t,e),new Jc(n),new class extends Lc{constructor(t,e,n){super(t),this._config=e,this.console=n}supports(t){return!(!Wc.hasOwnProperty(t.toLowerCase())&&!this.isCustomEvent(t)||!window.Hammer&&(this.console.warn(`Hammer.js is not loaded, can not bind '${t}' event.`),1))}addEventListener(t,e,n){const i=this.manager.getZone();return e=e.toLowerCase(),i.runOutsideAngular(()=>{const s=this._config.buildHammer(t),o=function(t){i.runGuarded(function(){n(t)})};return s.on(e,o),()=>s.off(e,o)})}isCustomEvent(t){return this._config.events.indexOf(t)>-1}}(i,s,o)]},[Ol,rn,Ol,Ol,Kc,Be]),Fs(4608,Cc,Cc,[xc,rn]),Fs(135680,Sc,Sc,[Ol]),Fs(4608,Oc,Oc,[Cc,Sc]),Fs(5120,xf,Fg,[]),Fs(5120,w_,zg,[]),Fs(4608,sg,Ng,[xf,w_]),Fs(5120,Tn,Vg,[Oc,sg,rn]),Fs(6144,kc,null,[Sc]),Fs(4608,pn,pn,[rn]),Fs(4608,fc,fc,[Ol]),Fs(4608,vc,vc,[Ol]),Fs(4608,ha,Sg,[Tn,dc]),Fs(4608,mp,fp,[Ol,ze,dp]),Fs(4608,_p,_p,[mp,pp]),Fs(5120,rp,function(t){return[t]},[_p]),Fs(4608,up,up,[]),Fs(6144,hp,null,[up]),Fs(4608,cp,cp,[hp]),Fs(6144,Ud,null,[cp]),Fs(4608,Hd,gp,[Ud,Nt]),Fs(4608,sp,sp,[Hd]),Fs(4608,ru,ru,[Yh,Xh,We,su,Qh,Nt,rn,Ol,Su]),Fs(5120,au,lu,[ru]),Fs(5120,Ug,Zg,[ru]),Fs(4608,yd,yd,[]),Fs(5120,ry,ay,[ru]),Fs(4608,xu,xu,[]),Fs(5120,pu,mu,[ru]),Fs(5120,by,wy,[ru]),Fs(4608,Yp,Yp,[]),Fs(4608,Fm,Fm,[]),Fs(1073742336,Dl,Dl,[]),Fs(1024,he,hd,[]),Fs(1024,Ae,function(t){return[function(t){return bc("probe",Ec),bc("coreTokens",Object.assign({},wc,(t||[]).reduce((t,e)=>(t[e.name]=e.token,t),{}))),()=>Ec}(t)]},[[2,wn]]),Fs(512,De,De,[[2,Ae]]),Fs(131584,kn,kn,[rn,Be,Nt,he,We,De]),Fs(1073742336,ui,ui,[kn]),Fs(1073742336,ud,ud,[[3,ud]]),Fs(1073742336,jg,jg,[]),Fs(1073742336,yp,yp,[]),Fs(1073742336,vp,vp,[]),Fs(1073742336,Tu,Tu,[]),Fs(1073742336,Fh,Fh,[]),Fs(1073742336,Ul,Ul,[]),Fs(1073742336,kh,kh,[]),Fs(1073742336,hu,hu,[]),Fs(1073742336,md,md,[[2,pd]]),Fs(1073742336,kd,kd,[]),Fs(1073742336,Td,Td,[]),Fs(1073742336,Nd,Nd,[]),Fs(1073742336,Fy,Fy,[]),Fs(1073742336,Gg,Gg,[]),Fs(1073742336,By,By,[]),Fs(1073742336,Gy,Gy,[]),Fs(1073742336,hy,hy,[]),Fs(1073742336,Jy,Jy,[]),Fs(1073742336,Lu,Lu,[]),Fs(1073742336,Ju,Ju,[]),Fs(1073742336,yu,yu,[]),Fs(1073742336,ev,ev,[]),Fs(1073742336,fv,fv,[]),Fs(1073742336,wv,wv,[]),Fs(1073742336,Ev,Ev,[]),Fs(1073742336,xv,xv,[]),Fs(1073742336,Cy,Cy,[]),Fs(1073742336,Lv,Lv,[]),Fs(1073742336,kv,kv,[]),Fs(1073742336,Um,Um,[]),Fs(1073742336,Zm,Zm,[]),Fs(1073742336,zm,zm,[]),Fs(1073742336,Vm,Vm,[]),Fs(1073742336,Bm,Bm,[]),Fs(1073742336,sf,sf,[]),Fs(1073742336,la,la,[Nt]),Fs(256,Ie,!0,[]),Fs(256,Bg,"BrowserAnimations",[]),Fs(256,dp,"XSRF-TOKEN",[]),Fs(256,pp,"X-XSRF-TOKEN",[]),Fs(256,tv,{separatorKeyCodes:[xa]},[])])})}();(function(){if(yn)throw new Error("Cannot enable prod mode after platform setup.");gn=!1})(),ld().bootstrapModuleFactory(Ab).catch(t=>console.log(t))}},[[2,0]]]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{2:function(t,e,n){t.exports=n("zUnb")},"4R65":function(t,e,n){!function(t){"use strict";var e=Object.freeze;function n(t){var e,n,i,s;for(n=1,i=arguments.length;n<i;n++)for(e in s=arguments[n])t[e]=s[e];return t}Object.freeze=function(t){return t};var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function s(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var o=0;function r(t){return t._leaflet_id=t._leaflet_id||++o,t._leaflet_id}function a(t,e,n){var i,s,o,r;return r=function(){i=!1,s&&(o.apply(n,s),s=!1)},o=function(){i?s=arguments:(t.apply(n,arguments),setTimeout(r,e),i=!0)}}function l(t,e,n){var i=e[1],s=e[0],o=i-s;return t===i&&n?t:((t-s)%o+o)%o+s}function h(){return!1}function u(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return c(t).split(/\s+/)}function p(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function m(t,e,n){var i=[];for(var s in t)i.push(encodeURIComponent(n?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var f=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(f,function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var E=window.requestAnimationFrame||b("RequestAnimationFrame")||x,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,e,n){if(!n||E!==x)return E.call(window,s(t,e));t.call(e)}function S(t){t&&C.call(window,t)}var T=(Object.freeze||Object)({freeze:e,extend:n,create:i,bind:s,lastId:o,stamp:r,throttle:a,wrapNum:l,falseFn:h,formatNum:u,trim:c,splitWords:d,setOptions:p,getParamString:m,template:_,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:E,cancelFn:C,requestAnimFrame:k,cancelAnimFrame:S});function I(){}I.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=e.__super__=this.prototype,o=i(s);for(var r in o.constructor=e,e.prototype=o,this)this.hasOwnProperty(r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),n.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=n(i(o.options),t.options)),n(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},I.include=function(t){return n(this.prototype,t),this},I.mergeOptions=function(t){return n(this.prototype.options,t),this},I.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var P={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var s=0,o=(t=d(t)).length;s<o;s++)this._on(t[s],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var s=0,o=(t=d(t)).length;s<o;s++)this._off(t[s],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(this._events[t]=i=[]),n===this&&(n=void 0);for(var s={fn:e,ctx:n},o=i,r=0,a=o.length;r<a;r++)if(o[r].fn===e&&o[r].ctx===n)return;o.push(s)},_off:function(t,e,n){var i,s,o;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(s=0,o=i.length;s<o;s++){var r=i[s];if(r.ctx===n&&r.fn===e)return r.fn=h,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(s,1)}}else{for(s=0,o=i.length;s<o;s++)i[s].fn=h;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var s=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var r=0,a=o.length;r<a;r++){var l=o[r];l.fn.call(l.ctx||this,s)}this._firingCount--}}return i&&this._propagateEvent(s),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var o=s(function(){this.off(t,e,n).off(t,o,n)},this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};P.addEventListener=P.on,P.removeEventListener=P.clearAllEventListeners=P.off,P.addOneTimeEventListener=P.once,P.fireEvent=P.fire,P.hasEventListeners=P.listens;var M=I.extend(P);function D(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var A=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,e,n){return t instanceof D?t:g(t)?new D(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new D(t.x,t.y):new D(t,e,n)}function R(t,e){if(t)for(var n=e?[t,e]:t,i=0,s=n.length;i<s;i++)this.extend(n[i])}function N(t,e){return!t||t instanceof R?t:new R(t,e)}function F(t,e){if(t)for(var n=e?[t,e]:t,i=0,s=n.length;i<s;i++)this.extend(n[i])}function z(t,e){return t instanceof F?t:new F(t,e)}function V(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function B(t,e,n){return t instanceof V?t:g(t)&&"object"!=typeof t[0]?3===t.length?new V(t[0],t[1],t[2]):2===t.length?new V(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new V(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new V(t,e,n)}D.prototype={clone:function(){return new D(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new D(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new D(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=A(this.x),this.y=A(this.y),this},distanceTo:function(t){var e=(t=O(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},R.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new D(this.min.x,this.max.y)},getTopRight:function(){return new D(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof D?O(t):N(t))instanceof R?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,s=t.max;return s.x>=e.x&&i.x<=n.x&&s.y>=e.y&&i.y<=n.y},overlaps:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,s=t.max;return s.x>e.x&&i.x<n.x&&s.y>e.y&&i.y<n.y},isValid:function(){return!(!this.min||!this.max)}},F.prototype={extend:function(t){var e,n,i=this._southWest,s=this._northEast;if(t instanceof V)e=t,n=t;else{if(!(t instanceof F))return t?this.extend(B(t)||z(t)):this;if(n=t._northEast,!(e=t._southWest)||!n)return this}return i||s?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),s.lat=Math.max(n.lat,s.lat),s.lng=Math.max(n.lng,s.lng)):(this._southWest=new V(e.lat,e.lng),this._northEast=new V(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,s=Math.abs(e.lng-n.lng)*t;return new F(new V(e.lat-i,e.lng-s),new V(n.lat+i,n.lng+s))},getCenter:function(){return new V((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new V(this.getNorth(),this.getWest())},getSouthEast:function(){return new V(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof V||"lat"in t?B(t):z(t);var e,n,i=this._southWest,s=this._northEast;return t instanceof F?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=s.lat&&e.lng>=i.lng&&n.lng<=s.lng},intersects:function(t){t=z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),s=t.getNorthEast();return s.lat>=e.lat&&i.lat<=n.lat&&s.lng>=e.lng&&i.lng<=n.lng},overlaps:function(t){t=z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),s=t.getNorthEast();return s.lat>e.lat&&i.lat<n.lat&&s.lng>e.lng&&i.lng<n.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},V.prototype={equals:function(t,e){return!!t&&(t=B(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,B(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return z([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new V(this.lat,this.lng,this.alt)}};var j={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new R(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new V(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,s=e.lng-n.lng;if(0===i&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new F(new V(o.lat-i,o.lng-s),new V(r.lat-i,r.lng-s))}},H=n({},j,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,s=e.lat*n,o=Math.sin((e.lat-t.lat)*n/2),r=Math.sin((e.lng-t.lng)*n/2),a=o*o+Math.cos(i)*Math.cos(s)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),Z={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),s=Math.sin(i*e);return new D(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new V((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new R([-t,-t],[t,t])}()};function U(t,e,n,i){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function G(t,e,n,i){return new U(t,e,n,i)}U.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new D((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var $=n({},H,{code:"EPSG:3857",projection:Z,transformation:function(){var t=.5/(Math.PI*Z.R);return G(t,.5,-t,.5)}()}),q=n({},$,{code:"EPSG:900913"});function W(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,e){var n,i,s,o,r,a,l="";for(n=0,s=t.length;n<s;n++){for(i=0,o=(r=t[n]).length;i<o;i++)a=r[i],l+=(i?"L":"M")+a.x+" "+a.y;l+=e?kt?"z":"x":""}return l||"M0 0"}var Y=document.documentElement.style,Q="ActiveXObject"in window,X=Q&&!document.addEventListener,J="msLaunchUri"in navigator&&!("documentMode"in document),tt=Tt("webkit"),et=Tt("android"),nt=Tt("android 2")||Tt("android 3"),it=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=et&&Tt("Google")&&it<537&&!("AudioNode"in window),ot=!!window.opera,rt=Tt("chrome"),at=Tt("gecko")&&!tt&&!ot&&!Q,lt=!rt&&Tt("safari"),ht=Tt("phantom"),ut="OTransition"in Y,ct=0===navigator.platform.indexOf("Win"),dt=Q&&"transition"in Y,pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,mt="MozPerspective"in Y,ft=!window.L_DISABLE_3D&&(dt||pt||mt)&&!ut&&!ht,_t="undefined"!=typeof orientation||Tt("mobile"),gt=_t&&tt,yt=_t&&pt,vt=!window.PointerEvent&&window.MSPointerEvent,bt=!(!window.PointerEvent&&!vt),wt=!window.L_NO_TOUCH&&(bt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),xt=_t&&ot,Et=_t&&at,Ct=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=!!document.createElement("canvas").getContext,kt=!(!document.createElementNS||!W("svg").createSVGRect),St=!kt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Tt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var It=(Object.freeze||Object)({ie:Q,ielt9:X,edge:J,webkit:tt,android:et,android23:nt,androidStock:st,opera:ot,chrome:rt,gecko:at,safari:lt,phantom:ht,opera12:ut,win:ct,ie3d:dt,webkit3d:pt,gecko3d:mt,any3d:ft,mobile:_t,mobileWebkit:gt,mobileWebkit3d:yt,msPointer:vt,pointer:bt,touch:wt,mobileOpera:xt,mobileGecko:Et,retina:Ct,canvas:Lt,svg:kt,vml:St}),Pt=vt?"MSPointerDown":"pointerdown",Mt=vt?"MSPointerMove":"pointermove",Dt=vt?"MSPointerUp":"pointerup",At=vt?"MSPointerCancel":"pointercancel",Ot=["INPUT","SELECT","OPTION"],Rt={},Nt=!1,Ft=0;function zt(t){Rt[t.pointerId]=t,Ft++}function Vt(t){Rt[t.pointerId]&&(Rt[t.pointerId]=t)}function Bt(t){delete Rt[t.pointerId],Ft--}function jt(t,e){for(var n in t.touches=[],Rt)t.touches.push(Rt[n]);t.changedTouches=[t],e(t)}var Ht=vt?"MSPointerDown":bt?"pointerdown":"touchstart",Zt=vt?"MSPointerUp":bt?"pointerup":"touchend",Ut="_leaflet_";function Gt(t,e,n){var i,s,o=!1,r=250;function a(t){var e;if(bt){if(!J||"mouse"===t.pointerType)return;e=Ft}else e=t.touches.length;if(!(e>1)){var n=Date.now(),a=n-(i||n);s=t.touches?t.touches[0]:t,o=a>0&&a<=r,i=n}}function l(t){if(o&&!s.cancelBubble){if(bt){if(!J||"mouse"===t.pointerType)return;var n,r,a={};for(r in s)a[r]=(n=s[r])&&n.bind?n.bind(s):n;s=a}s.type="dblclick",e(s),i=null}}return t[Ut+Ht+n]=a,t[Ut+Zt+n]=l,t[Ut+"dblclick"+n]=e,t.addEventListener(Ht,a,!1),t.addEventListener(Zt,l,!1),t.addEventListener("dblclick",e,!1),this}function $t(t,e){var n=t[Ut+Zt+e],i=t[Ut+"dblclick"+e];return t.removeEventListener(Ht,t[Ut+Ht+e],!1),t.removeEventListener(Zt,n,!1),J||t.removeEventListener("dblclick",i,!1),this}var qt,Wt,Kt,Yt,Qt,Xt=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),te="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function ee(t){return"string"==typeof t?document.getElementById(t):t}function ne(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ie(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function se(t){var e=t.parentNode;e&&e.removeChild(t)}function oe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function re(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ae(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function le(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=de(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function he(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,s=n.length;i<s;i++)t.classList.add(n[i]);else if(!le(t,e)){var o=de(t);ce(t,(o?o+" ":"")+e)}}function ue(t,e){void 0!==t.classList?t.classList.remove(e):ce(t,c((" "+de(t)+" ").replace(" "+e+" "," ")))}function ce(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function de(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function fe(t,e,n){var i=e||new D(0,0);t.style[Xt]=(dt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function _e(t,e){t._leaflet_pos=e,ft?fe(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ge(t){return t._leaflet_pos||new D(0,0)}if("onselectstart"in document)qt=function(){ke(window,"selectstart",Oe)},Wt=function(){Te(window,"selectstart",Oe)};else{var ye=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);qt=function(){if(ye){var t=document.documentElement.style;Kt=t[ye],t[ye]="none"}},Wt=function(){ye&&(document.documentElement.style[ye]=Kt,Kt=void 0)}}function ve(){ke(window,"dragstart",Oe)}function be(){Te(window,"dragstart",Oe)}function we(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(xe(),Yt=t,Qt=t.style.outline,t.style.outline="none",ke(window,"keydown",xe))}function xe(){Yt&&(Yt.style.outline=Qt,Yt=void 0,Qt=void 0,Te(window,"keydown",xe))}function Ee(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ce(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Le=(Object.freeze||Object)({TRANSFORM:Xt,TRANSITION:Jt,TRANSITION_END:te,get:ee,getStyle:ne,create:ie,remove:se,empty:oe,toFront:re,toBack:ae,hasClass:le,addClass:he,removeClass:ue,setClass:ce,getClass:de,setOpacity:pe,testProp:me,setTransform:fe,setPosition:_e,getPosition:ge,disableTextSelection:qt,enableTextSelection:Wt,disableImageDrag:ve,enableImageDrag:be,preventOutline:we,restoreOutline:xe,getSizedParentNode:Ee,getScale:Ce});function ke(t,e,n,i){if("object"==typeof e)for(var s in e)Ie(t,s,e[s],n);else for(var o=0,r=(e=d(e)).length;o<r;o++)Ie(t,e[o],n,i);return this}var Se="_leaflet_events";function Te(t,e,n,i){if("object"==typeof e)for(var s in e)Pe(t,s,e[s],n);else if(e)for(var o=0,r=(e=d(e)).length;o<r;o++)Pe(t,e[o],n,i);else{for(var a in t[Se])Pe(t,a,t[Se][a]);delete t[Se]}return this}function Ie(t,e,n,i){var o=e+r(n)+(i?"_"+r(i):"");if(t[Se]&&t[Se][o])return this;var a=function(e){return n.call(i||t,e||window.event)},l=a;bt&&0===e.indexOf("touch")?function(t,e,n,i){"touchstart"===e?function(t,e,n){var i=s(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Ot.indexOf(t.target.tagName)<0))return;Oe(t)}jt(t,e)});t["_leaflet_touchstart"+n]=i,t.addEventListener(Pt,i,!1),Nt||(document.documentElement.addEventListener(Pt,zt,!0),document.documentElement.addEventListener(Mt,Vt,!0),document.documentElement.addEventListener(Dt,Bt,!0),document.documentElement.addEventListener(At,Bt,!0),Nt=!0)}(t,n,i):"touchmove"===e?function(t,e,n){var i=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&jt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(Mt,i,!1)}(t,n,i):"touchend"===e&&function(t,e,n){var i=function(t){jt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Dt,i,!1),t.addEventListener(At,i,!1)}(t,n,i)}(t,e,a,o):!wt||"dblclick"!==e||!Gt||bt&&rt?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,Ze(t,e)&&l(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1)):("click"===e&&et&&(a=function(t){!function(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=Ve&&n-Ve;i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?Re(t):(Ve=n,e(t))}(t,l)}),t.addEventListener(e,a,!1)):"attachEvent"in t&&t.attachEvent("on"+e,a):Gt(t,a,o),t[Se]=t[Se]||{},t[Se][o]=a}function Pe(t,e,n,i){var s=e+r(n)+(i?"_"+r(i):""),o=t[Se]&&t[Se][s];if(!o)return this;bt&&0===e.indexOf("touch")?function(t,e,n){var i=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(Pt,i,!1):"touchmove"===e?t.removeEventListener(Mt,i,!1):"touchend"===e&&(t.removeEventListener(Dt,i,!1),t.removeEventListener(At,i,!1))}(t,e,s):!wt||"dblclick"!==e||!$t||bt&&rt?"removeEventListener"in t?t.removeEventListener("mousewheel"===e?"onwheel"in t?"wheel":"mousewheel":"mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,o,!1):"detachEvent"in t&&t.detachEvent("on"+e,o):$t(t,s),t[Se][s]=null}function Me(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,He(t),this}function De(t){return Ie(t,"mousewheel",Me),this}function Ae(t){return ke(t,"mousedown touchstart dblclick",Me),Ie(t,"click",je),this}function Oe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Re(t){return Oe(t),Me(t),this}function Ne(t,e){if(!e)return new D(t.clientX,t.clientY);var n=Ce(e),i=n.boundingClientRect;return new D((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Fe=ct&&rt?2*window.devicePixelRatio:at?window.devicePixelRatio:1;function ze(t){return J?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Fe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ve,Be={};function je(t){Be[t.type]=!0}function He(t){var e=Be[t.type];return Be[t.type]=!1,e}function Ze(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Ue=(Object.freeze||Object)({on:ke,off:Te,stopPropagation:Me,disableScrollPropagation:De,disableClickPropagation:Ae,preventDefault:Oe,stop:Re,getMousePosition:Ne,getWheelDelta:ze,fakeStop:je,skipped:He,isExternalTarget:Ze,addListener:ke,removeListener:Te}),Ge=M.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=ge(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=k(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),_e(this._el,n),this.fire("step")},_complete:function(){S(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),$e=M.extend({options:{crs:$,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(B(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Jt&&ft&&!xt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ke(this._proxy,te,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(B(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t=t||(ft?this.options.zoomDelta:1)),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t=t||(ft?this.options.zoomDelta:1)),e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),s=this.getSize().divideBy(2),o=(t instanceof D?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/i),r=this.containerPointToLatLng(s.add(o));return this.setView(r,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():z(t);var n=O(e.paddingTopLeft||e.padding||[0,0]),i=O(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,n.add(i));if((s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=i.subtract(n).divideBy(2),r=this.project(t.getSouthWest(),s),a=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(a).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,e){if(!(t=z(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=O(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ge,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){he(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!ft)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),r=this._zoom;t=B(t),e=void 0===e?r:e;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(r,e),h=s.distanceTo(i)||1,u=2.0164;function c(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=c(0),f=Date.now(),_=(c(1)-m)/1.42,g=n.duration?1e3*n.duration:1e3*_*.8;return this._moveStart(!0,n.noMoveStart),(function n(){var o=(Date.now()-f)/g,l=function(t){return 1-Math.pow(1-t,1.5)}(o)*_;o<=1?(this._flyToFrame=k(n,this),this._move(this.unproject(i.add(s.subtract(i).multiplyBy(function(t){return a*(p(m)*function(t){return d(t)/p(t)}(m+1.42*t)-d(m))/u}(l)/h)),r),this.getScaleZoom(a/function(t){return a*(p(m)/p(m+1.42*t))}(l),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}).call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,z(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=O((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=O(e.paddingBottomRight||e.padding||[0,0]),s=this.getCenter(),o=this.project(s),r=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),h=N([a.min.add(n),a.max.subtract(i)]);if(!h.contains(r)){this._enforcingBounds=!0;var u=o.subtract(r),c=O(r.x+u.x,r.y+u.y);(r.x<h.min.x||r.x>h.max.x)&&(c.x=o.x-u.x,u.x>0?c.x+=l.x-n.x:c.x-=l.x-i.x),(r.y<h.min.y||r.y>h.max.y)&&(c.y=o.y-u.y,u.y>0?c.y+=l.y-n.y:c.y-=l.y-i.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),r=i.divideBy(2).round(),a=o.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=s(this._handleGeolocationResponse,this),i=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new V(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var s=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(s,i.maxZoom):s)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),se(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(S(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)se(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ie("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=z(t),n=O(n||[0,0]);var i=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),h=N(this.project(a,i),this.project(r,i)).getSize(),u=ft?this.options.zoomSnap:1,c=l.x/h.x,d=l.y/h.y,p=e?Math.max(c,d):Math.min(c,d);return i=this.getScaleZoom(p,i),u&&(i=Math.round(i/(u/100))*(u/100),i=e?Math.ceil(i/u)*u:Math.floor(i/u)*u),Math.max(s,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new D(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new R(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs,i=n.zoom(t*n.scale(e=void 0===e?this._zoom:e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(B(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){var e=O(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(B(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(B(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(z(t))},distance:function(t,e){return this.options.crs.distance(B(t),B(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(B(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ee(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ke(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ft,he(t,"leaflet-container"+(wt?" leaflet-touch":"")+(Ct?" leaflet-retina":"")+(X?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ne(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),_e(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(he(t.markerPane,"leaflet-zoom-hide"),he(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){_e(this._mapPane,new D(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return S(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){_e(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Te:ke;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),ft&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){S(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],s="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,a=!1;o;){if((n=this._targets[r(o)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(s&&!Ze(o,t))break;if(i.push(n),s)break}if(o===this._container)break;o=o.parentNode}return i.length||a||s||!Ze(o,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!He(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||we(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var s=n({},t);s.type="preclick",this._fireDOMEvent(s,s.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var o=i[0];"contextmenu"===e&&o.listens(e,!0)&&Oe(t);var r={originalEvent:t};if("keypress"!==t.type){var a=o.getLatLng&&(!o._radius||o._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?o.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,r,!0),r.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ge(this._mapPane)||new D(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),s=this.getSize().divideBy(2),o=new R(i.subtract(s),i.add(s)),r=this._getBoundsOffset(o,n,e);return r.round().equals([0,0])?t:this.unproject(i.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new R(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),s=i.min.subtract(t.min),o=i.max.subtract(t.max);return new D(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=ft?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ue(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=ie("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Xt,n=this._proxy.style[e];fe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();fe(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){se(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(s)||(k(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,he(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ue(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),k(function(){this._moveEnd(!0)},this))}}),qe=I.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return he(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this},remove:function(){return this._map?(se(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),We=function(t){return new qe(t)};$e.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=ie("div",e+"control-container",this._container);function i(i,s){t[i+s]=ie("div",e+i+" "+e+s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)se(this._controlCorners[t]);se(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ke=qe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return qe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){he(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(he(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ue(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ue(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ie("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ae(e),De(e);var i=this._section=ie("section",t+"-list");n&&(this._map.on("click",this.collapse,this),et||ke(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var s=this._layersLink=ie("a",t+"-toggle",e);s.href="#",s.title="Layers",wt?(ke(s,"click",Re),ke(s,"click",this.expand,this)):ke(s,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ie("div",t+"-base",i),this._separator=ie("div",t+"-separator",i),this._overlaysList=ie("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(s(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;oe(this._baseLayersList),oe(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,s=0;for(n=0;n<this._layers.length;n++)this._addItem(i=this._layers[n]),e=e||i.overlay,t=t||!i.overlay,s+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&s>1)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers",i),this._layerControlInputs.push(e),e.layerId=r(t.layer),ke(e,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var o=document.createElement("div");return n.appendChild(o),o.appendChild(e),o.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],s=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)e=this._getLayer((t=n[o]).layerId).layer,t.checked?i.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])||this._map.addLayer(i[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),s=n.length-1;s>=0;s--)e=this._getLayer((t=n[s]).layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Ye=qe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ie("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,s){var o=ie("a",n,i);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Ae(o),ke(o,"click",Re),ke(o,"click",s,this),ke(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ue(this._zoomInButton,e),ue(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&he(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&he(this._zoomInButton,e)}});$e.mergeOptions({zoomControl:!0}),$e.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ye,this.addControl(this.zoomControl))});var Qe=qe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=ie("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ie("div",e,n)),t.imperial&&(this._iScale=ie("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n,i,s=3.2808399*t;s>5280?(n=this._getRoundNum(e=s/5280),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(s),this._updateScale(this._iScale,i+" ft",i/s))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Xe=qe.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ie("div","leaflet-control-attribution"),Ae(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});$e.mergeOptions({attributionControl:!0}),$e.addInitHook(function(){this.options.attributionControl&&(new Xe).addTo(this)}),qe.Layers=Ke,qe.Zoom=Ye,qe.Scale=Qe,qe.Attribution=Xe,We.layers=function(t,e,n){return new Ke(t,e,n)},We.zoom=function(t){return new Ye(t)},We.scale=function(t){return new Qe(t)},We.attribution=function(t){return new Xe(t)};var Je=I.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Je.addTo=function(t,e){return t.addHandler(e,this),this};var tn,en={Events:P},nn=wt?"touchstart mousedown":"mousedown",sn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},on={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},rn=M.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(ke(this._dragStartTarget,nn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(rn._dragging===this&&this.finishDrag(),Te(this._dragStartTarget,nn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!le(this._element,"leaflet-zoom-anim")&&!(rn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(rn._dragging=this,this._preventOutline&&we(this._element),ve(),qt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ee(this._element);this._startPoint=new D(e.clientX,e.clientY),this._parentScale=Ce(n),ke(document,on[t.type],this._onMove,this),ke(document,sn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new D(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Oe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ge(this._element).subtract(n),he(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),he(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,S(this._animRequest),this._lastEvent=t,this._animRequest=k(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),_e(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ue(document.body,"leaflet-dragging"),this._lastTarget&&(ue(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),on)Te(document,on[t],this._onMove,this),Te(document,sn[t],this._onUp,this);be(),Wt(),this._moved&&this._moving&&(S(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,rn._dragging=!1}});function an(t,e){if(!e||!t.length)return t.slice();var n=e*e;return function(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,function t(e,n,i,s,o){var r,a,l,h=0;for(a=s+1;a<=o-1;a++)(l=pn(e[a],e[s],e[o],!0))>h&&(r=a,h=l);h>i&&(n[r]=1,t(e,n,i,s,r),t(e,n,i,r,o))}(t,i,e,0,n-1);var s,o=[];for(s=0;s<n;s++)i[s]&&o.push(t[s]);return o}(t=function(t,e){for(var n=[t[0]],i=1,s=0,o=t.length;i<o;i++)dn(t[i],t[s])>e&&(n.push(t[i]),s=i);return s<o-1&&n.push(t[o-1]),n}(t,n),n)}function ln(t,e,n){return Math.sqrt(pn(t,e,n,!0))}function hn(t,e,n,i,s){var o,r,a,l=i?tn:cn(t,n),h=cn(e,n);for(tn=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=cn(r=un(t,e,o=l||h,n,s),n),o===l?(t=r,l=a):(e=r,h=a)}}function un(t,e,n,i,s){var o,r,a=e.x-t.x,l=e.y-t.y,h=i.min,u=i.max;return 8&n?(o=t.x+a*(u.y-t.y)/l,r=u.y):4&n?(o=t.x+a*(h.y-t.y)/l,r=h.y):2&n?(o=u.x,r=t.y+l*(u.x-t.x)/a):1&n&&(o=h.x,r=t.y+l*(h.x-t.x)/a),new D(o,r,s)}function cn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function dn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function pn(t,e,n,i){var s,o=e.x,r=e.y,a=n.x-o,l=n.y-r,h=a*a+l*l;return h>0&&((s=((t.x-o)*a+(t.y-r)*l)/h)>1?(o=n.x,r=n.y):s>0&&(o+=a*s,r+=l*s)),a=t.x-o,l=t.y-r,i?a*a+l*l:new D(o,r)}function mn(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function fn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mn(t)}var _n=(Object.freeze||Object)({simplify:an,pointToSegmentDistance:ln,closestPointOnSegment:function(t,e,n){return pn(t,e,n)},clipSegment:hn,_getEdgeIntersection:un,_getBitCode:cn,_sqClosestPointOnSegment:pn,isFlat:mn,_flat:fn});function gn(t,e,n){var i,s,o,r,a,l,h,u,c,d=[1,4,2,8];for(s=0,h=t.length;s<h;s++)t[s]._code=cn(t[s],e);for(r=0;r<4;r++){for(u=d[r],i=[],s=0,o=(h=t.length)-1;s<h;o=s++)l=t[o],(a=t[s])._code&u?l._code&u||((c=un(l,a,u,e,n))._code=cn(c,e),i.push(c)):(l._code&u&&((c=un(l,a,u,e,n))._code=cn(c,e),i.push(c)),i.push(a));t=i}return t}var yn=(Object.freeze||Object)({clipPolygon:gn}),vn={project:function(t){return new D(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new R([-180,-90],[180,90])},bn={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=o*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-r)/(1+r),o/2);return i=-n*Math.log(Math.max(a,1e-10)),new D(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=o*Math.sin(a),e=Math.pow((1-e)/(1+e),o/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new V(a*n,t.x*n/i)}},wn=(Object.freeze||Object)({LonLat:vn,Mercator:bn,SphericalMercator:Z}),xn=n({},H,{code:"EPSG:3395",projection:bn,transformation:function(){var t=.5/(Math.PI*bn.R);return G(t,.5,-t,.5)}()}),En=n({},H,{code:"EPSG:4326",projection:vn,transformation:G(1/180,1,-1/180,.5)}),Cn=n({},j,{projection:vn,transformation:G(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});j.Earth=H,j.EPSG3395=xn,j.EPSG3857=$,j.EPSG900913=q,j.EPSG4326=En,j.Simple=Cn;var Ln=M.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});$e.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var s=this._zoomBoundLayers[i].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),e=void 0===s.maxZoom?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var kn=Ln.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r(t)}}),Sn=kn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),kn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),kn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new F;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Tn=I.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var s=O(i),o=O("shadow"===e&&n.shadowAnchor||n.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ct&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),In=Tn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return In.imagePath||(In.imagePath=this._detectIconPath()),(this.options.imagePath||In.imagePath)+Tn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ie("div","leaflet-default-icon-path",document.body),e=ne(t,"background-image")||ne(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Pn=Je.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new rn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),he(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ue(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=ge(e._icon),r=n.getPixelBounds(),a=n.getPixelOrigin(),l=N(r.min._subtract(a).add(s),r.max._subtract(a).subtract(s));if(!l.contains(o)){var h=O((Math.max(l.max.x,o.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(i);n.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),_e(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=k(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(S(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=ge(e._icon),s=e._map.layerPointToLatLng(i);n&&_e(n,i),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){S(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Mn=Ln.extend({options:{icon:new In,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=B(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=B(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),he(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(he(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),se(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&se(this._shadow),this._shadow=null},_setPos:function(t){_e(this._icon,t),this._shadow&&_e(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(he(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Pn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Pn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;pe(this._icon,t),this._shadow&&pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Dn=Ln.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),An=Dn.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=B(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=B(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Dn.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new R(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),On=An.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),p(this,e),this._latlng=B(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Dn.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,r=n.project([e+o,t]),a=n.project([e-o,t]),l=r.add(a).divideBy(2),h=n.unproject(l).lat,u=Math.acos((Math.cos(o*s)-Math.sin(e*s)*Math.sin(h*s))/(Math.cos(e*s)*Math.cos(h*s)))/s;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([h,t-u]).x,this._radiusY=l.y-r.y}else{var c=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(c).x}this._updateBounds()}}),Rn=Dn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,s=null,o=pn,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,u=l.length;h<u;h++){var c=o(t,e=l[h-1],n=l[h],!0);c<i&&(i=c,s=o(t,e,n))}return s&&(s.distance=Math.sqrt(i)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,s,o,r,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<l-1;t++)if((i+=n=(s=a[t]).distanceTo(o=a[t+1]))>e)return this._map.layerPointToLatLng([o.x-(r=(i-e)/n)*(o.x-s.x),o.y-r*(o.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=B(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new F,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return mn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=mn(t),i=0,s=t.length;i<s;i++)n?(e[i]=B(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new R;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),n=new D(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(n),t.max._add(n),this._pxBounds=t)},_projectLatlngs:function(t,e,n){var i,s,o=t.length;if(t[0]instanceof V){for(s=[],i=0;i<o;i++)s[i]=this._map.latLngToLayerPoint(t[i]),n.extend(s[i]);e.push(s)}else for(i=0;i<o;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,s,o,r,a,l=this._parts;for(e=0,i=0,s=this._rings.length;e<s;e++)for(n=0,o=(a=this._rings[e]).length;n<o-1;n++)(r=hn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(r[0]),r[1]===a[n+1]&&n!==o-2||(l[i].push(r[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=an(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,s,o,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(i=0,s=(r=(a=this._parts[n]).length)-1;i<r;s=i++)if((e||0!==i)&&ln(t,a[s],a[i])<=l)return!0;return!1}});Rn._flat=fn;var Nn=Rn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,s,o,r,a,l=this._rings[0],h=l.length;if(!h)return null;for(o=r=a=0,t=0,e=h-1;t<h;e=t++)r+=((n=l[t]).x+(i=l[e]).x)*(s=n.y*i.x-i.y*n.x),a+=(n.y+i.y)*s,o+=3*s;return this._map.layerPointToLatLng(0===o?l[0]:[r/o,a/o])},_convertLatLngs:function(t){var e=Rn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof V&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Rn.prototype._setLatLngs.call(this,t),mn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new D(e,e);if(t=new R(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,s=0,o=this._rings.length;s<o;s++)(i=gn(this._rings[s],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,s,o,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,a=this._parts.length;s<a;s++)for(o=0,r=(l=(e=this._parts[s]).length)-1;o<l;r=o++)(n=e[o]).y>t.y!=(i=e[r]).y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(h=!h);return h||Rn.prototype._containsPoint.call(this,t,!0)}}),Fn=Sn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,s=g(t)?t:t.features;if(s){for(e=0,n=s.length;e<n;e++)((i=s[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=zn(t,o);return r?(r.feature=Un(t),r.defaultOptions=r.options,this.resetStyle(r),o.onEachFeature&&o.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}});function zn(t,e){var n,i,s,o,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Vn;if(!a&&!r)return null;switch(r.type){case"Point":return n=u(a),h?h(t,n):new Mn(n);case"MultiPoint":for(s=0,o=a.length;s<o;s++)n=u(a[s]),l.push(h?h(t,n):new Mn(n));return new Sn(l);case"LineString":case"MultiLineString":return i=Bn(a,"LineString"===r.type?0:1,u),new Rn(i,e);case"Polygon":case"MultiPolygon":return i=Bn(a,"Polygon"===r.type?1:2,u),new Nn(i,e);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var c=zn({geometry:r.geometries[s],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Sn(l);default:throw new Error("Invalid GeoJSON object.")}}function Vn(t){return new V(t[1],t[0],t[2])}function Bn(t,e,n){for(var i,s=[],o=0,r=t.length;o<r;o++)i=e?Bn(t[o],e-1,n):(n||Vn)(t[o]),s.push(i);return s}function jn(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Hn(t,e,n,i){for(var s=[],o=0,r=t.length;o<r;o++)s.push(e?Hn(t[o],e-1,n,i):jn(t[o],i));return!e&&n&&s.push(s[0]),s}function Zn(t,e){return t.feature?n({},t.feature,{geometry:e}):Un(e)}function Un(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Gn={toGeoJSON:function(t){return Zn(this,{type:"Point",coordinates:jn(this.getLatLng(),t)})}};function $n(t,e){return new Fn(t,e)}Mn.include(Gn),On.include(Gn),An.include(Gn),Rn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=Hn(this._latlngs,e?1:0,!1,t);return Zn(this,{type:(e?"Multi":"")+"LineString",coordinates:n})}}),Nn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=e&&!mn(this._latlngs[0]),i=Hn(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Zn(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),kn.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),Zn(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer(function(e){if(e.toGeoJSON){var s=e.toGeoJSON(t);if(n)i.push(s.geometry);else{var o=Un(s);"FeatureCollection"===o.type?i.push.apply(i,o.features):i.push(o)}}}),n?Zn(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var qn=$n,Wn=Ln.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=z(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(he(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){se(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&re(this._image),this},bringToBack:function(){return this._map&&ae(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ie("img");he(e,"leaflet-image-layer"),this._zoomAnimated&&he(e,"leaflet-zoom-animated"),this.options.className&&he(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=s(this.fire,this,"load"),e.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;fe(this._image,n,e)},_reset:function(){var t=this._image,e=new R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();_e(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Kn=Wn.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ie("video");if(he(e,"leaflet-image-layer"),this._zoomAnimated&&he(e,"leaflet-zoom-animated"),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=s(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var r=0;r<this._url.length;r++){var a=ie("source");a.src=this._url[r],e.appendChild(a)}}}}),Yn=Ln.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){p(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&pe(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(pe(this._container,0),this._removeTimeout=setTimeout(s(se,void 0,this._container),200)):se(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=B(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&re(this._container),this},bringToBack:function(){return this._map&&ae(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=O(this.options.offset),n=this._getAnchor();this._zoomAnimated?_e(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),Qn=Yn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Yn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Dn||this._source.on("preclick",Me))},onRemove:function(t){Yn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Dn||this._source.off("preclick",Me))},getEvents:function(){var t=Yn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ie("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ie("div",t+"-content-wrapper",e);if(this._contentNode=ie("div",t+"-content",n),Ae(n),De(this._contentNode),ke(n,"contextmenu",Me),this._tipContainer=ie("div",t+"-tip-container",e),this._tip=ie("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ie("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",ke(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=this.options.maxHeight;i&&t.offsetHeight>i?(e.height=i+"px",he(t,"leaflet-popup-scrolled")):ue(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();_e(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ne(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,s=new D(this._containerLeft,-n-this._containerBottom);s._add(ge(this._container));var o=t.layerPointToContainerPoint(s),r=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||r),l=O(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),u=0,c=0;o.x+i+l.x>h.x&&(u=o.x+i-h.x+l.x),o.x-u-a.x<0&&(u=o.x-a.x),o.y+n+l.y>h.y&&(c=o.y+n-h.y+l.y),o.y-c-a.y<0&&(c=o.y-a.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),Re(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});$e.mergeOptions({closePopupOnClick:!0}),$e.include({openPopup:function(t,e,n){return t instanceof Qn||(t=new Qn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Ln.include({bindPopup:function(t,e){return t instanceof Qn?(p(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Qn(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof Ln||(e=t,t=this),t instanceof Sn)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Re(t),e instanceof Dn?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Xn=Yn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Yn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Yn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Yn.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){this._contentNode=this._container=ie("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,i=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),o=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,l=O(this.options.offset),h=this._getAnchor();"top"===o?t=t.add(O(-r/2+l.x,-a+l.y+h.y,!0)):"bottom"===o?t=t.subtract(O(r/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(O(r/2+l.x,a/2-h.y+l.y,!0)):"right"===o||"auto"===o&&s.x<i.x?(o="right",t=t.add(O(l.x+h.x,h.y-a/2+l.y,!0))):(o="left",t=t.subtract(O(r+h.x-l.x,a/2-h.y-l.y,!0))),ue(n,"leaflet-tooltip-right"),ue(n,"leaflet-tooltip-left"),ue(n,"leaflet-tooltip-top"),ue(n,"leaflet-tooltip-bottom"),he(n,"leaflet-tooltip-"+o),_e(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});$e.include({openTooltip:function(t,e,n){return t instanceof Xn||(t=new Xn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Ln.include({bindTooltip:function(t,e){return t instanceof Xn?(p(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Xn(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),wt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof Ln||(e=t,t=this),t instanceof Sn)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(he(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ue(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){this._tooltip&&this._map&&this.openTooltip(t.layer||t.target,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Jn=Tn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=O(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Tn.Default=In;var ti=Ln.extend({options:{tileSize:256,opacity:1,updateWhenIdle:_t,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),se(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(re(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ae(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof D?t:new D(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),s=0,o=n.length;s<o;s++)e=n[s].style.zIndex,n[s]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!X){pe(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var s=this._tiles[i];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);pe(s.el,o),o<1?e=!0:(s.active?n=!0:this._onOpaqueTile(s),s.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(S(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=ie("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(se(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],s=this._map;return i||((i=this._levels[t]={}).el=ie("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,s.getCenter(),s.getZoom()),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)se(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var s=Math.floor(t/2),o=Math.floor(e/2),r=n-1,a=new D(+s,+o);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>i&&this._retainParent(s,o,r,i))},_retainChildren:function(t,e,n,i){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var r=new D(s,o);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(s,o,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var s=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom)&&(s=void 0),i&&!(this.options.updateWhenZooming&&s!==this._tileZoom)||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),s=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();ft?fe(t.el,s,i):_e(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),s=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*i);return new R(s.subtract(o),s.add(o))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(i),o=s.getCenter(),r=[],a=this.options.keepBuffer,l=new R(s.getBottomLeft().subtract([a,-a]),s.getTopRight().add([a,-a]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var u=this._tiles[h].coords;u.z===this._tileZoom&&l.contains(new D(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var c=s.min.y;c<=s.max.y;c++)for(var d=s.min.x;d<=s.max.x;d++){var p=new D(d,c);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return z(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),s=i.add(n);return[e.unproject(i,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new F(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new D(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(se(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){he(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,X&&this.options.opacity<1&&pe(t,this.options.opacity),et&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&k(s(this._tileReady,this,t,null,o)),_e(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(pe(n.el,0),S(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(he(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),X||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new D(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new R(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),ei=ti.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Ct&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),et||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ke(n,"load",s(this._tileOnLoad,this,e,n)),ke(n,"error",s(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ct?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){X?setTimeout(s(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=v,se(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return st||e.el.setAttribute("src",v),ti.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return ti.prototype._tileReady.call(this,t,e,n)}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var s in e)s in this.options||(i[s]=e[s]);var o=(e=p(this,e)).detectRetina&&Ct?2:1,r=this.getTileSize();i.width=r.x*o,i.height=r.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,ei.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=N(n.project(e[0]),n.project(e[1])),s=i.min,o=i.max,r=(this._wmsVersion>=1.3&&this._crs===En?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),a=ei.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});ei.WMS=ii,ni.wms=function(t,e){return new ii(t,e)};var si=Ln.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&he(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=ge(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=this._map.project(t,e).subtract(o),a=s.multiplyBy(-n).add(i).add(s).subtract(r);ft?fe(this._container,a,n):_e(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new R(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),oi=si.extend({getEvents:function(){var t=si.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){si.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ke(t,"mousemove",a(this._onMouseMove,32,this),this),ke(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ke(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){S(this._redrawRequest),delete this._ctx,se(this._container),Te(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){si.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ct?2:1;_e(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ct&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){si.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),s=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;s.push(e)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,s,o,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,s=r[n].length;i<s;i++)o=r[n][i],l[i?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==s&&(n.save(),n.scale(1,s)),n.beginPath(),n.arc(e.x,e.y/s,i,0,2*Math.PI,!1),1!==s&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(i)&&!this._map._draggableMoved(e)&&(n=e);n&&(je(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ue(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var n,i,s=this._drawFirst;s;s=s.next)(n=s.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(he(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function ri(t){return Lt?new oi(t):null}var ai=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),li={_initContainer:function(){this._container=ie("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(si.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=ai("shape");he(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=ai("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;se(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,s=t._container;s.stroked=!!i.stroke,s.filled=!!i.fill,i.stroke?(e||(e=t._stroke=ai("stroke")),s.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,e.dashStyle=i.dashArray?g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(s.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=ai("fill")),s.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(s.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){re(t._container)},_bringToBack:function(t){ae(t._container)}},hi=St?ai:W,ui=si.extend({getEvents:function(){var t=si.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=hi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=hi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){se(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){si.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),_e(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=hi("path");t.options.className&&he(e,t.options.className),t.options.interactive&&he(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){se(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,K(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){re(t._path)},_bringToBack:function(t){ae(t._path)}});function ci(t){return kt||St?new ui(t):null}St&&ui.include(li),$e.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ri(t)||ci(t)}});var di=Nn.extend({initialize:function(t,e){Nn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});ui.create=hi,ui.pointsToPath=K,Fn.geometryToLayer=zn,Fn.coordsToLatLng=Vn,Fn.coordsToLatLngs=Bn,Fn.latLngToCoords=jn,Fn.latLngsToCoords=Hn,Fn.getFeature=Zn,Fn.asFeature=Un,$e.mergeOptions({boxZoom:!0});var pi=Je.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){se(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),qt(),ve(),this._startPoint=this._map.mouseEventToContainerPoint(t),ke(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ie("div","leaflet-zoom-box",this._container),he(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new R(this._point,this._startPoint),n=e.getSize();_e(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(se(this._box),ue(this._container,"leaflet-crosshair")),Wt(),be(),Te(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});$e.addInitHook("addHandler","boxZoom",pi),$e.mergeOptions({doubleClickZoom:!0});var mi=Je.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,s=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});$e.addInitHook("addHandler","doubleClickZoom",mi),$e.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var fi=Je.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new rn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}he(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ue(this._map._container,"leaflet-grab"),ue(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=z(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,s=(i-e+n)%t+e-n,o=(i+e+n)%t-e-n,r=Math.abs(s+n)<Math.abs(o+n)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=n.easeLinearity,r=s.multiplyBy(o/((this._lastTime-this._times[0])/1e3)),a=r.distanceTo([0,0]),l=Math.min(n.inertiaMaxSpeed,a),h=r.multiplyBy(l/a),u=l/(n.inertiaDeceleration*o),c=h.multiplyBy(-u/2).round();c.x||c.y?(c=e._limitOffset(c,e.options.maxBounds),k(function(){e.panBy(c,{duration:u,easeLinearity:o,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});$e.addInitHook("addHandler","dragging",fi),$e.mergeOptions({keyboard:!0,keyboardPanDelta:80});var _i=Je.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ke(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Te(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},s=this.keyCodes;for(e=0,n=s.left.length;e<n;e++)i[s.left[e]]=[-1*t,0];for(e=0,n=s.right.length;e<n;e++)i[s.right[e]]=[t,0];for(e=0,n=s.down.length;e<n;e++)i[s.down[e]]=[0,t];for(e=0,n=s.up.length;e<n;e++)i[s.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},s=this.keyCodes;for(e=0,n=s.zoomIn.length;e<n;e++)i[s.zoomIn[e]]=t;for(e=0,n=s.zoomOut.length;e<n;e++)i[s.zoomOut[e]]=-t},_addHooks:function(){ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Te(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=O(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Re(t)}}});$e.addInitHook("addHandler","keyboard",_i),$e.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var gi=Je.extend({addHooks:function(){ke(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Te(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ze(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),i),Re(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,s=n?Math.ceil(i/n)*n:i,o=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))}});$e.addInitHook("addHandler","scrollWheelZoom",gi),$e.mergeOptions({tap:!0,tapTolerance:15});var yi=Je.extend({addHooks:function(){ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Oe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new D(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&he(n,"leaflet-active"),this._holdTimeout=setTimeout(s(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),ke(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Te(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ue(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new D(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});wt&&!bt&&$e.addInitHook("addHandler","tap",yi),$e.mergeOptions({touchZoom:wt&&!nt,bounceAtZoomLimits:!0});var vi=Je.extend({addHooks:function(){he(this._map._container,"leaflet-touch-zoom"),ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ue(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ke(document,"touchmove",this._onTouchMove,this),ke(document,"touchend",this._onTouchEnd,this),Oe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),S(this._animRequest);var a=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=k(a,this,!0),Oe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,S(this._animRequest),Te(document,"touchmove",this._onTouchMove),Te(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});$e.addInitHook("addHandler","touchZoom",vi),$e.BoxZoom=pi,$e.DoubleClickZoom=mi,$e.Drag=fi,$e.Keyboard=_i,$e.ScrollWheelZoom=gi,$e.Tap=yi,$e.TouchZoom=vi,Object.freeze=e,t.version="1.4.0",t.Control=qe,t.control=We,t.Browser=It,t.Evented=M,t.Mixin=en,t.Util=T,t.Class=I,t.Handler=Je,t.extend=n,t.bind=s,t.stamp=r,t.setOptions=p,t.DomEvent=Ue,t.DomUtil=Le,t.PosAnimation=Ge,t.Draggable=rn,t.LineUtil=_n,t.PolyUtil=yn,t.Point=D,t.point=O,t.Bounds=R,t.bounds=N,t.Transformation=U,t.transformation=G,t.Projection=wn,t.LatLng=V,t.latLng=B,t.LatLngBounds=F,t.latLngBounds=z,t.CRS=j,t.GeoJSON=Fn,t.geoJSON=$n,t.geoJson=qn,t.Layer=Ln,t.LayerGroup=kn,t.layerGroup=function(t,e){return new kn(t,e)},t.FeatureGroup=Sn,t.featureGroup=function(t){return new Sn(t)},t.ImageOverlay=Wn,t.imageOverlay=function(t,e,n){return new Wn(t,e,n)},t.VideoOverlay=Kn,t.videoOverlay=function(t,e,n){return new Kn(t,e,n)},t.DivOverlay=Yn,t.Popup=Qn,t.popup=function(t,e){return new Qn(t,e)},t.Tooltip=Xn,t.tooltip=function(t,e){return new Xn(t,e)},t.Icon=Tn,t.icon=function(t){return new Tn(t)},t.DivIcon=Jn,t.divIcon=function(t){return new Jn(t)},t.Marker=Mn,t.marker=function(t,e){return new Mn(t,e)},t.TileLayer=ei,t.tileLayer=ni,t.GridLayer=ti,t.gridLayer=function(t){return new ti(t)},t.SVG=ui,t.svg=ci,t.Renderer=si,t.Canvas=oi,t.canvas=ri,t.Path=Dn,t.CircleMarker=An,t.circleMarker=function(t,e){return new An(t,e)},t.Circle=On,t.circle=function(t,e,n){return new On(t,e,n)},t.Polyline=Rn,t.polyline=function(t,e){return new Rn(t,e)},t.Polygon=Nn,t.polygon=function(t,e){return new Nn(t,e)},t.Rectangle=di,t.rectangle=function(t,e){return new di(t,e)},t.Map=$e,t.map=function(t,e){return new $e(t,e)};var bi=window.L;t.noConflict=function(){return window.L=bi,this},window.L=t}(e)},GPNb:function(t,e){function n(t){var e=new Error('Cannot find module "'+t+'".');throw e.code="MODULE_NOT_FOUND",e}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="GPNb"},INa4:function(t,e){!function(t,e,n){L.drawVersion="0.4.14",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,n=e.getLatLngs(),i=n.splice(-1,1)[0];this._poly.setLatLngs(n),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(i,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._currentLatLng=n,this._updateTooltip(n),this._updateGuide(e),this._mouseMarker.setLatLng(n),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent;this._startPoint.call(this,e.clientX,e.clientY)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent;this._endPoint.call(this,e.clientX,e.clientY,t),this._clickHandled=null},_endPoint:function(e,n,i){if(this._mouseDownOrigin){var s=L.point(e,n).distanceTo(this._mouseDownOrigin),o=this._calculateFinishDistance(i.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(i.latlng),this._finishShape()):o<10&&L.Browser.touch?this._finishShape():Math.abs(s)<9*(t.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,n,i=t.originalEvent;!i.touches||!i.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=i.touches[0].clientX,n=i.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,n),this._endPoint.call(this,e,n,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var n;if(this.type===L.Draw.Polyline.TYPE)n=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;n=this._markers[0]}var i=this._map.latLngToContainerPoint(n.getLatLng()),s=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),o=this._map.latLngToContainerPoint(s.getLatLng());e=i.distanceTo(o)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var n,i,s,o=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),r=this.options.maxGuideLineLength,a=o>r?o-r:this.options.guidelineDistance;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));a<o;a+=this.options.guidelineDistance)n=a/o,i={x:Math.floor(t.x*(1-n)+n*e.x),y:Math.floor(t.y*(1-n)+n*e.y)},(s=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(s,i)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,n=this._guidesContainer.childNodes.length;e<n;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=this.options.showLength?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var n,i,s=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(n=s-(e?2:1),i=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[n].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[n].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=i*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,n=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?n&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(n)*(this.options.factor||1):this._measurementRunningTotal||0:n&&e?this._measurementRunningTotal+this._map.distance(e,n)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout((function(){this._disableMarkers=!1}).bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var n;!this.options.allowIntersection&&this.options.showArea&&(n=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(n)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,showArea:!0,clickable:!0},metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains("leaflet-pane"););return t}(t.target)||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,n,i=L.Draw.SimpleShape.prototype._getTooltipText.call(this),s=this.options.showArea;return this._shape&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),n=s?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:i.text,subtext:n}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,n=t.latlng,i=this.options.showRadius,s=this.options.metric;if(this._tooltip.updatePosition(n),this._isDrawing){this._drawShape(n),e=this._shape.getRadius().toFixed(1);var o="";i&&(o=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,s,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:o})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var n=parseInt(t.style.marginTop,10)-e,i=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=n+"px",t.style.marginLeft=i+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(t){t.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(t){t.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,n){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,n&&n.drawError&&(n.drawError=L.Util.extend({},this.options.drawError,n.drawError)),this._latlngs=e,L.setOptions(this,n)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,n,i,s,o,r=this._defaultShape();for(t=0,n=r.length;t<n;t++)(i=this._createMarker(r[t],t)).on("click",this._onMarkerClick,this),i.on("contextmenu",this._onContextMenu,this),this._markers.push(i);for(t=0,e=n-1;t<n;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(this._createMiddleMarker(s=this._markers[e],o=this._markers[t]),this._updatePrevNext(s,o))},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return n._origLatLng=t,n._index=e,n.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(n),n},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,n=this._poly;if(L.extend(e._origLatLng,e._latlng),e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),n.options.poly){var i=n._map._editTooltip;if(!n.options.poly.allowIntersection&&n.intersects()){var s=n.options.color;n.setStyle({color:this.options.drawError.color}),0!==L.version.indexOf("0.7")&&e.dragging._draggable._onUp(t),this._onMarkerClick(t),i&&i.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){n.setStyle({color:s}),i&&i.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var o=this._poly.getLatLngs();this._poly._convertLatLngs(o,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,n=t.target;this._defaultShape().length<e||(this._removeMarker(n),this._updatePrevNext(n._prev,n._next),n._middleLeft&&this._markerGroup.removeLayer(n._middleLeft),n._middleRight&&this._markerGroup.removeLayer(n._middleRight),n._prev&&n._next?this._createMiddleMarker(n._prev,n._next):n._prev?n._next||(n._prev._middleRight=null):n._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:t.target,layers:this._markerGroup,poly:this._poly}),L},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e),i=t.target;L.extend(i._origLatLng,n),i._middleLeft&&i._middleLeft.setLatLng(this._getMiddleLatLng(i._prev,i)),i._middleRight&&i._middleRight.setLatLng(this._getMiddleLatLng(i,i._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer(function(n){n._index>t&&(n._index+=e)})},_createMiddleMarker:function(t,e){var n,i,s,o=this._getMiddleLatLng(t,e),r=this._createMarker(o);r.setOpacity(.6),t._middleRight=e._middleLeft=r,i=function(){r.off("touchmove",i,this);var s=e._index;r._index=s,r.off("click",n,this).on("click",this._onMarkerClick,this),o.lat=r.getLatLng().lat,o.lng=r.getLatLng().lng,this._spliceLatLngs(s,0,o),this._markers.splice(s,0,r),r.setOpacity(1),this._updateIndexes(s,1),e._index++,this._updatePrevNext(t,r),this._updatePrevNext(r,e),this._poly.fire("editstart")},s=function(){r.off("dragstart",i,this),r.off("dragend",s,this),r.off("touchmove",i,this),this._createMiddleMarker(t,r),this._createMiddleMarker(r,e)},r.on("click",n=function(){i.call(this),s.call(this),this._fireEdit()},this).on("dragstart",i,this).on("dragend",s,this).on("touchmove",i,this),this._markerGroup.addLayer(r)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var n=this._poly._map,i=n.project(t.getLatLng()),s=n.project(e.getLatLng());return n.unproject(i._add(s)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(n),this._markerGroup.addLayer(n),n},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,n=e.getLatLng();e===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),n=t.target,i=n._cornerIndex;n.setOpacity(0),this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,n=t.length;e<n;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),n=t.target._cornerIndex;this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)},_onMarkerDragEnd:function(t){var e,n=t.target;n===this._moveMarker&&(e=this._shape.getBounds().getCenter(),n.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,n=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),i=this._shape.getBounds().getCenter(),s=[],o=0,r=n.length;o<r;o++)s.push([t.lat+(e=[n[o].lat-i.lat,n[o].lng-i.lng])[0],t.lng+e[1]]);this._shape.setLatLngs(s),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),n=this._map.project(t);return this._map.unproject([n.x+e,n.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart),L.DomEvent.off(this._container,"touchend",this._onTouchEnd),L.DomEvent.off(this._container,"touchmove",this._onTouchMove),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDowm",this._onTouchStart),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave))},_touchEvent:function(t,e){var n={};if(void 0!==t.touches){if(!t.touches.length)return;n=t.touches[0]}else{if("touch"!==t.pointerType)return;if(n=t,!this._filterClick(t))return}var i=this._map.mouseEventToContainerPoint(n),s=this._map.mouseEventToLayerPoint(n),o=this._map.layerPointToLatLng(s);this._map.fire(e,{latlng:o,layerPoint:s,containerPoint:i,pageX:n.pageX,pageY:n.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,n=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var s=e.indexOf("Edge/");return s>0&&parseInt(e.substring(s+5,e.indexOf(".",s)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];e.concat(this._detectIE?["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]:["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var n=0;n<e.length;n++)L.DomEvent.on(t,e[n],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var s=e.indexOf("Edge/");return s>0&&parseInt(e.substring(s+5,e.indexOf(".",s)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],n=0,i=t.length;n<i;n++)Array.isArray(t[n])?e.push(L.LatLngUtil.cloneLatLngs(t[n])):e.push(this.cloneLatLng(t[n]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,n,i=t.length,s=0,o=Math.PI/180;if(i>2){for(var r=0;r<i;r++)s+=((n=t[(r+1)%i]).lng-(e=t[r]).lng)*o*(2+Math.sin(e.lat*o)+Math.sin(n.lat*o));s=6378137*s*6378137/2}return Math.abs(s)},formattedNumber:function(t,e){var n=parseFloat(t).toFixed(e),i=L.drawLocal.format&&L.drawLocal.format.numeric,s=i&&i.delimiters,o=s&&s.thousands,r=s&&s.decimal;if(o||r){var a=n.split(".");n=o?a[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+o):a[0],r=r||".",a.length>1&&(n=n+r+a[1])}return n},readableArea:function(e,n,i){var s,o;return i=L.Util.extend({},t,i),n?(o=["ha","m"],type=typeof n,"string"===type?o=[n]:"boolean"!==type&&(o=n),s=e>=1e6&&-1!==o.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,i.km)+" km\xb2":e>=1e4&&-1!==o.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,i.ha)+" ha":L.GeometryUtil.formattedNumber(e,i.m)+" m\xb2"):s=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,i.mi)+" mi\xb2":e>=4840?L.GeometryUtil.formattedNumber(e/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(e,i.yd)+" yd\xb2",s},readableDistance:function(e,n,i,s,o){var r;switch(o=L.Util.extend({},t,o),n?"string"==typeof n?n:"metric":i?"feet":s?"nauticalMile":"yards"){case"metric":r=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,o.km)+" km":L.GeometryUtil.formattedNumber(e,o.m)+" m";break;case"feet":e*=3.28083,r=L.GeometryUtil.formattedNumber(e,o.ft)+" ft";break;case"nauticalMile":e*=.53996,r=L.GeometryUtil.formattedNumber(e/1e3,o.nm)+" nm";break;case"yards":default:r=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,o.mi)+" miles":L.GeometryUtil.formattedNumber(e,o.yd)+" yd"}return r},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,n,i){return this._checkCounterclockwise(t,n,i)!==this._checkCounterclockwise(e,n,i)&&this._checkCounterclockwise(t,e,n)!==this._checkCounterclockwise(t,e,i)},_checkCounterclockwise:function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e=this._getProjectedPoints(),n=e?e.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(this._lineSegmentsIntersectsRange(e[t-1],e[t],t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var n=this._getProjectedPoints(),i=n?n.length:0,s=n?n[i-1]:null,o=i-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(s,t,o,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),n=e?e.length:0;return!e||(n+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,n,i){var s=this._getProjectedPoints();i=i||0;for(var o=n;o>i;o--)if(L.LineUtil.segmentsIntersect(t,e,s[o-1],s[o]))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),n=0;n<e.length;n++)t.push(this._map.latLngToLayerPoint(e[n]));return t}}),L.Polygon.include({intersects:function(){var t,e=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||this._lineSegmentsIntersectsRange(e[(t=e.length)-1],e[0],t-2,1))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,n=L.DomUtil.create("div","leaflet-draw"),i=!1;for(var s in this._toolbars)this._toolbars.hasOwnProperty(s)&&(e=this._toolbars[s].addToolbar(t))&&(i||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),i=!0),n.appendChild(e));return n},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var n in this._toolbars)this._toolbars[n]!==e&&this._toolbars[n].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,n=L.DomUtil.create("div","leaflet-draw-section"),i=0,s=this._toolbarClass||"",o=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<o.length;e++)o[e].enabled&&this._initModeHandler(o[e].handler,this._toolbarContainer,i++,s,o[e].title);if(i)return this._lastButtonIndex=--i,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),n.appendChild(this._toolbarContainer),n.appendChild(this._actionsContainer),n},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,n=this._actionButtons.length;e<n;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,n,i,s){var o=t.type;this._modes[o]={},this._modes[o].handler=t,this._modes[o].button=this._createButton({type:o,title:s,className:i+"-"+o,container:e,callback:this._modes[o].handler.enable,context:this._modes[o].handler}),this._modes[o].buttonIndex=n,this._modes[o].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),n=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(n),t.title&&(e.title=t.title,n.innerHTML=t.title),t.text&&(e.innerHTML=t.text,n.innerHTML=t.text);var i=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,i,t.callback,t.context),e},_disposeButton:function(t,e){var n=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,n,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,n,i,s,o=this._actionsContainer,r=this.getActions(t),a=r.length;for(n=0,i=this._actionButtons.length;n<i;n++)this._disposeButton(this._actionButtons[n].button,this._actionButtons[n].callback);for(this._actionButtons=[];o.firstChild;)o.removeChild(o.firstChild);for(var l=0;l<a;l++)"enabled"in r[l]&&!r[l].enabled||(e=L.DomUtil.create("li","",o),s=this._createButton({title:r[l].title,text:r[l].text,container:e,callback:r[l].callback,context:r[l].context}),this._actionButtons.push({button:s,callback:r[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,n=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=n+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),n=this._container;return this._container&&(this._visible&&(n.style.visibility="inherit"),L.DomUtil.setPosition(n,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer(function(e){e.edited&&(t.addLayer(e),e.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,n,i=t.layer||t.target||t;this._backupLayer(i),this.options.poly&&(n=L.Util.extend({},this.options.poly),i.options.poly=n),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=i.options.color,e.fillColor=i.options.fillColor),i.options.original=L.extend({},i.options),i.options.editing=e),i instanceof L.Marker?(i.editing&&i.editing.enable(),i.dragging.enable(),i.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):i.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.changedTouches[0]),n=this._map.layerPointToLatLng(e);t.target.setLatLng(n)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},Yoyx:function(t,e,n){var i,s;!function(o){if("object"==typeof t&&"object"==typeof t.exports){var r=o(n("GPNb"),e);void 0!==r&&(t.exports=r)}else void 0===(s="function"==typeof(i=o)?i.apply(e,[n,e]):i)||(t.exports=s)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=/-+([a-z0-9])/g;function i(t,e,n){var i=t.indexOf(e);return-1==i?n:[t.slice(0,i).trim(),t.slice(i+1).trim()]}function s(t,e,n){return Array.isArray(t)?e.visitArray(t,n):"object"==typeof t&&null!==t&&Object.getPrototypeOf(t)===l?e.visitStringMap(t,n):null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t?e.visitPrimitive(t,n):e.visitOther(t,n)}e.dashCaseToCamelCase=function(t){return t.replace(n,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})},e.splitAtColon=function(t,e){return i(t,":",e)},e.splitAtPeriod=function(t,e){return i(t,".",e)},e.visitValue=s,e.isDefined=function(t){return null!==t&&void 0!==t},e.noUndefined=function(t){return void 0===t?null:t};var o=function(){function t(){}return t.prototype.visitArray=function(t,e){var n=this;return t.map(function(t){return s(t,n,e)})},t.prototype.visitStringMap=function(t,e){var n=this,i={};return Object.keys(t).forEach(function(o){i[o]=s(t[o],n,e)}),i},t.prototype.visitPrimitive=function(t,e){return t},t.prototype.visitOther=function(t,e){return t},t}();e.ValueTransformer=o,e.SyncAsync={assertSync:function(t){if(h(t))throw new Error("Illegal state: value cannot be a promise");return t},then:function(t,e){return h(t)?t.then(e):e(t)},all:function(t){return t.some(h)?Promise.all(t):t}},e.error=function(t){throw new Error("Internal Error: "+t)},e.syntaxError=function(t,e){var n=Error(t);return n[r]=!0,e&&(n[a]=e),n};var r="ngSyntaxError",a="ngParseErrors";e.isSyntaxError=function(t){return t[r]},e.getParseErrors=function(t){return t[a]||[]},e.escapeRegExp=function(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var l=Object.getPrototypeOf({});function h(t){return!!t&&"function"==typeof t.then}e.utf8Encode=function(t){for(var e="",n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i>=55296&&i<=56319&&t.length>n+1){var s=t.charCodeAt(n+1);s>=56320&&s<=57343&&(n++,i=(i-55296<<10)+s-56320+65536)}i<=127?e+=String.fromCharCode(i):i<=2047?e+=String.fromCharCode(i>>6&31|192,63&i|128):i<=65535?e+=String.fromCharCode(i>>12|224,i>>6&63|128,63&i|128):i<=2097151&&(e+=String.fromCharCode(i>>18&7|240,i>>12&63|128,i>>6&63|128,63&i|128))}return e},e.stringify=function t(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(t).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var n=e.toString();if(null==n)return""+n;var i=n.indexOf("\n");return-1===i?n:n.substring(0,i)},e.resolveForwardRef=function(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")?t():t},e.isPromise=h,e.Version=function(t){this.full=t;var e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}})},crnd:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error('Cannot find module "'+t+'".');throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="crnd"},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);let s=!1;const o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function r(t){setTimeout(()=>{throw t})}const a={closed:!0,next(t){},error(t){if(o.useDeprecatedSynchronousErrorHandling)throw t},complete(){}},l=Array.isArray||(t=>t&&"number"==typeof t.length);function h(t){return null!=t&&"object"==typeof t}const u={e:{}};let c;function d(){try{return c.apply(this,arguments)}catch(t){return u.e=t,u}}function p(t){return c=t,d}class m extends Error{constructor(t){super(t?`${t.length} errors occurred during unsubscription:\n ${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:""),this.errors=t,this.name="UnsubscriptionError",Object.setPrototypeOf(this,m.prototype)}}class f{constructor(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}unsubscribe(){let t,e=!1;if(this.closed)return;let{_parent:n,_parents:s,_unsubscribe:o,_subscriptions:r}=this;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;let a=-1,c=s?s.length:0;for(;n;)n.remove(this),n=++a<c&&s[a]||null;if(i(o)&&p(o).call(this)===u&&(e=!0,t=t||(u.e instanceof m?_(u.e.errors):[u.e])),l(r))for(a=-1,c=r.length;++a<c;){const n=r[a];if(h(n)&&p(n.unsubscribe).call(n)===u){e=!0,t=t||[];let n=u.e;n instanceof m?t=t.concat(_(n.errors)):t.push(n)}}if(e)throw new m(t)}add(t){if(!t||t===f.EMPTY)return f.EMPTY;if(t===this)return this;let e=t;switch(typeof t){case"function":e=new f(t);case"object":if(e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if("function"!=typeof e._addParent){const t=e;(e=new f)._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(e),e._addParent(this),e}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}_addParent(t){let{_parent:e,_parents:n}=this;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t}}function _(t){return t.reduce((t,e)=>t.concat(e instanceof m?e.errors:e),[])}f.EMPTY=function(t){return t.closed=!0,t}(new f);const g="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber";class y extends f{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){if(t instanceof y||"syncErrorThrowable"in t&&t[g]){const e=t[g]();this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)}else this.syncErrorThrowable=!0,this.destination=new v(this,t);break}default:this.syncErrorThrowable=!0,this.destination=new v(this,t,e,n)}}[g](){return this}static create(t,e,n){const i=new y(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parent:t,_parents:e}=this;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this}}class v extends y{constructor(t,e,n,s){let o;super(),this._parentSubscriber=t;let r=this;i(e)?o=e:e&&(o=e.next,n=e.error,s=e.complete,e!==a&&(i((r=Object.create(e)).unsubscribe)&&this.add(r.unsubscribe.bind(r)),r.unsubscribe=this.unsubscribe.bind(this))),this._context=r,this._next=o,this._error=n,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;o.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=o;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):r(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;r(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);o.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),o.useDeprecatedSynchronousErrorHandling)throw t;r(t)}}__tryOrSetError(t,e,n){if(!o.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return o.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(r(e),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const b="function"==typeof Symbol&&Symbol.observable||"@@observable";function w(){}class x{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const e=new x;return e.source=this,e.operator=t,e}subscribe(t,e,n){const{operator:i}=this,s=function(t,e,n){if(t){if(t instanceof y)return t;if(t[g])return t[g]()}return t||e||n?new y(t,e,n):new y(a)}(t,e,n);if(i?i.call(s,this.source):s.add(this.source||!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),o.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(e){o.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),t.error(e)}}forEach(t,e){return new(e=E(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(t){n(t),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[b](){return this}pipe(...t){return 0===t.length?this:function(t){return t?1===t.length?t[0]:function(e){return t.reduce((t,e)=>e(t),e)}:w}(t)(this)}toPromise(t){return new(t=E(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}function E(t){if(t||(t=o.Promise||Promise),!t)throw new Error("no Promise impl found");return t}x.create=(t=>new x(t));class C extends Error{constructor(){super("object unsubscribed"),this.name="ObjectUnsubscribedError",Object.setPrototypeOf(this,C.prototype)}}class L extends f{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class k extends y{constructor(t){super(t),this.destination=t}}class S extends x{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[g](){return new k(this)}lift(t){const e=new T(this,this);return e.operator=t,e}next(t){if(this.closed)throw new C;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].next(t)}}error(t){if(this.closed)throw new C;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,i=e.slice();for(let s=0;s<n;s++)i[s].error(t);this.observers.length=0}complete(){if(this.closed)throw new C;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let i=0;i<e;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new C;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new C;return this.hasError?(t.error(this.thrownError),f.EMPTY):this.isStopped?(t.complete(),f.EMPTY):(this.observers.push(t),new L(this,t))}asObservable(){const t=new x;return t.source=this,t}}S.create=((t,e)=>new T(t,e));class T extends S{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):f.EMPTY}}function I(t){return t&&"function"==typeof t.schedule}class P extends y{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}const M=t=>e=>{for(let n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()},D=t=>e=>(t.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,r),e),A=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),O=t=>e=>{const n=t[A]();for(;;){const t=n.next();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},R=t=>e=>{const n=t[b]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)},N=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function F(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const z=t=>{if(t instanceof x)return e=>t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e);if(N(t))return M(t);if(F(t))return D(t);if(t&&"function"==typeof t[A])return O(t);if(t&&"function"==typeof t[b])return R(t);{const e=`You provided ${h(t)?"an invalid object":`'${t}'`} where a stream was expected.`+" You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(e)}};function V(t,e,n,i){const s=new P(t,n,i);return z(e)(s)}class B extends y{notifyNext(t,e,n,i,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}function j(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new H(t,e))}}class H{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new Z(t,this.project,this.thisArg))}}class Z extends y{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}function U(t,e){return new x(e?n=>{const i=new f;let s=0;return i.add(e.schedule(function(){s!==t.length?(n.next(t[s++]),n.closed||i.add(this.schedule())):n.complete()})),i}:M(t))}function G(t,e){if(!e)return t instanceof x?t:new x(z(t));if(null!=t){if(function(t){return t&&"function"==typeof t[b]}(t))return function(t,e){return new x(e?n=>{const i=new f;return i.add(e.schedule(()=>{const s=t[b]();i.add(s.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i}:R(t))}(t,e);if(F(t))return function(t,e){return new x(e?n=>{const i=new f;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i}:D(t))}(t,e);if(N(t))return U(t,e);if(function(t){return t&&"function"==typeof t[A]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new x(e?n=>{const i=new f;let s;return i.add(()=>{s&&"function"==typeof s.return&&s.return()}),i.add(e.schedule(()=>{s=t[A](),i.add(e.schedule(function(){if(n.closed)return;let t,e;try{const i=s.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}))})),i}:O(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function $(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe($((n,i)=>G(t(n,i)).pipe(j((t,s)=>e(n,t,i,s))),n)):("number"==typeof e&&(n=e),e=>e.lift(new q(t,n)))}class q{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new W(t,this.project,this.concurrent))}}class W extends B{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)}_innerSub(t,e,n){this.add(V(this,t,e,n))}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()}notifyNext(t,e,n,i,s){this.destination.next(e)}notifyComplete(t){const e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function K(t){return t}function Y(t=Number.POSITIVE_INFINITY){return $(K,t)}function Q(...t){let e=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return I(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof i&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof x?t[0]:Y(e)(U(t,n))}function X(){return function(t){return t.lift(new J(t))}}class J{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new tt(t,n),s=e.subscribe(i);return i.closed||(i.connection=n.connect()),s}}class tt extends y{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}const et=class extends x{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new f).add(this.source.subscribe(new class extends k{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}(this.getSubject(),this))),t.closed?(this._connection=null,t=f.EMPTY):this._connection=t),t}refCount(){return X()(this)}}.prototype,nt={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:et._subscribe},_isComplete:{value:et._isComplete,writable:!0},getSubject:{value:et.getSubject},connect:{value:et.connect},refCount:{value:et.refCount}};function it(){return new S}function st(){return t=>X()(function(t,e){return function(e){let n;n="function"==typeof t?t:function(){return t};const i=Object.create(e,nt);return i.source=e,i.subjectFactory=n,i}}(it)(t))}function ot(t){return{providedIn:t.providedIn||null,factory:t.factory,value:void 0}}class rt{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==e?ot({providedIn:e.providedIn||"root",factory:e.factory}):void 0}toString(){return`InjectionToken ${this._desc}`}}const at="__parameters__";function lt(t,e,n){const i=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function s(...t){if(this instanceof s)return i.apply(this,t),this;const e=new s(...t);return n.annotation=e,n;function n(t,n,i){const s=t.hasOwnProperty(at)?t[at]:Object.defineProperty(t,at,{value:[]})[at];for(;s.length<=i;)s.push(null);return(s[i]=s[i]||[]).push(e),t}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s}const ht=Function;function ut(t){return"function"==typeof t}const ct="undefined"!=typeof window&&window,dt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,pt="undefined"!=typeof global&&global,mt=ct||pt||dt,ft=Promise.resolve(0);let _t=null;function gt(){if(!_t){const t=mt.Symbol;if(t&&t.iterator)_t=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(_t=n)}}}return _t}function yt(t){"undefined"==typeof Zone?ft.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}function vt(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}function bt(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(bt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}const wt=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,xt=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{/,Et=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{[\s\S]*constructor\s*\(/;function Ct(t){return t?t.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function Lt(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}function kt(t){return t.__forward_ref__=kt,t.toString=function(){return bt(this())},t}function St(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")&&t.__forward_ref__===kt?t():t}const Tt=lt("Inject",t=>({token:t})),It=lt("Optional"),Pt=lt("Self"),Mt=lt("SkipSelf"),Dt="__source",At=new Object,Ot=At,Rt=new rt("INJECTOR");class Nt{static create(t,e){return Array.isArray(t)?new Wt(t,e):new Wt(t.providers,t.parent,t.name||null)}}Nt.THROW_IF_NOT_FOUND=At,Nt.NULL=new class{get(t,e=At){if(e===At)throw new Error(`NullInjectorError: No provider for ${bt(t)}!`);return e}},Nt.ngInjectableDef=ot({providedIn:"any",factory:()=>te(Rt)});const Ft=function(t){return t},zt=[],Vt=Ft,Bt=function(){return Array.prototype.slice.call(arguments)},jt={},Ht=function(t){for(let e in t)if(t[e]===jt)return e;throw Error("!prop")}({provide:String,useValue:jt}),Zt="ngTokenPath",Ut="ngTempTokenPath",Gt=Nt.NULL,$t=/\n/gm,qt="\u0275";class Wt{constructor(t,e=Gt,n=null){this.parent=e,this.source=n;const i=this._records=new Map;i.set(Nt,{token:Nt,fn:Ft,deps:zt,value:this,useNew:!1}),i.set(Rt,{token:Rt,fn:Ft,deps:zt,value:this,useNew:!1}),function t(e,n){if(n)if((n=St(n))instanceof Array)for(let i=0;i<n.length;i++)t(e,n[i]);else{if("function"==typeof n)throw Qt("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw Qt("Unexpected provider",n);{let t=St(n.provide);const i=function(t){const e=function(t){let e=zt;const n=t.deps;if(n&&n.length){e=[];for(let t=0;t<n.length;t++){let i=6,s=St(n[t]);if(s instanceof Array)for(let t=0,e=s;t<e.length;t++){const n=e[t];n instanceof It||n==It?i|=1:n instanceof Mt||n==Mt?i&=-3:n instanceof Pt||n==Pt?i&=-5:s=n instanceof Tt?n.token:St(n)}e.push({token:s,options:i})}}else if(t.useExisting)e=[{token:St(t.useExisting),options:6}];else if(!(n||Ht in t))throw Qt("'deps' required",t);return e}(t);let n=Ft,i=zt,s=!1,o=St(t.provide);if(Ht in t)i=t.useValue;else if(t.useFactory)n=t.useFactory;else if(t.useExisting);else if(t.useClass)s=!0,n=St(t.useClass);else{if("function"!=typeof o)throw Qt("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",t);s=!0,n=o}return{deps:e,fn:n,useNew:s,value:i}}(n);if(!0===n.multi){let i=e.get(t);if(i){if(i.fn!==Bt)throw Kt(t)}else e.set(t,i={token:n.provide,deps:[],useNew:!1,fn:Bt,value:zt});i.deps.push({token:t=n,options:6})}const s=e.get(t);if(s&&s.fn==Bt)throw Kt(t);e.set(t,i)}}}(i,t)}get(t,e,n=0){const i=this._records.get(t);try{return function t(e,n,i,s,o,r){try{return function(e,n,i,s,o,r){let a;if(!n||4&r)2&r||(a=s.get(e,o,0));else{if((a=n.value)==Vt)throw Error(qt+"Circular dependency");if(a===zt){n.value=Vt;let e=void 0,o=n.useNew,r=n.fn,l=n.deps,h=zt;if(l.length){h=[];for(let e=0;e<l.length;e++){const n=l[e],o=n.options,r=2&o?i.get(n.token):void 0;h.push(t(n.token,r,i,r||4&o?s:Gt,1&o?null:Nt.THROW_IF_NOT_FOUND,0))}}n.value=a=o?new r(...h):r.apply(e,h)}}return a}(e,n,i,s,o,r)}catch(t){throw t instanceof Error||(t=new Error(t)),(t[Ut]=t[Ut]||[]).unshift(e),n&&n.value==Vt&&(n.value=zt),t}}(t,i,this._records,this.parent,e,n)}catch(e){const n=e[Ut];throw t[Dt]&&n.unshift(t[Dt]),e.message=Yt("\n"+e.message,n,this.source),e[Zt]=n,e[Ut]=null,e}}toString(){const t=[];return this._records.forEach((e,n)=>t.push(bt(n))),`StaticInjector[${t.join(", ")}]`}}function Kt(t){return Qt("Cannot mix multi providers and regular providers",t)}function Yt(t,e,n=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==qt?t.substr(2):t;let i=bt(e);if(e instanceof Array)i=e.map(bt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t.push(n+":"+("string"==typeof i?JSON.stringify(i):bt(i)))}i=`{${t.join(", ")}}`}return`StaticInjectorError${n?"("+n+")":""}[${i}]: ${t.replace($t,"\n ")}`}function Qt(t,e){return new Error(Yt(t,e))}let Xt=void 0;function Jt(t){const e=Xt;return Xt=t,e}function te(t,e=0){if(void 0===Xt)throw new Error("inject() must be called from an injection context");if(null===Xt){const e=t.ngInjectableDef;if(e&&"root"==e.providedIn)return void 0===e.value?e.value=e.factory():e.value;throw new Error(`Injector: NOT_FOUND [${bt(t)}]`)}return Xt.get(t,8&e?null:void 0,e)}String;const ee=function(){var t={Emulated:0,Native:1,None:2};return t[t.Emulated]="Emulated",t[t.Native]="Native",t[t.None]="None",t}(),ne=new class{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}("6.0.3"),ie="ngDebugContext",se="ngOriginalError",oe="ngErrorLogger";function re(t){return t[ie]}function ae(t){return t[se]}function le(t,...e){t.error(...e)}class he{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t[oe]||le}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?re(t)?re(t):this._findContext(ae(t)):null}_findOriginalError(t){let e=ae(t);for(;e&&ae(e);)e=ae(e);return e}}function ue(t){return t.length>1?" ("+function(t){const e=[];for(let n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(t=>bt(t.token)).join(" -> ")+")":""}function ce(t,e,n,i){const s=[e],o=n(s),r=i?function(t,e){const n=`${o} caused by: ${e instanceof Error?e.message:e}`,i=Error(n);return i[se]=e,i}(0,i):Error(o);return r.addKey=de,r.keys=s,r.injectors=[t],r.constructResolvingMessage=n,r[se]=i,r}function de(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function pe(t,e){const n=[];for(let i=0,s=e.length;i<s;i++){const t=e[i];n.push(t&&0!=t.length?t.map(bt).join(" "):"?")}return Error("Cannot resolve all parameters for '"+bt(t)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+bt(t)+"' is decorated with Injectable.")}function me(t,e){return Error(`Cannot mix multi providers and regular providers, got: ${t} ${e}`)}class fe{constructor(t,e){if(this.token=t,this.id=e,!t)throw new Error("Token must be defined!");this.displayName=bt(this.token)}static get(t){return _e.get(St(t))}static get numberOfKeys(){return _e.numberOfKeys}}const _e=new class{constructor(){this._allKeys=new Map}get(t){if(t instanceof fe)return t;if(this._allKeys.has(t))return this._allKeys.get(t);const e=new fe(t,fe.numberOfKeys);return this._allKeys.set(t,e),e}get numberOfKeys(){return this._allKeys.size}},ge=new class{constructor(t){this.reflectionCapabilities=t}updateCapabilities(t){this.reflectionCapabilities=t}factory(t){return this.reflectionCapabilities.factory(t)}parameters(t){return this.reflectionCapabilities.parameters(t)}annotations(t){return this.reflectionCapabilities.annotations(t)}propMetadata(t){return this.reflectionCapabilities.propMetadata(t)}hasLifecycleHook(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)}getter(t){return this.reflectionCapabilities.getter(t)}setter(t){return this.reflectionCapabilities.setter(t)}method(t){return this.reflectionCapabilities.method(t)}importUri(t){return this.reflectionCapabilities.importUri(t)}resourceUri(t){return this.reflectionCapabilities.resourceUri(t)}resolveIdentifier(t,e,n,i){return this.reflectionCapabilities.resolveIdentifier(t,e,n,i)}resolveEnum(t,e){return this.reflectionCapabilities.resolveEnum(t,e)}}(new class{constructor(t){this._reflect=t||mt.Reflect}isReflectionEnabled(){return!0}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let n;n=void 0===t?new Array(e.length):new Array(t.length);for(let i=0;i<n.length;i++)n[i]=void 0===t?[]:t[i]!=Object?[t[i]]:[],e&&null!=e[i]&&(n[i]=n[i].concat(e[i]));return n}_ownParameters(t,e){const n=t.toString();if(wt.exec(n)||xt.exec(n)&&!Et.exec(n))return null;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;const i=t.ctorParameters;if(i&&i!==e.ctorParameters){const t="function"==typeof i?i():i,e=t.map(t=>t&&t.type),n=t.map(t=>t&&Ct(t.decorators));return this._zipTypesAndAnnotations(e,n)}const s=t.hasOwnProperty(at)&&t[at],o=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return o||s?this._zipTypesAndAnnotations(o,s):new Array(t.length).fill(void 0)}parameters(t){if(!ut(t))return[];const e=Lt(t);let n=this._ownParameters(t,e);return n||e===Object||(n=this.parameters(e)),n||[]}_ownAnnotations(t,e){if(t.annotations&&t.annotations!==e.annotations){let e=t.annotations;return"function"==typeof e&&e.annotations&&(e=e.annotations),e}return t.decorators&&t.decorators!==e.decorators?Ct(t.decorators):t.hasOwnProperty("__annotations__")?t.__annotations__:null}annotations(t){if(!ut(t))return[];const e=Lt(t),n=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(n)}_ownPropMetadata(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){let e=t.propMetadata;return"function"==typeof e&&e.propMetadata&&(e=e.propMetadata),e}if(t.propDecorators&&t.propDecorators!==e.propDecorators){const e=t.propDecorators,n={};return Object.keys(e).forEach(t=>{n[t]=Ct(e[t])}),n}return t.hasOwnProperty("__prop__metadata__")?t.__prop__metadata__:null}propMetadata(t){if(!ut(t))return{};const e=Lt(t),n={};if(e!==Object){const t=this.propMetadata(e);Object.keys(t).forEach(e=>{n[e]=t[e]})}const i=this._ownPropMetadata(t,e);return i&&Object.keys(i).forEach(t=>{const e=[];n.hasOwnProperty(t)&&e.push(...n[t]),e.push(...i[t]),n[t]=e}),n}hasLifecycleHook(t,e){return t instanceof ht&&e in t.prototype}guards(t){return{}}getter(t){return new Function("o","return o."+t+";")}setter(t){return new Function("o","v","return o."+t+" = v;")}method(t){const e=`if (!o.${t}) throw new Error('"${t}" is undefined');\n return o.${t}.apply(o, args);`;return new Function("o","args",e)}importUri(t){return"object"==typeof t&&t.filePath?t.filePath:`./${bt(t)}`}resourceUri(t){return`./${bt(t)}`}resolveIdentifier(t,e,n,i){return i}resolveEnum(t,e){return t[e]}});class ye{constructor(t,e,n){this.key=t,this.optional=e,this.visibility=n}static fromKey(t){return new ye(t,!1,null)}}const ve=[];class be{constructor(t,e,n){this.key=t,this.resolvedFactories=e,this.multiProvider=n,this.resolvedFactory=this.resolvedFactories[0]}}class we{constructor(t,e){this.factory=t,this.dependencies=e}}function xe(t){return new be(fe.get(t.provide),[function(t){let e,n;if(t.useClass){const i=St(t.useClass);e=ge.factory(i),n=Ee(i)}else t.useExisting?(e=(t=>t),n=[ye.fromKey(fe.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function(t,e){if(e){const n=e.map(t=>[t]);return e.map(e=>Ce(t,e,n))}return Ee(t)}(t.useFactory,t.deps)):(e=(()=>t.useValue),n=ve);return new we(e,n)}(t)],t.multi||!1)}function Ee(t){const e=ge.parameters(t);if(!e)return[];if(e.some(t=>null==t))throw pe(t,e);return e.map(n=>Ce(t,n,e))}function Ce(t,e,n){let i=null,s=!1;if(!Array.isArray(e))return Le(e instanceof Tt?e.token:e,s,null);let o=null;for(let r=0;r<e.length;++r){const t=e[r];t instanceof ht?i=t:t instanceof Tt?i=t.token:t instanceof It?s=!0:t instanceof Pt||t instanceof Mt?o=t:t instanceof rt&&(i=t)}if(null!=(i=St(i)))return Le(i,s,o);throw pe(t,n)}function Le(t,e,n){return new ye(fe.get(t),e,n)}const ke=new Object;class Se{static resolve(t){return function(t){const e=function(t,e){for(let n=0;n<t.length;n++){const i=t[n],s=e.get(i.key.id);if(s){if(i.multiProvider!==s.multiProvider)throw me(s,i);if(i.multiProvider)for(let t=0;t<i.resolvedFactories.length;t++)s.resolvedFactories.push(i.resolvedFactories[t]);else e.set(i.key.id,i)}else{let t;t=i.multiProvider?new be(i.key,i.resolvedFactories.slice(),i.multiProvider):i,e.set(i.key.id,t)}}return e}(function t(e,n){return e.forEach(e=>{if(e instanceof ht)n.push({provide:e,useClass:e});else if(e&&"object"==typeof e&&void 0!==e.provide)n.push(e);else{if(!(e instanceof Array))throw Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${e}`);t(e,n)}}),n}(t,[]).map(xe),new Map);return Array.from(e.values())}(t)}static resolveAndCreate(t,e){const n=Se.resolve(t);return Se.fromResolvedProviders(n,e)}static fromResolvedProviders(t,e){return new Te(t,e)}}class Te{constructor(t,e){this._constructionCounter=0,this._providers=t,this.parent=e||null;const n=t.length;this.keyIds=new Array(n),this.objs=new Array(n);for(let i=0;i<n;i++)this.keyIds[i]=t[i].key.id,this.objs[i]=ke}get(t,e=Ot){return this._getByKey(fe.get(t),null,e)}resolveAndCreateChild(t){const e=Se.resolve(t);return this.createChildFromResolved(e)}createChildFromResolved(t){const e=new Te(t);return e.parent=this,e}resolveAndInstantiate(t){return this.instantiateResolved(Se.resolve([t])[0])}instantiateResolved(t){return this._instantiateProvider(t)}getProviderAtIndex(t){if(t<0||t>=this._providers.length)throw function(t){return Error(`Index ${t} is out-of-bounds.`)}(t);return this._providers[t]}_new(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function(e,n){return ce(e,t.key,function(t){return`Cannot instantiate cyclic dependency!${ue(t)}`})}(this);return this._instantiateProvider(t)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(t){if(t.multiProvider){const e=new Array(t.resolvedFactories.length);for(let n=0;n<t.resolvedFactories.length;++n)e[n]=this._instantiate(t,t.resolvedFactories[n]);return e}return this._instantiate(t,t.resolvedFactories[0])}_instantiate(t,e){const n=e.factory;let i,s;try{i=e.dependencies.map(t=>this._getByReflectiveDependency(t))}catch(e){throw e.addKey&&e.addKey(this,t.key),e}try{s=n(...i)}catch(e){throw function(e,n,i,s){return ce(e,t.key,function(t){const e=bt(t[0].token);return`${n.message}: Error during instantiation of ${e}!${ue(t)}.`},n)}(this,e)}return s}_getByReflectiveDependency(t){return this._getByKey(t.key,t.visibility,t.optional?null:Ot)}_getByKey(t,e,n){return t===Te.INJECTOR_KEY?this:e instanceof Pt?this._getByKeySelf(t,n):this._getByKeyDefault(t,n,e)}_getObjByKeyId(t){for(let e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===ke&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return ke}_throwOrNull(t,e){if(e!==Ot)return e;throw function(t,e){return ce(t,e,function(t){return`No provider for ${bt(t[0].token)}!${ue(t)}`})}(this,t)}_getByKeySelf(t,e){const n=this._getObjByKeyId(t.id);return n!==ke?n:this._throwOrNull(t,e)}_getByKeyDefault(t,e,n){let i;for(i=n instanceof Mt?this.parent:this;i instanceof Te;){const e=i,n=e._getObjByKeyId(t.id);if(n!==ke)return n;i=e.parent}return null!==i?i.get(t.token,e):this._throwOrNull(t,e)}get displayName(){return`ReflectiveInjector(providers: [${function(t,e){const n=new Array(t._providers.length);for(let i=0;i<t._providers.length;++i)n[i]=e(t.getProviderAtIndex(i));return n}(this,t=>' "'+t.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}Te.INJECTOR_KEY=fe.get(Nt);const Ie=new rt("The presence of this token marks an injector as being the root injector.");function Pe(t){return!!t&&"function"==typeof t.then}function Me(t){return!!t&&"function"==typeof t.subscribe}const De=new rt("Application Initializer");class Ae{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();Pe(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}const Oe=new rt("AppId");function Re(){return`${Ne()}${Ne()}${Ne()}`}function Ne(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Fe=new rt("Platform Initializer"),ze=new rt("Platform ID"),Ve=new rt("appBootstrapListener");class Be{log(t){console.log(t)}warn(t){console.warn(t)}}function je(){throw new Error("Runtime compiler is not loaded")}Be.ctorParameters=(()=>[]);class He{compileModuleSync(t){throw je()}compileModuleAsync(t){throw je()}compileModuleAndAllComponentsSync(t){throw je()}compileModuleAndAllComponentsAsync(t){throw je()}clearCache(){}clearCacheFor(t){}}class Ze{}class Ue{}class Ge{}function $e(t){const e=Error(`No component factory found for ${bt(t)}. Did you add it to @NgModule.entryComponents?`);return e[qe]=t,e}const qe="ngComponent";class We{}We.NULL=new class{resolveComponentFactory(t){throw $e(t)}};class Ke{constructor(t,e,n){this._parent=e,this._ngModule=n,this._factories=new Map;for(let i=0;i<t.length;i++){const e=t[i];this._factories.set(e.componentType,e)}}resolveComponentFactory(t){let e=this._factories.get(t);if(!e&&this._parent&&(e=this._parent.resolveComponentFactory(t)),!e)throw $e(t);return new Ye(e,this._ngModule)}}class Ye extends Ge{constructor(t,e){super(),this.factory=t,this.ngModule=e,this.selector=t.selector,this.componentType=t.componentType,this.ngContentSelectors=t.ngContentSelectors,this.inputs=t.inputs,this.outputs=t.outputs}create(t,e,n,i){return this.factory.create(t,e,n,i||this.ngModule)}}class Qe{}class Xe{}let Je,tn;const en=function(){const t=mt.wtf;return!(!t||!(Je=t.trace)||(tn=Je.events,0))}(),nn=en?function(t,e=null){return tn.createScope(t,e)}:(t,e)=>(function(t,e){return null}),sn=en?function(t,e){return Je.leaveScope(t,e),e}:(t,e)=>e;class on extends S{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let i,s=t=>null,o=()=>null;t&&"object"==typeof t?(i=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(o=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const r=super.subscribe(i,s,o);return t instanceof f&&t.add(r),r}}class rn{constructor({enableLongStackTrace:t=!1}){if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new on(!1),this.onMicrotaskEmpty=new on(!1),this.onStable=new on(!1),this.onError=new on(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),function(t){t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,n,i,s,o,r)=>{try{return un(t),e.invokeTask(i,s,o,r)}finally{cn(t)}},onInvoke:(e,n,i,s,o,r,a)=>{try{return un(t),e.invoke(i,s,o,r,a)}finally{cn(t)}},onHasTask:(e,n,i,s)=>{e.hasTask(i,s),n===i&&("microTask"==s.change?(t.hasPendingMicrotasks=s.microTask,hn(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,i,s)=>(e.handleError(i,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!rn.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(rn.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,ln,an,an);try{return s.runTask(o,e,n)}finally{s.cancelTask(o)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function an(){}const ln={};function hn(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function un(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function cn(t){t._nesting--,hn(t)}class dn{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new on,this.onMicrotaskEmpty=new on,this.onStable=new on,this.onError=new on}run(t){return t()}runGuarded(t){return t()}runOutsideAngular(t){return t()}runTask(t){return t()}}class pn{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{rn.assertNotInAngularZone(),yt(()=>{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())yt(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,isPeriodic:t.data.isPeriodic,delay:t.data.delay,creationLocation:t.creationLocation,xhr:t.data.target})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,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(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}class mn{constructor(){this._applications=new Map,_n.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return _n.findTestabilityInTree(this,t,e)}}mn.ctorParameters=(()=>[]);let fn,_n=new class{addToWindow(t){}findTestabilityInTree(t,e,n){return null}},gn=!0,yn=!1;const vn=new rt("AllowMultipleToken");function bn(){return yn=!0,gn}class wn{constructor(t,e){this.name=t,this.token=e}}function xn(t,e,n=[]){const i=`Platform: ${e}`,s=new rt(i);return(e=[])=>{let o=En();if(!o||o.injector.get(vn,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0});!function(t){if(fn&&!fn.destroyed&&!fn.injector.get(vn,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");fn=t.get(Cn);const e=t.get(Fe,null);e&&e.forEach(t=>t())}(Nt.create({providers:t,name:i}))}return function(t){const e=En();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(s)}}function En(){return fn&&!fn.destroyed?fn:null}class Cn{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t){return"noop"===t?new dn:("zone.js"===t?void 0:t)||new rn({enableLongStackTrace:bn()})}(e?e.ngZone:void 0),i=[{provide:rn,useValue:n}];return n.run(()=>{const e=Nt.create({providers:i,parent:this.injector,name:t.moduleType.name}),s=t.create(e),o=s.injector.get(he,null);if(!o)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return s.onDestroy(()=>Sn(this._modules,s)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{o.handleError(t)}})),function(t,e,n){try{const i=n();return Pe(i)?i.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):i}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}(o,n,()=>{const t=s.injector.get(Ae);return t.runInitializers(),t.donePromise.then(()=>(this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=this.injector.get(Ze),i=Ln({},e);return n.createCompiler([i]).compileModuleAsync(t).then(t=>this.bootstrapModuleFactory(t,i))}_moduleDoBootstrap(t){const e=t.injector.get(kn);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${bt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. `+"Please define one of these.");t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}function Ln(t,e){return Array.isArray(e)?e.reduce(Ln,t):Object.assign({},t,e)}class kn{constructor(t,e,n,i,s,o){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=s,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=bn(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const r=new x(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new x(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{rn.assertNotInAngularZone(),yt(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{rn.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=Q(r,a.pipe(st()))}bootstrap(t,e){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=t instanceof Ge?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=n instanceof Ye?null:this._injector.get(Qe),s=n.create(Nt.NULL,[],e||n.selector,i);s.onDestroy(()=>{this._unloadComponent(s)});const o=s.injector.get(pn,null);return o&&s.injector.get(mn).registerApplication(s.location.nativeElement,o),this._loadComponent(s),bn()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");const t=kn._tickScope();try{this._runningTick=!0,this._views.forEach(t=>t.detectChanges()),this._enforceNoNewChanges&&this._views.forEach(t=>t.checkNoChanges())}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1,sn(t)}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Sn(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Ve,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),Sn(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}function Sn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}kn._tickScope=nn("ApplicationRef#tick()");class Tn{}const In=function(){var t={Important:1,DashCase:2};return t[t.Important]="Important",t[t.DashCase]="DashCase",t}();class Pn{}class Mn{constructor(t){this.nativeElement=t}}class Dn{constructor(){this.dirty=!0,this._results=[],this.changes=new on,this.length=0}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}[gt()](){return this._results[gt()]()}toString(){return this._results.toString()}reset(t){this._results=function t(e){return e.reduce((e,n)=>{const i=Array.isArray(n)?t(n):n;return e.concat(i)},[])}(t),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 An{}class On{}class Rn{}class Nn{constructor(t,e){this.name=t,this.callback=e}}class Fn{constructor(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof zn?e.addChild(this):this.parent=null,this.listeners=[]}get injector(){return this._debugContext.injector}get componentInstance(){return this._debugContext.component}get context(){return this._debugContext.context}get references(){return this._debugContext.references}get providerTokens(){return this._debugContext.providerTokens}}class zn extends Fn{constructor(t,e,n){super(t,e,n),this.properties={},this.attributes={},this.classes={},this.styles={},this.childNodes=[],this.nativeElement=t}addChild(t){t&&(this.childNodes.push(t),t.parent=this)}removeChild(t){const e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))}insertChildrenAfter(t,e){const n=this.childNodes.indexOf(t);-1!==n&&(this.childNodes.splice(n+1,0,...e),e.forEach(t=>{t.parent&&t.parent.removeChild(t),t.parent=this}))}insertBefore(t,e){const n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))}query(t){return this.queryAll(t)[0]||null}queryAll(t){const e=[];return function t(e,n,i){e.childNodes.forEach(e=>{e instanceof zn&&(n(e)&&i.push(e),t(e,n,i))})}(this,t,e),e}queryAllNodes(t){const e=[];return function t(e,n,i){e instanceof zn&&e.childNodes.forEach(e=>{n(e)&&i.push(e),e instanceof zn&&t(e,n,i)})}(this,t,e),e}get children(){return this.childNodes.filter(t=>t instanceof zn)}triggerEventHandler(t,e){this.listeners.forEach(n=>{n.name==t&&n.callback(e)})}}const Vn=new Map;function Bn(t){return Vn.get(t)||null}function jn(t){Vn.set(t.nativeNode,t)}function Hn(t,e){const n=Gn(t),i=Gn(e);return n&&i?function(t,e,n){const i=t[gt()](),s=e[gt()]();for(;;){const t=i.next(),e=s.next();if(t.done&&e.done)return!0;if(t.done||e.done)return!1;if(!n(t.value,e.value))return!1}}(t,e,Hn):!(n||!t||"object"!=typeof t&&"function"!=typeof t||i||!e||"object"!=typeof e&&"function"!=typeof e)||vt(t,e)}class Zn{constructor(t){this.wrapped=t}static wrap(t){return new Zn(t)}static unwrap(t){return Zn.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof Zn}}class Un{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Gn(t){return!!$n(t)&&(Array.isArray(t)||!(t instanceof Map)&&gt()in t)}function $n(t){return null!==t&&("function"==typeof t||"object"==typeof t)}class qn{constructor(){}supports(t){return Gn(t)}create(t){return new Kn(t)}}const Wn=(t,e)=>e;class Kn{constructor(t){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=t||Wn}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,s=null;for(;e||n;){const o=!n||e&&e.currentIndex<Jn(n,i,s)?e:n,r=Jn(o,i,s),a=o.currentIndex;if(o===n)i--,n=n._nextRemoved;else if(e=e._next,null==o.previousIndex)i++;else{s||(s=[]);const t=r-i,e=a-i;if(t!=e){for(let n=0;n<t;n++){const i=n<s.length?s[n]:s[n]=0,o=i+n;e<=o&&o<t&&(s[n]=i+1)}s[o.previousIndex]=e-t}}r!==a&&t(o,r,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Gn(t))throw new Error(`Error trying to diff '${bt(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,i,s=this._itHead,o=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)i=this._trackByFn(e,n=t[e]),null!==s&&vt(s.trackById,i)?(o&&(s=this._verifyReinsertion(s,n,i,e)),vt(s.item,n)||this._addIdentityChange(s,n)):(s=this._mismatch(s,n,i,e),o=!0),s=s._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[gt()]();let i;for(;!(i=n.next()).done;)e(i.value)}}(t,t=>{i=this._trackByFn(e,t),null!==s&&vt(s.trackById,i)?(o&&(s=this._verifyReinsertion(s,t,i,e)),vt(s.item,t)||this._addIdentityChange(s,t)):(s=this._mismatch(s,t,i,e),o=!0),s=s._next,e++}),this.length=e;return this._truncate(s),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(vt(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(vt(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,i)):t=this._addAfter(new Yn(e,n),s,i),t}_verifyReinsertion(t,e,n,i){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?t=this._reinsertAfter(s,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,s=t._nextRemoved;return null===i?this._removalsHead=s:i._nextRemoved=s,null===s?this._removalsTail=i:s._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Xn),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e?t:(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t,t)}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Xn),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Yn{constructor(t,e){this.item=t,this.trackById=e,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 Qn{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&vt(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class Xn{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Qn,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Jn(t,e,n){const i=t.previousIndex;if(null===i)return i;let s=0;return n&&i<n.length&&(s=n[i]),i+e+s}class ti{constructor(t){this.factories=t}static create(t,e){if(null!=e){const n=e.factories.slice();t=t.concat(n)}return new ti(t)}static extend(t){return{provide:ti,useFactory:e=>{if(!e)throw new Error("Cannot extend IterableDiffers without a parent injector");return ti.create(t,e)},deps:[[ti,new Mt,new It]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${t.name||typeof t}'`)}}ti.ngInjectableDef=ot({providedIn:"root",factory:()=>new ti([new qn])});class ei{constructor(t){this.factories=t}static create(t,e){if(e){const n=e.factories.slice();t=t.concat(n)}return new ei(t)}static extend(t){return{provide:ei,useFactory:e=>{if(!e)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return ei.create(t,e)},deps:[[ei,new Mt,new It]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}const ni=[new class{constructor(){}supports(t){return t instanceof Map||$n(t)}create(){return new class{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(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||$n(t)))throw new Error(`Error trying to diff '${bt(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,s=n._next;return i&&(i._next=s),s&&(s._prev=i),n._next=null,n._prev=null,n}const n=new class{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){vt(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}}}],ii=new ti([new qn]),si=new ei(ni),oi=xn(null,"core",[{provide:ze,useValue:"unknown"},{provide:Cn,deps:[Nt]},{provide:mn,deps:[]},{provide:Be,deps:[]}]),ri=new rt("LocaleId");function ai(){return ii}function li(){return si}function hi(t){return t||"en-US"}class ui{constructor(t){}}class ci{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),this.inertBodyElement=this.inertDocument.body,null==this.inertBodyElement){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t),this.inertBodyElement=this.inertDocument.createElement("body"),t.appendChild(this.inertBodyElement)}this.inertBodyElement.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}getInertBodyElement_XHR(t){t="<body><remove></remove>"+t+"</body>";try{t=encodeURI(t)}catch(t){return null}const e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(null);const n=e.response.body;return n.removeChild(n.firstChild),n}getInertBodyElement_DOMParser(t){t="<body><remove></remove>"+t+"</body>";try{const e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(t){return null}}getInertBodyElement_InertDocument(t){const e=this.inertDocument.createElement("template");return"content"in e?(e.innerHTML=t,e):(this.inertBodyElement.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)}stripCustomNsAttrs(t){const e=t.attributes;for(let i=e.length-1;0<i;i--){const n=e.item(i).name;"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||t.removeAttribute(n)}let n=t.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const di=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,pi=/^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 mi(t){return(t=String(t)).match(di)||t.match(pi)?t:(bn()&&console.warn(`WARNING: sanitizing unsafe URL value ${t} (see http://g.co/ng/security#xss)`),"unsafe:"+t)}function fi(t){return(t=String(t)).split(",").map(t=>mi(t.trim())).join(", ")}function _i(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function gi(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const yi=_i("area,br,col,hr,img,wbr"),vi=_i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),bi=_i("rp,rt"),wi=gi(bi,vi),xi=gi(yi,gi(vi,_i("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")),gi(bi,_i("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")),wi),Ei=_i("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Ci=_i("srcset"),Li=gi(Ei,Ci,_i("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"));class ki{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!xi.hasOwnProperty(e))return void(this.sanitizedSomething=!0);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let i=0;i<n.length;i++){const t=n.item(i),e=t.name,s=e.toLowerCase();if(!Li.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let o=t.value;Ei[s]&&(o=mi(o)),Ci[s]&&(o=fi(o)),this.buf.push(" ",e,'="',Ii(o),'"')}this.buf.push(">")}endElement(t){const e=t.nodeName.toLowerCase();xi.hasOwnProperty(e)&&!yi.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(Ii(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const Si=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ti=/([^\#-~ |!])/g;function Ii(t){return t.replace(/&/g,"&amp;").replace(Si,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Ti,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Pi;function Mi(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}const Di=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Ai=/^url\(([^)]+)\)$/,Oi=function(){var t={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return t[t.NONE]="NONE",t[t.HTML]="HTML",t[t.STYLE]="STYLE",t[t.SCRIPT]="SCRIPT",t[t.URL]="URL",t[t.RESOURCE_URL]="RESOURCE_URL",t}();class Ri{}function Ni(t,e,n){const i=t.state,s=1792&i;return s===e?(t.state=-1793&i|n,t.initIndex=-1,!0):s===n}function Fi(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function zi(t,e){return t.nodes[e]}function Vi(t,e){return t.nodes[e]}function Bi(t,e){return t.nodes[e]}function ji(t,e){return t.nodes[e]}function Hi(t,e){return t.nodes[e]}const Zi={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function Ui(t,e,n,i){let s=`ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${e}'. Current value: '${n}'.`;return i&&(s+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(t,e){const n=new Error(t);return Gi(n,e),n}(s,t)}function Gi(t,e){t[ie]=e,t[oe]=e.logError.bind(e)}function $i(t){return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${t}`)}const qi=()=>{},Wi=new Map;function Ki(t){let e=Wi.get(t);return e||(e=bt(t)+"_"+Wi.size,Wi.set(t,e)),e}function Yi(t,e,n,i){if(Zn.isWrapped(i)){i=Zn.unwrap(i);const s=t.def.nodes[e].bindingIndex+n,o=Zn.unwrap(t.oldValues[s]);t.oldValues[s]=new Zn(o)}return i}const Qi="$$undefined",Xi="$$empty";function Ji(t){return{id:Qi,styles:t.styles,encapsulation:t.encapsulation,data:t.data}}let ts=0;function es(t,e,n,i){return!(!(2&t.state)&&vt(t.oldValues[e.bindingIndex+n],i))}function ns(t,e,n,i){return!!es(t,e,n,i)&&(t.oldValues[e.bindingIndex+n]=i,!0)}function is(t,e,n,i){const s=t.oldValues[e.bindingIndex+n];if(1&t.state||!Hn(s,i)){const o=e.bindings[n].name;throw Ui(Zi.createDebugContext(t,e.nodeIndex),`${o}: ${s}`,`${o}: ${i}`,0!=(1&t.state))}}function ss(t){let e=t;for(;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function os(t,e){let n=t;for(;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function rs(t,e,n,i){try{return ss(33554432&t.def.nodes[e].flags?Vi(t,e).componentView:t),Zi.handleEvent(t,e,n,i)}catch(e){t.root.errorHandler.handleError(e)}}function as(t){return t.parent?Vi(t.parent,t.parentNodeDef.nodeIndex):null}function ls(t){return t.parent?t.parentNodeDef.parent:null}function hs(t,e){switch(201347067&e.flags){case 1:return Vi(t,e.nodeIndex).renderElement;case 2:return zi(t,e.nodeIndex).renderText}}function us(t,e){return t?`${t}:${e}`:e}function cs(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function ds(t){return!(!t.parent||32768&t.parentNodeDef.flags)}function ps(t){return 1<<t%32}function ms(t){const e={};let n=0;const i={};return t&&t.forEach(([t,s])=>{"number"==typeof t?(e[t]=s,n|=ps(t)):i[t]=s}),{matchedQueries:e,references:i,matchedQueryIds:n}}function fs(t,e){return t.map(t=>{let n,i;return Array.isArray(t)?[i,n]=t:(i=0,n=t),n&&("function"==typeof n||"object"==typeof n)&&e&&Object.defineProperty(n,Dt,{value:e,configurable:!0}),{flags:i,token:n,tokenKey:Ki(n)}})}function _s(t,e,n){let i=n.renderParent;return i?0==(1&i.flags)||0==(33554432&i.flags)||i.element.componentRendererType&&i.element.componentRendererType.encapsulation===ee.Native?Vi(t,n.renderParent.nodeIndex).renderElement:void 0:e}const gs=new WeakMap;function ys(t){let e=gs.get(t);return e||((e=t(()=>qi)).factory=t,gs.set(t,e)),e}function vs(t,e,n,i,s){3===e&&(n=t.renderer.parentNode(hs(t,t.def.lastRenderRootNode))),bs(t,e,0,t.def.nodes.length-1,n,i,s)}function bs(t,e,n,i,s,o,r){for(let a=n;a<=i;a++){const n=t.def.nodes[a];11&n.flags&&xs(t,n,e,s,o,r),a+=n.childCount}}function ws(t,e,n,i,s,o){let r=t;for(;r&&!cs(r);)r=r.parent;const a=r.parent,l=ls(r),h=l.nodeIndex+l.childCount;for(let u=l.nodeIndex+1;u<=h;u++){const t=a.def.nodes[u];t.ngContentIndex===e&&xs(a,t,n,i,s,o),u+=t.childCount}if(!a.parent){const r=t.root.projectableNodes[e];if(r)for(let e=0;e<r.length;e++)Es(t,r[e],n,i,s,o)}}function xs(t,e,n,i,s,o){if(8&e.flags)ws(t,e.ngContent.index,n,i,s,o);else{const r=hs(t,e);if(3===n&&33554432&e.flags&&48&e.bindingFlags?(16&e.bindingFlags&&Es(t,r,n,i,s,o),32&e.bindingFlags&&Es(Vi(t,e.nodeIndex).componentView,r,n,i,s,o)):Es(t,r,n,i,s,o),16777216&e.flags){const r=Vi(t,e.nodeIndex).viewContainer._embeddedViews;for(let t=0;t<r.length;t++)vs(r[t],n,i,s,o)}1&e.flags&&!e.element.name&&bs(t,n,e.nodeIndex+1,e.nodeIndex+e.childCount,i,s,o)}}function Es(t,e,n,i,s,o){const r=t.renderer;switch(n){case 1:r.appendChild(i,e);break;case 2:r.insertBefore(i,e,s);break;case 3:r.removeChild(i,e);break;case 0:o.push(e)}}const Cs=/^:([^:]+):(.+)$/;function Ls(t){if(":"===t[0]){const e=t.match(Cs);return[e[1],e[2]]}return["",t]}function ks(t){let e=0;for(let n=0;n<t.length;n++)e|=t[n].flags;return e}function Ss(t,e,n,i,s,o){t|=1;const{matchedQueries:r,references:a,matchedQueryIds:l}=ms(e);return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:t,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:r,matchedQueryIds:l,references:a,ngContentIndex:n,childCount:i,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:o?ys(o):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:s||qi},provider:null,text:null,query:null,ngContent:null}}function Ts(t,e,n,i,s,o,r=[],a,l,h,u,c){h||(h=qi);const{matchedQueries:d,references:p,matchedQueryIds:m}=ms(n);let f=null,_=null;o&&([f,_]=Ls(o)),a=a||[];const g=new Array(a.length);for(let b=0;b<a.length;b++){const[t,e,n]=a[b],[i,s]=Ls(e);let o=void 0,r=void 0;switch(15&t){case 4:r=n;break;case 1:case 8:o=n}g[b]={flags:t,ns:i,name:s,nonMinifiedName:s,securityContext:o,suffix:r}}l=l||[];const y=new Array(l.length);for(let b=0;b<l.length;b++){const[t,e]=l[b];y[b]={type:0,target:t,eventName:e,propName:null}}const v=(r=r||[]).map(([t,e])=>{const[n,i]=Ls(t);return[n,i,e]});return c=function(t){if(t&&t.id===Qi){const e=null!=t.encapsulation&&t.encapsulation!==ee.None||t.styles.length||Object.keys(t.data).length;t.id=e?`c${ts++}`:Xi}return t&&t.id===Xi&&(t=null),t||null}(c),u&&(e|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:d,matchedQueryIds:m,references:p,ngContentIndex:i,childCount:s,bindings:g,bindingFlags:ks(g),outputs:y,element:{ns:f,name:_,attrs:v,template:null,componentProvider:null,componentView:u||null,componentRendererType:c,publicProviders:null,allProviders:null,handleEvent:h||qi},provider:null,text:null,query:null,ngContent:null}}function Is(t,e,n){const i=n.element,s=t.root.selectorOrNode,o=t.renderer;let r;if(t.parent||!s){r=i.name?o.createElement(i.name,i.ns):o.createComment("");const s=_s(t,e,n);s&&o.appendChild(s,r)}else r=o.selectRootElement(s);if(i.attrs)for(let a=0;a<i.attrs.length;a++){const[t,e,n]=i.attrs[a];o.setAttribute(r,e,n,t)}return r}function Ps(t,e,n,i){for(let s=0;s<n.outputs.length;s++){const o=n.outputs[s],r=Ms(t,n.nodeIndex,us(o.target,o.eventName));let a=o.target,l=t;"component"===o.target&&(a=null,l=e);const h=l.renderer.listen(a||i,o.eventName,r);t.disposables[n.outputIndex+s]=h}}function Ms(t,e,n){return i=>rs(t,e,n,i)}function Ds(t,e,n,i){if(!ns(t,e,n,i))return!1;const s=e.bindings[n],o=Vi(t,e.nodeIndex),r=o.renderElement,a=s.name;switch(15&s.flags){case 1:!function(t,e,n,i,s,o){const r=e.securityContext;let a=r?t.root.sanitizer.sanitize(r,o):o;a=null!=a?a.toString():null;const l=t.renderer;null!=o?l.setAttribute(n,s,a,i):l.removeAttribute(n,s,i)}(t,s,r,s.ns,a,i);break;case 2:!function(t,e,n,i){const s=t.renderer;i?s.addClass(e,n):s.removeClass(e,n)}(t,r,a,i);break;case 4:!function(t,e,n,i,s){let o=t.root.sanitizer.sanitize(Oi.STYLE,s);if(null!=o){o=o.toString();const t=e.suffix;null!=t&&(o+=t)}else o=null;const r=t.renderer;null!=o?r.setStyle(n,i,o):r.removeStyle(n,i)}(t,s,r,a,i);break;case 8:!function(t,e,n,i,s){const o=e.securityContext;let r=o?t.root.sanitizer.sanitize(o,s):s;t.renderer.setProperty(n,i,r)}(33554432&e.flags&&32&s.flags?o.componentView:t,s,r,a,i)}return!0}const As=new Object,Os=Ki(Nt),Rs=Ki(Rt),Ns=Ki(Qe);function Fs(t,e,n,i){return n=St(n),{index:-1,deps:fs(i,bt(e)),flags:t,token:e,value:n}}function zs(t,e,n=Nt.THROW_IF_NOT_FOUND){const i=Jt(t);try{if(8&e.flags)return e.token;if(2&e.flags&&(n=null),1&e.flags)return t._parent.get(e.token,n);const s=e.tokenKey;switch(s){case Os:case Rs:case Ns:return t}const o=t._def.providersByKey[s];if(o){let e=t._providers[o.index];return void 0===e&&(e=t._providers[o.index]=Vs(t,o)),e===As?void 0:e}if(e.token.ngInjectableDef&&function(t,e){return null!=e.providedIn&&(function(t,n){return t._def.modules.indexOf(e.providedIn)>-1}(t)||"root"===e.providedIn&&t._def.isRoot)}(t,e.token.ngInjectableDef)){const n=t._providers.length;return t._def.providersByKey[e.tokenKey]={flags:5120,value:e.token.ngInjectableDef.factory,deps:[],index:n,token:e.token},t._providers[n]=As,t._providers[n]=Vs(t,t._def.providersByKey[e.tokenKey])}return t._parent.get(e.token,n)}finally{Jt(i)}}function Vs(t,e){let n;switch(201347067&e.flags){case 512:n=function(t,e,n){const i=n.length;switch(i){case 0:return new e;case 1:return new e(zs(t,n[0]));case 2:return new e(zs(t,n[0]),zs(t,n[1]));case 3:return new e(zs(t,n[0]),zs(t,n[1]),zs(t,n[2]));default:const s=new Array(i);for(let e=0;e<i;e++)s[e]=zs(t,n[e]);return new e(...s)}}(t,e.value,e.deps);break;case 1024:n=function(t,e,n){const i=n.length;switch(i){case 0:return e();case 1:return e(zs(t,n[0]));case 2:return e(zs(t,n[0]),zs(t,n[1]));case 3:return e(zs(t,n[0]),zs(t,n[1]),zs(t,n[2]));default:const s=Array(i);for(let e=0;e<i;e++)s[e]=zs(t,n[e]);return e(...s)}}(t,e.value,e.deps);break;case 2048:n=zs(t,e.deps[0]);break;case 256:n=e.value}return n===As||null==n||"object"!=typeof n||131072&e.flags||"function"!=typeof n.ngOnDestroy||(e.flags|=131072),void 0===n?As:n}function Bs(t,e){const n=t.viewContainer._embeddedViews;if((null==e||e>=n.length)&&(e=n.length-1),e<0)return null;const i=n[e];return i.viewContainerParent=null,Us(n,e),Zi.dirtyParentQueries(i),Hs(i),i}function js(t,e,n){const i=e?hs(e,e.def.lastRenderRootNode):t.renderElement;vs(n,2,n.renderer.parentNode(i),n.renderer.nextSibling(i),void 0)}function Hs(t){vs(t,3,null,null,void 0)}function Zs(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Us(t,e){e>=t.length-1?t.pop():t.splice(e,1)}const Gs=new Object;function $s(t,e,n,i,s,o){return new qs(t,e,n,i,s,o)}class qs extends Ge{constructor(t,e,n,i,s,o){super(),this.selector=t,this.componentType=e,this._inputs=i,this._outputs=s,this.ngContentSelectors=o,this.viewDefFactory=n}get inputs(){const t=[],e=this._inputs;for(let n in e)t.push({propName:n,templateName:e[n]});return t}get outputs(){const t=[];for(let e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t}create(t,e,n,i){if(!i)throw new Error("ngModule should be provided");const s=ys(this.viewDefFactory),o=s.nodes[0].element.componentProvider.nodeIndex,r=Zi.createRootView(t,e||[],n,s,i,Gs),a=Bi(r,o).instance;return n&&r.renderer.setAttribute(Vi(r,0).renderElement,"ng-version",ne.full),new Ws(r,new Xs(r),a)}}class Ws extends Ue{constructor(t,e,n){super(),this._view=t,this._viewRef=e,this._component=n,this._elDef=this._view.def.nodes[0],this.hostView=e,this.changeDetectorRef=e,this.instance=n}get location(){return new Mn(Vi(this._view,this._elDef.nodeIndex).renderElement)}get injector(){return new no(this._view,this._elDef)}get componentType(){return this._component.constructor}destroy(){this._viewRef.destroy()}onDestroy(t){this._viewRef.onDestroy(t)}}function Ks(t,e,n){return new Ys(t,e,n)}class Ys{constructor(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}get element(){return new Mn(this._data.renderElement)}get injector(){return new no(this._view,this._elDef)}get parentInjector(){let t=this._view,e=this._elDef.parent;for(;!e&&t;)e=ls(t),t=t.parent;return t?new no(t,e):new no(this._view,null)}clear(){for(let t=this._embeddedViews.length-1;t>=0;t--){const e=Bs(this._data,t);Zi.destroyView(e)}}get(t){const e=this._embeddedViews[t];if(e){const t=new Xs(e);return t.attachToViewContainerRef(this),t}return null}get length(){return this._embeddedViews.length}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,s){const o=n||this.parentInjector;s||t instanceof Ye||(s=o.get(Qe));const r=t.create(o,i,void 0,s);return this.insert(r.hostView,e),r}insert(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");const n=t;return function(t,e,n,i){let s=e.viewContainer._embeddedViews;null!==n&&void 0!==n||(n=s.length),i.viewContainerParent=t,Zs(s,n,i),function(t,e){const n=as(e);if(!n||n===t||16&e.state)return;e.state|=16;let i=n.template._projectedViews;i||(i=n.template._projectedViews=[]),i.push(e),function(t,e){if(4&e.flags)return;t.nodeFlags|=4,e.flags|=4;let n=e.parent;for(;n;)n.childFlags|=4,n=n.parent}(e.parent.def,e.parentNodeDef)}(e,i),Zi.dirtyParentQueries(i),js(e,n>0?s[n-1]:null,i)}(this._view,this._data,e,n._view),n.attachToViewContainerRef(this),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");const n=this._embeddedViews.indexOf(t._view);return function(t,e,i){const s=t.viewContainer._embeddedViews,o=s[n];Us(s,n),null==i&&(i=s.length),Zs(s,i,o),Zi.dirtyParentQueries(o),Hs(o),js(t,i>0?s[i-1]:null,o)}(this._data,0,e),t}indexOf(t){return this._embeddedViews.indexOf(t._view)}remove(t){const e=Bs(this._data,t);e&&Zi.destroyView(e)}detach(t){const e=Bs(this._data,t);return e?new Xs(e):null}}function Qs(t){return new Xs(t)}class Xs{constructor(t){this._view=t,this._viewContainerRef=null,this._appRef=null}get rootNodes(){return function(t){const e=[];return vs(t,0,void 0,void 0,e),e}(this._view)}get context(){return this._view.context}get destroyed(){return 0!=(128&this._view.state)}markForCheck(){ss(this._view)}detach(){this._view.state&=-5}detectChanges(){const t=this._view.root.rendererFactory;t.begin&&t.begin();try{Zi.checkAndUpdateView(this._view)}finally{t.end&&t.end()}}checkNoChanges(){Zi.checkNoChangesView(this._view)}reattach(){this._view.state|=4}onDestroy(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)}destroy(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Zi.destroyView(this._view)}detachFromAppRef(){this._appRef=null,Hs(this._view),Zi.dirtyParentQueries(this._view)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}}function Js(t,e){return new to(t,e)}class to extends An{constructor(t,e){super(),this._parentView=t,this._def=e}createEmbeddedView(t){return new Xs(Zi.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))}get elementRef(){return new Mn(Vi(this._parentView,this._def.nodeIndex).renderElement)}}function eo(t,e){return new no(t,e)}class no{constructor(t,e){this.view=t,this.elDef=e}get(t,e=Nt.THROW_IF_NOT_FOUND){return Zi.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:Ki(t)},e)}}function io(t,e){const n=t.def.nodes[e];if(1&n.flags){const e=Vi(t,n.nodeIndex);return n.element.template?e.template:e.renderElement}if(2&n.flags)return zi(t,n.nodeIndex).renderText;if(20240&n.flags)return Bi(t,n.nodeIndex).instance;throw new Error(`Illegal state: read nodeValue for node index ${e}`)}function so(t){return new oo(t.renderer)}class oo{constructor(t){this.delegate=t}selectRootElement(t){return this.delegate.selectRootElement(t)}createElement(t,e){const[n,i]=Ls(e),s=this.delegate.createElement(i,n);return t&&this.delegate.appendChild(t,s),s}createViewRoot(t){return t}createTemplateAnchor(t){const e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e}createText(t,e){const n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n}projectNodes(t,e){for(let n=0;n<e.length;n++)this.delegate.appendChild(t,e[n])}attachViewAfter(t,e){const n=this.delegate.parentNode(t),i=this.delegate.nextSibling(t);for(let s=0;s<e.length;s++)this.delegate.insertBefore(n,e[s],i)}detachView(t){for(let e=0;e<t.length;e++){const n=t[e],i=this.delegate.parentNode(n);this.delegate.removeChild(i,n)}}destroyView(t,e){for(let n=0;n<e.length;n++)this.delegate.destroyNode(e[n])}listen(t,e,n){return this.delegate.listen(t,e,n)}listenGlobal(t,e,n){return this.delegate.listen(t,e,n)}setElementProperty(t,e,n){this.delegate.setProperty(t,e,n)}setElementAttribute(t,e,n){const[i,s]=Ls(e);null!=n?this.delegate.setAttribute(t,s,n,i):this.delegate.removeAttribute(t,s,i)}setBindingDebugInfo(t,e,n){}setElementClass(t,e,n){n?this.delegate.addClass(t,e):this.delegate.removeClass(t,e)}setElementStyle(t,e,n){null!=n?this.delegate.setStyle(t,e,n):this.delegate.removeStyle(t,e)}invokeElementMethod(t,e,n){t[e].apply(t,n)}setText(t,e){this.delegate.setValue(t,e)}animate(){throw new Error("Renderer.animate is no longer supported!")}}function ro(t,e,n,i){return new ao(t,e,n,i)}class ao{constructor(t,e,n,i){this._moduleType=t,this._parent=e,this._bootstrapComponents=n,this._def=i,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(t){const e=t._def,n=t._providers=new Array(e.providers.length);for(let i=0;i<e.providers.length;i++){const s=e.providers[i];4096&s.flags||void 0===n[i]&&(n[i]=Vs(t,s))}}(this)}get(t,e=Nt.THROW_IF_NOT_FOUND,n=0){let i=0;return 4&n?i|=1:2&n&&(i|=4),zs(this,{token:t,tokenKey:Ki(t),flags:i},e)}get instance(){return this.get(this._moduleType)}get componentFactoryResolver(){return this.get(We)}destroy(){if(this._destroyed)throw new Error(`The ng module ${bt(this.instance.constructor)} has already been destroyed.`);this._destroyed=!0,function(t,e){const n=t._def,i=new Set;for(let s=0;s<n.providers.length;s++)if(131072&n.providers[s].flags){const e=t._providers[s];if(e&&e!==As){const t=e.ngOnDestroy;"function"!=typeof t||i.has(e)||(t.apply(e),i.add(e))}}}(this),this._destroyListeners.forEach(t=>t())}onDestroy(t){this._destroyListeners.push(t)}}const lo=Ki(class{}),ho=Ki(Pn),uo=Ki(Mn),co=Ki(On),po=Ki(An),mo=Ki(Rn),fo=Ki(Nt),_o=Ki(Rt);function go(t,e,n,i,s,o,r,a){const l=[];if(r)for(let u in r){const[t,e]=r[u];l[t]={flags:8,name:u,nonMinifiedName:e,ns:null,securityContext:null,suffix:null}}const h=[];if(a)for(let u in a)h.push({type:1,propName:u,target:null,eventName:a[u]});return bo(t,e|=16384,n,i,s,s,o,l,h)}function yo(t,e,n){return bo(-1,t|=16,null,0,e,e,n)}function vo(t,e,n,i,s){return bo(-1,t,e,0,n,i,s)}function bo(t,e,n,i,s,o,r,a,l){const{matchedQueries:h,references:u,matchedQueryIds:c}=ms(n);l||(l=[]),a||(a=[]),o=St(o);const d=fs(r,bt(s));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:h,matchedQueryIds:c,references:u,ngContentIndex:-1,childCount:i,bindings:a,bindingFlags:ks(a),outputs:l,element:null,provider:{token:s,value:o,deps:d},text:null,query:null,ngContent:null}}function wo(t,e){return Lo(t,e)}function xo(t,e){let n=t;for(;n.parent&&!cs(n);)n=n.parent;return ko(n.parent,ls(n),!0,e.provider.value,e.provider.deps)}function Eo(t,e){const n=ko(t,e.parent,(32768&e.flags)>0,e.provider.value,e.provider.deps);if(e.outputs.length)for(let i=0;i<e.outputs.length;i++){const s=e.outputs[i],o=n[s.propName].subscribe(Co(t,e.parent.nodeIndex,s.eventName));t.disposables[e.outputIndex+i]=o.unsubscribe.bind(o)}return n}function Co(t,e,n){return i=>rs(t,e,n,i)}function Lo(t,e){const n=(8192&e.flags)>0,i=e.provider;switch(201347067&e.flags){case 512:return ko(t,e.parent,n,i.value,i.deps);case 1024:return function(t,e,n,i,s){const o=s.length;switch(o){case 0:return i();case 1:return i(To(t,e,n,s[0]));case 2:return i(To(t,e,n,s[0]),To(t,e,n,s[1]));case 3:return i(To(t,e,n,s[0]),To(t,e,n,s[1]),To(t,e,n,s[2]));default:const r=Array(o);for(let i=0;i<o;i++)r[i]=To(t,e,n,s[i]);return i(...r)}}(t,e.parent,n,i.value,i.deps);case 2048:return To(t,e.parent,n,i.deps[0]);case 256:return i.value}}function ko(t,e,n,i,s){const o=s.length;switch(o){case 0:return new i;case 1:return new i(To(t,e,n,s[0]));case 2:return new i(To(t,e,n,s[0]),To(t,e,n,s[1]));case 3:return new i(To(t,e,n,s[0]),To(t,e,n,s[1]),To(t,e,n,s[2]));default:const r=new Array(o);for(let i=0;i<o;i++)r[i]=To(t,e,n,s[i]);return new i(...r)}}const So={};function To(t,e,n,i,s=Nt.THROW_IF_NOT_FOUND){if(8&i.flags)return i.token;const o=t;2&i.flags&&(s=null);const r=i.tokenKey;r===mo&&(n=!(!e||!e.element.componentView)),e&&1&i.flags&&(n=!1,e=e.parent);let a=t;for(;a;){if(e)switch(r){case lo:return so(Io(a,e,n));case ho:return Io(a,e,n).renderer;case uo:return new Mn(Vi(a,e.nodeIndex).renderElement);case co:return Vi(a,e.nodeIndex).viewContainer;case po:if(e.element.template)return Vi(a,e.nodeIndex).template;break;case mo:return Qs(Io(a,e,n));case fo:case _o:return eo(a,e);default:const t=(n?e.element.allProviders:e.element.publicProviders)[r];if(t){let e=Bi(a,t.nodeIndex);return e||(e={instance:Lo(a,t)},a.nodes[t.nodeIndex]=e),e.instance}}n=cs(a),e=ls(a),a=a.parent,4&i.flags&&(a=null)}const l=o.root.injector.get(i.token,So);return l!==So||s===So?l:o.root.ngModule.injector.get(i.token,s)}function Io(t,e,n){let i;if(n)i=Vi(t,e.nodeIndex).componentView;else for(i=t;i.parent&&!cs(i);)i=i.parent;return i}function Po(t,e,n,i,s,o){if(32768&n.flags){const e=Vi(t,n.parent.nodeIndex).componentView;2&e.def.flags&&(e.state|=8)}if(e.instance[n.bindings[i].name]=s,524288&n.flags){o=o||{};const e=Zn.unwrap(t.oldValues[n.bindingIndex+i]);o[n.bindings[i].nonMinifiedName]=new Un(e,s,0!=(2&t.state))}return t.oldValues[n.bindingIndex+i]=s,o}function Mo(t,e){if(!(t.def.nodeFlags&e))return;const n=t.def.nodes;let i=0;for(let s=0;s<n.length;s++){const o=n[s];let r=o.parent;for(!r&&o.flags&e&&Ao(t,s,o.flags&e,i++),0==(o.childFlags&e)&&(s+=o.childCount);r&&1&r.flags&&s===r.nodeIndex+r.childCount;)r.directChildFlags&e&&(i=Do(t,r,e,i)),r=r.parent}}function Do(t,e,n,i){for(let s=e.nodeIndex+1;s<=e.nodeIndex+e.childCount;s++){const e=t.def.nodes[s];e.flags&n&&Ao(t,s,e.flags&n,i++),s+=e.childCount}return i}function Ao(t,e,n,i){const s=Bi(t,e);if(!s)return;const o=s.instance;o&&(Zi.setCurrentNode(t,e),1048576&n&&Fi(t,512,i)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&Fi(t,768,i)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}function Oo(t,e,n){let i=[];for(let s in n)i.push({propName:s,bindingType:n[s]});return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,ngContentIndex:-1,matchedQueries:{},matchedQueryIds:0,references:{},childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:{id:e,filterId:ps(e),bindings:i},ngContent:null}}function Ro(t){const e=t.def.nodeMatchedQueries;for(;t.parent&&ds(t);){let n=t.parentNodeDef;t=t.parent;const i=n.nodeIndex+n.childCount;for(let s=0;s<=i;s++){const i=t.def.nodes[s];67108864&i.flags&&536870912&i.flags&&(i.query.filterId&e)===i.query.filterId&&Hi(t,s).setDirty(),!(1&i.flags&&s+i.childCount<n.nodeIndex)&&67108864&i.childFlags&&536870912&i.childFlags||(s+=i.childCount)}}if(134217728&t.def.nodeFlags)for(let n=0;n<t.def.nodes.length;n++){const e=t.def.nodes[n];134217728&e.flags&&536870912&e.flags&&Hi(t,n).setDirty(),n+=e.childCount}}function No(t,e){const n=Hi(t,e.nodeIndex);if(!n.dirty)return;let i,s=void 0;if(67108864&e.flags){const n=e.parent.parent;s=Fo(t,n.nodeIndex,n.nodeIndex+n.childCount,e.query,[]),i=Bi(t,e.parent.nodeIndex).instance}else 134217728&e.flags&&(s=Fo(t,0,t.def.nodes.length-1,e.query,[]),i=t.component);n.reset(s);const o=e.query.bindings;let r=!1;for(let a=0;a<o.length;a++){const t=o[a];let e;switch(t.bindingType){case 0:e=n.first;break;case 1:e=n,r=!0}i[t.propName]=e}r&&n.notifyOnChanges()}function Fo(t,e,n,i,s){for(let o=e;o<=n;o++){const e=t.def.nodes[o],n=e.matchedQueries[i.id];if(null!=n&&s.push(zo(t,e,n)),1&e.flags&&e.element.template&&(e.element.template.nodeMatchedQueries&i.filterId)===i.filterId){const n=Vi(t,o);if((e.childMatchedQueries&i.filterId)===i.filterId&&(Fo(t,o+1,o+e.childCount,i,s),o+=e.childCount),16777216&e.flags){const t=n.viewContainer._embeddedViews;for(let e=0;e<t.length;e++){const o=t[e],r=as(o);r&&r===n&&Fo(o,0,o.def.nodes.length-1,i,s)}}const r=n.template._projectedViews;if(r)for(let t=0;t<r.length;t++){const e=r[t];Fo(e,0,e.def.nodes.length-1,i,s)}}(e.childMatchedQueries&i.filterId)!==i.filterId&&(o+=e.childCount)}return s}function zo(t,e,n){if(null!=n)switch(n){case 1:return Vi(t,e.nodeIndex).renderElement;case 0:return new Mn(Vi(t,e.nodeIndex).renderElement);case 2:return Vi(t,e.nodeIndex).template;case 3:return Vi(t,e.nodeIndex).viewContainer;case 4:return Bi(t,e.nodeIndex).instance}}function Vo(t,e){return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:t,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:e}}}function Bo(t,e,n){const i=_s(t,e,n);i&&ws(t,n.ngContent.index,1,i,null,void 0)}function jo(t,e){return function(t,e,n){const i=new Array(n.length);for(let s=0;s<n.length;s++){const t=n[s];i[s]={flags:8,name:t,ns:null,nonMinifiedName:t,securityContext:null,suffix:null}}return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:128,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:-1,childCount:0,bindings:i,bindingFlags:ks(i),outputs:[],element:null,provider:null,text:null,query:null,ngContent:null}}(0,t,new Array(e+1))}function Ho(t,e,n){const i=new Array(n.length-1);for(let s=1;s<n.length;s++)i[s-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:n[s]};return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:e,childCount:0,bindings:i,bindingFlags:8,outputs:[],element:null,provider:null,text:{prefix:n[0]},query:null,ngContent:null}}function Zo(t,e,n){let i;const s=t.renderer;i=s.createText(n.text.prefix);const o=_s(t,e,n);return o&&s.appendChild(o,i),{renderText:i}}function Uo(t,e){return(null!=t?t.toString():"")+e.suffix}function Go(t,e,n,i){let s=0,o=0,r=0,a=0,l=0,h=null,u=null,c=!1,d=!1,p=null;for(let m=0;m<e.length;m++){const t=e[m];if(t.nodeIndex=m,t.parent=h,t.bindingIndex=s,t.outputIndex=o,t.renderParent=u,r|=t.flags,l|=t.matchedQueryIds,t.element){const e=t.element;e.publicProviders=h?h.element.publicProviders:Object.create(null),e.allProviders=e.publicProviders,c=!1,d=!1,t.element.template&&(l|=t.element.template.nodeMatchedQueries)}if(qo(h,t,e.length),s+=t.bindings.length,o+=t.outputs.length,!u&&3&t.flags&&(p=t),20224&t.flags){c||(c=!0,h.element.publicProviders=Object.create(h.element.publicProviders),h.element.allProviders=h.element.publicProviders);const e=0!=(32768&t.flags);0==(8192&t.flags)||e?h.element.publicProviders[Ki(t.provider.token)]=t:(d||(d=!0,h.element.allProviders=Object.create(h.element.publicProviders)),h.element.allProviders[Ki(t.provider.token)]=t),e&&(h.element.componentProvider=t)}if(h?(h.childFlags|=t.flags,h.directChildFlags|=t.flags,h.childMatchedQueries|=t.matchedQueryIds,t.element&&t.element.template&&(h.childMatchedQueries|=t.element.template.nodeMatchedQueries)):a|=t.flags,t.childCount>0)h=t,$o(t)||(u=t);else for(;h&&m===h.nodeIndex+h.childCount;){const t=h.parent;t&&(t.childFlags|=h.childFlags,t.childMatchedQueries|=h.childMatchedQueries),u=(h=t)&&$o(h)?h.renderParent:h}}return{factory:null,nodeFlags:r,rootNodeFlags:a,nodeMatchedQueries:l,flags:t,nodes:e,updateDirectives:n||qi,updateRenderer:i||qi,handleEvent:(t,n,i,s)=>e[n].element.handleEvent(t,i,s),bindingCount:s,outputCount:o,lastRenderRootNode:p}}function $o(t){return 0!=(1&t.flags)&&null===t.element.name}function qo(t,e,n){const i=e.element&&e.element.template;if(i){if(!i.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(i.lastRenderRootNode&&16777216&i.lastRenderRootNode.flags)throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${e.nodeIndex}!`)}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${e.nodeIndex}!`);if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${e.nodeIndex}!`);if(134217728&e.flags&&t)throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${e.nodeIndex}!`)}if(e.childCount){const i=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=i&&e.nodeIndex+e.childCount>i)throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${e.nodeIndex}!`)}}function Wo(t,e,n,i){const s=Qo(t.root,t.renderer,t,e,n);return Xo(s,t.component,i),Jo(s),s}function Ko(t,e,n){const i=Qo(t,t.renderer,null,null,e);return Xo(i,n,n),Jo(i),i}function Yo(t,e,n,i){const s=e.element.componentRendererType;let o;return o=s?t.root.rendererFactory.createRenderer(i,s):t.root.renderer,Qo(t.root,o,t,e.element.componentProvider,n)}function Qo(t,e,n,i,s){const o=new Array(s.nodes.length),r=s.outputCount?new Array(s.outputCount):null;return{def:s,parent:n,viewContainerParent:null,parentNodeDef:i,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(s.bindingCount),disposables:r,initIndex:-1}}function Xo(t,e,n){t.component=e,t.context=n}function Jo(t){let e;cs(t)&&(e=Vi(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);const n=t.def,i=t.nodes;for(let s=0;s<n.nodes.length;s++){const o=n.nodes[s];let r;switch(Zi.setCurrentNode(t,s),201347067&o.flags){case 1:const n=Is(t,e,o);let a=void 0;if(33554432&o.flags){const e=ys(o.element.componentView);a=Zi.createComponentView(t,o,e,n)}Ps(t,a,o,n),r={renderElement:n,componentView:a,viewContainer:null,template:o.element.template?Js(t,o):void 0},16777216&o.flags&&(r.viewContainer=Ks(t,o,r));break;case 2:r=Zo(t,e,o);break;case 512:case 1024:case 2048:case 256:(r=i[s])||4096&o.flags||(r={instance:wo(t,o)});break;case 16:r={instance:xo(t,o)};break;case 16384:(r=i[s])||(r={instance:Eo(t,o)}),32768&o.flags&&Xo(Vi(t,o.parent.nodeIndex).componentView,r.instance,r.instance);break;case 32:case 64:case 128:r={value:void 0};break;case 67108864:case 134217728:r=new Dn;break;case 8:Bo(t,e,o),r=void 0}i[s]=r}lr(t,ar.CreateViewNodes),dr(t,201326592,268435456,0)}function tr(t){ir(t),Zi.updateDirectives(t,1),hr(t,ar.CheckNoChanges),Zi.updateRenderer(t,1),lr(t,ar.CheckNoChanges),t.state&=-97}function er(t){1&t.state?(t.state&=-2,t.state|=2):t.state&=-3,Ni(t,0,256),ir(t),Zi.updateDirectives(t,0),hr(t,ar.CheckAndUpdate),dr(t,67108864,536870912,0);let e=Ni(t,256,512);Mo(t,2097152|(e?1048576:0)),Zi.updateRenderer(t,0),lr(t,ar.CheckAndUpdate),dr(t,134217728,536870912,0),Mo(t,8388608|((e=Ni(t,512,768))?4194304:0)),2&t.def.flags&&(t.state&=-9),t.state&=-97,Ni(t,768,1024)}function nr(t,e,n,i,s,o,r,a,l,h,u,c,d){return 0===n?function(t,e,n,i,s,o,r,a,l,h,u,c){switch(201347067&e.flags){case 1:return function(t,e,n,i,s,o,r,a,l,h,u,c){const d=e.bindings.length;let p=!1;return d>0&&Ds(t,e,0,n)&&(p=!0),d>1&&Ds(t,e,1,i)&&(p=!0),d>2&&Ds(t,e,2,s)&&(p=!0),d>3&&Ds(t,e,3,o)&&(p=!0),d>4&&Ds(t,e,4,r)&&(p=!0),d>5&&Ds(t,e,5,a)&&(p=!0),d>6&&Ds(t,e,6,l)&&(p=!0),d>7&&Ds(t,e,7,h)&&(p=!0),d>8&&Ds(t,e,8,u)&&(p=!0),d>9&&Ds(t,e,9,c)&&(p=!0),p}(t,e,n,i,s,o,r,a,l,h,u,c);case 2:return function(t,e,n,i,s,o,r,a,l,h,u,c){let d=!1;const p=e.bindings,m=p.length;if(m>0&&ns(t,e,0,n)&&(d=!0),m>1&&ns(t,e,1,i)&&(d=!0),m>2&&ns(t,e,2,s)&&(d=!0),m>3&&ns(t,e,3,o)&&(d=!0),m>4&&ns(t,e,4,r)&&(d=!0),m>5&&ns(t,e,5,a)&&(d=!0),m>6&&ns(t,e,6,l)&&(d=!0),m>7&&ns(t,e,7,h)&&(d=!0),m>8&&ns(t,e,8,u)&&(d=!0),m>9&&ns(t,e,9,c)&&(d=!0),d){let d=e.text.prefix;m>0&&(d+=Uo(n,p[0])),m>1&&(d+=Uo(i,p[1])),m>2&&(d+=Uo(s,p[2])),m>3&&(d+=Uo(o,p[3])),m>4&&(d+=Uo(r,p[4])),m>5&&(d+=Uo(a,p[5])),m>6&&(d+=Uo(l,p[6])),m>7&&(d+=Uo(h,p[7])),m>8&&(d+=Uo(u,p[8])),m>9&&(d+=Uo(c,p[9]));const f=zi(t,e.nodeIndex).renderText;t.renderer.setValue(f,d)}return d}(t,e,n,i,s,o,r,a,l,h,u,c);case 16384:return function(t,e,n,i,s,o,r,a,l,h,u,c){const d=Bi(t,e.nodeIndex),p=d.instance;let m=!1,f=void 0;const _=e.bindings.length;return _>0&&es(t,e,0,n)&&(m=!0,f=Po(t,d,e,0,n,f)),_>1&&es(t,e,1,i)&&(m=!0,f=Po(t,d,e,1,i,f)),_>2&&es(t,e,2,s)&&(m=!0,f=Po(t,d,e,2,s,f)),_>3&&es(t,e,3,o)&&(m=!0,f=Po(t,d,e,3,o,f)),_>4&&es(t,e,4,r)&&(m=!0,f=Po(t,d,e,4,r,f)),_>5&&es(t,e,5,a)&&(m=!0,f=Po(t,d,e,5,a,f)),_>6&&es(t,e,6,l)&&(m=!0,f=Po(t,d,e,6,l,f)),_>7&&es(t,e,7,h)&&(m=!0,f=Po(t,d,e,7,h,f)),_>8&&es(t,e,8,u)&&(m=!0,f=Po(t,d,e,8,u,f)),_>9&&es(t,e,9,c)&&(m=!0,f=Po(t,d,e,9,c,f)),f&&p.ngOnChanges(f),65536&e.flags&&Fi(t,256,e.nodeIndex)&&p.ngOnInit(),262144&e.flags&&p.ngDoCheck(),m}(t,e,n,i,s,o,r,a,l,h,u,c);case 32:case 64:case 128:return function(t,e,n,i,s,o,r,a,l,h,u,c){const d=e.bindings;let p=!1;const m=d.length;if(m>0&&ns(t,e,0,n)&&(p=!0),m>1&&ns(t,e,1,i)&&(p=!0),m>2&&ns(t,e,2,s)&&(p=!0),m>3&&ns(t,e,3,o)&&(p=!0),m>4&&ns(t,e,4,r)&&(p=!0),m>5&&ns(t,e,5,a)&&(p=!0),m>6&&ns(t,e,6,l)&&(p=!0),m>7&&ns(t,e,7,h)&&(p=!0),m>8&&ns(t,e,8,u)&&(p=!0),m>9&&ns(t,e,9,c)&&(p=!0),p){const p=ji(t,e.nodeIndex);let f;switch(201347067&e.flags){case 32:f=new Array(d.length),m>0&&(f[0]=n),m>1&&(f[1]=i),m>2&&(f[2]=s),m>3&&(f[3]=o),m>4&&(f[4]=r),m>5&&(f[5]=a),m>6&&(f[6]=l),m>7&&(f[7]=h),m>8&&(f[8]=u),m>9&&(f[9]=c);break;case 64:f={},m>0&&(f[d[0].name]=n),m>1&&(f[d[1].name]=i),m>2&&(f[d[2].name]=s),m>3&&(f[d[3].name]=o),m>4&&(f[d[4].name]=r),m>5&&(f[d[5].name]=a),m>6&&(f[d[6].name]=l),m>7&&(f[d[7].name]=h),m>8&&(f[d[8].name]=u),m>9&&(f[d[9].name]=c);break;case 128:const t=n;switch(m){case 1:f=t.transform(n);break;case 2:f=t.transform(i);break;case 3:f=t.transform(i,s);break;case 4:f=t.transform(i,s,o);break;case 5:f=t.transform(i,s,o,r);break;case 6:f=t.transform(i,s,o,r,a);break;case 7:f=t.transform(i,s,o,r,a,l);break;case 8:f=t.transform(i,s,o,r,a,l,h);break;case 9:f=t.transform(i,s,o,r,a,l,h,u);break;case 10:f=t.transform(i,s,o,r,a,l,h,u,c)}}p.value=f}return p}(t,e,n,i,s,o,r,a,l,h,u,c);default:throw"unreachable"}}(t,e,i,s,o,r,a,l,h,u,c,d):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){let i=!1;for(let s=0;s<n.length;s++)Ds(t,e,s,n[s])&&(i=!0);return i}(t,e,n);case 2:return function(t,e,n){const i=e.bindings;let s=!1;for(let o=0;o<n.length;o++)ns(t,e,o,n[o])&&(s=!0);if(s){let s="";for(let t=0;t<n.length;t++)s+=Uo(n[t],i[t]);s=e.text.prefix+s;const o=zi(t,e.nodeIndex).renderText;t.renderer.setValue(o,s)}return s}(t,e,n);case 16384:return function(t,e,n){const i=Bi(t,e.nodeIndex),s=i.instance;let o=!1,r=void 0;for(let a=0;a<n.length;a++)es(t,e,a,n[a])&&(o=!0,r=Po(t,i,e,a,n[a],r));return r&&s.ngOnChanges(r),65536&e.flags&&Fi(t,256,e.nodeIndex)&&s.ngOnInit(),262144&e.flags&&s.ngDoCheck(),o}(t,e,n);case 32:case 64:case 128:return function(t,e,n){const i=e.bindings;let s=!1;for(let o=0;o<n.length;o++)ns(t,e,o,n[o])&&(s=!0);if(s){const s=ji(t,e.nodeIndex);let o;switch(201347067&e.flags){case 32:o=n;break;case 64:o={};for(let e=0;e<n.length;e++)o[i[e].name]=n[e];break;case 128:const t=n[0],s=n.slice(1);o=t.transform(...s)}s.value=o}return s}(t,e,n);default:throw"unreachable"}}(t,e,i)}function ir(t){const e=t.def;if(4&e.nodeFlags)for(let n=0;n<e.nodes.length;n++){const i=e.nodes[n];if(4&i.flags){const e=Vi(t,n).template._projectedViews;if(e)for(let n=0;n<e.length;n++){const i=e[n];i.state|=32,os(i,t)}}else 0==(4&i.childFlags)&&(n+=i.childCount)}}function sr(t,e,n,i,s,o,r,a,l,h,u,c,d){return 0===n?function(t,e,n,i,s,o,r,a,l,h,u,c){const d=e.bindings.length;d>0&&is(t,e,0,n),d>1&&is(t,e,1,i),d>2&&is(t,e,2,s),d>3&&is(t,e,3,o),d>4&&is(t,e,4,r),d>5&&is(t,e,5,a),d>6&&is(t,e,6,l),d>7&&is(t,e,7,h),d>8&&is(t,e,8,u),d>9&&is(t,e,9,c)}(t,e,i,s,o,r,a,l,h,u,c,d):function(t,e,n){for(let i=0;i<n.length;i++)is(t,e,i,n[i])}(t,e,i),!1}function or(t,e){if(Hi(t,e.nodeIndex).dirty)throw Ui(Zi.createDebugContext(t,e.nodeIndex),`Query ${e.query.id} not dirty`,`Query ${e.query.id} dirty`,0!=(1&t.state))}function rr(t){if(!(128&t.state)){if(hr(t,ar.Destroy),lr(t,ar.Destroy),Mo(t,131072),t.disposables)for(let e=0;e<t.disposables.length;e++)t.disposables[e]();!function(t){if(!(16&t.state))return;const e=as(t);if(e){const n=e.template._projectedViews;n&&(Us(n,n.indexOf(t)),Zi.dirtyParentQueries(t))}}(t),t.renderer.destroyNode&&function(t){const e=t.def.nodes.length;for(let n=0;n<e;n++){const e=t.def.nodes[n];1&e.flags?t.renderer.destroyNode(Vi(t,n).renderElement):2&e.flags?t.renderer.destroyNode(zi(t,n).renderText):(67108864&e.flags||134217728&e.flags)&&Hi(t,n).destroy()}}(t),cs(t)&&t.renderer.destroy(),t.state|=128}}const ar=function(){var t={CreateViewNodes:0,CheckNoChanges:1,CheckNoChangesProjectedViews:2,CheckAndUpdate:3,CheckAndUpdateProjectedViews:4,Destroy:5};return t[t.CreateViewNodes]="CreateViewNodes",t[t.CheckNoChanges]="CheckNoChanges",t[t.CheckNoChangesProjectedViews]="CheckNoChangesProjectedViews",t[t.CheckAndUpdate]="CheckAndUpdate",t[t.CheckAndUpdateProjectedViews]="CheckAndUpdateProjectedViews",t[t.Destroy]="Destroy",t}();function lr(t,e){const n=t.def;if(33554432&n.nodeFlags)for(let i=0;i<n.nodes.length;i++){const s=n.nodes[i];33554432&s.flags?ur(Vi(t,i).componentView,e):0==(33554432&s.childFlags)&&(i+=s.childCount)}}function hr(t,e){const n=t.def;if(16777216&n.nodeFlags)for(let i=0;i<n.nodes.length;i++){const s=n.nodes[i];if(16777216&s.flags){const n=Vi(t,i).viewContainer._embeddedViews;for(let t=0;t<n.length;t++)ur(n[t],e)}else 0==(16777216&s.childFlags)&&(i+=s.childCount)}}function ur(t,e){const n=t.state;switch(e){case ar.CheckNoChanges:0==(128&n)&&(12==(12&n)?tr(t):64&n&&cr(t,ar.CheckNoChangesProjectedViews));break;case ar.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?tr(t):64&n&&cr(t,e));break;case ar.CheckAndUpdate:0==(128&n)&&(12==(12&n)?er(t):64&n&&cr(t,ar.CheckAndUpdateProjectedViews));break;case ar.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?er(t):64&n&&cr(t,e));break;case ar.Destroy:rr(t);break;case ar.CreateViewNodes:Jo(t)}}function cr(t,e){hr(t,e),lr(t,e)}function dr(t,e,n,i){if(!(t.def.nodeFlags&e&&t.def.nodeFlags&n))return;const s=t.def.nodes.length;for(let o=0;o<s;o++){const s=t.def.nodes[o];if(s.flags&e&&s.flags&n)switch(Zi.setCurrentNode(t,s.nodeIndex),i){case 0:No(t,s);break;case 1:or(t,s)}s.childFlags&e&&s.childFlags&n||(o+=s.childCount)}}let pr=!1;function mr(t,e,n,i,s,o){return Ko(_r(t,s,s.injector.get(Tn),e,n),i,o)}function fr(t,e,n,i,s,o){const r=s.injector.get(Tn),a=_r(t,s,new Qr(r),e,n),l=kr(i);return Kr(Dr.create,Ko,null,[a,l,o])}function _r(t,e,n,i,s){const o=e.injector.get(Ri),r=e.injector.get(he);return{ngModule:e,injector:t,projectableNodes:i,selectorOrNode:s,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:r}}function gr(t,e,n,i){const s=kr(n);return Kr(Dr.create,Wo,null,[t,e,s,i])}function yr(t,e,n,i){return n=xr.get(e.element.componentProvider.provider.token)||kr(n),Kr(Dr.create,Yo,null,[t,e,n,i])}function vr(t,e,n,i){return ro(t,e,n,function(t){const{hasOverrides:e,hasDeprecatedOverrides:n}=function(t){let e=!1,n=!1;return 0===br.size?{hasOverrides:e,hasDeprecatedOverrides:n}:(t.providers.forEach(t=>{const i=br.get(t.token);3840&t.flags&&i&&(e=!0,n=n||i.deprecatedBehavior)}),t.modules.forEach(t=>{wr.forEach((i,s)=>{s.ngInjectableDef.providedIn===t&&(e=!0,n=n||i.deprecatedBehavior)})}),{hasOverrides:e,hasDeprecatedOverrides:n})}(t);return e?(function(t){for(let e=0;e<t.providers.length;e++){const i=t.providers[e];n&&(i.flags|=4096);const s=br.get(i.token);s&&(i.flags=-3841&i.flags|s.flags,i.deps=fs(s.deps),i.value=s.value)}if(wr.size>0){let e=new Set(t.modules);wr.forEach((i,s)=>{if(e.has(s.ngInjectableDef.providedIn)){let e={token:s,flags:i.flags|(n?4096:0),deps:fs(i.deps),value:i.value,index:t.providers.length};t.providers.push(e),t.providersByKey[Ki(s)]=e}})}}(t=t.factory(()=>qi)),t):t}(i))}const br=new Map,wr=new Map,xr=new Map;function Er(t){br.set(t.token,t),"function"==typeof t.token&&t.token.ngInjectableDef&&"function"==typeof t.token.ngInjectableDef.providedIn&&wr.set(t.token,t)}function Cr(t,e){const n=ys(ys(e.viewDefFactory).nodes[0].element.componentView);xr.set(t,n)}function Lr(){br.clear(),wr.clear(),xr.clear()}function kr(t){if(0===br.size)return t;const e=function(t){const e=[];let n=null;for(let i=0;i<t.nodes.length;i++){const s=t.nodes[i];1&s.flags&&(n=s),n&&3840&s.flags&&br.has(s.provider.token)&&(e.push(n.nodeIndex),n=null)}return e}(t);if(0===e.length)return t;t=t.factory(()=>qi);for(let i=0;i<e.length;i++)n(t,e[i]);return t;function n(t,e){for(let n=e+1;n<t.nodes.length;n++){const e=t.nodes[n];if(1&e.flags)return;if(3840&e.flags){const t=e.provider,n=br.get(t.token);n&&(e.flags=-3841&e.flags|n.flags,t.deps=fs(n.deps),t.value=n.value)}}}}function Sr(t,e,n,i,s,o,r,a,l,h,u,c,d){const p=t.def.nodes[e];return nr(t,p,n,i,s,o,r,a,l,h,u,c,d),224&p.flags?ji(t,e).value:void 0}function Tr(t,e,n,i,s,o,r,a,l,h,u,c,d){const p=t.def.nodes[e];return sr(t,p,n,i,s,o,r,a,l,h,u,c,d),224&p.flags?ji(t,e).value:void 0}function Ir(t){return Kr(Dr.detectChanges,er,null,[t])}function Pr(t){return Kr(Dr.checkNoChanges,tr,null,[t])}function Mr(t){return Kr(Dr.destroy,rr,null,[t])}const Dr=function(){var t={create:0,detectChanges:1,checkNoChanges:2,destroy:3,handleEvent:4};return t[t.create]="create",t[t.detectChanges]="detectChanges",t[t.checkNoChanges]="checkNoChanges",t[t.destroy]="destroy",t[t.handleEvent]="handleEvent",t}();let Ar,Or,Rr;function Nr(t,e){Or=t,Rr=e}function Fr(t,e,n,i){return Nr(t,e),Kr(Dr.handleEvent,t.def.handleEvent,null,[t,e,n,i])}function zr(t,e){if(128&t.state)throw $i(Dr[Ar]);return Nr(t,Gr(t,0)),t.def.updateDirectives(function(t,n,i,...s){const o=t.def.nodes[n];return 0===e?Br(t,o,i,s):jr(t,o,i,s),16384&o.flags&&Nr(t,Gr(t,n)),224&o.flags?ji(t,o.nodeIndex).value:void 0},t)}function Vr(t,e){if(128&t.state)throw $i(Dr[Ar]);return Nr(t,$r(t,0)),t.def.updateRenderer(function(t,n,i,...s){const o=t.def.nodes[n];return 0===e?Br(t,o,i,s):jr(t,o,i,s),3&o.flags&&Nr(t,$r(t,n)),224&o.flags?ji(t,o.nodeIndex).value:void 0},t)}function Br(t,e,n,i){if(nr(t,e,n,...i)){const s=1===n?i[0]:i;if(16384&e.flags){const n={};for(let t=0;t<e.bindings.length;t++){const i=e.bindings[t],o=s[t];8&i.flags&&(n[Hr(i.nonMinifiedName)]=Ur(o))}const i=e.parent,o=Vi(t,i.nodeIndex).renderElement;if(i.element.name)for(let e in n){const i=n[e];null!=i?t.renderer.setAttribute(o,e,i):t.renderer.removeAttribute(o,e)}else t.renderer.setValue(o,`bindings=${JSON.stringify(n,null,2)}`)}}}function jr(t,e,n,i){sr(t,e,n,...i)}function Hr(t){return`ng-reflect-${t=t.replace(/[$@]/g,"_").replace(Zr,(...t)=>"-"+t[1].toLowerCase())}`}const Zr=/([A-Z])/g;function Ur(t){try{return null!=t?t.toString().slice(0,30):t}catch(t){return"[ERROR] Exception while trying to serialize the value"}}function Gr(t,e){for(let n=e;n<t.def.nodes.length;n++){const e=t.def.nodes[n];if(16384&e.flags&&e.bindings&&e.bindings.length)return n}return null}function $r(t,e){for(let n=e;n<t.def.nodes.length;n++){const e=t.def.nodes[n];if(3&e.flags&&e.bindings&&e.bindings.length)return n}return null}class qr{constructor(t,e){this.view=t,this.nodeIndex=e,null==e&&(this.nodeIndex=e=0),this.nodeDef=t.def.nodes[e];let n=this.nodeDef,i=t;for(;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&i;)n=ls(i),i=i.parent;this.elDef=n,this.elView=i}get elOrCompView(){return Vi(this.elView,this.elDef.nodeIndex).componentView||this.view}get injector(){return eo(this.elView,this.elDef)}get component(){return this.elOrCompView.component}get context(){return this.elOrCompView.context}get providerTokens(){const t=[];if(this.elDef)for(let e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){const n=this.elView.def.nodes[e];20224&n.flags&&t.push(n.provider.token),e+=n.childCount}return t}get references(){const t={};if(this.elDef){Wr(this.elView,this.elDef,t);for(let e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){const n=this.elView.def.nodes[e];20224&n.flags&&Wr(this.elView,n,t),e+=n.childCount}}return t}get componentRenderElement(){const t=function(t){for(;t&&!cs(t);)t=t.parent;return t.parent?Vi(t.parent,ls(t).nodeIndex):null}(this.elOrCompView);return t?t.renderElement:void 0}get renderNode(){return 2&this.nodeDef.flags?hs(this.view,this.nodeDef):hs(this.elView,this.elDef)}logError(t,...e){let n,i;2&this.nodeDef.flags?(n=this.view.def,i=this.nodeDef.nodeIndex):(n=this.elView.def,i=this.elDef.nodeIndex);const s=function(t,e){let n=-1;for(let i=0;i<=e;i++)3&t.nodes[i].flags&&n++;return n}(n,i);let o=-1;n.factory(()=>++o===s?t.error.bind(t,...e):qi),o<s&&(t.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),t.error(...e))}}function Wr(t,e,n){for(let i in e.references)n[i]=zo(t,e,e.references[i])}function Kr(t,e,n,i){const s=Ar,o=Or,r=Rr;try{Ar=t;const a=e.apply(n,i);return Or=o,Rr=r,Ar=s,a}catch(t){if(re(t)||!Or)throw t;throw function(t,e){return t instanceof Error||(t=new Error(t.toString())),Gi(t,e),t}(t,Yr())}}function Yr(){return Or?new qr(Or,Rr):null}class Qr{constructor(t){this.delegate=t}createRenderer(t,e){return new Xr(this.delegate.createRenderer(t,e))}begin(){this.delegate.begin&&this.delegate.begin()}end(){this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)}}class Xr{constructor(t){this.delegate=t,this.data=this.delegate.data}destroyNode(t){!function(t){Vn.delete(t.nativeNode)}(Bn(t)),this.delegate.destroyNode&&this.delegate.destroyNode(t)}destroy(){this.delegate.destroy()}createElement(t,e){const n=this.delegate.createElement(t,e),i=Yr();if(i){const e=new zn(n,null,i);e.name=t,jn(e)}return n}createComment(t){const e=this.delegate.createComment(t),n=Yr();return n&&jn(new Fn(e,null,n)),e}createText(t){const e=this.delegate.createText(t),n=Yr();return n&&jn(new Fn(e,null,n)),e}appendChild(t,e){const n=Bn(t),i=Bn(e);n&&i&&n instanceof zn&&n.addChild(i),this.delegate.appendChild(t,e)}insertBefore(t,e,n){const i=Bn(t),s=Bn(e),o=Bn(n);i&&s&&i instanceof zn&&i.insertBefore(o,s),this.delegate.insertBefore(t,e,n)}removeChild(t,e){const n=Bn(t),i=Bn(e);n&&i&&n instanceof zn&&n.removeChild(i),this.delegate.removeChild(t,e)}selectRootElement(t){const e=this.delegate.selectRootElement(t),n=Yr();return n&&jn(new zn(e,null,n)),e}setAttribute(t,e,n,i){const s=Bn(t);s&&s instanceof zn&&(s.attributes[i?i+":"+e:e]=n),this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){const i=Bn(t);i&&i instanceof zn&&(i.attributes[n?n+":"+e:e]=null),this.delegate.removeAttribute(t,e,n)}addClass(t,e){const n=Bn(t);n&&n instanceof zn&&(n.classes[e]=!0),this.delegate.addClass(t,e)}removeClass(t,e){const n=Bn(t);n&&n instanceof zn&&(n.classes[e]=!1),this.delegate.removeClass(t,e)}setStyle(t,e,n,i){const s=Bn(t);s&&s instanceof zn&&(s.styles[e]=n),this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){const i=Bn(t);i&&i instanceof zn&&(i.styles[e]=null),this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){const i=Bn(t);i&&i instanceof zn&&(i.properties[e]=n),this.delegate.setProperty(t,e,n)}listen(t,e,n){if("string"!=typeof t){const i=Bn(t);i&&i.listeners.push(new Nn(e,n))}return this.delegate.listen(t,e,n)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setValue(t,e){return this.delegate.setValue(t,e)}}"undefined"==typeof ngDevMode&&("undefined"!=typeof window&&(window.ngDevMode=!0),"undefined"!=typeof self&&(self.ngDevMode=!0),"undefined"!=typeof global&&(global.ngDevMode=!0));const Jr=Element.prototype,ta=Jr.matches||Jr.matchesSelector||Jr.mozMatchesSelector||Jr.msMatchesSelector||Jr.oMatchesSelector||Jr.webkitMatchesSelector,ea={schedule(t,e){const n=setTimeout(t,e);return()=>clearTimeout(n)},scheduleBeforeRender(t){if("undefined"==typeof window)return ea.schedule(t,0);if(void 0===window.requestAnimationFrame)return ea.schedule(t,16);const e=window.requestAnimationFrame(t);return()=>window.cancelAnimationFrame(e)}};function na(t,e,n){let i=n;return function(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}(t)&&e.some((e,n)=>!("*"===e||!function(e,n){return ta.call(t,n)}(0,e)||(i=n,0))),i}const ia=10;class sa{constructor(t,e){this.component=t,this.injector=e,this.componentFactory=e.get(We).resolveComponentFactory(t)}create(t){return new oa(this.componentFactory,t)}}class oa{constructor(t,e){this.componentFactory=t,this.injector=e,this.inputChanges=null,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.uninitializedInputs=new Set}connect(t){if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);this.componentRef||this.initializeComponent(t)}disconnect(){this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=ea.schedule(()=>{this.componentRef&&(this.componentRef.destroy(),this.componentRef=null)},ia))}getInputValue(t){return this.componentRef?this.componentRef.instance[t]:this.initialInputValues.get(t)}setInputValue(t,e){(function(t,e){return t===e||t!=t&&e!=e})(e,this.getInputValue(t))||(this.componentRef?(this.recordInputChange(t,e),this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e))}initializeComponent(t){const e=Nt.create({providers:[],parent:this.injector}),n=function(e,n){const i=t.childNodes,s=n.map(()=>[]);let o=-1;n.some((t,e)=>"*"===t&&(o=e,!0));for(let t=0,r=i.length;t<r;++t){const e=i[t],r=na(e,n,o);-1!==r&&s[r].push(e)}return s}(0,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,n,t),this.implementsOnChanges=function(t){return"function"==typeof t}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(),this.detectChanges(),this.injector.get(kn).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:t})=>{const e=this.initialInputValues.get(t);e?this.setInputValue(t,e):this.uninitializedInputs.add(t)}),this.initialInputValues.clear()}initializeOutputs(){const t=this.componentFactory.outputs.map(({propName:t,templateName:e})=>this.componentRef.instance[t].pipe(j(t=>({name:e,value:t}))));this.events=Q(...t)}callNgOnChanges(){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,this.componentRef.instance.ngOnChanges(t)}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=ea.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(this.componentRef&&!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const n=this.inputChanges[t];if(n)return void(n.currentValue=e);const i=this.uninitializedInputs.has(t);this.uninitializedInputs.delete(t);const s=i?void 0:this.getInputValue(t);this.inputChanges[t]=new Un(s,e,i)}detectChanges(){this.componentRef&&(this.callNgOnChanges(),this.componentRef.changeDetectorRef.detectChanges())}}class ra extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}class aa{constructor(){this.layers_to_add=["osm"],this.allow_edit_drawn_items=!0,this.zoom_init=4,this.lat_lng_init=[46.5,2.9],this.elevation_provider="openelevation",this.geolocation_provider="osm",this.location=new on,this._osm_class_filters=[]}set layer(t){this.layers_to_add=[t]}set osm_class_filter(t){this._osm_class_filters=[t]}set marker(t){"true"===t&&(this._marker=!0)}set polyline(t){"true"===t&&(this._polyline=!0)}set polygon(t){"true"===t&&(this._polygon=!0)}set lat_init(t){this.lat_lng_init[0]=t}set lng_init(t){this.lat_lng_init[1]=t}set get_osm_simple_line(t){"true"===t&&(this._get_osm_simple_line=!0)}set show_lat_lng_elevation_inputs(t){"true"===t&&(this._show_lat_lng_elevation_inputs=!0)}newLocation(t){this.location.emit(t)}}class la{constructor(t){this.injector=t;const e=function(t,e){const n=function(t,n){return e.injector.get(We).resolveComponentFactory(t).inputs}(t),i=e.strategyFactory||new sa(t,e.injector),s=function(t){const e={};return t.forEach(({propName:t,templateName:n})=>{e[n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)]=t}),e}(n);class o extends ra{constructor(t){super(),this.ngElementStrategy=i.create(t||e.injector)}attributeChangedCallback(t,n,o,r){this.ngElementStrategy||(this.ngElementStrategy=i.create(e.injector)),this.ngElementStrategy.setInputValue(s[t],o)}connectedCallback(){this.ngElementStrategy||(this.ngElementStrategy=i.create(e.injector)),this.ngElementStrategy.connect(this),this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(t=>{const e=function(t,e,n){if("function"!=typeof CustomEvent){const i=t.createEvent("CustomEvent");return i.initCustomEvent(e,!1,!1,n),i}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:n})}(this.ownerDocument,t.name,t.value);this.dispatchEvent(e)})}disconnectedCallback(){this.ngElementStrategy&&this.ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}}return o.observedAttributes=Object.keys(s),n.map(({propName:t})=>t).forEach(t=>{Object.defineProperty(o.prototype,t,{get:function(){return this.ngElementStrategy.getInputValue(t)},set:function(e){this.ngElementStrategy.setInputValue(t,e)},configurable:!0,enumerable:!0})}),o}(aa,{injector:this.injector});customElements.define("tb-geolocation-element",e)}ngDoBootstrap(){}}class ha{}class ua{}const ca="*";function da(t,e=null){return{type:2,steps:t,options:e}}function pa(t){return{type:6,styles:t,offset:null}}function ma(t){Promise.resolve(null).then(t)}class fa{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){ma(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class _a{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const s=this.players.length;0==s?ma(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==s&&this._onFinish()}),t.onDestroy(()=>{++n==s&&this._onDestroy()}),t.onStart(()=>{++i==s&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}const ga="!";function ya(t){return null!=t&&"false"!==`${t}`}function va(t,e=0){return function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):e}function ba(t){return Array.isArray(t)?t:[t]}function wa(t){return null==t?"":"string"==typeof t?t:`${t}px`}const xa=9,Ea=13,Ca=27,La=32,ka=37,Sa=38,Ta=39,Ia=40,Pa=48,Ma=57,Da=65,Aa=90;class Oa{}const Ra=void 0;var Na=["en",[["a","p"],["AM","PM"],Ra],[["AM","PM"],Ra,Ra],[["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"]],Ra,[["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"]],Ra,[["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}",Ra,"{1} 'at' {0}",Ra],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];const Fa={},za=function(){var t={Decimal:0,Percent:1,Currency:2,Scientific:3};return t[t.Decimal]="Decimal",t[t.Percent]="Percent",t[t.Currency]="Currency",t[t.Scientific]="Scientific",t}(),Va=function(){var t={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return t[t.Zero]="Zero",t[t.One]="One",t[t.Two]="Two",t[t.Few]="Few",t[t.Many]="Many",t[t.Other]="Other",t}(),Ba=function(){var t={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};return t[t.Decimal]="Decimal",t[t.Group]="Group",t[t.List]="List",t[t.PercentSign]="PercentSign",t[t.PlusSign]="PlusSign",t[t.MinusSign]="MinusSign",t[t.Exponential]="Exponential",t[t.SuperscriptingExponent]="SuperscriptingExponent",t[t.PerMille]="PerMille",t[t.Infinity]="Infinity",t[t.NaN]="NaN",t[t.TimeSeparator]="TimeSeparator",t[t.CurrencyDecimal]="CurrencyDecimal",t[t.CurrencyGroup]="CurrencyGroup",t}();function ja(t,e){const n=Ha(t),i=n[13][e];if(void 0===i){if(e===Ba.CurrencyDecimal)return n[13][Ba.Decimal];if(e===Ba.CurrencyGroup)return n[13][Ba.Group]}return i}function Ha(t){const e=t.toLowerCase().replace(/_/g,"-");let n=Fa[e];if(n)return n;const i=e.split("-")[0];if(n=Fa[i])return n;if("en"===i)return Na;throw new Error(`Missing locale data for the locale "${t}".`)}const Za=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ua=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Ga=22,$a=".",qa="0",Wa=";",Ka=",",Ya="#";function Qa(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}const Xa=new rt("UseV4Plurals");class Ja{}class tl extends Ja{constructor(t,e){super(),this.locale=t,this.deprecatedPluralFn=e}getPluralCategory(t,e){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(e||this.locale,t):function(t){return Ha(t)[18]}(e||this.locale)(t)){case Va.Zero:return"zero";case Va.One:return"one";case Va.Two:return"two";case Va.Few:return"few";case Va.Many:return"many";default:return"other"}}}function el(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,s]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(s)}return null}class nl{constructor(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._initialClasses=[]}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Gn(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${bt(t.item)}`);this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}class il{constructor(t,e,n,i){this.$implicit=t,this.ngForOf=e,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}}class sl{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._differ=null}set ngForTrackBy(t){bn()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. `+"See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngOnChanges(t){if("ngForOf"in t){const e=t.ngForOf.currentValue;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(t){throw new Error(`Cannot find a differ supporting object '${e}' of type '${e.name||typeof e}'. NgFor only supports binding to Iterables such as Arrays.`)}}}ngDoCheck(){if(this._differ){const t=this._differ.diff(this.ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,i)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new il(null,this.ngForOf,-1,-1),i),s=new ol(t,n);e.push(s)}else if(null==i)this._viewContainer.remove(n);else{const s=this._viewContainer.get(n);this._viewContainer.move(s,i);const o=new ol(t,s);e.push(o)}});for(let n=0;n<e.length;n++)this._perViewChange(e[n].view,e[n].record);for(let n=0,i=this._viewContainer.length;n<i;n++){const t=this._viewContainer.get(n);t.context.index=n,t.context.count=i}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}}class ol{constructor(t,e){this.record=t,this.view=e}}class rl{constructor(t,e){this._viewContainer=t,this._context=new al,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){ll("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){ll("ngIfElse",t),this._elseTemplateRef=t,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)))}}class al{constructor(){this.$implicit=null,this.ngIf=null}}function ll(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bt(e)}'.`)}class hl{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}class ul{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}}class cl{constructor(t,e,n){this.ngSwitch=n,n._addCase(),this._view=new hl(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}function dl(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${bt(t)}'`)}const pl=/((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/,ml={yMMMdjms:Cl(El([wl("year",1),xl("month",3),wl("day",1),wl("hour",1),wl("minute",1),wl("second",1)])),yMdjm:Cl(El([wl("year",1),wl("month",1),wl("day",1),wl("hour",1),wl("minute",1)])),yMMMMEEEEd:Cl(El([wl("year",1),xl("month",4),xl("weekday",4),wl("day",1)])),yMMMMd:Cl(El([wl("year",1),xl("month",4),wl("day",1)])),yMMMd:Cl(El([wl("year",1),xl("month",3),wl("day",1)])),yMd:Cl(El([wl("year",1),wl("month",1),wl("day",1)])),jms:Cl(El([wl("hour",1),wl("second",1),wl("minute",1)])),jm:Cl(El([wl("hour",1),wl("minute",1)]))},fl={yyyy:Cl(wl("year",4)),yy:Cl(wl("year",2)),y:Cl(wl("year",1)),MMMM:Cl(xl("month",4)),MMM:Cl(xl("month",3)),MM:Cl(wl("month",2)),M:Cl(wl("month",1)),LLLL:Cl(xl("month",4)),L:Cl(xl("month",1)),dd:Cl(wl("day",2)),d:Cl(wl("day",1)),HH:_l(gl(Cl(bl(wl("hour",2),!1)))),H:gl(Cl(bl(wl("hour",1),!1))),hh:_l(gl(Cl(bl(wl("hour",2),!0)))),h:gl(Cl(bl(wl("hour",1),!0))),jj:Cl(wl("hour",2)),j:Cl(wl("hour",1)),mm:_l(Cl(wl("minute",2))),m:Cl(wl("minute",1)),ss:_l(Cl(wl("second",2))),s:Cl(wl("second",1)),sss:Cl(wl("second",3)),EEEE:Cl(xl("weekday",4)),EEE:Cl(xl("weekday",3)),EE:Cl(xl("weekday",2)),E:Cl(xl("weekday",1)),a:function(t){return function(e,n){return t(e,n).split(" ")[1]}}(Cl(bl(wl("hour",1),!0))),Z:vl("short"),z:vl("long"),ww:Cl({}),w:Cl({}),G:Cl(xl("era",1)),GG:Cl(xl("era",2)),GGG:Cl(xl("era",3)),GGGG:Cl(xl("era",4))};function _l(t){return function(e,n){const i=t(e,n);return 1==i.length?"0"+i:i}}function gl(t){return function(e,n){return t(e,n).split(" ")[0]}}function yl(t,e,n){return new Intl.DateTimeFormat(e,n).format(t).replace(/[\u200e\u200f]/g,"")}function vl(t){const e={hour:"2-digit",hour12:!1,timeZoneName:t};return function(t,n){const i=yl(t,n,e);return i?i.substring(3):""}}function bl(t,e){return t.hour12=e,t}function wl(t,e){const n={};return n[t]=2===e?"2-digit":"numeric",n}function xl(t,e){const n={};return n[t]=e<4?e>1?"short":"narrow":"long",n}function El(t){return t.reduce((t,e)=>Object.assign({},t,e),{})}function Cl(t){return(e,n)=>yl(e,n,t)}const Ll=new Map;class kl{static format(t,e,n){return function(t,e,n){const i=ml[t];if(i)return i(e,n);const s=t;let o=Ll.get(s);if(!o){let e;o=[],pl.exec(t);let n=t;for(;n;)(e=pl.exec(n))?n=(o=o.concat(e.slice(1))).pop():(o.push(n),n=null);Ll.set(s,o)}return o.reduce((t,i)=>{const s=fl[i];return t+(s?s(e,n):function(t){return"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}(i))},"")}(n,t,e)}}class Sl{constructor(t){this._locale=t}transform(t,e="mediumDate"){if(null==t||""===t||t!=t)return null;let n;if("string"==typeof t&&(t=t.trim()),Tl(t))n=t;else if(isNaN(t-parseFloat(t)))if("string"==typeof t&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){const[e,i,s]=t.split("-").map(t=>parseInt(t,10));n=new Date(e,i-1,s)}else n=new Date(t);else n=new Date(parseFloat(t));if(!Tl(n)){let e;if("string"!=typeof t||!(e=t.match(Za)))throw dl(Sl,t);n=function(t){const e=new Date(0);let n=0,i=0;const s=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),s.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const r=Number(t[4]||0)-n,a=Number(t[5]||0)-i,l=Number(t[6]||0),h=Math.round(1e3*parseFloat("0."+(t[7]||0)));return o.call(e,r,a,l,h),e}(e)}return kl.format(n,this._locale,Sl._ALIASES[e]||e)}}function Tl(t){return t instanceof Date&&!isNaN(t.valueOf())}Sl._ALIASES={medium:"yMMMdjms",short:"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"};const Il=new class{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}},Pl=new class{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}};class Ml{constructor(t){this._ref=t,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,Zn.wrap(this._latestValue)):(t&&this._subscribe(t),this._latestReturnedValue=this._latestValue,this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,e=>this._updateLatestValue(t,e))}_selectStrategy(t){if(Pe(t))return Il;if(Me(t))return Pl;throw dl(Ml,t)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}class Dl{constructor(t){this._locale=t}transform(t,e,n){if(function(t){return null==t||""===t||t!=t}(t))return null;n=n||this._locale;try{return function(t,e,n){return function(t,e,n,i,s,o,r=!1){let a="",l=!1;if(isFinite(t)){let h=function(e){let n,i,s,o,r,a=Math.abs(t)+"",l=0;for((i=a.indexOf($a))>-1&&(a=a.replace($a,"")),(s=a.search(/e/i))>0?(i<0&&(i=s),i+=+a.slice(s+1),a=a.substring(0,s)):i<0&&(i=a.length),s=0;a.charAt(s)===qa;s++);if(s===(r=a.length))n=[0],i=1;else{for(r--;a.charAt(r)===qa;)r--;for(i-=s,n=[],o=0;s<=r;s++,o++)n[o]=Number(a.charAt(s))}return i>Ga&&(n=n.splice(0,Ga-1),l=i-1,i=1),{digits:n,exponent:l,integerLen:i}}();r&&(h=function(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(h));let u=e.minInt,c=e.minFrac,d=e.maxFrac;if(o){const t=o.match(Ua);if(null===t)throw new Error(`${o} is not a valid digit info`);const e=t[1],n=t[3],i=t[5];null!=e&&(u=Qa(e)),null!=n&&(c=Qa(n)),null!=i?d=Qa(i):null!=n&&c>d&&(d=c)}!function(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let i=t.digits,s=i.length-t.integerLen;const o=Math.min(Math.max(e,s),n);let r=o+t.integerLen,a=i[r];if(r>0){i.splice(Math.max(t.integerLen,r));for(let t=r;t<i.length;t++)i[t]=0}else{s=Math.max(0,s),t.integerLen=1,i.length=Math.max(1,r=o+1),i[0]=0;for(let t=1;t<r;t++)i[t]=0}if(a>=5)if(r-1<0){for(let e=0;e>r;e--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[r-1]++;for(;s<Math.max(0,o);s++)i.push(0);let l=0!==o;const h=e+t.integerLen,u=i.reduceRight(function(t,e,n,i){return i[n]=(e+=t)<10?e:e-10,l&&(0===i[n]&&n>=h?i.pop():l=!1),e>=10?1:0},0);u&&(i.unshift(u),t.integerLen++)}(h,c,d);let p=h.digits,m=h.integerLen;const f=h.exponent;let _=[];for(l=p.every(t=>!t);m<u;m++)p.unshift(0);for(;m<0;m++)p.unshift(0);m>0?_=p.splice(m,p.length):(_=p,p=[0]);const g=[];for(p.length>=e.lgSize&&g.unshift(p.splice(-e.lgSize,p.length).join(""));p.length>e.gSize;)g.unshift(p.splice(-e.gSize,p.length).join(""));p.length&&g.unshift(p.join("")),a=g.join(ja(n,i)),_.length&&(a+=ja(n,s)+_.join("")),f&&(a+=ja(n,Ba.Exponential)+"+"+f)}else a=ja(n,Ba.Infinity);return t<0&&!l?e.negPre+a+e.negSuf:e.posPre+a+e.posSuf}(t,function(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(Wa),s=i[0],o=i[1],r=-1!==s.indexOf($a)?s.split($a):[s.substring(0,s.lastIndexOf(qa)+1),s.substring(s.lastIndexOf(qa)+1)],a=r[0],l=r[1]||"";n.posPre=a.substr(0,a.indexOf(Ya));for(let u=0;u<l.length;u++){const t=l.charAt(u);t===qa?n.minFrac=n.maxFrac=u+1:t===Ya?n.maxFrac=u+1:n.posSuf+=t}const h=a.split(Ka);if(n.gSize=h[1]?h[1].length:0,n.lgSize=h[2]||h[1]?(h[2]||h[1]).length:0,o){const t=s.length-n.posPre.length-n.posSuf.length,e=o.indexOf(Ya);n.negPre=o.substr(0,e).replace(/'/g,""),n.negSuf=o.substr(e+t).replace(/'/g,"")}else n.negPre=e+n.posPre,n.negSuf=n.posSuf;return n}(function(t,e){return Ha(t)[14][e]}(e,za.Decimal),ja(e,Ba.MinusSign)),e,Ba.Group,Ba.Decimal,n)}(function(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error(`${t} is not a number`);return t}(t),n,e)}catch(t){throw dl(Dl,t.message)}}}class Al{}const Ol=new rt("DocumentToken"),Rl="browser",Nl="undefined"!=typeof Intl&&Intl.v8BreakIterator;class Fl{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function(t){return t===Rl}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Nl)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}let zl,Vl;function Bl(){if(null==zl&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>zl=!0}))}finally{zl=zl||!1}return zl}Fl.ngInjectableDef=ot({factory:function(){return new Fl(te(ze,8))},token:Fl,providedIn:"root"});const jl=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Hl(){if(Vl)return Vl;if("object"!=typeof document||!document)return Vl=new Set(jl);let t=document.createElement("input");return Vl=new Set(jl.filter(e=>(t.setAttribute("type",e),t.type===e)))}class Zl{}const Ul={};class Gl{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new $l(t,this.resultSelector))}}class $l extends B{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(Ul),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n<e;n++){const e=t[n];this.add(V(this,e,e,n))}}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,n,i,s){const o=this.values,r=this.toRespond?o[n]===Ul?--this.toRespond:this.toRespond:0;o[n]=e,0===r&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}function ql(t){return e=>e.lift(new Wl(t))}class Wl{constructor(t){this.notifier=t}call(t,e){const n=new Kl(t),i=V(n,this.notifier);return i&&!i.closed?(n.add(i),e.subscribe(n)):n}}class Kl extends B{constructor(t){super(t)}notifyNext(t,e,n,i,s){this.complete()}notifyComplete(){}}function Yl(t){const e=new x(e=>{e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}const Ql=new x(t=>t.complete());function Xl(t){return t?function(t){return new x(e=>t.schedule(()=>e.complete()))}(t):Ql}function Jl(...t){let e=t[t.length-1];switch(I(e)?t.pop():e=void 0,t.length){case 0:return Xl(e);case 1:return e?U(t,e):Yl(t[0]);default:return U(t,e)}}function th(...t){return e=>{let n=t[t.length-1];I(n)?t.pop():n=null;const i=t.length;return function(...t){return 1===t.length||2===t.length&&I(t[1])?G(t[0]):Y(1)(Jl(...t))}(1!==i||n?i>0?U(t,n):Xl(n):Yl(t[0]),e)}}const eh=new Set;let nh;class ih{constructor(t){this.platform=t,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):sh}matchMedia(t){return this.platform.WEBKIT&&function(t){if(!eh.has(t))try{nh||((nh=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(nh)),nh.sheet&&(nh.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),eh.add(t))}catch(t){console.error(t)}}(t),this._matchMedia(t)}}function sh(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}ih.ngInjectableDef=ot({factory:function(){return new ih(te(Fl))},token:ih,providedIn:"root"});class oh{constructor(t,e){this.mediaMatcher=t,this.zone=e,this._queries=new Map,this._destroySubject=new S}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return rh(ba(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){return function(...t){let e=null,n=null;return I(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),U(t,n).lift(new Gl(e))}(rh(ba(t)).map(t=>this._registerQuery(t).observable)).pipe(j(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(t=>{e.matches=e.matches||t.matches,e.breakpoints[t.query]=t.matches}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this.mediaMatcher.matchMedia(t),n={observable:function t(e,n,s){return s?t(e,n).pipe(j(t=>l(t)?s(...t):s(t))):new x(t=>{const s=(...e)=>t.next(1===e.length?e[0]:e);let o;try{o=e(s)}catch(e){return void t.error(e)}if(i(n))return()=>n(s,o)})}(t=>{e.addListener(e=>this.zone.run(()=>t(e)))},t=>{e.removeListener(e=>this.zone.run(()=>t(e)))}).pipe(ql(this._destroySubject),th(e),j(e=>({query:t,matches:e.matches}))),mql:e};return this._queries.set(t,n),n}}function rh(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}oh.ngInjectableDef=ot({factory:function(){return new oh(te(ih),te(rn))},token:oh,providedIn:"root"});const ah={XSmall:"(max-width: 599px)",Small:"(min-width: 600px) and (max-width: 959px)",Medium:"(min-width: 960px) and (max-width: 1279px)",Large:"(min-width: 1280px) and (max-width: 1919px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599px) and (orientation: portrait), (max-width: 959px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};function lh(t,e,n,s){return i(n)&&(s=n,n=void 0),s?lh(t,e,n).pipe(j(t=>l(t)?s(...t):s(t))):new x(i=>{!function t(e,n,i,s,o){let r;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){const t=e;e.addEventListener(n,i,o),r=(()=>t.removeEventListener(n,i,o))}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){const t=e;e.on(n,i),r=(()=>t.off(n,i))}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){const t=e;e.addListener(n,i),r=(()=>t.removeListener(n,i))}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(let r=0,a=e.length;r<a;r++)t(e[r],n,i,s,o)}s.add(r)}(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}Object;class hh extends f{constructor(t,e){super()}schedule(t,e=0){return this}}class uh extends hh{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,i=void 0;try{this.work(t)}catch(t){n=!0,i=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}class ch{constructor(t,e=ch.now){this.SchedulerAction=t,this.now=e}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}ch.now=Date.now?Date.now:()=>+new Date;class dh extends ch{constructor(t,e=ch.now){super(t,()=>dh.delegate&&dh.delegate!==this?dh.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return dh.delegate&&dh.delegate!==this?dh.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const ph=new dh(uh);class mh{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new fh(t,this.durationSelector))}}class fh extends B{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){const e=p(this.durationSelector)(t);if(e===u)this.destination.error(u.e);else{const t=V(this,e);t.closed?this.clearThrottle():this.add(this.throttled=t)}}}clearThrottle(){const{value:t,hasValue:e,throttled:n}=this;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))}notifyNext(t,e,n,i){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function _h(t){return!l(t)&&t-parseFloat(t)+1>=0}function gh(t){const{index:e,period:n,subscriber:i}=t;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function yh(t,e=ph){return function(t){return function(e){return e.lift(new mh(t))}}(()=>(function(t=0,e,n){let i=-1;return _h(e)?i=Number(e)<1?1:Number(e):I(e)&&(n=e),I(n)||(n=ph),new x(e=>{const s=_h(t)?t:+t-n.now();return n.schedule(gh,s,{index:0,period:i,subscriber:e})})})(t,e))}function vh(t,e){return function(n){return n.lift(new bh(t,e))}}class bh{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new wh(t,this.predicate,this.thisArg))}}class wh extends y{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)}}const xh=20;class Eh{constructor(t,e){this._ngZone=t,this._platform=e,this._scrolled=new S,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}register(t){const e=t.elementScrolled().subscribe(()=>this._scrolled.next(t));this.scrollContainers.set(t,e)}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=xh){return this._platform.isBrowser?x.create(e=>{this._globalSubscription||this._addGlobalListener();const n=t>0?this._scrolled.pipe(yh(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Jl()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(vh(t=>!t||n.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((n,i)=>{this._scrollableContainsElement(i,t)&&e.push(i)}),e}_scrollableContainsElement(t,e){let n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>lh(window.document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}Eh.ngInjectableDef=ot({factory:function(){return new Eh(te(rn),te(Fl))},token:Eh,providedIn:"root"});const Ch=20;class Lh{constructor(t,e){this._platform=t,this._change=t.isBrowser?e.runOutsideAngular(()=>Q(lh(window,"resize"),lh(window,"orientationchange"))):Jl(),this._invalidateCache=this.change().subscribe(()=>this._updateViewportSize())}ngOnDestroy(){this._invalidateCache.unsubscribe()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:n}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+n,right:t.left+e,height:n,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=document.documentElement.getBoundingClientRect();return{top:-t.top||document.body.scrollTop||window.scrollY||document.documentElement.scrollTop||0,left:-t.left||document.body.scrollLeft||window.scrollX||document.documentElement.scrollLeft||0}}change(t=Ch){return t>0?this._change.pipe(yh(t)):this._change}_updateViewportSize(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}}}Lh.ngInjectableDef=ot({factory:function(){return new Lh(te(Fl),te(rn))},token:Lh,providedIn:"root"});class kh{}class Sh extends Error{constructor(){super("argument out of range"),this.name="ArgumentOutOfRangeError",Object.setPrototypeOf(this,Sh.prototype)}}function Th(t){return e=>0===t?Xl():e.lift(new Ih(t))}class Ih{constructor(t){if(this.total=t,this.total<0)throw new Sh}call(t,e){return e.subscribe(new Ph(t,this.total))}}class Ph extends y{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function Mh(){throw Error("Host already has a portal attached")}class Dh{attach(t){return null==t&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),t.hasAttached()&&Mh(),this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null==t?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class Ah extends Dh{constructor(t,e,n){super(),this.component=t,this.viewContainerRef=e,this.injector=n}}class Oh extends Dh{constructor(t,e,n){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class Rh{constructor(){this._isDisposed=!1}hasAttached(){return!!this._attachedPortal}attach(t){return t||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&Mh(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),t instanceof Ah?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Oh?(this._attachedPortal=t,this.attachTemplatePortal(t)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Nh extends Rh{constructor(t,e,n,i){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=n,this._defaultInjector=i}attachComponentPortal(t){let e,n=this._componentFactoryResolver.resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(n,t.viewContainerRef.length,t.injector||t.viewContainerRef.parentInjector),this.setDisposeFn(()=>e.destroy())):(e=n.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(()=>{this._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context);return n.detectChanges(),n.rootNodes.forEach(t=>this.outletElement.appendChild(t)),this.setDisposeFn(()=>{let t=e.indexOf(n);-1!==t&&e.remove(t)}),n}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}class Fh{}class zh{enable(){}disable(){}attach(){}}class Vh{constructor(t){this.scrollStrategy=new zh,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",t&&Object.keys(t).filter(e=>void 0!==t[e]).forEach(e=>this[e]=t[e])}}class Bh{constructor(t,e,n,i){this.offsetX=n,this.offsetY=i,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class jh{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}function Hh(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error(`ConnectedPosition: Invalid ${t} "${e}". `+'Expected "top", "bottom" or "center".')}function Zh(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error(`ConnectedPosition: Invalid ${t} "${e}". `+'Expected "start", "end" or "center".')}class Uh{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=wa(-this._previousScrollPosition.left),t.style.top=wa(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=this._document.body,n=t.style.scrollBehavior||"",i=e.style.scrollBehavior||"";this._isEnabled=!1,t.style.left=this._previousHTMLStyles.left,t.style.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),t.style.scrollBehavior=e.style.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),t.style.scrollBehavior=n,e.style.scrollBehavior=i}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}function Gh(){return Error("Scroll strategy has already been attached.")}class $h{constructor(t,e,n,i){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=i,this._scrollSubscription=null,this._detach=(()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())})}attach(t){if(this._overlayRef)throw Gh();this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}}function qh(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function Wh(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class Kh{constructor(t,e,n,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=i,this._scrollSubscription=null}attach(t){if(this._overlayRef)throw Gh();this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:n}=this._viewportRuler.getViewportSize();qh(t,[{width:e,height:n,bottom:n,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}}class Yh{constructor(t,e,n,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=(()=>new zh),this.close=(t=>new $h(this._scrollDispatcher,this._ngZone,this._viewportRuler,t)),this.block=(()=>new Uh(this._viewportRuler,this._document)),this.reposition=(t=>new Kh(this._scrollDispatcher,this._viewportRuler,this._ngZone,t)),this._document=i}}Yh.ngInjectableDef=ot({factory:function(){return new Yh(te(Eh),te(Lh),te(rn),te(Ol))},token:Yh,providedIn:"root"});class Qh{constructor(t){this._attachedOverlays=[],this._keydownListener=(t=>{const e=this._attachedOverlays;for(let n=e.length-1;n>-1;n--)if(e[n]._keydownEventSubscriptions>0){e[n]._keydownEvents.next(t);break}}),this._document=t}ngOnDestroy(){this._detach()}add(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener,!0),this._isAttached=!0),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()}_detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener,!0),this._isAttached=!1)}}Qh.ngInjectableDef=ot({factory:function(){return new Qh(te(Ol))},token:Qh,providedIn:"root"});class Xh{constructor(t){this._document=t}ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t}}Xh.ngInjectableDef=ot({factory:function(){return new Xh(te(Ol))},token:Xh,providedIn:"root"});class Jh{constructor(t,e,n,i,s,o,r){this._portalOutlet=t,this._host=e,this._pane=n,this._config=i,this._ngZone=s,this._keyboardDispatcher=o,this._document=r,this._backdropElement=null,this._backdropClick=new S,this._attachments=new S,this._detachments=new S,this._keydownEventsObservable=x.create(t=>{const e=this._keydownEvents.subscribe(t);return this._keydownEventSubscriptions++,()=>{e.unsubscribe(),this._keydownEventSubscriptions--}}),this._keydownEvents=new S,this._keydownEventSubscriptions=0,i.scrollStrategy&&i.scrollStrategy.attach(this)}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){let e=this._portalOutlet.attach(t);return this._config.positionStrategy&&this._config.positionStrategy.attach(this),!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(Th(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._config.positionStrategy&&this._config.positionStrategy.detach&&this._config.positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1);const t=this._portalOutlet.detach();this._detachments.next(),this._keyboardDispatcher.remove(this);const e=this._ngZone.onStable.asObservable().pipe(ql(Q(this._attachments,this._detachments))).subscribe(()=>{this._pane&&this._host&&0!==this._pane.children.length||(this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._previousHostParent.removeChild(this._host)),e.unsubscribe())});return t}dispose(){const t=this.hasAttached();this._config.positionStrategy&&this._config.positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick.asObservable()}attachments(){return this._attachments.asObservable()}detachments(){return this._detachments.asObservable()}keydownEvents(){return this._keydownEventsObservable}getConfig(){return this._config}updatePosition(){this._config.positionStrategy&&this._config.positionStrategy.apply()}updateSize(t){this._config=Object.assign({},this._config,t),this._updateElementSize()}setDirection(t){this._config=Object.assign({},this._config,{direction:t}),this._updateElementDirection()}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){const t=this._pane.style;t.width=wa(this._config.width),t.height=wa(this._config.height),t.minWidth=wa(this._config.minWidth),t.minHeight=wa(this._config.minHeight),t.maxWidth=wa(this._config.maxWidth),t.maxHeight=wa(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"auto":"none"}_attachBackdrop(){this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",t=>this._backdropClick.next(t)),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t=this._backdropElement;if(t){let e,n=()=>{t&&t.parentNode&&t.parentNode.removeChild(t),this._backdropElement==t&&(this._backdropElement=null),clearTimeout(e)};t.classList.remove("cdk-overlay-backdrop-showing"),this._config.backdropClass&&this._toggleClasses(t,this._config.backdropClass,!1),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",n)}),t.style.pointerEvents="none",e=this._ngZone.runOutsideAngular(()=>setTimeout(n,500))}}_toggleClasses(t,e,n){const i=t.classList;ba(e).forEach(t=>{n?i.add(t):i.remove(t)})}}class tu{constructor(t,e,n,i,s){this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=s,this._isInitialRender=!0,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this.scrollables=[],this._preferredPositions=[],this._positionChanges=new S,this._resizeSubscription=f.EMPTY,this._offsetX=0,this._offsetY=0,this._positionChangeSubscriptions=0,this.positionChanges=x.create(t=>{const e=this._positionChanges.subscribe(t);return this._positionChangeSubscriptions++,()=>{e.unsubscribe(),this._positionChangeSubscriptions--}}),this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>this.apply())}apply(){if(this._isDisposed||this._platform&&!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect();const t=this._originRect,e=this._overlayRect,n=this._viewportRect,i=[];let s;for(let o of this._preferredPositions){let r=this._getOriginPoint(t,o),a=this._getOverlayPoint(r,e,o),l=this._getOverlayFit(a,e,n,o);if(l.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(o,r);this._canFitWithFlexibleDimensions(l,a,n)?i.push({position:o,origin:r,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(r,o)}):(!s||s.overlayFit.visibleArea<l.visibleArea)&&(s={overlayFit:l,overlayPoint:a,originPoint:r,position:o,overlayRect:e})}if(i.length){let t=null,e=-1;for(const n of i){const i=n.boundingBoxRect.width*n.boundingBoxRect.height*(n.position.weight||1);i>e&&(e=i,t=n)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(s.position,s.originPoint);this._applyPosition(s.position,s.originPoint)}detach(){this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this.detach(),this._boundingBox=null,this._positionChanges.complete(),this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){this.scrollables=t}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t instanceof Mn?t.nativeElement:t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let n,i;if("center"==e.originX)n=t.left+t.width/2;else{const i=this._isRtl()?t.right:t.left,s=this._isRtl()?t.left:t.right;n="start"==e.originX?i:s}return{x:n,y:i="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}_getOverlayPoint(t,e,n){let i,s;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+(s="center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}}_getOverlayFit(t,e,n,i){let{x:s,y:o}=t,r=this._getOffset(i,"x"),a=this._getOffset(i,"y");r&&(s+=r),a&&(o+=a);let l=0-o,h=o+e.height-n.height,u=this._subtractOverflows(e.width,0-s,s+e.width-n.width),c=this._subtractOverflows(e.height,l,h),d=u*c;return{visibleArea:d,isCompletelyWithinViewport:e.width*e.height===d,fitsInViewportVertically:c===e.height,fitsInViewportHorizontally:u==e.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){const i=n.bottom-e.y,s=n.right-e.x,o=this._overlayRef.getConfig().minHeight,r=this._overlayRef.getConfig().minWidth;return(t.fitsInViewportVertically||null!=o&&o<=i)&&(t.fitsInViewportHorizontally||null!=r&&r<=s)}}_pushOverlayOnScreen(t,e){const n=this._viewportRect,i=Math.max(t.x+e.width-n.right,0),s=Math.max(t.y+e.height-n.bottom,0),o=Math.max(n.top-t.y,0),r=Math.max(n.left-t.x,0);let a,l=0;return{x:t.x+(a=e.width<=n.width?r||-i:n.left-t.x),y:t.y+(l=e.height<=n.height?o||-s:n.top-t.y)}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),this._lastPosition=t,this._positionChangeSubscriptions>0){const e=this._getScrollVisibility(),n=new jh(t,e);this._positionChanges.next(n)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let n,i=t.overlayY;n="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let s=0;s<e.length;s++)e[s].style.transformOrigin=`${n} ${i}`}_calculateBoundingBoxRect(t,e){const n=this._viewportRect,i=this._isRtl();let s,o,r,a,l,h;if("top"===e.overlayY)o=t.y,s=n.bottom-t.y;else if("bottom"===e.overlayY)s=n.height-(r=n.height-t.y+2*this._viewportMargin)+this._viewportMargin;else{const e=Math.min(n.bottom-t.y,t.y-n.left),i=this._lastBoundingBoxSize.height;o=t.y-e,(s=2*e)>i&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-i/2)}if("end"===e.overlayX&&!i||"start"===e.overlayX&&i)h=n.right-t.x+this._viewportMargin,a=t.x-n.left;else if("start"===e.overlayX&&!i||"end"===e.overlayX&&i)l=t.x,a=n.right-t.x;else{const e=Math.min(n.right-t.x,t.x-n.top),i=this._lastBoundingBoxSize.width;l=t.x-e,(a=2*e)>i&&!this._isInitialRender&&!this._growAfterOpen&&(l=t.x-i/2)}return{top:o,left:l,bottom:r,right:h,width:a,height:s}}_setBoundingBoxStyles(t,e){const n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));const i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right="",i.width=i.height="100%";else{const t=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=wa(n.height),i.top=wa(n.top),i.bottom=wa(n.bottom),i.width=wa(n.width),i.left=wa(n.left),i.right=wa(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(i.maxHeight=wa(t)),s&&(i.maxWidth=wa(s))}this._lastBoundingBoxSize=n,eu(this._boundingBox.style,i)}_resetBoundingBoxStyles(){eu(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){eu(this._pane.style,{top:"",left:"",bottom:"",right:"",position:""})}_setOverlayElementStyles(t,e){const n={};this._hasExactPosition()?(eu(n,this._getExactOverlayY(e,t)),eu(n,this._getExactOverlayX(e,t))):n.position="static";let i="",s=this._getOffset(e,"x"),o=this._getOffset(e,"y");s&&(i+=`translateX(${s}px) `),o&&(i+=`translateY(${o}px)`),n.transform=i.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),eu(this._pane.style,n)}_getExactOverlayY(t,e){let n={top:null,bottom:null},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect));let s=this._overlayContainer?this._overlayContainer.getContainerElement().getBoundingClientRect().top:0;return i.y-=s,"bottom"===t.overlayY?n.bottom=`${this._document.documentElement.clientHeight-(i.y+this._overlayRect.height)}px`:n.top=wa(i.y),n}_getExactOverlayX(t,e){let n,i={left:null,right:null},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect)),"right"==(n=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right=`${this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)}px`:i.left=wa(s.x),i}_getScrollVisibility(){const t=this._origin.getBoundingClientRect(),e=this._pane.getBoundingClientRect(),n=this.scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Wh(t,n),isOriginOutsideView:qh(t,n),isOverlayClipped:Wh(e,n),isOverlayOutsideView:qh(e,n)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){if(!this._preferredPositions.length)throw Error("FlexibleConnectedPositionStrategy: At least one position is required.");this._preferredPositions.forEach(t=>{Zh("originX",t.originX),Hh("originY",t.originY),Zh("overlayX",t.overlayX),Hh("overlayY",t.overlayY)})}}function eu(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}class nu{constructor(t,e,n,i,s,o){this._preferredPositions=[],this._positionStrategy=new tu(n,i,s,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e)}get _isRtl(){return"rtl"===this._overlayRef.getDirection()}get onPositionChange(){return this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,n,i){const s=new Bh(t,e,n,i);return this._preferredPositions.push(s),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}class iu{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper")}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig();t.position=this._cssPosition,t.marginLeft="100%"===n.width?"0":this._leftOffset,t.marginTop="100%"===n.height?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,"100%"===n.width?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems="100%"===n.height?"flex-start":this._alignItems}dispose(){}}class su{constructor(t,e,n,i){this._viewportRuler=t,this._document=e,this._platform=n,this._overlayContainer=i}global(){return new iu}connectedTo(t,e,n){return new nu(e,n,t,this._viewportRuler,this._document)}flexibleConnectedTo(t){return new tu(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}su.ngInjectableDef=ot({factory:function(){return new su(te(Lh),te(Ol),te(Fl,8),te(Xh,8))},token:su,providedIn:"root"});let ou=0;class ru{constructor(t,e,n,i,s,o,r,a,l){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=n,this._positionBuilder=i,this._keyboardDispatcher=s,this._injector=o,this._ngZone=r,this._document=a,this._directionality=l}create(t){const e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),s=new Vh(t);return s.direction=s.direction||this._directionality.value,new Jh(i,e,n,s,this._ngZone,this._keyboardDispatcher,this._document)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id=`cdk-overlay-${ou++}`,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(kn)),new Nh(t,this._componentFactoryResolver,this._appRef,this._injector)}}const au=new rt("cdk-connected-overlay-scroll-strategy");function lu(t){return()=>t.scrollStrategies.reposition()}class hu{}const uu=20,cu="mat-tooltip-panel";function du(t){return Error(`Tooltip position "${t}" is invalid.`)}const pu=new rt("mat-tooltip-scroll-strategy");function mu(t){return()=>t.scrollStrategies.reposition({scrollThrottle:uu})}const fu=new rt("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}});class _u{constructor(t,e,n,i,s,o,r,a,l,h,u){this._overlay=t,this._elementRef=e,this._scrollDispatcher=n,this._viewContainerRef=i,this._ngZone=s,this._platform=o,this._ariaDescriber=r,this._focusMonitor=a,this._scrollStrategy=l,this._dir=h,this._defaultOptions=u,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this._message="",this._manualListeners=new Map,this._destroyed=new S;const c=e.nativeElement;o.IOS?"INPUT"!==c.nodeName&&"TEXTAREA"!==c.nodeName||(c.style.webkitUserSelect=c.style.userSelect=""):(this._manualListeners.set("mouseenter",()=>this.show()),this._manualListeners.set("mouseleave",()=>this.hide()),this._manualListeners.forEach((t,n)=>e.nativeElement.addEventListener(n,t))),c.draggable&&"none"===c.style.webkitUserDrag&&(c.style.webkitUserDrag=""),a.monitor(c).pipe(ql(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&s.run(()=>this.show()):s.run(()=>this.hide(0))})}get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}get disabled(){return this._disabled}set disabled(t){this._disabled=ya(t),this._disabled&&this.hide(0)}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?`${t}`.trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ariaDescriber.describe(this._elementRef.nativeElement,this.message))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._platform.IOS||(this._manualListeners.forEach((t,e)=>this._elementRef.nativeElement.removeEventListener(e,t)),this._manualListeners.clear()),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)}show(t=this.showDelay){if(this.disabled||!this.message)return;const e=this._createOverlay();this._detach(),this._portal=this._portal||new Ah(gu,this._viewContainerRef),this._tooltipInstance=e.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(ql(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}hide(t=this.hideDelay){this._tooltipInstance&&this._tooltipInstance.hide(t)}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_handleKeydown(t){this._isTooltipVisible()&&t.keyCode===Ca&&(t.stopPropagation(),this.hide(0))}_handleTouchend(){this.hide(this._defaultOptions.touchendHideDelay)}_createOverlay(){if(this._overlayRef)return this._overlayRef;const t=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8),e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);return t.withScrollableContainers(e),t.positionChanges.pipe(ql(this._destroyed)).subscribe(t=>{this._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:t,panelClass:cu,scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(ql(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(){const t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign({},e.main,n.main),Object.assign({},e.fallback,n.fallback)])}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let n;if("above"==e||"below"==e)n={originX:"center",originY:"above"==e?"top":"bottom"};else if("before"==e||"left"==e&&t||"right"==e&&!t)n={originX:"start",originY:"center"};else{if(!("after"==e||"right"==e&&t||"left"==e&&!t))throw du(e);n={originX:"end",originY:"center"}}const{x:i,y:s}=this._invertPosition(n.originX,n.originY);return{main:n,fallback:{originX:i,originY:s}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let n;if("above"==e)n={overlayX:"center",overlayY:"bottom"};else if("below"==e)n={overlayX:"center",overlayY:"top"};else if("before"==e||"left"==e&&t||"right"==e&&!t)n={overlayX:"end",overlayY:"center"};else{if(!("after"==e||"right"==e&&t||"left"==e&&!t))throw du(e);n={overlayX:"start",overlayY:"center"}}const{x:i,y:s}=this._invertPosition(n.overlayX,n.overlayY);return{main:n,fallback:{overlayX:i,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(Th(1),ql(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}}class gu{constructor(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new S,this._isHandset=this._breakpointObserver.observe(ah.Handset)}show(t){this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(()=>{this._visibility="visible",this._markForCheck()},t)}hide(t){this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._visibility="hidden",this._markForCheck()},t)}afterHidden(){return this._onHide.asObservable()}isVisible(){return"visible"===this._visibility}_animationStart(){this._closeOnInteraction=!1}_animationDone(t){const e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}}class yu{}function vu(t,e=ph){return n=>n.lift(new bu(t,e))}class bu{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new wu(t,this.dueTime,this.scheduler))}}class wu extends y{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(xu,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function xu(t){t.debouncedNext()}class Eu{create(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}Eu.ngInjectableDef=ot({factory:function(){return new Eu},token:Eu,providedIn:"root"});class Cu{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,e)=>this._cleanupObserver(e))}observe(t){return x.create(e=>{const n=this._observeElement(t).subscribe(e);return()=>{n.unsubscribe(),this._unobserveElement(t)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const e=new S,n=this._mutationObserverFactory.create(t=>e.next(t));n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:e,stream:n}=this._observedElements.get(t);e&&e.disconnect(),n.complete(),this._observedElements.delete(t)}}}Cu.ngInjectableDef=ot({factory:function(){return new Cu(te(Eu))},token:Cu,providedIn:"root"});class Lu{}const ku=new rt("cdk-dir-doc",{providedIn:"root",factory:function(){return te(Ol)}});class Su{constructor(t){if(this.value="ltr",this.change=new on,t){const e=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===e||"rtl"===e?e:"ltr"}}ngOnDestroy(){this.change.complete()}}Su.ngInjectableDef=ot({factory:function(){return new Su(te(ku,8))},token:Su,providedIn:"root"});class Tu{}function Iu(t,e,n){return function(i){return i.lift(new Pu(t,e,n))}}class Pu{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new Mu(t,this.nextOrObserver,this.error,this.complete))}}class Mu extends y{constructor(t,e,n,s){super(t),this._tapNext=w,this._tapError=w,this._tapComplete=w,this._tapError=n||w,this._tapComplete=s||w,i(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||w,this._tapError=e.error||w,this._tapComplete=e.complete||w)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}const Du=" ";function Au(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}const Ou="cdk-describedby-message-container",Ru="cdk-describedby-message",Nu="cdk-describedby-host";let Fu=0;const zu=new Map;let Vu=null;class Bu{constructor(t){this._document=t}describe(t,e){this._canBeDescribed(t,e)&&(zu.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))}removeDescription(t,e){if(!this._canBeDescribed(t,e))return;this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e);const n=zu.get(e);n&&0===n.referenceCount&&this._deleteMessageElement(e),Vu&&0===Vu.childNodes.length&&this._deleteMessagesContainer()}ngOnDestroy(){const t=this._document.querySelectorAll(`[${Nu}]`);for(let e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute(Nu);Vu&&this._deleteMessagesContainer(),zu.clear()}_createMessageElement(t){const e=this._document.createElement("div");e.setAttribute("id",`${Ru}-${Fu++}`),e.appendChild(this._document.createTextNode(t)),this._createMessagesContainer(),Vu.appendChild(e),zu.set(t,{messageElement:e,referenceCount:0})}_deleteMessageElement(t){const e=zu.get(t),n=e&&e.messageElement;Vu&&n&&Vu.removeChild(n),zu.delete(t)}_createMessagesContainer(){if(!Vu){const t=this._document.getElementById(Ou);t&&t.parentNode.removeChild(t),(Vu=this._document.createElement("div")).id=Ou,Vu.setAttribute("aria-hidden","true"),Vu.style.display="none",this._document.body.appendChild(Vu)}}_deleteMessagesContainer(){Vu&&Vu.parentNode&&(Vu.parentNode.removeChild(Vu),Vu=null)}_removeCdkDescribedByReferenceIds(t){const e=Au(t,"aria-describedby").filter(t=>0!=t.indexOf(Ru));t.setAttribute("aria-describedby",e.join(" "))}_addMessageReference(t,e){const n=zu.get(e);!function(t,e,n){const i=Au(t,e);i.some(t=>t.trim()==n.trim())||(i.push(n.trim()),t.setAttribute(e,i.join(Du)))}(t,"aria-describedby",n.messageElement.id),t.setAttribute(Nu,""),n.referenceCount++}_removeMessageReference(t,e){const n=zu.get(e);n.referenceCount--,function(t,e,n){const i=Au(t,e).filter(t=>t!=n.trim());t.setAttribute(e,i.join(Du))}(t,"aria-describedby",n.messageElement.id),t.removeAttribute(Nu)}_isElementDescribedByMessage(t,e){const n=Au(t,"aria-describedby"),i=zu.get(e),s=i&&i.messageElement.id;return!!s&&-1!=n.indexOf(s)}_canBeDescribed(t,e){return t.nodeType===this._document.ELEMENT_NODE&&null!=e&&!!`${e}`.trim()}}Bu.ngInjectableDef=ot({factory:function(){return new Bu(te(Ol))},token:Bu,providedIn:"root"});class ju{constructor(t){this._items=t,this._activeItemIndex=-1,this._wrap=!1,this._letterKeyStream=new S,this._typeaheadSubscription=f.EMPTY,this._vertical=!0,this._skipPredicateFn=(t=>t.disabled),this._pressedLetters=[],this.tabOut=new S,this.change=new S,t instanceof Dn&&t.changes.subscribe(t=>{if(this._activeItem){const e=t.toArray().indexOf(this._activeItem);e>-1&&e!==this._activeItemIndex&&(this._activeItemIndex=e)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withTypeAhead(t=200){if(this._items.length&&this._items.some(t=>"function"!=typeof t.getLabel))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Iu(t=>this._pressedLetters.push(t)),vu(t),vh(()=>this._pressedLetters.length>0),j(()=>this._pressedLetters.join(""))).subscribe(t=>{const e=this._getItemsArray();for(let n=1;n<e.length+1;n++){const i=(this._activeItemIndex+n)%e.length,s=e[i];if(!this._skipPredicateFn(s)&&0===s.getLabel().toUpperCase().trim().indexOf(t)){this.setActiveItem(i);break}}this._pressedLetters=[]}),this}setActiveItem(t){const e=this._activeItemIndex;this.updateActiveItem(t),this._activeItemIndex!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){const e=t.keyCode;switch(e){case xa:return void this.tabOut.next();case Ia:if(this._vertical){this.setNextItemActive();break}return;case Sa:if(this._vertical){this.setPreviousItemActive();break}return;case Ta:if("ltr"===this._horizontal){this.setNextItemActive();break}if("rtl"===this._horizontal){this.setPreviousItemActive();break}return;case ka:if("ltr"===this._horizontal){this.setPreviousItemActive();break}if("rtl"===this._horizontal){this.setNextItemActive();break}return;default:return void(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=Da&&e<=Aa||e>=Pa&&e<=Ma)&&this._letterKeyStream.next(String.fromCharCode(e)))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t);this._activeItemIndex=n,this._activeItem=e[n]}updateActiveItemIndex(t){this.updateActiveItem(t)}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let n=1;n<=e.length;n++){const i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof Dn?this._items.toArray():this._items}}class Hu extends ju{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class Zu extends ju{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}class Uu{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const e=function(t){try{return t.frameElement}catch(t){return null}}(t.ownerDocument.defaultView||window);if(e){const t=e&&e.nodeName.toLowerCase();if(-1===$u(e))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===t)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(e))return!1}let n=t.nodeName.toLowerCase(),i=$u(t);if(t.hasAttribute("contenteditable"))return-1!==i;if("iframe"===n)return!1;if("audio"===n){if(!t.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===n){if(!t.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==n||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){let e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&t.tabIndex>=0}isFocusable(t){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){let e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||Gu(t))}(t)&&!this.isDisabled(t)&&this.isVisible(t)}}function Gu(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function $u(t){if(!Gu(t))return null;const e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}Uu.ngInjectableDef=ot({factory:function(){return new Uu(te(Fl))},token:Uu,providedIn:"root"});class qu{constructor(t,e,n,i,s=!1){this._element=t,this._checker=e,this._ngZone=n,this._document=i,this._hasAttached=!1,this._enabled=!0,s||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._startAnchor.tabIndex=this._endAnchor.tabIndex=this._enabled?0:-1)}destroy(){this._startAnchor&&this._startAnchor.parentNode&&this._startAnchor.parentNode.removeChild(this._startAnchor),this._endAnchor&&this._endAnchor.parentNode&&this._endAnchor.parentNode.removeChild(this._endAnchor),this._startAnchor=this._endAnchor=null}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",()=>this.focusLastTabbableElement())),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",()=>this.focusFirstTabbableElement()))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement()))})}focusFirstTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement()))})}focusLastTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement()))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], `+`[cdkFocusRegion${t}], `+`[cdk-focus-${t}]`);for(let n=0;n<e.length;n++)e[n].hasAttribute(`cdk-focus-${t}`)?console.warn(`Found use of deprecated attribute 'cdk-focus-${t}', `+`use 'cdkFocusRegion${t}' instead. The deprecated `+"attribute will be removed in 7.0.0.",e[n]):e[n].hasAttribute(`cdk-focus-region-${t}`)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${t}', `+`use 'cdkFocusRegion${t}' instead. The deprecated attribute `+"will be removed in 7.0.0.",e[n]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return t?(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 7.0.0",t),t.focus(),!0):this.focusFirstTabbableElement()}focusFirstTabbableElement(){const t=this._getRegionBoundary("start");return t&&t.focus(),!!t}focusLastTabbableElement(){const t=this._getRegionBoundary("end");return t&&t.focus(),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let n=0;n<e.length;n++){let t=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(t)return t}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let n=e.length-1;n>=0;n--){let t=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(t)return t}return null}_createAnchor(){const t=this._document.createElement("div");return t.tabIndex=this._enabled?0:-1,t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.asObservable().pipe(Th(1)).subscribe(t)}}class Wu{constructor(t,e,n){this._checker=t,this._ngZone=e,this._document=n}create(t,e=!1){return new qu(t,this._checker,this._ngZone,this._document,e)}}Wu.ngInjectableDef=ot({factory:function(){return new Wu(te(Uu),te(rn),te(Ol))},token:Wu,providedIn:"root"});const Ku=new rt("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}});class Yu{constructor(t,e){this._document=e,this._liveElement=t||this._createLiveElement()}announce(t,e="polite"){return this._liveElement.textContent="",this._liveElement.setAttribute("aria-live",e),new Promise(e=>{setTimeout(()=>{this._liveElement.textContent=t,e()},100)})}ngOnDestroy(){this._liveElement&&this._liveElement.parentNode&&this._liveElement.parentNode.removeChild(this._liveElement)}_createLiveElement(){const t=this._document.getElementsByClassName("cdk-live-announcer-element");for(let n=0;n<t.length;n++)t[n].parentNode.removeChild(t[n]);const e=this._document.createElement("div");return e.classList.add("cdk-live-announcer-element"),e.classList.add("cdk-visually-hidden"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),e}}Yu.ngInjectableDef=ot({factory:function(){return new Yu(te(Ku,8),te(Ol))},token:Yu,providedIn:"root"});const Qu=650;class Xu{constructor(t,e){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._unregisterGlobalListeners=(()=>{}),this._monitoredElementCount=0}monitor(t,e=!1){if(!this._platform.isBrowser)return Jl(null);if(this._elementInfo.has(t)){let n=this._elementInfo.get(t);return n.checkChildren=e,n.subject.asObservable()}let n={unlisten:()=>{},checkChildren:e,subject:new S};this._elementInfo.set(t,n),this._incrementMonitoredElementCount();let i=e=>this._onFocus(e,t),s=e=>this._onBlur(e,t);return this._ngZone.runOutsideAngular(()=>{t.addEventListener("focus",i,!0),t.addEventListener("blur",s,!0)}),n.unlisten=(()=>{t.removeEventListener("focus",i,!0),t.removeEventListener("blur",s,!0)}),n.subject.asObservable()}stopMonitoring(t){const e=this._elementInfo.get(t);e&&(e.unlisten(),e.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._decrementMonitoredElementCount())}focusVia(t,e,n){this._setOriginForCurrentEventQueue(e),"function"==typeof t.focus&&t.focus(n)}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_registerGlobalListeners(){if(!this._platform.isBrowser)return;let t=()=>{this._lastTouchTarget=null,this._setOriginForCurrentEventQueue("keyboard")},e=()=>{this._lastTouchTarget||this._setOriginForCurrentEventQueue("mouse")},n=t=>{null!=this._touchTimeoutId&&clearTimeout(this._touchTimeoutId),this._lastTouchTarget=t.target,this._touchTimeoutId=setTimeout(()=>this._lastTouchTarget=null,Qu)},i=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};this._ngZone.runOutsideAngular(()=>{document.addEventListener("keydown",t,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",n,!Bl()||{passive:!0,capture:!0}),window.addEventListener("focus",i)}),this._unregisterGlobalListeners=(()=>{document.removeEventListener("keydown",t,!0),document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",n,!Bl()||{passive:!0,capture:!0}),window.removeEventListener("focus",i),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)})}_toggleClass(t,e,n){n?t.classList.add(e):t.classList.remove(e)}_setClasses(t,e){this._elementInfo.get(t)&&(this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e))}_setOriginForCurrentEventQueue(t){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originTimeoutId=setTimeout(()=>this._origin=null,1)})}_wasCausedByTouch(t){let e=t.target;return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}_onFocus(t,e){const n=this._elementInfo.get(e);if(!n||!n.checkChildren&&e!==t.target)return;let i=this._origin;i||(i=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"),this._setClasses(e,i),this._emitOrigin(n.subject,i),this._lastFocusOrigin=i}_onBlur(t,e){const n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}_emitOrigin(t,e){this._ngZone.run(()=>t.next(e))}_incrementMonitoredElementCount(){1==++this._monitoredElementCount&&this._registerGlobalListeners()}_decrementMonitoredElementCount(){--this._monitoredElementCount||(this._unregisterGlobalListeners(),this._unregisterGlobalListeners=(()=>{}))}}Xu.ngInjectableDef=ot({factory:function(){return new Xu(te(rn),te(Fl))},token:Xu,providedIn:"root"});class Ju{}let tc=null;function ec(){return tc}class nc{constructor(){this.resourceLoaderType=null}get attrToPropMap(){return this._attrToPropMap}set attrToPropMap(t){this._attrToPropMap=t}}class ic extends nc{constructor(){super(),this._animationPrefix=null,this._transitionEnd=null;try{const t=this.createElement("div",document);if(null!=this.getStyle(t,"animationName"))this._animationPrefix="";else{const e=["Webkit","Moz","O","ms"];for(let n=0;n<e.length;n++)if(null!=this.getStyle(t,e[n]+"AnimationName")){this._animationPrefix="-"+e[n].toLowerCase()+"-";break}}const e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(e).forEach(n=>{null!=this.getStyle(t,n)&&(this._transitionEnd=e[n])})}catch(t){this._animationPrefix=null,this._transitionEnd=null}}getDistributedNodes(t){return t.getDistributedNodes()}resolveAndSetHref(t,e,n){t.href=null==n?e:e+"/../"+n}supportsDOMEvents(){return!0}supportsNativeShadowDOM(){return"function"==typeof document.body.createShadowRoot}getAnimationPrefix(){return this._animationPrefix?this._animationPrefix:""}getTransitionEnd(){return this._transitionEnd?this._transitionEnd:""}supportsAnimation(){return null!=this._animationPrefix&&null!=this._transitionEnd}}const sc={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},oc=3,rc={"\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"},ac={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"};let lc;mt.Node&&(lc=mt.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))});class hc extends ic{parse(t){throw new Error("parse not implemented")}static makeCurrent(){!function(t){tc||(tc=t)}(new hc)}hasProperty(t,e){return e in t}setProperty(t,e,n){t[e]=n}getProperty(t,e){return t[e]}invoke(t,e,n){t[e](...n)}logError(t){window.console&&(console.error?console.error(t):console.log(t))}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}get attrToPropMap(){return sc}contains(t,e){return lc.call(t,e)}querySelector(t,e){return t.querySelector(e)}querySelectorAll(t,e){return t.querySelectorAll(e)}on(t,e,n){t.addEventListener(e,n,!1)}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}createMouseEvent(t){const e=this.getDefaultDocument().createEvent("MouseEvent");return e.initEvent(t,!0,!0),e}createEvent(t){const e=this.getDefaultDocument().createEvent("Event");return e.initEvent(t,!0,!0),e}preventDefault(t){t.preventDefault(),t.returnValue=!1}isPrevented(t){return t.defaultPrevented||null!=t.returnValue&&!t.returnValue}getInnerHTML(t){return t.innerHTML}getTemplateContent(t){return"content"in t&&this.isTemplateElement(t)?t.content:null}getOuterHTML(t){return t.outerHTML}nodeName(t){return t.nodeName}nodeValue(t){return t.nodeValue}type(t){return t.type}content(t){return this.hasProperty(t,"content")?t.content:t}firstChild(t){return t.firstChild}nextSibling(t){return t.nextSibling}parentElement(t){return t.parentNode}childNodes(t){return t.childNodes}childNodesAsList(t){const e=t.childNodes,n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=e[i];return n}clearNodes(t){for(;t.firstChild;)t.removeChild(t.firstChild)}appendChild(t,e){t.appendChild(e)}removeChild(t,e){t.removeChild(e)}replaceChild(t,e,n){t.replaceChild(e,n)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}insertBefore(t,e,n){t.insertBefore(n,e)}insertAllBefore(t,e,n){n.forEach(n=>t.insertBefore(n,e))}insertAfter(t,e,n){t.insertBefore(n,e.nextSibling)}setInnerHTML(t,e){t.innerHTML=e}getText(t){return t.textContent}setText(t,e){t.textContent=e}getValue(t){return t.value}setValue(t,e){t.value=e}getChecked(t){return t.checked}setChecked(t,e){t.checked=e}createComment(t){return this.getDefaultDocument().createComment(t)}createTemplate(t){const e=this.getDefaultDocument().createElement("template");return e.innerHTML=t,e}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createElementNS(t,e,n){return(n=n||this.getDefaultDocument()).createElementNS(t,e)}createTextNode(t,e){return(e=e||this.getDefaultDocument()).createTextNode(t)}createScriptTag(t,e,n){const i=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return i.setAttribute(t,e),i}createStyleElement(t,e){const n=(e=e||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(t,e)),n}createShadowRoot(t){return t.createShadowRoot()}getShadowRoot(t){return t.shadowRoot}getHost(t){return t.host}clone(t){return t.cloneNode(!0)}getElementsByClassName(t,e){return t.getElementsByClassName(e)}getElementsByTagName(t,e){return t.getElementsByTagName(e)}classList(t){return Array.prototype.slice.call(t.classList,0)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}hasClass(t,e){return t.classList.contains(e)}setStyle(t,e,n){t.style[e]=n}removeStyle(t,e){t.style[e]=""}getStyle(t,e){return t.style[e]}hasStyle(t,e,n){const i=this.getStyle(t,e)||"";return n?i==n:i.length>0}tagName(t){return t.tagName}attributeMap(t){const e=new Map,n=t.attributes;for(let i=0;i<n.length;i++){const t=n.item(i);e.set(t.name,t.value)}return e}hasAttribute(t,e){return t.hasAttribute(e)}hasAttributeNS(t,e,n){return t.hasAttributeNS(e,n)}getAttribute(t,e){return t.getAttribute(e)}getAttributeNS(t,e,n){return t.getAttributeNS(e,n)}setAttribute(t,e,n){t.setAttribute(e,n)}setAttributeNS(t,e,n,i){t.setAttributeNS(e,n,i)}removeAttribute(t,e){t.removeAttribute(e)}removeAttributeNS(t,e,n){t.removeAttributeNS(e,n)}templateAwareRoot(t){return this.isTemplateElement(t)?this.content(t):t}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}getBoundingClientRect(t){try{return t.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}}getTitle(t){return t.title}setTitle(t,e){t.title=e||""}elementMatches(t,e){return!!this.isElementNode(t)&&(t.matches&&t.matches(e)||t.msMatchesSelector&&t.msMatchesSelector(e)||t.webkitMatchesSelector&&t.webkitMatchesSelector(e))}isTemplateElement(t){return this.isElementNode(t)&&"TEMPLATE"===t.nodeName}isTextNode(t){return t.nodeType===Node.TEXT_NODE}isCommentNode(t){return t.nodeType===Node.COMMENT_NODE}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}hasShadowRoot(t){return null!=t.shadowRoot&&t instanceof HTMLElement}isShadowRoot(t){return t instanceof DocumentFragment}importIntoDoc(t){return document.importNode(this.templateAwareRoot(t),!0)}adoptNode(t){return document.adoptNode(t)}getHref(t){return t.getAttribute("href")}getEventKey(t){let e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),t.location===oc&&ac.hasOwnProperty(e)&&(e=ac[e]))}return rc[e]||e}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=cc||(cc=document.querySelector("base"))?cc.getAttribute("href"):null;return null==e?null:function(t){return uc||(uc=document.createElement("a")),uc.setAttribute("href",t),"/"===uc.pathname.charAt(0)?uc.pathname:"/"+uc.pathname}(e)}resetBaseElement(){cc=null}getUserAgent(){return window.navigator.userAgent}setData(t,e,n){this.setAttribute(t,"data-"+e,n)}getData(t,e){return this.getAttribute(t,"data-"+e)}getComputedStyle(t){return getComputedStyle(t)}supportsWebAnimation(){return"function"==typeof Element.prototype.animate}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return el(document.cookie,t)}setCookie(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)}}let uc,cc=null;const dc=Ol;function pc(){return!!window.history.pushState}class mc extends Oa{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=ec().getLocation(),this._history=ec().getHistory()}getBaseHrefFromDOM(){return ec().getBaseHref(this._doc)}onPopState(t){ec().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){ec().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){pc()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){pc()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}}mc.ctorParameters=(()=>[{type:void 0,decorators:[{type:Tt,args:[dc]}]}]);class fc{constructor(t){this._doc=t,this._dom=ec()}addTag(t,e=!1){return t?this._getOrCreateElement(t,e):null}addTags(t,e=!1){return t?t.reduce((t,n)=>(n&&t.push(this._getOrCreateElement(n,e)),t),[]):[]}getTag(t){return t&&this._dom.querySelector(this._doc,`meta[${t}]`)||null}getTags(t){if(!t)return[];const e=this._dom.querySelectorAll(this._doc,`meta[${t}]`);return e?[].slice.call(e):[]}updateTag(t,e){if(!t)return null;e=e||this._parseSelector(t);const n=this.getTag(e);return n?this._setMetaElementAttributes(t,n):this._getOrCreateElement(t,!0)}removeTag(t){this.removeTagElement(this.getTag(t))}removeTagElement(t){t&&this._dom.remove(t)}_getOrCreateElement(t,e=!1){if(!e){const e=this._parseSelector(t),n=this.getTag(e);if(n&&this._containsAttributes(t,n))return n}const n=this._dom.createElement("meta");this._setMetaElementAttributes(t,n);const i=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(i,n),n}_setMetaElementAttributes(t,e){return Object.keys(t).forEach(n=>this._dom.setAttribute(e,n,t[n])),e}_parseSelector(t){const e=t.name?"name":"property";return`${e}="${t[e]}"`}_containsAttributes(t,e){return Object.keys(t).every(n=>this._dom.getAttribute(e,n)===t[n])}}const _c=new rt("TRANSITION_ID"),gc=[{provide:De,useFactory:function(t,e,n){return()=>{n.get(Ae).donePromise.then(()=>{const n=ec();Array.prototype.slice.apply(n.querySelectorAll(e,"style[ng-transition]")).filter(e=>n.getAttribute(e,"ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[_c,dc,Nt],multi:!0}];class yc{static init(){!function(t){_n=t}(new yc)}addToWindow(t){mt.getAngularTestability=((e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i}),mt.getAllAngularTestabilities=(()=>t.getAllTestabilities()),mt.getAllAngularRootElements=(()=>t.getAllRootElements()),mt.frameworkStabilizers||(mt.frameworkStabilizers=[]),mt.frameworkStabilizers.push(t=>{const e=mt.getAllAngularTestabilities();let n=e.length,i=!1;const s=function(e){i=i||e,0==--n&&t(i)};e.forEach(function(t){t.whenStable(s)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const i=t.getTestability(e);return null!=i?i:n?ec().isShadowRoot(e)?this.findTestabilityInTree(t,ec().getHost(e),!0):this.findTestabilityInTree(t,ec().parentElement(e),!0):null}}class vc{constructor(t){this._doc=t}getTitle(){return ec().getTitle(this._doc)}setTitle(t){ec().setTitle(this._doc,t)}}function bc(t,e){"undefined"!=typeof COMPILED&&COMPILED||((mt.ng=mt.ng||{})[t]=e)}const wc={ApplicationRef:kn,NgZone:rn};function xc(t){return Bn(t)}const Ec=new rt("EventManagerPlugins");class Cc{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i<n.length;i++){const e=n[i];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error(`No event manager plugin found for event ${t}`)}}class Lc{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const i=ec().getGlobalEventTarget(this._doc,t);if(!i)throw new Error(`Unsupported event target ${i} for event ${e}`);return this.addEventListener(i,e,n)}}class kc{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}class Sc extends kc{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>ec().remove(t))}}const Tc={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/"},Ic=/%COMP%/g,Pc="_nghost-%COMP%",Mc="_ngcontent-%COMP%";function Dc(t,e,n){for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?Dc(t,s,n):(s=s.replace(Ic,t),n.push(s))}return n}function Ac(t){return e=>{!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}class Oc{constructor(t,e){this.eventManager=t,this.sharedStylesHost=e,this.rendererByCompId=new Map,this.defaultRenderer=new Rc(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ee.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new zc(this.eventManager,this.sharedStylesHost,e),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case ee.Native:return new Vc(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=Dc(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}class Rc{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Tc[e],t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t){let e="string"==typeof t?document.querySelector(t):t;if(!e)throw new Error(`The selector "${t}" did not match any elements`);return e.textContent="",e}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=`${i}:${e}`;const s=Tc[i];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=Tc[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&In.DashCase?t.style.setProperty(e,n,i&In.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&In.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){Fc(e,"property"),t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return Fc(e,"listener"),"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Ac(n)):this.eventManager.addEventListener(t,e,Ac(n))}}const Nc="@".charCodeAt(0);function Fc(t,e){if(t.charCodeAt(0)===Nc)throw new Error(`Found the synthetic ${e} ${t}. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.`)}class zc extends Rc{constructor(t,e,n){super(t),this.component=n;const i=Dc(n.id,n.styles,[]);e.addStyles(i),this.contentAttr=Mc.replace(Ic,n.id),this.hostAttr=Pc.replace(Ic,n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Vc extends Rc{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.component=i,this.shadowRoot=n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=Dc(i.id,i.styles,[]);for(let o=0;o<s.length;o++){const t=document.createElement("style");t.textContent=s[o],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}const Bc="undefined"!=typeof Zone&&Zone.__symbol__||function(t){return"__zone_symbol__"+t},jc=Bc("addEventListener"),Hc=Bc("removeEventListener"),Zc={},Uc="__zone_symbol__propagationStopped";let Gc;"undefined"!=typeof Zone&&Zone[Bc("BLACK_LISTED_EVENTS")]&&(Gc={});const $c=function(t){return!!Gc&&Gc.hasOwnProperty(t)},qc=function(t){const e=Zc[t.type];if(!e)return;const n=this[e];if(!n)return;const i=[t];if(1===n.length){const t=n[0];return t.zone!==Zone.current?t.zone.run(t.handler,this,i):t.handler.apply(this,i)}{const e=n.slice();for(let n=0;n<e.length&&!0!==t[Uc];n++){const t=e[n];t.zone!==Zone.current?t.zone.run(t.handler,this,i):t.handler.apply(this,i)}}},Wc={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},Kc=new rt("HammerGestureConfig");class Yc{constructor(){this.events=[],this.overrides={}}buildHammer(t){const e=new Hammer(t,this.options);e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0});for(const n in this.overrides)e.get(n).set(this.overrides[n]);return e}}const Qc=["alt","control","meta","shift"],Xc={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class Jc extends Lc{constructor(t){super(t)}supports(t){return null!=Jc.parseEventName(t)}addEventListener(t,e,n){const i=Jc.parseEventName(e),s=Jc.eventCallback(i.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ec().onAndCancel(t,i.domEventName,s))}static parseEventName(t){const e=t.toLowerCase().split("."),n=e.shift();if(0===e.length||"keydown"!==n&&"keyup"!==n)return null;const i=Jc._normalizeKey(e.pop());let s="";if(Qc.forEach(t=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),s+=t+".")}),s+=i,0!=e.length||0===i.length)return null;const o={};return o.domEventName=n,o.fullKey=s,o}static getEventFullKey(t){let e="",n=ec().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Qc.forEach(i=>{i!=n&&(0,Xc[i])(t)&&(e+=i+".")}),e+=n}static eventCallback(t,e,n){return i=>{Jc.getEventFullKey(i)===t&&n.runGuarded(()=>e(i))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}class td{}class ed extends td{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case Oi.NONE:return e;case Oi.HTML:return e instanceof id?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){let n=null;try{Pi=Pi||new ci(t);let i=e?String(e):"";n=Pi.getInertBodyElement(i);let s=5,o=i;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,i=o,o=n.innerHTML,n=Pi.getInertBodyElement(i)}while(i!==o);const r=new ki,a=r.sanitizeChildren(Mi(n)||n);return bn()&&r.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n){const t=Mi(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}(this._doc,String(e)));case Oi.STYLE:return e instanceof sd?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";const e=t.match(Ai);return e&&mi(e[1])===e[1]||t.match(Di)&&function(t){let e=!0,n=!0;for(let i=0;i<t.length;i++){const s=t.charAt(i);"'"===s&&n?e=!e:'"'===s&&e&&(n=!n)}return e&&n}(t)?t:(bn()&&console.warn(`WARNING: sanitizing unsafe style value ${t} (see http://g.co/ng/security#xss).`),"unsafe")}(e));case Oi.SCRIPT:if(e instanceof od)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"Script"),new Error("unsafe value used in a script context");case Oi.URL:return e instanceof ad||e instanceof rd?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"URL"),mi(String(e)));case Oi.RESOURCE_URL:if(e instanceof ad)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}checkNotSafeValue(t,e){if(t instanceof nd)throw new Error(`Required a safe ${e}, got a ${t.getTypeName()} `+"(see http://g.co/ng/security#xss)")}bypassSecurityTrustHtml(t){return new id(t)}bypassSecurityTrustStyle(t){return new sd(t)}bypassSecurityTrustScript(t){return new od(t)}bypassSecurityTrustUrl(t){return new rd(t)}bypassSecurityTrustResourceUrl(t){return new ad(t)}}class nd{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}`+" (see http://g.co/ng/security#xss)"}}class id extends nd{getTypeName(){return"HTML"}}class sd extends nd{getTypeName(){return"Style"}}class od extends nd{getTypeName(){return"Script"}}class rd extends nd{getTypeName(){return"URL"}}class ad extends nd{getTypeName(){return"ResourceURL"}}const ld=xn(oi,"browser",[{provide:ze,useValue:Rl},{provide:Fe,useValue:function(){hc.makeCurrent(),yc.init()},multi:!0},{provide:Oa,useClass:mc,deps:[dc]},{provide:dc,useFactory:function(){return document},deps:[]}]);function hd(){return new he}class ud{constructor(t){if(t)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:ud,providers:[{provide:Oe,useValue:t.appId},{provide:_c,useExisting:Oe},gc]}}}"undefined"!=typeof window&&window;class cd{}cd.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",cd.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",cd.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",cd.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";class dd{}dd.COMPLEX="375ms",dd.ENTERING="225ms",dd.EXITING="195ms";const pd=new rt("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});class md{constructor(t){this._sanityChecksEnabled=t,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._hasDoneGlobalChecks=!0)}_areChecksEnabled(){return this._sanityChecksEnabled&&bn()&&!this._isTestEnv()}_isTestEnv(){return this._window&&(this._window.__karma__||this._window.jasmine)}_checkDoctypeIsDefined(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){const t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);const e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}}_checkHammerIsAvailable(){!this._hasCheckedHammer&&this._window&&(this._areChecksEnabled()&&!this._window.Hammer&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)}}function fd(t){return class extends t{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=ya(t)}}}function _d(t,e){return class extends t{get color(){return this._color}set color(t){const n=t||e;n!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),n&&this._elementRef.nativeElement.classList.add(`mat-${n}`),this._color=n)}constructor(...t){super(...t),this.color=e}}}function gd(t){return class extends t{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=ya(t)}}}class yd{isErrorState(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}yd.ngInjectableDef=ot({factory:function(){return new yd},token:yd,providedIn:"root"});const vd=function(){var t={FADING_IN:0,VISIBLE:1,FADING_OUT:2,HIDDEN:3};return t[t.FADING_IN]="FADING_IN",t[t.VISIBLE]="VISIBLE",t[t.FADING_OUT]="FADING_OUT",t[t.HIDDEN]="HIDDEN",t}();class bd{constructor(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=vd.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const wd={enterDuration:450,exitDuration:400},xd=800;class Ed{constructor(t,e,n,i){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this._eventOptions=!!Bl()&&{passive:!0},this.onMousedown=(t=>{const e=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+xd;this._target.rippleDisabled||e||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}),this.onTouchStart=(t=>{this._target.rippleDisabled||(this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0,this.fadeInRipple(t.touches[0].clientX,t.touches[0].clientY,this._target.rippleConfig))}),this.onPointerUp=(()=>{this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(t=>{!t.config.persistent&&(t.state===vd.VISIBLE||t.config.terminateOnPointerUp&&t.state===vd.FADING_IN)&&t.fadeOut()}))}),i.isBrowser&&(this._containerElement=n.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown),this._triggerEvents.set("mouseup",this.onPointerUp),this._triggerEvents.set("mouseleave",this.onPointerUp),this._triggerEvents.set("touchstart",this.onTouchStart),this._triggerEvents.set("touchend",this.onPointerUp))}fadeInRipple(t,e,n={}){const i=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=Object.assign({},wd,n.animation);n.centered&&(t=i.left+i.width/2,e=i.top+i.height/2);const o=n.radius||function(t,e,n){const i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),s=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+s*s)}(t,e,i),r=t-i.left,a=e-i.top,l=s.enterDuration/(n.speedFactor||1),h=document.createElement("div");h.classList.add("mat-ripple-element"),h.style.left=`${r-o}px`,h.style.top=`${a-o}px`,h.style.height=`${2*o}px`,h.style.width=`${2*o}px`,h.style.backgroundColor=n.color||null,h.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(h),window.getComputedStyle(h).getPropertyValue("opacity"),h.style.transform="scale(1)";const u=new bd(this,h,n);return u.state=vd.FADING_IN,this._activeRipples.add(u),n.persistent||(this._mostRecentTransientRipple=u),this.runTimeoutOutsideZone(()=>{const t=u===this._mostRecentTransientRipple;u.state=vd.VISIBLE,n.persistent||t&&this._isPointerDown||u.fadeOut()},l),u}fadeOutRipple(t){const e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!e)return;const n=t.element,i=Object.assign({},wd,t.config.animation);n.style.transitionDuration=`${i.exitDuration}ms`,n.style.opacity="0",t.state=vd.FADING_OUT,this.runTimeoutOutsideZone(()=>{t.state=vd.HIDDEN,n.parentNode.removeChild(n)},i.exitDuration)}fadeOutAll(){this._activeRipples.forEach(t=>t.fadeOut())}setupTriggerEvents(t){t&&t!==this._triggerElement&&(this._removeTriggerEvents(),this._ngZone.runOutsideAngular(()=>{this._triggerEvents.forEach((e,n)=>t.addEventListener(n,e,this._eventOptions))}),this._triggerElement=t)}runTimeoutOutsideZone(t,e=0){this._ngZone.runOutsideAngular(()=>setTimeout(t,e))}_removeTriggerEvents(){this._triggerElement&&this._triggerEvents.forEach((t,e)=>{this._triggerElement.removeEventListener(e,t,this._eventOptions)})}}const Cd=new rt("mat-ripple-global-options");class Ld{constructor(t,e,n,i,s){this._elementRef=t,this.radius=0,this.speedFactor=1,this._disabled=!1,this._isInitialized=!1,this._globalOptions=i||{},this._rippleRenderer=new Ed(this,e,t,n),"NoopAnimations"===s&&(this._globalOptions.animation={enterDuration:0,exitDuration:0})}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign({},this._globalOptions.animation,this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1)}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,e=0,n){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign({},this.rippleConfig,n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign({},this.rippleConfig,t))}}class kd{}class Sd{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1}}class Td{}const Id=fd(class{});let Pd=0;class Md extends Id{constructor(){super(...arguments),this._labelId=`mat-optgroup-label-${Pd++}`}}let Dd=0;class Ad{constructor(t,e=!1){this.source=t,this.isUserInput=e}}const Od=new rt("MAT_OPTION_PARENT_COMPONENT");class Rd{constructor(t,e,n,i){this._element=t,this._changeDetectorRef=e,this._parent=n,this.group=i,this._selected=!1,this._active=!1,this._disabled=!1,this._id=`mat-option-${Dd++}`,this._mostRecentViewValue="",this.onSelectionChange=new on,this._stateChanges=new S}get multiple(){return this._parent&&this._parent.multiple}get id(){return this._id}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=ya(t)}get disableRipple(){return this._parent&&this._parent.disableRipple}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(){const t=this._getHostElement();"function"==typeof t.focus&&t.focus()}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){t.keyCode!==Ea&&t.keyCode!==La||(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new Ad(this,t))}}class Nd{}const Fd=new rt("mat-label-global-options");var zd=Ji({encapsulation:2,styles:[".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:2px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}@media screen and (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],data:{animation:[{type:7,name:"state",definitions:[{type:0,name:"initial, void, hidden",styles:{type:6,styles:{transform:"scale(0)"},offset:null},options:void 0},{type:0,name:"visible",styles:{type:6,styles:{transform:"scale(1)"},offset:null},options:void 0},{type:1,expr:"* => visible",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.0, 0.0, 0.2, 1)"},options:null},{type:1,expr:"* => hidden",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.4, 0.0, 1, 1)"},options:null}],options:{}}]}});function Vd(t){return Go(2,[(t()(),Ts(0,0,null,null,3,"div",[["class","mat-tooltip"]],[[2,"mat-tooltip-handset",null],[24,"@state",0]],[[null,"@state.start"],[null,"@state.done"]],function(t,e,n){var i=!0,s=t.component;return"@state.start"===e&&(i=!1!==s._animationStart()&&i),"@state.done"===e&&(i=!1!==s._animationDone(n)&&i),i},null,null)),go(1,278528,null,0,nl,[ti,ei,Mn,Pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),yo(131072,Ml,[Rn]),(t()(),Ho(3,null,["",""]))],function(t,e){t(e,1,0,"mat-tooltip",e.component.tooltipClass)},function(t,e){var n=e.component;t(e,0,0,Yi(e,0,0,io(e,2).transform(n._isHandset)).matches,n._visibility),t(e,3,0,n.message)})}var Bd=$s("mat-tooltip-component",gu,function(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"mat-tooltip-component",[["aria-hidden","true"]],[[4,"zoom",null]],[["body","click"]],function(t,e,n){var i=!0;return"body:click"===e&&(i=!1!==io(t,1)._handleBodyInteraction()&&i),i},Vd,zd)),go(1,49152,null,0,gu,[Rn,oh],null,null)],null,function(t,e){t(e,0,0,"visible"===io(e,1)._visibility?1:null)})},{},{},[]),jd=n("4R65");class Hd{}class Zd{}class Ud{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),i=n.toLowerCase(),s=t.slice(e+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(s):this.headers.set(i,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const i=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(e,i))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Ud?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Ud;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Ud?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const i=("a"===t.op?this.headers.get(e):void 0)||[];i.push(...n),this.headers.set(e,i);break;case"d":const s=t.value;if(s){let t=this.headers.get(e);if(!t)return;0===(t=t.filter(t=>-1===s.indexOf(t))).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class Gd{encodeKey(t){return $d(t)}encodeValue(t){return $d(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function $d(t){return encodeURIComponent(t).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 qd{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Gd,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const i=t.indexOf("="),[s,o]=-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],r=n.get(s)||[];r.push(o),n.set(s,r)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).join("&")}clone(t){const e=new qd({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=null)}}function Wd(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Kd(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Yd(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Qd{constructor(t,e,n,i){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){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,s=i):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.params&&(this.params=s.params)),this.headers||(this.headers=new Ud),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":n<e.length-1?"&":"")+t}}else this.params=new qd,this.urlWithParams=e}serializeBody(){return null===this.body?null:Wd(this.body)||Kd(this.body)||Yd(this.body)||"string"==typeof this.body?this.body:this.body instanceof qd?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?null:Yd(this.body)?null:Kd(this.body)?this.body.type||null:Wd(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof qd?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,n=t.url||this.url,i=t.responseType||this.responseType,s=void 0!==t.body?t.body:this.body,o=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,r=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let a=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(a=Object.keys(t.setHeaders).reduce((e,n)=>e.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new Qd(e,n,s,{params:l,headers:a,reportProgress:r,responseType:i,withCredentials:o})}}const Xd=function(){var t={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};return t[t.Sent]="Sent",t[t.UploadProgress]="UploadProgress",t[t.ResponseHeader]="ResponseHeader",t[t.DownloadProgress]="DownloadProgress",t[t.Response]="Response",t[t.User]="User",t}();class Jd{constructor(t,e=200,n="OK"){this.headers=t.headers||new Ud,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class tp extends Jd{constructor(t={}){super(t),this.type=Xd.ResponseHeader}clone(t={}){return new tp({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class ep extends Jd{constructor(t={}){super(t),this.type=Xd.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new ep({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class np extends Jd{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function ip(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}class sp{constructor(t){this.handler=t}request(t,e,n={}){let i;if(t instanceof Qd)i=t;else{let s=void 0;s=n.headers instanceof Ud?n.headers:new Ud(n.headers);let o=void 0;n.params&&(o=n.params instanceof qd?n.params:new qd({fromObject:n.params})),i=new Qd(t,e,void 0!==n.body?n.body:null,{headers:s,params:o,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const s=Jl(i).pipe(function(t,e){return $(t,void 0,1)}(t=>this.handler.handle(t)));if(t instanceof Qd||"events"===n.observe)return s;const o=s.pipe(vh(t=>t instanceof ep));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return o.pipe(j(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return o.pipe(j(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return o.pipe(j(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return o.pipe(j(t=>t.body))}case"response":return o;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new qd).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,ip(n,e))}post(t,e,n={}){return this.request("POST",t,ip(n,e))}put(t,e,n={}){return this.request("PUT",t,ip(n,e))}}class op{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const rp=new rt("HTTP_INTERCEPTORS");class ap{intercept(t,e){return e.handle(t)}}const lp=/^\)\]\}',?\n/;class hp{}class up{constructor(){}build(){return new XMLHttpRequest}}class cp{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new x(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const i=t.serializeBody();let s=null;const o=()=>{if(null!==s)return s;const e=1223===n.status?204:n.status,i=n.statusText||"OK",o=new Ud(n.getAllResponseHeaders()),r=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return s=new tp({headers:o,status:e,statusText:i,url:r})},r=()=>{let{headers:i,status:s,statusText:r,url:a}=o(),l=null;204!==s&&(l=void 0===n.response?n.responseText:n.response),0===s&&(s=l?200:0);let h=s>=200&&s<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(lp,"");try{l=""!==l?JSON.parse(l):null}catch(e){l=t,h&&(h=!1,l={error:e,text:l})}}h?(e.next(new ep({body:l,headers:i,status:s,statusText:r,url:a||void 0})),e.complete()):e.error(new np({error:l,headers:i,status:s,statusText:r,url:a||void 0}))},a=t=>{const i=new np({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error"});e.error(i)};let l=!1;const h=i=>{l||(e.next(o()),l=!0);let s={type:Xd.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(s.total=i.total),"text"===t.responseType&&n.responseText&&(s.partialText=n.responseText),e.next(s)},u=t=>{let n={type:Xd.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",r),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",h),null!==i&&n.upload&&n.upload.addEventListener("progress",u)),n.send(i),e.next({type:Xd.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",r),t.reportProgress&&(n.removeEventListener("progress",h),null!==i&&n.upload&&n.upload.removeEventListener("progress",u)),n.abort()}})}}const dp=new rt("XSRF_COOKIE_NAME"),pp=new rt("XSRF_HEADER_NAME");class mp{}class fp{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=el(t,this.cookieName),this.lastCookieString=t),this.lastToken}}class _p{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}class gp{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(rp,[]);this.chain=t.reduceRight((t,e)=>new op(t,e),this.backend)}return this.chain.handle(t)}}class yp{static disable(){return{ngModule:yp,providers:[{provide:_p,useClass:ap}]}}static withOptions(t={}){return{ngModule:yp,providers:[t.cookieName?{provide:dp,useValue:t.cookieName}:[],t.headerName?{provide:pp,useValue:t.headerName}:[]]}}}class vp{}function bp(...t){const e=t[t.length-1];return"function"==typeof e&&t.pop(),U(t,void 0).lift(new wp(e))}class wp{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new xp(t,this.resultSelector))}}class xp extends y{constructor(t,e,n=Object.create(null)){super(t),this.iterators=[],this.active=0,this.resultSelector="function"==typeof e?e:null,this.values=n}_next(t){const e=this.iterators;l(t)?e.push(new Cp(t)):e.push("function"==typeof t[A]?new Ep(t[A]()):new Lp(this.destination,this,t))}_complete(){const t=this.iterators,e=t.length;if(0!==e){this.active=e;for(let n=0;n<e;n++){let e=t[n];e.stillUnsubscribed?this.add(e.subscribe(e,n)):this.active--}}else this.destination.complete()}notifyInactive(){this.active--,0===this.active&&this.destination.complete()}checkIterators(){const t=this.iterators,e=t.length,n=this.destination;for(let o=0;o<e;o++){let e=t[o];if("function"==typeof e.hasValue&&!e.hasValue())return}let i=!1;const s=[];for(let o=0;o<e;o++){let e=t[o],r=e.next();if(e.hasCompleted()&&(i=!0),r.done)return void n.complete();s.push(r.value)}this.resultSelector?this._tryresultSelector(s):n.next(s),i&&n.complete()}_tryresultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}class Ep{constructor(t){this.iterator=t,this.nextResult=t.next()}hasValue(){return!0}next(){const t=this.nextResult;return this.nextResult=this.iterator.next(),t}hasCompleted(){const t=this.nextResult;return t&&t.done}}class Cp{constructor(t){this.array=t,this.index=0,this.length=0,this.length=t.length}[A](){return this}next(t){const e=this.index++;return e<this.length?{value:this.array[e],done:!1}:{value:null,done:!0}}hasValue(){return this.array.length>this.index}hasCompleted(){return this.array.length===this.index}}class Lp extends B{constructor(t,e,n){super(t),this.parent=e,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[A](){return this}next(){const t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(t,e,n,i,s){this.buffer.push(e),this.parent.checkIterators()}subscribe(t,e){return V(this,this.observable,this,e)}}class kp{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new Sp(t,this.compare,this.keySelector))}}class Sp extends y{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e=t;if(this.keySelector&&(e=p(this.keySelector)(t))===u)return this.destination.error(u.e);let n=!1;if(this.hasKey){if((n=p(this.compare)(this.key,e))===u)return this.destination.error(u.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))}}function Tp(t,e){return"function"==typeof e?n=>n.pipe(Tp((n,i)=>G(t(n,i)).pipe(j((t,s)=>e(n,t,i,s))))):e=>e.lift(new Ip(t))}class Ip{constructor(t){this.project=t}call(t,e){return e.subscribe(new Pp(t,this.project))}}class Pp extends B{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)}_innerSub(t,e,n){const i=this.innerSubscription;i&&i.unsubscribe(),this.add(this.innerSubscription=V(this,t,e,n))}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete()}_unsubscribe(){this.innerSubscription=null}notifyComplete(t){this.remove(t),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(t,e,n,i,s){this.destination.next(e)}}var Mp=n("Yoyx");function Dp(...t){let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),0===t.length?Ql:e?Dp(t).pipe(j(t=>e(...t))):new x(e=>new Ap(e,t))}class Ap extends B{constructor(t,e){super(t),this.sources=e,this.completed=0,this.haveValues=0;const n=e.length;this.values=new Array(n);for(let i=0;i<n;i++){const t=V(this,e[i],null,i);t&&this.add(t)}}notifyNext(t,e,n,i,s){this.values[n]=e,s._hasValue||(s._hasValue=!0,this.haveValues++)}notifyComplete(t){const{destination:e,haveValues:n,values:i}=this,s=i.length;t._hasValue?(this.completed++,this.completed===s&&(n===s&&e.next(i),e.complete())):e.complete()}}class Op{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(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Rp extends Op{get formDirective(){return null}get path(){return null}}function Np(t){return null==t||0===t.length}const Fp=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[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 zp{static min(t){return e=>{if(Np(e.value)||Np(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}static max(t){return e=>{if(Np(e.value)||Np(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return Np(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return Np(t.value)?null:Fp.test(t.value)?null:{email:!0}}static minLength(t){return e=>{if(Np(e.value))return null;const n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}}static maxLength(t){return e=>{const n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}}static pattern(t){if(!t)return zp.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(Np(t.value))return null;const i=t.value;return e.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(Vp);return 0==e.length?null:function(t){return jp(function(t,n){return e.map(e=>e(t))}(t))}}static composeAsync(t){if(!t)return null;const e=t.filter(Vp);return 0==e.length?null:function(t){return Dp(function(t,n){return e.map(e=>e(t))}(t).map(Bp)).pipe(j(jp))}}}function Vp(t){return null!=t}function Bp(t){const e=Pe(t)?G(t):t;if(!Me(e))throw new Error("Expected validator to return Promise or Observable.");return e}function jp(t){const e=t.reduce((t,e)=>null!=e?Object.assign({},t,e):t,{});return 0===Object.keys(e).length?null:e}const Hp=new rt("NgValueAccessor"),Zp=new rt("CompositionEventMode");class Up{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=(t=>{}),this.onTouched=(()=>{}),this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=ec()?ec().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}function Gp(t){return t.validate?e=>t.validate(e):t}function $p(t){return t.validate?e=>t.validate(e):t}function qp(){throw new Error("unimplemented")}class Wp extends Op{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){return qp()}get asyncValidator(){return qp()}}class Kp{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}const Yp={formControlName:'\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',formGroupName:'\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',formArrayName:'\n <div [formGroup]="myGroup">\n <div formArrayName="cities">\n <div *ngFor="let city of cityArray.controls; index as i">\n <input [formControlName]="i">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });',ngModelGroup:'\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',ngModelWithFormGroup:'\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n '};class Qp{static controlParentException(){throw new Error(`formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Yp.formControlName}`)}static ngModelGroupException(){throw new Error(`formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${Yp.formGroupName}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${Yp.ngModelGroup}`)}static missingFormException(){throw new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${Yp.formControlName}`)}static groupParentException(){throw new Error(`formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Yp.formGroupName}`)}static arrayParentException(){throw new Error(`formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Yp.formArrayName}`)}static disabledAttrWarning(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")}static ngModelWarning(t){console.warn(`\n It looks like you're using ngModel on the same form field as ${t}. \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/${"formControl"===t?"FormControlDirective":"FormControlName"}#use-with-ngmodel\n `)}}function Xp(t,e){return[...e.path,t]}function Jp(t,e){t||im(e,"Cannot find control with"),e.valueAccessor||im(e,"No value accessor for form control with"),t.validator=zp.compose([t.validator,e.validator]),t.asyncValidator=zp.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&tm(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&tm(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function tm(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function em(t,e){null==t&&im(e,"Cannot find control with"),t.validator=zp.compose([t.validator,e.validator]),t.asyncValidator=zp.composeAsync([t.asyncValidator,e.asyncValidator])}function nm(t){return im(t,"There is no FormControl instance attached to form control element with")}function im(t,e){let n;throw n=t.path.length>1?`path: '${t.path.join(" -> ")}'`:t.path[0]?`name: '${t.path}'`:"unspecified name attribute",new Error(`${e} ${n}`)}function sm(t){return null!=t?zp.compose(t.map(Gp)):null}function om(t){return null!=t?zp.composeAsync(t.map($p)):null}function rm(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!vt(e,n.currentValue)}const am=[class{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=(t=>{}),this.onTouched=(()=>{})}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=(t=>{}),this.onTouched=(()=>{})}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=(e=>{t(""==e?null:parseFloat(e))})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=(t=>{}),this.onTouched=(()=>{})}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=(e=>{t(""==e?null:parseFloat(e))})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=(t=>{}),this.onTouched=(()=>{}),this._compareWith=vt}set compareWith(t){if("function"!=typeof t)throw new Error(`compareWith must be a function, but received ${JSON.stringify(t)}`);this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=function(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=(e=>{this.value=this._getOptionValue(e),t(this.value)})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}},class{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=(t=>{}),this.onTouched=(()=>{}),this._compareWith=vt}set compareWith(t){if("function"!=typeof t)throw new Error(`compareWith must be a function, but received ${JSON.stringify(t)}`);this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=((t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)})}else e=((t,e)=>{t._setSelected(!1)});this._optionMap.forEach(e)}registerOnChange(t){this.onChange=(e=>{const n=[];if(e.hasOwnProperty("selectedOptions")){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const i=t.item(e),s=this._getOptionValue(i.value);n.push(s)}}else{const t=e.options;for(let e=0;e<t.length;e++){const i=t.item(e);if(i.selected){const t=this._getOptionValue(i.value);n.push(t)}}}this.value=n,t(n)})}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}},class{constructor(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=(()=>{}),this.onTouched=(()=>{})}ngOnInit(){this._control=this._injector.get(Wp),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=(()=>{t(this.value),this._registry.select(this)})}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}_throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')}}];function lm(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function hm(t,e){if(!e)return null;Array.isArray(e)||im(t,"Value accessor was not provided as an array for form control with");let n=void 0,i=void 0,s=void 0;return e.forEach(e=>{e.constructor===Up?n=e:function(t){return am.some(e=>t.constructor===e)}(e)?(i&&im(t,"More than one built-in value accessor matches form control with"),i=e):(s&&im(t,"More than one custom value accessor matches form control with"),s=e)}),s||i||n||(im(t,"No valid value accessor for form control with"),null)}function um(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function cm(t,e,n,i){bn()&&"never"!==i&&((null!==i&&"once"!==i||e._ngModelWarningSentOnce)&&("always"!==i||n._ngModelWarningSent)||(Qp.ngModelWarning(t),e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}class dm extends Rp{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Xp(this.name,this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return sm(this._validators)}get asyncValidator(){return om(this._asyncValidators)}_checkParentType(){}}class pm{constructor(t){this._cd=t}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}}class mm extends pm{constructor(t){super(t)}}class fm extends pm{constructor(t){super(t)}}const _m="VALID",gm="INVALID",ym="PENDING",vm="DISABLED";function bm(t){const e=xm(t)?t.validators:t;return Array.isArray(e)?sm(e):e||null}function wm(t,e){const n=xm(e)?e.asyncValidators:t;return Array.isArray(n)?om(n):n||null}function xm(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class Em{constructor(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=(()=>{}),this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}get parent(){return this._parent}get valid(){return this.status===_m}get invalid(){return this.status===gm}get pending(){return this.status==ym}get disabled(){return this.status===vm}get enabled(){return this.status!==vm}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this.validator=bm(t)}setAsyncValidators(t){this.asyncValidator=wm(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=ym,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){this.status=vm,this.errors=null,this._forEachChild(e=>{e.disable(Object.assign({},t,{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(t),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){this.status=_m,this._forEachChild(e=>{e.enable(Object.assign({},t,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(t),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==_m&&this.status!==ym||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?vm:_m}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=ym;const e=Bp(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>this.setErrors(e,{emitEvent:t}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){return null==e?null:(e instanceof Array||(e=e.split(".")),e instanceof Array&&0===e.length?null:e.reduce((t,e)=>t instanceof Lm?t.controls[e]||null:t instanceof km&&t.at(e)||null,t))}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new on,this.statusChanges=new on}_calculateStatus(){return this._allControlsDisabled()?vm:this.errors?gm:this._anyControlsHaveStatus(ym)?ym:this._anyControlsHaveStatus(gm)?gm:_m}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){xm(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}}class Cm extends Em{constructor(t=null,e,n){super(bm(e),wm(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=(()=>{})}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_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(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class Lm extends Em{constructor(t,e,n){super(bm(e),wm(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof Cm?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){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[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){let e=!1;return this._forEachChild((n,i)=>{e=e||this.contains(i)&&t(n)}),e}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,i)=>{n=e(n,t,i)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class km extends Em{constructor(t,e,n){super(bm(e),wm(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)}getRawValue(){return this.controls.map(t=>t instanceof Cm?t.value:t.getRawValue())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){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(t))throw new Error(`Cannot find form control at index ${t}`)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const Sm=Promise.resolve(null);class Tm extends Rp{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new on,this.form=new Lm({},sm(t),om(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Sm.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),Jp(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Sm.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),um(this._directives,t)})}addFormGroup(t){Sm.then(()=>{const e=this._findContainer(t.path),n=new Lm({});em(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Sm.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){Sm.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,lm(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}const Im=new rt("NgModelWithFormControlWarning");class Pm extends Wp{constructor(t,e,n,i){super(),this._ngModelWarningConfig=i,this.update=new on,this._ngModelWarningSent=!1,this._rawValidators=t||[],this._rawAsyncValidators=e||[],this.valueAccessor=hm(this,n)}set isDisabled(t){Qp.disabledAttrWarning()}ngOnChanges(t){this._isControlChanged(t)&&(Jp(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),rm(t,this.viewModel)&&(cm("formControl",Pm,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}get path(){return[]}get validator(){return sm(this._rawValidators)}get asyncValidator(){return om(this._rawAsyncValidators)}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}}Pm._ngModelWarningSentOnce=!1;class Mm extends Rp{constructor(t,e){super(),this._validators=t,this._asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new on}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return Jp(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){um(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);em(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);em(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,lm(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){e.valueAccessor.registerOnChange(()=>nm(e)),e.valueAccessor.registerOnTouched(()=>nm(e)),e._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(t.control,t),e&&Jp(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const t=sm(this._validators);this.form.validator=zp.compose([this.form.validator,t]);const e=om(this._asyncValidators);this.form.asyncValidator=zp.composeAsync([this.form.asyncValidator,e])}_checkFormPresent(){this.form||Qp.missingFormException()}}class Dm extends dm{constructor(t,e,n){super(),this._parent=t,this._validators=e,this._asyncValidators=n}_checkParentType(){Om(this._parent)&&Qp.groupParentException()}}class Am extends Rp{constructor(t,e,n){super(),this._parent=t,this._validators=e,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 Xp(this.name,this._parent)}get validator(){return sm(this._validators)}get asyncValidator(){return om(this._asyncValidators)}_checkParentType(){Om(this._parent)&&Qp.arrayParentException()}}function Om(t){return!(t instanceof Dm||t instanceof Mm||t instanceof Am)}class Rm extends Wp{constructor(t,e,n,i,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new on,this._ngModelWarningSent=!1,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=n||[],this.valueAccessor=hm(this,i)}set isDisabled(t){Qp.disabledAttrWarning()}ngOnChanges(t){this._added||this._setUpControl(),rm(t,this.viewModel)&&(cm("formControlName",Rm,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return Xp(this.name,this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return sm(this._rawValidators)}get asyncValidator(){return om(this._rawAsyncValidators)}_checkParentType(){!(this._parent instanceof Dm)&&this._parent instanceof dm?Qp.ngModelGroupException():this._parent instanceof Dm||this._parent instanceof Mm||this._parent instanceof Am||Qp.controlParentException()}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}Rm._ngModelWarningSentOnce=!1;class Nm{group(t,e=null){const n=this._reduceControls(t);return new Lm(n,null!=e?e.validator:null,null!=e?e.asyncValidator:null)}control(t,e,n){return new Cm(t,e,n)}array(t,e,n){const i=t.map(t=>this._createControl(t));return new km(i,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof Cm||t instanceof Lm||t instanceof km?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}class Fm{}class zm{}class Vm{static withConfig(t){return{ngModule:Vm,providers:[{provide:Im,useValue:t.warnOnNgModelWithFormControl}]}}}n("INa4");var Bm=function(){function t(){}return t.mapToArray=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},t.handleEvent=function(t,e,n){0<e.observers.length&&t.run(function(){e.emit(n)})},t}(),jm=function(){function t(t,e){this.element=t,this.zone=e,this.DEFAULT_ZOOM=1,this.DEFAULT_CENTER=Object(jd.latLng)(38.907192,-77.036871),this.DEFAULT_FPZ_OPTIONS={},this.fitBoundsOptions=this.DEFAULT_FPZ_OPTIONS,this.panOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomPanOptions=this.DEFAULT_FPZ_OPTIONS,this.options={},this.mapReady=new on,this.zoomChange=new on,this.centerChange=new on,this.onClick=new on,this.onDoubleClick=new on,this.onMouseDown=new on,this.onMouseUp=new on,this.onMouseMove=new on,this.onMouseOver=new on,this.onMapMove=new on,this.onMapMoveStart=new on,this.onMapMoveEnd=new on,this.onMapZoom=new on,this.onMapZoomStart=new on,this.onMapZoomEnd=new on}return t.prototype.ngOnInit=function(){var t=this;this.zone.runOutsideAngular(function(){t.map=Object(jd.map)(t.element.nativeElement,t.options),t.addMapEventListeners()}),null!=this.center&&null!=this.zoom&&this.setView(this.center,this.zoom),null!=this.fitBounds&&this.setFitBounds(this.fitBounds),null!=this.maxBounds&&this.setMaxBounds(this.maxBounds),null!=this.minZoom&&this.setMinZoom(this.minZoom),null!=this.maxZoom&&this.setMaxZoom(this.maxZoom),this.doResize(),this.mapReady.emit(this.map)},t.prototype.ngOnChanges=function(t){t.zoom&&t.center&&null!=this.zoom&&null!=this.center?this.setView(t.center.currentValue,t.zoom.currentValue):t.zoom?this.setZoom(t.zoom.currentValue):t.center&&this.setCenter(t.center.currentValue),t.fitBounds&&this.setFitBounds(t.fitBounds.currentValue),t.maxBounds&&this.setMaxBounds(t.maxBounds.currentValue),t.minZoom&&this.setMinZoom(t.minZoom.currentValue),t.maxZoom&&this.setMaxZoom(t.maxZoom.currentValue)},t.prototype.getMap=function(){return this.map},t.prototype.onResize=function(){this.delayResize()},t.prototype.addMapEventListeners=function(){var t=this;this.map.on("click",function(e){return Bm.handleEvent(t.zone,t.onClick,e)}),this.map.on("dblclick",function(e){return Bm.handleEvent(t.zone,t.onDoubleClick,e)}),this.map.on("mousedown",function(e){return Bm.handleEvent(t.zone,t.onMouseDown,e)}),this.map.on("mouseup",function(e){return Bm.handleEvent(t.zone,t.onMouseUp,e)}),this.map.on("mouseover",function(e){return Bm.handleEvent(t.zone,t.onMouseOver,e)}),this.map.on("mousemove",function(e){return Bm.handleEvent(t.zone,t.onMouseMove,e)}),this.map.on("zoomstart",function(e){return Bm.handleEvent(t.zone,t.onMapZoomStart,e)}),this.map.on("zoom",function(e){return Bm.handleEvent(t.zone,t.onMapZoom,e)}),this.map.on("zoomend",function(e){return Bm.handleEvent(t.zone,t.onMapZoomEnd,e)}),this.map.on("movestart",function(e){return Bm.handleEvent(t.zone,t.onMapMoveStart,e)}),this.map.on("move",function(e){return Bm.handleEvent(t.zone,t.onMapMove,e)}),this.map.on("moveend",function(e){return Bm.handleEvent(t.zone,t.onMapMoveEnd,e)}),this.map.on("zoomend moveend",function(){var e=t.map.getZoom();e!==t.zoom&&(t.zoom=e,Bm.handleEvent(t.zone,t.zoomChange,e));var n=t.map.getCenter();null==n&&null==t.center||(null!=n&&null!=t.center||n===t.center)&&n.lat===t.center.lat&&n.lng===t.center.lng||(t.center=n,Bm.handleEvent(t.zone,t.centerChange,n))})},t.prototype.doResize=function(){var t=this;this.zone.runOutsideAngular(function(){t.map.invalidateSize({})})},t.prototype.delayResize=function(){null!=this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(this.doResize.bind(this),200)},t.prototype.setView=function(t,e){this.map&&null!=t&&null!=e&&this.map.setView(t,e,this.zoomPanOptions)},t.prototype.setZoom=function(t){this.map&&null!=t&&this.map.setZoom(t,this.zoomOptions)},t.prototype.setCenter=function(t){this.map&&null!=t&&this.map.panTo(t,this.panOptions)},t.prototype.setFitBounds=function(t){this.map&&null!=t&&this.map.fitBounds(t,this.fitBoundsOptions)},t.prototype.setMaxBounds=function(t){this.map&&null!=t&&this.map.setMaxBounds(t)},t.prototype.setMinZoom=function(t){this.map&&null!=t&&this.map.setMinZoom(t)},t.prototype.setMaxZoom=function(t){this.map&&null!=t&&this.map.setMaxZoom(t)},t}(),Hm=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[]}},t}(),Zm=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[]}},t}();const Um=function(t,e){switch(typeof t){case"number":this.lonDeg=this.dec2deg(t,this.MAX_LON),this.lonDec=t;break;case"string":this.decode(t)&&(this.lonDeg=t),this.lonDec=this.deg2dec(t,this.MAX_LON)}switch(typeof e){case"number":this.latDeg=this.dec2deg(e,this.MAX_LAT),this.latDec=e;break;case"string":this.decode(e)&&(this.latDeg=e),this.latDec=this.deg2dec(e,this.MAX_LAT)}};Um.prototype={CHAR_DEG:"\xb0",CHAR_MIN:"'",CHAR_SEC:'"',CHAR_SEP:" ",MAX_LON:180,MAX_LAT:90,lonDec:NaN,latDec:NaN,lonDeg:NaN,latDeg:NaN,dec2deg:function(t,e){const n=t<0?-1:1,i=Math.abs(Math.round(1e6*t));if(i>1e6*e)return NaN;const s=i%1e6/1e6,o=Math.floor(i/1e6)*n,r=Math.floor(60*s);let a="";return a+=o,a+=this.CHAR_DEG,a+=this.CHAR_SEP,a+=r,a+=this.CHAR_MIN,a+=this.CHAR_SEP,(a+=(3600*(s-r/60)).toFixed(2))+this.CHAR_SEC},deg2dec:function(t){const e=this.decode(t);if(!e)return NaN;const n=parseFloat(e[1]),i=parseFloat(e[2]),s=parseFloat(e[3]);return isNaN(n)||isNaN(i)||isNaN(s)?NaN:n+i/60+s/3600},decode:function(t){let e="";return e+="(-?\\d+)",e+=this.CHAR_DEG,e+="\\s*",e+="(\\d+)",e+=this.CHAR_MIN,e+="\\s*",e+="(\\d+(?:\\.\\d+)?)",e+=this.CHAR_SEC,t.match(new RegExp(e))},getLonDec:function(){return this.lonDec},getLatDec:function(){return this.latDec},getLonDeg:function(){return this.lonDeg},getLatDeg:function(){return this.latDeg}};const Gm=function(t,e,n){const i=$m(),s=Object(jd.marker)([t,e],{icon:i,draggable:!0});return s.on("dragend",function(t){return n(t)}),s},$m=function(){return Object(jd.icon)({iconUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/marker-icon.png",shadowUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/marker-shadow.png",iconAnchor:[13,40]})},qm={radius:6,fillColor:"#ff7800",color:"#000",weight:1,opacity:1,fillOpacity:.8},Wm={color:"#ff7800",weight:5,opacity:.65},Km=()=>Object(jd.icon)({iconUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/photo-marker-icon.png",shadowUrl:"./cel/widget/modules/apa/squelettes/js/tb-geoloc/assets/img/map/marker-shadow.png",iconSize:[33,41],iconAnchor:[13,40],popupAnchor:[5,-41]});function Ym(t){try{let e;" "===(t=t.replace(/\s\s+/g," ")).charAt(0)&&(t=t.slice(1,t.length-1)),t=(t=t.replace(",",".")).replace(/[^0-9\-.,\xb0\'"\s]/g,"");let n="",i="",s="",o=t.split(" ");" "===t.charAt(t.length-1)&&(o=o.slice(0,o.length-1)),""===o[o.length-1]&&(o=o.slice(0,o.length-1)),1===o.length&&(-1!==(n=o[0]).indexOf(".")&&(n=n.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90")),2===o.length&&(i=o[1],-1!==(n=o[0]).indexOf(".")&&(n=n.slice(0,n.indexOf("."))),-1!==i.indexOf(".")&&(i=i.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90"),Number(i)<-90&&(i="-90"),Number(i)>90&&(i="90")),3===o.length&&(i=o[1],s=o[2],-1!==(n=o[0]).indexOf(".")&&(n=n.slice(0,n.indexOf("."))),-1!==i.indexOf(".")&&(i=i.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90"),Number(i)<-90&&(i="-90"),Number(i)>90&&(i="90")),o.length>=4&&(o=o.slice(0,2),-1!==n.indexOf(".")&&(n=n.slice(0,n.indexOf("."))),-1!==i.indexOf(".")&&(i=i.slice(0,n.indexOf("."))),Number(n)<-90&&(n="-90"),Number(n)>90&&(n="90"),Number(i)<-90&&(i="-90"),Number(i)>90&&(i="90"));try{e=t.match(/\s/g).length}catch(t){e=0}if(0===e&&1===o.length);else if(1===e&&o.length>=1)"\xb0"!==(n=n.replace(" ","")).slice(n.length-1,n.length)?n+="\xb0 ":n+=" ";else if(2===e&&o.length>=2)n=n.replace(" ",""),i=i.replace(" ",""),"\xb0"!==n.slice(n.length-1,n.length)?n+="\xb0 ":n+=" ","'"!==i.slice(i.length-1,i.length)?i+="' ":i+=" ";else{if(!(3===e&&o.length>=3))throw{error:"Can't manage input string."};n=n.replace(" ",""),i=i.replace(" ",""),s=s.replace(" ",""),"\xb0"!==n.slice(n.length-1,n.length)?n+="\xb0 ":n+=" ","'"!==i.slice(i.length-1,i.length)?i+="' ":i+=" ",'"'!==s.slice(s.length-1,s.length)&&(s+='"')}return n+i+s}catch(e){return t}}class Qm{constructor(t){this.http=t,this.mapQuestApiKey=null}setMapQuestApiKey(t){null!==t&&(this.mapQuestApiKey=t)}geocode(t,e){return null===t?Xl():"osm"===e.toLowerCase()?this.geocodeUsingOSM(t):"mapquest"===e.toLowerCase()?this.geocodeUsingMapQuest(t):void 0}reverse(t,e,n){return"osm"===n.toLowerCase()?this.reverseUsingOSM(t,e):"mapquest"===n.toLowerCase()?this.reverseUsingMapQuest(t,e):void 0}getReadbleAddress(t,e){if("osm"===e.toLowerCase())return this.getNominatimReadbleAddress(t);if("mapquest"===e.toLowerCase()){if(Object(Mp.isDefined)(t.results))return this.getMapQuestReadableAddress(t);if(Object(Mp.isDefined)(t.address))return this.getNominatimReadbleAddress(t)}}geocodeUsingOSM(t){return this.http.get(`https://nominatim.openstreetmap.org/?format=json&addressdetails=1&q=${t}&format=json&limit=10&polygon_geojson=1`).pipe(j(t=>t))}geocodeUsingMapQuest(t){return this.http.get(`https://open.mapquestapi.com/nominatim/v1/search.php?key=${this.mapQuestApiKey}&addressdetails=1&q=${t}&format=json&limit=10&polygon_geojson=1`).pipe(j(t=>t))}reverseUsingOSM(t,e){return this.http.get(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${t}&lon=${e}&polygon_geojson=1`).pipe(j(t=>t))}reverseUsingMapQuest(t,e){return this.http.get(`https://open.mapquestapi.com/geocoding/v1/reverse?key=${this.mapQuestApiKey}&location=${t},${e}`).pipe(j(t=>t))}getNominatimReadbleAddress(t){let e=null,n=null,i=null,s=null;return Object(Mp.isDefined)(t.address.city)?e=t.address.city:Object(Mp.isDefined)(t.address.town)?e=t.address.town:Object(Mp.isDefined)(t.address.village)?e=t.address.village:Object(Mp.isDefined)(t.address.hamlet)&&(e=t.address.hamlet),Object(Mp.isDefined)(t.address.suburb)&&Object(Mp.isDefined)(t.address.postcode)&&null!==e?n=t.address.suburb+", "+t.address.postcode:!Object(Mp.isDefined)(t.address.suburb)&&Object(Mp.isDefined)(t.address.postcode)&&null!==e&&(n=t.address.postcode),Object(Mp.isDefined)(t.address.road)?i=t.address.road:Object(Mp.isDefined)(t.address.pedestrian)&&(i=t.address.pedestrian),Object(Mp.isDefined)(t.address.neighbourhood)&&(s=t.address.neighbourhood),i&&s&&n&&e?i+" ("+s+") "+n+" "+e:i&&!s&&n&&e?i+" "+n+" "+e:i&&!s&&!n&&e?i+", "+e:!i&&s&&n&&e?s+" "+n+" "+e:!i&&!s&&n&&e?n+" "+e:i||s||n||!e?t.display_name:e}getMapQuestReadableAddress(t){const e=t.results[0].locations[0];let n=null,i=null,s=null,o=null;return n=e.adminArea5,i=e.adminArea4,o=e.adminArea6,(s=e.street)&&o&&i&&n?s+" ("+o+") "+i+" "+n:s&&!o&&i&&n?s+" "+i+" "+n:s&&!o&&!i&&n?s+", "+n:!s&&o&&i&&n?o+" "+i+" "+n:!s&&!o&&i&&n?i+" "+n:s||o||i||!n?void 0:n}osmClassFilter(t,e){const n=[];return t.length>0&&e.length>0?(e.forEach(e=>{let i=0,s=!1;t.forEach(t=>{const n=t.split(":")[0],o=t.split(":")[1];"*"===o?e.class===n&&i++:"!"===o.substr(0,1)?e.class===n&&"!"+e.type===o&&(s=!0):e.class===n&&e.type===o&&i++}),i>0&&!s&&n.push(e)}),Jl(n)):Jl(e)}reverseCorrdinatesArray(t){if(t.length>0)return t.forEach(t=>{t.reverse()}),t}simplifyPolyline(t){return t.length>1?[t[0],t[t.length-1]]:t}getInseeData(t,e){return this.http.get(`https://geo.api.gouv.fr/communes?lat=${t}&lon=${e}`).pipe(j(t=>t[0]))}}Qm.ngInjectableDef=ot({factory:function(){return new Qm(te(sp))},token:Qm,providedIn:"root"});class Xm{constructor(t){this.http=t,this.mapQuestApiKey=null}setMapQuestApiKey(t){null!==t&&(this.mapQuestApiKey=t)}getElevation(t,e,n){return"openelevation"===n.toLowerCase()?this.getOpenElevation(t,e):"mapquest"===n.toLowerCase()&&null!==this.mapQuestApiKey?this.getMapQuestElevation(t,e):Jl(-1)}getOpenElevation(t,e){return this.http.get(`https://api.open-elevation.com/api/v1/lookup?locations=${t},${e}`).pipe(j(t=>t.results[0].elevation))}getMapQuestElevation(t,e){return this.http.get(`https://open.mapquestapi.com/elevation/v1/profile?key=${this.mapQuestApiKey}&shapeFormat=raw&latLngCollection=${t},${e}`).pipe(j(t=>t.elevationProfile[0].height))}}Xm.ngInjectableDef=ot({factory:function(){return new Xm(te(sp))},token:Xm,providedIn:"root"});class Jm{constructor(t,e,n,i){this.fb=t,this.geocodeService=e,this.elevationService=n,this.zone=i,this.layersToAdd=["osm"],this.osmClassFilter=[],this.allowEditDrawnItems=!1,this.marker=!0,this.polyline=!1,this.polygon=!1,this.latLngInit=[46.5588603,2.98828125],this.zoomInit=4,this.getOsmSimpleLine=!1,this.showLatLngElevationInputs=!0,this.elevationProvider="mapQuest",this.geolocationProvider="osm",this.mapQuestApiKey="KpzlEtCq6BmVVf37R1EXV3jWoh20ynCc",this.location=new on,this.coordFormat="dms",this._location={},this.osmPlace=null,this.inseeData=null,this._geolocatedPhotoLatLng=new on,this.geolocatedPhotoLatLngData=[],this.geolocatedPhotoLatLngDisplayedColumnsTable=["select","fileName","lat","lng","altitude"],this.isLoadingAddress=!1,this.isLoadingLatitude=!1,this.isLoadingLongitude=!1,this.isLoadingElevation=!1,this.geoSearchSubscription=new f,this.latDmsInputSubscription=new f,this.lngDmsInputSubscription=new f,this.elevationInputSubscription=new f,this.mapLat=0,this.mapLng=0,this.osmLayer=Object(jd.tileLayer)("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:18,attribution:"Open Street map"}),this.openTopoMapLayer=Object(jd.tileLayer)("https://a.tile.opentopomap.org/{z}/{x}/{y}.png",{maxZoom:17,attribution:"OpenTopoMap"}),this.googleHybridLayer=Object(jd.tileLayer)("https://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}",{maxZoom:20,subdomains:["mt0","mt1","mt2","mt3"],attribution:"Google maps"}),this.brgmLayer=jd.tileLayer.wms("http://geoservices.brgm.fr/geologie",{version:"1.3.0",layers:"Geologie"}),this.mapLayers={},this.geoResultsLayer=Object(jd.geoJSON)(null,{style:function(){return{color:"#ff7800",weight:5,opacity:.65}}}),this.geolocatedPhotoLatLngLayer=Object(jd.geoJSON)(),this.drawnItems=new jd.FeatureGroup,this.circleMarkerOpt=qm,this.geoResultsOpt=Wm}set geolocatedPhotoLatLng(t){this._geolocatedPhotoLatLng.emit(t)}set reset(t){!0===t&&this.resetComponent()}set patchAddress(t){t&&null!==t&&this._patchAddress(t)}set patchElevation(t){t&&null!==t&&this._patchElevation(t)}set patchLatLngDec(t){t&&null!==t&&this._patchLatLngDec(t[0],t[1])}set patchGeometry(t){t&&null!==t&&this._patchGeometry(t)}set drawMarker(t){t&&null!==t&&this._drawMarker(t[0],t[1])}ngOnInit(){switch(this.initApi(),this.latlngFormGroup=this.fb.group({latInput:this.fb.control("",[zp.required,this.latLngDecValidator]),lngInput:this.fb.control("",[zp.required,this.latLngDecValidator]),dmsLatInput:this.fb.control("",[zp.required,this.latLngDmsValidator]),dmsLngInput:this.fb.control("",[zp.required,this.latLngDmsValidator])}),this.elevationFormGroup=this.fb.group({elevationInput:this.fb.control("",null)}),this.geoSearchFormGroup=this.fb.group({placeInput:this.fb.control("",null)}),this.geoSearchSubscription=this.geoSearchFormGroup.controls.placeInput.valueChanges.pipe(vu(400),t=>t.lift(new kp(void 0,void 0)),Tp(t=>(this.isLoadingAddress=!0,this.geocodeService.geocode(t,this.geolocationProvider)))).subscribe(t=>{this.isLoadingAddress=!1,this.osmClassFilter.length>0?this.geocodeService.osmClassFilter(this.osmClassFilter,t).subscribe(t=>{this.geoSearchResults=t}):this.geoSearchResults=t},t=>{this.isLoadingAddress=!1}),this._geolocatedPhotoLatLng.subscribe(t=>{this.geolocatedPhotoLatLngLayer.clearLayers(),this.geolocatedPhotoLatLngData=t,this.geolocatedPhotoLatLngData.forEach(t=>{const e=new Um(t.lng.deg+"\xb0 "+t.lng.min+"'"+t.lng.sec+'"',t.lat.deg+"\xb0 "+t.lat.min+"'"+t.lat.sec+'"');t.latDec=e.latDec,t.lngDec=e.lonDec;const n=Object(jd.latLng)(t.latDec,t.lngDec),i=new jd.Marker(n,{icon:Km()});i.bindPopup(`\n <b>Fichier "${t.fileName}"</b><br>\n Lat. : ${e.latDeg}<br />\n Lng. : ${e.lonDeg}<br />\n Alt. : ${t.altitude} m<br /><br />\n <b>Cliquez sur le point pour utiliser ces coordonn\xe9es</b>`).openPopup(),i.on("click",e=>{this.gpsMarkerSetValues(t.latDec,t.lngDec,t.altitude)}),i.on("mouseover",t=>{i.openPopup()}),i.on("mouseout",t=>{i.closePopup()}),i.addTo(this.geolocatedPhotoLatLngLayer)}),this.flyToGeolocatedPhotoItems()}),this.elevationInputSubscription=this.elevationFormGroup.controls.elevationInput.valueChanges.pipe(vu(500)).subscribe(t=>{null!==this.osmPlace&&this.bindLocationOutput([t,this.osmPlace,this.inseeData])}),this.mapOptions={layers:[],zoom:this.zoomInit,center:Object(jd.latLng)({lat:this.latLngInit[0],lng:this.latLngInit[1]})},this.drawControlEdit=function(t,e){return new jd.Control.Draw({position:"topleft",draw:{marker:!1,polyline:!1,polygon:!1,rectangle:!1,circle:!1,circlemarker:!1},edit:{featureGroup:t,edit:!0===e&&{},remove:{}}})}(this.drawnItems,this.allowEditDrawnItems),this.drawControlFull=function(t,e,n){return new jd.Control.Draw({position:"topleft",draw:{marker:!!t&&{icon:$m()},polyline:!!e&&{},polygon:!!n&&{showArea:!0,metric:!1},rectangle:!1,circle:!1,circlemarker:!1}})}(this.marker,this.polyline,this.polygon),-1!==this.layersToAdd.indexOf("osm")&&(this.mapLayers.OSM=this.osmLayer),-1!==this.layersToAdd.indexOf("opentopomap")&&(this.mapLayers.OpenTopoMap=this.openTopoMapLayer),-1!==this.layersToAdd.indexOf("google hybrid")&&(this.mapLayers["Google hybride"]=this.googleHybridLayer),-1!==this.layersToAdd.indexOf("brgm")&&(this.mapLayers.BRGM=this.brgmLayer),this.layersToAdd[0]){case"osm":this.mapOptions.layers.push(this.osmLayer);break;case"opentopomap":this.mapOptions.layers.push(this.openTopoMapLayer);break;case"google hybrid":this.mapOptions.layers.push(this.googleHybridLayer);break;case"brgm":this.mapOptions.layers.push(this.brgmLayer)}this.latDmsInputSubscription=this.latlngFormGroup.controls.dmsLatInput.valueChanges.subscribe(t=>{this.latlngFormGroup.controls.dmsLatInput.setValue(Ym(t),{emitEvent:!1})}),this.lngDmsInputSubscription=this.latlngFormGroup.controls.dmsLngInput.valueChanges.subscribe(t=>{this.latlngFormGroup.controls.dmsLngInput.setValue(Ym(t),{emitEvent:!1})})}initApi(){this.elevationService.setMapQuestApiKey(this.mapQuestApiKey),this.geocodeService.setMapQuestApiKey(this.mapQuestApiKey)}ngOnDestroy(){this.geoSearchSubscription.unsubscribe(),this.latDmsInputSubscription.unsubscribe(),this.lngDmsInputSubscription.unsubscribe(),this.elevationInputSubscription.unsubscribe(),this._geolocatedPhotoLatLng.unsubscribe()}onMapReady(t){this.map=t,this.map.addControl(jd.control.layers(null,this.mapLayers,{position:"topright"})),this.map.addLayer(this.drawnItems),this.map.addLayer(this.geoResultsLayer),this.map.addLayer(this.geolocatedPhotoLatLngLayer),this.map.addControl(this.drawControlFull),this.map.on("draw:created",t=>{if(this.drawnItem=t.layer,this.drawType=t.layerType,"marker"===this.drawType){const t=this.drawnItem._latlng;Gm(t.lat,t.lng,t=>{this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()})}).addTo(this.drawnItems)}else this.drawnItems.addLayer(this.drawnItem);this.drawnItems.getLayers().length>0&&this.setMapEditMode(),1===this.drawnItems.getLayers().length&&this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()}),this.flyToDrawnItems()}),this.map.on("draw:edited",t=>{this.drawnItem=t.layer,this.drawType=t.layerType,1===this.drawnItems.getLayers().length&&this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()}),this.flyToDrawnItems()}),this.map.on("draw:deleted",t=>{this.clearGeoResultsLayer(),this.clearDrawnItemsLayer(),this.setMapDrawMode(),this.zone.run(()=>{this.clearForm()})}),this.redrawMap(100)}redrawMap(t){t?window.setTimeout(()=>this.map.invalidateSize(),t):this.map.invalidateSize()}setMapEditMode(){this.map.removeControl(this.drawControlFull),this.map.addControl(this.drawControlEdit)}setMapDrawMode(){this.map.removeControl(this.drawControlEdit),this.map.addControl(this.drawControlFull)}flyToDrawnItems(t=14){const e=this.drawnItems.getBounds();this.map.flyToBounds(e,{maxZoom:t,animate:!1})}flyToGeoResultsItems(){const t=this.geoResultsLayer.getBounds();this.map.flyToBounds(t,{maxZoom:14,animate:!1})}flyToGeolocatedPhotoItems(){const t=this.geolocatedPhotoLatLngLayer.getBounds();this.map.flyToBounds(t,{maxZoom:14,animate:!1})}addMarkerFromDmsCoord(){this.clearDrawnItemsLayer(),this.setMapEditMode();const t=new Um(this.latlngFormGroup.controls.dmsLngInput.value,this.latlngFormGroup.controls.dmsLatInput.value);Gm(t.getLatDec(),t.getLonDec(),t=>{this.callGeolocElevationApisUsingLatLngInputsValues()}).addTo(this.drawnItems),this.latlngFormGroup.controls.latInput.setValue(t.getLatDec(),{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(t.getLatDec(),{emitEvent:!1}),this.flyToDrawnItems()}addMarkerFromLatLngCoord(){this.clearDrawnItemsLayer(),this.setMapEditMode();const t=new Um(Number(this.latlngFormGroup.controls.lngInput.value),Number(this.latlngFormGroup.controls.latInput.value));Gm(t.getLatDec(),t.getLonDec(),t=>{this.callGeolocElevationApisUsingLatLngInputsValues()}).addTo(this.drawnItems),this.latlngFormGroup.controls.dmsLatInput.setValue(t.getLatDeg(),{emitEvent:!1}),this.latlngFormGroup.controls.dmsLngInput.setValue(t.getLonDeg(),{emitEvent:!1}),this.flyToDrawnItems()}addPolyline(t){this.clearDrawnItemsLayer(),this.setMapEditMode(),Object(jd.polyline)(t).addTo(this.drawnItems),this.flyToDrawnItems(18)}callGeolocElevationApisUsingLatLngInputsValues(t=!1,e=!1,n){let i,s,o,r;if(this.osmPlace=null,this.inseeData=null,this.setLatLngInputFromDrawnItems(),this.setLatLngDmsInputFromDrawnItems(),t&&!e)i=bp(this.reverseGeocodingFromInputValue(),this.geocodeService.getInseeData(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value));else if(e&&!t)i=bp(this.getElevationFromInputValue(),this.geocodeService.getInseeData(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value));else if(t||e){if(t&&e)return}else i=bp(this.getElevationFromInputValue(),this.reverseGeocodingFromInputValue(),this.geocodeService.getInseeData(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value));this.isLoadingAddress=!e,this.isLoadingElevation=!t,i.subscribe(i=>{this.isLoadingElevation=!1,this.isLoadingAddress=!1,t&&!e?(s=null,o=i[0],r=i[1]):e&&!t?(s=i,o=null,s=i[0],r=i[1]):e||e||(s=i[0],o=i[1],r=i[2]),this.osmPlace=o,this.inseeData=r,t||this.elevationFormGroup.controls.elevationInput.setValue(s,{emitEvent:!1}),e||this.geoSearchFormGroup.controls.placeInput.patchValue(this.geocodeService.getReadbleAddress(o,this.geolocationProvider),{emitEvent:!1}),Object(Mp.isDefined)(n)?n(s,o):this.bindLocationOutput([s,o,r])},t=>{this.isLoadingAddress=!1,this.isLoadingElevation=!1})}setLatLngInputFromDrawnItems(){const t=this.drawnItems.getBounds().getCenter();this.latlngFormGroup.controls.latInput.setValue(t.lat),this.latlngFormGroup.controls.lngInput.setValue(t.lng)}setLatLngDmsInputFromDrawnItems(){const t=this.drawnItems.getBounds().getCenter(),e=new Um(t.lng,t.lat);this.latlngFormGroup.controls.dmsLatInput.patchValue(e.getLatDeg()),this.latlngFormGroup.controls.dmsLngInput.patchValue(e.getLonDeg())}getElevationFromInputValue(){return this.elevationService.getElevation(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value,this.elevationProvider)}reverseGeocodingFromInputValue(){return this.geocodeService.reverse(this.latlngFormGroup.controls.latInput.value,this.latlngFormGroup.controls.lngInput.value,this.geolocationProvider)}latLngDmsValidator(t){return new RegExp("^(\\-)?[0-9]{1,2}\\\xb0 [0-9]{1,2}\\' [0-9]{1,2}\\.[0-9]{1,12}\\\"").test(t.value)?null:{malformedLatLngDmsFormat:!0}}latLngDecValidator(t){return new RegExp("^(\\-)?[0-9]{1,2}\\.[0-9]{1,20}").test(t.value)?null:{malformedLatLngDecFormat:!0}}addressSelectedChanged(t){const e=t.option.value,n=new jd.LatLng(e.boundingbox[0],e.boundingbox[2]),i=new jd.LatLng(e.boundingbox[1],e.boundingbox[3]);this.map.fitBounds(Object(jd.latLngBounds)(n,i)),this.clearGeoResultsLayer(),this.geoResultsLayer.addData(e.geojson),this.flyToGeoResultsItems(),this.geoSearchFormGroup.controls.placeInput.patchValue(this.geocodeService.getReadbleAddress(e,this.geolocationProvider),{emitEvent:!1});const s=new Um(Number(e.lon),Number(e.lat));this.latlngFormGroup.controls.latInput.setValue(e.lat,{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(e.lon,{emitEvent:!1}),this.latlngFormGroup.controls.dmsLatInput.setValue(s.getLatDeg(),{emitEvent:!1}),this.latlngFormGroup.controls.dmsLngInput.setValue(s.getLonDeg(),{emitEvent:!1}),this.elevationFormGroup.controls.elevationInput.setValue(e.elevation,{emitEvent:!1}),"LineString"===e.geojson.type?(this.addPolyline(this.geocodeService.reverseCorrdinatesArray(this.getOsmSimpleLine?this.geocodeService.simplifyPolyline(e.geojson.coordinates):e.geojson.coordinates)),this.clearGeoResultsLayer()):this.addMarkerFromLatLngCoord(),this.callGeolocElevationApisUsingLatLngInputsValues(!1,!0,t=>{let n;n=Array.isArray(t)?t[0]:t,this.osmPlace=e,this.bindLocationOutput([n,e])})}clearForm(){this.latlngFormGroup.controls.latInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.controls.dmsLatInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.controls.dmsLngInput.setValue("",{emitEvent:!1}),this.latlngFormGroup.reset("",{emitEvent:!1}),this.elevationFormGroup.controls.elevationInput.setValue("",{emitEvent:!1}),this.elevationFormGroup.reset("",{emitEvent:!1}),this.geoSearchFormGroup.controls.placeInput.setValue("",{emitEvent:!1})}clearGeoResultsLayer(){this.geoResultsLayer.clearLayers()}clearDrawnItemsLayer(){this.drawnItems.clearLayers()}resetLocation(){this._location={}}bindLocationOutput(t){let e,n,i;e=t[0],n=t[1],i=t[2];const s=this.drawnItems.toGeoJSON();if(this._location.geometry=s.features[0].geometry,this._location.elevation=e,this._location.localityConsistency=!!this._location.localityConsistency||null,this._location.locationAccuracy=this._location.locationAccuracy?0:null,this._location.inseeData=i,Object(Mp.isDefined)(n.address)&&(this._location.osmCountry=n.address.country,this._location.osmCountryCode=n.address.country_code,this._location.osmCounty=n.address.county,this._location.osmPostcode=n.address.postcode,n.address.city&&(this._location.locality=n.address.city),n.address.town&&(this._location.locality=n.address.town),n.address.village&&(this._location.locality=n.address.village),this._location.sublocality=n.hamlet,this._location.osmRoad=n.address.road,this._location.osmState=n.address.state,this._location.osmSuburb=n.address.suburb,this._location.osmId=n.osm_id,this._location.osmNeighbourhood=null,this._location.osmPlaceId=n.place_id,this._location.publishedLocation=null,this._location.station=null),Object(Mp.isDefined)(n.results)){const t=n.results[0].locations[0];this._location.osmCountry=t.adminArea1,this._location.osmCountryCode=t.adminArea1,this._location.osmCounty=t.adminArea4,this._location.osmPostcode=t.postalCode,this._location.locality=t.adminArea5,this._location.sublocality=null,this._location.osmRoad=t.street,this._location.osmState=t.adminArea3,this._location.osmSuburb=null,this._location.osmId=null,this._location.osmNeighbourhood=t.adminArea6,this._location.osmPlaceId=null,this._location.publishedLocation=null,this._location.station=null}this.location.next(this._location)}setLatLngInputFormat(t){"decimal"!==t&&"dms"!==t||(this.coordFormat=t)}gpsMarkerSetValues(t,e,n){this.latlngFormGroup.controls.latInput.setValue(t),this.latlngFormGroup.controls.lngInput.setValue(e),this.elevationFormGroup.controls.elevationInput.setValue(n,{emitEvent:!1}),this.addMarkerFromLatLngCoord(),this.callGeolocElevationApisUsingLatLngInputsValues(!0,!1),this.geolocatedPhotoLatLngLayer.clearLayers()}resetComponent(){this.clearForm(),this.resetLocation(),this.clearGeoResultsLayer(),this.clearDrawnItemsLayer(),this.setMapDrawMode(),this.map.flyTo({lat:this.latLngInit[0],lng:this.latLngInit[1]},this.zoomInit,{animate:!1})}_patchAddress(t){this.geoSearchFormGroup.controls.placeInput.setValue(t,{emitEvent:!1})}_patchElevation(t){this.elevationFormGroup.controls.elevationInput.setValue(t,{emitEvent:!1})}_patchLatLngDec(t,e){this.latlngFormGroup.controls.latInput.setValue(t,{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(e,{emitEvent:!1});const n=new Um(e,t);this.latlngFormGroup.controls.dmsLatInput.patchValue(n.getLatDeg()),this.latlngFormGroup.controls.dmsLngInput.patchValue(n.getLonDeg())}_drawMarker(t,e){this.latlngFormGroup.controls.latInput.setValue(t,{emitEvent:!1}),this.latlngFormGroup.controls.lngInput.setValue(e,{emitEvent:!1});const n=new Um(e,t);this.latlngFormGroup.controls.dmsLatInput.patchValue(n.getLatDeg()),this.latlngFormGroup.controls.dmsLngInput.patchValue(n.getLonDeg()),this.addMarkerFromLatLngCoord(),this.callGeolocElevationApisUsingLatLngInputsValues()}_patchGeometry(t){this.clearDrawnItemsLayer();for(const e of t){if("point"===e.type.toLowerCase()){const n=Object(jd.latLng)(e.coordinates[0],e.coordinates[1]);let i;1===t.length?i=Gm(e.coordinates[0],e.coordinates[1],()=>{this.zone.run(()=>{this.callGeolocElevationApisUsingLatLngInputsValues()})}):t.length>1&&(i=new jd.Marker(n,{icon:$m()})),i.addTo(this.drawnItems)}if("linestring"===e.type.toLowerCase()){const t=[];for(const n of e.coordinates)t.push(new jd.LatLng(n[0],n[1]));new jd.Polyline(t).addTo(this.drawnItems)}if("polygon"===e.type.toLowerCase()){const t=[];for(const n of e.coordinates)t.push(new jd.LatLng(n[0],n[1]));new jd.Polygon(t).addTo(this.drawnItems)}}this.setMapEditMode(),this.flyToDrawnItems()}}class tf{constructor(t){this.geocodeService=t}transform(t,e){return this.geocodeService.getReadbleAddress(t,e)}}class ef{}function nf(t){switch(t.length){case 0:return new fa;case 1:return t[0];default:return new _a(t)}}function sf(t,e,n,i,s={},o={}){const r=[],a=[];let l=-1,h=null;if(i.forEach(t=>{const n=t.offset,i=n==l,u=i&&h||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,r),a){case ga:a=s[n];break;case ca:a=o[n];break;default:a=e.normalizeStyleValue(n,i,a,r)}u[i]=a}),i||a.push(u),h=u,l=n}),r.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${r.join(t)}`)}return a}function of(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&rf(n,"start",t)));break;case"done":t.onDone(()=>i(n&&rf(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&rf(n,"destroy",t)))}}function rf(t,e,n){const i=n.totalTime,s=af(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,void 0==i?t.totalTime:i,!!n.disabled),o=t._data;return null!=o&&(s._data=o),s}function af(t,e,n,i,s="",o=0,r){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:s,totalTime:o,disabled:!!r}}function lf(t,e,n){let i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function hf(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let uf=(t,e)=>!1,cf=(t,e)=>!1,df=(t,e,n)=>[];if("undefined"!=typeof Element){if(uf=((t,e)=>t.contains(e)),Element.prototype.matches)cf=((t,e)=>t.matches(e));else{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;e&&(cf=((t,n)=>e.apply(t,[n])))}df=((t,e,n)=>{let i=[];if(n)i.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&i.push(n)}return i})}let pf=null,mf=!1;function ff(t){pf||(pf=_f()||{},mf=!!pf.style&&"WebkitAppearance"in pf.style);let e=!0;return pf.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&!(e=t in pf.style)&&mf&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in pf.style),e}function _f(){return"undefined"!=typeof document?document.body:null}const gf=cf,yf=uf,vf=df;function bf(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}class wf{}wf.NOOP=new class{validateStyleProperty(t){return ff(t)}matchesElement(t,e){return gf(t,e)}containsElement(t,e){return yf(t,e)}query(t,e,n){return vf(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,s,o=[],r){return new fa(n,i)}};const xf=1e3,Ef="{{",Cf="ng-enter",Lf="ng-leave",kf="ng-trigger",Sf=".ng-trigger",Tf="ng-animating",If=".ng-animating";function Pf(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Mf(parseFloat(e[1]),e[2])}function Mf(t,e){switch(e){case"s":return t*xf;default:return t}}function Df(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,s=0,o="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};i=Mf(parseFloat(n[1]),n[2]);const r=n[3];null!=r&&(s=Mf(Math.floor(parseFloat(r)),n[4]));const a=n[5];a&&(o=a)}else i=t;if(!n){let n=!1,o=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(o,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:s,easing:o}}(t,e,n)}function Af(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function Of(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else Af(t,n);return n}function Rf(t,e){t.style&&Object.keys(e).forEach(n=>{const i=Zf(n);t.style[i]=e[n]})}function Nf(t,e){t.style&&Object.keys(e).forEach(e=>{const n=Zf(e);t.style[n]=""})}function Ff(t){return Array.isArray(t)?1==t.length?t[0]:da(t):t}const zf=new RegExp(`${Ef}\\s*(.+?)\\s*}}`,"g");function Vf(t){let e=[];if("string"==typeof t){const n=t.toString();let i;for(;i=zf.exec(n);)e.push(i[1]);zf.lastIndex=0}return e}function Bf(t,e,n){const i=t.toString(),s=i.replace(zf,(t,i)=>{let s=e[i];return e.hasOwnProperty(i)||(n.push(`Please provide a value for the animation param ${i}`),s=""),s.toString()});return s==i?t:s}function jf(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Hf=/-+([a-z0-9])/g;function Zf(t){return t.replace(Hf,(...t)=>t[1].toUpperCase())}function Uf(t,e){return 0===t||0===e}function Gf(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let o=e[0],r=[];if(i.forEach(t=>{o.hasOwnProperty(t)||r.push(t),o[t]=n[t]}),r.length)for(var s=1;s<e.length;s++){let n=e[s];r.forEach(function(e){n[e]=qf(t,e)})}}return e}function $f(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function qf(t,e){return window.getComputedStyle(t)[e]}const Wf="*",Kf=new Set(["true","1"]),Yf=new Set(["false","0"]);function Qf(t,e){const n=Kf.has(t)||Yf.has(t),i=Kf.has(e)||Yf.has(e);return(s,o)=>{let r=t==Wf||t==s,a=e==Wf||e==o;return!r&&n&&"boolean"==typeof s&&(r=s?Kf.has(t):Yf.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Kf.has(e):Yf.has(e)),r&&a}}const Xf=":self",Jf=new RegExp(`s*${Xf}s*,?`,"g");function t_(t,e,n){return new n_(t).build(e,n)}const e_="";class n_{constructor(t){this._driver=t}build(t,e){const n=new i_(e);return this._resetContextStyleTimingState(n),$f(this,Ff(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector=e_,t.collectedStyles={},t.collectedStyles[e_]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const s=[],o=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,s.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const s=this.visitTransition(t,e);n+=s.queryCount,i+=s.depCount,o.push(s)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:s,transitions:o,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const s=new Set,o=i||{};if(n.styles.forEach(t=>{if(s_(t)){const e=t;Object.keys(e).forEach(t=>{Vf(e[t]).forEach(t=>{o.hasOwnProperty(t)||s.add(t)})})}}),s.size){const n=jf(s.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=$f(this,Ff(t.animation),e);return{type:1,matchers:function(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>(function(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const s=i[1],o=i[2],r=i[3];e.push(Qf(s,r)),"<"!=o[0]||s==Wf&&r==Wf||e.push(Qf(r,s))})(t,n,e)):n.push(t),n}(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:o_(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>$f(this,t,e)),options:o_(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const s=t.steps.map(t=>{e.currentTime=n;const s=$f(this,t,e);return i=Math.max(i,e.currentTime),s});return e.currentTime=i,{type:3,steps:s,options:o_(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return r_(Df(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=r_(0,0,"");return t.dynamic=!0,t.strValue=i,t}return r_((n=n||Df(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);let i;e.currentAnimateTimings=n;let s=t.styles?t.styles:pa({});if(5==s.type)i=this.visitKeyframes(s,e);else{let s=t.styles,o=!1;if(!s){o=!0;const t={};n.easing&&(t.easing=n.easing),s=pa(t)}e.currentTime+=n.duration+n.delay;const r=this.visitStyle(s,e);r.isEmptyStep=o,i=r}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==ca?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,s=null;return n.forEach(t=>{if(s_(t)){const e=t,n=e.easing;if(n&&(s=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf(Ef)>=0){i=!0;break}}}),{type:6,styles:n,easing:s,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,s=e.currentTime;n&&s>0&&(s-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const o=e.collectedStyles[e.currentQuerySelector],r=o[n];let a=!0;r&&(s!=i&&s>=r.startTime&&i<=r.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${r.startTime}ms" and "${r.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${i}ms"`),a=!1),s=r.startTime),a&&(o[n]={startTime:s,endTime:i}),e.options&&function(i,s,o){const r=e.options.params||{},a=Vf(t[n]);a.length&&a.forEach(t=>{r.hasOwnProperty(t)||o.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(0,0,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const s=[];let o=!1,r=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(s_(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(s_(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),h=0;return null!=l&&(i++,h=n.offset=l),r=r||h<0||h>1,o=o||h<a,a=h,s.push(h),n});r&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),o&&e.errors.push("Please ensure that all keyframe offsets are in order");const h=t.steps.length;let u=0;i>0&&i<h?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(u=1/(h-1));const c=h-1,d=e.currentTime,p=e.currentAnimateTimings,m=p.duration;return l.forEach((t,i)=>{const o=u>0?i==c?1:u*i:s[i],r=o*m;e.currentTime=d+p.delay+r,p.duration=r,this._validateStyleAst(t,e),t.offset=o,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:$f(this,Ff(t.animation),e),options:o_(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:o_(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:o_(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[s,o]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>t==Xf);return e&&(t=t.replace(Jf,"")),[t=t.replace(/@\*/g,Sf).replace(/@\w+/g,t=>Sf+"-"+t.substr(1)).replace(/:animating/g,If),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,lf(e.collectedStyles,e.currentQuerySelector,{});const r=$f(this,Ff(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:r,originalSelector:t.selector,options:o_(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Df(t.timings,e.errors,!0);return{type:12,animation:$f(this,Ff(t.animation),e),timings:n,options:null}}}class i_{constructor(t){this.errors=t,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 s_(t){return!Array.isArray(t)&&"object"==typeof t}function o_(t){return t?(t=Af(t)).params&&(t.params=function(t){return t?Af(t):null}(t.params)):t={},t}function r_(t,e,n){return{duration:t,delay:e,easing:n}}function a_(t,e,n,i,s,o,r=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:s,delay:o,totalTime:s+o,easing:r,subTimeline:a}}class l_{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const h_=1,u_=new RegExp(":enter","g"),c_=new RegExp(":leave","g");function d_(t,e,n,i,s,o={},r={},a,l,h=[]){return(new p_).buildKeyframes(t,e,n,i,s,o,r,a,l,h)}class p_{buildKeyframes(t,e,n,i,s,o,r,a,l,h=[]){l=l||new l_;const u=new f_(t,e,l,i,s,h,[]);u.options=a,u.currentTimeline.setStyles([o],null,u.errors,a),$f(this,n,u);const c=u.timelines.filter(t=>t.containsAnimation());if(c.length&&Object.keys(r).length){const t=c[c.length-1];t.allowOnlyTimelineStyles()||t.setStyles([r],null,u.errors,a)}return c.length?c.map(t=>t.buildKeyframes()):[a_(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),s=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);s!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const s=null!=n.duration?Pf(n.duration):null,o=null!=n.delay?Pf(n.delay):null;return 0!==s&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,s,o);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),$f(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const s=t.options;if(s&&(s.params||s.delay)&&((i=e.createSubContext(s)).transformIntoNewTimeline(),null!=s.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=m_);const t=Pf(s.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>$f(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?Pf(t.options.delay):0;t.steps.forEach(o=>{const r=e.createSubContext(t.options);s&&r.delayNextStep(s),$f(this,o,r),i=Math.max(i,r.currentTimeline.currentTime),n.push(r.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Df(e.params?Bf(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(n.duration),this.visitStyle(s,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const s=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(s):n.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,s=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(t=>{o.forwardTime((t.offset||0)*s),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(i+s),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},s=i.delay?Pf(i.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=m_);let o=n;const r=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=r.length;let a=null;r.forEach((n,i)=>{e.currentQueryIndex=i;const r=e.createSubContext(t.options,n);s&&r.delayNextStep(s),n===e.element&&(a=r.currentTimeline),$f(this,t.animation,r),r.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,r.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,s=t.timings,o=Math.abs(s.duration),r=o*(e.currentQueryTotal-1);let a=o*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":a=r-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const h=l.currentTime;$f(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-h+(i.startTime-n.currentTimeline.startTime)}}const m_={};class f_{constructor(t,e,n,i,s,o,r,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=s,this.errors=o,this.timelines=r,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=m_,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new __(this._driver,e,0),r.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=Pf(n.duration)),null!=n.delay&&(i.delay=Pf(n.delay));const s=n.params;if(s){let t=i.params;t||(t=this.options.params={}),Object.keys(s).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=Bf(s[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,s=new f_(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=m_,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},s=new g_(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(s),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,s,o){let r=[];if(i&&r.push(this.element),t.length>0){t=(t=t.replace(u_,"."+this._enterClassName)).replace(c_,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),r.push(...e)}return s||0!=r.length||o.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),r}}class __{constructor(t,e,n,i){this._driver=t,this.element=e,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(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,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(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new __(this._driver,t,e||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+=h_,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||ca,this._currentKeyframe[t]=ca}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const s=i&&i.params||{},o=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e)).forEach(t=>{n[t]=ca}):Of(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(o).forEach(t=>{const e=Bf(o[t],s,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:ca),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((s,o)=>{const r=Of(s,!0);Object.keys(r).forEach(n=>{const i=r[n];i==ga?t.add(n):i==ca&&e.add(n)}),n||(r.offset=o/this.duration),i.push(r)});const s=t.size?jf(t.values()):[],o=e.size?jf(e.values()):[];if(n){const t=i[0],e=Af(t);t.offset=0,e.offset=1,i=[t,e]}return a_(this.element,i,s,o,this.duration,this.startTime,this.easing,!1)}}class g_ extends __{constructor(t,e,n,i,s,o,r=!1){super(t,e,o.delay),this.element=e,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=s,this._stretchStartingKeyframe=r,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],o=n+e,r=e/o,a=Of(t[0],!1);a.offset=0,s.push(a);const l=Of(t[0],!1);l.offset=y_(r),s.push(l);const h=t.length-1;for(let i=1;i<=h;i++){let r=Of(t[i],!1);r.offset=y_((e+r.offset*n)/o),s.push(r)}n=o,e=0,i="",t=s}return a_(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function y_(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class v_{}class b_ extends v_{normalizePropertyName(t,e){return Zf(t)}normalizeStyleValue(t,e,n,i){let s="";const o=n.toString().trim();if(w_[e]&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return o+s}}const w_=function(t){const e={};return"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(",").forEach(t=>e[t]=!0),e}();function x_(t,e,n,i,s,o,r,a,l,h,u,c,d){return{type:0,element:t,triggerName:e,isRemovalTransition:s,fromState:n,fromStyles:o,toState:i,toStyles:r,timelines:a,queriedElements:l,preStyleProps:h,postStyleProps:u,totalTime:c,errors:d}}const E_={};class C_{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,s){return t.some(t=>t(e,n,i,s))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],s=this._stateStyles[t],o=i?i.buildStyles(e,n):{};return s?s.buildStyles(e,n):o}build(t,e,n,i,s,o,r,a,l){const h=[],u=this.ast.options&&this.ast.options.params||E_,c=this.buildStyles(n,r&&r.params||E_,h),d=a&&a.params||E_,p=this.buildStyles(i,d,h),m=new Set,f=new Map,_=new Map,g="void"===i,y={params:Object.assign({},u,d)},v=d_(t,e,this.ast.animation,s,o,c,p,y,l,h);let b=0;if(v.forEach(t=>{b=Math.max(t.duration+t.delay,b)}),h.length)return x_(e,this._triggerName,n,i,g,c,p,[],[],f,_,b,h);v.forEach(t=>{const n=t.element,i=lf(f,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const s=lf(_,n,{});t.postStyleProps.forEach(t=>s[t]=!0),n!==e&&m.add(n)});const w=jf(m.values());return x_(e,this._triggerName,n,i,g,c,p,v,w,f,_,b)}}class L_{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},i=Af(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const s=t;Object.keys(s).forEach(t=>{let o=s[t];o.length>1&&(o=Bf(o,i,e)),n[t]=o})}}),n}}class k_{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new L_(t.style,t.options&&t.options.params||{})}),S_(this.states,"true","1"),S_(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new C_(t,e,this.states))}),this.fallbackTransition=function(e,n){return new C_(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},n)}(0,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(s=>s.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function S_(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const T_=new l_;class I_{constructor(t,e){this._driver=t,this._normalizer=e,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=t_(this._driver,e,n);if(n.length)throw new Error(`Unable to build the animation due to the following errors: ${n.join("\n")}`);this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,s=sf(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],s=this._animations[t];let o;const r=new Map;if(s?(o=d_(this._driver,e,s,Cf,Lf,{},{},n,T_,i)).forEach(t=>{const e=lf(r,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)}):(i.push("The requested animation doesn't exist or has already been destroyed"),o=[]),i.length)throw new Error(`Unable to create the animation due to the following errors: ${i.join("\n")}`);r.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,ca)})});const a=nf(o.map(t=>{const e=r.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,n,i){const s=af(e,"","","");return of(this._getPlayer(t),n,s,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const s=this._getPlayer(t);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const P_="ng-animate-queued",M_=".ng-animate-queued",D_="ng-animate-disabled",A_=".ng-animate-disabled",O_="ng-star-inserted",R_=".ng-star-inserted",N_=[],F_={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},z_={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},V_="__ng_removed";class B_{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=function(t){return null!=t?t:null}(n?t.value:t),n){const e=Af(t);delete e.value,this.options=e}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const j_="void",H_=new B_(j_),Z_=new B_("DELETED");class U_{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,X_(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=n&&"done"!=n)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);const s=lf(this._elementListeners,t,[]),o={name:e,phase:n,callback:i};s.push(o);const r=lf(this._engine.statesByElement,t,{});return r.hasOwnProperty(e)||(X_(t,kf),X_(t,kf+"-"+e),r[e]=H_),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete r[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const s=this._getTrigger(e),o=new $_(this.id,e,t);let r=this._engine.statesByElement.get(t);r||(X_(t,kf),X_(t,kf+"-"+e),this._engine.statesByElement.set(t,r={}));let a=r[e];const l=new B_(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),r[e]=l,a){if(a===Z_)return o}else a=H_;if(l.value!==j_&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let s=0;s<n.length;s++){const i=n[s];if(!e.hasOwnProperty(i)||t[i]!==e[i])return!1}return!0}(a.params,l.params)){const e=[],n=s.matchStyles(a.value,a.params,e),i=s.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{Nf(t,n),Rf(t,i)})}return}const h=lf(this._engine.playersByElement,t,[]);h.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=s.matchTransition(a.value,l.value,t,l.params),c=!1;if(!u){if(!i)return;u=s.fallbackTransition,c=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:o,isFallbackTransition:c}),c||(X_(t,P_),o.onStart(()=>{J_(t,P_)})),o.onDone(()=>{let e=this.players.indexOf(o);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(o);t>=0&&n.splice(t,1)}}),this.players.push(o),h.push(o),o}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e,n=!1){this._engine.driver.query(t,Sf,!0).forEach(t=>{if(t[V_])return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)})}triggerLeaveAnimation(t,e,n,i){const s=this._engine.statesByElement.get(t);if(s){const o=[];if(Object.keys(s).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,j_,i);n&&o.push(n)}}),o.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&nf(o).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const i=e.name;if(n.has(i))return;n.add(i);const s=this._triggers[i].fallbackTransition,o=this._engine.statesByElement.get(t)[i]||H_,r=new B_(j_),a=new $_(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:s,fromState:o,toState:r,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e,!0),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}this.prepareLeaveAnimationListeners(t),i?n.markElementAsRemoved(this.id,t,!1,e):(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}insertNode(t,e){X_(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const s=n.element,o=this._elementListeners.get(s);o&&o.forEach(e=>{if(e.name==n.triggerName){const i=af(s,n.triggerName,n.fromState.value,n.toState.value);i._data=t,of(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find(e=>e.element===t)||e}}class G_{constructor(t,e){this.driver=t,this._normalizer=e,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=((t,e)=>{})}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new U_(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let s=n;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,e)){this._namespaceList.splice(s+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i<t.length;i++){const s=n[t[i]].namespaceId;if(s){const t=this._fetchNamespace(s);t&&e.add(t)}}}return e}trigger(t,e,n,i){if(q_(e)){const s=this._fetchNamespace(t);if(s)return s.trigger(e,n,i),!0}return!1}insertNode(t,e,n,i){if(!q_(e))return;const s=e[V_];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),X_(t,D_)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),J_(t,D_))}removeNode(t,e,n){if(!q_(e))return void this._onRemovalComplete(e,n);const i=t?this._fetchNamespace(t):null;i?i.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e[V_]={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,s){return q_(e)?this._fetchNamespace(t).listen(e,n,i,s):()=>{}}_buildInstruction(t,e,n,i){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e)}destroyInnerAnimations(t){let e=this.driver.query(t,Sf,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,If,!0)).forEach(t=>this.finishActiveQueriedAnimationOnElement(t))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()});const n=this.statesByElement.get(t);n&&Object.keys(n).forEach(t=>n[t]=Z_)}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return nf(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[V_];if(e&&e.setForRemoval){if(t[V_]=F_,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,A_)&&this.markElementAsDisabled(t,!1),this.driver.query(t,A_,!0).forEach(e=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)X_(this.collectedEnterElements[n],O_);if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}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(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?nf(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const n=new l_,i=[],s=new Map,o=[],r=new Map,a=new Map,l=new Map,h=new Set;this.disabledNodes.forEach(t=>{h.add(t);const e=this.driver.query(t,M_,!0);for(let n=0;n<e.length;n++)h.add(e[n])});const u=_f(),c=Array.from(this.statesByElement.keys()),d=Y_(c,this.collectedEnterElements),p=new Map;let m=0;d.forEach((t,e)=>{const n=Cf+m++;p.set(e,n),t.forEach(t=>X_(t,n))});const f=[],_=new Set,g=new Set;for(let P=0;P<this.collectedLeaveElements.length;P++){const t=this.collectedLeaveElements[P],e=t[V_];e&&e.setForRemoval&&(f.push(t),_.add(t),e.hasAnimation?this.driver.query(t,R_,!0).forEach(t=>_.add(t)):g.add(t))}const y=new Map,v=Y_(c,Array.from(_));v.forEach((t,e)=>{const n=Lf+m++;y.set(e,n),t.forEach(t=>X_(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=p.get(e);t.forEach(t=>J_(t,n))}),v.forEach((t,e)=>{const n=y.get(e);t.forEach(t=>J_(t,n))}),f.forEach(t=>{this.processLeaveNode(t)})});const b=[],w=[];for(let P=this._namespaceList.length-1;P>=0;P--)this._namespaceList[P].drainQueuedTransitions(e).forEach(t=>{const e=t.player,s=t.element;if(b.push(e),this.collectedEnterElements.length){const t=s[V_];if(t&&t.setForMove)return void e.destroy()}if(!u||!this.driver.containsElement(u,s))return void e.destroy();const h=y.get(s),c=p.get(s),d=this._buildInstruction(t,n,c,h);if(!d.errors||!d.errors.length)return t.isFallbackTransition?(e.onStart(()=>Nf(s,d.fromStyles)),e.onDestroy(()=>Rf(s,d.toStyles)),void i.push(e)):(d.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(s,d.timelines),o.push({instruction:d,player:e,element:s}),d.queriedElements.forEach(t=>lf(r,t,[]).push(e)),d.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),void d.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=l.get(e);i||l.set(e,i=new Set),n.forEach(t=>i.add(t))}));w.push(d)});if(w.length){const t=[];w.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),b.forEach(t=>t.destroy()),this.reportError(t)}const x=new Map,E=new Map;o.forEach(t=>{const e=t.element;n.has(e)&&(E.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,x))}),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{lf(x,e,[]).push(t),t.destroy()})});const C=f.filter(t=>eg(t,a,l)),L=new Map;K_(L,this.driver,g,l,ca).forEach(t=>{eg(t,a,l)&&C.push(t)});const k=new Map;d.forEach((t,e)=>{K_(k,this.driver,new Set(t),a,ga)}),C.forEach(t=>{const e=L.get(t),n=k.get(t);L.set(t,Object.assign({},e,n))});const S=[],T=[],I={};o.forEach(t=>{const{element:e,player:o,instruction:r}=t;if(n.has(e)){if(h.has(e))return o.onDestroy(()=>Rf(e,r.toStyles)),o.disabled=!0,o.overrideTotalTime(r.totalTime),void i.push(o);let t=I;if(E.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=E.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>E.set(e,t))}const n=this._buildAnimation(o.namespaceId,r,x,s,k,L);if(o.setRealPlayer(n),t===I)S.push(o);else{const e=this.playersByElement.get(t);e&&e.length&&(o.parentPlayer=nf(e)),i.push(o)}}else Nf(e,r.fromStyles),o.onDestroy(()=>Rf(e,r.toStyles)),T.push(o),h.has(e)&&i.push(o)}),T.forEach(t=>{const e=s.get(t.element);if(e&&e.length){const n=nf(e);t.setRealPlayer(n)}}),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let P=0;P<f.length;P++){const t=f[P],e=t[V_];if(J_(t,Lf),e&&e.hasAnimation)continue;let n=[];if(r.size){let e=r.get(t);e&&e.length&&n.push(...e);let i=this.driver.query(t,If,!0);for(let t=0;t<i.length;t++){let e=r.get(i[t]);e&&e.length&&n.push(...e)}}const i=n.filter(t=>!t.destroyed);i.length?tg(this,t,i):this.processLeaveNode(t)}return f.length=0,S.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),S}elementContainsData(t,e){let n=!1;const i=e[V_];return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,s){let o=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(o=e)}else{const e=this.playersByElement.get(t);if(e){const t=!s||s==j_;e.forEach(e=>{e.queued||(t||e.triggerName==i)&&o.push(e)})}}return(n||i)&&(o=o.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),o}_beforeAnimationBuild(t,e,n){const i=e.element,s=e.isRemovalTransition?void 0:t,o=e.isRemovalTransition?void 0:e.triggerName;for(const r of e.timelines){const t=r.element,a=t!==i,l=lf(n,t,[]);this._getPreviousPlayers(t,a,s,o,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Nf(i,e.fromStyles)}_buildAnimation(t,e,n,i,s,o){const r=e.triggerName,a=e.element,l=[],h=new Set,u=new Set,c=e.timelines.map(e=>{const c=e.element;h.add(c);const d=c[V_];if(d&&d.removedBeforeQueried)return new fa(e.duration,e.delay);const p=c!==a,m=function(t){const e=[];return function t(e,n){for(let i=0;i<e.length;i++){const s=e[i];s instanceof _a?t(s.players,n):n.push(s)}}((n.get(c)||N_).map(t=>t.getRealPlayer()),e),e}().filter(t=>!!t.element&&t.element===c),f=s.get(c),_=o.get(c),g=sf(0,this._normalizer,0,e.keyframes,f,_),y=this._buildPlayer(e,g,m);if(e.subTimeline&&i&&u.add(c),p){const e=new $_(t,r,c);e.setRealPlayer(y),l.push(e)}return y});l.forEach(t=>{lf(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>(function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e)){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e]){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i})(this.playersByQueriedElement,t.element,t))}),h.forEach(t=>X_(t,Tf));const d=nf(c);return d.onDestroy(()=>{h.forEach(t=>J_(t,Tf)),Rf(a,e.toStyles)}),u.forEach(t=>{lf(i,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new fa(t.duration,t.delay)}}class $_{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new fa,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>of(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){lf(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function q_(t){return t&&1===t.nodeType}function W_(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function K_(t,e,n,i,s){const o=[];n.forEach(t=>o.push(W_(t)));const r=[];i.forEach((n,i)=>{const o={};n.forEach(t=>{const n=o[t]=e.computeStyle(i,t,s);n&&0!=n.length||(i[V_]=z_,r.push(i))}),t.set(i,o)});let a=0;return n.forEach(t=>W_(t,o[a++])),r}function Y_(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),s=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let o=s.get(e);if(o)return o;const r=e.parentNode;return o=n.has(r)?r:i.has(r)?1:t(r),s.set(e,o),o}(t);1!==e&&n.get(e).push(t)}),n}const Q_="$$classes";function X_(t,e){if(t.classList)t.classList.add(e);else{let n=t[Q_];n||(n=t[Q_]={}),n[e]=!0}}function J_(t,e){if(t.classList)t.classList.remove(e);else{let n=t[Q_];n&&delete n[e]}}function tg(t,e,n){nf(n).onDone(()=>t.processLeaveNode(e))}function eg(t,e,n){const i=n.get(t);if(!i)return!1;let s=e.get(t);return s?i.forEach(t=>s.add(t)):e.set(t,i),n.delete(t),!0}class ng{constructor(t,e){this._driver=t,this._triggerCache={},this.onRemovalComplete=((t,e)=>{}),this._transitionEngine=new G_(t,e),this._timelineEngine=new I_(t,e),this._transitionEngine.onRemovalComplete=((t,e)=>this.onRemovalComplete(t,e))}registerTrigger(t,e,n,i,s){const o=t+"-"+i;let r=this._triggerCache[o];if(!r){const t=[],e=t_(this._driver,s,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);r=function(t,e){return new k_(t,e)}(i,e),this._triggerCache[o]=r}this._transitionEngine.registerTrigger(e,i,r)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n){this._transitionEngine.removeNode(t,e,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,s]=hf(n);this._timelineEngine.command(t,e,s,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,s){if("@"==n.charAt(0)){const[t,i]=hf(n);return this._timelineEngine.listen(t,e,i,s)}return this._transitionEngine.listen(t,e,n,i,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}const ig=3,sg="animation",og="animationend",rg=1e3;class ag{constructor(t,e,n,i,s,o,r){this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=s,this._fillMode=o,this._onDoneFn=r,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=(t=>this._handleCallback(t))}apply(){!function(t,e){const n=pg(t,"").trim();n.length&&(function(t,e){let n=0;for(let i=0;i<t.length;i++)","===t.charAt(i)&&n++}(n),e=`${n}, ${e}`),dg(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),cg(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){lg(this._element,this._name,"paused")}resume(){lg(this._element,this._name,"running")}setPosition(t){const e=hg(this._element,this._name);this._position=t*this._duration,dg(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=parseFloat(t.elapsedTime.toFixed(ig))*rg;t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),cg(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=pg(t,"").split(","),i=ug(n,e);i>=0&&(n.splice(i,1),dg(t,"",n.join(",")))}(this._element,this._name))}}function lg(t,e,n){dg(t,"PlayState",n,hg(t,e))}function hg(t,e){const n=pg(t,"");return n.indexOf(",")>0?ug(n.split(","),e):ug([n],e)}function ug(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function cg(t,e,n){n?t.removeEventListener(og,e):t.addEventListener(og,e)}function dg(t,e,n,i){const s=sg+e;if(null!=i){const e=t.style[s];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[s]=n}function pg(t,e){return t.style[sg+e]}const mg="forwards",fg="linear",_g=function(){var t={INITIALIZED:1,STARTED:2,FINISHED:3,DESTROYED:4};return t[t.INITIALIZED]="INITIALIZED",t[t.STARTED]="STARTED",t[t.FINISHED]="FINISHED",t[t.DESTROYED]="DESTROYED",t}();class gg{constructor(t,e,n,i,s,o,r){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=s,this._finalStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this.state=0,this.easing=o||fg,this.totalTime=i+s,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this.state>=_g.DESTROYED||(this.state=_g.DESTROYED,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this.state>=_g.FINISHED||(this.state=_g.FINISHED,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this.state>=_g.STARTED}init(){this.state>=_g.INITIALIZED||(this.state=_g.INITIALIZED,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this.state=_g.STARTED),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 ag(this.element,this.animationName,this._duration,this._delay,this.easing,mg,()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this.state>=_g.FINISHED;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:qf(this.element,n))})}this.currentSnapshot=t}}class yg extends fa{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=bf(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}const vg="gen_css_kf_",bg=" ";class wg{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return ff(t)}matchesElement(t,e){return gf(t,e)}containsElement(t,e){return yf(t,e)}query(t,e,n){return vf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){let i=`@keyframes ${e} {\n`,s="";(n=n.map(t=>bf(t))).forEach(t=>{s=bg;const e=parseFloat(t.offset);i+=`${s}${100*e}% {\n`,s+=bg,Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${s}animation-timing-function: ${n};\n`));default:return void(i+=`${s}${e}: ${n};\n`)}}),i+=`${s}}\n`}),i+="}\n";const o=document.createElement("style");return o.innerHTML=i,o}animate(t,e,n,i,s,o=[],r){r&&this._notifyFaultyScrubber();const a=o.filter(t=>t instanceof gg),l={};Uf(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const h=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Gf(t,e,l));if(0==n)return new yg(t,h);const u=`${vg}${this._count++}`,c=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(c);const d=new gg(t,e,u,n,i,s,h);return d.onDestroy(()=>void c.parentNode.removeChild(c)),d}_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 xg{constructor(t,e,n){this.element=t,this.keyframes=e,this.options=n,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(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),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._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:qf(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class Eg{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Cg().toString()),this._cssKeyframesDriver=new wg}validateStyleProperty(t){return ff(t)}matchesElement(t,e){return gf(t,e)}containsElement(t,e){return yf(t,e)}query(t,e,n){return vf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,s,o=[],r){if(!r&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,s,o);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};s&&(a.easing=s);const l={},h=o.filter(t=>t instanceof xg);return Uf(n,i)&&h.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])}),e=Gf(t,e=e.map(t=>Of(t,!1)),l),new xg(t,e,a)}}function Cg(){return"undefined"!=typeof Element&&Element.prototype.animate||{}}class Lg extends ha{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:ee.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?da(t):t;return Tg(this._renderer,null,e,"register",[n]),new kg(e,this._renderer)}}class kg extends ua{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new Sg(this._id,t,e||{},this._renderer)}}class Sg{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return Tg(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}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(t){this._command("setPosition",t)}getPosition(){return 0}}function Tg(t,e,n,i,s){return t.setProperty(e,`@@${n}:${i}`,s)}const Ig="@",Pg="@.disabled";class Mg{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=((t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)})}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new Dg("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,s=e.id+"-"+this._currentId;return this._currentId++,this.engine.register(s,t),e.data.animation.forEach(e=>this.engine.registerTrigger(i,s,t,e.name,e)),new Ag(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,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()}}class Dg{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e){this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(t){return this.delegate.selectRootElement(t)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==Ig&&e==Pg?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class Ag extends Dg{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==Ig?"."==e.charAt(1)&&e==Pg?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==Ig){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let s=e.substr(1),o="";return s.charAt(0)!=Ig&&([s,o]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,i,s,o,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}class Og extends ng{constructor(t,e){super(t,e)}}function Rg(){return"function"==typeof Cg()?new Eg:new wg}function Ng(){return new b_}function Fg(t,e,n){return new Mg(t,e,n)}const zg=new rt("AnimationModuleType");class Vg{}class Bg{constructor(){this._listeners=[]}notify(t,e){for(let n of this._listeners)n(t,e)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(e=>t!==e)}}ngOnDestroy(){this._listeners=[]}}Bg.ngInjectableDef=ot({factory:function(){return new Bg},token:Bg,providedIn:"root"});const jg=new rt("mat-select-scroll-strategy");function Hg(t){return()=>t.scrollStrategies.reposition()}class Zg{}function Ug(t,e){return new x(e?n=>e.schedule(Gg,0,{error:t,subscriber:n}):e=>e.error(t))}function Gg({error:t,subscriber:e}){e.error(t)}class $g{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return Jl(this.value);case"E":return Ug(this.error);case"C":return Xl()}throw new Error("unexpected notification kind value")}static createNext(t){return void 0!==t?new $g("N",t):$g.undefinedValueNotification}static createError(t){return new $g("E",void 0,t)}static createComplete(){return $g.completeNotification}}function qg(t,e=ph){const n=t instanceof Date&&!isNaN(+t)?+t-e.now():Math.abs(t);return t=>t.lift(new Wg(n,e))}$g.completeNotification=new $g("C"),$g.undefinedValueNotification=new $g("N",void 0);class Wg{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new Kg(t,this.delay,this.scheduler))}}class Kg extends y{constructor(t,e,n){super(t),this.delay=e,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,n=e.queue,i=t.scheduler,s=t.destination;for(;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(s);if(n.length>0){const e=Math.max(0,n[0].time-i.now());this.schedule(t,e)}else e.active=!1}_schedule(t){this.active=!0,this.add(t.schedule(Kg.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,n=new Yg(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification($g.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t)}_complete(){this.scheduleNotification($g.createComplete())}}class Yg{constructor(t,e){this.time=t,this.notification=e}}let Qg=0;class Xg{constructor(t,e){this.source=t,this.option=e}}const Jg=gd(class{}),ty=new rt("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});class ey extends Jg{constructor(t,e,n){super(),this._changeDetectorRef=t,this._elementRef=e,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new on,this.opened=new on,this.closed=new on,this._classList={},this.id=`mat-autocomplete-${Qg++}`,this._autoActiveFirstOption=!!n.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(t){this._autoActiveFirstOption=ya(t)}set classList(t){t&&t.length&&(t.split(" ").forEach(t=>this._classList[t.trim()]=!0),this._elementRef.nativeElement.className="")}ngAfterContentInit(){this._keyManager=new Hu(this.options).withWrap(),this._setVisibility()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._classList["mat-autocomplete-visible"]=this.showPanel,this._classList["mat-autocomplete-hidden"]=!this.showPanel,this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const e=new Xg(this,t);this.optionSelected.emit(e)}}const ny=48,iy=256,sy=new rt("mat-autocomplete-scroll-strategy");function oy(t){return()=>t.scrollStrategies.reposition()}class ry{constructor(t,e,n,i,s,o,r,a,l,h){this._element=t,this._overlay=e,this._viewContainerRef=n,this._zone=i,this._changeDetectorRef=s,this._scrollStrategy=o,this._dir=r,this._formField=a,this._document=l,this._viewportRuler=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=f.EMPTY,this._closeKeyEventStream=new S,this._onChange=(()=>{}),this._onTouched=(()=>{}),this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=function(t){return new x(e=>{let n;try{n=t()}catch(t){return void e.error(t)}return(n?G(n):Xl()).subscribe(e)})}(()=>this.autocomplete&&this.autocomplete.options?Q(...this.autocomplete.options.map(t=>t.onSelectionChange)):this._zone.onStable.asObservable().pipe(Th(1),Tp(()=>this.optionSelections)))}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(t){this._autocompleteDisabled=ya(t)}ngOnDestroy(){this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}get panelClosingActions(){return Q(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(vh(()=>this._overlayAttached)),this._closeKeyEventStream,this._outsideClickStream,this._overlayRef?this._overlayRef.detachments().pipe(vh(()=>this._overlayAttached)):Jl()).pipe(j(t=>t instanceof Ad?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}get _outsideClickStream(){return this._document?Q(lh(this._document,"click"),lh(this._document,"touchend")).pipe(vh(t=>{const e=t.target,n=this._formField?this._formField._elementRef.nativeElement:null;return this._overlayAttached&&e!==this._element.nativeElement&&(!n||!n.contains(e))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(e)})):Jl(null)}writeValue(t){Promise.resolve(null).then(()=>this._setTriggerValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const e=t.keyCode;if(e===Ca&&t.preventDefault(),this.panelOpen&&(e===Ca||e===Sa&&t.altKey))this._resetActiveItem(),this._closeKeyEventStream.next(),t.stopPropagation();else if(this.activeOption&&e===Ea&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const n=this.autocomplete._keyManager.activeItem,i=e===Sa||e===Ia;this.panelOpen||e===xa?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption()}}_handleInput(t){let e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&document.activeElement===t.target&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this.openPanel())}_handleFocus(){this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0))}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_scrollToOption(){const t=this.autocomplete._keyManager.activeItemIndex||0,e=function(t,e,n,i){const s=t*e;return s<n?s:s+e>n+iy?Math.max(0,s-iy+e):n}(t+function(t,e,n){if(n.length){let i=e.toArray(),s=n.toArray(),o=0;for(let e=0;e<t+1;e++)i[e].group&&i[e].group===s[o]&&o++;return o}return 0}(t,this.autocomplete.options,this.autocomplete.optionGroups),ny,this.autocomplete._getScrollTop());this.autocomplete._setScrollTop(e)}_subscribeToClosingActions(){return Q(this._zone.onStable.asObservable().pipe(Th(1)),this.autocomplete.options.changes.pipe(Iu(()=>this._positionStrategy.reapplyLastPosition()),qg(0))).pipe(Tp(()=>(this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&this._overlayRef.updatePosition(),this.panelClosingActions)),Th(1)).subscribe(t=>this._setValueAndClose(t))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(t){const e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n}_setValueAndClose(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}_clearPreviousSelectedOption(t){this.autocomplete.options.forEach(e=>{e!=t&&e.selected&&e.deselect()})}_attachOverlay(){if(!this.autocomplete)throw Error("Attempting to open an undefined instance of `mat-autocomplete`. Make sure that the id passed to the `matAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.");this._overlayRef?this._overlayRef.updateSize({width:this._getPanelWidth()}):(this._portal=new Oh(this.autocomplete.template,this._viewContainerRef),this._overlayRef=this._overlay.create(this._getOverlayConfig()),this._viewportRuler&&(this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&this._overlayRef&&this._overlayRef.updateSize({width:this._getPanelWidth()})}))),this._overlayRef&&!this._overlayRef.hasAttached()&&(this._overlayRef.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const t=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&t!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new Vh({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir})}_getOverlayPosition(){return this._positionStrategy=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}]),this._positionStrategy}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}_canOpen(){const t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}}class ay{}let ly=0;const hy={},uy={setImmediate(t){const e=ly++;return hy[e]=t,e},clearImmediate(t){delete hy[t]}},cy=new class extends dh{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let n,i=-1,s=e.length;t=t||e.shift();do{if(n=t.execute(t.state,t.delay))break}while(++i<s&&(t=e.shift()));if(this.active=!1,n){for(;++i<s&&(t=e.shift());)t.unsubscribe();throw n}}}(class extends uh{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return null!==n&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t.scheduled||(t.scheduled=uy.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,n=0){if(null!==n&&n>0||null===n&&this.delay>0)return super.recycleAsyncId(t,e,n);0===t.actions.length&&(uy.clearImmediate(e),t.scheduled=void 0)}}),dy=new rt("MAT_MENU_PANEL"),py=gd(fd(class{}));class my extends py{constructor(t,e,n,i){super(),this._elementRef=t,this._focusMonitor=n,this._parentMenu=i,this._hovered=new S,this._highlighted=!1,this._triggersSubmenu=!1,n&&n.monitor(this._getHostElement(),!1),i&&i.addItem&&i.addItem(this),this._document=e}focus(t="program"){this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t):this._getHostElement().focus()}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._getHostElement()),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3;let n="";if(t.childNodes){const i=t.childNodes.length;for(let s=0;s<i;s++)t.childNodes[s].nodeType===e&&(n+=t.childNodes[s].textContent)}return n.trim()}}const fy=new rt("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!0,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),_y=2;class gy{constructor(t,e,n){this._elementRef=t,this._ngZone=e,this._defaultOptions=n,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._items=[],this._itemChanges=new S,this._tabSubscription=f.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new S,this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new on,this.close=this.closed}get xPosition(){return this._xPosition}set xPosition(t){"before"!==t&&"after"!==t&&function(){throw Error('x-position value must be either \'before\' or after\'.\n Example: <mat-menu x-position="before" #menu="matMenu"></mat-menu>')}(),this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){"above"!==t&&"below"!==t&&function(){throw Error('y-position value must be either \'above\' or below\'.\n Example: <mat-menu y-position="above" #menu="matMenu"></mat-menu>')}(),this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=ya(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=ya(t)}set panelClass(t){t&&t.length&&(this._classList=t.split(" ").reduce((t,e)=>(t[e]=!0,t),{}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._keyManager=new Zu(this._items).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab"))}ngOnDestroy(){this._tabSubscription.unsubscribe(),this.closed.complete()}_hovered(){return this._itemChanges.pipe(th(this._items),Tp(t=>Q(...t.map(t=>t._hovered))))}_handleKeydown(t){const e=t.keyCode;switch(e){case Ca:this.closed.emit("keydown"),t.stopPropagation();break;case ka:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case Ta:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:e!==Sa&&e!==Ia||this._keyManager.setFocusOrigin("keyboard"),this._keyManager.onKeydown(t)}}focusFirstItem(t="program"){this.lazyContent?this._ngZone.onStable.asObservable().pipe(Th(1)).subscribe(()=>this._keyManager.setFocusOrigin(t).setFirstItemActive()):this._keyManager.setFocusOrigin(t).setFirstItemActive()}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const e=`mat-elevation-z${_y+t}`,n=Object.keys(this._classList).find(t=>t.startsWith("mat-elevation-z"));n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}addItem(t){-1===this._items.indexOf(t)&&(this._items.push(t),this._itemChanges.next(this._items))}removeItem(t){const e=this._items.indexOf(t);this._items.indexOf(t)>-1&&(this._items.splice(e,1),this._itemChanges.next(this._items))}setPositionClasses(t=this.xPosition,e=this.yPosition){const n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}}const yy=new rt("mat-menu-scroll-strategy");function vy(t){return()=>t.scrollStrategies.reposition()}const by=8;class wy{constructor(t,e,n,i,s,o,r,a){this._overlay=t,this._element=e,this._viewContainerRef=n,this._scrollStrategy=i,this._parentMenu=s,this._menuItemInstance=o,this._dir=r,this._focusMonitor=a,this._overlayRef=null,this._menuOpen=!1,this._closeSubscription=f.EMPTY,this._hoverSubscription=f.EMPTY,this._openedByMouse=!1,this.menuOpened=new on,this.onMenuOpen=this.menuOpened,this.menuClosed=new on,this.onMenuClose=this.menuClosed,o&&(o._triggersSubmenu=this.triggersSubmenu())}get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}ngAfterContentInit(){this._checkMenu(),this.menu.close.subscribe(t=>{this._destroyMenu(),"click"!==t&&"tab"!==t||!this._parentMenu||this._parentMenu.closed.emit(t)}),this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._cleanUpSubscriptions()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!(!this._menuItemInstance||!this._parentMenu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){if(this._menuOpen)return;const t=this._createOverlay();this._setPosition(t.getConfig().positionStrategy),t.attach(this._portal),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closeSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(),this.menu instanceof gy&&this.menu._startAnimation()}closeMenu(){this.menu.close.emit()}focus(t="program"){this._focusMonitor?this._focusMonitor.focusVia(this._element.nativeElement,t):this._element.nativeElement.focus()}_destroyMenu(){if(!this._overlayRef||!this.menuOpen)return;const t=this.menu;this._closeSubscription.unsubscribe(),this._overlayRef.detach(),t instanceof gy?(t._resetAnimation(),t.lazyContent?t._animationDone.pipe(vh(t=>"void"===t.toState),Th(1),ql(t.lazyContent._attached)).subscribe(()=>t.lazyContent.detach(),void 0,()=>{this._resetMenu()}):this._resetMenu()):(this._resetMenu(),t.lazyContent&&t.lazyContent.detach())}_initMenu(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedByMouse?"mouse":"program")}_setMenuElevation(){if(this.menu.setElevation){let t=0,e=this.menu.parentMenu;for(;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}_resetMenu(){this._setIsMenuOpen(!1),this._openedByMouse?this.triggersSubmenu()||this.focus("mouse"):this.focus(),this._openedByMouse=!1}_setIsMenuOpen(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}_checkMenu(){this.menu||function(){throw Error('mat-menu-trigger: must pass in an mat-menu instance.\n\n Example:\n <mat-menu #menu="matMenu"></mat-menu>\n <button [matMenuTriggerFor]="menu"></button>')}()}_createOverlay(){if(!this._overlayRef){this._portal=new Oh(this.menu.templateRef,this._viewContainerRef);const t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t)}return this._overlayRef}_getOverlayConfig(){return new Vh({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withTransformOriginOn(".mat-menu-panel"),hasBackdrop:null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t){this.menu.setPositionClasses&&t.positionChanges.subscribe(t=>{this.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}_setPosition(t){let[e,n]="before"===this.menu.xPosition?["end","start"]:["start","end"],[i,s]="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],[o,r]=[i,s],[a,l]=[e,n],h=0;this.triggersSubmenu()?(l=e="before"===this.menu.xPosition?"start":"end",n=a="end"===e?"start":"end",h="bottom"===i?by:-by):this.menu.overlapTrigger||(o="top"===i?"bottom":"top",r="top"===s?"bottom":"top"),t.withPositions([{originX:e,originY:o,overlayX:a,overlayY:i,offsetY:h},{originX:n,originY:o,overlayX:l,overlayY:i,offsetY:h},{originX:e,originY:r,overlayX:a,overlayY:s,offsetY:-h},{originX:n,originY:r,overlayX:l,overlayY:s,offsetY:-h}])}_cleanUpSubscriptions(){this._closeSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}_menuClosingActions(){const t=this._overlayRef.backdropClick(),e=this._overlayRef.detachments();return Q(t,this._parentMenu?this._parentMenu.closed:Jl(),this._parentMenu?this._parentMenu._hovered().pipe(vh(t=>t!==this._menuItemInstance),vh(()=>this._menuOpen)):Jl(),e)}_handleMousedown(t){(function(t){return 0===t.buttons})(t)||(this._openedByMouse=!0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const e=t.keyCode;this.triggersSubmenu()&&(e===Ta&&"ltr"===this.dir||e===ka&&"rtl"===this.dir)&&this.openMenu()}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(vh(t=>t===this._menuItemInstance&&!t.disabled),qg(0,cy)).subscribe(()=>{this._openedByMouse=!0,this.menu instanceof gy&&this.menu._isAnimating?this.menu._animationDone.pipe(Th(1),ql(this._parentMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}}class xy{}let Ey=0;class Cy{constructor(){this.id=`mat-error-${Ey++}`}}class Ly{}function ky(t){return Error(`A hint was already declared for 'align="${t}"'.`)}class Sy{}class Ty{}let Iy=0;const Py=.75,My=5,Dy=_d(class{constructor(t){this._elementRef=t}},"primary"),Ay=new rt("MAT_FORM_FIELD_DEFAULT_OPTIONS");class Oy extends Dy{constructor(t,e,n,i,s,o,r,a){super(t),this._elementRef=t,this._changeDetectorRef=e,this._dir=i,this._defaultOptions=s,this._platform=o,this._ngZone=r,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId=`mat-hint-${Iy++}`,this._labelId=`mat-form-field-label-${Iy++}`,this._outlineGapWidth=0,this._outlineGapStart=0,this._initialGapCalculated=!1,this._labelOptions=n||{},this.floatLabel=this._labelOptions.float||"auto",this._animationsEnabled="NoopAnimations"!==a}get appearance(){return this._appearance||this._defaultOptions&&this._defaultOptions.appearance||"legacy"}set appearance(t){t!==this._appearance&&"outline"===t&&(this._initialGapCalculated=!1),this._appearance=t}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=ya(t)}get _shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}get _canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t||this._labelOptions.float||"auto",this._changeDetectorRef.markForCheck())}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild(),this._control.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${this._control.controlType}`),this._control.stateChanges.pipe(th(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),Q(this._control.ngControl&&this._control.ngControl.valueChanges||Ql,this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>this._changeDetectorRef.markForCheck()),this._hintChildren.changes.pipe(th(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(th(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()})}ngAfterContentChecked(){this._validateControlChild(),this._initialGapCalculated||(this._ngZone?this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.updateOutlineGap())}):Promise.resolve().then(()=>this.updateOutlineGap()))}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}_shouldForward(t){const e=this._control?this._control.ngControl:null;return e&&e[t]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!!this._labelChild}_shouldLabelFloat(){return this._canLabelFloat&&(this._control.shouldLabelFloat||this._shouldAlwaysFloat)}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat&&(this._animationsEnabled&&(this._showAlwaysAnimate=!0,lh(this._label.nativeElement,"transitionend").pipe(Th(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){if(this._control.placeholder&&this._placeholderChild)throw Error("Placeholder attribute and child element were both specified.")}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){if(this._hintChildren){let t,e;this._hintChildren.forEach(n=>{if("start"===n.align){if(t||this.hintLabel)throw ky("start");t=n}else if("end"===n.align){if(e)throw ky("end");e=n}})}}_syncDescribedByIds(){if(this._control){let t=[];if("hint"===this._getDisplayedMessages()){let e=this._hintChildren?this._hintChildren.find(t=>"start"===t.align):null,n=this._hintChildren?this._hintChildren.find(t=>"end"===t.align):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&(t=this._errorChildren.map(t=>t.id));this._control.setDescribedByIds(t)}}_validateControlChild(){if(!this._control)throw Error("mat-form-field must contain a MatFormFieldControl.")}updateOutlineGap(){if("outline"===this.appearance&&this._label&&this._label.nativeElement.children.length){if(this._platform&&!this._platform.isBrowser)return void(this._initialGapCalculated=!0);if(!document.documentElement.contains(this._elementRef.nativeElement))return;const t=this._getStartEnd(this._connectionContainerRef.nativeElement.getBoundingClientRect()),e=this._getStartEnd(this._label.nativeElement.children[0].getBoundingClientRect());let n=0;for(const i of this._label.nativeElement.children)n+=i.offsetWidth;this._outlineGapStart=e-t-My,this._outlineGapWidth=n*Py+2*My}else this._outlineGapStart=0,this._outlineGapWidth=0;this._initialGapCalculated=!0,this._changeDetectorRef.markForCheck()}_getStartEnd(t){return this._dir&&"rtl"===this._dir.value?t.right:t.left}}class Ry{}const Ny=!!Bl()&&{passive:!0};class Fy{constructor(t,e){this._platform=t,this._ngZone=e,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return Ql;const e=this._monitoredElements.get(t);if(e)return e.subject.asObservable();const n=new S,i="cdk-text-field-autofilled",s=e=>{"cdk-text-field-autofill-start"!==e.animationName||t.classList.contains(i)?"cdk-text-field-autofill-end"===e.animationName&&t.classList.contains(i)&&(t.classList.remove(i),this._ngZone.run(()=>n.next({target:e.target,isAutofilled:!1}))):(t.classList.add(i),this._ngZone.run(()=>n.next({target:e.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{t.addEventListener("animationstart",s,Ny),t.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(t,{subject:n,unlisten:()=>{t.removeEventListener("animationstart",s,Ny)}}),n.asObservable()}stopMonitoring(t){const e=this._monitoredElements.get(t);e&&(e.unlisten(),e.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((t,e)=>this.stopMonitoring(e))}}Fy.ngInjectableDef=ot({factory:function(){return new Fy(te(Fl),te(rn))},token:Fy,providedIn:"root"});class zy{}const Vy=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let By=0;const jy=function(t){return class extends class{constructor(t,e,n,i){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=n,this.ngControl=i}}{constructor(...t){super(...t),this.errorState=!1,this.stateChanges=new S}updateErrorState(){const t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}}();class Hy extends jy{constructor(t,e,n,i,s,o,r,a,l){super(o,i,s,n),this._elementRef=t,this._platform=e,this.ngControl=n,this._autofillMonitor=a,this._uid=`mat-input-${By++}`,this._isServer=!1,this.focused=!1,this.stateChanges=new S,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._required=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(t=>Hl().has(t)),this._inputValueAccessor=r||this._elementRef.nativeElement,this._previousNativeValue=this.value,this.id=this.id,e.IOS&&l.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",t=>{let e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),this._isServer=!this._platform.isBrowser}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=ya(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required}set required(t){this._required=ya(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea()&&Hl().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=ya(t)}ngOnInit(){this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}ngDoCheck(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue()}focus(){this._elementRef.nativeElement.focus()}_focusChanged(t){t===this.focused||this.readonly||(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_validateType(){if(Vy.indexOf(this._type)>-1)throw function(t){return Error(`Input type "${t}" isn't supported by matInput.`)}(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}_isTextarea(){return"textarea"===this._elementRef.nativeElement.nodeName.toLowerCase()}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){return this.focused||!this.empty}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}onContainerClick(){this.focus()}}class Zy{}const Uy=100,Gy=10,$y=_d(class{constructor(t){this._elementRef=t}},"primary"),qy=new rt("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:Uy}}}),Wy="\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n";class Ky extends $y{constructor(t,e,n,i,s){super(t),this._elementRef=t,this._document=n,this.animationMode=i,this.defaults=s,this._value=0,this._fallbackAnimation=!1,this._noopAnimations="NoopAnimations"===this.animationMode&&!!this.defaults&&!this.defaults._forceAnimations,this._diameter=Uy,this.mode="determinate",this._fallbackAnimation=e.EDGE||e.TRIDENT,s&&(s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth)),t.nativeElement.classList.add(`mat-progress-spinner-indeterminate${this._fallbackAnimation?"-fallback":""}-animation`)}get diameter(){return this._diameter}set diameter(t){this._diameter=va(t),this._fallbackAnimation||Ky.diameters.has(this._diameter)||this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=va(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,va(t)))}get _circleRadius(){return(this.diameter-Gy)/2}get _viewBox(){const t=2*this._circleRadius+this.strokeWidth;return`0 0 ${t} ${t}`}get _strokeCircumference(){return 2*Math.PI*this._circleRadius}get _strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._strokeCircumference:null}get _circleStrokeWidth(){return this.strokeWidth/this.diameter*100}_attachStyleNode(){let t=Ky.styleTag;t||(t=this._document.createElement("style"),this._document.head.appendChild(t),Ky.styleTag=t),t&&t.sheet&&t.sheet.insertRule(this._getAnimationText(),0),Ky.diameters.add(this.diameter)}_getAnimationText(){return Wy.replace(/START_VALUE/g,`${.95*this._strokeCircumference}`).replace(/END_VALUE/g,`${.2*this._strokeCircumference}`).replace(/DIAMETER/g,`${this.diameter}`)}}Ky.diameters=new Set([Uy]),Ky.styleTag=null;class Yy extends Ky{constructor(t,e,n,i,s){super(t,e,n,i,s),this.mode="indeterminate"}}class Qy{}const Xy=new rt("mat-chips-default-options");class Jy{}class tv{constructor(t){this.selector=t}call(t,e){return e.subscribe(new ev(t,this.selector,this.caught))}}class ev extends B{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let e;try{e=this.selector(t,this.caught)}catch(t){return void super.error(t)}this._unsubscribeAndRecycle(),this.add(V(this,e))}}}class nv{constructor(t){this.callback=t}call(t,e){return e.subscribe(new iv(t,this.callback))}}class iv extends y{constructor(t,e){super(t),this.add(new f(e))}}function sv(t){return Error(`Unable to find icon with the name "${t}"`)}function ov(t){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL "+`via Angular's DomSanitizer. Attempted URL was "${t}".`)}function rv(t){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by "+`Angular's DomSanitizer. Attempted literal was "${t}".`)}class av{constructor(t){t.nodeName?this.svgElement=t:this.url=t}}class lv{constructor(t,e,n){this._httpClient=t,this._sanitizer=e,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=n}addSvgIcon(t,e){return this.addSvgIconInNamespace("",t,e)}addSvgIconLiteral(t,e){return this.addSvgIconLiteralInNamespace("",t,e)}addSvgIconInNamespace(t,e,n){return this._addSvgIconConfig(t,e,new av(n))}addSvgIconLiteralInNamespace(t,e,n){const i=this._sanitizer.sanitize(Oi.HTML,n);if(!i)throw rv(n);const s=this._createSvgElementForSingleIcon(i);return this._addSvgIconConfig(t,e,new av(s))}addSvgIconSet(t){return this.addSvgIconSetInNamespace("",t)}addSvgIconSetLiteral(t){return this.addSvgIconSetLiteralInNamespace("",t)}addSvgIconSetInNamespace(t,e){return this._addSvgIconSetConfig(t,new av(e))}addSvgIconSetLiteralInNamespace(t,e){const n=this._sanitizer.sanitize(Oi.HTML,e);if(!n)throw rv(e);const i=this._svgElementFromString(n);return this._addSvgIconSetConfig(t,new av(i))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(Oi.RESOURCE_URL,t);if(!e)throw ov(t);const n=this._cachedIconsByUrl.get(e);return n?Jl(hv(n)):this._loadSvgIconFromConfig(new av(t)).pipe(Iu(t=>this._cachedIconsByUrl.set(e,t)),j(t=>hv(t)))}getNamedSvgIcon(t,e=""){const n=uv(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);const s=this._iconSetConfigs.get(e);return s?this._getSvgFromIconSetConfigs(t,s):Ug(sv(n))}_getSvgFromConfig(t){return t.svgElement?Jl(hv(t.svgElement)):this._loadSvgIconFromConfig(t).pipe(Iu(e=>t.svgElement=e),j(t=>hv(t)))}_getSvgFromIconSetConfigs(t,e){const n=this._extractIconWithNameFromAnySet(t,e);return n?Jl(n):Dp(e.filter(t=>!t.svgElement).map(t=>this._loadSvgIconSetFromConfig(t).pipe(function(t){return function(e){const n=new tv(t),i=e.lift(n);return n.caught=i}}(e=>{const n=this._sanitizer.sanitize(Oi.RESOURCE_URL,t.url);return console.error(`Loading icon set URL: ${n} failed: ${e.message}`),Jl(null)})))).pipe(j(()=>{const n=this._extractIconWithNameFromAnySet(t,e);if(!n)throw sv(t);return n}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){const i=e[n];if(i.svgElement){const e=this._extractSvgIconFromSet(i.svgElement,t);if(e)return e}}return null}_loadSvgIconFromConfig(t){return this._fetchUrl(t.url).pipe(j(t=>this._createSvgElementForSingleIcon(t)))}_loadSvgIconSetFromConfig(t){return t.svgElement?Jl(t.svgElement):this._fetchUrl(t.url).pipe(j(e=>(t.svgElement||(t.svgElement=this._svgElementFromString(e)),t.svgElement)))}_createSvgElementForSingleIcon(t){const e=this._svgElementFromString(t);return this._setSvgAttributes(e),e}_extractSvgIconFromSet(t,e){const n=t.querySelector("#"+e);if(!n)return null;const i=n.cloneNode(!0);if(i.removeAttribute("id"),"svg"===i.nodeName.toLowerCase())return this._setSvgAttributes(i);if("symbol"===i.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(i));const s=this._svgElementFromString("<svg></svg>");return s.appendChild(i),this._setSvgAttributes(s)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString("<svg></svg>");for(let n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e}_setSvgAttributes(t){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),t}_fetchUrl(t){if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==t)throw Error(`Cannot fetch icon from URL "${t}".`);const e=this._sanitizer.sanitize(Oi.RESOURCE_URL,t);if(!e)throw ov(t);const n=this._inProgressUrlFetches.get(e);if(n)return n;const i=this._httpClient.get(e,{responseType:"text"}).pipe(function(t){return e=>e.lift(new nv(t))}(()=>this._inProgressUrlFetches.delete(e)),st());return this._inProgressUrlFetches.set(e,i),i}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(uv(t,e),n),this}_addSvgIconSetConfig(t,e){const n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}}function hv(t){return t.cloneNode(!0)}function uv(t,e){return t+":"+e}lv.ngInjectableDef=ot({factory:function(){return new lv(te(sp,8),te(td),te(Ol,8))},token:lv,providedIn:"root"});const cv=_d(class{constructor(t){this._elementRef=t}});class dv extends cv{constructor(t,e,n){super(t),this._iconRegistry=e,this._inline=!1,n||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=ya(t)}get fontSet(){return this._fontSet}set fontSet(t){this._fontSet=this._cleanupFontValue(t)}get fontIcon(){return this._fontIcon}set fontIcon(t){this._fontIcon=this._cleanupFontValue(t)}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnChanges(t){if(t.svgIcon)if(this.svgIcon){const[t,e]=this._splitIconName(this.svgIcon);this._iconRegistry.getNamedSvgIcon(e,t).pipe(Th(1)).subscribe(t=>this._setSvgElement(t),t=>console.log(`Error retrieving icon: ${t.message}`))}else this._clearSvgElement();this._usingFontIcon()&&this._updateFontIconClasses()}ngOnInit(){this._usingFontIcon()&&this._updateFontIconClasses()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let n=0;n<e.length;n++)e[n].textContent+=" ";this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(;e--;){const n=t.childNodes[e];1===n.nodeType&&"svg"!==n.nodeName.toLowerCase()||t.removeChild(n)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}}class pv{}const mv="accent",fv="primary",_v=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],gv=_d(fd(gd(class{constructor(t){this._elementRef=t}})));class yv extends gv{constructor(t,e,n,i){super(t),this._platform=e,this._focusMonitor=n,this._animationMode=i,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const s of _v)this._hasHostAttributes(s)&&t.nativeElement.classList.add(s);this._focusMonitor.monitor(this._elementRef.nativeElement,!0),this.isRoundButton?this.color=mv:this._hasHostAttributes("mat-flat-button")&&(this.color=fv)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)}focus(){this._getHostElement().focus()}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(t=>this._getHostElement().hasAttribute(t))}}class vv{}class bv{}class wv{}class xv{constructor(t){this._viewContainer=t,xv.mostRecentCellOutlet=this}ngOnDestroy(){xv.mostRecentCellOutlet===this&&(xv.mostRecentCellOutlet=null)}}xv.mostRecentCellOutlet=null;class Ev{}class Cv{}var Lv=Ji({encapsulation:2,styles:[".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],data:{}});function kv(t){return Go(0,[(t()(),Ts(0,0,null,null,0,":svg:circle",[["cx","50%"],["cy","50%"]],[[1,"r",0],[4,"animation-name",null],[4,"stroke-dashoffset","px"],[4,"stroke-dasharray","px"],[4,"stroke-width","%"]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,n._circleRadius,"mat-progress-spinner-stroke-rotate-"+n.diameter,n._strokeDashOffset,n._strokeCircumference,n._circleStrokeWidth)})}function Sv(t){return Go(0,[(t()(),Ts(0,0,null,null,0,":svg:circle",[["cx","50%"],["cy","50%"]],[[1,"r",0],[4,"stroke-dashoffset","px"],[4,"stroke-dasharray","px"],[4,"stroke-width","%"]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,n._circleRadius,n._strokeDashOffset,n._strokeCircumference,n._circleStrokeWidth)})}function Tv(t){return Go(2,[(t()(),Ts(0,0,null,null,5,":svg:svg",[["focusable","false"],["preserveAspectRatio","xMidYMid meet"]],[[4,"width","px"],[4,"height","px"],[1,"viewBox",0]],null,null,null,null)),go(1,16384,null,0,ul,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ss(16777216,null,null,1,null,kv)),go(3,278528,null,0,cl,[On,An,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Sv)),go(5,278528,null,0,cl,[On,An,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(t,e){t(e,1,0,"indeterminate"===e.component.mode),t(e,3,0,!0),t(e,5,0,!1)},function(t,e){var n=e.component;t(e,0,0,n.diameter,n.diameter,n._viewBox)})}var Iv=Ji({encapsulation:2,styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}@media screen and (-ms-high-contrast:active){.mat-option{margin:0 1px}.mat-option.mat-active{border:solid 1px currentColor;margin:0}}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],data:{}});function Pv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"mat-pseudo-checkbox",[["class","mat-option-pseudo-checkbox mat-pseudo-checkbox"]],[[2,"mat-pseudo-checkbox-indeterminate",null],[2,"mat-pseudo-checkbox-checked",null],[2,"mat-pseudo-checkbox-disabled",null],[2,"_mat-animation-noopable",null]],null,null,Av,Dv)),go(1,49152,null,0,Sd,[[2,zg]],{state:[0,"state"],disabled:[1,"disabled"]},null)],function(t,e){var n=e.component;t(e,1,0,n.selected?"checked":"",n.disabled)},function(t,e){t(e,0,0,"indeterminate"===io(e,1).state,"checked"===io(e,1).state,io(e,1).disabled,"NoopAnimations"===io(e,1)._animationMode)})}function Mv(t){return Go(2,[(t()(),Ss(16777216,null,null,1,null,Pv)),go(1,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(2,0,null,null,1,"span",[["class","mat-option-text"]],null,null,null,null,null)),Vo(null,0),(t()(),Ts(4,0,null,null,1,"div",[["class","mat-option-ripple mat-ripple"],["mat-ripple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),go(5,212992,null,0,Ld,[Mn,rn,Fl,[2,Cd],[2,zg]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,1,0,n.multiple),t(e,5,0,n.disabled||n.disableRipple,n._getHostElement())},function(t,e){t(e,4,0,io(e,5).unbounded)})}var Dv=Ji({encapsulation:2,styles:[".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:7px;left:0;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:3px;left:1px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],data:{}});function Av(t){return Go(2,[],null,null)}var Ov=Ji({encapsulation:2,styles:[".mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:1}@media (hover:none){.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:0}}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-raised-button:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-raised-button[disabled]{box-shadow:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-flat-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-fab::-moz-focus-inner{border:0}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-fab[disabled]{box-shadow:none}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-mini-fab[disabled]{box-shadow:none}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button-focus-overlay,.mat-button-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-focus-overlay{background-color:rgba(0,0,0,.12);border-radius:inherit;opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}@media screen and (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],data:{}});function Rv(t){return Go(2,[Oo(402653184,1,{ripple:0}),(t()(),Ts(1,0,null,null,1,"span",[["class","mat-button-wrapper"]],null,null,null,null,null)),Vo(null,0),(t()(),Ts(3,0,null,null,1,"div",[["class","mat-button-ripple mat-ripple"],["matRipple",""]],[[2,"mat-button-ripple-round",null],[2,"mat-ripple-unbounded",null]],null,null,null,null)),go(4,212992,[[1,4]],0,Ld,[Mn,rn,Fl,[2,Cd],[2,zg]],{centered:[0,"centered"],disabled:[1,"disabled"],trigger:[2,"trigger"]},null),(t()(),Ts(5,0,null,null,0,"div",[["class","mat-button-focus-overlay"]],null,null,null,null,null))],function(t,e){var n=e.component;t(e,4,0,n.isIconButton,n._isRippleDisabled(),n._getHostElement())},function(t,e){var n=e.component;t(e,3,0,n.isRoundButton||n.isIconButton,io(e,4).unbounded)})}var Nv=Ji({encapsulation:2,styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1,1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],data:{}});function Fv(t){return Go(2,[Vo(null,0)],null,null)}var zv=Ji({encapsulation:2,styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}@media screen and (-ms-high-contrast:active){.mat-form-field-infix{border-image:linear-gradient(transparent,transparent)}}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),color .4s cubic-bezier(.25,.8,.25,1),width .4s cubic-bezier(.25,.8,.25,1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,.mat-form-field-empty.mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scaleY(1.0001)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(.5);opacity:0;transition:background-color .3s cubic-bezier(.55,0,.55,.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-label-wrapper .mat-icon,.mat-form-field-subscript-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}",".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:'';display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}",".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-start{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start{border-width:2px;transition:border-color .3s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity .1s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline{transition:none}",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}",".mat-input-element{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=month]::after,.mat-input-element[type=time]::after,.mat-input-element[type=week]::after{content:' ';white-space:pre;width:1px}.mat-input-element::placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-moz-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-webkit-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element:-ms-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}"],data:{animation:[{type:7,name:"transitionMessages",definitions:[{type:0,name:"enter",styles:{type:6,styles:{opacity:1,transform:"translateY(0%)"},offset:null},options:void 0},{type:1,expr:"void => enter",animation:[{type:6,styles:{opacity:0,transform:"translateY(-100%)"},offset:null},{type:4,styles:null,timings:"300ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function Vv(t){return Go(0,[(t()(),Ts(0,0,null,null,8,null,null,null,null,null,null,null)),(t()(),Ts(1,0,null,null,3,"div",[["class","mat-form-field-outline"]],null,null,null,null,null)),(t()(),Ts(2,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(3,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(4,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null)),(t()(),Ts(5,0,null,null,3,"div",[["class","mat-form-field-outline mat-form-field-outline-thick"]],null,null,null,null,null)),(t()(),Ts(6,0,null,null,0,"div",[["class","mat-form-field-outline-start"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(7,0,null,null,0,"div",[["class","mat-form-field-outline-gap"]],[[4,"width","px"]],null,null,null,null)),(t()(),Ts(8,0,null,null,0,"div",[["class","mat-form-field-outline-end"]],null,null,null,null,null))],null,function(t,e){var n=e.component;t(e,2,0,n._outlineGapStart),t(e,3,0,n._outlineGapWidth),t(e,6,0,n._outlineGapStart),t(e,7,0,n._outlineGapWidth)})}function Bv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[["class","mat-form-field-prefix"]],null,null,null,null,null)),Vo(null,0)],null,null)}function jv(t){return Go(0,[(t()(),Ts(0,0,null,null,2,null,null,null,null,null,null,null)),Vo(null,2),(t()(),Ho(2,null,["",""]))],null,function(t,e){t(e,2,0,e.component._control.placeholder)})}function Hv(t){return Go(0,[Vo(null,3),(t()(),Ss(0,null,null,0))],null,null)}function Zv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"span",[["aria-hidden","true"],["class","mat-placeholder-required mat-form-field-required-marker"]],null,null,null,null,null)),(t()(),Ho(-1,null,["\xa0*"]))],null,null)}function Uv(t){return Go(0,[(t()(),Ts(0,0,[[4,0],["label",1]],null,7,"label",[["class","mat-form-field-label"]],[[8,"id",0],[1,"for",0],[1,"aria-owns",0],[2,"mat-empty",null],[2,"mat-form-field-empty",null],[2,"mat-accent",null],[2,"mat-warn",null]],null,null,null,null)),go(1,16384,null,0,ul,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ss(16777216,null,null,1,null,jv)),go(3,278528,null,0,cl,[On,An,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Hv)),go(5,278528,null,0,cl,[On,An,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Zv)),go(7,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,n._hasLabel()),t(e,3,0,!1),t(e,5,0,!0),t(e,7,0,!n.hideRequiredMarker&&n._control.required&&!n._control.disabled)},function(t,e){var n=e.component;t(e,0,0,n._labelId,n._control.id,n._control.id,n._control.empty&&!n._shouldAlwaysFloat,n._control.empty&&!n._shouldAlwaysFloat,"accent"==n.color,"warn"==n.color)})}function Gv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[["class","mat-form-field-suffix"]],null,null,null,null,null)),Vo(null,4)],null,null)}function $v(t){return Go(0,[(t()(),Ts(0,0,[[1,0],["underline",1]],null,1,"div",[["class","mat-form-field-underline"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,0,"span",[["class","mat-form-field-ripple"]],[[2,"mat-accent",null],[2,"mat-warn",null]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,1,0,"accent"==n.color,"warn"==n.color)})}function qv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[],[[24,"@transitionMessages",0]],null,null,null,null)),Vo(null,5)],null,function(t,e){t(e,0,0,e.component._subscriptAnimationState)})}function Wv(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[["class","mat-hint"]],[[8,"id",0]],null,null,null,null)),(t()(),Ho(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,n._hintLabelId),t(e,1,0,n.hintLabel)})}function Kv(t){return Go(0,[(t()(),Ts(0,0,null,null,5,"div",[["class","mat-form-field-hint-wrapper"]],[[24,"@transitionMessages",0]],null,null,null,null)),(t()(),Ss(16777216,null,null,1,null,Wv)),go(2,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),Vo(null,6),(t()(),Ts(4,0,null,null,0,"div",[["class","mat-form-field-hint-spacer"]],null,null,null,null,null)),Vo(null,7)],function(t,e){t(e,2,0,e.component.hintLabel)},function(t,e){t(e,0,0,e.component._subscriptAnimationState)})}function Yv(t){return Go(2,[Oo(671088640,1,{underlineRef:0}),Oo(402653184,2,{_connectionContainerRef:0}),Oo(402653184,3,{_inputContainerRef:0}),Oo(671088640,4,{_label:0}),(t()(),Ts(4,0,null,null,20,"div",[["class","mat-form-field-wrapper"]],null,null,null,null,null)),(t()(),Ts(5,0,[[2,0],["connectionContainer",1]],null,11,"div",[["class","mat-form-field-flex"]],null,[[null,"click"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(i=!1!==(s._control.onContainerClick&&s._control.onContainerClick(n))&&i),i},null,null)),(t()(),Ss(16777216,null,null,1,null,Vv)),go(7,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,Bv)),go(9,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(10,0,[[3,0],["inputContainer",1]],null,4,"div",[["class","mat-form-field-infix"]],null,null,null,null,null)),Vo(null,1),(t()(),Ts(12,0,null,null,2,"span",[["class","mat-form-field-label-wrapper"]],null,null,null,null,null)),(t()(),Ss(16777216,null,null,1,null,Uv)),go(14,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,Gv)),go(16,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,$v)),go(18,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(19,0,null,null,5,"div",[["class","mat-form-field-subscript-wrapper"]],null,null,null,null,null)),go(20,16384,null,0,ul,[],{ngSwitch:[0,"ngSwitch"]},null),(t()(),Ss(16777216,null,null,1,null,qv)),go(22,278528,null,0,cl,[On,An,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null),(t()(),Ss(16777216,null,null,1,null,Kv)),go(24,278528,null,0,cl,[On,An,ul],{ngSwitchCase:[0,"ngSwitchCase"]},null)],function(t,e){var n=e.component;t(e,7,0,"outline"==n.appearance),t(e,9,0,n._prefixChildren.length),t(e,14,0,n._hasFloatingLabel()),t(e,16,0,n._suffixChildren.length),t(e,18,0,"outline"!=n.appearance),t(e,20,0,n._getDisplayedMessages()),t(e,22,0,"error"),t(e,24,0,"hint")},null)}var Qv=Ji({encapsulation:2,styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px;outline:0}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}@media screen and (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}.mat-menu-panel.ng-animating .mat-menu-item-submenu-trigger{pointer-events:none}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],data:{animation:[{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.01, 0.01)"},offset:null},options:void 0},{type:1,expr:"void => enter",animation:{type:2,steps:[{type:11,selector:".mat-menu-content",animation:{type:6,styles:{opacity:0},offset:null},options:null},{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1, 0.5)"},offset:null},timings:"100ms linear"},{type:3,steps:[{type:11,selector:".mat-menu-content",animation:{type:4,styles:{type:6,styles:{opacity:1},offset:null},timings:"400ms cubic-bezier(0.55, 0, 0.55, 0.2)"},options:null},{type:4,styles:{type:6,styles:{transform:"scale(1, 1)"},offset:null},timings:"300ms cubic-bezier(0.25, 0.8, 0.25, 1)"}],options:null}],options:null},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"150ms 50ms linear"},options:null}],options:{}},{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null},options:void 0},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function Xv(t){return Go(0,[(t()(),Ts(0,0,null,null,3,"div",[["class","mat-menu-panel"],["role","menu"],["tabindex","-1"]],[[24,"@transformMenu",0]],[[null,"keydown"],[null,"click"],[null,"@transformMenu.start"],[null,"@transformMenu.done"]],function(t,e,n){var i=!0,s=t.component;return"keydown"===e&&(i=!1!==s._handleKeydown(n)&&i),"click"===e&&(i=!1!==s.closed.emit("click")&&i),"@transformMenu.start"===e&&(i=0!=(s._isAnimating=!0)&&i),"@transformMenu.done"===e&&(i=!1!==s._onAnimationDone(n)&&i),i},null,null)),go(1,278528,null,0,nl,[ti,ei,Mn,Pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),Ts(2,0,null,null,1,"div",[["class","mat-menu-content"]],null,null,null,null,null)),Vo(null,0)],function(t,e){t(e,1,0,"mat-menu-panel",e.component._classList)},function(t,e){t(e,0,0,e.component._panelAnimationState)})}function Jv(t){return Go(2,[Oo(402653184,1,{templateRef:0}),(t()(),Ss(0,[[1,2]],null,0,null,Xv))],null,null)}var tb=Ji({encapsulation:2,styles:[],data:{}});function eb(t){return Go(2,[Vo(null,0),(t()(),Ts(1,0,null,null,1,"div",[["class","mat-menu-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),go(2,212992,null,0,Ld,[Mn,rn,Fl,[2,Cd],[2,zg]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,2,0,n.disableRipple||n.disabled,n._getHostElement())},function(t,e){t(e,1,0,io(e,2).unbounded)})}var nb=Ji({encapsulation:2,styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%}.mat-autocomplete-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}@media screen and (-ms-high-contrast:active){.mat-autocomplete-panel{outline:solid 1px}}"],data:{}});function ib(t){return Go(0,[(t()(),Ts(0,0,[[2,0],["panel",1]],null,2,"div",[["class","mat-autocomplete-panel"],["role","listbox"]],[[8,"id",0]],null,null,null,null)),go(1,278528,null,0,nl,[ti,ei,Mn,Pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Vo(null,0)],function(t,e){t(e,1,0,"mat-autocomplete-panel",e.component._classList)},function(t,e){t(e,0,0,e.component.id)})}function sb(t){return Go(2,[Oo(402653184,1,{template:0}),Oo(671088640,2,{panel:0}),(t()(),Ss(0,[[1,2]],null,0,null,ib))],null,null)}var ob=Ji({encapsulation:2,styles:["[hidden]{display:none!important}#geoloc-map{display:flex;flex-direction:column;min-height:200px}#geoloc-map #geoloc-map-meta{flex:1;padding:15px 15px 0}#geoloc-map #geoloc-map-meta .geolocationInputs{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around}#geoloc-map #geoloc-map-meta .geolocationInputs .longitude-input-group{margin-left:5px}#geoloc-map #geoloc-map-draw{position:relative;flex:3}#geoloc-map #httpTasksRunningSpinner{flex:1}button .mini{min-width:0;line-height:30px}.geolocatedPhotoMetadataTable{width:100%}.sub-map-infos{color:#c5c5c5;display:flex;justify-content:space-between;flex-direction:row;padding:5px}.sub-map-infos.has-data{color:#000}.lat-lng-dec-wrapper,.lat-lng-dms-wrapper{display:flex;flex-direction:row;flex-wrap:wrap}@media only screen and (max-width:600px){.lat-lng-dec-wrapper,.lat-lng-dms-wrapper{justify-content:center}.lat-lng-dec-wrapper .longitude-wrapper,.lat-lng-dms-wrapper .longitude-wrapper{margin-left:70px}}@media only screen and (max-width:360px){.lat-lng-dec-wrapper,.lat-lng-dms-wrapper{justify-content:center}.lat-lng-dec-wrapper .longitude-wrapper,.lat-lng-dms-wrapper .longitude-wrapper{display:flex;align-items:baseline;flex-wrap:nowrap;margin-left:37px}.lat-lng-dec-wrapper .longitude-wrapper /deep/.mat-form-field-wrapper,.lat-lng-dms-wrapper .longitude-wrapper /deep/.mat-form-field-wrapper{max-width:160px}.lat-lng-dec-wrapper .latitude-wrapper,.lat-lng-dms-wrapper .latitude-wrapper{display:flex;align-items:baseline;flex-wrap:nowrap;margin-left:-37px}.lat-lng-dec-wrapper .latitude-wrapper /deep/.mat-form-field-wrapper,.lat-lng-dms-wrapper .latitude-wrapper /deep/.mat-form-field-wrapper{max-width:160px}}"],data:{}});function rb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Tv,Lv)),go(1,16384,[[7,4]],0,Ty,[],null,null),go(2,49152,null,0,Yy,[Mn,Fl,[2,Ol],[2,zg],qy],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function ab(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"span",[],null,null,null,null,null)),(t()(),Ho(1,null,["",""])),jo(2,2)],null,function(t,e){t(e,1,0,Yi(e,1,0,t(e,2,0,io(e.parent.parent,0),e.parent.context.$implicit,"osm")))})}function lb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"span",[],null,null,null,null,null)),(t()(),Ho(1,null,["",""])),jo(2,2)],null,function(t,e){t(e,1,0,Yi(e,1,0,t(e,2,0,io(e.parent.parent,0),e.parent.context.$implicit,"mapQuest")))})}function hb(t){return Go(0,[(t()(),Ts(0,0,null,null,5,"mat-option",[["class","mat-option"],["role","option"]],[[1,"tabindex",0],[2,"mat-selected",null],[2,"mat-option-multiple",null],[2,"mat-active",null],[8,"id",0],[1,"aria-selected",0],[1,"aria-disabled",0],[2,"mat-option-disabled",null]],[[null,"click"],[null,"keydown"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==io(t,1)._selectViaInteraction()&&i),"keydown"===e&&(i=!1!==io(t,1)._handleKeydown(n)&&i),i},Mv,Iv)),go(1,8568832,[[8,4]],0,Rd,[Mn,Rn,[2,Od],[2,Md]],{value:[0,"value"]},null),(t()(),Ss(16777216,null,0,1,null,ab)),go(3,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,0,1,null,lb)),go(5,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,e.context.$implicit),t(e,3,0,"osm"==n.geolocationProvider),t(e,5,0,"mapQuest"==n.geolocationProvider)},function(t,e){t(e,0,0,io(e,1)._getTabIndex(),io(e,1).selected,io(e,1).multiple,io(e,1).active,io(e,1).id,io(e,1).selected.toString(),io(e,1).disabled.toString(),io(e,1).disabled)})}function ub(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Tv,Lv)),go(1,16384,[[16,4]],0,Ty,[],null,null),go(2,49152,null,0,Yy,[Mn,Fl,[2,Ol],[2,zg],qy],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function cb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[13,4]],0,Cy,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function db(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Tv,Lv)),go(1,16384,[[23,4]],0,Ty,[],null,null),go(2,49152,null,0,Yy,[Mn,Fl,[2,Ol],[2,zg],qy],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function pb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[20,4]],0,Cy,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function mb(t){return Go(0,[(t()(),Ts(0,0,null,null,56,"div",[["class","lat-lng-dec-wrapper"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,27,"div",[["class","latitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(2,16777216,null,null,5,"button",[["aria-haspopup","true"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null],[1,"aria-expanded",0]],[[null,"mousedown"],[null,"keydown"],[null,"click"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==io(t,4)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==io(t,4)._handleKeydown(n)&&i),"click"===e&&(i=!1!==io(t,4)._handleClick(n)&&i),i},Rv,Ov)),go(3,180224,null,0,yv,[Mn,Fl,Xu,[2,zg]],null,null),go(4,1196032,null,0,wy,[ru,Mn,On,yy,[2,gy],[8,null],[2,Su],Xu],{menu:[0,"menu"]},null),(t()(),Ts(5,0,null,0,2,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Fv,Nv)),go(6,638976,null,0,dv,[Mn,lv,[8,null]],null,null),(t()(),Ho(-1,0,["more_vert"])),(t()(),Ts(8,0,null,null,20,"mat-form-field",[["class","latitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Yv,zv)),go(9,7389184,null,7,Oy,[Mn,Rn,[2,Fd],[2,Su],[2,Ay],Fl,rn,[2,zg]],null,null),Oo(335544320,10,{_control:0}),Oo(335544320,11,{_placeholderChild:0}),Oo(335544320,12,{_labelChild:0}),Oo(603979776,13,{_errorChildren:1}),Oo(603979776,14,{_hintChildren:1}),Oo(603979776,15,{_prefixChildren:1}),Oo(603979776,16,{_suffixChildren:1}),(t()(),Ts(17,0,null,1,7,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","latInput"],["matInput",""],["placeholder","latitude"]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,18)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,18).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,18)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,18)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,22)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,22)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,22)._onInput()&&i),i},null,null)),go(18,16384,null,0,Up,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Hp,function(t){return[t]},[Up]),go(20,671744,null,0,Rm,[[3,Rp],[8,null],[8,null],[6,Hp],[2,Im]],{name:[0,"name"]},null),vo(2048,null,Wp,null,[Rm]),go(22,999424,null,0,Hy,[Mn,Fl,[6,Wp],[2,Tm],[2,Mm],yd,[8,null],Fy,rn],{placeholder:[0,"placeholder"]},null),go(23,16384,null,0,mm,[[4,Wp]],null,null),vo(2048,[[10,4]],Ly,null,[Hy]),(t()(),Ss(16777216,null,4,1,null,ub)),go(26,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,cb)),go(28,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(29,0,null,null,27,"div",[["class","longitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(30,0,null,null,20,"mat-form-field",[["class","longitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Yv,zv)),go(31,7389184,null,7,Oy,[Mn,Rn,[2,Fd],[2,Su],[2,Ay],Fl,rn,[2,zg]],null,null),Oo(335544320,17,{_control:0}),Oo(335544320,18,{_placeholderChild:0}),Oo(335544320,19,{_labelChild:0}),Oo(603979776,20,{_errorChildren:1}),Oo(603979776,21,{_hintChildren:1}),Oo(603979776,22,{_prefixChildren:1}),Oo(603979776,23,{_suffixChildren:1}),(t()(),Ts(39,0,null,1,7,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","lngInput"],["matInput",""],["placeholder","longitude"]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,40)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,40).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,40)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,40)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,44)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,44)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,44)._onInput()&&i),i},null,null)),go(40,16384,null,0,Up,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Hp,function(t){return[t]},[Up]),go(42,671744,null,0,Rm,[[3,Rp],[8,null],[8,null],[6,Hp],[2,Im]],{name:[0,"name"]},null),vo(2048,null,Wp,null,[Rm]),go(44,999424,null,0,Hy,[Mn,Fl,[6,Wp],[2,Tm],[2,Mm],yd,[8,null],Fy,rn],{placeholder:[0,"placeholder"]},null),go(45,16384,null,0,mm,[[4,Wp]],null,null),vo(2048,[[17,4]],Ly,null,[Hy]),(t()(),Ss(16777216,null,4,1,null,db)),go(48,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,pb)),go(50,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(51,0,null,null,5,"button",[["color","primary"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(s.addMarkerFromLatLngCoord(),i=!1!==s.callGeolocElevationApisUsingLatLngInputsValues()&&i),i},Rv,Ov)),go(52,180224,null,0,yv,[Mn,Fl,Xu,[2,zg]],{disabled:[0,"disabled"],color:[1,"color"]},null),(t()(),Ts(53,16777216,null,0,3,"mat-icon",[["class","mat-icon"],["matTooltip","Utiliser ces coordonn\xe9es"],["role","img"]],[[2,"mat-icon-inline",null]],[[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"longpress"===e&&(i=!1!==io(t,54).show()&&i),"keydown"===e&&(i=!1!==io(t,54)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,54)._handleTouchend()&&i),i},Fv,Nv)),go(54,147456,null,0,_u,[ru,Mn,Eh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(55,638976,null,0,dv,[Mn,lv,[8,null]],null,null),(t()(),Ho(-1,0,["where_to_vote"]))],function(t,e){var n=e.component;t(e,4,0,io(e.parent,10)),t(e,6,0),t(e,20,0,"latInput"),t(e,22,0,"latitude"),t(e,26,0,n.isLoadingLatitude),t(e,28,0,n.latlngFormGroup.controls.latInput.dirty&&n.latlngFormGroup.controls.latInput.hasError("malformedLatLngDecFormat")),t(e,42,0,"lngInput"),t(e,44,0,"longitude"),t(e,48,0,n.isLoadingLongitude),t(e,50,0,n.latlngFormGroup.controls.latInput.dirty&&n.latlngFormGroup.controls.latInput.hasError("malformedLatLngDecFormat")),t(e,52,0,!n.latlngFormGroup.controls.latInput.valid||!n.latlngFormGroup.controls.lngInput.valid,"primary"),t(e,54,0,"Utiliser ces coordonn\xe9es"),t(e,55,0)},function(t,e){t(e,2,0,io(e,3).disabled||null,"NoopAnimations"===io(e,3)._animationMode,io(e,4).menuOpen||null),t(e,5,0,io(e,6).inline),t(e,8,1,["standard"==io(e,9).appearance,"fill"==io(e,9).appearance,"outline"==io(e,9).appearance,"legacy"==io(e,9).appearance,io(e,9)._control.errorState,io(e,9)._canLabelFloat,io(e,9)._shouldLabelFloat(),io(e,9)._hideControlPlaceholder(),io(e,9)._control.disabled,io(e,9)._control.autofilled,io(e,9)._control.focused,"accent"==io(e,9).color,"warn"==io(e,9).color,io(e,9)._shouldForward("untouched"),io(e,9)._shouldForward("touched"),io(e,9)._shouldForward("pristine"),io(e,9)._shouldForward("dirty"),io(e,9)._shouldForward("valid"),io(e,9)._shouldForward("invalid"),io(e,9)._shouldForward("pending"),!io(e,9)._animationsEnabled]),t(e,17,1,[io(e,22)._isServer,io(e,22).id,io(e,22).placeholder,io(e,22).disabled,io(e,22).required,io(e,22).readonly,io(e,22)._ariaDescribedby||null,io(e,22).errorState,io(e,22).required.toString(),io(e,23).ngClassUntouched,io(e,23).ngClassTouched,io(e,23).ngClassPristine,io(e,23).ngClassDirty,io(e,23).ngClassValid,io(e,23).ngClassInvalid,io(e,23).ngClassPending]),t(e,30,1,["standard"==io(e,31).appearance,"fill"==io(e,31).appearance,"outline"==io(e,31).appearance,"legacy"==io(e,31).appearance,io(e,31)._control.errorState,io(e,31)._canLabelFloat,io(e,31)._shouldLabelFloat(),io(e,31)._hideControlPlaceholder(),io(e,31)._control.disabled,io(e,31)._control.autofilled,io(e,31)._control.focused,"accent"==io(e,31).color,"warn"==io(e,31).color,io(e,31)._shouldForward("untouched"),io(e,31)._shouldForward("touched"),io(e,31)._shouldForward("pristine"),io(e,31)._shouldForward("dirty"),io(e,31)._shouldForward("valid"),io(e,31)._shouldForward("invalid"),io(e,31)._shouldForward("pending"),!io(e,31)._animationsEnabled]),t(e,39,1,[io(e,44)._isServer,io(e,44).id,io(e,44).placeholder,io(e,44).disabled,io(e,44).required,io(e,44).readonly,io(e,44)._ariaDescribedby||null,io(e,44).errorState,io(e,44).required.toString(),io(e,45).ngClassUntouched,io(e,45).ngClassTouched,io(e,45).ngClassPristine,io(e,45).ngClassDirty,io(e,45).ngClassValid,io(e,45).ngClassInvalid,io(e,45).ngClassPending]),t(e,51,0,io(e,52).disabled||null,"NoopAnimations"===io(e,52)._animationMode),t(e,53,0,io(e,55).inline)})}function fb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Tv,Lv)),go(1,16384,[[30,4]],0,Ty,[],null,null),go(2,49152,null,0,Yy,[Mn,Fl,[2,Ol],[2,zg],qy],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function _b(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[27,4]],0,Cy,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function gb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Tv,Lv)),go(1,16384,[[37,4]],0,Ty,[],null,null),go(2,49152,null,0,Yy,[Mn,Fl,[2,Ol],[2,zg],qy],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function yb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-error",[["class","mat-error"],["role","alert"]],[[1,"id",0]],null,null,null,null)),go(1,16384,[[34,4]],0,Cy,[],null,null),(t()(),Ho(-1,null,["Format non valide"]))],null,function(t,e){t(e,0,0,io(e,1).id)})}function vb(t){return Go(0,[(t()(),Ts(0,0,null,null,62,"div",[["class","lat-lng-dms-wrapper"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,30,"div",[["class","latitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(2,16777216,null,null,5,"button",[["aria-haspopup","true"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null],[1,"aria-expanded",0]],[[null,"mousedown"],[null,"keydown"],[null,"click"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==io(t,4)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==io(t,4)._handleKeydown(n)&&i),"click"===e&&(i=!1!==io(t,4)._handleClick(n)&&i),i},Rv,Ov)),go(3,180224,null,0,yv,[Mn,Fl,Xu,[2,zg]],null,null),go(4,1196032,null,0,wy,[ru,Mn,On,yy,[2,gy],[8,null],[2,Su],Xu],{menu:[0,"menu"]},null),(t()(),Ts(5,0,null,0,2,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Fv,Nv)),go(6,638976,null,0,dv,[Mn,lv,[8,null]],null,null),(t()(),Ho(-1,0,["more_vert"])),(t()(),Ts(8,0,null,null,23,"mat-form-field",[["class","latitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Yv,zv)),go(9,7389184,null,7,Oy,[Mn,Rn,[2,Fd],[2,Su],[2,Ay],Fl,rn,[2,zg]],null,null),Oo(335544320,24,{_control:0}),Oo(335544320,25,{_placeholderChild:0}),Oo(335544320,26,{_labelChild:0}),Oo(603979776,27,{_errorChildren:1}),Oo(603979776,28,{_hintChildren:1}),Oo(603979776,29,{_prefixChildren:1}),Oo(603979776,30,{_suffixChildren:1}),(t()(),Ts(17,0,null,1,7,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","dmsLatInput"],["matInput",""],["placeholder","(deg)\xb0 (min)' (sec)\""]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,18)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,18).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,18)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,18)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,22)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,22)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,22)._onInput()&&i),i},null,null)),go(18,16384,null,0,Up,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Hp,function(t){return[t]},[Up]),go(20,671744,null,0,Rm,[[3,Rp],[8,null],[8,null],[6,Hp],[2,Im]],{name:[0,"name"]},null),vo(2048,null,Wp,null,[Rm]),go(22,999424,null,0,Hy,[Mn,Fl,[6,Wp],[2,Tm],[2,Mm],yd,[8,null],Fy,rn],{placeholder:[0,"placeholder"]},null),go(23,16384,null,0,mm,[[4,Wp]],null,null),vo(2048,[[24,4]],Ly,null,[Hy]),(t()(),Ts(25,0,null,0,2,"span",[["matPrefix",""]],null,null,null,null,null)),go(26,16384,[[29,4]],0,Sy,[],null,null),(t()(),Ho(-1,null,["N\xa0"])),(t()(),Ss(16777216,null,4,1,null,fb)),go(29,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,_b)),go(31,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(32,0,null,null,30,"div",[["class","longitude-wrapper"]],null,null,null,null,null)),(t()(),Ts(33,0,null,null,23,"mat-form-field",[["class","longitude-input-group mat-form-field"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Yv,zv)),go(34,7389184,null,7,Oy,[Mn,Rn,[2,Fd],[2,Su],[2,Ay],Fl,rn,[2,zg]],null,null),Oo(335544320,31,{_control:0}),Oo(335544320,32,{_placeholderChild:0}),Oo(335544320,33,{_labelChild:0}),Oo(603979776,34,{_errorChildren:1}),Oo(603979776,35,{_hintChildren:1}),Oo(603979776,36,{_prefixChildren:1}),Oo(603979776,37,{_suffixChildren:1}),(t()(),Ts(42,0,null,1,7,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","dmsLngInput"],["matInput",""],["placeholder","(deg)\xb0 (min)' (sec)\""]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,43)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,43).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,43)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,43)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,47)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,47)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,47)._onInput()&&i),i},null,null)),go(43,16384,null,0,Up,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Hp,function(t){return[t]},[Up]),go(45,671744,null,0,Rm,[[3,Rp],[8,null],[8,null],[6,Hp],[2,Im]],{name:[0,"name"]},null),vo(2048,null,Wp,null,[Rm]),go(47,999424,null,0,Hy,[Mn,Fl,[6,Wp],[2,Tm],[2,Mm],yd,[8,null],Fy,rn],{placeholder:[0,"placeholder"]},null),go(48,16384,null,0,mm,[[4,Wp]],null,null),vo(2048,[[31,4]],Ly,null,[Hy]),(t()(),Ts(50,0,null,0,2,"span",[["matPrefix",""]],null,null,null,null,null)),go(51,16384,[[36,4]],0,Sy,[],null,null),(t()(),Ho(-1,null,["E\xa0"])),(t()(),Ss(16777216,null,4,1,null,gb)),go(54,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,5,1,null,yb)),go(56,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(57,0,null,null,5,"button",[["color","primary"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(s.addMarkerFromDmsCoord(),i=!1!==s.callGeolocElevationApisUsingLatLngInputsValues()&&i),i},Rv,Ov)),go(58,180224,null,0,yv,[Mn,Fl,Xu,[2,zg]],{disabled:[0,"disabled"],color:[1,"color"]},null),(t()(),Ts(59,16777216,null,0,3,"mat-icon",[["class","mat-icon"],["matTooltip","Utiliser ces coordonn\xe9es"],["role","img"]],[[2,"mat-icon-inline",null]],[[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0;return"longpress"===e&&(i=!1!==io(t,60).show()&&i),"keydown"===e&&(i=!1!==io(t,60)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==io(t,60)._handleTouchend()&&i),i},Fv,Nv)),go(60,147456,null,0,_u,[ru,Mn,Eh,On,rn,Fl,Bu,Xu,pu,[2,Su],[2,fu]],{message:[0,"message"]},null),go(61,638976,null,0,dv,[Mn,lv,[8,null]],null,null),(t()(),Ho(-1,0,["where_to_vote"]))],function(t,e){var n=e.component;t(e,4,0,io(e.parent,10)),t(e,6,0),t(e,20,0,"dmsLatInput"),t(e,22,0,"(deg)\xb0 (min)' (sec)\""),t(e,29,0,n.isLoadingLatitude),t(e,31,0,n.latlngFormGroup.controls.dmsLatInput.dirty&&n.latlngFormGroup.controls.dmsLatInput.hasError("malformedLatLngDmsFormat")),t(e,45,0,"dmsLngInput"),t(e,47,0,"(deg)\xb0 (min)' (sec)\""),t(e,54,0,n.isLoadingLongitude),t(e,56,0,n.latlngFormGroup.controls.dmsLatInput.dirty&&n.latlngFormGroup.controls.dmsLatInput.hasError("malformedLatLngDmsFormat")),t(e,58,0,!n.latlngFormGroup.controls.dmsLatInput.valid||!n.latlngFormGroup.controls.dmsLngInput.valid,"primary"),t(e,60,0,"Utiliser ces coordonn\xe9es"),t(e,61,0)},function(t,e){t(e,2,0,io(e,3).disabled||null,"NoopAnimations"===io(e,3)._animationMode,io(e,4).menuOpen||null),t(e,5,0,io(e,6).inline),t(e,8,1,["standard"==io(e,9).appearance,"fill"==io(e,9).appearance,"outline"==io(e,9).appearance,"legacy"==io(e,9).appearance,io(e,9)._control.errorState,io(e,9)._canLabelFloat,io(e,9)._shouldLabelFloat(),io(e,9)._hideControlPlaceholder(),io(e,9)._control.disabled,io(e,9)._control.autofilled,io(e,9)._control.focused,"accent"==io(e,9).color,"warn"==io(e,9).color,io(e,9)._shouldForward("untouched"),io(e,9)._shouldForward("touched"),io(e,9)._shouldForward("pristine"),io(e,9)._shouldForward("dirty"),io(e,9)._shouldForward("valid"),io(e,9)._shouldForward("invalid"),io(e,9)._shouldForward("pending"),!io(e,9)._animationsEnabled]),t(e,17,1,[io(e,22)._isServer,io(e,22).id,io(e,22).placeholder,io(e,22).disabled,io(e,22).required,io(e,22).readonly,io(e,22)._ariaDescribedby||null,io(e,22).errorState,io(e,22).required.toString(),io(e,23).ngClassUntouched,io(e,23).ngClassTouched,io(e,23).ngClassPristine,io(e,23).ngClassDirty,io(e,23).ngClassValid,io(e,23).ngClassInvalid,io(e,23).ngClassPending]),t(e,33,1,["standard"==io(e,34).appearance,"fill"==io(e,34).appearance,"outline"==io(e,34).appearance,"legacy"==io(e,34).appearance,io(e,34)._control.errorState,io(e,34)._canLabelFloat,io(e,34)._shouldLabelFloat(),io(e,34)._hideControlPlaceholder(),io(e,34)._control.disabled,io(e,34)._control.autofilled,io(e,34)._control.focused,"accent"==io(e,34).color,"warn"==io(e,34).color,io(e,34)._shouldForward("untouched"),io(e,34)._shouldForward("touched"),io(e,34)._shouldForward("pristine"),io(e,34)._shouldForward("dirty"),io(e,34)._shouldForward("valid"),io(e,34)._shouldForward("invalid"),io(e,34)._shouldForward("pending"),!io(e,34)._animationsEnabled]),t(e,42,1,[io(e,47)._isServer,io(e,47).id,io(e,47).placeholder,io(e,47).disabled,io(e,47).required,io(e,47).readonly,io(e,47)._ariaDescribedby||null,io(e,47).errorState,io(e,47).required.toString(),io(e,48).ngClassUntouched,io(e,48).ngClassTouched,io(e,48).ngClassPristine,io(e,48).ngClassDirty,io(e,48).ngClassValid,io(e,48).ngClassInvalid,io(e,48).ngClassPending]),t(e,57,0,io(e,58).disabled||null,"NoopAnimations"===io(e,58)._animationMode),t(e,59,0,io(e,61).inline)})}function bb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"mat-spinner",[["class","mat-spinner mat-progress-spinner"],["diameter","20"],["matSuffix",""],["mode","indeterminate"],["role","progressbar"]],[[2,"_mat-animation-noopable",null],[4,"width","px"],[4,"height","px"]],null,null,Tv,Lv)),go(1,16384,[[46,4]],0,Ty,[],null,null),go(2,49152,null,0,Yy,[Mn,Fl,[2,Ol],[2,zg],qy],{diameter:[0,"diameter"]},null)],function(t,e){t(e,2,0,"20")},function(t,e){t(e,0,0,io(e,2)._noopAnimations,io(e,2).diameter,io(e,2).diameter)})}function wb(t){return Go(0,[(t()(),Ts(0,0,null,null,2,"span",[["matSuffix",""]],null,null,null,null,null)),go(1,16384,[[46,4]],0,Ty,[],null,null),(t()(),Ho(-1,null,["m"]))],null,null)}function xb(t){return Go(0,[(t()(),Ts(0,0,null,null,44,"div",[["class","geolocationInputs"]],null,null,null,null,null)),(t()(),Ts(1,0,null,null,18,"div",[],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==io(t,2).onSubmit(n)&&i),"reset"===e&&(i=!1!==io(t,2).onReset()&&i),i},null,null)),go(2,540672,null,0,Mm,[[8,null],[8,null]],{form:[0,"form"]},null),vo(2048,null,Rp,null,[Mm]),go(4,16384,null,0,fm,[[4,Rp]],null,null),(t()(),Ss(16777216,null,null,1,null,mb)),go(6,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,vb)),go(8,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(9,0,null,null,10,"mat-menu",[],null,null,null,Jv,Qv)),go(10,1294336,[["menu",4]],2,gy,[Mn,rn,fy],null,null),Oo(603979776,38,{items:1}),Oo(335544320,39,{lazyContent:0}),vo(2048,null,dy,null,[gy]),(t()(),Ts(14,0,null,0,2,"button",[["class","mat-menu-item"],["mat-menu-item",""],["role","menuitem"]],[[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(i=!1!==io(t,15)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==io(t,15)._handleMouseEnter()&&i),"click"===e&&(i=!1!==s.setLatLngInputFormat("dms")&&i),i},eb,tb)),go(15,180224,[[38,4]],0,my,[Mn,Ol,Xu,[2,dy]],null,null),(t()(),Ho(-1,0,["Degr\xe9s minutes secondes"])),(t()(),Ts(17,0,null,0,2,"button",[["class","mat-menu-item"],["mat-menu-item",""],["role","menuitem"]],[[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,s=t.component;return"click"===e&&(i=!1!==io(t,18)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==io(t,18)._handleMouseEnter()&&i),"click"===e&&(i=!1!==s.setLatLngInputFormat("decimal")&&i),i},eb,tb)),go(18,180224,[[38,4]],0,my,[Mn,Ol,Xu,[2,dy]],null,null),(t()(),Ho(-1,0,["D\xe9cimal"])),(t()(),Ts(20,0,null,null,24,"div",[["class","elevationInput"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==io(t,21).onSubmit(n)&&i),"reset"===e&&(i=!1!==io(t,21).onReset()&&i),i},null,null)),go(21,540672,null,0,Mm,[[8,null],[8,null]],{form:[0,"form"]},null),vo(2048,null,Rp,null,[Mm]),go(23,16384,null,0,fm,[[4,Rp]],null,null),(t()(),Ts(24,0,null,null,20,"mat-form-field",[["class","mat-form-field"],["style","width: 100px;"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Yv,zv)),go(25,7389184,null,7,Oy,[Mn,Rn,[2,Fd],[2,Su],[2,Ay],Fl,rn,[2,zg]],null,null),Oo(335544320,40,{_control:0}),Oo(335544320,41,{_placeholderChild:0}),Oo(335544320,42,{_labelChild:0}),Oo(603979776,43,{_errorChildren:1}),Oo(603979776,44,{_hintChildren:1}),Oo(603979776,45,{_prefixChildren:1}),Oo(603979776,46,{_suffixChildren:1}),(t()(),Ts(33,0,null,1,7,"input",[["class","mat-input-element mat-form-field-autofill-control"],["formControlName","elevationInput"],["matInput",""],["placeholder","altitude"]],[[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==io(t,34)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,34).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,34)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,34)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,38)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,38)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,38)._onInput()&&i),i},null,null)),go(34,16384,null,0,Up,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Hp,function(t){return[t]},[Up]),go(36,671744,null,0,Rm,[[3,Rp],[8,null],[8,null],[6,Hp],[2,Im]],{name:[0,"name"]},null),vo(2048,null,Wp,null,[Rm]),go(38,999424,null,0,Hy,[Mn,Fl,[6,Wp],[2,Tm],[2,Mm],yd,[8,null],Fy,rn],{placeholder:[0,"placeholder"]},null),go(39,16384,null,0,mm,[[4,Wp]],null,null),vo(2048,[[40,4]],Ly,null,[Hy]),(t()(),Ss(16777216,null,4,1,null,bb)),go(42,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,4,1,null,wb)),go(44,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,n.latlngFormGroup),t(e,6,0,"decimal"==n.coordFormat),t(e,8,0,"dms"==n.coordFormat),t(e,10,0),t(e,21,0,n.elevationFormGroup),t(e,36,0,"elevationInput"),t(e,38,0,"altitude"),t(e,42,0,n.isLoadingElevation),t(e,44,0,!n.isLoadingElevation)},function(t,e){t(e,1,0,io(e,4).ngClassUntouched,io(e,4).ngClassTouched,io(e,4).ngClassPristine,io(e,4).ngClassDirty,io(e,4).ngClassValid,io(e,4).ngClassInvalid,io(e,4).ngClassPending),t(e,14,0,io(e,15)._highlighted,io(e,15)._triggersSubmenu,io(e,15)._getTabIndex(),io(e,15).disabled.toString(),io(e,15).disabled||null),t(e,17,0,io(e,18)._highlighted,io(e,18)._triggersSubmenu,io(e,18)._getTabIndex(),io(e,18).disabled.toString(),io(e,18).disabled||null),t(e,20,0,io(e,23).ngClassUntouched,io(e,23).ngClassTouched,io(e,23).ngClassPristine,io(e,23).ngClassDirty,io(e,23).ngClassValid,io(e,23).ngClassInvalid,io(e,23).ngClassPending),t(e,24,1,["standard"==io(e,25).appearance,"fill"==io(e,25).appearance,"outline"==io(e,25).appearance,"legacy"==io(e,25).appearance,io(e,25)._control.errorState,io(e,25)._canLabelFloat,io(e,25)._shouldLabelFloat(),io(e,25)._hideControlPlaceholder(),io(e,25)._control.disabled,io(e,25)._control.autofilled,io(e,25)._control.focused,"accent"==io(e,25).color,"warn"==io(e,25).color,io(e,25)._shouldForward("untouched"),io(e,25)._shouldForward("touched"),io(e,25)._shouldForward("pristine"),io(e,25)._shouldForward("dirty"),io(e,25)._shouldForward("valid"),io(e,25)._shouldForward("invalid"),io(e,25)._shouldForward("pending"),!io(e,25)._animationsEnabled]),t(e,33,1,[io(e,38)._isServer,io(e,38).id,io(e,38).placeholder,io(e,38).disabled,io(e,38).required,io(e,38).readonly,io(e,38)._ariaDescribedby||null,io(e,38).errorState,io(e,38).required.toString(),io(e,39).ngClassUntouched,io(e,39).ngClassTouched,io(e,39).ngClassPristine,io(e,39).ngClassDirty,io(e,39).ngClassValid,io(e,39).ngClassInvalid,io(e,39).ngClassPending])})}function Eb(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ho(1,null,["altitude : "," m"]))],null,function(t,e){t(e,1,0,e.component.elevationFormGroup.controls.elevationInput.value)})}function Cb(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ho(-1,null,["altitude : calcul en cours..."]))],null,null)}function Lb(t){return Go(0,[(t()(),Ts(0,0,null,null,10,"div",[["class","sub-map-infos"]],[[2,"has-data",null]],null,null,null,null)),(t()(),Ts(1,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),Ho(2,null,["latitude : ",""])),jo(3,2),(t()(),Ts(4,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),Ho(5,null,["longitude : ",""])),jo(6,2),(t()(),Ss(16777216,null,null,1,null,Eb)),go(8,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ss(16777216,null,null,1,null,Cb)),go(10,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,8,0,!n.isLoadingElevation),t(e,10,0,n.isLoadingElevation)},function(t,e){var n=e.component;t(e,0,0,""!==n.latlngFormGroup.controls.latInput.value&&""!==n.latlngFormGroup.controls.lngInput.value),t(e,2,0,Yi(e,2,0,t(e,3,0,io(e.parent,1),n.latlngFormGroup.controls.latInput.value,"2.0-6"))),t(e,5,0,Yi(e,5,0,t(e,6,0,io(e.parent,1),n.latlngFormGroup.controls.lngInput.value,"2.0-6")))})}function kb(t){return Go(0,[yo(0,tf,[Qm]),yo(0,Dl,[ri]),(t()(),Ts(2,0,null,null,34,"div",[["id","geoloc-map"]],null,null,null,null,null)),(t()(),Ts(3,0,null,null,29,"div",[["id","geoloc-map-meta"]],null,null,null,null,null)),(t()(),Ts(4,0,null,null,26,"mat-form-field",[["class","mat-form-field"],["style","width: 100%;"]],[[2,"mat-form-field-appearance-standard",null],[2,"mat-form-field-appearance-fill",null],[2,"mat-form-field-appearance-outline",null],[2,"mat-form-field-appearance-legacy",null],[2,"mat-form-field-invalid",null],[2,"mat-form-field-can-float",null],[2,"mat-form-field-should-float",null],[2,"mat-form-field-hide-placeholder",null],[2,"mat-form-field-disabled",null],[2,"mat-form-field-autofilled",null],[2,"mat-focused",null],[2,"mat-accent",null],[2,"mat-warn",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"_mat-animation-noopable",null]],null,null,Yv,zv)),go(5,7389184,null,7,Oy,[Mn,Rn,[2,Fd],[2,Su],[2,Ay],Fl,rn,[2,zg]],null,null),Oo(335544320,1,{_control:0}),Oo(335544320,2,{_placeholderChild:0}),Oo(335544320,3,{_labelChild:0}),Oo(603979776,4,{_errorChildren:1}),Oo(603979776,5,{_hintChildren:1}),Oo(603979776,6,{_prefixChildren:1}),Oo(603979776,7,{_suffixChildren:1}),(t()(),Ts(13,16777216,null,1,8,"input",[["aria-label","Trouver un lieu"],["class","mat-input-element mat-form-field-autofill-control"],["matInput",""],["placeholder","Trouver un lieu"]],[[1,"autocomplete",0],[1,"role",0],[1,"aria-autocomplete",0],[1,"aria-activedescendant",0],[1,"aria-expanded",0],[1,"aria-owns",0],[2,"mat-input-server",null],[1,"id",0],[1,"placeholder",0],[8,"disabled",0],[8,"required",0],[8,"readOnly",0],[1,"aria-describedby",0],[1,"aria-invalid",0],[1,"aria-required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"focusin"],[null,"blur"],[null,"input"],[null,"keydown"],[null,"compositionstart"],[null,"compositionend"],[null,"focus"]],function(t,e,n){var i=!0;return"focusin"===e&&(i=!1!==io(t,14)._handleFocus()&&i),"blur"===e&&(i=!1!==io(t,14)._onTouched()&&i),"input"===e&&(i=!1!==io(t,14)._handleInput(n)&&i),"keydown"===e&&(i=!1!==io(t,14)._handleKeydown(n)&&i),"input"===e&&(i=!1!==io(t,15)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,15).onTouched()&&i),"compositionstart"===e&&(i=!1!==io(t,15)._compositionStart()&&i),"compositionend"===e&&(i=!1!==io(t,15)._compositionEnd(n.target.value)&&i),"blur"===e&&(i=!1!==io(t,19)._focusChanged(!1)&&i),"focus"===e&&(i=!1!==io(t,19)._focusChanged(!0)&&i),"input"===e&&(i=!1!==io(t,19)._onInput()&&i),i},null,null)),go(14,147456,null,0,ry,[Mn,ru,On,rn,Rn,sy,[2,Su],[2,Oy],[2,Ol],Lh],{autocomplete:[0,"autocomplete"]},null),go(15,16384,null,0,Up,[Pn,Mn,[2,Zp]],null,null),vo(1024,null,Hp,function(t,e){return[t,e]},[ry,Up]),go(17,540672,null,0,Pm,[[8,null],[8,null],[6,Hp],[2,Im]],{form:[0,"form"]},null),vo(2048,null,Wp,null,[Pm]),go(19,999424,null,0,Hy,[Mn,Fl,[6,Wp],[2,Tm],[2,Mm],yd,[8,null],Fy,rn],{placeholder:[0,"placeholder"]},null),go(20,16384,null,0,mm,[[4,Wp]],null,null),vo(2048,[[1,4]],Ly,null,[Hy]),(t()(),Ss(16777216,null,4,1,null,rb)),go(23,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(24,0,null,1,6,"mat-autocomplete",[["class","mat-autocomplete"]],null,[[null,"optionSelected"]],function(t,e,n){var i=!0;return"optionSelected"===e&&(i=!1!==t.component.addressSelectedChanged(n)&&i),i},sb,nb)),vo(6144,null,Od,null,[ey]),go(26,1097728,[["auto",4]],2,ey,[Rn,Mn,ty],null,{optionSelected:"optionSelected"}),Oo(603979776,8,{options:1}),Oo(603979776,9,{optionGroups:1}),(t()(),Ss(16777216,null,0,1,null,hb)),go(30,802816,null,0,sl,[On,An,ti],{ngForOf:[0,"ngForOf"]},null),(t()(),Ss(16777216,null,null,1,null,xb)),go(32,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null),(t()(),Ts(33,0,null,null,1,"div",[["id","geoloc-map-draw"],["leaflet",""],["style","height: 400px; min-height: 400px;"]],null,[[null,"leafletMapReady"],["window","resize"]],function(t,e,n){var i=!0,s=t.component;return"window:resize"===e&&(i=!1!==io(t,34).onResize()&&i),"leafletMapReady"===e&&(i=!1!==s.onMapReady(n)&&i),i},null,null)),go(34,606208,null,0,jm,[Mn,rn],{options:[0,"options"]},{mapReady:"leafletMapReady"}),(t()(),Ss(16777216,null,null,1,null,Lb)),go(36,16384,null,0,rl,[On,An],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,14,0,io(e,26)),t(e,17,0,n.geoSearchFormGroup.controls.placeInput),t(e,19,0,"Trouver un lieu"),t(e,23,0,n.isLoadingAddress),t(e,30,0,n.geoSearchResults),t(e,32,0,n.showLatLngElevationInputs),t(e,34,0,n.mapOptions),t(e,36,0,!n.showLatLngElevationInputs)},function(t,e){t(e,4,1,["standard"==io(e,5).appearance,"fill"==io(e,5).appearance,"outline"==io(e,5).appearance,"legacy"==io(e,5).appearance,io(e,5)._control.errorState,io(e,5)._canLabelFloat,io(e,5)._shouldLabelFloat(),io(e,5)._hideControlPlaceholder(),io(e,5)._control.disabled,io(e,5)._control.autofilled,io(e,5)._control.focused,"accent"==io(e,5).color,"warn"==io(e,5).color,io(e,5)._shouldForward("untouched"),io(e,5)._shouldForward("touched"),io(e,5)._shouldForward("pristine"),io(e,5)._shouldForward("dirty"),io(e,5)._shouldForward("valid"),io(e,5)._shouldForward("invalid"),io(e,5)._shouldForward("pending"),!io(e,5)._animationsEnabled]),t(e,13,1,[io(e,14).autocompleteAttribute,io(e,14).autocompleteDisabled?null:"combobox",io(e,14).autocompleteDisabled?null:"list",null==io(e,14).activeOption?null:io(e,14).activeOption.id,io(e,14).autocompleteDisabled?null:io(e,14).panelOpen.toString(),io(e,14).autocompleteDisabled||!io(e,14).panelOpen?null:null==io(e,14).autocomplete?null:io(e,14).autocomplete.id,io(e,19)._isServer,io(e,19).id,io(e,19).placeholder,io(e,19).disabled,io(e,19).required,io(e,19).readonly,io(e,19)._ariaDescribedby||null,io(e,19).errorState,io(e,19).required.toString(),io(e,20).ngClassUntouched,io(e,20).ngClassTouched,io(e,20).ngClassPristine,io(e,20).ngClassDirty,io(e,20).ngClassValid,io(e,20).ngClassInvalid,io(e,20).ngClassPending])})}var Sb=Ji({encapsulation:0,styles:[[""]],data:{}});function Tb(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"tb-geoloc-map",[],null,[[null,"location"]],function(t,e,n){var i=!0;return"location"===e&&(i=!1!==t.component.newLocation(n)&&i),i},kb,ob)),go(1,245760,null,0,Jm,[Nm,Qm,Xm,rn],{layersToAdd:[0,"layersToAdd"],geolocatedPhotoLatLng:[1,"geolocatedPhotoLatLng"],osmClassFilter:[2,"osmClassFilter"],allowEditDrawnItems:[3,"allowEditDrawnItems"],marker:[4,"marker"],polyline:[5,"polyline"],polygon:[6,"polygon"],latLngInit:[7,"latLngInit"],zoomInit:[8,"zoomInit"],getOsmSimpleLine:[9,"getOsmSimpleLine"],showLatLngElevationInputs:[10,"showLatLngElevationInputs"],elevationProvider:[11,"elevationProvider"],geolocationProvider:[12,"geolocationProvider"],mapQuestApiKey:[13,"mapQuestApiKey"]},{location:"location"})],function(t,e){var n=e.component;t(e,1,1,[n.layers_to_add,n.geolocated_photo_lat_lng,n._osm_class_filters,n.allow_edit_drawn_items,n._marker,n._polyline,n._polygon,n.lat_lng_init,n.zoom_init,n._get_osm_simple_line,n._show_lat_lng_elevation_inputs,n.elevation_provider,n.geolocation_provider,n.map_quest_api_key])},null)}var Ib=$s("app-root",aa,function(t){return Go(0,[(t()(),Ts(0,0,null,null,1,"app-root",[],null,null,null,Tb,Sb)),go(1,49152,null,0,aa,[],null,null)],null,null)},{layer:"layer",layers_to_add:"layers_to_add",geolocated_photo_lat_lng:"geolocated_photo_lat_lng",osm_class_filter:"osm_class_filter",allow_edit_drawn_items:"allow_edit_drawn_items",marker:"marker",polyline:"polyline",polygon:"polygon",zoom_init:"zoom_init",lat_init:"lat_init",lng_init:"lng_init",lat_lng_init:"lat_lng_init",get_osm_simple_line:"get_osm_simple_line",show_lat_lng_elevation_inputs:"show_lat_lng_elevation_inputs",elevation_provider:"elevation_provider",geolocation_provider:"geolocation_provider",map_quest_api_key:"map_quest_api_key"},{location:"location"},[]),Pb=function(t,e,n){return new class extends Xe{constructor(t,e,n){super(),this.moduleType=t,this._bootstrapComponents=e,this._ngModuleDefFactory=n}create(t){!function(){if(pr)return;pr=!0;const t=bn()?{setCurrentNode:Nr,createRootView:fr,createEmbeddedView:gr,createComponentView:yr,createNgModuleRef:vr,overrideProvider:Er,overrideComponentView:Cr,clearOverrides:Lr,checkAndUpdateView:Ir,checkNoChangesView:Pr,destroyView:Mr,createDebugContext:(t,e)=>new qr(t,e),handleEvent:Fr,updateDirectives:zr,updateRenderer:Vr}:{setCurrentNode:()=>{},createRootView:mr,createEmbeddedView:Wo,createComponentView:Yo,createNgModuleRef:ro,overrideProvider:qi,overrideComponentView:qi,clearOverrides:qi,checkAndUpdateView:er,checkNoChangesView:tr,destroyView:rr,createDebugContext:(t,e)=>new qr(t,e),handleEvent:(t,e,n,i)=>t.def.handleEvent(t,e,n,i),updateDirectives:(t,e)=>t.def.updateDirectives(0===e?Sr:Tr,t),updateRenderer:(t,e)=>t.def.updateRenderer(0===e?Sr:Tr,t)};Zi.setCurrentNode=t.setCurrentNode,Zi.createRootView=t.createRootView,Zi.createEmbeddedView=t.createEmbeddedView,Zi.createComponentView=t.createComponentView,Zi.createNgModuleRef=t.createNgModuleRef,Zi.overrideProvider=t.overrideProvider,Zi.overrideComponentView=t.overrideComponentView,Zi.clearOverrides=t.clearOverrides,Zi.checkAndUpdateView=t.checkAndUpdateView,Zi.checkNoChangesView=t.checkNoChangesView,Zi.destroyView=t.destroyView,Zi.resolveDep=To,Zi.createDebugContext=t.createDebugContext,Zi.handleEvent=t.handleEvent,Zi.updateDirectives=t.updateDirectives,Zi.updateRenderer=t.updateRenderer,Zi.dirtyParentQueries=Ro}();const e=ys(this._ngModuleDefFactory);return Zi.createNgModuleRef(this.moduleType,t||Nt.NULL,this._bootstrapComponents,e)}}(la,[],function(t){return function(t){const e={},n=[];let i=!1;for(let s=0;s<t.length;s++){const o=t[s];o.token===Ie&&(i=!0),1073741824&o.flags&&n.push(o.token),o.index=s,e[Ki(o.token)]=o}return{factory:null,providersByKey:e,providers:t,modules:n,isRoot:i}}([Fs(512,We,Ke,[[8,[Bd,Ib]],[3,We],Qe]),Fs(5120,ri,hi,[[3,ri]]),Fs(4608,Ja,tl,[ri,[2,Xa]]),Fs(4608,He,He,[]),Fs(5120,Oe,Re,[]),Fs(5120,ti,ai,[]),Fs(5120,ei,li,[]),Fs(4608,td,ed,[Ol]),Fs(6144,Ri,null,[td]),Fs(4608,Kc,Yc,[]),Fs(5120,Ec,function(t,e,n,i,s,o){return[new class extends Lc{constructor(t,e){super(t),this.ngZone=e,this.patchEvent()}patchEvent(){if(!Event||!Event.prototype)return;if(Event.prototype.__zone_symbol__stopImmediatePropagation)return;const t=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[Uc]=!0),t&&t.apply(this,arguments)}}supports(t){return!0}addEventListener(t,e,n){let i=n;if(!t[jc]||rn.isInAngularZone()&&!$c(e))t.addEventListener(e,i,!1);else{let n=Zc[e];n||(n=Zc[e]=Bc("ANGULAR"+e+"FALSE"));let s=t[n];const o=s&&s.length>0;s||(s=t[n]=[]);const r=$c(e)?Zone.root:Zone.current;if(0===s.length)s.push({zone:r,handler:i});else{let t=!1;for(let e=0;e<s.length;e++)if(s[e].handler===i){t=!0;break}t||s.push({zone:r,handler:i})}o||t[jc](e,qc,!1)}return()=>this.removeEventListener(t,e,i)}removeEventListener(t,e,n){let i=t[Hc];if(!i)return t.removeEventListener.apply(t,[e,n,!1]);let s=Zc[e],o=s&&t[s];if(!o)return t.removeEventListener.apply(t,[e,n,!1]);let r=!1;for(let a=0;a<o.length;a++)if(o[a].handler===n){r=!0,o.splice(a,1);break}r?0===o.length&&i.apply(t,[e,qc,!1]):t.removeEventListener.apply(t,[e,n,!1])}}(t,e),new Jc(n),new class extends Lc{constructor(t,e,n){super(t),this._config=e,this.console=n}supports(t){return!(!Wc.hasOwnProperty(t.toLowerCase())&&!this.isCustomEvent(t)||!window.Hammer&&(this.console.warn(`Hammer.js is not loaded, can not bind '${t}' event.`),1))}addEventListener(t,e,n){const i=this.manager.getZone();return e=e.toLowerCase(),i.runOutsideAngular(()=>{const s=this._config.buildHammer(t),o=function(t){i.runGuarded(function(){n(t)})};return s.on(e,o),()=>s.off(e,o)})}isCustomEvent(t){return this._config.events.indexOf(t)>-1}}(i,s,o)]},[Ol,rn,Ol,Ol,Kc,Be]),Fs(4608,Cc,Cc,[Ec,rn]),Fs(135680,Sc,Sc,[Ol]),Fs(4608,Oc,Oc,[Cc,Sc]),Fs(5120,wf,Rg,[]),Fs(5120,v_,Ng,[]),Fs(4608,ng,Og,[wf,v_]),Fs(5120,Tn,Fg,[Oc,ng,rn]),Fs(6144,kc,null,[Sc]),Fs(4608,pn,pn,[rn]),Fs(4608,fc,fc,[Ol]),Fs(4608,vc,vc,[Ol]),Fs(4608,ha,Lg,[Tn,dc]),Fs(4608,mp,fp,[Ol,ze,dp]),Fs(4608,_p,_p,[mp,pp]),Fs(5120,rp,function(t){return[t]},[_p]),Fs(4608,up,up,[]),Fs(6144,hp,null,[up]),Fs(4608,cp,cp,[hp]),Fs(6144,Zd,null,[cp]),Fs(4608,Hd,gp,[Zd,Nt]),Fs(4608,sp,sp,[Hd]),Fs(4608,ru,ru,[Yh,Xh,We,su,Qh,Nt,rn,Ol,Su]),Fs(5120,au,lu,[ru]),Fs(5120,jg,Hg,[ru]),Fs(4608,yd,yd,[]),Fs(5120,sy,oy,[ru]),Fs(4608,Eu,Eu,[]),Fs(5120,pu,mu,[ru]),Fs(5120,yy,vy,[ru]),Fs(4608,Kp,Kp,[]),Fs(4608,Nm,Nm,[]),Fs(1073742336,Al,Al,[]),Fs(1024,he,hd,[]),Fs(1024,De,function(t){return[function(t){return bc("probe",xc),bc("coreTokens",Object.assign({},wc,(t||[]).reduce((t,e)=>(t[e.name]=e.token,t),{}))),()=>xc}(t)]},[[2,wn]]),Fs(512,Ae,Ae,[[2,De]]),Fs(131584,kn,kn,[rn,Be,Nt,he,We,Ae]),Fs(1073742336,ui,ui,[kn]),Fs(1073742336,ud,ud,[[3,ud]]),Fs(1073742336,Vg,Vg,[]),Fs(1073742336,yp,yp,[]),Fs(1073742336,vp,vp,[]),Fs(1073742336,Tu,Tu,[]),Fs(1073742336,Fh,Fh,[]),Fs(1073742336,Zl,Zl,[]),Fs(1073742336,kh,kh,[]),Fs(1073742336,hu,hu,[]),Fs(1073742336,md,md,[[2,pd]]),Fs(1073742336,kd,kd,[]),Fs(1073742336,Td,Td,[]),Fs(1073742336,Nd,Nd,[]),Fs(1073742336,Ry,Ry,[]),Fs(1073742336,Zg,Zg,[]),Fs(1073742336,zy,zy,[]),Fs(1073742336,Zy,Zy,[]),Fs(1073742336,ay,ay,[]),Fs(1073742336,Qy,Qy,[]),Fs(1073742336,Lu,Lu,[]),Fs(1073742336,Ju,Ju,[]),Fs(1073742336,yu,yu,[]),Fs(1073742336,Jy,Jy,[]),Fs(1073742336,pv,pv,[]),Fs(1073742336,vv,vv,[]),Fs(1073742336,bv,bv,[]),Fs(1073742336,wv,wv,[]),Fs(1073742336,xy,xy,[]),Fs(1073742336,Ev,Ev,[]),Fs(1073742336,Cv,Cv,[]),Fs(1073742336,Hm,Hm,[]),Fs(1073742336,Zm,Zm,[]),Fs(1073742336,Fm,Fm,[]),Fs(1073742336,zm,zm,[]),Fs(1073742336,Vm,Vm,[]),Fs(1073742336,ef,ef,[]),Fs(1073742336,la,la,[Nt]),Fs(256,Ie,!0,[]),Fs(256,zg,"BrowserAnimations",[]),Fs(256,dp,"XSRF-TOKEN",[]),Fs(256,pp,"X-XSRF-TOKEN",[]),Fs(256,Xy,{separatorKeyCodes:[Ea]},[])])})}();(function(){if(yn)throw new Error("Cannot enable prod mode after platform setup.");gn=!1})(),ld().bootstrapModuleFactory(Pb).catch(t=>console.log(t))}},[[2,0]]]);
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/tb-geoloc/index.html
11,37 → 11,33
 
<body>
<script src="./tb-geoloc-lib-app.js"></script>
 
<form>
<div id="tb-map"></div>
<div style="display:inline-flex;flex-direction:row;margin:5px;padding:5px;justify-content:space-between;width:80%;border:2px solid grey;">
<input id="locality" type="text" placeholder="locality">
<input id="postcode" type="text" placeholder="postcode">
<input id="latitude" type="text" placeholder="latitude">
<input id="longitude" type="text" placeholder="longitude">
<input id="altitude" type="text" placeholder="altitude">
</div>
<tb-geolocation-element
id="tb-geolocation"
layer='opentopomap'
zoom_init="4"
lat_init="46.5"
lng_init="2.9"
marker="true"
polyline="false"
polygon="false"
show_lat_lng_elevation_inputs="false"
osm_class_filter=""
elevation_provider="mapquest"
map_quest_api_key="mG6oU5clZHRHrOSnAV0QboFI7ahnGg34"
>
</tb-geolocation-element>
<form style="display:inline-flex;flex-direction:row;margin:5px;padding:5px;justify-content:space-between;width:80%;border:2px solid grey;">
<input id="locality" type="text" placeholder="locality">
<input id="postcode" type="text" placeholder="postcode">
<input id="latitude" type="text" placeholder="latitude">
<input id="longitude" type="text" placeholder="longitude">
<input id="altitude" type="text" placeholder="altitude">
</form>
<script>
var map = document.createElement('tb-geolocation-element');
 
map.setAttribute('zoom_init', 8);
map.setAttribute('lat_init', 43.6);
map.setAttribute('lng_init', 3.8);
map.setAttribute('marker', true);
map.setAttribute('polyline', true);
map.setAttribute('polygon', false);
map.setAttribute('show_lat_lng_elevation_inputs', true);
map.setAttribute('osm_class_filter', '');
map.setAttribute('geometry_filter', ['linestring']);
map.setAttribute('elevation_provider', 'mapquest');
map.setAttribute('map_quest_api_key', 'mG6oU5clZHRHrOSnAV0QboFI7ahnGg34');
map.setAttribute('height', '400px');
document.getElementById('tb-map').append(map);
 
map.addEventListener("location", function(location) {
var tbGeolocation = document.getElementById('tb-geolocation');
tbGeolocation.addEventListener("location", function(location) {
console.log(location.detail);
document.getElementById('locality').value = location.detail.locality;
document.getElementById('postcode').value = location.detail.osmPostcode;
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/utils.js
New file
0,0 → 1,96
export const findFieldset = fieldIndex => $(`fieldset.new-field[data-id=${fieldIndex}]`);
// effet d'affichage
export const showField = $field => $field.hide().show(200);
export const hideNRemove = ($element, $elemenToRemove = $element) => $element.hide(200, () => {
$elemenToRemove.remove();
});
 
// JSON.stringify : Gestion des apostrophes dans les valeurs :
export const replacer = (key, value) => {
if ('fieldValues' === key && 'object' === typeof value) {
for (let i in value) {
if (typeof value[i] === 'string') {
// value[i] = value[i].replace( /\u0027/g, "&apos;&apos;" );
// La solution ci-dessus convient pour stockage dans la base mais pas pour la lecture dans saisie
// du coup astuce moisie:
value[i] = value[i].replace(/\u0027/g, "@apos@").replace(/\u0022/g, '@quot@')
}
}
} else if (typeof value === 'string') {
// value = value.replace( /\u0027/g, "&apos;&apos;" );
// La solution ci-dessus convient pour stockage dans la base mais pas pour la lecture dans saisie
// du coup astuce moisie:
value = value.replace(/\u0027/g, "@apos@").replace(/\u0022/g, '@quot@')
}
return value;
}
 
/**
* Permet à la fois de vérifier qu'une valeur ou objet existe et n'est pas vide
* et de comparer à une autre valeur :
* Vérifie qu'une variable ou objet n'est pas : vide, null, undefined, NaN
* Si comparer est défini on le compare à valeur en fonction de sensComparaison
* Un booléen est une variable valide : on retourne true
* @param { string || number || object || undefined } valeur
* @param { boolean } sensComparaison : true = rechercher, false = refuser
* @param { string || number || object || undefined || boolean } comparer :valeur à comparer
* @returns {boolean}
*/
export const valeurOk = (
valeur,
sensComparaison = true,
comparer = undefined
) => {
let retour;
 
if ('boolean' !== typeof valeur) {
switch(typeof valeur) {
case 'string' :
retour = ('' !== valeur);
break;
case 'number' :
retour = (NaN !== valeur);
break;
case 'object' :
retour = (null !== valeur && undefined !== valeur && !$.isEmptyObject(valeur));
if (retour && undefined !== valeur.length) {
retour = (retour && 0 < valeur.length);
}
break;
case 'undefined' :
default :
retour = false;
}
if (retour && comparer !== undefined) {
const resultComparaison = (comparer === valeur);
 
retour = (sensComparaison) ? resultComparaison : !resultComparaison;
}
return retour;
} else {
// Un booléen est une valeur valable
return true;
}
};
 
export const potDeMiel = () => {
const $submit = $('#signup_submit');
 
if (!valeurOk($('#basic-widget-form #email').val())) {
$submit.prop('disabled', false);
}
$submit.off().on('click dblclick mousedown submit focus keydown keypress keyup touchstart touchend', () => {
if (valeurOk($('#basic-widget-form #email').val())) {
return false;
}
});
$('#basic-widget-form #email').css({position: 'absolute', left: '-2000px'}).on('input blur change', function(event) {
event.preventDefault();
if (valeurOk($(this).val())) {
$('form').each(function() {
$(this)[0].reset();
});
$submit.prop('disabled', true);
}
});
};
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/preview.js
New file
0,0 → 1,750
import {findFieldset} from './utils.js';
 
// Variable permettant un seul affichage du titre
// de la prévisualisation pour les nouveaux champs
let firstClick = true;
 
/************************************************
* Fonction d'affichage des champs classiques *
************************************************/
 
// Prévisualisation
export const displayClassicFields = () => {
// Affichage du titre du widget
renderFields($('#titre'), $('.widget-renderer h1'));
// Affichage de la description
renderFields($('#description'), $('.preview-description'));
// Affichage referentiel
$('#label-taxon span').text(` (${$('#referentiel').val()})`);
$('#referentiel').change(function () {
$('#label-taxon span').text(` (${$(this).val()})`);
});
 
// Affichage du logo s'il existe déjà
if (0 !== $('#logo').val().length || $('#logo')[0].defaultValue) {
$('#preview-logo').append(
`<img src="${$('#group-settings-form .logo img').prop('src')}" width="75%">`
);
}
// Affichage du logo chargé
$('#logo.input-file').change(function(event) {
// Si le 'change' n'était pas une suppression
if ($.isEmptyObject(event.target.files[0])) {
$('#preview-logo img').remove();
// Si on a chargé un logo ou changé le fichier
} else {
$('#preview-logo').append(
`<img src="${URL.createObjectURL(event.target.files[0])}" width="75%">`
);
}
});
// Affichage de l'image de fond
$('#image_fond.input-file').on('change', evt => {
if (!$.isEmptyObject(evt.target.files[0])) {
$('.widget-renderer').css('background' ,`url(${URL.createObjectURL(evt.target.files[0])}) no-repeat fixed center center`);
} else {
$('.widget-renderer')[0].style.removeProperty('background');
}
});
}
 
// Affichage des infos dès que disponibles
// pour les champs classiques
const renderFields = ($source, $taget) => {
let text = new DOMParser().parseFromString($source.val(), 'text/html');
 
text = text.body.textContent || '';
if ($source.val()) {
$taget.text(text);
}
$source.on('change', () => $taget.text(text));
}
 
 
/*****************************************************
* Fonction d'affichage des champs supplémentaires *
*****************************************************/
// Prévisualisation des nouveaux champs
export const newFieldsPreview = function() {
const count = $('fieldset').last().data('id');
let $thisFieldset;
 
// Si on a déjà prévisualisé on efface tout pour recommencer
if (0 < $('.preview-fields').length) {
$('.preview-fields').each(function () {
$(this).remove();
});
}
// Au premier ajout d'un champ dans la prévisualisation on ajoute un titre et un message
if (true === firstClick) {
$('#zone-supp').prepend(
`<h2>Informations propres au projet</h2>
<div class="message">L’objectif principal de cet aperçu est de vérifier les contenus et repérer d’éventuelles erreurs</div>`
);
}
// Parcourir tous les blocs d'infos de champs supplémentaires
for(let index = $('fieldset').first().data('id'); index <= count; index++) {
$thisFieldset = findFieldset(index);
// Certains indices peuvent correspondre à un champ supprimé
if (0 < $($thisFieldset).length) {
// Prévisualisation d'un champ
$('#zone-supp .preview-container').append(
`<div class="preview-fields col-sm-12 row" data-id="${index}">
${onClickPreviewField($thisFieldset, index)}
</div>`
);
// Ajout/suppression d'un champ texte "Autre"
if ($('.option-other-value', $thisFieldset).is(':checked')) {
onOtherOption($thisFieldset, index);
}
}
}
// Le titre+message de la section prévisualisation ne sont ajoutés qu'une fois
firstClick = false;
};
 
// Construction des éléments à visualiser
const onClickPreviewField = (thisFieldset, index) => {
// Récupération des données
const fieldKey = $('.field-key' , thisFieldset).val() || '',//clé
fieldElement = $('.field-element' , thisFieldset).val() || '',//élément
// Champs à valeur numérique ou date
fieldStep = $('.step' , thisFieldset).val() || '',
fieldMin = $('.min' , thisFieldset).val() || '',
fieldMax = $('.max' , thisFieldset).val() || '',
// Champs "listes"
fieldDefaultNum = $('.default' , thisFieldset).val() || '',// value range/number par default
fieldOtherValue = $('.option-other-value', thisFieldset).is(':checked'),//option autre
fieldOptions = collectListOptions(thisFieldset);//Array: toutes les options
let fieldLabel = $('.field-name' , thisFieldset).val() || '',//nom
fieldTooltip = $('.field-description' , thisFieldset).val() || '',//info-bulle
fieldPlaceholder = $('.aide-saisie' , thisFieldset).val() || '';//placeholder
// Variables d'affichage
const count = fieldOptions.length,//nombre d'options, pour les boucles for
replaceQuotes = text => text.replace(/(')/gm, '&apos;').replace(/(")/gm, '&quot;');
let fieldHtml = '',//variable contenant tout le html à afficher
fieldOption;
 
// réafficher les apostrophes
$.each([fieldLabel,fieldTooltip,fieldPlaceholder], (i,fieldValue) => replaceQuotes(fieldValue));
 
//valeurs initiales des chaînes de caractères
//Éléments simples ou chaînes communes aux "listes"
let commonFieldsHtml = {//Éléments simples ou chaînes communes aux "listes"
dataIdAttr : ' data-id="'+index+'"',
helpButton : '',//bouton aide
helpClass : '',//classe de l'élément associé au bouton aide
titleAttr : '',//info-bulle
fieldInput : {//attributs de l'élément
typeAttr : ' type="'+fieldElement+'"',
nameAttr : ' name="'+fieldKey+'"',
classAttr : ' class="'+fieldKey+'"',
placeholderAttr : '',
mandatoryAttr : '',//required
otherAttr : ''
},
fieldLabel : {//attributs et contenu du label
labelContent : fieldLabel,//label
forAttr : ' for="'+fieldKey+'"',//attribut for
classAttr : '',//classe du label
otherAttr : ''//tous autres attributs
}
};
// Pour les éléments de listes (select, checkbox, etc.)
let listFieldsHtml = {//chaînes & html spécifiques aux listes
containerContent : fieldLabel,//les options peuvent avoir chacune un label
containerClass : '',//une classe pour le conteneur
forAttr : '',//correspond à l'id d'une checkbox/radio/list-checkbox
optionIdAttr : '',//value-id
defaultAttr : ''//default
};
// Changement d'un élément existant:
// supprimer le précédent pour ajouter le nouveau
if (0 < $('.preview-fields', thisFieldset).length) {
$('.preview-fields', thisFieldset).remove();
}
// Élément requis
if ($('.field-is_mandatory', thisFieldset).is(':checked')) {
// Attribut required pour le listes
commonFieldsHtml.fieldInput.mandatoryAttr = ' required="required"';
// Nom du champ (éléments listes)
listFieldsHtml.containerContent = '* '+listFieldsHtml.containerContent;
// Nom du champ (éléments simples)
commonFieldsHtml.fieldLabel.labelContent = '* '+commonFieldsHtml.fieldLabel.labelContent;
}
// Infobulle
if ('' !== fieldTooltip) {
commonFieldsHtml.titleAttr = ' title="'+fieldTooltip+'"';
}
// Placeholder
if ('' !== fieldPlaceholder) {
commonFieldsHtml.fieldInput.placeholderAttr = ' placeholder="'+fieldPlaceholder+'"';
}
// Fichier d'aide
if ('' !== $('.file-return.help-doc-'+index).text()) {
// Bouton 'aide'
commonFieldsHtml.helpButton = '<div class="help-button btn btn-outline-info btn-sm border-0"><i class="fas fa-info-circle"></i></div>';
// classe 'aide'
commonFieldsHtml.helpClass = ' and-help';
}
// html à ajouter en fonction de l'élément choisi
switch(fieldElement) {
case 'checkbox' :
case 'radio' :
listFieldsHtml.containerClass = ' class="'+fieldElement+'"';
commonFieldsHtml.fieldLabel.classAttr = ' class="radio-label"';
fieldHtml =
// Conteneur
'<div style="width:100%"'+
// Class="L'élément choisi"
listFieldsHtml.containerClass+
// DataId
commonFieldsHtml.dataIdAttr+
// Required
commonFieldsHtml.fieldInput.mandatoryAttr+
// Info bulle
commonFieldsHtml.titleAttr+
' >'+
// Nom du champ
// Classe 'and-help'
'<div class="mt-3 list-label'+commonFieldsHtml.helpClass+'">'+
// Label
listFieldsHtml.containerContent+
// Bouton 'help'
commonFieldsHtml.helpButton+
'</div>';
// On déroule les différentes valeurs
for( let i = 0; i < count; i++) {
fieldOption = fieldOptions[i];
// L'id de input
listFieldsHtml.inputIdAttr = ' id="'+fieldOption.optionValue+'"';
listFieldsHtml.forAttr = ' for="'+fieldOption.optionValue+'"';
// Default
listFieldsHtml.defaultAttr = '';//réinitialisation
if (fieldOption.isDefault) {//affectation
listFieldsHtml.defaultAttr = ' checked';
}
// L'indice de chaque option
// L'option "autre" n'en a pas
if ('' !== fieldOption.optionIndex) {
listFieldsHtml.optionIdAttr = ' value-id="'+fieldOption.optionIndex+'"';
}
 
fieldHtml +=
'<label'+
// For
listFieldsHtml.forAttr+
// value-id
listFieldsHtml.optionIdAttr+
// Class du label
commonFieldsHtml.fieldLabel.classAttr+
'>'+
'<input'+
// Type
commonFieldsHtml.fieldInput.typeAttr+
// Id
listFieldsHtml.inputIdAttr+
// DataId
commonFieldsHtml.dataIdAttr+
// value-id
listFieldsHtml.optionIdAttr+
// Name
commonFieldsHtml.fieldInput.nameAttr+
// Value
' value="'+replaceQuotes(fieldOption.optionValue)+
// Checked
listFieldsHtml.defaultAttr+
// Class="nom du champ"
commonFieldsHtml.fieldInput.classAttr+
'>'+
// Label de l'option
replaceQuotes(fieldOption.optionText)+
'</label>';
}
// Si valeur "autre" est cochée
if (fieldOtherValue) {
fieldHtml +=
'<label for="other"'+
commonFieldsHtml.dataIdAttr+
commonFieldsHtml.fieldLabel.classAttr+
'>'+
'<input'+
commonFieldsHtml.fieldInput.typeAttr+
' id="other-'+fieldElement+'-'+index+'"'+
commonFieldsHtml.fieldInput.nameAttr+
' value="other"'+
commonFieldsHtml.fieldInput.classAttr+
commonFieldsHtml.dataIdAttr+
'>'+
'Autre</label>';
}
// Fin du conteneur
fieldHtml += '</div>';
break;
 
case 'list-checkbox':
commonFieldsHtml.fieldLabel.classAttr = ' class="radio-label"';
fieldHtml =
// Classe 'and-help'
'<div class="multiselect add-field-select'+commonFieldsHtml.helpClass+'"'+
// DataId
commonFieldsHtml.dataIdAttr+
'>'+
'<label style="width:100%">'+
// Nom du champ
listFieldsHtml.containerContent+
// Bouton 'help'
commonFieldsHtml.helpButton+
'</label>'+
'<div class="mt-3">'+
'<div class="selectBox"'+
// DataId
commonFieldsHtml.dataIdAttr+
'>'+
'<select'+
// DataId
commonFieldsHtml.dataIdAttr+
// Required
commonFieldsHtml.fieldInput.mandatoryAttr+
// Info bulle
commonFieldsHtml.titleAttr+
// Class
' class="form-control custom-select '+fieldElement+'"'+
'>'+
// Apparait dans la barre de sélection
'<option>Plusieurs choix possibles</option>'+
'</select>'+
'<div class="overSelect"></div>'+
'</div>'+
'<div class="checkboxes hidden"'+
// DataId
commonFieldsHtml.dataIdAttr+
'>';
// On déroule les différentes valeurs
for( let i = 0; i < count; i++) {
fieldOption = fieldOptions[i];
// Type="checkbox"
commonFieldsHtml.fieldInput.typeAttr = ' type="checkbox"';
// Id
listFieldsHtml.inputIdAttr = ' id="'+replaceQuotes(fieldOption.optionValue).toLowerCase()+'"';
// For
listFieldsHtml.forAttr = ' for="'+replaceQuotes(fieldOption.optionValue).toLowerCase()+'"';
// Default
listFieldsHtml.defaultAttr = '';//réinitialisation
if (fieldOption.isDefault) {
listFieldsHtml.defaultAttr = ' checked';//affectation
}
// value-id
if ('' !== fieldOption.optionIndex) {
listFieldsHtml.optionIdAttr = ' value-id="'+fieldOption.optionIndex+'"';
}
 
fieldHtml +=
'<label'+
// For
listFieldsHtml.forAttr+
// value-id
listFieldsHtml.optionIdAttr+
// Class du label
commonFieldsHtml.fieldLabel.classAttr+
'>'+
'<input type="checkbox"'+
// Id
listFieldsHtml.inputIdAttr+
// value-id
listFieldsHtml.optionIdAttr+
// Name
commonFieldsHtml.fieldInput.nameAttr+
// Value
' value="'+replaceQuotes(fieldOption.optionValue)+'"'+
// Checked
listFieldsHtml.defaultAttr+
// Class="nom du champ"
commonFieldsHtml.fieldInput.classAttr+
// DataId
commonFieldsHtml.dataIdAttr+
'>'+
// Label de l'option
replaceQuotes(fieldOption.optionText)+
'</label>';
}
// Si valeur "autre" est cochée
if (fieldOtherValue) {
fieldHtml +=
'<label for="other"'+
// DataId
commonFieldsHtml.dataIdAttr+
'>'+
'<input type="checkbox"'+
' id="other-'+fieldElement+'-'+index+'"'+
commonFieldsHtml.fieldInput.nameAttr+
' value="other"'+
commonFieldsHtml.fieldInput.classAttr+
// DataId
commonFieldsHtml.dataIdAttr+
'>'+
'Autre</label>';
}
// Fermeture des conteneurs .multiselect .checkboxes
fieldHtml +=
'</div>'+
'</div>'+
'</div>';
break;
 
case 'select':
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
commonFieldsHtml.fieldInput.classAttr += ' form-control custom-select"';
fieldHtml =
// Conteneur/Wrapper
// +Classe 'and-help'
'<div class="add-field-select '+fieldElement+commonFieldsHtml.helpClass+'"'+
// DataID
commonFieldsHtml.dataIdAttr+
'>'+
'<label class="mt-3" style="width:100%"'+
commonFieldsHtml.fieldLabel.forAttr+
// Info bulle
commonFieldsHtml.titleAttr+
'>'+
// Nom du champ
listFieldsHtml.containerContent+
// Bouton 'help'
commonFieldsHtml.helpButton+
'</label>'+
'<select'+
commonFieldsHtml.fieldInput.nameAttr+
' id="'+fieldKey+'"'+
// Class
commonFieldsHtml.fieldInput.classAttr+
// Required
commonFieldsHtml.fieldInput.mandatoryAttr+
// DataId
commonFieldsHtml.dataIdAttr+
'>';
 
// On déroule les différentes valeurs
for( let i = 0; i < count; i++) {
fieldOption = fieldOptions[i];
// Default
listFieldsHtml.defaultAttr = '';//réinitialisation
if (fieldOption.isDefault) {//affectation
listFieldsHtml.defaultAttr = ' selected="selected"';
}
// value-id
if ('' !== fieldOption.optionIndex) {
listFieldsHtml.optionIdAttr = ' value-id="'+fieldOption.optionIndex+'"';
}
 
fieldHtml +=
'<option'+
// Value
' value="'+replaceQuotes(fieldOption.optionValue)+'"'+
// Value-id
listFieldsHtml.optionIdAttr+
// Selected
listFieldsHtml.defaultAttr+
'>'+
// Option
replaceQuotes(fieldOption.optionText)+
'</option>';
}
// Si valeur "autre" est cochée
if (fieldOtherValue) {
fieldHtml +=
'<option class="other" value="other"'+commonFieldsHtml.dataIdAttr+'>'+
'Autre'+
'</option>';
}
// Fermeture des conteneurs
fieldHtml +=
'</select>'+
// Fin du conteneur/wrapper
'</div>';
break;
 
case 'textarea':
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'custom-range'
commonFieldsHtml.fieldInput.classAttr += ' form-control"';
// Classe 'and-help'
commonFieldsHtml.fieldLabel.classAttr = ' class="mt-3 '+commonFieldsHtml.helpClass+'"';
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr += ' id="'+fieldKey+'"';
 
fieldHtml =
'<label style="width:100%"'+
// For
commonFieldsHtml.fieldLabel.forAttr+
// Class
commonFieldsHtml.fieldLabel.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr+
'>'+
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent+
// Bouton 'help'
commonFieldsHtml.helpButton+
'</label>'+
'<textarea'+
// Name
commonFieldsHtml.fieldInput.nameAttr+
// DataId
commonFieldsHtml.dataIdAttr+
// Class
commonFieldsHtml.fieldInput.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Info-bulle
commonFieldsHtml.fieldInput.placeholderAttr+
// Required
commonFieldsHtml.fieldInput.mandatoryAttr+
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr+
'></textarea>';
break;
 
case 'range':
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'custom-range'
commonFieldsHtml.fieldInput.classAttr += ' custom-range form-control pl-3"';
// Classe 'and-help'
commonFieldsHtml.fieldLabel.classAttr = ' class="mt-3 '+commonFieldsHtml.helpClass+'"';
// Step
if ('' !== fieldStep) {
commonFieldsHtml.fieldInput.otherAttr += ' step="'+fieldStep+'"';
}
// Min
if ('' !== fieldMin) {
commonFieldsHtml.fieldInput.otherAttr += ' min="'+fieldMin+'"';
}
//Max
if ('' !== fieldMax) {
commonFieldsHtml.fieldInput.otherAttr += ' max="'+fieldMax+'"';
}
fieldHtml =
'<div'+
' class="range"'+
' id="'+fieldKey+'"'+
'>'+
'<label style="width:100%"'+
// For
commonFieldsHtml.fieldLabel.forAttr+
// Class
commonFieldsHtml.fieldLabel.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr+
'>'+
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent+
// Bouton 'help'
commonFieldsHtml.helpButton+
'</label>'+
'<div class="col-sm-12 row" style="max-width=100%">'+
// Visualiser min max et la valeur de range
'<p class="col-sm-2 range-values text-center font-weight-bold">'+
'Min '+fieldMin+
'</p>'+
'<div class="range-live-value range-values text-center font-weight-bold col-sm-7">'+
fieldDefaultNum+
'</div>'+
'<p class="col-sm-2 range-values text-center font-weight-bold">'+
'Max '+fieldMax+
'</p>'+
 
'<input'+
// Type
commonFieldsHtml.fieldInput.typeAttr+
// Name
commonFieldsHtml.fieldInput.nameAttr+
// DataId
commonFieldsHtml.dataIdAttr+
// Class
commonFieldsHtml.fieldInput.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Required
commonFieldsHtml.fieldInput.mandatoryAttr+
// Default
' value="'+fieldDefaultNum+'"'+
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr+
'>'+
'</div>'
'</div>';
break;
 
case 'number':
// Step
if ('' !== fieldStep) {
commonFieldsHtml.fieldInput.otherAttr += ' step="'+fieldStep+'"';
}
case 'date':
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'and-help'
commonFieldsHtml.fieldInput.classAttr += commonFieldsHtml.helpClass+' form-control"';
// Min
if ('' !== fieldMin) {
commonFieldsHtml.fieldInput.otherAttr += ' min="'+fieldMin+'"';
}
// Max
if ('' !== fieldMax) {
commonFieldsHtml.fieldInput.otherAttr += ' max="'+fieldMax+'"';
}
// Class du label
commonFieldsHtml.fieldLabel.classAttr = 'class="mt-3"';
fieldHtml =
'<div class="number">'+
'<label style="width:100%"'+
// For
commonFieldsHtml.fieldLabel.forAttr+
// Class
commonFieldsHtml.fieldLabel.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr+
'>'+
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent+
// Bouton 'help'
commonFieldsHtml.helpButton+
'</label>'+
'<input'+
// Type
commonFieldsHtml.fieldInput.typeAttr+
// Name
commonFieldsHtml.fieldInput.nameAttr+
// DataId
commonFieldsHtml.dataIdAttr+
// Class
commonFieldsHtml.fieldInput.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Placeholder
commonFieldsHtml.fieldInput.placeholderAttr+
// Required
commonFieldsHtml.fieldInput.mandatoryAttr+
// Default
' value="'+fieldDefaultNum+'"'+
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr+
'>'+
'</div>';
break;
 
case 'text' :
case 'email':
default:
// Ouvrir l'attribut class (suppression de '"')
commonFieldsHtml.fieldInput.classAttr = commonFieldsHtml.fieldInput.classAttr.slice(0, -1);
// Classe 'and-help'
commonFieldsHtml.fieldInput.classAttr += commonFieldsHtml.helpClass+' form-control"';
// Class du label
commonFieldsHtml.fieldLabel.classAttr = 'class="mt-3"';
 
fieldHtml =
'<label style="width:100%"'+
// For
commonFieldsHtml.fieldLabel.forAttr+
// Class
commonFieldsHtml.fieldLabel.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Autres attributs
commonFieldsHtml.fieldLabel.otherAttr+
'>'+
// Nom du champ
commonFieldsHtml.fieldLabel.labelContent+
// Bouton 'help'
commonFieldsHtml.helpButton+
'</label>'+
'<input'+
// Type
commonFieldsHtml.fieldInput.typeAttr+
// Name
commonFieldsHtml.fieldInput.nameAttr+
// DataId
commonFieldsHtml.dataIdAttr+
// Class
commonFieldsHtml.fieldInput.classAttr+
// Info-bulle
commonFieldsHtml.titleAttr+
// Placeholder
commonFieldsHtml.fieldInput.placeholderAttr+
// Required
commonFieldsHtml.fieldInput.mandatoryAttr+
// Autres attributs
commonFieldsHtml.fieldInput.otherAttr+
'>';
break;
}
return fieldHtml;
}
 
// Construire un tableau des options pour chaque élément de listes
const collectListOptions = thisFieldset => {
const $details = $('.field-details', thisFieldset),
options = [];
 
$details.find('.new-value').each(function () {
options.push({
// Valeur transmise (value)
optionValue : $(this).find('.list-value').val().toLowerCase(),
// Valeur Visible
optionText : $(this).find('.displayed-label').val(),
// Booléen "default"
isDefault : $(this).find('.is-defaut-value').is(':checked'),
// Indice de l'option
optionIndex : $(this).data('list-value-id')
});
});
return options;
}
 
// Faire apparaitre un champ text "Autre"
const onOtherOption = ($thisFieldset , index) => {
// L'élément choisi
const element = $('.field-element', $thisFieldset).val(),
thisPreviewFieldset = $(`.preview-fields[data-id=${index}]`),
// html du champ "Autre"
collectOther =
`<div class="col-sm-12 mt-1 collect-other-block">
<label data-id="${index}" for="collect-other" style="font-weight:300">Autre option :</label>
<input type="text" name="collect-other" data-id="${index}" class="collect-other form-control">
</div>`,
hasCheckboxes = ['list-checkbox','checkbox'].includes(element),
eventType = hasCheckboxes ? 'click' : 'change';
let fieldSelector = 'input';
 
if('select' === element) {
fieldSelector = 'select';
} else if (hasCheckboxes) {
fieldSelector += `#other-${element}-${index}`;
}
 
const $field = $(fieldSelector, thisPreviewFieldset);
 
$field.on(eventType, function() {
const hasOtherOption = hasCheckboxes ? ($field.is(':checked')) : ('other' === $field.val());
 
if (hasOtherOption) {
// Insertion du champ "Autre" après les boutons
if ('list-checkbox' === element) {
$('.checkboxes', thisPreviewFieldset).append(collectOther);
} else {
$('.'+element, thisPreviewFieldset).after(collectOther);
}
} else {
// Suppression du champ autre
$('.collect-other-block', thisPreviewFieldset).remove();
}
});
};
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/ChampsSupp.js
New file
0,0 → 1,727
import {inputFile} from './display.js';
import {findFieldset, showField, hideNRemove, replacer, valeurOk} from './utils.js';
import {newFieldsPreview} from './preview.js';
import {onChangeCheckKeyUnique, missingValuesClass} from './validation.js';
 
// Tableau d'envoi des données
const datasToSubmit = [],
datePattern = '(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)',
isModification = Array.isArray(CHAMPS_SUPP_JSON) && 0 < CHAMPS_SUPP_JSON.length;
 
/**
* ChampsSupp
*/
export function ChampsSupp() {
this.fieldIndex = -1;
}
 
ChampsSupp.prototype.init = function() {
// Ajout de nouveaux champs
$('#add-fields').on('click', this.onClickAddNewFields.bind(this));
// Activation/Desactivation des boutons valider et prévisualiser
this.onClickButtonsTagMissingValues();
// Activer la checkbox de valeur par default uniquement si une valeur est entrée
this.onInputListValueLabelEnableDefaultCheckbox();
// Modifications
this.onExtentedFieldsForModification();
};
 
/***********************************************************
* Fonctions pour la création des champs supplémentaires *
***********************************************************/
 
// Logique globale pour l'ajout de nouveaux champs
ChampsSupp.prototype.onClickAddNewFields = function() {
this.fieldIndex++;
this.dataIdAttr = `data-id="${this.fieldIndex}"`;
// Affichage du formulaire pour un champ
this.displayNewField();
// Affichage du nom du champ
this.onChangeDisplayFieldLabel();
// Empêcher de créer plus d'une fois la même clé
onChangeCheckKeyUnique();
// Affichage des images/nom des documents importés dans les champs ajoutés
inputFile();
// Recueil des informations correspondantes au nouveau champ
this.onChangeFieldTypeCollectDetails();
// Suppression d'un champ
this.onClickRemoveField();
};
 
// Création/affichage du formulaire d'un nouveau champ
ChampsSupp.prototype.displayNewField = function() {
const fieldsetHtml = `<fieldset ${this.dataIdAttr} class="new-field"></fieldset>`,
fieldsetHtmlContent =
`<h3>Nouveau champ :<br><strong class="field-title" ${this.dataIdAttr}></strong></h3>
<!-- Nom du champ -->
<div class="row">
<div class="col-sm-12 mt-3 mb-3">
<label for="field-name" title="Donnez un titre à votre champ">Nom du champ *</label>
<input type="text" name="field-name" ${this.dataIdAttr} class="field-name form-control" placeholder="Titre de votre champ" title="Le titre du champ" required>
</div>
<!-- Clé du champ -->
<div class="col-sm-12 mt-3 mb-3">
<label for="field-key" title="Nom du champ dans la base de données">
Clé du champ *
</label>
<input type="text" name="field-key" ${this.dataIdAttr} class="field-key form-control" placeholder="Clé du champ" pattern="^(?:[a-z]+(?:(?:[A-Z]+[a-z]+)+)?|[a-z]+(?:(?:-[a-z]+)+)?)$" title="Clé Unique en Camelcase ou minuscule séparés par tirets, pas d’accents pas de caractères spéciaux." required>
</div>
<p class="message m-2">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Une clé doit être unique<br>
En "camelCase" (ecriture chameau)<br>
Ou en minuscule avec tirets ("-") si nécessaire<br>
Pas d’espaces, aucuns caractères spéciaux (accents, cédilles, etc.).
</p>
<!-- Type de champ -->
<div class="col-sm-12 mt-3 mb-3 add-field-select" ${this.dataIdAttr}>
<label for="field-element" title="Quel type de champ">Type de champ *</label>
<select name="field-element" ${this.dataIdAttr} class="field-element form-control custom-select">
<option value="text">Champ texte</option>
<option value="email">Champ email</option>
<option value="textarea">Champ rédaction</option>
<option value="select">Menu déroulant</option>
<option value="checkbox">Cases à cocher</option>
<option value="list-checkbox">Liste de cases à cocher</option>
<option value="radio">Boutons radio</option>
<option value="date">Calendrier</option>
<option value="range">Curseur (entre 2 bornes)</option>
<option value="number">Nombre</option>
</select>
</div>
<!-- Checkbox "champ requis" -->
<div class="col-sm-12 radio mt-3 mb-3">
<label class="radio-label" for="field-is_mandatory" title="Ce champ est obligatoire">
<input type="checkbox" name="field-is_mandatory" ${this.dataIdAttr} class="field-is_mandatory form-control">
Champ requis ?
</label>
</div>
<!-- Unité des valeurs -->
<div class="col-sm-12 mt-3 mb-3">
<label for="field-unit" title="Unité de mesure de vos valeurs">Unités (cm, kg, ha, etc.)</label>
<input type="text" name="field-unit" ${this.dataIdAttr} class="field-unit form-control" placeholder="symbole de vos unités">
</div>
<!-- Tooltip -->
<div class="col-sm-12 mt-3 mb-3">
<label for="field-description" title="Ajoutez une info-bulle">Info-bulle</label>
<input type="text" name="field-description" ${this.dataIdAttr} class="field-description form-control" placeholder="Quelques mots">
</div>
<!-- Import d'une image d'aide à afficher en popup -->
<div class="input-file-row row">
<div class="input-file-container col-sm-10">
<input type="file" class="input-file field-help" name="field-help${this.fieldIndex}" ${this.dataIdAttr} id="help-doc-${this.fieldIndex}" accept="image/*">
<label for="field-help${this.fieldIndex}" class="label-file"><i class="fas fa-download"></i> Popup aide image (.jpg)</label>
</div>
<div class="btn btn-danger btn-sm remove-file" name="remove-file" ${this.dataIdAttr} title="Supprimer le fichier"><i class="fas fa-times" aria-hidden="true"></i></div>
<div class="file-return help-doc-${this.fieldIndex} hidden"></div>
</div>
<!-- Boutons supprimer -->
<div class="col-sm-12 mt-3 mb-3">
<label for="remove-field">Supprimer</label>
<div class="remove-field button" name="remove-field" ${this.dataIdAttr} title="Supprimer un champ"><i class="fa fa-skull" aria-hidden="true"></i></div>
</div>
<input type="hidden" name="field-is_visible" class="field-is_visible" ${this.dataIdAttr} value="1">
</div>`;
 
$('#new-fields').append(fieldsetHtml);
 
const $fieldset = findFieldset(this.fieldIndex);
 
// Insertion du contenu html du formulaire du nouveaux champs inséré dans le dom
$fieldset.append(fieldsetHtmlContent);
// Animation de l'affichage
if (!isModification) {
showField($fieldset);
$('html, body').stop().animate({
scrollTop: $fieldset.offset().top
}, 300);
}
this.$fieldset = $fieldset;
};
 
// Affichage du nom du champ dès qu'il est renseigné
ChampsSupp.prototype.onChangeDisplayFieldLabel = function() {
const $fieldset = this.$fieldset;
 
$('.field-name', $fieldset).on('change', function () {
$('.field-title', $fieldset).text($(this).val());
});
};
 
// Supprimer un nouveau champ
ChampsSupp.prototype.onClickRemoveField = function() {
$('.remove-field').click(function () {
const $fieldset = $(this).closest('fieldset'),
fieldIndex = $fieldset.data('id');
 
$fieldset.hide(200, function () {
if (!CHAMPS_SUPP_JSON[fieldIndex]) {
$fieldset.remove();
} else {
if (0 === $('#info-suppression-champs-supp').length) {
$('#infos-validation-boutons').after(
`<p id="info-suppression-champs-supp" class="message invalid">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
vous avez supprimé un ou plusieurs champs supplémentaires ici<br>
Lorsque vous aurez fini de saisir/modifier/supprimer vos champs suppléménetaires, pensez à cliquer sur le bouton <i class="fa fa-bolt" aria-hidden="true" style="color:#B3C954"></i> "Valider", même si vous les avez tous supprimés, sans quoi ces changements ne seront pas pris en compte.
</p>`
);
}
$('.field-is_visible', $fieldset).val(0);
}
});
});
};
 
/**** Recueil des informations et détails qui dépendent du type de champ choisi ****/
 
// Logique de recueil d'informations en fonction du type de champ choisi
ChampsSupp.prototype.onChangeFieldTypeCollectDetails = function() {
const lthis = this,
placeholderFieldHtml =
`<div class="col-sm-12 mt-3">
<label for="aide-saisie" title="Deux ou 3 mots ou chiffres pour comprendre ce que doit contenir ce champ (ex: min 20, 10 par 10, etc.)">Texte d’aide à la saisie</label>
<input type="text" name="aide-saisie" ${this.dataIdAttr} class="aide-saisie form-control" placeholder="Ce que doit contenir ce champ">
</div>`,
$element = $('.field-element', this.$fieldset);
 
// On insère les champs par défaut de recueil d'informations
this.displayFieldDetailsCollect(placeholderFieldHtml);
// Sinon :
$element.on('change', function() {
const selectedItem = this.value;
// On intialise l'index pour les listes la variable qui contiendra un id pour chaque option
let valueIndex = 0,
fieldDetails = placeholderFieldHtml;
 
// Si on hésite on qu'on se trompe dans la liste :
// les champs de détails de l'option précédente doivent être supprimés
hideNRemove($('.field-details', lthis.$fieldset));
// Html de recueil de données en fonction de l'élément choisi
switch(selectedItem) {
case 'range':
case 'number':
fieldDetails =
`<p class="message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Ne pas oublier de prévisualiser !!<br>
Vérifier le bon fonctionnement et changer, si nécessaire, les valeurs de défaut, incrémentation (step), min et max.<br>
Si le navigateur considère que certaines valeurs sont incohérentes il pourrait les modifier automatiquement
</p>
<!-- Placeholder -->
${placeholderFieldHtml}
<!-- Valeur par défaut -->
<div class="col-sm-12 mt-3">
<label for="default" title="Valeur par défaut">Valeur par défaut</label>
<input type="number" name="default" ${lthis.dataIdAttr} class="default form-control" step="0.01" lang="en">
</div>
<!-- Incrémentation ( attribut step="" ) -->
<div class="col-sm-12 mt-3">
<label for="step" title="De 10 en 10, de 0.5 en 0.5, etc.">Incrémentation (step)</label>
<input type="number" name="step" ${lthis.dataIdAttr} class="step form-control" step="0.01" value="1" lang="en">
</div>
<!-- Min -->
<div class="col-sm-12 mt-3">
<label for="min" title="valeur min">Valeur minimale</label>
<input type="number" name="min" ${lthis.dataIdAttr} class="min form-control" step="0.01" value="0" lang="en">
</div>
<!-- Max -->
<div class="col-sm-12 mt-3">
<label for="max" title="valeur max">Valeur maximale</label>
<input type="number" name="max" ${lthis.dataIdAttr} class="max form-control" step="0.01" value="1" lang="en">
</div>`;
break;
 
case 'date':
fieldDetails =
`<!-- Date min -->
<div class="col-sm-12 mt-3">
<label for="min" title="date min">Date minimale</label>
<input type="date" name="min" ${lthis.dataIdAttr} class="min form-control" pattern="${datePattern}" title="jj/mm/aaaa">
</div>
<!-- Date max -->
<div class="col-sm-12 mt-3">
<label for="max" title="date max">Date maximale</label>
<input type="date" name="max" ${lthis.dataIdAttr} class="max form-control" pattern="${datePattern}" title="jj/mm/aaaa">
</div>`;
break;
 
case 'select':
case 'checkbox':
case 'list-checkbox':
case 'radio':
const mayHavePlaceholder = ['select', 'list-checkbox'].includes(selectedItem);
let additionnalMessage = '',
required = 'required',
asterisk = ' *';
 
if (mayHavePlaceholder) {
additionnalMessage =
`<br><i class="fas fa-info-circle" style="color:#009fb8"></i>
Si aucune valeur n’est indiquée pour la première option,
<br>celle-ci servira de placeholder (indication affichée dans le champ),
<br>et n’apparaitra pas dans les options à choisir/cocher.
<br><i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Dans ce cas il est impossible de choisir une "valeur par defaut"`;
required = '';
asterisk = '';
}
 
fieldDetails =
`<p class="message element-message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Entrez au moins une valeur de ${$element.children('option:selected').text()}
<br>Si aucun label à afficher n’est indiqué, la valeur entrée sera utilisée (première lettre en majuscule).
${additionnalMessage}
</p>
<!-- Première option -->
<div class="new-value center-block row" data-list-value-id="${valueIndex}">
<!-- Recueil d'une valeur de la liste -->
<div class="col-sm-12 mt-3">
<label for="list-value">Valeur${asterisk}</label>
<input type="text" name="list-value" ${lthis.dataIdAttr} class="list-value form-control" data-list-value-id="${valueIndex}" placeholder="Une des valeurs de la liste" ${required}>
</div>
<!-- Recueil du label à afficher -->
<div class="col-sm-12 mt-3">
<label for="displayed-label">Label</label>
<input type="text" name="displayed-label" ${lthis.dataIdAttr} class="displayed-label form-control" data-list-value-id="${valueIndex}" placeholder="Label à afficher">
</div>
<!-- Checkbox valeur par défaut -->
<div class="col-sm-12 radio mt-3">
<label for="is-defaut-value" title="Ceci est la valeur par défaut" class="radio-label">
<input type="checkbox" name="is-defaut-value" ${lthis.dataIdAttr} class="is-defaut-value" checked="checked" data-list-value-id="${valueIndex}" disabled >
Valeur par défaut
</label>
</div>
</div>
<!-- Bouton ajout d'une valeur à la liste -->
<div class="col-sm-12 mt-3 add-value-container" ${lthis.dataIdAttr}>
<label for="add-value" class="add-value" ${lthis.dataIdAttr} title="Ajouter une valeur à la liste">Ajouter une valeur</label>
<div class="button add-value-button" name="add-value" ${lthis.dataIdAttr} title="Ajouter une valeur à la liste"><i class="fa fa-puzzle-piece" aria-hidden="true"></i></div>
</div>
<!-- checkbox ajouter une valeur "Autre:" -->
<div class="col-sm-12 radio mt-3">
<label for="option-other-value" title="Ajouter une option \"Autre:\" à la fin" class="radio-label">
<input type="checkbox" name="option-other-value" ${lthis.dataIdAttr} class="option-other-value" title="Ajouter une option \"Autre\" à la fin">
Valeur "Autre"
</label>
</div>`;
break;
 
// case 'email':
// case 'text':
// case 'textarea':
default:
break;
}
lthis.displayFieldDetailsCollect(fieldDetails);
// Ajout des valeurs possibles
// lorsque le champ est une liste ou case à cocher
lthis.onClickAddNewValueToList(valueIndex);
});
};
 
// Insertion dans le dom des champs de recueil d'informations
ChampsSupp.prototype.displayFieldDetailsCollect = function(fieldDetails) {
const $detailsCollect = $('.add-field-select', this.$fieldset);
 
$detailsCollect.after(`<div class="field-details col-sm-11 mt-3 row" ${this.dataIdAttr}>${fieldDetails}</div>`);
showField($detailsCollect);
};
 
/**** Ajout des valeurs (options) des "champs de listes" (select, checkbox, radio, etc.) ****/
 
// Ajout des options des listes (deroulantes, cases à cocher etc.)
ChampsSupp.prototype.onClickAddNewValueToList = function(valueIndex) {
const lthis = this,
$addValueContainer = $('.add-value-container', this.$fieldset);
 
$('.add-value-button', this.$fieldset).click(function() {
valueIndex++;
$addValueContainer.before(
`<div class="new-value center-block row" data-list-value-id="${valueIndex}">
<!-- Recueil d'une valeur de la liste -->
<div class="col-sm-12 mt-3">
<label for="list-value">Valeur *</label>
<input type="text" name="list-value" ${lthis.dataIdAttr} class="list-value form-control" data-list-value-id="${valueIndex}" placeholder="Une des valeurs de la liste" required>
</div>
<!-- Recueil du label à afficher -->
<div class="col-sm-12 mt-3">
<label for="displayed-label">Label</label>
<input type="text" name="displayed-label" ${lthis.dataIdAttr} class="displayed-label form-control" data-list-value-id="${valueIndex}" placeholder="Label à afficher">
</div>
<!-- Checkbox valeur par défaut+bouton supprimer -->
<div class="col-sm-12 mt-3 row">
<!-- Bouton supprimer une option -->
<div class="col-sm-5">
<div class="remove-value button" name="remove-value" ${lthis.dataIdAttr} data-list-value-id="${valueIndex}" title="Supprimer une valeur"><i class="fa fa-trash" aria-hidden="true"></i></div>
</div>
<!-- Valeur par défaut -->
<div class="col-sm-7 radio">
<label for="is-defaut-value" title="Ceci est la valeur par défaut" class="radio-label">
<input type="checkbox" name="is-defaut-value" ${lthis.dataIdAttr} class="is-defaut-value" title="entrez une valeur pour activer cette case" data-list-value-id="${valueIndex}" disabled >
Valeur défaut
</label>
</div>
</div>
</div>`
);
showField($addValueContainer);
// Une seule valeur par défaut pour select et radio
lthis.onClickDefaultValueRemoveOthers();
// Supprimer une valeur
lthis.onClickRemoveListValue();
});
};
 
// Activer la checkbox de valeur par default uniquement si une valeur est entrée
ChampsSupp.prototype.onInputListValueLabelEnableDefaultCheckbox = function() {
$('#new-fields').on('input blur', '.list-value', function () {
const $fieldset = findFieldset($(this).data('id')),
$firstDefautValue = $('.is-defaut-value', $fieldset).first();
 
if ('' === $('.list-value', $fieldset).first().val()) {
$('.is-defaut-value', $fieldset).attr('disabled', true).removeAttr('checked');
$firstDefautValue.attr('checked', true).prop('checked',true);
 
} else {
$('.is-defaut-value', $fieldset).each(function () {
const $thisListValue = $(`.list-value[data-list-value-id=${$(this).data('list-value-id')}]`, $fieldset);
 
if ('' !== $thisListValue.val()) {
$(this).removeAttr('disabled');
} else {
$(this).attr('disabled', true).removeAttr('checked');
}
});
}
});
};
 
// Pour les éléments "select" et "radio" il ne peut y avoir qu'une valeur par défaut cochée
ChampsSupp.prototype.onClickDefaultValueRemoveOthers = function() {
const lthis = this,
selectedFieldElement = $('.field-element', this.$fieldset).val();
 
if (selectedFieldElement === 'select' || selectedFieldElement === 'radio') {
$('.is-defaut-value', this.$fieldset).click(function () {
if ($(this).is(':checked')) {
// Décocher tous les autres
$('.is-defaut-value:checked', lthis.$fieldset).not($(this)).removeAttr('checked');
}
});
}
};
 
// Bouton supprimer une valeur
ChampsSupp.prototype.onClickRemoveListValue = function() {
$('.remove-value.button', this.$fieldset).off('click').on('click', function () {
hideNRemove($('.new-value[data-list-value-id='+$(this).data('list-value-id')+']'));
});
};
 
/**** Envoi des nouveaux champs ****/
 
// Enregistrement des valeurs à transmettre
ChampsSupp.prototype.onClickStoreNewFields = function() {
const count = $('fieldset').last().data('id'),
$submitButton = $('#submit-button');
// Lorsqu'on valide
let resultArrayIndex = 0,
newHelpFileExists = false;
 
// Savoir si au moins un fichier "aide" est enregistré
$('.field-help').each(function () {
if ('' !== $(this).val()){
newHelpFileExists = true;
}
})
// dans ce cas intégrer dans le formulaire à soumettre un bloc
// qui contiendra une copie de chacun de ces input[type="file"]
if (newHelpFileExists){
$submitButton.before('<div id="help-doc-submit" style="position:fixed;visibility:hidden;"></div>');
}
 
let $thisFieldset = $('fieldset').first(),
valueForIsVisible,
$inputFile,
uploadedHelpFiles;
 
// On déroule les blocs de champs supplémentaires
for(let index = $thisFieldset.data('id'); index <= count; index++) {
$thisFieldset = findFieldset(index);
valueForIsVisible = $('.field-is_visible', $thisFieldset).val();
// Certains indices peuvent correspondre à un champ supprimé
if (0 < $($thisFieldset).length) {
if (0 === parseInt(valueForIsVisible)) {
datasToSubmit[resultArrayIndex] = CHAMPS_SUPP_JSON[resultArrayIndex];
} else {
// initialisation du tableau de résultats
datasToSubmit[resultArrayIndex] = {fieldValues:{}};
$.each(['key','name','element','unit','description'], (i, fieldName) => datasToSubmit[resultArrayIndex][fieldName] = $('.field-'+fieldName, $thisFieldset).val() || null);
// Ajout de la valeur 'requis' ou non au tableau de resultats
datasToSubmit[resultArrayIndex].mandatory = $('.field-is_mandatory', $thisFieldset).is(':checked');
// Collecte les des données dépendantes de l'élément choisi
// sous forme d'un tableau de resultats
this.onSelectCollectDataValuesToSubmit(datasToSubmit[resultArrayIndex], $thisFieldset);
 
if ($.isEmptyObject(datasToSubmit[resultArrayIndex].fieldValues)){
delete datasToSubmit[resultArrayIndex].fieldValues;
}
// Copie d'un champ de fichier d'aide dans le bloc d'envoi
$inputFile = $('.field-help', $thisFieldset);
uploadedHelpFiles = $inputFile.get(0).files;
if (0 < uploadedHelpFiles.length) {
// Présence d'un document d'aide
datasToSubmit[resultArrayIndex].help = uploadedHelpFiles[0].type;
$inputFile.clone()
.attr('name', 'help-'+datasToSubmit[resultArrayIndex].key)// l'attribut name prend la valeur de la clé
.appendTo('#help-doc-submit');
// si un fichier d'aide était déjà présent et que l'utilisateur ne le supprime pas on réinjecte le type mime
// ce qui indique la présence d'un fichier d'aide lors de l'affichage du widget de saisie
} else if (!!CHAMPS_SUPP_JSON[resultArrayIndex] && !!CHAMPS_SUPP_JSON[resultArrayIndex]['help'] && !$('.file-return', $thisFieldset).hasClass('hidden')) {
datasToSubmit[resultArrayIndex].help = CHAMPS_SUPP_JSON[resultArrayIndex]['help'];
 
} else {
datasToSubmit[resultArrayIndex].help = null;
}
datasToSubmit[resultArrayIndex].is_visible = valueForIsVisible;
resultArrayIndex++;
}
}
}
 
const resultsArrayJson = JSON.stringify(datasToSubmit, replacer);
 
console.log(resultsArrayJson);
 
// Désactivation de tous les champs et boutons (nouveaux champs)
$('#new-fields, #new-fields .button, #add-fields, #preview-field').addClass('disabled');
$('#validate-new-fields').addClass('validated');
$('.validate-new-fields').text('Champs validés');
// Mise à disposition des données pour le bouron submit
$submitButton.before('<input type="hidden" name="champs-supp" id="champs-supp">');
$('#champs-supp').val(resultsArrayJson);
// suppression du message d'alerte validations des champs supprimés en mode modification
$('#info-suppression-champs-supp').remove();
};
 
// Renseigne le tableau de resultat
// pour les données dépendant de l'élément choisi
ChampsSupp.prototype.onSelectCollectDataValuesToSubmit = function(datasToSubmitObject, $thisFieldset) {
switch(datasToSubmitObject.element) {
case 'select':
case 'checkbox':
case 'list-checkbox':
case 'radio':
datasToSubmitObject.fieldValues.listValue = [];
// Ajout des valeurs de liste
this.onChangeStoreListValueLabel(datasToSubmitObject, $thisFieldset);
// S'il y a une valeur 'autre' on l'indique à la fin de la liste
if ($('.option-other-value', $thisFieldset).is(':checked') && -1 === datasToSubmitObject.fieldValues.listValue.indexOf('other')) {
datasToSubmitObject.fieldValues.listValue.push('other');
}
break;
 
case 'number':
case 'range':
// Placeholder
datasToSubmitObject.fieldValues.placeholder = $('.aide-saisie', $thisFieldset).val() || null;
// Valeur par défaut
datasToSubmitObject.fieldValues.default = $('.default', $thisFieldset).val() || null;
// Incrémentation ( attribut step="" )
datasToSubmitObject.fieldValues.step = $('.step', $thisFieldset).val() || null;
 
case 'date':
// Min
datasToSubmitObject.fieldValues.min = $('.min', $thisFieldset).val() || null;
// Max
datasToSubmitObject.fieldValues.max = $('.max', $thisFieldset).val() || null;
break;
 
case 'email':
case 'text':
case 'textarea':
default:
// Placeholder
datasToSubmitObject.fieldValues.placeholder = $('.aide-saisie', $thisFieldset).val() || null;
break;
}
return datasToSubmitObject;
};
 
// Ajout d'une valeur d'un élément liste (select, checkbox etc.)
// dans le tableau de resultats
ChampsSupp.prototype.onChangeStoreListValueLabel = function(datasToSubmitObject, $thisFieldset) {
const $listValues = $('.list-value', $thisFieldset),
hasPlaceholder = !valeurOk($listValues.first().val());
 
$('.list-value', $thisFieldset).each(function (i) {
const valueId = $(this).data('list-value-id'),
$displayedLabel = $(`.displayed-label[data-list-value-id=${valueId}]`, $thisFieldset),
hasDisplayedLabel = valeurOk($displayedLabel.val());
let displayedLabel = hasDisplayedLabel ? $displayedLabel.val() : '';
 
if ($(this).val()){
// Is-default-value non cochée
if (!$(`.is-defaut-value[data-list-value-id="${valueId}"]`, $thisFieldset).is(':checked')) {
datasToSubmitObject.fieldValues.listValue.push([$(this).val(), displayedLabel]);
// Is-default-value cochée pour select/radio
} else if (['select', 'radio'].include($('.field-element', $thisFieldset).val())) {
// Une seule valeur par defaut, devient la première valeur du tableau+'#'
datasToSubmitObject.fieldValues.listValue.unshift([$(this).val()+'#', displayedLabel]);
// Is-default-value cochée pour checkbox/list-checkbox
} else {
// On ajoute simplement la valeur au tableau+'#'
datasToSubmitObject.fieldValues.listValue.push([$(this).val()+'#', displayedLabel]);
}
} else if (0 === i) {// deviendra un placeholder
displayedLabel = hasDisplayedLabel ? $displayedLabel.val() : '...Choisir...';
datasToSubmitObject.fieldValues.listValue.push([null, displayedLabel]);
}
});
};
 
/*********************************************************
* Modification des champs supp sur un Widget existant *
*********************************************************/
 
ChampsSupp.prototype.onExtentedFieldsForModification = function() {
if (!$('#type').val() && isModification) {
$.each(CHAMPS_SUPP_JSON, this.fillFieldsForModification);
}
};
 
ChampsSupp.prototype.fillFieldsForModification = function(index, extendedFieldValues) {
$('#add-fields').click();
 
const fieldValues = extendedFieldValues.fieldValues,
$fieldset = findFieldset(index),
textFields = [
'name',
'key',
'unit',
'description'
],
fieldsetKeys = textFields.concat([
'is_visible',
'is_mandatory',
'element'
]),
extendedFields = {};
 
$.each(fieldsetKeys, (i, fieldName) => extendedFields[fieldName] = $('.field-'+fieldName, $fieldset));
extendedFields.is_visible.val(extendedFieldValues.is_visible);
if (!extendedFieldValues.is_visible) {
$fieldset.hide();
}
 
const selectedOption = $(`option[value=${extendedFieldValues.element}]`, extendedFields.element);
 
$.each(textFields, (i, fieldName) => extendedFields[fieldName].val(extendedFieldValues[fieldName]));
 
const isMandatory = 1 === extendedFieldValues.mandatory;
 
extendedFields.key.attr('disabled', true);
extendedFields.name.change();
extendedFields.is_mandatory.attr('checked', isMandatory).prop('checked', isMandatory);
 
selectedOption.attr('selected','selected');
selectedOption.change();
if (!!extendedFieldValues.help) {
const fileExtension = 'png' === extendedFieldValues.help.replace('image/','').toLowerCase() ? '.png' : '.jpg',
fileName = extendedFieldValues.key+fileExtension;
 
$('.file-return', $fieldset).append(`${fileName}<img src="${URLS_IMAGES+fileName}" width="50%">`).removeClass('hidden');
}
switch(extendedFieldValues.element) {
case 'select':
case 'checkbox':
case 'list-checkbox':
case 'radio':
const listValues = fieldValues.listValue;
let $listValueBlock;
 
if ('other' === listValues.slice(-1)[0]) {
$('.option-other-value', $fieldset).attr('checked', true).prop('checked', true);
listValues.pop();
}
 
$.each(listValues, (i, listValue) => {
$listValueBlock = $(`.new-value[data-list-value-id=${i}]`, $fieldset);
if(valeurOk(listValue[0])) {
if ('#' === listValue[0].slice(-1)) {
listValue[0] = listValue[0].slice(0,-1);
$('.is-defaut-value', $listValueBlock).attr('checked', true).prop('checked', true);
}
$('.list-value', $listValueBlock).val(listValue[0]);
}
if(valeurOk(listValue[1])) {
$('.displayed-label', $listValueBlock).val(listValue[1]);
}
$('.list-value', $listValueBlock).trigger('input');
if (1 < listValues.length - i) {
$('.add-value-button', $fieldset).click();
}
});
break;
 
case 'number':
case 'range':
case 'date':
case 'email':
case 'text':
case 'textarea':
default:
const specificationKeys = ['placeholder', 'default', 'step', 'min', 'max'];
let classAttr;
 
$.each(specificationKeys, (i, key) => {
classAttr = key === 'placeholder' ? 'aide-saisie' : key;
if (fieldValues[key] !== undefined) {
$('.'+classAttr, $fieldset).val(fieldValues[key]);
}
});
break;
}
};
 
/*********************************
* Enregistrer / prévisualiser *
*********************************/
 
// Activation/desactivation des champs valider/previsualiser
ChampsSupp.prototype.onClickButtonsTagMissingValues = function() {
const lthis = this
$('#preview-field, #validate-new-fields').on('click', function () {
const $button = $(this);
//S'il n'y a pas (plus) de bloc nouveau champ
if (0 === $('fieldset').length) {
return;
}
// Classe "invalid"
missingValuesClass();
if (!$(this).hasClass('invalid')) {
if ($(this).is('#validate-new-fields')) {
// Lancement de l'enregistrement des valeurs à transmettre
lthis.onClickStoreNewFields();
} else if ($(this).is('#preview-field')) {
// Lancement de la prévisualisation
newFieldsPreview();
}
}
});
// Si un champ manquant est renseigné
// ou on choisit nouvel élément liste (au moins une option)
// Cette action doit être prise en compte dans la validation
$('#new-fields').on('change', '.invalid[type="text"], .field-element', function () {
// S'il on a pas encore cliqué sur prévisualiser/valider
// changer l'élément ne doit pas déclancher le signalement en rouge
if ($(this).is('.field-element') && !$('#preview-field, #validate-new-fields').hasClass('invalid')) {
return;
} else {
// Classe "invalid"
missingValuesClass();
}
});
};
/branches/v3.01-serpe/widget/modules/manager/squelettes/js/display.js
New file
0,0 → 1,159
import {findFieldset} from './utils.js';
 
/*************************************
* Fonctions de Style et Affichage *
* des éléments "spéciaux" *
*************************************/
export const displayFields = () => {
inputFile();
inputListCheckbox();
inputRangeDisplayNumber();
previewFieldHelpModal();
};
 
// Logique d'affichage pour le input type=file
export const inputFile = () => {
const fileInputSelector = '.input-file',
$button = $('.label-file'),
focusOnIntputFile = selector => $('#'+selector+fileInputSelector).focus();
 
// focus lorsque la "barre d'espace" ou "Entrée" est pressée
$button.on('keydown', function(event) {
if (event.keyCode == 13 || event.keyCode == 32) {
focusOnIntputFile($(this).attr('for'));
}
});
// focus lorsque le label est cliqué
$button.on('click', function () {
focusOnIntputFile($(this).attr('for'));
return false;
});
 
// Affiche un retour visuel dès que input:file change
$(fileInputSelector).on('change', function(event) {
// Il est possible de supprimer un fichier
// donc on vérifie que le 'change' est un ajout ou modificationis-defaut-value
if (!$.isEmptyObject(event.target.files[0])) {
const file = event.target.files[0],
fileSelector = $(this).attr('id'),
$theReturn = $('.'+fileSelector);
 
// Affichage du nom du fichier
$theReturn.text(file.name).removeClass('hidden');
 
if (5242880 < file.size) {
$theReturn.append(
`<p class="message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
La taille du fichier ne doit pas dépasser 5Mo
</p>`
)
.addClass('invalid');
// lib : https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js
$(this).clearInputs();
console.log(file);
 
} else if (file.type.match('image/*') && 'especes' !== fileSelector) {
// Si le fichier est une image (et qu'on est pas sur "especes") on l'affiche
// Chemin temporaire de l'image et affichage
const tmppath = URL.createObjectURL(file);
 
$theReturn.append(`<img src="${tmppath}" width="50%">`).removeClass('invalid');
 
} else if (!('especes' === fileSelector && file.type.match('text/(:?csv|tab-separated-values)'))) {
// on a pas un type image, ou on est sur une liste d'espèces mais on a pas un csv
console.log(file.type);
 
if ('especes' === fileSelector) {// cas où on demandait un csv
$theReturn.append(
`<p class="message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Le fichier doit être au format csv ou tsv
</p>`
)
.addClass('invalid');
} else { // cas où on demandait un format image
$theReturn.append(
`<p class="message">'+
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
Le fichier doit être au format image (jpg, png, etc.)
</p>`
)
.addClass('invalid');
}
// lib : https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js
$(this).clearInputs();
console.log(file);
} else {// file "especes" csv ok
$theReturn.append(' <i class="fa fa-check-circle" aria-hidden="true" style="color:#B3C954;font-size:1.3rem"></i>').removeClass('invalid');
}
}
});
// Annuler le téléchargement
$('.remove-file').click(function () {
const $thisFileInput = $(this).prev('.input-file-container').find('.input-file');
 
// lib : https://resources.tela-botanica.org/jquery/form/3.51/jquery.form.min.js
$thisFileInput.clearInputs();
$thisFileInput.triggerHandler('change');
// $thisFileInput.unwrap();
$(this).next('.file-return').addClass('hidden').empty();
});
};
 
// Style et affichage des list-checkboxes
export const inputListCheckbox = () => {
// On écoute le click sur une list-checkbox ('.selectBox')
// à tout moment de son insertion dans le dom
$('#zone-appli').on('click', '.selectBox', function () {
$(`.checkboxes[data-id="${$(this).data('id')}"]`).toggleClass('hidden');
});
};
 
// Style et affichage des input type="range"
export const inputRangeDisplayNumber = () => {
$('#zone-appli').on('input', 'input[type="range"]', function () {
$(this).siblings('.range-live-value').text($(this).val());
});
};
 
 
// Activation/Desactivation et contenu de la modale Bootstrap
// https://getbootstrap.com/docs/3.3/javascript/#modals
export const previewFieldHelpModal = () => {
$('#zone-supp').on('click', '.help-button', function () {
const index = $(this).closest('.preview-fields').data('id'),
$thisFieldset = findFieldset(index),
file = $('.field-help', $thisFieldset)[0].files[0],
tmppath = URL.createObjectURL(file),
$helpModal = $('#help-modal'),
$helpModalLabel = $('#help-modal-label'),
$printContent = $('#print_content');
 
// Titre
$helpModalLabel.text('Aide pour : '+$('.field-name', $thisFieldset).val());
// Contenu
if (file.type.match('image/*')) {
$printContent.append(`<img src="${tmppath}" style="max-width:100%">`);
} else {
$printContent.append('<p>Erreur : le fichier n’est pas une image</p>');
}
// Sortie avec la touche escape
$helpModal.modal({keyboard: true});
// Affichage
$helpModal.modal({show: true});
// Remplacer l'autofocus qui ne fonctionne plus en HTML5
// Message dans la doc de bootstrap :
// Due to how HTML5 defines its semantics,
// the autofocus HTML attribute has no effect in Bootstrap modals.
// To achieve the same effect, use some custom JavaScript
$helpModal.on('shown.bs.modal', function () {
$('#myInput').trigger('focus');
})
// Réinitialisation
$helpModal.on('hidden.bs.modal', function () {
$helpModalLabel.text();
$printContent.empty();
})
});
};
/branches/v3.01-serpe/widget/modules/manager/squelettes/creation.tpl.html
55,12 → 55,9
</p>
 
<form action="<?php echo $url_base;?>manager?mode=<?php echo $mode.$params;?>" id="basic-widget-form" method="post" enctype="multipart/form-data">
 
<div class="register-section row" id="basic-details-section">
<h2>Meta-données</h2>
 
<input type="text" name="email" id="email" placeholder="Your email" title="laisser ce champ vide" autocomplete="off" tabindex="-1" />
 
<div class="col-sm-12 mb-3">
<label for="projet">Projet&nbsp;*</label>
<input type="text" name="projet" id="projet" class="form-control" pattern="^[a-z][a-z0-9-]{2,24}" <?php echo ( $mode === 'modification' ) ? 'value="' . $widget['projet'] . '" readonly' : 'required';?> title="Champ obligatoire : Pas d'espaces, de majuscules, de caractères spéciaux, ou d'accents. Caractères acceptés : 1er une lettre de a à z, ensuite : lettres, chiffres, tirets &quot; - &quot;.">
76,19 → 73,18
<select id="type" name="type" class="form-control custom-select">
<option value=""> ----</option>
<?php foreach ( $type as $id => $projet ) : ?>
<option <?php echo ( isset( $widget['projet'] ) && $projet['projet'] === $widget['projet'] ) ? 'selected="selected"' : '';?> value="<?php echo $projet['projet'];?>"><?php echo $projet['projet'];?></option>
<option <?php echo ( isset( $widget['type'] ) && $projet['projet'] === $widget['type'] ) ? 'selected="selected"' : '';?> value="<?php echo $projet['projet'];?>"><?php echo $projet['projet'];?></option>
<?php endforeach;?>
</select>
</div>
 
<div class="col-sm-12 radio mb-3">
<label for="est_type" class="radio-label">
<input type="checkbox" name="est_type" id="est_type" <?php echo ( isset( $widget['est_type'] ) && $projet['est_type'] === '1' ) ? 'checked="checked"' : '';?>>
Ce widget est un widget type
</label>
</div>
 
<div class="col-sm-12 radio mb-3">
<label for="est_type" class="radio-label">
<input type="checkbox" name="est_type" id="est_type" <?php echo ( isset( $widget['est_type'] ) && $projet['est_type'] === '1' ) ? 'checked="checked"' : '';?>>
Ce widget est un widget type
</label>
</div>
 
<div class="col-sm-12 mb-3">
<label for="langue">Langue</label>
<?php if ( $mode === 'modification' ) : ?>
115,16 → 111,16
<div class="input-file-container col-sm-10">
 
<?php
$info_file_name = [];
$info_src = '';
$info_img = '';
$info_hidden = '';
if( isset( $widget['info'] ) ) :
$info_file_name = 'info.' . preg_replace( '/(?:imag)?e\/?/','',$widget['info']);
$info_src = $chemin_images . $widget['projet'] . '/' . $info_file_name;
$info_img =
'<img id="pre-existent-info" src="' . $info_src . '" width="50%"><br>Pour changer, télécharger un nouveau fichier.';
$info_hidden = '';
else :
$info_file_name = [];
$info_src = '';
$info_img = '';
$info_hidden = ' hidden';
endif;
?>
148,16 → 144,16
<div class="input-file-container col-sm-10">
 
<?php
$logo_file_name = [];
$logo_src = '';
$logo_img = '';
$logo_hidden = '';
if( isset( $widget['logo'] ) ) :
$logo_file_name = 'logo.' . preg_replace( '/(?:imag)?e\/?/','',$widget['logo']);
$logo_src = $chemin_images . $widget['projet'] . '/' . $logo_file_name;
$logo_img =
'<img id="pre-existent-logo" src="' . $logo_src . '" width="50%"><br>Pour changer, télécharger un nouveau fichier.';
$logo_hidden = '';
else :
$logo_file_name = [];
$logo_src = '';
$logo_img = '';
$logo_hidden = ' hidden';
endif;
?>
178,16 → 174,16
<div class="input-file-container col-sm-10">
 
<?php
$image_fond_file_name = [];
$image_fond_src = '';
$image_fond_img = '';
$image_fond_hidden = '';
if( isset( $widget['image_fond'] ) ) :
$image_fond_file_name = 'image_fond.' . preg_replace( '/(?:imag)?e\/?/','',$widget['image_fond']);
$image_fond_src = $chemin_images . $widget['projet'] . '/' . $image_fond_file_name;
$image_fond_img =
'<img id="pre-existent-image_fond" src="' . $image_fond_src . '" width="50%"><br>Pour changer, télécharger un nouveau fichier.';
$image_fond_hidden = '';
else :
$image_fond_file_name = [];
$image_fond_src = '';
$image_fond_img = '';
$image_fond_hidden = ' hidden';
endif;
?>
205,17 → 201,8
</div><!-- end #profile-details-description-section -->
 
<div class="register-section row" id="profile-details-fields-section">
<h2>Champs</h2>
 
<h2>Milieux et taxonomie</h2>
<div class="col-sm-12 mb-3">
<label for="type_localisation">Type de localisation</label>
<select id="type_localisation" name="type_localisation" class="form-control custom-select">
<option value="<?php echo ( isset( $widget['type_localisation'] ) ) ? $widget['type_localisation'] : 'point';?>"><?php echo ( isset( $widget['type_localisation'] ) ) ? $widget['type_localisation'] : 'point';?></option>
<option value="<?php echo ( isset( $widget['type_localisation'] ) && $widget['type_localisation'] === 'rue' ) ? 'point' : 'rue';?>"><?php echo ( isset( $widget['type_localisation'] ) && $widget['type_localisation'] === 'rue') ? 'point' : 'rue';?></option>
</select>
</div>
 
<div class="col-sm-12 mb-3">
<label for="milieux">Milieux</label>
<p class="message">
Liste de milieux séparés par un ";".
276,6 → 263,45
<div class="col-sm-12 mb-3">
<a href="<?php echo $url_base;?>modules/manager/squelettes/img/fichier_type/especes.csv" class="button fichier-type" download><i class="fas fa-file-alt" aria-hidden="true"></i> Fichier type</a>
</div>
<h2>Champs Imposés</h2>
<div class="col-sm-12 mb-3">
<label for="adresse">Adresse obligatoire</label>
<select id="adresse" name="adresse" class="form-control custom-select">
<option value="0" <?php echo ( isset( $widget['adresse'] ) && $widget['adresse'] === '0' ) ? 'selected' : '';?>>Non</option>
<option value="1" <?php echo ( isset( $widget['adresse'] ) && $widget['adresse'] === '1' ) ? 'selected' : '';?>>Oui</option>
</select>
</div>
<div class="col-sm-12 mb-3">
<label for="photo_obligatoire">Photo obligatoire</label>
<select id="photo_obligatoire" name="photo_obligatoire" class="form-control custom-select">
<option value="0" <?php echo ( isset( $widget['photo_obligatoire'] ) && $widget['photo_obligatoire'] === '0' ) ? 'selected' : '';?>>Non</option>
<option value="1" <?php echo ( isset( $widget['photo_obligatoire'] ) && $widget['photo_obligatoire'] === '1' ) ? 'selected' : '';?>>Oui</option>
</select>
</div>
<h2>Localisation</h2>
<div class="col-sm-12 mb-3">
<label for="type_localisation">Type de localisation</label>
<select id="type_localisation" name="type_localisation" class="form-control custom-select">
<option value="<?php echo ( isset( $widget['type_localisation'] ) ) ? $widget['type_localisation'] : 'point';?>"><?php echo ( isset( $widget['type_localisation'] ) ) ? $widget['type_localisation'] : 'point';?></option>
<option value="<?php echo ( isset( $widget['type_localisation'] ) && $widget['type_localisation'] === 'rue' ) ? 'point' : 'rue';?>"><?php echo ( isset( $widget['type_localisation'] ) && $widget['type_localisation'] === 'rue') ? 'point' : 'rue';?></option>
</select>
</div>
<div class="col-sm-12">
<label for="fond_carte">Fond de carte</label>
<select id="fond_carte" name="fond_carte" class="form-control custom-select">
<?php
$affichage_fonds_carte = [
'osm' => 'OSM (carte par défaut)',
'googleHybrid' => 'Photos aériennes',
];
$fond_carte = isset($widget['fond_carte']) && isset($affichage_fonds_carte[$widget['fond_carte']]) ? $widget['fond_carte'] : 'osm';
?>
<?php foreach($affichage_fonds_carte as $nom_base => $nom_affiche) :?>
<option value="<?php echo $nom_base;?>"<?php echo $nom_base === $fond_carte ? ' selected="selected"' : '';?>><?php echo $nom_affiche;?></option>
<?php endforeach;?>
 
</select>
</div>
</div><!-- end #profile-details-fields-section -->
 
<!--localisation-->
289,7 → 315,7
</form><!-- end #new-widget-form -->
 
<form id="form-geolocalisation" autocomplete="off">
<div class="row mb-3">
<div class="row">
<label for="geolocalisation" class="obligatoire has-tooltip col-sm-12" data-toggle="tooltip" title="">
Geolocalisation&nbsp: Déterminer un point gps (facultatif)
</label>
298,9 → 324,9
<tb-geolocation-element
id="tb-geolocation"
layer='osm'
zoom_init="4"
lat_init="46.5"
lng_init="2.9"
zoom_init="<?php echo $widget['tableau-localisation']['zoom'] ?? '4' ;?>"
lat_init="<?php echo $widget['tableau-localisation']['latitude'] ?? '46.5' ;?>"
lng_init="<?php echo $widget['tableau-localisation']['longitude'] ?? '2.9' ;?>"
marker="true"
polyline="false"
polygon="false"
318,11 → 344,11
<div id="geoloc-datas" class="col-sm-12 row">
<div class="col-sm-6 mb-3">
<label for="latitude">Latitude</label>
<input type="text" class="form-control latitude" id="latitude" name="latitude" pattern="-?(8[0-5]|[1-7]?[0-9])(,|.)[0-9]{5}" title="Nombre décimal de 6 à 8 chiffres au total, dont exactement 5 chiffres après la virgule" placeholder="+/- 0.00000 à 90.00000" value="">
<input type="text" class="form-control latitude" id="latitude" name="latitude" pattern="-?(8[0-5]|[1-7]?[0-9])(,|.)[0-9]{5}" title="Nombre décimal de 6 à 8 chiffres au total, dont exactement 5 chiffres après la virgule" placeholder="+/- 0.00000 à 90.00000" value="<?php echo $widget['tableau-localisation']['latitude'] ?? '' ;?>">
</div>
<div class="col-sm-6 mb-3">
<label for="longitude">Longitude</label>
<input type="text" class="form-control longitude" id="longitude" name="longitude" pattern="-?(1(80|[0-7][0-9])|([1-9]?[0-9]))(,|.)[0-9]{5}" title="Nombre décimal de 6 à 8 chiffres au total, dont exactement 5 chiffres après la virgule" placeholder="+/- 0.00000 à 180.00000" value="">
<input type="text" class="form-control longitude" id="longitude" name="longitude" pattern="-?(1(80|[0-7][0-9])|([1-9]?[0-9]))(,|.)[0-9]{5}" title="Nombre décimal de 6 à 8 chiffres au total, dont exactement 5 chiffres après la virgule" placeholder="+/- 0.00000 à 180.00000" value="<?php echo $widget['tableau-localisation']['longitude'] ?? '' ;?>">
</div>
<div class="col-sm-12 mb-3">
<label for="zoom">Zoom (indépendant des coordonnées)</label>
330,72 → 356,54
Quelques exemples de précision zoom&nbsp;:<br>
Europe&nbsp;:&nbsp;4, France&nbsp;:&nbsp;5, région&nbsp;:&nbsp;7, département&nbsp;:&nbsp;9, ville&nbsp;:&nbsp;12, lieu-dit/quartier&nbsp;:&nbsp;15, rue&nbsp;:&nbsp;18 (=&nbsp;max).
</p>
<input type="text" name="zoom" id="zoom" class="form-control" pattern="(0?[1-9]|(1[0-8]))" title="Nombre de 1 à 18" placeholder="1 à 18" value="" />
<input type="text" name="zoom" id="zoom" class="form-control" pattern="(0?[1-9]|(1[0-8]))" title="Nombre de 1 à 18" placeholder="1 à 18" value="<?php echo $widget['tableau-localisation']['zoom'] ?? '' ;?>" />
</div>
<div class="col-sm-12 mb-3">
<label for="fond_carte">Fond de carte</label>
<select id="fond_carte" name="fond_carte" class="form-control custom-select">
<?php
$affichage_fonds_carte = [
'osm' => 'OSM (carte par défaut)',
'googleHybrid' => 'Photos aériennes',
];
$fond_carte = isset($widget['fond_carte']) && isset($affichage_fonds_carte[$widget['fond_carte']]) ? $widget['fond_carte'] : 'osm';
?>
<?php foreach($affichage_fonds_carte as $nom_base => $nom_affiche) :?>
<option value="<?php echo $nom_base;?>"<?php echo $nom_base === $fond_carte ? ' selected="selected"' : '';?>><?php echo $nom_affiche;?></option>
<?php endforeach;?>
 
</select>
</div>
<div class="col-sm-12 mb-3">
<label for="adresse">Adresse obligatoire</label>
<select id="adresse" name="adresse" class="form-control custom-select">
<option value="0" <?php echo ( isset( $widget['adresse'] ) && $widget['adresse'] === '0' ) ? 'selected' : '';?>>Non</option>
<option value="1" <?php echo ( isset( $widget['adresse'] ) && $widget['adresse'] === '1' ) ? 'selected' : '';?>>Oui</option>
</select>
</div>
<div class="col-sm-12 mb-3">
<label for="photo_obligatoire">Photo obligatoire</label>
<select id="photo_obligatoire" name="photo_obligatoire" class="form-control custom-select">
<option value="0" <?php echo ( isset( $widget['photo_obligatoire'] ) && $widget['photo_obligatoire'] === '0' ) ? 'selected' : '';?>>Non</option>
<option value="1" <?php echo ( isset( $widget['photo_obligatoire'] ) && $widget['photo_obligatoire'] === '1' ) ? 'selected' : '';?>>Oui</option>
</select>
</div>
</div>
</div>
</div>
</form><!-- end #form-geolocalisation -->
 
<form id="new-fields" autocomplete="off">
<h2>Ajouter des champs</h2>
<?php if ( !isset( $widget['type'] ) ):?>
<form id="new-fields" autocomplete="off">
<h2>Ajouter des champs</h2>
<p id="infos-validation-boutons" class="message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
&nbsp;Attention&nbsp;:
<br>
<i class="fa fa-bolt" aria-hidden="true" style="color:#B3C954"></i>
&nbsp;Le bouton "Valider" sert à valider les champs supplémentaires uniquement
<br>
<i class="fas fa-trophy" aria-hidden="true" style="color:#B3C954"></i>
&nbsp;Le bouton "Terminer" sert à envoyer la totalité du nouveau widget
</p>
</form><!-- #new-fields = fomulaire oû viennent s'insérer les champs supplémentaires -->
 
<div id="new-fields-buttons" class="row">
<div class="col-md-4 col-sm-4 col-xs-4 buttons">
<label class="add-fields">Ajouter</label>
<div class="button" id="add-fields" title="Ajouter un champ"><i class="fa fa-plus" aria-hidden="true"></i></div>
</div>
<div class="col-md-4 col-sm-4 col-xs-4 buttons">
<label for="preview-field">Prévisualiser</label>
<div class="button" id="preview-field" name="preview-field" title="prévisualiser"><i class="fa fa-magic" aria-hidden="true"></i></div>
</div>
<div class="col-md-4 col-sm-4 col-xs-4 buttons">
<label class="validate-new-fields">Valider</label>
<div class="button" id="validate-new-fields" title="Valider les champs supplémentaires"><i class="fa fa-bolt" aria-hidden="true"></i></div>
</div>
</div>
<?php else:?>
<p class="message">
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
&nbsp;Attention&nbsp;:
&nbsp;Ce widget est de type "<?php echo ( $widget['type'] );?>"&nbsp;:
<br>
<i class="fa fa-bolt" aria-hidden="true" style="color:#B3C954"></i>
&nbsp;Le bouton "Valider" sert à valider les champs supplémentaires uniquement
&nbsp;si vous souhaitez ajouter ou modifier des champs supplémentaires, vous devez le faire sur <a href="<?php echo $url_base ;?>manager?mode=modification&projet=<?php echo $widget['type'];?>&langue=fr">le widget type</a> lui même.
<br>
<i class="fas fa-trophy" aria-hidden="true" style="color:#B3C954"></i>
&nbsp;Le bouton "Terminer" sert à envoyer la totalité du nouveau widget
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="color:#ff5d55"></i>
&nbsp;cela modifiera les champs supplémentaires de tous les tous les autres widgets du même type.
</p>
</form><!-- #new-fields = fomulaire oû viennent s'insérer les champs supplémentaires -->
<?php endif;?>
 
<div id="new-fields-buttons" class="row">
<div class="col-md-4 col-sm-4 col-xs-4 buttons">
<label class="add-fields">Ajouter</label>
<div class="button" id="add-fields" title="Ajouter un champ"><i class="fa fa-plus" aria-hidden="true"></i></div>
</div>
<div class="col-md-4 col-sm-4 col-xs-4 buttons">
<label for="preview-field">Prévisualiser</label>
<div class="button" id="preview-field" name="preview-field" title="prévisualiser"><i class="fa fa-magic" aria-hidden="true"></i></div>
</div>
<div class="col-md-4 col-sm-4 col-xs-4 buttons">
<label class="validate-new-fields">Valider</label>
<div class="button" id="validate-new-fields" title="Valider les champs supplémentaires"><i class="fa fa-bolt" aria-hidden="true"></i></div>
</div>
</div>
 
</div><!-- end .widget-blocks = tout le bloc de gauche-->
 
<div id="right-block" class="widget-blocks">
598,7 → 606,12
<!-- Bootstrap -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script type="text/javascript" src="<?php echo $url_base;?>modules/manager/squelettes/js/manager.js"></script>
<!-- <script type="text/javascript" src="<?php echo $url_base;?>modules/manager/squelettes/js/manager.js"></script> -->
<script type="module" src="<?php echo $url_base; ?>modules/manager/squelettes/js/manager.js"></script>
<script type="text/javascript">
const CHAMPS_SUPP_JSON = <?php echo $widget['chpSupp'][$widget['projet']]['champs-supp-json'] ?? '""';?>;
const URLS_IMAGES = "<?php echo $url_base;?>modules/manager/squelettes/img/images_projets/<?php echo $widget['projet'];?>/";
</script>
<!-- Barre de navigation -->
<?php if ( $bar !== false ) : ?>
<script src="<?php echo $url_script_navigation;?>"></script>
/branches/v3.01-serpe/widget/modules/manager/squelettes/css/manager.css
485,7 → 485,7
/**** style du formulaire des nouveaux champs après validation ****/
#zone-appli #register-page #group-settings-form .widget-blocks .disabled,
#zone-appli #register-page #group-settings-form .widget-blocks .validated {
background-color: #eeeeee;
background-color: #eeeeee !important;
cursor: default;
pointer-events: none;
}
/branches/v3.01-serpe/widget/modules/manager/Manager.php
166,6 → 166,10
$tableau = (array) json_decode( $json, true );
$retour['squelette'] = 'creation';
$retour['donnees']['widget'] = $tableau[0];
// obtenir un tableau de coordonnées+zoom expoitable
if (isset($retour['donnees']['widget']['localisation'])) {
$retour['donnees']['widget']['tableau-localisation'] = $this->traiterLocalisation($retour['donnees']['widget']['localisation']);
}
// En prévision d'un service permettant la suppression/modification champs supp
$retour['donnees']['widget']['chpSupp'] = $this->rechercherChampsSupp();
 
207,6 → 211,17
return $parametres_modif;
}
 
private function traiterLocalisation( $infos_localisation ) {
$infos = explode(';', $infos_localisation);
$tableauTmp = array();
$retour = array();
foreach ($infos as $info) {
$tableauTmp = explode(':', $info);
$retour[$tableauTmp[0]] = $tableauTmp[1];
}
return $retour;
}
 
private function traiterDonneesFiles() {
$return = array();
$transmettre_donnees = false;
398,7 → 413,10
}
}
$retour[$projet]['champs-supp'][$key]['mandatory'] = intval( $chsup['mandatory'] );
$retour[$projet]['champs-supp'][$key]['is_visible'] = intval( $chsup['is_visible'] );
}
// renvoyer un json exploitable par le sccript js
$retour[$projet]['champs-supp-json'] = json_encode($retour[$projet]['champs-supp']);
return $retour;
}
}