diff --git a/README.md b/README.md index a218b6397b..937d41f0bf 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,44 @@ ![Github Tag](https://img.shields.io/github/v/release/smarthomeng/smarthome?sort=semver) ![Made with Python](https://img.shields.io/badge/made%20with-python-blue.svg) -[![Build Status on TravisCI](https://travis-ci.org/smarthomeNG/smarthome.svg?branch=develop)](https://travis-ci.org/smarthomeNG/smarthome) +[![Build Status on TravisCI](https://travis-ci.com/smarthomeNG/smarthome.svg?branch=master)](https://travis-ci.com/smarthomeNG/smarthome) [![Join the chat at https://gitter.im/smarthomeNG/smarthome](https://badges.gitter.im/smarthomeNG/smarthome.svg)](https://gitter.im/smarthomeNG/smarthome?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -SmartHomeNG [1] is a software that serves a basis for home automation. It interconnects multiple devices using plugins to access their specific interfaces. -This file contains basic information about the basic directories of SmartHomeNG. +SmartHomeNG [1] ist eine Software die eine Basis für eine Heimautomation bereitstellt. Über Plugins können spezielle Schnittstellen angesprochen und damit die Funktionalität des Gesamtsystems erweitert werden. -Developer documentation ([part of the user documentation](https://www.smarthomeng.de/user/entwicklung/entwicklung.html)) and user documentation ([german](https://www.smarthomeNG.de/user)) can be found on [www.smarthomeNG.de](https://www.smarthomeNG.de) +Auf der ([Webseite des Projektes](https://www.smarthomeNG.de)) kann eine [Benutzerdokumentation](https://www.smarthomeNG.de) eingesehen werden. + +Ein [Wiki](https://github.com/smarthomeNG/smarthome/wiki) existiert zumeist in deutscher Sprache. + +Die Kernfunktionalität wird alle 6-9 Monate in einem Release erweitert und freigegeben. + +## Benutzte Werkzeuge + +| Werkzeug | beschreibung | +| --- | :--- | +| | SmartHomeNG wird mit der Pycharm IDE entwickelt. | +| | Das Admin Interface von SmartHomeNG wird mit WebStorm IDE entwickelt. | + +## Aktueller Status der Entwicklung + +[![Aktuelle Entwicklung](https://travis-ci.com/smarthomeNG/smarthome.svg?branch=develop)](https://travis-ci.com/smarthomeNG/smarthome) + + +--- + +# SmartHomeNG and other languages + +SmartHomeNG [1] is a software that serves as a basis for home automation. It interconnects multiple devices using plugins to access their specific interfaces. + +User documentation ([german](https://www.smarthomeNG.de/user)) and developer documentation ([part of the user documentation](https://www.smarthomeng.de/user/entwicklung/entwicklung.html)) can be found on [www.smarthomeNG.de](https://www.smarthomeNG.de) Additional information can be found in the [SmartHomeNG Wiki](https://github.com/smarthomeNG/smarthome/wiki). +It is possible to read the documentation with [Google's translation service](https://translate.google.com/translate?hl=&sl=de&tl=en&u=https://www.smarthomeng.de/dev/user/) in other languages as well. + +This readme file contains basic information about the root directories of SmartHomeNG for an overview. + + ## Used Tools | Tool | Description | @@ -25,24 +53,24 @@ Additional information can be found in the [SmartHomeNG Wiki](https://github.com ## Directory Structure | directory | description| -| --- | :--- | +| --- | :--- | |bin | the main python file is based here | -|dev | if you plan to create a plugin then this is the folder you want to have a closer look at | +|dev | sample files for creating own plugins and modules | |doc | Source files for the user- and developer documentation | -|etc | the three basic configuration files smarthome.yaml, module.yaml, plugin.yaml, logic.yaml and logging.yaml are located here, you will edit these files to reflect your basic settings| -|items | put here your own files for your items | -|lib | some more core python modules are in this directory. You won't need to change anything here -|logics | here your logic files are put -|modules | here are all loadable core-modules located (one subdirectory for every module) -|plugins | here are all plugins located (one subdirectory for every plugin). The plugins have to be installed from a separate repository (smarthomeNG/plugins) -|scenes | the scenes are stored here -| tests | The code for the automated travis tests is stored here -|tools | there are some tools which help you for creating an initial configuration -|var | everything that is changed by smarthome is put here, e.g. logfiles, cache, sqlite database etc. +|etc | the five basic configuration files smarthome.yaml, module.yaml, plugin.yaml, logic.yaml and logging.yaml are located here, you need to edit these files to reflect your basic settings | +|items | put your own files for your items here | +|lib | some more core python modules are in this directory. You won't need to change anything here | +|logics | put your own files for your logics here | +|modules | here are all loadable core-modules located (one subdirectory for every module) | +|plugins | here are all plugins located (one subdirectory for every plugin). The plugins have to be installed from a separate repository (smarthomeNG/plugins) | +|scenes | the scenes are stored here | +|tests | the code for the automated travis tests is stored here | +|tools | there are some tools which help you with creating an initial configuration | +|var | everything that is changed by smarthome is put here, e.g. logfiles, cache, sqlite database etc. | ## Some more detailed info on the configuration files -As of Version 1.5 the old conf format will still be valid but will be moved out of the docs since it's deprecated now for some time. +As of Version 1.5 the old conf format will still be valid but is removed from the docs since it's been deprecated now for some time. ### etc/smarthome.yaml Upon installation you will need to create this file and specify your location. @@ -57,7 +85,7 @@ tz: Europe/Berlin ``` ### etc/module.yaml -Upon installation you will need to create this file and configure the modules and their parameters. On first start of SmartHomeNG this file is created from ```etc/module.yaml.default```. +Upon installation you will need to create this file and configure the modules and their parameters. On first start of SmartHomeNG this file is created from ```etc/module.yaml.default```, if not already present. An example is shown below: @@ -76,7 +104,7 @@ admin: ``` ### etc/plugin.yaml -Upon installation you will need to create this file and configure the plugins and their parameters. On first start of SmartHomeNG this file is created from ```etc/plugin.yaml.default```. +Upon installation you will need to create this file and configure the plugins and their parameters. On first start of SmartHomeNG this file is created from ```etc/plugin.yaml.default```, if not already present. An example is shown below: @@ -93,7 +121,7 @@ database: cli: plugin_name: cli ip: 0.0.0.0 - update: True + update: true websocket: plugin_name: visu_websocket @@ -147,5 +175,5 @@ If you want to read an item call `sh.item.path()` or to set an item `sh.item.pat ```python # logics/sunset.py if sh.global.sun(): # if sh.global.sun() == True: - sh.gloabl.sun(False) # set it to False + sh.global.sun(False) # set it to False ``` diff --git a/bin/locale.yaml b/bin/locale.yaml index 3239b67c5c..1ad8f159a6 100644 --- a/bin/locale.yaml +++ b/bin/locale.yaml @@ -75,6 +75,67 @@ global_translations: 'Letztes Update': {'de': '=', 'en': 'Last Update', 'fr': ''} 'Letzter Change': {'de': '=', 'en': 'Last Change', 'fr': ''} + #Translations for lib.scene: + "A second 'scenes' object has been created. There should only be ONE instance of class 'Scenes'!!! Called from: {frame1} ({frame2})": + 'de': "Ein zweites Szenenobjekt wurde erzeugt. Es darf jedoch nur EINE Instanz der Klasse 'Szenes' geben!!! Aufgerufen durch: {frame1} ({frame2})" + 'en': '=' + "Directory '{scenes_dir}' not found. Ignoring scenes.": + 'de': "Directory '{scenes_dir}' nicht gefunden. Szenen werden ignoriert." + 'en': '=' + "Scene {scene}, state {state}: action '{action}' is not a dict": + 'de': "Szene {scene}, Status {state}: Action '{action}' ist kein Dictionary" + 'en': '=' + "Scene {scene}, state {state}: actions are not a list": + 'de': "Szene {scene}, Status {state}: Actionen sind keine Liste" + 'en': '=' + "Reloaded all scenes": + 'de': "Alle Szenen neu geladen" + 'en': '=' + "Problem reading scene file {file}: No .yaml or .conf file found with this name": + 'de': "Problem beim lesen der Szenen Datei {file}: Keine .yaml oder .conf Datei mit diesem Namen gefunden" + 'en': '=' + "Problem evaluating: {value} - {exception}": + 'de': "Problem beim berechnen: {value} - {exception}" + 'en': '=' + "Invalid state '{state}' for scene {scene}": + 'de': "Ungültiger Status '{state}' für Szene {scene}" + 'en': '=' + "Learn set to 'False', because '{rvalue}' != '{value}'": + 'de': "Learn auf False gesetzt, weil '{rvalue}' != '{value}'" + 'en': '=' + "Could not find item or logic '{ditemname}' specified in {file}": + 'de': "Item oder Logik '{ditemname}' nicht gefunden. Wurde in {file} spezifiziert" + 'en': '=' + "unable to get self._scenes['{scenename}']['{action}'][0][2] <- {res}": + 'de': "self._scenes['{scenename}']['{action}'][0][2] kann nicht gelesen werden <- {res}" + 'en': '=' + + #Translations for lib.userfunctions: + "Imported userfunctions from '{mmodule}' v{version} - {description}": + 'de': "Userfunctions importiert aus '{module}' v{version} - {description}" + 'en': '=' + "Error importing userfunctions from '{module}': {error}": + 'de': "Fehler beim importieren von Userfunctions aus '{module}': {error}" + 'en': '=' + "Error reloading userfunctions '{module}': Module is not loaded, trying to newly import userfunctions '{module}' instead": + 'de': "Fehler beim Reload von Userfunctions '{module}': Modul ist nicht geladen, versuche stattdessen Userfunctions '{module}' neu zu importieren" + 'en': '=' + "Error reloading userfunctions '{module}': {error} - old version of '{module}' is still active": + 'de': "Fehler beim Reload von userfunctions '{module}': {error} - alte Version von '{module}' ist noch aktiv" + 'en': '=' + "Reloaded userfunctions '{module}'": + 'de': "Reload: Userfunctions '{module}' neu geladen" + 'en': '=' + "Reload: Userfunctions '{module}' do not exist": + 'de': "Reload: Userfunctions '{module}' existieren nicht" + 'en': '=' + "Reload: Loaded new userfunctions '{module}'": + 'de': "Reload: Neue Userfunctions '{module}' geladen" + 'en': '=' + "No userfunctions are loaded, nothing to reload": + 'de': "Es existieren keine Userfunctions, es gibt nichts für einen Reload" + 'en': '=' + lib.shtime_translations: 'defined': {'de': 'definiert', 'en': '='} @@ -114,5 +175,12 @@ lib.shtime_translations: 'de': "Aufgerufen mit einem Parameter der nicht vom Typ 'datetime' ist: {dt1}, {dt2}" 'en': '=' "Called with point in time that is earlier than now: {dt}": - 'de': 'Aufgerufen mit Zeitpunkt in der Vergangenheit' + 'de': 'Aufgerufen mit Zeitpunkt in der Vergangenheit: {dt}' 'en': '=' + "Calculating beginning of week based on year {year}, week {week} and offset {offset}": + 'de': 'Berechne Wochenstart basierend auf Jahr {year}, Woche {week} und Offset {offset}' + 'en': '=' + "Calculating length of month based on year {year}, month {month}{debug_month}": + 'de': 'Berechne Länge des Monats basierend auf Jahr {year}, Monat {month}{debug_month}' + 'en': '=' + diff --git a/bin/shngversion.py b/bin/shngversion.py index 2266edcf94..21dd836b82 100644 --- a/bin/shngversion.py +++ b/bin/shngversion.py @@ -69,9 +69,13 @@ # Update auf 1.8.1a wg. Kennzeichnung des Stands als "nach dem v1.8.1 Release" # Update auf 1.8.2 wg. Release +# Update auf 1.8.2a wg. Kennzeichnung des Stands als "nach dem v1.8.2 Release" +# Update auf 1.8.2b wg. Erweiterung des Item Loggings" +# Update auf 1.8.2c wg. Wegen Anpassungen an mem-logging / lib.log +# Update auf 1.8.2d Unterstützung für User-Functions -shNG_version = '1.8.2' -shNG_branch = 'master' +shNG_version = '1.8.2d' +shNG_branch = 'develop' # --------------------------------------------------------------------------------- FileBASE = None diff --git a/bin/smarthome.py b/bin/smarthome.py index 83964e0d66..cc9c1a186b 100644 --- a/bin/smarthome.py +++ b/bin/smarthome.py @@ -54,6 +54,7 @@ # https://stackoverflow.com/questions/31469707/changing-the-locale-preferred-encoding-in-python-3-in-windows + ##################################################################### # Read command line arguments ##################################################################### @@ -137,12 +138,12 @@ # Import SmartHomeNG Modules ##################################################################### #import lib.config -#import lib.connection import lib.daemon #import lib.item #import lib.log #import lib.logic #import lib.module +#import lib.network #import lib.plugin #import lib.scene #import lib.scheduler diff --git a/dev/sample_module/__init__.py b/dev/sample_module/__init__.py index cef09d4ba8..133a904829 100644 --- a/dev/sample_module/__init__.py +++ b/dev/sample_module/__init__.py @@ -22,17 +22,19 @@ import os import logging -import json -import cherrypy +# import json +# import cherrypy from lib.model.module import Module from lib.module import Modules from lib.shtime import Shtime +from lib.Utils import Utils + class SampleModule(Module): - version = '1.7.0' + version = '1.0.0' longname = '... module for SmartHomeNG' port = 0 @@ -47,8 +49,7 @@ def __init__(self, sh, testparam=''): self.logger = logging.getLogger(__name__) self._sh = sh self.shtime = Shtime.get_instance() - self.logger.debug("Module '{}': Initializing".format(self._shortname)) - + self.logger.debug(f"Module '{self._shortname}': Initializing") # Test if http module is loaded (if the module uses http) # try: @@ -63,20 +64,18 @@ def __init__(self, sh, testparam=''): # # self._showtraceback = self.mod_http._showtraceback - # get the parameters for the module (as defined in metadata module.yaml): - self.logger.debug("Module '{}': Parameters = '{}'".format(self._shortname, dict(self._parameters))) + self.logger.debug(f"Module '{self._shortname}': Parameters = '{dict(self._parameters)}'") try: # self.broker_ip = self._parameters['broker_host'] pass except KeyError as e: self.logger.critical( - "Module '{}': Inconsistent module (invalid metadata definition: {} not defined)".format(self._shortname, e)) + f"Module '{self._shortname}': Inconsistent module (invalid metadata definition: {e} not defined)") self._init_complete = False return - ip = get_local_ipv4_address() - + ip = Utils.get_local_ipv4_address() # remove line if `ip` unused def start(self): """ @@ -87,7 +86,6 @@ def start(self): """ pass - def stop(self): """ If the module has started threads or uses python modules that created threads, @@ -99,33 +97,6 @@ def stop(self): pass - -def get_local_ipv4_address(): - """ - Get's local ipv4 address of the interface with the default gateway. - Return '127.0.0.1' if no suitable interface is found - - :return: IPv4 address as a string - :rtype: string - """ - s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - try: - s.connect(('8.8.8.8', 1)) - IP = s.getsockname()[0] - except: - IP = '127.0.0.1' - finally: - s.close() - return IP - - def translate(s): + # needed for AdminUI return s - - -#import socket - -#from lib.plugin import Plugins -#from lib.utils import Utils - - diff --git a/dev/sample_module/module.yaml b/dev/sample_module/module.yaml index 3cd752a847..7c89233ccd 100644 --- a/dev/sample_module/module.yaml +++ b/dev/sample_module/module.yaml @@ -2,8 +2,8 @@ module: # Global plugin attributes classname: SampleModule - version: 1.7.0 - sh_minversion: 1.7 + version: 1.0.0 + sh_minversion: 1.8 # sh_maxversion: # maximum shNG version to use this module (leave empty if latest) # py_minversion: 3.6 # minimum Python version to use for this module # py_maxversion: # maximum Python version to use for this module (leave empty if latest) diff --git a/dev/sample_mqttplugin/__init__.py b/dev/sample_mqttplugin/__init__.py index b4baa8d9a0..aac813ddd2 100644 --- a/dev/sample_mqttplugin/__init__.py +++ b/dev/sample_mqttplugin/__init__.py @@ -25,7 +25,7 @@ # ######################################################################### -from lib.model.mqttplugin import * +from lib.model.mqttplugin import MqttPlugin from lib.item import Items from .webif import WebInterface @@ -41,7 +41,7 @@ class SampleMqttPlugin(MqttPlugin): the update functions for the items """ - PLUGIN_VERSION = '1.7.0' # (must match the version specified in plugin.yaml), use '1.0.0' for your initial plugin Release + PLUGIN_VERSION = '1.0.0' # (must match the version specified in plugin.yaml), use '1.0.0' for your initial plugin Release def __init__(self, sh): """ @@ -69,7 +69,7 @@ def __init__(self, sh): # return # if plugin should start even without web interface - self.init_webinterface() + self.init_webinterface(WebInterface) return @@ -108,7 +108,7 @@ def parse_item(self, item): can be sent to the knx with a knx write function within the knx plugin. """ if self.has_iattr(item.conf, 'foo_itemid'): - self.logger.debug("parse item: {}".format(item)) + self.logger.debug(f"parse item: {item.property.path}") # subscribe to topic for relay state # mqtt_id = self.get_iattr_value(item.conf, 'foo_itemid').upper() @@ -154,13 +154,10 @@ def update_item(self, item, caller=None, source=None, dest=None): if self.alive and caller != self.get_shortname(): # code to execute if the plugin is not stopped # and only, if the item has not been changed by this this plugin: - self.logger.info("Update item: {}, item has been changed outside this plugin".format(item.id())) + self.logger.info(f"Update item: {item.property.path}, item has been changed outside this plugin") if self.has_iattr(item.conf, 'foo_itemtag'): self.logger.debug( - "update_item was called with item '{}' from caller '{}', source '{}' and dest '{}'".format(item, - caller, - source, - dest)) + f"update_item was called with item {item.property.path} from caller {caller}, source {source} and dest {dest}") pass diff --git a/dev/sample_mqttplugin/mqtt_shelly_example_simple.py b/dev/sample_mqttplugin/mqtt_shelly_example_simple.py index d1f2a9a30e..11b30fedbc 100644 --- a/dev/sample_mqttplugin/mqtt_shelly_example_simple.py +++ b/dev/sample_mqttplugin/mqtt_shelly_example_simple.py @@ -29,8 +29,9 @@ import json from lib.module import Modules -from lib.model.mqttplugin import * +from lib.model.mqttplugin import MqttPlugin from lib.item import Items +from .webif import WebInterface class Shelly(MqttPlugin): @@ -66,8 +67,8 @@ def __init__(self, sh): # Initialization code goes here self.shelly_items = [] # to hold item information for web interface - # if plugin should start even without web interface - self.init_webinterface() + # if plugin should start even without web interface + self.init_webinterface(WebInterface) return @@ -112,7 +113,7 @@ def parse_item(self, item): can be sent to the knx with a knx write function within the knx plugin. """ if self.has_iattr(item.conf, 'shelly_id'): - self.logger.debug("parsing item: {0}".format(item.id())) + self.logger.debug(f"parsing item: {item}") shelly_id = self.get_iattr_value(item.conf, 'shelly_id').upper() shelly_type = self.get_iattr_value(item.conf, 'shelly_type').lower() @@ -125,7 +126,7 @@ def parse_item(self, item): # subscribe to topic for relay state topic = 'shellies/' + shelly_type + '-' + shelly_id + '/relay/' + shelly_relay payload_type = item.property.type - bool_values = ['off','on'] + bool_values = ['off', 'on'] self.add_subscription(topic, payload_type, bool_values, item=item) return self.update_item @@ -153,12 +154,12 @@ def update_item(self, item, caller=None, source=None, dest=None): :param source: if given it represents the source :param dest: if given it represents the dest """ - self.logger.info("update_item: {}".format(item.id())) + self.logger.info(f"update_item: {item}") if self.alive and caller != self.get_shortname(): # code to execute if the plugin is not stopped # and only, if the item has not been changed by this this plugin: - self.logger.info("update_item: {}, item has been changed outside this plugin".format(item.id())) + self.logger.info(f"update_item: {item}, item has been changed outside this plugin") # publish topic with new relay state shelly_id = self.get_iattr_value(item.conf, 'shelly_id').upper() @@ -167,118 +168,4 @@ def update_item(self, item, caller=None, source=None, dest=None): if not shelly_relay: shelly_relay = '0' topic = 'shellies/' + shelly_type + '-' + shelly_id + '/relay/' + shelly_relay + '/command' - self.publish_topic(topic, item(), item, bool_values=['off','on']) - - # ----------------------------------------------------------------------- - - def init_webinterface(self): - """" - Initialize the web interface for this plugin - - This method is only needed if the plugin is implementing a web interface - """ - try: - self.mod_http = Modules.get_instance().get_module('http') # try/except to handle running in a core version that does not support modules - except: - self.mod_http = None - if self.mod_http == None: - self.logger.error("Not initializing the web interface") - return False - - import sys - if not "SmartPluginWebIf" in list(sys.modules['lib.model.smartplugin'].__dict__): - self.logger.warning("Web interface needs SmartHomeNG v1.5 and up. Not initializing the web interface") - return False - - # set application configuration for cherrypy - webif_dir = self.path_join(self.get_plugin_dir(), 'webif') - config = { - '/': { - 'tools.staticdir.root': webif_dir, - }, - '/static': { - 'tools.staticdir.on': True, - 'tools.staticdir.dir': 'static' - } - } - - # Register the web interface as a cherrypy app - self.mod_http.register_webif(WebInterface(webif_dir, self), - self.get_shortname(), - config, - self.get_classname(), self.get_instance_name(), - description='') - - return True - - - -# ----------------------------------------------------------------------- -# Webinterface of the plugin -# ----------------------------------------------------------------------- - -import cherrypy -from jinja2 import Environment, FileSystemLoader - - -class WebInterface(SmartPluginWebIf): - - def __init__(self, webif_dir, plugin): - """ - Initialization of instance of class WebInterface - - :param webif_dir: directory where the webinterface of the plugin resides - :param plugin: instance of the plugin - :type webif_dir: str - :type plugin: object - """ - self.logger = logging.getLogger(__name__) - self.webif_dir = webif_dir - self.plugin = plugin - self.tplenv = self.init_template_environment() - - self.items = Items.get_instance() - - @cherrypy.expose - def index(self, reload=None): - """ - Build index.html for cherrypy - - Render the template and return the html file to be delivered to the browser - - :return: contents of the template after beeing rendered - """ - self.plugin.get_broker_info() - - tmpl = self.tplenv.get_template('index.html') - # add values to be passed to the Jinja2 template eg: tmpl.render(p=self.plugin, interface=interface, ...) - return tmpl.render(p=self.plugin, items=sorted(self.items.return_items(), key=lambda k: str.lower(k['_path']))) - - - @cherrypy.expose - def get_data_html(self, dataSet=None): - """ - Return data to update the webpage - - For the standard update mechanism of the web interface, the dataSet to return the data for is None - - :param dataSet: Dataset for which the data should be returned (standard: None) - :return: dict with the data needed to update the web page. - """ - if dataSet is None: - # get the new data - self.plugin.get_broker_info() - data = {} - data['broker_info'] = self.plugin._broker - data['broker_uptime'] = self.plugin.broker_uptime() - data['item_values'] = self.plugin._item_values - - # return it as json the the web page - try: - return json.dumps(data) - except Exception as e: - self.logger.error("get_data_html exception: {}".format(e)) - return {} - - return - + self.publish_topic(topic, item(), item, bool_values=['off', 'on']) diff --git a/dev/sample_mqttplugin/plugin.yaml b/dev/sample_mqttplugin/plugin.yaml index 7ed9e10da3..cd93fae97f 100644 --- a/dev/sample_mqttplugin/plugin.yaml +++ b/dev/sample_mqttplugin/plugin.yaml @@ -12,12 +12,12 @@ plugin: # documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page # support: https://knx-user-forum.de/forum/supportforen/smarthome-py - version: 1.7.0 # Plugin version - sh_minversion: 1.7 # minimum shNG version to use this plugin + version: 1.0.0 # Plugin version + sh_minversion: 1.8 # minimum shNG version to use this plugin # sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest) # py_minversion: 3.6 # minimum Python version to use for this plugin # py_maxversion: # maximum Python version to use for this plugin (leave empty if latest) - multi_instance: False # plugin supports multi instance + multi_instance: false # plugin supports multi instance restartable: unknown classname: SamplePlugin # class containing the plugin diff --git a/dev/sample_mqttplugin/webif/__init__.py b/dev/sample_mqttplugin/webif/__init__.py index 2e0335785e..6bd998cd0a 100644 --- a/dev/sample_mqttplugin/webif/__init__.py +++ b/dev/sample_mqttplugin/webif/__init__.py @@ -70,6 +70,8 @@ def index(self, reload=None): :return: contents of the template after beeing rendered """ + self.plugin.get_broker_info() + tmpl = self.tplenv.get_template('index.html') # add values to be passed to the Jinja2 template eg: tmpl.render(p=self.plugin, interface=interface, ...) return tmpl.render(p=self.plugin, @@ -89,16 +91,18 @@ def get_data_html(self, dataSet=None): """ if dataSet is None: # get the new data + self.plugin.get_broker_info() data = {} + data['broker_info'] = self.plugin._broker + data['broker_uptime'] = self.plugin.broker_uptime() + data['item_values'] = self.plugin._item_values - # data['item'] = {} - # for i in self.plugin.items: - # data['item'][i]['value'] = self.plugin.getitemvalue(i) - # # return it as json the the web page - # try: - # return json.dumps(data) - # except Exception as e: - # self.logger.error("get_data_html exception: {}".format(e)) - return {} + try: + return json.dumps(data) + except Exception as e: + self.logger.error("get_data_html exception: {}".format(e)) + return {} + + return diff --git a/dev/sample_plugin/__init__.py b/dev/sample_plugin/__init__.py index ce45afa689..8b47bbe00f 100644 --- a/dev/sample_plugin/__init__.py +++ b/dev/sample_plugin/__init__.py @@ -7,7 +7,7 @@ # https://www.smarthomeNG.de # https://knx-user-forum.de/forum/supportforen/smarthome-py # -# Sample plugin for new plugins to run with SmartHomeNG version 1.5 and +# Sample plugin for new plugins to run with SmartHomeNG version 1.8 and # upwards. # # SmartHomeNG is free software: you can redistribute it and/or modify @@ -25,7 +25,7 @@ # ######################################################################### -from lib.model.smartplugin import * +from lib.model.smartplugin import SmartPlugin from lib.item import Items from .webif import WebInterface @@ -39,9 +39,13 @@ class SamplePlugin(SmartPlugin): """ Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items + + HINT: Please have a look at the SmartPlugin class to see which + class properties and methods (class variables and class functions) + are already available! """ - PLUGIN_VERSION = '1.7.1' # (must match the version specified in plugin.yaml), use '1.0.0' for your initial plugin Release + PLUGIN_VERSION = '1.0.0' # (must match the version specified in plugin.yaml), use '1.0.0' for your initial plugin Release def __init__(self, sh): """ @@ -115,10 +119,11 @@ def parse_item(self, item): can be sent to the knx with a knx write function within the knx plugin. """ if self.has_iattr(item.conf, 'foo_itemtag'): - self.logger.debug("parse item: {}".format(item)) + self.logger.debug(f"parse item: {item}") # todo # if interesting item for sending values: + # self._itemlist.append(item) # return self.update_item def parse_logic(self, logic): @@ -145,11 +150,10 @@ def update_item(self, item, caller=None, source=None, dest=None): if self.alive and caller != self.get_shortname(): # code to execute if the plugin is not stopped # and only, if the item has not been changed by this this plugin: - self.logger.info("Update item: {}, item has been changed outside this plugin".format(item.id())) + self.logger.info(f"Update item: {item.property.path}, item has been changed outside this plugin") if self.has_iattr(item.conf, 'foo_itemtag'): - self.logger.debug("update_item was called with item '{}' from caller '{}', source '{}' and dest '{}'".format(item, - caller, source, dest)) + self.logger.debug(f"update_item was called with item {item.property.path} from caller {caller}, source {source} and dest {dest}") pass def poll_device(self): @@ -175,5 +179,3 @@ def poll_device(self): # # the source should be included when updating the the value: # item(device_value, self.get_shortname(), source=device_source_id) pass - - diff --git a/dev/sample_plugin/plugin.yaml b/dev/sample_plugin/plugin.yaml index d9248b2318..17cda20d27 100644 --- a/dev/sample_plugin/plugin.yaml +++ b/dev/sample_plugin/plugin.yaml @@ -12,12 +12,12 @@ plugin: # documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page # support: https://knx-user-forum.de/forum/supportforen/smarthome-py - version: 1.7.1 # Plugin version (must match the version specified in __init__.py) - sh_minversion: 1.5 # minimum shNG version to use this plugin + version: 1.0.0 # Plugin version (must match the version specified in __init__.py) + sh_minversion: 1.8 # minimum shNG version to use this plugin # sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest) # py_minversion: 3.6 # minimum Python version to use for this plugin # py_maxversion: # maximum Python version to use for this plugin (leave empty if latest) - multi_instance: False # plugin supports multi instance + multi_instance: false # plugin supports multi instance restartable: unknown classname: SamplePlugin # class containing the plugin @@ -45,7 +45,7 @@ parameters: param3: type: str # If 'mandatory' is specified, a 'default' attribute must not be specified - mandatory: True + mandatory: true description: de: 'Demo Parameter der angegeben werden muss' en: 'Demonstration parameter which has to be specified' diff --git a/dev/sample_plugin/user_doc.rst b/dev/sample_plugin/user_doc.rst index 18e218c0a2..fdfdbd311e 100644 --- a/dev/sample_plugin/user_doc.rst +++ b/dev/sample_plugin/user_doc.rst @@ -60,7 +60,8 @@ Hier können ausführlichere Beispiele und Anwendungsfälle beschrieben werden. Web Interface ------------- +Die Datei ``dev/sample_plugin/webif/templates/index.html`` sollte als Grundlage für Webinterfaces genutzt werden. Um Tabelleninhalte nach Spalten filtern und sortieren zu können, muss der entsprechende Code Block mit Referenz auf die relevante Table ID eingefügt werden (siehe Doku). + SmartHomeNG liefert eine Reihe Komponenten von Drittherstellern mit, die für die Gestaltung des Webinterfaces genutzt werden können. Erweiterungen dieser Komponenten usw. finden sich im Ordner ``/modules/http/webif/gstatic``. Wenn das Plugin darüber hinaus noch Komponenten benötigt, werden diese im Ordner ``webif/static`` des Plugins abgelegt. - \ No newline at end of file diff --git a/dev/sample_plugin/webif/templates/index.html b/dev/sample_plugin/webif/templates/index.html index 0d49ce7ded..421d07c4f6 100644 --- a/dev/sample_plugin/webif/templates/index.html +++ b/dev/sample_plugin/webif/templates/index.html @@ -15,14 +15,37 @@ var objResponse = JSON.parse(response); myProto = document.getElementById(dataSet); for (var device in objResponse) { - + */ } } } + + {% endblock pluginscripts %} @@ -70,7 +93,7 @@ {% endblock %} {% set tabcount = 4 %} @@ -90,6 +113,36 @@ {% block bodytab1 %}
{{ _('Hier kommt der Inhalt des Webinterfaces hin.') }} + + + + + + + + + + {% for item in p.get_items() %} + {% if p.has_iattr(item.conf, '') %} + + + + + {% endif %} + {% endfor %} + +
{{ _('Item') }}{{ _('Wert') }}
{{ item._path }}{{ item() }}
+
{% endblock bodytab1 %} diff --git a/doc/TO DO b/doc/TO DO deleted file mode 100644 index 866d9ff4e0..0000000000 --- a/doc/TO DO +++ /dev/null @@ -1,21 +0,0 @@ - -Beim Bau der v1.7.1-master Dokumentation: - -Developer Doku: -conf_to_yaml_converter.py - tool to convert shng .conf files to yaml - - -WARNING: invalid signature for automethod ('modules.admin::WebApi.') -WARNING: don't know which module to import for autodocumenting 'modules.admin::WebApi.' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name) -looking for now-outdated files... none found - - - -User Doku: -reading sources... [100%] visualisierung/visualisierung_widgets -/usr/local/shng_doc/work/doc/user/source/konfiguration/konfigurationsdateien/scenes.rst:209: WARNING: Explicit markup ends without a blank line; unexpected unindent. -/usr/local/shng_doc/work/doc/user/source/konfiguration/konfigurationsdateien/scenes.rst:220: WARNING: Explicit markup ends without a blank line; unexpected unindent. -/usr/local/shng_doc/work/doc/user/source/plugins_doc/config/ical.rst:86: WARNING: Inline strong start-string without end-string. -/usr/local/shng_doc/work/doc/user/source/plugins_doc/config/ical.rst:86: WARNING: Inline emphasis start-string without end-string. -/usr/local/shng_doc/work/doc/user/source/plugins_doc/config/yamahayxc.rst:36: WARNING: Block quote ends without a blank line; unexpected unindent. -looking for now-outdated files... none found diff --git a/doc/build_plugin_config_files.py b/doc/build_plugin_config_files.py index 3d317f25bb..a336786df8 100644 --- a/doc/build_plugin_config_files.py +++ b/doc/build_plugin_config_files.py @@ -627,11 +627,17 @@ def write_configfile(plg, configfile_dir, language='de'): if fp != '': fp += ', ' fp += par - if func_param_yaml[par].get('default', None) != None: - default = str(func_param_yaml[par].get('default', None)) - if func_param_yaml[par].get('type', 'foo') == 'str': - default = " '" + default + "'" - fp += '=' + default + if func_param_yaml[par] != None and isinstance(func_param_yaml[par], dict): + if func_param_yaml[par].get('default', None) != None: + default = str(func_param_yaml[par].get('default', None)) + if func_param_yaml[par].get('type', 'foo') == 'str': + default = " '" + default + "'" + fp += '=' + default + else: + print(f"\n\nFEHLER: Ungültige Plugin-Funktion:") + print(f"Plugin: {plgname}") + print(f"par : {par}\n") + print(f"func_param_yaml: {func_param_yaml}\n") write_heading(fh, f + '('+fp+')', 2) fh.write('\n') diff --git a/doc/developer/source/core_libraries.rst b/doc/developer/source/core_libraries.rst index 84175de16c..d04c15cf4c 100644 --- a/doc/developer/source/core_libraries.rst +++ b/doc/developer/source/core_libraries.rst @@ -30,7 +30,6 @@ Logiken verwendet werden: :maxdepth: 5 :titlesonly: - /lib/connection /lib/db /lib/logutils /lib/network diff --git a/doc/developer/source/development_plugin/libraries_plugins.rst b/doc/developer/source/development_plugin/libraries_plugins.rst index 95e71e9fed..10188b6642 100644 --- a/doc/developer/source/development_plugin/libraries_plugins.rst +++ b/doc/developer/source/development_plugin/libraries_plugins.rst @@ -9,7 +9,6 @@ The description of their functions is shown here: :maxdepth: 4 :titlesonly: - /lib/connection /lib/db /lib/logutils /lib/network diff --git a/doc/developer/source/development_plugin/webinterface_filling_webinterface.rst b/doc/developer/source/development_plugin/webinterface_filling_webinterface.rst index aece853571..7ff36ada7c 100644 --- a/doc/developer/source/development_plugin/webinterface_filling_webinterface.rst +++ b/doc/developer/source/development_plugin/webinterface_filling_webinterface.rst @@ -61,13 +61,15 @@ To bring the webinterface up to life, the following steps should be followed: 2. Modify the template **webif/templates/index.html** to display the data you want. To display a list of the items selected by the Python code above on the first tab of the body of the webinterface, insert the following code between ``{% block bodytab1 %}`` and - ``{% endblock bodytab1 %}``: + ``{% endblock bodytab1 %}``. Make sure to use correct HTML code for the tables + including ```` and ```` tags with the corresponding end tags + and to set a unique table id for every table. .. code-block:: HTML
- +
@@ -88,8 +90,30 @@ To bring the webinterface up to life, the following steps should be followed: - 3. The logo on the topleft is automatically replaced with the logo of the **plugin type**. - If the webinterface should have an individaul logo, the file with the logo must be placed in - the directory **webif/static/img** and has to be named **plugin_logo**. It may be of type **.png**, **.jpg** or **.svg**. + 3. Add the following script code between ``{% block pluginscripts %}`` and + ``{% endblock pluginscripts %}`` to enable filtering and sorting of the tables. + The code ``$('#maintable').DataTable( { "paging": false, fixedHeader: true } );`` + has to be copied for every table using the sort/filter feature! + Make sure to adapt the table id (#maintable) accordingly: + .. code-block:: HTML + + + 4. The logo on the topleft is automatically replaced with the logo of the **plugin type**. + If the webinterface should have an individaul logo, the file with the logo must be placed in + the directory **webif/static/img** and has to be named **plugin_logo**. It may be of type **.png**, **.jpg** or **.svg**. diff --git a/doc/developer/source/requirements.rst b/doc/developer/source/requirements.rst index ca2416885f..82e6891045 100644 --- a/doc/developer/source/requirements.rst +++ b/doc/developer/source/requirements.rst @@ -30,4 +30,3 @@ If using a hardware platform without buffered real time clock it is mandatory to Otherwise SmartHomeNG will not start due to missing time information. Some libraries within SmartHomeNG still use functions depending on Unix flavour. -Thus SmartHomeNG does not run on Windows and MacOS right now. diff --git a/doc/requirements.txt b/doc/requirements.txt index f81c958c61..07c78bf22d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,11 +1,29 @@ -sphinx>=3.0 +sphinx>=3.1,<4 sphinx-rtd-theme -recommonmark>=0.6.0 + +# create tabs for content for alternative ways to use like | Linux | MacOS | Windows | +# https://sphinx-tabs.readthedocs.io/en/latest/ +sphinx-tabs + +# the following extensions create collapsible parts of documentation +# sphinx-panels seem to be most extensive +#sphinx-togglebutton +#sphinx-toolbox +#sphinx-panels https://sphinx-panels.readthedocs.io/en/latest/ + +# recommonmark is marked deprecated as of April 30th, 2021 +#recommonmark>=0.6.0 +# the replacement to support Markdown like Readme.md is MyST +# see at https://www.sphinx-doc.org/en/master/usage/markdown.html and +# at https://myst-parser.readthedocs.io/en/latest/using/intro.html for a primer on MyST +myst-parser ruamel.yaml>=0.13.7,<=0.15.74;python_version<'3.7' ruamel.yaml>=0.15.0,<=0.15.74;python_version=='3.7' ruamel.yaml>=0.15.78,<=0.16.8;python_version>='3.8' -# to create pdf files install also +# to create pdf files it would be needed to install also # rst2pdf -# svglib \ No newline at end of file +# svglib +# but there is no fully working lib to convert svg to pdf currently so we can +# not create pdf files at the moment diff --git a/doc/user/source/_static/img/SmarthomeNG_V1.8.0.svg b/doc/user/source/_static/img/SmarthomeNG_V1.8.0.svg new file mode 100644 index 0000000000..c47d2b495f --- /dev/null +++ b/doc/user/source/_static/img/SmarthomeNG_V1.8.0.svg @@ -0,0 +1,2885 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hardware + + + z.B. Intel NUC, Raspberry Pi 1-3, BeagleBone, etc. oder Virtuelle Maschine + + + + + + + + + Betriebssystem + + + Linux + z.B. Debian, Raspbian, Ubuntu etc. + + + + + + + + + SmartHomeNG + + + Programmiersprache: Python3, Version >= 3.5 + + + Basispfad: /var/usr/local/smarthome + + + Konfigurationsdateien in ./etc im YAML Format: + + + + smarthome.yaml + → Geografieinformationen + + + logic.yaml + → verwendete Logiken + + + plugin.yaml + → verwendete Plugins + + + Konfigurationsdateien in ./items + + + + eine odere mehrere Dateien mit Item-Definitionen + + + Konfigurationsdateien in ./logics + + + + Je Logik eine Datei mit Python-Code z.B. + + + InitSmarthome.py + + + + + + + + + + + + + + mqtt Modul + + + + + + + + + KNX + + + + + + + Plugins + + + + + + + + + + + + + + knxd + + + Greift auf direkt angeschlossene + + + Hardware wie USB, ROT zu. Der + + + knxd kann aber auch auf + + + anderen Systemen installiert + + + sein wie z.B. Wiregate + + + + + + + + + + + + + + + + + + + + owserver + + + Greift auf direkt angeschlossene + + + Hardware zu, + + + Der owserver kann aber auch + + + auf einem anderen System + + + installiert sein wie z.B. Wiregate + + + + + + + + + + + + + + SmartVISU (HTML+PHP) + + + PHP und HTML-Dateien unter /var/html/www/smartvisu + + + · benötigt einen Webserver (Apache2, lighttpd, nginx) und PHP7 + + + · liefert über PHP Seiten die statischen HTML aus + + + · Templateengine TWIG ist Basis für die von PHP erstellten Seiten + + + · + keine + Verbindung vom Webserver aus zu SmartHomeNG + + + · Über Visu-Plugin von smarthomeNG werden Webseiten + + + auf Basis der Items erstellt: sv_widget = {{ … }}} + + + + + + + + KNX Bus + + + + + + + + IP- + + + Schnittstelle + + + + + + + + + IP- + + + Router + + + + + + + + USB + + + + + + + ROT + + + + + + + RS232 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Onewire Bus + + + + + + + + + MQTT Broker (Mosquitto) + + + + + + + USB + + + Busmaster + + + + + + + + ROT + + + + + + + + + IoT + Device + + + + + + + IoT + Device + + + + + + + IoT + Device + + + + + + + IoT + Device + + + + + + + IoT + Device + + + + + + + IoT + Device + + + + + + + + + + + + + + + + + + + + + + + + + + smartvisu + + + + + + + 1wire + + + + + + + + Mailsend + + + Senden und + + + Empfangen + + + + + + + + + UZSU + + + Universelle + + + Zeitschaltuhr + + + + + + + + + database + + + Messdaten + + + speichern + + + + + + + + + Webbrowser (Firefox, Chrome & Co.) + + + + + + + + + + + + + SmartVISU + + + bekommt das Grundgerüst der Seite über http vom + + + Webserver (Apache etc.) + + + benötigt zwingend Javascript + + + Browser ohne Websockets funktionieren nicht + + + Itemwerte; Datenlisten etc. werden JSON codiert über + + + Websocket-Verbindung übertragen + + + + + + + + + + + + + + + + + + + + + + + + Admin Interface, liefert Informationen + + + über SmartHomeNG: + + + Als Basis in Angular implementiert + + + benötigt im Browser zwingend Javascript + + + Anfragen an SmartHomeNG laufen über Ajax + + + Informationen u.a Logger, Logiken, Scheduler, Items, + + + Umgebung, etc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + InitSmarthome: + + + filename: InitSmarthome.py + + + crontab: init + + + + + + + + EG: + + + Kueche: + + + Licht: + + + name: Küchenlicht + + + type: bool + + + OG: + + + Schlafzimmer: + + + Dimmer: + + + type: num + + + + + + + + + + + + + # Airport Berlin Tegel + + + lat: 52.5588327 + + + lon: 13.2884374 + + + elev: 35 + + + tz: 'Europe/Berlin' + + + + + + + + + smartvisu: + + + plugin_name: smartvisu + + + + generate_pages: false + + + + + + + + #!/usr/bin/env python + + + import logging + + + logger = logging.getLogger(__name__) + + + logger.info('# Neustart der Logik #') + + + + + + + + + + + + +-- smartvisu + + ¦   +-- apps                        # ein paar Anwendungen für z.B. Webcam, Diashow etc. + + ¦   +-- designs                     # verschiedene Designs + + ¦   +-- driver                      # Websocket Treiber für Kommunikation mit SmartHomeNG + + ¦   +-- icons                       # Icons im SVG Format + + ¦   +-- lang                        # Formatanweisungen für verschiedene Sprachen + + ¦   +-- lib                         # Benötigte Bibliotheken + + ¦   +-- pages                       # Unterverzeichnis = Visu + ¦   ¦   +--_template# dieses Verzeichnis kopieren + ¦   ¦   ¦   +-- category.html       # + und als Basis für eigene manuell erstellte + + ¦   ¦   ¦   +-- index.html          # + Seiten verwenden + + ¦   ¦   ¦   +-- rooms.html          # + + ¦   ¦   ¦   +-- room_sleeping.html  # Schlafraum diese HMTL anpassen mit Widget + + ¦   ¦   ¦   +-- rooms_menu.html     # Hier kommen die Links auf verschiedene Räume rein + + ¦   ¦   ¦   +-- visu.css + + ¦   ¦   ¦   +-- visu.js + + ¦   ¦   +-- base                    # Basisdaten für alle Visu + + ¦   ¦   +-- docu                    # Dokumentation + + ¦   ¦   +-- example1.smarthome + + ¦   ¦   +-- example2.knxd + ¦   ¦   +-- example3.graphic¦   ¦   +-- example4.quad + ¦   ¦   +-- smarthome               # Wenn das smartvisu Plugin installiert ist, + + # werden hier die automatisch aus den Items + + # generierten Seiten abgelegt + + + # 1. Demoseite# 2. Demoseite mit knxd Treiber# 3. Demoseite mit speziellen Anforderungen# 4. Demoseite mit Aufteilung in 4 Quadranten + + + + + + + Webserver + + + Apache2NGinx + + + + + + + + + + + + + + + + TCP + + + Port 6720 + + + + + + + + + TCP + + + Port 1883 + + + + + + + + + + + TCP + + + Port 3404 + + + + + + + + TCP Port 80 + + + HTML5 + + + + + + + + + + + Datenreihen + + + speichern und + + + für Charts + + + in SmartVISU + + + bereitstellen + + + + + + + Websocket + + + + + + + + + + Aus Einträgen in den Item + + + Konfigurationsdateien der Art + + + sv_widget: {{ … }} + + + erstellt das Plugin Seiten und + + + Widgeteinträge für + + + eine fertige Visu + + + + + + + + + DLMS+SML + + + Smartmeter + + + auslesen + + + + + + + + + Telegram + + + Kurzmitteilungen + + + versenden + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http Modul + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + admin Modul + + + + + + + + + + webservicesModul + diff --git a/doc/user/source/admin/admin.rst b/doc/user/source/admin/admin.rst index a5e2e09956..5c7059a470 100644 --- a/doc/user/source/admin/admin.rst +++ b/doc/user/source/admin/admin.rst @@ -13,21 +13,8 @@ Administrations-Interface :greensup:`Update` ============================================ -Seit SmartHomeNG v1.2 steht eine graphische Oberfläche zur Verfügung, die bei der Administration -von SmartHomeNG hilft. Dazu implementiert SmartHomeNG einen eigenen Webserver, der in der Standardkonfiguration -auf **Port 8383** hört. - -Diese Oberfläche wurde bisher durch das **Backend Plugin** zur Verfügung gestellt. Das Backend Plugin ist unter -:doc:`/plugins/backend/user_doc` ausführlich beschrieben. Es wird jedoch in einer der kommenden Versionen entfernt, -da seit v1.6 ein neues graphisches Administrations-Interface zur Verfügung steht, welches eine Weiterentwicklung des -Backend Plugins ist und in der Funktionalität über die Möglichkeiten des Backend Plugins hinausgeht. - -Während das Backend Plugin vorwiegend zur Anzeige von Informationen über die SmartHomeNG Installation diente, ermöglicht -das Admin-Interface nach die vollständige Konfiguration von SmartHomeNG. - -Um einen problemlosen Übergang zu gewährleisten, steht das Backend Plugin für einen Übergangszeit weiter zur Verfügung. -Es ist als deprecated (veraltet) eingestuft und wird voraussichtlich mit v1.8 von SmartHomeNG entfernt. - +Seit SmartHomeNG v1.6 steht ein graphisches Administrations-Interface zur Verfügung, welches die vollständige +Administration von SmartHomeNG ermöglicht. Das Administrations-Interface wird durch folgenden Aufruf gestartet: @@ -37,7 +24,7 @@ Das Administrations-Interface wird durch folgenden Aufruf gestartet: Über die Systemkonfiguration kann eingestellt werden, dass ```http://:8383``` -statt wie bisher auf das Backend Plugin, auf das Administrations-Interface verweist +automatisch auf das Administrations-Interface verweist. Falls in der Konfiguration für das http Modul eine User/Passwort Kombination konfiguriert wurde, wird diese benötigt um diff --git a/doc/user/source/admin/assets/items-structtemplates.jpg b/doc/user/source/admin/assets/items-structtemplates.jpg index 4e50190137..8d418eabba 100644 Binary files a/doc/user/source/admin/assets/items-structtemplates.jpg and b/doc/user/source/admin/assets/items-structtemplates.jpg differ diff --git a/doc/user/source/admin/assets/scene-config.jpg b/doc/user/source/admin/assets/scene-config.jpg index 2fe6e83727..df99c97ade 100644 Binary files a/doc/user/source/admin/assets/scene-config.jpg and b/doc/user/source/admin/assets/scene-config.jpg differ diff --git a/doc/user/source/admin/assets/services-uf_editor.jpg b/doc/user/source/admin/assets/services-uf_editor.jpg new file mode 100644 index 0000000000..8e3e34145f Binary files /dev/null and b/doc/user/source/admin/assets/services-uf_editor.jpg differ diff --git a/doc/user/source/admin/assets/system-info.jpg b/doc/user/source/admin/assets/system-info.jpg index 19e298891f..74fe0647c9 100644 Binary files a/doc/user/source/admin/assets/system-info.jpg and b/doc/user/source/admin/assets/system-info.jpg differ diff --git a/doc/user/source/admin/dienste.rst b/doc/user/source/admin/dienste.rst index f1e69b7a02..6345e35cc9 100644 --- a/doc/user/source/admin/dienste.rst +++ b/doc/user/source/admin/dienste.rst @@ -126,3 +126,15 @@ Gelöscht werden können entweder einzelne Cache Dateien durch den **Löschen** zu löschenden Cache Dateien können mit Hilfe der Checkbox in der jeweiligen Zeile markiert werden und anschließend mit dem Button **Ausgewählte Löschen** gelöscht werden. + +Userfunction Editor +=================== + +Ab Version 1.9 von SmartHomeNG ist die Möglichkeit implementiert, benutzerdefinierte Funktionen (Userfunctions) zu +schreiben und in eval Statements sowie in Logiken zu verwenden. + +Es steht ein Editor zum erstellen und bearbeiten von Userfunctions zur Verfügung. Dieser findet sich +unter **Dienste/User-Funktionen**. + +.. image:: assets/services-uf_editor.jpg + :class: screenshot diff --git a/doc/user/source/conf.py b/doc/user/source/conf.py index 85d956ac3d..275c84477d 100644 --- a/doc/user/source/conf.py +++ b/doc/user/source/conf.py @@ -39,14 +39,20 @@ 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.githubpages', - 'recommonmark'] -# 'recommonmark', + 'sphinx_tabs.tabs', + 'myst_parser'] # 'rst2pdf.pdfbuilder'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -from recommonmark.parser import CommonMarkParser +# Markdown Support via MyST +# without the following, we will get warnings from Parsing old Readme.md as described in +# https://myst-parser.readthedocs.io/en/latest/using/howto.html#suppress-warnings +suppress_warnings = ["myst.header"] + +# Not used any more +#from recommonmark.parser import CommonMarkParser # for autostructify #import recommonmark @@ -77,7 +83,7 @@ # General information about the project. #project = u'SmartHomeNG' project = u'Anwenderdokumentation v' -copyright = u'2016-2021 SmartHomeNG Team, SmartHomeNG is based on smarthome.py © Marcus Popp' +copyright = u'2016-2021 SmartHomeNG Team - SmartHomeNG is based on smarthome.py © Marcus Popp' # The full version, including alpha/beta/rc tags. #release = '1.3a dev (as of 13. October 2017)' 13. October 2017 is replaced by makefile with a date in the form of '2. September 2017' @@ -358,4 +364,4 @@ def setup(app): pdf_fit_background_mode = 'scale' # Repeat table header on tables that cross a page boundary? -pdf_repeat_table_rows = True \ No newline at end of file +pdf_repeat_table_rows = True diff --git a/doc/user/source/dummy_for_readmes.rst b/doc/user/source/dummy_for_readmes.rst index cea3caf94e..d059ee47bf 100644 --- a/doc/user/source/dummy_for_readmes.rst +++ b/doc/user/source/dummy_for_readmes.rst @@ -14,6 +14,7 @@ /dev/sample_module/README.md /dev/sample_mqttplugin/user_doc.rst /dev/sample_plugin/user_doc.rst + /lib/connection.rst /modules/admin/README.md /modules/http/README.md /modules/mqtt/README.md diff --git a/doc/user/source/einleitung.rst b/doc/user/source/einleitung.rst index 2ac6ed7ae6..bcb8bde8d6 100644 --- a/doc/user/source/einleitung.rst +++ b/doc/user/source/einleitung.rst @@ -8,7 +8,7 @@ Einleitung ========== Übersicht über SmartHomeNG --------------------------- +---------------------------- SmartHomeNG ist ein System das als Metagateway zwischen verschiedenen "Dingen" fungiert und dient der Verbindung unterschiedlicher @@ -18,17 +18,18 @@ So ist es möglich dass die Klingel mit der Musikanlage und TV spricht, und dessen Wiedergabe unterbricht oder bei Abwesenheit eine Nachricht per Email verschickt. -Eine umfassende Entwickler-Dokumentation in englischer Sprache gibt es -unter -`www.SmartHomeNG.de/developer `__. +Eine umfassende (veraltete) Entwickler-Dokumentation in englischer Sprache gibt es +unter `www.SmartHomeNG.de/developer `__. +Nach und nach werden diese Informationen übersetztz und in die User Dokumentation +integriert. -Natürlich lebt dieses Projekt wie alles an Open Source vom mitmachen und -alle sind eingeladen, das im Rahmen ihrer Möglichkeiten zu tun. Das z.B. -kann gerne die Erweiterung eines How-To, die Kommentierung bestehenden +Natürlich lebt dieses Projekt wie alles bei Open Source vom mitmachen. +Jeder ist eingeladen im Rahmen seiner Möglichkeiten beizutragen. +Das kann gerne die Erweiterung eines How-To, die Kommentierung bestehenden Codes oder auch Beispiele sein. Wie alles zusammenhängt ------------------------ +------------------------- -.. figure:: /_static/img/SmarthomeNG_V1.7.0.svg +.. figure:: /_static/img/SmarthomeNG_V1.8.0.svg :alt: Image diff --git a/doc/user/source/entwicklung/core/core_libraries.rst b/doc/user/source/entwicklung/core/core_libraries.rst index fe037c5d84..c4237d6539 100644 --- a/doc/user/source/entwicklung/core/core_libraries.rst +++ b/doc/user/source/entwicklung/core/core_libraries.rst @@ -31,7 +31,6 @@ Die folgenden Programm Module können ebenfalls für die Plugin Entwicklung verw :maxdepth: 5 :titlesonly: - /lib/connection /lib/db /lib/logutils /lib/network diff --git a/doc/user/source/entwicklung/entwicklung.rst b/doc/user/source/entwicklung/entwicklung.rst index 63e2e1b488..cec244da02 100644 --- a/doc/user/source/entwicklung/entwicklung.rst +++ b/doc/user/source/entwicklung/entwicklung.rst @@ -5,8 +5,8 @@ .. role:: redsup -Entwicklung :redsup:`Neu` -========================= +Entwicklung +=========== Hier entsteht nach und nach der Teil der Dokumentation, welcher sich mit der Entwicklung von SmartHomeNG befasst. diff --git a/doc/user/source/entwicklung/libraries_plugins_logics.rst b/doc/user/source/entwicklung/libraries_plugins_logics.rst index ddc26883f8..f7ab83e06c 100644 --- a/doc/user/source/entwicklung/libraries_plugins_logics.rst +++ b/doc/user/source/entwicklung/libraries_plugins_logics.rst @@ -9,7 +9,6 @@ Der Aufruf der darin bereitgestellten Funktionen ist im Folgenden beschrieben: :maxdepth: 4 :titlesonly: - /lib/connection /lib/db /lib/logutils /lib/network diff --git a/doc/user/source/entwicklung/logiken/logiken.rst b/doc/user/source/entwicklung/logiken/logiken.rst index 7b9a0c425e..d15d1f5120 100644 --- a/doc/user/source/entwicklung/logiken/logiken.rst +++ b/doc/user/source/entwicklung/logiken/logiken.rst @@ -106,55 +106,125 @@ Die Zeitspanne für die zyklische Ausführung kann auf zwei Arten angegeben werd 1. Eine Zahl die die Zeitspanne in Sekunden angibt, kann optional mit einem ``s`` gekennzeichnet werden oder 2. eine Zahl gefolgt von ``m`` die eine Zeitspanne in Minuten angibt -crontab -~~~~~~~ +.. role:: bluesup + +crontab :bluesup:`Update` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. Der Inhalt der Beschreibung von crontab wurde aus referenz/items/standard_attribute/crontab.rst 1:1 kopiert + +Es gibt drei verschiedene Parametersätze für ein Crontab Attribut: + +.. tabs:: + + .. tab:: init + Das Item wird zum Start von SmarthomeNG aktualisiert und triggert + dadurch unter Umständen eine zugewiesene Logik: + + .. code-block:: yaml + + crontab: init + + Hier kann auch zusätzlich ein Offset angegeben werden um den + tatsächlichen Zeitpunkt zu verschieben: + + .. code-block:: yaml + + crontab: init+10 # 10 Sekunden nach Start + + .. tab:: Zeitpunkte + + Das Item soll zu bestimmten Zeitpunkten aktualisiert werden. + Die Schreibweise ist an Linux Crontab angelehnt, entspricht diesem aber nicht genau. + Es gibt je nach Parameteranzahl 3 Varianten: + + * ``crontab: `` + * ``crontab: `` + * ``crontab: `` + + Dabei sind je nach Variante folgende Werte zulässig: + + * Sekunde: ``0`` bis ``59`` + * Minute: ``0`` bis ``59`` + * Stunde: ``0`` bis ``23`` + * Tag: ``1`` bis ``31`` + * Monat: 1 bis 12 oder ``jan`` bis ``dec`` + * Wochentag ``0`` bis ``6`` oder ``mon``, ``tue``, ``wed``, ``thu``, ``fri``, ``sat``, ``sun`` -Ähnlich wie Unix crontab mit den folgenden Optionen: + Alle Parameter müssen durch ein Leerzeichen getrennt sein und innerhalb eines Parameters + darf kein zusätzliches Leerzeichen vorhanden sein, sonst kann der Parametersatz nicht ausgewertet werden. -* ``crontab: init`` - Ausführung der Logik beim Start von SmartHomeNG + Im folgenden Beispiel wird jeden Tag um 23:59 ein Trigger erzeugt und der Wert 70 gesetzt. -* ``crontab: Minute Stunde Tag Wochentag`` - Siehe Beschreibung von Unix crontab und Online Generatoren für Details + .. code-block:: yaml - - Minute: Wert im Bereich [0...59], oder Komma getrennte Liste, oder * (jede Minute) - - Stunde: Wert im Bereich [0...23], oder Komma getrennte Liste, oder * (jede Stunde) - - Tag: Wert im Bereich [0...28], oder Komma getrennte Liste, oder * (jeden Tag) - **Achtung**: Derzeit keine Werte für Tage größer 28 nutzen - - Wochentag: Wert im Bereich [0...6] (0 = Montag), oder Komma getrennte Liste, oder * (jeden Wochentag) + crontab: 59 23 * * = 70 -``crontab: sunrise`` - Startet die Logik bei Sonnenaufgang + Für jede dieser Zeiteinheiten (Minuten, Stunde, Tag, Wochentag) werden + folgende Muster unterstützt (Beispiel jeweils ohne Anführungszeichen verwenden): -``crontab: sunset`` - Startet die Logik bei Sonnenuntergang + * eine einzelne Zahl, z.B. ``8`` → immer zur/zum 8. Sekunde/Minute/Stunde/Tag/Wochentag + * eine Liste von Zahlen, z.B. ``2,8,16`` → immer zur/zum 2., 8. und 16. Sekunde/Minute/Stunde/Tag/Monat/Wochentag + * ein Wertebereich, z.B. ``1-5`` → immer zwischen dem/der 1. und 5. Sekunde/Minute/Stunde/Tag/Monat/Wochentag + * einen Interval, z.B. ``\*\/4`` → immer alle 4 Sekunden/Minuten/Stunden/Tage/Wochentage + * einen Stern, z.B. ``*`` → jede Sekunde/Minute/Stunde/Tag/Monat/Wochentag - Für Sonnenaufgang oder Sonnenuntergang können folgende Erweiterungen genutzt werden: + .. tab:: Zeitpunkte bezogen auf Aufgang von Sonne oder Mond - - Ein Offsetwert zum Horizont in Grad. - Beispiel ``crontab: sunset-6`` - Dazu muss in der smarthome.yaml Längen und Breitengrad eingestellt sein. - - Ein Offsetwert in Minuten der durch ein angehängtes m gekennzeichnet wird - Beispiel: ``crontab: sunset-10m`` - - Eine Beschränkung der Zeit für die Ausführung + Nach dem Muster ``[H:M<](sunrise|sunset|moonrise|moonset)[+|-][offset][ )`` kann ein Triggerpunkt bezogen + auf Sonne oder Mond berechnet werden: - .. code-block:: yaml - :caption: Konfiguration mit YAML Syntax + * ``sunrise`` → immer zum Sonnenaufgang + * ``sunset`` → immer zum Sonnenuntergang + * ``sunrise`` und untere Begrenzung → ``06:00`` und ```` + sowie der jeweiligen End-Tags. Außerdem muss jeder Tabelle eine einzigartige ID vergeben werden. .. code-block:: HTML
-
{{ _('Item') }}
+
@@ -85,4 +87,29 @@ Die folgenden Schritte dienen dazu, das Webinterface mit Leben zu füllen: - 3. Das Logo oben links auf der Seite wird automatisch durch das Logo des konfigurierten Plugin-Typs ersetzt. Wenn das Webinterface ein eigenes Logo mitbringen soll, muss das entsprechende Bild im Verzeichnis ``webif/static/img`` mit dem Namen ``plugin_logo`` abgelegt sein. Die zulässigen Dateiformate sind **.png**, **.jpg** oder **.svg**. Dabei sollte die Größe der Bilddatei die Größe des angezeigten Logos (derzeit ca. 180x150 Pixel) nicht überschreiten, um unnötige Datenübertragungen zu vermeiden. + 3. Folgender Script Code muss zwischen ``{% block pluginscripts %}`` und + ``{% endblock pluginscripts %}`` eingefügt werden, um ein Filtern und Sortieren + der Tabellen zu ermöglichen. + Der Code ``$('#maintable').DataTable( { "paging": false, fixedHeader: true } );`` + muss für jede Tabelle, für die Filtern/Sortieren ermöglicht werden soll, kopiert werden. + Dabei ist sicher zu stellen, dass die ID (#maintable) jeweils richtig angepasst wird: + + .. code-block:: HTML + + + + 4. Das Logo oben links auf der Seite wird automatisch durch das Logo des konfigurierten Plugin-Typs ersetzt. Wenn das Webinterface ein eigenes Logo mitbringen soll, muss das entsprechende Bild im Verzeichnis ``webif/static/img`` mit dem Namen ``plugin_logo`` abgelegt sein. Die zulässigen Dateiformate sind **.png**, **.jpg** oder **.svg**. Dabei sollte die Größe der Bilddatei die Größe des angezeigten Logos (derzeit ca. 180x150 Pixel) nicht überschreiten, um unnötige Datenübertragungen zu vermeiden. diff --git a/doc/user/source/index.rst b/doc/user/source/index.rst index da0254d52a..19069cb7fb 100644 --- a/doc/user/source/index.rst +++ b/doc/user/source/index.rst @@ -7,7 +7,7 @@ SmartHomeNG Anwenderdokumentation ===================== -SmartHomeNG [#f1]_ ist ein System das als Metagateway zwischen verschiedenen "Dingen" fungiert und +SmartHomeNG ist ein System das als Metagateway zwischen verschiedenen "Dingen" fungiert und dient der Verbindung unterschiedlicher Geräte-Schnittstellen. Die Standard-Schnittstelle eines Gerätes wird durch das Metagateway so um viele zusätzliche Schnittstellen erweitert. So ist es möglich dass die Klingel mit der Musikanlage und TV spricht, und dessen Wiedergabe unterbricht @@ -35,8 +35,6 @@ oder im `Chat auf gitter.im `_ . **Anmerkungen** und **Änderungswünsche** zu dieser Anwenderdokumentation bitte auf `dieser Feedback Seite `_ hinterlassen. -.. [#f1] SmartHomeNG © Copyright 2016-2020 SmartHomeNG Team, basiert auf smarthome.py © 2011-2014 Marcus Popp. - .. :titlesonly: .. toctree:: @@ -44,6 +42,7 @@ oder im `Chat auf gitter.im `_ . :hidden: einleitung.md + was_ist_neu.rst installation/installation.rst konfiguration/konfiguration.rst plugins_all.rst diff --git a/doc/user/source/installation/anforderungen.rst b/doc/user/source/installation/anforderungen.rst index 6a38737c77..602302a8a1 100644 --- a/doc/user/source/installation/anforderungen.rst +++ b/doc/user/source/installation/anforderungen.rst @@ -1,5 +1,7 @@ :tocdepth: 2 +.. index:: Linux, MacOS, Unix, Windows + Hard- u. Software Anforderungen =============================== @@ -24,6 +26,9 @@ Häufig verwendete Hardware ist: besonders wenn die Webinterfaces der Plugins genutzt werden und falls die Visualisierung (smartVISU) auf dem selben System betrieben werden sollen. Der Großteil der Nutzer verwendet diese Hardware, siehe `Umfrage `__ + Die verschiedenen Raspberry Pi Varianten wurden in diesem + `Geschwindigkeitstest `_ + miteinander verglichen. - Intel NUC (Empfohlen für Stabilität und Geschwindigkeit, auch wenn diese Rechner mehr Leistung haben, als benötigt wird. Unterstützt normale SATA Festplatten/SSD, was ein Vorteil gegenüber den Raspberry Pi @@ -42,11 +47,11 @@ virtuelle Maschine mit 512MB RAM und zwischen 40GB und 80GB Plattenplatz. -Raspberry Pi 2, 3 oder 4 -~~~~~~~~~~~~~~~~~~~~~~~~ +Raspberry Pi 3 oder 4 +~~~~~~~~~~~~~~~~~~~~~ -SmartHomeNG ist auf einem Raspberry Pi 1 zwar lauffähig, sollte dann aber nur in einer Minimalkonfiguration eingesetzt -werden. +SmartHomeNG ist auf einem Raspberry Pi 1 oder Pi 2 zwar lauffähig, sollte dann aber nur in einer Minimalkonfiguration +eingesetzt werden. Vorteile: ^^^^^^^^^ @@ -126,11 +131,11 @@ Nachteile: - es hängt sehr von der Plattform ab ob sich Nachteile ergeben -Betriebssystem --------------- +Betriebssysteme +--------------- -Ein beliebiges Linux oder Unix System (mit Shell Zugang um die Requirements und SmartHomeNG zu installieren) sollte -funktionieren. +Ein beliebiges **Linux** oder **Unix System** (mit Shell Zugang um die Requirements und SmartHomeNG zu installieren) +sollte funktionieren. SmartHomeNG ist mindestens getestet auf Raspbian und Debian Buster (amd64) @@ -139,13 +144,15 @@ Einsatz eines NTP Daemons notwendig, um die Zeit über das Internet zu beziehen. Sonst wird SmartHomeNG aufgrund der fehlenden Zeitinformation nicht starten. -Einige Libraries in SmartHomeNG benutzen noch Bibliotheken, die ein Unix-artiges Betriebssystem voraussetzen. -Daher läuft SmartHomeNG nicht auf Windows. +Einige Libraries in SmartHomeNG benutzen Bibliotheken, die ein Unix-artiges Betriebssystem voraussetzen +oder spezielle Hardware erwarten. + +Ab SmartHomeNG v1.6 sollte eine Installation unter **MacOS** (BSD Unix) möglich sein. -Ab SmartHomeNG v1.6 sollte eine Installation unter MacOS möglich sein. +Ab SmartHomeNG v1.8.2 sollte eine Installation unter **Windows** möglich sein. -weitere Software +Python Versionen ---------------- Die aktuelle Version von SmartHomeNG setzt Python der Version 3.6 oder neuer voraus. @@ -167,15 +174,27 @@ Version aktuelle Python Version und die zwei Vorgängerversionen.** "v1.7", "Python 3.7", "Python 3.5, 3.6, 3.7" "v1.8", "Python 3.8", "Python 3.6, 3.7, 3.8" "v1.9", "Python 3.9", "Python 3.7, 3.8, 3.9" + "v1.10", "Python 3.10", "Python 3.8, 3.9, 3.10" Das bedeutet nicht automatisch, dass SmartHomeNG mit älteren Python Versionen nicht mehr funktioniert, -die Entwicklung wird nur nicht mehr mit älteren Versionen getestet. +die Entwicklung wird nur nicht mehr mit älteren Versionen getestet. Zudem bekommen ältere Python Versionen keine +Bugfixes mehr sondern nur noch Sicherheits-Updates. Python 3.6 jedoch hat eine Reihe sehr interessanter Features und Verbesserungen gebracht, die nur dann in SmartHomeNG genutzt werden können, wenn sichergestellt ist dass SmartHomeNG mindestens unter Python 3.6 gestartet wurde. Daher wurde für SmartHomeNG v1.8 die **Absolute Minimum Python Version** auf 3.6 angehoben. -Debian Buster bringt aktuell Python 3.7.x und PHP 7.3 mit und Ubuntu 20.04 LTS Python 3.8.x sowie PHP 7.4 und PHP 7.3 +Beispiele für Linux-System und mitgeliefere Software Versionen: + + * Debian 9 (Stretch) beinhaltet Python 3.5 und PHP 7.0 + * Debian 10 (Buster) beinhaltet Python 3.7 und PHP 7.3 + * Debian 11 (Bullseye) beinhaltet Python 3.9 und PHP 7.4 + * Ubuntu 18.04 LTS (Bionic Beaver) beinhaltet Python 3.6 und PHP 7.2 + * Ubuntu 20.04 LTS (Focal Fossa) beinhaltet Python 3.8 und PHP 7.4 + +Aus den Beispielen ist ersichtlich, das Debian Stretch nicht mehr für Neuinstallationen verwendet werden sollte. +Bei Ubuntu sollte man die LTS (Long Term Support) Varianten bevorzugen um nicht andauern mit Systemänderungen konfrontiert zu werden -PHP wird für SmartHomeNG selbst nicht benötigt, ist jedoch eine Voraussetzung für den Einsatz von smartVISU. +PHP wird für SmartHomeNG selbst nicht benötigt, ist jedoch eine Voraussetzung für den Einsatz der +`SmartVISU `_. diff --git a/doc/user/source/installation/komplettanleitung/02_smarthomeng.rst b/doc/user/source/installation/komplettanleitung/02_smarthomeng.rst index 94020627f9..a1f346c6dd 100644 --- a/doc/user/source/installation/komplettanleitung/02_smarthomeng.rst +++ b/doc/user/source/installation/komplettanleitung/02_smarthomeng.rst @@ -61,92 +61,92 @@ Bitte auf den **Punkt** am Ende des ersten **git clone** Kommandos achten! Weitere Python Bibliotheken installieren ======================================== -Ab Version 1.7 kann SmartHomeNG benötigte Pakete selbst nachinstallieren. Eine manuelle Installation -ist daher nur bei älteren Versionen von SmartHomeNG notwendig. (Siehe nächster Abschnitt) +.. tabs:: -Wenn SmartHomeNG in einer Python Umgebung gestartet wird in der nicht der minimale Set an Packages installiert ist, -wird dieser installiert und die Informationen werden auf die Konsole ausgegeben (da das Logging dann noch nicht -konfiguriert werden kann). Anschließend startet SmartHomeNG neu. Das sieht folgendermaßen aus. + .. tab:: SmartHomeNG ab v1.7 -.. code-block:: bash + SmartHomeNG kann benötigte Pakete selbst nachinstallieren. - $ python3 bin/smarthome.py + Wenn SmartHomeNG in einer Python Umgebung gestartet wird in der nicht der minimale Set an Packages installiert ist, + wird dieser installiert und die Informationen werden auf die Konsole ausgegeben (da das Logging dann noch nicht + konfiguriert werden kann). Anschließend startet SmartHomeNG neu. Das sieht folgendermaßen aus. - test_requirements: 'ephem' not installed. Minimum v3.7 needed - test_requirements: 'holidays' not installed. Minimum v0.9.11 needed - test_requirements: 'psutil' not installed, any version needed - test_requirements: 'python-dateutil' not installed. Minimum v2.5.3 needed - test_requirements: 'requests' not installed. Minimum v2.20.0 needed - test_requirements: 'ruamel.yaml' not installed. Minimum v0.13.7 needed + .. code-block:: bash - Installing core requirements for the current user, please wait... - Running in a virtualenv environment, - installing core requirements only to actual virtualenv, please wait... + $ python3 bin/smarthome.py - core requirements installed + test_requirements: 'ephem' not installed. Minimum v3.7 needed + test_requirements: 'holidays' not installed. Minimum v0.9.11 needed + test_requirements: 'psutil' not installed, any version needed + test_requirements: 'python-dateutil' not installed. Minimum v2.5.3 needed + test_requirements: 'requests' not installed. Minimum v2.20.0 needed + test_requirements: 'ruamel.yaml' not installed. Minimum v0.13.7 needed - Starting SmartHomeNG again... - Daemon PID 4024 + Installing core requirements for the current user, please wait... + Running in a virtualenv environment, + installing core requirements only to actual virtualenv, please wait... - $ + core requirements installed -Danach kann der Core von SmartHomeNG vollständig initialisiert werden und Ausgaben erfolgen in smarthome-warnings.log + Starting SmartHomeNG again... + Daemon PID 4024 -Anschließend prüft SmartHomeNG ob die benötigten Pakete für die ladbaren Module und für die konfigurierten Plugins -installiert sind. Falls nicht, werden diese jeweils installiert und SmartHomeNG startet sich erneut. + $ -.. note:: + Danach kann der Core von SmartHomeNG vollständig initialisiert werden und Ausgaben erfolgen in smarthome-warnings.log - Dieser Mechanismus sorgt auch dafür, dass Pakete die von später konfigurierten Plugins benötigt werden, automatisch - nachinstalliert werden. + Anschließend prüft SmartHomeNG ob die benötigten Pakete für die ladbaren Module und für die konfigurierten Plugins + installiert sind. Falls nicht, werden diese jeweils installiert und SmartHomeNG startet sich erneut. + .. note:: + Dieser Mechanismus sorgt auch dafür, dass Pakete die von später konfigurierten Plugins benötigt werden, automatisch + nachinstalliert werden. -Python Bibliotheken installieren (für SmartHomeNG vor v1.7) --------------------------------------------------------------- + .. tab:: SmartHomeNG vor v1.7 -Für den ersten Start müssen noch einige Python Packages nachgeladen werden. -Im Unterordner ``requirements`` befindet sich dafür eine Datei ``base.txt``. -In dieser Datei stehen die von SmartHomeNG grundlegend benötigten Bibliotheken. -Diese können wie folgt installiert werden: + Für den ersten Start müssen noch einige Python Packages nachgeladen werden. + Im Unterordner ``requirements`` befindet sich dafür eine Datei ``base.txt``. + In dieser Datei stehen die von SmartHomeNG grundlegend benötigten Bibliotheken. + Diese können wie folgt installiert werden: -.. code-block:: bash + .. code-block:: bash - cd /usr/local/smarthome - pip3 install -r requirements/base.txt --user + cd /usr/local/smarthome + pip3 install -r requirements/base.txt --user -.. attention:: + .. attention:: - In früheren Beschreibungen wurde die globale Installation von Python Packages mit dem sudo Kommando - beschrieben: + In früheren Beschreibungen wurde die globale Installation von Python Packages mit dem sudo Kommando + beschrieben: - sudo pip3 install -r requirements/base.txt + sudo pip3 install -r requirements/base.txt - Dieses funktioniert unter Debian Buster **NICHT** mehr. Zumindest unter Buster **muss** die Installation - für den entsprechenden User mit **--user** erfolgen (wie oben beschrieben). + Dieses funktioniert unter Debian Buster **NICHT** mehr. Zumindest unter Buster **muss** die Installation + für den entsprechenden User mit **--user** erfolgen (wie oben beschrieben). -.. note:: + .. note:: - Falls mehrere Python3 Versionen installiert sind, kann es zu Problemen kommen, da pip die Bibliotheken immer nur - in eine der installierten Python 3 Versionen installiert. + Falls mehrere Python3 Versionen installiert sind, kann es zu Problemen kommen, da pip die Bibliotheken immer nur + in eine der installierten Python 3 Versionen installiert. - Um sicherzustellen, dass die Bibliotheken in die Python3 Version installiert werden, muss pip3 aus genau dieser - Python3 Umgebung aufgerufen werden. + Um sicherzustellen, dass die Bibliotheken in die Python3 Version installiert werden, muss pip3 aus genau dieser + Python3 Umgebung aufgerufen werden. - Um das sicherzustellen, ist statt + Um das sicherzustellen, ist statt - .. code-block:: bash + .. code-block:: bash - pip3 install -r requirements/base.txt --user + pip3 install -r requirements/base.txt --user - der folgende Befehl auszuführen: + der folgende Befehl auszuführen: - .. code-block:: bash + .. code-block:: bash - -m pip3 install -r requirements/base.txt --user + -m pip3 install -r requirements/base.txt --user -Jetzt ist SmartHomeNG installiert und kann konfiguriert werden. + Jetzt ist SmartHomeNG installiert und kann konfiguriert werden. Erstmaliger Start von SmartHomeNG @@ -218,8 +218,6 @@ und es wurde getestet ob SmartHomeNG läuft. - - SmartHomeNG konfigurieren ------------------------- @@ -490,4 +488,3 @@ Admin Interface Die weitere Konfiguration kann auch über die GUI erfolgen, wie im Abschnitt `SmartHomeNG konfigurieren <#smarthomeng-konfigurieren>`__ beschrieben. - diff --git a/doc/user/source/installation/komplettanleitung/04_smartvisu.rst b/doc/user/source/installation/komplettanleitung/04_smartvisu.rst index 4c60779a7c..d9c4e9923a 100644 --- a/doc/user/source/installation/komplettanleitung/04_smartvisu.rst +++ b/doc/user/source/installation/komplettanleitung/04_smartvisu.rst @@ -44,13 +44,16 @@ das für den **Apache2** Webserver zugänglich ist: chmod g+rws smartvisu/ cd smartvisu git clone git://github.com/Martin-Gleiss/smartvisu.git . + # Schreibrechte für Cache und Konfigurationsdateien setzen bash setpermissions Bitte auf den **Punkt** am Ende des **git clone** Kommandos achten! -Für den ordnungsgemäßen Betrieb braucht die SmartVISU noch das SmartHomeNG Plugin -**visu_websocket**. Dieses ist in der **plugin.yaml.default** bereits vorkonfiguriert -und wird beim ersten Start nach einer frischen Installation in die **plugin.yaml** +Eine Besonderheit des Apache Webservers ist sein spezieller Umgang mit einem Ordner namens "icons" im Root-Verzeichnis. Da smartVISU einen solchen Ordner verwendet, sollte sie immer wie oben angegeben in einem Unterverzeichnis angelegt werden, damit keine Konflikte entstehen. Dies gilt auch für Docker-Umgebungen. + +Für den ordnungsgemäßen Betrieb braucht die SmartVISU noch das SmartHomeNG Plugin **smartvisu** und das **Websocket-Modul** (oder +"visu_websocket", das aber seit v1.8 deprecated ist). Beide sind in der **plugin.yaml.default** und **module.yaml.default** bereits vorkonfiguriert +und werden beim ersten Start nach einer frischen Installation in die Einstellungen übernommen. @@ -84,17 +87,17 @@ Eigene Visu Seiten anlegen ========================== Um mit der SmartVISU eine eigene Visu anzulegen, muss innerhalb des Ordners ``pages`` der SmartVISU ein neues -Verzeichnis angelegt werden, in dem dann die eigenen Seiten z.B. für Räume oder Funktionsbereich abgelegt werden. +Verzeichnis angelegt werden, in dem dann die eigenen Seiten z.B. für Räume oder Funktionsbereiche abgelegt werden. Es existiert im Ordner ``pages`` bereits ein Unterordner ``_template``. Dieser wird als Basis der neuen Visu einfach kopiert ``cp _template ``. Für ```` sollte **nicht smarthome** gewählt werden -wenn später die Visu vom SmartHomeNG Plugin **visu\_smartvisu** erstellt werden soll. Die manuell erstellten Seiten +wenn später die Visu vom SmartHomeNG Plugin **smartvisu** erstellt werden soll. Die manuell erstellten Seiten könnten sonst einfach von SmartHomeNG überschrieben werden. Die Dateien für die SmartVISU sind einfache HTML Dateien. Die einzelnen Bedienelemente wie Buttons, Flips, Werteanzeigen (sogenannte Widgets) sind Makros die mit der Makrosprache **TWIG** definiert sind. Die HTML können auf eigene Bedürfnisse beliebig angepasst werden. -Im einzelnen ist das zwar auf der veralteten `Projektseite smartVISU `__ nachzulesen, -es wird aber empfohlen die entsprechende Dokumentation nachzuinstallieren (siehe unten). +Im einzelnen ist das zwar auf der `Projektseite smartVISU `__ nachzulesen, +es wird aber empfohlen die entsprechende Dokumentation aus GitGub nachzuinstallieren, wo immer die aktuellste Version gepflegt ist (siehe unten). Die durch die SmartVISU generierten HTML Seiten sind zwar responsiv aber durchweg statisch. Die Kommunikation zwischen SmartHomeNG und der SmartVISU erfolgt über ein Websocket Plugin für SmartHomeNG und JavaScript Code der in der HTML Seite eingebunden wird. Der Javascript Code manipuliert dann @@ -129,7 +132,10 @@ SmartHomeNG Plugin **visu\_smartvisu** sollte man sich zuerst mit der Dokumentation der smartVISU vertraut machen. Wenn man mit einem Browser die Seite einer noch nicht konfigurierten smartVISU aufruft, kommt man zu einer Inline Dokumentation der smartVISU. Eine umfassende aktuelle Kurzanleitung kann nachinstalliert werden. Wie das geht, ist weiter - unten beschrieben. + oben beschrieben. + Zudem gibt es seit smartVISU v3.0 den Widget Assistenten, mit dem die benötigten Widgets parametriert, + getestet und in die Zwischenablage kopiert werden können. Der Widget Assistent ist über das + Systemmenü zu erreichen. Mit dem Plugin **smartvisu** können aus der Definition der Items in SmartHomeNG automatisch Visuseiten erstellt werden. Diese Visu Seiten werden im Verzeichnis ``smarthome`` des ``pages`` Verzeichnisses der @@ -143,4 +149,3 @@ Es ist möglich automatisch generierte und manuell erstellte Seiten zu mischen. in unter :doc:`Visualisierung ` und in der :doc:`Dokumentation des Plugins ` beschrieben. - diff --git a/doc/user/source/installation/komplettanleitung/komplettanleitung.rst b/doc/user/source/installation/komplettanleitung/komplettanleitung.rst index ad071f9372..6b5ea56e6f 100644 --- a/doc/user/source/installation/komplettanleitung/komplettanleitung.rst +++ b/doc/user/source/installation/komplettanleitung/komplettanleitung.rst @@ -8,7 +8,7 @@ Komplettanleitung ================= -Diese Anleitung beschreibt eine komplette Installation von **SmartHomeNG v1.7** auf +Diese Anleitung beschreibt eine komplette Installation von **SmartHomeNG v1.9** auf einem Linuxsystem mit Debian 10 (Buster). Zusätzlich wird die Installation folgender weiterer Pakete beschrieben: diff --git a/doc/user/source/konfiguration/assets/uf_eval_checker1.jpg b/doc/user/source/konfiguration/assets/uf_eval_checker1.jpg new file mode 100644 index 0000000000..81a2a8ebee Binary files /dev/null and b/doc/user/source/konfiguration/assets/uf_eval_checker1.jpg differ diff --git a/doc/user/source/konfiguration/item_structs.rst b/doc/user/source/konfiguration/item_structs.rst index 7e4094cf29..223abb2233 100644 --- a/doc/user/source/konfiguration/item_structs.rst +++ b/doc/user/source/konfiguration/item_structs.rst @@ -27,6 +27,14 @@ Demzufolge können die Item-Struktur-Templates an zwei verschiedenen Stellen def - der Nutzer kann die Strukturen in der Konfigurationsdatei ../etc/struct.yaml definieren - Autoren von Plugins können die Strukturen in den Metadaten des Plugins definieren. Beim Start von SmartHomeNG stehen die dann die Strukturen aller konfigurierten Plugins zur Verfügung. +.. note:: + + Ab SmartHomeNG v1.9 können Item-Struktur-Template Definitionen auf mehrere Dateien verteilt werden. + + Außer der Datei **struct.yaml** im Verzeichnis ../etc können weitere Dateien angelegt werden. + Deren Name muss mit **struct_** beginnen. Der danach folgende Teil des Dateinamens wird dabei dem + struct Namen als Prefix vorangestellt, um Namensdopplungen vorzubeugen. + Um eine doppelte Namensvergabe zu vermeiden, wird bei der Nutzung den structs, die in Plugins definiert wurden, der Name des Plugins vorangestellt. Wenn z.B. die struct **weather** genutzt werden soll, die im Plugin **darksky** definiert wurde, so muss als Referenz **darksky.weather** angegeben werden. @@ -45,8 +53,8 @@ die Template Strukturen in der Reihenfolge angewendet, in der sie in der Liste a - mein_wetter2 - .... -struct bei Plugins -================== +struct-Templates in Plugins +=========================== Anwendung --------- @@ -84,7 +92,7 @@ Um nun die ganzen Items für die Wettervorhersage anzulegen, muss nur noch für :caption: items/item.yaml outside: - my_weather: + local_weather: struct: darksky.weather @@ -156,8 +164,8 @@ Das kann man auch in der Administrationsoberfläche sehen. -struct bei selbst definierte Item-Struktur-Templates -==================================================== +selbst definierte struct-Templates +================================== Anwendung --------- @@ -166,12 +174,12 @@ Eigens definierte Item-Struktur-Templates werden in der Konfigurationsdatei **.. Hierbei gibt die oberste Ebene den Namen der Templates an. Darunter können Item-Strukturen definiert werden, wie man es auch in der Item Definition in den items.yaml Dateien machen würde. Das folgende Beispiel zeigt die Definition von zwei -Strukturen (**my_struct_01** und **my_struct_02**): +Strukturen (**individual_struct_01** und **individual_struct_02**): .. code-block:: yaml :caption: etc/struct.yaml - my_struct_01: + individual_struct_01: name: Name der erste eigenen Item Struktur item_01: @@ -188,7 +196,7 @@ Strukturen (**my_struct_01** und **my_struct_02**): ... - my_struct_02: + individual_struct_02: name: Name der zweiten eigenen Item Struktur type: bool @@ -209,7 +217,7 @@ Wenn jetzt in der Item Definition diese Strukturen referenziert werden: my_tree: my_complex_data: name: Geänderter Name für meine komplexen Daten - struct: my_struct_01 + struct: individual_struct_01 individual_item: name: Individuelles Item @@ -225,7 +233,7 @@ entsteht im Item-Tree die selbe Struktur, als wenn man folgendes direkt in die i my_tree: my_complex_data: name: Geänderter Name für meine komplexen Daten - #struct: my_struct_01 + #struct: individual_struct_01 item_01: name: Erstes Item @@ -245,9 +253,9 @@ entsteht im Item-Tree die selbe Struktur, als wenn man folgendes direkt in die i ... -Beim Einfügen der Struktur bleibt das Attribut **struct** erhalten, so dass man zur Laufzeit sehen kann, +Beim Einfügen der Struktur bleibt das Attribut **struct** erhalten, so dass man zur Laufzeit sehen kann, dass die Struktur zumindest in Teilen aus einem Template stammt. -Die Definition des Attributes **name** aus dem Template wird durch die Angabe aus der Datei items/item.yaml ersetzt. +Die Definition des Attributes **name** aus dem Template wird durch die Angabe aus der Datei items/item.yaml ersetzt. Das **individual_item** wird an die Struktur des Templates angefügt. (Siehe :doc:`Konfigurationsdateien/struct.yaml `) @@ -278,11 +286,13 @@ Grundsätzlich werden alle Attribute zu einem Item, dass in mehreren Item YAML-D .. note:: Gibt es eine Attributdefinition an mehreren Stellen, gelten folgende Regeln: + - Beim Lesen der Item Definition gewinnt die Attributdefinition, welche zuletzt eingelesen wird. Regel: **"last wins"** - In Struktur- /Unterstrukturdefinitionen gewinnt die zuerst eingelesene Attributdefinition. Regel: **"first wins"** - Wenn ein Attribut in einem struct-Template und in den Item Definitionen definiert wird, "gewinnt" die Angabe aus der Item Definition. Regel: **"Item wins"** + Beim Auflösen von Unterstrukturen gewinnt die Definition der Struktur der oberen Ebene, wenn das Attribut in der Struktur der oberen Ebene vor dem **struct**-Attribut definiert ist. Dies ermöglicht ein "Überschreiben" von Attributwerten, die in einer Unterstruktur definiert wurden. Wenn das Attribut nach dem @@ -293,13 +303,15 @@ Re-Definieren von list-Attributen ---------------------------------- Das Verhalten bei Re-Definieren von list-Attributen ist abhängig von der Anwendung. Zu unterscheiden gilt, ob es + - ein struct in einem Item ist, oder - ein sub-struct in einem struct. .. note:: Gibt es eine Attributdefinition mit Listen an mehreren Stellen, gelten folgende Regeln: - - Bei structs/substructs werden Listen immer gemergt. - - Bei Items/structs nur, wenn dort Am Anfang einer der Spezialeinträge steht. + + - Bei structs/substructs werden Listen immer gemergt. + - Bei Items/structs nur, wenn dort Am Anfang einer der Spezialeinträge steht. Verhalten bei struct in einem Item @@ -311,6 +323,7 @@ miteinander verbunden werden. Dabei wird die Liste aus dem **struct** Template a angehängt. Dazu müssen folgende Voraussetzungen erfüllt sein: + - Das zu mergende Attribut MUSS vor dem **struct** Attribut definiert werden - Das zu mergende Attribut MUSS im Item als Liste definiert sein - Das zu mergende Attribut MUSS im Item als ersten Eintrag **merge\*** oder **merge_unique\*** enthalten @@ -327,6 +340,28 @@ werden die Listen zusammengefügt. Die Reihenfolge der Listeneinträge wird durc Attributdefinitionen eingelesen werden. +Verwendung mehrerer Definitionsdateien +====================================== + +Wenn structs in der Datei **../etc/struct.yaml** definiert werden, ist der Name der geladenen struct zur Laufzeit identisch +mit dem Namen, der in der Datei definiert wurde. + +Wenn eine Datei in einer Datei nach dem Namensschema **../etc/struct_*.yaml** definiert wird, wird dem Namen +der struct ein Präfix vorangestellt, um Namensdoppelungen zu vermeiden. Der Präfix ist der auf **struct_** +folgende Teil des Dateinamens. Wenn also eine struct mit dem Namem **individual_struct** in der Datei mit dem Namen +../etc/**struct_test**.yaml definiert wird, wird als Präfix für die Herkunft **test** vorangestellt. Der struct Name wäre +also **test.individual_struct**. + +Das könnte jedoch zu Namenskonflikten führen, falls hierbei der Name eines Plugins verwendet wird. +Falls z.B. eine struct in einer Datei ../etc/**struct_stateengine**.yaml definiert wird, könnte es zu +Namenskonflikten mit den structs kommen, die durch das **stateengine Plugin** definiert sind. Deshalb wird ein weiterer +Präfix **my** dem struct Namen vorangestellt, um Namenskonflikte mit structs aus Plugins auszuschließen. + +Die struct **individual_struct** in der Datei mit dem Namen ../etc/**struct_test**.yaml definiert wurde, +trägt zur Laufzeit also den Namen **my.test.individual_struct**. Unter diesem Namen wird sie in der Admin GUI +angezeigt und muss auch so in Item Definitionen referenziert werden. + + Beispiele ========= diff --git a/doc/user/source/konfiguration/konfiguration.rst b/doc/user/source/konfiguration/konfiguration.rst index 335b0f0550..5bf2b4115b 100644 --- a/doc/user/source/konfiguration/konfiguration.rst +++ b/doc/user/source/konfiguration/konfiguration.rst @@ -2,11 +2,12 @@ .. index:: Konfiguration .. role:: bluesup +.. role:: greensup .. role:: redsup -============= -Konfiguration -============= +================================ +Konfiguration :greensup:`Update` +================================ Für Einsteiger ist auf jeden Fall die Konfiguration über die GUI zu empfehlen. @@ -33,6 +34,7 @@ vornehmen möchten logiken.rst logging.rst szenen.rst + userfunctions.rst konfiguration_backup_restore diff --git a/doc/user/source/konfiguration/konfiguration_backup_restore.rst b/doc/user/source/konfiguration/konfiguration_backup_restore.rst index 37ccf959ca..9ceb42e7a2 100644 --- a/doc/user/source/konfiguration/konfiguration_backup_restore.rst +++ b/doc/user/source/konfiguration/konfiguration_backup_restore.rst @@ -30,7 +30,7 @@ Der Dateiname hat dann die Form **shng_config_backup_YYYY-MM-TT_hh-mm-ss.zip**. Die Sicherung von der Kommandozeile aus kann durchgeführt werden, während eine Instanz von SmartHomeNG läuft. Es ist nicht notwendig ein laufendes SmartHomeNG vorher zu beenden. -.. note:: +.. attention:: Es werden keine Konfigurationsdateien des alten .CONF Formats gesichert, sondern ausschließlich YAML Dateien. @@ -65,16 +65,19 @@ Beim sichern werden folgende Daten in das zip-Archiv übernommen: - /etc/plugin.yaml - /etc/smarthome.yaml - /etc/struct.yaml + - /etc/struct\_\*.yaml - /etc/\*.cer + - /etc/\*.pem - /etc/\*.key - - /items - alle .yaml Dateien - - /logic - alle .yaml Dateien - - /scenes - alle .yaml Dateien + - /functions\*.* + - /items\*.yaml + - /logic\*.yaml + - /scenes\*.yaml + - /scenes\*.conf -.. warning:: +.. attention:: - Zertifikats- und Key Dateien (\*.cer, \*.key) für tls/https werden in SmartHomeNG v1.6 und v1.6.1 NICHT gesichert. - Dieses erfolgt erst in höheren Releases. + Zertifikats- und Key Dateien (\*.cer, \*.pem und \*.key) für tls/https werden erst ab SmartHomeNG v1.7 gesichert. Falls SmartHomeNG mit der Option **-c** bzw. **--config_dir** gestartet wurde, so wird dieses beim Sichern und @@ -83,8 +86,12 @@ Wiederherstellen berücksichtigt. .. warning:: - Ganz ausdrücklich werden keine Daten aus dem Unterverzeichnis ``var`` gesichert. - Also keine Datenbank aus ``var/db`` oder ``var/rrd``, keine Logfiles aus ``log`` und auch keine Cache Daten aus ``var/cache`` - die via Attribut ``cache: True`` befüllt werden. + Es werden nur **Konfigurationsdaten** gesichert. + + Ganz ausdrücklich werden **keine** Daten aus dem Unterverzeichnis ``var`` gesichert. + Also keine Datenbank aus ``var/db`` oder ``var/rrd``, keine Logfiles aus ``log`` und auch keine Cache Daten + aus ``var/cache`` die via Attribut ``cache: True`` befüllt werden. + + Sollen diese Daten gesichert werden, so muß SmartHomeNG zuerst beendet und danach die gewünschten Dateie manuell + gesichert werden. - Sollen diese Daten gesichert werden, so muß SmartHomeNG zuerst beendet und danach die gewünschten Dateie manuell gesichert werden. \ No newline at end of file diff --git a/doc/user/source/konfiguration/konfiguration_ueberblick.rst b/doc/user/source/konfiguration/konfiguration_ueberblick.rst index e19e899d0b..cf7bc37631 100644 --- a/doc/user/source/konfiguration/konfiguration_ueberblick.rst +++ b/doc/user/source/konfiguration/konfiguration_ueberblick.rst @@ -44,6 +44,8 @@ Passende Editoren für Python und YAML Dateien sind z.B. | Windows | `Notepad++ `_ | | | | | | `Atom `_ | +| | | +| | `Visual Studio Code `_ | +-------------+-----------------------------------------------------------------------+ | Mac | `BBEdit `_ | | | | @@ -69,36 +71,38 @@ Verzeichnisse in SmartHomeNG Die Verzeichnisse sind im Hauptverzeichnis von SmartHomeNG zu finden, für gewöhnlich im Verzeichnis `/usr/local/smarthome``. -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| Verzeichnis | Beschreibung / Inhalt | -+==============+=============================================================================================================================+ -| ``bin`` | Hauptmodul von SmarthomeNG | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``dev`` | Grundgerüst und Infos zur Pluginentwicklung | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``doc`` | Wird einmal die Dokumentation enthalten | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``etc`` | enthält mindestens **smarthome.yaml**, **plugin.yaml** und **logic.yaml**. | -| | In diesen Dateien befindet sich die Konfiguration des Grundsystems | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``examples`` | Beispiele für Items | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``items`` | Items | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``lib`` | Modulbibliothek für das Hauptprogramm | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``logics`` | Jede Logik bekommt hier eine kleine Datei mit Python Code | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``plugins`` | Modulbibliothek für die Plugins. Jedes Plugin hat sein eigenes Unterverzeichnis | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``scenes`` | Gespeicherte Szenen | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``tests`` | Hilfsprogramme zum Testen von Modulen des Systems | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``tools`` | Hilfsprogramme | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ``var`` | Daten die vom SmartHomeNG zur Laufzeit gespeichert und gelesen werden also z.B. Logdateien, cache, sqlite Datenbank, etc. | -+--------------+-----------------------------------------------------------------------------------------------------------------------------+ ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| Verzeichnis | Beschreibung / Inhalt | ++===============+=============================================================================================================================+ +| ``bin`` | Hauptmodul von SmarthomeNG | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``dev`` | Grundgerüst und Infos zur Pluginentwicklung | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``doc`` | Wird einmal die Dokumentation enthalten | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``etc`` | enthält mindestens **smarthome.yaml**, **plugin.yaml** und **logic.yaml**. | +| | In diesen Dateien befindet sich die Konfiguration des Grundsystems | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``examples`` | Beispiele für Items | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``functions`` | In diesem Verzeichnis werden benutzerdefinierte Funktionen (Userfunctions) gespeichert | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``items`` | Items | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``lib`` | Modulbibliothek für das Hauptprogramm | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``logics`` | Jede Logik bekommt hier eine kleine Datei mit Python Code | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``plugins`` | Modulbibliothek für die Plugins. Jedes Plugin hat sein eigenes Unterverzeichnis | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``scenes`` | Gespeicherte Szenen | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``tests`` | Hilfsprogramme zum Testen von Modulen des Systems | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``tools`` | enthält Hilfsprogramme | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ``var`` | Daten die vom SmartHomeNG zur Laufzeit gespeichert und gelesen werden also z.B. Logdateien, cache, sqlite Datenbank, etc. | ++---------------+-----------------------------------------------------------------------------------------------------------------------------+ Dateien im Verzeichnis *../etc* @@ -266,6 +270,12 @@ konzentrieren kann. Weitere Informationen gibt es unter `Konfiguration - Logging `_ +Dateien im Verzeichnis *../functions* +------------------------------------- + +Hier werden benutzerdefinierte Funktionen (Userfunctions) gespeichert. + + Dateien im Verzeichnis *../items* --------------------------------- diff --git a/doc/user/source/konfiguration/konfigurationsdateien/scenes.rst b/doc/user/source/konfiguration/konfigurationsdateien/scenes.rst index 5328f8598b..42928b7d67 100644 --- a/doc/user/source/konfiguration/konfigurationsdateien/scenes.rst +++ b/doc/user/source/konfiguration/konfigurationsdateien/scenes.rst @@ -34,7 +34,8 @@ Szenen Für die Verwendung von Szenen ist eine Konfigurationsdatei für jedes 'Szenenobjekt' im Szenenverzeichnis erforderlich. Diese Dateien können im alten Szenen-Conf Format (Endung '.conf') oder im yaml Format (Endung '.yaml') erstellt werden und müssen als Dateinamen den Item-Path des Items -tragen in dem die Szene definiert ist und über das der Status der Szene gesteuert wird. +(mit der entsprechenden Dateiendung) tragen, in dem die Szene definiert ist und über das der Status der +Szene gesteuert wird. altes Konfigurationsformat @@ -108,8 +109,11 @@ Jede einzelne Aktion ist durch die Keys ``item:`` , ``value:`` und ``learn:`` de Die Verwendung von Wildcards (*) in den ``item:`` Definitionen ist nicht möglich. Der Key **item** enthält den Pfad des Items, das verändert werden soll. Der Key **value** enthält -den Wert auf den das Item gesetzt werden soll. Anstelle eines festen Wertes, kann hier auch ein -**eval** Ausdruck angegeben werden. Der Key **learn** ist optional. Wird er nicht angegeben, +den Wert auf den das Item gesetzt werden soll. Wenn dem Item Stringwerte zugewiesen werden sollen, +müssen diese zweifach in Anführungszeichen angegeben werden, z.B. ``"'Wert'"``, Zahlen können direkt +angegeben werden, und andere Werte wie z.B. Listen oder dicts müssen einfach in Anführungszeichen +stehen, z.B. ``"{'key': 'value'}"`` oder ``'["listitem1", "listitem2"]'``. Anstelle eines festen Wertes +kann hier auch ein **eval** Ausdruck angegeben werden. Der Key **learn** ist optional. Wird er nicht angegeben, wird der Wert False für **learn** angenommen. Außerdem wird der Wert für **learn** immer auf False gesetzt, wenn **value** einen Ausdruck und keinen absoluten Wert enthält. diff --git a/doc/user/source/konfiguration/konfigurationsdateien/struct.rst b/doc/user/source/konfiguration/konfigurationsdateien/struct.rst index 3dcd016533..256f2fbdb5 100644 --- a/doc/user/source/konfiguration/konfigurationsdateien/struct.rst +++ b/doc/user/source/konfiguration/konfigurationsdateien/struct.rst @@ -4,12 +4,18 @@ .. index:: structs; struct.yaml -struct.yaml -=========== +struct.yaml und struct_*.yaml +============================= In dieser Konfigurationsdatei können eigene Item-Strukturen angelegt werden, die über das **struct** Attribut als Template verwendet werden können. +Ab SmartHomeNG v1.9 können eigene Item-Strukturen auf mehrere Dateien verteilt werden. + +Außer der Datei **struct.yaml** im Verzeichnis ../etc können weitere Dateien angelegt werden. Deren +Name muss mit **struct_** beginnen. Der danach folgende Teil des Dateinamens wird dabei dem struct Namen +als Prefix vorangestellt, um Namensdopplungen vorzubeugen. + .. note:: Weitergehende Informationen zu structs sind unter :doc:`Konfiguration/struct ` und in diff --git a/doc/user/source/konfiguration/logging.rst b/doc/user/source/konfiguration/logging.rst index fe3ae94855..a8a34bd973 100644 --- a/doc/user/source/konfiguration/logging.rst +++ b/doc/user/source/konfiguration/logging.rst @@ -6,32 +6,85 @@ Logging ####### -Zur Konfiguration des Loggings mit SmartHomeNG wird seit der Version 1.2 eine Konfigurationsdatei -im YAML Format verwendet. - +Ein `Log `_ zeichnet Ergebnisse von Vorgängen oder Berechnungen auf +und dient der Dokumentation. Anhand eines Logs kann man Programmfehlern auf die Spur kommen oder bestimmte +Situationen können im Nachhinein untersucht werden. Je detaillierter ein Log geführt wird, desto einfacher +ist die Untersuchung bestimmter Sachverhalte. +Je nachdem, was man untersuchen möchte, kann man mit einem **Logging Level** im Programm vorgeben wie ernst +oder wie wichtig ein bestimmter Logeintrag ist. +Innerhalb des Kerns von SmartHomeNG finden sich zum Beispiel Einträge im Programm mit dem Log Level **NOTICE** +die in einer Logdatei dann im Ergebnis so aufgezeichnet werden: + +``2021-04-16 21:56:31 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.8.2c.4e0938c2.develop --------------------`` + +Das ist als Information zu sehen um bei Problemen Hilfe zu erhalten. Es deutet hier nichts auf Fehler oder Probleme hin. +Ein anderer Logging Befehl im Core mit dem Log Level **WARNING** erzeugt hingehen folgendes: + +``2021-04-16 21:56:32 WARNING lib.module Not loading module Mqtt from section 'mqtt': Module is disabled`` + +Das ist als Warnung gedacht um darauf hinzuweisen, das ein Module nicht geladen wird und in dieser Folge eventuell +weitere Fehler oder Probleme auftauchen könnten. Steigerungen von Warnungen sind Log Level **ERROR** oder **CRITICAL**. +Während ein **ERROR** also ein Fehler durchaus bedeuten kann das SmartHomeNG weiterarbeiten kann, bedeutet ein **CRITICAL** +also ein kritischer Fehler das das Programm beendet werden muss. +Fehlt ein für den Kern von SmartHomeNG benötigtes Modul, so stell das einen kritischen Fehler dar. + +Die Log Level in der Übersicht, absteigend in der Bedeutung für den Programmablauf: + +.. list-table:: Log Level + :header-rows: 1 + + * - Level + - Numerischer Wert + - Anmerkung + * - 50 + - CRITICAL + - kritisch, führt zumeist zum Programmabbruch + * - 40 + - ERROR + - Fehler im Programmablauf, Programm kann zumeist weiterlaufen, Funktionalität möglicherweise eingeschränkt + * - 31 + - NOTICE + - Ein Hinweis der zur grundlegenden Information dient und nicht als Warnung verstanden werden soll. + Dieser Log Level ist spezifisch für SmartHomeNG und ist im Standard Logging von Python nicht vordefiniert. + * - 30 + - WARNING + - Warnung das etwas unerwartetes passiert ist aber trotzdem weitergearbeitet werden kann + * - 20 + - INFO + - Eine Ablaufinformation die nicht unbedingt wichtig ist + * - DEBUG + - 10 + - Informationen für die Fehlersuche die normalerweise nicht benötigt werden + * - NOTSET + - 0 + - Es wird kein Logeintrag erzeugt + +Es können prinzipiell auch weitere eigene Log Level definiert werden die dann für besondere Situationen benutzt werden können. +Ein Beispiel wäre ein Log Level **VERBOSE** mit dem Wert **8** der für die Fehlersuche in einem bestimmten Bereich eines Plugins +Verwendung finden könnte. +Für SmartHomeNG ist derzeit nur **NOTICE** vordefiniert um informelle Logging Einträge zu erzeugen, die nicht als Warnung +verstanden werden sollen. Konfiguration des Loggings ========================== -Die Datei **../etc/logging.yaml** befindet sich bereits vorkonfiguriert in dem Verzeichnis. +Auf der Seite `Python Logging `_ +sind die Konfigurationsmöglichkeiten detailliert beschrieben. + +SmartHomeNG lädt beim Start die Konfiguration des Logging aus der Datei **etc/logging.yaml**. Ist diese Datei nicht vorhanden, +so versucht SmartHomeNG die Datei **etc/logging.yaml.default** zu kopieren nach **etc/logging.yaml** und dann daraus +die Konfiguration des Loggings zu laden. + +Wenn bei der Konfiguration des Loggings etwas schief geht, kann also jederzeit die Datei **etc/logging.yaml** gelöscht oder +besser umbenannt werden und wird dann beim nächsten Neustart durch den Inhalt der **etc/logging.yaml.default** frisch bereitgestellt. -Die Datei sieht so aus: +Ein Beispiel für **etc/logging.yaml.default** im Folgenden: .. literalinclude:: ../../../../etc/logging.yaml.default :caption: ../etc/logging.yaml :language: yaml - -In die Konfigurationsmöglichkeiten des Python Loggings kann sich hier eingelesen werden: -https://docs.python.org/3.4/library/logging.html#module-logging - -Die Datei **../etc/logging.yaml** hat kein SmartHomeNG spezifisches Format. Sie wird mit der -Funktion `logging.config.dictConfig()` (Bestandteil der Python Standardbibliothek) eingelesen. - -Informationen zu dieser Python Funktion und den damit verbundenen Möglichkeiten gibt es hier: -https://docs.python.org/3.4/library/logging.config.html#module-logging.config - Kurzdoku der Einträge in der Konfigurationsdatei ------------------------------------------------ @@ -89,6 +142,26 @@ Eintrag im Handler **file:** erfolgen. Der Eintrag `level: WARNING` führt dazu, Handler **file:** nur Ausgaben für Fehler und Warnungen erfolgen. INFO und DEBUG Ausgaben erfolgen dann nur noch über den zusätzlichen Handler. +| + +Logging Handler und Filter +========================== + +Zusätzlich zu den Logging Handlern, die im Standard Logging Modul von Python definiert, bringt +SmartHomeNG weitere Handler und Filter mit, die bei der Konfiguration in ../etc/logging.yaml verwendet werden +können. + +Die Beschreibung dieser Handler und Filter ist im Referenz Abschnitt unter Logging zu finden: + +.. toctree:: + +.. toctree:: + :maxdepth: 4 + :titlesonly: + + /referenz/logging/logging_handler + /referenz/logging/logging_filter + Plugin und Logik Entwicklung ============================ @@ -131,11 +204,11 @@ Logging der Veränderung von Items --------------------------------- Die Veränderung von Item Werten kann am einfachsten geloggt werden, indem bei dem Item das Attribut **log_change** gesetzt -wird und auf einen entsprechenden Item Logger verweist. Der Item Logger muss in der ../etc/logging.yaml mit Level INFO oder +wird und auf einen entsprechenden Item Logger verweist. Der Item Logger muss in der etc/logging.yaml mit Level INFO oder DEBUG definiert sein. .. code-block:: yaml - :caption: ../items/items.yaml + :caption: items/items.yaml test: item: @@ -145,9 +218,9 @@ DEBUG definiert sein. und .. code-block:: yaml - :caption: ../etc/logging.yaml + :caption: etc/logging.yaml - ... + ...- logger: items_: @@ -166,7 +239,6 @@ von RegEx Ausdrücken sucht, der wird hier :doc:`Logging - Best Practices ` -beschrieben. Zu beachten ist, dass die Konfigurationsdateien für Szenen nur eingelesen werden, wenn ein Item -gleichen Namens definiert ist und der Type dieses Items **scene** ist. +beschrieben. Zu beachten ist, dass die Konfigurationsdateien für Szenen nur eingelesen werden, wenn ein Item **pfad.item** +des Typs **scene** definiert ist und die Szenen-Datei **pfad.item.yaml** bzw. **pfad.item.conf** benannt ist. Funktionsweise von Szenen diff --git a/doc/user/source/konfiguration/userfunctions.rst b/doc/user/source/konfiguration/userfunctions.rst new file mode 100644 index 0000000000..a8389aa69c --- /dev/null +++ b/doc/user/source/konfiguration/userfunctions.rst @@ -0,0 +1,61 @@ + +.. role:: bluesup +.. role:: greensup +.. role:: redsup + +=========================== +Userfunctions :redsup:`Neu` +=========================== + +Ab Version 1.9 von SmartHomeNG ist die Möglichkeit implementiert, benutzerdefinierte Funktionen (Userfunctions) zu +schreiben und in eval Statements sowie in Logiken zu verwenden. Diese Funktionen können zur Laufzeit verändert und +neu geladen werden. + +Die Python Dateien mit den Funktionen müssen dazu im Verzeichnis **../functions** abgelegt werden. Es sind normale +Python Dateien, die mehrere Funktionen enthalten können. Als formale Anforderung sind nur Informationen zur Version +und eine kurze Beschreibung des Zwecks der Funktionen dieser Datei anzugeben. + +Im folgenden Beispiel wird eine Datei (Funktionssammlung) mit dem Namen **anhalter.py** im Verzeichnis **../functions** +erzeugt: + +Die Python Datei sieht folgendermaßen aus: + +.. code-block:: python + :caption: /usr/local/smarthome/functions/anhalter.py + + #!/usr/bin/env python3 + # anhalter.py + + _VERSION = '0.1.0' + _DESCRIPTION = 'Per Anhalter durch die Galaxis' + + def zweiundvierzig(): + + return 'Die Antwort auf die Frage aller Fragen' + + +Wenn nach dem Erstellen dieser Datei SmartHomeNG neu gestartet wird, sieht man im Warnings-Log, dass die Datei +importiert wird: + +.. code:: + + 2021-10-14 20:07:08 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.8.2d.b81166c3.develop -------------------- + 2021-10-14 20:07:08 NOTICE lib.smarthome Running in Python interpreter 'v3.8.3 final' in virtual environment, from directory /usr/local/shng_dev + 2021-10-14 20:07:08 NOTICE lib.smarthome - on Linux-4.9.0-6-amd64-x86_64-with-glibc2.17 (pid=4584) + 2021-10-14 20:07:08 NOTICE lib.smarthome - Nutze Feiertage für Land 'DE', Provinz 'HH', 1 benutzerdefinierte(r) Feiertag(e) definiert + 2021-10-14 20:07:11 NOTICE lib.userfunctions Userfunctions importiert aus 'anhalter' v0.1.0 - Per Anhalter durch die Galaxis + 2021-10-14 20:08:25 NOTICE lib.smarthome -------------------- SmartHomeNG initialization finished -------------------- + + +Nun kann man die in der Datei definierten Funktionen nutzen. Allen Userfunctions ist beim Aufruf **uf.** (für +userfunctions) gefolgt von dem Namen der Datei voranzustellen. Die Funktion **zweiundvierzig** ist also als +**uf.anhalter.zweiundvierzig()** aufzurufen. In der Admin GUI im eval Syntax Checker sieht das denn folgendermaßen +aus: + +.. image:: assets/uf_eval_checker1.jpg + :class: screenshot + +Analog können die Funtionen in **eval** Attributen in Item Definitionen und in Logiken aufgerufen werden. + +Weitere Details zu Userfunctions sind im Abschnitt :doc:`Referenz ` zu finden. + diff --git a/doc/user/source/logiken/logics.rst b/doc/user/source/logiken/logics.rst index 32c788b575..b9ee90bd8b 100644 --- a/doc/user/source/logiken/logics.rst +++ b/doc/user/source/logiken/logics.rst @@ -21,15 +21,34 @@ Die Logik-Skripte müssen im Verzeichnis **../logics** der SmartHomeNG Installat Grundlegende Struktur ===================== -Das wichtigste Objekt, dass in Logiken verwendet wird, ist **sh**. Dies ist das Smarthome-Objekt. +Das wichtigste Objekt, das in Logiken verwendet wird, ist **sh**. Dies ist das Smarthome-Objekt. Es enthält jedes Detail über die laufende SmartHomeNG Instanz. Mit diesem Objekt ist es möglich auf -alle Items, Plugins und Grundfunktionen von SmartHomeNG zuzugreifen. Um den Wert eines Items zu -erhalten, rufen Sie zum Beispiel den Namen auf: sh.path.item(). Um einen neuen Wert zu setzen, -geben Sie ihn einfach als Argument an: sh.path.item(neuer_wert). +alle Items, Plugins und Grundfunktionen von SmartHomeNG zuzugreifen. -Es ist sehr wichtig, immer mit Klammern **()** auf die Items zuzugreifen! Andernfalls würde ein -Fehler auftreten. +Zugriff auf Items und Werte +=========================== + +Um den Wert eines Items zu erhalten, rufen Sie zum Beispiel den Namen auf: sh.path.item(). +Um einen neuen Wert zu setzen, geben Sie ihn einfach als Argument an: sh.path.item(neuer_wert). + +.. attention:: + + Zuweisung von Item-Werten: + + Es ist sehr wichtig, immer mit Klammern **()** auf die Items zuzugreifen! Wenn das Item direkt + zugewiesen wird, z.B. mit sh.path.item = Wert, dann wird das item-Objekt in SmartHomeNG überschrieben. + + In diesem Fall kann die mitgelieferte Logik **check_items.py** verwendet werden, um auf Vorhandensein + entsprechend beschädigter Items zu prüfen und diese wiederherzustellen. Alternativ werden die Items nach + einem Neustart von SmartHomeNG neu erstellt. + + +Alternativ kann auch über die Item-Properties auf den Wert zugegriffen werden: sh.path.item.propery.value +gibt den Wert zurück, mit sh.path.item.property.value = Wert kann der Wert zugewiesen werden. Diese Variante +lässt sich wie eine normale Variablenzuweisung nutzen. +Beispiel +======== Eine Logik sieht prinzipiell folgendermaßen aus: diff --git a/doc/user/source/logiken/objekteundmethoden_feiertage_datum_zeit.rst b/doc/user/source/logiken/objekteundmethoden_feiertage_datum_zeit.rst index 792758027d..15811c0b85 100644 --- a/doc/user/source/logiken/objekteundmethoden_feiertage_datum_zeit.rst +++ b/doc/user/source/logiken/objekteundmethoden_feiertage_datum_zeit.rst @@ -15,7 +15,7 @@ Feiertage, Daten und Zeiten Das Modul **shtime** stellt eine Reihe von Funktionen zur Verfügung, die es erlauben festzustellen ob ein Datum ein Feiertag ist (und welcher). Dazu muss die Verwendung von Feiertagen in **/etc/holidays.yaml** konfiguriert sein. -Weiterhin gibt es Funktionen, die den Umgang mit Datums und Zeitangaben vereinfachen. +Weiterhin gibt es Funktionen, die den Umgang mit Datums- und Zeitangaben vereinfachen. Wenn eine Funktion als Parameter ein Datum oder einen Datum/Zeit Wert erwartet, kann der Parameter in einer der folgenden Formate angegeben werden: @@ -39,126 +39,131 @@ folgenden Formate angegeben werden: Die Funktionen für Feiertags- und Wochenend-Handling sind folgende: -+-------------------------------------------+---------------------------------------------------------------------------+ -| Funktion | Erläuterung | -+===========================================+===========================================================================+ -| shtime.is_holiday(date) | Liefert **True**, falls das Datum ein Feiertag (gesetzlich oder | -| | benutzerdefiniert) ist | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.is_public_holiday(date) | Liefert **True**, falls das Datum ein gesetzlicher Feiertag ist | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.holiday_name(date, as_list=False) | Liefert den Namen des Feiertags, falls das Datum ein Feiertag ist. | -| | Wenn mehrere Feiertage auf das selbe Datum fallen, werden sie Komma- | -| | getrennt zurück geleifert. Falls **as_list** auf **True** gesetzt wird, | -| | ist das Ergebnis kein String, sondern eine Liste mit den Feiertagsnamen. | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.holiday_list(year) | Liefert eine Liste aller Feiertage für ein Jahr | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.public_holiday_list(year) | Liefert eine Liste aller gesetzlichen Feiertage für ein Jahr | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.is_weekend(date) | Liefert **True**, falls das Datum auf ein Wochenende (Sa, So) fällt | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.add_custom_holiday(cust_date) | Trägt benutzerdefinierte Feiertage ein, die den Bedingungen des | -| | übergebenen **dict** cust_date entsprechen. Das **dict** hat die selbe | -| | Struktur, wie in der Definition in /etc/holidays.yaml | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.add_custom_holiday_range(from_date,| Markiert jeden Tag, beginnend mit **fromdate** bis inklusive **to_date** | -| to_date=None, holiday_name=' ') | als Ferientag mit dem angegebenen Namen | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.time_since(dt, resulttype) | Liefert die Zeitdifferenz zwischen dem angegeben Zeitpunkt **dt** und | -| | jetzt. **resulttype** gibt an, ob das Ergebnis als str (**s**) , als | -| | float Minuten (**m**), Stunden (**h**), Tagen (*+d**), als int Minuten | -| | (**im**), Stunden (**ih**), Tagen (*+id**) oder als tuple (**dhms**) bzw. | -| | (**ds**) zurück gegeben werden soll. Falls nicht angegeben, wird **s** | -| | verwendet. | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.time_until(dt, resulttype) | Liefert die Zeitdifferenz zwischen jetzt und dem angegeben Zeitpunkt | -| | **dt**. **resulttype** ist analog zu **time_since()** zu verwenden. | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.time_diff(dt1, dt2, resulttype) | Liefert die Zeitdifferenz zwischen den beiden angegebenen Zeitpunkten | -| | **dt1** und **dt2**. **resulttype** ist analog zu **time_since()** zu | -| | verwenden. | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.beginning_of_week(week, year) | Liefert das Datum des ersten Tages der angegebenen Woche. Falls **week** | -| | oder **year** nicht angegeben werden, wird der jeweils aktuelle Wert | -| | verwendet. | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.beginning_of_month(month, year) | Liefert das Datum des ersten Tages des angegebenen Monats. Falls **month**| -| | oder **year** nicht angegeben werden, wird der jeweils aktuelle Wert | -| | verwendet. | -+-------------------------------------------+---------------------------------------------------------------------------+ -| shtime.beginning_of_year(year) | Liefert das Datum des ersten Tages des angegebenen Jahres. Falls **year** | -| | nicht angegeben wird, wird das aktuelle Jahr verwendet. | -+-------------------------------------------+---------------------------------------------------------------------------+ ++------------------------------------------------+----------------------------------------------------------------------------+ +| Funktion | Erläuterung | ++================================================+============================================================================+ +| shtime.is_holiday(date) | Liefert **True**, falls das Datum ein Feiertag (gesetzlich oder | +| | benutzerdefiniert) ist | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.is_public_holiday(date) | Liefert **True**, falls das Datum ein gesetzlicher Feiertag ist | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.holiday_name(date, as_list=False) | Liefert den Namen des Feiertags, falls das Datum ein Feriertag ist. | +| | Wenn mehrere Feiertage auf das selbe Datum fallen, werden sie Komma- | +| | getrennt zurück geleifert. Falls **as_list** auf **True** gesetzt wird, | +| | ist das Ergebnis kein String, sondern eine Liste mit den Feiertagsnamen. | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.holiday_list(year) | Liefert eine Liste aller Feiertage für ein Jahr | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.public_holiday_list(year) | Liefert eine Liste aller gesetzlichen Feiertage für ein Jahr | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.is_weekend(date) | Liefert **True**, falls das Datum auf ein Wochenende (Sa, So) fällt | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.add_custom_holiday(cust_date) | Trägt benutzerdefinierte Feiertage ein, die den Bedingungen des | +| | übergebenen **dict** cust_date entsprechen. Das **dict** hat die selbe | +| | Struktur, wie in der Definition in /etc/holidays.yaml | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.add_custom_holiday_range(from_date, | Markiert jeden Tag, beginnend mit **fromdate** bis inklusive **to_date** | +| to_date=None, holiday_name=' ') | als Ferientag mit dem angegebenen Namen | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.time_since(dt, resulttype) | Liefert die Zeitdifferenz zwischen dem angegeben Zeitpunkt **dt** und | +| | jetzt. **resulttype** gibt an, ob das Ergebnis als str (**s**) , als | +| | float Minuten (**m**), Stunden (**h**), Tagen (*+d**), als int Minuten | +| | (**im**), Stunden (**ih**), Tagen (*+id**) oder als tuple (**dhms**) bzw. | +| | (**ds**) zurück gegeben werden soll. Falls nicht angegeben, wird **s** | +| | verwendet. | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.time_until(dt, resulttype) | Liefert die Zeitdifferenz zwischen jetzt und dem angegeben Zeitpunkt | +| | **dt**. **resulttype** ist analog zu **time_since()** zu verwenden. | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.time_diff(dt1, dt2, resulttype) | Liefert die Zeitdifferenz zwischen den beiden angegebenen Zeitpunkten | +| | **dt1** und **dt2**. **resulttype** ist analog zu **time_since()** zu | +| | verwenden. | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.beginning_of_week(week, year, offset) | Liefert das Datum des ersten Tages der angegebenen Woche. Falls **week** | +| | oder **year** nicht angegeben werden, wird der jeweils aktuelle Wert | +| | verwendet. **offset** ermöglicht es, den Wochenstart einer früheren oder | +| | späteren Woche zu eruieren (default 0). | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.beginning_of_month(month, year, offset) | Liefert das Datum des ersten Tages des angegebenen Monats. Falls **month** | +| | oder **year** nicht angegeben werden, wird der jeweils aktuelle Wert | +| | verwendet. **offset** ermöglicht es, den Wochenstart eines früheren oder | +| | späteren Monats zu eruieren (default 0). | ++------------------------------------------------+----------------------------------------------------------------------------+ +| shtime.beginning_of_year(year, offset) | Liefert das Datum des ersten Tages des angegebenen Jahres. Falls **year** | +| | nicht angegeben wird, wird das aktuelle Jahr verwendet. | +| | **offset** ermöglicht es, den Jahresstart eines früheren oder | +| | späteren Jahrs zu eruieren (default 0). | ++------------------------------------------------+----------------------------------------------------------------------------+ .. index:: Funktionen; Datum und Zeit Die Funktionen für das Datums-Handling sind folgende: -+---------------------------------------+---------------------------------------------------------------------------------+ -| Funktion | Erläuterung | -+=======================================+=================================================================================+ -| shtime.today() | Liefert das aktuelle Datum als **date** | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.tomorrow() | Liefert das Datum des folgenden Tages als **date** | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.yesterday() | Liefert das Datum des zurück liegenden Tages als **date** | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.beginning_of_week(week=None, | Liefert das Datum des Montags der Woche als **date** | -| year=None) | | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.beginning_of_month(month=None, | Liefert das Datum des 1. des angegebenen Monats als **date** | -| year=None) | | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.beginning_of_year(year=None) | Liefert das Datum des 1. Januar des angegebenen Jahres als **date** | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.current_year() | Liefert das aktuelle Jahr | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.current_month() | Liefert den aktuellen Monat | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.current_day() | Liefert den aktuellen Tag | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.day_of_year(date) | Liefert als Ergebnis, der wievielte Tag im Jahr das angegebene Datum ist | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.length_of_year(year) | Liefert die Anzahl Tage, die das angegebene Jahr hat | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.length_of_month(month, year) | Liefert die Anzahl Tage, die der angegebene Monat im angegebenen Jahr hat | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.calendar_week(date) | Liefert die Kalenderwoche (nach ISO), in der das angegebene Datum liegt | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.weekday(date) | Liefert den Wochentag nach ISO (1=Montag - 7=Sonntag) für das angegebene Datum | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.weekday_name(date) | Liefert den Namen des Wochentags für das angegebene Datum | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.date_transform(date) | Wandelt ein Datum welches als **date**, **datetime** oder **sting** angegeben | -| | wurde, in ein Datum vom Typ **date** | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.datetime_transform(date) | Wandelt eine Datums/Zeitangabe welche als **date**, **datetime** oder **sting** | -| | angegeben wurde, in ein eine Datums/Zeitangabe vom Typ **datetime** | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.time_since(dt, resulttype='s') | Liefert die vergangene Zeit von der angegeben Datums/Zeitangabe bis jetzt. | -| | Über den Parameter **resulttype** kann festgelegt warden, in welcher Form | -| | das Ergebnis zurück geliefert werden soll: | -| | | -| | - s -> Anzahl Sekunden | -| | - m -> Minuten (mit Nachkommastellen) | -| | - h -> Stunden (mit Nachkommastellen) | -| | - d -> Tage (mit Nachkommastellen) | -| | - im -> Anzahl Minuten (Ganzzahl) | -| | - ih -> Anzahl Stunden (Ganzzahl) | -| | - id -> Anzahl Tage (Ganzzahl) | -| | - dhms -> Tuple (, , , ) | -| | - ds -> Tuple (, ) | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.time_until(dt, resulttype='s') | Liefert die vergehende Zeit von jetzt bis zur angegeben Datums/Zeitangabe. | -| | Der Parameter **resulttype** ist bei der Funktion **shtime.time_since()** | -| | beschrieben. | -+---------------------------------------+---------------------------------------------------------------------------------+ -| shtime.time_diff(dt1, dt2, | Liefert die vergehende Zeit von jetzt bis zur angegeben Datums/Zeitangabe. | -| resulttype='s') | Der Parameter **resulttype** ist bei der Funktion **shtime.time_since()** | -| | beschrieben. | -+---------------------------------------+---------------------------------------------------------------------------------+ ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| Funktion | Erläuterung | ++===============================================+==================================================================================+ +| shtime.today(offset=0) | Liefert das aktuelle Datum als **date** | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.tomorrow() | Liefert das Datum des folgenden Tages als **date** | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.yesterday() | Liefert das Datum des zurück liegenden Tages als **date** | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.beginning_of_week(week=None, | Liefert das Datum des Montags der Woche als **date** | +| year=None, offset=0) | | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.beginning_of_month(month=None, | Liefert das Datum des 1. des angegebenen Monats als **date** | +| year=None, offset=0) | | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.beginning_of_year(year=None, offset=0) | Liefert das Datum des 1. Januar des angegebenen Jahres als **date** | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.current_year(offset=0) | Liefert das aktuelle Jahr | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.current_month(offset=0) | Liefert den aktuellen Monat | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.current_day(offset=0) | Liefert den aktuellen Tag | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.day_of_year(date=None, offset=0) | Liefert als Ergebnis, der wievielte Tag im Jahr das angegebene Datum ist | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.length_of_year(year=None, offset=0) | Liefert die Anzahl Tage, die das angegebene Jahr hat | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.length_of_month(month=None, year=None, | Liefert die Anzahl Tage, die der angegebene Monat im angegebenen Jahr hat | +| offset=0) | | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.calendar_week(date=None, offset=0) | Liefert die Kalenderwoche (nach ISO), in der das angegebene Datum liegt | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.weekday(date=None, offset=0) | Liefert den Wochentag nach ISO (1=Montag - 7=Sonntag) für das angegebene Datum | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.weekday_name(date=None, offset=0) | Liefert den Namen des Wochentags für das angegebene Datum | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.date_transform(date) | Wandelt ein Datum welches als **date**, **datetime** oder **string** angegeben | +| | wurde, in ein Datum vom Typ **date** | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.datetime_transform(date) | Wandelt eine Datums/Zeitangabe welche als **date**, **datetime** oder **string** | +| | angegeben wurde, in ein eine Datums/Zeitangabe vom Typ **datetime** | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.time_since(dt, resulttype='s') | Liefert die vergangene Zeit von der angegeben Datums/Zeitangabe bis jetzt. | +| | Über den Parameter **resulttype** kann festgelegt warden, in welcher Form | +| | das Ergebnis zurück geliefert werden soll: | +| | | +| | - s -> Anzahl Sekunden | +| | - m -> Minuten (mit Nachkommastellen) | +| | - h -> Stunden (mit Nachkommastellen) | +| | - d -> Tage (mit Nachkommastellen) | +| | - im -> Anzahl Minuten (Ganzzahl) | +| | - ih -> Anzahl Stunden (Ganzzahl) | +| | - id -> Anzahl Tage (Ganzzahl) | +| | - dhms -> Tuple (, , , ) | +| | - ds -> Tuple (, ) | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.time_until(dt, resulttype='s') | Liefert die vergehende Zeit von jetzt bis zur angegeben Datums/Zeitangabe. | +| | Der Parameter **resulttype** ist bei der Funktion **shtime.time_since()** | +| | beschrieben. | ++-----------------------------------------------+----------------------------------------------------------------------------------+ +| shtime.time_diff(dt1, dt2, | Liefert die vergehende Zeit von jetzt bis zur angegeben Datums/Zeitangabe. | +| resulttype='s') | Der Parameter **resulttype** ist bei der Funktion **shtime.time_since()** | +| | beschrieben. | ++-----------------------------------------------+----------------------------------------------------------------------------------+ .. note:: @@ -169,6 +174,11 @@ Die Funktionen für das Datums-Handling sind folgende: Funktionen, die als Parameter ein **year** und/oder **month** erwarten, können ohne diesen Parameter aufgerufen werden. Dann wird eine Liste über alle vorberechneten Feiertage zurück geliefert. + Funktionen, die als Parameter ein **offset** erwarten, können ohne diesen Parameter aufgerufen werden. Der Standardwert ist 0. + Offset ist ein positiver (für zukünftige Werte) oder negativer (für vergangene Werte) Integerwert. + Beispiel: shtime.beginning_of_week(None, -2) würde das Startdatum der vorletzten Woche liefern. + shtime.day_of_year(shtime.today(), 2) oder shtime.day_of_year(shtime.today(2)) + den Tag innerhalb des aktuellen Jahres von übermorgen. .. tip:: @@ -192,4 +202,3 @@ Die Funktionen für das Zeit-Handling sind folgende: | shtime.runtime() | Liefert die Laufzeit von SmartHomeNG, seit SmartHomeNG das letzte mal gestartet wurde. | +---------------------------------+----------------------------------------------------------------------------------------+ - diff --git a/doc/user/source/plugins_all.rst b/doc/user/source/plugins_all.rst index 67bb125bbb..894ddab446 100644 --- a/doc/user/source/plugins_all.rst +++ b/doc/user/source/plugins_all.rst @@ -22,7 +22,16 @@ in der Navigationsleiste. Hinweise auf weitere Plugins, die sich nicht im SmartHomeNG Repository befinden, sind auf der entsprechenden `Wiki Seite `_ zu finden. -Die Plugins sind in die folgenden Kategorien unterteilt: +Die Plugins sind Kategorien unterteilt, die von der Interaktion mit bzw. Ansteuerung von externen Geräten oder Diensten ableiten. + + - keine Anbindung von Geräten/Diensten: **System-Plugin** + - Ansteuerung eines Gerätes je Plugin-Instanz: **Interface-Plugin** + - Ansteuerung mehrerer Geräte je Plugin-Instanz: **Gateway-Plugin** + - reine Unterstützung von Übertragungsprotokollen: **Protokoll-Plugin** + - Anbindung von Internet-Diensten: **Web-Plugin** + + +Die Plugins und die jeweiligen Beschreibungen sind auf den folgenden Seiten aufgelistet: .. toctree:: :maxdepth: 1 diff --git a/doc/user/source/plugins_doc/plugins_web_header.rst b/doc/user/source/plugins_doc/plugins_web_header.rst index e4acd0d95c..b7525bc07d 100644 --- a/doc/user/source/plugins_doc/plugins_web_header.rst +++ b/doc/user/source/plugins_doc/plugins_web_header.rst @@ -14,7 +14,7 @@ Web/Cloud Plugins
-Ein Web- oder Cloud-Plugin implementiert den Zugriff zu lokalen Netzwerk Services oder zu +Ein Web- (oder Cloud-) Plugin implementiert den Zugriff zu lokalen Netzwerk-Services oder zu Internet Services. |br| diff --git a/doc/user/source/referenz/assets/uf_editor1.jpg b/doc/user/source/referenz/assets/uf_editor1.jpg new file mode 100644 index 0000000000..8e3e34145f Binary files /dev/null and b/doc/user/source/referenz/assets/uf_editor1.jpg differ diff --git a/doc/user/source/referenz/assets/uf_eval_checker1.jpg b/doc/user/source/referenz/assets/uf_eval_checker1.jpg new file mode 100644 index 0000000000..81a2a8ebee Binary files /dev/null and b/doc/user/source/referenz/assets/uf_eval_checker1.jpg differ diff --git a/doc/user/source/referenz/items/standard_attribute/crontab.rst b/doc/user/source/referenz/items/standard_attribute/crontab.rst index 6cee4e21ca..90366e2faf 100644 --- a/doc/user/source/referenz/items/standard_attribute/crontab.rst +++ b/doc/user/source/referenz/items/standard_attribute/crontab.rst @@ -1,94 +1,103 @@ .. index:: Standard-Attribute; crontab .. index:: crontab -crontab -======= +.. role:: bluesup -Das Item wird zum Start von SmarthomeNG aktualisiert und triggert -dadurch unter Umständen eine zugewiesene Logik: +crontab :bluesup:`Update` +=========================== -.. code-block:: yaml +Es gibt drei verschiedene Parametersätze für ein Crontab Attribut: - crontab: init +.. tabs:: -Hier kann auch zusätzlich ein Offset angegeben werden um den -tatsächlichen Zeitpunkt zu verschieben: + .. tab:: init + Das Item wird zum Start von SmarthomeNG aktualisiert und triggert + dadurch unter Umständen eine zugewiesene Logik: -.. code-block:: yaml + .. code-block:: yaml - crontab: init+10 # 10 Sekunden nach Start + crontab: init -Das Item soll zu bestimmten Zeitpunkten aktualisiert werden: + Hier kann auch zusätzlich ein Offset angegeben werden um den + tatsächlichen Zeitpunkt zu verschieben: -.. code-block:: yaml + .. code-block:: yaml - crontab: + crontab: init+10 # 10 Sekunden nach Start -Dabei sind folgende Werte zulässig: + .. tab:: Zeitpunkte - - Minute: 0 bis 59 - - Stunde: 0 bis 23 - - Tag: 1 bis 31 - - Wochentag 0 (Montag) bis 6 (Sonntag) + Das Item soll zu bestimmten Zeitpunkten aktualisiert werden. + Die Schreibweise ist an Linux Crontab angelehnt, entspricht diesem aber nicht genau. + Es gibt je nach Parameteranzahl 3 Varianten: + * ``crontab: `` + * ``crontab: `` + * ``crontab: `` -Das Item soll zu bestimmten Zeitpunkten aktualisiert und auf einen bestimmten Wert gesetzt werden: + Dabei sind je nach Variante folgende Werte zulässig: -.. code-block:: yaml + * Sekunde: ``0`` bis ``59`` + * Minute: ``0`` bis ``59`` + * Stunde: ``0`` bis ``23`` + * Tag: ``1`` bis ``31`` + * Monat: 1 bis 12 oder ``jan`` bis ``dec`` + * Wochentag ``0`` bis ``6`` oder ``mon``, ``tue``, ``wed``, ``thu``, ``fri``, ``sat``, ``sun`` - crontab: = + Alle Parameter müssen durch ein Leerzeichen getrennt sein und innerhalb eines Parameters + darf kein zusätzliches Leerzeichen vorhanden sein, sonst kann der Parametersatz nicht ausgewertet werden. - # Beispiel: Hier wird um 23:59, Jeden Tag, Jeden Wochentag ausgelöst und der Wert 70 gesetzt - # crontab: 59 23 * * = 70 + Im folgenden Beispiel wird jeden Tag um 23:59 ein Trigger erzeugt und der Wert 70 gesetzt. + .. code-block:: yaml -Für jede dieser Zeiteinheiten (Minuten, Stunde, Tag, Wochentag) werden -folgende Muster unterstützt (Beispiel jeweils ohne Anführungszeichen verwenden): + crontab: 59 23 * * = 70 -* eine einzelne Zahl, z.B. "8" (immer zur/zum 8. Minuten/Stunde/Tag/Wochentag) -* eine Liste von Zahlen, z.B. "0,8,16" (immer zur/zum 0., 8. und 16. Minute/Stunde/Tag/Wochentag) -* ein Wertebereich, z.B. "0-8" (immer zwischen dem/der 0. und 8. Minute/Stunde/Tag/Wochentag) -* einen Interval, z.B. "\*\/4" (immer alle 4 Minuten/Stunden/Tage/Wochetag) -* einen Stern, z.B. "*" (jede Minuten/Stunde/Tag/Wochentag) + Für jede dieser Zeiteinheiten (Minuten, Stunde, Tag, Wochentag) werden + folgende Muster unterstützt (Beispiel jeweils ohne Anführungszeichen verwenden): + * eine einzelne Zahl, z.B. ``8`` → immer zur/zum 8. Sekunde/Minute/Stunde/Tag/Wochentag + * eine Liste von Zahlen, z.B. ``2,8,16`` → immer zur/zum 2., 8. und 16. Sekunde/Minute/Stunde/Tag/Monat/Wochentag + * ein Wertebereich, z.B. ``1-5`` → immer zwischen dem/der 1. und 5. Sekunde/Minute/Stunde/Tag/Monat/Wochentag + * einen Interval, z.B. ``\*\/4`` → immer alle 4 Sekunden/Minuten/Stunden/Tage/Wochentage + * einen Stern, z.B. ``*`` → jede Sekunde/Minute/Stunde/Tag/Monat/Wochentag -Ausser diesem Muster wird noch ein weiteres Muster in Bezug auf den -Sonnenauf- sowie Sonnenuntergang unterstützt, z.B: + .. tab:: Zeitpunkte bezogen auf Aufgang von Sonne oder Mond -* den Wert “sunrise”, z.B. ``crontab: sunrise`` (immer zum Sonnenaufgang) -* den Wert “sunset”, z.B. ``crontab: sunset`` (immer zum Sonnenuntergang) -* den Wert (z.B. “sunrise”) und Limitierung vorher, z.B. - ``crontab: 06:00 )`` kann ein Triggerpunkt bezogen + auf Sonne oder Mond berechnet werden: + * ``sunrise`` → immer zum Sonnenaufgang + * ``sunset`` → immer zum Sonnenuntergang + * ``sunrise`` und untere Begrenzung → ``06:00** konfiguriert sein. Wertänderungen des Items werden dann mit dem Level **INFO** geloggt. + +Ab **SmartHomeNG v1.9** kann das Item Logging über die Attribute **log_level** und **log_text** an die eigenen +Bedürfnisse angepasst werden. + + +Attribut *log_level* +==================== + +Das Attribut **log_level** ermöglicht es einen anderen Loglevel für den durch **log_change** ausgelösten Log-Eintrag +festzulegen. Der angegebene Loglevel kann jeder in SmartHomeNG unterstützte Python Loglevel sein (DEBUG, INFO, WARNING, +ERROR, CRITICAL). Die Angabe kann durch den Namen oder den Integer Wert des Loglevels erfolgen. + +**Beispiel:** ``log_level: WARNING`` + + +Attribut *log_text* +=================== + +Das Attribut **log_text** ermöglicht es einen eigenen Text für den Logeintrag festzulegen. **log_text** kann dabei +eine Reihe von Variablen und eval-Ausdrücken enthalten. + + +.. attention:: + + **Achtung:** log_text darf keine Single-Quotes (``'``) enthalten! + + Falls es aufgrund des YAML Syntaxes notwendig kann der gesamte String für log_text in Single-Quotes (') + eingeschlossen werden. + + **Beispiel:** ``log_text: 'Alter={age}'`` + + + +Variablen in log_text +--------------------- + +Um den Log Text dynamisch gestalten zu können, können variable Werte in den Text String eingeschlossen werden. + +Die Variablen müssen in geschweifte Klammern eingeschlossen werden. + +**Beispiel:** ``log_text: Das Alter des Item-Wertes ist {age} Sekunden`` + +Unterstützt werden folgende Variablen/Platzhalter: + ++-----------------+------------------------------------------------------------------------------+ +| **Variable** | **Beschreibung** | ++=================+==============================================================================+ +| {value} | Aktueller Wert des Items | ++-----------------+------------------------------------------------------------------------------+ +| {caller} | Aufrufendes Objekt, welches das Item verändert | ++-----------------+------------------------------------------------------------------------------+ +| {source} | Quelle des Item Werts (oder None) | ++-----------------+------------------------------------------------------------------------------+ +| {dest} | Ziel des Wertes (oder None) | ++-----------------+------------------------------------------------------------------------------+ +| {name} | Name des Items | ++-----------------+------------------------------------------------------------------------------+ +| {age} | Alter des aktuellen Item-Wertes | ++-----------------+------------------------------------------------------------------------------+ +| {mvalue} | Über ``log_mapping`` zugewiesener Wert für den eigentlichen Item Wert | ++-----------------+------------------------------------------------------------------------------+ +| {lvalue} | Letzter Wert des Items | ++-----------------+------------------------------------------------------------------------------+ +| {mlvalue} | Über ``log_mapping`` zugewiesener Wert für den letzten Item Wert | ++-----------------+------------------------------------------------------------------------------+ +| {pname} | Name des Parent-Items | ++-----------------+------------------------------------------------------------------------------+ +| {id} | ID (Pfad) des Items | ++-----------------+------------------------------------------------------------------------------+ +| {pid} | ID (Pfad) des Parent-Items | ++-----------------+------------------------------------------------------------------------------+ +| {lowlimit} | unterer Grenzwert für Logeinträge | ++-----------------+------------------------------------------------------------------------------+ +| {highlimit} | oberer Grenzwert für Logeinträge | ++-----------------+------------------------------------------------------------------------------+ + + +eval-Ausdrücke in log_text +-------------------------- + +Zusätzlich zu den Variaben, können in den Log Text auch eval Ausdrücke eingeschlossen werden. Der Syntax dazu ist +folgender: ``{eval()}``. Dabei muss sicher gestellt sein, dass der Ausdruck ein String ist. Wenn man +zum Beispiel nur Zahlen addiert ``3+5``, muss dieser Ausdruck in **doppelte** Anführungszeichen (``"``) gesetzt werden: +``{eval("3+5")}``. + +Es können auch mehrere eval-Ausdrücke in einen Log Text eingebunden und mit Variablen konfiguriert werden. + +**Beispiel:** ``log_text: Ergebnis={eval("1+4")} für item {id}`` + + +Attribut *log_mapping* +====================== + +Über das **log_mapping** Attribut kann festgelegt werden, auf welche Werte/Strings der Wert eines Items für das +Logging gemappt werden soll. Das Attribut **log_mapping** enthält dazu in einem String die Beschreibung eines +dicts. Wobei der Key den zu übersetzenden/mappenden Wert angibt und der dazu gehörige Value des dicts den String +angeibt, der über die Variable ``{mvalue}`` ausgegeben wird. + +**Beispiel:** + +.. code-block:: yaml + + log_mapping: "{ + '1': 'Eins', + '2': 'Zwei', + '3': 'Drei' + }" + + +Attribut *log_rules* +==================== + +Über das **log_rules** Attribut kann festgelegt werden, welche zusätzliche Regeln für das Erzeugen des Log-Eintrages +anzuwenden sind. Das Attribut **log_rules** enthält dazu in einem String die Beschreibung eines dicts. + +**Beispiel:** + +.. code-block:: yaml + + log_rules: "{ + 'lowlimit' : -1.0, + 'highlimit': 10.0, + 'filter': [1, 2, 5] + }" + +Die Filter Liste hat dabei vorrang. Es wird also nur bei den Werten 1, 2 und 5 geloggt, obwohl lowlimit und +highlimit weitere Werte zulassen würden. + + +lowlimit +-------- + +``lowlimit`` ein Wert der angibt, unterhalb welchen Wertes des Items **kein** Logeintrag geschrieben werden soll. +Werte werden geschrieben, Wenn **lowlimit** <= **value** ist. + +**low_limit** kann nur auf Items vom Typ **num** angewendet werden. + + +highlimit +--------- + +``highlimit`` ein Wert der angibt, oberhalb welchen Wertes des Items **kein** Logeintrag geschrieben werden soll. +Werte werden geschrieben, Wenn **value** < **highlimit** ist. + +**highlimit** kann nur auf Items vom Typ **num** angewendet werden. + + +filter +------ + +``filter`` eine Werteliste die angibt, bei welchen Werten des Items ein Logeintrag geschrieben werden soll. + +Wenn das Item vom Typ **num** ist, muss die Liste auch numerische Werte (int oder float) enthalten +(``'filter': [1, 2, 5, 2.1]``). Falls das Item von einem anderen Datentyp ist, muss die Liste Strings +enthalten (``'filter': ['1', '2', '5']``). diff --git a/doc/user/source/referenz/items/standard_attribute/on_update.rst b/doc/user/source/referenz/items/standard_attribute/on_update.rst index 013f4cf973..45f6402006 100644 --- a/doc/user/source/referenz/items/standard_attribute/on_update.rst +++ b/doc/user/source/referenz/items/standard_attribute/on_update.rst @@ -43,7 +43,7 @@ Die Syntax ist wie folgt: Attributs den vorangegangenen Wert des Items. Wenn im **on_update** Ausdruck auf den vorangegangenen Wert des Items zugegriffen werden soll, geht das mit der Item-Methode **prev_value()** oder dem Item Property **property.last_value**. Um das Item selbst zu adressieren kann am einfachsten - die relative Adressierung mittels **sh.self.prev_value()** eingesetzt werden. + die relative Adressierung mittels **sh..self.prev_value()** eingesetzt werden. .. attention:: @@ -109,7 +109,7 @@ Wenn in **eval** Ausdrücken in **on_change** oder **on_update** Attributen auf des Items zugegriffen werden soll, muss dazu die Item Funktion **prev_value()** oder das Item Property **property.last_value** genutzt werden. Auf den alten Wert des aktuellen Items kann ohne die Angabe des vollständigen Item Pfades durch -den Ausdruck **sh.self.prev_value()** zugegriffen werden. +den Ausdruck **sh..self.prev_value()** zugegriffen werden. .. attention:: diff --git a/doc/user/source/referenz/items/standard_attribute/standard_attribute.rst b/doc/user/source/referenz/items/standard_attribute/standard_attribute.rst index b377b603b0..61164e1a1a 100644 --- a/doc/user/source/referenz/items/standard_attribute/standard_attribute.rst +++ b/doc/user/source/referenz/items/standard_attribute/standard_attribute.rst @@ -10,6 +10,10 @@ .. index:: value .. index:: Standard-Attribute; log_change .. index:: log_change +.. index:: Standard-Attribute; log_level +.. index:: log_level +.. index:: Standard-Attribute; log_text +.. index:: log_text .. index:: Standard-Attribute; name .. index:: name .. index:: Standard-Attribute; remark @@ -20,8 +24,8 @@ .. role:: bluesup -Standard Attribute -================== +Standard Attribute :bluesup:`Update` +==================================== In SmartHomeNG werden eine Reihe von Standard Attributen unterstützt. Diese sind in der folgenden @@ -34,19 +38,19 @@ plugin-spezifischen Attribute ist in der Dokumentation des jeweiligen Plugins na | **Attribut** | **Beschreibung** | +=================+========================================================================================+ | autotimer | setzt den Wert des Items nach einer Zeitspanne auf einen bestimmten Wert. | -| | **Ab SmartHomeNG v1.3** werden die Konfigurationsmöglichkeiten erweitert | +| | Ab SmartHomeNG v1.3 wurden die Konfigurationsmöglichkeiten erweitert | | | (siehe :doc:`autotimer <./autotimer>`). | +-----------------+----------------------------------------------------------------------------------------+ -| cache | Wenn 'Yes', dann wird der Wert des Items zwischengespeichert und beim | -| | erneuten Start von SmartHomeNG wird der alte Wert aus dem Zwischenspeicher | -| | geladen (vergleichbar mit dem Permanentspeicher vom HS) | +| cache | Wenn das Attribut auf **True** (oder 'Yes') gesetzt wird, dann wird der Wert des Items | +| | zwischengespeichert und beim erneuten Start von SmartHomeNG wird der alte Wert aus dem | +| | Zwischenspeicher geladen (vergleichbar mit dem Permanentspeicher vom HS) | +-----------------+----------------------------------------------------------------------------------------+ | crontab | Die Evaluierung des Items findet zu angegebenen Zeitpunkten statt (siehe | | | Beschreibung unten) | +-----------------+----------------------------------------------------------------------------------------+ | cycle | Definiert ein regelmäßiges Aufrufen des Items (und damit der verknüpften | -| | Logik oder Eval-Funktion). **Ab SmartHomeNG v1.3** werden die | -| | Konfigurationsmöglichkeiten erweitert (siehe Beschreibung unten). | +| | Logik oder Eval-Funktion). Ab SmartHomeNG v1.3 wurden die | +| | Konfigurationsmöglichkeiten erweitert (siehe :doc:`cycle <./cycle>`). | +-----------------+----------------------------------------------------------------------------------------+ | enforce_updates | Wenn das Attribut auf **True** gesetzt wird, führt jede Wertzuweisung ans Item | | | dazu, das abhängige Logiken und item Evaluationen getriggert werden, auch | @@ -70,21 +74,41 @@ plugin-spezifischen Attribute ist in der Dokumentation des jeweiligen Plugins na | | vom Typ **dict** erfolgen soll, muss unbedingt darauf geachtet werden, dass | | | der angegebene Wert in Anführungszeichen gesetzt wird, damit yaml nicht den | | | Wert nicht als Datenstruktur interpretiert. | -| | (Also folgendermaßen: **initial_value**: "{'k1': 'v1', 'k2': 'v2'}" ) | +| | (Also folgendermaßen: ``initial_value: "{'k1': 'v1', 'k2': 'v2'}"`` ) | +-----------------+----------------------------------------------------------------------------------------+ -| log_change | Ermöglicht das Loggen jeder Veränderung des Item-Wertes. **log_change** muss | -| | dazu den Namen des zu verwendeten Loggers enthalten. In **logging.yaml** | -| | muss der Logger als **items.** konfiguriert sein. Wertänderungen des | -| | Items werden dann mit dem Level INFO geloggt. **Ab SmartHomeNG v1.5** | +| log_change | Ermöglicht das Loggen jeder Veränderung des Item-Wertes. **log_change** muss dazu den | +| | Namen des zu verwendeten Loggers enthalten. In **logging.yaml** muss der Logger als | +| | **items.** konfiguriert sein. Wertänderungen des Items werden dann mit dem Level | +| | **INFO** geloggt. (siehe :doc:`log_change <./log_change>`) **Ab SmartHomeNG v1.5** | ++-----------------+----------------------------------------------------------------------------------------+ +| log_level | Ermöglicht es einen anderen Loglevel für log_change festzulegen. Der angegebene | +| | Log_level kann jeder in SmartHomeNG unterstützte Python Loglevel sein. Die Angabe kann | +| | durch den Namen oder den Integer Wert des Loglevels erfolgen. **Ab SmartHomeNG v1.9** | ++-----------------+----------------------------------------------------------------------------------------+ +| log_text | Ermöglicht es einen eigenen Text für den Logeintrag festzulegen. **log_text** kann | +| | dabei eine Reihe von Variablen und eval-Ausdrücken enthalten. **Ab SmartHomeNG v1.9** | +| | Unterstützt werden folgende Variablen: value, caller, source, dest, id, name, age, | +| | mvalue, lvalue, mlvalue, pid, pname, lowlimit, highlimit | +| | | +| | **Achtung:** log_text darf keine Single-Quotes (``'``) enthalten! | +| | Falls es aufgrund des YAML Syntaxes notwendig kann der gesamte String für log_text | +| | in Single-Quotes (``'``) eingeschlossen werden. **Beispiel:** | +| | ``log_text: 'Alter={age}'`` | ++-----------------+----------------------------------------------------------------------------------------+ +| log_mapping | Ermöglicht es im Text ein Mapping von **value** auf einen anderen Wert auszugeben | +| | (siehe :doc:`log_change <./log_change>`). **Ab SmartHomeNG v1.9** | ++-----------------+----------------------------------------------------------------------------------------+ +| log_rules | Ermöglicht es Regeln zum log_change zu definieren | +| | (siehe :doc:`log_change <./log_change>`). **Ab SmartHomeNG v1.9** | +-----------------+----------------------------------------------------------------------------------------+ | name | ein optionaler Name für das Item | +-----------------+----------------------------------------------------------------------------------------+ | on_update | Ermöglicht das setzen des Wertes anderer Items, wenn das aktuelle Item ein | | | Update erhält (auch wenn sich der Wert des aktuellen Items dabei nicht | -| | ändert). **Ab SmartHomeNG v1.4** | +| | ändert). | +-----------------+----------------------------------------------------------------------------------------+ | on_change | Ermöglicht das Setzen des Wertes anderer Items, wenn der Wert des aktuellen | -| | Items verändert wird. **Ab SmartHomeNG v1.4** | +| | Items verändert wird. | +-----------------+----------------------------------------------------------------------------------------+ | remark | ein optionaler Kommentar für das Item. Es ist sinnvoll Kommentare zu einem | | | Item als **remark** Attribut zu erfassen und nicht als Kommentar ( **#** ) | @@ -121,6 +145,7 @@ plugin-spezifischen Attribute ist in der Dokumentation des jeweiligen Plugins na enforce_updates enforce_change eval + log_change on_update struct type diff --git a/doc/user/source/referenz/logging/logging.rst b/doc/user/source/referenz/logging/logging.rst new file mode 100644 index 0000000000..f7d9266842 --- /dev/null +++ b/doc/user/source/referenz/logging/logging.rst @@ -0,0 +1,30 @@ + +.. index:: Referenz; Logging +.. Index:: Logging; Referenz + +.. role:: bluesup +.. role:: redsup + + +===================== +Logging :redsup:`Neu` +===================== + +SmartHomeNG nutzt das Logging-Modul von Python. In den folgenden Abschnitten sind Informationen zum Logging +in SmartHomeNG zu finden. + +Die vollständige zum Python Logging Modul ist unter +`logging - Logging facility for Python `_ zu finden. + +| + +.. toctree:: + :maxdepth: 4 + :hidden: + :titlesonly: + + logging_handler + logging_formatter + logging_filter + + diff --git a/doc/user/source/referenz/logging/logging_filter.rst b/doc/user/source/referenz/logging/logging_filter.rst new file mode 100644 index 0000000000..358f2daf37 --- /dev/null +++ b/doc/user/source/referenz/logging/logging_filter.rst @@ -0,0 +1,116 @@ + +.. index:: Referenz; Logging Filter +.. Index:: Logging Filter; Referenz + +.. role:: bluesup +.. role:: redsup + + +============== +Logging Filter +============== + +Mit der Hilfe von Logging Filtern kann innerhalb eines Handlers gesteuert werden, ob ein Log Record erzeugt +werden soll, oder ob die Information verworfen werden soll. + +SmartHomeNG bringt einige Logging Filter mit. + +| + +CherryPyFilter +============== + +Das im http Modul von SmartHomeNG genutzte CherryPy Modul erzeugt leider unerwartete/unerwünschte Log Einträge, +die in einigen Logs auftreten können. Um diese Log Einträge zu unterdrücken, kann der **CherryPyFilter** +genutzt werden, den das http Modul mitbringt. + +Benutzung des Filters +--------------------- + +In der Datei ``../etc/logging.yaml`` wird der **CherryPyFilter** im Abschnitt ``filters:`` zur Nutzung +konfiguriert. + +.. code-block:: yaml + + filters: + cherrypy_filter: + (): modules.http.CherryPyFilter + +Um den Filter in einem Log-Handler anzuwenden, muss der Filter noch in der Konfiguration des entsprechenden +Handlers im Abschnitt ``handlers:`` konfiguriert werden: + +.. code-block:: yaml + + handlers: + shng_details_file: + (): lib.log.ShngTimedRotatingFileHandler + formatter: shng_simple + level: DEBUG + utc: false + when: midnight + backupCount: 7 + filename: ./var/log/smarthome-details.log + encoding: utf8 + filters: [cherrypy_filter] + +| + +DuplicateFilter +=============== + +Manchmal ist es wünschenswert mehrere gleich lautende Logeinträge, die direkt aufeinander folgen zu unterdrücken +und nur den ersten Log Eintrag wirklich in das Log zu schreiben. Diese Aufgabe erfüllt der **DuplicateFilter**. + +Benutzung des Filters +--------------------- + +In der Datei ``../etc/logging.yaml`` wird der **DuplicateFilter** im Abschnitt ``filters:`` zur Nutzung +konfiguriert. + +.. code-block:: yaml + + filters: + duplicatefilter: + (): lib.logutils.DuplicateFilter + +Um den Filter in einem Log-Handler anzuwenden, muss der Filter noch in der Konfiguration des entsprechenden +Handlers im Abschnitt ``handlers:`` konfiguriert werden. + +| + +Filter +====== + +**Filter** ist ein recht universeller Filter, der über eine Reihe von Parametern konfiguriert werden kann: + + - **name**: Name des Loggers (regex) + - **module**: Loggendes Module (regex) + - **msg**: Log Message (regex) + - **timestamp**: Zeitpunkt des Logeintrages (regex) + - **invert**: Über **invert** kann das durch die obigen Parameter erzeugte Filter Ergebnis invertiert werden + +Bis auf **invert** können alle Parameter Listen von Strings sein. Diese Strings können Regular Expressions +enthalten. + +Benutzung des Filters +--------------------- + +In der Datei ``../etc/logging.yaml`` wird der **Filter** im Abschnitt ``filters:`` zur Nutzung +konfiguriert. + +.. code-block:: yaml + + filters: + duplicatefilter: + (): lib.logutils.Filter + name: [] + module: [] + msg: [] + timestamp: [] + invert: False + +Um den Filter in einem Log-Handler anzuwenden, muss der Filter noch in der Konfiguration des entsprechenden +Handlers im Abschnitt ``handlers:`` konfiguriert werden. + +| + diff --git a/doc/user/source/referenz/logging/logging_formatter.rst b/doc/user/source/referenz/logging/logging_formatter.rst new file mode 100644 index 0000000000..14e891807c --- /dev/null +++ b/doc/user/source/referenz/logging/logging_formatter.rst @@ -0,0 +1,48 @@ + +.. index:: Referenz; Logging Formatter +.. Index:: Logging Formatter; Referenz + +.. role:: bluesup +.. role:: redsup + + +================= +Logging Formatter +================= + +Mit **Logging Formattern** wird festgelegt, wie die Informationen aufbereitet werden sollen, wenn sie in ein +Log geschrieben werden. + +Der standardmäßig in SmartHomeNG verwendete Logger ist **shng_simple** und in der Konfigurationsdatei +``../etc/logging.yaml`` definiert. Dieser Logger sollte für das Warnings-Log (und möglichst auch für die weitern +Logs) verwendet werden. Er bietet einen guten Kompromiss zwischen Übersichtlichkeit/Lesbarkeit und Detailreichtum. +Die Ausgaben mit diesem Formatter helfen besonders bei Supportanfragen. + +Der **shng_simple** Formatter gibt außer der Log Message die folgenden Attribute aus: Den Zeitpunkt, den Loglevel +und den Namen des Loggers. Er ist folgendermaßen definiert: + +.. code-block:: yaml + + formatters: + + shng_simple: + format: '%(asctime)s %(levelname)-8s %(name)-19s %(message)s' + datefmt: '%Y-%m-%d %H:%M:%S' + +Wenn zusätzlich die Ausgabe der Zeitzone benötigt/gewünscht wird, kann das Datumsformat entsprechend angepasst +werden: + +.. code-block:: yaml + + formatters: + + shng_simple: + format: '%(asctime)s %(levelname)-8s %(name)-19s %(message)s' + datefmt: '%Y-%m-%d %H:%M:%S %Z' + + +Eine vollständige Liste der Attribute eines Log-Records kann in der Python Dokumentation unter +`logging - Logging facility for Python `_ nachgelesen werden. + +| + diff --git a/doc/user/source/referenz/logging/logging_handler.rst b/doc/user/source/referenz/logging/logging_handler.rst new file mode 100644 index 0000000000..7ed34facc0 --- /dev/null +++ b/doc/user/source/referenz/logging/logging_handler.rst @@ -0,0 +1,122 @@ + +.. index:: Referenz; Logging +.. Index:: Logging; Referenz + +.. role:: bluesup +.. role:: redsup + + +=============== +Logging Handler +=============== + +Zusätzlich zu den Logging Handlern, die im Standard Logging Modul von Python definiert, bringt SmartHomeNG +weitere Handler mit, die bei der Konfiguration in ../etc/logging.yaml verwendet werden können. + +| + +ShngTimedRotatingFileHandler +============================ + +Der **ShngTimedRotatingFileHandler** ist eine Variante des **TimedRotatingFileHandler**, der im Python +Logging Modul vorhanden ist (logging.handlers.TimedRotatingFileHandler). + +Der **TimedRotatingFileHandler** benennt die Backaup Versionen einer Log Datei in einer Art und Weise um, die +im Handling umständlich sein kann, da die Datei dabei die normale Extension **.log** verliert: + + smarthome-warnings.log --> smarthome-warnings.log.2021-04-06 + +Der **ShngTimedRotatingFileHandler** hat die gleiche Funktionalität und Konfigurierbarkeit wie der +**TimedRotatingFileHandler**, bildet den Namen für die Backup Dateien jedoch anders. Der Timestamp (2021-04-06) +wird nicht an das Ende des Dateinamens angefügt, sondern vor der Extenstion **.log** eingefügt: + + smarthome-warnings.log --> smarthome-warnings.2021-04-06.log + +Dadurch bleibt die normale Extension des Dateinamens erhalten und die Dateien können z.B. durch Doppel-Klick +in der GUI eines Betriebssystems geöffnet werden. + +Benutzung des Handlers +---------------------- + +In der Datei ``../etc/logging.yaml`` wird der Handler als Ersatz für **TimedRotatingFileHandler** eingesetzt. +Dort wo im Abschnitt ``handler:`` bisher der Handler **TimedRotatingFileHandler** konfiguriert ist: + +.. code-block:: yaml + + handler: + shng_warnings_file: + class: logging.handlers.TimedRotatingFileHandler + formatter: shng_simple + level: WARNING + utc: false + when: midnight + backupCount: 7 + filename: ./var/log/smarthome-warnings.log + encoding: utf8 + +wird anstelle des ``class:`` Attributes der Handler **ShngTimedRotatingFileHandler** folgendermaßen konfiguriert: + +.. code-block:: yaml + + handler: + shng_warnings_file: + (): lib.log.ShngTimedRotatingFileHandler + formatter: shng_simple + level: WARNING + utc: false + when: midnight + backupCount: 7 + filename: ./var/log/smarthome-warnings.log + encoding: utf8 + +| + +ShngMemLogHandler +================= + +In SmartHomeNG ist seit je her standardmäßig ein Memory Log konfiguriert. Dieses Memory Log ist bisher +völlig losgelöst vom Python Logging System. Das memory Log trägt den Namen 'env.core.log' und wird dazu verwendet +in der smartVISU auf der Konfigurationsseite unter 'SmartHomeNG' Log Einträge anzuzeigen. Das Memory Log +'env.core.log' kann auch mit Hilfe des **cli** Plugins angezeigt werden. + +Weitere Memory Logs (die bisher mit dem **memlog** Plugin angelegt werden konnten/mussten) können in der smartVISU +mit Hilfe der Widgets **status.log** und des **cli** Plugins angezeigt werden. + +Mit Hilfe des **ShngMemLogHandler** können nun normale Log Einträge, die über das Standard Python Logging erzeugt +werden, in ein Memory Log geloggt werden. Der **ShngMemLogHandler** legt dazu ein entsprechendes Memory Log an +und der Handler wird in den konfigurierten Loggern als (zusätzlicher) Logger konfiguriert. + +Benutzung des Handlers +---------------------- + +In der Datei ``../etc/logging.yaml`` wird der **ShngMemLogHandler** im Abschnitt ``handler:`` konfiguriert. + +.. code-block:: yaml + + handler: + memory_heizung: + (): lib.log.ShngMemLogHandler + logname: mem_heiz + maxlen: 60 + level: INFO + + +**ShngMemLogHandler** hat zwei Parameter: + + - ``logname:`` - Legt den Namen fest, unter dem das Memory Log aus der smartVISU oder dem **cli** Plugin + angesprochen werden kann. + - ``maxlen:`` - Legt fest, wie viele Einträge ein Memory Log aufnehmen kann, bevor der älteste Eintrag + gelöscht wird. + - ``level:`` - Legt den minmalen Log Level fest, der in das Memory Log geschrieben wird + +| + +Um den Handler im Python Logging zu nutzen, wird es anschließend der Handler zum gewünschten Logger hinzu +gefügt. + +.. code-block:: yaml + + loggers: + heizung: + handlers: [shng_heizung_file, memory_heizung] + diff --git a/doc/user/source/referenz/metadata/item_attribute_prefixes.rst b/doc/user/source/referenz/metadata/item_attribute_prefixes.rst index dc41ca20dc..ecf1a2ebd9 100644 --- a/doc/user/source/referenz/metadata/item_attribute_prefixes.rst +++ b/doc/user/source/referenz/metadata/item_attribute_prefixes.rst @@ -5,8 +5,8 @@ .. index:: item_attribute_prefixes; Plugin Metadaten .. index:: Plugin Metadaten; item_attribute_prefixes -``item_attribute_prefixes`` ---------------------------- +item_attribute_prefixes +------------------------- Falls ein Plugin eine Reihe von Items definiert, deren vollständiger Name erst zur Konfigurationszeit bekannt ist, werden diese Items durch ihren Namens-Anfang (Präfix) definiert. Diese Art von Item Definition (und damit auch dieser diff --git a/doc/user/source/referenz/metadata/module_global.rst b/doc/user/source/referenz/metadata/module_global.rst index 6a21ffee8a..0051760d72 100644 --- a/doc/user/source/referenz/metadata/module_global.rst +++ b/doc/user/source/referenz/metadata/module_global.rst @@ -7,8 +7,8 @@ .. index:: Modul Metadaten; Globale Metadaten -``module`` ----------- +module +------ Der globale Metadaten Abschnitt ``module:`` kennt die folgenden Schlüsselbegriffe: diff --git a/doc/user/source/referenz/metadata/plugin_global.rst b/doc/user/source/referenz/metadata/plugin_global.rst index 1deab18732..4d92e51f2d 100644 --- a/doc/user/source/referenz/metadata/plugin_global.rst +++ b/doc/user/source/referenz/metadata/plugin_global.rst @@ -40,7 +40,16 @@ Der globale Metadaten Abschnitt ``plugin:`` kennt die folgenden Schlüsselbegrif Beschreibung der Schlüsselbegriffe im Abschnitt ``plugin:`` - - ``type:`` Beschreibt den Typ des Plugins (gültige Werte: ``gateway``, ``interface``, ``protocol``, ``system``, ``cloud`` oder *leer* für ein nicht klassifiziertes Plugin + - ``type:`` Beschreibt den Typ des Plugins (gültige Werte: ``gateway``, ``interface``, ``protocol``, ``system``, ``web`` oder *leer* für ein nicht klassifiziertes Plugin. + + Die Typen sind wie folgt definiert: + + - keine Anbindung von Geräten/Diensten: **System-Plugin** + - Ansteuerung eines Gerätes je Plugin-Instanz: **Interface-Plugin** + - Ansteuerung mehrerer Geräte je Plugin-Instanz: **Gateway-Plugin** + - reine Unterstützung von Übertragungsprotokollen: **Protokoll-Plugin** + - Anbindung von Internet-Diensten: **Web-Plugin** + - ``description:`` Mehrsprachiger Text, der die Funktion das Plugins beschreibt. Die Beschreibung wird bei der Generierung des Dokumentations-Seiten des Plugins verwendet - Die Texte in den verschiedenen Sprachen werden als Unter-Einträge in der Form : erfasst. Zur Identifikation der Sprache werden die 2-stelligen diff --git a/doc/user/source/referenz/module/module.rst b/doc/user/source/referenz/module/module.rst index 453324c301..d170bc1b96 100644 --- a/doc/user/source/referenz/module/module.rst +++ b/doc/user/source/referenz/module/module.rst @@ -23,6 +23,7 @@ Bisher existieren die folgenden Module: module_admin module_mqtt module_websocket + module_metadata Die Konfiguration der Module ist im Abschnitt :doc:`Konfiguration ` dieser diff --git a/doc/user/source/referenz/module/module_metadata.rst b/doc/user/source/referenz/module/module_metadata.rst new file mode 100644 index 0000000000..b1820aa4b1 --- /dev/null +++ b/doc/user/source/referenz/module/module_metadata.rst @@ -0,0 +1,39 @@ + +Metadaten für Module +==================== + +Module werden in der Datei ``../etc/module.yaml`` bzw. über die Admit GUI konfiguriert. Die Parameter sind in +der Dokumentation des Moduls beschrieben. + + +Ein Modul besteht im minimum aus zwei Dateien: + +- Der Modul Code: ``__init__.py`` +- Die Metadaten: ``module.yaml`` + +Eine genaue Beschreibung welche weiteren Dateien und Unterverzeichnisse ein Modul haben kann, ist im Abschnitt +:doc:`Entwicklung ` beschrieben. + +Alle Dateien sind in einem Verzeichnis unterhalb von ``../modules`` gespeichert, welches den Namen des +Moduls trägt (nur in Kleinbuchstaben). + + +Die **Metadaten** Datei eines Moduls heißt ``/modules//module.yaml``. Die bis zu sieben +Abschnitte, die im folgenden beschrieben sind. + +- ``module:`` - Globale Metadaten des Moduls +- ``parameters:`` - Definition der Parameter, welche zur Konfiguration des Moduls in der Datei ``../etc/module.yaml`` + benutzt werden können + +| + +Für Module werden die folgenden Abschnitte in der Metadaten Datei ``module.yaml`` des jeweiligen Moduls genutzt: + +.. toctree:: + :maxdepth: 4 + :titlesonly: + + /referenz/metadata/module_global + /referenz/metadata/parameters + +| diff --git a/doc/user/source/referenz/plugins/plugin_metadata.rst b/doc/user/source/referenz/plugins/plugin_metadata.rst index 83b30dd3ea..11a2c89e36 100644 --- a/doc/user/source/referenz/plugins/plugin_metadata.rst +++ b/doc/user/source/referenz/plugins/plugin_metadata.rst @@ -21,10 +21,9 @@ Plugins trägt (nur in Kleinbuchstaben). Die **Metadaten** Datei eines Plugins heißt ``/plugins//plugin.yaml``. Die bis zu sieben Abschnitte, die im folgenden beschrieben sind. -additional sections: - ``plugin:`` - Globale Metadaten des Plugins -- ``parameters:`` - Definition der Parameter, welche zur Konfiguration des Pluginsin der Datei ``../etc/plugin.yaml`` +- ``parameters:`` - Definition der Parameter, welche zur Konfiguration des Plugins in der Datei ``../etc/plugin.yaml`` benutzt werden können - ``item_attributes:`` - Definition der Item Attribute, die durch das Plugin genutzt/unterstützt werden - ``item_structs:`` - Definition von Item Strukturen, welche im Zusammenhang mit dem Plugin genutzt werden können @@ -34,18 +33,22 @@ additional sections: - ``plugin_functions:`` - Beschreibung öffentlicher Funktionen des Plugins, die durch Logiken oder andere Plugins genutzt werden können +| -.. include:: /referenz/metadata/plugin_global.rst +Für Plugins werden die folgenden Abschnitte in der Metadaten Datei ``plugin.yaml`` des jeweiligen Plugins genutzt: -.. include:: /referenz/metadata/parameters.rst +.. toctree:: + :maxdepth: 4 + :titlesonly: -.. include:: /referenz/metadata/item_attributes.rst + /referenz/metadata/plugin_global + /referenz/metadata/parameters + /referenz/metadata/item_attributes + /referenz/metadata/item_structs + /referenz/metadata/item_attribute_prefixes + /referenz/metadata/logic_parameters + /referenz/metadata/plugin_functions -.. include:: /referenz/metadata/item_structs.rst +| -.. include:: /referenz/metadata/item_attribute_prefixes.rst - -.. include:: /referenz/metadata/logic_parameters.rst - -.. include:: /referenz/metadata/plugin_functions.rst diff --git a/doc/user/source/referenz/referenz.rst b/doc/user/source/referenz/referenz.rst index 88dbb5e81c..04595ce216 100644 --- a/doc/user/source/referenz/referenz.rst +++ b/doc/user/source/referenz/referenz.rst @@ -2,11 +2,12 @@ .. index:: Referenz .. role:: bluesup +.. role:: greensup .. role:: redsup -Referenz :redsup:`Neu` -====================== +Referenz :greensup:`Update` +=========================== Hier entsteht nach und nach eine Referenz in der Details zu einzelnenen Themen von SmartHomeNG nachgelesen werden können. @@ -22,4 +23,5 @@ können. module/module plugins/plugins metadata/metadata - + logging/logging + userfunctions/userfunctions diff --git a/doc/user/source/referenz/userfunctions/userfunctions.rst b/doc/user/source/referenz/userfunctions/userfunctions.rst new file mode 100644 index 0000000000..26dddcfbcd --- /dev/null +++ b/doc/user/source/referenz/userfunctions/userfunctions.rst @@ -0,0 +1,251 @@ + +.. role:: bluesup +.. role:: greensup +.. role:: redsup + +=========================== +Userfunctions :redsup:`Neu` +=========================== + +Ab Version 1.9 von SmartHomeNG ist die Möglichkeit implementiert, benutzerdefinierte Funktionen (Userfunctions) zu +schreiben und in eval Statements sowie in Logiken zu verwenden. + + +Erstellung und Speicherung +========================== + +Die Python Dateien mit den Funktionen müssen dazu im Verzeichnis **../functions** abgelegt werden. Es sind normale +Python Dateien, die mehrere Funktionen enthalten können. Als formale Anforderung sind nur Informationen zur Version +und eine kurze Beschreibung des Zwecks der Funktionen dieser Datei anzugeben. Diese müssen in der Python Datei +als globale Variablen **_VERSION** und **_DESCRIPTION** definiert werden. + +Im folgenden Beispiel wird eine Datei (Funktionssammlung) mit dem Namen **anhalter.py** im Verzeichnis **../functions** +erzeugt: + +Die Python Datei sieht folgendermaßen aus: + +.. code-block:: python + :caption: /usr/local/smarthome/functions/anhalter.py + + #!/usr/bin/env python3 + # anhalter.py + + _VERSION = '0.1.0' + _DESCRIPTION = 'Per Anhalter durch die Galaxis' + + def zweiundvierzig(): + + return 'Die Antwort auf die Frage aller Fragen' + + +Verwendung der Admin GUI +------------------------ + +In der Admin GUI steht ein Editor zum erstellen und bearbeiten von Userfunctions zur Verfügung. Dieser findet sich +unter **Dienste/User-Funktionen**. + +.. image:: /referenz/assets/uf_editor1.jpg + :class: screenshot + + + +Initialisierung der Userfunctions +================================= + +Wenn nach dem Erstellen dieser Datei SmartHomeNG neu gestartet wird, sieht man im Warnings-Log, dass die Datei +importiert wird: + +.. code:: + + 2021-10-14 20:07:08 NOTICE lib.smarthome -------------------- Init SmartHomeNG 1.8.2d.b81166c3.develop -------------------- + 2021-10-14 20:07:08 NOTICE lib.smarthome Running in Python interpreter 'v3.8.3 final' in virtual environment, from directory /usr/local/shng_dev + 2021-10-14 20:07:08 NOTICE lib.smarthome - on Linux-4.9.0-6-amd64-x86_64-with-glibc2.17 (pid=4584) + 2021-10-14 20:07:08 NOTICE lib.smarthome - Nutze Feiertage für Land 'DE', Provinz 'HH', 1 benutzerdefinierte(r) Feiertag(e) definiert + 2021-10-14 20:07:11 NOTICE lib.userfunctions Importing userfunctions uf.anhalter v0.1.0 - Per Anhalter durch die Galaxis + 2021-10-14 20:08:25 NOTICE lib.smarthome -------------------- SmartHomeNG initialization finished -------------------- + + +Nun kann man die in der Datei definierten Funktionen nutzen. + +Aufruf einer Userfunction +========================= + +Allen Userfunctions ist beim Aufruf **uf.** (für userfunctions) gefolgt von dem Namen der Datei voranzustellen. Die +Funktion **zweiundvierzig** ist also als ``uf.anhalter.zweiundvierzig()`` aufzurufen. In der Admin GUI im +**eval Syntax Checker** sieht das denn folgendermaßen aus: + +.. image:: /referenz/assets/uf_eval_checker1.jpg + :class: screenshot + +Analog können die Funtionen in **eval** Attributen in Item Definitionen und in Logiken aufgerufen werden. + + +Logging aus Userfunctions +========================= + +Als Hilfestellung bei der Erstellung und dem Testen von Funktionen kann aus den Funktionen heraus geloggt werden. +Dazu muss das Logging Modul importiert und ein Logger definiert werden: + +.. code-block:: python + :caption: /usr/local/smarthome/functions/anhalter.py + + #!/usr/bin/env python3 + # anhalter.py + + import logging + _logger = logging.getLogger(__name__) + + _VERSION = '0.1.0' + _DESCRIPTION = 'Per Anhalter durch die Galaxis' + + def zweiundvierzig(): + + _logger.warning("Die Userfunction 'zweiundvierzig' wurde aufgerufen") + return 'Die Antwort auf die Frage aller Fragen' + + +Der Name des Loggers im obigen Beispiel ist **functions.anhalter**: + +.. code:: + + 2021-10-15 10:08:14 NOTICE lib.smarthome -------------------- SmartHomeNG initialization finished -------------------- + 2021-10-15 10:12:29 WARNING functions.anhalter Die Userfunction 'zweiundvierzig' wurde aufgerufen + + +Damit aus Funktionen ein Logging mit Leveln kleiner als WARNING erfolgt, muss in der Logging Konfiguration +../etc/logging.yaml ein entsprechender Logger für **functions** ergänzt werden: + +.. code:: yaml + + loggers: + functions: + handlers: [shng_details_file] + level: INFO + + +Nutzung von Item Werten +======================= + +Für die Berechungen in den Userfunctions werden häufig die aktuellen Werte von Items benötigt. Um diese Werte in +den Userfunctions zu erhalten, gibt es zwei Möglichkeiten. + + +Übergabe als Parameter +---------------------- + +Damit die Funktionen unabhängig von der Item Struktur der aktuellen SmartHomeNG sind, sollten Item Werte als +Parameter übergeben werden. Dadurch können Dateien mit Userfunctions einfach an andere Anwender weiter gegeben +werden: + +.. code:: yaml + + test_item: + type: num + eval_trigger: env.location.sun_position.elevation.degrees + eval: uf.lamellen_oeffnung_ost( sh.env.location.sun_position.elevation.degrees() ) + + +Die Userfunction dazu kann z.B. folgendermaßen aussehen: + +.. code-block:: python + :caption: /usr/local/smarthome/functions/beschattung.py + + _VERSION = '0.1.0' + _DESCRIPTION = 'Hilfsfunktionen zur Beschattungssteuerung per Stateengine' + + def lamellen_oeffnung_ost(elevation): + """ + Bestimmung der Stellung der Ost Lamellen im Wohnbereich + + :param elevation: Sonnen Position (Höhe in Grad) + :return: Schließung der Lamellen in Prozent + """ + + return 87 if elevation <= 6.6 else 84 if elevation <= 11.5 else 81 if elevation <= 14.8 else 78 if elevation <= 19.4 else 74 if elevation <= 16.1 else 70 if elevation <= 28 else 65 if elevation <= 30.9 else 60 if elevation <= 33.9 else 54 + + +durch das Smarthome-Objekt +-------------------------- + +Falls eine größere Zahl an Item Werten übergeben werden soll und eine Weitergabe an andere Anwender nicht geplant ist, +kann die Userfunction so geschrieben werden, dass sie die Item Struktur kennt und voraussetzt. + +Statt mehrere Items als einzelne Parameter zu übergeben, braucht dann nur das Smarthome-Objekt übergeben zu werden. +Das folgende Beispiel zeigt beide Varianten (übergabe der Item Werte und Referenzierung über das Smarthome-Objekt). + +.. code:: yaml + + test_item: + # Übergabe der Item Werte + type: num + eval_trigger: + - env.location.sun_position.azimut.degrees + - env.location.sun_position.elevation.degrees + eval: uf.lamellen_oeffnung_sued( sh.env.location.sun_position.azimut.degrees(), sh.env.location.sun_position.elevation.degrees() ) + + +.. code-block:: python + :caption: /usr/local/smarthome/functions/beschattung.py + + _VERSION = '0.2.0' + _DESCRIPTION = 'Hilfsfunktionen zur Beschattungssteuerung per Stateengine' + + def lamellen_oeffnung_sued(azimut, elevation): + """ + Bestimmung der Stellung der Ost Lamellen im Wohnbereich + + :param azimut: Sonnen Position (Himmelsrichtung in Grad) + :param elevation: Sonnen Position (Höhe in Grad) + :return: Schließung der Lamellen in Prozent + """ + + return 60 if (azimut>=230 and elevation>0.0 ) else 63 if (azimut>=214 and elevation>0.0 )else 72 if elevation<=7.0 else 69 if elevation<=24.0 else 66 + + +kann das Smarthome-Objekt übergeben werden. Das würde dann folgendermaßen aussehen: + +.. code:: yaml + + test_item: + # Übergabe des Smarthome-Objektes sh + type: num + eval_trigger: + - env.location.sun_position.azimut.degrees + - env.location.sun_position.elevation.degrees + eval: uf.lamellen_oeffnung_sued(sh) + + +Die Userfunction dazu kann z.B. folgendermaßen aussehen: + +.. code-block:: python + :caption: /usr/local/smarthome/functions/beschattung.py + + _VERSION = '0.2.1' + _DESCRIPTION = 'Hilfsfunktionen zur Beschattungssteuerung per Stateengine' + + def lamellen_oeffnung_sued(sh): + """ + Bestimmung der Stellung der Ost Lamellen im Wohnbereich + + :param sh: smarthome objekt + :return: Schließung der Lamellen in Prozent + """ + + azimut = sh.env.location.sun_position.azimut.degrees() + elevation = sh.env.location.sun_position.elevation.degrees() + + return 60 if (azimut>=230 and elevation>0.0 ) else 63 if (azimut>=214 and elevation>0.0 )else 72 if elevation<=7.0 else 69 if elevation<=24.0 else 66 + + +Reload von Userfunctions +======================== + +Benutzerdefinierte Funktionen können während der Laufzeit von SmartHomeNG verändert und neu geladen werden. Dabei +können einzelne Module mit Userfunctions neu geladen werden oder alle Module mit Usewrfunctions auf einmal. + +In der Admin GUI erfolgt das auf der Seite mit dem Editor für Userfunctions. Alternativ können die Module über +den **eval Syntax Checker** neu geladen werden. Um die Datei des obigen Beispiels neu zu laden, muss +man **uf.reload('anhalter')** eingeben und **Prüfen** klicken. + +Man kann auch alle benutzerdefinierte Dateien neu laden, indem man **uf.reload_all()** eingibt und **Prüfen** klickt. + diff --git a/doc/user/source/release/1_8_2.rst b/doc/user/source/release/1_8_2.rst index ba67ad5f3b..589544d67f 100644 --- a/doc/user/source/release/1_8_2.rst +++ b/doc/user/source/release/1_8_2.rst @@ -1,18 +1,9 @@ ================================ -Release 1.8.2 - xx. Februar 2021 +Release 1.8.2 - 21. Februar 2021 ================================ Dieses ist ein Bugfix Release für SmartHomeNG v1.8 -.. note:: - - Diese Release Notes sind ein Arbeitsstand. - - - Berücksichtigt sind Commits im smarthome Repository bis incl. 20. Feb 2021 - (Merge pull request #394 from onkelandy/network...) - - Berücksichtigt sind Commits im plugins Repository bis incl. 20. Feb 2021 - (shelly: Missing webif file added) - Überblick ========= diff --git a/doc/user/source/release/1_9.rst b/doc/user/source/release/1_9.rst new file mode 100644 index 0000000000..bf1a7fbe6d --- /dev/null +++ b/doc/user/source/release/1_9.rst @@ -0,0 +1,660 @@ +=============================== +Release 1.9 - 28. Dezember 2021 +=============================== + +Es gibt eine Menge neuer Features im Core von SmartHomeNG und den Plugins. + +.. comment note:: + + Diese Release Notes sind ein Arbeitsstand. + + - Berücksichtigt sind Commits im smarthome Repository bis incl. 27. Dezember 2021 + (...) + - Berücksichtigt sind Commits im plugins Repository bis incl. 28. Dezember 2021 + (openweathermap: Added name of location to locals-struct) + + +Überblick +========= + +Dieses ist neues Release für SmartHomeNG. Die Änderungen gegenüber dem Release v1.8.x sind im +folgenden in diesen Release Notes beschrieben. + + +Unterstützte Python Versionen +----------------------------- + +Die älteste offiziell unterstützte Python Version für SmartHomeNG Release 1.9 ist Python 3.7. +(Siehe auch *Hard- u. Software Anforderungen* im Abschnitt *Installation* zu unterstützten Python Versionen) + +Das bedeutet nicht unbedingt, dass SmartHomeNG ab Release 1.9 nicht mehr unter älteren Python Versionen läuft, +sondern das SmartHomeNG nicht mehr mit älteren Python Versionen getestet wird und das gemeldete Fehler mit älteren +Python Versionen nicht mehr zu Buxfixen führen. + + +Minimum Python Version +^^^^^^^^^^^^^^^^^^^^^^ + +Die absolute Minimum Python Version in der SmartHomeNG startet wurde auf v3.6 angehoben, da Python 3.5 im +September 2020 End-of-Life (End of security fixes) gegangen ist. Bei einer Neuinstallation wird jedoch empfohlen +auf einer der neueren Python Versionen (3.7 oder 3.8) aufzusetzen. + + +Änderungen am Core +================== + +Bugfixes in the CORE +-------------------- + +* Fixes in lib.network +* Fixes in lib.utils + +* Fixes in modules.mqtt +* Fixes in modules.websocket + +* modules.websocket: Bugfix for smartVISU payload protocol (command 'log') +* create var/log directory prior recording output from pip + + +Updates in the CORE +------------------- + +* Removed references to lib.connection +* etc.logging.yaml.default: Changes to new logging handlers +* move crontab in lib.triggertimes, extend syntax for crontabs + +* Logics: + + * Logic **check_items.py**: Check items for damaged items (created in logics) + It is not possible with Python to intercept an assignment to a variable or an objects' attribute. The only + thing one can do is search all items for a mismatching item type. + +It is not possible with Python to intercept an assignment to a variable or an +objects' attribute. The only thing one can do is search all items for a +mismatching item type. + +* lib.backup: + + * Added new struct files of ../etc directory to configuration backup + * Added \*.pem to backup of certificate files + * Certificate backup now backs up \*.pem files for certificates that are not named \*.cer + +* lib.env.location: + + * Added lat, lon and elev settings from smarthome.yaml to items + +* lib.item: + + * Added loading of structs from multiple files (etc/struct_xyz.yaml) in addition to loading from etc/struct.yaml + * Extended functionallity for item logging (incl. shngadmin and documentation) + * Added attribute source to timer function + * Improved logging for items with cache attribute + * items: optionally return items sorted + * Bugfix for autotimer method of an item + +* lib.log: + + * Improved handling of loglevel NOTICE + +* lib.metadata + + * bugfix in version checking + +* lib.network: + + * first udp server implementation + * Removed setting of loglevel for logger lib.network (should be defined in etc/logging.yaml) + * Handle 'broken pipe' error on remote disconnect + * added log entry for truncated send + * Fix received data processing + * Fix missing bytes/str conversion + * Better and faster shutdown handling + * Fix callback syntax + * Exception handling for callbacks + +* lib.scene: + + * Extended eval to use shtime, userfunctions and math (analog to eval attribute of items) + * Implemented reload of all scenes + * implemented multi language support for log entries + +* lib.smarthome: + + * Added loglevel NOTICE + * Improved handling of memory logs + +* lib.tools: + + * Fix for daylight saving time in tools.dt2ts() and tools.dt2js() + +* lib.userfunctions + + * New library, that implements userfunctions for eval-statements and logics + * Implemented userfunctions for evalchecker in admin gui + +* Modules: + + * admin: + + * Display of structs in shngadmin is now sorted and grouped by plugin + * Randomized calls to find blog articles on smarthomeng.de + * Added level NOTICE to api + * GUI: Added loglevel NOTICE + * GUI Added reload button for scenes + * Implemented html escape for dicts and lists in item detail view + * Bugfix for list loggers (Issue #411) "dictionary changed size during iteration" + * GUI: Fix for handling/editing custom holidays + * Fix for compatibility to newer PyJWT versions + * Added support for user functions + * Added button to reload scenes + * Added shngadmin version to system property page + + * http: + + * update chartjs to 2.9.4 + * added Datatables Javascript v1.11.0 to allow table sorting in WebIFs, updated documentation + * updated bootstrap to 4.6.0 + * updated bootstrap datepicker to 1.9.0 + * updated Font Awesome to 5.15.4 + * updated jquery to 3.6.0 + * updated popper.js to 2.10.1 + + * websocket: + + * Changes to memory logging in core + * Added missing requirements.txt + * Exitcode 1001 is now logged as info, not as exception + +* Plugins: + + * ... + +* tests: + + * mock.core: Read core version from bin.shngversion.py + * migrated tests to Travis-CI.com, updated Readme + + +Änderungen bei Plugins +====================== + +New Plugins +----------- + +For details of the changes of the individual plugins, please refer to the documentation of the respective plugin. + +* avm_smarthome: AVM smarthome plugin for DECT sockes, smart radiator control DECT301 and Comet DECT and DECT + smarthome sensors based on HTTP GET Request +* homeconnect: usage of the BSH/Siemens HomeConnect interface with oauth2 +* husky: plugin to control Husqvarna automower +* modbus_tcp: New plugin to read registers from modbusTcp-device +* philips_tv: Added initial support for Philips TV with OAuth2 authentication +* sma_mb: this plug-in reads the current values of an SMA inverter via SMA Speedwire fieldbus/Modbus +* text_display: New text display Plugin +* timmy: Plugin für Ein-/Ausschaltverzögerung und Blinken + + +Plugin Updates +-------------- + +* asterix: + + * adjusted plugin to lib.network + +* avm: + + * handle callmonitor reconnect + * avoid error message on requested shutdown + * moved webif to seperate file + * fixed rare error in function _update_home_automation + * catching exceptions when Ethernet is temporary unavailable + +* bose_soundtouch: + + * Improved error handling + +* bsblan: + + * revised README + * compatibility check for BSB-LAN Version 2.x + * adjusted link to icon in readme.md + +* casambi: + + * Catch socket errors leading to unintentional termination of EventHandlerThread + * deleted readme and improved user_doc + * added automatic sessionID request, e.g. after Casambi API key validity has been extended + * improved webinterface + * added english translation for webinterface + * added python websocket to plugin requirements + * fixed requirement websocket-client + * added tunable white (CCT) support + * added extended debugging for CCT commands + * debugging setups with more than one Casambi network + * removed unjustified error/warning messages + * fixed status decode error + * added backend online status parsing to item + * fixed unknown variable error in debug message + * Trigger socket reinitialization after pipe error + * Switched logger outputs to f-strings + +* cli: + + * adjustments to new network classes + * fixed error - self.alive + * added 'logl' (log-list) command + * updated output of command 'logd' + * updated to conform with changes to memory logging in core + +* comfoair: + + * removed lib.connection references for cleanup + +* darksky: + + * added URL for data retrieval to webif + * switched default to "ca" to have wind in kmh + * added some more attributes to webif + * set to deprecated for next plugin release, API ends 2021 + +* database: + + * updated to use newest version of datepicker + * Improved robustness, limit reconnects improved plugin robustness, if db is not available (e.g. temporarily missing ethernet) + * Limit number of reconnects + * Fixed bug in item_detail page + * added Datatable to overview and details + +* dlms: + + * added parameter to allow listen only mode + * extend webinterface with list of common obis codes + * allow crontab timings, enhance listen only smartmeter handling, improve getting manufacturer list + +* ebus: + + * removed lib.connection references for cleanup + +* ecmd: + + * removed lib.connection references for cleanup + +* enocean: + + * added debug infos for powermeter devices + * changed to new is_alive() syntax for python 3.9 + * updated to use newest version of datepicker + * removed datepicker includes, which are no longer necessary for this plugin + * Added debug info to BaseID error message + * Adapted logging to fstrings + * Added optional item attribute "enocean_device" to select appropriate learn message + +* garminconnect: + + * Updated to use newest version of datepicker + +* gpio: + + * fix local variable 'err' referenced before assignment in line 126 + * implement datatables JS in webif + * rename webif tables correctly + * improve error handling on startup and bump version to 1.5.1 + +* hue: + + * Small BugFix in UpdateGoupItems + +* hue2: + + * Changed create_new_username() to support qhue v2.0.0 and up + * Implemented bridge discovery via mdns (for bridges v2) + * Reimplemented bridge discovery via upnp (for bridges v1) + * Removed bridge discovery through hue portal (old Philips site) + * Implemented new Signify broker discovery methods + * automatic discovery at startup takes place only if stored ip address does not point to a hue bridge + +* husky: + + * added error/debug message if model, id or name cannot be extracted from json response + * added logger to Mower class + * degraded error message on missing model type to debug level + +* ical: + + * adapted to new lib.network + * made cycle to a class attribute (self._cycle) + +* jsonread: + + * now has a webinterface + * some minor text changes to metadata (plugin.yaml) + * remove old readme.md + * corrected plugin.yaml (it was not a valid yaml file any more) + +* knx: + + * adjusted plugin to lib.network + * added DPT 251.600 RGBW + * fix webinterface fix mixup + * add password for knxproj to webif, introduce knxd namespace for constants, update doku + * removed local redundant datatables + +* kodi: + + * make favourites type dict instead of str + +* mailrcv: catch exception when trying to close imap even if it's not possible + +* memlog: + + * updated to conform with changes to memory logging in core + +* mpd: + + * adjusted plugin to lib.network + +* mqtt: + + * updated to use newest version of datepicker + +* neato: + + * added new function start_robot to enable single room cleaning; added new function get_map_boundaries to request + available map boundaries (rooms) for a given map; added new function dismiss_current_alert to reset current alerts + * fix for clean_room command + * bugfix in metadata (plugin-function definition hat indentation error) + * added option to clear errors/alarms in neato/vorwerk backend via plugin's webif + * added english translation for webinterface + * deactivate SSL verify + * added return values for plugin commands + * added function list available rooms to plugin webif + * improved map cleaning control + * Added return values for plugin commands; added function list available rooms to plugin webif. Improved map cleaning control + * Added 'robot not online' warning + * Added command to dismiss backend alerts (dustbin full etc.) via item + * Modifications by ivan73 (without desciption) + +* network: + + * adapted plugin to lib.network + * improved plugin parameter handling + * fixed starting server only on run() + * adjusted logging + +* nuki: + + * fixed get_local_ipv4_address handling + +* nut: + + * catching exception if network is not available + * added UPS via Synology disk station example to readme + * fixed error occurring after exception of type "network not available" + +* odlinfo: + + * Updated to new data interface https://odlinfo.bfs.de/ODL/DE/service/datenschnittstelle/datenschnittstelle_node.html + * No more use and password needed + * Added web interface + * Added cycle and cached json data + * Added manual update option, reduced default cycle to 1800 sec + * Bumped version to 1.5.1 + * Added auto update for items + * Modifications by ivan73 (without desciption) -> 1.5.2 + + +* onewire: + + * improve error handling + * enhanced tree function in owbase + +* openweathermap: + + * corrected user_doc (replaced all references to darksky plugin) + * multiple changes, bumped version to 1.8.2 + * Fixed bug in metadaa (plugin.yaml) + * Removed extra line with API-key which displayed only asterixes from web interface + * Added name of location to locals-struct + * Bumped version to 1.8.3 + +* raumfeld + + * removed lib.connection references for cleanup + * some cleanup + +* raumfeld_ng: + + * Bugfix in poll_device (get_sh()) + * Added get_mediainfo to valid_list of rf_attr item attribute + +* resol: + + * Catch wrong message sizes + * Fixed scheduler stop on plugin exit + * Robustness measures when Ethernet is temporary not available + * Added socket shutdown on plugin stop + * Plugin performance: Do not register receive only attributes for update_item function + * Modifications by ivan73 (without desciption) + +* robonect: + + * corrected datatype for unix timestamp error_unix + * extended by some MQTT commands + * changed indent of mode item + * changed "and not" to "or" + * added keychecks to avoid exceptions + * added buttons in webif to switch modes + * don't try to iterate error list in case robonect has no wifi connection (error list is None then) + * caching full error list + * added mode to webservices set for automower (helps only, if webservices plugin is used) + * added check for mqtt mode + +* rpi1wire: + + * Updated user docu, webif and Code cleanup + * Corrected errors in structure of user documentation + +* russound: + + * adjusted plugin to lib.network + +* shelly: + + * add support for Shelly H&T + * Some updates + * bumped version to 1.2.0 + +* simulation: + + * fix parameters + +* smartvisu: + + * added parameter create_masteritem_file + * adjusted web interface + * improve descriptions for widget names and blocks + +* sml: + + * removed lib.connection references for cleanup + +* smlx: + + * changed from readme to user_doc docu, provide a requirements.txt + * removed lib.connection references for cleanup + +* snmp: + + * functional update of plugin incl enhancement of WebIF + +* sonos: + + * added plugin webinterface + * added name for SoCo EventServerThread + * catching rare exception that could occur during automatic IP detection and invalid network connectivity + * adapted behavior of play_snippet if stop() functionality is currently not supported by the respective speaker + * upgrade to SoCo 0.22 framework + * display number of online speakers on Webinterface + * pgrade SoCo base framework to Version 0.24.0; additional robustness improvements + +* speech: + + * adjusted plugin to lib.network + +* squeezebox: + + * change struct wipecache to str as the value might also be a string like "queue" + +* stateengine: + + * moved web interface to a separate file + * change logging: general log is plugins.stateengine and se_item logs are logged to "stateengine" (without plugins. prefix) + * improve log handling + * handle problem when SE item has name, bump version to 1.9.2 + * improve logging and source for item update + * fix docu example for south and se_use + * lower case log directory + * optional offset for sun_tracking function + * moved webif to external file + * new logger names, fix items having a name + * corrected intentation in user_doc/13_sonstiges.rst + * add offset and value for open lamella value parameters to improve sun_tracking function + * replace sh.tools.dt2ts() by timestamp() for evaluating the start_time of the suspend state + * change web visu - condition rectangle now has dynamic width + * better sun_tracking offset handling + * correct webif colors and conditionlist if no conditionsets given + +* tasmota: + + * Functional Update of Tasmota Plugin incl WebIF Rework + +* telegram: + + * add new attribut telegram_condition to suppress multiple messages upon update + * Add possibility to send telegram message zu just 1 chat-id + * Add chat-if to "telegram-info" to allow response depending on chat-id + * Updated user docu, webif and code cleanup + +* unifi: + + * moved dependency from lib.network to lib.utils + +* uzsu: + + * outsource webif and fix webinterface problem with showing the whole dictionary when a rule contains a "<" + * update webif to use datatables JS + * Update req. for python 3.7 and 3.9 + * Minimize dict item renewal: lastvalue not written to dict anymore, fix bug in sun calculated values + * Remove lastvalue from dict on start as it is not used anymore + * Fix webIF overlay when clicking on entry + * Improve last value struct and handling + * xtensions for series - second try + * Sun calculation cron is now adjustable in plugin settings + * Modifications by ivan73 (without desciption) + +* viessmann: + + * fixes webif includes + * fix cyclic due calculation + +* visu_websocket: + + * updated to conform with changes to memory logging in core + * fix parameters in widget call + +* webservices: + + * moveed and translated readme.md documentation to user_doc.rst + * remove readme.md, create user_doc.rst, use sphinx-tabs + +* withings_health: + + * updated to newest version of withings-api + * moved webif to seperate file + +* wol: + + * now has a web interface with items and interactive wol + * Corrected metadata - changed type of wol_ip from ip4 to ipv4 + +* xiaomi_vac: + + * use datatables js in webif + * fix problem with newer miio module (>=0.5.8) that doesn't accept return_list argument for clean_details method + * Bump version to 1.1.2 + * ompatibility with newer python-miio modules (0.5.9+) + * Bump version to 1.2.0 + +* xmpp: + + * Try to reconnect when loosing connection + + +Outdated Plugins +---------------- + +The following plugins were already marked in version v1.6 as *deprecated*. This means that the plugins +are still working, but are not developed further anymore and are removed from the release of SmartHomeNG +in the next release. User of these plugins should switch to corresponding succeeding plugins. + +* System Plugins + + * backend - use the administration interface instead + * sqlite_visu2_8 - switch to the **database** plugin + +* Web Plugins + + * wunderground - the free API is not provided anymore by Wunderground + + +The following plugins are marked as *deprecated* with SmartHomeNG v1.7, because neither user nor tester have been found: + +* Gateway Plugins + + * ecmd + * elro + * iaqstick + * snom + * tellstick + +* Interface Plugins + + * easymeter + * smawb + * vr100 + +* Web Plugins + + * nma + +Moreover, the previous mqtt plugin was renamed to mqtt1 and marked as *deprecated*, because the new mqtt +plugin takes over the functionality. This plugin is based on the mqtt module and the recent core. + + +Retired Plugins +--------------- + +The following plugins have been retired. They had been deprecated in one of the preceding releases of SmartHomeNG. +They have been removed from the plugins repository, but they can still be found on github. Now they reside in +the **plugin_archive** repository from where they can be downloaded if they are still needed. + +* alexa - switch to the **alexa4p3** plugin +* boxcar - classic Plugin, not used according to survey in knx-user-forum +* mail - switch to the **mailsend** and **mailrcv** plugin +* netio230b - classic plugin, not used according to survey in knx-user-forum +* openenergymonitor - classic plugin, not used according to survey in knx-user-forum +* smawb - classic plugin, not used according to survey in knx-user-forum +* sqlite - switch to the **database** plugin +* tellstick - classic Plugin, not used according to survey in knx-user-forum + + +Weitere Änderungen +================== + + +Documentation +------------- + +* Changed Requirements for documentation build, added tab extension to sphinx, introduced MyST +* Documentation build should now run under Windows + diff --git a/doc/user/source/was_ist_neu.rst b/doc/user/source/was_ist_neu.rst new file mode 100644 index 0000000000..660eee0dc6 --- /dev/null +++ b/doc/user/source/was_ist_neu.rst @@ -0,0 +1,28 @@ +:tocdepth: 1 + +Neuerungen im Release v1.9 +========================== + +Hier ist eine Kurzübersicht über größere Neuerungen im aktuellen Release. +Eine vollständige Übersicht der Änderungen ist den den :doc:`Release Notes ` zu finden. + + - **Structs**: Es sind mehrere struct Definitionsdateien möglich + - **Item Logging**: Funktionalität stark erweitert (kann das operationslog Plugin ersetzen) + - **Logging**: Es gibt einen Handler, der beim rotieren der Log Dateien die File-Extension erhält + - **Logging**: Es gibt einen Handler, der beim Logging den Zugriff auf die memory Logs von SmartHomeNG erlaubt + - **Userfunctions**: Es können Python Funktionen definiert werden, die in eval Statements und Logiken verwendet + werden können + - **Szenen**: Die Szenen Definitionsdateien können neu geladen werden, ohne SmartHomeNG neu starten zu müssen + +Details zu den genannten Punkten sind in den Abschnitten :doc:`Konfiguration ` +bzw. :doc:`Referenz ` zu finden. + +| + +Auch bei den Plugins hat es größere Änderungen gegeben: + + - **diverse Plugins**: Umstellung der Plugins die bisher lib.connection nutzten auf lib.network + +| + +(Diese Seite muss vom Layout noch überarbeitet werden) diff --git a/etc/logging.yaml.default b/etc/logging.yaml.default index c1eb0f2cd0..8c62130600 100644 --- a/etc/logging.yaml.default +++ b/etc/logging.yaml.default @@ -59,7 +59,8 @@ handlers: # The TimedRotatingFileHandler seperates the logentries by day and # keeps the entries of the last seven days in seperate files. # - class: logging.handlers.TimedRotatingFileHandler + #class: logging.handlers.TimedRotatingFileHandler + (): lib.log.ShngTimedRotatingFileHandler formatter: shng_simple level: WARNING utc: false @@ -75,7 +76,7 @@ handlers: # The TimedRotatingFileHandler seperates the logentries by day and # keeps the entries of the last seven days in seperate files. # - class: logging.handlers.TimedRotatingFileHandler + (): lib.log.ShngTimedRotatingFileHandler formatter: shng_simple level: DEBUG utc: false @@ -93,7 +94,7 @@ handlers: # # The TimedRotatingFileHandler seperates the logentries by day and # # keeps the entries of the last seven days in seperate files. # # - # class: logging.handlers.TimedRotatingFileHandler + # (): lib.log.ShngTimedRotatingFileHandler # formatter: shng_detail # level: DEBUG # utc: false @@ -106,7 +107,7 @@ handlers: #shng_busmonitor_file: # # This handler must be enabled when busmonitor logging from the knx plugin should be used. # # - # class: logging.handlers.TimedRotatingFileHandler + # (): lib.log.ShngTimedRotatingFileHandler # formatter: shng_busmonitor # level: DEBUG # when: midnight @@ -117,7 +118,7 @@ handlers: #shng_items_file: # # This handler is an example for logging item-value changes to a seperate log file # # - # class: logging.handlers.TimedRotatingFileHandler + # (): lib.log.ShngTimedRotatingFileHandler # formatter: shng_items # when: midnight # backupCount: 7 @@ -133,21 +134,25 @@ loggers: # The following default loggers should not be changed. If additional logging # is required, a logger for the specific lib, module or plugin shoud be added. # + functions: + handlers: [shng_details_file] + level: INFO + lib: # Default logger for SmartHomeNG libraries handlers: [shng_details_file] level: WARNING - lib.smarthome.main: + lib.smarthome: # Add all logging handlers that should receive the initial log lines after a startup # (example below) but leave out the logging handlers that are defined in the root-logger # (otherwise log entries will be doubled). # - # 2020-12-29 11:35:34 WARNING lib.smarthome.main -------------------- Init SmartHomeNG 1.8.0 -------------------- - # 2020-12-29 11:35:34 WARNING lib.smarthome.main Running in Python interpreter 'v3.8.3 final' in virtual environment - # 2020-12-29 11:35:34 WARNING lib.smarthome.main - on Linux-4.9.0-6-amd64-x86_64-with-glibc2.17 (pid=24407) - # 2020-12-29 11:35:35 WARNING lib.smarthome.main - Nutze Feiertage für Land 'DE', Provinz 'HH', 1 benutzerdefinierte(r) Feiertag(e) definiert - # 2020-12-29 11:36:54 WARNING lib.smarthome.main -------------------- SmartHomeNG initialization finished -------------------- + # 2020-12-29 11:35:34 WARNING lib.smarthome -------------------- Init SmartHomeNG 1.8.0 -------------------- + # 2020-12-29 11:35:34 WARNING lib.smarthome Running in Python interpreter 'v3.8.3 final' in virtual environment + # 2020-12-29 11:35:34 WARNING lib.smarthome - on Linux-4.9.0-6-amd64-x86_64-with-glibc2.17 (pid=24407) + # 2020-12-29 11:35:35 WARNING lib.smarthome - Nutze Feiertage für Land 'DE', Provinz 'HH', 1 benutzerdefinierte(r) Feiertag(e) definiert + # 2020-12-29 11:36:54 WARNING lib.smarthome -------------------- SmartHomeNG initialization finished -------------------- # # logging to shng_details_file is already enabled in logger lib: #handlers: [shng_develop_file] diff --git a/functions/.gitignore b/functions/.gitignore new file mode 100644 index 0000000000..5b5726d9f4 --- /dev/null +++ b/functions/.gitignore @@ -0,0 +1,5 @@ +# ignore everything +* +# except .gitignore and template file +!.gitignore +!uf.tpl diff --git a/functions/uf.tpl b/functions/uf.tpl new file mode 100644 index 0000000000..dd523d0aad --- /dev/null +++ b/functions/uf.tpl @@ -0,0 +1,25 @@ +# +# This file contains user defined functions for use with SmartHomeNG +# +import logging +_logger = logging.getLogger(__name__) + +_VERSION = '0.1.0' +_DESCRIPTION = 'Per Anhalter durch die Galaxis' + +# +# Example functions +# +def zweiundvierzig(): + + return 'Die Antwort auf die Frage aller Fragen' + +def itemtest(sh): + + return sh.env.location.sun_position.elevation.degrees() + +def log_test(): + + _logger.warning('Log-Test aus einer Userfunction') + + return diff --git a/lib/aioudp.py b/lib/aioudp.py new file mode 100644 index 0000000000..3eaa3829df --- /dev/null +++ b/lib/aioudp.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab +######################################################################### +# Based on aioudp by bashkirtsevich: https://github.com/bashkirtsevich-llc/aioudp +# Copyright 2020- Sebastian Helms +######################################################################### +# This file is part of SmartHomeNG +# +# SmartHomeNG is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SmartHomeNG is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SmartHomeNG If not, see . +######################################################################### + + +import asyncio +import socket +from collections import deque + + +class aioUDPServer(): + def __init__(self): + self._recv_max_size = 4096 + + self._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0) + self._sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + self._sock.setblocking(False) + + self._send_event = asyncio.Event() + self._send_queue = deque() + + self._subscribers = {} + self._task = None + + # region Interface + def run(self, host, port, loop): + self.loop = loop + self._sock.bind((host, port)) + self._run_future(self._recv_periodically()) + + def stop(self): + self._sock.close() + self._subscribers = {} + + def subscribe(self, fut): + self._subscribers[id(fut)] = fut + + def unsubscribe(self, fut): + self._subscribers.pop(id(fut), None) + + # endregion + + def _run_future(self, *args): + for fut in args: + asyncio.ensure_future(fut, loop=self.loop) + + def _sock_recv(self, fut=None, registered=False): + fd = self._sock.fileno() + + if fut is None: + fut = self.loop.create_future() + + if registered: + self.loop.remove_reader(fd) + + try: + data, addr = self._sock.recvfrom(self._recv_max_size) + except (BlockingIOError, InterruptedError): + self.loop.add_reader(fd, self._sock_recv, fut, True) + except Exception as e: + fut.set_result(0) + self._socket_error(e) + else: + fut.set_result((data, addr)) + + return fut + + async def _recv_periodically(self): + while True: + data, addr = await self._sock_recv() + self._notify_subscribers(*self._datagram_received(data, addr)) + + def _socket_error(self, e): + pass + + def _datagram_received(self, data, addr): + return data, addr + + def _notify_subscribers(self, data, addr): + self._run_future(*(fut(data, addr) for fut in self._subscribers.values())) \ No newline at end of file diff --git a/lib/backup.py b/lib/backup.py index b26c1265ab..25f3a027ab 100644 --- a/lib/backup.py +++ b/lib/backup.py @@ -24,6 +24,7 @@ """ import copy +import glob import logging import zipfile import shutil @@ -106,6 +107,7 @@ def create_backup(conf_base_dir, base_dir, filename_with_timestamp=False, before items_dir = os.path.join(conf_base_dir, 'items') logic_dir = os.path.join(conf_base_dir, 'logics') scenes_dir = os.path.join(conf_base_dir, 'scenes') + uf_dir = os.path.join(conf_base_dir, 'functions') # create new zip file @@ -123,10 +125,17 @@ def create_backup(conf_base_dir, base_dir, filename_with_timestamp=False, before backup_file(backupzip, source_dir, arc_dir, 'module.yaml') backup_file(backupzip, source_dir, arc_dir, 'plugin.yaml') backup_file(backupzip, source_dir, arc_dir, 'smarthome.yaml') + backup_file(backupzip, source_dir, arc_dir, 'struct.yaml') + struct_files = glob.glob(os.path.join( etc_dir, 'struct_*.yaml')) + for pn in struct_files: + fn = os.path.split(pn)[1] + backup_file(backupzip, source_dir, arc_dir, fn) # backup certificate files from /etc backup_directory(backupzip, etc_dir, '.cer') + backup_directory(backupzip, etc_dir, '.pem') + backup_directory(backupzip, etc_dir, '.key') # backup files from /items @@ -139,13 +148,17 @@ def create_backup(conf_base_dir, base_dir, filename_with_timestamp=False, before # backup files from /scenes #logger.warning("- scenes_dir = {}".format(scenes_dir)) - backup_directory(backupzip, scenes_dir) + backup_directory(backupzip, scenes_dir, '.yaml') + backup_directory(backupzip, scenes_dir, '.conf') + + # backup files from /functions + #logger.warning("- uf_dir = {}".format(uf_dir)) + backup_directory(backupzip, uf_dir, '.*') zipped_files = backupzip.namelist() logger.info("Zipped files: {}".format(zipped_files)) backupzip.close() - #logger.warning("- backup_dir = {}".format(backup_dir)) shtime = Shtime.get_instance() @@ -211,7 +224,7 @@ def backup_directory(backupzip, source_dir, extenstion='.yaml'): arc_dir = dir + os.path.sep files = [] for filename in os.listdir(source_dir): - if filename.endswith(extenstion): + if filename.endswith(extenstion) or extenstion == '.*': backup_file(backupzip, source_dir, arc_dir, filename) return @@ -240,6 +253,7 @@ def restore_backup(conf_base_dir, base_dir): items_dir = os.path.join(conf_base_dir, 'items') logic_dir = os.path.join(conf_base_dir, 'logics') scenes_dir = os.path.join(conf_base_dir, 'scenes') + uf_dir = os.path.join(conf_base_dir, 'functions') archive_file = '' for filename in os.listdir(restore_dir): @@ -278,6 +292,9 @@ def restore_backup(conf_base_dir, base_dir): # backup files from /scenes restore_directory(restorezip, 'scenes', scenes_dir, overwrite) + # backup files from /scenes + restore_directory(restorezip, 'functions', uf_dir, overwrite) + # mark zip-file as restored os.rename(restorezip_filename, restorezip_filename + '.done') diff --git a/lib/connection.py b/lib/connection.py index d291decf0c..d737679b02 100644 --- a/lib/connection.py +++ b/lib/connection.py @@ -21,13 +21,14 @@ """ -This library is softly on it's way out. In the future network classes for SmartHomeNG -will be implemented trough the network library lib.network, which is still in development. +This library is on its way out. Network classes for SmartHomeNG are provided by +lib.network. Creating lib.connection Server and Client class object will +create an appropriate WARNING log entry. -The following modules use an import lib.connection as of April 2018: +The following modules use an import lib.connection as of December 2021: smarthome.py for an object of Connections() Plugins: -russound, network, visu_websocket, asterisk, knx, squeezebox, nuki, mpd, raumfeld, cli, speech, xbmc, lirc +visu_websocket """ import logging @@ -54,6 +55,7 @@ class Stream() and thus also to class Client() which inherits from Stream() _family = {'UDP': socket.AF_INET, 'UDP6': socket.AF_INET6, 'TCP': socket.AF_INET, 'TCP6': socket.AF_INET6} _type = {'UDP': socket.SOCK_DGRAM, 'UDP6': socket.SOCK_DGRAM, 'TCP': socket.SOCK_STREAM, 'TCP6': socket.SOCK_STREAM} _monitor = [] + _deprecated_wanings = True def __init__(self, monitor=False): self._name = self.__class__.__name__ @@ -65,6 +67,53 @@ def _create_socket(self, flags=None): self.socket = socket.socket(family, type, proto) return sockaddr + def _deprecated_warning(self, n_func=''): + """ + Display function deprecated warning + """ + if hasattr(self, '_deprecated_warnings'): + if lib.utils.Utils.to_bool(self._deprecated_warnings) == False: + return + else: + return # if parameter is not defined + + d_func = 'sh.'+str(sys._getframe(1).f_code.co_name)+'()' + if n_func != '': + n_func = '- use the '+n_func+' instead' + try: + d_test = ' (' + str(sys._getframe(2).f_locals['self'].__module__) + ')' + except: + d_test = '' + + called_by = str(sys._getframe(2).f_code.co_name) + in_class = '' + try: + in_class = 'class ' + str(sys._getframe(2).f_locals['self'].__class__.__name__) + d_test + except: + in_class = 'a logic?' + d_test + if called_by == '': + called_by = str(sys._getframe(3).f_code.co_name) + level = 3 + while True: + level += 1 + try: + c_b = str(sys._getframe(level).f_code.co_name) + except ValueError: + c_b = '' + if c_b == '': + break + called_by += ' -> ' + c_b + +# called_by = str(sys._getframe(3).f_code.co_name) + + if not hasattr(self, 'dep_id_list'): + self.dep_id_list = [] + id_str = d_func + '|' + in_class + '|' + called_by + if not id_str in self.dep_id_list: + self.logger.warning("DEPRECATED: Used function '{}', called in '{}' by '{}' {}".format(d_func, in_class, called_by, n_func)) + self.dep_id_list.append(id_str) + return + class Connections(Base): """ @@ -354,6 +403,7 @@ def __init__(self, host, port, proto='TCP'): self._proto = proto self.address = "{}:{}".format(host, port) self.connected = False + self._deprecated_warning('lib.network.Tcp_server() class') def connect(self): try: @@ -581,6 +631,7 @@ def __init__(self, host, port, proto='TCP', monitor=False): self._connection_attempts = 0 self._connection_errorlog = 60 self._connection_lock = threading.Lock() + self._deprecated_warning('lib.network.Tcp_client() class') def connect(self): self._connection_lock.acquire() diff --git a/lib/constants.py b/lib/constants.py index e43ba0f956..9c252f7f6a 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -53,7 +53,13 @@ KEY_AUTOTIMER = 'autotimer' KEY_ON_UPDATE = 'on_update' KEY_ON_CHANGE = 'on_change' -KEY_LOG_CHANGE = 'log_change' + +KEY_LOG_CHANGE = 'log_change' +KEY_LOG_LEVEL = 'log_level' +KEY_LOG_TEXT = 'log_text' +KEY_LOG_MAPPING = 'log_mapping' +KEY_LOG_RULES = 'log_rules' + KEY_STRUCT = 'struct' KEY_REMARK = 'remark' diff --git a/lib/env/location.py b/lib/env/location.py index 453ff52ea7..442d2219e1 100644 --- a/lib/env/location.py +++ b/lib/env/location.py @@ -1,6 +1,13 @@ # lib/env/location.py +if sh.env.location.lon() == 0 and sh.env.location.lat() == 0: + try: + sh.env.location.lon(sh._lon, logic.lname) + sh.env.location.lat(sh._lat, logic.lname) + sh.env.location.elev(sh._elev, logic.lname) + except: pass + if sh.sun: try: # sunrise = sh.sun.rise().astimezone(sh.tzinfo()) diff --git a/lib/env/location.yaml b/lib/env/location.yaml index 62712837b1..4d49936b51 100644 --- a/lib/env/location.yaml +++ b/lib/env/location.yaml @@ -2,6 +2,15 @@ env: location: + lat: + type: num + + lon: + type: num + + elev: + type: num + day: type: bool diff --git a/lib/item/item.py b/lib/item/item.py index 2c72f9e058..cf4ebcff36 100644 --- a/lib/item/item.py +++ b/lib/item/item.py @@ -29,6 +29,7 @@ import copy import json import threading +import ast import time # for calls to time in eval import math # for calls to math in eval @@ -41,8 +42,9 @@ from lib.constants import (ITEM_DEFAULTS, FOO, KEY_ENFORCE_UPDATES, KEY_ENFORCE_CHANGE, KEY_CACHE, KEY_CYCLE, KEY_CRONTAB, KEY_EVAL, KEY_EVAL_TRIGGER, KEY_TRIGGER, KEY_CONDITION, KEY_NAME, KEY_TYPE, KEY_STRUCT, KEY_REMARK, KEY_INSTANCE, KEY_VALUE, KEY_INITVALUE, PLUGIN_PARSE_ITEM, KEY_AUTOTIMER, KEY_ON_UPDATE, KEY_ON_CHANGE, - KEY_LOG_CHANGE, KEY_THRESHOLD, - KEY_ATTRIB_COMPAT, ATTRIB_COMPAT_V12, ATTRIB_COMPAT_LATEST) + KEY_LOG_CHANGE, KEY_LOG_LEVEL, KEY_LOG_TEXT, KEY_LOG_MAPPING, KEY_LOG_RULES, + KEY_THRESHOLD, KEY_ATTRIB_COMPAT, ATTRIB_COMPAT_V12, ATTRIB_COMPAT_LATEST) +from lib.utils import Utils from .property import Property from .helpers import * @@ -132,6 +134,11 @@ def __init__(self, smarthome, parent, path, config, items_instance=None): self._on_change_dest_var_unexp = [] # -> KEY_ON_CHANGE destination var (with unexpanded item reference) self._log_change = None self._log_change_logger = None + self._log_level = None + self._log_level_name = None + self._log_mapping = {} + self._log_rules = {} + self._log_text = None self._fading = False self._items_to_trigger = [] self.__last_change = self.shtime.now() @@ -226,13 +233,52 @@ def __init__(self, smarthome, parent, path, config, items_instance=None): logger.warning("Item __init__: {}: Invalid trigger_condition specified! Must be a list".format(self._path)) elif attr in [KEY_ON_CHANGE, KEY_ON_UPDATE]: self._process_on_xx_list(attr, value) + + elif attr in [KEY_LOG_LEVEL]: + if value != '': + level = value.upper() + level_name = level + if Utils.is_int(level): + level = int(level) + level_name = logging.getLevelName(level) + if logging.getLevelName(level) == 'Level ' + str(level): + logger.warning(f"Item {self._path}: Invalid loglevel '{value}' defined in attribute '{KEY_LOG_LEVEL}' - Level 'INFO' will be used instead") + setattr(self, '_log_level_name', 'INFO') + setattr(self, '_log_level', logging.getLevelName('INFO')) + else: + setattr(self, '_log_level_name', level_name) + setattr(self, '_log_level', logging.getLevelName(level_name)) elif attr in [KEY_LOG_CHANGE]: if value != '': setattr(self, '_log_change', value) self._log_change_logger = logging.getLogger('items.'+value) # set level to make logger appear in internal list of loggers (if not configured by logging.yaml) if self._log_change_logger.level == 0: - self._log_change_logger.setLevel('INFO') + if self._log_level == 'DEBUG': + self._log_change_logger.setLevel('DEBUG') + else: + self._log_change_logger.setLevel('INFO') + if self._log_level is None: + setattr(self, '_log_level_name', 'INFO') + setattr(self, '_log_level', logging.getLevelName('INFO')) + elif attr in [KEY_LOG_MAPPING]: + if value != '': + try: + value_dict = ast.literal_eval(value) + setattr(self, '_log_mapping', value_dict) + except Exception as e: + logger.warning(f"Item {self._path}: Invalid data for attribute '{KEY_LOG_MAPPING}': {value} - Exception: {e}") + elif attr in [KEY_LOG_RULES]: + if value != '': + try: + value_dict = ast.literal_eval(value) + setattr(self, '_log_rules', value_dict) + except Exception as e: + logger.warning(f"Item {self._path}: Invalid data for attribute '{KEY_LOG_RULES}': {value} - Exception: {e}") + elif attr in [KEY_LOG_TEXT]: + if value != '': + setattr(self, '_log_text', value) + elif attr == KEY_AUTOTIMER: time, value, compat = split_duration_value_string(value, ATTRIB_COMPAT_DEFAULT) timeitem = None @@ -360,7 +406,10 @@ def __init__(self, smarthome, parent, path, config, items_instance=None): # Write item value to log, if Item has attribute log_change set self._log_on_change(self._value, 'Init', 'Cache', None) except Exception as e: - logger.warning("Item {}: problem reading cache: {}".format(self._path, e)) + if str(e).startswith('[Errno 2]'): + logger.info("Item {}: No cached value: {}".format(self._path, e)) + else: + logger.warning("Item {}: Problem reading cache: {}".format(self._path, e)) ############################################################# # Cache write/init @@ -368,7 +417,7 @@ def __init__(self, smarthome, parent, path, config, items_instance=None): if self._cache: if not os.path.isfile(self._cache): cache_write(self._cache, self._value) - logger.warning("Item {}: Created cache for item: {}".format(self._cache, self._cache)) + logger.notice("Created cache for item: {} in file {}".format(self._cache, self._cache)) ############################################################# # Plugins @@ -1133,6 +1182,9 @@ def __run_eval(self, value=None, caller='Eval', source=None, dest=None): shtime = self.shtime items = _items_instance import math + import lib.userfunctions as uf + # uf.import_user_modules() - Modules were loaded during initialization phase of shng + cond = eval(self._trigger_condition) logger.warning("Item {}: Condition result '{}' evaluating trigger condition {}".format(self._path, cond, self._trigger_condition)) except Exception as e: @@ -1153,6 +1205,9 @@ def __run_eval(self, value=None, caller='Eval', source=None, dest=None): shtime = self.shtime items = _items_instance import math + import lib.userfunctions as uf + # uf.import_user_modules() - Modules were loaded during initialization phase of shng + try: #logger.warning("Item {}: Evaluating item value {}".format(self._path, self._eval)) value = eval(self._eval) @@ -1189,6 +1244,8 @@ def _run_on_xxx(self, path, value, on_dest, on_eval, attr='?'): shtime = self.shtime items = _items_instance import math + import lib.userfunctions as uf + #uf.import_user_modules() - Modules were loaded during initialization phase of shng logger.info("Item {}: '{}' evaluating {} = {}".format(self._path, attr, on_dest, on_eval)) @@ -1253,19 +1310,82 @@ def __run_on_change(self, value=None): self._run_on_xxx(self._path, value, on_change_dest, on_change_eval, 'On_Change') + def _log_build_standardtext(self, value, caller, source=None, dest=None): + + log_src = '' + if source is not None: + log_src += ' (' + source + ')' + log_dst = '' + if dest is not None: + log_dst += ', dest: ' + dest + txt = f"Item Change: {self._path} = {value} - caller: {caller}{log_src}{log_dst}" + return txt + + + def _log_build_text(self, value, caller, source=None, dest=None): + + # value + # caller + # source + # dest + lvalue = self.property.last_value + mlvalue = self._log_mapping.get(lvalue, lvalue) + name = self._name + age = round(self._get_last_change_age(), 2) + pname = self.__parent._name + id = self._path + pid = self.__parent._path + mvalue = self._log_mapping.get(value, value) + lowlimit = self._log_rules.get('lowlimit', None) + highlimit = self._log_rules.get('highlimit', None) + + try: + #logger.warning(f"self._log_text: {self._log_text}, type={type(self._log_text)}") + txt = eval(f"f'{self._log_text}'") + except Exception as e: + logger.error(f"{id}: Invalid log_text template ' {self._log_text}' - (Exception: {e})") + txt = self._log_text + return txt + + def _log_on_change(self, value, caller, source=None, dest=None): """ Write log, if Item has attribute log_change set :return: """ if self._log_change_logger is not None: - log_src = '' - if source is not None: - log_src += ' (' + source + ')' - log_dst = '' - if dest is not None: - log_dst += ', dest: ' + dest - self._log_change_logger.info("Item Change: {} = {} - caller: {}{}{}".format(self._path, value, caller, log_src, log_dst)) + filter_list = self._log_rules.get('filter', []) + + if self._type == 'num': + low_limit = self._log_rules.get('lowlimit', None) + if low_limit: + if low_limit > float(value): + return + high_limit = self._log_rules.get('highlimit', None) + if high_limit: + if high_limit <= float(value): + return + if filter_list != []: + if not float(value) in filter_list: + return + else: + if filter_list != []: + if not value in filter_list: + return + + if self._log_text is None: + txt = self._log_build_standardtext(value, caller, source, dest) + else: + txt = self._log_build_text(value, caller, source, dest) + + # log_src = '' + # if source is not None: + # log_src += ' (' + source + ')' + # log_dst = '' + # if dest is not None: + # log_dst += ', dest: ' + dest + #self._log_change_logger.log(self._log_level, "Item Change: {} = {} - caller: {}{}{}".format(self._path, value, caller, log_src, log_dst)) + self._log_change_logger.log(self._log_level, txt) def __trigger_logics(self, source_details=None): @@ -1437,7 +1557,7 @@ def get_method_triggers(self): return self.__methods_to_trigger - def timer(self, time, value, auto=False, compat=ATTRIB_COMPAT_DEFAULT): + def timer(self, time, value, auto=False, compat=ATTRIB_COMPAT_DEFAULT, source=None): time = self._cast_duration(time) value = self._castvalue_to_itemtype(value, compat) if auto: @@ -1446,7 +1566,10 @@ def timer(self, time, value, auto=False, compat=ATTRIB_COMPAT_DEFAULT): else: caller = 'Timer' next = self.shtime.now() + datetime.timedelta(seconds=time) - self._sh.scheduler.add(self._itemname_prefix+self.id() + '-Timer', self.__call__, value={'value': value, 'caller': caller}, next=next) + if source is None: + self._sh.scheduler.add(self._itemname_prefix+self.id() + '-Timer', self.__call__, value={'value': value, 'caller': caller}, next=next) + else: + self._sh.scheduler.add(self._itemname_prefix+self.id() + '-Timer', self.__call__, value={'value': value, 'caller': caller, 'source': source}, next=next) def remove_timer(self): @@ -1455,6 +1578,7 @@ def remove_timer(self): def autotimer(self, time=None, value=None, compat=ATTRIB_COMPAT_V12): if time is not None and value is not None: + time = self._cast_duration(time) self._autotimer = [(time, value), compat, None, None] else: self._autotimer = False diff --git a/lib/item/items.py b/lib/item/items.py index 4bc10fc2a7..e5079603f0 100644 --- a/lib/item/items.py +++ b/lib/item/items.py @@ -292,16 +292,23 @@ def return_item(self, string): return self.__item_dict[string] - def return_items(self): + def return_items(self, sorted=False): """ Function to return a list with all defined items + :param sorted: return list sorted alphabetically, defaults to False + :type sorted: bool + :return: List of all items :rtype: list """ - for item in self.__items: - yield self.__item_dict[item] + if sorted: + for item in sorted(self.__items): + yield self.__item_dict[item] + else: + for item in self.__items: + yield self.__item_dict[item] def match_items(self, regex): diff --git a/lib/item/structs.py b/lib/item/structs.py index 986bfbcdff..258d086254 100644 --- a/lib/item/structs.py +++ b/lib/item/structs.py @@ -238,6 +238,37 @@ def return_struct_definitions(self, all=True): return result + def load_struct_definitions_from_file(self, etc_dir, fn, key_prefix): + """ + Loads struct definitions from a file + + :param etc_dir: path to etc directory of SmartHomeNG + :param fn: filename to load struct definition(s) from + :param key_prefix: prefix to be used when adding struct(s) to loaded definitions + """ + if key_prefix == '': + self.logger.info(f"Loading struct file '{fn}' without key-prefix") + else: + self.logger.info(f"Loading struct file '{fn}' with key-prefix '{key_prefix}'") + + # Read in item structs from ../etc/struct.yaml + struct_definitions = shyaml.yaml_load(os.path.join(etc_dir, fn), ordered=True, ignore_notfound=True) + + # if valid struct definition file etc/struct.yaml ist found + if struct_definitions is not None: + if isinstance(struct_definitions, collections.OrderedDict): + for key in struct_definitions: + if fn == 'struct.yaml': + struct_name = key + else: + struct_name = key_prefix + '.' + key + self.add_struct_definition('', struct_name, struct_definitions[key]) + else: + self.logger.error(f"load_itemdefinitions(): Invalid content in {fn}: struct_definitions = '{struct_definitions}'") + + return + + def load_struct_definitions(self, etc_dir): # -------------------------------------------------------------------- @@ -245,18 +276,20 @@ def load_struct_definitions(self, etc_dir): # # structs are merged into the item tree in lib.config # - # structs are read in from metadata file of plugins while loading plugins - # and from ../etc/struct.yaml + # - plugin-structs are read in from metadata file of plugins while loading plugins + # - other structs are read in from ../etc/struct.yaml by this procedure + # - further structs are read in from ../etc/struct_.yaml by this procedure # - # Read in item structs from ../etc/struct.yaml - struct_definitions = shyaml.yaml_load(os.path.join(etc_dir, 'struct.yaml'), ordered=True, ignore_notfound=True) - if struct_definitions is not None: - if isinstance(struct_definitions, collections.OrderedDict): - for key in struct_definitions: - self.add_struct_definition('', key, struct_definitions[key]) - else: - self.logger.error("load_itemdefinitions(): Invalid content in struct.yaml: struct_definitions = '{}'".format(struct_definitions)) + self.load_struct_definitions_from_file(etc_dir, 'struct.yaml', '') + + # look for further struct files + fl = os.listdir(etc_dir) + for fn in fl: + if fn.startswith('struct_') and fn.endswith('.yaml'): + key_prefix = 'my.' + fn[7:-5] + self.load_struct_definitions_from_file(etc_dir, fn, key_prefix) + # Resolve struct references in structs and fill in the content of the struct self.fill_nested_structs() # for Testing: Save structure of joined item structs diff --git a/lib/item_old.py b/lib/item_old.py deleted file mode 100644 index 8c1516895c..0000000000 --- a/lib/item_old.py +++ /dev/null @@ -1,2780 +0,0 @@ -#!/usr/bin/env python3 -# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab -######################################################################### -# Copyright 2016-2018 Martin Sinn m.sinn@gmx.de -# Copyright 2016 Christian Straßburg c.strassburg@gmx.de -# Copyright 2012-2013 Marcus Popp marcus@popp.mx -######################################################################### -# This file is part of SmartHomeNG. -# -# SmartHomeNG is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SmartHomeNG is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with SmartHomeNG. If not, see . -######################################################################### - - -""" -This library implements items in SmartHomeNG. - -The main class ``Items`` implements the handling for all items. This class has a static method to get a handle to the -instance of the Items class, that is created during initialization of SmartHomeNG. This method implements a way to -access the API for handling items without having to juggle through the object hierarchy of the running SmartHomeNG. - -This API enables plugins and logics to access the details of the items initialized in SmartHomeNG. - -Each item is represented by an instance of the class ``Item``. - -The methods of the class Items implement the API for items. -They can be used the following way: To call eg. **get_toplevel_items()**, use the following syntax: - -.. code-block:: python - - from lib.item import Items - sh_items = Items.get_instance() - - # to access a method (eg. get_toplevel_items()): - tl_items = sh_items.get_toplevel_items() - - -:Note: Do not use the functions or variables of the main smarthome object any more. They are deprecated. Use the methods of the class **Items** instead. - -:Note: This library is part of the core of SmartHomeNG. Regular plugins should not need to use this API. It is manily implemented for plugins near to the core like **backend** and the core itself! - -""" -import copy -import datetime -import dateutil.parser -import time # for calls to time in eval -import logging -import collections -import os -import re -import pickle -import threading -import math # for calls to math in eval -from math import * -import json -from ast import literal_eval -import inspect - -from lib.plugin import Plugins -import lib.shyaml as shyaml -from lib.shtime import Shtime - -import lib.utils -from lib.constants import (ITEM_DEFAULTS, FOO, KEY_ENFORCE_UPDATES, KEY_ENFORCE_CHANGE, KEY_CACHE, KEY_CYCLE, KEY_CRONTAB, KEY_EVAL, - KEY_EVAL_TRIGGER, KEY_TRIGGER, KEY_CONDITION, KEY_NAME, KEY_TYPE, KEY_STRUCT, - KEY_VALUE, KEY_INITVALUE, PLUGIN_PARSE_ITEM, KEY_AUTOTIMER, KEY_ON_UPDATE, KEY_ON_CHANGE, - KEY_LOG_CHANGE, KEY_THRESHOLD, CACHE_FORMAT, CACHE_JSON, CACHE_PICKLE, - KEY_ATTRIB_COMPAT, ATTRIB_COMPAT_V12, ATTRIB_COMPAT_LATEST) - - -ATTRIB_COMPAT_DEFAULT_FALLBACK = ATTRIB_COMPAT_V12 -ATTRIB_COMPAT_DEFAULT = '' - - -logger = logging.getLogger(__name__) - - -_items_instance = None # Pointer to the initialized instance of the Items class (for use by static methods) - - - -class Items(): - """ - Items loader class. (Item-methods from bin/smarthome.py are moved here.) - - - An instance is created during initialization by bin/smarthome.py - - There should be only one instance of this class. So: Don't create another instance - - :param smarthome: Instance of the smarthome master-object - :type smarthome: object - """ - - __items = [] # list with the paths of all items that are defined - __item_dict = {} # dict with all the items that are defined in the form: {"": "", ...} - - _children = [] # List of top level items - - _struct_definitions = collections.OrderedDict() # definitions of item structures - - - def __init__(self, smarthome): - self._sh = smarthome - - global _items_instance - if _items_instance is not None: - import inspect - curframe = inspect.currentframe() - calframe = inspect.getouterframes(curframe, 4) - logger.critical("A second 'items' object has been created. There should only be ONE instance of class 'Items'!!! Called from: {} ({})".format(calframe[1][1], calframe[1][3])) - - _items_instance = self - - - # ----------------------------------------------------------------------------------------- - # Following (static) method of the class Items implement the API for Items in SmartHomeNG - # ----------------------------------------------------------------------------------------- - - @staticmethod - def get_instance(): - """ - Returns the instance of the Items class, to be used to access the items-api - - Use it the following way to access the api: - - .. code-block:: python - - from lib.item import Items - items = Items.get_instance() - - # to access a method (eg. return_items()): - items.return_items() - - - :return: items instance - :rtype: object - """ - return _items_instance - - - # ----------------------------------------------------------------------------------------- - # Following methods handle structs - # ----------------------------------------------------------------------------------------- - - struct_merge_lists = True - - - def merge_structlists(self, l1, l2, key=''): - if not self.struct_merge_lists: - logger.warning("merge_structlists: Not merging lists, key '{}' value '{}' is ignored'".format(key, l2)) - return l1 # First wins - else: - if not isinstance(l1, list): - l1 = [l1] - if not isinstance(l2, list): - l2 = [l2] - return l1 + l2 - - - def add_struct_definition(self, plugin_name, struct_name, struct): - """ - Add a struct definition - - called when reading in item structs from ../etc/struct.yaml - or from lib.plugin when reading in plugin-metadata - - :param plugin_name: - :param struct_name: - :param struct: - :return: - """ - if plugin_name == '': - name = struct_name - else: - name = plugin_name + '.' + struct_name - - logger.info("add_struct_definition: struct '{}' = {}".format(name, struct)) - self._struct_definitions[name] = struct - return - - - def merge(self, source, destination, source_name='', dest_name=''): - ''' - Merges an OrderedDict Tree into another one - - :param source: source tree to merge into another one - :param destination: destination tree to merge into - :type source: OrderedDict - :type destination: OrderedDict - - :return: Merged configuration tree - :rtype: OrderedDict - - :Example: Run me with nosetests --with-doctest file.py - - .. code-block:: python - - >>> a = { 'first' : { 'all_rows' : { 'pass' : 'dog', 'number' : '1' } } } - >>> b = { 'first' : { 'all_rows' : { 'fail' : 'cat', 'number' : '5' } } } - >>> merge(b, a) == { 'first' : { 'all_rows' : { 'pass' : 'dog', 'fail' : 'cat', 'number' : '5' } } } - True - - ''' - for key, value in source.items(): - if isinstance(value, collections.OrderedDict): - # get node or create one - node = destination.setdefault(key, collections.OrderedDict()) - if node == 'None': - destination[key] = value - else: - self.merge(value, node, source_name, dest_name) - else: - if isinstance(value, list) or isinstance(destination.get(key, None), list): - if destination.get(key, None) is None: - destination[key] = value - else: - destination[key] = self.merge_structlists(destination[key], value, key) - else: - # convert to string and remove newlines from multiline attributes - if destination.get(key, None) is None: - destination[key] = str(value).replace('\n', '') - return destination - - - def resolve_structs(self, struct, struct_name, substruct_names): - """ - Resolve a struct reference - - if the struct definition that is to be inserted contains a struct reference, it is resolved first - - :param struct: struct that contains a struct reference - :param substruct: sub-struct definition that shall be inserted - :param struct_name: name of the struct that contains a struct reference - :param substruct_name: name of the sub-struct definition that shall be inserted - """ - - logger.info("resolve_structs: struct_name='{}', substruct_names='{}'".format(struct_name, substruct_names)) - - new_struct = collections.OrderedDict() - structentry_list = list(struct.keys()) - for structentry in structentry_list: - # copy all existing attributes and sub-entrys of the struct - if new_struct.get(structentry, None) is None: - logger.info("resolve_struct: - copy attribute structentry='{}', value='{}'".format(structentry, struct[structentry])) - new_struct[structentry] = copy.deepcopy(struct[structentry]) - else: - logger.debug("resolve_struct: - key='{}', value is ignored'".format(structentry)) - if structentry == 'struct': - for substruct_name in substruct_names: - # for every substruct - logger.info("resolve_struct: ->substruct_name='{}'".format(substruct_name)) - substruct = self._struct_definitions.get(substruct_name, None) - # merge in the sub-struct - for key in substruct: - if new_struct.get(key, None) is None: - logger.info("resolve_struct: - key='{}', value='{}' -> new_struct='{}'".format(key, substruct[key], new_struct)) - new_struct[key] = copy.deepcopy(substruct[key]) - elif isinstance(new_struct.get(key, None), dict): - logger.info("resolve_struct: - merge key='{}', value='{}' -> new_struct='{}'".format(key, substruct[key], new_struct)) - self.merge(substruct[key], new_struct[key], key, struct_name+'.'+key) - elif isinstance(new_struct.get(key, None), list) or isinstance(substruct.get(key, None), list): - new_struct[key] = self.merge_structlists(new_struct[key], substruct[key], key) - else: - logger.debug("resolve_struct: - key='{}', value '{}' is ignored'".format(key, substruct[key])) - - return new_struct - - - def fill_nested_structs(self): - """ - Resolve struct references in structs and fill in the content of the struct - - :return: - """ - for struct_name in self._struct_definitions: - # for every defined struct - struct = self._struct_definitions[struct_name] - substruct_names = struct.get('struct', None) - if substruct_names is not None: - # stuct has a sub-struct - if isinstance(substruct_names, str): - substruct_names = [substruct_names] - struct = self.resolve_structs(struct, struct_name, substruct_names) - self._struct_definitions[struct_name] = struct - - - def return_struct_definitions(self): - """ - Return all loaded structure template definitions - - :return: - :rtype: dict - """ - return self._struct_definitions - - - def load_itemdefinitions(self, env_dir, items_dir, etc_dir, plugins_dir): - """ - Load item definitions - - This method is called during initialization of SmartHomeNG to initialize the item tree. - For that, it loads the item definitions from **../items** directory through calling the function **parse_itemsdir()** - from **lib.config** - - :param env_dir: path to the directory containing the core's environment item definition files - :param items_dir: path to the directory containing the user's item definition files - :param etc_dir: path to the directory containing the user's configuration files (only used for 'struct' support) - :param plugins_dir: path to the directory containing the plugins (only used for 'struct' support) - :type env_dir: str - :type items_dir: str - :type etc_dir: str - :type plugins_dir: str - """ - - # -------------------------------------------------------------------- - # Read in all struct definitions before reading item definitions - # - # structs are merged into the item tree in lib.config - # - # structs are read in from metadata file of plugins while loading plugins - # and from ../etc/struct.yaml - # - # Read in item structs from ../etc/struct.yaml - struct_definitions = shyaml.yaml_load(os.path.join(etc_dir, 'struct.yaml'), ordered=True, ignore_notfound=True) - if struct_definitions is not None: - if isinstance(struct_definitions, collections.OrderedDict): - for key in struct_definitions: - self.add_struct_definition('', key, struct_definitions[key]) - else: - logger.error("load_itemdefinitions(): Invalid content in struct.yaml: struct_definitions = '{}'".format(struct_definitions)) - - self.fill_nested_structs() - - # for Testing: Save structure of joined item structs - logger.warning("load_itemdefinitions(): For testing the joined item structs are saved to {}".format(os.path.join(etc_dir, 'structs_joined.yaml'))) - shyaml.yaml_save(os.path.join(etc_dir, 'structs_joined.yaml'), self._struct_definitions) - - # -------------------------------------------------------------------- - # Read in item definitions - # - item_conf = None - item_conf = lib.config.parse_itemsdir(env_dir, item_conf) - item_conf = lib.config.parse_itemsdir(items_dir, item_conf, addfilenames=True, struct_dict=self._struct_definitions) - - for attr, value in item_conf.items(): - if isinstance(value, dict): - child_path = attr - try: - # (smarthome, parent, path, config): - child = Item(self._sh, self, child_path, value) - except Exception as e: - logger.error("load_itemdefinitions: Item {}: problem creating: ()".format(child_path, e)) - else: - vars(self)[attr] = child - vars(self._sh)[attr] = child - self.add_item(child_path, child) - self._children.append(child) - del(item_conf) # clean up - - # -------------------------------------------------------------------- - # prepare loaded items for run phase of SmartHomeNG - # - for item in self.return_items(): - item._init_prerun() - # starting schedulers (for crontab and cycle attributes) moved to the end of the initialization in SmartHomeNG v1.6 - for item in self.return_items(): - item._init_start_scheduler() - for item in self.return_items(): - item._init_run() - -# self.item_count = len(self.__items) -# self._sh.item_count = self.item_count() - - - def add_item(self, path, item): - """ - Function to to add an item to the dictionary of items. - If the path does not exist, it is created - - :param path: Path of the item - :param item: The item itself - :type path: str - :type item: object - """ - - if path not in self.__items: - self.__items.append(path) - print("\nitems.add_item: path={}, item={} -> {}".format(path, item, self.__items)) - self.__item_dict[path] = item - - # aus bin/smarthome.py - # def __iter__(self): - # for child in self.__children: - # yield child - - def get_toplevel_items(self): - """ - Returns a list with all items defined at the top level - - :return: items defined at the top level - :rtype: list - """ - for child in self._children: - yield child - - # aus lib.logic.py - # def __iter__(self): - # for logic in self._logics: - # yield logic - - - - def return_item(self, string): - """ - Function to return the item for a given path - - :param string: Path of the item to return - :type string: str - - :return: Item - :rtype: object - """ - - if string in self.__items: - return self.__item_dict[string] - - - def return_items(self): - """ - Function to return a list with all defined items - - :return: List of all items - :rtype: list - """ - - for item in self.__items: - yield self.__item_dict[item] - - - def match_items(self, regex): - """ - Function to match items against a regular expression - - :param regex: Regular expression to match items against - :type regex: str - - :return: List of matching items - :rtype: list - """ - - regex, __, attr = regex.partition(':') - regex = regex.replace('.', '\.').replace('*', '.*') + '$' - regex = re.compile(regex) - attr, __, val = attr.partition('[') - val = val.rstrip(']') - if attr != '' and val != '': - return [self.__item_dict[item] for item in self.__items if regex.match(item) and attr in self.__item_dict[item].conf and ((type(self.__item_dict[item].conf[attr]) in [list,dict] and val in self.__item_dict[item].conf[attr]) or (val == self.__item_dict[item].conf[attr]))] - elif attr != '': - return [self.__item_dict[item] for item in self.__items if regex.match(item) and attr in self.__item_dict[item].conf] - else: - return [self.__item_dict[item] for item in self.__items if regex.match(item)] - - - def _attribute_find(self, attr, attr_list): - """ - Find an attribute in an attribute list - - :param attr: - :param attr_list: - :return: - - examples: - attr_list = ['avm_identifier' , 'avm_data_type@willy_tel', 'avm_wlan_index', 'visu_acl'] - - attr result - ---_ ------ - 'willy_tel' -> False - '@willy_tel' -> True - '@fritz_wz' -> False - - 'avm_data_type@willy_tel' -> True - 'avm_data_type@fritz_wz' -> False - 'avm_data_type' -> False - 'avm_data_type@' -> True - - 'avm_wlan_index' -> True - 'avm_wlan_index@' -> True - - 'visu_acl' -> True - '@visu_acl' -> False - - """ - result = False - if attr.endswith('@'): - result = any(s for s in attr_list if s.startswith(attr)) - if not result: - result = attr[:-1] in attr_list - elif attr.startswith('@'): - result = any(s for s in attr_list if s.endswith(attr)) - else: - result = attr in attr_list - return result - - - def find_items(self, conf): - """ - Function to find items that match the specified configuration - - :param conf: Configuration to look for - :type conf: str - - :return: list of matching items - :rtype: list - """ - - for item in self.__items: - # if conf in self.__item_dict[item].conf: - # yield self.__item_dict[item] - if self._attribute_find(conf, self.return_item(item).property.attributes): - yield self.__item_dict[item] - - - def find_children(self, parent, conf): - """ - Function to find children with the specified configuration - - :param parent: parent item on which to start the search - :param conf: Configuration to look for - :type parent: str - :type conf: str - - :return: list or matching child-items - :rtype: list - """ - - children = [] - for item in parent: - # if conf in item.conf: - # children.append(item) - if self._attribute_find(conf, item.property.attributes): - children.append(item) - children += self.find_children(item, conf) - return children - - - def item_count(self): - """ - Return the number of defined items - - :return: number of items - :rtype: int - """ - return len(self.__items) - - - def stop(self, signum=None, frame=None): - """ - Stop what all items are doing - - At the moment, it stops fading of all items - """ - for item in self.__items: - self.__item_dict[item]._fading = False - - - - -##################################################################### -# Item Class -##################################################################### - -""" -The class ``Item`` implements the methods and attributes of an item. Each item is represented by an instance of the class ``Item``. -""" - -class Item(): - """ - Class from which item objects are created - - The class ``Item`` implements the methods and attributes of an item. Each item is represented by an instance - of the class ``Item``. For an item to be valid and usable, it has to be part of the item tree, which is - maintained by an object of class ``Items``. - - This class is used by the method ```load_itemdefinitions()`` of the **Items** object. - """ - - _itemname_prefix = 'items.' # prefix for scheduler names - - def __init__(self, smarthome, parent, path, config): - self._sh = smarthome - self._use_conditional_triggers = False - try: - if self._sh._use_conditional_triggers.lower() == 'true': - self._use_conditional_triggers = True - except: pass - - self.plugins = Plugins.get_instance() - self.shtime = Shtime.get_instance() - - self._filename = None - self._autotimer = False - self._cache = False - self.cast = _cast_bool - self.__changed_by = 'Init:None' - self.__updated_by = 'Init:None' - self.__children = [] - self.conf = {} - self._crontab = None - self._cycle = None - self._enforce_updates = False - self._enforce_change = False - self._eval = None # -> KEY_EVAL - self._eval_unexpanded = '' - self._eval_trigger = False - self._trigger = False - self._trigger_unexpanded = [] - self._trigger_condition_raw = [] - self._trigger_condition = None - self._on_update = None # -> KEY_ON_UPDATE eval expression - self._on_change = None # -> KEY_ON_CHANGE eval expression - self._on_update_dest_var = None # -> KEY_ON_UPDATE destination var - self._on_change_dest_var = None # -> KEY_ON_CHANGE destination var - self._on_update_unexpanded = [] # -> KEY_ON_UPDATE eval expression (with unexpanded item references) - self._on_change_unexpanded = [] # -> KEY_ON_CHANGE eval expression (with unexpanded item references) - self._on_update_dest_var_unexp = [] # -> KEY_ON_UPDATE destination var (with unexpanded item reference) - self._on_change_dest_var_unexp = [] # -> KEY_ON_CHANGE destination var (with unexpanded item reference) - self._log_change = None - self._log_change_logger = None - self._fading = False - self._items_to_trigger = [] - self.__last_change = self.shtime.now() - self.__last_update = self.shtime.now() - self._lock = threading.Condition() - self.__logics_to_trigger = [] - self._name = path - self.__prev_change = self.shtime.now() - self.__prev_update = self.shtime.now() - self.__methods_to_trigger = [] - self.__parent = parent - self._path = path - self._sh = smarthome - self._threshold = False - self._threshold_data = [0,0,False] - self._type = None - self._struct = None - self._value = None - self.__last_value = None - self.__prev_value = None - - self.property = self.Property(self) - # history - # TODO: create history Arrays for some values (value, last_change, last_update (usage: multiklick,...) - # self.__history = [None, None, None, None, None] - # - # def getValue(num): - # return (str(self.__history[(num - 1)])) - # - # def addValue(avalue): - # self.__history.append(avalue) - # if len(self.__history) > 5: - # self.__history.pop(0) - # - if hasattr(smarthome, '_item_change_log'): - self._change_logger = logger.info - else: - self._change_logger = logger.debug - ############################################################# - # Initialize attribute assignment compatibility - ############################################################# - global ATTRIB_COMPAT_DEFAULT - if ATTRIB_COMPAT_DEFAULT == '': - if hasattr(smarthome, '_'+KEY_ATTRIB_COMPAT): - config_attrib = getattr(smarthome,'_'+KEY_ATTRIB_COMPAT) - if str(config_attrib) in [ATTRIB_COMPAT_V12, ATTRIB_COMPAT_LATEST]: - logger.info("Global configuration: '{}' = '{}'.".format(KEY_ATTRIB_COMPAT, str(config_attrib))) - ATTRIB_COMPAT_DEFAULT = config_attrib - else: - logger.warning("Global configuration: '{}' has invalid value '{}'.".format(KEY_ATTRIB_COMPAT, str(config_attrib))) - if ATTRIB_COMPAT_DEFAULT == '': - ATTRIB_COMPAT_DEFAULT = ATTRIB_COMPAT_DEFAULT_FALLBACK - ############################################################# - # Item Attributes - ############################################################# - for attr, value in config.items(): - if not isinstance(value, dict): - if attr in [KEY_CYCLE, KEY_NAME, KEY_TYPE, KEY_STRUCT, KEY_VALUE, KEY_INITVALUE]: - if attr == KEY_INITVALUE: - attr = KEY_VALUE - setattr(self, '_' + attr, value) - elif attr in [KEY_EVAL]: - self._process_eval(value) - elif attr in [KEY_CACHE, KEY_ENFORCE_UPDATES, KEY_ENFORCE_CHANGE]: # cast to bool - try: - setattr(self, '_' + attr, _cast_bool(value)) - except: - logger.warning("Item '{0}': problem parsing '{1}'.".format(self._path, attr)) - continue - elif attr in [KEY_CRONTAB]: # cast to list - if isinstance(value, str): - value = [value, ] - setattr(self, '_' + attr, value) - elif attr in [KEY_EVAL_TRIGGER] or (self._use_conditional_triggers and attr in [KEY_TRIGGER]): # cast to list - self._process_trigger_list(attr, value) - elif (attr in [KEY_CONDITION]) and self._use_conditional_triggers: # cast to list - if isinstance(value, list): - cond_list = [] - for cond in value: - cond_list.append(dict(cond)) - self._trigger_condition = self._build_trigger_condition_eval(cond_list) - self._trigger_condition_raw = cond_list - else: - logger.warning("Item __init__: {}: Invalid trigger_condition specified! Must be a list".format(self._path)) - elif attr in [KEY_ON_CHANGE, KEY_ON_UPDATE]: - self._process_on_xx_list(attr, value) - elif attr in [KEY_LOG_CHANGE]: - if value != '': - setattr(self, '_log_change', value) - self._log_change_logger = logging.getLogger('items.'+value) - # set level to make logger appear in internal list of loggers (if not configured by logging.yaml) - if self._log_change_logger.level == 0: - self._log_change_logger.setLevel('INFO') - elif attr == KEY_AUTOTIMER: - time, value, compat = _split_duration_value_string(value) - timeitem = None - valueitem = None - if time.lower().startswith('sh.') and time.endswith('()'): - timeitem = self.get_absolutepath(time[3:-2], KEY_AUTOTIMER) - time = 0 - if value.lower().startswith('sh.') and value.endswith('()'): - valueitem = self.get_absolutepath(value[3:-2], KEY_AUTOTIMER) - value = '' - value = self._castvalue_to_itemtype(value, compat) - self._autotimer = [ (self._cast_duration(time), value), compat, timeitem, valueitem] - elif attr == KEY_THRESHOLD: - low, __, high = value.rpartition(':') - if not low: - low = high - self._threshold = True - self.__th_crossed = False - self.__th_low = float(low.strip()) - self.__th_high = float(high.strip()) - self._threshold_data[0] = self.__th_low - self._threshold_data[1] = self.__th_high - self._threshold_data[2] = self.__th_crossed - logger.debug("Item {}: set threshold => low: {} high: {}".format(self._path, self.__th_low, self.__th_high)) - elif attr == '_filename': - # name of file, which defines this item - setattr(self, attr, value) - else: - # the following code is executed for plugin specific attributes: - # - # get value from attribute of other (relative addressed) item - # at the moment only parent and grandparent item are supported - if (type(value) is str) and (value.startswith('..:') or value.startswith('...:')): - fromitem = value.split(':')[0] - fromattr = value.split(':')[1] - if fromattr in ['', '.']: - fromattr = attr - if fromitem == '..': - self.conf[attr] = self._get_attr_from_parent(fromattr) - elif fromitem == '...': - self.conf[attr] = self._get_attr_from_grandparent(fromattr) - else: - self.conf[attr] = value - # logger.warning("Item rel. from (grand)parent: fromitem = {}, fromattr = {}, self.conf[attr] = {}".format(fromitem, fromattr, self.conf[attr])) - else: - self.conf[attr] = value - - self.property.init_dynamic_properties() - - ############################################################# - # Child Items - ############################################################# - for attr, value in config.items(): - if isinstance(value, dict): - child_path = self._path + '.' + attr - try: - child = Item(smarthome, self, child_path, value) - except Exception as e: - logger.exception("Item {}: problem creating: {}".format(child_path, e)) - else: - vars(self)[attr] = child - _items_instance.add_item(child_path, child) - self.__children.append(child) - ############################################################# - # Cache - ############################################################# - if self._cache: - self._cache = self._sh._cache_dir + self._path - try: - self.__last_change, self._value = _cache_read(self._cache, self.shtime.tzinfo()) - self.__last_update = self.__last_change - self.__prev_change = self.__last_change - self.__prev_update = self.__last_change - self.__changed_by = 'Cache:None' - self.__updated_by = 'Cache:None' - except Exception as e: - logger.warning("Item {}: problem reading cache: {}".format(self._path, e)) - ############################################################# - # Type - ############################################################# - #__defaults = {'num': 0, 'str': '', 'bool': False, 'list': [], 'dict': {}, 'foo': None, 'scene': 0} - if self._type is None: - self._type = FOO # MSinn - if self._type not in ITEM_DEFAULTS: - logger.error("Item {}: type '{}' unknown. Please use one of: {}.".format(self._path, self._type, ', '.join(list(ITEM_DEFAULTS.keys())))) - raise AttributeError - self.cast = globals()['_cast_' + self._type] - ############################################################# - # Value - ############################################################# - if self._value is None: - self._value = ITEM_DEFAULTS[self._type] - try: - self._value = self.cast(self._value) - except: - logger.error("Item {}: value {} does not match type {}.".format(self._path, self._value, self._type)) - raise - self.__prev_value = self.__last_value - self.__last_value = self._value - ############################################################# - # Cache write/init - ############################################################# - if self._cache: - if not os.path.isfile(self._cache): - _cache_write(self._cache, self._value) - logger.warning("Item {}: Created cache for item: {}".format(self._cache, self._cache)) - ############################################################# - # Plugins - ############################################################# - for plugin in self.plugins.return_plugins(): - #plugin.xxx = [] # Empty reference list list of items - if hasattr(plugin, PLUGIN_PARSE_ITEM): - update = plugin.parse_item(self) - if update: - try: - plugin._append_to_itemlist(self) - except: - pass - self.add_method_trigger(update) - - - - def _split_destitem_from_value(self, value): - """ - For on_change and on_update: spit destination item from attribute value - - :param value: attribute value - - :return: dest_item, value - :rtype: str, str - """ - dest_item = '' - # Check if assignment operator ('=') exists - if value.find('=') != -1: - # If delimiter exists, check if equal operator exists - if value.find('==') != -1: - # equal operator exists - if value.find('=') < value.find('=='): - # assignment operator exists in front of equal operator - dest_item = value[:value.find('=')].strip() - value = value[value.find('=')+1:].strip() - else: - # if equal operator does not exist - dest_item = value[:value.find('=')] - value = value[value.find('=')+1:].strip() - return dest_item, value - - - def _castvalue_to_itemtype(self, value, compat): - """ - casts the value to the type of the item, if backward compatibility - to version 1.2 (ATTRIB_COMPAT_V12) is not enabled - - If backward compatibility is enabled, the value is returned unchanged - - :param value: value to be casted - :param compat: compatibility attribute - :return: return casted value - """ - # casting of value, if compat = latest - if compat == ATTRIB_COMPAT_LATEST: - if self._type != None: - mycast = globals()['_cast_' + self._type] - try: - value = mycast(value) - except: - logger.warning("Item {}: Unable to cast '{}' to {}".format(self._path, str(value), self._type)) - if isinstance(value, list): - value = [] - elif isinstance(value, dict): - value = {} - else: - value = mycast('') - else: - logger.warning("Item {}: Unable to cast '{}' to {}".format(self._path, str(value), self._type)) - return value - - - def _cast_duration(self, time): - """ - casts a time value string (e.g. '5m') to an duration integer - used for autotimer, timer, cycle - - supported formats for time parameter: - - seconds as integer (45) - - seconds as a string ('45') - - seconds as a string, trailed by 's' ('45s') - - minutes as a string, trailed by 'm' ('5m'), is converted to seconds (300) - - :param time: string containing the duration - :param itempath: item path as additional information for logging - :return: number of seconds as an integer - """ - if isinstance(time, str): - try: - time = time.strip() - if time.endswith('m'): - time = int(time.strip('m')) * 60 - elif time.endswith('s'): - time = int(time.strip('s')) - else: - time = int(time) - except Exception as e: - logger.warning("Item {}: _cast_duration ({}) problem: {}".format(self._path, time, e)) - time = False - elif isinstance(time, int): - time = int(time) - else: - logger.warning("Item {}: _cast_duration ({}) problem: unable to convert to int".format(self._path, time)) - time = False - return(time) - - - def _build_cycledict(self, value): - """ - builds a dict for a cycle parameter from a duration_value_string - - This dict is to be passed to the scheduler to circumvent the parameter - parsing within the scheduler, which can't to casting - - :param value: raw attribute string containing duration, value (and compatibility) - :return: cycle-dict for a call to scheduler.add - """ - time, value, compat = _split_duration_value_string(value) - time = self._cast_duration(time) - value = self._castvalue_to_itemtype(value, compat) - cycle = {time: value} - return cycle - - - """ - -------------------------------------------------------------------------------------------- - """ - - - def _build_on_xx_list(self, on_dest_list, on_eval_list): - """ - build on_xx data - """ - on_list = [] - if on_dest_list is not None: - if isinstance(on_dest_list, list): - for on_dest, on_eval in zip(on_dest_list, on_eval_list): - if on_dest != '': - on_list.append(on_dest.strip() + ' = ' + on_eval) - else: - on_list.append(on_eval) - else: - if on_dest_list != '': - on_list.append(on_dest_list + ' = ' + on_eval_list) - else: - on_list.append(on_eval_list) - return on_list - - - def _process_eval(self, value): - - if value == '': - self._eval_unexpanded = '' - self._eval = None - else: - self._eval_unexpanded = value - value = self.get_stringwithabsolutepathes(value, 'sh.', '(', KEY_EVAL) - self._eval = value - - - def _process_trigger_list(self, attr, value): - - if isinstance(value, str): - value = [value, ] - self._trigger_unexpanded = value - expandedvalue = [] - for path in value: - expandedvalue.append(self.get_absolutepath(path, attr)) - self._trigger = expandedvalue - - - def _process_on_xx_list(self, attr, value): - - if isinstance(value, str): - value = [value] - val_list = [] - val_list_unexpanded = [] - dest_var_list = [] - dest_var_list_unexp = [] - for val in value: - # separate destination item (if it exists) - dest_item, val = self._split_destitem_from_value(val) - dest_var_list_unexp.append(dest_item) - # expand relative item paths - dest_item = self.get_absolutepath(dest_item, KEY_ON_CHANGE).strip() - # val = 'sh.'+dest_item+'( '+ self.get_stringwithabsolutepathes(val, 'sh.', '(', KEY_ON_CHANGE) +' )' - val_list_unexpanded.append(val) - val = self.get_stringwithabsolutepathes(val, 'sh.', '(', KEY_ON_CHANGE) - # logger.warning("Item __init__: {}: for attr '{}', dest_item '{}', val '{}'".format(self._path, attr, dest_item, val)) - val_list.append(val) - dest_var_list.append(dest_item) - setattr(self, '_' + attr + '_unexpanded', val_list_unexpanded) - setattr(self, '_' + attr, val_list) - setattr(self, '_' + attr + '_dest_var', dest_var_list) - setattr(self, '_' + attr + '_dest_var_unexp', dest_var_list_unexp) - return - - - """ - -------------------------------------------------------------------------------------------- - --- - --- Properties of the item, that can be accessed from outside of the item class - --- - """ - - class Property: - """ - Inner class Property of item class. - - This class encapsulates all properties that are publicly available - - An instance of this class is created in the __init__ method of the item class - """ - - def __init__(self, parent): - self._item = parent - - def _ro_error(self): - prop = inspect.stack()[1][3] - logger.error("Cannot set readonly property '{}' of item '{}'".format(prop, self._item._path)) - return - - def _type_error(self, err): - prop = inspect.stack()[1][3] - logger.error("Cannot set property '{}' of item '{}' to a {} value".format(prop, self._item._path, err)) - return - - def _cast_warning(self, value): - prop = inspect.stack()[1][3] - logger.warning("Casting value '{}' to required type before assigning it to property '{}' of item '{}'".format(value, prop, self._item._path)) - return - - @property - def attributes(self): - """ - Read-Only Property: attributes. List of plugin-specific attribute names - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return list(self._item.conf.keys()) - - - def init_dynamic_properties(self): - """ - Initialize dynamic properties to get the values of plugin-specific attributes - """ - for confattr in self._item.conf.keys(): - setattr(self, confattr, self.get_config_attribute(confattr)) - return - - def get_config_attribute(self, attr): - return self._item.conf.get(attr, '') - - - @property - def defined_in(self): - """ - Read-Only Property: defined_in . The filename in which the item was defined - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._filename - - @defined_in.setter - def defined_in(self, value): - self._ro_error() - return - - - @property - def enforce_updates(self): - """ - Property: enforce_updates - - Available in SmartHomeNG v1.6 and above - - :param value: enforce_update state of the item - :type value: bool - - :return: enforce_update state of the item - :rtype: bool - """ - return self._item._enforce_updates - - @enforce_updates.setter - def enforce_updates(self, value): - - if isinstance(value, bool): - self._item._enforce_updates = value - return - else: - self._type_error('non-boolean') - return - - - @property - def enforce_change(self): - """ - Property: enforce_change - - Available in SmartHomeNG v1.6 and above - - :param value: enforce_change state of the item - :type value: bool - - :return: enforce_change state of the item - :rtype: bool - """ - return self._item._enforce_change - - @enforce_change.setter - def enforce_change(self, value): - - if isinstance(value, bool): - self._item._enforce_change = value - return - else: - self._type_error('non-boolean') - return - - - @property - def eval(self): - """ - Property: eval expression - - Available in SmartHomeNG v1.6 and above - - :param value: eval expression of the item - :type value: str - - :return: eval expression of the item - :rtype: str - """ - if self._item._eval: - return self._item._eval - return '' - - @eval.setter - def eval(self, value): - - if isinstance(value, str): - if value == '': - self._item._eval = None - else: - self._item._eval = value - return - else: - self._type_error('non-non-string') - return - - - @property - def eval_unexpanded(self): - """ - Property: eval expression - - Available in SmartHomeNG v1.6 and above - - :param value: eval expression of the item - :type value: str - - :return: eval expression of the item - :rtype: str - """ - if self._item._eval: - return self._item._eval - return '' - - @eval_unexpanded.setter - def eval_unexpanded(self, value): - - if isinstance(value, str): - self._item._lock.acquire() - self._item._process_eval(value) - self._item._lock.release() - return - else: - self._type_error('non-non-string') - return - - - @property - def last_change(self): - """ - Read-Only Property: last_change - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_last_change() - - @last_change.setter - def last_change(self, value): - self._ro_error() - return - - - @property - def last_change_age(self): - """ - Read-Only Property: last_change_age - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_last_change_age() - - @last_change_age.setter - def last_change_age(self, value): - self._ro_error() - return - - - @property - def last_change_by(self): - """ - Read-Only Property: last_change_by - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_last_change_by() - - @last_change_by.setter - def last_change_by(self, value): - self._ro_error() - return - - - @property - def last_update(self): - """ - Read-Only Property: last_update - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_last_update() - - @last_update.setter - def last_update(self, value): - self._ro_error() - return - - - @property - def last_update_age(self): - """ - Read-Only Property: last_update_age - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_last_update_age() - - @last_update_age.setter - def last_update_age(self, value): - self._ro_error() - return - - - @property - def last_update_by(self): - """ - Read-Only Property: last_update_by - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_last_update_by() - - @last_update_by.setter - def last_update_by(self, value): - self._ro_error() - return - - - @property - def last_value(self): - """ - Read-Only Property: last_value - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_last_value() - - @last_value.setter - def last_value(self, value): - self._ro_error() - return - - - @property - def name(self): - """ - Property: name - - Available in SmartHomeNG v1.6 and above - - :param value: name of the item - :type value: str - - :return: name of the item - :rtype: str - """ - return self._item._name - - @name.setter - def name(self, value): - - if not isinstance(value, str): - self._cast_warning(value) - value = '{}'.format(value) - if value == '': - self._item._name = self._item._path - else: - self._item._name = value - return - - - @property - def on_change(self): - """ - Read-Only Property: on_update - - Available in SmartHomeNG v1.6 and above - - :return: path of on_update definitions - :rtype: str - """ - return self._item._build_on_xx_list(self._item._on_change_dest_var, self._item._on_change) - - @on_change.setter - def on_change(self, value): - self._ro_error() - return - - - @property - def on_change_unexpanded(self): - """ - Read-Only Property: on_update - - Available in SmartHomeNG v1.6 and above - - :return: path of on_update definitions - :rtype: str - """ - return self._item._build_on_xx_list(self._item._on_change_dest_var_unexp, self._item._on_change_unexpanded) - - @on_change_unexpanded.setter - def on_change_unexpanded(self, value): - if isinstance(value, str): - value = [value] - if isinstance(value, list): - if value == [] or self._checkstrtype(value): - self._item._lock.acquire() - self._item._process_on_xx_list('on_change', value) - self._item._lock.release() - else: - self._type_error('list containing non-string') - return - return - else: - self._type_error('non-list') - return - - @property - def on_update(self): - """ - Read-Only Property: on_update - - Available in SmartHomeNG v1.6 and above - - :return: path of on_update definitions - :rtype: str - """ - return self._item._build_on_xx_list(self._item._on_update_dest_var, self._item._on_update) - - - @on_update.setter - def on_update(self, value): - self._ro_error() - return - - - @property - def on_update_unexpanded(self): - """ - Read-Only Property: on_update - - Available in SmartHomeNG v1.6 and above - - :return: path of on_update definitions - :rtype: str - """ - return self._item._build_on_xx_list(self._item._on_update_dest_var_unexp, self._item._on_update_unexpanded) - - - @on_update_unexpanded.setter - def on_update_unexpanded(self, value): - if isinstance(value, str): - value = [value] - if isinstance(value, list): - if value == [] or self._checkstrtype(value): - self._item._lock.acquire() - self._item._process_on_xx_list('on_update', value) - self._item._lock.release() - else: - self._type_error('list containing non-string') - return - return - else: - self._type_error('non-list') - return - - - @property - def path(self): - """ - Read-Only Property: path - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._path - - @path.setter - def path(self, value): - self._ro_error() - return - - - @property - def prev_change(self): - """ - Read-Only Property: prev_change - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_prev_change() - - @prev_change.setter - def prev_change(self, value): - self._ro_error() - return - - - @property - def prev_change_age(self): - """ - Read-Only Property: prev_change_age - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_prev_change_age() - - @prev_change_age.setter - def prev_change_age(self, value): - self._ro_error() - return - - - @property - def prev_change_by(self): - """ - Read-Only Property: prev_change_by - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_prev_change_by() - - @prev_change_by.setter - def prev_change_by(self, value): - self._ro_error() - return - - - @property - def prev_update(self): - """ - Read-Only Property: prev_update - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_prev_update() - - @prev_update.setter - def prev_update(self, value): - self._ro_error() - return - - - @property - def prev_update_age(self): - """ - Read-Only Property: prev_update_age - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_prev_update_age() - - @prev_update_age.setter - def prev_update_age(self, value): - self._ro_error() - return - - - @property - def prev_update_by(self): - """ - Read-Only Property: prev_update_by - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_prev_update_by() - - @prev_update_by.setter - def prev_update_by(self, value): - self._ro_error() - return - - - @property - def prev_value(self): - """ - Read-Only Property: prev_value - - Available in SmartHomeNG v1.6 and above - - :return: path of the item - :rtype: str - """ - return self._item._get_prev_value() - - @last_value.setter - def last_value(self, value): - self._ro_error() - return - - - @property - def trigger(self): - """ - Property: Triggers of the item - - Available in SmartHomeNG v1.6 and above - - :param value: list of triggers - :type value: list - - :return: [] if not defined or a list of triggers - :rtype: list of str - """ - if self._item._trigger: - return self._item._trigger - return [] - - def _checkstrtype(self, obj): - return bool(obj) and all(isinstance(elem, str) for elem in obj) - - @trigger.setter - def trigger(self, value): - - if isinstance(value, list): - if value == []: - self._item._trigger = False - self._item._trigger_unexpanded = [] - else: - if self._checkstrtype(value): - self._item._trigger = value - self._item._trigger_unexpanded = value - else: - self._type_error('list containing non-string') - return - return - else: - self._type_error('non-list') - return - - - @property - def trigger_unexpanded(self): - """ - Property: Triggers of the item - - Available in SmartHomeNG v1.6 and above - - :param value: list of triggers - :type value: list - - :return: [] if not defined or a list of triggers - :rtype: list of str - """ - if self._item._trigger: - return self._item._trigger_unexpanded - return [] - - @trigger_unexpanded.setter - def trigger_unexpanded(self, value): - if isinstance(value, str): - value = [value] - if isinstance(value, list): - if value == [] or self._checkstrtype(value): - self._item._lock.acquire() - self._item._process_trigger_list('trigger', value) - self._item._lock.release() - else: - self._type_error('list containing non-string') - return - return - else: - self._type_error('non-list') - return - - - @property - def type(self): - """ - Read-Only Property: type - - Available in SmartHomeNG v1.6 and above - - :return: type of the item - :rtype: str - """ - return self._item._type - - @type.setter - def type(self, value): - self._ro_error() - return - - - @property - def value(self): - """ - Property: value - - Available in SmartHomeNG v1.6 and above - - :param value: value of the item - :type value: - - :return: value of the item - :rtype: - """ - return copy.deepcopy(self._item._value) - - @value.setter - def value(self, value): - - #self._item.set(value, 'assign property') - #self._item.__update(value, caller='assign property') - self._item(value, caller='assign property') - return - - - """ - --- - --- End of Properties class - --- - -------------------------------------------------------------------------------------------- - """ - - def _get_last_change(self): - return self.__last_change - - def _get_last_change_age(self): - delta = self.shtime.now() - self.__last_change - return delta.total_seconds() - - def _get_last_change_by(self): - return self.__changed_by - - def _get_last_update(self): - return self.__last_update - - def _get_last_update_by(self): - return self.__updated_by - - def _get_last_update_age(self): - delta = self.shtime.now() - self.__last_update - return delta.total_seconds() - - def _get_last_value(self): - return self.__last_value - - def _get_prev_change(self): - return self.__prev_change - - def _get_prev_change_age(self): - delta = self.__last_change - self.__prev_change - if delta.total_seconds() < 0.0001: - return 0.0 - return delta.total_seconds() - - def _get_prev_change_by(self): - return 'N/A' - - def _get_prev_update(self): - return self.__prev_change - - def _get_prev_update_age(self): - - delta = self.__last_update - self.__prev_update - if delta.total_seconds() < 0.0001: - return 0.0 - return delta.total_seconds() - - def _get_prev_update_by(self): - return 'N/A' - - def _get_prev_value(self): - return self.__prev_value - - - - """ - Following are methods to get attributes of the item - """ - - def path(self): - """ - Path of the item - - Available only in SmartHomeNG v1.6, not in versions above - - :return: String with the path of the item - :rtype: str - """ - return self.property.path - - def id(self): - """ - Old method name - Use item.path() instead of item.id() - """ - return self.property.path - - - def type(self): - """ - Datatype of the item - - :return: Datatype of the item - :rtype: str - """ - return self.property.type - - - def last_change(self): - """ - Timestamp of last change of item's value - - :return: Timestamp of last change - """ - return self.property.last_change - - def age(self): - """ - Age of the item's actual value. Returns the time in seconds since the last change of the value - - :return: Age of the value - :rtype: int - """ - return self.property.last_change_age - - - def last_update(self): - """ - Timestamp of last update of item's value (not necessarily change) - - :return: Timestamp of last update - """ - return self.property.last_update - - def update_age(self): - """ - Update-age of the item's actual value. Returns the time in seconds since the value has been updated (not necessarily changed) - - :return: Update-age of the value - :rtype: int - """ - return self.property.last_update_age - - def prev_change(self): - """ - Timestamp of the previous (next-to-last) change of item's value - - :return: Timestamp of previous change - """ - return self.property.prev_change - - def prev_age(self): - """ - Age of the item's previous value. Returns the time in seconds the item had the the previous value - - :return: Age of the previous value - :rtype: int - """ - return self.property.prev_change_age - - def prev_update(self): - """ - Timestamp of previous (next-to-last) update of item's value (not necessarily change) - - :return: Timestamp of previous update - """ - return self.property.prev_update - - def prev_update_age(self): - """ - Update-age of the item's previous value. Returns the time in seconds the previous value existed - since it had been updated (not necessarily changed) - - :return: Update-age of the previous value - :rtype: int - """ - return self.property.prev_update_age - - def prev_value(self): - """ - Next-to-last value of the item - - :return: Next-to-last value of the item - """ - return self.property.last_value - - def changed_by(self): - """ - Returns an indication, which plugin, logic or event changed the item's value - - :return: Changer of item's value - :rtype: str - """ - return self.property.last_change_by - - def updated_by(self): - """ - Returns an indication, which plugin, logic or event updated (not necessarily changed) the item's value - - :return: Updater of item's value - :rtype: str - """ - return self.property.last_update_by - - - """ - Following are methods to handle relative item paths - """ - - def get_absolutepath(self, relativepath, attribute=''): - """ - Builds an absolute item path relative to the current item - - :param relativepath: string with the relative item path - :param attribute: string with the name of the item's attribute, which contains the relative path (for log entries) - - :return: string with the absolute item path - """ - if not isinstance(relativepath, str): - return relativepath - if (len(relativepath) == 0) or ((len(relativepath) > 0) and (relativepath[0] != '.')): - return relativepath - relpath = relativepath.rstrip() - rootpath = self._path - - while (len(relpath) > 0) and (relpath[0] == '.'): - relpath = relpath[1:] - if (len(relpath) > 0) and (relpath[0] == '.'): - if rootpath.rfind('.') == -1: - if rootpath == '': - relpath = '' - logger.error( - "{}.get_absolutepath(): Relative path trying to access above root level on attribute '{}'".format( - self._path, attribute)) - else: - rootpath = '' - else: - rootpath = rootpath[:rootpath.rfind('.')] - - if relpath != '': - if rootpath != '': - rootpath += '.' + relpath - else: - rootpath = relpath - logger.info( - "{}.get_absolutepath('{}'): Result = '{}' (for attribute '{}')".format(self._path, relativepath, rootpath, - attribute)) - if rootpath[-5:] == '.self': - rootpath = rootpath.replace('.self', '') - rootpath = rootpath.replace('.self.', '.') - return rootpath - - def expand_relativepathes(self, attr, begintag, endtag): - """ - converts a configuration attribute containing relative item paths - to absolute paths - - The item's attribute can be of type str or list (of strings) - - The begintag and the endtag remain in the result string! - - :param attr: Name of the attribute. Use * as a wildcard at the end - :param begintag: string or list of strings that signals the beginning of a relative path is following - :param endtag: string or list of strings that signals the end of a relative path - - """ - def __checkforentry(attr): - if isinstance(self.conf[attr], str): - if (begintag != '') and (endtag != ''): - self.conf[attr] = self.get_stringwithabsolutepathes(self.conf[attr], begintag, endtag, attr) - elif (begintag == '') and (endtag == ''): - self.conf[attr] = self.get_absolutepath(self.conf[attr], attr) - elif isinstance(self.conf[attr], list): - logger.debug("expand_relativepathes(1): to expand={}".format(self.conf[attr])) - new_attr = [] - for a in self.conf[attr]: - # Convert accidentally wrong dict entries to string - if isinstance(a, dict): - a = list("{!s}:{!s}".format(k,v) for (k,v) in a.items())[0] - logger.debug("expand_relativepathes: before : to expand={}".format(a)) - if (begintag != '') and (endtag != ''): - a = self.get_stringwithabsolutepathes(a, begintag, endtag, attr) - elif (begintag == '') and (endtag == ''): - a = self.get_absolutepath(a, attr) - logger.debug("expand_relativepathes: after: to expand={}".format(a)) - new_attr.append(a) - self.conf[attr] = new_attr - logger.debug("expand_relativepathes(2): expanded={}".format(self.conf[attr])) - else: - logger.warning("expand_relativepathes: attr={} can not expand for type(self.conf[attr])={}".format(attr, type(self.conf[attr]))) - - # Check if wildcard is used - if isinstance(attr, str) and attr[-1:] == "*": - for entry in self.conf: - if attr[:-1] in entry: - __checkforentry(entry) - elif attr in self.conf: - __checkforentry(attr) - return - - - def get_stringwithabsolutepathes(self, evalstr, begintag, endtag, attribute=''): - """ - converts a string containing relative item paths - to a string with absolute item paths - - The begintag and the endtag remain in the result string! - - :param evalstr: string with the statement that may contain relative item paths - :param begintag: string that signals the beginning of a relative path is following - :param endtag: string that signals the end of a relative path - :param attribute: string with the name of the item's attribute, which contains the relative path - - :return: string with the statement containing absolute item paths - """ - def __checkfortags(evalstr, begintag, endtag): - pref = '' - rest = evalstr - while (rest.find(begintag+'.') != -1): - pref += rest[:rest.find(begintag+'.')+len(begintag)] - rest = rest[rest.find(begintag+'.')+len(begintag):] - if endtag == '': - rel = rest - rest = '' - else: - rel = rest[:rest.find(endtag)] - rest = rest[rest.find(endtag):] - pref += self.get_absolutepath(rel, attribute) - - pref += rest - logger.debug("{}.get_stringwithabsolutepathes('{}') with begintag = '{}', endtag = '{}': result = '{}'".format( - self._path, evalstr, begintag, endtag, pref)) - return pref - - if not isinstance(evalstr, str): - return evalstr - - if isinstance(begintag, list): - # Fill end or begintag with empty tags if list length is not equal - diff_len = len(begintag) - len(endtag) - begintag = begintag + [''] * abs(diff_len) if diff_len < 0 else begintag - endtag = endtag + [''] * diff_len if diff_len > 0 else endtag - for i, _ in enumerate(begintag): - if not evalstr.find(begintag[i]+'.') == -1: - evalstr = __checkfortags(evalstr, begintag[i], endtag[i]) - pref = evalstr - else: - if evalstr.find(begintag+'.') == -1: - return evalstr - pref = __checkfortags(evalstr, begintag, endtag) - return pref - - - def _get_attr_from_parent(self, attr): - """ - Get value from parent - - :param attr: Get the value from this attribute of the parent item - :return: value from attribute of parent item - """ - pitem = self.return_parent() - pattr_value = pitem.conf.get(attr, '') - # logger.warning("_get_attr_from_parent Item {}: for attr '{}'".format(self._path, attr)) - # logger.warning("_get_attr_from_parent Item {}: for parent '{}', pattr_value '{}'".format(self._path, pitem._path, pattr_value)) - return pattr_value - - - def _get_attr_from_grandparent(self, attr): - """ - Get value from grandparent - - :param attr: Get the value from this attribute of the grandparent item - :return: value from attribute of grandparent item - """ - pitem = self.return_parent() - gpitem = pitem.return_parent() - gpattr_value = pitem.get(attr, '') -# logger.warning("_get_attr_from_grandparent Item {}: for attr '{}'".format(self._path, attr)) -# logger.warning("_get_attr_from_grandparent Item {}: for grandparent '{}', gpattr_value '{}'".format(self._path, gpitem._path, gpattr_value)) - return gpattr_value - - - def _build_trigger_condition_eval(self, trigger_condition): - """ - Build conditional eval expression from trigger_condition attribute - - :param trigger_condition: list of condition dicts - :return: - """ - wrk_eval = [] - for or_cond in trigger_condition: - for ckey in or_cond: - if ckey.lower() == 'value': - pass - else: - and_cond = [] - for cond in or_cond[ckey]: - wrk = cond - if (wrk.find('=') != -1) and (wrk.find('==') == -1) and \ - (wrk.find('<=') == -1) and (wrk.find('>=') == -1) and \ - (wrk.find('=<') == -1) and (wrk.find('=>') == -1): - wrk = wrk.replace('=', '==') - - p = wrk.lower().find('true') - if p != -1: - wrk = wrk[:p]+'True'+wrk[p+4:] - p = wrk.lower().find('false') - if p != -1: - wrk = wrk[:p]+'False'+wrk[p+5:] - - # expand relative item paths - wrk = self.get_stringwithabsolutepathes(wrk, 'sh.', '(', KEY_CONDITION) - - and_cond.append(wrk) - - wrk = ') and ('.join(and_cond) - if len(or_cond[ckey]) > 1: - wrk = '(' + wrk + ')' - wrk_eval.append(wrk) - - # wrk_eval.append(str(or_cond[ckey])) - result = ') or ('.join(wrk_eval) - - if len(trigger_condition) > 1: - result = '(' + result + ')' - - return result - - - def __call__(self, value=None, caller='Logic', source=None, dest=None): - if value is None or self._type is None: - return copy.deepcopy(self._value) - if self._eval: - args = {'value': value, 'caller': caller, 'source': source, 'dest': dest} - self._sh.trigger(name=self._path + '-eval', obj=self.__run_eval, value=args, by=caller, source=source, dest=dest) - else: - self.__update(value, caller, source, dest) - - def __iter__(self): - for child in self.__children: - yield child - - def __setitem__(self, item, value): - vars(self)[item] = value - - def __getitem__(self, item): - return vars(self)[item] - - def __bool__(self): - return bool(self._value) - - def __str__(self): - return self._name - - def __repr__(self): - return "Item: {}".format(self._path) - - - def _init_prerun(self): - """ - Build eval expressions from special functions and triggers before first run - - Called from Items.load_itemdefinitions - """ - if self._trigger: - # Only if item has an eval_trigger - _items = [] - for trigger in self._trigger: - if _items_instance.match_items(trigger) == [] and self._eval: - logger.warning("item '{}': trigger item '{}' not found for function '{}'".format(self._path, trigger, self._eval)) - _items.extend(_items_instance.match_items(trigger)) - for item in _items: - if item != self: # prevent loop - item._items_to_trigger.append(self) - if self._eval: - # Build eval statement from trigger items (joined by given function) - items = ['sh.' + str(x.id()) + '()' for x in _items] - if self._eval == 'and': - self._eval = ' and '.join(items) - elif self._eval == 'or': - self._eval = ' or '.join(items) - elif self._eval == 'sum': - self._eval = ' + '.join(items) - elif self._eval == 'avg': - self._eval = '({0})/{1}'.format(' + '.join(items), len(items)) - elif self._eval == 'max': - self._eval = 'max({0})'.format(','.join(items)) - elif self._eval == 'min': - self._eval = 'min({0})'.format(','.join(items)) - - - def _init_start_scheduler(self): - """ - Start schedulers of the items which have a crontab or a cycle attribute - - up to version 1.5 of SmartHomeNG the schedulers were started when initializing the item. That - could lead to a scheduler to fire a routine, which references an item which is not yet initialized - :return: - """ - - ############################################################# - # Crontab/Cycle - ############################################################# - if self._crontab is not None or self._cycle is not None: - cycle = self._cycle - if cycle is not None: - cycle = self._build_cycledict(cycle) - self._sh.scheduler.add(self._itemname_prefix+self._path, self, cron=self._crontab, cycle=cycle) - - return - - - def _init_run(self): - """ - Run initial eval to set an initial value for the item - - Called from Items.load_itemdefinitions - """ - if self._trigger: - # Only if item has an eval_trigger - if self._eval: - # Only if item has an eval expression - self._sh.trigger(name=self._path, obj=self.__run_eval, by='Init', value={'value': self._value, 'caller': 'Init'}) - - - def __run_eval(self, value=None, caller='Eval', source=None, dest=None): - """ - evaluate the 'eval' entry of the actual item - """ - if self._eval: - # Test if a conditional trigger is defined - if self._trigger_condition is not None: -# logger.warning("Item {}: Evaluating trigger condition {}".format(self._path, self._trigger_condition)) - try: - sh = self._sh - cond = eval(self._trigger_condition) - logger.warning("Item {}: Condition result '{}' evaluating trigger condition {}".format(self._path, cond, self._trigger_condition)) - except Exception as e: - logger.warning("Item {}: problem evaluating trigger condition {}: {}".format(self._path, self._trigger_condition, e)) - return - else: - cond = True - - if cond == True: - # if self._path == 'wohnung.flur.szenen_helper': - # logger.info("__run_eval: item = {}, value = {}, self._eval = {}".format(self._path, value, self._eval)) - sh = self._sh # noqa - shtime = self.shtime - - import math as mymath - try: - value = eval(self._eval) - except Exception as e: - logger.warning("Item {}: problem evaluating {}: {}".format(self._path, self._eval, e)) - else: - if value is None: - logger.debug("Item {}: evaluating {} returns None".format(self._path, self._eval)) - else: - if self._path == 'wohnung.flur.szenen_helper': - logger.info("__run_eval: item = {}, value = {}".format(self._path, value)) - self.__update(value, caller, source, dest) - - - # New for on_update / on_change - def _run_on_xxx(self, path, value, on_dest, on_eval, attr='?'): - """ - common method for __run_on_update and __run_on_change - - :param path: path to this item - - :param attr: Descriptive text for origin of update of item - :type: path: str - - :type attr: str - """ - if self._path == 'wohnung.flur.szenen_helper': - logger.info("_run_on_xxx: item = {}, value = {}".format(self._path, value)) - sh = self._sh - logger.info("Item {}: '{}' evaluating {} = {}".format(self._path, attr, on_dest, on_eval)) - try: - dest_value = eval(on_eval) # calculate to test if expression computes and see if it computes to None - except Exception as e: - logger.warning("Item {}: '{}' item-value='{}' problem evaluating {}: {}".format(self._path, attr, value, on_eval, e)) - else: - if dest_value is not None: - # expression computes and does not result in None - if on_dest != '': - dest_item = _items_instance.return_item(on_dest) - if dest_item is not None: - dest_item.__update(dest_value, caller=attr, source=self._path) - logger.debug(" - : '{}' finally evaluating {} = {}, result={}".format(attr, on_dest, on_eval, dest_value)) - else: - logger.error("Item {}: '{}' has not found dest_item '{}' = {}, result={}".format(self._path, attr, on_dest, on_eval, dest_value)) - else: - dummy = eval(on_eval) - logger.debug(" - : '{}' finally evaluating {}, result={}".format(attr, on_eval, dest_value)) - else: - logger.debug(" - : '{}' {} not set (cause: eval=None)".format(attr, on_dest)) - pass - - - def __run_on_update(self, value=None): - """ - evaluate all 'on_update' entries of the actual item - """ - if self._on_update: - sh = self._sh # noqa -# logger.info("Item {}: 'on_update' evaluating {} = {}".format(self._path, self._on_update_dest_var, self._on_update)) - for on_update_dest, on_update_eval in zip(self._on_update_dest_var, self._on_update): - self._run_on_xxx(self._path, value, on_update_dest, on_update_eval, 'on_update') - - - def __run_on_change(self, value=None): - """ - evaluate all 'on_change' entries of the actual item - """ - if self._on_change: - sh = self._sh # noqa -# logger.info("Item {}: 'on_change' evaluating lists {} = {}".format(self._path, self._on_change_dest_var, self._on_change)) - for on_change_dest, on_change_eval in zip(self._on_change_dest_var, self._on_change): - self._run_on_xxx(self._path, value, on_change_dest, on_change_eval, 'on_change') - - - def __trigger_logics(self, source_details=None): - source={'item': self._path, 'details': source_details} - for logic in self.__logics_to_trigger: -# logic.trigger(by='Item', source=self._path, value=self._value) - logic.trigger(by='Item', source=source, value=self._value) - - # logic.trigger(by='Logic', source=None, value=None, dest=None, dt=None): - - def __update(self, value, caller='Logic', source=None, dest=None): - try: - value = self.cast(value) - except: - try: - logger.warning('Item {}: value "{}" does not match type {}. Via {} {}'.format(self._path, value, self._type, caller, source)) - except: - pass - return - self._lock.acquire() - _changed = False - self.__prev_update = self.__last_update - self.__last_update = self.shtime.now() - self.__updated_by = "{0}:{1}".format(caller, source) - trigger_source_details = self.__updated_by - if value != self._value or self._enforce_change: - _changed = True - self.__prev_value = self.__last_value - self.__last_value = self._value - self._value = value - self.__prev_change = self.__last_change - self.__last_change = self.__last_update - self.__changed_by = "{0}:{1}".format(caller, source) - trigger_source_details = self.__changed_by - if caller != "fader": - self._fading = False - self._lock.notify_all() - self._change_logger("Item {} = {} via {} {} {}".format(self._path, value, caller, source, dest)) - if self._log_change_logger is not None: - log_src = '' - if source is not None: - log_src += ' (' + source + ')' - log_dst = '' - if dest is not None: - log_dst += ', dest: ' + dest - self._log_change_logger.info("Item Change: {} = {} - caller: {}{}{}".format(self._path, value, caller, log_src, log_dst)) - self._lock.release() - # ms: call run_on_update() from here - self.__run_on_update(value) - if _changed or self._enforce_updates or self._type == 'scene': - # ms: call run_on_change() from here - self.__run_on_change(value) - for method in self.__methods_to_trigger: - try: - method(self, caller, source, dest) - except Exception as e: - logger.exception("Item {}: problem running {}: {}".format(self._path, method, e)) - if self._threshold and self.__logics_to_trigger: - if self.__th_crossed and self._value <= self.__th_low: # cross lower bound - self.__th_crossed = False - self._threshold_data[2] = self.__th_crossed - self.__trigger_logics(trigger_source_details) - elif not self.__th_crossed and self._value >= self.__th_high: # cross upper bound - self.__th_crossed = True - self._threshold_data[2] = self.__th_crossed - self.__trigger_logics(trigger_source_details) - elif self.__logics_to_trigger: - self.__trigger_logics(trigger_source_details) - for item in self._items_to_trigger: - args = {'value': value, 'source': self._path} - self._sh.trigger(name=item.id(), obj=item.__run_eval, value=args, by=caller, source=source, dest=dest) - if _changed and self._cache and not self._fading: - try: - _cache_write(self._cache, self._value) - except Exception as e: - logger.warning("Item: {}: could update cache {}".format(self._path, e)) - if self._autotimer and caller != 'Autotimer' and not self._fading: - - _time, _value = self._autotimer[0] - compat = self._autotimer[1] - if self._autotimer[2]: - try: - _time = eval('self._sh.'+self._autotimer[2]+'()') - except: - logger.warning("Item '{}': Attribute 'autotimer': Item '{}' does not exist".format(self._path, self._autotimer[2])) - if self._autotimer[3]: - try: - _value = self._castvalue_to_itemtype(eval('self._sh.'+self._autotimer[3]+'()'), compat) - except: - logger.warning("Item '{}': Attribute 'autotimer': Item '{}' does not exist".format(self._path, self._autotimer[3])) - self._autotimer[0] = (_time, _value) # for display of active/last timer configuration in backend - - next = self.shtime.now() + datetime.timedelta(seconds=_time) - self._sh.scheduler.add(self._itemname_prefix+self.id() + '-Timer', self.__call__, value={'value': _value, 'caller': 'Autotimer'}, next=next) - - - def add_logic_trigger(self, logic): - """ - Add a logic trigger to the item - - :param logic: - :type logic: - :return: - """ - self.__logics_to_trigger.append(logic) - - def remove_logic_trigger(self, logic): - self.__logics_to_trigger.remove(logic) - - def get_logic_triggers(self): - """ - Returns a list of logics to trigger, if the item gets changed - - :return: Logics to trigger - :rtype: list - """ - return self.__logics_to_trigger - - def add_method_trigger(self, method): - self.__methods_to_trigger.append(method) - - def remove_method_trigger(self, method): - self.__methods_to_trigger.remove(method) - - def get_method_triggers(self): - """ - Returns a list of item methods to trigger, if this item gets changed - - :return: methods to trigger - :rtype: list - """ - return self.__methods_to_trigger - - - def autotimer(self, time=None, value=None, compat=ATTRIB_COMPAT_V12): - if time is not None and value is not None: - self._autotimer = [(time, value), compat, None, None] - else: - self._autotimer = False - - def fade(self, dest, step=1, delta=1): - dest = float(dest) - self._sh.trigger(self._path, _fadejob, value={'item': self, 'dest': dest, 'step': step, 'delta': delta}) - - def remove_timer(self): - self._sh.scheduler.remove(self._itemname_prefix+self.id() + '-Timer') - - def return_children(self): - for child in self.__children: - yield child - - def return_parent(self): - return self.__parent - - def set(self, value, caller='Logic', source=None, dest=None, prev_change=None, last_change=None): - try: - value = self.cast(value) - except: - try: - logger.warning("Item {}: value {} does not match type {}. Via {} {}".format(self._path, value, self._type, caller, source)) - except: - pass - return - self._lock.acquire() - self._value = value - if prev_change is None: - self.__prev_change = self.__last_change - else: - self.__prev_change = prev_change - if last_change is None: - self.__last_change = self.shtime.now() - else: - self.__last_change = last_change - self.__changed_by = "{0}:{1}".format(caller, None) - self.__updated_by = "{0}:{1}".format(caller, None) - self._lock.release() - self._change_logger("Item {} = {} via {} {} {}".format(self._path, value, caller, source, dest)) - - def timer(self, time, value, auto=False, compat=ATTRIB_COMPAT_DEFAULT): - time = self._cast_duration(time) - value = self._castvalue_to_itemtype(value, compat) - if auto: - caller = 'Autotimer' - self._autotimer = [(time, value), compat, None, None] - else: - caller = 'Timer' - next = self.shtime.now() + datetime.timedelta(seconds=time) - self._sh.scheduler.add(self._itemname_prefix+self.id() + '-Timer', self.__call__, value={'value': value, 'caller': caller}, next=next) - - def get_children_path(self): - return [item._path - for item in self.__children] - - def jsonvars(self): - """ - Translation method from object members to json - :return: Key / Value pairs from object members - """ - return { "id": self._path, - "name": self._name, - "value" : self._value, - "type": self._type, - "attributes": self.conf, - "children": self.get_children_path() } - -# alternative method to get all class members -# @staticmethod -# def get_members(instance): -# return {k: v -# for k, v in vars(instance).items() -# if str(k) in ["_value", "conf"] } -# #if not str(k).startswith('_')} - - def to_json(self): - return json.dumps(self.jsonvars(), sort_keys=True, indent=2) - - - -##################################################################### -# Cast Methods -##################################################################### - -def _cast_str(value): - if isinstance(value, str): - return value - else: - raise ValueError - - -def _cast_list(value): - if isinstance(value, str): - try: - value = literal_eval(value) - except: - pass - if isinstance(value, list): - return value - else: - raise ValueError - - -def _cast_dict(value): - if isinstance(value, str): - try: - value = literal_eval(value) - except: - pass - if isinstance(value, dict): - return value - else: - raise ValueError - - -def _cast_foo(value): - return value - - -# TODO: Candidate for Utils.to_bool() -# write testcase and replace -# -> should castng be restricted like this or handled exactly like Utils.to_bool()? -# Example: _cast_bool(2) is False, Utils.to_bool(2) is True - -def _cast_bool(value): - if type(value) in [bool, int, float]: - if value in [False, 0]: - return False - elif value in [True, 1]: - return True - else: - raise ValueError - elif type(value) in [str, str]: - if value.lower() in ['0', 'false', 'no', 'off', '']: - return False - elif value.lower() in ['1', 'true', 'yes', 'on']: - return True - else: - raise ValueError - else: - raise TypeError - - -def _cast_scene(value): - return int(value) - - -def _cast_num(value): - """ - cast a passed value to int or float - - :param value: numeric value to be casted, passed as str, float or int - :return: numeric value, passed as int or float - """ - if isinstance(value, str): - value = value.strip() - if value == '': - return 0 - if isinstance(value, float): - return value - try: - return int(value) - except: - pass - try: - return float(value) - except: - pass - raise ValueError - - -##################################################################### -# Methods for handling of duration_value strings -##################################################################### - -def _split_duration_value_string(value): - """ - splits a duration value string into its three components - - components are: - - time - - value - - compat - - :param value: raw attribute string containing duration, value (and compatibility) - :return: three strings, representing time, value and compatibility attribute - """ - time, __, value = value.partition('=') - value, __, compat = value.partition('=') - time = time.strip() - value = value.strip() - # remove quotes, if present - if value != '' and ((value[0] == "'" and value[-1] == "'") or (value[0] == '"' and value[-1] == '"')): - value = value[1:-1] - compat = compat.strip().lower() - if compat == '': - compat = ATTRIB_COMPAT_DEFAULT - return (time, value, compat) - - -def _join_duration_value_string(time, value, compat=''): - """ - joins a duration value string from its thre components - - components are: - - time - - value - - compat - - :param time: time (duration) parrt for the duration_value_string - :param value: value (duration) parrt for the duration_value_string - """ - result = str(time) - if value != '' or compat != '': - result = result + ' =' - if value != '': - result = result + ' ' + value - if compat != '': - result = result + ' = ' + compat - return result - - -##################################################################### -# Cache Methods -##################################################################### - -def json_serialize(obj): - """ - helper method to convert values to json serializable formats - """ - import datetime - if isinstance(obj, datetime.datetime): - return obj.isoformat() - if isinstance(obj, datetime.date): - return obj.isoformat() - raise TypeError("Type not serializable") - -def json_obj_hook(json_dict): - """ - helper method for json deserialization - """ - import dateutil - for (key, value) in json_dict.items(): - try: - json_dict[key] = dateutil.parser.parse(value) - except Exception as e : - pass - return json_dict - - -def _cache_read(filename, tz, cformat=CACHE_FORMAT): - ts = os.path.getmtime(filename) - dt = datetime.datetime.fromtimestamp(ts, tz) - value = None - - if cformat == CACHE_PICKLE: - with open(filename, 'rb') as f: - value = pickle.load(f) - - elif cformat == CACHE_JSON: - with open(filename, 'r', encoding='UTF-8') as f: - value = json.load(f, object_hook=json_obj_hook) - - return (dt, value) - -def _cache_write(filename, value, cformat=CACHE_FORMAT): - try: - if cformat == CACHE_PICKLE: - with open(filename, 'wb') as f: - pickle.dump(value,f) - - elif cformat == CACHE_JSON: - with open(filename, 'w', encoding='UTF-8') as f: - json.dump(value,f, default=json_serialize) - except IOError: - logger.warning("Could not write to {}".format(filename)) - - -##################################################################### -# Fade Method -##################################################################### -def _fadejob(item, dest, step, delta): - if item._fading: - return - else: - item._fading = True - if item._value < dest: - while (item._value + step) < dest and item._fading: - item(item._value + step, 'fader') - item._lock.acquire() - item._lock.wait(delta) - item._lock.release() - else: - while (item._value - step) > dest and item._fading: - item(item._value - step, 'fader') - item._lock.acquire() - item._lock.wait(delta) - item._lock.release() - if item._fading: - item._fading = False - item(dest, 'Fader') diff --git a/lib/log.py b/lib/log.py index db1a364433..da4562f15c 100644 --- a/lib/log.py +++ b/lib/log.py @@ -1,9 +1,10 @@ #!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### -# Copyright 2012-2013 Marcus Popp marcus@popp.mx +# Copyright 2016-2021 Martin Sinn m.sinn@gmx.de +# Parts Copyright 2013 Marcus Popp marcus@popp.mx ######################################################################### -# This file is part of SmartHomeNG. +# This file is part of SmartHomeNG. # # SmartHomeNG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,39 +20,191 @@ # along with SmartHomeNG. If not, see . ######################################################################### -import collections import time +import logging +import logging.handlers +import os +import datetime + +import collections + + +logs_instance = None + + +class Logs(): + + _logs = {} + root_handler_name = '' + + + def __init__(self, sh): + + self.logger = logging.getLogger(__name__) + + global logs_instance + if logs_instance is None: + logs_instance = self + else: + self.logger.error(f"Another instance of Logs class already exists: {logs_instance}") + + self._sh = sh + + return + + + def configure_logging(self, config_dict): + + if config_dict == None: + print() + print("ERROR: Invalid logging configuration in file 'logging.yaml'") + print() + exit(1) + + # if logger 'lib.smarthome' is not defined or no level is defined for it, + # define logger with level 'NOTICE' + if config_dict['loggers'].get('lib.smarthome', None) is None: + config_dict['loggers']['lib.smarthome'] = {} + if config_dict['loggers']['lib.smarthome'].get('level', None) is None: + config_dict['loggers']['lib.smarthome']['level'] = 'NOTICE' + + try: + root_handler_name = config_dict['root']['handlers'][0] + root_handler = config_dict['handlers'][ root_handler_name ] + root_handler_level = root_handler.get('level', None) + self.root_handler_name = root_handler_name + except: + root_handler_level = '?' + + if root_handler_level.upper() in ['NOTICE', 'INFO', 'DEBUG']: + notice_level = 29 + else: + notice_level = 31 + + self.add_logging_level('NOTICE', notice_level) + try: + logging.config.dictConfig(config_dict) + except Exception as e: + #self._logger_main.error(f"Invalid logging configuration in file 'logging.yaml' - Exception: {e}") + print() + print("ERROR: Invalid logging configuration in file 'logging.yaml'") + print(f" Exception: {e}") + print() + exit(1) + + #self.logger.notice(f"Logs.configure_logging: Level NOTICE = {notice_level} / root_handler_level={root_handler_level}") + + # Initialize MemLog Handler to output root log entries to smartVISU + self.initMemLog() + + return + + + def add_logging_level(self, description, value): + """ + Adds a new Logging level to the standard python logging + + :param description: appearance within logs SYSINFO + :type description: string + :param value: numeric value for the logging level + :type value: int + :param tocall: function name to call for a log with the given level + :type tocall: String, optional, if not given description will be used with lower case + + no error checking is performed here for typos, already existing levels or functions + """ + + def logForLevel(self, message, *args, **kwargs): + if self.isEnabledFor(value): + self._log(value, message, args, **kwargs) + + def logToRoot(message, *args, **kwargs): + logging.log(value, message, *args, **kwargs) + + logging.addLevelName(value, description) + setattr(logging, description, value) + setattr(logging.getLoggerClass(), description.lower(), logForLevel) + setattr(logging, description.lower(), logToRoot) + return + + + def initMemLog(self): + """ + This function initializes all needed datastructures to use the 'env.core.log' mem-logger and + the (old) memlog plugin + + It adds the handler log_mem (based on the custom lib.log.ShngMemLogHandler) to the root logger + It logs all WARNINGS from all (old) mem-loggers to the root Logger + """ + log_mem = ShngMemLogHandler('env.core.log', maxlen=50, level=logging.WARNING) + + # define formatter for 'env.core.log' log + _logdate = "%Y-%m-%d %H:%M:%S" + _logformat = "%(asctime)s %(levelname)-8s %(threadName)-12s %(message)s" + formatter = logging.Formatter(_logformat, _logdate) + log_mem.setFormatter(formatter) + + # add handler to root logger + logging.getLogger('').addHandler(log_mem) + return + + + def add_log(self, name, log): + """ + Adds a log (object) to the list of memory logs + + :param name: Name of log + :param log: Log object + """ + self._logs[name] = log + + + def return_logs(self): + """ + Function to the list of memory logs + + :return: List of logs + :rtype: list + """ + return self._logs + +# ------------------------------------------------------------------------------- + class Log(collections.deque): - def __init__(self, smarthome, name, mapping, maxlen=50): + def __init__(self, smarthome, name, mapping, maxlen=40, handler=None): """ - Class to implement a log - This is based on a double ended queue. New entries are appended left and old ones are popped right. - - - As of version 1.7a develop this is used in core at bin/smarthome.py and + Class to implement a memory log + + As of shng version 1.7a develop this is used in core at bin/smarthome.py and in plugins memlog, operationlog and visu_websocket - :param smarthome: the SmartHomeNG main object - :param name: a descriptive name for the log + :param smarthome: Dummy, for backwart compatibility + :param name: name of the the log (used in cli plugin and smartVISU) :param mapping: Kind of a headline for the entry which can be anything - e.g. mappings can be [time, thread, level, message ] and log entry is a + e.g. mappings can be [time, thread, level, message ] and log entry is a - :param maxlen: maximum length of the log, defaults to 50 + :param maxlen: maximum length of the memory log, defaults to 40 + :param handler: Python LoggingHandler that created this instance of a memory log """ collections.deque.__init__(self, maxlen=maxlen) - self.mapping = mapping - #self.update_hooks = [] # nowhere else found, maybe not needed any more - self._sh = smarthome + if (mapping is None) or (mapping == []): + self.mapping = ['time', 'thread', 'level', 'message'] + else: + self.mapping = mapping + + self._sh = logs_instance._sh self._name = name - smarthome.add_log(name, self) + self.handler = handler + # Add this log to dict of defined memory logs + logs_instance.add_log(name, self) def add(self, entry): """ - Just adds a log entry to the left side of the queue. If the queue already holds maxlen - entries, the rightmost will be discarded automatically. + Adds a log entry to the memory log. If the log already has reached the maximum length, the oldest + entry is removed from the log automatically. """ self.appendleft(entry) for listener in self._sh.return_event_listeners('log'): @@ -59,19 +212,27 @@ def add(self, entry): def last(self, number): """ - Returns the last ``number`` entries of the log + Returns the newest entries of the log + + :param number: Number of entries to return + + :return: List of log entries """ return(list(self)[-number:]) def export(self, number): """ - Returns up to ``number`` entries from the log and prepares them together with the mapping + Returns the newest entries of the log and prepares them with the mapping + + :param number: Number of entries to return + + :return: List of log entries """ return [dict(zip(self.mapping, x)) for x in list(self)[:number]] def clean(self, dt): """ - Assuming dt to be a datetime: remove all entries that are smaller or equal + Assuming dt to be a datetime: remove all entries that are smaller or equal to this given datetime from the right side of the queue """ while True: @@ -82,4 +243,144 @@ def clean(self, dt): if entry[0] > dt: self.append(entry) return - + + +# ================================================================================ + +""" +In the following part of the code, logging handlers are defined +""" + +class ShngTimedRotatingFileHandler(logging.handlers.TimedRotatingFileHandler): + """ + TimedRotatingFilehandler with a different naming scheme for rotated files + """ + + def getFilesToDelete(self): + """ + Determine the files to delete when rolling over. + + More specific than the earlier method, which just used glob.glob(). + """ + dirName, baseName = os.path.split(self.baseFilename) + # for changed naming scheme + fName, fExt = os.path.splitext(baseName) + fileNames = os.listdir(dirName) + result = [] + # for changed naming scheme + #prefix = baseName + "." + prefix = fName + "." + plen = len(prefix) + # for changed naming scheme + # for fileName in fileNames: + # if fileName[:plen] == prefix: + # suffix = fileName[plen:] + # if self.extMatch.match(suffix): + # result.append(os.path.join(dirName, fileName)) + elen = len(fExt) + for fileName in fileNames: + if fileName[:plen] == prefix and fileName[-elen:] == fExt: + if plen + elen < len(fileName): + # ... + suffix = fileName[plen:] + if self.extMatch.match(suffix): + result.append(os.path.join(dirName, fileName)) + # ... + #result.append(os.path.join(dirName, fileName)) + if len(result) < self.backupCount: + result = [] + else: + result.sort() + result = result[:len(result) - self.backupCount] + return result + + def doRollover(self): + """ + do a rollover; in this case, a date/time stamp is appended to the filename + when the rollover happens. However, you want the file to be named for the + start of the interval, not the current time. If there is a backup count, + then we have to get a list of matching filenames, sort them and remove + the one with the oldest suffix. + """ + if self.stream: + self.stream.close() + self.stream = None + # get the time that this sequence started at and make it a TimeTuple + currentTime = int(time.time()) + dstNow = time.localtime(currentTime)[-1] + t = self.rolloverAt - self.interval + if self.utc: + timeTuple = time.gmtime(t) + else: + timeTuple = time.localtime(t) + dstThen = timeTuple[-1] + if dstNow != dstThen: + if dstNow: + addend = 3600 + else: + addend = -3600 + timeTuple = time.localtime(t + addend) + + # from logging.handlers.TimedRotatingFileHandler + #dfn = self.rotation_filename(self.baseFilename + "." + + # time.strftime(self.suffix, timeTuple)) + + # for shng: splitext -> tuple ( path+fn , ext ) + bfn = os.path.splitext(self.baseFilename)[0] + ext = os.path.splitext(self.baseFilename)[1] + dfn = self.rotation_filename(bfn + "." + time.strftime(self.suffix, timeTuple) + ext) + + if os.path.exists(dfn): + os.remove(dfn) + self.rotate(self.baseFilename, dfn) + if self.backupCount > 0: + for s in self.getFilesToDelete(): + os.remove(s) + if not self.delay: + self.stream = self._open() + newRolloverAt = self.computeRollover(currentTime) + while newRolloverAt <= currentTime: + newRolloverAt = newRolloverAt + self.interval + #If DST changes and midnight or weekly rollover, adjust for this. + if (self.when == 'MIDNIGHT' or self.when.startswith('W')) and not self.utc: + dstAtRollover = time.localtime(newRolloverAt)[-1] + if dstNow != dstAtRollover: + if not dstNow: # DST kicks in before next rollover, so we need to deduct an hour + addend = -3600 + else: # DST bows out before next rollover, so we need to add an hour + addend = 3600 + newRolloverAt += addend + self.rolloverAt = newRolloverAt + + +class ShngMemLogHandler(logging.StreamHandler): + """ + LogHandler used by MemLog + """ + def __init__(self, logname='undefined', maxlen=35, level=logging.NOTSET): + super().__init__() + self.setLevel(level) + + if self.get_name() is None: + # for 'env.core.log' memory logger + self.set_name('_shng_root_memory') + + #logs_instance.logger.info(f"ShngMemLogHandler.__init__(): logname={logname}, self={self}, handlername={self.get_name()}, level={self.level}, levelname={logging.getLevelName(self.level)}, maxlen={maxlen}") + + self._log = Log(self, logname, ['time', 'thread', 'level', 'message'], maxlen=maxlen, handler=self) + + self._shtime = logs_instance._sh.shtime + # Dummy baseFileName for output in shngadmin (and priv_develop plugin) + self.baseFilename = "'" + self._log._name + "'" + + def emit(self, record): + #logs_instance.logger.info(f"ShngMemLogHandler.emit() #1: logname={self._log._name}, handlername={self.get_name()}, level={self.level}, record.levelno={record.levelno}, record.levelname={record.levelname}, record={record}") + #logs_instance.logger.info(f"ShngMemLogHandler.emit() #2: self={self}, handlers={logging._handlers.data}") + try: + self.format(record) + timestamp = datetime.datetime.fromtimestamp(record.created, self._shtime.tzinfo()) + self._log.add([timestamp, record.threadName, record.levelname, record.message]) + except Exception: + self.handleError(record) + + diff --git a/lib/logutils.py b/lib/logutils.py index b2bf9439c1..87169f8378 100644 --- a/lib/logutils.py +++ b/lib/logutils.py @@ -106,6 +106,7 @@ def filter(self, record): #invert is True: show record if all of the given parameters match return True if hits < total and not self.invert else True if hits >= total and self.invert else False + class DuplicateFilter(object): """ This class builds a filter to be used in logging.yaml to configure logging diff --git a/lib/metadata.py b/lib/metadata.py index c952ae34e9..6c0daaf198 100644 --- a/lib/metadata.py +++ b/lib/metadata.py @@ -414,7 +414,6 @@ def test_shngcompatibility(self): shng_version = l[0]+'.'+l[1] if len(l) > 2: shng_version += '.'+l[2] - l = str(self.get_string('sh_minversion')).split('.') min_shngversion = l[0] if len(l) > 1: @@ -432,11 +431,15 @@ def test_shngcompatibility(self): mod_version = self.get_string('version') if min_shngversion != '': - if min_shngversion > shng_version: + #r = self._compare_versions(min_shngversion, shng_version, '>', (min_shngversion > shng_version)) + # if min_shngversion > shng_version: + if self._compare_versions(min_shngversion, shng_version, '>', (min_shngversion > shng_version)): logger.error("{0} '{1}': The version {3} of SmartHomeNG is too old for this {0}. It requires at least version v{2}. The {0} was not loaded.".format(self._addon_type, self._addon_name, min_shngversion, shng_version)) return False if max_shngversion != '': - if max_shngversion < shng_version: + #self._compare_versions(max_shngversion, shng_version, '<', (max_shngversion < shng_version)) + # if max_shngversion < shng_version: + if self._compare_versions(max_shngversion, shng_version, '<', (max_shngversion < shng_version)): logger.error("{0} '{1}': The version {3} of SmartHomeNG is too new for this {0}. It requires a version up to v{2}. The {0} was not loaded.".format(self._addon_type, self._addon_name, max_shngversion, shng_version)) return False return True @@ -463,11 +466,15 @@ def test_pythoncompatibility(self): mod_version = self.get_string('version') if min_pyversion != '': - if min_pyversion > py_version: + #self._compare_versions(min_pyversion, py_version, '>', (min_pyversion > py_version)) + # if min_pyversion > py_version: + if self._compare_versions(min_pyversion, py_version, '>', (min_pyversion > py_version)): logger.error("{0} '{1}': The Python version {3} is too old for this {0}. It requires at least version v{2}. The {0} was not loaded.".format(self._addon_type, self._addon_name, min_pyversion, py_version)) return False if max_pyversion != '': - if max_pyversion < py_version: + #self._compare_versions(max_pyversion, py_version, '<', (max_pyversion < py_version)) + # if max_pyversion < py_version: + if self._compare_versions(max_pyversion, py_version, '<', (max_pyversion < py_version)): logger.error("{0} '{1}': The Python version {3} is too new for this {0}. It requires a version up to v{2}. The {0} was not loaded.".format(self._addon_type, self._addon_name, max_pyversion, py_version)) return False return True @@ -1164,3 +1171,62 @@ def check_itemattribute(self, item, attribute, value, defined_in_file=None): return value + + def _compare_versions(self, vers1, vers2, operator, res_old=None): + """ + Compare two version numbers and return if the condition is met + + :param vers1: + :param vers2: + :param operator: + :type vers1: str + :type vers2: str + :type operator: str + + :return: true if condition is met + :rtype: bool + """ + v1 = self._version_to_list(vers1) + v2 = self._version_to_list(vers2) + + result = False + if v1 == v2 and operator in ['>=', '==', '<=']: + result = True + if v1 < v2 and operator in ['<', '<=']: + result = True + if v1 > v2 and operator in ['>', '>=']: + result = True + #logger.warning(f"_compare_versions: {self._addon_name:12} v1={v1}, v2={v2}, operator='{operator}', result={result}, res_old={res_old}") + + logger.debug("_compare_versions: - - - vers1 = {}, vers2 = {}, v1 = {}, v2 = {}, operator = '{}', result = {}".format(vers1, vers2, v1, v2, operator, result)) + return result + + + def _version_to_list(self, vers): + """ + Split version number to list and get rid of non-numeric parts + + :param vers: + + :return: version as list + :rtype: list + """ + # create list with [major,minor,revision,build] + vsplit = vers.split('.') + while len(vsplit) < 4: + vsplit.append('0') + + import re + + # get rid of non numeric parts + vlist = [] + for v in vsplit: + v = re.findall('\d+', v )[0] + vi = 0 + try: + vi = int(v) + except: + pass + vlist.append(vi) + + return vlist diff --git a/lib/model/mqttplugin.py b/lib/model/mqttplugin.py index 686e384c4e..a648e49115 100644 --- a/lib/model/mqttplugin.py +++ b/lib/model/mqttplugin.py @@ -22,7 +22,7 @@ import threading from lib.module import Modules -from lib.model.smartplugin import * +from lib.model.smartplugin import SmartPlugin from lib.shtime import Shtime @@ -67,14 +67,11 @@ def start_subscriptions(self): Should be called from the run method of a plugin """ if self.mod_mqtt: - # lock - self._subscribed_topics_lock.acquire() - for topic in self._subscribed_topics: - # start subscription to all items for this topic - for item_path in self._subscribed_topics[topic]: - self._start_subscription(topic, item_path) - # unlock - self._subscribed_topics_lock.release() + with self._subscribed_topics_lock: + for topic in self._subscribed_topics: + # start subscription to all items for this topic + for item_path in self._subscribed_topics[topic]: + self._start_subscription(topic, item_path) self._subscriptions_started = True return @@ -86,16 +83,13 @@ def stop_subscriptions(self): Should be called from the stop method of a plugin """ if self.mod_mqtt: - # lock - self._subscribed_topics_lock.acquire() - for topic in self._subscribed_topics: - # stop subscription to all items for this topic - for item_path in self._subscribed_topics[topic]: - current = str(self._subscribed_topics[topic][item_path]['current']) - self.logger.info("stop(): Unsubscribing from topic {} for item {}".format(topic, item_path)) - self.mod_mqtt.unsubscribe_topic(self.get_shortname() + '-' + current, topic) - # unlock - self._subscribed_topics_lock.release() + with self._subscribed_topics_lock: + for topic in self._subscribed_topics: + # stop subscription to all items for this topic + for item_path in self._subscribed_topics[topic]: + current = str(self._subscribed_topics[topic][item_path]['current']) + self.logger.info("stop(): Unsubscribing from topic {} for item {}".format(topic, item_path)) + self.mod_mqtt.unsubscribe_topic(self.get_shortname() + '-' + current, topic) self._subscriptions_started = False return @@ -125,31 +119,27 @@ def add_subscription(self, topic, payload_type, bool_values=None, item=None, cal :return: """ - # lock - self._subscribed_topics_lock.acquire() - - # test if topic is new - if not self._subscribed_topics.get(topic, None): - self._subscribed_topics[topic] = {} - # add this item to topic - if item is None: - item_path = '*no_item*' - else: - item_path = item.path() - self._subscribed_topics[topic][item_path] = {} - self._subscribe_current_number += 1 - self._subscribed_topics[topic][item_path]['current'] = self._subscribe_current_number - self._subscribed_topics[topic][item_path]['item'] = item - self._subscribed_topics[topic][item_path]['qos'] = None - self._subscribed_topics[topic][item_path]['payload_type'] = payload_type - if callback: - self._subscribed_topics[topic][item_path]['callback'] = callback - else: - self._subscribed_topics[topic][item_path]['callback'] = self._on_mqtt_message - self._subscribed_topics[topic][item_path]['bool_values'] = bool_values - - # unlock - self._subscribed_topics_lock.release() + with self._subscribed_topics_lock: + + # test if topic is new + if not self._subscribed_topics.get(topic, None): + self._subscribed_topics[topic] = {} + # add this item to topic + if item is None: + item_path = '*no_item*' + else: + item_path = item.path() + self._subscribed_topics[topic][item_path] = {} + self._subscribe_current_number += 1 + self._subscribed_topics[topic][item_path]['current'] = self._subscribe_current_number + self._subscribed_topics[topic][item_path]['item'] = item + self._subscribed_topics[topic][item_path]['qos'] = None + self._subscribed_topics[topic][item_path]['payload_type'] = payload_type + if callback: + self._subscribed_topics[topic][item_path]['callback'] = callback + else: + self._subscribed_topics[topic][item_path]['callback'] = self._on_mqtt_message + self._subscribed_topics[topic][item_path]['bool_values'] = bool_values if self._subscriptions_started: # directly subscribe to added subscription, if subscribtions are started diff --git a/lib/network.py b/lib/network.py old mode 100755 new mode 100644 index 15d16d9a76..00458aaed1 --- a/lib/network.py +++ b/lib/network.py @@ -3,6 +3,7 @@ ######################################################################### # Parts Copyright 2016 C. Strassburg (lib.utils) c.strassburg@gmx.de # Copyright 2017- Serge Wagener serge@wagener.family +# Copyright 2020- Sebastian Helms morg @ knx-user-forum ######################################################################### # This file is part of SmartHomeNG # @@ -21,209 +22,77 @@ ######################################################################### """ - -| *** ATTENTION: This is early work in progress. Interfaces are subject to change. *** -| *** DO NOT USE IN PRODUCTION until you know what you are doing *** -| - -This library contains the future network classes for SmartHomeNG. +This library contains the network classes for SmartHomeNG. New network functions and utilities are going to be implemented in this library. -This classes, functions and methods are mainly meant to be used by plugin developers +These classes, functions and methods are mainly meant to be used by plugin developers +- class Network provides utility methods for network-related tasks +- class Html provides methods for communication with resp. requests to a HTTP server +- class Tcp_client provides a two-way TCP client implementation +- class Tcp_server provides a TCP listener with connection / data callbacks +- class Udp_server provides a UDP listener with data callbacks """ +from lib.utils import Utils +import sys +import traceback +import re import asyncio -import ipaddress import logging -import queue -import re import requests -from iowait import IOWait ### BMX -import select ### should not be needed +from iowait import IOWait # BMX import socket import struct import subprocess import threading import time +from . import aioudp -# Turn off ssl warnings -requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning) -logging.getLogger("urllib3").setLevel(logging.WARNING) - -class Network(object): - """ This Class has some usefull static methods that you can use in your projects """ - - @staticmethod - def is_mac(mac): - """ - Validates a MAC address - - :param mac: MAC address - :type string: str - - :return: True if value is a MAC - :rtype: bool - """ - - mac = str(mac) - if len(mac) == 12: - for c in mac: - try: - if int(c, 16) > 15: - return False - except: - return False - return True - - octets = re.split('[\:\-\ ]', mac) - if len(octets) != 6: - return False - for i in octets: - try: - if int(i, 16) > 255: - return False - except: - return False - return True - - @staticmethod - def is_ip(string): - """ - Checks if a string is a valid ip-address (v4 or v6) - - :param string: String to check - :type string: str - - :return: True if an ip, false otherwise. - :rtype: bool - """ - - return (Network.is_ipv4(string) or Network.is_ipv6(string)) - - @staticmethod - def is_ipv4(string): - """ - Checks if a string is a valid ip-address (v4) - - :param string: String to check - :type string: str - - :return: True if an ip, false otherwise. - :rtype: bool - """ - - try: - ipaddress.IPv4Address(string) - return True - except ipaddress.AddressValueError: - return False - - @staticmethod - def is_ipv6(string): - """ - Checks if a string is a valid ip-address (v6) - - :param string: String to check - :type string: str - - :return: True if an ipv6, false otherwise. - :rtype: bool - """ - - try: - ipaddress.IPv6Address(string) - return True - except ipaddress.AddressValueError: - return False - - @staticmethod - def is_hostname(string): - """ - Checks if a string is a valid hostname - - The hostname has is checked to have a valid format - - :param string: String to check - :type string: str - - :return: True if a hostname, false otherwise. - :rtype: bool - """ - - try: - return bool(re.match("^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$", string)) - except TypeError: - return False - @staticmethod - def get_local_ipv4_address(): - """ - Get's local ipv4 address of the interface with the default gateway. - Return '127.0.0.1' if no suitable interface is found +# Turn off ssl warnings from urllib +requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning) +logging.getLogger('urllib3').setLevel(logging.WARNING) - :return: IPv4 address as a string - :rtype: string - """ - s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - try: - s.connect(('8.8.8.8', 1)) - IP = s.getsockname()[0] - except: - IP = '127.0.0.1' - finally: - s.close() - return IP - @staticmethod - def get_local_ipv6_address(): - """ - Get's local ipv6 address of the interface with the default gateway. - Return '::1' if no suitable interface is found +class Network(object): + """ + Provide useful static methods that you can use in your projects. - :return: IPv6 address as a string - :rtype: string - """ - s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) - try: - s.connect(('2001:4860:4860::8888', 1)) - IP = s.getsockname()[0] - except: - IP = '::1' - finally: - s.close() - return IP + NOTE: Some format check routines were duplicate with lib.utils. As these primarily check string formats and are used for metadata parsing, they were removed here to prevent duplicates. + """ @staticmethod def ip_port_to_socket(ip, port): """ - Returns an ip address plus port to a socket string. + Return an ip address plus port to a socket string. + Format is 'ip:port' for IPv4 or '[ip]:port' for IPv6 - :return: Socket address / IPEndPoint as string + :return: Socket address / IP endpoint as string :rtype: string """ - if Network.is_ipv6(ip): - ip = '[{}]'.format(ip) - return '{}:{}'.format(ip, port) + if Utils.is_ipv6(ip): + ip = f'[{ip}]' + return f'{ip}:{port}' @staticmethod - def ipver_to_string(ipver): + def family_to_string(family): """ - Converts a socket address family to an ip version string 'IPv4' or 'IPv6' + Convert a socket address family to an ip version string 'IPv4' or 'IPv6'. - :param ipver: Socket family - :type ipver: socket.AF_INET or socket.AF_INET6 + :param family: Socket family + :type family: socket.AF_INET or socket.AF_INET6 :return: 'IPv4' or 'IPv6' :rtype: string """ - return 'IPv6' if ipver == socket.AF_INET6 else 'IPv4' + return 'IPv6' if family == socket.AF_INET6 else 'IPv4' @staticmethod def ping(ip): """ - Tries to ICMP ping a host using external OS utilities. Currently IPv4 only. + Try to ICMP ping a host using external OS utilities. IPv4 only. :param ip: IPv4 address as a string :type ip: string @@ -232,17 +101,17 @@ def ping(ip): :rtype: bool """ logger = logging.getLogger(__name__) - if subprocess.call("ping -c 1 %s" % ip, shell=True, stdout=open('/dev/null', 'w'), stderr=subprocess.STDOUT) == 0: - logger.debug('Ping: {} is online'.format(ip)) + if subprocess.call(f'ping -c 1 {ip}', shell=True, stdout=open('/dev/null', 'w'), stderr=subprocess.STDOUT) == 0: + logger.debug(f'Ping: {ip} is online') return True else: - logger.debug('Ping: {} is offline'.format(ip)) + logger.debug(f'Ping: {ip} is offline') return False @staticmethod def ping_port(ip, port=80): """ - Tries to reach a given TCP port. Currently IPv4 only. + Try to reach a given TCP port. IPv4 only. :param ip: IPv4 address :param port: Port number @@ -250,25 +119,25 @@ def ping_port(ip, port=80): :type ip: string :type port: int - :return: True if a reachable, false otherwise. + :return: True if reachable, false otherwise. :rtype: bool """ logger = logging.getLogger(__name__) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(2) if sock.connect_ex((ip, int(port))) == 0: - logger.debug('Ping: port {} on {} is reachable'.format(port, ip)) + logger.debug(f'Ping: port {port} on {ip} is reachable') sock.close() return True else: - logger.debug('Ping: port {} on {} is offline or not reachable'.format(port, ip)) + logger.debug(f'Ping: port {port} on {ip} is offline or not reachable') sock.close() return False @staticmethod def send_wol(mac, ip='255.255.255.255'): """ - Sends a wake on lan packet to the given mac address using ipv4 broadcast (or directed to specific ip) + Send a wake on lan packet to the given mac address using ipv4 broadcast (or directed to specific ip). :param mac: Mac address to wake up (pure numbers or with any separator) :type mac: string @@ -291,30 +160,108 @@ def send_wol(mac, ip='255.255.255.255'): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) sock.sendto(send_data, (ip, 9)) - logger.debug('Sent WOL packet to {}'.format(mac)) + logger.debug(f'Sent WOL packet to {mac}') + + @staticmethod + def validate_inet_addr(addr, port): + """ + Validate that addr:port resolve properly and return resolved IP address and port. + + :param addr: hostname or ip address under test + :type addr: str + :param port: port number under test + :type port: num + :return: (ip_address, port, family) or (None, undef, undef) if error occurs + :rtype: tuple + """ + logger = logging.getLogger(__name__) + # Test if host is empty + if addr == '': + return ('', port, socket.AF_INET) + else: + # try to resolve addr to get more info + logger.debug(f'trying to resolve addr {addr} with port {port}') + try: + family, sockettype, proto, canonname, socketaddr = socket.getaddrinfo(addr, None)[0] + # Check if resolved address is IPv4 or IPv6 + if family == socket.AF_INET: + ip, _ = socketaddr + elif family == socket.AF_INET6: + ip, _, flow_info, scope_id = socketaddr + else: + # might be AF_UNIX or something esoteric? + logger.error(f'Unsupported address family {family}') + ip = None + if ip is not None: + logger.info(f'Resolved {addr} to {Network.family_to_string(family)} address {ip}') + except socket.gaierror as e: + # Unable to resolve hostname + logger.error(f'Cannot resolve {addr} to a valid ip address (v4 or v6): {e}') + ip = None + + return (ip, port, family) + + @staticmethod + def clean_uri(uri, mode='show'): + """ + Check URIs for embedded http/https login data (http://user:pass@domain.tld...) and clean it. + + Possible modes are: + + - 'show': don't change URI (default) -> ``http://user:pass@domain.tld...`` + - 'mask': replace login data with ``***`` -> ``http://***:***@domain.tld...`` + - 'strip': remove login data part -> ``http://domain.tld...`` + + :param uri: full URI to check and process + :param mode: handling mode, one of 'show', 'strip', 'mask' + :return: resulting URI string + + :type uri: str + :type mode: str + :rtype: str + """ + # find login data + pattern = re.compile('http([s]?)://([^:]+:[^@]+@)') + + # possible replacement modes + replacement = { + 'strip': 'http\\g<1>://', + 'mask': 'http\\g<1>://***:***@' + } + + # if no change requested or no login data found, return unchanged + if mode not in replacement or not pattern.match(uri): + return uri + + # return appropriately changed URI + return pattern.sub(replacement[mode], uri) class Http(object): """ - Creates an instance of the Http class. + Provide methods to simplify HTTP connections, especially to talk to HTTP servers. :param baseurl: base URL used everywhere in this instance (example: http://www.myserver.tld) :param timeout: Set a maximum amount of seconds the class should try to establish a connection + :param hide_login: Hide or mask login data in logged http(s) requests (see ``Network.clean_uri()``) :type baseurl: str :type timeout: int + :type hide_login: str """ - def __init__(self, baseurl='', timeout=10): + + def __init__(self, baseurl='', timeout=10, hide_login='show'): self.logger = logging.getLogger(__name__) self.baseurl = baseurl self._response = None self.timeout = timeout self._session = requests.Session() + self._hide_login = hide_login def HTTPDigestAuth(self, user=None, password=None): """ - Creates a HTTPDigestAuth instance and returns it to the caller. + Create a HTTPDigestAuth instance and returns it to the caller. :param user: Username :param password: Password @@ -329,7 +276,7 @@ def HTTPDigestAuth(self, user=None, password=None): def post_json(self, url=None, params=None, verify=True, auth=None, json=None, files={}): """ - Launches a POST request and returns JSON answer as a dict or None on error. + Launch a POST request and return JSON answer as a dict or None on error. :param url: Optional URL to fetch from. If None (default) use baseurl given on init. :param params: Optional dict of parameters to add to URL query string. @@ -348,14 +295,14 @@ def post_json(self, url=None, params=None, verify=True, auth=None, json=None, fi json = None try: json = self._response.json() - except: - self.logger.warning("Invalid JSON received from {} !".format(url if url else self.baseurl)) + except Exception: + self.logger.warning(f'Invalid JSON received from {Network.clean_uri(url, self._hide_login) if url else self.baseurl}') return json return None def get_json(self, url=None, params=None, verify=True, auth=None): """ - Launches a GET request and returns JSON answer as a dict or None on error. + Launch a GET request and return JSON answer as a dict or None on error. :param url: Optional URL to fetch from. If None (default) use baseurl given on init. :param params: Optional dict of parameters to add to URL query string. @@ -374,14 +321,14 @@ def get_json(self, url=None, params=None, verify=True, auth=None): json = None try: json = self._response.json() - except: - self.logger.warning("Invalid JSON received from {} !".format(url if url else self.baseurl)) + except Exception: + self.logger.warning(f'Invalid JSON received from {Network.clean_uri(url if url else self.baseurl, self._hide_login) }') return json return None def get_text(self, url=None, params=None, encoding=None, timeout=None): """ - Launches a GET request and returns answer as string or None on error. + Launch a GET request and return answer as string or None on error. :param url: Optional URL to fetch from. Default is to use baseurl given to constructor. :param params: Optional dict of parameters to add to URL query string. @@ -400,13 +347,13 @@ def get_text(self, url=None, params=None, encoding=None, timeout=None): if encoding: self._response.encoding = encoding _text = self._response.text - except: - self.logger.error("Successfull GET, but decoding response failed. This should never happen !") + except Exception as e: + self.logger.error(f'Successful GET, but decoding response failed. This should never happen...error was: {e}') return _text def download(self, url=None, local=None, params=None, verify=True, auth=None): """ - Downloads a binary file to a local path + Download a binary file to a local path. :param url: Remote file to download. Attention: Must be full url. 'baseurl' is NOT prefixed here. :param local: Local file to save @@ -424,19 +371,20 @@ def download(self, url=None, local=None, params=None, verify=True, auth=None): :rtype: bool """ if self.__get(url=url, params=params, verify=verify, auth=auth, stream=True): - self.logger.debug("Download of {} successfully completed, saving to {}".format(url, local)) + self.logger.debug(f'Download of {Network.clean_uri(url, self._hide_login)} successfully completed, saving to {local}') with open(str(local), 'wb') as f: for chunk in self._response: f.write(chunk) return True else: - self.logger.warning("Download error: {}".format(url)) + self.logger.warning(f'Download error: {Network.clean_uri(url, self._hide_login)}') return False def get_binary(self, url=None, params=None): """ - Launches a GET request and returns answer as raw binary data or None on error. - This is usefull for downloading binary objects / files. + Launch a GET request and return answer as raw binary data or None on error. + + This is useful for downloading binary objects / files. :param url: Optional URL to fetch from. Default is to use baseurl given to constructor. :param params: Optional dict of parameters to add to URL query string. @@ -452,22 +400,24 @@ def get_binary(self, url=None, params=None): def response_status(self): """ - Returns the status code (200, 404, ...) of the last executed request. - If GET request was not possible and thus no HTTP statuscode is available the returned status code = 0. + Return the status code (200, 404, ...) of the last executed request. + + If GET request was not possible and thus no HTTP statuscode is available, + the returned status code is 0. :return: Status code and text of last request - :rtype: (int, str) + :rtype: tuple(int, str) """ try: (code, reason) = (self._response.status_code, self._response.reason) - except: + except Exception: code = 0 reason = 'Unable to complete GET request' return (code, reason) def response_headers(self): """ - Returns a dictionary with the server return headers of the last executed request + Return a dictionary with the server return headers of the last executed request. :return: Headers returned by server :rtype: dict @@ -476,7 +426,7 @@ def response_headers(self): def response_cookies(self): """ - Returns a dictionary with the cookies the server may have sent on the last executed request + Return a dictionary with the cookies the server may have sent on the last executed request. :return: Cookies returned by server :rtype: dict @@ -485,8 +435,7 @@ def response_cookies(self): def response_object(self): """ - Returns the raw response object for advanced ussage. Use if you know what you are doing. - Maybe this lib can be extented to your needs instead ? + Return the raw response object for advanced ussage. :return: Reponse object as returned by underlying requests library :rtype: `requests.Response `_ @@ -494,34 +443,65 @@ def response_object(self): return self._response def __post(self, url=None, params=None, timeout=None, verify=True, auth=None, json=None, data=None, files={}): + """ + Send POST request. Non-documented arguments are passed on to requests.request(). + + :param url: URL to which to POST + :type url: str + :param data: data to submit to POST + :type data: dict or bytes or file + + :return: True if POST was successful + :rtype: bool + """ url = self.baseurl + url if url else self.baseurl timeout = timeout if timeout else self.timeout data = json if json else data - self.logger.info("Sending POST request {} to {}".format(json, url)) + self.logger.info(f'Sending POST request {json} to {Network.clean_uri(url, self._hide_login)}') try: self._response = self._session.post(url, params=params, timeout=timeout, verify=verify, auth=auth, data=data, files=files) - self.logger.debug("{} Posted to URL {}".format(self.response_status(), self._response.url)) + self.logger.debug(f'{self.response_status()} Posted to URL {Network.clean_uri(self._response.url, self._hide_login)}') except Exception as e: - self.logger.warning("Error sending POST request to {}: {}".format(url, e)) + self.logger.warning(f'Error sending POST request to {Network.clean_uri(url, self._hide_login)}: {e}') return False return True def __get(self, url=None, params=None, timeout=None, verify=True, auth=None, stream=False): + """ + Send POST request. Non-documented arguments are passed on to requests.request(). + + :param url: URL to which to GET + :type url: str + + :return: True if GET was successful + :rtype: bool + """ url = self.baseurl + url if url else self.baseurl timeout = timeout if timeout else self.timeout - self.logger.info("Sending GET request to {}".format(url)) + self.logger.info(f'Sending GET request to {Network.clean_uri(url, self._hide_login)}') try: self._response = self._session.get(url, params=params, timeout=timeout, verify=verify, auth=auth, stream=stream) - self.logger.debug("{} Fetched URL {}".format(self.response_status(), self._response.url)) + self.logger.debug(f'{self.response_status()} Fetched URL {Network.clean_uri(self._response.url, self._hide_login)}') except Exception as e: - self.logger.warning("Error sending GET request to {}: {}".format(url, e)) + self.logger.warning(f'Error sending GET request to {Network.clean_uri(url, self._hide_login)}: {e}') self._response = None return False return True class Tcp_client(object): - """ Creates a new instance of the Tcp_client class + """ + Structured class to handle locally initiated TCP connections with two-way communication. + + The callbacks need to be defined as follows: + + def connected_callback(Tcp_client_instance) + def receiving_callback(Tcp_client_instance) + def disconnected_callback(Tcp_client_instance) + def data_received_callback(Tcp_client_instance, message) + + (Class members need the additional first `self` parameter) + :param host: Remote host name or ip address (v4 or v6) :param port: Remote host port to connect to @@ -547,11 +527,11 @@ class Tcp_client(object): def __init__(self, host, port, name=None, autoreconnect=True, connect_retries=5, connect_cycle=5, retry_cycle=30, binary=False, terminator=False): self.logger = logging.getLogger(__name__) - # Public properties + # public properties self.name = name self.terminator = terminator - # "Private" properties + # protected properties self._host = host self._port = port self._autoreconnect = autoreconnect @@ -563,7 +543,7 @@ def __init__(self, host, port, name=None, autoreconnect=True, connect_retries=5, self._timeout = 1 self._hostip = None - self._ipver = socket.AF_INET + self._family = socket.AF_INET self._socket = None self._connect_counter = 0 self._binary = binary @@ -573,49 +553,26 @@ def __init__(self, host, port, name=None, autoreconnect=True, connect_retries=5, self._disconnected_callback = None self._data_received_callback = None - # "Secret" properties + # private properties self.__connect_thread = None self.__connect_threadlock = threading.Lock() self.__receive_thread = None self.__receive_threadlock = threading.Lock() self.__running = True - self.logger.setLevel(logging.DEBUG) - self.logger.info("Initializing a connection to {} on TCP port {} {} autoreconnect".format(self._host, self._port, ('with' if self._autoreconnect else 'without'))) + #self.logger.setLevel(logging.DEBUG) # Das sollte hier NICHT gesetzt werden, sondern in etc/logging.yaml im Logger lib.network konfiguriert werden! - # Test if host is an ip address or a host name - if Network.is_ip(self._host): - # host is a valid ip address (v4 or v6) - self.logger.debug("{} is a valid IP address".format(host)) - self._hostip = self._host - if Network.is_ipv6(self._host): - self._ipver = socket.AF_INET6 - else: - self._ipver = socket.AF_INET + self._host = host + self._port = port + (self._hostip, self._port, self._family) = Network.validate_inet_addr(host, port) + if self._hostip is not None: + self.logger.info(f'Initializing a connection to {self._host} on TCP port {self._port} {"with" if self._autoreconnect else "without"} autoreconnect') else: - # host is a hostname, trying to resolve to an ip address (v4 or v6) - self.logger.debug("{} is not a valid IP address, trying to resolve it as hostname".format(host)) - try: - self._ipver, sockettype, proto, canonname, socketaddr = socket.getaddrinfo(host, None)[0] - # Check if resolved address is IPv4 or IPv6 - if self._ipver == socket.AF_INET: # is IPv4 - self._hostip, port = socketaddr - elif self._ipver == socket.AF_INET6: # is IPv6 - self._hostip, port, flow_info, scope_id = socketaddr - else: - # This should never happen - self.logger.error("Unknown ip address family {}".format(self._ipver)) - self._hostip = None - # Print ip address on successfull resolve - if self._hostip is not None: - self.logger.info("Resolved {} to {} address {}".format(self._host, 'IPv6' if self._ipver == socket.AF_INET6 else 'IPv4', self._hostip)) - except Exception as err: - # Unable to resolve hostname - self.logger.error("Cannot resolve {} to a valid ip address (v4 or v6). Error: {}".format(self._host, err)) - self._hostip = None + self.logger.error(f'Connection to {self._host} not possible, invalid address') def set_callbacks(self, connected=None, receiving=None, data_received=None, disconnected=None): - """ Set callbacks to caller for different socket events + """ + Set callbacks to caller for different socket events. :param connected: Called whenever a connection is established successfully :param data_received: Called when data is received @@ -631,17 +588,18 @@ def set_callbacks(self, connected=None, receiving=None, data_received=None, disc self._data_received_callback = data_received def connect(self): - """ Connects the socket + """ + Connect the socket. :return: False if an error prevented us from launching a connection thread. True if a connection thread has been started. :rtype: bool """ if self._hostip is None: # return False if no valid ip to connect to - self.logger.error("No valid IP address to connect to {}".format(self._host)) + self.logger.error(f'No valid IP address to connect to {self._host}') self._is_connected = False return False if self._is_connected: # return false if already connected - self.logger.error("Already connected to {}, ignoring new request".format(self._host)) + self.logger.error(f'Already connected to {self._host}, ignoring new request') return False self.__connect_thread = threading.Thread(target=self._connect_thread_worker, name='TCP_Connect') @@ -650,7 +608,8 @@ def connect(self): return True def connected(self): - """ Returns the current connection state + """ + Return the current connection state. :return: True if an active connection exists,else False. :rtype: bool @@ -658,7 +617,8 @@ def connected(self): return self._is_connected def send(self, message): - """ Sends a message to the server. Can be a string, bytes or a bytes array. + """ + Send a message to the server. Can be a string, bytes or a bytes array. :return: True if message has been successfully sent, else False. :rtype: bool @@ -666,27 +626,43 @@ def send(self, message): if not isinstance(message, (bytes, bytearray)): try: message = message.encode('utf-8') - except: - self.logger.warning("Error encoding message for client {}".format(self.name)) + except Exception: + self.logger.warning(f'Error encoding message for client {self.name}') return False try: if self._is_connected: - self._socket.send(message) + bytes_sent = self._socket.send(message) + if bytes_sent != len(message): + self.logger.warning(f'Error sending message {message} to host {self._host}: message truncated, sent {bytes_sent} of {len(message)} bytes') else: return False - except Exception as e: - self.logger.warning("No connection to {}, cannot send data {}. Error: {}".format(self._host, message, e)) + except BrokenPipeError: + self.logger.warning(f'Detected disconnect from {self._host}, send failed.') + self._is_connected = False + if self._disconnected_callback: + self._disconnected_callback(self) + if self._autoreconnect: + self.logger.debug(f'Autoreconnect enabled for {self._host}') + self.connect() return False + + except Exception as e: # log errors we are not prepared to handle and raise exception for further debugging + self.logger.warning(f'Unhandleded error on sending to {self._host}, cannot send data {message}. Error: {e}') + raise + return True def _connect_thread_worker(self): + """ + Thread worker to handle connection. + """ if not self.__connect_threadlock.acquire(blocking=False): - self.logger.warning("Connection attempt already in progress for {}, ignoring new request".format(self._host)) + self.logger.warning(f'Connection attempt already in progress for {self._host}, ignoring new request') return if self._is_connected: - self.logger.error("Already connected to {}, ignoring new request".format(self._host)) + self.logger.error(f'Already connected to {self._host}, ignoring new request') return - self.logger.debug("Starting connection cycle for {}".format(self._host)) + self.logger.debug(f'Starting connection cycle for {self._host}') self._connect_counter = 0 while self.__running and not self._is_connected: # Try a full connect cycle @@ -695,124 +671,194 @@ def _connect_thread_worker(self): if self._is_connected: try: self.__connect_threadlock.release() - self._connected_callback and self._connected_callback(self) - _name='TCP_Client' + if self._connected_callback: + self._connected_callback(self) + _name = 'TCP_Client' if self.name is not None: _name = self.name + '.' + _name self.__receive_thread = threading.Thread(target=self.__receive_thread_worker, name=_name) self.__receive_thread.daemon = True self.__receive_thread.start() - except: + except Exception: raise return True - self._sleep(self._connect_cycle) + if self.__running: + self._sleep(self._connect_cycle) - if self._autoreconnect: + if self._autoreconnect and self.__running: self._sleep(self._retry_cycle) self._connect_counter = 0 else: break try: self.__connect_threadlock.release() - except: + except Exception: pass def _connect(self): - self.logger.debug("Connecting to {} using {} {} on TCP port {} {} autoreconnect".format(self._host, 'IPv6' if self._ipver == socket.AF_INET6 else 'IPv4', self._hostip, self._port, ('with' if self._autoreconnect else 'without'))) + """ + Initiate connection. + """ + self.logger.debug(f'Connecting to {self._host} using {"IPv6" if self._family == socket.AF_INET6 else "IPv4"} {self._hostip} on TCP port {self._port} {"with" if self._autoreconnect else "without"} autoreconnect') # Try to connect to remote host using ip (v4 or v6) try: - self._socket = socket.socket(self._ipver, socket.SOCK_STREAM) + self._socket = socket.socket(self._family, socket.SOCK_STREAM) self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) self._socket.settimeout(5) - self._socket.connect(('{}'.format(self._hostip), int(self._port))) + self._socket.connect((f'{self._hostip}', int(self._port))) self._socket.settimeout(self._timeout) self._is_connected = True - self.logger.info("Connected to {} on TCP port {}".format(self._host, self._port)) + self.logger.info(f'Connected to {self._host} on TCP port {self._port}') # Connection error except Exception as err: self._is_connected = False self._connect_counter += 1 - self.logger.warning("TCP connection to {}:{} failed with error {}. Counter: {}/{}".format(self._host, self._port, err, self._connect_counter, self._connect_retries)) + self.logger.warning(f'TCP connection to {self._host}:{self._port} failed {self._connect_counter}/{self._connect_retries} times, last error was: {err}') def __receive_thread_worker(self): + """ + Thread worker to handle receiving. + """ waitobj = IOWait() - waitobj.watch( self._socket, read=True) - ### BMX poller = select.poll() - ### BMX poller.register(self._socket, select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR) + waitobj.watch(self._socket, read=True) __buffer = b'' self._is_receiving = True - self._receiving_callback and self._receiving_callback(self) - while self._is_connected and self.__running: - ### BMX events = poller.poll(1000) - events = waitobj.wait(1000) ### BMX - ### BMX for fd, event in events: - for fileno, read, write in events: ### BMX - ### BMX if event & select.POLLHUP: - ### BMX self.logger.warning("Client socket closed") - # Check if POLLIN event triggered - ### BMX if event & (select.POLLIN | select.POLLPRI): - if read: - msg = self._socket.recv(4096) - # Check if incoming message is not empty - if msg: - # If we transfer in text mode decode message to string - if not self._binary: - msg = str.rstrip(str(msg, 'utf-8')) - # If we work in line mode (with a terminator) slice buffer into single chunks based on terminator - if self.terminator: - __buffer += msg - while True: - # terminator = int means fixed size chunks - if isinstance(self.terminator, int): - i = self.terminator - if i > len(__buffer): - break - # terminator is str or bytes means search for it - else: - i = __buffer.find(self.terminator) - if i == -1: - break - i += len(self.terminator) - line = __buffer[:i] - __buffer = __buffer[i:] + if self._receiving_callback: + self._receiving_callback(self) + # try to find possible "hidden" errors + try: + while self._is_connected and self.__running: + events = waitobj.wait(1000) # BMX + for fileno, read, write in events: # BMX + if read: + msg = self._socket.recv(4096) + # Check if incoming message is not empty + if msg: + # TODO: doing this breaks line separation if multiple lines + # are read at a time, the next loop can't split it + # because line endings are missing + # find out reason for this operation... + + # # If we transfer in text mode decode message to string + # # if not self._binary: + # # msg = str.rstrip(str(msg, 'utf-8')).encode('utf-8') + + # If we work in line mode (with a terminator) slice buffer into single chunks based on terminator + if self.terminator: + __buffer += msg + while True: + # terminator = int means fixed size chunks + if isinstance(self.terminator, int): + i = self.terminator + if i > len(__buffer): + break + # terminator is str or bytes means search for it + else: + i = __buffer.find(self.terminator) + if i == -1: + break + i += len(self.terminator) + line = __buffer[:i] + __buffer = __buffer[i:] + if self._data_received_callback is not None: + try: + self._data_received_callback(self, line if self._binary else str(line, 'utf-8').strip()) + except Exception as iex: + self._log_exception(iex, f'lib.network receive in terminator mode calling data_received_callback {self._data_received_callback} failed: {iex}') + # If not in terminator mode just forward what we received + else: if self._data_received_callback is not None: - self._data_received_callback(self, line) - # If not in terminator mode just forward what we received + try: + self._data_received_callback(self, msg) + except Exception as iex: + self._log_exception(iex, f'lib.network calling data_received_callback {self._data_received_callback} failed: {iex}') + # If empty peer has closed the connection else: - if self._data_received_callback is not None: - self._data_received_callback(self, msg) - # If empty peer has closed the connection - else: - # Peer connection closed - self.logger.warning("Connection closed by peer {}".format(self._host)) - self._is_connected = False - ### BMX poller.unregister() - waitobj.unwatch(self._socket) - self._disconnected_callback and self._disconnected_callback(self) - if self._autoreconnect: - self.logger.debug("Autoreconnect enabled for {}".format(self._host)) - self.connect() + if self.__running: + + # default state, peer closed connection + self.logger.warning(f'Connection closed by peer {self._host}') + self._is_connected = False + waitobj.unwatch(self._socket) + if self._disconnected_callback is not None: + try: + self._disconnected_callback(self) + except Exception as iex: + self._log_exception(iex, f'lib.network calling disconnected_callback {self._disconnected_callback} failed: {iex}') + if self._autoreconnect: + self.logger.debug(f'Autoreconnect enabled for {self._host}') + self.connect() + if self._is_connected: + self.logger.debug('set a read watch on socket again') + waitobj.watch(self._socket, read=True) + else: + # socket shut down by self.close, no error + self.logger.debug('Connection shut down by call to close method') + self._is_receiving = False + return + except Exception as ex: + if not self.__running: + self.logger.debug('lib.network receive thread shutting down') + self._is_receiving = False + return + else: + self._log_exception(ex, f'lib.network receive thread died with error: {ex}. Go tell...') self._is_receiving = False + + def _log_exception( self, ex, msg): + self.logger.error(msg + ' If stack trace is necessary, enable debug log') + + if self.logger.isEnabledFor(logging.DEBUG): + + # Get current system exception + ex_type, ex_value, ex_traceback = sys.exc_info() + + # Extract unformatter stack traces as tuples + trace_back = traceback.extract_tb(ex_traceback) + + # Format stacktrace + stack_trace = list() + + for trace in trace_back: + stack_trace.append("File : %s , Line : %d, Func.Name : %s, Message : %s" % (trace[0], trace[1], trace[2], trace[3])) + + self.logger.debug("Exception type : %s " % ex_type.__name__) + self.logger.debug("Exception message : %s" % ex_value) + self.logger.debug("Stack trace : %s" % stack_trace) def _sleep(self, time_lapse): + """ + Sleep (at least) seconds, but abort if self.__running changes to False. + + :param time_lapse: wait time in seconds + :type time: int + """ time_start = time.time() time_end = (time_start + time_lapse) while self.__running and time_end > time.time(): - pass + # modified from 'pass' - this way intervals of 1 second are given up to other threads + # but the abort loop stays intact with a maximum of 1 second delay + time.sleep(1) def close(self): - """ Closes the current client socket """ - self.logger.info("Closing connection to {} on TCP port {}".format(self._host, self._port)) + """ + Close the current client socket. + """ + self.logger.info(f'Closing connection to {self._host} on TCP port {self._port}') self.__running = False - if self.__connect_thread is not None and self.__connect_thread.isAlive(): + self._socket.shutdown(socket.SHUT_RD) + if self.__connect_thread is not None and self.__connect_thread.is_alive(): self.__connect_thread.join() - if self.__receive_thread is not None and self.__receive_thread.isAlive(): + if self.__receive_thread is not None and self.__receive_thread.is_alive(): self.__receive_thread.join() -class _Client(object): - """ Client object that represents a connected client of tcp_server +class ConnectionClient(object): + """ + Client object that represents a connected client returned by a Tcp_server instance on incoming connection. + + This class should normally **not be instantiated manually**, but is provided by the Tcp_server via the callbacks :param server: The tcp_server passes a reference to itself to access parent methods :param socket: socket.Socket class used by the Client object @@ -822,12 +868,13 @@ class _Client(object): :type socket: function :type fd: int """ + def __init__(self, server=None, socket=None, ip=None, port=None): self.logger = logging.getLogger(__name__) self.name = None self.ip = ip self.port = port - self.ipver = None + self.family = None self.writer = None self.process_iac = True @@ -838,10 +885,14 @@ def __init__(self, server=None, socket=None, ip=None, port=None): @property def socket(self): + """ + Socket getter. + """ return self.__socket def set_callbacks(self, data_received=None, will_close=None): - """ Set callbacks for different socket events (client based) + """ + Set callbacks for different socket events (client based). :param data_received: Called when data is received :type data_received: function @@ -849,8 +900,18 @@ def set_callbacks(self, data_received=None, will_close=None): self._data_received_callback = data_received self._will_close_callback = will_close + async def __drain_writer(self): + """ + Ensure drain() is called. + """ + try: + await self.writer.drain() + except ConnectionResetError: + pass + def send(self, message): - """ Send a string to connected client + """ + Send a string to connected client. :param msg: Message to send :type msg: string | bytes | bytearray @@ -861,43 +922,54 @@ def send(self, message): if not isinstance(message, (bytes, bytearray)): try: message = message.encode('utf-8') - except: - self.logger.warning("Error encoding data for client {}".format(self.name)) + except Exception: + self.logger.warning(f'Error encoding data for client {self.name}') return False try: self.writer.write(message) - self.writer.drain() - except: - self.logger.warning("Error sending data to client {}".format(self.name)) + asyncio.ensure_future(self.__drain_writer()) + except Exception as e: + self.logger.warning(f'Error sending data to client {self.name}: {e}') return False return True def send_echo_off(self): - """ Sends an IAC telnet command to ask client to turn it's echo off """ + """ + Send an IAC telnet command to ask client to turn its echo off. + """ command = bytearray([0xFF, 0xFB, 0x01]) string = self._iac_to_string(command) - self.logger.debug("Sending IAC telnet command: '{}'".format(string)) + self.logger.debug(f'Sending IAC telnet command: {string}') self.send(command) def send_echo_on(self): - """ Sends an IAC telnet command to ask client to turn it's echo on again """ + """ + Send an IAC telnet command to ask client to turn its echo on again. + """ command = bytearray([0xFF, 0xFC, 0x01]) string = self._iac_to_string(command) - self.logger.debug("Sending IAC telnet command: '{}'".format(string)) + self.logger.debug(f'Sending IAC telnet command: {string}') self.send(command) def _process_IAC(self, msg): - """ Processes incomming IAC messages. Does nothing for now except logging them in clear text """ + """ + Process incomming IAC messages. + + NOTE: Does nothing for now except logging them in clear text + """ if len(msg) >= 3: string = self._iac_to_string(msg[:3]) - self.logger.debug("Received IAC telnet command: '{}'".format(string)) + self.logger.debug(f'Received IAC telnet command: {string}') msg = msg[3:] return msg def close(self): - """ Client socket closes itself """ - self._will_close_callback and self._will_close_callback(self) + """ + Close client socket. + """ + if self._will_close_callback: + self._will_close_callback(self) self.set_callbacks(data_received=None, will_close=None) self.writer.close() return True @@ -909,19 +981,25 @@ def _iac_to_string(self, msg): if char in iac: string += iac[char] + ' ' else: - #string += ' ' string += chr(char) return string.rstrip() class Tcp_server(object): - """ Creates a new instance of the Tcp_server class + """ + Threaded TCP listener which dispatches connections (and possibly received data) via callbacks. + + NOTE: The callbacks need to expect the following arguments: - :param interface: Remote interface name or ip address (v4 or v6). Default is '::' which listens on all IPv4 and all IPv6 addresses available. - :param port: Remote interface port to connect to + - ``incoming_connection(server, client)`` where ``server`` ist the ``Tcp_server`` instance and ``client`` is a ``ConnectionClient`` for the current connection + - ``data_received(server, client, data)`` where ``server`` ist the ``Tcp_server`` instance, ``client`` is a ``ConnectionClient`` for the current connection, and ``data`` is a string containing received data + - ``disconnected(server, client)`` where ``server`` ist the ``Tcp_server`` instance and ``client`` is a ``ConnectionClient`` for the closed connection + + :param host: Local host name or ip address (v4 or v6). Default is '::' which listens on all IPv4 and all IPv6 addresses available. + :param port: Local port to connect to :param name: Name of this connection (mainly for logging purposes) - :type interface: str + :type host: str :type port: int :type name: str """ @@ -931,73 +1009,45 @@ class Tcp_server(object): MODE_BINARY = 3 MODE_FIXED_LENGTH = 4 - def __init__(self, port, interface='', name=None, mode=MODE_BINARY, terminator=None): + def __init__(self, port, host='', name=None, mode=MODE_BINARY, terminator=None): self.logger = logging.getLogger(__name__) - # Public properties + # public properties self.name = name self.mode = mode self.terminator = terminator - # "Private" properties - self._interface = interface + # private properties + self._host = host self._port = port self._is_listening = False self._timeout = 1 - self._interfaceip = None - self._ipver = socket.AF_INET + self._ipaddr = None + self._family = socket.AF_INET self._socket = None - self._listening_callback = None self._incoming_connection_callback = None self._data_received_callback = None - # "Secret" properties + # protected properties self.__loop = None self.__coroutine = None self.__server = None self.__listening_thread = None - self.__listening_threadlock = threading.Lock() self.__running = True # Test if host is an ip address or a host name - if self._interface == '' or Network.is_ip(self._interface): - # host is a valid ip address (v4 or v6) - self._interfaceip = self._interface - if self._interface == '': - self._interface = 'All Ipv4/Ipv6' - self.logger.debug("'{}' is a valid IP address".format(self._interface)) - if Network.is_ipv6(self._interfaceip): - self._ipver = socket.AF_INET6 - else: - self._ipver = socket.AF_INET - else: - # host is a hostname, trying to resolve to an ip address (v4 or v6) - self.logger.debug("{} is not a valid IP address, trying to resolve it as hostname".format(self._interface)) - try: - self._ipver, sockettype, proto, canonname, socketaddr = socket.getaddrinfo(self._interface, None)[0] - # Check if resolved address is IPv4 or IPv6 - if self._ipver == socket.AF_INET: - self._interfaceip, port = socketaddr - elif self._ipver == socket.AF_INET6: - self._interfaceip, port, flow_info, scope_id = socketaddr - else: - self.logger.error("Unknown ip address family {}".format(self._ipver)) - self._interfaceip = None - if self._interfaceip is not None: - self.logger.info("Resolved {} to {} address {}".format(self._interface, Network.ipver_to_string(self._ipver), self._interfaceip)) - except Exception as err: - # Unable to resolve hostname - self.logger.error("Cannot resolve {} to a valid ip address (v4 or v6). Error: {}".format(self._interface, err)) - self._interfaceip = None + (self._ipaddr, self._port, self._family) = Network.validate_inet_addr(host, port) - self.__our_socket = Network.ip_port_to_socket(self._interfaceip, self._port) - if not self.name: - self.name = self.__our_socket + if self._ipaddr is not None: + self.__our_socket = Network.ip_port_to_socket(self._ipaddr, self._port) + if not self.name: + self.name = self.__our_socket - def set_callbacks(self, listening=None, incoming_connection=None, disconnected=None, data_received=None): - """ Set callbacks to caller for different socket events + def set_callbacks(self, incoming_connection=None, disconnected=None, data_received=None): + """ + Set callbacks to caller for different socket events. :param connected: Called whenever a connection is established successfully :param data_received: Called when data is received @@ -1007,13 +1057,13 @@ def set_callbacks(self, listening=None, incoming_connection=None, disconnected=N :type data_received: function :type disconnected: function """ - self._listening_callback = listening self._incoming_connection_callback = incoming_connection self._data_received_callback = data_received self._disconnected_callback = disconnected def start(self): - """ Start the server socket + """ + Start the server socket. :return: False if an error prevented us from launching a connection thread. True if a connection thread has been started. :rtype: bool @@ -1021,54 +1071,63 @@ def start(self): if self._is_listening: return False try: - self.logger.info("Starting up TCP server socket {}".format(self.__our_socket)) + self.logger.info(f'Starting up TCP server socket {self.__our_socket}') self.__loop = asyncio.new_event_loop() asyncio.set_event_loop(self.__loop) - self.__coroutine = asyncio.start_server(self.__handle_connection, self._interfaceip, self._port) + self.__coroutine = asyncio.start_server(self.__handle_connection, self._ipaddr, self._port) self.__server = self.__loop.run_until_complete(self.__coroutine) _name = 'TCP_Server' if self.name is not None: - _name = self.name + '.' + _name + _name = f'{self.name}.{_name}' self.__listening_thread = threading.Thread(target=self.__listening_thread_worker, name=_name) self.__listening_thread.daemon = True self.__listening_thread.start() - except: + except Exception as e: + self.logger.error(f'Error starting server: {e}') return False return True def __listening_thread_worker(self): - """ Runs the asyncio loop in a separate thread to not block the Tcp_server.start() method """ + """ + Run the asyncio loop in a separate thread to not block the Tcp_server.start() method. + """ asyncio.set_event_loop(self.__loop) self._is_listening = True try: self.__loop.run_forever() - except: + except Exception: self.logger.debug('*** Error in loop.run_forever()') finally: - - for task in asyncio.Task.all_tasks(): + for task in asyncio.all_tasks(self.__loop): task.cancel() self.__server.close() self.__loop.run_until_complete(self.__server.wait_closed()) - self.__loop.close() + try: + self.__loop.close() + except Exception: + pass self._is_listening = False - return True async def __handle_connection(self, reader, writer): - """ Handles incoming connection. One handler per client """ + """ + Handle incoming connection. + + Each client gets its own handler. + """ peer = writer.get_extra_info('peername') socket_object = writer.get_extra_info('socket') peer_socket = Network.ip_port_to_socket(peer[0], peer[1]) - client = _Client(server=self, socket=socket_object, ip=peer[0], port=peer[1]) - client.ipver = socket.AF_INET6 if Network.is_ipv6(client.ip) else socket.AF_INET + client = ConnectionClient(server=self, socket=socket_object, ip=peer[0], port=peer[1]) + client.family = socket.AF_INET6 if Utils.is_ipv6(client.ip) else socket.AF_INET client.name = Network.ip_port_to_socket(client.ip, client.port) client.writer = writer - self.logger.info("Incoming connection from {} on socket {}".format(peer_socket, self.__our_socket)) - self._incoming_connection_callback and self._incoming_connection_callback(self, client) + self.logger.info(f'Incoming connection from {peer_socket} on socket {self.__our_socket}') + if self._incoming_connection_callback: + self._incoming_connection_callback(self, client) while True: try: @@ -1077,7 +1136,7 @@ async def __handle_connection(self, reader, writer): data = await reader.readline() else: data = await reader.read(4096) - except: + except Exception: data = None if data and data[0] == 0xFF and client.process_iac: @@ -1085,11 +1144,13 @@ async def __handle_connection(self, reader, writer): if data: try: string = str.rstrip(str(data, 'utf-8')) - self.logger.debug("Received '{}' from {}".format(string, client.name)) - self._data_received_callback and self._data_received_callback(self, client, string) - client._data_received_callback and client._data_received_callback(self, client, string) - except: - self.logger.debug("Received undecodable bytes from {}".format(client.name)) + self.logger.debug(f'Received "{string}" from {client.name}') + if self._data_received_callback: + self._data_received_callback(self, client, string) + if client._data_received_callback: + client._data_received_callback(self, client, string) + except Exception as e: + self.logger.debug(f'Received undecodable bytes from {client.name}: {data}, resulting in error: {e}') else: try: self.__close_client(client) @@ -1099,12 +1160,20 @@ async def __handle_connection(self, reader, writer): return def __close_client(self, client): - self.logger.info("Lost connection to client {}".format(client.name)) - self._disconnected_callback and self._disconnected_callback(self, client) + """ + Close client connection. + + :param client: client object + :type client: lib.network.ConnectionClient + """ + self.logger.info(f'Connection to client {client.name} closed') + if self._disconnected_callback: + self._disconnected_callback(self, client) client.writer.close() def listening(self): - """ Returns the current listening state + """ + Return the current listening state. :return: True if the server socket is actually listening, else False. :rtype: bool @@ -1112,12 +1181,13 @@ def listening(self): return self._is_listening def send(self, client, msg): - """ Send a string to connected client + """ + Send a string to connected client. :param client: Client Object to send message to :param msg: Message to send - :type client: network.Client + :type client: lib.network.ConnectionClient :type msg: string | bytes | bytearray :return: True if message has been queued successfully. @@ -1127,28 +1197,225 @@ def send(self, client, msg): return True def disconnect(self, client): - """ Disconnects a specific client + """ + Disconnect a specific client. :param client: Client Object to disconnect - :type client: network.Client + :type client: lib.network.ConnectionClient """ client.close() return True def close(self): - """ Closes running listening socket """ - self.logger.info("Shutting down listening socket on interface {} port {}".format(self._interface, self._port)) + """ + Close running listening socket. + """ + self.logger.info(f'Shutting down listening socket on host {self._host} port {self._port}') asyncio.set_event_loop(self.__loop) try: - active_connections = len([task for task in asyncio.Task.all_tasks() if not task.done()]) - except: + active_connections = len([task for task in asyncio.all_tasks(self.__loop) if not task.done()]) + except Exception: active_connections = 0 if active_connections > 0: - self.logger.info('Tcp_server still has {} active connection(s), cleaning up'.format(active_connections)) + self.logger.info(f'Tcp_server still has {active_connections} active connection(s), cleaning up') self.__running = False self.__loop.call_soon_threadsafe(self.__loop.stop) while self.__loop.is_running(): pass - if self.__listening_thread and self.__listening_thread.isAlive(): - self.__listening_thread.join() + try: + if self.__listening_thread and self.__listening_thread.is_alive(): + self.__listening_thread.join() + except AttributeError: # thread can disappear between first and second condition test + pass self.__loop.close() + + +class Udp_server(object): + """ + Threaded UDP listener which dispatches received data via callbacks. + + NOTE: The callbacks need to expect the following arguments: + + - ``data_received(addr, data)`` where ``addr`` is a tuple with ``('', remote_port)`` and ``data`` is the received data as string + + :param host: Local hostname or ip address (v4 or v6). Default is '' which listens on all IPv4 addresses available. + :param port: Local port to connect to + :param name: Name of this connection (mainly for logging purposes) + + :type host: str + :type port: int + :type name: str + """ + + def __init__(self, port, host='', name=None): + self.logger = logging.getLogger(__name__) + + # Public properties + self.name = name + + # protected properties + self._host = host + self._port = port + self._is_listening = False + + self._ipaddr = None + self._family = socket.AF_INET + self._socket = None + + self._data_received_callback = None + + # provide a shutdown timeout for the server loop. emergency fallback only + self._close_timeout = 2 + + # private properties + self.__loop = None + self.__coroutine = None + self.__server = aioudp.aioUDPServer() + self.__listening_thread = None + self.__running = True + + # create sensible ipaddr (resolve host, handle protocol family) + (self._ipaddr, self._port, self._family) = Network.validate_inet_addr(host, port) + + if self._ipaddr is not None: + self.__our_socket = Network.ip_port_to_socket(self._ipaddr, self._port) + if not self.name: + self.name = self.__our_socket + else: + self.__running = False + + def start(self): + """ + Start the server socket. + + :return: False if an error prevented us from launching a connection thread. True if a connection thread has been started. + :rtype: bool + """ + if not self.__running: + self.logger.error('UDP server not initialized, can not start.') + return False + if self._is_listening: + self.logger.warning('UDP server already listening, not starting again') + return False + try: + self.logger.info(f'Starting up UDP server socket {self.__our_socket}') + self.__loop = asyncio.new_event_loop() + asyncio.set_event_loop(self.__loop) + self.__coroutine = self.__start_server() + self.__loop.run_until_complete(self.__coroutine) + + _name = 'UDP_Server' + if self.name is not None: + _name = self.name + '.' + _name + self.__listening_thread = threading.Thread(target=self.__listening_thread_worker, name=_name) + self.__listening_thread.daemon = True + self.__listening_thread.start() + except Exception as e: + self.logger.error(f'Error {e} setting up udp server for {self.__our_socket}') + return False + return True + + def set_callbacks(self, data_received=None): + """ + Set callbacks to caller for different socket events. + + :param data_received: Called when data is received + + :type data_received: function + """ + self._data_received_callback = data_received + + def listening(self): + """ + Return the current listening state. + + :return: True if the server socket is actually listening, else False. + :rtype: bool + """ + return self._is_listening + + def close(self): + """ + Close running listening socket. + """ + self.logger.info(f'Shutting down listening socket on host {self._host} port {self._port}') + asyncio.set_event_loop(self.__loop) + self.__running = False + self.__server.stop() + + # cancel pending tasks + tasks = [t for t in asyncio.all_tasks(self.__loop) if t is not asyncio.current_task(self.__loop)] + [task.cancel() for task in tasks] + + # close loop gracefully + self.__loop.call_soon_threadsafe(self.__loop.stop) + + # this code shouldn't be needed, but include it with timeout just to be sure... + starttime = time.time() + while self.__loop.is_running() and time.time() < starttime + self._close_timeout: + pass + if self.__loop.is_running(): + self.__loop.stop() + time.sleep(0.5) + + try: + if self.__listening_thread and self.__listening_thread.is_alive(): + self.__listening_thread.join() + except AttributeError: # thread can disappear between first and second condition test + pass + self.__loop.close() + + async def __start_server(self): + """ + Start the actual server class. + """ + self.__server.run(self._ipaddr, self._port, self.__loop) + self.__server.subscribe(self.__handle_connection) + + def __listening_thread_worker(self): + """ + Run the asyncio loop in a separate thread to not block the Udp_server.start() method. + """ + self._is_listening = True + self.logger.debug('listening thread set is_listening to True') + asyncio.set_event_loop(self.__loop) + try: + self.__loop.run_forever() + except Exception as e: + self.logger.debug(f'*** Error in loop.run_forever(): {e}') + finally: + self.__server.stop() + self.__loop.close() + self._is_listening = False + return True + + async def __handle_connection(self, data, addr): + """ + Handle incoming connection. + + As UDP is stateless, each datagram creates a new handler. + + :param data: data received from socket + :type data: bytes + :param addr: address info ('addr', port) + :type addr: tuple + """ + if addr: + host, port = addr + else: + self.logger.debug(f'Address info {addr} not in format "(host, port)"') + host = '0.0.0.0' + port = 0 + + self.logger.info(f'Incoming datagram from {host}:{port} on socket {self.__our_socket}') + + if data: + try: + string = str.rstrip(str(data, 'utf-8')) + self.logger.debug(f'Received "{string}" from {host}:{port}') + if self._data_received_callback: + self._data_received_callback(addr, string) + except UnicodeError: + self.logger.debug(f'Received undecodable bytes from {host}:{port}') + else: + self.logger.debug(f'Received empty datagram from {host}:{port}') \ No newline at end of file diff --git a/lib/orb.py b/lib/orb.py index 0a5b9501c4..1a14fa7637 100644 --- a/lib/orb.py +++ b/lib/orb.py @@ -144,7 +144,7 @@ def rise(self, doff=0, moff=0, center=True, dt=None): if not doff == 0: doff = self._avoid_neverup(dt, date_utc, doff) self._obs.horizon = str(doff) - if doff != 0: + if not doff == 0: next_rising = self._obs.next_rising(self._orb, use_center=center).datetime() else: next_rising = self._obs.next_rising(self._orb).datetime() @@ -171,7 +171,7 @@ def set(self, doff=0, moff=0, center=True, dt=None): if not doff == 0: doff = self._avoid_neverup(dt, date_utc, doff) self._obs.horizon = str(doff) - if doff != 0: + if not doff == 0: next_setting = self._obs.next_setting(self._orb, use_center=center).datetime() else: next_setting = self._obs.next_setting(self._orb).datetime() @@ -181,7 +181,7 @@ def set(self, doff=0, moff=0, center=True, dt=None): def pos(self, offset=None, degree=False, dt=None): """ Calculates the position of either sun or moon - :param offset: given in minutesA, shifts the time of calculation by some minutes back or forth + :param offset: given in minutes, shifts the time of calculation by some minutes back or forth :param degree: if True: return the position of either sun or moon from the observer as degrees, otherwise as radians :param dt: time for which the position needs to be calculated :return: a tuple with azimuth and elevation diff --git a/lib/requirements.txt b/lib/requirements.txt index 1ed6c9b3d4..d522e48d99 100644 --- a/lib/requirements.txt +++ b/lib/requirements.txt @@ -9,7 +9,7 @@ holidays>=0.9.11 psutil portalocker -# lib.connection / lib.network +# lib.network iowait # lib.network, lib.shpypi: diff --git a/lib/scene.py b/lib/scene.py index 6fa4f2921b..6b4916b6ee 100644 --- a/lib/scene.py +++ b/lib/scene.py @@ -28,10 +28,13 @@ import os.path import csv +from lib.translation import translate + from lib.item import Items from lib.logic import Logics from lib.utils import Utils +from lib.shtime import Shtime import lib.shyaml as yaml logger = logging.getLogger(__name__) @@ -59,18 +62,28 @@ def __init__(self, smarthome): import inspect curframe = inspect.currentframe() calframe = inspect.getouterframes(curframe, 2) - logger.critical("A second 'scenes' object has been created. There should only be ONE instance of class 'Scenes'!!! Called from: {} ({})".format(calframe[1][1], calframe[1][3])) + logger.critical(translate("A second 'scenes' object has been created. There should only be ONE instance of class 'Scenes'!!! Called from: {frame1} ({frame2})", {'frame1': calframe[1][1], 'frame2': calframe[1][3]})) _scenes_instance = self self.items = Items.get_instance() self.logics = Logics.get_instance() + self._load_scenes() + return + + + def _load_scenes(self): + """ + Load defined scenes with learned values from ../scene directory + + :return: + """ self._scenes = {} self._learned_values = {} - self._scenes_dir = smarthome._scenes_dir + self._scenes_dir = self._sh._scenes_dir if not os.path.isdir(self._scenes_dir): - logger.warning("Directory scenes not found. Ignoring scenes.".format(self._scenes_dir)) + logger.warning(translate("Directory '{scenes_dir}' not found. Ignoring scenes.", {'scenes_dir': self._scenes_dir})) return self._learned_values = {} @@ -94,9 +107,10 @@ def __init__(self, smarthome): action.get('item', ''), str(action.get('value', '')), action.get('learn', ''), scene_file_yaml[state].get('name', '')) else: - logger.warning("Scene {}, state {}: action '{}' is not a dict".format(item, state, action)) + logger.warning(translate("Scene {scene}, state {state}: action '{action}' is not a dict", {'scene': item, 'state': state, 'action': action})) else: - logger.warning("Scene {}, state {}: actions are not a list".format(item, state)) + logger.warning(translate("Scene {scene}, state {state}: actions are not a list", {'scene': item, 'state': state})) + self._load_learned_values(str(item.id())) else: # Trying to read conf file with scene definition @@ -111,10 +125,12 @@ def __init__(self, smarthome): continue self._add_scene_entry(item, row[0], row[1], row[2]) except Exception as e: - logger.warning("Problem reading scene file {0}: No .yaml or .conf file found with this name".format(self.scene_file)) + logger.warning(translate("Problem reading scene file {file}: No .yaml or .conf file found with this name", {'file': self.scene_file})) continue item.add_method_trigger(self._trigger) + return + def _eval(self, value): """ @@ -126,11 +142,16 @@ def _eval(self, value): :return: evaluated value or None :rtype: type of evaluated expression or None """ - sh = self._sh # noqa + sh = self._sh + shtime = Shtime.get_instance() + items = Items.get_instance() + import math + import lib.userfunctions as uf + try: rvalue = eval(value) except Exception as e: - logger.warning(" - Problem evaluating: {} - {}".format(value, e)) + logger.warning(" - " + translate("Problem evaluating: {value} - {exception}", {'value': value, 'exception': e})) return value return rvalue @@ -239,7 +260,7 @@ def _trigger(self, item, caller, source, dest): if Utils.is_int(state): state = int(state) else: - logger.error("Invalid state '{}' for scene {}".format(state, item.id())) + logger.error(translate("Invalid state '{state}' for scene {scene}", {'state': state, 'scene': item.id()})) return if (state >= 0) and (state < 64): @@ -249,7 +270,7 @@ def _trigger(self, item, caller, source, dest): # learn state self._trigger_learnstate(item, state&127, caller, source, dest) else: - logger.error("Invalid state '{}' for scene {}".format(state, item.id())) + logger.error(translate("Invalid state '{state}' for scene {scene}", {'state': state, 'scene': item.id()})) def _add_scene_entry(self, item, state, ditemname, value, learn=False, name=''): @@ -271,13 +292,13 @@ def _add_scene_entry(self, item, state, ditemname, value, learn=False, name=''): if learn: rvalue = self._eval(value) if str(rvalue) != value: - logger.warning("_add_scene_entry - Learn set to 'False', because '{}' != '{}'".format(rvalue, value)) + logger.warning(translate("_add_scene_entry - " + "Learn set to 'False', because '{rvalue}' != '{value}'", {'rvalue': rvalue, 'value': value})) learn = False if ditem is None: ditem = self.logics.return_logic(ditemname) if ditem is None: - logger.warning("Could not find item or logic '{}' specified in {}".format(ditemname, self.scene_file)) + logger.warning(translate("Could not find item or logic '{ditemname}' specified in {file}", {'ditemname': ditemname, 'file': self.scene_file})) return if item.id() in self._scenes: @@ -359,7 +380,7 @@ def get_scene_action_name(self, scenename, action): try: return self._scenes[scenename][action][0][2] except: - logger.warning("get_scene_action_name: unable to get self._scenes['{}']['{}'][0][2] <- {}".format(scenename, action, self._scenes[scenename][action][0])) + logger.warning(translate("get_scene_action_name: " + "unable to get self._scenes['{scenename}']['{action}'][0][2] <- {res}", {'scenename': scenename, 'action': action, 'res': self._scenes[scenename][action][0]})) return '' def return_scene_value_actions(self, name, state): @@ -379,3 +400,14 @@ def return_scene_value_actions(self, name, state): action_list.append(return_action) return action_list + + def reload_scenes(self): + """ + Reload defined scenes with learned values from ../scene directory + + :return: + """ + + self._load_scenes() + logger.notice(translate("Reloaded all scenes")) + return True diff --git a/lib/scheduler.py b/lib/scheduler.py index 80f5d5b42e..03c4c86855 100644 --- a/lib/scheduler.py +++ b/lib/scheduler.py @@ -24,7 +24,6 @@ import logging import time import datetime -import calendar import sys import traceback import threading @@ -45,6 +44,8 @@ import gc # noqa import os import math +import lib.userfunctions as uf + import types import subprocess @@ -59,6 +60,8 @@ _scheduler_instance = None # Pointer to the initialized instance of the scheduler class (for use by static methods) +from lib.triggertimes import TriggerTimes + class _PriorityQueue: """ @@ -152,6 +155,7 @@ def __init__(self, smarthome): self.shtime = Shtime.get_instance() self.items = Items.get_instance() + self.crontabs = TriggerTimes.get_instance() self.mqtt = None @@ -563,7 +567,9 @@ def _next_time(self, name, offset=None): next_time = now + datetime.timedelta(seconds=offset) if job['cron'] is not None: for entry in job['cron']: - ct = self._crontab(entry) + if entry == 'None': + continue + ct = self.crontabs.get_next(entry, now) if next_time is not None: if ct < next_time: next_time = ct @@ -667,235 +673,3 @@ def _task(self, name, obj, by, source, dest, value): except Exception as e: logger.exception("Method {0} exception: {1}".format(name, e)) threading.current_thread().name = 'idle' - - def _crontab(self, crontab): - """ - inspects if a crontab entry contains a sunbound time instruction (e.g. "17:00 now_str, event_range) - if not next_event: - return False - next_time = now - day, hour, minute = next_event.split('-') - return next_time.replace(day=int(day), hour=int(hour), minute=int(minute), second=0, microsecond=0) - - def _next(self, f, seq): - for item in seq: - if f(item): - return item - return False - - def _sun(self, crontab): - """ - parses a given string with a time range to determine it's timely boundaries and - returns a time - - :param: crontab contains a string with '[H:M<](sunrise|sunset)[+|-][offset][ next_time: - next_time = dmin - if smax is not None: - h, sep, m = smax.partition(':') - try: - dmax = next_time.replace(hour=int(h), minute=int(m), second=0, tzinfo=self.shtime.tzinfo()) - except Exception: - logger.error('Wrong syntax: {0}. Should be [H:M<](sunrise|sunset)[+|-][offset][ high: # entry above range - item = high # truncate value to highest possible - item_range.append(item) - for entry in item_range: - result.append('{:02d}'.format(entry)) - - return result - - def _day_range(self, days): - """ - inspect a given string with days given as integer numbers separated by "," - - :param days: - :return: an array with strings containing the days of month - """ - now = datetime.date.today() - wdays = [MO, TU, WE, TH, FR, SA, SU] - result = [] - for day in days.split(','): - wday = wdays[int(day)] - # add next weekday occurrence - day = now + dateutil.relativedelta.relativedelta(weekday=wday) - result.append(day.strftime("%d")) - # safety add-on if weekday equals todays weekday - day = now + dateutil.relativedelta.relativedelta(weekday=wday(+2)) - result.append(day.strftime("%d")) - return result diff --git a/lib/shpypi.py b/lib/shpypi.py index a9bef7f4bc..c4b6105126 100644 --- a/lib/shpypi.py +++ b/lib/shpypi.py @@ -385,7 +385,12 @@ def install_requirements(self, req_type, logging=True, pip3_command=None): pass stdout, stderr = Utils.execute_subprocess(pip_command+' install -r requirements/'+req_type+'.txt --user --no-warn-script-location') - #### + # ToDo + # create_directories is available in lib.smarthome.py but shpypi.py might be started prior to SH object creation + # thus it is needed to create the var/log directory here + os.makedirs(os.path.join(self._sh_dir, 'log'), exist_ok=True) + os.makedirs(os.path.join(self._sh_dir, 'var', 'log'), exist_ok=True) + pip_log_name = os.path.join(self._sh_dir, 'var', 'log', 'pip3_outout.log') with open(pip_log_name, 'w', encoding='utf8') as outfile: outfile.write(stdout) diff --git a/lib/shtime.py b/lib/shtime.py index 092aff9701..b9a15482f4 100644 --- a/lib/shtime.py +++ b/lib/shtime.py @@ -31,6 +31,7 @@ import pytz from dateutil.tz import tzlocal from dateutil import parser +import dateutil.relativedelta import json import logging import os @@ -69,6 +70,7 @@ def __init__(self, smarthome): _shtime_instance = self self._starttime = datetime.datetime.now() + self.log_msg = "" # is overwritten in _initialize_holidays() if no error occurs # set default timezone to UTC # global TZ @@ -462,7 +464,7 @@ def datetime_transform(self, key): else: raise TypeError(self.translate("Cannot convert type '{key}' to datetime").format(key=type(key))) if isinstance(key, datetime.datetime) and key.tzinfo is None: - key = self._timezone.localize(key) + key = self._timezone.localize(key) return key @@ -483,52 +485,57 @@ def date_transform(self, key): return key - def beginning_of_week(self, week=None, year=None): + def beginning_of_week(self, week=None, year=None, offset=0): """ Calculates the date of the beginning of a given week If no week and no year are specified, the beginning of the current week is calculated - :param week: week to use for calculation + :param week: calender week to use for calculation :param year: year to use for calculation + :param offset: negative number for previous weeks, positive for future ones :type week: int :type year: int + :type offset: int - :return: date the monday of given week + :return: date the monday of given calender week :rtype: datetime.date """ + month = self.current_month() if week is None and year is None: week = self.calendar_week(self.today()) year = self.current_year() - month = self.current_month() if month == 1 and week > 50: year -= 1 - week -= 1 else: - if year is None: - year = self.current_year() if week is None: self.logger.error("beginning_of_week: "+self.translate("Week not specified")) return self.today() - #monday = datetime.datetime.strptime(f'{year}-{week}-1', "%Y-%W-%w") # geht erst ab Python 3.6 - monday = datetime.datetime.strptime('{year}-{week}-1'.format(year=year, week=week), "%Y-%W-%w") - - return monday.date() + if year is None: + year = self.current_year() + if month == 1 and week > 50: + year -= 1 + self.logger.debug(self.translate("Calculating beginning of week based on year {year}, week {week} and offset {offset}").format(year=year, week=week, offset=offset)) + week_beginning = datetime.datetime.strptime('{year}-{week}-1'.format(year=year, week=week), "%G-%V-%u") + dateutil.relativedelta.relativedelta(weeks=offset) + return week_beginning.date() - def beginning_of_month(self, month=None, year=None): + def beginning_of_month(self, month=None, year=None, offset=0): """ Calculates the date of the beginning of a given month This method is used to make code more readable + If no month is specified, the current month is used If no year is specified, the current year is used :param month: month to use for calculation :param year: year to use for calculation + :param offset: negative number for previous months, positive for future ones :type month: int :type year: int + :type offset: int :return: date the first day of given month :rtype: datetime.date @@ -537,10 +544,12 @@ def beginning_of_month(self, month=None, year=None): month = self.current_month() if year is None: year = self.current_year() - return datetime.date(year, month, 1) + month_beginning = datetime.date(year, month, 1) + dateutil.relativedelta.relativedelta(months=offset) + return month_beginning - def beginning_of_year(self, year=None): + + def beginning_of_year(self, year=None, offset=0): """ Calculates the date of the beginning of a given year @@ -549,22 +558,28 @@ def beginning_of_year(self, year=None): If no year is specified, the current year is used :param year: year to use for calculation + :param offset: negative number for previous years, positive for future ones :type year: int + :type offset: int :return: date the first day of given year :rtype: datetime.date - """ - return self.beginning_of_month(1, year) + """ + year_beginning = self.beginning_of_month(1, year) + dateutil.relativedelta.relativedelta(years=offset) + return year_beginning - def today(self): + def today(self, offset=0): """ Return today's date + :param offset: negative number for previous days, positive for future ones + :type offset: int + :return: date of today :rtype: datetime.date """ - return datetime.datetime.now().date() + return (datetime.datetime.now() + datetime.timedelta(days=offset)).date() def tomorrow(self): @@ -587,57 +602,74 @@ def yesterday(self): return self.today() + datetime.timedelta(days=-1) - def current_year(self): + def current_year(self, offset=0): """ Return the current year + :param offset: negative number for previous years, positive for future ones + :type offset: int + :return: year :rtype: int """ - return self.today().year + return (self.today() + dateutil.relativedelta.relativedelta(years=offset)).year - def current_month(self): + def current_month(self, offset=0): """ Return the current month + :param offset: negative number for previous months, positive for future ones + :type offset: int + :return: month :rtype: int """ - return self.today().month + return (self.today() + dateutil.relativedelta.relativedelta(months=offset)).month - def current_day(self): + def current_day(self, offset=0): """ Return the current day + :param offset: negative number for previous days, positive for future ones + :type offset: int + :return: day :rtype: int """ - return self.today().day + return (self.today() + datetime.timedelta(days=offset)).day - def length_of_year(self, year=None): + def length_of_year(self, year=None, offset=0): """ Returns the length of a given year :param year: year to use for calculation + :param offset: negative number for previous months, positive for future ones :type year: int + :type offset: int :return: Length of year in days :rtype: int """ - return self.length_of_month(1, year) + if year is None: + year = self.current_year() + year += offset + leap_year = True if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) else False + return 365 if leap_year is False else 366 - def length_of_month(self, month=None, year=None): + def length_of_month(self, month=None, year=None, offset=0): """ Returns the length of a given month for a given year :param month: month to use for calculation :param year: year to use for calculation + :param offset: negative number for previous months, positive for future ones :type month: int :type year: int + :type offset: int :return: Length of month in days :rtype: int @@ -646,21 +678,28 @@ def length_of_month(self, month=None, year=None): month = self.current_month() if year is None: year = self.current_year() + offset_dt = datetime.datetime(year, month, 1) + dateutil.relativedelta.relativedelta(months=offset) + month = offset_dt.month + year = offset_dt.year next_month = month next_year = year if next_month == 12: next_year += 1 next_month = 0 + debug_month = "" if offset == 0 else " (offset {offset})".format(offset=offset) + self.logger.debug(self.translate("Calculating length of month based on year {year}, month {month}{debug_month}").format(year=year, month=month, debug_month=debug_month)) return (datetime.datetime(next_year, next_month+1, 1) - datetime.datetime(year, month, 1)).days - def day_of_year(self, date=None): + def day_of_year(self, date=None, offset=0): """ Calculate which day of the year the given date is :param date: date + :param offset: negative number for previous days, positive for future ones :type date: str|datetime.datetime|datetime.date|int|float + :type offset: int :return: day of year :rtype: int @@ -669,52 +708,60 @@ def day_of_year(self, date=None): date = self.date_transform(date) else: date = self.today() + date = date + datetime.timedelta(days=offset) return (date - datetime.date(date.year, 1, 1)).days + 1 - def weekday(self, date=None): + def weekday(self, date=None, offset=0): """ Returns the ISO weekday of a given date (or of today, if date is None) Return the day of the week as an integer, where Monday is 1 and Sunday is 7. (ISO weekday) :param date: date + :param offset: negative number for previous days, positive for future ones :type date: str|datetime.datetime|datetime.date|int|float + :type offset: int :return: weekday (1=Monday .... 7=Sunday) :rtype: int """ if date: - dt = self.date_transform(date) - return dt.isoweekday() + weekday = self.date_transform(date) + weekday = weekday + datetime.timedelta(days=offset) else: - return datetime.datetime.now().isoweekday() + weekday = self.today() + datetime.timedelta(days=offset) + return weekday.isoweekday() - def calendar_week(self, date=None): + def calendar_week(self, date=None, offset=0): """ Returns the calendar week (according to ISO) :param date: date + :param offset: negative number for previous weeks, positive for future ones :type date: str|datetime.datetime|datetime.date|int|float + :type offset: int :return: week (ISO) :rtype: int """ if date: - dt = self.date_transform(date) - return dt.isocalendar()[1] + cal_week = self.date_transform(date) + dateutil.relativedelta.relativedelta(weeks=offset) else: - return datetime.datetime.now().isocalendar()[1] + cal_week = self.today() + dateutil.relativedelta.relativedelta(weeks=offset) + return cal_week.isocalendar()[1] - def weekday_name(self, date=None): + def weekday_name(self, date=None, offset=0): """ Returns the name of the weekday for a given date :param date: date + :param offset: negative number for previous days, positive for future ones :type date: str|datetime.datetime|datetime.date|int|float + :type offset: int :return: weekday name :rtype: str @@ -723,6 +770,7 @@ def weekday_name(self, date=None): dt = self.date_transform(date) else: dt = self.today() + dt = dt + datetime.timedelta(days=offset) wday = self.weekday(dt) if wday == 1: @@ -730,7 +778,7 @@ def weekday_name(self, date=None): elif wday == 2: day = "Dienstag" elif wday == 3: - day = "Mittowch" + day = "Mittwoch" elif wday == 4: day = "Donnerstag" elif wday == 5: @@ -742,7 +790,7 @@ def weekday_name(self, date=None): else: day = "?" - return translate(day) + return self.translate(day) def _get_nth_dow_in_month(self, dow, dow_week, year, month): @@ -872,6 +920,8 @@ def _add_custom_holidays(self): return 0 custom = self.config.get('custom', []) + if custom is None: + custom = [] count = 0 if len(custom) > 0: for entry in custom: @@ -955,6 +1005,7 @@ def add_custom_holiday_range(self, from_date, to_date=None, holiday_name=''): self.holidays.append(cust_dict) return +# {"dow": 5, "dow_week": "last", "month": 7, "name": "Sysadmin day"} def _initialize_holidays(self): """ diff --git a/lib/smarthome.py b/lib/smarthome.py index b08d4f491a..504bf4e931 100644 --- a/lib/smarthome.py +++ b/lib/smarthome.py @@ -26,7 +26,6 @@ ######################################################################### # # TO DO: -# - Isolate Logging (MemLog, etc.) to lib module # - remove all remarks with old code (that has been moved to lib modules) # ######################################################################### @@ -96,8 +95,9 @@ from lib.shtime import Shtime import lib.shyaml from lib.shpypi import Shpypi - +from lib.triggertimes import TriggerTimes from lib.constants import (YAML_FILE, CONF_FILE, DEFAULT_FILE) +import lib.userfunctions as uf #import bin.shngversion #MODE = 'default' @@ -108,23 +108,6 @@ # Classes ##################################################################### -class _LogHandler(logging.StreamHandler): - """ - LogHandler used by MemLog - """ - def __init__(self, log, shtime): - logging.StreamHandler.__init__(self) - self._log = log - self._shtime = shtime - - def emit(self, record): - try: - self.format(record) - timestamp = datetime.datetime.fromtimestamp(record.created, self._shtime.tzinfo()) - self._log.add([timestamp, record.threadName, record.levelname, record.message]) - except Exception: - self.handleError(record) - class SmartHome(): """ SmartHome ist the main class of SmartHomeNG. All other objects can be addressed relative to @@ -159,8 +142,6 @@ def initialize_vars(self): self.plugin_start_complete = False self._smarthome_conf_basename = None - self._log_buffer = 50 - self.__logs = {} self.__event_listeners = {} self.__all_listeners = [] self.modules = [] @@ -212,7 +193,8 @@ def __init__(self, MODE, extern_conf_dir=''): """ self.shng_status = {'code': 0, 'text': 'Initalizing'} self._logger = logging.getLogger(__name__) - self._logger_main = logging.getLogger(__name__ + '.main') + self._logger_main = logging.getLogger(__name__) + self.logs = lib.log.Logs(self) # initialize object for memory logs self.initialize_vars() self.initialize_dir_vars() @@ -243,6 +225,7 @@ def __init__(self, MODE, extern_conf_dir=''): self._etc_dir = os.path.join(self._extern_conf_dir, 'etc') self._items_dir = os.path.join(self._extern_conf_dir, 'items'+os.path.sep) + self._functions_dir = os.path.join(self._extern_conf_dir, 'functions'+os.path.sep) self._logic_dir = os.path.join(self._extern_conf_dir, 'logics'+os.path.sep) self._scenes_dir = os.path.join(self._extern_conf_dir, 'scenes'+os.path.sep) self._smarthome_conf_basename = os.path.join(self._etc_dir,'smarthome') @@ -316,9 +299,11 @@ def __init__(self, MODE, extern_conf_dir=''): virtual_text = '' if lib.utils.running_virtual(): virtual_text = ' in virtual environment' - self._logger_main.warning("-------------------- Init SmartHomeNG {} --------------------".format(self.version)) - self._logger_main.warning(f"Running in Python interpreter 'v{self.PYTHON_VERSION}'{virtual_text}, from directory {self._base_dir}") - self._logger_main.warning(f" - on {platform.platform()} (pid={pid})") + self._logger_main.notice("-------------------- Init SmartHomeNG {} --------------------".format(self.version)) + self._logger_main.notice(f"Running in Python interpreter 'v{self.PYTHON_VERSION}'{virtual_text}, from directory {self._base_dir}") + self._logger_main.notice(f" - on {platform.platform()} (pid={pid})") + if logging.getLevelName('NOTICE') == 31: + self._logger_main.notice(f" - Loglevel NOTICE is set to value {logging.getLevelName('NOTICE')} because handler of root logger is set to level WARNING or higher - Set level of handler '{self.logs.root_handler_name}' to 'NOTICE'!") default_encoding = locale.getpreferredencoding() # returns cp1252 on windows if not (default_encoding in ['UTF8','UTF-8']): @@ -355,7 +340,7 @@ def __init__(self, MODE, extern_conf_dir=''): base_reqs = self.shpypi.test_base_requirements(self) if base_reqs == 0: self.restart('SmartHomeNG (Python package installation)') - exit(5) # exit code 5 -> for systemctl to restart ShamrtHomeNG + exit(5) # exit code 5 -> for systemctl to restart SmartHomeNG elif base_reqs == -1: self._logger.critical("Python package requirements for modules are not met and unable to install base requirements") self._logger.critical("Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml") @@ -365,7 +350,7 @@ def __init__(self, MODE, extern_conf_dir=''): plugin_reqs = self.shpypi.test_conf_plugins_requirements(self._plugin_conf_basename, self._plugins_dir) if plugin_reqs == 0: self.restart('SmartHomeNG (Python package installation)') - exit(5) # exit code 5 -> for systemctl to restart ShamrtHomeNG + exit(5) # exit code 5 -> for systemctl to restart SmartHomeNG elif plugin_reqs == -1: self._logger.critical("Python package requirements for configured plugins are not met and unable to install those requirements") self._logger.critical("Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml") @@ -377,7 +362,7 @@ def __init__(self, MODE, extern_conf_dir=''): self.shtime._initialize_holidays() - self._logger_main.warning(" - " + self.shtime.log_msg) + self._logger_main.notice(" - " + self.shtime.log_msg) # Add Signal Handling # signal.signal(signal.SIGHUP, self.reload_logics) @@ -394,20 +379,15 @@ def __init__(self, MODE, extern_conf_dir=''): # Catching Exceptions sys.excepthook = self._excepthook - ############################################################# - # Setting debug level and adding memory handler - self.initMemLog() - # test if a valid locale is set in the operating system if os.name != 'nt': - pass - try: - if not any(utf in os.environ['LANG'].lower() for utf in ['utf-8', 'utf8']): - self._logger.error("Locale for the enviroment is not set to a valid value. Set the LANG environment variable to a value supporting UTF-8") - except: - self._logger.error("Locale for the enviroment is not set. Defaulting to en_US.UTF-8") - os.environ["LANG"] = 'en_US.UTF-8' - os.environ["LC_ALL"] = 'en_US.UTF-8' + try: + if not any(utf in os.environ['LANG'].lower() for utf in ['utf-8', 'utf8']): + self._logger.error("Locale for the enviroment is not set to a valid value. Set the LANG environment variable to a value supporting UTF-8") + except: + self._logger.error("Locale for the enviroment is not set. Defaulting to en_US.UTF-8") + os.environ["LANG"] = 'en_US.UTF-8' + os.environ["LC_ALL"] = 'en_US.UTF-8' ############################################################# # Link Tools @@ -528,15 +508,10 @@ def init_logging(self, conf_basename='', MODE='default'): """ if conf_basename == '': conf_basename = self._log_conf_basename - #fo = open(conf_basename + YAML_FILE, 'r') - doc = lib.shyaml.yaml_load(conf_basename + YAML_FILE, True) - if doc == None: - print() - print("ERROR: Invalid logging configuration in file 'logging.yaml'") - exit(1) - self.logging_config = doc - logging.config.dictConfig(doc) - #fo.close() + conf_dict = lib.shyaml.yaml_load(conf_basename + YAML_FILE, True) + + self.logs.configure_logging(conf_dict) + if MODE == 'interactive': # remove default stream handler logging.getLogger().disabled = True elif MODE == 'verbose': @@ -545,22 +520,7 @@ def init_logging(self, conf_basename='', MODE='default'): logging.getLogger().setLevel(logging.DEBUG) elif MODE == 'quiet': logging.getLogger().setLevel(logging.WARNING) -# log_file.doRollover() - - - def initMemLog(self): - """ - This function initializes all needed datastructures to use the (old) memlog plugin - """ - - self.log = lib.log.Log(self, 'env.core.log', ['time', 'thread', 'level', 'message'], maxlen=self._log_buffer) - _logdate = "%Y-%m-%d %H:%M:%S" - _logformat = "%(asctime)s %(levelname)-8s %(threadName)-12s %(message)s" - formatter = logging.Formatter(_logformat, _logdate) - log_mem = _LogHandler(self.log, self.shtime) - log_mem.setLevel(logging.WARNING) - log_mem.setFormatter(formatter) - logging.getLogger('').addHandler(log_mem) + return ################################################################# @@ -578,6 +538,11 @@ def start(self): threading.currentThread().name = 'Main' + ############################################################# + # Prepare TriggerTimes for Scheduler + ############################################################# + self.triggertimes = TriggerTimes(self) + ############################################################# # Start Scheduler ############################################################# @@ -601,6 +566,11 @@ def start(self): self.modules = lib.module.Modules(self, configfile=self._module_conf_basename) self.modules.start() + ############################################################# + # Init and import user-functions + ############################################################# + uf.init_lib(self.getBaseDir()) + ############################################################# # Init Item-Wrapper ############################################################# @@ -638,7 +608,7 @@ def start(self): ############################################################# # Init Scenes ############################################################# - lib.scene.Scenes(self) + self.scenes = lib.scene.Scenes(self) ############################################################# # Start Connections @@ -665,7 +635,7 @@ def start(self): # Main Loop ############################################################# self.shng_status = {'code': 20, 'text': 'Running'} - self._logger_main.warning("-------------------- SmartHomeNG initialization finished --------------------") + self._logger_main.notice("-------------------- SmartHomeNG initialization finished --------------------") while self.alive: try: @@ -714,14 +684,14 @@ def stop(self, signum=None, frame=None): # if header_logged: # self._logger.warning("SmartHomeNG stopped") # else: - self._logger_main.warning("-------------------- SmartHomeNG stopped --------------------") + self._logger_main.notice("-------------------- SmartHomeNG stopped --------------------") self.shng_status = {'code': 33, 'text': 'Stopped'} lib.daemon.remove_pidfile(PIDFILE) logging.shutdown() - exit(5) # exit code 5 -> for systemctl to restart ShamrtHomeNG + exit(5) # exit code 5 -> for systemctl to restart SmartHomeNG def restart(self, source=''): @@ -734,7 +704,7 @@ def restart(self, source=''): self.shng_status = {'code': 30, 'text': 'Restarting'} if source != '': source = ', initiated by ' + source - self._logger_main.warning("-------------------- SmartHomeNG restarting" + source + " --------------------") + self._logger_main.notice("-------------------- SmartHomeNG restarting" + source + " --------------------") # python_bin could contain spaces (at least on windows) python_bin = sys.executable if ' ' in python_bin: @@ -743,7 +713,7 @@ def restart(self, source=''): self._logger.info("Restart command = '{}'".format(command)) try: p = subprocess.Popen(command, shell=True) - exit(5) # exit code 5 -> for systemctl to restart ShamrtHomeNG + exit(5) # exit code 5 -> for systemctl to restart SmartHomeNG except subprocess.SubprocessError as e: self._logger.error("Restart command '{}' failed with error {}".format(command,e)) @@ -774,33 +744,6 @@ def __iter__(self): return self.items.get_toplevel_items() - ################################################################# - # Log Methods - ################################################################# - """ - SmartHomeNG internally keeps a list of logs which can be extended - Currently these logs are created by several plugins - (plugins memlog, operationlog and visu_websocket) and initMemLog function of SmartHomeNG - """ - def add_log(self, name, log): - """ - Adds a log to the list of logs - - :param name: Name of log - :param log: Log object, essentially an object based of a double ended queue - """ - self.__logs[name] = log - - def return_logs(self): - """ - Function to the list of logs - - :return: List of logs - :rtype: list - """ - return self.__logs - - ################################################################# # Event Methods ################################################################# diff --git a/lib/tools.py b/lib/tools.py index 458c1923b5..fa637b6e9b 100644 --- a/lib/tools.py +++ b/lib/tools.py @@ -61,7 +61,7 @@ def ping(self, host): if ping_response.returncode == 0: # need to inspect the returned output since it could be that # **destination is unreachable** anyway which does not generate an error code - # as the result is a bytearray which codepage might vary between cp850, cp1252 and utf8, + # as the result is a bytearray which codepage might vary between cp850, cp1252 and utf8, # it is a quick hack to just look if ms is inside this string. # if not, it is sure that destination could not be reached if b'ms' in ping_response.stdout: @@ -77,10 +77,12 @@ def dewpoint(self, t, rf): return round((241.2 * log + 4222.03716 * t / (241.2 + t)) / (17.5043 - log - 17.5043 * t / (241.2 + t)), 2) def dt2js(self, dt): - return time.mktime(dt.timetuple()) * 1000 + int(dt.microsecond / 1000) + #return time.mktime(dt.timetuple()) * 1000 + int(dt.microsecond / 1000) + return dt.timestamp() * 1000 + int(dt.microsecond / 1000) def dt2ts(self, dt): - return time.mktime(dt.timetuple()) + #return time.mktime(dt.timetuple()) + return dt.timestamp() def fetch_url(self, url, username=None, password=None, timeout=2, warn_no_connect=1, method = 'GET', body=None, errorItem = None): connErrors = ['Host is down', 'timed out', '[Errno 113] No route to host'] @@ -125,16 +127,16 @@ def rel2abs(self, t, rf): mix = 18.0160 / 28.9660 * rf * sat / (100000 - rf * sat) rhov = 100000 / (287.0 * (1 - mix) + 462.0 * mix) / t return mix * rhov * 1000 - + def abs2rel(self,t,ah): """ Return the relative humidity from the absolute humidity (g/cm3) and temperature (Celsius) - + :param t: temperature in celsius :type t: float :param ah: absolute humidity (g/cm3) :type t: float - + :return: val = relative humidity (in percent) :rtype: dict """ diff --git a/lib/triggertimes.py b/lib/triggertimes.py new file mode 100644 index 0000000000..9faa04045c --- /dev/null +++ b/lib/triggertimes.py @@ -0,0 +1,967 @@ +#!/usr/bin/env python3 +# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab +######################################################################### +# Copyright 2016-2020 Martin Sinn m.sinn@gmx.de +# Copyright 2016 Christian Straßburg c.strassburg@gmx.de +# Copyright 2012-2013 Marcus Popp marcus@popp.mx +# Copyright 2019-2021 Bernd Meiners Bernd.Meiners@mail.de +######################################################################### +# This file is part of SmartHomeNG. +# +# SmartHomeNG is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SmartHomeNG is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SmartHomeNG. If not, see . +######################################################################### + +import logging +import re +import datetime +import calendar +import threading +import time + +import dateutil.relativedelta +from dateutil.relativedelta import MO, TU, WE, TH, FR, SA, SU +from dateutil.tz import tzutc + +#print("lib.triggertimes is being imported") +from lib.shtime import Shtime +shtime = None + +logger = logging.getLogger(__name__) + +""" +This library implements TriggerTimes in SmartHomeNG. + +The main class ``TriggerTimes`` implements the handling for +Linux like crontab and sky event bound times + +This class has a static method to get a handle to the instance of the TriggerTimes class, +that is created during initialization of SmartHomeNG. +This method implements a way to access the API for handling TriggerTimes without having +to juggle through the object hierarchy of the running SmartHomeNG. + +This API enables plugins and logics to access the details of the TriggerTimes initialized in SmartHomeNG. + +The methods of the class TriggerTimes implement the API for trigger times. +They can be used the following way: To call eg. **get_toplevel_items()**, use the following syntax: + +.. code-block:: python + + from lib.triggertimes import TriggerTimes + sh_triggertimes = TriggerTimes.get_instance() + +:Note: Do not use the functions or variables of the main smarthome object any more. They are deprecated. + Use the methods of the class **TriggerTimes** instead. + +:Note: This library is part of the core of SmartHomeNG. Regular plugins should not need to use this API. + It is mainly implemented for plugins near to the core like **scheduler** and the core itself! +""" + +_triggertimes_instance = None # Pointer to the initialized instance of the TriggerTimes class (for use by static methods) + +def get_invalid_time(): + return datetime.datetime.now(tzutc()) + dateutil.relativedelta.relativedelta(years=+10) + +class TriggerTimes(): + """ + TriggerTimes loader class. (TriggerTimes-methods from lib/scheduler.py are moved here.) + + - An instance is created during initialization by bin/smarthome.py + - There should be only one instance of this class. So: Don't create another instance + """ + # dict with all the items that are defined in the form: + # {"*/5 6-19/1 * * *": crontab object, "* * 6 * : crontab object, ..."} + + def __init__(self, smarthome): + """ + :param smarthome: Instance of the smarthome master-object + :type smarthome: object + """ + self._sh = smarthome + Skytime.set_smarthome_reference(smarthome) + self.logger = logging.getLogger(__name__) + + # a list with objects containing trigger times + self.__known_triggertimes = [] + + global _triggertimes_instance + if _triggertimes_instance is not None: + import inspect + curframe = inspect.currentframe() + calframe = inspect.getouterframes(curframe, 4) + self.logger.critical(f"A second 'TriggerTimes' object has been created. There should only be ONE instance of class 'TriggerTimes'!!! Called from: {calframe[1][1]} ({calframe[1][3]})") + + _triggertimes_instance = self + + def get_next(self, triggertime: str, starttime: datetime, location = None): + """ + Find the next point in time starting from start for a given location + Location is important if there is sunrise/set or moonrise/set included + If location ist not given then the location of SmartHomeNG is used + + + :param triggertime: a user defined time description when to trigger + :type triggertime: str + :param start: starttime and date for the beginning of the search + :type start: datetime + :param location: Location information (not implemented yet), defaults to None + :type location: tupel with (lat,lon,elev), optional + :return: the time and date of next event + :rtype: datetime + """ + triggertime = TriggerTimes.normalize(triggertime) + #self.logger.debug(f"get next triggertime for '{triggertime}' start search at '{starttime}'") + for tt in self.__known_triggertimes: + if tt.get_triggertime() == triggertime: + #self.logger.debug(f"Element found in list for {triggertime}") + break + else: + if any(substring in triggertime for substring in Skytime.get_skyevents() ): + self.logger.debug(f"create new Skytime('{triggertime}') object") + tt = Skytime(triggertime) + else: + self.logger.debug(f"create new Crontab('{triggertime}') object") + tt = Crontab(triggertime) + self.__known_triggertimes.append(tt) + self.logger.debug(tt) + return tt.get_next(starttime) + + @staticmethod + def normalize(triggertime): + """ + this removes unnecessary spaces from a triggertime definition + + :param triggertime: definition of the triggertime + :type triggertime: str + :return: cleaned up triggertime + :rtype: str + """# + if not isinstance( triggertime, str): + triggertime = str(triggertime) + triggertime = triggertime.strip() # remove spaces in front and at end + triggertime = re.sub(' +', ' ',triggertime) # replace multiple spaces by a single one + return triggertime + + # -------------------------------------------------------------------------------------------------------- + # Following (static) method of the class TriggerTimes implement the API for trigger times in SmartHomeNG + # -------------------------------------------------------------------------------------------------------- + + @staticmethod + def get_instance(): + """ + Returns the instance of the TriggerTimes class, to be used to access the trigger times API + + Use it the following way to access the API: + + .. code-block:: python + + from lib.triggertimes import TriggerTimes + sh_triggertimes = TriggerTimes.get_instance() + + # to access a method (eg. get_next()): + sh_triggertimes.get_next(triggertime) + + + :return: Triggertimes instance + :rtype: object + """ + return _triggertimes_instance + + +""" +Events for SmartHomeNG can be scheduled by a parameter to attribute ``crontab`` which essentially describe a triggertime. +This attribute parameter may be one of: + + * init optional with timeshift, the init keyword is handled by the scheduler itself and will never show up here + * crontab: init+1 --> 1 second after initialisation + * crontab: init+5m --> 5 minutes after initialisation + + * sun- or moonbound time instruction + * crontab: 17:00 means sunset but a time at least equal or later than 17:00 and earlier or latest at 20:00 + * crontab: 6:00 means sunrise but a time at least equal or later than 6:00 and earlier or latest at 10:00 + + * parameter which is similar but not equal to linux *crontab* + * crontab: */5 6-19/1 * * * ==> every 5 minutes between 6 and 19 at any day of any month or any weekday +""" + +class TriggerTime(): + """ + This provides a base class for all trigger times like crontabs, or sun/moonbound trigger times + It is mainly to share the same basics and static methods + """ + named_days = { + 'mon':'0', 'tue':'1','wed':'2','thu':'3','fri':'4','sat':'5','sun':'6', + 'mo':'0', 'di':'1','mi':'2','do':'3','fr':'4','sa':'5','so':'6' + } + + named_months = { + 'jan':'1', 'feb':'2','mar':'3','apr':'4','may':'5','jun':'6','jul':'7', + 'aug': '8', 'sep': '9', 'oct': '10', 'nov': '11', 'dec': '12' + } + + def __init__(self, triggertime): + self._lock = threading.Lock() + # save the original given triggertime + self._triggertime = triggertime + #if TriggerTime.shtime is None: + # TriggerTime.shtime = Shtime.get_instance() + + def get_triggertime( self): + return self._triggertime + + @staticmethod + def integer_range(entry, low, high): + """ + Inspects a string containing + * intervals ('*/2' --> ['2','4','6', ... high] + * ranges ('9-11' --> ['9','10','11']), + * single values ('1,2,5,9' --> ['1','2','5','9']) + * or a combination of those and + returns a sorted and distinct list of found integers + + :param entry: a string with single entries of intervals, numeric ranges or single values + :param low: lower limit as integer + :param high: higher limit as integer + :return: a list of found integers formatted as string + """ + result = [] + item_range = [] + + # Check for multiple items and process each item recursively + if ',' in entry: + for item in entry.split(','): + result.extend(Crontab.integer_range(item, low, high)) + + # Check for intervals, e.g. "*/2", "9-17/2" + elif '/' in entry: + spec_range, interval = entry.split('/') + logger.debug(f'Cron spec interval {entry} -> {spec_range},{interval}') + result = Crontab.integer_range(spec_range, low, high)[::int(interval)] + + # Check for numeric ranges, e.g. "9-17" + elif '-' in entry: + spec_low, spec_high = entry.split('-') + result = Crontab.integer_range('*', int(spec_low), int(spec_high)) + + # Process single item + else: + if entry == '*': + item_range = list(range(low, high + 1)) + else: + item = int(entry) + if item > high: # entry above range + item = high # truncate value to highest possible + item_range.append(item) + for entry in item_range: + result.append(entry) + result = sorted(list(set(result))) + # logger.debug('Crontab.integer_range {}[{},{}] results in {}'.format(entry, low, high, result)) + return result + + @staticmethod + def get_next_in_sorted_list( entry, items, minentry, maxentry): + newlist = sorted([i for i in items if i >= minentry and i <= maxentry]) + if entry in newlist: return entry, True + result = [i for i in newlist if i > entry] + if len(result) == 0: return None, False + return min(result), False + + +class Crontab(TriggerTime): + """One space or more spaces separate the time pieces from each other. + Currently sets of 4,5 or 6 parts are allowed. + + Distinction with count of parameters + If 4 parts specified (normal case in SmartHomeNG up to version 1.8): + + * * * * + │ │ │ │ + │ │ │ └───────────── weekday (0 - 6) + │ │ └───────────── day of month (1 - 31) + │ └───────────── hour (0 - 23) + └───────────── minute (0 - 59) + + If 5 parts specified: + + * * * * * + │ │ │ │ │ + │ │ │ │ └───────────── weekday (0 - 6) + │ │ │ └───────────── month (1 - 12) new 5th part + │ │ └───────────── day of month (1 - 31) + │ └───────────── hour (0 - 23) + └───────────── minute (0 - 59) + + If 6 parts specified: + + * * * * * * + │ │ │ │ │ │ + │ │ │ │ │ └───────────── weekday (0 - 6) + │ │ │ │ └───────────── month (1 - 12) + │ │ │ └───────────── day of month (1 - 31) optional + │ │ └───────────── hour (0 - 23) + │ └───────────── minute (0 - 59) + └───────────── seconds (0 - 60) optional, only valid if month is present (which can be a range of 1-12 of course) + + So the parameter count is the distinction which flavour is to be used for examination + + There are predefined names to abbreviate certain recurrent time sets like **@midnight** which equals ``0 0 * * *`` + + * named presets like: + @yearly equals 0 0 1 1 * + @annually equals 0 0 1 1 * + @monthly equals 0 0 1 * * + @weekly equals 0 0 * * 0 + @daily equals 0 0 * * * + @midnight equals 0 0 * * * + @hourly equals 0 * * * * + + """ + crontab_presets = { + "@yearly": "0 0 1 1 *", + "@annually": "0 0 1 1 *", + "@monthly": "0 0 1 * *", + "@weekly": "0 0 * * 0", + "@daily": "0 0 * * *", + "@midnight": "0 0 * * *", + "@hourly": "0 * * * *" + } + + def __init__(self, triggertime): + super().__init__(triggertime) + + self.next_event = None # store last result + self.max_calc_time = 0 # keep track of maximum calculation time + + self.parse_triggertime() + + def parse_triggertime(self): + """parse the crontab string for details and store them to the class variables for later use""" + logger.debug(f'Enter Crontab.parse_triggertime({self._triggertime})') + self._is_valid = False + with self._lock: + triggertime = self._triggertime + # replace @yearly etc. with correct preset + if triggertime in Crontab.crontab_presets: + triggertime = Crontab.crontab_presets[triggertime] + + # find our how many parameters are given with this crontab and save them to the class variables + try: + parameter_set = triggertime.strip().split() + except: + logger.error(f"crontab entry '{triggertime}' can not be split up into 4 parts for minute, hour, day and weekday") + return False + + self.parameter_count = len(parameter_set) + if self.parameter_count == 4: + logger.debug(f'old smarthome.py style parameter set {triggertime} given') + self.minute, self.hour, self.day, self.wday = parameter_set[0],parameter_set[1],parameter_set[2],parameter_set[3] + self.month='*' + self.second = '0' + elif self.parameter_count == 5: + logger.debug(f'new SmartHomeNG style parameter set {triggertime} given') + self.minute, self.hour, self.day, self.month, self.wday = parameter_set[0],parameter_set[1],parameter_set[2],parameter_set[3], parameter_set[4] + self.second = '0' + elif self.parameter_count == 6: + logger.debug(f'new SmartHomeNG style parameter set {triggertime} given') + self.second, self.minute, self.hour, self.day, self.month, self.wday = parameter_set[0],parameter_set[1],parameter_set[2],parameter_set[3], parameter_set[4], parameter_set[5] + + if self.parameter_count > 4: + # replace abbreviated months like 'jan' with their number like '1' + self.month = self.month.lower() + for search in sorted(Crontab.named_months, key=len, reverse=True): # Through keys sorted by length + self.month = self.month.replace(search, Crontab.named_months[search]) + + # replace abbreviated days like 'sun' for sunday with their number like '6' + self.wday = self.wday.lower() + for search in sorted(Crontab.named_days, key=len, reverse=True): # Through keys sorted by length + self.wday = self.wday.replace(search, Crontab.named_days[search]) + + # evaluate the crontab parameter string to some lists of allowed points as integers + self.second_range = Crontab.integer_range(self.second, 0, 59) + self.minute_range = Crontab.integer_range(self.minute, 0, 59) + self.hour_range = Crontab.integer_range(self.hour, 0, 23) + self.day_range = Crontab.integer_range(self.day, 1, 31) # not zero based, limited to 1..31 days, needs to be clipped for actual month + self.month_range = Crontab.integer_range(self.month, 1, 12) + self.weekday_range = Crontab.integer_range(self.wday, 0, 6) + self._is_valid = True + + logger.debug(f'Leave Crontab.parse_triggertime()') + + def __str__(self): + r = f"""{self._triggertime} is {'' if self._is_valid else 'not'} valid, parameter count {self.parameter_count}: + Hours: {self.hour} -> {self.hour_range} + Minutes: {self.minute} -> {self.minute_range} + Seconds: {self.second} -> {self.second_range} + Days: {self.day} -> {self.day_range} + Weekday: {self.wday} -> {self.weekday_range} + Months: {self.month} -> {self.month_range} + """ + return(r) + + + def get_next(self, starttime: datetime): + """ + Calculates the next crontab triggertime + + :param starttime: the datetime to start the search from + :type starttime: datetime + :return: found date and time of next occurence or a time way up in the future + :rtype: datetime + """ + with self._lock: + tik = time.perf_counter() + if self.next_event is None: + self.next_event = datetime.datetime.min + self.next_event = self.next_event.replace(tzinfo=starttime.tzinfo) + if starttime < self.next_event: + logger.debug(f'looking for the next event after {starttime} was already calculated as {self.next_event}') + return self.next_event + days_max_count = 365*25 + days = 0 + searchtime = starttime + #logger.debug(f'looking for the next event after {starttime}') + searchtime = searchtime.replace(microsecond=0) + datetime.timedelta(seconds=1) # smallest amount higher than given time + while True: + #logger.warning(f"{searchtime}") + days = abs((starttime-searchtime).days) + if days > days_max_count: + logger.error(f'No matches after {days} examined days, giving up') + return get_invalid_time() + # preset current searcher + year = searchtime.year + month, em = Crontab.get_next_in_sorted_list(searchtime.month, self.month_range, 1, 12) + if month is not None: + if not em: + # if not an exact match for month then set starttime to earliest of next month + searchtime = searchtime.replace(month=month, day=1, hour=0, minute=0, second=0) + day, em = Crontab.get_next_in_sorted_list(searchtime.day, self.day_range, 1, calendar.monthrange(year, month)[1]) + if day is not None: + if not em: + searchtime = searchtime.replace(day=day,hour=0, minute=0, second=0) + weekday = searchtime.weekday() + if weekday in self.weekday_range: + hour, em = Crontab.get_next_in_sorted_list(searchtime.hour, self.hour_range, 0, 23) + if hour is not None: + if not em: + searchtime = searchtime.replace(hour=hour, minute=0, second=0) + minute, em = Crontab.get_next_in_sorted_list(searchtime.minute, self.minute_range, 0, 59) + if minute is not None: + if not em: + searchtime = searchtime.replace(minute=minute, second=0) + second, em = Crontab.get_next_in_sorted_list(searchtime.second, self.second_range, 0, 59) + if second is not None: + if not em: + searchtime = searchtime.replace(second=second) + # we found the next event, so leave the while loop here + break + else: + searchtime = searchtime.replace(second=0) + datetime.timedelta(minutes=1) + continue + else: + searchtime = searchtime.replace(minute=0,second=0) + datetime.timedelta(minutes=60) + continue + else: # hour not found, goto next day at early morning + searchtime = searchtime.replace(hour=0, minute=0, second=0) + datetime.timedelta(days=1) + continue + else: # weekday not found, proceed at next day early morning + searchtime = searchtime.replace(hour=0, minute=0, second=0) + datetime.timedelta(days=1) + continue + else: # day not found, start at beginning of next month + advance_days = calendar.monthrange(year, searchtime.month)[1] + searchtime = searchtime.replace(day=1, hour=0, minute=0, second=0) + datetime.timedelta(days=advance_days) + continue + else: + # goto next month, set hour, minute and second to 0, set day to 1 + searchtime = searchtime.replace(year=searchtime.year+1, month=1, day=1, hour=0, minute=0, second=0) + continue + + self.next_event = searchtime + tok = time.perf_counter()-tik + self.max_calc_time = max(self.max_calc_time, tok) + logger.debug(f'next event is at {searchtime}, calc took {tok:0.4f} sec, max: {self.max_calc_time:0.4f} sec') + + # find out how the new function compares to old implementation + if self.parameter_count == 4: + tik = time.perf_counter() + foo = self.get_next_old( starttime) + tok = time.perf_counter()-tik + logger.debug(f'OLD: next event is at {foo}, calc took {tok:0.4f} sec') + if searchtime != foo: + logger.error(f'NEW gives {searchtime} but OLD gives {foo}') + + return searchtime + + + def get_next_old(self, starttime: datetime): + """ + a crontab entry is expected the correct form as documented above + Part of the old implementation + + :param crontab: a string containing an enhanced crontab entry + :return: a timezone aware datetime with the next event time or an error datetime object that lies 10 years in the future + """ + try: + next_event = self._parse_month(starttime) # this month + if not next_event: + next_event = self._parse_month(starttime, next_month=True) # next month + #logger.debug(f'next event after {starttime} is {next_event}') + return next_event + except Exception as e: + logger.error(f'Error parsing crontab "{self._triggertime}": {e}') + return datetime.datetime.now(tzutc()) + dateutil.relativedelta.relativedelta(years=+10) + + def _parse_month(self, starttime, next_month=False): + """ + Inspects a given string with classic crontab information to calculate the next point in time that matches + Part of the old implementation + + :param crontab: a string with crontab entries. It is expected to have the form of ``minute hour day weekday`` + :param next_month: inspect the current month or the next following month + :return: false or datetime + """ + # evaluate the crontab strings + minute_range = self._range(self.minute, 00, 59) + hour_range = self._range(self.hour, 00, 23) + if not next_month: + mdays = calendar.monthrange(starttime.year, starttime.month)[1] + elif starttime.month == 12: + mdays = calendar.monthrange(starttime.year + 1, 1)[1] + else: + mdays = calendar.monthrange(starttime.year, starttime.month + 1)[1] + + if self.wday == '*' and self.day == '*': + day_range = self._day_range('0, 1, 2, 3, 4, 5, 6') + elif self.wday != '*' and self.day == '*': + day_range = self._range(self.wday,0,6) + day_range = self._day_range(','.join(day_range)) + elif self.wday != '*' and self.day != '*': + day_range = self._range(self.wday,0,6) + day_range = self._day_range(','.join(day_range)) + day_range = day_range + self._range(self.day, 0o1, mdays) + else: + day_range = self._range(self.day, 0o1, mdays) + + # combine the different ranges + event_range = sorted([str(day) + '-' + str(hour) + '-' + str(minute) for minute in minute_range for hour in hour_range for day in day_range]) + if next_month: # next month + next_event = event_range[0] + next_time = starttime + dateutil.relativedelta.relativedelta(months=+1) + else: # this month + now_str = starttime.strftime("%d-%H-%M") + next_event = self._next(lambda event: event > now_str, event_range) + if not next_event: + return False + next_time = starttime + day, hour, minute = next_event.split('-') + return next_time.replace(day=int(day), hour=int(hour), minute=int(minute), second=0, microsecond=0) + + def _next(self, f, seq): + """Part of the old implementation""" + for item in seq: + if f(item): + return item + return False + + + def _range(self, entry, low, high): + """ + inspects a single crontab entry for minutes our hours + Part of the old implementation + + :param entry: a string with single entries of intervals, numeric ranges or single values + :param low: lower limit as integer + :param high: higher limit as integer + :return: + """ + result = [] + item_range = [] + + # Check for multiple comma separated values and process each of them recursively + if ',' in entry: + for item in entry.split(','): + result.extend(self._range(item, low, high)) + + # Check for intervals, e.g. "*/2", "9-17/2" + elif '/' in entry: + spec_range, interval = entry.split('/') + #logger.debug('Cron spec interval {} {}'.format(entry, interval)) + result = self._range(spec_range, low, high)[::int(interval)] + + # Check for numeric ranges, e.g. "9-17" + elif '-' in entry: + spec_low, spec_high = entry.split('-') + result = self._range('*', int(spec_low), int(spec_high)) + + # Process single value + else: + if entry == '*': + item_range = list(range(low, high + 1)) + else: + item = int(entry) + if item > high: # entry above range + item = high # truncate value to highest possible + item_range.append(item) + for entry in item_range: + result.append('{:02d}'.format(entry)) + + return result + + def _day_range(self, days): + """ + inspect a given string with days given as integer numbers separated by "," + Part of the old implementation + :param days: + :return: an array with strings containing the days of month + """ + now = datetime.date.today() + wdays = [MO, TU, WE, TH, FR, SA, SU] + result = [] + for day in days.split(','): + wday = wdays[int(day)] + # add next weekday occurrence + day = now + dateutil.relativedelta.relativedelta(weekday=wday) + result.append(day.strftime("%d")) + # safety add-on if weekday equals todays weekday + day = now + dateutil.relativedelta.relativedelta(weekday=wday(+2)) + result.append(day.strftime("%d")) + return result + + +class Skytime(TriggerTime): + """ + Implement sunrise/sunset/moonrise/moonset oriented triggertimes + """ + sh = None + skyevents = ["sunrise","sunset","moonrise","moonset"] + + def __init__(self, triggertime, location = None): + super().__init__(triggertime) + + self.h_min = None # Either None or an int in range 0..23 + self.m_min = None # Either None or an int in range 0..59 + self.h_max = None # Either None or an int in range 0..23 + self.m_max = None # Either None or an int in range 0..59 + self.event = None # must be one of sunrise, sunset, moonrise, moonset + self.doff = None # Either None or a float in range -90.0 ... 90.0 (although the extreme values are nonsense) + self.moff = None # Either None or an int + + # extended syntax that allows day, month and weekday as well + self.day = '*' + self.wday = '*' + self.month = '*' + self.day_range = Skytime.integer_range(self.day, 1, 31) # not zero based, limited to 1..31 days, needs to be clipped for actual month + self.month_range = Skytime.integer_range(self.month, 1, 12) + self.weekday_range = Skytime.integer_range(self.wday, 0, 6) + + self.next_event = None + self.max_calc_time = 0 + + self._is_valid = False + + self.parse_triggertime() + + @staticmethod + def set_smarthome_reference(sh): + Skytime.sh = sh + + @staticmethod + def get_skyevents(): + return Skytime.skyevents + + @staticmethod + def split_skyevents(triggertime: str): + """ + Splits the triggertime into parts at '<' + + :param triggertime: contains a trigger time like ``[H:M<](sunrise|sunset)[+|-][offset][ {value}={minvalue}") + if value > maxvalue: + value = maxvalue + logger.warning(f"{value}>{maxvalue} --> {value}={maxvalue}") + return value + + @staticmethod + def split_times(timepoint: str): + if timepoint is None: + return None + timepoint = timepoint.strip() + if timepoint == "": + return None + + h, sep, m = timepoint.partition(':') + try: + h = int(h) + h = Skytime.keep_in_range(h,0,23) + m = int(m) + m= Skytime.keep_in_range(m,0,59) + except ValueError: + pass + return(h, m) + + def __str__(self): + r = f"""{self._triggertime} is {'' if self._is_valid else 'not '}valid and evaluates to: + min: {self.h_min}:{self.m_min} + event: {self.event} + degree offset: {self.doff} + time offset: {self.moff} min + max: {self.h_max}:{self.m_max} + Days: {self.day} -> {self.day_range} + Weekday: {self.wday} -> {self.weekday_range} + Months: {self.month} -> {self.month_range} + """ + return(r) + + def parse_triggertime(self): + """parses internal set triggertime into parts""" + logger.debug(f'Enter Skytime.parse_triggertime({self._triggertime})') + try: + with self._lock: + triggertime = self._triggertime + # find out how many parameters are given with this triggertime and save them to the class variables + try: + parameter_set = triggertime.strip().split() + except: + logger.error(f"skytime entry '{triggertime}' can not be split up into 1 or 4 parts") + return False + + self.parameter_count = len(parameter_set) + if self.parameter_count == 1: + logger.debug(f'old smarthome.py style parameter set {triggertime} given') + self.timeset = parameter_set[0] # this contains something like 'mm:hh days_max_count: + logger.error(f'No matches after {days} examined days, giving up') + return get_invalid_time() + # preset current searcher + year = searchtime.year + month, em = Crontab.get_next_in_sorted_list(searchtime.month, self.month_range, 1, 12) + if month is not None: + if not em: + # if not an exact match for month then set starttime to earliest of next month + searchtime = searchtime.replace(month=month, day=1, hour=0, minute=0, second=0, microsecond=0) + day, em = Crontab.get_next_in_sorted_list(searchtime.day, self.day_range, 1, calendar.monthrange(year, month)[1]) + if day is not None: + if not em: + searchtime = searchtime.replace(day=day,hour=0, minute=0, second=0) + weekday = searchtime.weekday() + if weekday in self.weekday_range: + # the day, month and weekday is correct with searchtime + # now get the skyevent time and see if it fits for this day. + if self.event in mappings: + eventtime = mappings[self.event](self.doff, self.moff, dt=searchtime) + # time in next_time will be in utctime. So we need to adjust it + if eventtime.tzinfo == tzutc(): + eventtime = eventtime.astimezone(Skytime.sh.shtime.tzinfo()) + logger.debug(f"starting with {starttime} the next {self.event}({self.doff},{self.moff}) is {eventtime}") + else: + logger.warning("searchtime.tzinfo was not given as utc!") + else: + logger.error(f'No function found to get next skyevent time for {self._triggertime}') + return get_invalid_time() + + # eventtime will contain the next time e.g. a sunset will take place + # thus + # - searchtime must be smaller than eventtime and + # - eventtime might be one or more day(s) later + + # if the dates differ then it must be certain that the new date adheres to the + # constraints of the day range. + if eventtime.date() > searchtime.date(): + logger.debug(f"eventtime ({eventtime.date()}) is at least a day later than current searchtime ({searchtime}), skip to eventtime's early morning") + searchtime = eventtime.replace(hour=0, minute=0, second=0, microsecond=0, tzinfo=Skytime.sh.shtime.tzinfo()) + continue # need to start over for a matching date + + # eventtime and searchtime have the same date + # now check time limits if given + if self.h_min is not None and self.m_min is not None: + try: + dmin = eventtime.replace(hour=self.h_min, minute=self.m_min, second=0, microsecond=0, tzinfo=Skytime.sh.shtime.tzinfo()) + except Exception: + logger.error('Wrong syntax: {self._triggertime}. Should be [H:M<](skyevent)[+|-][offset][ eventtime: + eventtime = dmin + + if self.h_max is not None and self.m_max is not None: + try: + dmax = eventtime.replace(hour=self.h_max, minute=self.m_max, second=0, microsecond=0, tzinfo=Skytime.sh.shtime.tzinfo()) + logger.debug(f"searchtime={searchtime}, eventtime={eventtime}, dmax={dmax}") + except Exception: + logger.error('Wrong syntax: {self._triggertime}. Should be [H:M<](skyevent)[+|-][offset][. +######################################################################### + +""" +This library imports modules with user-functions to be used in eval statements and in logics +""" + +import os +import logging + +from lib.translation import translate + +_logger = logging.getLogger(__name__) + + +_uf_subdir = 'functions' + +_func_dir = None +_user_modules = [] + + +def import_user_module(m): + """ + Import a module with userfunctions + + :param m: name of module to import from /functions + + :return: True, if import was successful + """ + modulename = _uf_subdir + '.' + m + + import importlib + try: + exec(f"globals()['{m}']=importlib.import_module('{modulename}')") + except Exception as e: + _logger.error(translate("Error importing userfunctions from '{module}': {error}", {'module': m, 'error': e})) + return False + else: + global _uf_version + _uf_version = '?.?.?' + try: + exec( f"globals()['_uf_version'] = {m}._VERSION" ) + except: + exec( f"{m}._VERSION = _uf_version" ) + + global _uf_description + _uf_description = '?' + try: + exec( f"globals()['_uf_description'] = {m}._DESCRIPTION" ) + except: + exec( f"{m}._DESCRIPTION = _uf_description" ) + + _logger.notice(translate("Imported userfunctions from '{mmodule}' v{version} - {description}", {'module': m, 'version':_uf_version, 'description': _uf_description})) + + return True + + +def init_lib(shng_base_dir=None): + """ + Initialize userfunctions module + + :param shng_base_dir: Base dir of SmartHomeNG installation + """ + + global _func_dir + global _user_modules + + if shng_base_dir is not None: + base_dir = shng_base_dir + else: + base_dir = os.getcwd() + + _func_dir = os.path.join(base_dir, _uf_subdir) + + user_modules = [] + if os.path.isdir(_func_dir): + wrk = os.listdir(_func_dir) + for f in wrk: + if f.endswith('.py'): + user_modules.append(f.split(".")[0]) + + _user_modules = sorted(user_modules) + + # Import all modules with userfunctions from /functions + for m in _user_modules: + import_user_module(m) + return + + +def get_uf_dir(): + + return _func_dir + + +def reload(userlib): + + import importlib + + if userlib in _user_modules: + try: + exec( f"importlib.reload({userlib})") + except Exception as e: + if str(e) == f"name '{userlib}' is not defined": + _logger.warning(translate("Error reloading userfunctions Modul '{module}': Module is not loaded, trying to newly import userfunctions '{module}' instead", {'module': userlib})) + if import_user_module(userlib): + return True + else: + return False + else: + _logger.error(translate("Error reloading userfunctions '{module}': {error} - old version of '{module}' is still active", {'module': userlib, 'error': e})) + return False + + else: + _logger.notice(translate("Reloaded userfunctions '{module}'", {'module': userlib})) + return True + else: + if import_user_module(userlib): + #_logger.notice(translate("Reload: Loaded new userfunctions '{module}'", {'module': userlib})) + return True + else: + _logger.error(translate("Reload: Userfunctions '{module}' do not exist", {'module': userlib})) + return False + + +def reload_all(): + + if _user_modules == []: + _logger.warning(translate('No userfunctions are loaded, nothing to reload')) + return False + else: + result = True + for lib in _user_modules: + if not reload(lib): + result = False + return result + + +def list_userlib_files(): + + for lib in _user_modules: + _logger.warning(f'uf.{lib}') + diff --git a/lib/utils.py b/lib/utils.py index 6eb2d5b376..197115abb9 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -34,6 +34,7 @@ import hashlib import ipaddress import socket +import subprocess logger = logging.getLogger(__name__) @@ -55,23 +56,28 @@ def is_mac(mac): """ mac = str(mac) + # notation without separators if len(mac) == 12: for c in mac: - try: - if int(c, 16) > 15: - return False - except: + # each digit is hex + if c not in '0123456789abcdefABCDEF': return False return True - octets = re.split('[\:\-\ ]', mac) + # notation with separators -> 12 digits + 5 separators + if len(mac) != 17: + return False + octets = re.split('[: -]', mac) + # 6 groups... if len(octets) != 6: return False - for i in octets: - try: - if int(i, 16) > 255: - return False - except: + for o in octets: + # ... of 2 digits each + if len(o) != 2: + return False + # and each digit is hex + for c in ''.join(octets): + if c not in '0123456789abcdefABCDEF': return False return True @@ -89,6 +95,7 @@ def is_ip(string): """ return Utils.is_ipv4(string) + # later: return (Utils.is_ipv4(string) or Utils.is_ipv6(string)) @staticmethod def is_ipv4(string): @@ -141,15 +148,18 @@ def is_hostname(string): """ try: - return bool(re.match("^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$", string)) + return bool(re.match("^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9])\\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$", string)) except TypeError: return False @staticmethod def get_local_ipv4_address(): """ - Get's local ipv4 address - TODO: What if more than one interface present ? + Get local ipv4 address of the interface with the default gateway. + Return '127.0.0.1' if no suitable interface is found + NOTE: if more than one IP addresses are available and no external + gateway is configured, thie method returns one of the configured + addresses, but not deterministically. :return: IPv4 address as a string :rtype: string @@ -168,15 +178,15 @@ def get_local_ipv4_address(): @staticmethod def get_local_ipv6_address(): """ - Get's local ipv6 address - TODO: What if more than one interface present ? + Get local ipv6 address of the interface with the default gateway. + Return '::1' if no suitable interface is found :return: IPv6 address as a string :rtype: string """ try: s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) - s.connect(('2001:4860:4860::8888', 1)) + s.connect(('fda2:ffff:ffff:ffff:ffff:ffff:ffff:ffff', 1)) IP = s.getsockname()[0] except: IP = '::1' @@ -536,10 +546,7 @@ def execute_subprocess(commandline, wait=True): """ Executes a subprocess via a shell and returns the output written to stdout by this process as a string """ - ## get subprocess module - import subprocess - - ## call date command ## + # call date command p = subprocess.Popen(commandline, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) # Talk with date command i.e. read data from stdout and stderr. Store this info in tuple ## @@ -551,17 +558,13 @@ def execute_subprocess(commandline, wait=True): # print("result="+str(result)) # print("err="+str(err)) if wait: - ## Wait for date to terminate. Get return returncode ## - p_status = p.wait() + # Wait for date to terminate. Get return returncode + p.wait() return (str(result, encoding='utf-8', errors='strict'), str(err, encoding='utf-8', errors='strict')) - - - def get_python_version(): - - PYTHON_VERSION = str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2])+' '+str(sys.version_info[3]) + PYTHON_VERSION = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) + '.' + str(sys.version_info[2]) + ' ' + str(sys.version_info[3]) if sys.version_info[3] != 'final': PYTHON_VERSION += ' '+str(sys.version_info[4]) return PYTHON_VERSION @@ -571,15 +574,11 @@ def execute_subprocess(commandline, wait=True): """ Executes a subprocess via a shell and returns the output written to stdout by this process as a string """ - ## get subprocess module - import subprocess - ## call date command ## p = subprocess.Popen(commandline, stdout=subprocess.PIPE, shell=True) - # Talk with date command i.e. read data from stdout and stderr. Store this info in tuple ## # Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. # Wait for process to terminate. The optional input argument should be a string to be sent to the child process, or None, if no data should be sent to the child. (result, err) = p.communicate() -# logger.warning("execute_subprocess: commandline='{}', result='{}', err='{}'".format(command, result, err)) + # logger.warning("execute_subprocess: commandline='{}', result='{}', err='{}'".format(command, result, err)) print("err='{}'".format(err)) if wait: ## Wait for date to terminate. Get return returncode ## @@ -592,4 +591,3 @@ def running_virtual(): # Check supports venv && virtualenv return (getattr(sys, 'base_prefix', sys.prefix) != sys.prefix or hasattr(sys, 'real_prefix')) - diff --git a/logics/check_items.py b/logics/check_items.py new file mode 100644 index 0000000000..d009545f1f --- /dev/null +++ b/logics/check_items.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +# check_items.py +""" +given following items within a yaml: + + +MyItem: + MyChildItem: + type: num + initial_value: 12 + MyGrandchildItem: + type: str + initial_value: "foo" + +Within a logic it is possible to set the value of MyChildItem to 42 with +``sh.MyItem.MyChildItem(42)`` and retrieve the Items value with +``value = sh.MyItem.MyChildItem()`` + +Often beginners forget the parentheses and instead write +``sh.MyItem.MyChildItem = 42`` when they really intend to assign the value ``42`` +to the item or write ``value = sh.MyItem.MyChildItem`` when they really want to +retrieve the item's value. + +But using ``sh.MyItem.MyChildItem = 42`` destroys the structure here and makes +it impossible to retrieve the value of the child +``MyItem.MyChildItem.MyGrandchildItem`` +Alike, an instruction as ``value = sh.MyItem.MyChildItem`` will not assign the +value of ``sh.MyItem.MyChildItem`` but assign a reference to the item object +``sh.MyItem.MyChildItem`` + +It is not possible with Python to intercept an assignment to a variable or an +objects' attribute. The only thing one can do is search all items for a +mismatching item type. + +This logic checks all items returned by SmartHomeNG, and if it encounters one +which seems to be damaged like described before, it attempts to repair the +broken assignment. + +""" +from lib.item import Items + + +def repair_item(sh, item): + path = item.id() + path_elems = path.split('.') + ref = sh + + # traverse through object structure sh.path1.path2... + try: + for path_part in path_elems[:-1]: + ref = getattr(ref, path_part) + + setattr(ref, path_elems[-1], item) + logger.info(f'Item reference repaired for {path}') + return True + except NameError: + logger.error(f'Error: item traversal for {path} failed at part {path_part}. Item list not sorted?') + + return False + + +def get_item_type(sh, path): + expr = f'type(sh.{path})' + return str(eval(expr)) + + +def check_item(sh, path): + global get_item_type + + return get_item_type(sh, path) == "" + + +# to get access to the object instance: +items = Items.get_instance() + +# to access a method (eg. to get the list of Items): +# allitems = items.return_items() +problems_found = 0 +problems_fixed = 0 + +for one in items.return_items(sorted=True): + # get the items full path + path = one.id() + try: + if not check_item(sh, path): + logger.error(f"Error: item {path} has type {get_item_type(sh, path)} but should be an Item Object") + problems_found += 1 + if repair_item(sh, one): + if check_item(sh, path): + problems_fixed += 1 + except ValueError as e: + logger.error(f'Error {e} while processing item {path}, parent defective? Items not sorted?') + +if problems_found: + logger.error(f"{problems_found} problematic item assignment{'' if problems_found == 1 else 's'} found, {problems_fixed} item assignment{'' if problems_fixed == 1 else 's'} fixed") +else: + logger.notice("no problems found") \ No newline at end of file diff --git a/modules/admin/__init__.py b/modules/admin/__init__.py index 56651b8f6a..e498f257ac 100644 --- a/modules/admin/__init__.py +++ b/modules/admin/__init__.py @@ -22,9 +22,9 @@ import os import logging -import json import cherrypy +from lib.utils import Utils from lib.model.module import Module from lib.module import Modules @@ -42,6 +42,7 @@ from .api_config import * from .api_files import * from .api_items import * +from .api_functions import * from .api_loggers import * from .api_logs import * from .api_scenes import * @@ -88,7 +89,7 @@ def __init__(self, sh, testparam=''): self.mod_http = Modules.get_instance().get_module('http') # try/except to handle running in a core version that does not support modules except: self.mod_http = None - if self.mod_http == None: + if self.mod_http is None: self.logger.error( "Module '{}': Not initializing - Module 'http' has to be loaded BEFORE this module".format( self._shortname)) @@ -117,7 +118,7 @@ def __init__(self, sh, testparam=''): mysuburl = '' if suburl != '': mysuburl = '/' + suburl - ip = get_local_ipv4_address() + ip = Utils.get_local_ipv4_address() self._port = self.mod_http._port # self.logger.warning('port = {}'.format(self._port)) self.shng_url_root = 'http://' + ip + ':' + str(self._port) # for links mto plugin webinterfaces @@ -223,19 +224,15 @@ def start(self): return - def stop(self): """ - Stop the admin module - Cleanup code of the admin module """ - self.logger.info("Shutting down".format(self._shortname)) + self.logger.info(f"Shutting down {self._shortname}") for stop_method in self._stop_methods: stop_method() - self.logger.info("Shutted down".format(self._shortname)) - + self.logger.info(f"{self._shortname} shut down ") def add_stop_method(self, method, classname=''): """ @@ -263,19 +260,18 @@ def error_page(self, status, message, traceback, version): :return: page to display (a redirect) :rtype: str """ - ip = get_local_ipv4_address() - mysuburl = '' - if suburl != '': - mysuburl = '/' + suburl + # ip = Utils.get_local_ipv4_address() + # mysuburl = '' + # if suburl != '': + # mysuburl = '/' + suburl # page = '' # page = '' - page = '404: Page not found!
'+message + page = '404: Page not found!
' + message self.logger.warning( "error_page: status = {}, message = {}".format(status, message)) return page - def _error_page(self, status, message, traceback, version): """ Generate html page for errors @@ -293,7 +289,7 @@ def _error_page(self, status, message, traceback, version): :rtype: str """ - show_traceback = True + # show_traceback = True errno = status.split()[0] result = '' result += '' @@ -304,7 +300,7 @@ def _error_page(self, status, message, traceback, version): result += '
' result += '

' + message + '


' - if (self._showtraceback == False) or (errno == '404'): + if not self._showtraceback or (errno == '404'): traceback = '' else: traceback = traceback.replace('\n', '
  ') @@ -322,35 +318,12 @@ def _error_page(self, status, message, traceback, version): return result -def get_local_ipv4_address(): - """ - Get's local ipv4 address of the interface with the default gateway. - Return '127.0.0.1' if no suitable interface is found - - :return: IPv4 address as a string - :rtype: string - """ - s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - try: - s.connect(('8.8.8.8', 1)) - IP = s.getsockname()[0] - except: - IP = '127.0.0.1' - finally: - s.close() - return IP - def translate(s): + # needed for Admin UI return s -import socket - -from lib.plugin import Plugins -from lib.utils import Utils - - class WebInterface(SystemData, ItemData, PluginData): def __init__(self, webif_dir, module, shng_url_root, url_root): @@ -399,6 +372,8 @@ def __init__(self, webif_dir, module, shng_url_root, url_root): self.files = FilesController(self.module) self.items = ItemsController(self.module) self.items.list = ItemsListController(self.module) + self.functions = FunctionsController(self.module) + self.functions.reload = FunctionsReloadController(self.module) self.logics = LogicsController(self.module) self.loggers = LoggersController(self.module) self.logs = LogsController(self.module) @@ -410,6 +385,7 @@ def __init__(self, webif_dir, module, shng_url_root, url_root): self.plugins.info = PluginsInfoController(self.module, self.shng_url_root) self.plugins.logicparams = PluginsLogicParametersController(self.module) self.scenes = ScenesController(self.module) + self.scenes.reload = ScenesReloadController(self.module) self.schedulers = SchedulersController(self.module) self.server = ServerController(self.module) self.services = ServicesController(self.module) @@ -417,9 +393,6 @@ def __init__(self, webif_dir, module, shng_url_root, url_root): return - @cherrypy.expose(['home', '']) def index(self): return "Give SmartHomeNG a REST." - - diff --git a/modules/admin/api_auth.py b/modules/admin/api_auth.py index 9db9e8b88f..16ad273b63 100644 --- a/modules/admin/api_auth.py +++ b/modules/admin/api_auth.py @@ -129,7 +129,13 @@ def authenticate(self): payload['ttl'] = self.module.login_expiration payload['name'] = user.get('name', '?') payload['admin'] = ('admin' in user.get('groups', [])) - response['token'] = jwt.encode(payload, self.jwt_secret, algorithm='HS256').decode('utf-8') + # try/except to support PyJWT 1.7.x and 2.x + try: + # For PyJWT <= 1.7.1 (and maybe higher?) + response['token'] = jwt.encode(payload, self.jwt_secret, algorithm='HS256').decode('utf-8') + except: + # For PyJWT >= 2.3.0 (and maybe lower?) + response['token'] = jwt.encode(payload, self.jwt_secret, algorithm='HS256') self.logger.info("AuthController.authenticate(): payload = {}".format(payload)) self.logger.info("AuthController.authenticate(): response = {}".format(response)) self.logger.info("AuthController.authenticate(): cherrypy.url = {}".format(cherrypy.url())) diff --git a/modules/admin/api_config.py b/modules/admin/api_config.py index f68e3e315a..d63dbdc27d 100644 --- a/modules/admin/api_config.py +++ b/modules/admin/api_config.py @@ -130,6 +130,13 @@ def update_holidays(self, data): except Exception as e: self.logger.critical("update_holidays: Exception {}".format(e)) + if self.holidays_confdata['custom'] == []: + #self.holidays_confdata['custom'] = None + del self.holidays_confdata['custom'] + + if self.holidays_confdata['location']['state'] is None: + del self.holidays_confdata['location']['state'] + self.logger.info("update_holidays: self.holidays_confdata = '{}'".format(self.holidays_confdata)) shyaml.yaml_save_roundtrip(filename, self.holidays_confdata, create_backup=True) return diff --git a/modules/admin/api_files.py b/modules/admin/api_files.py index 8647cf4d31..f30f4b05e4 100644 --- a/modules/admin/api_files.py +++ b/modules/admin/api_files.py @@ -53,6 +53,7 @@ def __init__(self, module): self.etc_dir = self._sh._etc_dir self.items_dir = self._sh._items_dir + self.functions_dir = self._sh._functions_dir self.scenes_dir = self._sh._scenes_dir self.logics_dir = self._sh._logic_dir self.extern_conf_dir = self._sh._extern_conf_dir @@ -317,6 +318,72 @@ def delete_scenes_config(self, filename): return json.dumps(result) + # ====================================================================== + # /api/files/functions + # + def get_functions_filelist(self): + + list = os.listdir( self.functions_dir ) + filelist = [] + for filename in list: + if filename.endswith('.py'): + filelist.append(filename) + + self.logger.info("filelist = {}".format(filelist)) + self.logger.info("filelist.sort() = {}".format(filelist.sort())) + return json.dumps(sorted(filelist)) + + def get_functions_config(self, fn): + + self.logger.info("FilesController.get_functions_config({})".format(fn)) + if fn.endswith('.tpl'): + filename = os.path.join(self.functions_dir, fn) + else: + filename = os.path.join(self.functions_dir, fn + '.py') + read_data = None + with open(filename, encoding='UTF-8') as f: + read_data = f.read() + return cherrypy.lib.static.serve_file(filename, 'application/x-download', + 'attachment', fn + '.py') + + + def save_functions_config(self, filename): + """ + Save function library + + :return: status dict + """ + params = None + params = self.get_body(text=True) + if params is None: + self.logger.warning("FilesController.save_functions_config(): Bad, request") + raise cherrypy.HTTPError(status=411) + self.logger.debug("FilesController.save_functions_config(): '{}'".format(params)) + + + filename = os.path.join(self.functions_dir, filename + '.py') + read_data = None + with open(filename, 'w', encoding='UTF-8') as f: + f.write(params) + + result = {"result": "ok"} + return json.dumps(result) + + + def delete_functions_config(self, filename): + """ + Delete a scene configuration file + + :return: status dict + """ + self.logger.debug("FilesController.delete_functions_config(): '{}'".format(filename)) + + filename = os.path.join(self.functions_dir, filename + '.py') + os.remove(filename) + + result = {"result": "ok"} + return json.dumps(result) + # ====================================================================== # /api/files/logics # @@ -520,6 +587,12 @@ def read(self, id='', filename=''): cherrypy.response.headers['Cache-Control'] = 'no-cache, max-age=0, must-revalidate, no-store' return self.get_scenes_config(filename) + elif (id == 'functions' and filename == ''): + return self.get_functions_filelist() + elif id == 'functions': + cherrypy.response.headers['Cache-Control'] = 'no-cache, max-age=0, must-revalidate, no-store' + return self.get_functions_config(filename) + elif (id == 'logics' and filename == ''): return self.get_logics_filelist() elif id == 'logics': @@ -548,6 +621,8 @@ def update(self, id='', filename=''): return self.save_items_config(filename) elif (id == 'scenes' and filename != ''): return self.save_scenes_config(filename) + elif (id == 'functions' and filename != ''): + return self.save_functions_config(filename) elif (id == 'logics' and filename != ''): return self.save_logics_config(filename) elif (id == 'restore' and filename != ''): @@ -584,6 +659,8 @@ def delete(self, id='', filename=''): return self.delete_items_config(filename) if (id == 'scenes' and filename != ''): return self.delete_scenes_config(filename) + if (id == 'functions' and filename != ''): + return self.delete_functions_config(filename) return None diff --git a/modules/admin/api_functions.py b/modules/admin/api_functions.py new file mode 100644 index 0000000000..7bb8ca961e --- /dev/null +++ b/modules/admin/api_functions.py @@ -0,0 +1,189 @@ +#!/usr/bin/env python3 +# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab +######################################################################### +# Copyright 2021- Martin Sinn m.sinn@gmx.de +######################################################################### +# This file is part of SmartHomeNG. +# +# SmartHomeNG is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SmartHomeNG is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SmartHomeNG. If not, see . +######################################################################### + + +import os +import logging +import json +import cherrypy + +from lib.item import Items + +from .rest import RESTResource + + +class FunctionsController(RESTResource): + + def __init__(self, module): + self._sh = module._sh + self.module = module + self.base_dir = self._sh.get_basedir() + self.logger = logging.getLogger(__name__) + + self.items = Items.get_instance() + + return + + + # ====================================================================== + # /api/scenes + # + # def root(self): + # if self.items == None: + # self.items = Items.get_instance() + # + # from lib.scene import Scenes + # get_param_func = getattr(Scenes, "get_instance", None) + # if callable(get_param_func): + # supported = True + # self.scenes = Scenes.get_instance() + # scene_list = [] + # if self.scenes is not None: + # scene_list = self.scenes.get_loaded_scenes() + # + # disp_scene_list = [] + # for scene in scene_list: + # scene_dict = {} + # scene_dict['path'] = scene + # # scene_dict['name'] = str(self._sh.return_item(scene)) + # scene_dict['name'] = str(self.items.return_item(scene)) + # + # action_list = self.scenes.get_scene_actions(scene) + # scene_dict['value_list'] = action_list + # # scene_dict[scene] = action_list + # + # disp_action_list = [] + # for value in action_list: + # action_dict = {} + # action_dict['action'] = value + # action_dict['action_name'] = self.scenes.get_scene_action_name(scene, value) + # action_list = self.scenes.return_scene_value_actions(scene, value) + # for action in action_list: + # if not isinstance(action[0], str): + # action[0] = action[0].id() + # action_dict['action_list'] = action_list + # + # disp_action_list.append(action_dict) + # scene_dict['values'] = disp_action_list + # self.logger.debug("scenes_html: disp_action_list for scene {} = {}".format(scene, disp_action_list)) + # + # disp_scene_list.append(scene_dict) + # else: + # supported = False + # return json.dumps(disp_scene_list) + + + # ====================================================================== + # GET /api/functions + # + @cherrypy.expose + def read(self, id=None): + """ + Handle GET requests for scenes API + """ + if self.items == None: + self.items = Items.get_instance() + + from lib.userfunctions import reload + from lib.userfunctions import reload_all + + get_param_func = getattr(Scenes, "get_instance", None) + if callable(get_param_func): + supported = True + self.scenes = Scenes.get_instance() + scene_list = [] + if self.scenes is not None: + scene_list = self.scenes.get_loaded_scenes() + + disp_scene_list = [] + for scene in scene_list: + scene_dict = {} + scene_dict['path'] = scene + # scene_dict['name'] = str(self._sh.return_item(scene)) + scene_dict['name'] = str(self.items.return_item(scene)) + + action_list = self.scenes.get_scene_actions(scene) + scene_dict['value_list'] = action_list + # scene_dict[scene] = action_list + + disp_action_list = [] + for value in action_list: + action_dict = {} + action_dict['action'] = value + action_dict['action_name'] = self.scenes.get_scene_action_name(scene, value) + action_list = self.scenes.return_scene_value_actions(scene, value) + for action in action_list: + if not isinstance(action[0], str): + action[0] = action[0].id() + action_dict['action_list'] = action_list + + disp_action_list.append(action_dict) + scene_dict['values'] = disp_action_list + self.logger.debug("scenes_html: disp_action_list for scene {} = {}".format(scene, disp_action_list)) + + disp_scene_list.append(scene_dict) + else: + supported = False + return json.dumps(disp_scene_list) + + read.expose_resource = True + read.authentication_needed = True + + +class FunctionsReloadController(RESTResource): + + def __init__(self, module): + + self._sh = module._sh + self.module = module + self.base_dir = self._sh.get_basedir() + self.logger = logging.getLogger(__name__) + + self.items = Items.get_instance() + + return + + + # ====================================================================== + # /api/functions/reload + # + + @cherrypy.expose + def update(self, id=None): + """ + Handle PUT requests for scenes/reload API + """ + from lib.scene import Scenes + self.scenes = Scenes.get_instance() + + from lib.userfunctions import reload + from lib.userfunctions import reload_all + + if id == 'all': + #result = self.scenes.reload_scenes() + result = reload_all() + return json.dumps(result) + else: + result = reload(id) + return json.dumps(result) + + update.expose_resource = True + update.authentication_needed = True diff --git a/modules/admin/api_items.py b/modules/admin/api_items.py index 87563dfaa2..df771be5e7 100644 --- a/modules/admin/api_items.py +++ b/modules/admin/api_items.py @@ -59,7 +59,6 @@ def read(self, id=None): # /api/items/structs self.logger.info("ItemsController.root(): item_name = {}".format(id)) result = self.items.return_struct_definitions(all=False) - return json.dumps(result) #raise cherrypy.NotFound diff --git a/modules/admin/api_loggers.py b/modules/admin/api_loggers.py index 539bbf61e2..e2dcde1231 100644 --- a/modules/admin/api_loggers.py +++ b/modules/admin/api_loggers.py @@ -48,6 +48,7 @@ def __init__(self, module): self.logging_levels[50] = 'CRITICAL' self.logging_levels[40] = 'ERROR' self.logging_levels[30] = 'WARNING' + self.logging_levels[29] = 'NOTICE' self.logging_levels[20] = 'INFO' self.logging_levels[10] = 'DEBUG' self.logging_levels[0] = 'NOTSET' @@ -100,7 +101,8 @@ def get_active_loggers(self): loggerlist = [] try: - for l in logging.Logger.manager.loggerDict: + wrk_loggerDict = logging.Logger.manager.loggerDict + for l in wrk_loggerDict: lg = logging.Logger.manager.loggerDict[l] try: @@ -154,7 +156,8 @@ def get_logger_active_configuration(self, loggername=None): active = {} active_logger = logging.getLogger(loggername) active['disabled'] = active_logger.disabled - active['level'] = self.logging_levels[active_logger.level] + #active['level'] = self.logging_levels[active_logger.level] + active['level'] = self.logging_levels.get(active_logger.level, 'UNKNOWN_'+str(active_logger.level)) active['filters'] = active_logger.filters hl = [] diff --git a/modules/admin/api_plugins.py b/modules/admin/api_plugins.py index 85cfd0ce11..8eafc46248 100644 --- a/modules/admin/api_plugins.py +++ b/modules/admin/api_plugins.py @@ -28,6 +28,7 @@ import requests import time import threading +from random import randrange import lib.shyaml as shyaml import lib.config @@ -324,7 +325,7 @@ def _test_for_blog_articles_task(self): if self.plugins == None: self.plugins = Plugins.get_instance() if self.plugins != None and self._sh.shng_status.get('code', 0) == 20: # Running - self._sh.scheduler._scheduler[self._blog_task_name]['cycle'] = {120 * 60 : None} # set scheduler cycle to test every 2 hours + self._sh.scheduler._scheduler[self._blog_task_name]['cycle'] = {120 * 60 + randrange(60) : None} # set scheduler cycle to test every 2 hours start = time.time() temp_blog_urls = {} @@ -345,10 +346,14 @@ def _test_for_blog_articles_task(self): if r.status_code == 404: temp_blog_urls[plugin_name] = '' elif r.status_code != 200: - self.logger.error("Received status_code {} for get-request to {}".format(r.status_code, temp_blog_urls[plugin_name])) + if r.status_code in [500, 503]: + self.logger.info("www.smarthomeng.de sent status_code {} for get-request to {}".format(r.status_code, temp_blog_urls[plugin_name])) + else: + self.logger.notice("www.smarthomeng.de sent status_code {} for get-request to {}".format(r.status_code, temp_blog_urls[plugin_name])) temp_blog_urls[plugin_name] = '' else: pass + time.sleep(1) except OSError as e: if str(e).find('[Errno 101]') > -1: # [Errno 101] Das Netzwerk ist nicht erreichbar pass @@ -391,7 +396,10 @@ def read(self, id=None): plugin['stopped'] = False # Update(s) triggered by < strong > {{p.instance._itemlist | length}} < / strong > items - plugin['triggers'] = str(x._itemlist) + plugin['triggers'] = [] + for it in x._itemlist: + plugin['triggers'].append(it._path) + #self.logger.warning("{} items={}, itemlist={}".format(x.get_shortname(), len(plugin['triggers']), plugin['triggers'])) if isinstance(x, SmartPlugin): plugin['pluginname'] = x.get_shortname() diff --git a/modules/admin/api_scenes.py b/modules/admin/api_scenes.py index 402e1e33db..3831778373 100644 --- a/modules/admin/api_scenes.py +++ b/modules/admin/api_scenes.py @@ -145,3 +145,37 @@ def read(self, id=None): read.expose_resource = True read.authentication_needed = True + +class ScenesReloadController(RESTResource): + + def __init__(self, module): + self._sh = module._sh + self.module = module + self.base_dir = self._sh.get_basedir() + self.logger = logging.getLogger(__name__) + + self.items = Items.get_instance() + + return + + + # ====================================================================== + # /api/scenes/reload + # + + @cherrypy.expose + def update(self, id=None): + """ + Handle PUT requests for scenes/reload API + """ + from lib.scene import Scenes + self.scenes = Scenes.get_instance() + + if id == 'all': + result = self.scenes.reload_scenes() + return json.dumps(result) + else: + return json.dumps(False) + + update.expose_resource = True + update.authentication_needed = True diff --git a/modules/admin/api_services.py b/modules/admin/api_services.py index a34ea6d3eb..219c002bb4 100755 --- a/modules/admin/api_services.py +++ b/modules/admin/api_services.py @@ -102,6 +102,8 @@ def eval_syntax_checker(self, eval_code, relative_to): shtime = Shtime.get_instance() items = Items.get_instance() import math + import lib.userfunctions as uf + eval_code = eval_code.replace('\r', '').replace('\n', ' ').replace(' ', ' ').strip() if relative_to == '': diff --git a/modules/admin/itemdata.py b/modules/admin/itemdata.py index 32d1cd7f96..54b5f86e5f 100644 --- a/modules/admin/itemdata.py +++ b/modules/admin/itemdata.py @@ -23,6 +23,7 @@ import collections import html import json +import ast import cherrypy @@ -95,6 +96,20 @@ def _build_item_tree(self, parent_items_sorted): # ----------------------------------------------------------------------------------- + def escape_complex_value(self, value): + + wrk = str(value) + if wrk == '': + return wrk + wrk = wrk.replace('&', '&') + wrk = wrk.replace('>', '>') + wrk = wrk.replace('<', '<') + try: + return str(ast.literal_eval(wrk)) + except: + self.logger.error(f"escape_complex_value: cannot handle value = '{wrk}'") + return '' + @cherrypy.expose def item_detail_json_html(self, item_path): """ @@ -225,6 +240,10 @@ def item_detail_json_html(self, item_path): 'on_update': html.escape(self.list_to_displaystring(on_update_list)), 'on_change': html.escape(self.list_to_displaystring(on_change_list)), 'log_change': self.disp_str(item._log_change), + 'log_level': self.disp_str(item._log_level_name), + 'log_text': self.disp_str(item._log_text), + 'log_mapping': self.disp_str(item._log_mapping), + 'log_rules': self.disp_str(item._log_rules), 'cycle': str(cycle), 'crontab': str(crontab), 'autotimer': self.disp_str(item._autotimer), @@ -246,13 +265,19 @@ def item_detail_json_html(self, item_path): data_dict['struct'] = item._struct # cast raw data to a string - if item.type() in ['foo', 'list', 'dict']: + if item.type() in ['foo']: data_dict['value'] = str(item._value) data_dict['last_value'] = str(last_value) data_dict['previous_value'] = str(prev_value) + # cast list/dict data to a string + if item.type() in ['list', 'dict']: + data_dict['value'] = self.escape_complex_value(item._value) + data_dict['last_value'] = self.escape_complex_value(last_value) + data_dict['previous_value'] = self.escape_complex_value(prev_value) + + item_data.append(data_dict) - # self.logger.warning("details: item_data = {}".format(item_data)) return json.dumps(item_data) else: self.logger.error("Requested item '{}' is None, check if item really exists.".format(item_path)) diff --git a/modules/admin/webif/static/assets/i18n/de.json b/modules/admin/webif/static/assets/i18n/de.json index d68e2e3deb..2065a7a54f 100644 --- a/modules/admin/webif/static/assets/i18n/de.json +++ b/modules/admin/webif/static/assets/i18n/de.json @@ -15,6 +15,7 @@ "SCENES": "Szenen", "SCENE_LIST": "Szenen Liste", "SCENE_CONFIGURATION": "Szenen Konfiguration", + "FUNCTION_CONFIGURATION": "User-Funktionen", "THREADS": "Threads", "LOGS": "Logs", "LOGS_DISPLAY": "Logs Anzeigen", @@ -30,6 +31,7 @@ "SHNG_VERSION": "SmartHomeNG Version", "IN": "in", "SHNG_PLG_VERSION": "SmartHomeNG Plugins Version", + "SHNG_ADMIN_GUI": "Administrations-Oberfläche", "HOST": "Host", "OS": "Betriebssystem", "PID": "Prozess ID", @@ -384,6 +386,18 @@ "DELETE_CONFIG": "Löschen der Szene bestätigen", "DELETE_CONFIG_FILE": "Soll die Szenen-Konfigurationsdatei '{{config}}' wirklich gelöscht werden?" }, + "FUNCTION_CONFIG": { + "DEFINITION_FILES": "Funktions-Bibliotheken", + "CONFIG_FILE": "Funktion Bibliotheksdatei", + "FILE_NOT_FOUND": "Datei nicht gefunden!", + "FILETYPE_UNSUPPORTED": "Dateityp nicht unterstützt!", + "CONFIG_ERROR": "Konfigurations-Fehler - Konfiguration nicht gespeichert!", + "CONFIG_ERROR_TEXT": "Fehler in der Funktionsbibliothek gefunden.\nUngültiges Format der Datei.\n", + "NAME_CONFIGURATION": "Dateinamen für die neue Funktionsbibliothek wählen", + "UNIQUE_NAME": "Eindeutiger Dateiname (ohne Erweiterung)", + "DELETE_CONFIG": "Löschen der Funktions-Bibliothek bestätigen", + "DELETE_CONFIG_FILE": "Soll die Funktions-Bibliothek '{{config}}' wirklich gelöscht werden?" + }, "THREADS": { "THREAD": "Thread", "TOTAL": "gesamt", @@ -448,6 +462,11 @@ "NEW_DEFINITION_FILE": "Neue Datei", "NEW_LOGIC": "Neue Logik", "NEW_SCENE": "Neue Szene", + "RELOAD_SCENES": "Szenen neu laden", + "RELOAD_SCENE": "Laden", + "NEW_FUNCTION": "Neue Bibliothek", + "RELOAD_FUNCTIONS": "Alle neu laden", + "RELOAD_FUNCTION": "Laden", "LINE_WRAPPING": "Zeilenumbruch", "TRIGGER": "Auslösen" }, @@ -502,6 +521,7 @@ "CONFIGURATION": "Konfiguration", "RESTART FOR CHANGES": "Änderungen werden erst nach einem Neustart von SmartHomeNG wirksam - Nach dem Neustart ein Reload der Admin GUI durchführen", + "RELOAD FOR CHANGES": "Änderungen werden erst nach dem erneuten Laden der Datei(en) oder einem Neustart von SmartHomeNG wirksam", "RESTART LOGIC FOR CHANGES": "Änderungen werden erst nach einem Neustart der Logik wirksam", "LINEBREAK": "Umbruch" diff --git a/modules/admin/webif/static/assets/i18n/en.json b/modules/admin/webif/static/assets/i18n/en.json index 52118ca7f8..0b138e19f6 100644 --- a/modules/admin/webif/static/assets/i18n/en.json +++ b/modules/admin/webif/static/assets/i18n/en.json @@ -15,6 +15,7 @@ "SCENES": "Scenes", "SCENE_LIST": "Scene List", "SCENE_CONFIGURATION": "Scene Configuration", + "FUNCTION_CONFIGURATION": "User functions", "THREADS": "Threads", "LOGS": "Logs", "LOGS_DISPLAY": "Display Logs", @@ -30,6 +31,7 @@ "SHNG_VERSION": "SmartHomeNG Version", "IN": "in", "SHNG_PLG_VERSION": "SmartHomeNG Plugins Version", + "SHNG_ADMIN_GUI": "Administration-GUI", "HOST": "Host", "OS": "Operating System", "PID": "Process ID", @@ -502,6 +504,7 @@ "CONFIGURATION": "Configuration", "RESTART FOR CHANGES": "Restart SmartHomeNG for changes to take effect - Reload Admin GUI after restart", + "RELOAD FOR CHANGES": "Reload file(s) or restart SmartHomeNG for changes to take effect.", "RESTART LOGIC FOR CHANGES": "Restart the logic for changes to take effect", "LINEBREAK": "Line Break" diff --git a/modules/admin/webif/static/assets/i18n/fr.json b/modules/admin/webif/static/assets/i18n/fr.json index ec3e0d440f..3396dc5ef6 100644 --- a/modules/admin/webif/static/assets/i18n/fr.json +++ b/modules/admin/webif/static/assets/i18n/fr.json @@ -15,6 +15,7 @@ "SCENES": "Scènes", "SCENE_LIST": "Liste des scènes", "SCENE_CONFIGURATION": "Configuration des scènes", + "FUNCTION_CONFIGURATION": "Configuration des fonctions utilisateur", "THREADS": "Tâches", "LOGS": "Journaux", "LOGS_DISPLAY": "Afficher les journaux", @@ -30,6 +31,7 @@ "SHNG_VERSION": "Version de SmartHomeNG", "IN": "dans", "SHNG_PLG_VERSION": "Version des extensions", + "SHNG_ADMIN_GUI": "Interface d'administration", "HOST": "Hôte", "OS": "Système d'exploitation", "ARCHITECTURE": "architecture", @@ -500,6 +502,7 @@ "CONFIGURATION": "Configuration", "RESTART FOR CHANGES": "Les changements deviennent seulement actifs après un redémarrage de SmartHomeNG", + "RELOAD FOR CHANGES": "Les modifications ne prennent effet qu'après rechargement du fichier ou redémarrage de SmartHomeNG", "RESTART LOGIC FOR CHANGES": "Les changements deviennent seulement actifs après un redémarrage de la logique", "LINEBREAK": "Saut de ligne" diff --git a/modules/admin/webif/static/assets/testdata/api/files/functions/anhalter.txt b/modules/admin/webif/static/assets/testdata/api/files/functions/anhalter.txt new file mode 100644 index 0000000000..6d339880f6 --- /dev/null +++ b/modules/admin/webif/static/assets/testdata/api/files/functions/anhalter.txt @@ -0,0 +1,24 @@ + +import logging +_logger = logging.getLogger(__name__) + +_VERSION = '0.1.0' +_DESCRIPTION = 'Per Anhalter durch die Galaxis' + +def zweiundvierzig(): + + return 'Die Antwort auf die Frage aller Fragen' + + +def itemtest(sh): + + return sh.env.location.sun_position.elevation.degrees() + +def log_test(): + + _logger.warning('Log-Test aus einer Userfunction') + + return + + +#logger.warning('bewusster Fehler') diff --git a/modules/admin/webif/static/assets/testdata/api/files/functions/beschattung.txt b/modules/admin/webif/static/assets/testdata/api/files/functions/beschattung.txt new file mode 100644 index 0000000000..8c34f30780 --- /dev/null +++ b/modules/admin/webif/static/assets/testdata/api/files/functions/beschattung.txt @@ -0,0 +1,124 @@ + +import logging +_logger = logging.getLogger(__name__) + +_VERSION = '0.1.2' +_DESCRIPTION = 'Hilfsfunktionen zur Beschattungssteuerung per Stateengine' + +# Ausrichtung der Südfront: 171,0° + +def beschatten_beginnen_ost(lux, azimut): + """ + Bestimmen, ob die Stateengine die Beschattung beginnen soll + + :param lux: Helligkeit Ost + :param azimut: Sonnen Position (Himmelsrichtung in Grad) + + :return: Wenn True, soll Beschattung begonnen werden + """ + # Beschattungs Daten (Hysterese) OST + # + # Azimut Elev Beginnen Beenden + # 0°-88° 0°-10° >4.000 Lux <2.600 Lux + # 0°-88° 10°- >5.000 Lux <2.800 Lux + # 88°-100° >7.000 Lux <2.800 Lux + # 100°-110° >15.000 Lux <12.000 Lux + # 110°-160° >35.000 Lux <20.000 Lux + # 160°-220° >27.000 Lux <10.000 Lux + # 220°- >27.000 Lux <7.500 Lux + # + + _logger.notice(f"beschatten_beginnen_ost {lux} Lux, Azimut={azimut}°") + + return (lux > 15000 and azimut < 88) or (lux > 15000 and int(azimut) in range(88, 100)) or (lux > 15000 and int(azimut) in range(100, 110)) or (lux > 27000 and azimut >= 110) + + +def beschatten_beenden_ost(lux, azimut, elevation): + + _logger.notice(f"beschatten_beenden_ost {lux} Lux, Azimut={azimut}°, Elevation={elevation}°") + + return (lux <= 2600 and azimut < 100 and elevation <= 10) or (lux <= 2800 and azimut < 100 and elevation > 10) or (lux <= 12000 and int(azimut) in range(100, 110)) or (lux <= 20000 and int(azimut) in range(110, 160)) or (lux <= 10000 and int(azimut) in range(160, 220)) or (lux <= 7500 and azimut >= 220) + + +def lamellen_oeffnung_ost(azimut, elevation): + """ + Bestimmung der Stellung der Ost Lamellen im Wohnbereich + + :param elevation: Sonnen Position (Höhe in Grad) + :return: Stellung der Lamellen in Prozent + """ + + # elevation = sh.env.location.sun_position.elevation.degrees() + + default = 54 + + if azimut >= 171.0: + return default + + elif elevation <= 6.6: + return 87 + elif elevation <= 11.5: + return 84 + elif elevation <= 14.8: + return 81 + elif elevation <= 19.4: + return 78 + elif elevation <= 16.1: + return 74 + elif elevation <= 28: + return 70 + elif elevation <= 30.9: + return 65 + elif elevation <= 33.9: + return 60 + + return default + + #return 87 if elevation <= 6.6 else 84 if elevation <= 11.5 else 81 if elevation <= 14.8 else 78 if elevation <= 19.4 else 74 if elevation <= 16.1 else 70 if elevation <= 28 else 65 if elevation <= 30.9 else 60 if elevation <= 33.9 else 54 + + +def lamellen_oeffnung_sued(azimut, elevation): + """ + Bestimmung der Stellung der Süd Lamellen im Wohnbereich/Gästezimmer/Büro + + :param azimut: Sonnen Position (Himmelsrichtung in Grad) + :param elevation: Sonnen Position (Höhe in Grad) + :return: Stellung der Lamellen in Prozent + """ + + # azimut = sh.env.location.sun_position.azimut.degrees() + # elevation = sh.env.location.sun_position.elevation.degrees() + + default = 66 + + if azimut >= 230: + if elevation >= 6.0: + return 66 + elif elevation >= 4.0: + return 63 + elif elevation > 0.0: + return 60 + + # elif azimut >= 214: + # if elevation > 0.0: + # return 63 + + elif elevation >= 24.0: + return 70 + + elif elevation >= 19.5: + return 72 + + elif elevation >= 15.0: + return 74 + + elif elevation >= 11.8: + return 76 + + if elevation >= 5.5: + return 78 + + return default + + # return 60 if (azimut>=230 and elevation>0.0 ) else 63 if (azimut>=214 and elevation>0.0 ) else 72 if elevation<=7.0 else 69 if elevation<=24.0 else 66 + diff --git a/modules/admin/webif/static/assets/testdata/api/files/functions/default.json b/modules/admin/webif/static/assets/testdata/api/files/functions/default.json new file mode 100644 index 0000000000..d65fac9dbd --- /dev/null +++ b/modules/admin/webif/static/assets/testdata/api/files/functions/default.json @@ -0,0 +1,6 @@ +[ + "anhalter.py", + "beschattung.py", + "functions.py", + "functions2.py" +] diff --git a/modules/admin/webif/static/assets/testdata/api/files/functions/functions.txt b/modules/admin/webif/static/assets/testdata/api/files/functions/functions.txt new file mode 100644 index 0000000000..c1490bf165 --- /dev/null +++ b/modules/admin/webif/static/assets/testdata/api/files/functions/functions.txt @@ -0,0 +1,8 @@ + +_VERSION = '0.1.3' +_DESCRIPTION = 'My user-defined functions' + + +def _version(): + + return (_VERSION, _DESCRIPTION) diff --git a/modules/admin/webif/static/assets/testdata/api/files/functions/functions2.txt b/modules/admin/webif/static/assets/testdata/api/files/functions/functions2.txt new file mode 100644 index 0000000000..61ded96986 --- /dev/null +++ b/modules/admin/webif/static/assets/testdata/api/files/functions/functions2.txt @@ -0,0 +1,7 @@ + +_VERSION = '0.1.2' +_DESCRIPTION = 'My user-defined functions 2' + +def _version(): + + return (_VERSION, _DESCRIPTION) diff --git a/modules/admin/webif/static/assets/testdata/api/items/structs/default.json b/modules/admin/webif/static/assets/testdata/api/items/structs/default.json index 7aff1cf376..2ea538d068 100644 --- a/modules/admin/webif/static/assets/testdata/api/items/structs/default.json +++ b/modules/admin/webif/static/assets/testdata/api/items/structs/default.json @@ -357,7 +357,7 @@ } } }, - "my_stateengine": { + "my.se.stateengine": { "name": "Vorlage-Struktur für einen Zustandsautomaten", "rules": { "name": "Regeln für den Zustandsautomaten", @@ -377,7 +377,7 @@ "cache": true } }, - "my_stateengine2": { + "my.se.stateengine2": { "name": "Vorlage-Struktur 2 für einen Zustandsautomaten", "rules": { "name": "Regeln für den Zustandsautomaten", diff --git a/modules/admin/webif/static/assets/testdata/api/loggers/default.json b/modules/admin/webif/static/assets/testdata/api/loggers/default.json index 31e1524f0a..1108af3414 100644 --- a/modules/admin/webif/static/assets/testdata/api/loggers/default.json +++ b/modules/admin/webif/static/assets/testdata/api/loggers/default.json @@ -285,10 +285,10 @@ "handlers": [ "shng_details_file" ], - "level": "WARNING", + "level": "NOTICE", "active": { "disabled": false, - "level": "WARNING", + "level": "NOTICE", "filters": [], "handlers": [ "TimedRotatingFileHandler" @@ -605,7 +605,7 @@ ] } }, - "__main__": { + "lib.smarthome": { "handlers": [ "shng_details_file", "shng_develop_file", @@ -616,10 +616,10 @@ "q21_phones_file", "shng_stateengine_file" ], - "level": "WARNING", + "level": "NOTICE", "active": { "disabled": false, - "level": "WARNING", + "level": "UNKNOWN_31", "filters": [], "handlers": [ "TimedRotatingFileHandler", diff --git a/modules/admin/webif/static/assets/testdata/api/scenes/reload/default.json b/modules/admin/webif/static/assets/testdata/api/scenes/reload/default.json new file mode 100644 index 0000000000..0d4f101c7a --- /dev/null +++ b/modules/admin/webif/static/assets/testdata/api/scenes/reload/default.json @@ -0,0 +1,2 @@ +[ +] diff --git a/modules/admin/webif/static/assets/testdata/item_detail_json.html b/modules/admin/webif/static/assets/testdata/item_detail_json.html index 20ab3c158f..060f62d662 100644 --- a/modules/admin/webif/static/assets/testdata/item_detail_json.html +++ b/modules/admin/webif/static/assets/testdata/item_detail_json.html @@ -1,4 +1,45 @@ [ + { + "path": "test.string", + "name": "test.string", + "type": "str", + "value": "ein wirklich, wirklich, wirklich sehr laaaaanger String", + "change_age": 247402, + "update_age": 247402.7, + "last_update": "2018-08-08 00:42:52.837168+02:00", + "last_change": "2018-08-08 00:42:52.837127+02:00", + "changed_by": "Init", + "updated_by": "Init", + "last_value": "false", + "previous_value": "", + "previous_change_age": 597, + "previous_update_age": 597, + "previous_update": "2018-08-08 00:42:52.837344+02:00", + "previous_change": "2018-08-08 00:42:52.837303+02:00", + "previous_update_by": "me", + "previous_change_by": "you", + "enforce_updates": "on", + "enforce_change": "off", + "cache": "off", + "trigger": "-", + "trigger_condition": "-", + "trigger_condition_raw": "", + "on_update": "-", + "on_change": "-", + "log_change": "-", + "log_level": "-", + "log_text": "-", + "log_mapping": "-", + "log_rules": "-", + "cycle": "-", + "crontab": "-", + "autotimer": "-", + "threshold": "-", + "config": {"lin_mode": "ALL"}, + "logics": ["test"], + "triggers": ["bound method WebSocket.update_item of plugins.visu_websocket.WebSocket"], + "filename": "q21_c26lintronic.yaml" + }, { "path": "beoremote.beo4command", "name": "beoremote.beo4command", @@ -29,6 +70,10 @@ "on_update": "-", "on_change": "-", "log_change": "-", + "log_level": "-", + "log_text": "-", + "log_mapping": "-", + "log_rules": "-", "cycle": "-", "crontab": "-", "autotimer": "-", diff --git a/modules/admin/webif/static/assets/testdata/items.json b/modules/admin/webif/static/assets/testdata/items.json index f7f65ebb80..6ac013f8e8 100644 --- a/modules/admin/webif/static/assets/testdata/items.json +++ b/modules/admin/webif/static/assets/testdata/items.json @@ -1,7 +1,33 @@ [ 179, [ - { + { + "label": "test", + "nodename": "test", + "name": "test", + "tags": [ + 2 + ], + "children": [ + { + "label": "test.string", + "nodename": "string", + "name": "beschattung.config", + "tags": [ + 3 + ] + }, + { + "label": "test.number", + "nodename": "number", + "name": "Test-Nummer", + "tags": [ + 2 + ] + } + ] + }, + { "label": "beoremote", "nodename": "beoremote", "name": "beoremote", diff --git a/modules/admin/webif/static/index.html b/modules/admin/webif/static/index.html index 48337754f8..6ffc51fbee 100644 --- a/modules/admin/webif/static/index.html +++ b/modules/admin/webif/static/index.html @@ -17,5 +17,5 @@ - + diff --git a/modules/admin/webif/static/main.9adb683439590c786f31.js b/modules/admin/webif/static/main.9adb683439590c786f31.js new file mode 100644 index 0000000000..474c683078 --- /dev/null +++ b/modules/admin/webif/static/main.9adb683439590c786f31.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+dQi":function(e,t,n){!function(e){"use strict";e.defineMode("javascript",function(t,n){var l,i,o=t.indentUnit,r=n.statementIndent,u=n.jsonld,a=n.json||u,s=n.typescript,c=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),l=e("keyword c"),i=e("keyword d"),o=e("operator"),r={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:l,void:l,throw:l,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:r,false:r,null:r,undefined:r,NaN:r,Infinity:r,this:e("this"),class:e("class"),super:e("atom"),yield:l,export:e("export"),import:e("import"),extends:l,await:l}}(),p=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function f(e,t,n){return l=e,i=n,t}function g(e,t){var n,l=e.next();if('"'==l||"'"==l)return t.tokenize=(n=l,function(e,t){var l,i=!1;if(u&&"@"==e.peek()&&e.match(h))return t.tokenize=g,f("jsonld-keyword","meta");for(;null!=(l=e.next())&&(l!=n||i);)i=!i&&"\\"==l;return i||(t.tokenize=g),f("string","string")}),t.tokenize(e,t);if("."==l&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return f("number","number");if("."==l&&e.match(".."))return f("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(l))return f(l);if("="==l&&e.eat(">"))return f("=>","operator");if("0"==l&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return f("number","number");if(/\d/.test(l))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),f("number","number");if("/"==l)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),f("comment","comment")):Ye(e,t,1)?(function(e){for(var t,n=!1,l=!1;null!=(t=e.next());){if(!n){if("/"==t&&!l)return;"["==t?l=!0:l&&"]"==t&&(l=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),f("regexp","string-2")):(e.eat("="),f("operator","operator",e.current()));if("`"==l)return t.tokenize=v,v(e,t);if("#"==l)return e.skipToEnd(),f("error","error");if(p.test(l))return">"==l&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=l&&"="!=l||e.eat("="):/[<>*+\-]/.test(l)&&(e.eat(l),">"==l&&e.eat(l))),f("operator","operator",e.current());if(c.test(l)){e.eatWhile(c);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return f(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return f("async","keyword",i)}return f("variable","variable",i)}}function m(e,t){for(var n,l=!1;n=e.next();){if("/"==n&&l){t.tokenize=g;break}l="*"==n}return f("comment","comment")}function v(e,t){for(var n,l=!1;null!=(n=e.next());){if(!l&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}l=!l&&"\\"==n}return f("quasi","string-2",e.current())}var y="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(s){var l=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));l&&(n=l.index)}for(var i=0,o=!1,r=n-1;r>=0;--r){var u=e.string.charAt(r),a=y.indexOf(u);if(a>=0&&a<3){if(!i){++r;break}if(0==--i){"("==u&&(o=!0);break}}else if(a>=3&&a<6)++i;else if(c.test(u))o=!0;else{if(/["'\/]/.test(u))return;if(o&&!i){++r;break}}}o&&!i&&(t.fatArrowAt=r)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(e,t,n,l,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=l&&(this.align=l)}function _(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var l=e.context;l;l=l.prev)for(n=l.vars;n;n=n.next)if(n.name==t)return!0}var x={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)x.cc.push(arguments[e])}function E(){return S.apply(null,arguments),!0}function I(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function O(e){var t=x.state;if(x.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var l=function e(t,n){if(n){if(n.block){var l=e(t,n.prev);return l?l==n.prev?n:new D(l,n.vars,!0):null}return I(t,n.vars)?n:new D(n.prev,new R(t,n.vars),!1)}return null}(e,t.context);if(null!=l)return void(t.context=l)}else if(!I(e,t.localVars))return void(t.localVars=new R(e,t.localVars));n.globalVars&&!I(e,t.globalVars)&&(t.globalVars=new R(e,t.globalVars))}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function D(e,t,n){this.prev=e,this.vars=t,this.block=n}function R(e,t){this.name=e,this.next=t}var k=new R("this",new R("arguments",null));function M(){x.state.context=new D(x.state.context,x.state.localVars,!1),x.state.localVars=k}function N(){x.state.context=new D(x.state.context,x.state.localVars,!0),x.state.localVars=null}function L(){x.state.localVars=x.state.context.vars,x.state.context=x.state.context.prev}function A(e,t){var n=function(){var n=x.state,l=n.indented;if("stat"==n.lexical.type)l=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)l=i.indented;n.lexical=new w(l,x.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function P(){var e=x.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function F(e){return function t(n){return n==e?E():";"==e||"}"==n||")"==n||"]"==n?S():E(t)}}function V(e,t){return"var"==e?E(A("vardef",t),ye,F(";"),P):"keyword a"==e?E(A("form"),z,V,P):"keyword b"==e?E(A("form"),V,P):"keyword d"==e?x.stream.match(/^\s*$/,!1)?E():E(A("stat"),$,F(";"),P):"debugger"==e?E(F(";")):"{"==e?E(A("}"),N,re,P,L):";"==e?E():"if"==e?("else"==x.state.lexical.info&&x.state.cc[x.state.cc.length-1]==P&&x.state.cc.pop()(),E(A("form"),z,V,P,Se)):"function"==e?E(Re):"for"==e?E(A("form"),Ee,V,P):"class"==e||s&&"interface"==t?(x.marked="keyword",E(A("form","class"==e?e:t),Ae,P)):"variable"==e?s&&"declare"==t?(x.marked="keyword",E(V)):s&&("module"==t||"enum"==t||"type"==t)&&x.stream.match(/^\s*\w/,!1)?(x.marked="keyword","enum"==t?E(qe):"type"==t?E(Me,F("operator"),ce,F(";")):E(A("form"),be,F("{"),A("}"),re,P,P)):s&&"namespace"==t?(x.marked="keyword",E(A("form"),H,V,P)):s&&"abstract"==t?(x.marked="keyword",E(V)):E(A("stat"),J):"switch"==e?E(A("form"),z,F("{"),A("}","switch"),N,re,P,P,L):"case"==e?E(H,F(":")):"default"==e?E(F(":")):"catch"==e?E(A("form"),M,j,V,P,L):"export"==e?E(A("stat"),je,P):"import"==e?E(A("stat"),Be,P):"async"==e?E(V):"@"==t?E(H,V):S(A("stat"),H,F(";"),P)}function j(e){if("("==e)return E(Ne,F(")"))}function H(e,t){return U(e,t,!1)}function B(e,t){return U(e,t,!0)}function z(e){return"("!=e?S():E(A(")"),H,F(")"),P)}function U(e,t,n){if(x.state.fatArrowAt==x.stream.start){var l=n?Z:Y;if("("==e)return E(M,A(")"),ie(Ne,")"),P,F("=>"),l,L);if("variable"==e)return S(M,be,F("=>"),l,L)}var i=n?W:G;return C.hasOwnProperty(e)?E(i):"function"==e?E(Re,i):"class"==e||s&&"interface"==t?(x.marked="keyword",E(A("form"),Le,P)):"keyword c"==e||"async"==e?E(n?B:H):"("==e?E(A(")"),$,F(")"),P,i):"operator"==e||"spread"==e?E(n?B:H):"["==e?E(A("]"),We,P,i):"{"==e?oe(te,"}",null,i):"quasi"==e?S(q,i):"new"==e?E(function(e){return function(t){return"."==t?E(e?X:Q):"variable"==t&&s?E(ge,e?W:G):S(e?B:H)}}(n)):"import"==e?E(H):E()}function $(e){return e.match(/[;\}\)\],]/)?S():S(H)}function G(e,t){return","==e?E(H):W(e,t,!1)}function W(e,t,n){var l=0==n?G:W,i=0==n?H:B;return"=>"==e?E(M,n?Z:Y,L):"operator"==e?/\+\+|--/.test(t)||s&&"!"==t?E(l):s&&"<"==t&&x.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?E(A(">"),ie(ce,">"),P,l):"?"==t?E(H,F(":"),i):E(i):"quasi"==e?S(q,l):";"!=e?"("==e?oe(B,")","call",l):"."==e?E(ee,l):"["==e?E(A("]"),$,F("]"),P,l):s&&"as"==t?(x.marked="keyword",E(ce,l)):"regexp"==e?(x.state.lastType=x.marked="operator",x.stream.backUp(x.stream.pos-x.stream.start-1),E(i)):void 0:void 0}function q(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?E(q):E(H,K)}function K(e){if("}"==e)return x.marked="string-2",x.state.tokenize=v,E(q)}function Y(e){return b(x.stream,x.state),S("{"==e?V:H)}function Z(e){return b(x.stream,x.state),S("{"==e?V:B)}function Q(e,t){if("target"==t)return x.marked="keyword",E(G)}function X(e,t){if("target"==t)return x.marked="keyword",E(W)}function J(e){return":"==e?E(P,V):S(G,F(";"),P)}function ee(e){if("variable"==e)return x.marked="property",E()}function te(e,t){return"async"==e?(x.marked="property",E(te)):"variable"==e||"keyword"==x.style?(x.marked="property","get"==t||"set"==t?E(ne):(s&&x.state.fatArrowAt==x.stream.start&&(n=x.stream.match(/^\s*:\s*/,!1))&&(x.state.fatArrowAt=x.stream.pos+n[0].length),E(le))):"number"==e||"string"==e?(x.marked=u?"property":x.style+" property",E(le)):"jsonld-keyword"==e?E(le):s&&T(t)?(x.marked="keyword",E(te)):"["==e?E(H,ue,F("]"),le):"spread"==e?E(B,le):"*"==t?(x.marked="keyword",E(te)):":"==e?S(le):void 0;var n}function ne(e){return"variable"!=e?S(le):(x.marked="property",E(Re))}function le(e){return":"==e?E(B):"("==e?S(Re):void 0}function ie(e,t,n){function l(i,o){if(n?n.indexOf(i)>-1:","==i){var r=x.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),E(function(n,l){return n==t||l==t?S():S(e)},l)}return i==t||o==t?E():n&&n.indexOf(";")>-1?S(e):E(F(t))}return function(n,i){return n==t||i==t?E():S(e,l)}}function oe(e,t,n){for(var l=3;l"),ce):void 0}function de(e){if("=>"==e)return E(ce)}function pe(e,t){return"variable"==e||"keyword"==x.style?(x.marked="property",E(pe)):"?"==t||"number"==e||"string"==e?E(pe):":"==e?E(ce):"["==e?E(F("variable"),ue,F("]"),pe):"("==e?S(ke,pe):void 0}function he(e,t){return"variable"==e&&x.stream.match(/^\s*[?:]/,!1)||"?"==t?E(he):":"==e?E(ce):"spread"==e?E(he):S(ce)}function fe(e,t){return"<"==t?E(A(">"),ie(ce,">"),P,fe):"|"==t||"."==e||"&"==t?E(ce):"["==e?E(ce,F("]"),fe):"extends"==t||"implements"==t?(x.marked="keyword",E(ce)):"?"==t?E(ce,F(":"),ce):void 0}function ge(e,t){if("<"==t)return E(A(">"),ie(ce,">"),P,fe)}function me(){return S(ce,ve)}function ve(e,t){if("="==t)return E(ce)}function ye(e,t){return"enum"==t?(x.marked="keyword",E(qe)):S(be,ue,_e,xe)}function be(e,t){return s&&T(t)?(x.marked="keyword",E(be)):"variable"==e?(O(t),E()):"spread"==e?E(be):"["==e?oe(we,"]"):"{"==e?oe(Ce,"}"):void 0}function Ce(e,t){return"variable"!=e||x.stream.match(/^\s*:/,!1)?("variable"==e&&(x.marked="property"),"spread"==e?E(be):"}"==e?S():"["==e?E(H,F("]"),F(":"),Ce):E(F(":"),be,_e)):(O(t),E(_e))}function we(){return S(be,_e)}function _e(e,t){if("="==t)return E(B)}function xe(e){if(","==e)return E(ye)}function Se(e,t){if("keyword b"==e&&"else"==t)return E(A("form","else"),V,P)}function Ee(e,t){return"await"==t?E(Ee):"("==e?E(A(")"),Ie,F(")"),P):void 0}function Ie(e){return"var"==e?E(ye,F(";"),Te):";"==e?E(Te):"variable"==e?E(Oe):S(H,F(";"),Te)}function Oe(e,t){return"in"==t||"of"==t?(x.marked="keyword",E(H)):E(G,Te)}function Te(e,t){return";"==e?E(De):"in"==t||"of"==t?(x.marked="keyword",E(H)):S(H,F(";"),De)}function De(e){")"!=e&&E(H)}function Re(e,t){return"*"==t?(x.marked="keyword",E(Re)):"variable"==e?(O(t),E(Re)):"("==e?E(M,A(")"),ie(Ne,")"),P,ae,V,L):s&&"<"==t?E(A(">"),ie(me,">"),P,Re):void 0}function ke(e,t){return"*"==t?(x.marked="keyword",E(ke)):"variable"==e?(O(t),E(ke)):"("==e?E(M,A(")"),ie(Ne,")"),P,ae,L):s&&"<"==t?E(A(">"),ie(me,">"),P,ke):void 0}function Me(e,t){return"keyword"==e||"variable"==e?(x.marked="type",E(Me)):"<"==t?E(A(">"),ie(me,">"),P):void 0}function Ne(e,t){return"@"==t&&E(H,Ne),"spread"==e?E(Ne):s&&T(t)?(x.marked="keyword",E(Ne)):S(be,ue,_e)}function Le(e,t){return"variable"==e?Ae(e,t):Pe(e,t)}function Ae(e,t){if("variable"==e)return O(t),E(Pe)}function Pe(e,t){return"<"==t?E(A(">"),ie(me,">"),P,Pe):"extends"==t||"implements"==t||s&&","==e?("implements"==t&&(x.marked="keyword"),E(s?ce:H,Pe)):"{"==e?E(A("}"),Fe,P):void 0}function Fe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||s&&T(t))&&x.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(x.marked="keyword",E(Fe)):"variable"==e||"keyword"==x.style?(x.marked="property",E(s?Ve:Re,Fe)):"number"==e||"string"==e?E(s?Ve:Re,Fe):"["==e?E(H,ue,F("]"),s?Ve:Re,Fe):"*"==t?(x.marked="keyword",E(Fe)):s&&"("==e?S(ke,Fe):";"==e||","==e?E(Fe):"}"==e?E():"@"==t?E(H,Fe):void 0}function Ve(e,t){if("?"==t)return E(Ve);if(":"==e)return E(ce,_e);if("="==t)return E(B);var n=x.state.lexical.prev;return S(n&&"interface"==n.info?ke:Re)}function je(e,t){return"*"==t?(x.marked="keyword",E(Ge,F(";"))):"default"==t?(x.marked="keyword",E(H,F(";"))):"{"==e?E(ie(He,"}"),Ge,F(";")):S(V)}function He(e,t){return"as"==t?(x.marked="keyword",E(F("variable"))):"variable"==e?S(B,He):void 0}function Be(e){return"string"==e?E():"("==e?S(H):S(ze,Ue,Ge)}function ze(e,t){return"{"==e?oe(ze,"}"):("variable"==e&&O(t),"*"==t&&(x.marked="keyword"),E($e))}function Ue(e){if(","==e)return E(ze,Ue)}function $e(e,t){if("as"==t)return x.marked="keyword",E(ze)}function Ge(e,t){if("from"==t)return x.marked="keyword",E(H)}function We(e){return"]"==e?E():S(ie(B,"]"))}function qe(){return S(A("form"),be,F("{"),A("}"),ie(Ke,"}"),P,P)}function Ke(){return S(be,_e)}function Ye(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return L.lex=!0,P.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new w((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new D(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=m&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==l?n:(t.lastType="operator"!=l||"++"!=i&&"--"!=i?l:"incdec",function(e,t,n,l,i){var o=e.cc;for(x.state=e,x.stream=i,x.marked=null,x.cc=o,x.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():a?H:V)(n,l)){for(;o.length&&o[o.length-1].lex;)o.pop()();return x.marked?x.marked:"variable"==n&&_(e,l)?"variable-2":t}}(t,n,l,i,e))},indent:function(t,l){if(t.tokenize==m)return e.Pass;if(t.tokenize!=g)return 0;var i,u=l&&l.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(l))for(var s=t.cc.length-1;s>=0;--s){var c=t.cc[s];if(c==P)a=a.prev;else if(c!=Se)break}for(;("stat"==a.type||"form"==a.type)&&("}"==u||(i=t.cc[t.cc.length-1])&&(i==G||i==W)&&!/^[,\.=+\-*:?[\(]/.test(l));)a=a.prev;r&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var d=a.type,h=u==d;return"vardef"==d?a.indented+("operator"==t.lastType||","==t.lastType?a.info.length+1:0):"form"==d&&"{"==u?a.indented:"form"==d?a.indented+o:"stat"==d?a.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,l)?r||o:0):"switch"!=a.info||h||0==n.doubleIndentSwitch?a.align?a.column+(h?0:1):a.indented+(h?0:o):a.indented+(/^(?:case|default)\b/.test(l)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:a?null:"/*",blockCommentEnd:a?null:"*/",blockCommentContinue:a?null:" * ",lineComment:a?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:a?"json":"javascript",jsonldMode:u,jsonMode:a,expressionAllowed:Ye,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=H&&t!=B||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n("VrN/"))},"+tJ4":function(e,t,n){"use strict";n.d(t,"a",function(){return l});var l=function(e){return function(t){for(var n=0,l=e.length;n=0}},"/NBx":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("7LN8"),a=n("Fa87"),s=n("gIcY");t.CHIPS_VALUE_ACCESSOR={provide:s.NG_VALUE_ACCESSOR,useExisting:o.forwardRef(function(){return c}),multi:!0};var c=function(){function e(e){this.el=e,this.allowDuplicate=!0,this.onAdd=new o.EventEmitter,this.onRemove=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.onBlur=new o.EventEmitter,this.onChipClick=new o.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){}}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"item":default:e.itemTemplate=t.template}})},e.prototype.onClick=function(e){this.inputViewChild.nativeElement.focus()},e.prototype.onItemClick=function(e,t){this.onChipClick.emit({originalEvent:e,value:t})},e.prototype.writeValue=function(e){this.value=e,this.updateMaxedOut()},e.prototype.registerOnChange=function(e){this.onModelChange=e},e.prototype.registerOnTouched=function(e){this.onModelTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.resolveFieldData=function(e,t){if(e&&t){if(-1==t.indexOf("."))return e[t];for(var n=t.split("."),l=e,i=0,o=n.length;i0){this.value=this.value.slice();var t=this.value.pop();this.onModelChange(this.value),this.onRemove.emit({originalEvent:e,value:t})}break;case 13:this.addItem(e,this.inputViewChild.nativeElement.value),this.inputViewChild.nativeElement.value="",e.preventDefault();break;case 9:this.addOnTab&&""!==this.inputViewChild.nativeElement.value&&(this.addItem(e,this.inputViewChild.nativeElement.value),this.inputViewChild.nativeElement.value="",e.preventDefault());break;default:this.max&&this.value&&this.max===this.value.length&&e.preventDefault()}},e.prototype.updateMaxedOut=function(){this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.disabled=!(!this.max||!this.value||this.max!==this.value.length)||this.disabled||!1)},l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",String)],e.prototype,"placeholder",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"max",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"tabindex",void 0),l([o.Input(),i("design:type",String)],e.prototype,"inputId",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"allowDuplicate",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"inputStyle",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"inputStyleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"addOnTab",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"addOnBlur",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onAdd",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRemove",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onFocus",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onBlur",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onChipClick",void 0),l([o.ViewChild("inputtext"),i("design:type",o.ElementRef)],e.prototype,"inputViewChild",void 0),l([o.ContentChildren(u.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.Component({selector:"p-chips",template:'\n
\n
    \n
  • \n \n {{field ? resolveFieldData(item,field) : item}}\n \n
  • \n
  • \n \n
  • \n
\n
\n ',providers:[t.CHIPS_VALUE_ACCESSOR]})],e)}();t.Chips=c,t.ChipsModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.InputTextModule,u.SharedModule],exports:[c,a.InputTextModule,u.SharedModule],declarations:[c]})],function(){})}()},"/WYv":function(e,t,n){"use strict";function l(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}n.d(t,"a",function(){return l})},0:function(e,t,n){e.exports=n("zUnb")},"0/uQ":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var l=n("6blF"),i=n("Fxb1"),o=n("i4X3");function r(e,t){return t?Object(o.a)(e,t):e instanceof l.a?e:new l.a(Object(i.a)(e))}},"0alx":function(e,t,n){"use strict";var l=n("VKeD");t.isIterable=function(e){return e&&"function"==typeof e[l.iterator]}},"15JJ":function(e,t,n){"use strict";n.d(t,"a",function(){return s});var l=n("mrSG"),i=n("MGBS"),o=n("rPjj"),r=n("zotm"),u=n("67Y/"),a=n("0/uQ");function s(e,t){return"function"==typeof t?function(n){return n.pipe(s(function(n,l){return Object(a.a)(e(n,l)).pipe(Object(u.a)(function(e,i){return t(n,e,l,i)}))}))}:function(t){return t.lift(new c(e))}}var c=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.project))},e}(),d=function(e){function t(t,n){var l=e.call(this,t)||this;return l.project=n,l.index=0,l}return l.__extends(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(l){return void this.destination.error(l)}this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){var l=this.innerSubscription;l&&l.unsubscribe();var i=new o.a(this,void 0,void 0);this.destination.add(i),this.innerSubscription=Object(r.a)(this,e,t,n,i)},t.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=null},t.prototype.notifyComplete=function(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t,n,l,i){this.destination.next(t)},t}(i.a)},"1eCo":function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(l,i){var o,r,u=l.indentUnit,a={},s=i.htmlMode?t:n;for(var c in s)a[c]=s[c];for(var c in i)a[c]=i[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var l=e.next();return"<"==l?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,l){for(var i;null!=(i=n.next());){if("<"==i)return l.tokenize=e(t+1),l.tokenize(n,l);if(">"==i){if(1==t){l.tokenize=d;break}return l.tokenize=e(t-1),l.tokenize(n,l)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=p,"tag bracket"):"&"==l?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function p(e,t){var n,l,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(l=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=p;break}return"string"}).isInAttribute=!0,l),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e,t){return function(n,l){for(;!n.eol();){if(n.match(t)){l.tokenize=d;break}n.next()}return e}}function f(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(a.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function m(e,t){for(var n;;){if(!e.context)return;if(!a.contextGrabbers.hasOwnProperty(n=e.context.tagName)||!a.contextGrabbers[n].hasOwnProperty(t))return;g(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),r="tag",_):a.allowMissingTagName&&"endTag"==e?(r="tag bracket",_(e,0,n)):(r="error",y)}function b(e,t,n){if("word"==e){var l=t.current();return n.context&&n.context.tagName!=l&&a.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==l||!1===a.matchClosing?(r="tag",C):(r="tag error",w)}return a.allowMissingTagName&&"endTag"==e?(r="tag bracket",C(e,0,n)):(r="error",w)}function C(e,t,n){return"endTag"!=e?(r="error",C):(g(n),v)}function w(e,t,n){return r="error",C(e,0,n)}function _(e,t,n){if("word"==e)return r="attribute",x;if("endTag"==e||"selfcloseTag"==e){var l=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||a.autoSelfClosers.hasOwnProperty(l)?m(n,l):(m(n,l),n.context=new f(n,l,i==n.indented)),v}return r="error",_}function x(e,t,n){return"equals"==e?S:(a.allowMissing||(r="error"),_(e,0,n))}function S(e,t,n){return"string"==e?E:"word"==e&&a.allowUnquoted?(r="string",_):(r="error",_(e,0,n))}function E(e,t,n){return"string"==e?E:_(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(r=null,t.state=t.state(o||n,e,t),r&&(n="error"==r?n+" error":r)),n},indent:function(t,n,l){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+u;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=p&&t.tokenize!=d)return l?l.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==a.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+u*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(e){e.state==S&&(e.state=_)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n("VrN/"))},"1fDf":function(e,t,n){"use strict";n.d(t,"a",function(){return i});var l=n("FFOo");function i(e){for(;e;){var t=e.destination;if(e.closed||e.isStopped)return!1;e=t&&t instanceof l.a?t:null}return!0}},"24Yq":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("DqLj"))},"25Eh":function(e,t,n){!function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),l=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",l.concat(i)),e.defineMode("python",function(r,u){for(var a="error",s=u.delimiters||u.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[u.singleOperators,u.doubleOperators,u.doubleDelimiters,u.tripleDelimiters,u.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],d=0;dl?_(t):i0&&x(e,t)&&(r+=" "+a),r}return w(e,t)}function w(e,t){if(e.eatSpace())return null;if(e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var l=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(l=!0),e.match(/^[\d_]+\.\d*/)&&(l=!0),e.match(/^\.\d+/)&&(l=!0),l)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}if(e.match(v))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,l="string";function i(e){return function(t,n){var l=w(t,n);return"punctuation"==l&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),l}}function o(o,r){for(;!o.eol();)if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return l}else{if(o.match(e))return r.tokenize=t,l;if(o.match("{{"))return l;if(o.match("{",!1))return r.tokenize=i(0),o.current()?l:r.tokenize(o,r);if(o.match("}}"))return l;if(o.match("}"))return a;o.eat(/['"]/)}if(n){if(u.singleLineStringErrors)return a;r.tokenize=t}return l}return o.isString=!0,o}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,l="string";function i(i,o){for(;!i.eol();)if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return l}else{if(i.match(e))return o.tokenize=t,l;i.eat(/['"]/)}if(n){if(u.singleLineStringErrors)return a;o.tokenize=t}return l}return i.isString=!0,i}(e.current(),t.tokenize),t.tokenize(e,t));for(var o=0;o1&&o(t).offset>n;){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}return{startState:function(e){return{tokenize:C,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var l=function(e,t){e.sol()&&(t.beginningOfLine=!0);var n=t.tokenize(e,t),l=e.current();if(t.beginningOfLine&&"@"==l)return e.match(m,!1)?"meta":g?"operator":a;if(/\S/.test(l)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=l&&"return"!=l||(t.dedent+=1),"lambda"==l&&(t.lambda=!0),":"!=l||t.lambda||"py"!=o(t).type||_(t),1==l.length&&!/string|comment/.test(n)){var i="[({".indexOf(l);if(-1!=i&&function(e,t,n){var l=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+p,type:n,align:l})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(l))){if(o(t).type!=l)return a;t.indent=t.scopes.pop().offset-p}}return t.dedent>0&&e.eol()&&"py"==o(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),n}(e,t);return l&&"comment"!=l&&(t.lastToken="keyword"==l||"punctuation"==l?e.current():l),"punctuation"==l&&(l=null),e.eol()&&t.lambda&&(t.lambda=!1),n?l+" "+a:l},indent:function(t,n){if(t.tokenize!=C)return t.tokenize.isString?e.Pass:0;var l=o(t),i=l.type==n.charAt(0);return null!=l.align?l.align-(i?1:0):l.offset-(i?p:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-python","python"),e.defineMIME("text/x-cython",{name:"python",extra_keywords:"by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE".split(" ")})}(n("VrN/"))},"26FU":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var l=n("mrSG"),i=n("K9Ia"),o=n("8g8A"),r=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return l.__extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.a)},"2Bdj":function(e,t,n){"use strict";function l(e){return"function"==typeof e}n.d(t,"a",function(){return l})},"2KeD":function(e,t,n){"use strict";var l=n("Q1FS"),i=n("zB/H"),o=n("zfKp");t.scheduleObservable=function(e,t){return new l.Observable(function(n){var l=new i.Subscription;return l.add(t.schedule(function(){var i=e[o.observable]();l.add(i.subscribe({next:function(e){l.add(t.schedule(function(){return n.next(e)}))},error:function(e){l.add(t.schedule(function(){return n.error(e)}))},complete:function(){l.add(t.schedule(function(){return n.complete()}))}}))})),l})}},"2bbZ":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("ihYY"),u=n("cdZy"),a=(n("V3HQ"),n("Ip0R")),s=n("sdDj"),c=(n("RWz4"),function(){function e(e,t,n,l,i,o){this.componentFactoryResolver=e,this.cd=t,this.renderer=n,this.config=l,this.dialogRef=i,this.zone=o,this.visible=!0}return e.prototype.ngAfterViewInit=function(){this.loadChildComponent(this.childComponentType),this.cd.detectChanges()},e.prototype.onOverlayClicked=function(e){this.dialogRef.close()},e.prototype.onDialogClicked=function(e){e.stopPropagation()},e.prototype.loadChildComponent=function(e){var t=this.componentFactoryResolver.resolveComponentFactory(e),n=this.insertionPoint.viewContainerRef;n.clear(),this.componentRef=n.createComponent(t)},e.prototype.moveOnTop=function(){if(!1!==this.config.autoZIndex){var e=this.config.baseZIndex||++s.DomHandler.zindex+0;this.container.style.zIndex=String(e),this.maskViewChild.nativeElement.style.zIndex=String(e-1)}},e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.moveOnTop(),this.bindGlobalListeners(),s.DomHandler.addClass(document.body,"ui-overflow-hidden");break;case"void":this.onContainerDestroy()}},e.prototype.onAnimationEnd=function(e){"void"===e.toState&&this.dialogRef.close()},e.prototype.onContainerDestroy=function(){s.DomHandler.removeClass(document.body,"ui-overflow-hidden"),this.unbindGlobalListeners(),this.container=null},e.prototype.close=function(){this.visible=!1},e.prototype.onMaskClick=function(){this.config.dismissableMask&&this.close()},e.prototype.bindGlobalListeners=function(){!1!==this.config.closeOnEscape&&!1!==this.config.closable&&this.bindDocumentEscapeListener()},e.prototype.unbindGlobalListeners=function(){this.unbindDocumentEscapeListener()},e.prototype.bindDocumentEscapeListener=function(){var e=this;this.documentEscapeListener=this.renderer.listen("document","keydown",function(t){27==t.which&&parseInt(e.container.style.zIndex)==s.DomHandler.zindex&&e.close()})},e.prototype.unbindDocumentEscapeListener=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.ngOnDestroy=function(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy()},l([o.ViewChild(u.DynamicDialogContent),i("design:type",u.DynamicDialogContent)],e.prototype,"insertionPoint",void 0),l([o.ViewChild("mask"),i("design:type",o.ElementRef)],e.prototype,"maskViewChild",void 0),l([o.Component({selector:"p-dynamicDialog",template:'\n\t\t
\n\t\t
\n
\n {{config.header}}\n \n \n \n
\n
\n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t
\n\t',animations:[r.trigger("animation",[r.state("void",r.style({transform:"translate3d(-50%, -25%, 0) scale(0.9)",opacity:0})),r.state("visible",r.style({transform:"translateX(-50%) translateY(-50%)",opacity:1})),r.transition("* => *",r.animate("{{transitionParams}}"))])]})],e)}());t.DynamicDialogComponent=c,t.DynamicDialogModule=function(){return l([o.NgModule({imports:[a.CommonModule],declarations:[c,u.DynamicDialogContent],entryComponents:[c]})],function(){})}()},"2ePl":function(e,t,n){"use strict";n.d(t,"a",function(){return l});var l=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},"2m6e":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=(n("gIcY"),n("Ip0R")),u=function(){function e(e,t){this.el=e,this.ngModel=t,this.onResize=new o.EventEmitter}return e.prototype.ngDoCheck=function(){this.updateFilledState(),this.autoResize&&this.resize()},e.prototype.onInput=function(e){this.updateFilledState(),this.autoResize&&this.resize(e)},e.prototype.updateFilledState=function(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model},e.prototype.onFocus=function(e){this.autoResize&&this.resize(e)},e.prototype.onBlur=function(e){this.autoResize&&this.resize(e)},e.prototype.resize=function(e){this.el.nativeElement.style.height="",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(e||{})},l([o.Input(),i("design:type",Boolean)],e.prototype,"autoResize",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onResize",void 0),l([o.HostListener("input",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onInput",null),l([o.HostListener("focus",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onFocus",null),l([o.HostListener("blur",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onBlur",null),l([o.Directive({selector:"[pInputTextarea]",host:{"[class.ui-inputtext]":"true","[class.ui-corner-all]":"true","[class.ui-inputtextarea-resizable]":"autoResize","[class.ui-state-default]":"true","[class.ui-widget]":"true","[class.ui-state-filled]":"filled"}})],e)}();t.InputTextarea=u,t.InputTextareaModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[u],declarations:[u]})],function(){})}()},"2qMH":function(e,t,n){"use strict";var l=n("Q1FS"),i=n("zB/H");t.scheduleArray=function(e,t){return new l.Observable(function(n){var l=new i.Subscription,o=0;return l.add(t.schedule(function(){o!==e.length?(n.next(e[o++]),n.closed||l.add(this.schedule())):n.complete()})),l})}},"3GNW":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("ihYY"),u=n("Ip0R"),a=n("sdDj"),s=n("7LN8"),c=n("VSng"),d=(n("oygf"),function(){function e(e,t,n,l){var i=this;this.el=e,this.renderer=t,this.confirmationService=n,this.zone=l,this.acceptIcon="pi pi-check",this.acceptLabel="Yes",this.acceptVisible=!0,this.rejectIcon="pi pi-times",this.rejectLabel="No",this.rejectVisible=!0,this.closeOnEscape=!0,this.closable=!0,this.autoZIndex=!0,this.baseZIndex=0,this.transitionOptions="400ms cubic-bezier(0.25, 0.8, 0.25, 1)",this.subscription=this.confirmationService.requireConfirmation$.subscribe(function(e){e.key===i.key&&(i.confirmation=e,i.message=i.confirmation.message||i.message,i.icon=i.confirmation.icon||i.icon,i.header=i.confirmation.header||i.header,i.rejectVisible=null==i.confirmation.rejectVisible?i.rejectVisible:i.confirmation.rejectVisible,i.acceptVisible=null==i.confirmation.acceptVisible?i.acceptVisible:i.confirmation.acceptVisible,i.acceptLabel=i.confirmation.acceptLabel||i.acceptLabel,i.rejectLabel=i.confirmation.rejectLabel||i.rejectLabel,i.confirmation.accept&&(i.confirmation.acceptEvent=new o.EventEmitter,i.confirmation.acceptEvent.subscribe(i.confirmation.accept)),i.confirmation.reject&&(i.confirmation.rejectEvent=new o.EventEmitter,i.confirmation.rejectEvent.subscribe(i.confirmation.reject)),i.visible=!0)})}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e,console.warn("width property is deprecated, use style to define the width of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e,console.warn("height property is deprecated, use style to define the height of the Dialog.")},enumerable:!0,configurable:!0}),e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.setDimensions(),this.contentContainer=a.DomHandler.findSingle(this.container,".ui-dialog-content"),a.DomHandler.findSingle(this.container,"button").focus(),this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.enableModality();break;case"void":this.onOverlayHide()}},e.prototype.setDimensions=function(){this.width&&(this.container.style.width=this.width+"px"),this.height&&(this.container.style.height=this.height+"px")},e.prototype.appendContainer=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):a.DomHandler.appendChild(this.container,this.appendTo))},e.prototype.restoreAppend=function(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)},e.prototype.enableModality=function(){this.mask||(this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(this.container.style.zIndex)-1),a.DomHandler.addMultipleClasses(this.mask,"ui-widget-overlay ui-dialog-mask"),document.body.appendChild(this.mask),a.DomHandler.addClass(document.body,"ui-overflow-hidden"))},e.prototype.disableModality=function(){this.mask&&(document.body.removeChild(this.mask),a.DomHandler.removeClass(document.body,"ui-overflow-hidden"),this.mask=null)},e.prototype.close=function(e){this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(),this.hide(),e.preventDefault()},e.prototype.hide=function(){this.visible=!1},e.prototype.moveOnTop=function(){this.autoZIndex&&(this.container.style.zIndex=String(this.baseZIndex+ ++a.DomHandler.zindex))},e.prototype.bindGlobalListeners=function(){var e=this;this.closeOnEscape&&this.closable&&!this.documentEscapeListener&&(this.documentEscapeListener=this.renderer.listen("document","keydown",function(t){27==t.which&&parseInt(e.container.style.zIndex)===a.DomHandler.zindex&&e.visible&&e.close(t)}))},e.prototype.unbindGlobalListeners=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.onOverlayHide=function(){this.disableModality(),this.unbindGlobalListeners(),this.container=null},e.prototype.ngOnDestroy=function(){this.restoreAppend(),this.onOverlayHide(),this.subscription.unsubscribe()},e.prototype.accept=function(){this.confirmation.acceptEvent&&this.confirmation.acceptEvent.emit(),this.hide(),this.confirmation=null},e.prototype.reject=function(){this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(),this.hide(),this.confirmation=null},l([o.Input(),i("design:type",Boolean)],e.prototype,"visible",void 0),l([o.Input(),i("design:type",String)],e.prototype,"header",void 0),l([o.Input(),i("design:type",String)],e.prototype,"icon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"message",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",String)],e.prototype,"acceptIcon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"acceptLabel",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"acceptVisible",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rejectIcon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rejectLabel",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"rejectVisible",void 0),l([o.Input(),i("design:type",String)],e.prototype,"acceptButtonStyleClass",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rejectButtonStyleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"closeOnEscape",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"rtl",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"closable",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"appendTo",void 0),l([o.Input(),i("design:type",String)],e.prototype,"key",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"autoZIndex",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"baseZIndex",void 0),l([o.Input(),i("design:type",String)],e.prototype,"transitionOptions",void 0),l([o.ContentChild(s.Footer),i("design:type",Object)],e.prototype,"footer",void 0),l([o.ViewChild("content"),i("design:type",o.ElementRef)],e.prototype,"contentViewChild",void 0),l([o.Input(),i("design:type",Object),i("design:paramtypes",[Object])],e.prototype,"width",null),l([o.Input(),i("design:type",Object),i("design:paramtypes",[Object])],e.prototype,"height",null),l([o.Component({selector:"p-confirmDialog",template:'\n
\n
\n {{header}}\n \n \n \n
\n
\n \n \n
\n \n \n
\n ',animations:[r.trigger("animation",[r.state("void",r.style({transform:"translate3d(-50%, -25%, 0) scale(0.9)",opacity:0})),r.state("visible",r.style({transform:"translateX(-50%) translateY(-50%)",opacity:1})),r.transition("* => *",r.animate("{{transitionParams}}"))])]})],e)}());t.ConfirmDialog=d,t.ConfirmDialogModule=function(){return l([o.NgModule({imports:[u.CommonModule,c.ButtonModule],exports:[d,c.ButtonModule,s.SharedModule],declarations:[d]})],function(){})}()},"3PJ4":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("sdDj"),a=function(){function e(e,t){this.el=e,this.zone=t,this.onDragStart=new o.EventEmitter,this.onDragEnd=new o.EventEmitter,this.onDrag=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){this.pDraggableDisabled||(this.el.nativeElement.draggable=!0,this.bindMouseListeners())},e.prototype.bindDragListener=function(){var e=this;this.dragListener||this.zone.runOutsideAngular(function(){e.dragListener=e.drag.bind(e),e.el.nativeElement.addEventListener("drag",e.dragListener)})},e.prototype.unbindDragListener=function(){var e=this;this.dragListener&&this.zone.runOutsideAngular(function(){e.el.nativeElement.removeEventListener("drag",e.dragListener),e.dragListener=null})},e.prototype.bindMouseListeners=function(){var e=this;this.mouseDownListener||this.mouseUpListener||this.zone.runOutsideAngular(function(){e.mouseDownListener=e.mousedown.bind(e),e.mouseUpListener=e.mouseup.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.el.nativeElement.addEventListener("mouseup",e.mouseUpListener)})},e.prototype.unbindMouseListeners=function(){var e=this;this.mouseDownListener&&this.mouseUpListener&&this.zone.runOutsideAngular(function(){e.el.nativeElement.removeEventListener("mousedown",e.mouseDownListener),e.el.nativeElement.removeEventListener("mouseup",e.mouseUpListener),e.mouseDownListener=null,e.mouseUpListener=null})},e.prototype.drag=function(e){this.onDrag.emit(e)},e.prototype.dragStart=function(e){this.allowDrag()?(this.dragEffect&&(e.dataTransfer.effectAllowed=this.dragEffect),e.dataTransfer.setData("text",this.scope),this.onDragStart.emit(e),this.bindDragListener()):e.preventDefault()},e.prototype.dragEnd=function(e){this.onDragEnd.emit(e),this.unbindDragListener()},e.prototype.mousedown=function(e){this.handle=e.target},e.prototype.mouseup=function(e){this.handle=null},e.prototype.allowDrag=function(){return!this.dragHandle||!this.handle||u.DomHandler.matches(this.handle,this.dragHandle)},e.prototype.ngOnDestroy=function(){this.unbindDragListener(),this.unbindMouseListeners()},l([o.Input("pDraggable"),i("design:type",String)],e.prototype,"scope",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pDraggableDisabled",void 0),l([o.Input(),i("design:type",String)],e.prototype,"dragEffect",void 0),l([o.Input(),i("design:type",String)],e.prototype,"dragHandle",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDragStart",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDragEnd",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDrag",void 0),l([o.HostListener("dragstart",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"dragStart",null),l([o.HostListener("dragend",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"dragEnd",null),l([o.Directive({selector:"[pDraggable]"})],e)}();t.Draggable=a;var s=function(){function e(e,t){this.el=e,this.zone=t,this.onDragEnter=new o.EventEmitter,this.onDragLeave=new o.EventEmitter,this.onDrop=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){this.pDroppableDisabled||this.bindDragOverListener()},e.prototype.bindDragOverListener=function(){var e=this;this.dragOverListener||this.zone.runOutsideAngular(function(){e.dragOverListener=e.dragOver.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener)})},e.prototype.unbindDragOverListener=function(){var e=this;this.dragOverListener&&this.zone.runOutsideAngular(function(){e.el.nativeElement.removeEventListener("dragover",e.dragOverListener),e.dragOverListener=null})},e.prototype.dragOver=function(e){e.preventDefault()},e.prototype.drop=function(e){this.allowDrop(e)&&(e.preventDefault(),this.onDrop.emit(e))},e.prototype.dragEnter=function(e){e.preventDefault(),this.dropEffect&&(e.dataTransfer.dropEffect=this.dropEffect),this.onDragEnter.emit(e)},e.prototype.dragLeave=function(e){e.preventDefault(),this.onDragLeave.emit(e)},e.prototype.allowDrop=function(e){var t=e.dataTransfer.getData("text");if("string"==typeof this.scope&&t==this.scope)return!0;if(this.scope instanceof Array)for(var n=0;n\n
\n \n
\n
\n
{{header}}
\n
{{subheader}}
\n
\n \n
\n \n
\n \n '})],e)}();t.Card=a,t.CardModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[a,u.SharedModule],declarations:[a]})],function(){})}()},"5EhP":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicDialogInjector=function(){function e(e,t){this._parentInjector=e,this._additionalTokens=t}return e.prototype.get=function(e,t,n){return this._additionalTokens.get(e)||this._parentInjector.get(e,t)},e}()},"5xuf":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=function(){function e(e,t,n){this.el=e,this.renderer=t,this.viewContainer=n,this.onLoad=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){var e=this;this.shouldLoad()&&this.load(),this.isLoaded()||(this.documentScrollListener=this.renderer.listen("window","scroll",function(){e.shouldLoad()&&(e.load(),e.documentScrollListener(),e.documentScrollListener=null)}))},e.prototype.shouldLoad=function(){if(this.isLoaded())return!1;var e=this.el.nativeElement.getBoundingClientRect();return document.documentElement.clientHeight>=e.top},e.prototype.load=function(){this.view=this.viewContainer.createEmbeddedView(this.template),this.onLoad.emit()},e.prototype.isLoaded=function(){return null!=this.view},e.prototype.ngOnDestroy=function(){this.view=null,this.documentScrollListener&&this.documentScrollListener()},l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onLoad",void 0),l([o.ContentChild(o.TemplateRef),i("design:type",o.TemplateRef)],e.prototype,"template",void 0),l([o.Directive({selector:"[pDefer]"})],e)}();t.DeferredLoader=u,t.DeferModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[u],declarations:[u]})],function(){})}()},"60iU":function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"a",function(){return u});var l,i=n("G5J1"),o=n("F/XL"),r=n("XlPw");l||(l={});var u=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Object(o.a)(this.value);case"E":return Object(r.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},"66nc":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("ihYY"),u=n("Ip0R"),a=n("sdDj"),s=n("7LN8"),c=0,d=function(){function e(e,t,n){this.el=e,this.renderer=t,this.zone=n,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.responsive=!0,this.showHeader=!0,this.breakpoint=640,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.transitionOptions="400ms cubic-bezier(0.25, 0.8, 0.25, 1)",this.closeIcon="pi pi-times",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new o.EventEmitter,this.onHide=new o.EventEmitter,this.visibleChange=new o.EventEmitter,this.id="ui-dialog-"+c++}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e,console.warn("width property is deprecated, use style to define the width of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e,console.warn("height property is deprecated, use style to define the height of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){return this._minWidth},set:function(e){this._minWidth=e,console.warn("minWidth property is deprecated, use style to define the minWidth of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeight",{get:function(){return this._minHeight},set:function(e){this._minHeight=e,console.warn("minHeight property is deprecated, use style to define the minHeight of the Dialog.")},enumerable:!0,configurable:!0}),e.prototype.focus=function(){var e=a.DomHandler.findSingle(this.container,"button");e&&this.zone.runOutsideAngular(function(){setTimeout(function(){return e.focus()},5)})},e.prototype.positionOverlay=function(){var e=a.DomHandler.getViewport();a.DomHandler.getOuterHeight(this.container)>e.height?(this.contentViewChild.nativeElement.style.height=.75*e.height+"px",this.container.style.height="auto"):(this.contentViewChild.nativeElement.style.height=null,this.height&&(this.container.style.height=this.height+"px")),this.positionLeft>=0&&this.positionTop>=0?(this.container.style.left=this.positionLeft+"px",this.container.style.top=this.positionTop+"px"):this.positionTop>=0?(this.center(),this.container.style.top=this.positionTop+"px"):this.center()},e.prototype.close=function(e){this.visibleChange.emit(!1),e.preventDefault()},e.prototype.center=function(){var e=a.DomHandler.getOuterWidth(this.container),t=a.DomHandler.getOuterHeight(this.container);0==e&&0==t&&(this.container.style.visibility="hidden",this.container.style.display="block",e=a.DomHandler.getOuterWidth(this.container),t=a.DomHandler.getOuterHeight(this.container),this.container.style.display="none",this.container.style.visibility="visible");var n=a.DomHandler.getViewport(),l=Math.max(Math.floor((n.width-e)/2),0),i=Math.max(Math.floor((n.height-t)/2),0);this.container.style.left=l+"px",this.container.style.top=i+"px"},e.prototype.enableModality=function(){var e=this;if(!this.mask){this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(this.container.style.zIndex)-1);var t="ui-widget-overlay ui-dialog-mask";this.blockScroll&&(t+=" ui-dialog-mask-scrollblocker"),a.DomHandler.addMultipleClasses(this.mask,t),this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.mask,"click",function(t){e.close(t)})),document.body.appendChild(this.mask),this.blockScroll&&a.DomHandler.addClass(document.body,"ui-overflow-hidden")}},e.prototype.disableModality=function(){if(this.mask){if(this.unbindMaskClickListener(),document.body.removeChild(this.mask),this.blockScroll){for(var e=document.body.children,t=void 0,n=0;n=this.minX&&r+t=this.minY&&u+nparseInt(s))&&d.left+rparseInt(c))&&d.top+u\n
\n {{header}}\n \n \n \n \n \n \n \n \n \n
\n
\n \n
\n \n
\n \n ',animations:[r.trigger("animation",[r.state("void",r.style({transform:"translate3d(0, 25%, 0) scale(0.9)",opacity:0})),r.state("visible",r.style({transform:"none",opacity:1})),r.transition("* => *",r.animate("{{transitionParams}}"))])]})],e)}();t.Dialog=d,t.DialogModule=function(){return l([o.NgModule({imports:[u.CommonModule],exports:[d,s.SharedModule],declarations:[d]})],function(){})}()},"67Y/":function(e,t,n){"use strict";n.d(t,"a",function(){return o});var l=n("mrSG"),i=n("FFOo");function o(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new r(e,t))}}var r=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project,this.thisArg))},e}(),u=function(e){function t(t,n,l){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=l||i,i}return l.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(i.a)},"6MUB":function(e,t,n){"use strict";var l=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(l(i))+n;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(l(e))}).join(t):o+encodeURIComponent(l(e[i]))}).join(t):i?encodeURIComponent(l(i))+n+encodeURIComponent(l(e)):""}},"6ahw":function(e,t,n){"use strict";n.d(t,"a",function(){return o});var l=n("iLxQ"),i=n("DKTb"),o={closed:!0,next:function(e){},error:function(e){if(l.a.useDeprecatedSynchronousErrorHandling)throw e;Object(i.a)(e)},complete:function(){}}},"6blF":function(e,t,n){"use strict";n.d(t,"a",function(){return c});var l=n("1fDf"),i=n("FFOo"),o=n("L/V9"),r=n("6ahw"),u=n("xTla"),a=n("y3By"),s=n("iLxQ"),c=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var l=this.operator,u=function(e,t,n){if(e){if(e instanceof i.a)return e;if(e[o.a])return e[o.a]()}return e||t||n?new i.a(e,t,n):new i.a(r.a)}(e,t,n);if(u.add(l?l.call(u,this.source):this.source||s.a.useDeprecatedSynchronousErrorHandling&&!u.syncErrorThrowable?this._subscribe(u):this._trySubscribe(u)),s.a.useDeprecatedSynchronousErrorHandling&&u.syncErrorThrowable&&(u.syncErrorThrowable=!1,u.syncErrorThrown))throw u.syncErrorValue;return u},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Object(l.a)(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=d(t))(function(t,l){var i;i=n.subscribe(function(t){try{e(t)}catch(n){l(n),i&&i.unsubscribe()}},l,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[u.a]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t\n \n \n '})],e)}();t.Steps=a,t.StepsModule=function(){return l([o.NgModule({imports:[r.CommonModule,u.RouterModule],exports:[a,u.RouterModule],declarations:[a]})],function(){})}()},"7LN8":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("CcnG"),a=function(){return l([u.Component({selector:"p-header",template:""})],function(){})}();t.Header=a;var s=function(){return l([u.Component({selector:"p-footer",template:""})],function(){})}();t.Footer=s;var c=function(){function e(e){this.template=e}return e.prototype.getType=function(){return this.name},l([o.Input(),i("design:type",String)],e.prototype,"type",void 0),l([o.Input("pTemplate"),i("design:type",String)],e.prototype,"name",void 0),l([o.Directive({selector:"[pTemplate]",host:{}})],e)}();t.PrimeTemplate=c;var d=function(){function e(){this.filterType="text",this.exportable=!0,this.resizable=!0,this.sortFunction=new o.EventEmitter}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"header":e.headerTemplate=t.template;break;case"body":e.bodyTemplate=t.template;break;case"footer":e.footerTemplate=t.template;break;case"filter":e.filterTemplate=t.template;break;case"editor":e.editorTemplate=t.template;break;default:e.bodyTemplate=t.template}})},l([o.Input(),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",String)],e.prototype,"colId",void 0),l([o.Input(),i("design:type",String)],e.prototype,"sortField",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterField",void 0),l([o.Input(),i("design:type",String)],e.prototype,"header",void 0),l([o.Input(),i("design:type",String)],e.prototype,"footer",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"sortable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"editable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"filter",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterMatchMode",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterType",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"excludeGlobalFilter",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"rowspan",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"colspan",void 0),l([o.Input(),i("design:type",String)],e.prototype,"scope",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"exportable",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"headerStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"headerStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"bodyStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"bodyStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"footerStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"footerStyleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"hidden",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"expander",void 0),l([o.Input(),i("design:type",String)],e.prototype,"selectionMode",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterPlaceholder",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"filterMaxlength",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"resizable",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"sortFunction",void 0),l([o.ContentChildren(c),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.ContentChild(o.TemplateRef),i("design:type",o.TemplateRef)],e.prototype,"template",void 0),l([u.Component({selector:"p-column",template:""})],e)}();t.Column=d;var p=function(){function e(){}return l([o.ContentChildren(d),i("design:type",o.QueryList)],e.prototype,"columns",void 0),l([u.Component({selector:"p-row",template:""})],e)}();t.Row=p;var h=function(){function e(){}return l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.ContentChildren(p),i("design:type",o.QueryList)],e.prototype,"rows",void 0),l([u.Component({selector:"p-headerColumnGroup",template:""})],e)}();t.HeaderColumnGroup=h;var f=function(){function e(){}return l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.ContentChildren(p),i("design:type",o.QueryList)],e.prototype,"rows",void 0),l([u.Component({selector:"p-footerColumnGroup",template:""})],e)}();t.FooterColumnGroup=f,t.SharedModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[a,s,d,c,p,h,f],declarations:[a,s,d,c,p,h,f]})],function(){})}()},"8EBN":function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n\n
\n \n
\n
\n \n
\n \n '})],e)}();t.DTRadioButton=h;var f=function(){function e(){this.onChange=new o.EventEmitter}return e.prototype.handleClick=function(e){this.disabled||this.onChange.emit({originalEvent:e,checked:!this.checked})},l([o.Input(),i("design:type",Boolean)],e.prototype,"checked",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onChange",void 0),l([o.Component({selector:"p-dtCheckbox",template:'\n
\n
\n \n
\n
\n \n
\n
\n '})],e)}();t.DTCheckbox=f;var g=function(){function e(e){this.dt=e}return l([o.Input("pColumnHeaders"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Component({selector:"[pColumnHeaders]",template:'\n \n
\n \n '})],e)}();t.ColumnHeaders=g;var m=function(){function e(e){this.dt=e}return l([o.Input("pColumnFooters"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Component({selector:"[pColumnFooters]",template:'\n \n '})],e)}();t.ColumnFooters=m;var v=function(){function e(e){this.dt=e}return e.prototype.visibleColumns=function(){return this.columns?this.columns.filter(function(e){return!e.hidden}):[]},l([o.Input("pTableBody"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"data",void 0),l([o.Component({selector:"[pTableBody]",template:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n '})],e)}();t.TableBody=v;var y=function(){function e(e,t,n,l){this.dt=e,this.el=t,this.renderer=n,this.zone=l,this.onVirtualScroll=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){this.initScrolling()},e.prototype.ngAfterViewChecked=function(){var e=this;if(this.virtualScroll&&!this.rowHeight){var t=d.DomHandler.findSingle(this.scrollTable,"tr.ui-widget-content:not(.ui-datatable-emptymessage-row)");t&&(this.rowHeight=d.DomHandler.getOuterHeight(t))}this.frozen||this.zone.runOutsideAngular(function(){setTimeout(function(){e.alignScrollBar()},1)})},e.prototype.initScrolling=function(){var e=this;this.scrollHeader=this.scrollHeaderViewChild.nativeElement,this.scrollHeaderBox=this.scrollHeaderBoxViewChild.nativeElement,this.scrollBody=this.scrollBodyViewChild.nativeElement,this.scrollTable=this.scrollTableViewChild.nativeElement,this.scrollTableWrapper=this.scrollTableWrapperViewChild.nativeElement,this.scrollFooter=this.scrollFooterViewChild?this.scrollFooterViewChild.nativeElement:null,this.scrollFooterBox=this.scrollFooterBoxViewChild?this.scrollFooterBoxViewChild.nativeElement:null,this.setScrollHeight(),this.frozen||this.zone.runOutsideAngular(function(){e.scrollHeader.addEventListener("scroll",e.onHeaderScroll.bind(e)),e.scrollBody.addEventListener("scroll",e.onBodyScroll.bind(e))}),this.frozen?this.scrollBody.style.paddingBottom=d.DomHandler.calculateScrollbarWidth()+"px":this.alignScrollBar()},e.prototype.onBodyScroll=function(e){var t=this,n=this.el.nativeElement.previousElementSibling;if(n)var l=d.DomHandler.findSingle(n,".ui-datatable-scrollable-body");if(this.scrollHeaderBox.style.marginLeft=-1*this.scrollBody.scrollLeft+"px",this.scrollFooterBox&&(this.scrollFooterBox.style.marginLeft=-1*this.scrollBody.scrollLeft+"px"),l&&(l.scrollTop=this.scrollBody.scrollTop),this.virtualScroll){var i=d.DomHandler.getOuterHeight(this.scrollBody),o=d.DomHandler.getOuterHeight(this.scrollTable),r=this.rowHeight*this.dt.rows,u=d.DomHandler.getOuterHeight(this.scrollTableWrapper)/r||1;if(this.scrollBody.scrollTop+i>parseFloat(this.scrollTable.style.top)+o||this.scrollBody.scrollTopd.DomHandler.getOuterHeight(this.scrollBody)},e.prototype.alignScrollBar=function(){var e=this.hasVerticalOverflow()?d.DomHandler.calculateScrollbarWidth():0;this.scrollHeaderBox.style.marginRight=e+"px",this.scrollFooterBox&&(this.scrollFooterBox.style.marginRight=e+"px")},e.prototype.ngOnDestroy=function(){this.scrollHeader.removeEventListener("scroll",this.onHeaderScroll),this.scrollBody.removeEventListener("scroll",this.onBodyScroll)},l([o.Input("pScrollableView"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input(),i("design:type",c.HeaderColumnGroup)],e.prototype,"headerColumnGroup",void 0),l([o.Input(),i("design:type",c.HeaderColumnGroup)],e.prototype,"footerColumnGroup",void 0),l([o.ViewChild("scrollHeader"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderViewChild",void 0),l([o.ViewChild("scrollHeaderBox"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderBoxViewChild",void 0),l([o.ViewChild("scrollBody"),i("design:type",o.ElementRef)],e.prototype,"scrollBodyViewChild",void 0),l([o.ViewChild("scrollTable"),i("design:type",o.ElementRef)],e.prototype,"scrollTableViewChild",void 0),l([o.ViewChild("scrollTableWrapper"),i("design:type",o.ElementRef)],e.prototype,"scrollTableWrapperViewChild",void 0),l([o.ViewChild("scrollFooter"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterViewChild",void 0),l([o.ViewChild("scrollFooterBox"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterBoxViewChild",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.Input(),i("design:type",String)],e.prototype,"width",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"virtualScroll",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onVirtualScroll",void 0),l([o.Component({selector:"[pScrollableView]",template:'\n
\n
\n
{{ _('Item') }} \n \n {{col.header}}\n \n \n \n \n \n \n \n \n \n \n {{col.footer}}\n \n \n \n
\n \n \n \n \n \n \n
\n {{col.header}}\n {{dt.resolveFieldData(rowData,col.field)}}\n \n \n \n
\n \n \n \n \n
\n \n \n \n \n \n
\n \n
\n {{dt.emptyMessage}}\n \n \n \n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n '})],e)}();t.ScrollableView=y;var b=function(){function e(e,t,n,l,i){this.el=e,this.differs=t,this.renderer=n,this.changeDetector=l,this.zone=i,this.pageLinks=5,this.selectionChange=new o.EventEmitter,this.showHeaderCheckbox=!0,this.onRowClick=new o.EventEmitter,this.onRowSelect=new o.EventEmitter,this.onRowUnselect=new o.EventEmitter,this.onRowDblclick=new o.EventEmitter,this.onHeaderCheckboxToggle=new o.EventEmitter,this.onContextMenuSelect=new o.EventEmitter,this.filterDelay=300,this.onLazyLoad=new o.EventEmitter,this.columnResizeMode="fit",this.onColResize=new o.EventEmitter,this.onColReorder=new o.EventEmitter,this.sortMode="single",this.defaultSortOrder=1,this.csvSeparator=",",this.exportFilename="download",this.emptyMessage="No records found",this.paginatorPosition="bottom",this.alwaysShowPaginator=!0,this.metaKeySelection=!0,this.rowTrackBy=function(e,t){return t},this.immutable=!0,this.compareSelectionBy="deepEquals",this.onEditInit=new o.EventEmitter,this.onEditComplete=new o.EventEmitter,this.onEdit=new o.EventEmitter,this.onEditCancel=new o.EventEmitter,this.onPage=new o.EventEmitter,this.onSort=new o.EventEmitter,this.onFilter=new o.EventEmitter,this.rowExpandMode="multiple",this.expandedIcon="fa-chevron-circle-down",this.collapsedIcon="fa-chevron-circle-right",this.tabindex=1,this.sortableRowGroup=!0,this.filters={},this.loadingIcon="fa-circle-o-notch",this.virtualScrollDelay=500,this.rowGroupExpandMode="multiple",this.valueChange=new o.EventEmitter,this.firstChange=new o.EventEmitter,this.onRowExpand=new o.EventEmitter,this.onRowCollapse=new o.EventEmitter,this.onRowGroupExpand=new o.EventEmitter,this.onRowGroupCollapse=new o.EventEmitter,this.page=0,this.columnsChanged=!1,this._first=0,this._sortOrder=1,this.filterConstraints={startsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=t.toLowerCase();return e.toString().toLowerCase().slice(0,n.length)===n},contains:function(e,t){return null==t||"string"==typeof t&&""===t.trim()||null!=e&&-1!==e.toString().toLowerCase().indexOf(t.toLowerCase())},endsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=t.toString().toLowerCase();return-1!==e.toString().toLowerCase().indexOf(n,e.toString().length-n.length)},equals:function(e,t){return null==t||"string"==typeof t&&""===t.trim()||null!=e&&e.toString().toLowerCase()==t.toString().toLowerCase()},notEquals:function(e,t){return!(null==t||"string"==typeof t&&""===t.trim()||null!=e&&e.toString().toLowerCase()==t.toString().toLowerCase())},in:function(e,t){if(null==t||0===t.length)return!0;if(null==e)return!1;for(var n=0;n=this.totalRecords){var e=Math.ceil(this.totalRecords/this.rows);this._first=Math.max((e-1)*this.rows,0)}},e.prototype.updateTotalRecords=function(){this.totalRecords=this.lazy?this.totalRecords:this.value?this.value.length:0},e.prototype.onPageChange=function(e){this._first=e.first,this.firstChange.emit(this.first),this.rows=e.rows,this.paginate()},e.prototype.paginate=function(){this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.updateDataToRender(this.filteredValue||this.value),this.onPage.emit({first:this.first,rows:this.rows})},e.prototype.updateDataToRender=function(e){if((this.paginator||this.virtualScroll)&&e){this.dataToRender=[];for(var t=this.lazy?0:this.first,n=this.virtualScroll?this.first+2*this.rows:t+this.rows,l=t;l=e.length);l++)this.dataToRender.push(e[l])}else this.dataToRender=e;this.rowGroupMode&&this.updateRowGroupMetadata(),this.changeDetector.markForCheck()},e.prototype.onVirtualScroll=function(e){var t=this;this._first=(e.page-1)*this.rows,this.virtualScrollCallback=e.callback,this.zone.run(function(){t.virtualScrollTimer&&clearTimeout(t.virtualScrollTimer),t.virtualScrollTimer=setTimeout(function(){t.lazy?t.onLazyLoad.emit(t.createLazyLoadMetadata()):t.updateDataToRender(t.filteredValue||t.value)},t.virtualScrollDelay)})},e.prototype.onHeaderKeydown=function(e,t){13==e.keyCode&&(this.sort(e,t),e.preventDefault())},e.prototype.onHeaderMousedown=function(e,t){this.reorderableColumns&&("INPUT"!==e.target.nodeName?t.draggable=!0:"INPUT"===e.target.nodeName&&(t.draggable=!1))},e.prototype.sort=function(e,t){if(t.sortable){var n=e.target;if(d.DomHandler.hasClass(n,"ui-sortable-column")||d.DomHandler.hasClass(n,"ui-column-title")||d.DomHandler.hasClass(n,"ui-sortable-column-icon")){this.immutable||(this.preventSortPropagation=!0);var l=t.sortField||t.field;this._sortOrder=this.sortField===l?-1*this.sortOrder:this.defaultSortOrder,this._sortField=l,this.sortColumn=t,"multiple"==this.sortMode&&(this.multiSortMeta&&(e.metaKey||e.ctrlKey)||(this._multiSortMeta=[]),this.addSortMeta({field:this.sortField,order:this.sortOrder})),this.lazy?(this._first=0,this.onLazyLoad.emit(this.createLazyLoadMetadata())):"multiple"==this.sortMode?this.sortMultiple():this.sortSingle(),this.onSort.emit({field:this.sortField,order:this.sortOrder,multisortmeta:this.multiSortMeta})}this.updateDataToRender(this.filteredValue||this.value)}},e.prototype.sortSingle=function(){var e=this;this.value&&(this.sortColumn&&"custom"===this.sortColumn.sortable?(this.preventSortPropagation=!0,this.sortColumn.sortFunction.emit({field:this.sortField,order:this.sortOrder})):this.value.sort(function(t,n){var l,i=e.resolveFieldData(t,e.sortField),o=e.resolveFieldData(n,e.sortField);return l=null==i&&null!=o?-1:null!=i&&null==o?1:null==i&&null==o?0:"string"==typeof i&&"string"==typeof o?i.localeCompare(o):io?1:0,e.sortOrder*l}),this._first=0,this.hasFilter()&&this._filter())},e.prototype.sortMultiple=function(){var e=this;this.value&&(this.value.sort(function(t,n){return e.multisortField(t,n,e.multiSortMeta,0)}),this.hasFilter()&&this._filter())},e.prototype.multisortField=function(e,t,n,l){var i=this.resolveFieldData(e,n[l].field),o=this.resolveFieldData(t,n[l].field),r=null;if("string"==typeof i||i instanceof String){if(i.localeCompare&&i!=o)return n[l].order*i.localeCompare(o)}else r=il?this.multisortField(e,t,n,l+1):0:n[l].order*r},e.prototype.addSortMeta=function(e){for(var t=-1,n=0;n=0?this.multiSortMeta[t]=e:this.multiSortMeta.push(e)},e.prototype.isSorted=function(e){if(!e.sortable)return!1;var t=e.sortField||e.field;if("single"===this.sortMode)return this.sortField&&t===this.sortField;if("multiple"===this.sortMode){var n=!1;if(this.multiSortMeta)for(var l=0;lthis.anchorRowIndex?(t=this.anchorRowIndex,n=this.rangeRowIndex):this.rangeRowIndext?(n=t,l=this.anchorRowIndex):this.anchorRowIndex-1:this.equals(e,this.selection))},e.prototype.equals=function(e,t){return"equals"===this.compareSelectionBy?e===t:p.ObjectUtils.equals(e,t,this.dataKey)},Object.defineProperty(e.prototype,"allSelected",{get:function(){if(this.headerCheckboxToggleAllPages)return this.selection&&this.value&&this.selection.length===this.value.length;var e=!0;if(this.dataToRender&&this.selection&&this.dataToRender.length<=this.selection.length){for(var t=0,n=this.dataToRender;tparseInt(this.resizeColumn.style.minWidth||15)){if("fit"===this.columnResizeMode){for(var i=this.resizeColumn.nextElementSibling;d.DomHandler.hasClass(i,"ui-helper-hidden");)i=i.nextElementSibling;if(i){var o=i.offsetWidth-t;if(l>15&&o>parseInt(i.style.minWidth||15)&&(this.resizeColumn.style.width=l+"px",i&&(i.style.width=o+"px"),this.scrollable)){var r=d.DomHandler.findSingle(this.el.nativeElement,"colgroup.ui-datatable-scrollable-colgroup"),u=d.DomHandler.index(this.resizeColumn);r.children[u].style.width=l+"px",i&&(r.children[u+1].style.width=o+"px")}}}else if("expand"===this.columnResizeMode){this.tbody.parentElement.style.width=this.tbody.parentElement.offsetWidth+t+"px",this.resizeColumn.style.width=l+"px";var a=this.tbody.parentElement.style.width;this.scrollable?(d.DomHandler.findSingle(this.el.nativeElement,".ui-datatable-scrollable-header-box").children[0].style.width=a,r=d.DomHandler.findSingle(this.el.nativeElement,"colgroup.ui-datatable-scrollable-colgroup"),u=d.DomHandler.index(this.resizeColumn),r.children[u].style.width=l+"px"):this.el.nativeElement.children[0].style.width=a}this.onColResize.emit({element:this.resizeColumn,delta:t})}this.resizerHelper.style.display="none",this.resizeColumn=null,d.DomHandler.removeClass(this.el.nativeElement.children[0],"ui-unselectable-text"),this.unbindColumnResizeEvents()},e.prototype.fixColumnWidths=function(){for(var e,t=d.DomHandler.find(this.el.nativeElement,"th.ui-resizable-column"),n=0;no?(this.reorderIndicatorUp.style.left=i+t.offsetWidth-Math.ceil(this.iconWidth/2)+"px",this.reorderIndicatorDown.style.left=i+t.offsetWidth-Math.ceil(this.iconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUp.style.left=i-Math.ceil(this.iconWidth/2)+"px",this.reorderIndicatorDown.style.left=i-Math.ceil(this.iconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUp.style.display="block",this.reorderIndicatorDown.style.display="block"}else e.dataTransfer.dropEffect="none"}},e.prototype.onColumnDragleave=function(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUp.style.display="none",this.reorderIndicatorDown.style.display="none",window.document.removeEventListener("dragover",this.onColumnDragover))},e.prototype.onColumnDrop=function(e){if(e.preventDefault(),this.draggedColumn){var t=d.DomHandler.index(this.draggedColumn),n=d.DomHandler.index(this.findParentHeader(e.target)),l=t!=n;l&&(n-t==1&&-1===this.dropPosition||t-n==1&&1===this.dropPosition)&&(l=!1),l&&(p.ObjectUtils.reorderArray(this.columns,t,n),this.scrollable&&this.initScrollableColumns(),this.onColReorder.emit({dragIndex:t,dropIndex:n,columns:this.columns})),this.reorderIndicatorUp.style.display="none",this.reorderIndicatorDown.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}},e.prototype.initColumnReordering=function(){this.reorderIndicatorUp=d.DomHandler.findSingle(this.el.nativeElement.children[0],"span.ui-datatable-reorder-indicator-up"),this.reorderIndicatorDown=d.DomHandler.findSingle(this.el.nativeElement.children[0],"span.ui-datatable-reorder-indicator-down"),this.iconWidth=d.DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUp),this.iconHeight=d.DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorUp)},e.prototype.findParentHeader=function(e){if("TH"==e.nodeName)return e;for(var t=e.parentElement;"TH"!=t.nodeName&&(t=t.parentElement););return t},e.prototype.hasFooter=function(){if(this.footerColumnGroups&&this.footerColumnGroups.first)return!0;if(this.columns)for(var e=0;e=0?(this.expandedRowsGroups.splice(n,1),this.onRowGroupCollapse.emit({originalEvent:e,group:l})):("single"===this.rowGroupExpandMode&&(this.expandedRowsGroups=[]),this.expandedRowsGroups.push(l),this.onRowGroupExpand.emit({originalEvent:e,group:l})),e.preventDefault()},e.prototype.reset=function(){this._sortField=null,this._sortOrder=1,this.filteredValue=null,this.filters={},this._first=0,this.firstChange.emit(this._first),this.updateTotalRecords(),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.updateDataToRender(this.value)},e.prototype.exportCSV=function(e){var t=this,n=this.filteredValue||this.value,l="\ufeff";e&&e.selectionOnly&&(n=this.selection||[]);for(var i=0;i0},e.prototype.ngOnDestroy=function(){this.globalFilterFunction&&this.globalFilterFunction(),this.resizableColumns&&this.unbindColumnResizeEvents(),this.unbindDocumentEditListener(),this.columnsSubscription&&this.columnsSubscription.unsubscribe(),this.virtualScrollCallback&&(this.virtualScrollCallback=null)},l([o.Input(),i("design:type",Boolean)],e.prototype,"paginator",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"rows",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"pageLinks",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"rowsPerPageOptions",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"responsive",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"stacked",void 0),l([o.Input(),i("design:type",String)],e.prototype,"selectionMode",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"selectionChange",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"editable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"showHeaderCheckbox",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowClick",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowSelect",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowUnselect",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowDblclick",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onHeaderCheckboxToggle",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"headerCheckboxToggleAllPages",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onContextMenuSelect",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"filterDelay",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"lazy",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onLazyLoad",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"resizableColumns",void 0),l([o.Input(),i("design:type",String)],e.prototype,"columnResizeMode",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onColResize",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"reorderableColumns",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onColReorder",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"scrollable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"virtualScroll",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"scrollHeight",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"scrollWidth",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"frozenWidth",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"unfrozenWidth",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"tableStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"tableStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"globalFilter",void 0),l([o.Input(),i("design:type",String)],e.prototype,"sortMode",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"defaultSortOrder",void 0),l([o.Input(),i("design:type",String)],e.prototype,"groupField",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"contextMenu",void 0),l([o.Input(),i("design:type",String)],e.prototype,"csvSeparator",void 0),l([o.Input(),i("design:type",String)],e.prototype,"exportFilename",void 0),l([o.Input(),i("design:type",String)],e.prototype,"emptyMessage",void 0),l([o.Input(),i("design:type",String)],e.prototype,"paginatorPosition",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"alwaysShowPaginator",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"metaKeySelection",void 0),l([o.Input(),i("design:type",Function)],e.prototype,"rowTrackBy",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"immutable",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"frozenValue",void 0),l([o.Input(),i("design:type",String)],e.prototype,"compareSelectionBy",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEditInit",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEditComplete",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEdit",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEditCancel",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onPage",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onSort",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onFilter",void 0),l([o.ContentChild(c.Header),i("design:type",Object)],e.prototype,"header",void 0),l([o.ContentChild(c.Footer),i("design:type",Object)],e.prototype,"footer",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"expandableRows",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"expandedRows",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"expandableRowGroups",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rowExpandMode",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"expandedRowsGroups",void 0),l([o.Input(),i("design:type",String)],e.prototype,"expandedIcon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"collapsedIcon",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"tabindex",void 0),l([o.Input(),i("design:type",Function)],e.prototype,"rowStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"rowStyleMap",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rowGroupMode",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"sortableRowGroup",void 0),l([o.Input(),i("design:type",String)],e.prototype,"sortFile",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"rowHover",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"filters",void 0),l([o.Input(),i("design:type",String)],e.prototype,"dataKey",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"loading",void 0),l([o.Input(),i("design:type",String)],e.prototype,"loadingIcon",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"virtualScrollDelay",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rowGroupExpandMode",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"valueChange",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"firstChange",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowExpand",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowCollapse",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowGroupExpand",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowGroupCollapse",void 0),l([o.ContentChildren(c.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.ContentChildren(c.Column),i("design:type",o.QueryList)],e.prototype,"cols",void 0),l([o.ContentChildren(c.HeaderColumnGroup),i("design:type",o.QueryList)],e.prototype,"headerColumnGroups",void 0),l([o.ContentChildren(c.FooterColumnGroup),i("design:type",o.QueryList)],e.prototype,"footerColumnGroups",void 0),l([o.Input(),i("design:type",Array),i("design:paramtypes",[Array])],e.prototype,"multiSortMeta",null),l([o.Input(),i("design:type",String),i("design:paramtypes",[String])],e.prototype,"sortField",null),l([o.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"sortOrder",null),l([o.Input(),i("design:type",Array),i("design:paramtypes",[Array])],e.prototype,"value",null),l([o.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"first",null),l([o.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"totalRecords",null),l([o.Input(),i("design:type",Object),i("design:paramtypes",[Object])],e.prototype,"selection",null),l([o.Component({selector:"p-dataTable",template:'\n
\n
\n
\n \n
\n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n
\n '})],e)}();t.DataTable=b,t.DataTableModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.SharedModule,s.PaginatorModule,u.FormsModule],exports:[b,a.SharedModule],declarations:[b,h,f,g,m,v,y]})],function(){})}()},ARwZ:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("gIcY");t.RATING_VALUE_ACCESSOR={provide:u.NG_VALUE_ACCESSOR,useExisting:o.forwardRef(function(){return a}),multi:!0};var a=function(){function e(e){this.cd=e,this.stars=5,this.cancel=!0,this.iconOnClass="pi pi-star",this.iconOffClass="pi pi-star-o",this.iconCancelClass="pi pi-ban",this.onRate=new o.EventEmitter,this.onCancel=new o.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){}}return e.prototype.ngOnInit=function(){this.starsArray=[];for(var e=0;e\n \n \n \n \n \n \n \n ',providers:[t.RATING_VALUE_ACCESSOR]})],e)}();t.Rating=a,t.RatingModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[a],declarations:[a]})],function(){})}()},Avra:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("gIcY"),u=n("Ip0R"),a=n("sdDj"),s=(n("VeV1"),function(){function e(e,t){var n=this;this.el=e,this.terminalService=t,this.commands=[],this.subscription=t.responseHandler.subscribe(function(e){n.commands[n.commands.length-1].response=e,n.commandProcessed=!0})}return e.prototype.ngAfterViewInit=function(){this.container=a.DomHandler.find(this.el.nativeElement,".ui-terminal")[0]},e.prototype.ngAfterViewChecked=function(){this.commandProcessed&&(this.container.scrollTop=this.container.scrollHeight,this.commandProcessed=!1)},Object.defineProperty(e.prototype,"response",{set:function(e){e&&(this.commands[this.commands.length-1].response=e,this.commandProcessed=!0)},enumerable:!0,configurable:!0}),e.prototype.handleCommand=function(e){13==e.keyCode&&(this.commands.push({text:this.command}),this.terminalService.sendCommand(this.command),this.command="")},e.prototype.focus=function(e){e.focus()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",String)],e.prototype,"welcomeMessage",void 0),l([o.Input(),i("design:type",String)],e.prototype,"prompt",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",String),i("design:paramtypes",[String])],e.prototype,"response",null),l([o.Component({selector:"p-terminal",template:'\n
\n
{{welcomeMessage}}
\n
\n
\n {{prompt}}\n {{command.text}}\n
{{command.response}}
\n
\n
\n
\n {{prompt}}\n \n
\n
\n '})],e)}());t.Terminal=s,t.TerminalModule=function(){return l([o.NgModule({imports:[u.CommonModule,r.FormsModule],exports:[s],declarations:[s]})],function(){})}()},AxiF:function(e,t,n){"use strict";n.d(t,"a",function(){return u});var l=n("mrSG"),i=n("FFOo"),o=n("b7mW"),r=n("G5J1");function u(e){return function(t){return 0===e?Object(r.b)():t.lift(new a(e))}}var a=function(){function e(e){if(this.total=e,this.total<0)throw new o.a}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,n){var l=e.call(this,t)||this;return l.total=n,l.ring=new Array,l.count=0,l}return l.__extends(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,l=this.count++;t.length0)for(var n=this.count>=this.total?this.total:this.count,l=this.ring,i=0;it.cursorCoords(n,"window").top&&((h=l).style.opacity=.4)}))};!function(e,t,n,l,i){e.openDialog(t,f,{value:s,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){d(e)},onKeyDown:i})}(t,p(t),0,0,function(l,i){var o=e.keyName(l),r=t.getOption("extraKeys"),u=r&&r[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==u||"findPrev"==u||"findPersistentNext"==u||"findPersistentPrev"==u?(e.e_stop(l),a(t,n(t),i),t.execCommand(u)):"find"!=u&&"findPersistent"!=u||(e.e_stop(l),f(i,l))}),r&&s&&(a(t,u,s),c(t,l))}else o(t,p(t),"Search for:",s,function(e){e&&!u.query&&t.operation(function(){a(t,u,e),u.posFrom=u.posTo=t.getCursor(),c(t,l)})})}function c(t,l,o){t.operation(function(){var r=n(t),u=i(t,r.query,l?r.posFrom:r.posTo);(u.find(l)||(u=i(t,r.query,l?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(l))&&(t.setSelection(u.from(),u.to()),t.scrollIntoView({from:u.from(),to:u.to()},20),r.posFrom=u.from(),r.posTo=u.to(),o&&o(u.from(),u.to()))})}function d(e){e.operation(function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function p(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function h(e,t,n){e.operation(function(){for(var l=i(e,t);l.findNext();)if("string"!=typeof t){var o=e.getRange(l.from(),l.to()).match(t);l.replace(n.replace(/\$(\d)/g,function(e,t){return o[t]}))}else l.replace(n)})}function f(e,t){if(!e.getOption("readOnly")){var l=e.getSelection()||n(e).lastQuery,a=''+e.phrase(t?"Replace all:":"Replace:")+"";o(e,a+function(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}(e),a,l,function(n){n&&(n=u(n),o(e,function(e){return''+e.phrase("With:")+' '}(e),e.phrase("Replace with:"),"",function(l){if(l=r(l),t)h(e,n,l);else{d(e);var o=i(e,n,e.getCursor("from")),u=function(){var t,r=o.from();!(t=o.findNext())&&(o=i(e,n),!(t=o.findNext())||r&&o.from().line==r.line&&o.from().ch==r.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),function(e,t,n,l){e.openConfirm?e.openConfirm(t,l):confirm(n)&&l[0]()}(e,function(e){return''+e.phrase("Replace?")+" "}(e),e.phrase("Replace?"),[function(){a(t)},u,function(){h(e,n,l)}]))},a=function(e){o.replace("string"==typeof n?l:l.replace(/\$(\d)/g,function(t,n){return e[n]})),u()};u()}}))})}}e.commands.find=function(e){d(e),s(e)},e.commands.findPersistent=function(e){d(e),s(e,!1,!0)},e.commands.findPersistentNext=function(e){s(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){s(e,!0,!0,!0)},e.commands.findNext=s,e.commands.findPrev=function(e){s(e,!0)},e.commands.clearSearch=d,e.commands.replace=f,e.commands.replaceAll=function(e){f(e,!0)}}(n("VrN/"),n("uTOq"),n("Ku0u"))},CC75:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("7LN8"),a=n("ZYCi"),s=function(){function e(){}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"item":default:e.itemTemplate=t.template}})},e.prototype.itemClick=function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.activeItem=t)},l([o.Input(),i("design:type",Array)],e.prototype,"model",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"activeItem",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"popup",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.ContentChildren(u.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.Component({selector:"p-tabMenu",template:'\n \n '})],e)}();t.TabMenu=s,t.TabMenuModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.RouterModule],exports:[s,a.RouterModule],declarations:[s]})],function(){})}()},CS9Q:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var l=n("mrSG"),i=n("siIJ"),o=function(e){function t(n,l){void 0===l&&(l=i.a.now);var o=e.call(this,n,function(){return t.delegate&&t.delegate!==o?t.delegate.now():l()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return l.__extends(t,e),t.prototype.schedule=function(n,l,i){return void 0===l&&(l=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,l,i):e.prototype.schedule.call(this,n,l,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.a)},CcnG:function(e,t,n){"use strict";n.r(t),n.d(t,"\u0275angular_packages_core_core_t",function(){return Xf}),n.d(t,"\u0275angular_packages_core_core_q",function(){return Yf}),n.d(t,"\u0275angular_packages_core_core_r",function(){return Zf}),n.d(t,"\u0275angular_packages_core_core_s",function(){return Qf}),n.d(t,"\u0275angular_packages_core_core_h",function(){return Zp}),n.d(t,"\u0275angular_packages_core_core_o",function(){return Df}),n.d(t,"\u0275angular_packages_core_core_p",function(){return Pf}),n.d(t,"\u0275angular_packages_core_core_n",function(){return mf}),n.d(t,"\u0275angular_packages_core_core_m",function(){return gf}),n.d(t,"\u0275angular_packages_core_core_c",function(){return hu}),n.d(t,"\u0275angular_packages_core_core_d",function(){return kt}),n.d(t,"\u0275angular_packages_core_core_e",function(){return $p}),n.d(t,"\u0275angular_packages_core_core_f",function(){return Mp}),n.d(t,"\u0275angular_packages_core_core_g",function(){return Vp}),n.d(t,"\u0275angular_packages_core_core_l",function(){return od}),n.d(t,"\u0275angular_packages_core_core_u",function(){return Sh}),n.d(t,"\u0275angular_packages_core_core_w",function(){return Ch}),n.d(t,"\u0275angular_packages_core_core_v",function(){return bh}),n.d(t,"\u0275angular_packages_core_core_z",function(){return xh}),n.d(t,"\u0275angular_packages_core_core_x",function(){return wh}),n.d(t,"\u0275angular_packages_core_core_y",function(){return _h}),n.d(t,"\u0275angular_packages_core_core_bc",function(){return Tn}),n.d(t,"\u0275angular_packages_core_core_bj",function(){return h}),n.d(t,"\u0275angular_packages_core_core_bd",function(){return Qt}),n.d(t,"\u0275angular_packages_core_core_be",function(){return Jt}),n.d(t,"\u0275angular_packages_core_core_bf",function(){return vn}),n.d(t,"\u0275angular_packages_core_core_bi",function(){return ii}),n.d(t,"\u0275angular_packages_core_core_bm",function(){return Qe}),n.d(t,"\u0275angular_packages_core_core_i",function(){return da}),n.d(t,"\u0275angular_packages_core_core_j",function(){return pa}),n.d(t,"\u0275angular_packages_core_core_k",function(){return ha}),n.d(t,"\u0275angular_packages_core_core_a",function(){return D}),n.d(t,"\u0275angular_packages_core_core_b",function(){return R}),n.d(t,"\u0275angular_packages_core_core_bk",function(){return s}),n.d(t,"\u0275angular_packages_core_core_ba",function(){return qm}),n.d(t,"\u0275angular_packages_core_core_bb",function(){return sg}),n.d(t,"createPlatform",function(){return Gh}),n.d(t,"assertPlatform",function(){return qh}),n.d(t,"destroyPlatform",function(){return Kh}),n.d(t,"getPlatform",function(){return Yh}),n.d(t,"PlatformRef",function(){return Zh}),n.d(t,"ApplicationRef",function(){return Xh}),n.d(t,"createPlatformFactory",function(){return Wh}),n.d(t,"NgProbeToken",function(){return $h}),n.d(t,"enableProdMode",function(){return Ha}),n.d(t,"isDevMode",function(){return ja}),n.d(t,"APP_ID",function(){return Yp}),n.d(t,"PACKAGE_ROOT_URL",function(){return nh}),n.d(t,"PLATFORM_INITIALIZER",function(){return Jp}),n.d(t,"PLATFORM_ID",function(){return eh}),n.d(t,"APP_BOOTSTRAP_LISTENER",function(){return th}),n.d(t,"APP_INITIALIZER",function(){return qp}),n.d(t,"ApplicationInitStatus",function(){return Kp}),n.d(t,"DebugElement",function(){return Tf}),n.d(t,"DebugNode",function(){return Of}),n.d(t,"asNativeElements",function(){return vf}),n.d(t,"getDebugNode",function(){return Ef}),n.d(t,"Testability",function(){return Fh}),n.d(t,"TestabilityRegistry",function(){return Vh}),n.d(t,"setTestabilityGetter",function(){return jh}),n.d(t,"TRANSLATIONS",function(){return Wf}),n.d(t,"TRANSLATIONS_FORMAT",function(){return qf}),n.d(t,"LOCALE_ID",function(){return Gf}),n.d(t,"MissingTranslationStrategy",function(){return Kf}),n.d(t,"ApplicationModule",function(){return Jf}),n.d(t,"wtfCreateScope",function(){return Ih}),n.d(t,"wtfLeave",function(){return Oh}),n.d(t,"wtfStartTimeRange",function(){return Th}),n.d(t,"wtfEndTimeRange",function(){return Dh}),n.d(t,"Type",function(){return sd}),n.d(t,"EventEmitter",function(){return gc}),n.d(t,"ErrorHandler",function(){return Sp}),n.d(t,"Sanitizer",function(){return Oa}),n.d(t,"SecurityContext",function(){return Ia}),n.d(t,"ANALYZE_FOR_ENTRY_COMPONENTS",function(){return k}),n.d(t,"Attribute",function(){return M}),n.d(t,"ContentChild",function(){return A}),n.d(t,"ContentChildren",function(){return L}),n.d(t,"Query",function(){return N}),n.d(t,"ViewChild",function(){return F}),n.d(t,"ViewChildren",function(){return P}),n.d(t,"Component",function(){return Ud}),n.d(t,"Directive",function(){return zd}),n.d(t,"HostBinding",function(){return Kd}),n.d(t,"HostListener",function(){return Yd}),n.d(t,"Input",function(){return Wd}),n.d(t,"Output",function(){return qd}),n.d(t,"Pipe",function(){return $d}),n.d(t,"CUSTOM_ELEMENTS_SCHEMA",function(){return op}),n.d(t,"NO_ERRORS_SCHEMA",function(){return rp}),n.d(t,"NgModule",function(){return up}),n.d(t,"ViewEncapsulation",function(){return le}),n.d(t,"Version",function(){return Ta}),n.d(t,"VERSION",function(){return Da}),n.d(t,"defineInjectable",function(){return b}),n.d(t,"defineInjector",function(){return C}),n.d(t,"forwardRef",function(){return Q}),n.d(t,"resolveForwardRef",function(){return X}),n.d(t,"Injectable",function(){return gp}),n.d(t,"INJECTOR",function(){return pu}),n.d(t,"Injector",function(){return fu}),n.d(t,"inject",function(){return Mt}),n.d(t,"\u0275inject",function(){return Mt}),n.d(t,"InjectFlags",function(){return Ot}),n.d(t,"ReflectiveInjector",function(){return Up}),n.d(t,"createInjector",function(){return Au}),n.d(t,"ResolvedReflectiveFactory",function(){return Ap}),n.d(t,"ReflectiveKey",function(){return Dp}),n.d(t,"InjectionToken",function(){return x}),n.d(t,"Inject",function(){return _t}),n.d(t,"Optional",function(){return xt}),n.d(t,"Self",function(){return St}),n.d(t,"SkipSelf",function(){return Et}),n.d(t,"Host",function(){return It}),n.d(t,"NgZone",function(){return Rh}),n.d(t,"\u0275NoopNgZone",function(){return Ph}),n.d(t,"RenderComponentType",function(){return va}),n.d(t,"Renderer",function(){return ba}),n.d(t,"Renderer2",function(){return xa}),n.d(t,"RendererFactory2",function(){return wa}),n.d(t,"RendererStyleFlags2",function(){return _a}),n.d(t,"RootRenderer",function(){return Ca}),n.d(t,"COMPILER_OPTIONS",function(){return vh}),n.d(t,"Compiler",function(){return mh}),n.d(t,"CompilerFactory",function(){return yh}),n.d(t,"ModuleWithComponentFactories",function(){return ih}),n.d(t,"ComponentFactory",function(){return Qu}),n.d(t,"\u0275ComponentFactory",function(){return Qu}),n.d(t,"ComponentRef",function(){return Zu}),n.d(t,"ComponentFactoryResolver",function(){return ia}),n.d(t,"ElementRef",function(){return fa}),n.d(t,"NgModuleFactory",function(){return aa}),n.d(t,"NgModuleRef",function(){return ua}),n.d(t,"NgModuleFactoryLoader",function(){return td}),n.d(t,"getModuleFactory",function(){return ud}),n.d(t,"QueryList",function(){return ef}),n.d(t,"SystemJsNgModuleLoader",function(){return lf}),n.d(t,"SystemJsNgModuleLoaderConfig",function(){return tf}),n.d(t,"TemplateRef",function(){return mc}),n.d(t,"ViewContainerRef",function(){return rf}),n.d(t,"EmbeddedViewRef",function(){return hf}),n.d(t,"ViewRef",function(){return pf}),n.d(t,"ChangeDetectionStrategy",function(){return V}),n.d(t,"ChangeDetectorRef",function(){return sf}),n.d(t,"DefaultIterableDiffer",function(){return kf}),n.d(t,"IterableDiffers",function(){return jf}),n.d(t,"KeyValueDiffers",function(){return Hf}),n.d(t,"SimpleChange",function(){return cl}),n.d(t,"WrappedValue",function(){return sl}),n.d(t,"platformCore",function(){return $f}),n.d(t,"\u0275ALLOW_MULTIPLE_PLATFORMS",function(){return Uh}),n.d(t,"\u0275APP_ID_RANDOM_PROVIDER",function(){return Qp}),n.d(t,"\u0275defaultIterableDiffers",function(){return zf}),n.d(t,"\u0275defaultKeyValueDiffers",function(){return Uf}),n.d(t,"\u0275devModeEqual",function(){return al}),n.d(t,"\u0275isListLikeIterable",function(){return dl}),n.d(t,"\u0275ChangeDetectorStatus",function(){return j}),n.d(t,"\u0275isDefaultChangeDetectionStrategy",function(){return H}),n.d(t,"\u0275Console",function(){return lh}),n.d(t,"\u0275getInjectableDef",function(){return w}),n.d(t,"\u0275setCurrentInjector",function(){return Dt}),n.d(t,"\u0275APP_ROOT",function(){return Du}),n.d(t,"\u0275ivyEnabled",function(){return tg}),n.d(t,"\u0275CodegenComponentFactoryResolver",function(){return oa}),n.d(t,"\u0275resolveComponentResources",function(){return J}),n.d(t,"\u0275ReflectionCapabilities",function(){return fd}),n.d(t,"\u0275RenderDebugInfo",function(){return ya}),n.d(t,"\u0275_sanitizeHtml",function(){return as}),n.d(t,"\u0275_sanitizeStyle",function(){return Wc}),n.d(t,"\u0275_sanitizeUrl",function(){return $a}),n.d(t,"\u0275global",function(){return U}),n.d(t,"\u0275looseIdentical",function(){return K}),n.d(t,"\u0275stringify",function(){return Y}),n.d(t,"\u0275makeDecorator",function(){return O}),n.d(t,"\u0275isObservable",function(){return Wp}),n.d(t,"\u0275isPromise",function(){return Gp}),n.d(t,"\u0275clearOverrides",function(){return Dy}),n.d(t,"\u0275initServicesIfNeeded",function(){return $v}),n.d(t,"\u0275overrideComponentView",function(){return Ty}),n.d(t,"\u0275overrideProvider",function(){return Oy}),n.d(t,"\u0275NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR",function(){return ev}),n.d(t,"\u0275defineBase",function(){return pe}),n.d(t,"\u0275defineComponent",function(){return ue}),n.d(t,"\u0275defineDirective",function(){return he}),n.d(t,"\u0275definePipe",function(){return fe}),n.d(t,"\u0275defineNgModule",function(){return ce}),n.d(t,"\u0275detectChanges",function(){return mr}),n.d(t,"\u0275renderComponent",function(){return Zr}),n.d(t,"\u0275Render3ComponentFactory",function(){return Aa}),n.d(t,"\u0275Render3ComponentRef",function(){return Pa}),n.d(t,"\u0275directiveInject",function(){return Pr}),n.d(t,"\u0275injectAttribute",function(){return Fr}),n.d(t,"\u0275getFactoryOf",function(){return Fn}),n.d(t,"\u0275getInheritedFactory",function(){return Vn}),n.d(t,"\u0275templateRefExtractor",function(){return Ac}),n.d(t,"\u0275ProvidersFeature",function(){return Yu}),n.d(t,"\u0275InheritDefinitionFeature",function(){return lu}),n.d(t,"\u0275NgOnChangesFeature",function(){return ru}),n.d(t,"\u0275LifecycleHooksFeature",function(){return eu}),n.d(t,"\u0275Render3NgModuleRef",function(){return Ks}),n.d(t,"\u0275markDirty",function(){return Cr}),n.d(t,"\u0275NgModuleFactory",function(){return Ys}),n.d(t,"\u0275NO_CHANGE",function(){return fl}),n.d(t,"\u0275container",function(){return lr}),n.d(t,"\u0275nextContext",function(){return po}),n.d(t,"\u0275elementStart",function(){return _o}),n.d(t,"\u0275namespaceHTML",function(){return yo}),n.d(t,"\u0275namespaceMathML",function(){return vo}),n.d(t,"\u0275namespaceSVG",function(){return mo}),n.d(t,"\u0275element",function(){return bo}),n.d(t,"\u0275listener",function(){return Do}),n.d(t,"\u0275text",function(){return Go}),n.d(t,"\u0275embeddedViewStart",function(){return ur}),n.d(t,"\u0275query",function(){return Nc}),n.d(t,"\u0275registerContentQuery",function(){return Vr}),n.d(t,"\u0275projection",function(){return dr}),n.d(t,"\u0275bind",function(){return wr}),n.d(t,"\u0275interpolation1",function(){return Sr}),n.d(t,"\u0275interpolation2",function(){return Er}),n.d(t,"\u0275interpolation3",function(){return Ir}),n.d(t,"\u0275interpolation4",function(){return Or}),n.d(t,"\u0275interpolation5",function(){return Tr}),n.d(t,"\u0275interpolation6",function(){return Dr}),n.d(t,"\u0275interpolation7",function(){return Rr}),n.d(t,"\u0275interpolation8",function(){return kr}),n.d(t,"\u0275interpolationV",function(){return xr}),n.d(t,"\u0275pipeBind1",function(){return ac}),n.d(t,"\u0275pipeBind2",function(){return sc}),n.d(t,"\u0275pipeBind3",function(){return cc}),n.d(t,"\u0275pipeBind4",function(){return dc}),n.d(t,"\u0275pipeBindV",function(){return pc}),n.d(t,"\u0275pureFunction0",function(){return Qs}),n.d(t,"\u0275pureFunction1",function(){return Xs}),n.d(t,"\u0275pureFunction2",function(){return Js}),n.d(t,"\u0275pureFunction3",function(){return ec}),n.d(t,"\u0275pureFunction4",function(){return tc}),n.d(t,"\u0275pureFunction5",function(){return nc}),n.d(t,"\u0275pureFunction6",function(){return lc}),n.d(t,"\u0275pureFunction7",function(){return ic}),n.d(t,"\u0275pureFunction8",function(){return oc}),n.d(t,"\u0275pureFunctionV",function(){return rc}),n.d(t,"\u0275getCurrentView",function(){return Br}),n.d(t,"\u0275getHostElement",function(){return tl}),n.d(t,"\u0275restoreView",function(){return Xt}),n.d(t,"\u0275containerRefreshStart",function(){return or}),n.d(t,"\u0275containerRefreshEnd",function(){return rr}),n.d(t,"\u0275queryRefresh",function(){return Lc}),n.d(t,"\u0275loadQueryList",function(){return Lr}),n.d(t,"\u0275elementEnd",function(){return Ro}),n.d(t,"\u0275elementProperty",function(){return Mo}),n.d(t,"\u0275componentHostSyntheticProperty",function(){return No}),n.d(t,"\u0275projectionDef",function(){return sr}),n.d(t,"\u0275reference",function(){return Nr}),n.d(t,"\u0275enableBindings",function(){return Yt}),n.d(t,"\u0275disableBindings",function(){return Zt}),n.d(t,"\u0275allocHostVars",function(){return _r}),n.d(t,"\u0275elementAttribute",function(){return ko}),n.d(t,"\u0275elementContainerStart",function(){return Co}),n.d(t,"\u0275elementContainerEnd",function(){return wo}),n.d(t,"\u0275elementStyling",function(){return jo}),n.d(t,"\u0275elementHostAttrs",function(){return Ho}),n.d(t,"\u0275elementStylingMap",function(){return $o}),n.d(t,"\u0275elementStyleProp",function(){return zo}),n.d(t,"\u0275elementStylingApply",function(){return Bo}),n.d(t,"\u0275elementClassProp",function(){return Uo}),n.d(t,"\u0275textBinding",function(){return Wo}),n.d(t,"\u0275template",function(){return nr}),n.d(t,"\u0275embeddedViewEnd",function(){return ar}),n.d(t,"\u0275store",function(){return Mr}),n.d(t,"\u0275load",function(){return Ar}),n.d(t,"\u0275pipe",function(){return uc}),n.d(t,"\u0275whenRendered",function(){return tu}),n.d(t,"\u0275i18n",function(){return Ps}),n.d(t,"\u0275i18nAttributes",function(){return Fs}),n.d(t,"\u0275i18nExp",function(){return Hs}),n.d(t,"\u0275i18nStart",function(){return Rs}),n.d(t,"\u0275i18nEnd",function(){return Ns}),n.d(t,"\u0275i18nApply",function(){return Bs}),n.d(t,"\u0275i18nPostprocess",function(){return Ms}),n.d(t,"\u0275setClassMetadata",function(){return Zs}),n.d(t,"\u0275compileComponent",function(){return Ld}),n.d(t,"\u0275compileDirective",function(){return Ad}),n.d(t,"\u0275compileNgModule",function(){return Ed}),n.d(t,"\u0275compileNgModuleDefs",function(){return Id}),n.d(t,"\u0275patchComponentDefWithScope",function(){return Dd}),n.d(t,"\u0275resetCompiledComponents",function(){return Od}),n.d(t,"\u0275compilePipe",function(){return Bd}),n.d(t,"\u0275sanitizeHtml",function(){return qc}),n.d(t,"\u0275sanitizeStyle",function(){return Kc}),n.d(t,"\u0275defaultStyleSanitizer",function(){return Xc}),n.d(t,"\u0275sanitizeScript",function(){return Qc}),n.d(t,"\u0275sanitizeUrl",function(){return Yc}),n.d(t,"\u0275sanitizeResourceUrl",function(){return Zc}),n.d(t,"\u0275bypassSanitizationTrustHtml",function(){return Vc}),n.d(t,"\u0275bypassSanitizationTrustStyle",function(){return jc}),n.d(t,"\u0275bypassSanitizationTrustScript",function(){return Hc}),n.d(t,"\u0275bypassSanitizationTrustUrl",function(){return Bc}),n.d(t,"\u0275bypassSanitizationTrustResourceUrl",function(){return zc}),n.d(t,"\u0275getLContext",function(){return jn}),n.d(t,"\u0275bindPlayerFactory",function(){return li}),n.d(t,"\u0275addPlayer",function(){return $r}),n.d(t,"\u0275getPlayers",function(){return Gr}),n.d(t,"\u0275compileNgModuleFactory__POST_R3__",function(){return zh}),n.d(t,"\u0275SWITCH_COMPILE_COMPONENT__POST_R3__",function(){return Zd}),n.d(t,"\u0275SWITCH_COMPILE_DIRECTIVE__POST_R3__",function(){return Qd}),n.d(t,"\u0275SWITCH_COMPILE_PIPE__POST_R3__",function(){return Xd}),n.d(t,"\u0275SWITCH_COMPILE_NGMODULE__POST_R3__",function(){return ap}),n.d(t,"\u0275getDebugNode__POST_R3__",function(){return Sf}),n.d(t,"\u0275SWITCH_COMPILE_INJECTABLE__POST_R3__",function(){return mp}),n.d(t,"\u0275SWITCH_IVY_ENABLED__POST_R3__",function(){return eg}),n.d(t,"\u0275SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__",function(){return cf}),n.d(t,"\u0275Compiler_compileModuleSync__POST_R3__",function(){return ah}),n.d(t,"\u0275Compiler_compileModuleAsync__POST_R3__",function(){return ch}),n.d(t,"\u0275Compiler_compileModuleAndAllComponentsSync__POST_R3__",function(){return ph}),n.d(t,"\u0275Compiler_compileModuleAndAllComponentsAsync__POST_R3__",function(){return fh}),n.d(t,"\u0275SWITCH_ELEMENT_REF_FACTORY__POST_R3__",function(){return ga}),n.d(t,"\u0275SWITCH_TEMPLATE_REF_FACTORY__POST_R3__",function(){return vc}),n.d(t,"\u0275SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__",function(){return uf}),n.d(t,"\u0275SWITCH_RENDERER2_FACTORY__POST_R3__",function(){return Sa}),n.d(t,"\u0275getModuleFactory__POST_R3__",function(){return rd}),n.d(t,"\u0275publishGlobalUtil",function(){return Yr}),n.d(t,"\u0275publishDefaultGlobalUtils",function(){return Kr}),n.d(t,"\u0275SWITCH_INJECTOR_FACTORY__POST_R3__",function(){return gu}),n.d(t,"\u0275registerModuleFactory",function(){return ld}),n.d(t,"\u0275EMPTY_ARRAY",function(){return Qg}),n.d(t,"\u0275EMPTY_MAP",function(){return Xg}),n.d(t,"\u0275and",function(){return Jg}),n.d(t,"\u0275ccf",function(){return bm}),n.d(t,"\u0275cmf",function(){return Ry}),n.d(t,"\u0275crt",function(){return Cg}),n.d(t,"\u0275did",function(){return $m}),n.d(t,"\u0275eld",function(){return em}),n.d(t,"\u0275elementEventFullName",function(){return kg}),n.d(t,"\u0275getComponentViewDefinitionFactory",function(){return Cm}),n.d(t,"\u0275inlineInterpolate",function(){return Yg}),n.d(t,"\u0275interpolate",function(){return Kg}),n.d(t,"\u0275mod",function(){return cm}),n.d(t,"\u0275mpd",function(){return sm}),n.d(t,"\u0275ncd",function(){return pv}),n.d(t,"\u0275nov",function(){return km}),n.d(t,"\u0275pid",function(){return Gm}),n.d(t,"\u0275prd",function(){return Wm}),n.d(t,"\u0275pad",function(){return gv}),n.d(t,"\u0275pod",function(){return mv}),n.d(t,"\u0275ppd",function(){return fv}),n.d(t,"\u0275qud",function(){return uv}),n.d(t,"\u0275ted",function(){return yv}),n.d(t,"\u0275unv",function(){return vg}),n.d(t,"\u0275vid",function(){return wv});var l=n("mrSG"),i=n("pugT"),o=n("K9Ia"),r=n("6blF"),u=n("p0ib"),a=n("S1nX");function s(e){for(var t in e)if(e[t]===s)return t;throw Error("Could not find renamed property on target object.")}function c(e,t){for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}var d=s({ngComponentDef:s}),p=s({ngDirectiveDef:s}),h=s({ngInjectableDef:s}),f=s({ngInjectorDef:s}),g=s({ngPipeDef:s}),m=s({ngModuleDef:s}),v=s({ngBaseDef:s}),y=s({__NG_ELEMENT_ID__:s});function b(e){return{providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function C(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function w(e){return e&&e.hasOwnProperty(h)?e[h]:null}function _(e){return e&&e.hasOwnProperty(f)?e[f]:null}var x=function(){function e(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==t?b({providedIn:t.providedIn||"root",factory:t.factory}):void 0}return e.prototype.toString=function(){return"InjectionToken "+this._desc},e}(),S="__annotations__",E="__parameters__",I="__prop__metadata__";function O(e,t,n,i,o){var r=T(t);function u(){for(var e,t=[],n=0;n=Fe?n:n[Se]}function lt(e){return 0!=(4&e.flags)}function it(e){return 1==(1&e.flags)}function ot(e){return null!==e.template}function rt(e){return Array.isArray(e)&&e.length===ze}function ut(e){return 0!=(128&e[Ce])}function at(e){for(var t=Array.isArray(e)?e:dt(e);t&&!(128&t[Ce]);)t=t[we];return t}function st(e){return at(e)[Te]}function ct(e){return e[Ue]}function dt(e){var t=ct(e);return t?Array.isArray(t)?t:t.lView:null}function pt(e){return e!==qe}function ht(e){return 32767&e}function ft(e){return e>>16}function gt(e,t){for(var n=ft(e),l=t;n>0;)l=l[Pe],n--;return l}var mt=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(U);function vt(e,t){for(var n=0;n0;)t=t[Pe],e--;return t}(e,rn))[Te]}function yn(e){var t=Wt[be];on(Wt)?Wt[Ce]&=-2:(Bt(Wt,t.viewHooks,t.viewCheckHooks,un),Wt[Ce]&=-11,Wt[Ce]|=32,Wt[Ie]=t.bindingStartIndex),mn(e,null)}var bn=!0;function Cn(e){var t=bn;return bn=e,t}var wn=255,_n=0;function xn(e,t){var n=En(e,t);if(-1!==n)return n;var l=t[be];l.firstTemplatePass&&(e.injectorIndex=t.length,Sn(l.data,e),Sn(t,null),Sn(l.blueprint,null));var i=In(e,t),o=ht(i),r=gt(i,t),u=e.injectorIndex;if(pt(i))for(var a=r[be].data,s=0;s<8;s++)t[u+s]=r[o+s]|a[o+s];return t[u+Ge]=i,u}function Sn(e,t){e.push(0,0,0,0,0,0,0,0,t)}function En(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null==t[e.injectorIndex+Ge]?-1:e.injectorIndex}function In(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=t[Ee],l=1;n&&-1===n.injectorIndex;)n=(t=t[Pe])?t[Ee]:null,l++;return n?n.injectorIndex|l<<16:-1}function On(e,t,n){!function(e,t,n){var l="string"!=typeof n?n[y]:n.charCodeAt(0)||0;null==l&&(l=n[y]=_n++);var i=l&wn,o=1<>16,c=i?u+s:e.directiveEnd,d=l?u:u+s;d=a&&p.type===n)return d}if(i){var h=r[a];if(h&&ot(h)&&h.type===n)return a}return null}function Nn(e,t,n,l){var i,o=t[n];if(null!=(i=o)&&"object"==typeof i&&Object.getPrototypeOf(i)==Ye){var r=o;if(r.resolving)throw new Error("Circular dep for "+Ze(e[n]));var u=Cn(r.canSeeViewProviders);r.resolving=!0;var a=void 0;r.injectImpl&&(a=Rt(r.injectImpl));var s=Jt(),c=Qt();tn(l,t);try{o=t[n]=r.factory(null,e,t,l)}finally{r.injectImpl&&Rt(a),Cn(u),r.resolving=!1,tn(s,c)}}return o}function Ln(e,t,n){var l=64&e,i=32&e;return!!((128&e?l?i?n[t+7]:n[t+6]:i?n[t+5]:n[t+4]:l?i?n[t+3]:n[t+2]:i?n[t+1]:n[t])&1<=0){var f;zn(f=Xe(l[h]),a=Hn(l,h,f)),n=a;break}}}return n||null}function Hn(e,t,n){return{lView:e,nodeIndex:t,native:n,component:void 0,directives:void 0,localRefs:void 0}}function Bn(e){var t,n=ct(e);if(Array.isArray(n)){var l=Gn(n,e);(i=Hn(n,l,(t=nt(l,n))[Se])).component=e,zn(e,i),zn(i.native,i)}else{var i;t=nt((i=n).nodeIndex,i.lView)}return t}function zn(e,t){e[Ue]=t}function Un(e,t){for(var n=e[be].firstChild;n;){if(et(n,e)===t)return n.index;n=$n(n)}return-1}function $n(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function Gn(e,t){var n=e[be].components;if(n)for(var l=0;l=0)&&null})}}return i.sort(ol),i}function ol(e,t){return e.name==t.name?0:e.name-1?t[we][n]:null}return t[we][e.parent.index]}function Tl(e,t){var n=Ol(e,t);return n?n[Be]:null}var Dl=[];function Rl(e,t,n,l,i){for(var o=e[be].node,r=-1,u=e,a=o.child;a;){var s=null;if(3===a.type){kl(t,n,l,et(a,u),i);var c=u[a.index];rt(c)&&kl(t,n,l,c[He],i)}else if(0===a.type){var d=u[a.index];kl(t,n,l,d[He],i),l&&(d[Be]=l),d[je].length&&(s=(u=d[je][0])[be].node,i=d[He])}else if(1===a.type){var p=yt(u),h=p[Ee].projection[a.projection];Dl[++r]=a,Dl[++r]=u,h&&(s=(u=p[we])[be].data[h.index])}else s=a.child;if(null===s)for(null===a.next&&2&a.flags&&(u=Dl[r--],a=Dl[r--]),s=a.next;!s;){if(null===(a=a.parent||u[be].node)||a===o)return null;0===a.type&&(i=(u=u[we])[a.index][He]),s=2===a.type&&u[_e]?(u=u[_e])[be].node:a.next}a=s}}function kl(e,t,n,l,i){0===e?xl(t)?t.insertBefore(n,l,i):n.insertBefore(l,i,!0):1===e?xl(t)?t.removeChild(n,l):n.removeChild(l):2===e&&t.destroyNode(l)}function Ml(e,t){return xl(t)?t.createText(Ze(e)):t.createTextNode(Ze(e))}function Nl(e,t,n){var l=Tl(e[be].node,e);l&&Rl(e,t?0:1,e[ke],l,n)}function Ll(e,t,n,l,i){var o=t[je];l>0&&(o[l-1][_e]=e),l-1&&(e[Le]=i,e[we]=n),e[xe]&&e[xe].insertView(l),e[Ce]|=16}function Al(e,t,n){var l=e[je],i=l[t];return t>0&&(l[t-1][_e]=i[_e]),l.splice(t,1),n||Nl(i,!1),i[xe]&&i[xe].removeView(),i[Le]=-1,i[we]=null,i[Ce]&=-17,i}function Pl(e,t,n){var l=e[je][n];Al(e,n,!!t.detached),Vl(l)}function Fl(e){var t=e[be].childIndex;return-1===t?null:e[t]}function Vl(e){var t=e[ke];xl(t)&&t.destroyNode&&Rl(e,2,t,null),function(e){if(-1===e[be].childIndex)return Hl(e);for(var t=Fl(e);t;){var n=null;if(t.length>=Fe?t[be].childIndex>-1&&(n=Fl(t)):t[je].length&&(n=t[je][0]),null==n){for(;t&&!t[_e]&&t!==e;)Hl(t),t=jl(t,e);Hl(t||e),n=t&&t[_e]}t=n}}(e),e[Ce]|=64}function jl(e,t){var n;return e.length>=Fe&&(n=e[Ee])&&2===n.type?Ol(n,e):e[we]===t?null:e[we]}function Hl(e){if(e.length>=Fe){var t=e;!function(e){var t,n=e[be];null!=n&&null!=(t=n.destroyHooks)&&zt(e,t)}(t),(i=(l=t)[be]&&l[be].pipeDestroyHooks)&&zt(l,i),function(e){var t=e[be].cleanup;if(null!=t){for(var n=e[Oe],l=0;l=0?n[r]():n[-r].unsubscribe(),l+=2}else"number"==typeof t[l]?(0,n[t[l]])():t[l].call(n[t[l+1]]);e[Oe]=null}}(t);var n=t[Ee];n&&3===n.type&&xl(t[ke])&&t[ke].destroy()}var l,i}function Bl(e,t){if(zl(e,t)){if(ut(t))return $l(t[ke],et(e,t));var n=t[Ee],l=e.parent;return null!=l&&4===l.type&&(e=Wl(l)),null==e.parent&&2===n.type?Tl(n,t):El(e,t)}return null}function zl(e,t){var n,l=e,i=e.parent;return e.parent&&(4===e.parent.type?i=(l=Wl(e)).parent:5===e.parent.type&&(i=(l=Il(l)).parent)),null===i&&(i=t[Ee]),i&&2===i.type?null!=(n=Ol(i,t))&&null!=n[Be]:null==l.parent||!(3!==l.parent.type||1&l.parent.flags)}function Ul(e,t,n,l){xl(e)?e.insertBefore(t,n,l):t.insertBefore(n,l,!0)}function $l(e,t){return xl(e)?e.parentNode(t):t.parentNode}function Gl(e,t,n){if(void 0===e&&(e=null),null!==e&&zl(t,n)){var l=n[ke],i=El(t,n),o=t.parent||n[Ee];if(2===o.type){var r=Ol(o,n),u=r[je],a=u.indexOf(n);Ul(l,r[Be],e,ql(a,u,r[He]))}else 4===o.type?Ul(l,Bl(t,n),e,i):5===o.type?Ul(l,i,e,et(t.parent,n)):xl(l)?l.appendChild(i,e):i.appendChild(e);return!0}return!1}function Wl(e){for(;null!=e.parent&&4===e.parent.type;)e=e.parent;return e}function ql(e,t,n){if(e+1-1&&f>c?"":s[f+1],8&a&&(o=(l=g).length,u=(r=l.indexOf(i=m))+i.length,-1===r||r>0&&" "!==l[r-1]||u=9?t+0:t;n?e[l]|=1:e[l]&=-2}function _i(e,t){return 1==(1&e[t>=9?t+0:t])}function xi(e,t){return 2==(2&e[t>=9?t+0:t])}function Si(e,t){return 4==(4&e[t>=9?t+0:t])}function Ei(e,t,n){return 63&e|t<<6|n<<20}function Ii(e,t){var n=Oi(t);return(2&t?e[3]:e[2])[n]}function Oi(e){return e>>6&16383}function Ti(e){var t=e>>20&16383;return t>=9?t:-1}function Di(e){return Ti(e[0])}function Ri(e,t,n){e[t+1]=n}function ki(e,t,n){e[t+2]=n}function Mi(e,t,n){var l=e[8];if(t){if(!l||0===n)return!0}else if(!l)return!1;return l[n]!==t}function Ni(e,t,n){var l=e[8]||pi(e);return n>0?l[n]=t:(l.splice(n=l[0],0,t,null),l[0]+=2),n}function Li(e,t,n,l){var i=function(e,t){return n<<16|e}(l);e[t+3]=i}function Ai(e,t){return e[t+3]>>16&65535}function Pi(e,t){var n=Ai(e,t);if(n){var l=e[8];if(l)return l[n]}return null}function Fi(e,t,n){e[0===t?t:t+0]=n}function Vi(e,t){return e[0===t?t:t+0]}function ji(e,t){return e[t+2]}function Hi(e,t){return e[t+1]}function Bi(e){return 16&e[0]}function zi(e,t){wi(e,0,t)}function Ui(e,t){t?e[0]|=8:e[0]&=-9}function $i(e,t,n){for(var l=(n||0)+1;l=0&&Fi(e,s,Ei(c=Vi(e,s),Oi(c),n));var c,d=Ti(a);d>=0&&Fi(e,d,Ei(c=Vi(e,d),Oi(c),t)),ki(e,t,ji(e,n)),Ri(e,t,Hi(e,n)),Fi(e,t,Vi(e,n)),Li(e,t,Ai(e,n),0),ki(e,n,l),Ri(e,n,i),Fi(e,n,o),Li(e,n,r,0)}function Wi(e,t,n,l,i,o,r,u){var a=t0){var o=Oi(Vi(e,i));Fi(e,i,Ei((_i(e,i)?1:0)|(xi(e,i)?2:0)|(Si(e,i)?4:0),o,l))}}}(e)}function qi(e,t){return t?!!e:null!==e}function Ki(e,t,n,l){var i,o=l&&l(t)?4:0;return n?(o|=2,i=eo(e[3],t)):i=eo(e[2],t),Ei(o,i=i>0?i+1:0,0)}function Yi(e,t,n){return!(2&e)&&t&&n&&4&e?t.toString()!==n.toString():t!==n}var Zi=function(){function e(e,t,n){this._element=t,this._type=n,this._values={},this._dirty=!1,this._factory=e}return e.prototype.setValue=function(e,t){this._values[e]!==t&&(this._values[e]=t,this._dirty=!0)},e.prototype.buildPlayer=function(e,t){if(this._dirty){var n=this._factory.fn(this._element,this._type,this._values,t,e||null);return this._values={},this._dirty=!1,n}},e}();function Qi(e,t){return 65535&e[t+3]}function Xi(e,t){var n=Ji(e[1],t);return n>0?n/4:0}function Ji(e,t){for(var n=0;ni)for(var r=0===t,u=n.data,a=i;a=0)return-1;l=r/4,i[r+1]=o,i[r+3]=n||null}return l}(e,t,i);if(-1!==r){var u=e[4],a=u[1],s=u[0],c=4*s,d=9+c,p=d+4*a,h=p+c,f=u.length;u.push(l?l.length:0,n?n.length:0);var g=0,m=[];if(l&&l.length)for(var v=0;v=p,k=D>=(R?h:d),M=Vi(e,D),N=Oi(M),L=Ti(M);Fi(e,D,Ei(M,N,L+=R?k?4*m.length:0:4*T+4*(k?m.length:0)))}for(var A=0;A<4*m.length;A++)e.splice(h,0,null),e.splice(d,0,null),d++,p++,h+=2;for(var P=0;P<4*b.length;P++)e.splice(p,0,null),e.push(null),p++,h++;for(var F=e[3],V=e[2],j=0;j=m.length,B=H?j-m.length:j,z=H?b[B]:m[B],U=void 0,$=void 0;H?(U=h+4*(a+B),$=d+4*(a+B)):(U=p+4*(s+B),$=9+4*(s+B));var G=H?F:V,W=eo(G,z);-1===W?(W=G.length+1,G.push(z,!H&&null)):W+=1;var q=Ki(e,z,H,i||null);Fi(e,$,Ei(q,W,U)),Ri(e,$,z),ki(e,$,null),Li(e,$,0,r),Fi(e,U,Ei(q,W,$)),Ri(e,U,z),ki(e,U,null),Li(e,U,0,r)}u[1]=a+b.length,u[0]=s+m.length,Fi(e,0,Ei(0,0,p)|(o?16:0))}}}(i.stylingTemplate,l||null,e,t,n,hi(i))}function Ho(e,t){var n=Jt();n.stylingTemplate||(n.stylingTemplate=fi(t)),function(e,t,n){var l=e[1];if(-1==Ji(l,n)){l.push(n,-1,!1,null);for(var i=null,o=null,r=-1,u=0;u0&&fr(st(n),2)}function zo(e,t,n,l,i){var o=null;null!==n&&(o=l?Ze(n)+l:n),yi(ai(e+Fe,Qt()),t,o,!1,i)}function Uo(e,t,n,l){var i=n instanceof ii?n:!!n;yi(ai(e+Fe,Qt()),t,i,!0,l)}function $o(e,t,n,l){if(null!=l)return function(e,t,n,l){throw new Error("unimplemented. Should not be needed by ViewEngine compatibility")}();var i=Qt(),o=tt(e,i),r=ai(e+Fe,i);if(hi(o)&&t!==fl){var u=lo(r);Fo(i,o.inputs.class,(u.length?u+" ":"")+t)}else!function(e,t,n,l){n=n||null;var i=Xi(e,null),o=e[5],r=t instanceof ii?new Zi(t,o,1):null,u=n instanceof ii?new Zi(n,o,2):null,a=r?t.value:t,s=u?n.value:n,c=Bi(e)||a===fl||a===e[6],d=s===fl||s===e[7];if(!c||!d){e[6]=a,e[7]=s;var p=oe,h=!1,f=!1,g=r?1:0;Mi(e,r,1)&&(Ni(e,r,1),f=!0);var m=u?3:0;Mi(e,u,3)&&(Ni(e,u,3),f=!0),c||("string"==typeof a?(p=a.split(/\s+/),h=!0):p=a?Object.keys(a):oe);for(var v=a||ie,y=s?Object.keys(s):oe,b=s||ie,C=y.length,w=!1,_=Di(e),x=0,S=y.length+p.length;_=C)&&!d||P&&!c){var E=P?x-C:x,I=P?p[E]:y[E],O=P?!!h||v[I]:b[I],T=P?g:m;if((F=Hi(e,_))===I){var D=ji(e,_),R=Vi(e,_);if(Li(e,_,T,i),Yi(R,D,O)){ki(e,_,O),f=f||!!T;var k=Ii(e,R);(null!=D||Yi(R,k,O))&&(wi(e,_,!0),w=!0)}}else{var M=$i(e,I,_);if(M>0){var N=ji(e,M),L=Vi(e,M);Gi(e,_,M),Yi(L,N,O)&&(k=Ii(e,L),ki(e,_,O),(null!=N||Yi(L,k,O))&&(wi(e,_,!0),f=f||!!T,w=!0))}else f=f||!!T,Wi(e,_,P,I,Ki(e,I,P,to(e,i)),O,i,T),w=!0}}_+=4,x++}for(;_=C)&&!d||P&&!c){E=P?x-C:x;var F=P?p[E]:y[E],V=(D=P?!!h||v[F]:b[F],R=1|Ki(e,F,P,A),T=P?g:m,e.length);e.push(R,F,D,0),Li(e,V,T,i),w=!0}x++}w&&(zi(e,!0),no(e,i,!0)),f&&Ui(e,!0)}}(r,t,n)}function Go(e,t){var n=Qt(),l=Ml(t,n[ke]),i=uo(e,3,l,null,null);ln(!1),Gl(l,i,n)}function Wo(e,t){if(t!==fl){var n=Qt(),l=Je(e,n),i=n[ke];xl(i)?i.setValue(l,Ze(t)):l.textContent=Ze(t)}}function qo(e,t,n){var l=-(t.index-Fe),i=e.data.length-(65535&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(l,i,n)}function Ko(e,t,n,l){var i=Jt();Yo(e,i,t,n),i&&i.attrs&&function(e,t,l,o){var r=i.initialInputs;(void 0===r||e>=r.length)&&(r=function(e,t,n){var l=n.initialInputs||(n.initialInputs=[]);l[e]=null;for(var i=n.attrs,o=0;o=o.length||null==o[e])&&(o[e]=Io(e,null,t,n,i.directiveRegistry,i.pipeRegistry,null)),o[e]}(e,t,n,o),null,4),r[xe]&&(u[xe]=r[xe].createView()),ao(e,u),mn(u,u[be].node)),r&&(on(u)&&Ll(u,r,l,r[Ve],-1),r[Ve]++),on(u)?3:2}function ar(){var e=Qt(),t=e[Ee];on(e)&&(oo(e),e[Ce]&=-2),oo(e),yn(e[we]),en(t),ln(!1)}function sr(e,t){var n=yt(Qt())[Ee];if(!n.projection)for(var l=n.projection=new Array(e?e.length+1:1).fill(null),i=l.slice(),o=n.child;null!==o;){var r=e?ni(o,e,t):0,u=o.next;i[r]?i[r].next=o:(l[r]=o,o.next=null),i[r]=o,o=u}}var cr=[];function dr(e,t,n){void 0===t&&(t=0);var l=Qt(),i=uo(e,1,null,null,n||null);null===i.projection&&(i.projection=t),ln(!1);for(var o=yt(l),r=o[Ee].projection[t],u=o[we],a=-1;r;){if(1===r.type){var s=yt(u),c=s[Ee].projection[r.projection];if(c){cr[++a]=r,cr[++a]=u,r=c,u=s[we];continue}}else r.flags|=2,Yl(r,i,l,u);null===r.next&&u!==o[we]&&(u=cr[a--],r=cr[a--]),r=r.next}}function pr(e,t,n){var l=e[be],i=dn();return e[Ne]?e[Ne][_e]=n:i&&(l.childIndex=t),e[Ne]=n,n}function hr(e){for(;e&&!(128&e[Ce]);)e[Ce]|=8,e=e[we];e[Ce]|=8,fr(e[Te],1)}function fr(e,t){var n,l=0===e.flags;e.flags|=t,l&&e.clean==io&&(e.clean=new Promise(function(e){return n=e}),e.scheduler(function(){if(1&e.flags&&(e.flags&=-2,gr(e)),2&e.flags){e.flags&=-3;var t=e.playerHandler;t&&t.flushPlayers()}e.clean=io,n(null)}))}function gr(e){for(var t=0;t=2&&l[i-2]===t.hostBindings?l[i-1]=l[i-1]+n:l.push(t.hostBindings,n)}(n,qt,e),function(e,t,n){for(var l=0;l=l.data.length&&(l.data[i]=null),n[i]=t}function Nr(e){return Qe(rn,e)}function Lr(e){return Qt()[Ae][e]}function Ar(e){return Qe(Qt(),e)}function Pr(e,t){return void 0===t&&(t=Ot.Default),e=X(e),Dn(Jt(),Qt(),e,t)}function Fr(e){return Tn(Jt(),e)}function Vr(e,t){var n=Qt(),l=n[be],i=(n[Ae]||(n[Ae]=[])).push(e);if(dn()){var o=l.contentQueries||(l.contentQueries=[]);t!==(l.contentQueries.length?l.contentQueries[l.contentQueries.length-2]:-1)&&o.push(t,i-1)}}var jr=io;function Hr(e){return e?(void 0===e.inputs&&(e.inputs=Vo(e,0)),e.inputs):null}function Br(){return Qt()}function zr(e){return e[Oe]||(e[Oe]=[])}function Ur(e){return e[be].cleanup||(e[be].cleanup=[])}function $r(e,t){var n=jn(e);if(n){var l=n.native,i=n.lView,o=function(e,t){if(!(t=t||jn(l)))return null;var n=ai(t.nodeIndex,t.lView);return di(n)||pi(n)}(0,n),r=Zn(i);ci(o,r,l,t,0,e),fr(r,2)}}function Gr(e){var t=jn(e);if(!t)return[];var n=ai(t.nodeIndex,t.lView),l=n?di(n):null;return l?function(e){for(var t=[],n=e[0],l=2;l ");else if("object"==typeof t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];i.push(o+":"+("string"==typeof r?JSON.stringify(r):Y(r)))}l="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+l+"]: "+e.replace(xu,"\n ")}function Tu(e,t){return new Error(Ou(e,t))}var Du=new x("The presence of this token marks an injector as being the root injector."),Ru={},ku={},Mu=[],Nu=void 0;function Lu(){return void 0===Nu&&(Nu=new hu),Nu}function Au(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),t=t||Lu(),new Pu(e,n,t)}var Pu=function(){function e(e,t,n){var l=this;this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this.destroyed=!1;var i=[];Hu([e],function(e){return l.processInjectorType(e,[],i)}),t&&Hu(t,function(n){return l.processProvider(n,e,t)}),this.records.set(pu,ju(void 0,this)),this.isRootInjector=this.records.has(Du),this.injectorDefTypes.forEach(function(e){return l.get(e)})}return e.prototype.destroy=function(){this.assertNotDestroyed(),this.destroyed=!0;try{this.onDestroy.forEach(function(e){return e.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}},e.prototype.get=function(e,t,n){void 0===t&&(t=du),void 0===n&&(n=Ot.Default),this.assertNotDestroyed();var l,i=Dt(this);try{if(!(n&Ot.SkipSelf)){var o=this.records.get(e);if(void 0===o){var r=("function"==typeof(l=e)||"object"==typeof l&&l instanceof x)&&w(e);r&&this.injectableDefInScope(r)&&(o=ju(Fu(e),Ru),this.records.set(e,o))}if(void 0!==o)return this.hydrate(e,o)}return(n&Ot.Self?Lu():this.parent).get(e,t)}finally{Dt(i)}},e.prototype.assertNotDestroyed=function(){if(this.destroyed)throw new Error("Injector has already been destroyed.")},e.prototype.processInjectorType=function(e,t,n){var l=this;if(e=X(e)){var i=_(e),o=null==i&&e.ngModule||void 0,r=void 0===o?e:o,u=-1!==n.indexOf(r),a=void 0!==o&&e.providers||Mu;if(void 0!==o&&(i=_(o)),null!=i){if(this.injectorDefTypes.add(r),this.records.set(r,ju(i.factory,Ru)),null!=i.imports&&!u){n.push(r);try{Hu(i.imports,function(e){return l.processInjectorType(e,t,n)})}finally{}}var s=i.providers;if(null!=s&&!u){var c=e;Hu(s,function(e){return l.processProvider(e,c,s)})}var d=e.ngModule;Hu(a,function(e){return l.processProvider(e,d,a)})}}},e.prototype.processProvider=function(e,t,n){var l=zu(e=X(e))?e:X(e&&e.provide),i=function(e,t,n){var l=Vu(e,t,n);return Bu(e)?ju(void 0,e.useValue):ju(l,Ru)}(e,t,n);if(zu(e)||!0!==e.multi){var o=this.records.get(l);if(o&&void 0!==o.multi)throw new Error("Mixed multi-provider for "+Y(l))}else{var r=this.records.get(l);if(r){if(void 0===r.multi)throw new Error("Mixed multi-provider for "+l+".")}else(r=ju(void 0,Ru,!0)).factory=function(){return Lt(r.multi)},this.records.set(l,r);l=e,r.multi.push(e)}this.records.set(l,i)},e.prototype.hydrate=function(e,t){if(t.value===ku)throw new Error("Cannot instantiate cyclic dependency! "+Y(e));var n;return t.value===Ru&&(t.value=ku,t.value=t.factory()),"object"==typeof t.value&&t.value&&"object"==typeof(n=t.value)&&null!=n&&n.ngOnDestroy&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(t.value),t.value},e.prototype.injectableDefInScope=function(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||"root"===e.providedIn&&this.isRootInjector:this.injectorDefTypes.has(e.providedIn))},e}();function Fu(e){var t=w(e);if(null===t){var n=_(e);if(null!==n)return n.factory;if(e instanceof x)throw new Error("Token "+Y(e)+" is missing an ngInjectableDef definition.");if(e instanceof Function){var l=e.length;if(l>0){var i=new Array(l).fill("?");throw new Error("Can't resolve all parameters for "+Y(e)+": ("+i.join(", ")+").")}return function(){return new e}}throw new Error("unreachable")}return t.factory}function Vu(e,t,n){var i,o=void 0;if(zu(e))return Fu(X(e));if(Bu(e))o=function(){return X(e.useValue)};else if((i=e)&&i.useExisting)o=function(){return Mt(X(e.useExisting))};else if(e&&e.useFactory)o=function(){return e.useFactory.apply(e,Object(l.__spread)(Lt(e.deps||[])))};else{var r=X(e&&(e.useClass||e.provide));if(!r){var u="";throw t&&n&&(u=" - only instances of Provider and Type are allowed, got: ["+n.map(function(t){return t==e?"?"+e+"?":"..."}).join(", ")+"]"),new Error("Invalid provider for the NgModule '"+Y(t)+"'"+u)}if(!e.deps)return Fu(r);o=function(){return new(r.bind.apply(r,Object(l.__spread)([void 0],Lt(e.deps))))}}return o}function ju(e,t,n){return void 0===n&&(n=!1),{factory:e,value:t,multi:n?[]:void 0}}function Hu(e,t){e.forEach(function(e){return Array.isArray(e)?Hu(e,t):t(e)})}function Bu(e){return e&&"object"==typeof e&&wu in e}function zu(e){return"function"==typeof e}function Uu(e,t,n,l,i){if(e=X(e),Array.isArray(e))for(var o=0;o>16;if(zu(e)||!e.multi){var h=new Ke(a,i,Pr),f=Gu(u,t,i?c:c+p,d);-1==f?(On(xn(s,r),r,u),t.push(u),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=65536),n.push(h),r.push(h)):(n[f]=h,r[f]=h)}else{var g=Gu(u,t,c+p,d),m=Gu(u,t,c,c+p),v=m>=0&&n[m];i&&!v||!i&&!(g>=0&&n[g])?(On(xn(s,r),r,u),h=function(e,t,n,l,i){var o=new Ke(e,n,Pr);return o.multi=[],o.index=t,o.componentProviders=0,$u(o,i,l&&!n),o}(i?qu:Wu,n.length,i,l,a),!i&&v&&(n[m].providerFactory=h),t.push(u),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=65536),n.push(h),r.push(h)):$u(n[i?m:g],a,!i&&l),!i&&l&&v&&n[m].componentProviders++}}}function $u(e,t,n){e.multi.push(t),n&&e.componentProviders++}function Gu(e,t,n,l){for(var i=n;i-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}Vl(this._lView)},e.prototype.onDestroy=function(e){var t,n;n=e,zr(t=this._lView).push(n),t[be].firstTemplatePass&&Ur(t).push(t[Oe].length-1,null)},e.prototype.markForCheck=function(){hr(this._lView)},e.prototype.detach=function(){this._lView[Ce]&=-17},e.prototype.reattach=function(){this._lView[Ce]|=16},e.prototype.detectChanges=function(){vr(this._lView,this.context)},e.prototype.checkNoChanges=function(){!function(e){sn(!0);try{mr(e)}finally{sn(!1)}}(this.context)},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e.prototype.detachFromAppRef=function(){this._appRef=null},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype._lookUpContext=function(){return this._context=this._lView[we][this._componentIndex]},e}(),ca=function(e){function t(t){var n=e.call(this,t,null,-1)||this;return n._view=t,n}return Object(l.__extends)(t,e),t.prototype.detectChanges=function(){yr(this._view)},t.prototype.checkNoChanges=function(){!function(e){sn(!0);try{yr(e)}finally{sn(!1)}}(this._view)},Object.defineProperty(t.prototype,"context",{get:function(){return null},enumerable:!0,configurable:!0}),t}(sa);function da(e,t,n){return Ju||(Ju=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(l.__extends)(t,e),t}(e)),new Ju(et(t,n))}function pa(e,t,n,i){if(ea||(ea=function(e){function t(t,n,l,i,o,r){var u=e.call(this)||this;return u._declarationParentView=t,u.elementRef=n,u._tView=l,u._renderer=i,u._queries=o,u._injectorIndex=r,u}return Object(l.__extends)(t,e),t.prototype.createEmbeddedView=function(e,t,n,l,i){var o=function(e,t,n,l,i,o){var r=nn(),u=Jt();ln(!0),en(null);var a=ro(n,e,t,4);return a[Pe]=n,i&&(a[xe]=i.createView()),ao(-1,a),e.firstTemplatePass&&(e.node.injectorIndex=o),ln(r),en(u),a}(this._tView,e,this._declarationParentView,0,this._queries,this._injectorIndex);t&&Ll(o,t,l,i,n.index),co(o,this._tView,e);var r=new sa(o,e,-1);return r._tViewNode=o[Ee],r},t}(e)),0===n.type){var o=i[n.index];return new ea(i,da(t,n,i),n.tViews,Qt()[ke],o[xe],n.injectorIndex)}return null}function ha(e,t,n){if(it(e)){var l=e.directiveStart,i=nt(e.index,t);return new sa(i,n,l)}if(3===e.type){var o=yt(t);return new sa(o,o[Te],-1)}return null}var fa=function(){function e(e){this.nativeElement=e}return e.__NG_ELEMENT_ID__=function(){return ma(e)},e}(),ga=function(e){return da(e,Jt(),Qt())},ma=au,va=function(){return function(e,t,n,l,i,o){this.id=e,this.templateUrl=t,this.slotCount=n,this.encapsulation=l,this.styles=i,this.animations=o}}(),ya=function(){return function(){}}(),ba=function(){return function(){}}(),Ca=function(){return function(){}}(),wa=function(){return function(){}}(),_a=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}({}),xa=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return Ea()},e}(),Sa=function(){return function(e){var t=Qt()[ke];if(xl(t))return t;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}()},Ea=au,Ia=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({}),Oa=function(){return function(){}}(),Ta=function(){return function(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}(),Da=new Ta("7.2.14"),Ra=function(e){function t(t){var n=e.call(this)||this;return n.ngModule=t,n}return Object(l.__extends)(t,e),t.prototype.resolveComponentFactory=function(e){var t=ge(e);return new Aa(t,this.ngModule)},t}(ia);function ka(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var Ma=new x("ROOT_CONTEXT_TOKEN",{providedIn:"root",factory:function(){return Jr(Mt(Na))}}),Na=new x("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return mt}}),La={},Aa=function(e){function t(t,n){var l=e.call(this)||this;return l.componentDef=t,l.ngModule=n,l.componentType=t.type,l.selector=t.selectors[0][0],l.ngContentSelectors=[],l}return Object(l.__extends)(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){return ka(this.componentDef.inputs)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){return ka(this.componentDef.outputs)},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,l){var i=void 0===n,o=(l=l||this.ngModule)?function(e,t){return{get:function(n,l){var i=e.get(n,La);return i!==La||l===La?i:t.get(n,l)}}}(e,l.injector):e,r=o.get(wa,Sl),u=o.get(Oa,null),a=i?xo(this.selector,r.createRenderer(null,this.componentDef)):To(r,n),s=this.componentDef.onPush?136:132,c=i?Jr():o.get(Ma),d=r.createRenderer(a,this.componentDef);n&&a&&(xl(d)?d.setAttribute(a,"ng-version",Da.full):a.setAttribute("ng-version",Da.full));var p,h,f=ro(null,Io(-1,null,1,0,null,null,null),c,s,r,d,u,o),g=mn(f,null);try{r.begin&&r.begin();var m=Qr(a,this.componentDef,f,r,d);if(h=tt(0,f),t)for(var v=0,y=f[be],b=h.projection=[],C=0;C',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='

',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return e.prototype.getInertBodyElement_XHR=function(e){e=""+e+"";try{e=encodeURI(e)}catch(l){return null}var t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(void 0);var n=t.response.body;return n.removeChild(n.firstChild),n},e.prototype.getInertBodyElement_DOMParser=function(e){e=""+e+"";try{var t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(n){return null}},e.prototype.getInertBodyElement_InertDocument=function(e){var t=this.inertDocument.createElement("template");return"content"in t?(t.innerHTML=e,t):(this.inertBodyElement.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},e.prototype.stripCustomNsAttrs=function(e){for(var t=e.attributes,n=t.length-1;0"),!0},e.prototype.endElement=function(e){var t=e.nodeName.toLowerCase();Ja.hasOwnProperty(t)&&!Ya.hasOwnProperty(t)&&(this.buf.push(""))},e.prototype.chars=function(e){this.buf.push(us(e))},e.prototype.checkClobberedElement=function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t},e}(),os=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rs=/([^\#-~ |!])/g;function us(e){return e.replace(/&/g,"&").replace(os,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(rs,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function as(e,t){var n=null;try{Ka=Ka||new Ba(e);var l=t?String(t):"";n=Ka.getInertBodyElement(l);var i=5,o=l;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,l=o,o=n.innerHTML,n=Ka.getInertBodyElement(l)}while(l!==o);var r=new is,u=r.sanitizeChildren(ss(n)||n);return ja()&&r.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),u}finally{if(n)for(var a=ss(n)||n;a.firstChild;)a.removeChild(a.firstChild)}}function ss(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var cs={marker:"element"},ds={marker:"comment"},ps="\ufffd",hs=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,fs=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,gs=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,ms=/\ufffd(\d+):?\d*\ufffd/gi,vs=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,ys=/\[(\ufffd.+?\ufffd?)\]/g,bs=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,Cs=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g;function ws(e){if(!e)return[];var t,n=0,l=[],i=[],o=/[{}]/g;for(o.lastIndex=0;t=o.exec(e);){var r=t.index;if("}"==t[0]){if(l.pop(),0==l.length){var u=e.substring(n,r);hs.test(u)?i.push(_s(u)):u&&i.push(u),n=r+1}}else{if(0==l.length){var a=e.substring(n,r);i.push(a),n=r+1}l.push("{")}}var s=e.substring(n);return""!=s&&i.push(s),i}function _s(e){for(var t=[],n=[],l=1,i=0,o=ws(e=e.replace(hs,function(e,t,n){return l="select"===n?0:1,i=parseInt(t.substr(1),10),""})),r=0;r0&&r!==u&&c.push(r.index<<3|0);for(var d=[],p=[],h=function(e,t){if("number"!=typeof t)return xs(e);var n=e.indexOf(":"+t+ps)+2+t.toString().length,l=e.search(new RegExp(ps+"\\/\\*\\d+:"+t+ps));return xs(e.substring(n,l))}(n,l).split(gs),f=0;f>>17,d=void 0;r=ks(o,d=c===e?l[Ee]:tt(c,l),r),d.next=null;break;case 0:var p=s>>>3;u.push(p),r=o,(o=tt(p,l))&&(en(o),3===o.type&&ln(!0));break;case 5:r=o=tt(s>>>3,l),en(o),ln(!1);break;case 4:ko(s>>>3,t[++a],t[++a]);break;default:throw new Error('Unable to determine the type of mutate operation for "'+s+'"')}else switch(s){case ds:var h=t[++a],f=i.createComment(h);r=o,o=uo(n++,5,f,null,null),zn(f,l),o.activeCaseIndex=null,ln(!1);break;case cs:var g=t[++a];r=o,o=uo(n++,3,i.createElement(g),g,null);break;default:throw new Error('Unable to determine the type of mutate operation for "'+s+'"')}}return ln(!1),u}function As(e,t){var n=tt(e,t);Kl(n,Je(e,t)||null,t),n.detached=!0;var l=Ar(e);if(rt(l)){var i=l;0!==n.type&&Kl(n,i[He]||null,t),i[Be]=null}}function Ps(e,t,n){Rs(e,t,n),Ns()}function Fs(e,t){var n=Qt()[be];n.firstTemplatePass&&null===n.data[e+Fe]&&function(e,t,n){for(var l=Jt().index-Fe,i=[],o=0;o>>2,g=void 0,m=void 0;switch(3&h){case 1:ko(f,t[++p],d,t[++p]);break;case 0:Wo(f,d);break;case 2:if(g=n[t[++p]],null!==(m=tt(f,o)).activeCaseIndex)for(var v=g.remove[m.activeCaseIndex],y=0;y>>3,o);break;case 6:var C=tt(v[y+1]>>>3,o).activeCaseIndex;null!==C&&vt(n[b>>>3].remove[C],v)}}var w=Us(g,d);m.activeCaseIndex=-1!==w?w:null,Ls(-1,g.create[w],g.expandoStartIndex,o),u=!0;break;case 3:g=n[t[++p]],m=tt(f,o),e(g.update[m.activeCaseIndex],n,l,i,o,u)}}}a+=c}}(l,i,t[Ie]-js-1,Vs,t),Vs=0,js=0}}var zs=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({});function Us(e,t){var n=e.cases.indexOf(t);if(-1===n)switch(e.type){case 1:var l=function(e,n){switch(function(e,t){"string"==typeof t&&(t=parseInt(t,10));var n=t,l=n.toString().replace(/^[^.]*\.?/,""),i=Math.floor(Math.abs(n)),o=l.length,r=parseInt(l,10),u=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0;switch(e.split("-")[0].toLowerCase()){case"af":case"asa":case"az":case"bem":case"bez":case"bg":case"brx":case"ce":case"cgg":case"chr":case"ckb":case"ee":case"el":case"eo":case"es":case"eu":case"fo":case"fur":case"gsw":case"ha":case"haw":case"hu":case"jgo":case"jmc":case"ka":case"kk":case"kkj":case"kl":case"ks":case"ksb":case"ky":case"lb":case"lg":case"mas":case"mgo":case"ml":case"mn":case"nb":case"nd":case"ne":case"nn":case"nnh":case"nyn":case"om":case"or":case"os":case"ps":case"rm":case"rof":case"rwk":case"saq":case"seh":case"sn":case"so":case"sq":case"ta":case"te":case"teo":case"tk":case"tr":case"ug":case"uz":case"vo":case"vun":case"wae":case"xog":return 1===n?zs.One:zs.Other;case"ak":case"ln":case"mg":case"pa":case"ti":return n===Math.floor(n)&&n>=0&&n<=1?zs.One:zs.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===n?zs.One:zs.Other;case"ar":return 0===n?zs.Zero:1===n?zs.One:2===n?zs.Two:n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10?zs.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99?zs.Many:zs.Other;case"ast":case"ca":case"de":case"en":case"et":case"fi":case"fy":case"gl":case"it":case"nl":case"sv":case"sw":case"ur":case"yi":return 1===i&&0===o?zs.One:zs.Other;case"be":return n%10==1&&n%100!=11?zs.One:n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14)?zs.Few:n%10==0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14?zs.Many:zs.Other;case"br":return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?zs.One:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?zs.Two:n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10==9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99)?zs.Few:0!==n&&n%1e6==0?zs.Many:zs.Other;case"bs":case"hr":case"sr":return 0===o&&i%10==1&&i%100!=11||r%10==1&&r%100!=11?zs.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||r%10===Math.floor(r%10)&&r%10>=2&&r%10<=4&&!(r%100>=12&&r%100<=14)?zs.Few:zs.Other;case"cs":case"sk":return 1===i&&0===o?zs.One:i===Math.floor(i)&&i>=2&&i<=4&&0===o?zs.Few:0!==o?zs.Many:zs.Other;case"cy":return 0===n?zs.Zero:1===n?zs.One:2===n?zs.Two:3===n?zs.Few:6===n?zs.Many:zs.Other;case"da":return 1===n||0!==u&&(0===i||1===i)?zs.One:zs.Other;case"dsb":case"hsb":return 0===o&&i%100==1||r%100==1?zs.One:0===o&&i%100==2||r%100==2?zs.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||r%100===Math.floor(r%100)&&r%100>=3&&r%100<=4?zs.Few:zs.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?zs.One:zs.Other;case"fil":return 0===o&&(1===i||2===i||3===i)||0===o&&i%10!=4&&i%10!=6&&i%10!=9||0!==o&&r%10!=4&&r%10!=6&&r%10!=9?zs.One:zs.Other;case"ga":return 1===n?zs.One:2===n?zs.Two:n===Math.floor(n)&&n>=3&&n<=6?zs.Few:n===Math.floor(n)&&n>=7&&n<=10?zs.Many:zs.Other;case"gd":return 1===n||11===n?zs.One:2===n||12===n?zs.Two:n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19)?zs.Few:zs.Other;case"gv":return 0===o&&i%10==1?zs.One:0===o&&i%10==2?zs.Two:0!==o||i%100!=0&&i%100!=20&&i%100!=40&&i%100!=60&&i%100!=80?0!==o?zs.Many:zs.Other:zs.Few;case"he":return 1===i&&0===o?zs.One:2===i&&0===o?zs.Two:0!==o||n>=0&&n<=10||n%10!=0?zs.Other:zs.Many;case"is":return 0===u&&i%10==1&&i%100!=11||0!==u?zs.One:zs.Other;case"ksh":return 0===n?zs.Zero:1===n?zs.One:zs.Other;case"kw":case"naq":case"se":case"smn":return 1===n?zs.One:2===n?zs.Two:zs.Other;case"lag":return 0===n?zs.Zero:0!==i&&1!==i||0===n?zs.Other:zs.One;case"lt":return n%10!=1||n%100>=11&&n%100<=19?n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19)?zs.Few:0!==r?zs.Many:zs.Other:zs.One;case"lv":case"prg":return n%10==0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||2===o&&r%100===Math.floor(r%100)&&r%100>=11&&r%100<=19?zs.Zero:n%10==1&&n%100!=11||2===o&&r%10==1&&r%100!=11||2!==o&&r%10==1?zs.One:zs.Other;case"mk":return 0===o&&i%10==1||r%10==1?zs.One:zs.Other;case"mt":return 1===n?zs.One:0===n||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10?zs.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?zs.Many:zs.Other;case"pl":return 1===i&&0===o?zs.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?zs.Few:0===o&&1!==i&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14?zs.Many:zs.Other;case"pt":return n===Math.floor(n)&&n>=0&&n<=2&&2!==n?zs.One:zs.Other;case"ro":return 1===i&&0===o?zs.One:0!==o||0===n||1!==n&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19?zs.Few:zs.Other;case"ru":case"uk":return 0===o&&i%10==1&&i%100!=11?zs.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?zs.Few:0===o&&i%10==0||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14?zs.Many:zs.Other;case"shi":return 0===i||1===n?zs.One:n===Math.floor(n)&&n>=2&&n<=10?zs.Few:zs.Other;case"si":return 0===n||1===n||0===i&&1===r?zs.One:zs.Other;case"sl":return 0===o&&i%100==1?zs.One:0===o&&i%100==2?zs.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==o?zs.Few:zs.Other;case"tzm":return n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99?zs.One:zs.Other;default:return zs.Other}}("en-US",t)){case zs.Zero:return"zero";case zs.One:return"one";case zs.Two:return"two";case zs.Few:return"few";case zs.Many:return"many";default:return"other"}}();-1===(n=e.cases.indexOf(l))&&"other"!==l&&(n=e.cases.indexOf("other"));break;case 0:n=e.cases.indexOf("other")}return n}function $s(e,t,n,i){for(var o=[],r=[],u=[],a=[],s=[],c=0;c=0;n--){var l=t[n];if(e===l.name)return l}throw new Error("The pipe '"+e+"' could not be found!")}(t,l.pipeRegistry),l.data[i]=n,n.onDestroy&&(l.pipeDestroyHooks||(l.pipeDestroyHooks=[])).push(i,n.onDestroy)):n=l.data[i];var o=n.factory(null);return Mr(e,o),o}function ac(e,t,n){var l=Ar(e);return fc(hc(e)?Xs(t,l.transform,n,l):l.transform(n))}function sc(e,t,n,l){var i=Ar(e);return fc(hc(e)?Js(t,i.transform,n,l,i):i.transform(n,l))}function cc(e,t,n,l,i){var o=Ar(e);return fc(hc(e)?ec(t,o.transform,n,l,i,o):o.transform(n,l,i))}function dc(e,t,n,l,i,o){var r=Ar(e);return fc(hc(e)?tc(t,r.transform,n,l,i,o,r):r.transform(n,l,i,o))}function pc(e,t,n){var l=Ar(e);return fc(hc(e)?rc(t,l.transform,n,l):l.transform.apply(l,n))}function hc(e){return Qt()[be].data[e+Fe].pure}function fc(e){return sl.isWrapped(e)&&(e=sl.unwrap(e),Qt()[fn()]=fl),e}var gc=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this)||this;return n.__isAsync=t,n}return Object(l.__extends)(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,n,l){var o,r=function(e){return null},u=function(){return null};t&&"object"==typeof t?(o=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(r=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(u=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(o=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},n&&(r=this.__isAsync?function(e){setTimeout(function(){return n(e)})}:function(e){n(e)}),l&&(u=this.__isAsync?function(){setTimeout(function(){return l()})}:function(){l()}));var a=e.prototype.subscribe.call(this,o,r,u);return t instanceof i.a&&t.add(a),a},t}(o.a),mc=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return yc(e,fa)},e}(),vc=function(e,t){return pa(e,t,Jt(),Qt())},yc=au,bc=function(){function e(e,t,n){this.parent=e,this.shallow=t,this.deep=n}return e.prototype.track=function(e,t,n,l){n?this.deep=kc(this.deep,e,t,null!=l?l:null):this.shallow=kc(this.shallow,e,t,null!=l?l:null)},e.prototype.clone=function(){return new e(this,null,this.deep)},e.prototype.container=function(){var t=Cc(this.shallow),n=Cc(this.deep);return t||n?new e(this,t,n):null},e.prototype.createView=function(){var t=wc(this.shallow),n=wc(this.deep);return t||n?new e(this,t,n):null},e.prototype.insertView=function(e){_c(e,this.shallow),_c(e,this.deep)},e.prototype.addNode=function(e){return Tc(this.deep,e),lt(e)?(Tc(this.shallow,e),e.parent&<(e.parent)&&Tc(this.parent.shallow,e),this.parent):(function(e){return null===e.parent||lt(e.parent)}(e)&&Tc(this.shallow,e),this)},e.prototype.removeView=function(){xc(this.shallow),xc(this.deep)},e}();function Cc(e){for(var t=null;e;){var n=[];e.values.push(n),t={next:t,list:e.list,predicate:e.predicate,values:n,containerValues:null},e=e.next}return t}function wc(e){for(var t=null;e;)t={next:t,list:e.list,predicate:e.predicate,values:[],containerValues:e.values},e=e.next;return t}function _c(e,t){for(;t;)t.containerValues.splice(e,0,t.values),t=t.next}function xc(e){for(;e;){var t=e.containerValues,n=t.indexOf(e.values);t.splice(n,1)[0].length&&e.list.setDirty(),e=e.next}}function Sc(e,t){var n=e.localNames;if(n)for(var l=0;l-1?Nn(t[be].data,t,l,e):function(e,t){return 3===e.type||4===e.type?da(fa,e,t):0===e.type?pa(mc,fa,e,t):null}(e,t)}function Tc(e,t){for(var n=Qt();e;){var l=e.predicate,i=l.type;if(i){var o=null;i===mc?o=Ic(i,t,n,l.read):null!==(a=Mn(t,n,i,!1,!1))&&(o=Oc(t,n,l.read,a)),null!==o&&Dc(e,o)}else for(var r=l.selector,u=0;u0?(e=l.concat(e.slice(n+1)),n=0):n++:(t.push(l),n++)}return t}(e),this.dirty=!1},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}();function Nc(e,t,n,l){var i,o,r,u=new Mc;return(i=bc,o=Qt(),r=o[xe],$t&&$t!==o[Ee]&&!lt($t)&&(r&&(r=o[xe]=r.clone()),$t.flags|=4),r||(o[xe]=new i(null,null,null))).track(u,t,n,l),function(e,t,n){var l=zr(e);l.push(t),e[be].firstTemplatePass&&Ur(e).push(n,l.length-1)}(Qt(),u,u.destroy),null!=e&&Mr(e,u),u}function Lc(e){return!!e.dirty&&(e.reset(e._valuesTree),e.notifyOnChanges(),!0)}function Ac(e,t){return pa(mc,fa,e,t)}var Pc="__SANITIZER_TRUSTED_BRAND__";function Fc(e,t){return e instanceof String&&e[Pc]===t}function Vc(e){return Uc(e,"Html")}function jc(e){return Uc(e,"Style")}function Hc(e){return Uc(e,"Script")}function Bc(e){return Uc(e,"Url")}function zc(e){return Uc(e,"ResourceUrl")}function Uc(e,t){var n=new String(e);return n[Pc]=t,n}var $c=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"),Gc=/^url\(([^)]+)\)$/;function Wc(e){if(!(e=String(e).trim()))return"";var t=e.match(Gc);return t&&$a(t[1])===t[1]||e.match($c)&&function(e){for(var t=!0,n=!0,l=0;l=0;e--){var t=_d[e],n=t.moduleType,l=t.ngModule;l.declarations&&l.declarations.every(Sd)&&(_d.splice(e,1),Td(n,l))}}finally{xd=!1}}}(),void 0!==e.ngSelectorScope){var u=Rd(e.ngSelectorScope);Dd(n,u)}}return n},configurable:!1})}function Ad(e,t){var n=null;Object.defineProperty(e,p,{get:function(){if(null===n){var l=Fd(e,t);n=bt().compileDirective(ed,"ng://"+(e&&e.name)+"/ngDirectiveDef.js",l)}return n},configurable:!1})}function Pd(e){return Object.getPrototypeOf(e.prototype)===Object.prototype}function Fd(e,t){var n=yd().propMetadata(e);return{name:e.name,type:e,typeArgumentCount:0,selector:t.selector,deps:bd(e),host:t.host||ie,propMetadata:n,inputs:t.inputs||oe,outputs:t.outputs||oe,queries:Vd(e,n,jd),lifecycle:{usesOnChanges:void 0!==e.prototype.ngOnChanges},typeSourceSpan:null,usesInheritance:!Pd(e),exportAs:t.exportAs||null,providers:t.providers||null}}function Vd(e,t,n){var l=[],i=function(i){t.hasOwnProperty(i)&&t[i].forEach(function(t){if(n(t)){if(!t.selector)throw new Error("Can't construct a query for the property \""+i+'" of "'+Ze(e)+"\" since the query selector wasn't defined.");l.push(function(e,t){return{propertyName:i,predicate:(n=t.selector,"string"==typeof n?n.split(",").map(function(e){return e.trim()}):X(n)),descendants:t.descendants,first:t.first,read:t.read?t.read:null};var n}(0,t))}})};for(var o in t)i(o);return l}function jd(e){var t=e.ngMetadataName;return"ContentChild"===t||"ContentChildren"===t}function Hd(e){var t=e.ngMetadataName;return"ViewChild"===t||"ViewChildren"===t}function Bd(e,t){var n=null;Object.defineProperty(e,g,{get:function(){return null===n&&(n=bt().compilePipe(ed,"ng://"+Ze(e)+"/ngPipeDef.js",{type:e,name:e.name,deps:bd(e),pipeName:t.name,pure:void 0===t.pure||t.pure})),n},configurable:!1})}var zd=O("Directive",function(e){return void 0===e&&(e={}),e},void 0,void 0,function(e,t){return ep(e,t)}),Ud=O("Component",function(e){return void 0===e&&(e={}),Object(l.__assign)({changeDetection:V.Default},e)},zd,void 0,function(e,t){return Jd(e,t)}),$d=O("Pipe",function(e){return Object(l.__assign)({pure:!0},e)},void 0,void 0,function(e,t){return tp(e,t)}),Gd=function(e){return function(t,n){for(var l=[],i=2;i1?" ("+function(e){for(var t=[],n=0;n-1)return t.push(e[n]),t;t.push(e[n])}return t}(e.slice().reverse()).map(function(e){return Y(e.token)}).join(" -> ")+")":""}function Ip(e,t,n,l){var i=[t],o=n(i),r=l?function(e,t){var n=o+" caused by: "+(t instanceof Error?t.message:t),l=Error(n);return l[bp]=t,l}(0,l):Error(o);return r.addKey=Op,r.keys=i,r.injectors=[e],r.constructResolvingMessage=n,r[bp]=l,r}function Op(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)}function Tp(e,t){for(var n=[],l=0,i=t.length;l=this._providers.length)throw function(e){return Error("Index "+e+" is out-of-bounds.")}(e);return this._providers[e]},e.prototype._new=function(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw Ip(this,e.key,function(e){return"Cannot instantiate cyclic dependency!"+Ep(e)});return this._instantiateProvider(e)},e.prototype._getMaxNumberOfObjects=function(){return this.objs.length},e.prototype._instantiateProvider=function(e){if(e.multiProvider){for(var t=new Array(e.resolvedFactories.length),n=0;n0&&(i=setTimeout(function(){l._callbacks=l._callbacks.filter(function(e){return e.timeoutId!==i}),e(l._didWork,l.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})},e.prototype.whenStable=function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.findProviders=function(e,t,n){return[]},e}(),Vh=function(){function e(){this._applications=new Map,Bh.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.unregisterApplication=function(e){this._applications.delete(e)},e.prototype.unregisterAllApplications=function(){this._applications.clear()},e.prototype.getTestability=function(e){return this._applications.get(e)||null},e.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},e.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),Bh.findTestabilityInTree(this,e,t)},Object(l.__decorate)([Object(l.__metadata)("design:paramtypes",[])],e)}();function jh(e){Bh=e}var Hh,Bh=new(function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e}());function zh(e,t,n){return Promise.resolve(new Ys(n))}var Uh=new x("AllowMultipleToken"),$h=function(){return function(e,t){this.name=e,this.token=t}}();function Gh(e){if(Hh&&!Hh.destroyed&&!Hh.injector.get(Uh,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Hh=e.get(Zh);var t=e.get(Jp,null);return t&&t.forEach(function(e){return e()}),Hh}function Wh(e,t,n){void 0===n&&(n=[]);var l="Platform: "+t,i=new x(l);return function(t){void 0===t&&(t=[]);var o=Yh();if(!o||o.injector.get(Uh,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var r=n.concat(t).concat({provide:i,useValue:!0});Gh(fu.create({providers:r,name:l}))}return qh(i)}}function qh(e){var t=Yh();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}function Kh(){Hh&&!Hh.destroyed&&Hh.destroy()}function Yh(){return Hh&&!Hh.destroyed?Hh:null}var Zh=function(){function e(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return e.prototype.bootstrapModuleFactory=function(e,t){var n,l=this,i="noop"===(n=t?t.ngZone:void 0)?new Ph:("zone.js"===n?void 0:n)||new Rh({enableLongStackTrace:ja()}),o=[{provide:Rh,useValue:i}];return i.run(function(){var t=fu.create({providers:o,parent:l.injector,name:e.moduleType.name}),n=e.create(t),r=n.injector.get(Sp,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Jh(l._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(e){r.handleError(e)}})}),function(e,t,i){try{var o=((r=n.injector.get(Kp)).runInitializers(),r.donePromise.then(function(){return l._moduleDoBootstrap(n),n}));return Gp(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(u){throw t.runOutsideAngular(function(){return e.handleError(u)}),u}var r}(r,i)})},e.prototype.bootstrapModule=function(e,t){var n=this;void 0===t&&(t=[]);var l=Qh({},t);return function(e,t,n){return e.get(yh).createCompiler([t]).compileModuleAsync(n)}(this.injector,l,e).then(function(e){return n.bootstrapModuleFactory(e,l)})},e.prototype._moduleDoBootstrap=function(e){var t=e.injector.get(Xh);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+Y(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e}();function Qh(e,t){return Array.isArray(t)?t.reduce(Qh,e):Object(l.__assign)({},e,t)}var Xh=function(){function e(e,t,n,l,i,o){var s=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=l,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=ja(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var c=new r.a(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),d=new r.a(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){Rh.assertNotInAngularZone(),q(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Rh.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=Object(u.a)(c,d.pipe(Object(a.a)()))}var t;return t=e,e.prototype.bootstrap=function(e,t){var n,l=this;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.");n=e instanceof Qu?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n instanceof ra?null:this._injector.get(ua),o=n.create(fu.NULL,[],t||n.selector,i);o.onDestroy(function(){l._unloadComponent(o)});var r=o.injector.get(Fh,null);return r&&o.injector.get(Vh).registerApplication(o.location.nativeElement,r),this._loadComponent(o),ja()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},e.prototype.tick=function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=t._tickScope();try{this._runningTick=!0,this._views.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(e){return e.checkNoChanges()})}catch(l){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(l)})}finally{this._runningTick=!1,Oh(n)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;Jh(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(th,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),Jh(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=Ih("ApplicationRef#tick()"),e}();function Jh(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var ef=function(){function e(){this.dirty=!0,this._results=[],this.changes=new gc,this.length=0}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[W()]=function(){return this._results[W()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=function e(t){return t.reduce(function(t,n){var l=Array.isArray(n)?e(n):n;return t.concat(l)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),tf=function(){return function(){}}(),nf={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},lf=function(){function e(e,t){this._compiler=e,this._config=t||nf}return e.prototype.load=function(e){return this._compiler instanceof mh?this.loadFactory(e):this.loadAndCompile(e)},e.prototype.loadAndCompile=function(e){var t=this,i=Object(l.__read)(e.split("#"),2),o=i[0],r=i[1];return void 0===r&&(r="default"),n("crnd")(o).then(function(e){return e[r]}).then(function(e){return of(e,o,r)}).then(function(e){return t._compiler.compileModuleAsync(e)})},e.prototype.loadFactory=function(e){var t=Object(l.__read)(e.split("#"),2),i=t[0],o=t[1],r="NgFactory";return void 0===o&&(o="default",r=""),n("crnd")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then(function(e){return e[o+r]}).then(function(e){return of(e,i,o)})},e}();function of(e,t,n){if(!e)throw new Error("Cannot find '"+n+"' in '"+t+"'");return e}var rf=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return af(e,fa)},e}(),uf=function(e,t){return function(e,t,n,i){var o;ta||(ta=function(e){function n(t,n,l){var i=e.call(this)||this;return i._lContainer=t,i._hostTNode=n,i._hostView=l,i._viewRefs=[],i}return Object(l.__extends)(n,e),Object.defineProperty(n.prototype,"element",{get:function(){return da(t,this._hostTNode,this._hostView)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"injector",{get:function(){return new Pn(this._hostTNode,this._hostView)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentInjector",{get:function(){var e=In(this._hostTNode,this._hostView),t=gt(e,this._hostView),n=function(e,t,n){if(n.parent&&-1!==n.parent.injectorIndex){for(var l=n.parent.injectorIndex,i=n.parent;null!=i.parent&&l==i.injectorIndex;)i=i.parent;return i}for(var o=ft(e),r=t,u=t[Ee];o>1;)u=(r=r[Pe])[Ee],o--;return u}(e,this._hostView,this._hostTNode);return pt(e)&&null!=n?new Pn(n,t):new Pn(null,this._hostView)},enumerable:!0,configurable:!0}),n.prototype.clear=function(){for(;this._lContainer[je].length;)this.remove(0)},n.prototype.get=function(e){return this._viewRefs[e]||null},Object.defineProperty(n.prototype,"length",{get:function(){return this._lContainer[je].length},enumerable:!0,configurable:!0}),n.prototype.createEmbeddedView=function(e,t,n){var l=this._adjustIndex(n),i=e.createEmbeddedView(t||{},this._lContainer,this._hostTNode,this._hostView,l);return i.attachToViewContainerRef(this),this._viewRefs.splice(l,0,i),i},n.prototype.createComponent=function(e,t,n,l,i){var o=n||this.parentInjector;!i&&null==e.ngModule&&o&&(i=o.get(ua,null));var r=e.create(o,l,void 0,i);return this.insert(r.hostView,t),r},n.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n=e._lView,l=this._adjustIndex(t);return Ll(n,this._lContainer,this._hostView,l,this._hostTNode.index),Nl(n,!0,ql(l,this._lContainer[je],this._lContainer[He])),e.attachToViewContainerRef(this),this._viewRefs.splice(l,0,e),e},n.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n=this.indexOf(e);return this.detach(n),this.insert(e,this._adjustIndex(t)),e},n.prototype.indexOf=function(e){return this._viewRefs.indexOf(e)},n.prototype.remove=function(e){var t=this._adjustIndex(e,-1);Pl(this._lContainer,this._hostTNode,t),this._viewRefs.splice(t,1)},n.prototype.detach=function(e){var t=this._adjustIndex(e,-1),n=Al(this._lContainer,t,!!this._hostTNode.detached);return null!=this._viewRefs.splice(t,1)[0]?new sa(n,n[Te],n[Le]):null},n.prototype._adjustIndex=function(e,t){return void 0===t&&(t=0),null==e?this._lContainer[je].length+t:e},n}(e));var r=i[n.index];if(rt(r))(o=r)[Ve]=-1;else{var u=i[ke].createComment("");if(ut(i)){var a=i[ke],s=et(n,i);Ul(a,$l(a,s),u,function(e,t){return xl(e)?e.nextSibling(t):t.nextSibling}(a,s))}else Gl(u,n,i);i[n.index]=o=tr(r,n,i,u,!0),pr(i,n.index,o)}return new ta(o,n,i)}(e,t,Jt(),Qt())},af=au,sf=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return df()},e}(),cf=function(){return ha(Jt(),Qt(),null)},df=function(){for(var e=[],t=0;t-1}(l)||"root"===i.providedIn&&l._def.isRoot))){var c=e._providers.length;return e._def.providersByKey[t.tokenKey]={flags:5120,value:u.factory,deps:[],index:c,token:t.token},e._providers[c]=om,e._providers[c]=pm(e,e._def.providersByKey[t.tokenKey])}return 4&t.flags?n:e._parent.get(t.token,n)}finally{Dt(o)}}function pm(e,t){var n;switch(201347067&t.flags){case 512:n=function(e,t,n){var i=n.length;switch(i){case 0:return new t;case 1:return new t(dm(e,n[0]));case 2:return new t(dm(e,n[0]),dm(e,n[1]));case 3:return new t(dm(e,n[0]),dm(e,n[1]),dm(e,n[2]));default:for(var o=new Array(i),r=0;r=n.length)&&(t=n.length-1),t<0)return null;var l=n[t];return l.viewContainerParent=null,vm(n,t),cg.dirtyParentQueries(l),gm(l),l}function fm(e,t,n){var l=t?Rg(t,t.def.lastRenderRootNode):e.renderElement,i=n.renderer.parentNode(l),o=n.renderer.nextSibling(l);Hg(n,2,i,o,void 0)}function gm(e){Hg(e,3,null,null,void 0)}function mm(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function vm(e,t){t>=e.length-1?e.pop():e.splice(t,1)}var ym=new Object;function bm(e,t,n,l,i,o){return new wm(e,t,n,l,i,o)}function Cm(e){return e.viewDefFactory}var wm=function(e){function t(t,n,l,i,o,r){var u=e.call(this)||this;return u.selector=t,u.componentType=n,u._inputs=i,u._outputs=o,u.ngContentSelectors=r,u.viewDefFactory=l,u}return Object(l.__extends)(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,l){if(!l)throw new Error("ngModule should be provided");var i=jg(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,r=cg.createRootView(e,t||[],n,i,l,ym),u=rg(r,o).instance;return n&&r.renderer.setAttribute(og(r,0).renderElement,"ng-version",Da.full),new _m(r,new Im(r),u)},t}(Qu),_m=function(e){function t(t,n,l){var i=e.call(this)||this;return i._view=t,i._viewRef=n,i._component=l,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=l,i}return Object(l.__extends)(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new fa(og(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Rm(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(Zu);function xm(e,t,n){return new Sm(e,t,n)}var Sm=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new fa(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Rm(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=Dg(e),e=e.parent;return e?new Rm(e,t):new Rm(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=hm(this._data,e);cg.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Im(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var l=e.createEmbeddedView(t||{});return this.insert(l,n),l},e.prototype.createComponent=function(e,t,n,l,i){var o=n||this.parentInjector;i||e instanceof ra||(i=o.get(ua));var r=e.create(o,l,void 0,i);return this.insert(r.hostView,t),r},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,l,i,o,r=e;return o=(n=this._data).viewContainer._embeddedViews,null==(l=t)&&(l=o.length),(i=r._view).viewContainerParent=this._view,mm(o,l,i),function(e,t){var n=Tg(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var l=n.template._projectedViews;l||(l=n.template._projectedViews=[]),l.push(t),function(e,n){if(!(4&n.flags)){t.parent.def.nodeFlags|=4,n.flags|=4;for(var l=n.parent;l;)l.childFlags|=4,l=l.parent}}(0,t.parentNodeDef)}}(n,i),cg.dirtyParentQueries(i),fm(n,l>0?o[l-1]:null,i),r.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,l,i,o,r,u=this._embeddedViews.indexOf(e._view);return i=t,r=(o=(n=this._data).viewContainer._embeddedViews)[l=u],vm(o,l),null==i&&(i=o.length),mm(o,i,r),cg.dirtyParentQueries(r),gm(r),fm(n,i>0?o[i-1]:null,r),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=hm(this._data,e);t&&cg.destroyView(t)},e.prototype.detach=function(e){var t=hm(this._data,e);return t?new Im(t):null},e}();function Em(e){return new Im(e)}var Im=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return Hg(this._view,0,void 0,void 0,e=[]),e;var e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){Eg(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{cg.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){cg.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),cg.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,gm(this._view),cg.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}();function Om(e,t){return new Tm(e,t)}var Tm=function(e){function t(t,n){var l=e.call(this)||this;return l._parentView=t,l._def=n,l}return Object(l.__extends)(t,e),t.prototype.createEmbeddedView=function(e){return new Im(cg.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new fa(og(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(mc);function Dm(e,t){return new Rm(e,t)}var Rm=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=fu.THROW_IF_NOT_FOUND),cg.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:mg(e)},t)},e}();function km(e,t){var n=e.def.nodes[t];if(1&n.flags){var l=og(e,n.nodeIndex);return n.element.template?l.template:l.renderElement}if(2&n.flags)return ig(e,n.nodeIndex).renderText;if(20240&n.flags)return rg(e,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+t)}function Mm(e){return new Nm(e.renderer)}var Nm=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=Object(l.__read)(Wg(t),2),i=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,i),i},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var l=0;l0,i=t.provider;switch(201347067&t.flags){case 512:return Jm(e,t.parent,n,i.value,i.deps);case 1024:return function(e,t,n,i,o){var r=o.length;switch(r){case 0:return i();case 1:return i(tv(e,t,n,o[0]));case 2:return i(tv(e,t,n,o[0]),tv(e,t,n,o[1]));case 3:return i(tv(e,t,n,o[0]),tv(e,t,n,o[1]),tv(e,t,n,o[2]));default:for(var u=Array(r),a=0;a0)s=g,_v(g)||(c=g);else for(;s&&f===s.nodeIndex+s.childCount;){var y=s.parent;y&&(y.childFlags|=s.childFlags,y.childMatchedQueries|=s.childMatchedQueries),c=(s=y)&&_v(s)?s.renderParent:s}}return{factory:null,nodeFlags:r,rootNodeFlags:u,nodeMatchedQueries:a,flags:e,nodes:t,updateDirectives:n||fg,updateRenderer:l||fg,handleEvent:function(e,n,l,i){return t[n].element.handleEvent(e,l,i)},bindingCount:i,outputCount:o,lastRenderRootNode:h}}function _v(e){return 0!=(1&e.flags)&&null===e.element.name}function xv(e,t,n){var l=t.element&&t.element.template;if(l){if(!l.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(l.lastRenderRootNode&&16777216&l.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+t.nodeIndex+"!")}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+t.nodeIndex+"!");if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+t.nodeIndex+"!");if(134217728&t.flags&&e)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+t.nodeIndex+"!")}if(t.childCount){var i=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=i&&t.nodeIndex+t.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+t.nodeIndex+"!")}}function Sv(e,t,n,l){var i=Ov(e.root,e.renderer,e,t,n);return Tv(i,e.component,l),Dv(i),i}function Ev(e,t,n){var l=Ov(e,e.renderer,null,null,t);return Tv(l,n,n),Dv(l),l}function Iv(e,t,n,l){var i,o=t.element.componentRendererType;return i=o?e.root.rendererFactory.createRenderer(l,o):e.root.renderer,Ov(e.root,i,e,t.element.componentProvider,n)}function Ov(e,t,n,l,i){var o=new Array(i.nodes.length),r=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:l,context:null,component:null,nodes:o,state:13,root:e,renderer:t,oldValues:new Array(i.bindingCount),disposables:r,initIndex:-1}}function Tv(e,t,n){e.component=t,e.context=n}function Dv(e){var t;Mg(e)&&(t=og(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n=e.def,l=e.nodes,i=0;i0&&im(e,t,0,n)&&(h=!0),p>1&&im(e,t,1,l)&&(h=!0),p>2&&im(e,t,2,i)&&(h=!0),p>3&&im(e,t,3,o)&&(h=!0),p>4&&im(e,t,4,r)&&(h=!0),p>5&&im(e,t,5,u)&&(h=!0),p>6&&im(e,t,6,a)&&(h=!0),p>7&&im(e,t,7,s)&&(h=!0),p>8&&im(e,t,8,c)&&(h=!0),p>9&&im(e,t,9,d)&&(h=!0),h}(e,t,n,l,i,o,r,u,a,s,c,d);case 2:return function(e,t,n,l,i,o,r,u,a,s,c,d){var p=!1,h=t.bindings,f=h.length;if(f>0&&xg(e,t,0,n)&&(p=!0),f>1&&xg(e,t,1,l)&&(p=!0),f>2&&xg(e,t,2,i)&&(p=!0),f>3&&xg(e,t,3,o)&&(p=!0),f>4&&xg(e,t,4,r)&&(p=!0),f>5&&xg(e,t,5,u)&&(p=!0),f>6&&xg(e,t,6,a)&&(p=!0),f>7&&xg(e,t,7,s)&&(p=!0),f>8&&xg(e,t,8,c)&&(p=!0),f>9&&xg(e,t,9,d)&&(p=!0),p){var g=t.text.prefix;f>0&&(g+=Cv(n,h[0])),f>1&&(g+=Cv(l,h[1])),f>2&&(g+=Cv(i,h[2])),f>3&&(g+=Cv(o,h[3])),f>4&&(g+=Cv(r,h[4])),f>5&&(g+=Cv(u,h[5])),f>6&&(g+=Cv(a,h[6])),f>7&&(g+=Cv(s,h[7])),f>8&&(g+=Cv(c,h[8])),f>9&&(g+=Cv(d,h[9]));var m=ig(e,t.nodeIndex).renderText;e.renderer.setValue(m,g)}return p}(e,t,n,l,i,o,r,u,a,s,c,d);case 16384:return function(e,t,n,l,i,o,r,u,a,s,c,d){var p=rg(e,t.nodeIndex),h=p.instance,f=!1,g=void 0,m=t.bindings.length;return m>0&&_g(e,t,0,n)&&(f=!0,g=lv(e,p,t,0,n,g)),m>1&&_g(e,t,1,l)&&(f=!0,g=lv(e,p,t,1,l,g)),m>2&&_g(e,t,2,i)&&(f=!0,g=lv(e,p,t,2,i,g)),m>3&&_g(e,t,3,o)&&(f=!0,g=lv(e,p,t,3,o,g)),m>4&&_g(e,t,4,r)&&(f=!0,g=lv(e,p,t,4,r,g)),m>5&&_g(e,t,5,u)&&(f=!0,g=lv(e,p,t,5,u,g)),m>6&&_g(e,t,6,a)&&(f=!0,g=lv(e,p,t,6,a,g)),m>7&&_g(e,t,7,s)&&(f=!0,g=lv(e,p,t,7,s,g)),m>8&&_g(e,t,8,c)&&(f=!0,g=lv(e,p,t,8,c,g)),m>9&&_g(e,t,9,d)&&(f=!0,g=lv(e,p,t,9,d,g)),g&&h.ngOnChanges(g),65536&t.flags&&lg(e,256,t.nodeIndex)&&h.ngOnInit(),262144&t.flags&&h.ngDoCheck(),f}(e,t,n,l,i,o,r,u,a,s,c,d);case 32:case 64:case 128:return function(e,t,n,l,i,o,r,u,a,s,c,d){var p=t.bindings,h=!1,f=p.length;if(f>0&&xg(e,t,0,n)&&(h=!0),f>1&&xg(e,t,1,l)&&(h=!0),f>2&&xg(e,t,2,i)&&(h=!0),f>3&&xg(e,t,3,o)&&(h=!0),f>4&&xg(e,t,4,r)&&(h=!0),f>5&&xg(e,t,5,u)&&(h=!0),f>6&&xg(e,t,6,a)&&(h=!0),f>7&&xg(e,t,7,s)&&(h=!0),f>8&&xg(e,t,8,c)&&(h=!0),f>9&&xg(e,t,9,d)&&(h=!0),h){var g=ug(e,t.nodeIndex),m=void 0;switch(201347067&t.flags){case 32:m=new Array(p.length),f>0&&(m[0]=n),f>1&&(m[1]=l),f>2&&(m[2]=i),f>3&&(m[3]=o),f>4&&(m[4]=r),f>5&&(m[5]=u),f>6&&(m[6]=a),f>7&&(m[7]=s),f>8&&(m[8]=c),f>9&&(m[9]=d);break;case 64:m={},f>0&&(m[p[0].name]=n),f>1&&(m[p[1].name]=l),f>2&&(m[p[2].name]=i),f>3&&(m[p[3].name]=o),f>4&&(m[p[4].name]=r),f>5&&(m[p[5].name]=u),f>6&&(m[p[6].name]=a),f>7&&(m[p[7].name]=s),f>8&&(m[p[8].name]=c),f>9&&(m[p[9].name]=d);break;case 128:var v=n;switch(f){case 1:m=v.transform(n);break;case 2:m=v.transform(l);break;case 3:m=v.transform(l,i);break;case 4:m=v.transform(l,i,o);break;case 5:m=v.transform(l,i,o,r);break;case 6:m=v.transform(l,i,o,r,u);break;case 7:m=v.transform(l,i,o,r,u,a);break;case 8:m=v.transform(l,i,o,r,u,a,s);break;case 9:m=v.transform(l,i,o,r,u,a,s,c);break;case 10:m=v.transform(l,i,o,r,u,a,s,c,d)}}g.value=m}return h}(e,t,n,l,i,o,r,u,a,s,c,d);default:throw"unreachable"}}(e,t,i,o,r,u,a,s,c,d,p,h):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){for(var l=!1,i=0;i0&&Sg(e,t,0,n),p>1&&Sg(e,t,1,l),p>2&&Sg(e,t,2,i),p>3&&Sg(e,t,3,o),p>4&&Sg(e,t,4,r),p>5&&Sg(e,t,5,u),p>6&&Sg(e,t,6,a),p>7&&Sg(e,t,7,s),p>8&&Sg(e,t,8,c),p>9&&Sg(e,t,9,d)}(e,t,l,i,o,r,u,a,s,c,d,p):function(e,t,n){for(var l=0;l0){var o=new Set(e.modules);Xv.forEach(function(t,l){if(o.has(w(l).providedIn)){var i={token:l,flags:t.flags|(n?4096:0),deps:Pg(t.deps),value:t.value,index:e.providers.length};e.providers.push(i),e.providersByKey[mg(l)]=i}})}}(e=e.factory(function(){return fg})),e):e}(l))}var Qv=new Map,Xv=new Map,Jv=new Map;function ey(e){var t;Qv.set(e.token,e),"function"==typeof e.token&&(t=w(e.token))&&"function"==typeof t.providedIn&&Xv.set(e.token,e)}function ty(e,t){var n=jg(Cm(t)),l=jg(n.nodes[0].element.componentView);Jv.set(e,l)}function ny(){Qv.clear(),Xv.clear(),Jv.clear()}function ly(e){if(0===Qv.size)return e;var t=function(e){for(var t=[],n=null,l=0;l",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(s),d=["%","/","?",";","#"].concat(c),p=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n("r8II");function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var l=new o;return l.parse(e,t,n),l}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),u=-1!==o&&o127?N+="x":N+=M[L];if(!N.match(h)){var P=R.slice(0,O),F=R.slice(O+1),V=M.match(f);V&&(P.push(V[1]),F.unshift(V[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=P.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),D||(this.hostname=l.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[_])for(O=0,k=c.length;O0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var x=w.slice(-1)[0],S=(n.host||e.host||w.length>1)&&("."===x||".."===x)||""===x,E=0,I=w.length;I>=0;I--)"."===(x=w[I])?w.splice(I,1):".."===x?(w.splice(I,1),E++):E&&(w.splice(I,1),E--);if(!b&&!C)for(;E--;E)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),S&&"/"!==w.join("/").substr(-1)&&w.push("");var O,T=""===w[0]||w[0]&&"/"===w[0].charAt(0);return _&&(n.hostname=n.host=T?"":w.length?w.shift():"",(O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift())),(b=b||n.host&&w.length)&&!T&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},Czxz:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("7LN8"),a=n("mU/a"),s=n("sdDj"),c=n("P3jN"),d=n("CcnG"),p=n("DtyJ"),h=function(){function e(){this.sortSource=new p.Subject,this.selectionSource=new p.Subject,this.contextMenuSource=new p.Subject,this.valueSource=new p.Subject,this.totalRecordsSource=new p.Subject,this.columnsSource=new p.Subject,this.sortSource$=this.sortSource.asObservable(),this.selectionSource$=this.selectionSource.asObservable(),this.contextMenuSource$=this.contextMenuSource.asObservable(),this.valueSource$=this.valueSource.asObservable(),this.totalRecordsSource$=this.totalRecordsSource.asObservable(),this.columnsSource$=this.columnsSource.asObservable()}return e.prototype.onSort=function(e){this.sortSource.next(e)},e.prototype.onSelectionChange=function(){this.selectionSource.next()},e.prototype.onContextMenu=function(e){this.contextMenuSource.next(e)},e.prototype.onValueChange=function(e){this.valueSource.next(e)},e.prototype.onTotalRecordsChange=function(e){this.totalRecordsSource.next(e)},e.prototype.onColumnsChange=function(e){this.columnsSource.next(e)},l([d.Injectable()],e)}();t.TableService=h;var f=function(){function e(e,t,n){this.el=e,this.zone=t,this.tableService=n,this.first=0,this.pageLinks=5,this.alwaysShowPaginator=!0,this.paginatorPosition="bottom",this.defaultSortOrder=1,this.sortMode="single",this.resetPageOnSort=!0,this.selectionChange=new o.EventEmitter,this.contextMenuSelectionChange=new o.EventEmitter,this.contextMenuSelectionMode="separate",this.rowTrackBy=function(e,t){return t},this.lazy=!1,this.lazyLoadOnInit=!0,this.compareSelectionBy="deepEquals",this.csvSeparator=",",this.exportFilename="download",this.filters={},this.filterDelay=300,this.expandedRowKeys={},this.rowExpandMode="multiple",this.virtualScrollDelay=150,this.virtualRowHeight=28,this.columnResizeMode="fit",this.loadingIcon="pi pi-spinner",this.stateStorage="session",this.onRowSelect=new o.EventEmitter,this.onRowUnselect=new o.EventEmitter,this.onPage=new o.EventEmitter,this.onSort=new o.EventEmitter,this.onFilter=new o.EventEmitter,this.onLazyLoad=new o.EventEmitter,this.onRowExpand=new o.EventEmitter,this.onRowCollapse=new o.EventEmitter,this.onContextMenuSelect=new o.EventEmitter,this.onColResize=new o.EventEmitter,this.onColReorder=new o.EventEmitter,this.onRowReorder=new o.EventEmitter,this.onEditInit=new o.EventEmitter,this.onEditComplete=new o.EventEmitter,this.onEditCancel=new o.EventEmitter,this.onHeaderCheckboxToggle=new o.EventEmitter,this.sortFunction=new o.EventEmitter,this._value=[],this._totalRecords=0,this.selectionKeys={},this._sortOrder=1,this.filterConstraints={startsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=c.ObjectUtils.removeAccents(t.toString()).toLowerCase();return c.ObjectUtils.removeAccents(e.toString()).toLowerCase().slice(0,n.length)===n},contains:function(e,t){if(null==t||"string"==typeof t&&""===t.trim())return!0;if(null==e)return!1;var n=c.ObjectUtils.removeAccents(t.toString()).toLowerCase();return-1!==c.ObjectUtils.removeAccents(e.toString()).toLowerCase().indexOf(n)},endsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=c.ObjectUtils.removeAccents(t.toString()).toLowerCase(),l=c.ObjectUtils.removeAccents(e.toString()).toLowerCase();return-1!==l.indexOf(n,l.length-n.length)},equals:function(e,t){return null==t||"string"==typeof t&&""===t.trim()||null!=e&&(e.getTime&&t.getTime?e.getTime()===t.getTime():c.ObjectUtils.removeAccents(e.toString()).toLowerCase()==c.ObjectUtils.removeAccents(t.toString()).toLowerCase())},notEquals:function(e,t){return!(null==t||"string"==typeof t&&""===t.trim()||null!=e&&(e.getTime&&t.getTime?e.getTime()===t.getTime():c.ObjectUtils.removeAccents(e.toString()).toLowerCase()==c.ObjectUtils.removeAccents(t.toString()).toLowerCase()))},in:function(e,t){if(null==t||0===t.length)return!0;for(var n=0;nt.getTime():e>t)},gte:function(e,t){return null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()>=t.getTime():e>=t)}}}return e.prototype.ngOnInit=function(){this.lazy&&this.lazyLoadOnInit&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.initialized=!0},e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"caption":e.captionTemplate=t.template;break;case"header":e.headerTemplate=t.template;break;case"body":e.bodyTemplate=t.template;break;case"footer":e.footerTemplate=t.template;break;case"summary":e.summaryTemplate=t.template;break;case"colgroup":e.colGroupTemplate=t.template;break;case"rowexpansion":e.expandedRowTemplate=t.template;break;case"frozenrows":e.frozenRowsTemplate=t.template;break;case"frozenheader":e.frozenHeaderTemplate=t.template;break;case"frozenbody":e.frozenBodyTemplate=t.template;break;case"frozenfooter":e.frozenFooterTemplate=t.template;break;case"frozencolgroup":e.frozenColGroupTemplate=t.template;break;case"emptymessage":e.emptyMessageTemplate=t.template;break;case"paginatorleft":e.paginatorLeftTemplate=t.template;break;case"paginatorright":e.paginatorRightTemplate=t.template}})},e.prototype.ngAfterViewInit=function(){this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths()},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this.isStateful()&&!this.stateRestored&&this.restoreState(),this._value=e,this.lazy||(this.totalRecords=this._value?this._value.length:0,"single"==this.sortMode&&this.sortField?this.sortSingle():"multiple"==this.sortMode&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.virtualScroll&&this.virtualScrollCallback&&this.virtualScrollCallback(),this.tableService.onValueChange(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e,this.tableService.onColumnsChange(e),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&this.restoreColumnOrder()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalRecords",{get:function(){return this._totalRecords},set:function(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortField",{get:function(){return this._sortField},set:function(e){this._sortField=e,this.lazy&&!this.initialized||"single"===this.sortMode&&this.sortSingle()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this._sortOrder},set:function(e){this._sortOrder=e,this.lazy&&!this.initialized||"single"===this.sortMode&&this.sortSingle()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multiSortMeta",{get:function(){return this._multiSortMeta},set:function(e){this._multiSortMeta=e,"multiple"===this.sortMode&&this.sortMultiple()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){return this._selection},set:function(e){this._selection=e,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1},enumerable:!0,configurable:!0}),e.prototype.updateSelectionKeys=function(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(var e=0,t=this._selection;eo?1:0,e.sortOrder*l}),this.hasFilter()&&this._filter());var t={field:this.sortField,order:this.sortOrder};this.onSort.emit(t),this.tableService.onSort(t)}},e.prototype.sortMultiple=function(){var e=this;this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):this.value.sort(function(t,n){return e.multisortField(t,n,e.multiSortMeta,0)}),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))},e.prototype.multisortField=function(e,t,n,l){var i=c.ObjectUtils.resolveFieldData(e,n[l].field),o=c.ObjectUtils.resolveFieldData(t,n[l].field),r=null;if(null==i&&null!=o?r=-1:null!=i&&null==o?r=1:null==i&&null==o&&(r=0),"string"==typeof i||i instanceof String){if(i.localeCompare&&i!=o)return n[l].order*i.localeCompare(o)}else r=il?this.multisortField(e,t,n,l+1):0:n[l].order*r},e.prototype.getSortMeta=function(e){if(this.multiSortMeta&&this.multiSortMeta.length)for(var t=0;tt?(n=t,l=this.anchorRowIndex):this.anchorRowIndexthis.anchorRowIndex?(t=this.anchorRowIndex,n=this.rangeRowIndex):this.rangeRowIndex-1:this.equals(e,this.selection))},e.prototype.findIndexInSelection=function(e){var t=-1;if(this.selection&&this.selection.length)for(var n=0;n=i){if("fit"===this.columnResizeMode){for(var r=t.nextElementSibling;!r.offsetParent;)r=r.nextElementSibling;if(r){var u=r.offsetWidth-n;if(o>15&&u>parseInt(r.style.minWidth||15))if(this.scrollable){var a=this.findParentScrollableView(t),c=s.DomHandler.findSingle(a,"table.ui-table-scrollable-body-table"),d=s.DomHandler.findSingle(a,"table.ui-table-scrollable-header-table"),p=s.DomHandler.findSingle(a,"table.ui-table-scrollable-footer-table"),h=s.DomHandler.index(t);this.resizeColGroup(d,h,o,u),this.resizeColGroup(c,h,o,u),this.resizeColGroup(p,h,o,u)}else t.style.width=o+"px",r&&(r.style.width=u+"px")}}else"expand"===this.columnResizeMode&&o>i&&(this.scrollable?(a=this.findParentScrollableView(t),c=s.DomHandler.findSingle(a,"table.ui-table-scrollable-body-table"),d=s.DomHandler.findSingle(a,"table.ui-table-scrollable-header-table"),p=s.DomHandler.findSingle(a,"table.ui-table-scrollable-footer-table"),c.style.width=c.offsetWidth+n+"px",d.style.width=d.offsetWidth+n+"px",p&&(p.style.width=d.offsetWidth+n+"px"),h=s.DomHandler.index(t),this.resizeColGroup(d,h,o,null),this.resizeColGroup(c,h,o,null),this.resizeColGroup(p,h,o,null)):(this.tableViewChild.nativeElement.style.width=this.tableViewChild.nativeElement.offsetWidth+n+"px",t.style.width=o+"px",this.containerViewChild.nativeElement.style.width=this.tableViewChild.nativeElement.style.width+"px"));this.onColResize.emit({element:t,delta:n}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",s.DomHandler.removeClass(this.containerViewChild.nativeElement,"ui-unselectable-text")},e.prototype.findParentScrollableView=function(e){if(e){for(var t=e.parentElement;t&&!s.DomHandler.hasClass(t,"ui-table-scrollable-view");)t=t.parentElement;return t}return null},e.prototype.resizeColGroup=function(e,t,n,l){if(e){var i="COLGROUP"===e.children[0].nodeName?e.children[0]:null;if(!i)throw"Scrollable tables require a colgroup to support resizable columns";var o=i.children[t],r=o.nextElementSibling;o.style.width=n+"px",r&&l&&(r.style.width=l+"px")}},e.prototype.onColumnDragStart=function(e,t){this.reorderIconWidth=s.DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement),this.reorderIconHeight=s.DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement),this.draggedColumn=t,e.dataTransfer.setData("text","b")},e.prototype.onColumnDragEnter=function(e,t){if(this.reorderableColumns&&this.draggedColumn&&t){e.preventDefault();var n=s.DomHandler.getOffset(this.containerViewChild.nativeElement),l=s.DomHandler.getOffset(t);if(this.draggedColumn!=t){var i=l.left-n.left,o=l.left+t.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=l.top-n.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=l.top-n.top+t.offsetHeight+"px",e.pageX>o?(this.reorderIndicatorUpViewChild.nativeElement.style.left=i+t.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=i+t.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=i-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=i-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}},e.prototype.onColumnDragLeave=function(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")},e.prototype.onColumnDrop=function(e,t){if(e.preventDefault(),this.draggedColumn){var n=s.DomHandler.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),l=s.DomHandler.indexWithinGroup(t,"preorderablecolumn"),i=n!=l;i&&(l-n==1&&-1===this.dropPosition||n-l==1&&1===this.dropPosition)&&(i=!1),i&&ln&&-1===this.dropPosition&&(l-=1),i&&(c.ObjectUtils.reorderArray(this.columns,n,l),this.onColReorder.emit({dragIndex:n,dropIndex:l,columns:this.columns}),this.isStateful()&&this.saveState()),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}},e.prototype.onRowDragStart=function(e,t){this.rowDragging=!0,this.draggedRowIndex=t,e.dataTransfer.setData("text","b")},e.prototype.onRowDragOver=function(e,t,n){if(this.rowDragging&&this.draggedRowIndex!==t){var l=s.DomHandler.getOffset(n).top+s.DomHandler.getWindowScrollTop(),i=e.pageY,o=l+s.DomHandler.getOuterHeight(n)/2,r=n.previousElementSibling;ithis.droppedRowIndex?this.droppedRowIndex:0===this.droppedRowIndex?0:this.droppedRowIndex-1),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:this.droppedRowIndex})),this.onRowDragLeave(e,t),this.onRowDragEnd(e)},e.prototype.handleVirtualScroll=function(e){var t=this;this.first=(e.page-1)*this.rows,this.virtualScrollCallback=e.callback,this.zone.run(function(){t.virtualScrollTimer&&clearTimeout(t.virtualScrollTimer),t.virtualScrollTimer=setTimeout(function(){t.onLazyLoad.emit(t.createLazyLoadMetadata())},t.virtualScrollDelay)})},e.prototype.isEmpty=function(){var e=this.filteredValue||this.value;return null==e||0==e.length},e.prototype.getBlockableElement=function(){return this.el.nativeElement.children[0]},e.prototype.getStorage=function(){switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}},e.prototype.isStateful=function(){return null!=this.stateKey},e.prototype.saveState=function(){var e=this.getStorage(),t={};this.paginator&&(t.first=this.first,t.rows=this.rows),this.sortField&&(t.sortField=this.sortField,t.sortOrder=this.sortOrder),this.multiSortMeta&&(t.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(t.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(t),this.reorderableColumns&&this.saveColumnOrder(t),this.selection&&(t.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(t.expandedRowKeys=this.expandedRowKeys),Object.keys(t).length&&e.setItem(this.stateKey,JSON.stringify(t))},e.prototype.clearState=function(){var e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)},e.prototype.restoreState=function(){var e=this.getStorage().getItem(this.stateKey);if(e){var t=JSON.parse(e);this.paginator&&(this.first=t.first,this.rows=t.rows),t.sortField&&(this.restoringSort=!0,this._sortField=t.sortField,this._sortOrder=t.sortOrder),t.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=t.multiSortMeta),t.filters&&(this.restoringFilter=!0,this.filters=t.filters),this.resizableColumns&&(this.columnWidthsState=t.columnWidths,this.tableWidthState=t.tableWidth),t.expandedRowKeys&&(this.expandedRowKeys=t.expandedRowKeys),t.selection&&(this.selection=t.selection),this.stateRestored=!0}},e.prototype.saveColumnWidths=function(e){var t=[];s.DomHandler.find(this.containerViewChild.nativeElement,".ui-table-thead > tr:first-child > th").map(function(e){return t.push(s.DomHandler.getOuterWidth(e))}),e.columnWidths=t.join(","),"expand"===this.columnResizeMode&&(e.tableWidth=this.scrollable?s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-header-table").style.width:s.DomHandler.getOuterWidth(this.tableViewChild.nativeElement)+"px")},e.prototype.restoreColumnWidths=function(){if(this.columnWidthsState){var e=this.columnWidthsState.split(",");if("expand"===this.columnResizeMode&&this.tableWidthState)if(this.scrollable){var t=s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-body-table"),n=s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-header-table"),l=s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-footer-table");t.style.width=this.tableWidthState,n.style.width=this.tableWidthState,l&&(l.style.width=this.tableWidthState)}else this.tableViewChild.nativeElement.style.width=this.tableWidthState,this.containerViewChild.nativeElement.style.width=this.tableWidthState;if(this.scrollable){var i=s.DomHandler.find(this.containerViewChild.nativeElement,".ui-table-scrollable-header-table > colgroup > col"),o=s.DomHandler.find(this.containerViewChild.nativeElement,".ui-table-scrollable-body-table > colgroup > col");i.map(function(t,n){return t.style.width=e[n]+"px"}),o.map(function(t,n){return t.style.width=e[n]+"px"})}else s.DomHandler.find(this.tableViewChild.nativeElement,".ui-table-thead > tr:first-child > th").map(function(t,n){return t.style.width=e[n]+"px"})}},e.prototype.saveColumnOrder=function(e){if(this.columns){var t=[];this.columns.map(function(e){t.push(e.field||e.key)}),e.columnOrder=t}},e.prototype.restoreColumnOrder=function(){var e=this,t=this.getStorage().getItem(this.stateKey);if(t){var n=JSON.parse(t).columnOrder;if(n){var l=[];n.map(function(t){return l.push(e.findColumnByKey(t))}),this.columnOrderStateRestored=!0,this.columns=l}}},e.prototype.findColumnByKey=function(e){if(!this.columns)return null;for(var t=0,n=this.columns;t\n

\n
\n \n
\n
\n \n
\n \n \n
\n \n \n \n \n \n \n \n \n \n
\n
\n\n
\n
\n
\n
\n \n \n
\n \n
\n\n \n\n \n \n \n ',providers:[h]})],e)}();t.Table=f;var g=function(){function e(e){this.dt=e}return l([o.Input("pTableBody"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input("pTableBodyTemplate"),i("design:type",o.TemplateRef)],e.prototype,"template",void 0),l([o.Component({selector:"[pTableBody]",template:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '})],e)}();t.TableBody=g;var m=function(){function e(e,t,n){var l=this;this.dt=e,this.el=t,this.zone=n,this.subscription=this.dt.tableService.valueSource$.subscribe(function(){l.zone.runOutsideAngular(function(){setTimeout(function(){l.alignScrollBar()},50)})}),this.dt.virtualScroll&&(this.totalRecordsSubscription=this.dt.tableService.totalRecordsSource$.subscribe(function(){l.zone.runOutsideAngular(function(){setTimeout(function(){l.setVirtualScrollerHeight()},50)})})),this.initialized=!1}return Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this._scrollHeight},set:function(e){this._scrollHeight=e,this.setScrollHeight()},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewChecked=function(){!this.initialized&&this.el.nativeElement.offsetParent&&(this.alignScrollBar(),this.setScrollHeight(),this.initialized=!0)},e.prototype.ngAfterViewInit=function(){var e=this;if(this.frozen){this.scrollBodyViewChild.nativeElement.style.marginBottom=s.DomHandler.calculateScrollbarWidth()+"px";var t=this.el.nativeElement.nextElementSibling;t&&(this.scrollableSiblingBody=s.DomHandler.findSingle(t,".ui-table-scrollable-body"))}else{(this.dt.frozenColumns||this.dt.frozenBodyTemplate)&&s.DomHandler.addClass(this.el.nativeElement,"ui-table-unfrozen-view");var n=this.el.nativeElement.previousElementSibling;n&&(this.frozenSiblingBody=s.DomHandler.findSingle(n,".ui-table-scrollable-body"))}this.bindEvents(),this.setScrollHeight(),this.alignScrollBar(),this.frozen&&(this.columnsSubscription=this.dt.tableService.columnsSource$.subscribe(function(){e.zone.runOutsideAngular(function(){setTimeout(function(){e.setScrollHeight()},50)})})),this.dt.virtualScroll&&this.setVirtualScrollerHeight()},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular(function(){s.DomHandler.calculateScrollbarWidth(),e.scrollHeaderViewChild&&e.scrollHeaderViewChild.nativeElement&&(e.headerScrollListener=e.onHeaderScroll.bind(e),e.scrollHeaderBoxViewChild.nativeElement.addEventListener("scroll",e.headerScrollListener)),e.scrollFooterViewChild&&e.scrollFooterViewChild.nativeElement&&(e.footerScrollListener=e.onFooterScroll.bind(e),e.scrollFooterViewChild.nativeElement.addEventListener("scroll",e.footerScrollListener)),e.frozen||(e.bodyScrollListener=e.onBodyScroll.bind(e),e.scrollBodyViewChild.nativeElement.addEventListener("scroll",e.bodyScrollListener))})},e.prototype.unbindEvents=function(){this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&this.scrollHeaderBoxViewChild.nativeElement.removeEventListener("scroll",this.headerScrollListener),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&this.scrollFooterViewChild.nativeElement.removeEventListener("scroll",this.footerScrollListener),this.scrollBodyViewChild.nativeElement.removeEventListener("scroll",this.bodyScrollListener)},e.prototype.onHeaderScroll=function(e){this.scrollHeaderViewChild.nativeElement.scrollLeft=0},e.prototype.onFooterScroll=function(e){this.scrollFooterViewChild.nativeElement.scrollLeft=0},e.prototype.onBodyScroll=function(e){var t=this;if(this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft=-1*this.scrollBodyViewChild.nativeElement.scrollLeft+"px"),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginLeft=-1*this.scrollBodyViewChild.nativeElement.scrollLeft+"px"),this.frozenSiblingBody&&(this.frozenSiblingBody.scrollTop=this.scrollBodyViewChild.nativeElement.scrollTop),this.dt.virtualScroll){var n=s.DomHandler.getOuterHeight(this.scrollBodyViewChild.nativeElement),l=s.DomHandler.getOuterHeight(this.scrollTableViewChild.nativeElement),i=this.dt.virtualRowHeight*this.dt.rows,o=s.DomHandler.getOuterHeight(this.virtualScrollerViewChild.nativeElement)/i||1,r=this.scrollTableViewChild.nativeElement.style.top||"0";if(this.scrollBodyViewChild.nativeElement.scrollTop+n>parseFloat(r)+l||this.scrollBodyViewChild.nativeElement.scrollTops.DomHandler.getOuterHeight(this.scrollBodyViewChild.nativeElement)},e.prototype.alignScrollBar=function(){if(!this.frozen){var e=this.hasVerticalOverflow()?s.DomHandler.calculateScrollbarWidth():0;this.scrollHeaderBoxViewChild.nativeElement.style.marginRight=e+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginRight=e+"px")}this.initialized=!1},e.prototype.ngOnDestroy=function(){this.unbindEvents(),this.frozenSiblingBody=null,this.subscription&&this.subscription.unsubscribe(),this.totalRecordsSubscription&&this.totalRecordsSubscription.unsubscribe(),this.columnsSubscription&&this.columnsSubscription.unsubscribe(),this.initialized=!1},l([o.Input("pScrollableView"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.ViewChild("scrollHeader"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderViewChild",void 0),l([o.ViewChild("scrollHeaderBox"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderBoxViewChild",void 0),l([o.ViewChild("scrollBody"),i("design:type",o.ElementRef)],e.prototype,"scrollBodyViewChild",void 0),l([o.ViewChild("scrollTable"),i("design:type",o.ElementRef)],e.prototype,"scrollTableViewChild",void 0),l([o.ViewChild("scrollFooter"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterViewChild",void 0),l([o.ViewChild("scrollFooterBox"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterBoxViewChild",void 0),l([o.ViewChild("virtualScroller"),i("design:type",o.ElementRef)],e.prototype,"virtualScrollerViewChild",void 0),l([o.Input(),i("design:type",String),i("design:paramtypes",[String])],e.prototype,"scrollHeight",null),l([o.Component({selector:"[pScrollableView]",template:'\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n \n \n \n
\n
\n
\n \n '})],e)}();t.ScrollableView=m;var v=function(){function e(e){var t=this;this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe(function(e){t.updateSortState()}))}return e.prototype.ngOnInit=function(){this.isEnabled()&&this.updateSortState()},e.prototype.updateSortState=function(){this.sorted=this.dt.isSorted(this.field)},e.prototype.onClick=function(e){this.isEnabled()&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),s.DomHandler.clearSelection())},e.prototype.onEnterKey=function(e){this.onClick(e)},e.prototype.isEnabled=function(){return!0!==this.pSortableColumnDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pSortableColumn"),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pSortableColumnDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[MouseEvent]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.HostListener("keydown.enter",["$event"]),i("design:type",Function),i("design:paramtypes",[MouseEvent]),i("design:returntype",void 0)],e.prototype,"onEnterKey",null),l([o.Directive({selector:"[pSortableColumn]",host:{"[class.ui-sortable-column]":"isEnabled()","[class.ui-state-highlight]":"sorted","[attr.tabindex]":'isEnabled() ? "0" : null'}})],e)}();t.SortableColumn=v;var y=function(){function e(e){var t=this;this.dt=e,this.subscription=this.dt.tableService.sortSource$.subscribe(function(e){t.updateSortState()})}return e.prototype.ngOnInit=function(){this.updateSortState()},e.prototype.onClick=function(e){e.preventDefault()},e.prototype.updateSortState=function(){if("single"===this.dt.sortMode)this.sortOrder=this.dt.isSorted(this.field)?this.dt.sortOrder:0;else if("multiple"===this.dt.sortMode){var e=this.dt.getSortMeta(this.field);this.sortOrder=e?e.order:0}},Object.defineProperty(e.prototype,"ariaText",{get:function(){var e;switch(this.sortOrder){case 1:e=this.ariaLabelAsc;break;case-1:e=this.ariaLabelDesc;break;default:e=this.ariaLabel}return e},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",String)],e.prototype,"ariaLabel",void 0),l([o.Input(),i("design:type",String)],e.prototype,"ariaLabelDesc",void 0),l([o.Input(),i("design:type",String)],e.prototype,"ariaLabelAsc",void 0),l([o.Component({selector:"p-sortIcon",template:"\n \n "})],e)}();t.SortIcon=y;var b=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.selected=n.dt.isSelected(n.data)}))}return e.prototype.ngOnInit=function(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))},e.prototype.onClick=function(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})},e.prototype.onTouchEnd=function(e){this.isEnabled()&&this.dt.handleRowTouchEnd(e)},e.prototype.onKeyDown=function(e){if(this.isEnabled()){var t=e.target;switch(e.which){case 40:var n=this.findNextSelectableRow(t);n&&n.focus(),e.preventDefault();break;case 38:var l=this.findPrevSelectableRow(t);l&&l.focus(),e.preventDefault();break;case 13:this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}}},e.prototype.findNextSelectableRow=function(e){var t=e.nextElementSibling;return t?s.DomHandler.hasClass(t,"ui-selectable-row")?t:this.findNextSelectableRow(t):null},e.prototype.findPrevSelectableRow=function(e){var t=e.previousElementSibling;return t?s.DomHandler.hasClass(t,"ui-selectable-row")?t:this.findPrevSelectableRow(t):null},e.prototype.isEnabled=function(){return!0!==this.pSelectableRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pSelectableRow"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input("pSelectableRowIndex"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pSelectableRowDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.HostListener("touchend",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onTouchEnd",null),l([o.HostListener("keydown",["$event"]),i("design:type",Function),i("design:paramtypes",[KeyboardEvent]),i("design:returntype",void 0)],e.prototype,"onKeyDown",null),l([o.Directive({selector:"[pSelectableRow]",host:{"[class.ui-selectable-row]":"isEnabled()","[class.ui-state-highlight]":"selected","[attr.tabindex]":"isEnabled() ? 0 : undefined"}})],e)}();t.SelectableRow=b;var C=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.selected=n.dt.isSelected(n.data)}))}return e.prototype.ngOnInit=function(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))},e.prototype.onClick=function(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})},e.prototype.isEnabled=function(){return!0!==this.pSelectableRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pSelectableRowDblClick"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input("pSelectableRowIndex"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pSelectableRowDisabled",void 0),l([o.HostListener("dblclick",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.Directive({selector:"[pSelectableRowDblClick]",host:{"[class.ui-state-highlight]":"selected"}})],e)}();t.SelectableRowDblClick=C;var w=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.contextMenuSource$.subscribe(function(e){n.selected=n.dt.equals(n.data,e)}))}return e.prototype.onContextMenu=function(e){this.isEnabled()&&(this.dt.handleRowRightClick({originalEvent:e,rowData:this.data}),e.preventDefault())},e.prototype.isEnabled=function(){return!0!==this.pContextMenuRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pContextMenuRow"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pContextMenuRowDisabled",void 0),l([o.HostListener("contextmenu",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onContextMenu",null),l([o.Directive({selector:"[pContextMenuRow]",host:{"[class.ui-contextmenu-selected]":"selected"}})],e)}();t.ContextMenuRow=w;var _=function(){function e(e){this.dt=e}return e.prototype.onClick=function(e){this.isEnabled()&&(this.dt.toggleRow(this.data,e),e.preventDefault())},e.prototype.isEnabled=function(){return!0!==this.pRowTogglerDisabled},l([o.Input("pRowToggler"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pRowTogglerDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.Directive({selector:"[pRowToggler]"})],e)}();t.RowToggler=_;var x=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){var e=this;this.isEnabled()&&(s.DomHandler.addClass(this.el.nativeElement,"ui-resizable-column"),this.resizer=document.createElement("span"),this.resizer.className="ui-column-resizer ui-clickable",this.el.nativeElement.appendChild(this.resizer),this.zone.runOutsideAngular(function(){e.resizerMouseDownListener=e.onMouseDown.bind(e),e.resizer.addEventListener("mousedown",e.resizerMouseDownListener)}))},e.prototype.bindDocumentEvents=function(){var e=this;this.zone.runOutsideAngular(function(){e.documentMouseMoveListener=e.onDocumentMouseMove.bind(e),document.addEventListener("mousemove",e.documentMouseMoveListener),e.documentMouseUpListener=e.onDocumentMouseUp.bind(e),document.addEventListener("mouseup",e.documentMouseUpListener)})},e.prototype.unbindDocumentEvents=function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},e.prototype.onMouseDown=function(e){this.dt.onColumnResizeBegin(e),this.bindDocumentEvents()},e.prototype.onDocumentMouseMove=function(e){this.dt.onColumnResize(e)},e.prototype.onDocumentMouseUp=function(e){this.dt.onColumnResizeEnd(e,this.el.nativeElement),this.unbindDocumentEvents()},e.prototype.isEnabled=function(){return!0!==this.pResizableColumnDisabled},e.prototype.ngOnDestroy=function(){this.resizerMouseDownListener&&this.resizer.removeEventListener("mousedown",this.resizerMouseDownListener),this.unbindDocumentEvents()},l([o.Input(),i("design:type",Boolean)],e.prototype,"pResizableColumnDisabled",void 0),l([o.Directive({selector:"[pResizableColumn]"})],e)}();t.ResizableColumn=x;var S=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&this.bindEvents()},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular(function(){e.mouseDownListener=e.onMouseDown.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.dragStartListener=e.onDragStart.bind(e),e.el.nativeElement.addEventListener("dragstart",e.dragStartListener),e.dragOverListener=e.onDragEnter.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener),e.dragEnterListener=e.onDragEnter.bind(e),e.el.nativeElement.addEventListener("dragenter",e.dragEnterListener),e.dragLeaveListener=e.onDragLeave.bind(e),e.el.nativeElement.addEventListener("dragleave",e.dragLeaveListener)})},e.prototype.unbindEvents=function(){this.mouseDownListener&&(document.removeEventListener("mousedown",this.mouseDownListener),this.mouseDownListener=null),this.dragOverListener&&(document.removeEventListener("dragover",this.dragOverListener),this.dragOverListener=null),this.dragEnterListener&&(document.removeEventListener("dragenter",this.dragEnterListener),this.dragEnterListener=null),this.dragEnterListener&&(document.removeEventListener("dragenter",this.dragEnterListener),this.dragEnterListener=null),this.dragLeaveListener&&(document.removeEventListener("dragleave",this.dragLeaveListener),this.dragLeaveListener=null)},e.prototype.onMouseDown=function(e){this.el.nativeElement.draggable="INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName&&!s.DomHandler.hasClass(e.target,"ui-column-resizer")},e.prototype.onDragStart=function(e){this.dt.onColumnDragStart(e,this.el.nativeElement)},e.prototype.onDragOver=function(e){e.preventDefault()},e.prototype.onDragEnter=function(e){this.dt.onColumnDragEnter(e,this.el.nativeElement)},e.prototype.onDragLeave=function(e){this.dt.onColumnDragLeave(e)},e.prototype.onDrop=function(e){this.isEnabled()&&this.dt.onColumnDrop(e,this.el.nativeElement)},e.prototype.isEnabled=function(){return!0!==this.pReorderableColumnDisabled},e.prototype.ngOnDestroy=function(){this.unbindEvents()},l([o.Input(),i("design:type",Boolean)],e.prototype,"pReorderableColumnDisabled",void 0),l([o.HostListener("drop",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDrop",null),l([o.Directive({selector:"[pReorderableColumn]"})],e)}();t.ReorderableColumn=S;var E=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&s.DomHandler.addClass(this.el.nativeElement,"ui-editable-column")},e.prototype.onClick=function(e){if(this.isEnabled())if(this.dt.editingCellClick=!0,this.dt.editingCell){if(this.dt.editingCell!==this.el.nativeElement){if(!this.dt.isEditingCellValid())return;s.DomHandler.removeClass(this.dt.editingCell,"ui-editing-cell"),this.openCell()}}else this.openCell()},e.prototype.openCell=function(){var e=this;this.dt.updateEditingCell(this.el.nativeElement),s.DomHandler.addClass(this.el.nativeElement,"ui-editing-cell"),this.dt.onEditInit.emit({field:this.field,data:this.data}),this.zone.runOutsideAngular(function(){setTimeout(function(){var t=s.DomHandler.findSingle(e.el.nativeElement,"input, textarea");t&&t.focus()},50)})},e.prototype.closeEditingCell=function(){s.DomHandler.removeClass(this.dt.editingCell,"ui-editing-cell"),this.dt.editingCell=null,this.dt.unbindDocumentEditListener()},e.prototype.onKeyDown=function(e){this.isEnabled()&&(13==e.keyCode?(this.dt.isEditingCellValid()&&(this.closeEditingCell(),this.dt.onEditComplete.emit({field:this.field,data:this.data})),e.preventDefault()):27==e.keyCode?(this.dt.isEditingCellValid()&&(this.closeEditingCell(),this.dt.onEditCancel.emit({field:this.field,data:this.data})),e.preventDefault()):9==e.keyCode&&(this.dt.onEditComplete.emit({field:this.field,data:this.data}),e.shiftKey?this.moveToPreviousCell(e):this.moveToNextCell(e)))},e.prototype.findCell=function(e){if(e){for(var t=e;t&&!s.DomHandler.hasClass(t,"ui-editing-cell");)t=t.parentElement;return t}return null},e.prototype.moveToPreviousCell=function(e){var t=this.findCell(e.target),n=this.findPreviousEditableColumn(t);n&&(s.DomHandler.invokeElementMethod(e.target,"blur"),s.DomHandler.invokeElementMethod(n,"click"),e.preventDefault())},e.prototype.moveToNextCell=function(e){var t=this.findCell(e.target),n=this.findNextEditableColumn(t);n&&(s.DomHandler.invokeElementMethod(e.target,"blur"),s.DomHandler.invokeElementMethod(n,"click"),e.preventDefault())},e.prototype.findPreviousEditableColumn=function(e){var t=e.previousElementSibling;if(!t){var n=e.parentElement.previousElementSibling;n&&(t=n.lastElementChild)}return t?s.DomHandler.hasClass(t,"ui-editable-column")?t:this.findPreviousEditableColumn(t):null},e.prototype.findNextEditableColumn=function(e){var t=e.nextElementSibling;if(!t){var n=e.parentElement.nextElementSibling;n&&(t=n.firstElementChild)}return t?s.DomHandler.hasClass(t,"ui-editable-column")?t:this.findNextEditableColumn(t):null},e.prototype.isEnabled=function(){return!0!==this.pEditableColumnDisabled},l([o.Input("pEditableColumn"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input("pEditableColumnField"),i("design:type",Object)],e.prototype,"field",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pEditableColumnDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[MouseEvent]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.HostListener("keydown",["$event"]),i("design:type",Function),i("design:paramtypes",[KeyboardEvent]),i("design:returntype",void 0)],e.prototype,"onKeyDown",null),l([o.Directive({selector:"[pEditableColumn]"})],e)}();t.EditableColumn=E;var I=function(){function e(e,t){this.dt=e,this.editableColumn=t}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"input":e.inputTemplate=t.template;break;case"output":e.outputTemplate=t.template}})},l([o.ContentChildren(u.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.Component({selector:"p-cellEditor",template:'\n \n \n \n \n \n \n '})],e)}();t.CellEditor=I;var O=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.checked=n.dt.isSelected(n.value)})}return e.prototype.ngOnInit=function(){this.checked=this.dt.isSelected(this.value)},e.prototype.onClick=function(e){this.disabled||this.dt.toggleRowWithRadio({originalEvent:e,rowIndex:this.index},this.value),s.DomHandler.clearSelection()},e.prototype.onFocus=function(){s.DomHandler.addClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.onBlur=function(){s.DomHandler.removeClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"value",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"index",void 0),l([o.ViewChild("box"),i("design:type",o.ElementRef)],e.prototype,"boxViewChild",void 0),l([o.Component({selector:"p-tableRadioButton",template:'\n
\n
\n \n
\n
\n \n
\n
\n '})],e)}();t.TableRadioButton=O;var T=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.checked=n.dt.isSelected(n.value)})}return e.prototype.ngOnInit=function(){this.checked=this.dt.isSelected(this.value)},e.prototype.onClick=function(e){this.disabled||this.dt.toggleRowWithCheckbox({originalEvent:e,rowIndex:this.index},this.value),s.DomHandler.clearSelection()},e.prototype.onFocus=function(){s.DomHandler.addClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.onBlur=function(){s.DomHandler.removeClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"value",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"index",void 0),l([o.ViewChild("box"),i("design:type",o.ElementRef)],e.prototype,"boxViewChild",void 0),l([o.Component({selector:"p-tableCheckbox",template:'\n
\n
\n \n
\n
\n \n
\n
\n '})],e)}();t.TableCheckbox=T;var D=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.valueChangeSubscription=this.dt.tableService.valueSource$.subscribe(function(){n.checked=n.updateCheckedState()}),this.selectionChangeSubscription=this.dt.tableService.selectionSource$.subscribe(function(){n.checked=n.updateCheckedState()})}return e.prototype.ngOnInit=function(){this.checked=this.updateCheckedState()},e.prototype.onClick=function(e,t){this.disabled||this.dt.value&&this.dt.value.length>0&&this.dt.toggleRowsWithCheckbox(e,!t),s.DomHandler.clearSelection()},e.prototype.onFocus=function(){s.DomHandler.addClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.onBlur=function(){s.DomHandler.removeClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.isDisabled=function(){return this.disabled||!this.dt.value||!this.dt.value.length},e.prototype.ngOnDestroy=function(){this.selectionChangeSubscription&&this.selectionChangeSubscription.unsubscribe(),this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe()},e.prototype.updateCheckedState=function(){var e;return this.dt.filteredValue?(e=this.dt.filteredValue)&&e.length>0&&this.dt.selection&&this.dt.selection.length>0&&this.isAllFilteredValuesChecked():(e=this.dt.value)&&e.length>0&&this.dt.selection&&this.dt.selection.length>0&&this.dt.selection.length===e.length},e.prototype.isAllFilteredValuesChecked=function(){if(this.dt.filteredValue){for(var e=0,t=this.dt.filteredValue;e\n
\n \n
\n
\n \n
\n \n '})],e)}();t.TableHeaderCheckbox=D;var R=function(){function e(e){this.el=e}return e.prototype.ngAfterViewInit=function(){s.DomHandler.addClass(this.el.nativeElement,"ui-table-reorderablerow-handle")},l([o.Input("pReorderableRowHandle"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Directive({selector:"[pReorderableRowHandle]"})],e)}();t.ReorderableRowHandle=R;var k=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&(this.el.nativeElement.droppable=!0,this.bindEvents())},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular(function(){e.mouseDownListener=e.onMouseDown.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.dragStartListener=e.onDragStart.bind(e),e.el.nativeElement.addEventListener("dragstart",e.dragStartListener),e.dragEndListener=e.onDragEnd.bind(e),e.el.nativeElement.addEventListener("dragend",e.dragEndListener),e.dragOverListener=e.onDragOver.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener),e.dragLeaveListener=e.onDragLeave.bind(e),e.el.nativeElement.addEventListener("dragleave",e.dragLeaveListener)})},e.prototype.unbindEvents=function(){this.mouseDownListener&&(document.removeEventListener("mousedown",this.mouseDownListener),this.mouseDownListener=null),this.dragStartListener&&(document.removeEventListener("dragstart",this.dragStartListener),this.dragStartListener=null),this.dragEndListener&&(document.removeEventListener("dragend",this.dragEndListener),this.dragEndListener=null),this.dragOverListener&&(document.removeEventListener("dragover",this.dragOverListener),this.dragOverListener=null),this.dragLeaveListener&&(document.removeEventListener("dragleave",this.dragLeaveListener),this.dragLeaveListener=null)},e.prototype.onMouseDown=function(e){this.el.nativeElement.draggable=!!s.DomHandler.hasClass(e.target,"ui-table-reorderablerow-handle")},e.prototype.onDragStart=function(e){this.dt.onRowDragStart(e,this.index)},e.prototype.onDragEnd=function(e){this.dt.onRowDragEnd(e),this.el.nativeElement.draggable=!1},e.prototype.onDragOver=function(e){this.dt.onRowDragOver(e,this.index,this.el.nativeElement),e.preventDefault()},e.prototype.onDragLeave=function(e){this.dt.onRowDragLeave(e,this.el.nativeElement)},e.prototype.isEnabled=function(){return!0!==this.pReorderableRowDisabled},e.prototype.onDrop=function(e){this.isEnabled()&&this.dt.rowDragging&&this.dt.onRowDrop(e,this.el.nativeElement),e.preventDefault()},l([o.Input("pReorderableRow"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pReorderableRowDisabled",void 0),l([o.HostListener("drop",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDrop",null),l([o.Directive({selector:"[pReorderableRow]"})],e)}();t.ReorderableRow=k,t.TableModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.PaginatorModule],exports:[f,u.SharedModule,v,b,_,w,x,S,E,I,y,O,T,D,R,k,C],declarations:[f,v,b,_,w,x,S,E,I,g,m,y,O,T,D,R,k,C]})],function(){})}()},DKTb:function(e,t,n){"use strict";function l(e){setTimeout(function(){throw e},0)}n.d(t,"a",function(){return l})},DqLj:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n("sdDj");t.DomHandler=l.DomHandler;var i=n("B58V");t.TreeDragDropService=i.TreeDragDropService;var o=n("oygf");t.ConfirmationService=o.ConfirmationService;var r=n("4Vzq");t.MessageService=r.MessageService;var u=n("6xRK");t.DialogService=u.DialogService;var a=n("V3HQ");t.DynamicDialogConfig=a.DynamicDialogConfig;var s=n("RWz4");t.DynamicDialogRef=s.DynamicDialogRef},DtyJ:function(e,t,n){"use strict";n.r(t),n.d(t,"Observable",function(){return l.a}),n.d(t,"ConnectableObservable",function(){return i.a}),n.d(t,"GroupedObservable",function(){return s}),n.d(t,"observable",function(){return d.a}),n.d(t,"Subject",function(){return a.a}),n.d(t,"BehaviorSubject",function(){return p.a}),n.d(t,"ReplaySubject",function(){return h.a}),n.d(t,"AsyncSubject",function(){return f}),n.d(t,"asapScheduler",function(){return g.a}),n.d(t,"asyncScheduler",function(){return m.a}),n.d(t,"queueScheduler",function(){return v.a}),n.d(t,"animationFrameScheduler",function(){return y.a}),n.d(t,"VirtualTimeScheduler",function(){return C}),n.d(t,"VirtualAction",function(){return w}),n.d(t,"Scheduler",function(){return _.a}),n.d(t,"Subscription",function(){return u.a}),n.d(t,"Subscriber",function(){return r.a}),n.d(t,"Notification",function(){return x.a}),n.d(t,"NotificationKind",function(){return x.b}),n.d(t,"pipe",function(){return S.a}),n.d(t,"noop",function(){return E.a}),n.d(t,"identity",function(){return I.a}),n.d(t,"isObservable",function(){return O.a}),n.d(t,"ArgumentOutOfRangeError",function(){return T.a}),n.d(t,"EmptyError",function(){return D.a}),n.d(t,"ObjectUnsubscribedError",function(){return R.a}),n.d(t,"UnsubscriptionError",function(){return k.a}),n.d(t,"TimeoutError",function(){return N}),n.d(t,"bindCallback",function(){return V}),n.d(t,"bindNodeCallback",function(){return B}),n.d(t,"combineLatest",function(){return G.a}),n.d(t,"concat",function(){return W.a}),n.d(t,"defer",function(){return q.a}),n.d(t,"empty",function(){return K.b}),n.d(t,"forkJoin",function(){return Y.a}),n.d(t,"from",function(){return Z.a}),n.d(t,"fromEvent",function(){return Q.a}),n.d(t,"fromEventPattern",function(){return J}),n.d(t,"generate",function(){return ee}),n.d(t,"iif",function(){return ne}),n.d(t,"interval",function(){return ie}),n.d(t,"merge",function(){return re.a}),n.d(t,"never",function(){return ae}),n.d(t,"of",function(){return se.a}),n.d(t,"onErrorResumeNext",function(){return ce}),n.d(t,"pairs",function(){return de}),n.d(t,"partition",function(){return me}),n.d(t,"race",function(){return Ce}),n.d(t,"range",function(){return xe}),n.d(t,"throwError",function(){return Ee.a}),n.d(t,"timer",function(){return Ie.a}),n.d(t,"using",function(){return Oe}),n.d(t,"zip",function(){return De}),n.d(t,"scheduled",function(){return Ae.a}),n.d(t,"EMPTY",function(){return K.a}),n.d(t,"NEVER",function(){return ue}),n.d(t,"config",function(){return Pe.a});var l=n("6blF"),i=n("KhEm"),o=n("mrSG"),r=n("FFOo"),u=n("pugT"),a=n("K9Ia"),s=function(e){function t(t,n,l){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=l,i}return o.__extends(t,e),t.prototype._subscribe=function(e){var t=new u.a,n=this.refCountSubscription,l=this.groupSubject;return n&&!n.closed&&t.add(new c(n)),t.add(l.subscribe(e)),t},t}(l.a),c=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return o.__extends(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(u.a),d=n("xTla"),p=n("26FU"),h=n("S5bw"),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o.__extends(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),u.a.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),u.a.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(a.a),g=n("KQya"),m=n("T1DM"),v=n("zo3G"),y=n("tHPV"),b=n("h9Dq"),C=function(e){function t(t,n){void 0===t&&(t=w),void 0===n&&(n=Number.POSITIVE_INFINITY);var l=e.call(this,t,function(){return l.frame})||this;return l.maxFrames=n,l.frame=0,l.index=-1,l}return o.__extends(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,l=this.maxFrames;(t=n[0])&&t.delay<=l&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(n("CS9Q").a),w=function(e){function t(t,n,l){void 0===l&&(l=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=l,i.active=!0,i.index=t.index=l,i}return o.__extends(t,e),t.prototype.schedule=function(n,l){if(void 0===l&&(l=0),!this.id)return e.prototype.schedule.call(this,n,l);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,l)},t.prototype.requestAsyncId=function(e,n,l){void 0===l&&(l=0),this.delay=e.frame+l;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(b.a),_=n("siIJ"),x=n("60iU"),S=n("y3By"),E=n("+umK"),I=n("mChF"),O=n("zrt+"),T=n("b7mW"),D=n("3fWJ"),R=n("8g8A"),k=n("awvh");function M(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}M.prototype=Object.create(Error.prototype);var N=M,L=n("67Y/"),A=n("1fDf"),P=n("isby"),F=n("nkY7");function V(e,t,n){if(t){if(!Object(F.a)(t))return function(){for(var l=[],i=0;i=t){l.complete();break}if(l.next(o++),l.closed)break}})}function Se(e){var t=e.start,n=e.index,l=e.subscriber;n>=e.count?l.complete():(l.next(t),l.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}var Ee=n("XlPw"),Ie=n("gI3B");function Oe(e,t){return new l.a(function(n){var l,i;try{l=e()}catch(r){return void n.error(r)}try{i=t(l)}catch(r){return void n.error(r)}var o=(i?Object(Z.a)(i):K.a).subscribe(n);return function(){o.unsubscribe(),l&&l.unsubscribe()}})}var Te=n("En8+");function De(){for(var e=[],t=0;tthis.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),Le=function(e){function t(t,n,l){var i=e.call(this,t)||this;return i.parent=n,i.observable=l,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return o.__extends(t,e),t.prototype[Te.a]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t,n,l,i){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return Object(be.a)(this,this.observable,this,t)},t}(ye.a),Ae=n("i4X3"),Pe=n("iLxQ")},EBtg:function(e,t,n){"use strict";var l=n("2KeD"),i=n("n73p"),o=n("2qMH"),r=n("LJ/p"),u=n("HZF8"),a=n("90cg"),s=n("yRPT"),c=n("0alx");t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return l.scheduleObservable(e,t);if(a.isPromise(e))return i.schedulePromise(e,t);if(s.isArrayLike(e))return o.scheduleArray(e,t);if(c.isIterable(e)||"string"==typeof e)return r.scheduleIterable(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}},EPYN:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("VSng"),a=function(){return l([o.Component({selector:"p-inplaceDisplay",template:""})],function(){})}();t.InplaceDisplay=a;var s=function(){return l([o.Component({selector:"p-inplaceContent",template:""})],function(){})}();t.InplaceContent=s;var c=function(){function e(){this.onActivate=new o.EventEmitter,this.onDeactivate=new o.EventEmitter}return e.prototype.activate=function(e){this.disabled||(this.active=!0,this.onActivate.emit(e))},e.prototype.deactivate=function(e){this.disabled||(this.active=!1,this.hover=!1,this.onDeactivate.emit(e))},l([o.Input(),i("design:type",Boolean)],e.prototype,"active",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"closable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onActivate",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDeactivate",void 0),l([o.Component({selector:"p-inplace",template:'\n
\n
\n \n
\n
\n \n \n
\n
\n '})],e)}();t.Inplace=c,t.InplaceModule=function(){return l([o.NgModule({imports:[r.CommonModule,u.ButtonModule],exports:[c,a,s,u.ButtonModule],declarations:[c,a,s]})],function(){})}()},EVdn:function(e,t,n){var l;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],r=Object.getPrototypeOf,u=o.slice,a=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},s=o.push,c=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,f=h.toString,g=f.call(Object),m={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},y=function(e){return null!=e&&e===e.window},b=n.document,C={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var l,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(l in C)(i=t[l]||t.getAttribute&&t.getAttribute(l))&&o.setAttribute(l,i);n.head.appendChild(o).parentNode.removeChild(o)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[p.call(e)]||"object":typeof e}var x=function(e,t){return new x.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}x.fn=x.prototype={jquery:"3.5.0",constructor:x,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(x.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+F+")"+F+"*"),G=new RegExp(F+"|>"),W=new RegExp(H),q=new RegExp("^"+V+"$"),K={ID:new RegExp("^#("+V+")"),CLASS:new RegExp("^\\.("+V+")"),TAG:new RegExp("^("+V+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},le=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},re=Ce(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{N.apply(R=L.call(w.childNodes),w.childNodes)}catch(Ee){N={apply:R.length?function(e,t){M.apply(e,L.call(t))}:function(e,t){for(var n=e.length,l=0;e[n++]=t[l++];);e.length=n-1}}}function ue(e,t,l,i){var o,u,s,c,d,f,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(l=l||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return l;if(!i&&(p(t),t=t||h,g)){if(11!==w&&(d=J.exec(e)))if(o=d[1]){if(9===w){if(!(s=t.getElementById(o)))return l;if(s.id===o)return l.push(s),l}else if(y&&(s=y.getElementById(o))&&b(t,s)&&s.id===o)return l.push(s),l}else{if(d[2])return N.apply(l,t.getElementsByTagName(e)),l;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(l,t.getElementsByClassName(o)),l}if(n.qsa&&!O[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(G.test(e)||$.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(le,ie):t.setAttribute("id",c=C)),u=(f=r(e)).length;u--;)f[u]=(c?"#"+c:":scope")+" "+be(f[u]);v=f.join(",")}try{return N.apply(l,y.querySelectorAll(v)),l}catch(_){O(e,!0)}finally{c===C&&t.removeAttribute("id")}}}return a(e.replace(z,"$1"),t,l,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>l.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[C]=!0,e}function ce(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(Ee){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)l.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,l=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(l)return l;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return se(function(t){return t=+t,se(function(n,l){for(var i,o=e([],n.length,t),r=o.length;r--;)n[i=o[r]]&&(n[i]=!(l[i]=n[i]))})})}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ue.support={},o=ue.isXML=function(e){var t=(e.ownerDocument||e).documentElement;return!Y.test(e.namespaceURI||t&&t.nodeName||"HTML")},p=ue.setDocument=function(e){var t,i,r=e?e.ownerDocument||e:w;return r!=h&&9===r.nodeType&&r.documentElement?(f=(h=r).documentElement,g=!o(h),w!=h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce(function(e){return f.appendChild(e).appendChild(h.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(h.getElementsByClassName),n.getById=ce(function(e){return f.appendChild(e).id=C,!h.getElementsByName||!h.getElementsByName(C).length}),n.getById?(l.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},l.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(l.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},l.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,l,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),l=0;o=i[l++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),l.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,l=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&l.push(n);return l}return o},l.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=X.test(h.querySelectorAll))&&(ce(function(e){var t;f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+F+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+C+"-]").length||m.push("~="),(t=h.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=X.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(f.compareDocumentPosition),b=t||X.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,l=t&&t.parentNode;return e===l||!(!l||1!==l.nodeType||!(n.contains?n.contains(l):e.compareDocumentPosition&&16&e.compareDocumentPosition(l)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},T=t?function(e,t){if(e===t)return d=!0,0;var l=!e.compareDocumentPosition-!t.compareDocumentPosition;return l||(1&(l=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===l?e==h||e.ownerDocument==w&&b(w,e)?-1:t==h||t.ownerDocument==w&&b(w,t)?1:c?A(c,e)-A(c,t):0:4&l?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,l=0,i=e.parentNode,o=t.parentNode,r=[e],u=[t];if(!i||!o)return e==h?-1:t==h?1:i?-1:o?1:c?A(c,e)-A(c,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)r.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;r[l]===u[l];)l++;return l?pe(r[l],u[l]):r[l]==w?-1:u[l]==w?1:0},h):h},ue.matches=function(e,t){return ue(e,null,null,t)},ue.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&g&&!O[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var l=y.call(e,t);if(l||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return l}catch(Ee){O(t,!0)}return ue(t,h,null,[e]).length>0},ue.contains=function(e,t){return(e.ownerDocument||e)!=h&&p(e),b(e,t)},ue.attr=function(e,t){(e.ownerDocument||e)!=h&&p(e);var i=l.attrHandle[t.toLowerCase()],o=i&&D.call(l.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ue.escape=function(e){return(e+"").replace(le,ie)},ue.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ue.uniqueSort=function(e){var t,l=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(T),d){for(;t=e[o++];)t===e[o]&&(i=l.push(o));for(;i--;)e.splice(l[i],1)}return c=null,e},i=ue.getText=function(e){var t,n="",l=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[l++];)n+=i(t);return n},(l=ue.selectors={cacheLength:50,createPseudo:se,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ue.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ue.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=r(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(l){var i=ue.attr(l,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,l,i){var o="nth"!==e.slice(0,3),r="last"!==e.slice(-4),u="of-type"===t;return 1===l&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var s,c,d,p,h,f,g=o!==r?"nextSibling":"previousSibling",m=t.parentNode,v=u&&t.nodeName.toLowerCase(),y=!a&&!u,b=!1;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(u?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(b=(h=(s=(c=(d=(p=m)[C]||(p[C]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===_&&s[1])&&s[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(b=h=0)||f.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[_,h,b];break}}else if(y&&(b=h=(s=(c=(d=(p=t)[C]||(p[C]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===_&&s[1]),!1===b)for(;(p=++h&&p&&p[g]||(b=h=0)||f.pop())&&((u?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(y&&((c=(d=p[C]||(p[C]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]=[_,b]),p!==t)););return(b-=i)===l||b%l==0&&b/l>=0}}},PSEUDO:function(e,t){var n,i=l.pseudos[e]||l.setFilters[e.toLowerCase()]||ue.error("unsupported pseudo: "+e);return i[C]?i(t):i.length>1?(n=[e,e,"",t],l.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var l,o=i(e,t),r=o.length;r--;)e[l=A(e,o[r])]=!(n[l]=o[r])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],l=u(e.replace(z,"$1"));return l[C]?se(function(e,t,n,i){for(var o,r=l(e,null,i,[]),u=e.length;u--;)(o=r[u])&&(e[u]=!(t[u]=o))}):function(e,i,o){return t[0]=e,l(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return ue(e,t).length>0}}),contains:se(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:se(function(e){return q.test(e||"")||ue.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!l.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;nt?t:n;--l>=0;)e.push(l);return e}),gt:me(function(e,t,n){for(var l=n<0?n+t:n;++l1?function(t,n,l){for(var i=e.length;i--;)if(!e[i](t,n,l))return!1;return!0}:e[0]}function _e(e,t,n,l,i){for(var o,r=[],u=0,a=e.length,s=null!=t;u-1&&(o[s]=!(r[s]=d))}}else v=_e(v===r?v.splice(f,v.length):v),i?i(null,r,v,a):N.apply(r,v)})}function Se(e){for(var t,n,i,o=e.length,r=l.relative[e[0].type],u=r||l.relative[" "],a=r?1:0,c=Ce(function(e){return e===t},u,!0),d=Ce(function(e){return A(t,e)>-1},u,!0),p=[function(e,n,l){var i=!r&&(l||n!==s)||((t=n).nodeType?c(e,n,l):d(e,n,l));return t=null,i}];a1&&we(p),a>1&&be(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),n,a0,i=e.length>0,o=function(o,r,u,a,c){var d,f,m,v=0,y="0",b=o&&[],C=[],w=s,x=o||i&&l.find.TAG("*",c),S=_+=null==w?1:Math.random()||.1,E=x.length;for(c&&(s=r==h||r||c);y!==E&&null!=(d=x[y]);y++){if(i&&d){for(f=0,r||d.ownerDocument==h||(p(d),u=!g);m=e[f++];)if(m(d,r||h,u)){a.push(d);break}c&&(_=S)}n&&((d=!m&&d)&&v--,o&&b.push(d))}if(v+=y,n&&y!==v){for(f=0;m=t[f++];)m(b,C,r,u);if(o){if(v>0)for(;y--;)b[y]||C[y]||(C[y]=k.call(a));C=_e(C)}N.apply(a,C),c&&!o&&C.length>0&&v+t.length>1&&ue.uniqueSort(a)}return c&&(_=S,s=w),b};return n?se(o):o}(o,i))).selector=e}return u},a=ue.select=function(e,t,n,i){var o,a,s,c,d,p="function"==typeof e&&e,h=!i&&r(e=p.selector||e);if(n=n||[],1===h.length){if((a=h[0]=h[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&g&&l.relative[a[1].type]){if(!(t=(l.find.ID(s.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(o=K.needsContext.test(e)?0:a.length;o--&&!l.relative[c=(s=a[o]).type];)if((d=l.find[c])&&(i=d(s.matches[0].replace(te,ne),ee.test(a[0].type)&&ve(t.parentNode)||t))){if(a.splice(o,1),!(e=i.length&&be(a)))return N.apply(n,i),n;break}}return(p||u(e,h))(i,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=C.split("").sort(T).join("")===C,n.detectDuplicates=!!d,p(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))}),ce(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||de(P,function(e,t,n){var l;if(!n)return!0===e[t]?t.toLowerCase():(l=e.getAttributeNode(t))&&l.specified?l.value:null}),ue}(n);x.find=E,x.expr=E.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=E.uniqueSort,x.text=E.getText,x.isXMLDoc=E.isXML,x.contains=E.contains,x.escapeSelector=E.escape;var I=function(e,t,n){for(var l=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&x(e).is(n))break;l.push(e)}return l},O=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},T=x.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var R=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function k(e,t,n){return v(t)?x.grep(e,function(e,l){return!!t.call(e,l,e)!==n}):t.nodeType?x.grep(e,function(e){return e===t!==n}):"string"!=typeof t?x.grep(e,function(e){return c.call(t,e)>-1!==n}):x.filter(t,e,n)}x.filter=function(e,t,n){var l=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===l.nodeType?x.find.matchesSelector(l,e)?[l]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},x.fn.extend({find:function(e){var t,n,l=this.length,i=this;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;t1?x.uniqueSort(n):n},filter:function(e){return this.pushStack(k(this,e||[],!1))},not:function(e){return this.pushStack(k(this,e||[],!0))},is:function(e){return!!k(this,"string"==typeof e&&T.test(e)?x(e):e||[],!1).length}});var M,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,n){var l,i;if(!e)return this;if(n=n||M,"string"==typeof e){if(!(l="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:N.exec(e))||!l[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(l[1]){if(x.merge(this,x.parseHTML(l[1],(t=t instanceof x?t[0]:t)&&t.nodeType?t.ownerDocument||t:b,!0)),R.test(l[1])&&x.isPlainObject(t))for(l in t)v(this[l])?this[l](t[l]):this.attr(l,t[l]);return this}return(i=b.getElementById(l[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,M=x(b);var L=/^(?:parents|prev(?:Until|All))/,A={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&x.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?x.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(x(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return I(e,"parentNode")},parentsUntil:function(e,t,n){return I(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return I(e,"nextSibling")},prevAll:function(e){return I(e,"previousSibling")},nextUntil:function(e,t,n){return I(e,"nextSibling",n)},prevUntil:function(e,t,n){return I(e,"previousSibling",n)},siblings:function(e){return O((e.parentNode||{}).firstChild,e)},children:function(e){return O(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(D(e,"template")&&(e=e.content||e),x.merge([],e.childNodes))}},function(e,t){x.fn[e]=function(n,l){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(l=n),l&&"string"==typeof l&&(i=x.filter(l,i)),this.length>1&&(A[e]||x.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}});var F=/[^\x20\t\r\n\f]+/g;function V(e){return e}function j(e){throw e}function H(e,t,n,l){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(l))}catch(e){n.apply(void 0,[e])}}x.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return x.each(e.match(F)||[],function(e,n){t[n]=!0}),t}(e):x.extend({},e);var t,n,l,i,o=[],r=[],u=-1,a=function(){for(i=i||e.once,l=t=!0;r.length;u=-1)for(n=r.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?x.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=r=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=r=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],r.push(n),t||a()),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!l}};return s},x.extend({Deferred:function(e){var t=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],l="pending",i={state:function(){return l},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,l){var i=v(e[l[4]])&&e[l[4]];o[l[1]](function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[l[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,l,i){var o=0;function r(e,t,l,i){return function(){var u=this,a=arguments,s=function(){var n,s;if(!(e=o&&(l!==j&&(u=void 0,a=[n]),t.rejectWith(u,a))}};e?c():(x.Deferred.getStackHook&&(c.stackTrace=x.Deferred.getStackHook()),n.setTimeout(c))}}return x.Deferred(function(n){t[0][3].add(r(0,n,v(i)?i:V,n.notifyWith)),t[1][3].add(r(0,n,v(e)?e:V)),t[2][3].add(r(0,n,v(l)?l:j))}).promise()},promise:function(e){return null!=e?x.extend(e,i):i}},o={};return x.each(t,function(e,n){var r=n[2],u=n[5];i[n[1]]=r.add,u&&r.add(function(){l=u},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),r.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=r.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,l=Array(n),i=u.call(arguments),o=x.Deferred(),r=function(e){return function(n){l[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(l,i)}};if(t<=1&&(H(e,o.done(r(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],r(n),o.reject);return o.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&B.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},x.readyException=function(e){n.setTimeout(function(){throw e})};var z=x.Deferred();function U(){b.removeEventListener("DOMContentLoaded",U),n.removeEventListener("load",U),x.ready()}x.fn.ready=function(e){return z.then(e).catch(function(e){x.readyException(e)}),this},x.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==e&&--x.readyWait>0||z.resolveWith(b,[x]))}}),x.ready.then=z.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(x.ready):(b.addEventListener("DOMContentLoaded",U),n.addEventListener("load",U));var $=function(e,t,n,l,i,o,r){var u=0,a=e.length,s=null==n;if("object"===_(n))for(u in i=!0,n)$(e,t,u,n[u],!0,o,r);else if(void 0!==l&&(i=!0,v(l)||(r=!0),s&&(r?(t.call(e,l),t=null):(s=t,t=function(e,t,n){return s.call(x(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each(function(){X.remove(this,e)})}}),x.extend({queue:function(e,t,n){var l;if(e)return l=Q.get(e,t=(t||"fx")+"queue"),n&&(!l||Array.isArray(n)?l=Q.access(e,t,x.makeArray(n)):l.push(n)),l||[]},dequeue:function(e,t){var n=x.queue(e,t=t||"fx"),l=n.length,i=n.shift(),o=x._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),l--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){x.dequeue(e,t)},o)),!l&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:x.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i;he=b.createDocumentFragment().appendChild(b.createElement("div")),(fe=b.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),he.appendChild(fe),m.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="",m.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="",m.option=!!he.lastChild;var ye={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?x.merge([e],n):n}function Ce(e,t){for(var n=0,l=e.length;n",""]);var we=/<|&#?\w+;/;function _e(e,t,n,l,i){for(var o,r,u,a,s,c,d=t.createDocumentFragment(),p=[],h=0,f=e.length;h-1)i&&i.push(o);else if(s=re(o),r=be(d.appendChild(o),"script"),s&&Ce(r),n)for(c=0;o=r[c++];)ve.test(o.type||"")&&n.push(o);return d}var xe=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function Oe(){return!1}function Te(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function De(e,t,n,l,i,o){var r,u;if("object"==typeof t){for(u in"string"!=typeof n&&(l=l||n,n=void 0),t)De(e,u,n,l,t[u],o);return e}if(null==l&&null==i?(i=n,l=n=void 0):null==i&&("string"==typeof n?(i=l,l=void 0):(i=l,l=n,n=void 0)),!1===i)i=Oe;else if(!i)return e;return 1===o&&(r=i,(i=function(e){return x().off(e),r.apply(this,arguments)}).guid=r.guid||(r.guid=x.guid++)),e.each(function(){x.event.add(this,t,i,l,n)})}function Re(e,t,n){n?(Q.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var l,i,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(x.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=u.call(arguments),Q.set(this,t,o),l=n(this,t),this[t](),o!==(i=Q.get(this,t))||l?Q.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(Q.set(this,t,{value:x.event.trigger(x.extend(o[0],x.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&x.event.add(e,t,Ie)}x.event={global:{},add:function(e,t,n,l,i){var o,r,u,a,s,c,d,p,h,f,g,m=Q.get(e);if(Y(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&x.find.matchesSelector(oe,i),n.guid||(n.guid=x.guid++),(a=m.events)||(a=m.events=Object.create(null)),(r=m.handle)||(r=m.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),s=(t=(t||"").match(F)||[""]).length;s--;)h=g=(u=Ee.exec(t[s])||[])[1],f=(u[2]||"").split(".").sort(),h&&(d=x.event.special[h]||{},d=x.event.special[h=(i?d.delegateType:d.bindType)||h]||{},c=x.extend({type:h,origType:g,data:l,handler:n,guid:n.guid,selector:i,needsContext:i&&x.expr.match.needsContext.test(i),namespace:f.join(".")},o),(p=a[h])||((p=a[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,l,f,r)||e.addEventListener&&e.addEventListener(h,r)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),x.event.global[h]=!0)},remove:function(e,t,n,l,i){var o,r,u,a,s,c,d,p,h,f,g,m=Q.hasData(e)&&Q.get(e);if(m&&(a=m.events)){for(s=(t=(t||"").match(F)||[""]).length;s--;)if(h=g=(u=Ee.exec(t[s])||[])[1],f=(u[2]||"").split(".").sort(),h){for(d=x.event.special[h]||{},p=a[h=(l?d.delegateType:d.bindType)||h]||[],u=u[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||l&&l!==c.selector&&("**"!==l||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));r&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,f,m.handle)||x.removeEvent(e,h,m.handle),delete a[h])}else for(h in a)x.event.remove(e,h+t[s],n,l,!0);x.isEmptyObject(a)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,l,i,o,r,u=new Array(arguments.length),a=x.event.fix(e),s=(Q.get(this,"events")||Object.create(null))[a.type]||[],c=x.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;s!==this;s=s.parentNode||this)if(1===s.nodeType&&("click"!==e.type||!0!==s.disabled)){for(o=[],r={},n=0;n-1:x.find(i,this,null,[s]).length),r[i]&&o.push(l);o.length&&u.push({elem:s,handlers:o})}return s=this,a\s*$/g;function Le(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function Ae(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,l,i,o,r,u;if(1===t.nodeType){if(Q.hasData(e)&&(u=Q.get(e).events))for(i in Q.remove(t,"handle events"),u)for(n=0,l=u[i].length;n1&&"string"==typeof f&&!m.checkClone&&Me.test(f))return e.each(function(i){var o=e.eq(i);g&&(t[0]=f.call(this,i,o.html())),Ve(o,t,n,l)});if(p&&(o=(i=_e(t,e[0].ownerDocument,!1,e,l)).firstChild,1===i.childNodes.length&&(i=o),o||l)){for(u=(r=x.map(be(i,"script"),Ae)).length;d0&&Ce(r,!d&&be(e,"script")),c},cleanData:function(e){for(var t,n,l,i=x.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[Q.expando]){if(t.events)for(l in t.events)i[l]?x.event.remove(n,l):x.removeEvent(n,l,t.handle);n[Q.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),x.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return $(this,function(e){return void 0===e?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ve(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Ve(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,l=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ye[(me.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;n3,oe.removeChild(e)),u}}))}();var We=["Webkit","Moz","ms"],qe=b.createElement("div").style,Ke={};function Ye(e){return x.cssProps[e]||Ke[e]||(e in qe?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in qe)return e}(e)||e)}var Ze=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Xe={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"};function et(e,t,n){var l=le.exec(t);return l?Math.max(0,l[2]-(n||0))+(l[3]||"px"):t}function tt(e,t,n,l,i,o){var r="width"===t?1:0,u=0,a=0;if(n===(l?"border":"content"))return 0;for(;r<4;r+=2)"margin"===n&&(a+=x.css(e,n+ie[r],!0,i)),l?("content"===n&&(a-=x.css(e,"padding"+ie[r],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+ie[r]+"Width",!0,i))):(a+=x.css(e,"padding"+ie[r],!0,i),"padding"!==n?a+=x.css(e,"border"+ie[r]+"Width",!0,i):u+=x.css(e,"border"+ie[r]+"Width",!0,i));return!l&&o>=0&&(a+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-a-u-.5))||0),a}function nt(e,t,n){var l=Be(e),i=(!m.boxSizingReliable()||n)&&"border-box"===x.css(e,"boxSizing",!1,l),o=i,r=$e(e,t,l),u="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(r)){if(!n)return r;r="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&D(e,"tr")||"auto"===r||!parseFloat(r)&&"inline"===x.css(e,"display",!1,l))&&e.getClientRects().length&&(i="border-box"===x.css(e,"boxSizing",!1,l),(o=u in e)&&(r=e[u])),(r=parseFloat(r)||0)+tt(e,t,n||(i?"border":"content"),o,l,r)+"px"}function lt(e,t,n,l,i){return new lt.prototype.init(e,t,n,l,i)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,l){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,r,u=K(t),a=Qe.test(t),s=e.style;if(a||(t=Ye(u)),r=x.cssHooks[t]||x.cssHooks[u],void 0===n)return r&&"get"in r&&void 0!==(i=r.get(e,!1,l))?i:s[t];"string"==(o=typeof n)&&(i=le.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||a||(n+=i&&i[3]||(x.cssNumber[u]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(s[t]="inherit"),r&&"set"in r&&void 0===(n=r.set(e,n,l))||(a?s.setProperty(t,n):s[t]=n))}},css:function(e,t,n,l){var i,o,r,u=K(t);return Qe.test(t)||(t=Ye(u)),(r=x.cssHooks[t]||x.cssHooks[u])&&"get"in r&&(i=r.get(e,!0,n)),void 0===i&&(i=$e(e,t,l)),"normal"===i&&t in Je&&(i=Je[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,l){if(n)return!Ze.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,l):ze(e,Xe,function(){return nt(e,t,l)})},set:function(e,n,l){var i,o=Be(e),r=!m.scrollboxSize()&&"absolute"===o.position,u=(r||l)&&"border-box"===x.css(e,"boxSizing",!1,o),a=l?tt(e,t,l,u,o):0;return u&&r&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-tt(e,t,"border",!1,o)-.5)),a&&(i=le.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=x.css(e,t)),et(0,n,a)}}}),x.cssHooks.marginLeft=Ge(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat($e(e,"marginLeft"))||e.getBoundingClientRect().left-ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){for(var l=0,i={},o="string"==typeof n?n.split(" "):[n];l<4;l++)i[e+ie[l]+t]=o[l]||o[l-2]||o[0];return i}},"margin"!==e&&(x.cssHooks[e+t].set=et)}),x.fn.extend({css:function(e,t){return $(this,function(e,t,n){var l,i,o={},r=0;if(Array.isArray(t)){for(l=Be(e),i=t.length;r1)}}),x.Tween=lt,(lt.prototype={constructor:lt,init:function(e,t,n,l,i,o){this.elem=e,this.prop=n,this.easing=i||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=l,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=lt.propHooks[this.prop];return e&&e.get?e.get(this):lt.propHooks._default.get(this)},run:function(e){var t,n=lt.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):lt.propHooks._default.set(this),this}}).init.prototype=lt.prototype,(lt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=x.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):1!==e.elem.nodeType||!x.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:x.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=lt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},x.fx=lt.prototype.init,x.fx.step={};var it,ot,rt=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function at(){ot&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(at):n.setTimeout(at,x.fx.interval),x.fx.tick())}function st(){return n.setTimeout(function(){it=void 0}),it=Date.now()}function ct(e,t){var n,l=0,i={height:e};for(t=t?1:0;l<4;l+=2-t)i["margin"+(n=ie[l])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function dt(e,t,n){for(var l,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,r=i.length;o1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})}}),x.extend({attr:function(e,t,n){var l,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?x.prop(e,t,n):(1===o&&x.isXMLDoc(e)||(i=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void x.removeAttr(e,t):i&&"set"in i&&void 0!==(l=i.set(e,n,t))?l:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(l=i.get(e,t))?l:null==(l=x.find.attr(e,t))?void 0:l)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,l=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[l++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ft[t]||x.find.attr;ft[t]=function(e,t,l){var i,o,r=t.toLowerCase();return l||(o=ft[r],ft[r]=i,i=null!=n(e,t,l)?r:null,ft[r]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function vt(e){return(e.match(F)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}x.fn.extend({prop:function(e,t){return $(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})}}),x.extend({prop:function(e,t,n){var l,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&x.isXMLDoc(e)||(i=x.propHooks[t=x.propFix[t]||t]),void 0!==n?i&&"set"in i&&void 0!==(l=i.set(e,n,t))?l:e[t]=n:i&&"get"in i&&null!==(l=i.get(e,t))?l:e[t]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(x.propHooks.selected={get:function(e){return null},set:function(e){}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(e){var t,n,l,i,o,r,u,a=0;if(v(e))return this.each(function(t){x(this).addClass(e.call(this,t,yt(this)))});if((t=bt(e)).length)for(;n=this[a++];)if(i=yt(n),l=1===n.nodeType&&" "+vt(i)+" "){for(r=0;o=t[r++];)l.indexOf(" "+o+" ")<0&&(l+=o+" ");i!==(u=vt(l))&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,l,i,o,r,u,a=0;if(v(e))return this.each(function(t){x(this).removeClass(e.call(this,t,yt(this)))});if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[a++];)if(i=yt(n),l=1===n.nodeType&&" "+vt(i)+" "){for(r=0;o=t[r++];)for(;l.indexOf(" "+o+" ")>-1;)l=l.replace(" "+o+" "," ");i!==(u=vt(l))&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e,l="string"===n||Array.isArray(e);return"boolean"==typeof t&&l?t?this.addClass(e):this.removeClass(e):v(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,yt(this),t),t)}):this.each(function(){var t,i,o,r;if(l)for(i=0,o=x(this),r=bt(e);t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=yt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,l=0;for(t=" "+e+" ";n=this[l++];)if(1===n.nodeType&&(" "+vt(yt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Ct=/\r/g;x.fn.extend({val:function(e){var t,n,l,i=this[0];return arguments.length?(l=v(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=l?e.call(this,n,x(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ct,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:vt(x.text(e))}},select:{get:function(e){var t,n,l,i=e.options,o=e.selectedIndex,r="select-one"===e.type,u=r?null:[],a=r?o+1:i.length;for(l=o<0?a:r?o:0;l-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=x.inArray(x(e).val(),t)>-1}},m.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in n;var wt=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(e,t,l,i){var o,r,u,a,s,c,d,p,f=[l||b],g=h.call(e,"type")?e.type:e,m=h.call(e,"namespace")?e.namespace.split("."):[];if(r=p=u=l=l||b,3!==l.nodeType&&8!==l.nodeType&&!wt.test(g+x.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),s=g.indexOf(":")<0&&"on"+g,(e=e[x.expando]?e:new x.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=l),t=null==t?[e]:x.makeArray(t,[e]),d=x.event.special[g]||{},i||!d.trigger||!1!==d.trigger.apply(l,t))){if(!i&&!d.noBubble&&!y(l)){for(wt.test((a=d.delegateType||g)+g)||(r=r.parentNode);r;r=r.parentNode)f.push(r),u=r;u===(l.ownerDocument||b)&&f.push(u.defaultView||u.parentWindow||n)}for(o=0;(r=f[o++])&&!e.isPropagationStopped();)p=r,e.type=o>1?a:d.bindType||g,(c=(Q.get(r,"events")||Object.create(null))[e.type]&&Q.get(r,"handle"))&&c.apply(r,t),(c=s&&r[s])&&c.apply&&Y(r)&&(e.result=c.apply(r,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!Y(l)||s&&v(l[g])&&!y(l)&&((u=l[s])&&(l[s]=null),x.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,_t),l[g](),e.isPropagationStopped()&&p.removeEventListener(g,_t),x.event.triggered=void 0,u&&(l[s]=u)),e.result}},simulate:function(e,t,n){var l=x.extend(new x.Event,n,{type:e,isSimulated:!0});x.event.trigger(l,null,t)}}),x.fn.extend({trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return x.event.trigger(e,t,n,!0)}}),m.focusin||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){x.event.simulate(t,e.target,x.event.fix(e))};x.event.special[t]={setup:function(){var l=this.ownerDocument||this.document||this,i=Q.access(l,t);i||l.addEventListener(e,n,!0),Q.access(l,t,(i||0)+1)},teardown:function(){var l=this.ownerDocument||this.document||this,i=Q.access(l,t)-1;i?Q.access(l,t,i):(l.removeEventListener(e,n,!0),Q.remove(l,t))}}});var xt=n.location,St={guid:Date.now()},Et=/\?/;x.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(l){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+e),t};var It=/\[\]$/,Ot=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function Rt(e,t,n,l){var i;if(Array.isArray(t))x.each(t,function(t,i){n||It.test(e)?l(e,i):Rt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,l)});else if(n||"object"!==_(t))l(e,t);else for(i in t)Rt(e+"["+i+"]",t[i],n,l)}x.param=function(e,t){var n,l=[],i=function(e,t){var n=v(t)?t():t;l[l.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)Rt(n,e[n],t,i);return l.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&Dt.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!ge.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(Ot,"\r\n")}}):{name:t.name,value:n.replace(Ot,"\r\n")}}).get()}});var kt=/%20/g,Mt=/#.*$/,Nt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:GET|HEAD)$/,Pt=/^\/\//,Ft={},Vt={},jt="*/".concat("*"),Ht=b.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var l,i=0,o=t.toLowerCase().match(F)||[];if(v(n))for(;l=o[i++];)"+"===l[0]?(l=l.slice(1)||"*",(e[l]=e[l]||[]).unshift(n)):(e[l]=e[l]||[]).push(n)}}function zt(e,t,n,l){var i={},o=e===Vt;function r(u){var a;return i[u]=!0,x.each(e[u]||[],function(e,u){var s=u(t,n,l);return"string"!=typeof s||o||i[s]?o?!(a=s):void 0:(t.dataTypes.unshift(s),r(s),!1)}),a}return r(t.dataTypes[0])||!i["*"]&&r("*")}function Ut(e,t){var n,l,i=x.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:l||(l={}))[n]=t[n]);return l&&x.extend(!0,e,l),e}Ht.href=xt.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,x.ajaxSettings),t):Ut(x.ajaxSettings,e)},ajaxPrefilter:Bt(Ft),ajaxTransport:Bt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0);var l,i,o,r,u,a,s,c,d,p,h=x.ajaxSetup({},t=t||{}),f=h.context||h,g=h.context&&(f.nodeType||f.jquery)?x(f):x.event,m=x.Deferred(),v=x.Callbacks("once memory"),y=h.statusCode||{},C={},w={},_="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(s){if(!r)for(r={};t=Lt.exec(o);)r[t[1].toLowerCase()+" "]=(r[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=r[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return s?o:null},setRequestHeader:function(e,t){return null==s&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==s&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(s)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||_;return l&&l.abort(t),E(0,t),this}};if(m.promise(S),h.url=((e||h.url||xt.href)+"").replace(Pt,xt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(F)||[""],null==h.crossDomain){a=b.createElement("a");try{a.href=h.url,a.href=a.href,h.crossDomain=Ht.protocol+"//"+Ht.host!=a.protocol+"//"+a.host}catch(I){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=x.param(h.data,h.traditional)),zt(Ft,h,t,S),s)return S;for(d in(c=x.event&&h.global)&&0==x.active++&&x.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!At.test(h.type),i=h.url.replace(Mt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(kt,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Et.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Nt,"$1"),p=(Et.test(i)?"&":"?")+"_="+St.guid+++p),h.url=i+p),h.ifModified&&(x.lastModified[i]&&S.setRequestHeader("If-Modified-Since",x.lastModified[i]),x.etag[i]&&S.setRequestHeader("If-None-Match",x.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+jt+"; q=0.01":""):h.accepts["*"]),h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(f,S,h)||s))return S.abort();if(_="abort",v.add(h.complete),S.done(h.success),S.fail(h.error),l=zt(Vt,h,t,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,h]),s)return S;h.async&&h.timeout>0&&(u=n.setTimeout(function(){S.abort("timeout")},h.timeout));try{s=!1,l.send(C,E)}catch(I){if(s)throw I;E(-1,I)}}else E(-1,"No Transport");function E(e,t,r,a){var d,p,b,C,w,_=t;s||(s=!0,u&&n.clearTimeout(u),l=void 0,o=a||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,r&&(C=function(e,t,n){for(var l,i,o,r,u=e.contents,a=e.dataTypes;"*"===a[0];)a.shift(),void 0===l&&(l=e.mimeType||t.getResponseHeader("Content-Type"));if(l)for(i in u)if(u[i]&&u[i].test(l)){a.unshift(i);break}if(a[0]in n)o=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){o=i;break}r||(r=i)}o=o||r}if(o)return o!==a[0]&&a.unshift(o),n[o]}(h,S,r)),!d&&x.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),C=function(e,t,n,l){var i,o,r,u,a,s={},c=e.dataTypes.slice();if(c[1])for(r in e.converters)s[r.toLowerCase()]=e.converters[r];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!a&&l&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=o,o=c.shift())if("*"===o)o=a;else if("*"!==a&&a!==o){if(!(r=s[a+" "+o]||s["* "+o]))for(i in s)if((u=i.split(" "))[1]===o&&(r=s[a+" "+u[0]]||s["* "+u[0]])){!0===r?r=s[i]:!0!==s[i]&&(o=u[0],c.unshift(u[1]));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(I){return{state:"parsererror",error:r?I:"No conversion from "+a+" to "+o}}}return{state:"success",data:t}}(h,C,S,d),d?(h.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(x.lastModified[i]=w),(w=S.getResponseHeader("etag"))&&(x.etag[i]=w)),204===e||"HEAD"===h.type?_="nocontent":304===e?_="notmodified":(_=C.state,p=C.data,d=!(b=C.error))):(b=_,!e&&_||(_="error",e<0&&(e=0))),S.status=e,S.statusText=(t||_)+"",d?m.resolveWith(f,[p,_,S]):m.rejectWith(f,[S,_,b]),S.statusCode(y),y=void 0,c&&g.trigger(d?"ajaxSuccess":"ajaxError",[S,h,d?p:b]),v.fireWith(f,[S,_]),c&&(g.trigger("ajaxComplete",[S,h]),--x.active||x.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,void 0,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,l,i){return v(n)&&(i=i||l,l=n,n=void 0),x.ajax(x.extend({url:e,type:t,dataType:i,data:n,success:l},x.isPlainObject(e)&&e))}}),x.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),x._evalUrl=function(e,t,n){return x.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){x.globalEval(e,t,n)}})},x.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(e){return!x.expr.pseudos.visible(e)},x.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},Gt=x.ajaxSettings.xhr();m.cors=!!Gt&&"withCredentials"in Gt,m.ajax=Gt=!!Gt,x.ajaxTransport(function(e){var t,l;if(m.cors||Gt&&!e.crossDomain)return{send:function(i,o){var r,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)u[r]=e.xhrFields[r];for(r in e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)u.setRequestHeader(r,i[r]);t=function(e){return function(){t&&(t=l=u.onload=u.onerror=u.onabort=u.ontimeout=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?o(0,"error"):o(u.status,u.statusText):o($t[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),l=u.onerror=u.ontimeout=t("error"),void 0!==u.onabort?u.onabort=l:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){t&&l()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}}),x.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(l,i){t=x(" + diff --git a/modules/admin/webif_0_4_2/static/line.567f57385ea3dde2c9ae.gif b/modules/admin/webif_0_4_2/static/line.567f57385ea3dde2c9ae.gif new file mode 100644 index 0000000000..64e2280ec5 Binary files /dev/null and b/modules/admin/webif_0_4_2/static/line.567f57385ea3dde2c9ae.gif differ diff --git a/modules/admin/webif_0_4_2/static/loading.8732a6660b528fadfaeb.gif b/modules/admin/webif_0_4_2/static/loading.8732a6660b528fadfaeb.gif new file mode 100644 index 0000000000..19c67bbd04 Binary files /dev/null and b/modules/admin/webif_0_4_2/static/loading.8732a6660b528fadfaeb.gif differ diff --git a/modules/admin/webif/static/main.9c9acf7f875b584f8f78.js b/modules/admin/webif_0_4_2/static/main.cb52338bb12a3e86fd62.js similarity index 80% rename from modules/admin/webif/static/main.9c9acf7f875b584f8f78.js rename to modules/admin/webif_0_4_2/static/main.cb52338bb12a3e86fd62.js index 07fdb981ba..28c9949df7 100644 --- a/modules/admin/webif/static/main.9c9acf7f875b584f8f78.js +++ b/modules/admin/webif_0_4_2/static/main.cb52338bb12a3e86fd62.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+dQi":function(e,t,n){!function(e){"use strict";e.defineMode("javascript",function(t,n){var l,i,o=t.indentUnit,r=n.statementIndent,u=n.jsonld,a=n.json||u,s=n.typescript,c=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),l=e("keyword c"),i=e("keyword d"),o=e("operator"),r={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:l,void:l,throw:l,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:r,false:r,null:r,undefined:r,NaN:r,Infinity:r,this:e("this"),class:e("class"),super:e("atom"),yield:l,export:e("export"),import:e("import"),extends:l,await:l}}(),p=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function f(e,t,n){return l=e,i=n,t}function g(e,t){var n,l=e.next();if('"'==l||"'"==l)return t.tokenize=(n=l,function(e,t){var l,i=!1;if(u&&"@"==e.peek()&&e.match(h))return t.tokenize=g,f("jsonld-keyword","meta");for(;null!=(l=e.next())&&(l!=n||i);)i=!i&&"\\"==l;return i||(t.tokenize=g),f("string","string")}),t.tokenize(e,t);if("."==l&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return f("number","number");if("."==l&&e.match(".."))return f("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(l))return f(l);if("="==l&&e.eat(">"))return f("=>","operator");if("0"==l&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return f("number","number");if(/\d/.test(l))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),f("number","number");if("/"==l)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),f("comment","comment")):Ye(e,t,1)?(function(e){for(var t,n=!1,l=!1;null!=(t=e.next());){if(!n){if("/"==t&&!l)return;"["==t?l=!0:l&&"]"==t&&(l=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),f("regexp","string-2")):(e.eat("="),f("operator","operator",e.current()));if("`"==l)return t.tokenize=v,v(e,t);if("#"==l)return e.skipToEnd(),f("error","error");if(p.test(l))return">"==l&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=l&&"="!=l||e.eat("="):/[<>*+\-]/.test(l)&&(e.eat(l),">"==l&&e.eat(l))),f("operator","operator",e.current());if(c.test(l)){e.eatWhile(c);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return f(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return f("async","keyword",i)}return f("variable","variable",i)}}function m(e,t){for(var n,l=!1;n=e.next();){if("/"==n&&l){t.tokenize=g;break}l="*"==n}return f("comment","comment")}function v(e,t){for(var n,l=!1;null!=(n=e.next());){if(!l&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}l=!l&&"\\"==n}return f("quasi","string-2",e.current())}var y="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(s){var l=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));l&&(n=l.index)}for(var i=0,o=!1,r=n-1;r>=0;--r){var u=e.string.charAt(r),a=y.indexOf(u);if(a>=0&&a<3){if(!i){++r;break}if(0==--i){"("==u&&(o=!0);break}}else if(a>=3&&a<6)++i;else if(c.test(u))o=!0;else{if(/["'\/]/.test(u))return;if(o&&!i){++r;break}}}o&&!i&&(t.fatArrowAt=r)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(e,t,n,l,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=l&&(this.align=l)}function _(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var l=e.context;l;l=l.prev)for(n=l.vars;n;n=n.next)if(n.name==t)return!0}var x={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)x.cc.push(arguments[e])}function E(){return S.apply(null,arguments),!0}function I(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function O(e){var t=x.state;if(x.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var l=function e(t,n){if(n){if(n.block){var l=e(t,n.prev);return l?l==n.prev?n:new D(l,n.vars,!0):null}return I(t,n.vars)?n:new D(n.prev,new k(t,n.vars),!1)}return null}(e,t.context);if(null!=l)return void(t.context=l)}else if(!I(e,t.localVars))return void(t.localVars=new k(e,t.localVars));n.globalVars&&!I(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function D(e,t,n){this.prev=e,this.vars=t,this.block=n}function k(e,t){this.name=e,this.next=t}var R=new k("this",new k("arguments",null));function M(){x.state.context=new D(x.state.context,x.state.localVars,!1),x.state.localVars=R}function N(){x.state.context=new D(x.state.context,x.state.localVars,!0),x.state.localVars=null}function L(){x.state.localVars=x.state.context.vars,x.state.context=x.state.context.prev}function A(e,t){var n=function(){var n=x.state,l=n.indented;if("stat"==n.lexical.type)l=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)l=i.indented;n.lexical=new w(l,x.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function P(){var e=x.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function F(e){return function t(n){return n==e?E():";"==e||"}"==n||")"==n||"]"==n?S():E(t)}}function V(e,t){return"var"==e?E(A("vardef",t),ye,F(";"),P):"keyword a"==e?E(A("form"),z,V,P):"keyword b"==e?E(A("form"),V,P):"keyword d"==e?x.stream.match(/^\s*$/,!1)?E():E(A("stat"),$,F(";"),P):"debugger"==e?E(F(";")):"{"==e?E(A("}"),N,re,P,L):";"==e?E():"if"==e?("else"==x.state.lexical.info&&x.state.cc[x.state.cc.length-1]==P&&x.state.cc.pop()(),E(A("form"),z,V,P,Se)):"function"==e?E(ke):"for"==e?E(A("form"),Ee,V,P):"class"==e||s&&"interface"==t?(x.marked="keyword",E(A("form","class"==e?e:t),Ae,P)):"variable"==e?s&&"declare"==t?(x.marked="keyword",E(V)):s&&("module"==t||"enum"==t||"type"==t)&&x.stream.match(/^\s*\w/,!1)?(x.marked="keyword","enum"==t?E(qe):"type"==t?E(Me,F("operator"),ce,F(";")):E(A("form"),be,F("{"),A("}"),re,P,P)):s&&"namespace"==t?(x.marked="keyword",E(A("form"),H,V,P)):s&&"abstract"==t?(x.marked="keyword",E(V)):E(A("stat"),J):"switch"==e?E(A("form"),z,F("{"),A("}","switch"),N,re,P,P,L):"case"==e?E(H,F(":")):"default"==e?E(F(":")):"catch"==e?E(A("form"),M,j,V,P,L):"export"==e?E(A("stat"),je,P):"import"==e?E(A("stat"),Be,P):"async"==e?E(V):"@"==t?E(H,V):S(A("stat"),H,F(";"),P)}function j(e){if("("==e)return E(Ne,F(")"))}function H(e,t){return U(e,t,!1)}function B(e,t){return U(e,t,!0)}function z(e){return"("!=e?S():E(A(")"),H,F(")"),P)}function U(e,t,n){if(x.state.fatArrowAt==x.stream.start){var l=n?Z:Y;if("("==e)return E(M,A(")"),ie(Ne,")"),P,F("=>"),l,L);if("variable"==e)return S(M,be,F("=>"),l,L)}var i=n?W:G;return C.hasOwnProperty(e)?E(i):"function"==e?E(ke,i):"class"==e||s&&"interface"==t?(x.marked="keyword",E(A("form"),Le,P)):"keyword c"==e||"async"==e?E(n?B:H):"("==e?E(A(")"),$,F(")"),P,i):"operator"==e||"spread"==e?E(n?B:H):"["==e?E(A("]"),We,P,i):"{"==e?oe(te,"}",null,i):"quasi"==e?S(q,i):"new"==e?E(function(e){return function(t){return"."==t?E(e?X:Q):"variable"==t&&s?E(ge,e?W:G):S(e?B:H)}}(n)):"import"==e?E(H):E()}function $(e){return e.match(/[;\}\)\],]/)?S():S(H)}function G(e,t){return","==e?E(H):W(e,t,!1)}function W(e,t,n){var l=0==n?G:W,i=0==n?H:B;return"=>"==e?E(M,n?Z:Y,L):"operator"==e?/\+\+|--/.test(t)||s&&"!"==t?E(l):s&&"<"==t&&x.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?E(A(">"),ie(ce,">"),P,l):"?"==t?E(H,F(":"),i):E(i):"quasi"==e?S(q,l):";"!=e?"("==e?oe(B,")","call",l):"."==e?E(ee,l):"["==e?E(A("]"),$,F("]"),P,l):s&&"as"==t?(x.marked="keyword",E(ce,l)):"regexp"==e?(x.state.lastType=x.marked="operator",x.stream.backUp(x.stream.pos-x.stream.start-1),E(i)):void 0:void 0}function q(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?E(q):E(H,K)}function K(e){if("}"==e)return x.marked="string-2",x.state.tokenize=v,E(q)}function Y(e){return b(x.stream,x.state),S("{"==e?V:H)}function Z(e){return b(x.stream,x.state),S("{"==e?V:B)}function Q(e,t){if("target"==t)return x.marked="keyword",E(G)}function X(e,t){if("target"==t)return x.marked="keyword",E(W)}function J(e){return":"==e?E(P,V):S(G,F(";"),P)}function ee(e){if("variable"==e)return x.marked="property",E()}function te(e,t){return"async"==e?(x.marked="property",E(te)):"variable"==e||"keyword"==x.style?(x.marked="property","get"==t||"set"==t?E(ne):(s&&x.state.fatArrowAt==x.stream.start&&(n=x.stream.match(/^\s*:\s*/,!1))&&(x.state.fatArrowAt=x.stream.pos+n[0].length),E(le))):"number"==e||"string"==e?(x.marked=u?"property":x.style+" property",E(le)):"jsonld-keyword"==e?E(le):s&&T(t)?(x.marked="keyword",E(te)):"["==e?E(H,ue,F("]"),le):"spread"==e?E(B,le):"*"==t?(x.marked="keyword",E(te)):":"==e?S(le):void 0;var n}function ne(e){return"variable"!=e?S(le):(x.marked="property",E(ke))}function le(e){return":"==e?E(B):"("==e?S(ke):void 0}function ie(e,t,n){function l(i,o){if(n?n.indexOf(i)>-1:","==i){var r=x.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),E(function(n,l){return n==t||l==t?S():S(e)},l)}return i==t||o==t?E():n&&n.indexOf(";")>-1?S(e):E(F(t))}return function(n,i){return n==t||i==t?E():S(e,l)}}function oe(e,t,n){for(var l=3;l"),ce):void 0}function de(e){if("=>"==e)return E(ce)}function pe(e,t){return"variable"==e||"keyword"==x.style?(x.marked="property",E(pe)):"?"==t||"number"==e||"string"==e?E(pe):":"==e?E(ce):"["==e?E(F("variable"),ue,F("]"),pe):"("==e?S(Re,pe):void 0}function he(e,t){return"variable"==e&&x.stream.match(/^\s*[?:]/,!1)||"?"==t?E(he):":"==e?E(ce):"spread"==e?E(he):S(ce)}function fe(e,t){return"<"==t?E(A(">"),ie(ce,">"),P,fe):"|"==t||"."==e||"&"==t?E(ce):"["==e?E(ce,F("]"),fe):"extends"==t||"implements"==t?(x.marked="keyword",E(ce)):"?"==t?E(ce,F(":"),ce):void 0}function ge(e,t){if("<"==t)return E(A(">"),ie(ce,">"),P,fe)}function me(){return S(ce,ve)}function ve(e,t){if("="==t)return E(ce)}function ye(e,t){return"enum"==t?(x.marked="keyword",E(qe)):S(be,ue,_e,xe)}function be(e,t){return s&&T(t)?(x.marked="keyword",E(be)):"variable"==e?(O(t),E()):"spread"==e?E(be):"["==e?oe(we,"]"):"{"==e?oe(Ce,"}"):void 0}function Ce(e,t){return"variable"!=e||x.stream.match(/^\s*:/,!1)?("variable"==e&&(x.marked="property"),"spread"==e?E(be):"}"==e?S():"["==e?E(H,F("]"),F(":"),Ce):E(F(":"),be,_e)):(O(t),E(_e))}function we(){return S(be,_e)}function _e(e,t){if("="==t)return E(B)}function xe(e){if(","==e)return E(ye)}function Se(e,t){if("keyword b"==e&&"else"==t)return E(A("form","else"),V,P)}function Ee(e,t){return"await"==t?E(Ee):"("==e?E(A(")"),Ie,F(")"),P):void 0}function Ie(e){return"var"==e?E(ye,F(";"),Te):";"==e?E(Te):"variable"==e?E(Oe):S(H,F(";"),Te)}function Oe(e,t){return"in"==t||"of"==t?(x.marked="keyword",E(H)):E(G,Te)}function Te(e,t){return";"==e?E(De):"in"==t||"of"==t?(x.marked="keyword",E(H)):S(H,F(";"),De)}function De(e){")"!=e&&E(H)}function ke(e,t){return"*"==t?(x.marked="keyword",E(ke)):"variable"==e?(O(t),E(ke)):"("==e?E(M,A(")"),ie(Ne,")"),P,ae,V,L):s&&"<"==t?E(A(">"),ie(me,">"),P,ke):void 0}function Re(e,t){return"*"==t?(x.marked="keyword",E(Re)):"variable"==e?(O(t),E(Re)):"("==e?E(M,A(")"),ie(Ne,")"),P,ae,L):s&&"<"==t?E(A(">"),ie(me,">"),P,Re):void 0}function Me(e,t){return"keyword"==e||"variable"==e?(x.marked="type",E(Me)):"<"==t?E(A(">"),ie(me,">"),P):void 0}function Ne(e,t){return"@"==t&&E(H,Ne),"spread"==e?E(Ne):s&&T(t)?(x.marked="keyword",E(Ne)):S(be,ue,_e)}function Le(e,t){return"variable"==e?Ae(e,t):Pe(e,t)}function Ae(e,t){if("variable"==e)return O(t),E(Pe)}function Pe(e,t){return"<"==t?E(A(">"),ie(me,">"),P,Pe):"extends"==t||"implements"==t||s&&","==e?("implements"==t&&(x.marked="keyword"),E(s?ce:H,Pe)):"{"==e?E(A("}"),Fe,P):void 0}function Fe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||s&&T(t))&&x.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(x.marked="keyword",E(Fe)):"variable"==e||"keyword"==x.style?(x.marked="property",E(s?Ve:ke,Fe)):"number"==e||"string"==e?E(s?Ve:ke,Fe):"["==e?E(H,ue,F("]"),s?Ve:ke,Fe):"*"==t?(x.marked="keyword",E(Fe)):s&&"("==e?S(Re,Fe):";"==e||","==e?E(Fe):"}"==e?E():"@"==t?E(H,Fe):void 0}function Ve(e,t){if("?"==t)return E(Ve);if(":"==e)return E(ce,_e);if("="==t)return E(B);var n=x.state.lexical.prev;return S(n&&"interface"==n.info?Re:ke)}function je(e,t){return"*"==t?(x.marked="keyword",E(Ge,F(";"))):"default"==t?(x.marked="keyword",E(H,F(";"))):"{"==e?E(ie(He,"}"),Ge,F(";")):S(V)}function He(e,t){return"as"==t?(x.marked="keyword",E(F("variable"))):"variable"==e?S(B,He):void 0}function Be(e){return"string"==e?E():"("==e?S(H):S(ze,Ue,Ge)}function ze(e,t){return"{"==e?oe(ze,"}"):("variable"==e&&O(t),"*"==t&&(x.marked="keyword"),E($e))}function Ue(e){if(","==e)return E(ze,Ue)}function $e(e,t){if("as"==t)return x.marked="keyword",E(ze)}function Ge(e,t){if("from"==t)return x.marked="keyword",E(H)}function We(e){return"]"==e?E():S(ie(B,"]"))}function qe(){return S(A("form"),be,F("{"),A("}"),ie(Ke,"}"),P,P)}function Ke(){return S(be,_e)}function Ye(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return L.lex=!0,P.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new w((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new D(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=m&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==l?n:(t.lastType="operator"!=l||"++"!=i&&"--"!=i?l:"incdec",function(e,t,n,l,i){var o=e.cc;for(x.state=e,x.stream=i,x.marked=null,x.cc=o,x.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():a?H:V)(n,l)){for(;o.length&&o[o.length-1].lex;)o.pop()();return x.marked?x.marked:"variable"==n&&_(e,l)?"variable-2":t}}(t,n,l,i,e))},indent:function(t,l){if(t.tokenize==m)return e.Pass;if(t.tokenize!=g)return 0;var i,u=l&&l.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(l))for(var s=t.cc.length-1;s>=0;--s){var c=t.cc[s];if(c==P)a=a.prev;else if(c!=Se)break}for(;("stat"==a.type||"form"==a.type)&&("}"==u||(i=t.cc[t.cc.length-1])&&(i==G||i==W)&&!/^[,\.=+\-*:?[\(]/.test(l));)a=a.prev;r&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var d=a.type,h=u==d;return"vardef"==d?a.indented+("operator"==t.lastType||","==t.lastType?a.info.length+1:0):"form"==d&&"{"==u?a.indented:"form"==d?a.indented+o:"stat"==d?a.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,l)?r||o:0):"switch"!=a.info||h||0==n.doubleIndentSwitch?a.align?a.column+(h?0:1):a.indented+(h?0:o):a.indented+(/^(?:case|default)\b/.test(l)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:a?null:"/*",blockCommentEnd:a?null:"*/",blockCommentContinue:a?null:" * ",lineComment:a?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:a?"json":"javascript",jsonldMode:u,jsonMode:a,expressionAllowed:Ye,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=H&&t!=B||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n("VrN/"))},"+tJ4":function(e,t,n){"use strict";n.d(t,"a",function(){return l});var l=function(e){return function(t){for(var n=0,l=e.length;n=0}},"/NBx":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("7LN8"),a=n("Fa87"),s=n("gIcY");t.CHIPS_VALUE_ACCESSOR={provide:s.NG_VALUE_ACCESSOR,useExisting:o.forwardRef(function(){return c}),multi:!0};var c=function(){function e(e){this.el=e,this.allowDuplicate=!0,this.onAdd=new o.EventEmitter,this.onRemove=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.onBlur=new o.EventEmitter,this.onChipClick=new o.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){}}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"item":default:e.itemTemplate=t.template}})},e.prototype.onClick=function(e){this.inputViewChild.nativeElement.focus()},e.prototype.onItemClick=function(e,t){this.onChipClick.emit({originalEvent:e,value:t})},e.prototype.writeValue=function(e){this.value=e,this.updateMaxedOut()},e.prototype.registerOnChange=function(e){this.onModelChange=e},e.prototype.registerOnTouched=function(e){this.onModelTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.resolveFieldData=function(e,t){if(e&&t){if(-1==t.indexOf("."))return e[t];for(var n=t.split("."),l=e,i=0,o=n.length;i0){this.value=this.value.slice();var t=this.value.pop();this.onModelChange(this.value),this.onRemove.emit({originalEvent:e,value:t})}break;case 13:this.addItem(e,this.inputViewChild.nativeElement.value),this.inputViewChild.nativeElement.value="",e.preventDefault();break;case 9:this.addOnTab&&""!==this.inputViewChild.nativeElement.value&&(this.addItem(e,this.inputViewChild.nativeElement.value),this.inputViewChild.nativeElement.value="",e.preventDefault());break;default:this.max&&this.value&&this.max===this.value.length&&e.preventDefault()}},e.prototype.updateMaxedOut=function(){this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.disabled=!(!this.max||!this.value||this.max!==this.value.length)||this.disabled||!1)},l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",String)],e.prototype,"placeholder",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"max",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"tabindex",void 0),l([o.Input(),i("design:type",String)],e.prototype,"inputId",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"allowDuplicate",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"inputStyle",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"inputStyleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"addOnTab",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"addOnBlur",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onAdd",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRemove",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onFocus",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onBlur",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onChipClick",void 0),l([o.ViewChild("inputtext"),i("design:type",o.ElementRef)],e.prototype,"inputViewChild",void 0),l([o.ContentChildren(u.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.Component({selector:"p-chips",template:'\n
\n
    \n
  • \n \n {{field ? resolveFieldData(item,field) : item}}\n \n
  • \n
  • \n \n
  • \n
\n
\n ',providers:[t.CHIPS_VALUE_ACCESSOR]})],e)}();t.Chips=c,t.ChipsModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.InputTextModule,u.SharedModule],exports:[c,a.InputTextModule,u.SharedModule],declarations:[c]})],function(){})}()},"/WYv":function(e,t,n){"use strict";function l(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}n.d(t,"a",function(){return l})},0:function(e,t,n){e.exports=n("zUnb")},"0/uQ":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var l=n("6blF"),i=n("Fxb1"),o=n("i4X3");function r(e,t){return t?Object(o.a)(e,t):e instanceof l.a?e:new l.a(Object(i.a)(e))}},"0alx":function(e,t,n){"use strict";var l=n("VKeD");t.isIterable=function(e){return e&&"function"==typeof e[l.iterator]}},"15JJ":function(e,t,n){"use strict";n.d(t,"a",function(){return s});var l=n("mrSG"),i=n("MGBS"),o=n("rPjj"),r=n("zotm"),u=n("67Y/"),a=n("0/uQ");function s(e,t){return"function"==typeof t?function(n){return n.pipe(s(function(n,l){return Object(a.a)(e(n,l)).pipe(Object(u.a)(function(e,i){return t(n,e,l,i)}))}))}:function(t){return t.lift(new c(e))}}var c=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.project))},e}(),d=function(e){function t(t,n){var l=e.call(this,t)||this;return l.project=n,l.index=0,l}return l.__extends(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(l){return void this.destination.error(l)}this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){var l=this.innerSubscription;l&&l.unsubscribe();var i=new o.a(this,void 0,void 0);this.destination.add(i),this.innerSubscription=Object(r.a)(this,e,t,n,i)},t.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=null},t.prototype.notifyComplete=function(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t,n,l,i){this.destination.next(t)},t}(i.a)},"1eCo":function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(l,i){var o,r,u=l.indentUnit,a={},s=i.htmlMode?t:n;for(var c in s)a[c]=s[c];for(var c in i)a[c]=i[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var l=e.next();return"<"==l?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,l){for(var i;null!=(i=n.next());){if("<"==i)return l.tokenize=e(t+1),l.tokenize(n,l);if(">"==i){if(1==t){l.tokenize=d;break}return l.tokenize=e(t-1),l.tokenize(n,l)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=p,"tag bracket"):"&"==l?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function p(e,t){var n,l,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(l=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=p;break}return"string"}).isInAttribute=!0,l),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e,t){return function(n,l){for(;!n.eol();){if(n.match(t)){l.tokenize=d;break}n.next()}return e}}function f(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(a.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function m(e,t){for(var n;;){if(!e.context)return;if(!a.contextGrabbers.hasOwnProperty(n=e.context.tagName)||!a.contextGrabbers[n].hasOwnProperty(t))return;g(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),r="tag",_):a.allowMissingTagName&&"endTag"==e?(r="tag bracket",_(e,0,n)):(r="error",y)}function b(e,t,n){if("word"==e){var l=t.current();return n.context&&n.context.tagName!=l&&a.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==l||!1===a.matchClosing?(r="tag",C):(r="tag error",w)}return a.allowMissingTagName&&"endTag"==e?(r="tag bracket",C(e,0,n)):(r="error",w)}function C(e,t,n){return"endTag"!=e?(r="error",C):(g(n),v)}function w(e,t,n){return r="error",C(e,0,n)}function _(e,t,n){if("word"==e)return r="attribute",x;if("endTag"==e||"selfcloseTag"==e){var l=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||a.autoSelfClosers.hasOwnProperty(l)?m(n,l):(m(n,l),n.context=new f(n,l,i==n.indented)),v}return r="error",_}function x(e,t,n){return"equals"==e?S:(a.allowMissing||(r="error"),_(e,0,n))}function S(e,t,n){return"string"==e?E:"word"==e&&a.allowUnquoted?(r="string",_):(r="error",_(e,0,n))}function E(e,t,n){return"string"==e?E:_(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(r=null,t.state=t.state(o||n,e,t),r&&(n="error"==r?n+" error":r)),n},indent:function(t,n,l){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+u;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=p&&t.tokenize!=d)return l?l.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==a.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+u*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(e){e.state==S&&(e.state=_)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n("VrN/"))},"1fDf":function(e,t,n){"use strict";n.d(t,"a",function(){return i});var l=n("FFOo");function i(e){for(;e;){var t=e.destination;if(e.closed||e.isStopped)return!1;e=t&&t instanceof l.a?t:null}return!0}},"24Yq":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("DqLj"))},"25Eh":function(e,t,n){!function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),l=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",l.concat(i)),e.defineMode("python",function(r,u){for(var a="error",s=u.delimiters||u.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[u.singleOperators,u.doubleOperators,u.doubleDelimiters,u.tripleDelimiters,u.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],d=0;dl?_(t):i0&&x(e,t)&&(r+=" "+a),r}return w(e,t)}function w(e,t){if(e.eatSpace())return null;if(e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var l=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(l=!0),e.match(/^[\d_]+\.\d*/)&&(l=!0),e.match(/^\.\d+/)&&(l=!0),l)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}if(e.match(v))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,l="string";function i(e){return function(t,n){var l=w(t,n);return"punctuation"==l&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),l}}function o(o,r){for(;!o.eol();)if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return l}else{if(o.match(e))return r.tokenize=t,l;if(o.match("{{"))return l;if(o.match("{",!1))return r.tokenize=i(0),o.current()?l:r.tokenize(o,r);if(o.match("}}"))return l;if(o.match("}"))return a;o.eat(/['"]/)}if(n){if(u.singleLineStringErrors)return a;r.tokenize=t}return l}return o.isString=!0,o}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,l="string";function i(i,o){for(;!i.eol();)if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return l}else{if(i.match(e))return o.tokenize=t,l;i.eat(/['"]/)}if(n){if(u.singleLineStringErrors)return a;o.tokenize=t}return l}return i.isString=!0,i}(e.current(),t.tokenize),t.tokenize(e,t));for(var o=0;o1&&o(t).offset>n;){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}return{startState:function(e){return{tokenize:C,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var l=function(e,t){e.sol()&&(t.beginningOfLine=!0);var n=t.tokenize(e,t),l=e.current();if(t.beginningOfLine&&"@"==l)return e.match(m,!1)?"meta":g?"operator":a;if(/\S/.test(l)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=l&&"return"!=l||(t.dedent+=1),"lambda"==l&&(t.lambda=!0),":"!=l||t.lambda||"py"!=o(t).type||_(t),1==l.length&&!/string|comment/.test(n)){var i="[({".indexOf(l);if(-1!=i&&function(e,t,n){var l=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+p,type:n,align:l})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(l))){if(o(t).type!=l)return a;t.indent=t.scopes.pop().offset-p}}return t.dedent>0&&e.eol()&&"py"==o(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),n}(e,t);return l&&"comment"!=l&&(t.lastToken="keyword"==l||"punctuation"==l?e.current():l),"punctuation"==l&&(l=null),e.eol()&&t.lambda&&(t.lambda=!1),n?l+" "+a:l},indent:function(t,n){if(t.tokenize!=C)return t.tokenize.isString?e.Pass:0;var l=o(t),i=l.type==n.charAt(0);return null!=l.align?l.align-(i?1:0):l.offset-(i?p:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-python","python"),e.defineMIME("text/x-cython",{name:"python",extra_keywords:"by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE".split(" ")})}(n("VrN/"))},"26FU":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var l=n("mrSG"),i=n("K9Ia"),o=n("8g8A"),r=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return l.__extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.a)},"2Bdj":function(e,t,n){"use strict";function l(e){return"function"==typeof e}n.d(t,"a",function(){return l})},"2KeD":function(e,t,n){"use strict";var l=n("Q1FS"),i=n("zB/H"),o=n("zfKp");t.scheduleObservable=function(e,t){return new l.Observable(function(n){var l=new i.Subscription;return l.add(t.schedule(function(){var i=e[o.observable]();l.add(i.subscribe({next:function(e){l.add(t.schedule(function(){return n.next(e)}))},error:function(e){l.add(t.schedule(function(){return n.error(e)}))},complete:function(){l.add(t.schedule(function(){return n.complete()}))}}))})),l})}},"2bbZ":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("ihYY"),u=n("cdZy"),a=(n("V3HQ"),n("Ip0R")),s=n("sdDj"),c=(n("RWz4"),function(){function e(e,t,n,l,i,o){this.componentFactoryResolver=e,this.cd=t,this.renderer=n,this.config=l,this.dialogRef=i,this.zone=o,this.visible=!0}return e.prototype.ngAfterViewInit=function(){this.loadChildComponent(this.childComponentType),this.cd.detectChanges()},e.prototype.onOverlayClicked=function(e){this.dialogRef.close()},e.prototype.onDialogClicked=function(e){e.stopPropagation()},e.prototype.loadChildComponent=function(e){var t=this.componentFactoryResolver.resolveComponentFactory(e),n=this.insertionPoint.viewContainerRef;n.clear(),this.componentRef=n.createComponent(t)},e.prototype.moveOnTop=function(){if(!1!==this.config.autoZIndex){var e=this.config.baseZIndex||++s.DomHandler.zindex+0;this.container.style.zIndex=String(e),this.maskViewChild.nativeElement.style.zIndex=String(e-1)}},e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.moveOnTop(),this.bindGlobalListeners(),s.DomHandler.addClass(document.body,"ui-overflow-hidden");break;case"void":this.onContainerDestroy()}},e.prototype.onAnimationEnd=function(e){"void"===e.toState&&this.dialogRef.close()},e.prototype.onContainerDestroy=function(){s.DomHandler.removeClass(document.body,"ui-overflow-hidden"),this.unbindGlobalListeners(),this.container=null},e.prototype.close=function(){this.visible=!1},e.prototype.onMaskClick=function(){this.config.dismissableMask&&this.close()},e.prototype.bindGlobalListeners=function(){!1!==this.config.closeOnEscape&&!1!==this.config.closable&&this.bindDocumentEscapeListener()},e.prototype.unbindGlobalListeners=function(){this.unbindDocumentEscapeListener()},e.prototype.bindDocumentEscapeListener=function(){var e=this;this.documentEscapeListener=this.renderer.listen("document","keydown",function(t){27==t.which&&parseInt(e.container.style.zIndex)==s.DomHandler.zindex&&e.close()})},e.prototype.unbindDocumentEscapeListener=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.ngOnDestroy=function(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy()},l([o.ViewChild(u.DynamicDialogContent),i("design:type",u.DynamicDialogContent)],e.prototype,"insertionPoint",void 0),l([o.ViewChild("mask"),i("design:type",o.ElementRef)],e.prototype,"maskViewChild",void 0),l([o.Component({selector:"p-dynamicDialog",template:'\n\t\t
\n\t\t
\n
\n {{config.header}}\n \n \n \n
\n
\n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t
\n\t',animations:[r.trigger("animation",[r.state("void",r.style({transform:"translate3d(-50%, -25%, 0) scale(0.9)",opacity:0})),r.state("visible",r.style({transform:"translateX(-50%) translateY(-50%)",opacity:1})),r.transition("* => *",r.animate("{{transitionParams}}"))])]})],e)}());t.DynamicDialogComponent=c,t.DynamicDialogModule=function(){return l([o.NgModule({imports:[a.CommonModule],declarations:[c,u.DynamicDialogContent],entryComponents:[c]})],function(){})}()},"2ePl":function(e,t,n){"use strict";n.d(t,"a",function(){return l});var l=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},"2m6e":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=(n("gIcY"),n("Ip0R")),u=function(){function e(e,t){this.el=e,this.ngModel=t,this.onResize=new o.EventEmitter}return e.prototype.ngDoCheck=function(){this.updateFilledState(),this.autoResize&&this.resize()},e.prototype.onInput=function(e){this.updateFilledState(),this.autoResize&&this.resize(e)},e.prototype.updateFilledState=function(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model},e.prototype.onFocus=function(e){this.autoResize&&this.resize(e)},e.prototype.onBlur=function(e){this.autoResize&&this.resize(e)},e.prototype.resize=function(e){this.el.nativeElement.style.height="",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(e||{})},l([o.Input(),i("design:type",Boolean)],e.prototype,"autoResize",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onResize",void 0),l([o.HostListener("input",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onInput",null),l([o.HostListener("focus",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onFocus",null),l([o.HostListener("blur",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onBlur",null),l([o.Directive({selector:"[pInputTextarea]",host:{"[class.ui-inputtext]":"true","[class.ui-corner-all]":"true","[class.ui-inputtextarea-resizable]":"autoResize","[class.ui-state-default]":"true","[class.ui-widget]":"true","[class.ui-state-filled]":"filled"}})],e)}();t.InputTextarea=u,t.InputTextareaModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[u],declarations:[u]})],function(){})}()},"2qMH":function(e,t,n){"use strict";var l=n("Q1FS"),i=n("zB/H");t.scheduleArray=function(e,t){return new l.Observable(function(n){var l=new i.Subscription,o=0;return l.add(t.schedule(function(){o!==e.length?(n.next(e[o++]),n.closed||l.add(this.schedule())):n.complete()})),l})}},"3GNW":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("ihYY"),u=n("Ip0R"),a=n("sdDj"),s=n("7LN8"),c=n("VSng"),d=(n("oygf"),function(){function e(e,t,n,l){var i=this;this.el=e,this.renderer=t,this.confirmationService=n,this.zone=l,this.acceptIcon="pi pi-check",this.acceptLabel="Yes",this.acceptVisible=!0,this.rejectIcon="pi pi-times",this.rejectLabel="No",this.rejectVisible=!0,this.closeOnEscape=!0,this.closable=!0,this.autoZIndex=!0,this.baseZIndex=0,this.transitionOptions="400ms cubic-bezier(0.25, 0.8, 0.25, 1)",this.subscription=this.confirmationService.requireConfirmation$.subscribe(function(e){e.key===i.key&&(i.confirmation=e,i.message=i.confirmation.message||i.message,i.icon=i.confirmation.icon||i.icon,i.header=i.confirmation.header||i.header,i.rejectVisible=null==i.confirmation.rejectVisible?i.rejectVisible:i.confirmation.rejectVisible,i.acceptVisible=null==i.confirmation.acceptVisible?i.acceptVisible:i.confirmation.acceptVisible,i.acceptLabel=i.confirmation.acceptLabel||i.acceptLabel,i.rejectLabel=i.confirmation.rejectLabel||i.rejectLabel,i.confirmation.accept&&(i.confirmation.acceptEvent=new o.EventEmitter,i.confirmation.acceptEvent.subscribe(i.confirmation.accept)),i.confirmation.reject&&(i.confirmation.rejectEvent=new o.EventEmitter,i.confirmation.rejectEvent.subscribe(i.confirmation.reject)),i.visible=!0)})}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e,console.warn("width property is deprecated, use style to define the width of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e,console.warn("height property is deprecated, use style to define the height of the Dialog.")},enumerable:!0,configurable:!0}),e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.setDimensions(),this.contentContainer=a.DomHandler.findSingle(this.container,".ui-dialog-content"),a.DomHandler.findSingle(this.container,"button").focus(),this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.enableModality();break;case"void":this.onOverlayHide()}},e.prototype.setDimensions=function(){this.width&&(this.container.style.width=this.width+"px"),this.height&&(this.container.style.height=this.height+"px")},e.prototype.appendContainer=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):a.DomHandler.appendChild(this.container,this.appendTo))},e.prototype.restoreAppend=function(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)},e.prototype.enableModality=function(){this.mask||(this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(this.container.style.zIndex)-1),a.DomHandler.addMultipleClasses(this.mask,"ui-widget-overlay ui-dialog-mask"),document.body.appendChild(this.mask),a.DomHandler.addClass(document.body,"ui-overflow-hidden"))},e.prototype.disableModality=function(){this.mask&&(document.body.removeChild(this.mask),a.DomHandler.removeClass(document.body,"ui-overflow-hidden"),this.mask=null)},e.prototype.close=function(e){this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(),this.hide(),e.preventDefault()},e.prototype.hide=function(){this.visible=!1},e.prototype.moveOnTop=function(){this.autoZIndex&&(this.container.style.zIndex=String(this.baseZIndex+ ++a.DomHandler.zindex))},e.prototype.bindGlobalListeners=function(){var e=this;this.closeOnEscape&&this.closable&&!this.documentEscapeListener&&(this.documentEscapeListener=this.renderer.listen("document","keydown",function(t){27==t.which&&parseInt(e.container.style.zIndex)===a.DomHandler.zindex&&e.visible&&e.close(t)}))},e.prototype.unbindGlobalListeners=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.onOverlayHide=function(){this.disableModality(),this.unbindGlobalListeners(),this.container=null},e.prototype.ngOnDestroy=function(){this.restoreAppend(),this.onOverlayHide(),this.subscription.unsubscribe()},e.prototype.accept=function(){this.confirmation.acceptEvent&&this.confirmation.acceptEvent.emit(),this.hide(),this.confirmation=null},e.prototype.reject=function(){this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(),this.hide(),this.confirmation=null},l([o.Input(),i("design:type",Boolean)],e.prototype,"visible",void 0),l([o.Input(),i("design:type",String)],e.prototype,"header",void 0),l([o.Input(),i("design:type",String)],e.prototype,"icon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"message",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",String)],e.prototype,"acceptIcon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"acceptLabel",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"acceptVisible",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rejectIcon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rejectLabel",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"rejectVisible",void 0),l([o.Input(),i("design:type",String)],e.prototype,"acceptButtonStyleClass",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rejectButtonStyleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"closeOnEscape",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"rtl",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"closable",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"appendTo",void 0),l([o.Input(),i("design:type",String)],e.prototype,"key",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"autoZIndex",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"baseZIndex",void 0),l([o.Input(),i("design:type",String)],e.prototype,"transitionOptions",void 0),l([o.ContentChild(s.Footer),i("design:type",Object)],e.prototype,"footer",void 0),l([o.ViewChild("content"),i("design:type",o.ElementRef)],e.prototype,"contentViewChild",void 0),l([o.Input(),i("design:type",Object),i("design:paramtypes",[Object])],e.prototype,"width",null),l([o.Input(),i("design:type",Object),i("design:paramtypes",[Object])],e.prototype,"height",null),l([o.Component({selector:"p-confirmDialog",template:'\n
\n
\n {{header}}\n \n \n \n
\n
\n \n \n
\n \n \n
\n ',animations:[r.trigger("animation",[r.state("void",r.style({transform:"translate3d(-50%, -25%, 0) scale(0.9)",opacity:0})),r.state("visible",r.style({transform:"translateX(-50%) translateY(-50%)",opacity:1})),r.transition("* => *",r.animate("{{transitionParams}}"))])]})],e)}());t.ConfirmDialog=d,t.ConfirmDialogModule=function(){return l([o.NgModule({imports:[u.CommonModule,c.ButtonModule],exports:[d,c.ButtonModule,s.SharedModule],declarations:[d]})],function(){})}()},"3PJ4":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("sdDj"),a=function(){function e(e,t){this.el=e,this.zone=t,this.onDragStart=new o.EventEmitter,this.onDragEnd=new o.EventEmitter,this.onDrag=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){this.pDraggableDisabled||(this.el.nativeElement.draggable=!0,this.bindMouseListeners())},e.prototype.bindDragListener=function(){var e=this;this.dragListener||this.zone.runOutsideAngular(function(){e.dragListener=e.drag.bind(e),e.el.nativeElement.addEventListener("drag",e.dragListener)})},e.prototype.unbindDragListener=function(){var e=this;this.dragListener&&this.zone.runOutsideAngular(function(){e.el.nativeElement.removeEventListener("drag",e.dragListener),e.dragListener=null})},e.prototype.bindMouseListeners=function(){var e=this;this.mouseDownListener||this.mouseUpListener||this.zone.runOutsideAngular(function(){e.mouseDownListener=e.mousedown.bind(e),e.mouseUpListener=e.mouseup.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.el.nativeElement.addEventListener("mouseup",e.mouseUpListener)})},e.prototype.unbindMouseListeners=function(){var e=this;this.mouseDownListener&&this.mouseUpListener&&this.zone.runOutsideAngular(function(){e.el.nativeElement.removeEventListener("mousedown",e.mouseDownListener),e.el.nativeElement.removeEventListener("mouseup",e.mouseUpListener),e.mouseDownListener=null,e.mouseUpListener=null})},e.prototype.drag=function(e){this.onDrag.emit(e)},e.prototype.dragStart=function(e){this.allowDrag()?(this.dragEffect&&(e.dataTransfer.effectAllowed=this.dragEffect),e.dataTransfer.setData("text",this.scope),this.onDragStart.emit(e),this.bindDragListener()):e.preventDefault()},e.prototype.dragEnd=function(e){this.onDragEnd.emit(e),this.unbindDragListener()},e.prototype.mousedown=function(e){this.handle=e.target},e.prototype.mouseup=function(e){this.handle=null},e.prototype.allowDrag=function(){return!this.dragHandle||!this.handle||u.DomHandler.matches(this.handle,this.dragHandle)},e.prototype.ngOnDestroy=function(){this.unbindDragListener(),this.unbindMouseListeners()},l([o.Input("pDraggable"),i("design:type",String)],e.prototype,"scope",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pDraggableDisabled",void 0),l([o.Input(),i("design:type",String)],e.prototype,"dragEffect",void 0),l([o.Input(),i("design:type",String)],e.prototype,"dragHandle",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDragStart",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDragEnd",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDrag",void 0),l([o.HostListener("dragstart",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"dragStart",null),l([o.HostListener("dragend",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"dragEnd",null),l([o.Directive({selector:"[pDraggable]"})],e)}();t.Draggable=a;var s=function(){function e(e,t){this.el=e,this.zone=t,this.onDragEnter=new o.EventEmitter,this.onDragLeave=new o.EventEmitter,this.onDrop=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){this.pDroppableDisabled||this.bindDragOverListener()},e.prototype.bindDragOverListener=function(){var e=this;this.dragOverListener||this.zone.runOutsideAngular(function(){e.dragOverListener=e.dragOver.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener)})},e.prototype.unbindDragOverListener=function(){var e=this;this.dragOverListener&&this.zone.runOutsideAngular(function(){e.el.nativeElement.removeEventListener("dragover",e.dragOverListener),e.dragOverListener=null})},e.prototype.dragOver=function(e){e.preventDefault()},e.prototype.drop=function(e){this.allowDrop(e)&&(e.preventDefault(),this.onDrop.emit(e))},e.prototype.dragEnter=function(e){e.preventDefault(),this.dropEffect&&(e.dataTransfer.dropEffect=this.dropEffect),this.onDragEnter.emit(e)},e.prototype.dragLeave=function(e){e.preventDefault(),this.onDragLeave.emit(e)},e.prototype.allowDrop=function(e){var t=e.dataTransfer.getData("text");if("string"==typeof this.scope&&t==this.scope)return!0;if(this.scope instanceof Array)for(var n=0;n\n
\n \n
\n
\n
{{header}}
\n
{{subheader}}
\n
\n \n
\n \n
\n \n '})],e)}();t.Card=a,t.CardModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[a,u.SharedModule],declarations:[a]})],function(){})}()},"5EhP":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicDialogInjector=function(){function e(e,t){this._parentInjector=e,this._additionalTokens=t}return e.prototype.get=function(e,t,n){return this._additionalTokens.get(e)||this._parentInjector.get(e,t)},e}()},"5xuf":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=function(){function e(e,t,n){this.el=e,this.renderer=t,this.viewContainer=n,this.onLoad=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){var e=this;this.shouldLoad()&&this.load(),this.isLoaded()||(this.documentScrollListener=this.renderer.listen("window","scroll",function(){e.shouldLoad()&&(e.load(),e.documentScrollListener(),e.documentScrollListener=null)}))},e.prototype.shouldLoad=function(){if(this.isLoaded())return!1;var e=this.el.nativeElement.getBoundingClientRect();return document.documentElement.clientHeight>=e.top},e.prototype.load=function(){this.view=this.viewContainer.createEmbeddedView(this.template),this.onLoad.emit()},e.prototype.isLoaded=function(){return null!=this.view},e.prototype.ngOnDestroy=function(){this.view=null,this.documentScrollListener&&this.documentScrollListener()},l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onLoad",void 0),l([o.ContentChild(o.TemplateRef),i("design:type",o.TemplateRef)],e.prototype,"template",void 0),l([o.Directive({selector:"[pDefer]"})],e)}();t.DeferredLoader=u,t.DeferModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[u],declarations:[u]})],function(){})}()},"60iU":function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"a",function(){return u});var l,i=n("G5J1"),o=n("F/XL"),r=n("XlPw");l||(l={});var u=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Object(o.a)(this.value);case"E":return Object(r.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},"66nc":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("ihYY"),u=n("Ip0R"),a=n("sdDj"),s=n("7LN8"),c=0,d=function(){function e(e,t,n){this.el=e,this.renderer=t,this.zone=n,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.responsive=!0,this.showHeader=!0,this.breakpoint=640,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.transitionOptions="400ms cubic-bezier(0.25, 0.8, 0.25, 1)",this.closeIcon="pi pi-times",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new o.EventEmitter,this.onHide=new o.EventEmitter,this.visibleChange=new o.EventEmitter,this.id="ui-dialog-"+c++}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e,console.warn("width property is deprecated, use style to define the width of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e,console.warn("height property is deprecated, use style to define the height of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){return this._minWidth},set:function(e){this._minWidth=e,console.warn("minWidth property is deprecated, use style to define the minWidth of the Dialog.")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeight",{get:function(){return this._minHeight},set:function(e){this._minHeight=e,console.warn("minHeight property is deprecated, use style to define the minHeight of the Dialog.")},enumerable:!0,configurable:!0}),e.prototype.focus=function(){var e=a.DomHandler.findSingle(this.container,"button");e&&this.zone.runOutsideAngular(function(){setTimeout(function(){return e.focus()},5)})},e.prototype.positionOverlay=function(){var e=a.DomHandler.getViewport();a.DomHandler.getOuterHeight(this.container)>e.height?(this.contentViewChild.nativeElement.style.height=.75*e.height+"px",this.container.style.height="auto"):(this.contentViewChild.nativeElement.style.height=null,this.height&&(this.container.style.height=this.height+"px")),this.positionLeft>=0&&this.positionTop>=0?(this.container.style.left=this.positionLeft+"px",this.container.style.top=this.positionTop+"px"):this.positionTop>=0?(this.center(),this.container.style.top=this.positionTop+"px"):this.center()},e.prototype.close=function(e){this.visibleChange.emit(!1),e.preventDefault()},e.prototype.center=function(){var e=a.DomHandler.getOuterWidth(this.container),t=a.DomHandler.getOuterHeight(this.container);0==e&&0==t&&(this.container.style.visibility="hidden",this.container.style.display="block",e=a.DomHandler.getOuterWidth(this.container),t=a.DomHandler.getOuterHeight(this.container),this.container.style.display="none",this.container.style.visibility="visible");var n=a.DomHandler.getViewport(),l=Math.max(Math.floor((n.width-e)/2),0),i=Math.max(Math.floor((n.height-t)/2),0);this.container.style.left=l+"px",this.container.style.top=i+"px"},e.prototype.enableModality=function(){var e=this;if(!this.mask){this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(this.container.style.zIndex)-1);var t="ui-widget-overlay ui-dialog-mask";this.blockScroll&&(t+=" ui-dialog-mask-scrollblocker"),a.DomHandler.addMultipleClasses(this.mask,t),this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.mask,"click",function(t){e.close(t)})),document.body.appendChild(this.mask),this.blockScroll&&a.DomHandler.addClass(document.body,"ui-overflow-hidden")}},e.prototype.disableModality=function(){if(this.mask){if(this.unbindMaskClickListener(),document.body.removeChild(this.mask),this.blockScroll){for(var e=document.body.children,t=void 0,n=0;n=this.minX&&r+t=this.minY&&u+nparseInt(s))&&d.left+rparseInt(c))&&d.top+u\n
\n {{header}}\n \n \n \n \n \n \n \n \n \n
\n
\n \n
\n \n
\n \n ',animations:[r.trigger("animation",[r.state("void",r.style({transform:"translate3d(0, 25%, 0) scale(0.9)",opacity:0})),r.state("visible",r.style({transform:"none",opacity:1})),r.transition("* => *",r.animate("{{transitionParams}}"))])]})],e)}();t.Dialog=d,t.DialogModule=function(){return l([o.NgModule({imports:[u.CommonModule],exports:[d,s.SharedModule],declarations:[d]})],function(){})}()},"67Y/":function(e,t,n){"use strict";n.d(t,"a",function(){return o});var l=n("mrSG"),i=n("FFOo");function o(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new r(e,t))}}var r=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project,this.thisArg))},e}(),u=function(e){function t(t,n,l){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=l||i,i}return l.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(i.a)},"6MUB":function(e,t,n){"use strict";var l=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(l(i))+n;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(l(e))}).join(t):o+encodeURIComponent(l(e[i]))}).join(t):i?encodeURIComponent(l(i))+n+encodeURIComponent(l(e)):""}},"6ahw":function(e,t,n){"use strict";n.d(t,"a",function(){return o});var l=n("iLxQ"),i=n("DKTb"),o={closed:!0,next:function(e){},error:function(e){if(l.a.useDeprecatedSynchronousErrorHandling)throw e;Object(i.a)(e)},complete:function(){}}},"6blF":function(e,t,n){"use strict";n.d(t,"a",function(){return c});var l=n("1fDf"),i=n("FFOo"),o=n("L/V9"),r=n("6ahw"),u=n("xTla"),a=n("y3By"),s=n("iLxQ"),c=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var l=this.operator,u=function(e,t,n){if(e){if(e instanceof i.a)return e;if(e[o.a])return e[o.a]()}return e||t||n?new i.a(e,t,n):new i.a(r.a)}(e,t,n);if(u.add(l?l.call(u,this.source):this.source||s.a.useDeprecatedSynchronousErrorHandling&&!u.syncErrorThrowable?this._subscribe(u):this._trySubscribe(u)),s.a.useDeprecatedSynchronousErrorHandling&&u.syncErrorThrowable&&(u.syncErrorThrowable=!1,u.syncErrorThrown))throw u.syncErrorValue;return u},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Object(l.a)(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=d(t))(function(t,l){var i;i=n.subscribe(function(t){try{e(t)}catch(n){l(n),i&&i.unsubscribe()}},l,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[u.a]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t\n \n \n '})],e)}();t.Steps=a,t.StepsModule=function(){return l([o.NgModule({imports:[r.CommonModule,u.RouterModule],exports:[a,u.RouterModule],declarations:[a]})],function(){})}()},"7LN8":function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("CcnG"),a=function(){return l([u.Component({selector:"p-header",template:""})],function(){})}();t.Header=a;var s=function(){return l([u.Component({selector:"p-footer",template:""})],function(){})}();t.Footer=s;var c=function(){function e(e){this.template=e}return e.prototype.getType=function(){return this.name},l([o.Input(),i("design:type",String)],e.prototype,"type",void 0),l([o.Input("pTemplate"),i("design:type",String)],e.prototype,"name",void 0),l([o.Directive({selector:"[pTemplate]",host:{}})],e)}();t.PrimeTemplate=c;var d=function(){function e(){this.filterType="text",this.exportable=!0,this.resizable=!0,this.sortFunction=new o.EventEmitter}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"header":e.headerTemplate=t.template;break;case"body":e.bodyTemplate=t.template;break;case"footer":e.footerTemplate=t.template;break;case"filter":e.filterTemplate=t.template;break;case"editor":e.editorTemplate=t.template;break;default:e.bodyTemplate=t.template}})},l([o.Input(),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",String)],e.prototype,"colId",void 0),l([o.Input(),i("design:type",String)],e.prototype,"sortField",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterField",void 0),l([o.Input(),i("design:type",String)],e.prototype,"header",void 0),l([o.Input(),i("design:type",String)],e.prototype,"footer",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"sortable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"editable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"filter",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterMatchMode",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterType",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"excludeGlobalFilter",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"rowspan",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"colspan",void 0),l([o.Input(),i("design:type",String)],e.prototype,"scope",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"exportable",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"headerStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"headerStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"bodyStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"bodyStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"footerStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"footerStyleClass",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"hidden",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"expander",void 0),l([o.Input(),i("design:type",String)],e.prototype,"selectionMode",void 0),l([o.Input(),i("design:type",String)],e.prototype,"filterPlaceholder",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"filterMaxlength",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"resizable",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"sortFunction",void 0),l([o.ContentChildren(c),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.ContentChild(o.TemplateRef),i("design:type",o.TemplateRef)],e.prototype,"template",void 0),l([u.Component({selector:"p-column",template:""})],e)}();t.Column=d;var p=function(){function e(){}return l([o.ContentChildren(d),i("design:type",o.QueryList)],e.prototype,"columns",void 0),l([u.Component({selector:"p-row",template:""})],e)}();t.Row=p;var h=function(){function e(){}return l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.ContentChildren(p),i("design:type",o.QueryList)],e.prototype,"rows",void 0),l([u.Component({selector:"p-headerColumnGroup",template:""})],e)}();t.HeaderColumnGroup=h;var f=function(){function e(){}return l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.ContentChildren(p),i("design:type",o.QueryList)],e.prototype,"rows",void 0),l([u.Component({selector:"p-footerColumnGroup",template:""})],e)}();t.FooterColumnGroup=f,t.SharedModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[a,s,d,c,p,h,f],declarations:[a,s,d,c,p,h,f]})],function(){})}()},"8EBN":function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n\n
\n \n
\n
\n \n
\n \n '})],e)}();t.DTRadioButton=h;var f=function(){function e(){this.onChange=new o.EventEmitter}return e.prototype.handleClick=function(e){this.disabled||this.onChange.emit({originalEvent:e,checked:!this.checked})},l([o.Input(),i("design:type",Boolean)],e.prototype,"checked",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onChange",void 0),l([o.Component({selector:"p-dtCheckbox",template:'\n
\n
\n \n
\n
\n \n
\n
\n '})],e)}();t.DTCheckbox=f;var g=function(){function e(e){this.dt=e}return l([o.Input("pColumnHeaders"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Component({selector:"[pColumnHeaders]",template:'\n \n \n \n {{col.header}}\n \n \n \n \n \n \n \n \n \n \n \n '})],e)}();t.ColumnHeaders=g;var m=function(){function e(e){this.dt=e}return l([o.Input("pColumnFooters"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Component({selector:"[pColumnFooters]",template:'\n \n {{col.footer}}\n \n \n \n \n '})],e)}();t.ColumnFooters=m;var v=function(){function e(e){this.dt=e}return e.prototype.visibleColumns=function(){return this.columns?this.columns.filter(function(e){return!e.hidden}):[]},l([o.Input("pTableBody"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"data",void 0),l([o.Component({selector:"[pTableBody]",template:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{col.header}}\n {{dt.resolveFieldData(rowData,col.field)}}\n \n \n \n
\n \n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n
\n\n \n \n {{dt.emptyMessage}}\n \n \n \n \n \n '})],e)}();t.TableBody=v;var y=function(){function e(e,t,n,l){this.dt=e,this.el=t,this.renderer=n,this.zone=l,this.onVirtualScroll=new o.EventEmitter}return e.prototype.ngAfterViewInit=function(){this.initScrolling()},e.prototype.ngAfterViewChecked=function(){var e=this;if(this.virtualScroll&&!this.rowHeight){var t=d.DomHandler.findSingle(this.scrollTable,"tr.ui-widget-content:not(.ui-datatable-emptymessage-row)");t&&(this.rowHeight=d.DomHandler.getOuterHeight(t))}this.frozen||this.zone.runOutsideAngular(function(){setTimeout(function(){e.alignScrollBar()},1)})},e.prototype.initScrolling=function(){var e=this;this.scrollHeader=this.scrollHeaderViewChild.nativeElement,this.scrollHeaderBox=this.scrollHeaderBoxViewChild.nativeElement,this.scrollBody=this.scrollBodyViewChild.nativeElement,this.scrollTable=this.scrollTableViewChild.nativeElement,this.scrollTableWrapper=this.scrollTableWrapperViewChild.nativeElement,this.scrollFooter=this.scrollFooterViewChild?this.scrollFooterViewChild.nativeElement:null,this.scrollFooterBox=this.scrollFooterBoxViewChild?this.scrollFooterBoxViewChild.nativeElement:null,this.setScrollHeight(),this.frozen||this.zone.runOutsideAngular(function(){e.scrollHeader.addEventListener("scroll",e.onHeaderScroll.bind(e)),e.scrollBody.addEventListener("scroll",e.onBodyScroll.bind(e))}),this.frozen?this.scrollBody.style.paddingBottom=d.DomHandler.calculateScrollbarWidth()+"px":this.alignScrollBar()},e.prototype.onBodyScroll=function(e){var t=this,n=this.el.nativeElement.previousElementSibling;if(n)var l=d.DomHandler.findSingle(n,".ui-datatable-scrollable-body");if(this.scrollHeaderBox.style.marginLeft=-1*this.scrollBody.scrollLeft+"px",this.scrollFooterBox&&(this.scrollFooterBox.style.marginLeft=-1*this.scrollBody.scrollLeft+"px"),l&&(l.scrollTop=this.scrollBody.scrollTop),this.virtualScroll){var i=d.DomHandler.getOuterHeight(this.scrollBody),o=d.DomHandler.getOuterHeight(this.scrollTable),r=this.rowHeight*this.dt.rows,u=d.DomHandler.getOuterHeight(this.scrollTableWrapper)/r||1;if(this.scrollBody.scrollTop+i>parseFloat(this.scrollTable.style.top)+o||this.scrollBody.scrollTopd.DomHandler.getOuterHeight(this.scrollBody)},e.prototype.alignScrollBar=function(){var e=this.hasVerticalOverflow()?d.DomHandler.calculateScrollbarWidth():0;this.scrollHeaderBox.style.marginRight=e+"px",this.scrollFooterBox&&(this.scrollFooterBox.style.marginRight=e+"px")},e.prototype.ngOnDestroy=function(){this.scrollHeader.removeEventListener("scroll",this.onHeaderScroll),this.scrollBody.removeEventListener("scroll",this.onBodyScroll)},l([o.Input("pScrollableView"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input(),i("design:type",c.HeaderColumnGroup)],e.prototype,"headerColumnGroup",void 0),l([o.Input(),i("design:type",c.HeaderColumnGroup)],e.prototype,"footerColumnGroup",void 0),l([o.ViewChild("scrollHeader"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderViewChild",void 0),l([o.ViewChild("scrollHeaderBox"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderBoxViewChild",void 0),l([o.ViewChild("scrollBody"),i("design:type",o.ElementRef)],e.prototype,"scrollBodyViewChild",void 0),l([o.ViewChild("scrollTable"),i("design:type",o.ElementRef)],e.prototype,"scrollTableViewChild",void 0),l([o.ViewChild("scrollTableWrapper"),i("design:type",o.ElementRef)],e.prototype,"scrollTableWrapperViewChild",void 0),l([o.ViewChild("scrollFooter"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterViewChild",void 0),l([o.ViewChild("scrollFooterBox"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterBoxViewChild",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.Input(),i("design:type",String)],e.prototype,"width",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"virtualScroll",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onVirtualScroll",void 0),l([o.Component({selector:"[pScrollableView]",template:'\n
\n
\n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n \n '})],e)}();t.ScrollableView=y;var b=function(){function e(e,t,n,l,i){this.el=e,this.differs=t,this.renderer=n,this.changeDetector=l,this.zone=i,this.pageLinks=5,this.selectionChange=new o.EventEmitter,this.showHeaderCheckbox=!0,this.onRowClick=new o.EventEmitter,this.onRowSelect=new o.EventEmitter,this.onRowUnselect=new o.EventEmitter,this.onRowDblclick=new o.EventEmitter,this.onHeaderCheckboxToggle=new o.EventEmitter,this.onContextMenuSelect=new o.EventEmitter,this.filterDelay=300,this.onLazyLoad=new o.EventEmitter,this.columnResizeMode="fit",this.onColResize=new o.EventEmitter,this.onColReorder=new o.EventEmitter,this.sortMode="single",this.defaultSortOrder=1,this.csvSeparator=",",this.exportFilename="download",this.emptyMessage="No records found",this.paginatorPosition="bottom",this.alwaysShowPaginator=!0,this.metaKeySelection=!0,this.rowTrackBy=function(e,t){return t},this.immutable=!0,this.compareSelectionBy="deepEquals",this.onEditInit=new o.EventEmitter,this.onEditComplete=new o.EventEmitter,this.onEdit=new o.EventEmitter,this.onEditCancel=new o.EventEmitter,this.onPage=new o.EventEmitter,this.onSort=new o.EventEmitter,this.onFilter=new o.EventEmitter,this.rowExpandMode="multiple",this.expandedIcon="fa-chevron-circle-down",this.collapsedIcon="fa-chevron-circle-right",this.tabindex=1,this.sortableRowGroup=!0,this.filters={},this.loadingIcon="fa-circle-o-notch",this.virtualScrollDelay=500,this.rowGroupExpandMode="multiple",this.valueChange=new o.EventEmitter,this.firstChange=new o.EventEmitter,this.onRowExpand=new o.EventEmitter,this.onRowCollapse=new o.EventEmitter,this.onRowGroupExpand=new o.EventEmitter,this.onRowGroupCollapse=new o.EventEmitter,this.page=0,this.columnsChanged=!1,this._first=0,this._sortOrder=1,this.filterConstraints={startsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=t.toLowerCase();return e.toString().toLowerCase().slice(0,n.length)===n},contains:function(e,t){return null==t||"string"==typeof t&&""===t.trim()||null!=e&&-1!==e.toString().toLowerCase().indexOf(t.toLowerCase())},endsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=t.toString().toLowerCase();return-1!==e.toString().toLowerCase().indexOf(n,e.toString().length-n.length)},equals:function(e,t){return null==t||"string"==typeof t&&""===t.trim()||null!=e&&e.toString().toLowerCase()==t.toString().toLowerCase()},notEquals:function(e,t){return!(null==t||"string"==typeof t&&""===t.trim()||null!=e&&e.toString().toLowerCase()==t.toString().toLowerCase())},in:function(e,t){if(null==t||0===t.length)return!0;if(null==e)return!1;for(var n=0;n=this.totalRecords){var e=Math.ceil(this.totalRecords/this.rows);this._first=Math.max((e-1)*this.rows,0)}},e.prototype.updateTotalRecords=function(){this.totalRecords=this.lazy?this.totalRecords:this.value?this.value.length:0},e.prototype.onPageChange=function(e){this._first=e.first,this.firstChange.emit(this.first),this.rows=e.rows,this.paginate()},e.prototype.paginate=function(){this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.updateDataToRender(this.filteredValue||this.value),this.onPage.emit({first:this.first,rows:this.rows})},e.prototype.updateDataToRender=function(e){if((this.paginator||this.virtualScroll)&&e){this.dataToRender=[];for(var t=this.lazy?0:this.first,n=this.virtualScroll?this.first+2*this.rows:t+this.rows,l=t;l=e.length);l++)this.dataToRender.push(e[l])}else this.dataToRender=e;this.rowGroupMode&&this.updateRowGroupMetadata(),this.changeDetector.markForCheck()},e.prototype.onVirtualScroll=function(e){var t=this;this._first=(e.page-1)*this.rows,this.virtualScrollCallback=e.callback,this.zone.run(function(){t.virtualScrollTimer&&clearTimeout(t.virtualScrollTimer),t.virtualScrollTimer=setTimeout(function(){t.lazy?t.onLazyLoad.emit(t.createLazyLoadMetadata()):t.updateDataToRender(t.filteredValue||t.value)},t.virtualScrollDelay)})},e.prototype.onHeaderKeydown=function(e,t){13==e.keyCode&&(this.sort(e,t),e.preventDefault())},e.prototype.onHeaderMousedown=function(e,t){this.reorderableColumns&&("INPUT"!==e.target.nodeName?t.draggable=!0:"INPUT"===e.target.nodeName&&(t.draggable=!1))},e.prototype.sort=function(e,t){if(t.sortable){var n=e.target;if(d.DomHandler.hasClass(n,"ui-sortable-column")||d.DomHandler.hasClass(n,"ui-column-title")||d.DomHandler.hasClass(n,"ui-sortable-column-icon")){this.immutable||(this.preventSortPropagation=!0);var l=t.sortField||t.field;this._sortOrder=this.sortField===l?-1*this.sortOrder:this.defaultSortOrder,this._sortField=l,this.sortColumn=t,"multiple"==this.sortMode&&(this.multiSortMeta&&(e.metaKey||e.ctrlKey)||(this._multiSortMeta=[]),this.addSortMeta({field:this.sortField,order:this.sortOrder})),this.lazy?(this._first=0,this.onLazyLoad.emit(this.createLazyLoadMetadata())):"multiple"==this.sortMode?this.sortMultiple():this.sortSingle(),this.onSort.emit({field:this.sortField,order:this.sortOrder,multisortmeta:this.multiSortMeta})}this.updateDataToRender(this.filteredValue||this.value)}},e.prototype.sortSingle=function(){var e=this;this.value&&(this.sortColumn&&"custom"===this.sortColumn.sortable?(this.preventSortPropagation=!0,this.sortColumn.sortFunction.emit({field:this.sortField,order:this.sortOrder})):this.value.sort(function(t,n){var l,i=e.resolveFieldData(t,e.sortField),o=e.resolveFieldData(n,e.sortField);return l=null==i&&null!=o?-1:null!=i&&null==o?1:null==i&&null==o?0:"string"==typeof i&&"string"==typeof o?i.localeCompare(o):io?1:0,e.sortOrder*l}),this._first=0,this.hasFilter()&&this._filter())},e.prototype.sortMultiple=function(){var e=this;this.value&&(this.value.sort(function(t,n){return e.multisortField(t,n,e.multiSortMeta,0)}),this.hasFilter()&&this._filter())},e.prototype.multisortField=function(e,t,n,l){var i=this.resolveFieldData(e,n[l].field),o=this.resolveFieldData(t,n[l].field),r=null;if("string"==typeof i||i instanceof String){if(i.localeCompare&&i!=o)return n[l].order*i.localeCompare(o)}else r=il?this.multisortField(e,t,n,l+1):0:n[l].order*r},e.prototype.addSortMeta=function(e){for(var t=-1,n=0;n=0?this.multiSortMeta[t]=e:this.multiSortMeta.push(e)},e.prototype.isSorted=function(e){if(!e.sortable)return!1;var t=e.sortField||e.field;if("single"===this.sortMode)return this.sortField&&t===this.sortField;if("multiple"===this.sortMode){var n=!1;if(this.multiSortMeta)for(var l=0;lthis.anchorRowIndex?(t=this.anchorRowIndex,n=this.rangeRowIndex):this.rangeRowIndext?(n=t,l=this.anchorRowIndex):this.anchorRowIndex-1:this.equals(e,this.selection))},e.prototype.equals=function(e,t){return"equals"===this.compareSelectionBy?e===t:p.ObjectUtils.equals(e,t,this.dataKey)},Object.defineProperty(e.prototype,"allSelected",{get:function(){if(this.headerCheckboxToggleAllPages)return this.selection&&this.value&&this.selection.length===this.value.length;var e=!0;if(this.dataToRender&&this.selection&&this.dataToRender.length<=this.selection.length){for(var t=0,n=this.dataToRender;tparseInt(this.resizeColumn.style.minWidth||15)){if("fit"===this.columnResizeMode){for(var i=this.resizeColumn.nextElementSibling;d.DomHandler.hasClass(i,"ui-helper-hidden");)i=i.nextElementSibling;if(i){var o=i.offsetWidth-t;if(l>15&&o>parseInt(i.style.minWidth||15)&&(this.resizeColumn.style.width=l+"px",i&&(i.style.width=o+"px"),this.scrollable)){var r=d.DomHandler.findSingle(this.el.nativeElement,"colgroup.ui-datatable-scrollable-colgroup"),u=d.DomHandler.index(this.resizeColumn);r.children[u].style.width=l+"px",i&&(r.children[u+1].style.width=o+"px")}}}else if("expand"===this.columnResizeMode){this.tbody.parentElement.style.width=this.tbody.parentElement.offsetWidth+t+"px",this.resizeColumn.style.width=l+"px";var a=this.tbody.parentElement.style.width;this.scrollable?(d.DomHandler.findSingle(this.el.nativeElement,".ui-datatable-scrollable-header-box").children[0].style.width=a,r=d.DomHandler.findSingle(this.el.nativeElement,"colgroup.ui-datatable-scrollable-colgroup"),u=d.DomHandler.index(this.resizeColumn),r.children[u].style.width=l+"px"):this.el.nativeElement.children[0].style.width=a}this.onColResize.emit({element:this.resizeColumn,delta:t})}this.resizerHelper.style.display="none",this.resizeColumn=null,d.DomHandler.removeClass(this.el.nativeElement.children[0],"ui-unselectable-text"),this.unbindColumnResizeEvents()},e.prototype.fixColumnWidths=function(){for(var e,t=d.DomHandler.find(this.el.nativeElement,"th.ui-resizable-column"),n=0;no?(this.reorderIndicatorUp.style.left=i+t.offsetWidth-Math.ceil(this.iconWidth/2)+"px",this.reorderIndicatorDown.style.left=i+t.offsetWidth-Math.ceil(this.iconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUp.style.left=i-Math.ceil(this.iconWidth/2)+"px",this.reorderIndicatorDown.style.left=i-Math.ceil(this.iconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUp.style.display="block",this.reorderIndicatorDown.style.display="block"}else e.dataTransfer.dropEffect="none"}},e.prototype.onColumnDragleave=function(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUp.style.display="none",this.reorderIndicatorDown.style.display="none",window.document.removeEventListener("dragover",this.onColumnDragover))},e.prototype.onColumnDrop=function(e){if(e.preventDefault(),this.draggedColumn){var t=d.DomHandler.index(this.draggedColumn),n=d.DomHandler.index(this.findParentHeader(e.target)),l=t!=n;l&&(n-t==1&&-1===this.dropPosition||t-n==1&&1===this.dropPosition)&&(l=!1),l&&(p.ObjectUtils.reorderArray(this.columns,t,n),this.scrollable&&this.initScrollableColumns(),this.onColReorder.emit({dragIndex:t,dropIndex:n,columns:this.columns})),this.reorderIndicatorUp.style.display="none",this.reorderIndicatorDown.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}},e.prototype.initColumnReordering=function(){this.reorderIndicatorUp=d.DomHandler.findSingle(this.el.nativeElement.children[0],"span.ui-datatable-reorder-indicator-up"),this.reorderIndicatorDown=d.DomHandler.findSingle(this.el.nativeElement.children[0],"span.ui-datatable-reorder-indicator-down"),this.iconWidth=d.DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUp),this.iconHeight=d.DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorUp)},e.prototype.findParentHeader=function(e){if("TH"==e.nodeName)return e;for(var t=e.parentElement;"TH"!=t.nodeName&&(t=t.parentElement););return t},e.prototype.hasFooter=function(){if(this.footerColumnGroups&&this.footerColumnGroups.first)return!0;if(this.columns)for(var e=0;e=0?(this.expandedRowsGroups.splice(n,1),this.onRowGroupCollapse.emit({originalEvent:e,group:l})):("single"===this.rowGroupExpandMode&&(this.expandedRowsGroups=[]),this.expandedRowsGroups.push(l),this.onRowGroupExpand.emit({originalEvent:e,group:l})),e.preventDefault()},e.prototype.reset=function(){this._sortField=null,this._sortOrder=1,this.filteredValue=null,this.filters={},this._first=0,this.firstChange.emit(this._first),this.updateTotalRecords(),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.updateDataToRender(this.value)},e.prototype.exportCSV=function(e){var t=this,n=this.filteredValue||this.value,l="\ufeff";e&&e.selectionOnly&&(n=this.selection||[]);for(var i=0;i0},e.prototype.ngOnDestroy=function(){this.globalFilterFunction&&this.globalFilterFunction(),this.resizableColumns&&this.unbindColumnResizeEvents(),this.unbindDocumentEditListener(),this.columnsSubscription&&this.columnsSubscription.unsubscribe(),this.virtualScrollCallback&&(this.virtualScrollCallback=null)},l([o.Input(),i("design:type",Boolean)],e.prototype,"paginator",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"rows",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"pageLinks",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"rowsPerPageOptions",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"responsive",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"stacked",void 0),l([o.Input(),i("design:type",String)],e.prototype,"selectionMode",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"selectionChange",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"editable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"showHeaderCheckbox",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowClick",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowSelect",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowUnselect",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowDblclick",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onHeaderCheckboxToggle",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"headerCheckboxToggleAllPages",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onContextMenuSelect",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"filterDelay",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"lazy",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onLazyLoad",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"resizableColumns",void 0),l([o.Input(),i("design:type",String)],e.prototype,"columnResizeMode",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onColResize",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"reorderableColumns",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onColReorder",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"scrollable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"virtualScroll",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"scrollHeight",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"scrollWidth",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"frozenWidth",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"unfrozenWidth",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"tableStyle",void 0),l([o.Input(),i("design:type",String)],e.prototype,"tableStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"globalFilter",void 0),l([o.Input(),i("design:type",String)],e.prototype,"sortMode",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"defaultSortOrder",void 0),l([o.Input(),i("design:type",String)],e.prototype,"groupField",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"contextMenu",void 0),l([o.Input(),i("design:type",String)],e.prototype,"csvSeparator",void 0),l([o.Input(),i("design:type",String)],e.prototype,"exportFilename",void 0),l([o.Input(),i("design:type",String)],e.prototype,"emptyMessage",void 0),l([o.Input(),i("design:type",String)],e.prototype,"paginatorPosition",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"alwaysShowPaginator",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"metaKeySelection",void 0),l([o.Input(),i("design:type",Function)],e.prototype,"rowTrackBy",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"immutable",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"frozenValue",void 0),l([o.Input(),i("design:type",String)],e.prototype,"compareSelectionBy",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEditInit",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEditComplete",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEdit",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onEditCancel",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onPage",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onSort",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onFilter",void 0),l([o.ContentChild(c.Header),i("design:type",Object)],e.prototype,"header",void 0),l([o.ContentChild(c.Footer),i("design:type",Object)],e.prototype,"footer",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"expandableRows",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"expandedRows",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"expandableRowGroups",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rowExpandMode",void 0),l([o.Input(),i("design:type",Array)],e.prototype,"expandedRowsGroups",void 0),l([o.Input(),i("design:type",String)],e.prototype,"expandedIcon",void 0),l([o.Input(),i("design:type",String)],e.prototype,"collapsedIcon",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"tabindex",void 0),l([o.Input(),i("design:type",Function)],e.prototype,"rowStyleClass",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"rowStyleMap",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rowGroupMode",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"sortableRowGroup",void 0),l([o.Input(),i("design:type",String)],e.prototype,"sortFile",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"rowHover",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"filters",void 0),l([o.Input(),i("design:type",String)],e.prototype,"dataKey",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"loading",void 0),l([o.Input(),i("design:type",String)],e.prototype,"loadingIcon",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"virtualScrollDelay",void 0),l([o.Input(),i("design:type",String)],e.prototype,"rowGroupExpandMode",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"valueChange",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"firstChange",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowExpand",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowCollapse",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowGroupExpand",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onRowGroupCollapse",void 0),l([o.ContentChildren(c.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.ContentChildren(c.Column),i("design:type",o.QueryList)],e.prototype,"cols",void 0),l([o.ContentChildren(c.HeaderColumnGroup),i("design:type",o.QueryList)],e.prototype,"headerColumnGroups",void 0),l([o.ContentChildren(c.FooterColumnGroup),i("design:type",o.QueryList)],e.prototype,"footerColumnGroups",void 0),l([o.Input(),i("design:type",Array),i("design:paramtypes",[Array])],e.prototype,"multiSortMeta",null),l([o.Input(),i("design:type",String),i("design:paramtypes",[String])],e.prototype,"sortField",null),l([o.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"sortOrder",null),l([o.Input(),i("design:type",Array),i("design:paramtypes",[Array])],e.prototype,"value",null),l([o.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"first",null),l([o.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"totalRecords",null),l([o.Input(),i("design:type",Object),i("design:paramtypes",[Object])],e.prototype,"selection",null),l([o.Component({selector:"p-dataTable",template:'\n
\n
\n
\n \n
\n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n
\n '})],e)}();t.DataTable=b,t.DataTableModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.SharedModule,s.PaginatorModule,u.FormsModule],exports:[b,a.SharedModule],declarations:[b,h,f,g,m,v,y]})],function(){})}()},ARwZ:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("gIcY");t.RATING_VALUE_ACCESSOR={provide:u.NG_VALUE_ACCESSOR,useExisting:o.forwardRef(function(){return a}),multi:!0};var a=function(){function e(e){this.cd=e,this.stars=5,this.cancel=!0,this.iconOnClass="pi pi-star",this.iconOffClass="pi pi-star-o",this.iconCancelClass="pi pi-ban",this.onRate=new o.EventEmitter,this.onCancel=new o.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){}}return e.prototype.ngOnInit=function(){this.starsArray=[];for(var e=0;e\n \n \n \n \n \n \n \n ',providers:[t.RATING_VALUE_ACCESSOR]})],e)}();t.Rating=a,t.RatingModule=function(){return l([o.NgModule({imports:[r.CommonModule],exports:[a],declarations:[a]})],function(){})}()},Avra:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("gIcY"),u=n("Ip0R"),a=n("sdDj"),s=(n("VeV1"),function(){function e(e,t){var n=this;this.el=e,this.terminalService=t,this.commands=[],this.subscription=t.responseHandler.subscribe(function(e){n.commands[n.commands.length-1].response=e,n.commandProcessed=!0})}return e.prototype.ngAfterViewInit=function(){this.container=a.DomHandler.find(this.el.nativeElement,".ui-terminal")[0]},e.prototype.ngAfterViewChecked=function(){this.commandProcessed&&(this.container.scrollTop=this.container.scrollHeight,this.commandProcessed=!1)},Object.defineProperty(e.prototype,"response",{set:function(e){e&&(this.commands[this.commands.length-1].response=e,this.commandProcessed=!0)},enumerable:!0,configurable:!0}),e.prototype.handleCommand=function(e){13==e.keyCode&&(this.commands.push({text:this.command}),this.terminalService.sendCommand(this.command),this.command="")},e.prototype.focus=function(e){e.focus()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",String)],e.prototype,"welcomeMessage",void 0),l([o.Input(),i("design:type",String)],e.prototype,"prompt",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Input(),i("design:type",String),i("design:paramtypes",[String])],e.prototype,"response",null),l([o.Component({selector:"p-terminal",template:'\n
\n
{{welcomeMessage}}
\n
\n
\n {{prompt}}\n {{command.text}}\n
{{command.response}}
\n
\n
\n
\n {{prompt}}\n \n
\n
\n '})],e)}());t.Terminal=s,t.TerminalModule=function(){return l([o.NgModule({imports:[u.CommonModule,r.FormsModule],exports:[s],declarations:[s]})],function(){})}()},AxiF:function(e,t,n){"use strict";n.d(t,"a",function(){return u});var l=n("mrSG"),i=n("FFOo"),o=n("b7mW"),r=n("G5J1");function u(e){return function(t){return 0===e?Object(r.b)():t.lift(new a(e))}}var a=function(){function e(e){if(this.total=e,this.total<0)throw new o.a}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,n){var l=e.call(this,t)||this;return l.total=n,l.ring=new Array,l.count=0,l}return l.__extends(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,l=this.count++;t.length0)for(var n=this.count>=this.total?this.total:this.count,l=this.ring,i=0;it.cursorCoords(n,"window").top&&((h=l).style.opacity=.4)}))};!function(e,t,n,l,i){e.openDialog(t,f,{value:s,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){d(e)},onKeyDown:i})}(t,p(t),0,0,function(l,i){var o=e.keyName(l),r=t.getOption("extraKeys"),u=r&&r[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==u||"findPrev"==u||"findPersistentNext"==u||"findPersistentPrev"==u?(e.e_stop(l),a(t,n(t),i),t.execCommand(u)):"find"!=u&&"findPersistent"!=u||(e.e_stop(l),f(i,l))}),r&&s&&(a(t,u,s),c(t,l))}else o(t,p(t),"Search for:",s,function(e){e&&!u.query&&t.operation(function(){a(t,u,e),u.posFrom=u.posTo=t.getCursor(),c(t,l)})})}function c(t,l,o){t.operation(function(){var r=n(t),u=i(t,r.query,l?r.posFrom:r.posTo);(u.find(l)||(u=i(t,r.query,l?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(l))&&(t.setSelection(u.from(),u.to()),t.scrollIntoView({from:u.from(),to:u.to()},20),r.posFrom=u.from(),r.posTo=u.to(),o&&o(u.from(),u.to()))})}function d(e){e.operation(function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function p(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function h(e,t,n){e.operation(function(){for(var l=i(e,t);l.findNext();)if("string"!=typeof t){var o=e.getRange(l.from(),l.to()).match(t);l.replace(n.replace(/\$(\d)/g,function(e,t){return o[t]}))}else l.replace(n)})}function f(e,t){if(!e.getOption("readOnly")){var l=e.getSelection()||n(e).lastQuery,a=''+e.phrase(t?"Replace all:":"Replace:")+"";o(e,a+function(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}(e),a,l,function(n){n&&(n=u(n),o(e,function(e){return''+e.phrase("With:")+' '}(e),e.phrase("Replace with:"),"",function(l){if(l=r(l),t)h(e,n,l);else{d(e);var o=i(e,n,e.getCursor("from")),u=function(){var t,r=o.from();!(t=o.findNext())&&(o=i(e,n),!(t=o.findNext())||r&&o.from().line==r.line&&o.from().ch==r.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),function(e,t,n,l){e.openConfirm?e.openConfirm(t,l):confirm(n)&&l[0]()}(e,function(e){return''+e.phrase("Replace?")+" "}(e),e.phrase("Replace?"),[function(){a(t)},u,function(){h(e,n,l)}]))},a=function(e){o.replace("string"==typeof n?l:l.replace(/\$(\d)/g,function(t,n){return e[n]})),u()};u()}}))})}}e.commands.find=function(e){d(e),s(e)},e.commands.findPersistent=function(e){d(e),s(e,!1,!0)},e.commands.findPersistentNext=function(e){s(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){s(e,!0,!0,!0)},e.commands.findNext=s,e.commands.findPrev=function(e){s(e,!0)},e.commands.clearSearch=d,e.commands.replace=f,e.commands.replaceAll=function(e){f(e,!0)}}(n("VrN/"),n("uTOq"),n("Ku0u"))},CC75:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("7LN8"),a=n("ZYCi"),s=function(){function e(){}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"item":default:e.itemTemplate=t.template}})},e.prototype.itemClick=function(e,t){t.disabled?e.preventDefault():(t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),this.activeItem=t)},l([o.Input(),i("design:type",Array)],e.prototype,"model",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"activeItem",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"popup",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.ContentChildren(u.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.Component({selector:"p-tabMenu",template:'\n \n '})],e)}();t.TabMenu=s,t.TabMenuModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.RouterModule],exports:[s,a.RouterModule],declarations:[s]})],function(){})}()},CS9Q:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var l=n("mrSG"),i=n("siIJ"),o=function(e){function t(n,l){void 0===l&&(l=i.a.now);var o=e.call(this,n,function(){return t.delegate&&t.delegate!==o?t.delegate.now():l()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return l.__extends(t,e),t.prototype.schedule=function(n,l,i){return void 0===l&&(l=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,l,i):e.prototype.schedule.call(this,n,l,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.a)},CcnG:function(e,t,n){"use strict";n.r(t),n.d(t,"\u0275angular_packages_core_core_t",function(){return Xf}),n.d(t,"\u0275angular_packages_core_core_q",function(){return Yf}),n.d(t,"\u0275angular_packages_core_core_r",function(){return Zf}),n.d(t,"\u0275angular_packages_core_core_s",function(){return Qf}),n.d(t,"\u0275angular_packages_core_core_h",function(){return Zp}),n.d(t,"\u0275angular_packages_core_core_o",function(){return Df}),n.d(t,"\u0275angular_packages_core_core_p",function(){return Pf}),n.d(t,"\u0275angular_packages_core_core_n",function(){return mf}),n.d(t,"\u0275angular_packages_core_core_m",function(){return gf}),n.d(t,"\u0275angular_packages_core_core_c",function(){return hu}),n.d(t,"\u0275angular_packages_core_core_d",function(){return Rt}),n.d(t,"\u0275angular_packages_core_core_e",function(){return $p}),n.d(t,"\u0275angular_packages_core_core_f",function(){return Mp}),n.d(t,"\u0275angular_packages_core_core_g",function(){return Vp}),n.d(t,"\u0275angular_packages_core_core_l",function(){return od}),n.d(t,"\u0275angular_packages_core_core_u",function(){return Sh}),n.d(t,"\u0275angular_packages_core_core_w",function(){return Ch}),n.d(t,"\u0275angular_packages_core_core_v",function(){return bh}),n.d(t,"\u0275angular_packages_core_core_z",function(){return xh}),n.d(t,"\u0275angular_packages_core_core_x",function(){return wh}),n.d(t,"\u0275angular_packages_core_core_y",function(){return _h}),n.d(t,"\u0275angular_packages_core_core_bc",function(){return Tn}),n.d(t,"\u0275angular_packages_core_core_bj",function(){return h}),n.d(t,"\u0275angular_packages_core_core_bd",function(){return Qt}),n.d(t,"\u0275angular_packages_core_core_be",function(){return Jt}),n.d(t,"\u0275angular_packages_core_core_bf",function(){return vn}),n.d(t,"\u0275angular_packages_core_core_bi",function(){return ii}),n.d(t,"\u0275angular_packages_core_core_bm",function(){return Qe}),n.d(t,"\u0275angular_packages_core_core_i",function(){return da}),n.d(t,"\u0275angular_packages_core_core_j",function(){return pa}),n.d(t,"\u0275angular_packages_core_core_k",function(){return ha}),n.d(t,"\u0275angular_packages_core_core_a",function(){return D}),n.d(t,"\u0275angular_packages_core_core_b",function(){return k}),n.d(t,"\u0275angular_packages_core_core_bk",function(){return s}),n.d(t,"\u0275angular_packages_core_core_ba",function(){return qm}),n.d(t,"\u0275angular_packages_core_core_bb",function(){return sg}),n.d(t,"createPlatform",function(){return Gh}),n.d(t,"assertPlatform",function(){return qh}),n.d(t,"destroyPlatform",function(){return Kh}),n.d(t,"getPlatform",function(){return Yh}),n.d(t,"PlatformRef",function(){return Zh}),n.d(t,"ApplicationRef",function(){return Xh}),n.d(t,"createPlatformFactory",function(){return Wh}),n.d(t,"NgProbeToken",function(){return $h}),n.d(t,"enableProdMode",function(){return Ha}),n.d(t,"isDevMode",function(){return ja}),n.d(t,"APP_ID",function(){return Yp}),n.d(t,"PACKAGE_ROOT_URL",function(){return nh}),n.d(t,"PLATFORM_INITIALIZER",function(){return Jp}),n.d(t,"PLATFORM_ID",function(){return eh}),n.d(t,"APP_BOOTSTRAP_LISTENER",function(){return th}),n.d(t,"APP_INITIALIZER",function(){return qp}),n.d(t,"ApplicationInitStatus",function(){return Kp}),n.d(t,"DebugElement",function(){return Tf}),n.d(t,"DebugNode",function(){return Of}),n.d(t,"asNativeElements",function(){return vf}),n.d(t,"getDebugNode",function(){return Ef}),n.d(t,"Testability",function(){return Fh}),n.d(t,"TestabilityRegistry",function(){return Vh}),n.d(t,"setTestabilityGetter",function(){return jh}),n.d(t,"TRANSLATIONS",function(){return Wf}),n.d(t,"TRANSLATIONS_FORMAT",function(){return qf}),n.d(t,"LOCALE_ID",function(){return Gf}),n.d(t,"MissingTranslationStrategy",function(){return Kf}),n.d(t,"ApplicationModule",function(){return Jf}),n.d(t,"wtfCreateScope",function(){return Ih}),n.d(t,"wtfLeave",function(){return Oh}),n.d(t,"wtfStartTimeRange",function(){return Th}),n.d(t,"wtfEndTimeRange",function(){return Dh}),n.d(t,"Type",function(){return sd}),n.d(t,"EventEmitter",function(){return gc}),n.d(t,"ErrorHandler",function(){return Sp}),n.d(t,"Sanitizer",function(){return Oa}),n.d(t,"SecurityContext",function(){return Ia}),n.d(t,"ANALYZE_FOR_ENTRY_COMPONENTS",function(){return R}),n.d(t,"Attribute",function(){return M}),n.d(t,"ContentChild",function(){return A}),n.d(t,"ContentChildren",function(){return L}),n.d(t,"Query",function(){return N}),n.d(t,"ViewChild",function(){return F}),n.d(t,"ViewChildren",function(){return P}),n.d(t,"Component",function(){return Ud}),n.d(t,"Directive",function(){return zd}),n.d(t,"HostBinding",function(){return Kd}),n.d(t,"HostListener",function(){return Yd}),n.d(t,"Input",function(){return Wd}),n.d(t,"Output",function(){return qd}),n.d(t,"Pipe",function(){return $d}),n.d(t,"CUSTOM_ELEMENTS_SCHEMA",function(){return op}),n.d(t,"NO_ERRORS_SCHEMA",function(){return rp}),n.d(t,"NgModule",function(){return up}),n.d(t,"ViewEncapsulation",function(){return le}),n.d(t,"Version",function(){return Ta}),n.d(t,"VERSION",function(){return Da}),n.d(t,"defineInjectable",function(){return b}),n.d(t,"defineInjector",function(){return C}),n.d(t,"forwardRef",function(){return Q}),n.d(t,"resolveForwardRef",function(){return X}),n.d(t,"Injectable",function(){return gp}),n.d(t,"INJECTOR",function(){return pu}),n.d(t,"Injector",function(){return fu}),n.d(t,"inject",function(){return Mt}),n.d(t,"\u0275inject",function(){return Mt}),n.d(t,"InjectFlags",function(){return Ot}),n.d(t,"ReflectiveInjector",function(){return Up}),n.d(t,"createInjector",function(){return Au}),n.d(t,"ResolvedReflectiveFactory",function(){return Ap}),n.d(t,"ReflectiveKey",function(){return Dp}),n.d(t,"InjectionToken",function(){return x}),n.d(t,"Inject",function(){return _t}),n.d(t,"Optional",function(){return xt}),n.d(t,"Self",function(){return St}),n.d(t,"SkipSelf",function(){return Et}),n.d(t,"Host",function(){return It}),n.d(t,"NgZone",function(){return kh}),n.d(t,"\u0275NoopNgZone",function(){return Ph}),n.d(t,"RenderComponentType",function(){return va}),n.d(t,"Renderer",function(){return ba}),n.d(t,"Renderer2",function(){return xa}),n.d(t,"RendererFactory2",function(){return wa}),n.d(t,"RendererStyleFlags2",function(){return _a}),n.d(t,"RootRenderer",function(){return Ca}),n.d(t,"COMPILER_OPTIONS",function(){return vh}),n.d(t,"Compiler",function(){return mh}),n.d(t,"CompilerFactory",function(){return yh}),n.d(t,"ModuleWithComponentFactories",function(){return ih}),n.d(t,"ComponentFactory",function(){return Qu}),n.d(t,"\u0275ComponentFactory",function(){return Qu}),n.d(t,"ComponentRef",function(){return Zu}),n.d(t,"ComponentFactoryResolver",function(){return ia}),n.d(t,"ElementRef",function(){return fa}),n.d(t,"NgModuleFactory",function(){return aa}),n.d(t,"NgModuleRef",function(){return ua}),n.d(t,"NgModuleFactoryLoader",function(){return td}),n.d(t,"getModuleFactory",function(){return ud}),n.d(t,"QueryList",function(){return ef}),n.d(t,"SystemJsNgModuleLoader",function(){return lf}),n.d(t,"SystemJsNgModuleLoaderConfig",function(){return tf}),n.d(t,"TemplateRef",function(){return mc}),n.d(t,"ViewContainerRef",function(){return rf}),n.d(t,"EmbeddedViewRef",function(){return hf}),n.d(t,"ViewRef",function(){return pf}),n.d(t,"ChangeDetectionStrategy",function(){return V}),n.d(t,"ChangeDetectorRef",function(){return sf}),n.d(t,"DefaultIterableDiffer",function(){return Rf}),n.d(t,"IterableDiffers",function(){return jf}),n.d(t,"KeyValueDiffers",function(){return Hf}),n.d(t,"SimpleChange",function(){return cl}),n.d(t,"WrappedValue",function(){return sl}),n.d(t,"platformCore",function(){return $f}),n.d(t,"\u0275ALLOW_MULTIPLE_PLATFORMS",function(){return Uh}),n.d(t,"\u0275APP_ID_RANDOM_PROVIDER",function(){return Qp}),n.d(t,"\u0275defaultIterableDiffers",function(){return zf}),n.d(t,"\u0275defaultKeyValueDiffers",function(){return Uf}),n.d(t,"\u0275devModeEqual",function(){return al}),n.d(t,"\u0275isListLikeIterable",function(){return dl}),n.d(t,"\u0275ChangeDetectorStatus",function(){return j}),n.d(t,"\u0275isDefaultChangeDetectionStrategy",function(){return H}),n.d(t,"\u0275Console",function(){return lh}),n.d(t,"\u0275getInjectableDef",function(){return w}),n.d(t,"\u0275setCurrentInjector",function(){return Dt}),n.d(t,"\u0275APP_ROOT",function(){return Du}),n.d(t,"\u0275ivyEnabled",function(){return tg}),n.d(t,"\u0275CodegenComponentFactoryResolver",function(){return oa}),n.d(t,"\u0275resolveComponentResources",function(){return J}),n.d(t,"\u0275ReflectionCapabilities",function(){return fd}),n.d(t,"\u0275RenderDebugInfo",function(){return ya}),n.d(t,"\u0275_sanitizeHtml",function(){return as}),n.d(t,"\u0275_sanitizeStyle",function(){return Wc}),n.d(t,"\u0275_sanitizeUrl",function(){return $a}),n.d(t,"\u0275global",function(){return U}),n.d(t,"\u0275looseIdentical",function(){return K}),n.d(t,"\u0275stringify",function(){return Y}),n.d(t,"\u0275makeDecorator",function(){return O}),n.d(t,"\u0275isObservable",function(){return Wp}),n.d(t,"\u0275isPromise",function(){return Gp}),n.d(t,"\u0275clearOverrides",function(){return Dy}),n.d(t,"\u0275initServicesIfNeeded",function(){return $v}),n.d(t,"\u0275overrideComponentView",function(){return Ty}),n.d(t,"\u0275overrideProvider",function(){return Oy}),n.d(t,"\u0275NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR",function(){return ev}),n.d(t,"\u0275defineBase",function(){return pe}),n.d(t,"\u0275defineComponent",function(){return ue}),n.d(t,"\u0275defineDirective",function(){return he}),n.d(t,"\u0275definePipe",function(){return fe}),n.d(t,"\u0275defineNgModule",function(){return ce}),n.d(t,"\u0275detectChanges",function(){return mr}),n.d(t,"\u0275renderComponent",function(){return Zr}),n.d(t,"\u0275Render3ComponentFactory",function(){return Aa}),n.d(t,"\u0275Render3ComponentRef",function(){return Pa}),n.d(t,"\u0275directiveInject",function(){return Pr}),n.d(t,"\u0275injectAttribute",function(){return Fr}),n.d(t,"\u0275getFactoryOf",function(){return Fn}),n.d(t,"\u0275getInheritedFactory",function(){return Vn}),n.d(t,"\u0275templateRefExtractor",function(){return Ac}),n.d(t,"\u0275ProvidersFeature",function(){return Yu}),n.d(t,"\u0275InheritDefinitionFeature",function(){return lu}),n.d(t,"\u0275NgOnChangesFeature",function(){return ru}),n.d(t,"\u0275LifecycleHooksFeature",function(){return eu}),n.d(t,"\u0275Render3NgModuleRef",function(){return Ks}),n.d(t,"\u0275markDirty",function(){return Cr}),n.d(t,"\u0275NgModuleFactory",function(){return Ys}),n.d(t,"\u0275NO_CHANGE",function(){return fl}),n.d(t,"\u0275container",function(){return lr}),n.d(t,"\u0275nextContext",function(){return po}),n.d(t,"\u0275elementStart",function(){return _o}),n.d(t,"\u0275namespaceHTML",function(){return yo}),n.d(t,"\u0275namespaceMathML",function(){return vo}),n.d(t,"\u0275namespaceSVG",function(){return mo}),n.d(t,"\u0275element",function(){return bo}),n.d(t,"\u0275listener",function(){return Do}),n.d(t,"\u0275text",function(){return Go}),n.d(t,"\u0275embeddedViewStart",function(){return ur}),n.d(t,"\u0275query",function(){return Nc}),n.d(t,"\u0275registerContentQuery",function(){return Vr}),n.d(t,"\u0275projection",function(){return dr}),n.d(t,"\u0275bind",function(){return wr}),n.d(t,"\u0275interpolation1",function(){return Sr}),n.d(t,"\u0275interpolation2",function(){return Er}),n.d(t,"\u0275interpolation3",function(){return Ir}),n.d(t,"\u0275interpolation4",function(){return Or}),n.d(t,"\u0275interpolation5",function(){return Tr}),n.d(t,"\u0275interpolation6",function(){return Dr}),n.d(t,"\u0275interpolation7",function(){return kr}),n.d(t,"\u0275interpolation8",function(){return Rr}),n.d(t,"\u0275interpolationV",function(){return xr}),n.d(t,"\u0275pipeBind1",function(){return ac}),n.d(t,"\u0275pipeBind2",function(){return sc}),n.d(t,"\u0275pipeBind3",function(){return cc}),n.d(t,"\u0275pipeBind4",function(){return dc}),n.d(t,"\u0275pipeBindV",function(){return pc}),n.d(t,"\u0275pureFunction0",function(){return Qs}),n.d(t,"\u0275pureFunction1",function(){return Xs}),n.d(t,"\u0275pureFunction2",function(){return Js}),n.d(t,"\u0275pureFunction3",function(){return ec}),n.d(t,"\u0275pureFunction4",function(){return tc}),n.d(t,"\u0275pureFunction5",function(){return nc}),n.d(t,"\u0275pureFunction6",function(){return lc}),n.d(t,"\u0275pureFunction7",function(){return ic}),n.d(t,"\u0275pureFunction8",function(){return oc}),n.d(t,"\u0275pureFunctionV",function(){return rc}),n.d(t,"\u0275getCurrentView",function(){return Br}),n.d(t,"\u0275getHostElement",function(){return tl}),n.d(t,"\u0275restoreView",function(){return Xt}),n.d(t,"\u0275containerRefreshStart",function(){return or}),n.d(t,"\u0275containerRefreshEnd",function(){return rr}),n.d(t,"\u0275queryRefresh",function(){return Lc}),n.d(t,"\u0275loadQueryList",function(){return Lr}),n.d(t,"\u0275elementEnd",function(){return ko}),n.d(t,"\u0275elementProperty",function(){return Mo}),n.d(t,"\u0275componentHostSyntheticProperty",function(){return No}),n.d(t,"\u0275projectionDef",function(){return sr}),n.d(t,"\u0275reference",function(){return Nr}),n.d(t,"\u0275enableBindings",function(){return Yt}),n.d(t,"\u0275disableBindings",function(){return Zt}),n.d(t,"\u0275allocHostVars",function(){return _r}),n.d(t,"\u0275elementAttribute",function(){return Ro}),n.d(t,"\u0275elementContainerStart",function(){return Co}),n.d(t,"\u0275elementContainerEnd",function(){return wo}),n.d(t,"\u0275elementStyling",function(){return jo}),n.d(t,"\u0275elementHostAttrs",function(){return Ho}),n.d(t,"\u0275elementStylingMap",function(){return $o}),n.d(t,"\u0275elementStyleProp",function(){return zo}),n.d(t,"\u0275elementStylingApply",function(){return Bo}),n.d(t,"\u0275elementClassProp",function(){return Uo}),n.d(t,"\u0275textBinding",function(){return Wo}),n.d(t,"\u0275template",function(){return nr}),n.d(t,"\u0275embeddedViewEnd",function(){return ar}),n.d(t,"\u0275store",function(){return Mr}),n.d(t,"\u0275load",function(){return Ar}),n.d(t,"\u0275pipe",function(){return uc}),n.d(t,"\u0275whenRendered",function(){return tu}),n.d(t,"\u0275i18n",function(){return Ps}),n.d(t,"\u0275i18nAttributes",function(){return Fs}),n.d(t,"\u0275i18nExp",function(){return Hs}),n.d(t,"\u0275i18nStart",function(){return ks}),n.d(t,"\u0275i18nEnd",function(){return Ns}),n.d(t,"\u0275i18nApply",function(){return Bs}),n.d(t,"\u0275i18nPostprocess",function(){return Ms}),n.d(t,"\u0275setClassMetadata",function(){return Zs}),n.d(t,"\u0275compileComponent",function(){return Ld}),n.d(t,"\u0275compileDirective",function(){return Ad}),n.d(t,"\u0275compileNgModule",function(){return Ed}),n.d(t,"\u0275compileNgModuleDefs",function(){return Id}),n.d(t,"\u0275patchComponentDefWithScope",function(){return Dd}),n.d(t,"\u0275resetCompiledComponents",function(){return Od}),n.d(t,"\u0275compilePipe",function(){return Bd}),n.d(t,"\u0275sanitizeHtml",function(){return qc}),n.d(t,"\u0275sanitizeStyle",function(){return Kc}),n.d(t,"\u0275defaultStyleSanitizer",function(){return Xc}),n.d(t,"\u0275sanitizeScript",function(){return Qc}),n.d(t,"\u0275sanitizeUrl",function(){return Yc}),n.d(t,"\u0275sanitizeResourceUrl",function(){return Zc}),n.d(t,"\u0275bypassSanitizationTrustHtml",function(){return Vc}),n.d(t,"\u0275bypassSanitizationTrustStyle",function(){return jc}),n.d(t,"\u0275bypassSanitizationTrustScript",function(){return Hc}),n.d(t,"\u0275bypassSanitizationTrustUrl",function(){return Bc}),n.d(t,"\u0275bypassSanitizationTrustResourceUrl",function(){return zc}),n.d(t,"\u0275getLContext",function(){return jn}),n.d(t,"\u0275bindPlayerFactory",function(){return li}),n.d(t,"\u0275addPlayer",function(){return $r}),n.d(t,"\u0275getPlayers",function(){return Gr}),n.d(t,"\u0275compileNgModuleFactory__POST_R3__",function(){return zh}),n.d(t,"\u0275SWITCH_COMPILE_COMPONENT__POST_R3__",function(){return Zd}),n.d(t,"\u0275SWITCH_COMPILE_DIRECTIVE__POST_R3__",function(){return Qd}),n.d(t,"\u0275SWITCH_COMPILE_PIPE__POST_R3__",function(){return Xd}),n.d(t,"\u0275SWITCH_COMPILE_NGMODULE__POST_R3__",function(){return ap}),n.d(t,"\u0275getDebugNode__POST_R3__",function(){return Sf}),n.d(t,"\u0275SWITCH_COMPILE_INJECTABLE__POST_R3__",function(){return mp}),n.d(t,"\u0275SWITCH_IVY_ENABLED__POST_R3__",function(){return eg}),n.d(t,"\u0275SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__",function(){return cf}),n.d(t,"\u0275Compiler_compileModuleSync__POST_R3__",function(){return ah}),n.d(t,"\u0275Compiler_compileModuleAsync__POST_R3__",function(){return ch}),n.d(t,"\u0275Compiler_compileModuleAndAllComponentsSync__POST_R3__",function(){return ph}),n.d(t,"\u0275Compiler_compileModuleAndAllComponentsAsync__POST_R3__",function(){return fh}),n.d(t,"\u0275SWITCH_ELEMENT_REF_FACTORY__POST_R3__",function(){return ga}),n.d(t,"\u0275SWITCH_TEMPLATE_REF_FACTORY__POST_R3__",function(){return vc}),n.d(t,"\u0275SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__",function(){return uf}),n.d(t,"\u0275SWITCH_RENDERER2_FACTORY__POST_R3__",function(){return Sa}),n.d(t,"\u0275getModuleFactory__POST_R3__",function(){return rd}),n.d(t,"\u0275publishGlobalUtil",function(){return Yr}),n.d(t,"\u0275publishDefaultGlobalUtils",function(){return Kr}),n.d(t,"\u0275SWITCH_INJECTOR_FACTORY__POST_R3__",function(){return gu}),n.d(t,"\u0275registerModuleFactory",function(){return ld}),n.d(t,"\u0275EMPTY_ARRAY",function(){return Qg}),n.d(t,"\u0275EMPTY_MAP",function(){return Xg}),n.d(t,"\u0275and",function(){return Jg}),n.d(t,"\u0275ccf",function(){return bm}),n.d(t,"\u0275cmf",function(){return ky}),n.d(t,"\u0275crt",function(){return Cg}),n.d(t,"\u0275did",function(){return $m}),n.d(t,"\u0275eld",function(){return em}),n.d(t,"\u0275elementEventFullName",function(){return Rg}),n.d(t,"\u0275getComponentViewDefinitionFactory",function(){return Cm}),n.d(t,"\u0275inlineInterpolate",function(){return Yg}),n.d(t,"\u0275interpolate",function(){return Kg}),n.d(t,"\u0275mod",function(){return cm}),n.d(t,"\u0275mpd",function(){return sm}),n.d(t,"\u0275ncd",function(){return pv}),n.d(t,"\u0275nov",function(){return Rm}),n.d(t,"\u0275pid",function(){return Gm}),n.d(t,"\u0275prd",function(){return Wm}),n.d(t,"\u0275pad",function(){return gv}),n.d(t,"\u0275pod",function(){return mv}),n.d(t,"\u0275ppd",function(){return fv}),n.d(t,"\u0275qud",function(){return uv}),n.d(t,"\u0275ted",function(){return yv}),n.d(t,"\u0275unv",function(){return vg}),n.d(t,"\u0275vid",function(){return wv});var l=n("mrSG"),i=n("pugT"),o=n("K9Ia"),r=n("6blF"),u=n("p0ib"),a=n("S1nX");function s(e){for(var t in e)if(e[t]===s)return t;throw Error("Could not find renamed property on target object.")}function c(e,t){for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}var d=s({ngComponentDef:s}),p=s({ngDirectiveDef:s}),h=s({ngInjectableDef:s}),f=s({ngInjectorDef:s}),g=s({ngPipeDef:s}),m=s({ngModuleDef:s}),v=s({ngBaseDef:s}),y=s({__NG_ELEMENT_ID__:s});function b(e){return{providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function C(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function w(e){return e&&e.hasOwnProperty(h)?e[h]:null}function _(e){return e&&e.hasOwnProperty(f)?e[f]:null}var x=function(){function e(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==t?b({providedIn:t.providedIn||"root",factory:t.factory}):void 0}return e.prototype.toString=function(){return"InjectionToken "+this._desc},e}(),S="__annotations__",E="__parameters__",I="__prop__metadata__";function O(e,t,n,i,o){var r=T(t);function u(){for(var e,t=[],n=0;n=Fe?n:n[Se]}function lt(e){return 0!=(4&e.flags)}function it(e){return 1==(1&e.flags)}function ot(e){return null!==e.template}function rt(e){return Array.isArray(e)&&e.length===ze}function ut(e){return 0!=(128&e[Ce])}function at(e){for(var t=Array.isArray(e)?e:dt(e);t&&!(128&t[Ce]);)t=t[we];return t}function st(e){return at(e)[Te]}function ct(e){return e[Ue]}function dt(e){var t=ct(e);return t?Array.isArray(t)?t:t.lView:null}function pt(e){return e!==qe}function ht(e){return 32767&e}function ft(e){return e>>16}function gt(e,t){for(var n=ft(e),l=t;n>0;)l=l[Pe],n--;return l}var mt=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(U);function vt(e,t){for(var n=0;n0;)t=t[Pe],e--;return t}(e,rn))[Te]}function yn(e){var t=Wt[be];on(Wt)?Wt[Ce]&=-2:(Bt(Wt,t.viewHooks,t.viewCheckHooks,un),Wt[Ce]&=-11,Wt[Ce]|=32,Wt[Ie]=t.bindingStartIndex),mn(e,null)}var bn=!0;function Cn(e){var t=bn;return bn=e,t}var wn=255,_n=0;function xn(e,t){var n=En(e,t);if(-1!==n)return n;var l=t[be];l.firstTemplatePass&&(e.injectorIndex=t.length,Sn(l.data,e),Sn(t,null),Sn(l.blueprint,null));var i=In(e,t),o=ht(i),r=gt(i,t),u=e.injectorIndex;if(pt(i))for(var a=r[be].data,s=0;s<8;s++)t[u+s]=r[o+s]|a[o+s];return t[u+Ge]=i,u}function Sn(e,t){e.push(0,0,0,0,0,0,0,0,t)}function En(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null==t[e.injectorIndex+Ge]?-1:e.injectorIndex}function In(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=t[Ee],l=1;n&&-1===n.injectorIndex;)n=(t=t[Pe])?t[Ee]:null,l++;return n?n.injectorIndex|l<<16:-1}function On(e,t,n){!function(e,t,n){var l="string"!=typeof n?n[y]:n.charCodeAt(0)||0;null==l&&(l=n[y]=_n++);var i=l&wn,o=1<>16,c=i?u+s:e.directiveEnd,d=l?u:u+s;d=a&&p.type===n)return d}if(i){var h=r[a];if(h&&ot(h)&&h.type===n)return a}return null}function Nn(e,t,n,l){var i,o=t[n];if(null!=(i=o)&&"object"==typeof i&&Object.getPrototypeOf(i)==Ye){var r=o;if(r.resolving)throw new Error("Circular dep for "+Ze(e[n]));var u=Cn(r.canSeeViewProviders);r.resolving=!0;var a=void 0;r.injectImpl&&(a=kt(r.injectImpl));var s=Jt(),c=Qt();tn(l,t);try{o=t[n]=r.factory(null,e,t,l)}finally{r.injectImpl&&kt(a),Cn(u),r.resolving=!1,tn(s,c)}}return o}function Ln(e,t,n){var l=64&e,i=32&e;return!!((128&e?l?i?n[t+7]:n[t+6]:i?n[t+5]:n[t+4]:l?i?n[t+3]:n[t+2]:i?n[t+1]:n[t])&1<=0){var f;zn(f=Xe(l[h]),a=Hn(l,h,f)),n=a;break}}}return n||null}function Hn(e,t,n){return{lView:e,nodeIndex:t,native:n,component:void 0,directives:void 0,localRefs:void 0}}function Bn(e){var t,n=ct(e);if(Array.isArray(n)){var l=Gn(n,e);(i=Hn(n,l,(t=nt(l,n))[Se])).component=e,zn(e,i),zn(i.native,i)}else{var i;t=nt((i=n).nodeIndex,i.lView)}return t}function zn(e,t){e[Ue]=t}function Un(e,t){for(var n=e[be].firstChild;n;){if(et(n,e)===t)return n.index;n=$n(n)}return-1}function $n(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function Gn(e,t){var n=e[be].components;if(n)for(var l=0;l=0)&&null})}}return i.sort(ol),i}function ol(e,t){return e.name==t.name?0:e.name-1?t[we][n]:null}return t[we][e.parent.index]}function Tl(e,t){var n=Ol(e,t);return n?n[Be]:null}var Dl=[];function kl(e,t,n,l,i){for(var o=e[be].node,r=-1,u=e,a=o.child;a;){var s=null;if(3===a.type){Rl(t,n,l,et(a,u),i);var c=u[a.index];rt(c)&&Rl(t,n,l,c[He],i)}else if(0===a.type){var d=u[a.index];Rl(t,n,l,d[He],i),l&&(d[Be]=l),d[je].length&&(s=(u=d[je][0])[be].node,i=d[He])}else if(1===a.type){var p=yt(u),h=p[Ee].projection[a.projection];Dl[++r]=a,Dl[++r]=u,h&&(s=(u=p[we])[be].data[h.index])}else s=a.child;if(null===s)for(null===a.next&&2&a.flags&&(u=Dl[r--],a=Dl[r--]),s=a.next;!s;){if(null===(a=a.parent||u[be].node)||a===o)return null;0===a.type&&(i=(u=u[we])[a.index][He]),s=2===a.type&&u[_e]?(u=u[_e])[be].node:a.next}a=s}}function Rl(e,t,n,l,i){0===e?xl(t)?t.insertBefore(n,l,i):n.insertBefore(l,i,!0):1===e?xl(t)?t.removeChild(n,l):n.removeChild(l):2===e&&t.destroyNode(l)}function Ml(e,t){return xl(t)?t.createText(Ze(e)):t.createTextNode(Ze(e))}function Nl(e,t,n){var l=Tl(e[be].node,e);l&&kl(e,t?0:1,e[Re],l,n)}function Ll(e,t,n,l,i){var o=t[je];l>0&&(o[l-1][_e]=e),l-1&&(e[Le]=i,e[we]=n),e[xe]&&e[xe].insertView(l),e[Ce]|=16}function Al(e,t,n){var l=e[je],i=l[t];return t>0&&(l[t-1][_e]=i[_e]),l.splice(t,1),n||Nl(i,!1),i[xe]&&i[xe].removeView(),i[Le]=-1,i[we]=null,i[Ce]&=-17,i}function Pl(e,t,n){var l=e[je][n];Al(e,n,!!t.detached),Vl(l)}function Fl(e){var t=e[be].childIndex;return-1===t?null:e[t]}function Vl(e){var t=e[Re];xl(t)&&t.destroyNode&&kl(e,2,t,null),function(e){if(-1===e[be].childIndex)return Hl(e);for(var t=Fl(e);t;){var n=null;if(t.length>=Fe?t[be].childIndex>-1&&(n=Fl(t)):t[je].length&&(n=t[je][0]),null==n){for(;t&&!t[_e]&&t!==e;)Hl(t),t=jl(t,e);Hl(t||e),n=t&&t[_e]}t=n}}(e),e[Ce]|=64}function jl(e,t){var n;return e.length>=Fe&&(n=e[Ee])&&2===n.type?Ol(n,e):e[we]===t?null:e[we]}function Hl(e){if(e.length>=Fe){var t=e;!function(e){var t,n=e[be];null!=n&&null!=(t=n.destroyHooks)&&zt(e,t)}(t),(i=(l=t)[be]&&l[be].pipeDestroyHooks)&&zt(l,i),function(e){var t=e[be].cleanup;if(null!=t){for(var n=e[Oe],l=0;l=0?n[r]():n[-r].unsubscribe(),l+=2}else"number"==typeof t[l]?(0,n[t[l]])():t[l].call(n[t[l+1]]);e[Oe]=null}}(t);var n=t[Ee];n&&3===n.type&&xl(t[Re])&&t[Re].destroy()}var l,i}function Bl(e,t){if(zl(e,t)){if(ut(t))return $l(t[Re],et(e,t));var n=t[Ee],l=e.parent;return null!=l&&4===l.type&&(e=Wl(l)),null==e.parent&&2===n.type?Tl(n,t):El(e,t)}return null}function zl(e,t){var n,l=e,i=e.parent;return e.parent&&(4===e.parent.type?i=(l=Wl(e)).parent:5===e.parent.type&&(i=(l=Il(l)).parent)),null===i&&(i=t[Ee]),i&&2===i.type?null!=(n=Ol(i,t))&&null!=n[Be]:null==l.parent||!(3!==l.parent.type||1&l.parent.flags)}function Ul(e,t,n,l){xl(e)?e.insertBefore(t,n,l):t.insertBefore(n,l,!0)}function $l(e,t){return xl(e)?e.parentNode(t):t.parentNode}function Gl(e,t,n){if(void 0===e&&(e=null),null!==e&&zl(t,n)){var l=n[Re],i=El(t,n),o=t.parent||n[Ee];if(2===o.type){var r=Ol(o,n),u=r[je],a=u.indexOf(n);Ul(l,r[Be],e,ql(a,u,r[He]))}else 4===o.type?Ul(l,Bl(t,n),e,i):5===o.type?Ul(l,i,e,et(t.parent,n)):xl(l)?l.appendChild(i,e):i.appendChild(e);return!0}return!1}function Wl(e){for(;null!=e.parent&&4===e.parent.type;)e=e.parent;return e}function ql(e,t,n){if(e+1-1&&f>c?"":s[f+1],8&a&&(o=(l=g).length,u=(r=l.indexOf(i=m))+i.length,-1===r||r>0&&" "!==l[r-1]||u=9?t+0:t;n?e[l]|=1:e[l]&=-2}function _i(e,t){return 1==(1&e[t>=9?t+0:t])}function xi(e,t){return 2==(2&e[t>=9?t+0:t])}function Si(e,t){return 4==(4&e[t>=9?t+0:t])}function Ei(e,t,n){return 63&e|t<<6|n<<20}function Ii(e,t){var n=Oi(t);return(2&t?e[3]:e[2])[n]}function Oi(e){return e>>6&16383}function Ti(e){var t=e>>20&16383;return t>=9?t:-1}function Di(e){return Ti(e[0])}function ki(e,t,n){e[t+1]=n}function Ri(e,t,n){e[t+2]=n}function Mi(e,t,n){var l=e[8];if(t){if(!l||0===n)return!0}else if(!l)return!1;return l[n]!==t}function Ni(e,t,n){var l=e[8]||pi(e);return n>0?l[n]=t:(l.splice(n=l[0],0,t,null),l[0]+=2),n}function Li(e,t,n,l){var i=function(e,t){return n<<16|e}(l);e[t+3]=i}function Ai(e,t){return e[t+3]>>16&65535}function Pi(e,t){var n=Ai(e,t);if(n){var l=e[8];if(l)return l[n]}return null}function Fi(e,t,n){e[0===t?t:t+0]=n}function Vi(e,t){return e[0===t?t:t+0]}function ji(e,t){return e[t+2]}function Hi(e,t){return e[t+1]}function Bi(e){return 16&e[0]}function zi(e,t){wi(e,0,t)}function Ui(e,t){t?e[0]|=8:e[0]&=-9}function $i(e,t,n){for(var l=(n||0)+1;l=0&&Fi(e,s,Ei(c=Vi(e,s),Oi(c),n));var c,d=Ti(a);d>=0&&Fi(e,d,Ei(c=Vi(e,d),Oi(c),t)),Ri(e,t,ji(e,n)),ki(e,t,Hi(e,n)),Fi(e,t,Vi(e,n)),Li(e,t,Ai(e,n),0),Ri(e,n,l),ki(e,n,i),Fi(e,n,o),Li(e,n,r,0)}function Wi(e,t,n,l,i,o,r,u){var a=t0){var o=Oi(Vi(e,i));Fi(e,i,Ei((_i(e,i)?1:0)|(xi(e,i)?2:0)|(Si(e,i)?4:0),o,l))}}}(e)}function qi(e,t){return t?!!e:null!==e}function Ki(e,t,n,l){var i,o=l&&l(t)?4:0;return n?(o|=2,i=eo(e[3],t)):i=eo(e[2],t),Ei(o,i=i>0?i+1:0,0)}function Yi(e,t,n){return!(2&e)&&t&&n&&4&e?t.toString()!==n.toString():t!==n}var Zi=function(){function e(e,t,n){this._element=t,this._type=n,this._values={},this._dirty=!1,this._factory=e}return e.prototype.setValue=function(e,t){this._values[e]!==t&&(this._values[e]=t,this._dirty=!0)},e.prototype.buildPlayer=function(e,t){if(this._dirty){var n=this._factory.fn(this._element,this._type,this._values,t,e||null);return this._values={},this._dirty=!1,n}},e}();function Qi(e,t){return 65535&e[t+3]}function Xi(e,t){var n=Ji(e[1],t);return n>0?n/4:0}function Ji(e,t){for(var n=0;ni)for(var r=0===t,u=n.data,a=i;a=0)return-1;l=r/4,i[r+1]=o,i[r+3]=n||null}return l}(e,t,i);if(-1!==r){var u=e[4],a=u[1],s=u[0],c=4*s,d=9+c,p=d+4*a,h=p+c,f=u.length;u.push(l?l.length:0,n?n.length:0);var g=0,m=[];if(l&&l.length)for(var v=0;v=p,R=D>=(k?h:d),M=Vi(e,D),N=Oi(M),L=Ti(M);Fi(e,D,Ei(M,N,L+=k?R?4*m.length:0:4*T+4*(R?m.length:0)))}for(var A=0;A<4*m.length;A++)e.splice(h,0,null),e.splice(d,0,null),d++,p++,h+=2;for(var P=0;P<4*b.length;P++)e.splice(p,0,null),e.push(null),p++,h++;for(var F=e[3],V=e[2],j=0;j=m.length,B=H?j-m.length:j,z=H?b[B]:m[B],U=void 0,$=void 0;H?(U=h+4*(a+B),$=d+4*(a+B)):(U=p+4*(s+B),$=9+4*(s+B));var G=H?F:V,W=eo(G,z);-1===W?(W=G.length+1,G.push(z,!H&&null)):W+=1;var q=Ki(e,z,H,i||null);Fi(e,$,Ei(q,W,U)),ki(e,$,z),Ri(e,$,null),Li(e,$,0,r),Fi(e,U,Ei(q,W,$)),ki(e,U,z),Ri(e,U,null),Li(e,U,0,r)}u[1]=a+b.length,u[0]=s+m.length,Fi(e,0,Ei(0,0,p)|(o?16:0))}}}(i.stylingTemplate,l||null,e,t,n,hi(i))}function Ho(e,t){var n=Jt();n.stylingTemplate||(n.stylingTemplate=fi(t)),function(e,t,n){var l=e[1];if(-1==Ji(l,n)){l.push(n,-1,!1,null);for(var i=null,o=null,r=-1,u=0;u0&&fr(st(n),2)}function zo(e,t,n,l,i){var o=null;null!==n&&(o=l?Ze(n)+l:n),yi(ai(e+Fe,Qt()),t,o,!1,i)}function Uo(e,t,n,l){var i=n instanceof ii?n:!!n;yi(ai(e+Fe,Qt()),t,i,!0,l)}function $o(e,t,n,l){if(null!=l)return function(e,t,n,l){throw new Error("unimplemented. Should not be needed by ViewEngine compatibility")}();var i=Qt(),o=tt(e,i),r=ai(e+Fe,i);if(hi(o)&&t!==fl){var u=lo(r);Fo(i,o.inputs.class,(u.length?u+" ":"")+t)}else!function(e,t,n,l){n=n||null;var i=Xi(e,null),o=e[5],r=t instanceof ii?new Zi(t,o,1):null,u=n instanceof ii?new Zi(n,o,2):null,a=r?t.value:t,s=u?n.value:n,c=Bi(e)||a===fl||a===e[6],d=s===fl||s===e[7];if(!c||!d){e[6]=a,e[7]=s;var p=oe,h=!1,f=!1,g=r?1:0;Mi(e,r,1)&&(Ni(e,r,1),f=!0);var m=u?3:0;Mi(e,u,3)&&(Ni(e,u,3),f=!0),c||("string"==typeof a?(p=a.split(/\s+/),h=!0):p=a?Object.keys(a):oe);for(var v=a||ie,y=s?Object.keys(s):oe,b=s||ie,C=y.length,w=!1,_=Di(e),x=0,S=y.length+p.length;_=C)&&!d||P&&!c){var E=P?x-C:x,I=P?p[E]:y[E],O=P?!!h||v[I]:b[I],T=P?g:m;if((F=Hi(e,_))===I){var D=ji(e,_),k=Vi(e,_);if(Li(e,_,T,i),Yi(k,D,O)){Ri(e,_,O),f=f||!!T;var R=Ii(e,k);(null!=D||Yi(k,R,O))&&(wi(e,_,!0),w=!0)}}else{var M=$i(e,I,_);if(M>0){var N=ji(e,M),L=Vi(e,M);Gi(e,_,M),Yi(L,N,O)&&(R=Ii(e,L),Ri(e,_,O),(null!=N||Yi(L,R,O))&&(wi(e,_,!0),f=f||!!T,w=!0))}else f=f||!!T,Wi(e,_,P,I,Ki(e,I,P,to(e,i)),O,i,T),w=!0}}_+=4,x++}for(;_=C)&&!d||P&&!c){E=P?x-C:x;var F=P?p[E]:y[E],V=(D=P?!!h||v[F]:b[F],k=1|Ki(e,F,P,A),T=P?g:m,e.length);e.push(k,F,D,0),Li(e,V,T,i),w=!0}x++}w&&(zi(e,!0),no(e,i,!0)),f&&Ui(e,!0)}}(r,t,n)}function Go(e,t){var n=Qt(),l=Ml(t,n[Re]),i=uo(e,3,l,null,null);ln(!1),Gl(l,i,n)}function Wo(e,t){if(t!==fl){var n=Qt(),l=Je(e,n),i=n[Re];xl(i)?i.setValue(l,Ze(t)):l.textContent=Ze(t)}}function qo(e,t,n){var l=-(t.index-Fe),i=e.data.length-(65535&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(l,i,n)}function Ko(e,t,n,l){var i=Jt();Yo(e,i,t,n),i&&i.attrs&&function(e,t,l,o){var r=i.initialInputs;(void 0===r||e>=r.length)&&(r=function(e,t,n){var l=n.initialInputs||(n.initialInputs=[]);l[e]=null;for(var i=n.attrs,o=0;o=o.length||null==o[e])&&(o[e]=Io(e,null,t,n,i.directiveRegistry,i.pipeRegistry,null)),o[e]}(e,t,n,o),null,4),r[xe]&&(u[xe]=r[xe].createView()),ao(e,u),mn(u,u[be].node)),r&&(on(u)&&Ll(u,r,l,r[Ve],-1),r[Ve]++),on(u)?3:2}function ar(){var e=Qt(),t=e[Ee];on(e)&&(oo(e),e[Ce]&=-2),oo(e),yn(e[we]),en(t),ln(!1)}function sr(e,t){var n=yt(Qt())[Ee];if(!n.projection)for(var l=n.projection=new Array(e?e.length+1:1).fill(null),i=l.slice(),o=n.child;null!==o;){var r=e?ni(o,e,t):0,u=o.next;i[r]?i[r].next=o:(l[r]=o,o.next=null),i[r]=o,o=u}}var cr=[];function dr(e,t,n){void 0===t&&(t=0);var l=Qt(),i=uo(e,1,null,null,n||null);null===i.projection&&(i.projection=t),ln(!1);for(var o=yt(l),r=o[Ee].projection[t],u=o[we],a=-1;r;){if(1===r.type){var s=yt(u),c=s[Ee].projection[r.projection];if(c){cr[++a]=r,cr[++a]=u,r=c,u=s[we];continue}}else r.flags|=2,Yl(r,i,l,u);null===r.next&&u!==o[we]&&(u=cr[a--],r=cr[a--]),r=r.next}}function pr(e,t,n){var l=e[be],i=dn();return e[Ne]?e[Ne][_e]=n:i&&(l.childIndex=t),e[Ne]=n,n}function hr(e){for(;e&&!(128&e[Ce]);)e[Ce]|=8,e=e[we];e[Ce]|=8,fr(e[Te],1)}function fr(e,t){var n,l=0===e.flags;e.flags|=t,l&&e.clean==io&&(e.clean=new Promise(function(e){return n=e}),e.scheduler(function(){if(1&e.flags&&(e.flags&=-2,gr(e)),2&e.flags){e.flags&=-3;var t=e.playerHandler;t&&t.flushPlayers()}e.clean=io,n(null)}))}function gr(e){for(var t=0;t=2&&l[i-2]===t.hostBindings?l[i-1]=l[i-1]+n:l.push(t.hostBindings,n)}(n,qt,e),function(e,t,n){for(var l=0;l=l.data.length&&(l.data[i]=null),n[i]=t}function Nr(e){return Qe(rn,e)}function Lr(e){return Qt()[Ae][e]}function Ar(e){return Qe(Qt(),e)}function Pr(e,t){return void 0===t&&(t=Ot.Default),e=X(e),Dn(Jt(),Qt(),e,t)}function Fr(e){return Tn(Jt(),e)}function Vr(e,t){var n=Qt(),l=n[be],i=(n[Ae]||(n[Ae]=[])).push(e);if(dn()){var o=l.contentQueries||(l.contentQueries=[]);t!==(l.contentQueries.length?l.contentQueries[l.contentQueries.length-2]:-1)&&o.push(t,i-1)}}var jr=io;function Hr(e){return e?(void 0===e.inputs&&(e.inputs=Vo(e,0)),e.inputs):null}function Br(){return Qt()}function zr(e){return e[Oe]||(e[Oe]=[])}function Ur(e){return e[be].cleanup||(e[be].cleanup=[])}function $r(e,t){var n=jn(e);if(n){var l=n.native,i=n.lView,o=function(e,t){if(!(t=t||jn(l)))return null;var n=ai(t.nodeIndex,t.lView);return di(n)||pi(n)}(0,n),r=Zn(i);ci(o,r,l,t,0,e),fr(r,2)}}function Gr(e){var t=jn(e);if(!t)return[];var n=ai(t.nodeIndex,t.lView),l=n?di(n):null;return l?function(e){for(var t=[],n=e[0],l=2;l ");else if("object"==typeof t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];i.push(o+":"+("string"==typeof r?JSON.stringify(r):Y(r)))}l="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+l+"]: "+e.replace(xu,"\n ")}function Tu(e,t){return new Error(Ou(e,t))}var Du=new x("The presence of this token marks an injector as being the root injector."),ku={},Ru={},Mu=[],Nu=void 0;function Lu(){return void 0===Nu&&(Nu=new hu),Nu}function Au(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),t=t||Lu(),new Pu(e,n,t)}var Pu=function(){function e(e,t,n){var l=this;this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this.destroyed=!1;var i=[];Hu([e],function(e){return l.processInjectorType(e,[],i)}),t&&Hu(t,function(n){return l.processProvider(n,e,t)}),this.records.set(pu,ju(void 0,this)),this.isRootInjector=this.records.has(Du),this.injectorDefTypes.forEach(function(e){return l.get(e)})}return e.prototype.destroy=function(){this.assertNotDestroyed(),this.destroyed=!0;try{this.onDestroy.forEach(function(e){return e.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}},e.prototype.get=function(e,t,n){void 0===t&&(t=du),void 0===n&&(n=Ot.Default),this.assertNotDestroyed();var l,i=Dt(this);try{if(!(n&Ot.SkipSelf)){var o=this.records.get(e);if(void 0===o){var r=("function"==typeof(l=e)||"object"==typeof l&&l instanceof x)&&w(e);r&&this.injectableDefInScope(r)&&(o=ju(Fu(e),ku),this.records.set(e,o))}if(void 0!==o)return this.hydrate(e,o)}return(n&Ot.Self?Lu():this.parent).get(e,t)}finally{Dt(i)}},e.prototype.assertNotDestroyed=function(){if(this.destroyed)throw new Error("Injector has already been destroyed.")},e.prototype.processInjectorType=function(e,t,n){var l=this;if(e=X(e)){var i=_(e),o=null==i&&e.ngModule||void 0,r=void 0===o?e:o,u=-1!==n.indexOf(r),a=void 0!==o&&e.providers||Mu;if(void 0!==o&&(i=_(o)),null!=i){if(this.injectorDefTypes.add(r),this.records.set(r,ju(i.factory,ku)),null!=i.imports&&!u){n.push(r);try{Hu(i.imports,function(e){return l.processInjectorType(e,t,n)})}finally{}}var s=i.providers;if(null!=s&&!u){var c=e;Hu(s,function(e){return l.processProvider(e,c,s)})}var d=e.ngModule;Hu(a,function(e){return l.processProvider(e,d,a)})}}},e.prototype.processProvider=function(e,t,n){var l=zu(e=X(e))?e:X(e&&e.provide),i=function(e,t,n){var l=Vu(e,t,n);return Bu(e)?ju(void 0,e.useValue):ju(l,ku)}(e,t,n);if(zu(e)||!0!==e.multi){var o=this.records.get(l);if(o&&void 0!==o.multi)throw new Error("Mixed multi-provider for "+Y(l))}else{var r=this.records.get(l);if(r){if(void 0===r.multi)throw new Error("Mixed multi-provider for "+l+".")}else(r=ju(void 0,ku,!0)).factory=function(){return Lt(r.multi)},this.records.set(l,r);l=e,r.multi.push(e)}this.records.set(l,i)},e.prototype.hydrate=function(e,t){if(t.value===Ru)throw new Error("Cannot instantiate cyclic dependency! "+Y(e));var n;return t.value===ku&&(t.value=Ru,t.value=t.factory()),"object"==typeof t.value&&t.value&&"object"==typeof(n=t.value)&&null!=n&&n.ngOnDestroy&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(t.value),t.value},e.prototype.injectableDefInScope=function(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||"root"===e.providedIn&&this.isRootInjector:this.injectorDefTypes.has(e.providedIn))},e}();function Fu(e){var t=w(e);if(null===t){var n=_(e);if(null!==n)return n.factory;if(e instanceof x)throw new Error("Token "+Y(e)+" is missing an ngInjectableDef definition.");if(e instanceof Function){var l=e.length;if(l>0){var i=new Array(l).fill("?");throw new Error("Can't resolve all parameters for "+Y(e)+": ("+i.join(", ")+").")}return function(){return new e}}throw new Error("unreachable")}return t.factory}function Vu(e,t,n){var i,o=void 0;if(zu(e))return Fu(X(e));if(Bu(e))o=function(){return X(e.useValue)};else if((i=e)&&i.useExisting)o=function(){return Mt(X(e.useExisting))};else if(e&&e.useFactory)o=function(){return e.useFactory.apply(e,Object(l.__spread)(Lt(e.deps||[])))};else{var r=X(e&&(e.useClass||e.provide));if(!r){var u="";throw t&&n&&(u=" - only instances of Provider and Type are allowed, got: ["+n.map(function(t){return t==e?"?"+e+"?":"..."}).join(", ")+"]"),new Error("Invalid provider for the NgModule '"+Y(t)+"'"+u)}if(!e.deps)return Fu(r);o=function(){return new(r.bind.apply(r,Object(l.__spread)([void 0],Lt(e.deps))))}}return o}function ju(e,t,n){return void 0===n&&(n=!1),{factory:e,value:t,multi:n?[]:void 0}}function Hu(e,t){e.forEach(function(e){return Array.isArray(e)?Hu(e,t):t(e)})}function Bu(e){return e&&"object"==typeof e&&wu in e}function zu(e){return"function"==typeof e}function Uu(e,t,n,l,i){if(e=X(e),Array.isArray(e))for(var o=0;o>16;if(zu(e)||!e.multi){var h=new Ke(a,i,Pr),f=Gu(u,t,i?c:c+p,d);-1==f?(On(xn(s,r),r,u),t.push(u),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=65536),n.push(h),r.push(h)):(n[f]=h,r[f]=h)}else{var g=Gu(u,t,c+p,d),m=Gu(u,t,c,c+p),v=m>=0&&n[m];i&&!v||!i&&!(g>=0&&n[g])?(On(xn(s,r),r,u),h=function(e,t,n,l,i){var o=new Ke(e,n,Pr);return o.multi=[],o.index=t,o.componentProviders=0,$u(o,i,l&&!n),o}(i?qu:Wu,n.length,i,l,a),!i&&v&&(n[m].providerFactory=h),t.push(u),s.directiveStart++,s.directiveEnd++,i&&(s.providerIndexes+=65536),n.push(h),r.push(h)):$u(n[i?m:g],a,!i&&l),!i&&l&&v&&n[m].componentProviders++}}}function $u(e,t,n){e.multi.push(t),n&&e.componentProviders++}function Gu(e,t,n,l){for(var i=n;i-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}Vl(this._lView)},e.prototype.onDestroy=function(e){var t,n;n=e,zr(t=this._lView).push(n),t[be].firstTemplatePass&&Ur(t).push(t[Oe].length-1,null)},e.prototype.markForCheck=function(){hr(this._lView)},e.prototype.detach=function(){this._lView[Ce]&=-17},e.prototype.reattach=function(){this._lView[Ce]|=16},e.prototype.detectChanges=function(){vr(this._lView,this.context)},e.prototype.checkNoChanges=function(){!function(e){sn(!0);try{mr(e)}finally{sn(!1)}}(this.context)},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e.prototype.detachFromAppRef=function(){this._appRef=null},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype._lookUpContext=function(){return this._context=this._lView[we][this._componentIndex]},e}(),ca=function(e){function t(t){var n=e.call(this,t,null,-1)||this;return n._view=t,n}return Object(l.__extends)(t,e),t.prototype.detectChanges=function(){yr(this._view)},t.prototype.checkNoChanges=function(){!function(e){sn(!0);try{yr(e)}finally{sn(!1)}}(this._view)},Object.defineProperty(t.prototype,"context",{get:function(){return null},enumerable:!0,configurable:!0}),t}(sa);function da(e,t,n){return Ju||(Ju=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(l.__extends)(t,e),t}(e)),new Ju(et(t,n))}function pa(e,t,n,i){if(ea||(ea=function(e){function t(t,n,l,i,o,r){var u=e.call(this)||this;return u._declarationParentView=t,u.elementRef=n,u._tView=l,u._renderer=i,u._queries=o,u._injectorIndex=r,u}return Object(l.__extends)(t,e),t.prototype.createEmbeddedView=function(e,t,n,l,i){var o=function(e,t,n,l,i,o){var r=nn(),u=Jt();ln(!0),en(null);var a=ro(n,e,t,4);return a[Pe]=n,i&&(a[xe]=i.createView()),ao(-1,a),e.firstTemplatePass&&(e.node.injectorIndex=o),ln(r),en(u),a}(this._tView,e,this._declarationParentView,0,this._queries,this._injectorIndex);t&&Ll(o,t,l,i,n.index),co(o,this._tView,e);var r=new sa(o,e,-1);return r._tViewNode=o[Ee],r},t}(e)),0===n.type){var o=i[n.index];return new ea(i,da(t,n,i),n.tViews,Qt()[Re],o[xe],n.injectorIndex)}return null}function ha(e,t,n){if(it(e)){var l=e.directiveStart,i=nt(e.index,t);return new sa(i,n,l)}if(3===e.type){var o=yt(t);return new sa(o,o[Te],-1)}return null}var fa=function(){function e(e){this.nativeElement=e}return e.__NG_ELEMENT_ID__=function(){return ma(e)},e}(),ga=function(e){return da(e,Jt(),Qt())},ma=au,va=function(){return function(e,t,n,l,i,o){this.id=e,this.templateUrl=t,this.slotCount=n,this.encapsulation=l,this.styles=i,this.animations=o}}(),ya=function(){return function(){}}(),ba=function(){return function(){}}(),Ca=function(){return function(){}}(),wa=function(){return function(){}}(),_a=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}({}),xa=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return Ea()},e}(),Sa=function(){return function(e){var t=Qt()[Re];if(xl(t))return t;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}()},Ea=au,Ia=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({}),Oa=function(){return function(){}}(),Ta=function(){return function(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}(),Da=new Ta("7.2.14"),ka=function(e){function t(t){var n=e.call(this)||this;return n.ngModule=t,n}return Object(l.__extends)(t,e),t.prototype.resolveComponentFactory=function(e){var t=ge(e);return new Aa(t,this.ngModule)},t}(ia);function Ra(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var Ma=new x("ROOT_CONTEXT_TOKEN",{providedIn:"root",factory:function(){return Jr(Mt(Na))}}),Na=new x("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return mt}}),La={},Aa=function(e){function t(t,n){var l=e.call(this)||this;return l.componentDef=t,l.ngModule=n,l.componentType=t.type,l.selector=t.selectors[0][0],l.ngContentSelectors=[],l}return Object(l.__extends)(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){return Ra(this.componentDef.inputs)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){return Ra(this.componentDef.outputs)},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,l){var i=void 0===n,o=(l=l||this.ngModule)?function(e,t){return{get:function(n,l){var i=e.get(n,La);return i!==La||l===La?i:t.get(n,l)}}}(e,l.injector):e,r=o.get(wa,Sl),u=o.get(Oa,null),a=i?xo(this.selector,r.createRenderer(null,this.componentDef)):To(r,n),s=this.componentDef.onPush?136:132,c=i?Jr():o.get(Ma),d=r.createRenderer(a,this.componentDef);n&&a&&(xl(d)?d.setAttribute(a,"ng-version",Da.full):a.setAttribute("ng-version",Da.full));var p,h,f=ro(null,Io(-1,null,1,0,null,null,null),c,s,r,d,u,o),g=mn(f,null);try{r.begin&&r.begin();var m=Qr(a,this.componentDef,f,r,d);if(h=tt(0,f),t)for(var v=0,y=f[be],b=h.projection=[],C=0;C',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='

',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return e.prototype.getInertBodyElement_XHR=function(e){e=""+e+"";try{e=encodeURI(e)}catch(l){return null}var t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(void 0);var n=t.response.body;return n.removeChild(n.firstChild),n},e.prototype.getInertBodyElement_DOMParser=function(e){e=""+e+"";try{var t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(n){return null}},e.prototype.getInertBodyElement_InertDocument=function(e){var t=this.inertDocument.createElement("template");return"content"in t?(t.innerHTML=e,t):(this.inertBodyElement.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},e.prototype.stripCustomNsAttrs=function(e){for(var t=e.attributes,n=t.length-1;0"),!0},e.prototype.endElement=function(e){var t=e.nodeName.toLowerCase();Ja.hasOwnProperty(t)&&!Ya.hasOwnProperty(t)&&(this.buf.push(""))},e.prototype.chars=function(e){this.buf.push(us(e))},e.prototype.checkClobberedElement=function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t},e}(),os=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rs=/([^\#-~ |!])/g;function us(e){return e.replace(/&/g,"&").replace(os,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(rs,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function as(e,t){var n=null;try{Ka=Ka||new Ba(e);var l=t?String(t):"";n=Ka.getInertBodyElement(l);var i=5,o=l;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,l=o,o=n.innerHTML,n=Ka.getInertBodyElement(l)}while(l!==o);var r=new is,u=r.sanitizeChildren(ss(n)||n);return ja()&&r.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),u}finally{if(n)for(var a=ss(n)||n;a.firstChild;)a.removeChild(a.firstChild)}}function ss(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var cs={marker:"element"},ds={marker:"comment"},ps="\ufffd",hs=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,fs=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,gs=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,ms=/\ufffd(\d+):?\d*\ufffd/gi,vs=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,ys=/\[(\ufffd.+?\ufffd?)\]/g,bs=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,Cs=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g;function ws(e){if(!e)return[];var t,n=0,l=[],i=[],o=/[{}]/g;for(o.lastIndex=0;t=o.exec(e);){var r=t.index;if("}"==t[0]){if(l.pop(),0==l.length){var u=e.substring(n,r);hs.test(u)?i.push(_s(u)):u&&i.push(u),n=r+1}}else{if(0==l.length){var a=e.substring(n,r);i.push(a),n=r+1}l.push("{")}}var s=e.substring(n);return""!=s&&i.push(s),i}function _s(e){for(var t=[],n=[],l=1,i=0,o=ws(e=e.replace(hs,function(e,t,n){return l="select"===n?0:1,i=parseInt(t.substr(1),10),""})),r=0;r0&&r!==u&&c.push(r.index<<3|0);for(var d=[],p=[],h=function(e,t){if("number"!=typeof t)return xs(e);var n=e.indexOf(":"+t+ps)+2+t.toString().length,l=e.search(new RegExp(ps+"\\/\\*\\d+:"+t+ps));return xs(e.substring(n,l))}(n,l).split(gs),f=0;f>>17,d=void 0;r=Rs(o,d=c===e?l[Ee]:tt(c,l),r),d.next=null;break;case 0:var p=s>>>3;u.push(p),r=o,(o=tt(p,l))&&(en(o),3===o.type&&ln(!0));break;case 5:r=o=tt(s>>>3,l),en(o),ln(!1);break;case 4:Ro(s>>>3,t[++a],t[++a]);break;default:throw new Error('Unable to determine the type of mutate operation for "'+s+'"')}else switch(s){case ds:var h=t[++a],f=i.createComment(h);r=o,o=uo(n++,5,f,null,null),zn(f,l),o.activeCaseIndex=null,ln(!1);break;case cs:var g=t[++a];r=o,o=uo(n++,3,i.createElement(g),g,null);break;default:throw new Error('Unable to determine the type of mutate operation for "'+s+'"')}}return ln(!1),u}function As(e,t){var n=tt(e,t);Kl(n,Je(e,t)||null,t),n.detached=!0;var l=Ar(e);if(rt(l)){var i=l;0!==n.type&&Kl(n,i[He]||null,t),i[Be]=null}}function Ps(e,t,n){ks(e,t,n),Ns()}function Fs(e,t){var n=Qt()[be];n.firstTemplatePass&&null===n.data[e+Fe]&&function(e,t,n){for(var l=Jt().index-Fe,i=[],o=0;o>>2,g=void 0,m=void 0;switch(3&h){case 1:Ro(f,t[++p],d,t[++p]);break;case 0:Wo(f,d);break;case 2:if(g=n[t[++p]],null!==(m=tt(f,o)).activeCaseIndex)for(var v=g.remove[m.activeCaseIndex],y=0;y>>3,o);break;case 6:var C=tt(v[y+1]>>>3,o).activeCaseIndex;null!==C&&vt(n[b>>>3].remove[C],v)}}var w=Us(g,d);m.activeCaseIndex=-1!==w?w:null,Ls(-1,g.create[w],g.expandoStartIndex,o),u=!0;break;case 3:g=n[t[++p]],m=tt(f,o),e(g.update[m.activeCaseIndex],n,l,i,o,u)}}}a+=c}}(l,i,t[Ie]-js-1,Vs,t),Vs=0,js=0}}var zs=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({});function Us(e,t){var n=e.cases.indexOf(t);if(-1===n)switch(e.type){case 1:var l=function(e,n){switch(function(e,t){"string"==typeof t&&(t=parseInt(t,10));var n=t,l=n.toString().replace(/^[^.]*\.?/,""),i=Math.floor(Math.abs(n)),o=l.length,r=parseInt(l,10),u=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0;switch(e.split("-")[0].toLowerCase()){case"af":case"asa":case"az":case"bem":case"bez":case"bg":case"brx":case"ce":case"cgg":case"chr":case"ckb":case"ee":case"el":case"eo":case"es":case"eu":case"fo":case"fur":case"gsw":case"ha":case"haw":case"hu":case"jgo":case"jmc":case"ka":case"kk":case"kkj":case"kl":case"ks":case"ksb":case"ky":case"lb":case"lg":case"mas":case"mgo":case"ml":case"mn":case"nb":case"nd":case"ne":case"nn":case"nnh":case"nyn":case"om":case"or":case"os":case"ps":case"rm":case"rof":case"rwk":case"saq":case"seh":case"sn":case"so":case"sq":case"ta":case"te":case"teo":case"tk":case"tr":case"ug":case"uz":case"vo":case"vun":case"wae":case"xog":return 1===n?zs.One:zs.Other;case"ak":case"ln":case"mg":case"pa":case"ti":return n===Math.floor(n)&&n>=0&&n<=1?zs.One:zs.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===n?zs.One:zs.Other;case"ar":return 0===n?zs.Zero:1===n?zs.One:2===n?zs.Two:n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10?zs.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99?zs.Many:zs.Other;case"ast":case"ca":case"de":case"en":case"et":case"fi":case"fy":case"gl":case"it":case"nl":case"sv":case"sw":case"ur":case"yi":return 1===i&&0===o?zs.One:zs.Other;case"be":return n%10==1&&n%100!=11?zs.One:n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14)?zs.Few:n%10==0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14?zs.Many:zs.Other;case"br":return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?zs.One:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?zs.Two:n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10==9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99)?zs.Few:0!==n&&n%1e6==0?zs.Many:zs.Other;case"bs":case"hr":case"sr":return 0===o&&i%10==1&&i%100!=11||r%10==1&&r%100!=11?zs.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||r%10===Math.floor(r%10)&&r%10>=2&&r%10<=4&&!(r%100>=12&&r%100<=14)?zs.Few:zs.Other;case"cs":case"sk":return 1===i&&0===o?zs.One:i===Math.floor(i)&&i>=2&&i<=4&&0===o?zs.Few:0!==o?zs.Many:zs.Other;case"cy":return 0===n?zs.Zero:1===n?zs.One:2===n?zs.Two:3===n?zs.Few:6===n?zs.Many:zs.Other;case"da":return 1===n||0!==u&&(0===i||1===i)?zs.One:zs.Other;case"dsb":case"hsb":return 0===o&&i%100==1||r%100==1?zs.One:0===o&&i%100==2||r%100==2?zs.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||r%100===Math.floor(r%100)&&r%100>=3&&r%100<=4?zs.Few:zs.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?zs.One:zs.Other;case"fil":return 0===o&&(1===i||2===i||3===i)||0===o&&i%10!=4&&i%10!=6&&i%10!=9||0!==o&&r%10!=4&&r%10!=6&&r%10!=9?zs.One:zs.Other;case"ga":return 1===n?zs.One:2===n?zs.Two:n===Math.floor(n)&&n>=3&&n<=6?zs.Few:n===Math.floor(n)&&n>=7&&n<=10?zs.Many:zs.Other;case"gd":return 1===n||11===n?zs.One:2===n||12===n?zs.Two:n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19)?zs.Few:zs.Other;case"gv":return 0===o&&i%10==1?zs.One:0===o&&i%10==2?zs.Two:0!==o||i%100!=0&&i%100!=20&&i%100!=40&&i%100!=60&&i%100!=80?0!==o?zs.Many:zs.Other:zs.Few;case"he":return 1===i&&0===o?zs.One:2===i&&0===o?zs.Two:0!==o||n>=0&&n<=10||n%10!=0?zs.Other:zs.Many;case"is":return 0===u&&i%10==1&&i%100!=11||0!==u?zs.One:zs.Other;case"ksh":return 0===n?zs.Zero:1===n?zs.One:zs.Other;case"kw":case"naq":case"se":case"smn":return 1===n?zs.One:2===n?zs.Two:zs.Other;case"lag":return 0===n?zs.Zero:0!==i&&1!==i||0===n?zs.Other:zs.One;case"lt":return n%10!=1||n%100>=11&&n%100<=19?n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19)?zs.Few:0!==r?zs.Many:zs.Other:zs.One;case"lv":case"prg":return n%10==0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||2===o&&r%100===Math.floor(r%100)&&r%100>=11&&r%100<=19?zs.Zero:n%10==1&&n%100!=11||2===o&&r%10==1&&r%100!=11||2!==o&&r%10==1?zs.One:zs.Other;case"mk":return 0===o&&i%10==1||r%10==1?zs.One:zs.Other;case"mt":return 1===n?zs.One:0===n||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10?zs.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?zs.Many:zs.Other;case"pl":return 1===i&&0===o?zs.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?zs.Few:0===o&&1!==i&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14?zs.Many:zs.Other;case"pt":return n===Math.floor(n)&&n>=0&&n<=2&&2!==n?zs.One:zs.Other;case"ro":return 1===i&&0===o?zs.One:0!==o||0===n||1!==n&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19?zs.Few:zs.Other;case"ru":case"uk":return 0===o&&i%10==1&&i%100!=11?zs.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?zs.Few:0===o&&i%10==0||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14?zs.Many:zs.Other;case"shi":return 0===i||1===n?zs.One:n===Math.floor(n)&&n>=2&&n<=10?zs.Few:zs.Other;case"si":return 0===n||1===n||0===i&&1===r?zs.One:zs.Other;case"sl":return 0===o&&i%100==1?zs.One:0===o&&i%100==2?zs.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==o?zs.Few:zs.Other;case"tzm":return n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99?zs.One:zs.Other;default:return zs.Other}}("en-US",t)){case zs.Zero:return"zero";case zs.One:return"one";case zs.Two:return"two";case zs.Few:return"few";case zs.Many:return"many";default:return"other"}}();-1===(n=e.cases.indexOf(l))&&"other"!==l&&(n=e.cases.indexOf("other"));break;case 0:n=e.cases.indexOf("other")}return n}function $s(e,t,n,i){for(var o=[],r=[],u=[],a=[],s=[],c=0;c=0;n--){var l=t[n];if(e===l.name)return l}throw new Error("The pipe '"+e+"' could not be found!")}(t,l.pipeRegistry),l.data[i]=n,n.onDestroy&&(l.pipeDestroyHooks||(l.pipeDestroyHooks=[])).push(i,n.onDestroy)):n=l.data[i];var o=n.factory(null);return Mr(e,o),o}function ac(e,t,n){var l=Ar(e);return fc(hc(e)?Xs(t,l.transform,n,l):l.transform(n))}function sc(e,t,n,l){var i=Ar(e);return fc(hc(e)?Js(t,i.transform,n,l,i):i.transform(n,l))}function cc(e,t,n,l,i){var o=Ar(e);return fc(hc(e)?ec(t,o.transform,n,l,i,o):o.transform(n,l,i))}function dc(e,t,n,l,i,o){var r=Ar(e);return fc(hc(e)?tc(t,r.transform,n,l,i,o,r):r.transform(n,l,i,o))}function pc(e,t,n){var l=Ar(e);return fc(hc(e)?rc(t,l.transform,n,l):l.transform.apply(l,n))}function hc(e){return Qt()[be].data[e+Fe].pure}function fc(e){return sl.isWrapped(e)&&(e=sl.unwrap(e),Qt()[fn()]=fl),e}var gc=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this)||this;return n.__isAsync=t,n}return Object(l.__extends)(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,n,l){var o,r=function(e){return null},u=function(){return null};t&&"object"==typeof t?(o=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(r=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(u=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(o=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},n&&(r=this.__isAsync?function(e){setTimeout(function(){return n(e)})}:function(e){n(e)}),l&&(u=this.__isAsync?function(){setTimeout(function(){return l()})}:function(){l()}));var a=e.prototype.subscribe.call(this,o,r,u);return t instanceof i.a&&t.add(a),a},t}(o.a),mc=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return yc(e,fa)},e}(),vc=function(e,t){return pa(e,t,Jt(),Qt())},yc=au,bc=function(){function e(e,t,n){this.parent=e,this.shallow=t,this.deep=n}return e.prototype.track=function(e,t,n,l){n?this.deep=Rc(this.deep,e,t,null!=l?l:null):this.shallow=Rc(this.shallow,e,t,null!=l?l:null)},e.prototype.clone=function(){return new e(this,null,this.deep)},e.prototype.container=function(){var t=Cc(this.shallow),n=Cc(this.deep);return t||n?new e(this,t,n):null},e.prototype.createView=function(){var t=wc(this.shallow),n=wc(this.deep);return t||n?new e(this,t,n):null},e.prototype.insertView=function(e){_c(e,this.shallow),_c(e,this.deep)},e.prototype.addNode=function(e){return Tc(this.deep,e),lt(e)?(Tc(this.shallow,e),e.parent&<(e.parent)&&Tc(this.parent.shallow,e),this.parent):(function(e){return null===e.parent||lt(e.parent)}(e)&&Tc(this.shallow,e),this)},e.prototype.removeView=function(){xc(this.shallow),xc(this.deep)},e}();function Cc(e){for(var t=null;e;){var n=[];e.values.push(n),t={next:t,list:e.list,predicate:e.predicate,values:n,containerValues:null},e=e.next}return t}function wc(e){for(var t=null;e;)t={next:t,list:e.list,predicate:e.predicate,values:[],containerValues:e.values},e=e.next;return t}function _c(e,t){for(;t;)t.containerValues.splice(e,0,t.values),t=t.next}function xc(e){for(;e;){var t=e.containerValues,n=t.indexOf(e.values);t.splice(n,1)[0].length&&e.list.setDirty(),e=e.next}}function Sc(e,t){var n=e.localNames;if(n)for(var l=0;l-1?Nn(t[be].data,t,l,e):function(e,t){return 3===e.type||4===e.type?da(fa,e,t):0===e.type?pa(mc,fa,e,t):null}(e,t)}function Tc(e,t){for(var n=Qt();e;){var l=e.predicate,i=l.type;if(i){var o=null;i===mc?o=Ic(i,t,n,l.read):null!==(a=Mn(t,n,i,!1,!1))&&(o=Oc(t,n,l.read,a)),null!==o&&Dc(e,o)}else for(var r=l.selector,u=0;u0?(e=l.concat(e.slice(n+1)),n=0):n++:(t.push(l),n++)}return t}(e),this.dirty=!1},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}();function Nc(e,t,n,l){var i,o,r,u=new Mc;return(i=bc,o=Qt(),r=o[xe],$t&&$t!==o[Ee]&&!lt($t)&&(r&&(r=o[xe]=r.clone()),$t.flags|=4),r||(o[xe]=new i(null,null,null))).track(u,t,n,l),function(e,t,n){var l=zr(e);l.push(t),e[be].firstTemplatePass&&Ur(e).push(n,l.length-1)}(Qt(),u,u.destroy),null!=e&&Mr(e,u),u}function Lc(e){return!!e.dirty&&(e.reset(e._valuesTree),e.notifyOnChanges(),!0)}function Ac(e,t){return pa(mc,fa,e,t)}var Pc="__SANITIZER_TRUSTED_BRAND__";function Fc(e,t){return e instanceof String&&e[Pc]===t}function Vc(e){return Uc(e,"Html")}function jc(e){return Uc(e,"Style")}function Hc(e){return Uc(e,"Script")}function Bc(e){return Uc(e,"Url")}function zc(e){return Uc(e,"ResourceUrl")}function Uc(e,t){var n=new String(e);return n[Pc]=t,n}var $c=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"),Gc=/^url\(([^)]+)\)$/;function Wc(e){if(!(e=String(e).trim()))return"";var t=e.match(Gc);return t&&$a(t[1])===t[1]||e.match($c)&&function(e){for(var t=!0,n=!0,l=0;l=0;e--){var t=_d[e],n=t.moduleType,l=t.ngModule;l.declarations&&l.declarations.every(Sd)&&(_d.splice(e,1),Td(n,l))}}finally{xd=!1}}}(),void 0!==e.ngSelectorScope){var u=kd(e.ngSelectorScope);Dd(n,u)}}return n},configurable:!1})}function Ad(e,t){var n=null;Object.defineProperty(e,p,{get:function(){if(null===n){var l=Fd(e,t);n=bt().compileDirective(ed,"ng://"+(e&&e.name)+"/ngDirectiveDef.js",l)}return n},configurable:!1})}function Pd(e){return Object.getPrototypeOf(e.prototype)===Object.prototype}function Fd(e,t){var n=yd().propMetadata(e);return{name:e.name,type:e,typeArgumentCount:0,selector:t.selector,deps:bd(e),host:t.host||ie,propMetadata:n,inputs:t.inputs||oe,outputs:t.outputs||oe,queries:Vd(e,n,jd),lifecycle:{usesOnChanges:void 0!==e.prototype.ngOnChanges},typeSourceSpan:null,usesInheritance:!Pd(e),exportAs:t.exportAs||null,providers:t.providers||null}}function Vd(e,t,n){var l=[],i=function(i){t.hasOwnProperty(i)&&t[i].forEach(function(t){if(n(t)){if(!t.selector)throw new Error("Can't construct a query for the property \""+i+'" of "'+Ze(e)+"\" since the query selector wasn't defined.");l.push(function(e,t){return{propertyName:i,predicate:(n=t.selector,"string"==typeof n?n.split(",").map(function(e){return e.trim()}):X(n)),descendants:t.descendants,first:t.first,read:t.read?t.read:null};var n}(0,t))}})};for(var o in t)i(o);return l}function jd(e){var t=e.ngMetadataName;return"ContentChild"===t||"ContentChildren"===t}function Hd(e){var t=e.ngMetadataName;return"ViewChild"===t||"ViewChildren"===t}function Bd(e,t){var n=null;Object.defineProperty(e,g,{get:function(){return null===n&&(n=bt().compilePipe(ed,"ng://"+Ze(e)+"/ngPipeDef.js",{type:e,name:e.name,deps:bd(e),pipeName:t.name,pure:void 0===t.pure||t.pure})),n},configurable:!1})}var zd=O("Directive",function(e){return void 0===e&&(e={}),e},void 0,void 0,function(e,t){return ep(e,t)}),Ud=O("Component",function(e){return void 0===e&&(e={}),Object(l.__assign)({changeDetection:V.Default},e)},zd,void 0,function(e,t){return Jd(e,t)}),$d=O("Pipe",function(e){return Object(l.__assign)({pure:!0},e)},void 0,void 0,function(e,t){return tp(e,t)}),Gd=function(e){return function(t,n){for(var l=[],i=2;i1?" ("+function(e){for(var t=[],n=0;n-1)return t.push(e[n]),t;t.push(e[n])}return t}(e.slice().reverse()).map(function(e){return Y(e.token)}).join(" -> ")+")":""}function Ip(e,t,n,l){var i=[t],o=n(i),r=l?function(e,t){var n=o+" caused by: "+(t instanceof Error?t.message:t),l=Error(n);return l[bp]=t,l}(0,l):Error(o);return r.addKey=Op,r.keys=i,r.injectors=[e],r.constructResolvingMessage=n,r[bp]=l,r}function Op(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)}function Tp(e,t){for(var n=[],l=0,i=t.length;l=this._providers.length)throw function(e){return Error("Index "+e+" is out-of-bounds.")}(e);return this._providers[e]},e.prototype._new=function(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw Ip(this,e.key,function(e){return"Cannot instantiate cyclic dependency!"+Ep(e)});return this._instantiateProvider(e)},e.prototype._getMaxNumberOfObjects=function(){return this.objs.length},e.prototype._instantiateProvider=function(e){if(e.multiProvider){for(var t=new Array(e.resolvedFactories.length),n=0;n0&&(i=setTimeout(function(){l._callbacks=l._callbacks.filter(function(e){return e.timeoutId!==i}),e(l._didWork,l.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})},e.prototype.whenStable=function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.findProviders=function(e,t,n){return[]},e}(),Vh=function(){function e(){this._applications=new Map,Bh.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.unregisterApplication=function(e){this._applications.delete(e)},e.prototype.unregisterAllApplications=function(){this._applications.clear()},e.prototype.getTestability=function(e){return this._applications.get(e)||null},e.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},e.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),Bh.findTestabilityInTree(this,e,t)},Object(l.__decorate)([Object(l.__metadata)("design:paramtypes",[])],e)}();function jh(e){Bh=e}var Hh,Bh=new(function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e}());function zh(e,t,n){return Promise.resolve(new Ys(n))}var Uh=new x("AllowMultipleToken"),$h=function(){return function(e,t){this.name=e,this.token=t}}();function Gh(e){if(Hh&&!Hh.destroyed&&!Hh.injector.get(Uh,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Hh=e.get(Zh);var t=e.get(Jp,null);return t&&t.forEach(function(e){return e()}),Hh}function Wh(e,t,n){void 0===n&&(n=[]);var l="Platform: "+t,i=new x(l);return function(t){void 0===t&&(t=[]);var o=Yh();if(!o||o.injector.get(Uh,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var r=n.concat(t).concat({provide:i,useValue:!0});Gh(fu.create({providers:r,name:l}))}return qh(i)}}function qh(e){var t=Yh();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}function Kh(){Hh&&!Hh.destroyed&&Hh.destroy()}function Yh(){return Hh&&!Hh.destroyed?Hh:null}var Zh=function(){function e(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return e.prototype.bootstrapModuleFactory=function(e,t){var n,l=this,i="noop"===(n=t?t.ngZone:void 0)?new Ph:("zone.js"===n?void 0:n)||new kh({enableLongStackTrace:ja()}),o=[{provide:kh,useValue:i}];return i.run(function(){var t=fu.create({providers:o,parent:l.injector,name:e.moduleType.name}),n=e.create(t),r=n.injector.get(Sp,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Jh(l._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(e){r.handleError(e)}})}),function(e,t,i){try{var o=((r=n.injector.get(Kp)).runInitializers(),r.donePromise.then(function(){return l._moduleDoBootstrap(n),n}));return Gp(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(u){throw t.runOutsideAngular(function(){return e.handleError(u)}),u}var r}(r,i)})},e.prototype.bootstrapModule=function(e,t){var n=this;void 0===t&&(t=[]);var l=Qh({},t);return function(e,t,n){return e.get(yh).createCompiler([t]).compileModuleAsync(n)}(this.injector,l,e).then(function(e){return n.bootstrapModuleFactory(e,l)})},e.prototype._moduleDoBootstrap=function(e){var t=e.injector.get(Xh);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+Y(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e}();function Qh(e,t){return Array.isArray(t)?t.reduce(Qh,e):Object(l.__assign)({},e,t)}var Xh=function(){function e(e,t,n,l,i,o){var s=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=l,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=ja(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var c=new r.a(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),d=new r.a(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){kh.assertNotInAngularZone(),q(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){kh.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=Object(u.a)(c,d.pipe(Object(a.a)()))}var t;return t=e,e.prototype.bootstrap=function(e,t){var n,l=this;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.");n=e instanceof Qu?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n instanceof ra?null:this._injector.get(ua),o=n.create(fu.NULL,[],t||n.selector,i);o.onDestroy(function(){l._unloadComponent(o)});var r=o.injector.get(Fh,null);return r&&o.injector.get(Vh).registerApplication(o.location.nativeElement,r),this._loadComponent(o),ja()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},e.prototype.tick=function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=t._tickScope();try{this._runningTick=!0,this._views.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(e){return e.checkNoChanges()})}catch(l){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(l)})}finally{this._runningTick=!1,Oh(n)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;Jh(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(th,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),Jh(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=Ih("ApplicationRef#tick()"),e}();function Jh(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var ef=function(){function e(){this.dirty=!0,this._results=[],this.changes=new gc,this.length=0}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[W()]=function(){return this._results[W()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=function e(t){return t.reduce(function(t,n){var l=Array.isArray(n)?e(n):n;return t.concat(l)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),tf=function(){return function(){}}(),nf={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},lf=function(){function e(e,t){this._compiler=e,this._config=t||nf}return e.prototype.load=function(e){return this._compiler instanceof mh?this.loadFactory(e):this.loadAndCompile(e)},e.prototype.loadAndCompile=function(e){var t=this,i=Object(l.__read)(e.split("#"),2),o=i[0],r=i[1];return void 0===r&&(r="default"),n("crnd")(o).then(function(e){return e[r]}).then(function(e){return of(e,o,r)}).then(function(e){return t._compiler.compileModuleAsync(e)})},e.prototype.loadFactory=function(e){var t=Object(l.__read)(e.split("#"),2),i=t[0],o=t[1],r="NgFactory";return void 0===o&&(o="default",r=""),n("crnd")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then(function(e){return e[o+r]}).then(function(e){return of(e,i,o)})},e}();function of(e,t,n){if(!e)throw new Error("Cannot find '"+n+"' in '"+t+"'");return e}var rf=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return af(e,fa)},e}(),uf=function(e,t){return function(e,t,n,i){var o;ta||(ta=function(e){function n(t,n,l){var i=e.call(this)||this;return i._lContainer=t,i._hostTNode=n,i._hostView=l,i._viewRefs=[],i}return Object(l.__extends)(n,e),Object.defineProperty(n.prototype,"element",{get:function(){return da(t,this._hostTNode,this._hostView)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"injector",{get:function(){return new Pn(this._hostTNode,this._hostView)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentInjector",{get:function(){var e=In(this._hostTNode,this._hostView),t=gt(e,this._hostView),n=function(e,t,n){if(n.parent&&-1!==n.parent.injectorIndex){for(var l=n.parent.injectorIndex,i=n.parent;null!=i.parent&&l==i.injectorIndex;)i=i.parent;return i}for(var o=ft(e),r=t,u=t[Ee];o>1;)u=(r=r[Pe])[Ee],o--;return u}(e,this._hostView,this._hostTNode);return pt(e)&&null!=n?new Pn(n,t):new Pn(null,this._hostView)},enumerable:!0,configurable:!0}),n.prototype.clear=function(){for(;this._lContainer[je].length;)this.remove(0)},n.prototype.get=function(e){return this._viewRefs[e]||null},Object.defineProperty(n.prototype,"length",{get:function(){return this._lContainer[je].length},enumerable:!0,configurable:!0}),n.prototype.createEmbeddedView=function(e,t,n){var l=this._adjustIndex(n),i=e.createEmbeddedView(t||{},this._lContainer,this._hostTNode,this._hostView,l);return i.attachToViewContainerRef(this),this._viewRefs.splice(l,0,i),i},n.prototype.createComponent=function(e,t,n,l,i){var o=n||this.parentInjector;!i&&null==e.ngModule&&o&&(i=o.get(ua,null));var r=e.create(o,l,void 0,i);return this.insert(r.hostView,t),r},n.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n=e._lView,l=this._adjustIndex(t);return Ll(n,this._lContainer,this._hostView,l,this._hostTNode.index),Nl(n,!0,ql(l,this._lContainer[je],this._lContainer[He])),e.attachToViewContainerRef(this),this._viewRefs.splice(l,0,e),e},n.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n=this.indexOf(e);return this.detach(n),this.insert(e,this._adjustIndex(t)),e},n.prototype.indexOf=function(e){return this._viewRefs.indexOf(e)},n.prototype.remove=function(e){var t=this._adjustIndex(e,-1);Pl(this._lContainer,this._hostTNode,t),this._viewRefs.splice(t,1)},n.prototype.detach=function(e){var t=this._adjustIndex(e,-1),n=Al(this._lContainer,t,!!this._hostTNode.detached);return null!=this._viewRefs.splice(t,1)[0]?new sa(n,n[Te],n[Le]):null},n.prototype._adjustIndex=function(e,t){return void 0===t&&(t=0),null==e?this._lContainer[je].length+t:e},n}(e));var r=i[n.index];if(rt(r))(o=r)[Ve]=-1;else{var u=i[Re].createComment("");if(ut(i)){var a=i[Re],s=et(n,i);Ul(a,$l(a,s),u,function(e,t){return xl(e)?e.nextSibling(t):t.nextSibling}(a,s))}else Gl(u,n,i);i[n.index]=o=tr(r,n,i,u,!0),pr(i,n.index,o)}return new ta(o,n,i)}(e,t,Jt(),Qt())},af=au,sf=function(){function e(){}return e.__NG_ELEMENT_ID__=function(){return df()},e}(),cf=function(){return ha(Jt(),Qt(),null)},df=function(){for(var e=[],t=0;t-1}(l)||"root"===i.providedIn&&l._def.isRoot))){var c=e._providers.length;return e._def.providersByKey[t.tokenKey]={flags:5120,value:u.factory,deps:[],index:c,token:t.token},e._providers[c]=om,e._providers[c]=pm(e,e._def.providersByKey[t.tokenKey])}return 4&t.flags?n:e._parent.get(t.token,n)}finally{Dt(o)}}function pm(e,t){var n;switch(201347067&t.flags){case 512:n=function(e,t,n){var i=n.length;switch(i){case 0:return new t;case 1:return new t(dm(e,n[0]));case 2:return new t(dm(e,n[0]),dm(e,n[1]));case 3:return new t(dm(e,n[0]),dm(e,n[1]),dm(e,n[2]));default:for(var o=new Array(i),r=0;r=n.length)&&(t=n.length-1),t<0)return null;var l=n[t];return l.viewContainerParent=null,vm(n,t),cg.dirtyParentQueries(l),gm(l),l}function fm(e,t,n){var l=t?kg(t,t.def.lastRenderRootNode):e.renderElement,i=n.renderer.parentNode(l),o=n.renderer.nextSibling(l);Hg(n,2,i,o,void 0)}function gm(e){Hg(e,3,null,null,void 0)}function mm(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function vm(e,t){t>=e.length-1?e.pop():e.splice(t,1)}var ym=new Object;function bm(e,t,n,l,i,o){return new wm(e,t,n,l,i,o)}function Cm(e){return e.viewDefFactory}var wm=function(e){function t(t,n,l,i,o,r){var u=e.call(this)||this;return u.selector=t,u.componentType=n,u._inputs=i,u._outputs=o,u.ngContentSelectors=r,u.viewDefFactory=l,u}return Object(l.__extends)(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,l){if(!l)throw new Error("ngModule should be provided");var i=jg(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,r=cg.createRootView(e,t||[],n,i,l,ym),u=rg(r,o).instance;return n&&r.renderer.setAttribute(og(r,0).renderElement,"ng-version",Da.full),new _m(r,new Im(r),u)},t}(Qu),_m=function(e){function t(t,n,l){var i=e.call(this)||this;return i._view=t,i._viewRef=n,i._component=l,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=l,i}return Object(l.__extends)(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new fa(og(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new km(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(Zu);function xm(e,t,n){return new Sm(e,t,n)}var Sm=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new fa(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new km(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=Dg(e),e=e.parent;return e?new km(e,t):new km(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=hm(this._data,e);cg.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Im(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var l=e.createEmbeddedView(t||{});return this.insert(l,n),l},e.prototype.createComponent=function(e,t,n,l,i){var o=n||this.parentInjector;i||e instanceof ra||(i=o.get(ua));var r=e.create(o,l,void 0,i);return this.insert(r.hostView,t),r},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,l,i,o,r=e;return o=(n=this._data).viewContainer._embeddedViews,null==(l=t)&&(l=o.length),(i=r._view).viewContainerParent=this._view,mm(o,l,i),function(e,t){var n=Tg(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var l=n.template._projectedViews;l||(l=n.template._projectedViews=[]),l.push(t),function(e,n){if(!(4&n.flags)){t.parent.def.nodeFlags|=4,n.flags|=4;for(var l=n.parent;l;)l.childFlags|=4,l=l.parent}}(0,t.parentNodeDef)}}(n,i),cg.dirtyParentQueries(i),fm(n,l>0?o[l-1]:null,i),r.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,l,i,o,r,u=this._embeddedViews.indexOf(e._view);return i=t,r=(o=(n=this._data).viewContainer._embeddedViews)[l=u],vm(o,l),null==i&&(i=o.length),mm(o,i,r),cg.dirtyParentQueries(r),gm(r),fm(n,i>0?o[i-1]:null,r),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=hm(this._data,e);t&&cg.destroyView(t)},e.prototype.detach=function(e){var t=hm(this._data,e);return t?new Im(t):null},e}();function Em(e){return new Im(e)}var Im=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return Hg(this._view,0,void 0,void 0,e=[]),e;var e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){Eg(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{cg.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){cg.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),cg.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,gm(this._view),cg.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}();function Om(e,t){return new Tm(e,t)}var Tm=function(e){function t(t,n){var l=e.call(this)||this;return l._parentView=t,l._def=n,l}return Object(l.__extends)(t,e),t.prototype.createEmbeddedView=function(e){return new Im(cg.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new fa(og(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(mc);function Dm(e,t){return new km(e,t)}var km=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=fu.THROW_IF_NOT_FOUND),cg.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:mg(e)},t)},e}();function Rm(e,t){var n=e.def.nodes[t];if(1&n.flags){var l=og(e,n.nodeIndex);return n.element.template?l.template:l.renderElement}if(2&n.flags)return ig(e,n.nodeIndex).renderText;if(20240&n.flags)return rg(e,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+t)}function Mm(e){return new Nm(e.renderer)}var Nm=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=Object(l.__read)(Wg(t),2),i=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,i),i},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var l=0;l0,i=t.provider;switch(201347067&t.flags){case 512:return Jm(e,t.parent,n,i.value,i.deps);case 1024:return function(e,t,n,i,o){var r=o.length;switch(r){case 0:return i();case 1:return i(tv(e,t,n,o[0]));case 2:return i(tv(e,t,n,o[0]),tv(e,t,n,o[1]));case 3:return i(tv(e,t,n,o[0]),tv(e,t,n,o[1]),tv(e,t,n,o[2]));default:for(var u=Array(r),a=0;a0)s=g,_v(g)||(c=g);else for(;s&&f===s.nodeIndex+s.childCount;){var y=s.parent;y&&(y.childFlags|=s.childFlags,y.childMatchedQueries|=s.childMatchedQueries),c=(s=y)&&_v(s)?s.renderParent:s}}return{factory:null,nodeFlags:r,rootNodeFlags:u,nodeMatchedQueries:a,flags:e,nodes:t,updateDirectives:n||fg,updateRenderer:l||fg,handleEvent:function(e,n,l,i){return t[n].element.handleEvent(e,l,i)},bindingCount:i,outputCount:o,lastRenderRootNode:h}}function _v(e){return 0!=(1&e.flags)&&null===e.element.name}function xv(e,t,n){var l=t.element&&t.element.template;if(l){if(!l.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(l.lastRenderRootNode&&16777216&l.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+t.nodeIndex+"!")}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+t.nodeIndex+"!");if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+t.nodeIndex+"!");if(134217728&t.flags&&e)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+t.nodeIndex+"!")}if(t.childCount){var i=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=i&&t.nodeIndex+t.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+t.nodeIndex+"!")}}function Sv(e,t,n,l){var i=Ov(e.root,e.renderer,e,t,n);return Tv(i,e.component,l),Dv(i),i}function Ev(e,t,n){var l=Ov(e,e.renderer,null,null,t);return Tv(l,n,n),Dv(l),l}function Iv(e,t,n,l){var i,o=t.element.componentRendererType;return i=o?e.root.rendererFactory.createRenderer(l,o):e.root.renderer,Ov(e.root,i,e,t.element.componentProvider,n)}function Ov(e,t,n,l,i){var o=new Array(i.nodes.length),r=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:l,context:null,component:null,nodes:o,state:13,root:e,renderer:t,oldValues:new Array(i.bindingCount),disposables:r,initIndex:-1}}function Tv(e,t,n){e.component=t,e.context=n}function Dv(e){var t;Mg(e)&&(t=og(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n=e.def,l=e.nodes,i=0;i0&&im(e,t,0,n)&&(h=!0),p>1&&im(e,t,1,l)&&(h=!0),p>2&&im(e,t,2,i)&&(h=!0),p>3&&im(e,t,3,o)&&(h=!0),p>4&&im(e,t,4,r)&&(h=!0),p>5&&im(e,t,5,u)&&(h=!0),p>6&&im(e,t,6,a)&&(h=!0),p>7&&im(e,t,7,s)&&(h=!0),p>8&&im(e,t,8,c)&&(h=!0),p>9&&im(e,t,9,d)&&(h=!0),h}(e,t,n,l,i,o,r,u,a,s,c,d);case 2:return function(e,t,n,l,i,o,r,u,a,s,c,d){var p=!1,h=t.bindings,f=h.length;if(f>0&&xg(e,t,0,n)&&(p=!0),f>1&&xg(e,t,1,l)&&(p=!0),f>2&&xg(e,t,2,i)&&(p=!0),f>3&&xg(e,t,3,o)&&(p=!0),f>4&&xg(e,t,4,r)&&(p=!0),f>5&&xg(e,t,5,u)&&(p=!0),f>6&&xg(e,t,6,a)&&(p=!0),f>7&&xg(e,t,7,s)&&(p=!0),f>8&&xg(e,t,8,c)&&(p=!0),f>9&&xg(e,t,9,d)&&(p=!0),p){var g=t.text.prefix;f>0&&(g+=Cv(n,h[0])),f>1&&(g+=Cv(l,h[1])),f>2&&(g+=Cv(i,h[2])),f>3&&(g+=Cv(o,h[3])),f>4&&(g+=Cv(r,h[4])),f>5&&(g+=Cv(u,h[5])),f>6&&(g+=Cv(a,h[6])),f>7&&(g+=Cv(s,h[7])),f>8&&(g+=Cv(c,h[8])),f>9&&(g+=Cv(d,h[9]));var m=ig(e,t.nodeIndex).renderText;e.renderer.setValue(m,g)}return p}(e,t,n,l,i,o,r,u,a,s,c,d);case 16384:return function(e,t,n,l,i,o,r,u,a,s,c,d){var p=rg(e,t.nodeIndex),h=p.instance,f=!1,g=void 0,m=t.bindings.length;return m>0&&_g(e,t,0,n)&&(f=!0,g=lv(e,p,t,0,n,g)),m>1&&_g(e,t,1,l)&&(f=!0,g=lv(e,p,t,1,l,g)),m>2&&_g(e,t,2,i)&&(f=!0,g=lv(e,p,t,2,i,g)),m>3&&_g(e,t,3,o)&&(f=!0,g=lv(e,p,t,3,o,g)),m>4&&_g(e,t,4,r)&&(f=!0,g=lv(e,p,t,4,r,g)),m>5&&_g(e,t,5,u)&&(f=!0,g=lv(e,p,t,5,u,g)),m>6&&_g(e,t,6,a)&&(f=!0,g=lv(e,p,t,6,a,g)),m>7&&_g(e,t,7,s)&&(f=!0,g=lv(e,p,t,7,s,g)),m>8&&_g(e,t,8,c)&&(f=!0,g=lv(e,p,t,8,c,g)),m>9&&_g(e,t,9,d)&&(f=!0,g=lv(e,p,t,9,d,g)),g&&h.ngOnChanges(g),65536&t.flags&&lg(e,256,t.nodeIndex)&&h.ngOnInit(),262144&t.flags&&h.ngDoCheck(),f}(e,t,n,l,i,o,r,u,a,s,c,d);case 32:case 64:case 128:return function(e,t,n,l,i,o,r,u,a,s,c,d){var p=t.bindings,h=!1,f=p.length;if(f>0&&xg(e,t,0,n)&&(h=!0),f>1&&xg(e,t,1,l)&&(h=!0),f>2&&xg(e,t,2,i)&&(h=!0),f>3&&xg(e,t,3,o)&&(h=!0),f>4&&xg(e,t,4,r)&&(h=!0),f>5&&xg(e,t,5,u)&&(h=!0),f>6&&xg(e,t,6,a)&&(h=!0),f>7&&xg(e,t,7,s)&&(h=!0),f>8&&xg(e,t,8,c)&&(h=!0),f>9&&xg(e,t,9,d)&&(h=!0),h){var g=ug(e,t.nodeIndex),m=void 0;switch(201347067&t.flags){case 32:m=new Array(p.length),f>0&&(m[0]=n),f>1&&(m[1]=l),f>2&&(m[2]=i),f>3&&(m[3]=o),f>4&&(m[4]=r),f>5&&(m[5]=u),f>6&&(m[6]=a),f>7&&(m[7]=s),f>8&&(m[8]=c),f>9&&(m[9]=d);break;case 64:m={},f>0&&(m[p[0].name]=n),f>1&&(m[p[1].name]=l),f>2&&(m[p[2].name]=i),f>3&&(m[p[3].name]=o),f>4&&(m[p[4].name]=r),f>5&&(m[p[5].name]=u),f>6&&(m[p[6].name]=a),f>7&&(m[p[7].name]=s),f>8&&(m[p[8].name]=c),f>9&&(m[p[9].name]=d);break;case 128:var v=n;switch(f){case 1:m=v.transform(n);break;case 2:m=v.transform(l);break;case 3:m=v.transform(l,i);break;case 4:m=v.transform(l,i,o);break;case 5:m=v.transform(l,i,o,r);break;case 6:m=v.transform(l,i,o,r,u);break;case 7:m=v.transform(l,i,o,r,u,a);break;case 8:m=v.transform(l,i,o,r,u,a,s);break;case 9:m=v.transform(l,i,o,r,u,a,s,c);break;case 10:m=v.transform(l,i,o,r,u,a,s,c,d)}}g.value=m}return h}(e,t,n,l,i,o,r,u,a,s,c,d);default:throw"unreachable"}}(e,t,i,o,r,u,a,s,c,d,p,h):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){for(var l=!1,i=0;i0&&Sg(e,t,0,n),p>1&&Sg(e,t,1,l),p>2&&Sg(e,t,2,i),p>3&&Sg(e,t,3,o),p>4&&Sg(e,t,4,r),p>5&&Sg(e,t,5,u),p>6&&Sg(e,t,6,a),p>7&&Sg(e,t,7,s),p>8&&Sg(e,t,8,c),p>9&&Sg(e,t,9,d)}(e,t,l,i,o,r,u,a,s,c,d,p):function(e,t,n){for(var l=0;l0){var o=new Set(e.modules);Xv.forEach(function(t,l){if(o.has(w(l).providedIn)){var i={token:l,flags:t.flags|(n?4096:0),deps:Pg(t.deps),value:t.value,index:e.providers.length};e.providers.push(i),e.providersByKey[mg(l)]=i}})}}(e=e.factory(function(){return fg})),e):e}(l))}var Qv=new Map,Xv=new Map,Jv=new Map;function ey(e){var t;Qv.set(e.token,e),"function"==typeof e.token&&(t=w(e.token))&&"function"==typeof t.providedIn&&Xv.set(e.token,e)}function ty(e,t){var n=jg(Cm(t)),l=jg(n.nodes[0].element.componentView);Jv.set(e,l)}function ny(){Qv.clear(),Xv.clear(),Jv.clear()}function ly(e){if(0===Qv.size)return e;var t=function(e){for(var t=[],n=null,l=0;l",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(s),d=["%","/","?",";","#"].concat(c),p=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n("r8II");function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var l=new o;return l.parse(e,t,n),l}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),u=-1!==o&&o127?N+="x":N+=M[L];if(!N.match(h)){var P=k.slice(0,O),F=k.slice(O+1),V=M.match(f);V&&(P.push(V[1]),F.unshift(V[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=P.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),D||(this.hostname=l.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[_])for(O=0,R=c.length;O0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var x=w.slice(-1)[0],S=(n.host||e.host||w.length>1)&&("."===x||".."===x)||""===x,E=0,I=w.length;I>=0;I--)"."===(x=w[I])?w.splice(I,1):".."===x?(w.splice(I,1),E++):E&&(w.splice(I,1),E--);if(!b&&!C)for(;E--;E)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),S&&"/"!==w.join("/").substr(-1)&&w.push("");var O,T=""===w[0]||w[0]&&"/"===w[0].charAt(0);return _&&(n.hostname=n.host=T?"":w.length?w.shift():"",(O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift())),(b=b||n.host&&w.length)&&!T&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},Czxz:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("7LN8"),a=n("mU/a"),s=n("sdDj"),c=n("P3jN"),d=n("CcnG"),p=n("DtyJ"),h=function(){function e(){this.sortSource=new p.Subject,this.selectionSource=new p.Subject,this.contextMenuSource=new p.Subject,this.valueSource=new p.Subject,this.totalRecordsSource=new p.Subject,this.columnsSource=new p.Subject,this.sortSource$=this.sortSource.asObservable(),this.selectionSource$=this.selectionSource.asObservable(),this.contextMenuSource$=this.contextMenuSource.asObservable(),this.valueSource$=this.valueSource.asObservable(),this.totalRecordsSource$=this.totalRecordsSource.asObservable(),this.columnsSource$=this.columnsSource.asObservable()}return e.prototype.onSort=function(e){this.sortSource.next(e)},e.prototype.onSelectionChange=function(){this.selectionSource.next()},e.prototype.onContextMenu=function(e){this.contextMenuSource.next(e)},e.prototype.onValueChange=function(e){this.valueSource.next(e)},e.prototype.onTotalRecordsChange=function(e){this.totalRecordsSource.next(e)},e.prototype.onColumnsChange=function(e){this.columnsSource.next(e)},l([d.Injectable()],e)}();t.TableService=h;var f=function(){function e(e,t,n){this.el=e,this.zone=t,this.tableService=n,this.first=0,this.pageLinks=5,this.alwaysShowPaginator=!0,this.paginatorPosition="bottom",this.defaultSortOrder=1,this.sortMode="single",this.resetPageOnSort=!0,this.selectionChange=new o.EventEmitter,this.contextMenuSelectionChange=new o.EventEmitter,this.contextMenuSelectionMode="separate",this.rowTrackBy=function(e,t){return t},this.lazy=!1,this.lazyLoadOnInit=!0,this.compareSelectionBy="deepEquals",this.csvSeparator=",",this.exportFilename="download",this.filters={},this.filterDelay=300,this.expandedRowKeys={},this.rowExpandMode="multiple",this.virtualScrollDelay=150,this.virtualRowHeight=28,this.columnResizeMode="fit",this.loadingIcon="pi pi-spinner",this.stateStorage="session",this.onRowSelect=new o.EventEmitter,this.onRowUnselect=new o.EventEmitter,this.onPage=new o.EventEmitter,this.onSort=new o.EventEmitter,this.onFilter=new o.EventEmitter,this.onLazyLoad=new o.EventEmitter,this.onRowExpand=new o.EventEmitter,this.onRowCollapse=new o.EventEmitter,this.onContextMenuSelect=new o.EventEmitter,this.onColResize=new o.EventEmitter,this.onColReorder=new o.EventEmitter,this.onRowReorder=new o.EventEmitter,this.onEditInit=new o.EventEmitter,this.onEditComplete=new o.EventEmitter,this.onEditCancel=new o.EventEmitter,this.onHeaderCheckboxToggle=new o.EventEmitter,this.sortFunction=new o.EventEmitter,this._value=[],this._totalRecords=0,this.selectionKeys={},this._sortOrder=1,this.filterConstraints={startsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=c.ObjectUtils.removeAccents(t.toString()).toLowerCase();return c.ObjectUtils.removeAccents(e.toString()).toLowerCase().slice(0,n.length)===n},contains:function(e,t){if(null==t||"string"==typeof t&&""===t.trim())return!0;if(null==e)return!1;var n=c.ObjectUtils.removeAccents(t.toString()).toLowerCase();return-1!==c.ObjectUtils.removeAccents(e.toString()).toLowerCase().indexOf(n)},endsWith:function(e,t){if(null==t||""===t.trim())return!0;if(null==e)return!1;var n=c.ObjectUtils.removeAccents(t.toString()).toLowerCase(),l=c.ObjectUtils.removeAccents(e.toString()).toLowerCase();return-1!==l.indexOf(n,l.length-n.length)},equals:function(e,t){return null==t||"string"==typeof t&&""===t.trim()||null!=e&&(e.getTime&&t.getTime?e.getTime()===t.getTime():c.ObjectUtils.removeAccents(e.toString()).toLowerCase()==c.ObjectUtils.removeAccents(t.toString()).toLowerCase())},notEquals:function(e,t){return!(null==t||"string"==typeof t&&""===t.trim()||null!=e&&(e.getTime&&t.getTime?e.getTime()===t.getTime():c.ObjectUtils.removeAccents(e.toString()).toLowerCase()==c.ObjectUtils.removeAccents(t.toString()).toLowerCase()))},in:function(e,t){if(null==t||0===t.length)return!0;for(var n=0;nt.getTime():e>t)},gte:function(e,t){return null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()>=t.getTime():e>=t)}}}return e.prototype.ngOnInit=function(){this.lazy&&this.lazyLoadOnInit&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.initialized=!0},e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"caption":e.captionTemplate=t.template;break;case"header":e.headerTemplate=t.template;break;case"body":e.bodyTemplate=t.template;break;case"footer":e.footerTemplate=t.template;break;case"summary":e.summaryTemplate=t.template;break;case"colgroup":e.colGroupTemplate=t.template;break;case"rowexpansion":e.expandedRowTemplate=t.template;break;case"frozenrows":e.frozenRowsTemplate=t.template;break;case"frozenheader":e.frozenHeaderTemplate=t.template;break;case"frozenbody":e.frozenBodyTemplate=t.template;break;case"frozenfooter":e.frozenFooterTemplate=t.template;break;case"frozencolgroup":e.frozenColGroupTemplate=t.template;break;case"emptymessage":e.emptyMessageTemplate=t.template;break;case"paginatorleft":e.paginatorLeftTemplate=t.template;break;case"paginatorright":e.paginatorRightTemplate=t.template}})},e.prototype.ngAfterViewInit=function(){this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths()},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this.isStateful()&&!this.stateRestored&&this.restoreState(),this._value=e,this.lazy||(this.totalRecords=this._value?this._value.length:0,"single"==this.sortMode&&this.sortField?this.sortSingle():"multiple"==this.sortMode&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.virtualScroll&&this.virtualScrollCallback&&this.virtualScrollCallback(),this.tableService.onValueChange(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e,this.tableService.onColumnsChange(e),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&this.restoreColumnOrder()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalRecords",{get:function(){return this._totalRecords},set:function(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortField",{get:function(){return this._sortField},set:function(e){this._sortField=e,this.lazy&&!this.initialized||"single"===this.sortMode&&this.sortSingle()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this._sortOrder},set:function(e){this._sortOrder=e,this.lazy&&!this.initialized||"single"===this.sortMode&&this.sortSingle()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multiSortMeta",{get:function(){return this._multiSortMeta},set:function(e){this._multiSortMeta=e,"multiple"===this.sortMode&&this.sortMultiple()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){return this._selection},set:function(e){this._selection=e,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1},enumerable:!0,configurable:!0}),e.prototype.updateSelectionKeys=function(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(var e=0,t=this._selection;eo?1:0,e.sortOrder*l}),this.hasFilter()&&this._filter());var t={field:this.sortField,order:this.sortOrder};this.onSort.emit(t),this.tableService.onSort(t)}},e.prototype.sortMultiple=function(){var e=this;this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):this.value.sort(function(t,n){return e.multisortField(t,n,e.multiSortMeta,0)}),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))},e.prototype.multisortField=function(e,t,n,l){var i=c.ObjectUtils.resolveFieldData(e,n[l].field),o=c.ObjectUtils.resolveFieldData(t,n[l].field),r=null;if(null==i&&null!=o?r=-1:null!=i&&null==o?r=1:null==i&&null==o&&(r=0),"string"==typeof i||i instanceof String){if(i.localeCompare&&i!=o)return n[l].order*i.localeCompare(o)}else r=il?this.multisortField(e,t,n,l+1):0:n[l].order*r},e.prototype.getSortMeta=function(e){if(this.multiSortMeta&&this.multiSortMeta.length)for(var t=0;tt?(n=t,l=this.anchorRowIndex):this.anchorRowIndexthis.anchorRowIndex?(t=this.anchorRowIndex,n=this.rangeRowIndex):this.rangeRowIndex-1:this.equals(e,this.selection))},e.prototype.findIndexInSelection=function(e){var t=-1;if(this.selection&&this.selection.length)for(var n=0;n=i){if("fit"===this.columnResizeMode){for(var r=t.nextElementSibling;!r.offsetParent;)r=r.nextElementSibling;if(r){var u=r.offsetWidth-n;if(o>15&&u>parseInt(r.style.minWidth||15))if(this.scrollable){var a=this.findParentScrollableView(t),c=s.DomHandler.findSingle(a,"table.ui-table-scrollable-body-table"),d=s.DomHandler.findSingle(a,"table.ui-table-scrollable-header-table"),p=s.DomHandler.findSingle(a,"table.ui-table-scrollable-footer-table"),h=s.DomHandler.index(t);this.resizeColGroup(d,h,o,u),this.resizeColGroup(c,h,o,u),this.resizeColGroup(p,h,o,u)}else t.style.width=o+"px",r&&(r.style.width=u+"px")}}else"expand"===this.columnResizeMode&&o>i&&(this.scrollable?(a=this.findParentScrollableView(t),c=s.DomHandler.findSingle(a,"table.ui-table-scrollable-body-table"),d=s.DomHandler.findSingle(a,"table.ui-table-scrollable-header-table"),p=s.DomHandler.findSingle(a,"table.ui-table-scrollable-footer-table"),c.style.width=c.offsetWidth+n+"px",d.style.width=d.offsetWidth+n+"px",p&&(p.style.width=d.offsetWidth+n+"px"),h=s.DomHandler.index(t),this.resizeColGroup(d,h,o,null),this.resizeColGroup(c,h,o,null),this.resizeColGroup(p,h,o,null)):(this.tableViewChild.nativeElement.style.width=this.tableViewChild.nativeElement.offsetWidth+n+"px",t.style.width=o+"px",this.containerViewChild.nativeElement.style.width=this.tableViewChild.nativeElement.style.width+"px"));this.onColResize.emit({element:t,delta:n}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",s.DomHandler.removeClass(this.containerViewChild.nativeElement,"ui-unselectable-text")},e.prototype.findParentScrollableView=function(e){if(e){for(var t=e.parentElement;t&&!s.DomHandler.hasClass(t,"ui-table-scrollable-view");)t=t.parentElement;return t}return null},e.prototype.resizeColGroup=function(e,t,n,l){if(e){var i="COLGROUP"===e.children[0].nodeName?e.children[0]:null;if(!i)throw"Scrollable tables require a colgroup to support resizable columns";var o=i.children[t],r=o.nextElementSibling;o.style.width=n+"px",r&&l&&(r.style.width=l+"px")}},e.prototype.onColumnDragStart=function(e,t){this.reorderIconWidth=s.DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement),this.reorderIconHeight=s.DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement),this.draggedColumn=t,e.dataTransfer.setData("text","b")},e.prototype.onColumnDragEnter=function(e,t){if(this.reorderableColumns&&this.draggedColumn&&t){e.preventDefault();var n=s.DomHandler.getOffset(this.containerViewChild.nativeElement),l=s.DomHandler.getOffset(t);if(this.draggedColumn!=t){var i=l.left-n.left,o=l.left+t.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=l.top-n.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=l.top-n.top+t.offsetHeight+"px",e.pageX>o?(this.reorderIndicatorUpViewChild.nativeElement.style.left=i+t.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=i+t.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=i-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=i-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}},e.prototype.onColumnDragLeave=function(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")},e.prototype.onColumnDrop=function(e,t){if(e.preventDefault(),this.draggedColumn){var n=s.DomHandler.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),l=s.DomHandler.indexWithinGroup(t,"preorderablecolumn"),i=n!=l;i&&(l-n==1&&-1===this.dropPosition||n-l==1&&1===this.dropPosition)&&(i=!1),i&&ln&&-1===this.dropPosition&&(l-=1),i&&(c.ObjectUtils.reorderArray(this.columns,n,l),this.onColReorder.emit({dragIndex:n,dropIndex:l,columns:this.columns}),this.isStateful()&&this.saveState()),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}},e.prototype.onRowDragStart=function(e,t){this.rowDragging=!0,this.draggedRowIndex=t,e.dataTransfer.setData("text","b")},e.prototype.onRowDragOver=function(e,t,n){if(this.rowDragging&&this.draggedRowIndex!==t){var l=s.DomHandler.getOffset(n).top+s.DomHandler.getWindowScrollTop(),i=e.pageY,o=l+s.DomHandler.getOuterHeight(n)/2,r=n.previousElementSibling;ithis.droppedRowIndex?this.droppedRowIndex:0===this.droppedRowIndex?0:this.droppedRowIndex-1),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:this.droppedRowIndex})),this.onRowDragLeave(e,t),this.onRowDragEnd(e)},e.prototype.handleVirtualScroll=function(e){var t=this;this.first=(e.page-1)*this.rows,this.virtualScrollCallback=e.callback,this.zone.run(function(){t.virtualScrollTimer&&clearTimeout(t.virtualScrollTimer),t.virtualScrollTimer=setTimeout(function(){t.onLazyLoad.emit(t.createLazyLoadMetadata())},t.virtualScrollDelay)})},e.prototype.isEmpty=function(){var e=this.filteredValue||this.value;return null==e||0==e.length},e.prototype.getBlockableElement=function(){return this.el.nativeElement.children[0]},e.prototype.getStorage=function(){switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}},e.prototype.isStateful=function(){return null!=this.stateKey},e.prototype.saveState=function(){var e=this.getStorage(),t={};this.paginator&&(t.first=this.first,t.rows=this.rows),this.sortField&&(t.sortField=this.sortField,t.sortOrder=this.sortOrder),this.multiSortMeta&&(t.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(t.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(t),this.reorderableColumns&&this.saveColumnOrder(t),this.selection&&(t.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(t.expandedRowKeys=this.expandedRowKeys),Object.keys(t).length&&e.setItem(this.stateKey,JSON.stringify(t))},e.prototype.clearState=function(){var e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)},e.prototype.restoreState=function(){var e=this.getStorage().getItem(this.stateKey);if(e){var t=JSON.parse(e);this.paginator&&(this.first=t.first,this.rows=t.rows),t.sortField&&(this.restoringSort=!0,this._sortField=t.sortField,this._sortOrder=t.sortOrder),t.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=t.multiSortMeta),t.filters&&(this.restoringFilter=!0,this.filters=t.filters),this.resizableColumns&&(this.columnWidthsState=t.columnWidths,this.tableWidthState=t.tableWidth),t.expandedRowKeys&&(this.expandedRowKeys=t.expandedRowKeys),t.selection&&(this.selection=t.selection),this.stateRestored=!0}},e.prototype.saveColumnWidths=function(e){var t=[];s.DomHandler.find(this.containerViewChild.nativeElement,".ui-table-thead > tr:first-child > th").map(function(e){return t.push(s.DomHandler.getOuterWidth(e))}),e.columnWidths=t.join(","),"expand"===this.columnResizeMode&&(e.tableWidth=this.scrollable?s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-header-table").style.width:s.DomHandler.getOuterWidth(this.tableViewChild.nativeElement)+"px")},e.prototype.restoreColumnWidths=function(){if(this.columnWidthsState){var e=this.columnWidthsState.split(",");if("expand"===this.columnResizeMode&&this.tableWidthState)if(this.scrollable){var t=s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-body-table"),n=s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-header-table"),l=s.DomHandler.findSingle(this.containerViewChild.nativeElement,".ui-table-scrollable-footer-table");t.style.width=this.tableWidthState,n.style.width=this.tableWidthState,l&&(l.style.width=this.tableWidthState)}else this.tableViewChild.nativeElement.style.width=this.tableWidthState,this.containerViewChild.nativeElement.style.width=this.tableWidthState;if(this.scrollable){var i=s.DomHandler.find(this.containerViewChild.nativeElement,".ui-table-scrollable-header-table > colgroup > col"),o=s.DomHandler.find(this.containerViewChild.nativeElement,".ui-table-scrollable-body-table > colgroup > col");i.map(function(t,n){return t.style.width=e[n]+"px"}),o.map(function(t,n){return t.style.width=e[n]+"px"})}else s.DomHandler.find(this.tableViewChild.nativeElement,".ui-table-thead > tr:first-child > th").map(function(t,n){return t.style.width=e[n]+"px"})}},e.prototype.saveColumnOrder=function(e){if(this.columns){var t=[];this.columns.map(function(e){t.push(e.field||e.key)}),e.columnOrder=t}},e.prototype.restoreColumnOrder=function(){var e=this,t=this.getStorage().getItem(this.stateKey);if(t){var n=JSON.parse(t).columnOrder;if(n){var l=[];n.map(function(t){return l.push(e.findColumnByKey(t))}),this.columnOrderStateRestored=!0,this.columns=l}}},e.prototype.findColumnByKey=function(e){if(!this.columns)return null;for(var t=0,n=this.columns;t\n

\n
\n \n
\n
\n \n
\n \n \n
\n \n \n \n \n \n \n \n \n \n
\n
\n\n
\n
\n
\n
\n \n \n
\n \n
\n\n \n\n \n \n \n ',providers:[h]})],e)}();t.Table=f;var g=function(){function e(e){this.dt=e}return l([o.Input("pTableBody"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input("pTableBodyTemplate"),i("design:type",o.TemplateRef)],e.prototype,"template",void 0),l([o.Component({selector:"[pTableBody]",template:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '})],e)}();t.TableBody=g;var m=function(){function e(e,t,n){var l=this;this.dt=e,this.el=t,this.zone=n,this.subscription=this.dt.tableService.valueSource$.subscribe(function(){l.zone.runOutsideAngular(function(){setTimeout(function(){l.alignScrollBar()},50)})}),this.dt.virtualScroll&&(this.totalRecordsSubscription=this.dt.tableService.totalRecordsSource$.subscribe(function(){l.zone.runOutsideAngular(function(){setTimeout(function(){l.setVirtualScrollerHeight()},50)})})),this.initialized=!1}return Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this._scrollHeight},set:function(e){this._scrollHeight=e,this.setScrollHeight()},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewChecked=function(){!this.initialized&&this.el.nativeElement.offsetParent&&(this.alignScrollBar(),this.setScrollHeight(),this.initialized=!0)},e.prototype.ngAfterViewInit=function(){var e=this;if(this.frozen){this.scrollBodyViewChild.nativeElement.style.marginBottom=s.DomHandler.calculateScrollbarWidth()+"px";var t=this.el.nativeElement.nextElementSibling;t&&(this.scrollableSiblingBody=s.DomHandler.findSingle(t,".ui-table-scrollable-body"))}else{(this.dt.frozenColumns||this.dt.frozenBodyTemplate)&&s.DomHandler.addClass(this.el.nativeElement,"ui-table-unfrozen-view");var n=this.el.nativeElement.previousElementSibling;n&&(this.frozenSiblingBody=s.DomHandler.findSingle(n,".ui-table-scrollable-body"))}this.bindEvents(),this.setScrollHeight(),this.alignScrollBar(),this.frozen&&(this.columnsSubscription=this.dt.tableService.columnsSource$.subscribe(function(){e.zone.runOutsideAngular(function(){setTimeout(function(){e.setScrollHeight()},50)})})),this.dt.virtualScroll&&this.setVirtualScrollerHeight()},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular(function(){s.DomHandler.calculateScrollbarWidth(),e.scrollHeaderViewChild&&e.scrollHeaderViewChild.nativeElement&&(e.headerScrollListener=e.onHeaderScroll.bind(e),e.scrollHeaderBoxViewChild.nativeElement.addEventListener("scroll",e.headerScrollListener)),e.scrollFooterViewChild&&e.scrollFooterViewChild.nativeElement&&(e.footerScrollListener=e.onFooterScroll.bind(e),e.scrollFooterViewChild.nativeElement.addEventListener("scroll",e.footerScrollListener)),e.frozen||(e.bodyScrollListener=e.onBodyScroll.bind(e),e.scrollBodyViewChild.nativeElement.addEventListener("scroll",e.bodyScrollListener))})},e.prototype.unbindEvents=function(){this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&this.scrollHeaderBoxViewChild.nativeElement.removeEventListener("scroll",this.headerScrollListener),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&this.scrollFooterViewChild.nativeElement.removeEventListener("scroll",this.footerScrollListener),this.scrollBodyViewChild.nativeElement.removeEventListener("scroll",this.bodyScrollListener)},e.prototype.onHeaderScroll=function(e){this.scrollHeaderViewChild.nativeElement.scrollLeft=0},e.prototype.onFooterScroll=function(e){this.scrollFooterViewChild.nativeElement.scrollLeft=0},e.prototype.onBodyScroll=function(e){var t=this;if(this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft=-1*this.scrollBodyViewChild.nativeElement.scrollLeft+"px"),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginLeft=-1*this.scrollBodyViewChild.nativeElement.scrollLeft+"px"),this.frozenSiblingBody&&(this.frozenSiblingBody.scrollTop=this.scrollBodyViewChild.nativeElement.scrollTop),this.dt.virtualScroll){var n=s.DomHandler.getOuterHeight(this.scrollBodyViewChild.nativeElement),l=s.DomHandler.getOuterHeight(this.scrollTableViewChild.nativeElement),i=this.dt.virtualRowHeight*this.dt.rows,o=s.DomHandler.getOuterHeight(this.virtualScrollerViewChild.nativeElement)/i||1,r=this.scrollTableViewChild.nativeElement.style.top||"0";if(this.scrollBodyViewChild.nativeElement.scrollTop+n>parseFloat(r)+l||this.scrollBodyViewChild.nativeElement.scrollTops.DomHandler.getOuterHeight(this.scrollBodyViewChild.nativeElement)},e.prototype.alignScrollBar=function(){if(!this.frozen){var e=this.hasVerticalOverflow()?s.DomHandler.calculateScrollbarWidth():0;this.scrollHeaderBoxViewChild.nativeElement.style.marginRight=e+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginRight=e+"px")}this.initialized=!1},e.prototype.ngOnDestroy=function(){this.unbindEvents(),this.frozenSiblingBody=null,this.subscription&&this.subscription.unsubscribe(),this.totalRecordsSubscription&&this.totalRecordsSubscription.unsubscribe(),this.columnsSubscription&&this.columnsSubscription.unsubscribe(),this.initialized=!1},l([o.Input("pScrollableView"),i("design:type",Array)],e.prototype,"columns",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"frozen",void 0),l([o.ViewChild("scrollHeader"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderViewChild",void 0),l([o.ViewChild("scrollHeaderBox"),i("design:type",o.ElementRef)],e.prototype,"scrollHeaderBoxViewChild",void 0),l([o.ViewChild("scrollBody"),i("design:type",o.ElementRef)],e.prototype,"scrollBodyViewChild",void 0),l([o.ViewChild("scrollTable"),i("design:type",o.ElementRef)],e.prototype,"scrollTableViewChild",void 0),l([o.ViewChild("scrollFooter"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterViewChild",void 0),l([o.ViewChild("scrollFooterBox"),i("design:type",o.ElementRef)],e.prototype,"scrollFooterBoxViewChild",void 0),l([o.ViewChild("virtualScroller"),i("design:type",o.ElementRef)],e.prototype,"virtualScrollerViewChild",void 0),l([o.Input(),i("design:type",String),i("design:paramtypes",[String])],e.prototype,"scrollHeight",null),l([o.Component({selector:"[pScrollableView]",template:'\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n \n \n \n
\n
\n
\n \n '})],e)}();t.ScrollableView=m;var v=function(){function e(e){var t=this;this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe(function(e){t.updateSortState()}))}return e.prototype.ngOnInit=function(){this.isEnabled()&&this.updateSortState()},e.prototype.updateSortState=function(){this.sorted=this.dt.isSorted(this.field)},e.prototype.onClick=function(e){this.isEnabled()&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),s.DomHandler.clearSelection())},e.prototype.onEnterKey=function(e){this.onClick(e)},e.prototype.isEnabled=function(){return!0!==this.pSortableColumnDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pSortableColumn"),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pSortableColumnDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[MouseEvent]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.HostListener("keydown.enter",["$event"]),i("design:type",Function),i("design:paramtypes",[MouseEvent]),i("design:returntype",void 0)],e.prototype,"onEnterKey",null),l([o.Directive({selector:"[pSortableColumn]",host:{"[class.ui-sortable-column]":"isEnabled()","[class.ui-state-highlight]":"sorted","[attr.tabindex]":'isEnabled() ? "0" : null'}})],e)}();t.SortableColumn=v;var y=function(){function e(e){var t=this;this.dt=e,this.subscription=this.dt.tableService.sortSource$.subscribe(function(e){t.updateSortState()})}return e.prototype.ngOnInit=function(){this.updateSortState()},e.prototype.onClick=function(e){e.preventDefault()},e.prototype.updateSortState=function(){if("single"===this.dt.sortMode)this.sortOrder=this.dt.isSorted(this.field)?this.dt.sortOrder:0;else if("multiple"===this.dt.sortMode){var e=this.dt.getSortMeta(this.field);this.sortOrder=e?e.order:0}},Object.defineProperty(e.prototype,"ariaText",{get:function(){var e;switch(this.sortOrder){case 1:e=this.ariaLabelAsc;break;case-1:e=this.ariaLabelDesc;break;default:e=this.ariaLabel}return e},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",String)],e.prototype,"field",void 0),l([o.Input(),i("design:type",String)],e.prototype,"ariaLabel",void 0),l([o.Input(),i("design:type",String)],e.prototype,"ariaLabelDesc",void 0),l([o.Input(),i("design:type",String)],e.prototype,"ariaLabelAsc",void 0),l([o.Component({selector:"p-sortIcon",template:"\n \n "})],e)}();t.SortIcon=y;var b=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.selected=n.dt.isSelected(n.data)}))}return e.prototype.ngOnInit=function(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))},e.prototype.onClick=function(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})},e.prototype.onTouchEnd=function(e){this.isEnabled()&&this.dt.handleRowTouchEnd(e)},e.prototype.onKeyDown=function(e){if(this.isEnabled()){var t=e.target;switch(e.which){case 40:var n=this.findNextSelectableRow(t);n&&n.focus(),e.preventDefault();break;case 38:var l=this.findPrevSelectableRow(t);l&&l.focus(),e.preventDefault();break;case 13:this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}}},e.prototype.findNextSelectableRow=function(e){var t=e.nextElementSibling;return t?s.DomHandler.hasClass(t,"ui-selectable-row")?t:this.findNextSelectableRow(t):null},e.prototype.findPrevSelectableRow=function(e){var t=e.previousElementSibling;return t?s.DomHandler.hasClass(t,"ui-selectable-row")?t:this.findPrevSelectableRow(t):null},e.prototype.isEnabled=function(){return!0!==this.pSelectableRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pSelectableRow"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input("pSelectableRowIndex"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pSelectableRowDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.HostListener("touchend",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onTouchEnd",null),l([o.HostListener("keydown",["$event"]),i("design:type",Function),i("design:paramtypes",[KeyboardEvent]),i("design:returntype",void 0)],e.prototype,"onKeyDown",null),l([o.Directive({selector:"[pSelectableRow]",host:{"[class.ui-selectable-row]":"isEnabled()","[class.ui-state-highlight]":"selected","[attr.tabindex]":"isEnabled() ? 0 : undefined"}})],e)}();t.SelectableRow=b;var C=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.selected=n.dt.isSelected(n.data)}))}return e.prototype.ngOnInit=function(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))},e.prototype.onClick=function(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})},e.prototype.isEnabled=function(){return!0!==this.pSelectableRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pSelectableRowDblClick"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input("pSelectableRowIndex"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pSelectableRowDisabled",void 0),l([o.HostListener("dblclick",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.Directive({selector:"[pSelectableRowDblClick]",host:{"[class.ui-state-highlight]":"selected"}})],e)}();t.SelectableRowDblClick=C;var w=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.contextMenuSource$.subscribe(function(e){n.selected=n.dt.equals(n.data,e)}))}return e.prototype.onContextMenu=function(e){this.isEnabled()&&(this.dt.handleRowRightClick({originalEvent:e,rowData:this.data}),e.preventDefault())},e.prototype.isEnabled=function(){return!0!==this.pContextMenuRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input("pContextMenuRow"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pContextMenuRowDisabled",void 0),l([o.HostListener("contextmenu",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onContextMenu",null),l([o.Directive({selector:"[pContextMenuRow]",host:{"[class.ui-contextmenu-selected]":"selected"}})],e)}();t.ContextMenuRow=w;var _=function(){function e(e){this.dt=e}return e.prototype.onClick=function(e){this.isEnabled()&&(this.dt.toggleRow(this.data,e),e.preventDefault())},e.prototype.isEnabled=function(){return!0!==this.pRowTogglerDisabled},l([o.Input("pRowToggler"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pRowTogglerDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[Event]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.Directive({selector:"[pRowToggler]"})],e)}();t.RowToggler=_;var x=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){var e=this;this.isEnabled()&&(s.DomHandler.addClass(this.el.nativeElement,"ui-resizable-column"),this.resizer=document.createElement("span"),this.resizer.className="ui-column-resizer ui-clickable",this.el.nativeElement.appendChild(this.resizer),this.zone.runOutsideAngular(function(){e.resizerMouseDownListener=e.onMouseDown.bind(e),e.resizer.addEventListener("mousedown",e.resizerMouseDownListener)}))},e.prototype.bindDocumentEvents=function(){var e=this;this.zone.runOutsideAngular(function(){e.documentMouseMoveListener=e.onDocumentMouseMove.bind(e),document.addEventListener("mousemove",e.documentMouseMoveListener),e.documentMouseUpListener=e.onDocumentMouseUp.bind(e),document.addEventListener("mouseup",e.documentMouseUpListener)})},e.prototype.unbindDocumentEvents=function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},e.prototype.onMouseDown=function(e){this.dt.onColumnResizeBegin(e),this.bindDocumentEvents()},e.prototype.onDocumentMouseMove=function(e){this.dt.onColumnResize(e)},e.prototype.onDocumentMouseUp=function(e){this.dt.onColumnResizeEnd(e,this.el.nativeElement),this.unbindDocumentEvents()},e.prototype.isEnabled=function(){return!0!==this.pResizableColumnDisabled},e.prototype.ngOnDestroy=function(){this.resizerMouseDownListener&&this.resizer.removeEventListener("mousedown",this.resizerMouseDownListener),this.unbindDocumentEvents()},l([o.Input(),i("design:type",Boolean)],e.prototype,"pResizableColumnDisabled",void 0),l([o.Directive({selector:"[pResizableColumn]"})],e)}();t.ResizableColumn=x;var S=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&this.bindEvents()},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular(function(){e.mouseDownListener=e.onMouseDown.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.dragStartListener=e.onDragStart.bind(e),e.el.nativeElement.addEventListener("dragstart",e.dragStartListener),e.dragOverListener=e.onDragEnter.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener),e.dragEnterListener=e.onDragEnter.bind(e),e.el.nativeElement.addEventListener("dragenter",e.dragEnterListener),e.dragLeaveListener=e.onDragLeave.bind(e),e.el.nativeElement.addEventListener("dragleave",e.dragLeaveListener)})},e.prototype.unbindEvents=function(){this.mouseDownListener&&(document.removeEventListener("mousedown",this.mouseDownListener),this.mouseDownListener=null),this.dragOverListener&&(document.removeEventListener("dragover",this.dragOverListener),this.dragOverListener=null),this.dragEnterListener&&(document.removeEventListener("dragenter",this.dragEnterListener),this.dragEnterListener=null),this.dragEnterListener&&(document.removeEventListener("dragenter",this.dragEnterListener),this.dragEnterListener=null),this.dragLeaveListener&&(document.removeEventListener("dragleave",this.dragLeaveListener),this.dragLeaveListener=null)},e.prototype.onMouseDown=function(e){this.el.nativeElement.draggable="INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName&&!s.DomHandler.hasClass(e.target,"ui-column-resizer")},e.prototype.onDragStart=function(e){this.dt.onColumnDragStart(e,this.el.nativeElement)},e.prototype.onDragOver=function(e){e.preventDefault()},e.prototype.onDragEnter=function(e){this.dt.onColumnDragEnter(e,this.el.nativeElement)},e.prototype.onDragLeave=function(e){this.dt.onColumnDragLeave(e)},e.prototype.onDrop=function(e){this.isEnabled()&&this.dt.onColumnDrop(e,this.el.nativeElement)},e.prototype.isEnabled=function(){return!0!==this.pReorderableColumnDisabled},e.prototype.ngOnDestroy=function(){this.unbindEvents()},l([o.Input(),i("design:type",Boolean)],e.prototype,"pReorderableColumnDisabled",void 0),l([o.HostListener("drop",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDrop",null),l([o.Directive({selector:"[pReorderableColumn]"})],e)}();t.ReorderableColumn=S;var E=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&s.DomHandler.addClass(this.el.nativeElement,"ui-editable-column")},e.prototype.onClick=function(e){if(this.isEnabled())if(this.dt.editingCellClick=!0,this.dt.editingCell){if(this.dt.editingCell!==this.el.nativeElement){if(!this.dt.isEditingCellValid())return;s.DomHandler.removeClass(this.dt.editingCell,"ui-editing-cell"),this.openCell()}}else this.openCell()},e.prototype.openCell=function(){var e=this;this.dt.updateEditingCell(this.el.nativeElement),s.DomHandler.addClass(this.el.nativeElement,"ui-editing-cell"),this.dt.onEditInit.emit({field:this.field,data:this.data}),this.zone.runOutsideAngular(function(){setTimeout(function(){var t=s.DomHandler.findSingle(e.el.nativeElement,"input, textarea");t&&t.focus()},50)})},e.prototype.closeEditingCell=function(){s.DomHandler.removeClass(this.dt.editingCell,"ui-editing-cell"),this.dt.editingCell=null,this.dt.unbindDocumentEditListener()},e.prototype.onKeyDown=function(e){this.isEnabled()&&(13==e.keyCode?(this.dt.isEditingCellValid()&&(this.closeEditingCell(),this.dt.onEditComplete.emit({field:this.field,data:this.data})),e.preventDefault()):27==e.keyCode?(this.dt.isEditingCellValid()&&(this.closeEditingCell(),this.dt.onEditCancel.emit({field:this.field,data:this.data})),e.preventDefault()):9==e.keyCode&&(this.dt.onEditComplete.emit({field:this.field,data:this.data}),e.shiftKey?this.moveToPreviousCell(e):this.moveToNextCell(e)))},e.prototype.findCell=function(e){if(e){for(var t=e;t&&!s.DomHandler.hasClass(t,"ui-editing-cell");)t=t.parentElement;return t}return null},e.prototype.moveToPreviousCell=function(e){var t=this.findCell(e.target),n=this.findPreviousEditableColumn(t);n&&(s.DomHandler.invokeElementMethod(e.target,"blur"),s.DomHandler.invokeElementMethod(n,"click"),e.preventDefault())},e.prototype.moveToNextCell=function(e){var t=this.findCell(e.target),n=this.findNextEditableColumn(t);n&&(s.DomHandler.invokeElementMethod(e.target,"blur"),s.DomHandler.invokeElementMethod(n,"click"),e.preventDefault())},e.prototype.findPreviousEditableColumn=function(e){var t=e.previousElementSibling;if(!t){var n=e.parentElement.previousElementSibling;n&&(t=n.lastElementChild)}return t?s.DomHandler.hasClass(t,"ui-editable-column")?t:this.findPreviousEditableColumn(t):null},e.prototype.findNextEditableColumn=function(e){var t=e.nextElementSibling;if(!t){var n=e.parentElement.nextElementSibling;n&&(t=n.firstElementChild)}return t?s.DomHandler.hasClass(t,"ui-editable-column")?t:this.findNextEditableColumn(t):null},e.prototype.isEnabled=function(){return!0!==this.pEditableColumnDisabled},l([o.Input("pEditableColumn"),i("design:type",Object)],e.prototype,"data",void 0),l([o.Input("pEditableColumnField"),i("design:type",Object)],e.prototype,"field",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pEditableColumnDisabled",void 0),l([o.HostListener("click",["$event"]),i("design:type",Function),i("design:paramtypes",[MouseEvent]),i("design:returntype",void 0)],e.prototype,"onClick",null),l([o.HostListener("keydown",["$event"]),i("design:type",Function),i("design:paramtypes",[KeyboardEvent]),i("design:returntype",void 0)],e.prototype,"onKeyDown",null),l([o.Directive({selector:"[pEditableColumn]"})],e)}();t.EditableColumn=E;var I=function(){function e(e,t){this.dt=e,this.editableColumn=t}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach(function(t){switch(t.getType()){case"input":e.inputTemplate=t.template;break;case"output":e.outputTemplate=t.template}})},l([o.ContentChildren(u.PrimeTemplate),i("design:type",o.QueryList)],e.prototype,"templates",void 0),l([o.Component({selector:"p-cellEditor",template:'\n \n \n \n \n \n \n '})],e)}();t.CellEditor=I;var O=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.checked=n.dt.isSelected(n.value)})}return e.prototype.ngOnInit=function(){this.checked=this.dt.isSelected(this.value)},e.prototype.onClick=function(e){this.disabled||this.dt.toggleRowWithRadio({originalEvent:e,rowIndex:this.index},this.value),s.DomHandler.clearSelection()},e.prototype.onFocus=function(){s.DomHandler.addClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.onBlur=function(){s.DomHandler.removeClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"value",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"index",void 0),l([o.ViewChild("box"),i("design:type",o.ElementRef)],e.prototype,"boxViewChild",void 0),l([o.Component({selector:"p-tableRadioButton",template:'\n
\n
\n \n
\n
\n \n
\n
\n '})],e)}();t.TableRadioButton=O;var T=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.subscription=this.dt.tableService.selectionSource$.subscribe(function(){n.checked=n.dt.isSelected(n.value)})}return e.prototype.ngOnInit=function(){this.checked=this.dt.isSelected(this.value)},e.prototype.onClick=function(e){this.disabled||this.dt.toggleRowWithCheckbox({originalEvent:e,rowIndex:this.index},this.value),s.DomHandler.clearSelection()},e.prototype.onFocus=function(){s.DomHandler.addClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.onBlur=function(){s.DomHandler.removeClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"value",void 0),l([o.Input(),i("design:type",Number)],e.prototype,"index",void 0),l([o.ViewChild("box"),i("design:type",o.ElementRef)],e.prototype,"boxViewChild",void 0),l([o.Component({selector:"p-tableCheckbox",template:'\n
\n
\n \n
\n
\n \n
\n
\n '})],e)}();t.TableCheckbox=T;var D=function(){function e(e,t){var n=this;this.dt=e,this.tableService=t,this.valueChangeSubscription=this.dt.tableService.valueSource$.subscribe(function(){n.checked=n.updateCheckedState()}),this.selectionChangeSubscription=this.dt.tableService.selectionSource$.subscribe(function(){n.checked=n.updateCheckedState()})}return e.prototype.ngOnInit=function(){this.checked=this.updateCheckedState()},e.prototype.onClick=function(e,t){this.disabled||this.dt.value&&this.dt.value.length>0&&this.dt.toggleRowsWithCheckbox(e,!t),s.DomHandler.clearSelection()},e.prototype.onFocus=function(){s.DomHandler.addClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.onBlur=function(){s.DomHandler.removeClass(this.boxViewChild.nativeElement,"ui-state-focus")},e.prototype.isDisabled=function(){return this.disabled||!this.dt.value||!this.dt.value.length},e.prototype.ngOnDestroy=function(){this.selectionChangeSubscription&&this.selectionChangeSubscription.unsubscribe(),this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe()},e.prototype.updateCheckedState=function(){var e;return this.dt.filteredValue?(e=this.dt.filteredValue)&&e.length>0&&this.dt.selection&&this.dt.selection.length>0&&this.isAllFilteredValuesChecked():(e=this.dt.value)&&e.length>0&&this.dt.selection&&this.dt.selection.length>0&&this.dt.selection.length===e.length},e.prototype.isAllFilteredValuesChecked=function(){if(this.dt.filteredValue){for(var e=0,t=this.dt.filteredValue;e\n
\n \n
\n
\n \n
\n \n '})],e)}();t.TableHeaderCheckbox=D;var k=function(){function e(e){this.el=e}return e.prototype.ngAfterViewInit=function(){s.DomHandler.addClass(this.el.nativeElement,"ui-table-reorderablerow-handle")},l([o.Input("pReorderableRowHandle"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Directive({selector:"[pReorderableRowHandle]"})],e)}();t.ReorderableRowHandle=k;var R=function(){function e(e,t,n){this.dt=e,this.el=t,this.zone=n}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&(this.el.nativeElement.droppable=!0,this.bindEvents())},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular(function(){e.mouseDownListener=e.onMouseDown.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.dragStartListener=e.onDragStart.bind(e),e.el.nativeElement.addEventListener("dragstart",e.dragStartListener),e.dragEndListener=e.onDragEnd.bind(e),e.el.nativeElement.addEventListener("dragend",e.dragEndListener),e.dragOverListener=e.onDragOver.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener),e.dragLeaveListener=e.onDragLeave.bind(e),e.el.nativeElement.addEventListener("dragleave",e.dragLeaveListener)})},e.prototype.unbindEvents=function(){this.mouseDownListener&&(document.removeEventListener("mousedown",this.mouseDownListener),this.mouseDownListener=null),this.dragStartListener&&(document.removeEventListener("dragstart",this.dragStartListener),this.dragStartListener=null),this.dragEndListener&&(document.removeEventListener("dragend",this.dragEndListener),this.dragEndListener=null),this.dragOverListener&&(document.removeEventListener("dragover",this.dragOverListener),this.dragOverListener=null),this.dragLeaveListener&&(document.removeEventListener("dragleave",this.dragLeaveListener),this.dragLeaveListener=null)},e.prototype.onMouseDown=function(e){this.el.nativeElement.draggable=!!s.DomHandler.hasClass(e.target,"ui-table-reorderablerow-handle")},e.prototype.onDragStart=function(e){this.dt.onRowDragStart(e,this.index)},e.prototype.onDragEnd=function(e){this.dt.onRowDragEnd(e),this.el.nativeElement.draggable=!1},e.prototype.onDragOver=function(e){this.dt.onRowDragOver(e,this.index,this.el.nativeElement),e.preventDefault()},e.prototype.onDragLeave=function(e){this.dt.onRowDragLeave(e,this.el.nativeElement)},e.prototype.isEnabled=function(){return!0!==this.pReorderableRowDisabled},e.prototype.onDrop=function(e){this.isEnabled()&&this.dt.rowDragging&&this.dt.onRowDrop(e,this.el.nativeElement),e.preventDefault()},l([o.Input("pReorderableRow"),i("design:type",Number)],e.prototype,"index",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"pReorderableRowDisabled",void 0),l([o.HostListener("drop",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDrop",null),l([o.Directive({selector:"[pReorderableRow]"})],e)}();t.ReorderableRow=R,t.TableModule=function(){return l([o.NgModule({imports:[r.CommonModule,a.PaginatorModule],exports:[f,u.SharedModule,v,b,_,w,x,S,E,I,y,O,T,D,k,R,C],declarations:[f,v,b,_,w,x,S,E,I,g,m,y,O,T,D,k,R,C]})],function(){})}()},DKTb:function(e,t,n){"use strict";function l(e){setTimeout(function(){throw e},0)}n.d(t,"a",function(){return l})},DqLj:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n("sdDj");t.DomHandler=l.DomHandler;var i=n("B58V");t.TreeDragDropService=i.TreeDragDropService;var o=n("oygf");t.ConfirmationService=o.ConfirmationService;var r=n("4Vzq");t.MessageService=r.MessageService;var u=n("6xRK");t.DialogService=u.DialogService;var a=n("V3HQ");t.DynamicDialogConfig=a.DynamicDialogConfig;var s=n("RWz4");t.DynamicDialogRef=s.DynamicDialogRef},DtyJ:function(e,t,n){"use strict";n.r(t),n.d(t,"Observable",function(){return l.a}),n.d(t,"ConnectableObservable",function(){return i.a}),n.d(t,"GroupedObservable",function(){return s}),n.d(t,"observable",function(){return d.a}),n.d(t,"Subject",function(){return a.a}),n.d(t,"BehaviorSubject",function(){return p.a}),n.d(t,"ReplaySubject",function(){return h.a}),n.d(t,"AsyncSubject",function(){return f}),n.d(t,"asapScheduler",function(){return g.a}),n.d(t,"asyncScheduler",function(){return m.a}),n.d(t,"queueScheduler",function(){return v.a}),n.d(t,"animationFrameScheduler",function(){return y.a}),n.d(t,"VirtualTimeScheduler",function(){return C}),n.d(t,"VirtualAction",function(){return w}),n.d(t,"Scheduler",function(){return _.a}),n.d(t,"Subscription",function(){return u.a}),n.d(t,"Subscriber",function(){return r.a}),n.d(t,"Notification",function(){return x.a}),n.d(t,"NotificationKind",function(){return x.b}),n.d(t,"pipe",function(){return S.a}),n.d(t,"noop",function(){return E.a}),n.d(t,"identity",function(){return I.a}),n.d(t,"isObservable",function(){return O.a}),n.d(t,"ArgumentOutOfRangeError",function(){return T.a}),n.d(t,"EmptyError",function(){return D.a}),n.d(t,"ObjectUnsubscribedError",function(){return k.a}),n.d(t,"UnsubscriptionError",function(){return R.a}),n.d(t,"TimeoutError",function(){return N}),n.d(t,"bindCallback",function(){return V}),n.d(t,"bindNodeCallback",function(){return B}),n.d(t,"combineLatest",function(){return G.a}),n.d(t,"concat",function(){return W.a}),n.d(t,"defer",function(){return q.a}),n.d(t,"empty",function(){return K.b}),n.d(t,"forkJoin",function(){return Y.a}),n.d(t,"from",function(){return Z.a}),n.d(t,"fromEvent",function(){return Q.a}),n.d(t,"fromEventPattern",function(){return J}),n.d(t,"generate",function(){return ee}),n.d(t,"iif",function(){return ne}),n.d(t,"interval",function(){return ie}),n.d(t,"merge",function(){return re.a}),n.d(t,"never",function(){return ae}),n.d(t,"of",function(){return se.a}),n.d(t,"onErrorResumeNext",function(){return ce}),n.d(t,"pairs",function(){return de}),n.d(t,"partition",function(){return me}),n.d(t,"race",function(){return Ce}),n.d(t,"range",function(){return xe}),n.d(t,"throwError",function(){return Ee.a}),n.d(t,"timer",function(){return Ie.a}),n.d(t,"using",function(){return Oe}),n.d(t,"zip",function(){return De}),n.d(t,"scheduled",function(){return Ae.a}),n.d(t,"EMPTY",function(){return K.a}),n.d(t,"NEVER",function(){return ue}),n.d(t,"config",function(){return Pe.a});var l=n("6blF"),i=n("KhEm"),o=n("mrSG"),r=n("FFOo"),u=n("pugT"),a=n("K9Ia"),s=function(e){function t(t,n,l){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=l,i}return o.__extends(t,e),t.prototype._subscribe=function(e){var t=new u.a,n=this.refCountSubscription,l=this.groupSubject;return n&&!n.closed&&t.add(new c(n)),t.add(l.subscribe(e)),t},t}(l.a),c=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return o.__extends(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(u.a),d=n("xTla"),p=n("26FU"),h=n("S5bw"),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o.__extends(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),u.a.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),u.a.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(a.a),g=n("KQya"),m=n("T1DM"),v=n("zo3G"),y=n("tHPV"),b=n("h9Dq"),C=function(e){function t(t,n){void 0===t&&(t=w),void 0===n&&(n=Number.POSITIVE_INFINITY);var l=e.call(this,t,function(){return l.frame})||this;return l.maxFrames=n,l.frame=0,l.index=-1,l}return o.__extends(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,l=this.maxFrames;(t=n[0])&&t.delay<=l&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(n("CS9Q").a),w=function(e){function t(t,n,l){void 0===l&&(l=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=l,i.active=!0,i.index=t.index=l,i}return o.__extends(t,e),t.prototype.schedule=function(n,l){if(void 0===l&&(l=0),!this.id)return e.prototype.schedule.call(this,n,l);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,l)},t.prototype.requestAsyncId=function(e,n,l){void 0===l&&(l=0),this.delay=e.frame+l;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(b.a),_=n("siIJ"),x=n("60iU"),S=n("y3By"),E=n("+umK"),I=n("mChF"),O=n("zrt+"),T=n("b7mW"),D=n("3fWJ"),k=n("8g8A"),R=n("awvh");function M(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}M.prototype=Object.create(Error.prototype);var N=M,L=n("67Y/"),A=n("1fDf"),P=n("isby"),F=n("nkY7");function V(e,t,n){if(t){if(!Object(F.a)(t))return function(){for(var l=[],i=0;i=t){l.complete();break}if(l.next(o++),l.closed)break}})}function Se(e){var t=e.start,n=e.index,l=e.subscriber;n>=e.count?l.complete():(l.next(t),l.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}var Ee=n("XlPw"),Ie=n("gI3B");function Oe(e,t){return new l.a(function(n){var l,i;try{l=e()}catch(r){return void n.error(r)}try{i=t(l)}catch(r){return void n.error(r)}var o=(i?Object(Z.a)(i):K.a).subscribe(n);return function(){o.unsubscribe(),l&&l.unsubscribe()}})}var Te=n("En8+");function De(){for(var e=[],t=0;tthis.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),Le=function(e){function t(t,n,l){var i=e.call(this,t)||this;return i.parent=n,i.observable=l,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return o.__extends(t,e),t.prototype[Te.a]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t,n,l,i){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return Object(be.a)(this,this.observable,this,t)},t}(ye.a),Ae=n("i4X3"),Pe=n("iLxQ")},EBtg:function(e,t,n){"use strict";var l=n("2KeD"),i=n("n73p"),o=n("2qMH"),r=n("LJ/p"),u=n("HZF8"),a=n("90cg"),s=n("yRPT"),c=n("0alx");t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return l.scheduleObservable(e,t);if(a.isPromise(e))return i.schedulePromise(e,t);if(s.isArrayLike(e))return o.scheduleArray(e,t);if(c.isIterable(e)||"string"==typeof e)return r.scheduleIterable(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}},EPYN:function(e,t,n){var l=n("mrSG").__decorate,i=n("mrSG").__metadata;Object.defineProperty(t,"__esModule",{value:!0});var o=n("CcnG"),r=n("Ip0R"),u=n("VSng"),a=function(){return l([o.Component({selector:"p-inplaceDisplay",template:""})],function(){})}();t.InplaceDisplay=a;var s=function(){return l([o.Component({selector:"p-inplaceContent",template:""})],function(){})}();t.InplaceContent=s;var c=function(){function e(){this.onActivate=new o.EventEmitter,this.onDeactivate=new o.EventEmitter}return e.prototype.activate=function(e){this.disabled||(this.active=!0,this.onActivate.emit(e))},e.prototype.deactivate=function(e){this.disabled||(this.active=!1,this.hover=!1,this.onDeactivate.emit(e))},l([o.Input(),i("design:type",Boolean)],e.prototype,"active",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"closable",void 0),l([o.Input(),i("design:type",Boolean)],e.prototype,"disabled",void 0),l([o.Input(),i("design:type",Object)],e.prototype,"style",void 0),l([o.Input(),i("design:type",String)],e.prototype,"styleClass",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onActivate",void 0),l([o.Output(),i("design:type",o.EventEmitter)],e.prototype,"onDeactivate",void 0),l([o.Component({selector:"p-inplace",template:'\n
\n
\n \n
\n
\n \n \n
\n
\n '})],e)}();t.Inplace=c,t.InplaceModule=function(){return l([o.NgModule({imports:[r.CommonModule,u.ButtonModule],exports:[c,a,s,u.ButtonModule],declarations:[c,a,s]})],function(){})}()},EVdn:function(e,t,n){var l;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],r=Object.getPrototypeOf,u=o.slice,a=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},s=o.push,c=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,f=h.toString,g=f.call(Object),m={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},y=function(e){return null!=e&&e===e.window},b=n.document,C={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var l,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(l in C)(i=t[l]||t.getAttribute&&t.getAttribute(l))&&o.setAttribute(l,i);n.head.appendChild(o).parentNode.removeChild(o)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[p.call(e)]||"object":typeof e}var x=function(e,t){return new x.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}x.fn=x.prototype={jquery:"3.5.0",constructor:x,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(x.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+F+")"+F+"*"),G=new RegExp(F+"|>"),W=new RegExp(H),q=new RegExp("^"+V+"$"),K={ID:new RegExp("^#("+V+")"),CLASS:new RegExp("^\\.("+V+")"),TAG:new RegExp("^("+V+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},le=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},re=Ce(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{N.apply(k=L.call(w.childNodes),w.childNodes)}catch(Ee){N={apply:k.length?function(e,t){M.apply(e,L.call(t))}:function(e,t){for(var n=e.length,l=0;e[n++]=t[l++];);e.length=n-1}}}function ue(e,t,l,i){var o,u,s,c,d,f,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(l=l||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return l;if(!i&&(p(t),t=t||h,g)){if(11!==w&&(d=J.exec(e)))if(o=d[1]){if(9===w){if(!(s=t.getElementById(o)))return l;if(s.id===o)return l.push(s),l}else if(y&&(s=y.getElementById(o))&&b(t,s)&&s.id===o)return l.push(s),l}else{if(d[2])return N.apply(l,t.getElementsByTagName(e)),l;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(l,t.getElementsByClassName(o)),l}if(n.qsa&&!O[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(G.test(e)||$.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(le,ie):t.setAttribute("id",c=C)),u=(f=r(e)).length;u--;)f[u]=(c?"#"+c:":scope")+" "+be(f[u]);v=f.join(",")}try{return N.apply(l,y.querySelectorAll(v)),l}catch(_){O(e,!0)}finally{c===C&&t.removeAttribute("id")}}}return a(e.replace(z,"$1"),t,l,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>l.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[C]=!0,e}function ce(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(Ee){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)l.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,l=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(l)return l;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return se(function(t){return t=+t,se(function(n,l){for(var i,o=e([],n.length,t),r=o.length;r--;)n[i=o[r]]&&(n[i]=!(l[i]=n[i]))})})}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ue.support={},o=ue.isXML=function(e){var t=(e.ownerDocument||e).documentElement;return!Y.test(e.namespaceURI||t&&t.nodeName||"HTML")},p=ue.setDocument=function(e){var t,i,r=e?e.ownerDocument||e:w;return r!=h&&9===r.nodeType&&r.documentElement?(f=(h=r).documentElement,g=!o(h),w!=h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce(function(e){return f.appendChild(e).appendChild(h.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(h.getElementsByClassName),n.getById=ce(function(e){return f.appendChild(e).id=C,!h.getElementsByName||!h.getElementsByName(C).length}),n.getById?(l.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},l.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(l.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},l.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,l,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),l=0;o=i[l++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),l.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,l=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&l.push(n);return l}return o},l.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=X.test(h.querySelectorAll))&&(ce(function(e){var t;f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+F+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+C+"-]").length||m.push("~="),(t=h.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=X.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(f.compareDocumentPosition),b=t||X.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,l=t&&t.parentNode;return e===l||!(!l||1!==l.nodeType||!(n.contains?n.contains(l):e.compareDocumentPosition&&16&e.compareDocumentPosition(l)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},T=t?function(e,t){if(e===t)return d=!0,0;var l=!e.compareDocumentPosition-!t.compareDocumentPosition;return l||(1&(l=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===l?e==h||e.ownerDocument==w&&b(w,e)?-1:t==h||t.ownerDocument==w&&b(w,t)?1:c?A(c,e)-A(c,t):0:4&l?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,l=0,i=e.parentNode,o=t.parentNode,r=[e],u=[t];if(!i||!o)return e==h?-1:t==h?1:i?-1:o?1:c?A(c,e)-A(c,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)r.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;r[l]===u[l];)l++;return l?pe(r[l],u[l]):r[l]==w?-1:u[l]==w?1:0},h):h},ue.matches=function(e,t){return ue(e,null,null,t)},ue.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&g&&!O[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var l=y.call(e,t);if(l||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return l}catch(Ee){O(t,!0)}return ue(t,h,null,[e]).length>0},ue.contains=function(e,t){return(e.ownerDocument||e)!=h&&p(e),b(e,t)},ue.attr=function(e,t){(e.ownerDocument||e)!=h&&p(e);var i=l.attrHandle[t.toLowerCase()],o=i&&D.call(l.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ue.escape=function(e){return(e+"").replace(le,ie)},ue.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ue.uniqueSort=function(e){var t,l=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(T),d){for(;t=e[o++];)t===e[o]&&(i=l.push(o));for(;i--;)e.splice(l[i],1)}return c=null,e},i=ue.getText=function(e){var t,n="",l=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[l++];)n+=i(t);return n},(l=ue.selectors={cacheLength:50,createPseudo:se,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ue.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ue.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=r(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(l){var i=ue.attr(l,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,l,i){var o="nth"!==e.slice(0,3),r="last"!==e.slice(-4),u="of-type"===t;return 1===l&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var s,c,d,p,h,f,g=o!==r?"nextSibling":"previousSibling",m=t.parentNode,v=u&&t.nodeName.toLowerCase(),y=!a&&!u,b=!1;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(u?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(b=(h=(s=(c=(d=(p=m)[C]||(p[C]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===_&&s[1])&&s[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(b=h=0)||f.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[_,h,b];break}}else if(y&&(b=h=(s=(c=(d=(p=t)[C]||(p[C]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===_&&s[1]),!1===b)for(;(p=++h&&p&&p[g]||(b=h=0)||f.pop())&&((u?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(y&&((c=(d=p[C]||(p[C]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]=[_,b]),p!==t)););return(b-=i)===l||b%l==0&&b/l>=0}}},PSEUDO:function(e,t){var n,i=l.pseudos[e]||l.setFilters[e.toLowerCase()]||ue.error("unsupported pseudo: "+e);return i[C]?i(t):i.length>1?(n=[e,e,"",t],l.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var l,o=i(e,t),r=o.length;r--;)e[l=A(e,o[r])]=!(n[l]=o[r])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],l=u(e.replace(z,"$1"));return l[C]?se(function(e,t,n,i){for(var o,r=l(e,null,i,[]),u=e.length;u--;)(o=r[u])&&(e[u]=!(t[u]=o))}):function(e,i,o){return t[0]=e,l(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return ue(e,t).length>0}}),contains:se(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:se(function(e){return q.test(e||"")||ue.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!l.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;nt?t:n;--l>=0;)e.push(l);return e}),gt:me(function(e,t,n){for(var l=n<0?n+t:n;++l1?function(t,n,l){for(var i=e.length;i--;)if(!e[i](t,n,l))return!1;return!0}:e[0]}function _e(e,t,n,l,i){for(var o,r=[],u=0,a=e.length,s=null!=t;u-1&&(o[s]=!(r[s]=d))}}else v=_e(v===r?v.splice(f,v.length):v),i?i(null,r,v,a):N.apply(r,v)})}function Se(e){for(var t,n,i,o=e.length,r=l.relative[e[0].type],u=r||l.relative[" "],a=r?1:0,c=Ce(function(e){return e===t},u,!0),d=Ce(function(e){return A(t,e)>-1},u,!0),p=[function(e,n,l){var i=!r&&(l||n!==s)||((t=n).nodeType?c(e,n,l):d(e,n,l));return t=null,i}];a1&&we(p),a>1&&be(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),n,a0,i=e.length>0,o=function(o,r,u,a,c){var d,f,m,v=0,y="0",b=o&&[],C=[],w=s,x=o||i&&l.find.TAG("*",c),S=_+=null==w?1:Math.random()||.1,E=x.length;for(c&&(s=r==h||r||c);y!==E&&null!=(d=x[y]);y++){if(i&&d){for(f=0,r||d.ownerDocument==h||(p(d),u=!g);m=e[f++];)if(m(d,r||h,u)){a.push(d);break}c&&(_=S)}n&&((d=!m&&d)&&v--,o&&b.push(d))}if(v+=y,n&&y!==v){for(f=0;m=t[f++];)m(b,C,r,u);if(o){if(v>0)for(;y--;)b[y]||C[y]||(C[y]=R.call(a));C=_e(C)}N.apply(a,C),c&&!o&&C.length>0&&v+t.length>1&&ue.uniqueSort(a)}return c&&(_=S,s=w),b};return n?se(o):o}(o,i))).selector=e}return u},a=ue.select=function(e,t,n,i){var o,a,s,c,d,p="function"==typeof e&&e,h=!i&&r(e=p.selector||e);if(n=n||[],1===h.length){if((a=h[0]=h[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&g&&l.relative[a[1].type]){if(!(t=(l.find.ID(s.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(o=K.needsContext.test(e)?0:a.length;o--&&!l.relative[c=(s=a[o]).type];)if((d=l.find[c])&&(i=d(s.matches[0].replace(te,ne),ee.test(a[0].type)&&ve(t.parentNode)||t))){if(a.splice(o,1),!(e=i.length&&be(a)))return N.apply(n,i),n;break}}return(p||u(e,h))(i,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=C.split("").sort(T).join("")===C,n.detectDuplicates=!!d,p(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))}),ce(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||de(P,function(e,t,n){var l;if(!n)return!0===e[t]?t.toLowerCase():(l=e.getAttributeNode(t))&&l.specified?l.value:null}),ue}(n);x.find=E,x.expr=E.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=E.uniqueSort,x.text=E.getText,x.isXMLDoc=E.isXML,x.contains=E.contains,x.escapeSelector=E.escape;var I=function(e,t,n){for(var l=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&x(e).is(n))break;l.push(e)}return l},O=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},T=x.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var k=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(e,t,n){return v(t)?x.grep(e,function(e,l){return!!t.call(e,l,e)!==n}):t.nodeType?x.grep(e,function(e){return e===t!==n}):"string"!=typeof t?x.grep(e,function(e){return c.call(t,e)>-1!==n}):x.filter(t,e,n)}x.filter=function(e,t,n){var l=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===l.nodeType?x.find.matchesSelector(l,e)?[l]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},x.fn.extend({find:function(e){var t,n,l=this.length,i=this;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;t1?x.uniqueSort(n):n},filter:function(e){return this.pushStack(R(this,e||[],!1))},not:function(e){return this.pushStack(R(this,e||[],!0))},is:function(e){return!!R(this,"string"==typeof e&&T.test(e)?x(e):e||[],!1).length}});var M,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,n){var l,i;if(!e)return this;if(n=n||M,"string"==typeof e){if(!(l="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:N.exec(e))||!l[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(l[1]){if(x.merge(this,x.parseHTML(l[1],(t=t instanceof x?t[0]:t)&&t.nodeType?t.ownerDocument||t:b,!0)),k.test(l[1])&&x.isPlainObject(t))for(l in t)v(this[l])?this[l](t[l]):this.attr(l,t[l]);return this}return(i=b.getElementById(l[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,M=x(b);var L=/^(?:parents|prev(?:Until|All))/,A={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&x.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?x.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(x(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return I(e,"parentNode")},parentsUntil:function(e,t,n){return I(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return I(e,"nextSibling")},prevAll:function(e){return I(e,"previousSibling")},nextUntil:function(e,t,n){return I(e,"nextSibling",n)},prevUntil:function(e,t,n){return I(e,"previousSibling",n)},siblings:function(e){return O((e.parentNode||{}).firstChild,e)},children:function(e){return O(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(D(e,"template")&&(e=e.content||e),x.merge([],e.childNodes))}},function(e,t){x.fn[e]=function(n,l){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(l=n),l&&"string"==typeof l&&(i=x.filter(l,i)),this.length>1&&(A[e]||x.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}});var F=/[^\x20\t\r\n\f]+/g;function V(e){return e}function j(e){throw e}function H(e,t,n,l){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(l))}catch(e){n.apply(void 0,[e])}}x.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return x.each(e.match(F)||[],function(e,n){t[n]=!0}),t}(e):x.extend({},e);var t,n,l,i,o=[],r=[],u=-1,a=function(){for(i=i||e.once,l=t=!0;r.length;u=-1)for(n=r.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?x.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=r=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=r=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],r.push(n),t||a()),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!l}};return s},x.extend({Deferred:function(e){var t=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],l="pending",i={state:function(){return l},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,l){var i=v(e[l[4]])&&e[l[4]];o[l[1]](function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[l[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,l,i){var o=0;function r(e,t,l,i){return function(){var u=this,a=arguments,s=function(){var n,s;if(!(e=o&&(l!==j&&(u=void 0,a=[n]),t.rejectWith(u,a))}};e?c():(x.Deferred.getStackHook&&(c.stackTrace=x.Deferred.getStackHook()),n.setTimeout(c))}}return x.Deferred(function(n){t[0][3].add(r(0,n,v(i)?i:V,n.notifyWith)),t[1][3].add(r(0,n,v(e)?e:V)),t[2][3].add(r(0,n,v(l)?l:j))}).promise()},promise:function(e){return null!=e?x.extend(e,i):i}},o={};return x.each(t,function(e,n){var r=n[2],u=n[5];i[n[1]]=r.add,u&&r.add(function(){l=u},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),r.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=r.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,l=Array(n),i=u.call(arguments),o=x.Deferred(),r=function(e){return function(n){l[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(l,i)}};if(t<=1&&(H(e,o.done(r(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],r(n),o.reject);return o.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&B.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},x.readyException=function(e){n.setTimeout(function(){throw e})};var z=x.Deferred();function U(){b.removeEventListener("DOMContentLoaded",U),n.removeEventListener("load",U),x.ready()}x.fn.ready=function(e){return z.then(e).catch(function(e){x.readyException(e)}),this},x.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==e&&--x.readyWait>0||z.resolveWith(b,[x]))}}),x.ready.then=z.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(x.ready):(b.addEventListener("DOMContentLoaded",U),n.addEventListener("load",U));var $=function(e,t,n,l,i,o,r){var u=0,a=e.length,s=null==n;if("object"===_(n))for(u in i=!0,n)$(e,t,u,n[u],!0,o,r);else if(void 0!==l&&(i=!0,v(l)||(r=!0),s&&(r?(t.call(e,l),t=null):(s=t,t=function(e,t,n){return s.call(x(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each(function(){X.remove(this,e)})}}),x.extend({queue:function(e,t,n){var l;if(e)return l=Q.get(e,t=(t||"fx")+"queue"),n&&(!l||Array.isArray(n)?l=Q.access(e,t,x.makeArray(n)):l.push(n)),l||[]},dequeue:function(e,t){var n=x.queue(e,t=t||"fx"),l=n.length,i=n.shift(),o=x._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),l--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){x.dequeue(e,t)},o)),!l&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:x.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i;he=b.createDocumentFragment().appendChild(b.createElement("div")),(fe=b.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),he.appendChild(fe),m.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="",m.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="",m.option=!!he.lastChild;var ye={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?x.merge([e],n):n}function Ce(e,t){for(var n=0,l=e.length;n",""]);var we=/<|&#?\w+;/;function _e(e,t,n,l,i){for(var o,r,u,a,s,c,d=t.createDocumentFragment(),p=[],h=0,f=e.length;h-1)i&&i.push(o);else if(s=re(o),r=be(d.appendChild(o),"script"),s&&Ce(r),n)for(c=0;o=r[c++];)ve.test(o.type||"")&&n.push(o);return d}var xe=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function Oe(){return!1}function Te(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function De(e,t,n,l,i,o){var r,u;if("object"==typeof t){for(u in"string"!=typeof n&&(l=l||n,n=void 0),t)De(e,u,n,l,t[u],o);return e}if(null==l&&null==i?(i=n,l=n=void 0):null==i&&("string"==typeof n?(i=l,l=void 0):(i=l,l=n,n=void 0)),!1===i)i=Oe;else if(!i)return e;return 1===o&&(r=i,(i=function(e){return x().off(e),r.apply(this,arguments)}).guid=r.guid||(r.guid=x.guid++)),e.each(function(){x.event.add(this,t,i,l,n)})}function ke(e,t,n){n?(Q.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var l,i,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(x.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=u.call(arguments),Q.set(this,t,o),l=n(this,t),this[t](),o!==(i=Q.get(this,t))||l?Q.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(Q.set(this,t,{value:x.event.trigger(x.extend(o[0],x.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&x.event.add(e,t,Ie)}x.event={global:{},add:function(e,t,n,l,i){var o,r,u,a,s,c,d,p,h,f,g,m=Q.get(e);if(Y(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&x.find.matchesSelector(oe,i),n.guid||(n.guid=x.guid++),(a=m.events)||(a=m.events=Object.create(null)),(r=m.handle)||(r=m.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),s=(t=(t||"").match(F)||[""]).length;s--;)h=g=(u=Ee.exec(t[s])||[])[1],f=(u[2]||"").split(".").sort(),h&&(d=x.event.special[h]||{},d=x.event.special[h=(i?d.delegateType:d.bindType)||h]||{},c=x.extend({type:h,origType:g,data:l,handler:n,guid:n.guid,selector:i,needsContext:i&&x.expr.match.needsContext.test(i),namespace:f.join(".")},o),(p=a[h])||((p=a[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,l,f,r)||e.addEventListener&&e.addEventListener(h,r)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),x.event.global[h]=!0)},remove:function(e,t,n,l,i){var o,r,u,a,s,c,d,p,h,f,g,m=Q.hasData(e)&&Q.get(e);if(m&&(a=m.events)){for(s=(t=(t||"").match(F)||[""]).length;s--;)if(h=g=(u=Ee.exec(t[s])||[])[1],f=(u[2]||"").split(".").sort(),h){for(d=x.event.special[h]||{},p=a[h=(l?d.delegateType:d.bindType)||h]||[],u=u[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||l&&l!==c.selector&&("**"!==l||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));r&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,f,m.handle)||x.removeEvent(e,h,m.handle),delete a[h])}else for(h in a)x.event.remove(e,h+t[s],n,l,!0);x.isEmptyObject(a)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,l,i,o,r,u=new Array(arguments.length),a=x.event.fix(e),s=(Q.get(this,"events")||Object.create(null))[a.type]||[],c=x.event.special[a.type]||{};for(u[0]=a,t=1;t=1))for(;s!==this;s=s.parentNode||this)if(1===s.nodeType&&("click"!==e.type||!0!==s.disabled)){for(o=[],r={},n=0;n-1:x.find(i,this,null,[s]).length),r[i]&&o.push(l);o.length&&u.push({elem:s,handlers:o})}return s=this,a\s*$/g;function Le(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function Ae(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,l,i,o,r,u;if(1===t.nodeType){if(Q.hasData(e)&&(u=Q.get(e).events))for(i in Q.remove(t,"handle events"),u)for(n=0,l=u[i].length;n1&&"string"==typeof f&&!m.checkClone&&Me.test(f))return e.each(function(i){var o=e.eq(i);g&&(t[0]=f.call(this,i,o.html())),Ve(o,t,n,l)});if(p&&(o=(i=_e(t,e[0].ownerDocument,!1,e,l)).firstChild,1===i.childNodes.length&&(i=o),o||l)){for(u=(r=x.map(be(i,"script"),Ae)).length;d0&&Ce(r,!d&&be(e,"script")),c},cleanData:function(e){for(var t,n,l,i=x.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[Q.expando]){if(t.events)for(l in t.events)i[l]?x.event.remove(n,l):x.removeEvent(n,l,t.handle);n[Q.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),x.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return $(this,function(e){return void 0===e?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ve(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Ve(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,l=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Re.test(e)&&!ye[(me.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;n3,oe.removeChild(e)),u}}))}();var We=["Webkit","Moz","ms"],qe=b.createElement("div").style,Ke={};function Ye(e){return x.cssProps[e]||Ke[e]||(e in qe?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in qe)return e}(e)||e)}var Ze=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Xe={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"};function et(e,t,n){var l=le.exec(t);return l?Math.max(0,l[2]-(n||0))+(l[3]||"px"):t}function tt(e,t,n,l,i,o){var r="width"===t?1:0,u=0,a=0;if(n===(l?"border":"content"))return 0;for(;r<4;r+=2)"margin"===n&&(a+=x.css(e,n+ie[r],!0,i)),l?("content"===n&&(a-=x.css(e,"padding"+ie[r],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+ie[r]+"Width",!0,i))):(a+=x.css(e,"padding"+ie[r],!0,i),"padding"!==n?a+=x.css(e,"border"+ie[r]+"Width",!0,i):u+=x.css(e,"border"+ie[r]+"Width",!0,i));return!l&&o>=0&&(a+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-a-u-.5))||0),a}function nt(e,t,n){var l=Be(e),i=(!m.boxSizingReliable()||n)&&"border-box"===x.css(e,"boxSizing",!1,l),o=i,r=$e(e,t,l),u="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(r)){if(!n)return r;r="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&D(e,"tr")||"auto"===r||!parseFloat(r)&&"inline"===x.css(e,"display",!1,l))&&e.getClientRects().length&&(i="border-box"===x.css(e,"boxSizing",!1,l),(o=u in e)&&(r=e[u])),(r=parseFloat(r)||0)+tt(e,t,n||(i?"border":"content"),o,l,r)+"px"}function lt(e,t,n,l,i){return new lt.prototype.init(e,t,n,l,i)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,l){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,r,u=K(t),a=Qe.test(t),s=e.style;if(a||(t=Ye(u)),r=x.cssHooks[t]||x.cssHooks[u],void 0===n)return r&&"get"in r&&void 0!==(i=r.get(e,!1,l))?i:s[t];"string"==(o=typeof n)&&(i=le.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||a||(n+=i&&i[3]||(x.cssNumber[u]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(s[t]="inherit"),r&&"set"in r&&void 0===(n=r.set(e,n,l))||(a?s.setProperty(t,n):s[t]=n))}},css:function(e,t,n,l){var i,o,r,u=K(t);return Qe.test(t)||(t=Ye(u)),(r=x.cssHooks[t]||x.cssHooks[u])&&"get"in r&&(i=r.get(e,!0,n)),void 0===i&&(i=$e(e,t,l)),"normal"===i&&t in Je&&(i=Je[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,l){if(n)return!Ze.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,l):ze(e,Xe,function(){return nt(e,t,l)})},set:function(e,n,l){var i,o=Be(e),r=!m.scrollboxSize()&&"absolute"===o.position,u=(r||l)&&"border-box"===x.css(e,"boxSizing",!1,o),a=l?tt(e,t,l,u,o):0;return u&&r&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-tt(e,t,"border",!1,o)-.5)),a&&(i=le.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=x.css(e,t)),et(0,n,a)}}}),x.cssHooks.marginLeft=Ge(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat($e(e,"marginLeft"))||e.getBoundingClientRect().left-ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){for(var l=0,i={},o="string"==typeof n?n.split(" "):[n];l<4;l++)i[e+ie[l]+t]=o[l]||o[l-2]||o[0];return i}},"margin"!==e&&(x.cssHooks[e+t].set=et)}),x.fn.extend({css:function(e,t){return $(this,function(e,t,n){var l,i,o={},r=0;if(Array.isArray(t)){for(l=Be(e),i=t.length;r1)}}),x.Tween=lt,(lt.prototype={constructor:lt,init:function(e,t,n,l,i,o){this.elem=e,this.prop=n,this.easing=i||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=l,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=lt.propHooks[this.prop];return e&&e.get?e.get(this):lt.propHooks._default.get(this)},run:function(e){var t,n=lt.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):lt.propHooks._default.set(this),this}}).init.prototype=lt.prototype,(lt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=x.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):1!==e.elem.nodeType||!x.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:x.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=lt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},x.fx=lt.prototype.init,x.fx.step={};var it,ot,rt=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function at(){ot&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(at):n.setTimeout(at,x.fx.interval),x.fx.tick())}function st(){return n.setTimeout(function(){it=void 0}),it=Date.now()}function ct(e,t){var n,l=0,i={height:e};for(t=t?1:0;l<4;l+=2-t)i["margin"+(n=ie[l])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function dt(e,t,n){for(var l,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,r=i.length;o1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})}}),x.extend({attr:function(e,t,n){var l,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?x.prop(e,t,n):(1===o&&x.isXMLDoc(e)||(i=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void x.removeAttr(e,t):i&&"set"in i&&void 0!==(l=i.set(e,n,t))?l:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(l=i.get(e,t))?l:null==(l=x.find.attr(e,t))?void 0:l)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,l=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[l++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ft[t]||x.find.attr;ft[t]=function(e,t,l){var i,o,r=t.toLowerCase();return l||(o=ft[r],ft[r]=i,i=null!=n(e,t,l)?r:null,ft[r]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function vt(e){return(e.match(F)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}x.fn.extend({prop:function(e,t){return $(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})}}),x.extend({prop:function(e,t,n){var l,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&x.isXMLDoc(e)||(i=x.propHooks[t=x.propFix[t]||t]),void 0!==n?i&&"set"in i&&void 0!==(l=i.set(e,n,t))?l:e[t]=n:i&&"get"in i&&null!==(l=i.get(e,t))?l:e[t]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(x.propHooks.selected={get:function(e){return null},set:function(e){}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(e){var t,n,l,i,o,r,u,a=0;if(v(e))return this.each(function(t){x(this).addClass(e.call(this,t,yt(this)))});if((t=bt(e)).length)for(;n=this[a++];)if(i=yt(n),l=1===n.nodeType&&" "+vt(i)+" "){for(r=0;o=t[r++];)l.indexOf(" "+o+" ")<0&&(l+=o+" ");i!==(u=vt(l))&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,l,i,o,r,u,a=0;if(v(e))return this.each(function(t){x(this).removeClass(e.call(this,t,yt(this)))});if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[a++];)if(i=yt(n),l=1===n.nodeType&&" "+vt(i)+" "){for(r=0;o=t[r++];)for(;l.indexOf(" "+o+" ")>-1;)l=l.replace(" "+o+" "," ");i!==(u=vt(l))&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e,l="string"===n||Array.isArray(e);return"boolean"==typeof t&&l?t?this.addClass(e):this.removeClass(e):v(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,yt(this),t),t)}):this.each(function(){var t,i,o,r;if(l)for(i=0,o=x(this),r=bt(e);t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=yt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,l=0;for(t=" "+e+" ";n=this[l++];)if(1===n.nodeType&&(" "+vt(yt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Ct=/\r/g;x.fn.extend({val:function(e){var t,n,l,i=this[0];return arguments.length?(l=v(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=l?e.call(this,n,x(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ct,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:vt(x.text(e))}},select:{get:function(e){var t,n,l,i=e.options,o=e.selectedIndex,r="select-one"===e.type,u=r?null:[],a=r?o+1:i.length;for(l=o<0?a:r?o:0;l-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=x.inArray(x(e).val(),t)>-1}},m.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in n;var wt=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(e,t,l,i){var o,r,u,a,s,c,d,p,f=[l||b],g=h.call(e,"type")?e.type:e,m=h.call(e,"namespace")?e.namespace.split("."):[];if(r=p=u=l=l||b,3!==l.nodeType&&8!==l.nodeType&&!wt.test(g+x.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),s=g.indexOf(":")<0&&"on"+g,(e=e[x.expando]?e:new x.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=l),t=null==t?[e]:x.makeArray(t,[e]),d=x.event.special[g]||{},i||!d.trigger||!1!==d.trigger.apply(l,t))){if(!i&&!d.noBubble&&!y(l)){for(wt.test((a=d.delegateType||g)+g)||(r=r.parentNode);r;r=r.parentNode)f.push(r),u=r;u===(l.ownerDocument||b)&&f.push(u.defaultView||u.parentWindow||n)}for(o=0;(r=f[o++])&&!e.isPropagationStopped();)p=r,e.type=o>1?a:d.bindType||g,(c=(Q.get(r,"events")||Object.create(null))[e.type]&&Q.get(r,"handle"))&&c.apply(r,t),(c=s&&r[s])&&c.apply&&Y(r)&&(e.result=c.apply(r,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!Y(l)||s&&v(l[g])&&!y(l)&&((u=l[s])&&(l[s]=null),x.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,_t),l[g](),e.isPropagationStopped()&&p.removeEventListener(g,_t),x.event.triggered=void 0,u&&(l[s]=u)),e.result}},simulate:function(e,t,n){var l=x.extend(new x.Event,n,{type:e,isSimulated:!0});x.event.trigger(l,null,t)}}),x.fn.extend({trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return x.event.trigger(e,t,n,!0)}}),m.focusin||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){x.event.simulate(t,e.target,x.event.fix(e))};x.event.special[t]={setup:function(){var l=this.ownerDocument||this.document||this,i=Q.access(l,t);i||l.addEventListener(e,n,!0),Q.access(l,t,(i||0)+1)},teardown:function(){var l=this.ownerDocument||this.document||this,i=Q.access(l,t)-1;i?Q.access(l,t,i):(l.removeEventListener(e,n,!0),Q.remove(l,t))}}});var xt=n.location,St={guid:Date.now()},Et=/\?/;x.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(l){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+e),t};var It=/\[\]$/,Ot=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function kt(e,t,n,l){var i;if(Array.isArray(t))x.each(t,function(t,i){n||It.test(e)?l(e,i):kt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,l)});else if(n||"object"!==_(t))l(e,t);else for(i in t)kt(e+"["+i+"]",t[i],n,l)}x.param=function(e,t){var n,l=[],i=function(e,t){var n=v(t)?t():t;l[l.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)kt(n,e[n],t,i);return l.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&Dt.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!ge.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(Ot,"\r\n")}}):{name:t.name,value:n.replace(Ot,"\r\n")}}).get()}});var Rt=/%20/g,Mt=/#.*$/,Nt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:GET|HEAD)$/,Pt=/^\/\//,Ft={},Vt={},jt="*/".concat("*"),Ht=b.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var l,i=0,o=t.toLowerCase().match(F)||[];if(v(n))for(;l=o[i++];)"+"===l[0]?(l=l.slice(1)||"*",(e[l]=e[l]||[]).unshift(n)):(e[l]=e[l]||[]).push(n)}}function zt(e,t,n,l){var i={},o=e===Vt;function r(u){var a;return i[u]=!0,x.each(e[u]||[],function(e,u){var s=u(t,n,l);return"string"!=typeof s||o||i[s]?o?!(a=s):void 0:(t.dataTypes.unshift(s),r(s),!1)}),a}return r(t.dataTypes[0])||!i["*"]&&r("*")}function Ut(e,t){var n,l,i=x.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:l||(l={}))[n]=t[n]);return l&&x.extend(!0,e,l),e}Ht.href=xt.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,x.ajaxSettings),t):Ut(x.ajaxSettings,e)},ajaxPrefilter:Bt(Ft),ajaxTransport:Bt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0);var l,i,o,r,u,a,s,c,d,p,h=x.ajaxSetup({},t=t||{}),f=h.context||h,g=h.context&&(f.nodeType||f.jquery)?x(f):x.event,m=x.Deferred(),v=x.Callbacks("once memory"),y=h.statusCode||{},C={},w={},_="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(s){if(!r)for(r={};t=Lt.exec(o);)r[t[1].toLowerCase()+" "]=(r[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=r[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return s?o:null},setRequestHeader:function(e,t){return null==s&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==s&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(s)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||_;return l&&l.abort(t),E(0,t),this}};if(m.promise(S),h.url=((e||h.url||xt.href)+"").replace(Pt,xt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(F)||[""],null==h.crossDomain){a=b.createElement("a");try{a.href=h.url,a.href=a.href,h.crossDomain=Ht.protocol+"//"+Ht.host!=a.protocol+"//"+a.host}catch(I){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=x.param(h.data,h.traditional)),zt(Ft,h,t,S),s)return S;for(d in(c=x.event&&h.global)&&0==x.active++&&x.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!At.test(h.type),i=h.url.replace(Mt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Rt,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Et.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Nt,"$1"),p=(Et.test(i)?"&":"?")+"_="+St.guid+++p),h.url=i+p),h.ifModified&&(x.lastModified[i]&&S.setRequestHeader("If-Modified-Since",x.lastModified[i]),x.etag[i]&&S.setRequestHeader("If-None-Match",x.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+jt+"; q=0.01":""):h.accepts["*"]),h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(f,S,h)||s))return S.abort();if(_="abort",v.add(h.complete),S.done(h.success),S.fail(h.error),l=zt(Vt,h,t,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,h]),s)return S;h.async&&h.timeout>0&&(u=n.setTimeout(function(){S.abort("timeout")},h.timeout));try{s=!1,l.send(C,E)}catch(I){if(s)throw I;E(-1,I)}}else E(-1,"No Transport");function E(e,t,r,a){var d,p,b,C,w,_=t;s||(s=!0,u&&n.clearTimeout(u),l=void 0,o=a||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,r&&(C=function(e,t,n){for(var l,i,o,r,u=e.contents,a=e.dataTypes;"*"===a[0];)a.shift(),void 0===l&&(l=e.mimeType||t.getResponseHeader("Content-Type"));if(l)for(i in u)if(u[i]&&u[i].test(l)){a.unshift(i);break}if(a[0]in n)o=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){o=i;break}r||(r=i)}o=o||r}if(o)return o!==a[0]&&a.unshift(o),n[o]}(h,S,r)),!d&&x.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),C=function(e,t,n,l){var i,o,r,u,a,s={},c=e.dataTypes.slice();if(c[1])for(r in e.converters)s[r.toLowerCase()]=e.converters[r];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!a&&l&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=o,o=c.shift())if("*"===o)o=a;else if("*"!==a&&a!==o){if(!(r=s[a+" "+o]||s["* "+o]))for(i in s)if((u=i.split(" "))[1]===o&&(r=s[a+" "+u[0]]||s["* "+u[0]])){!0===r?r=s[i]:!0!==s[i]&&(o=u[0],c.unshift(u[1]));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(I){return{state:"parsererror",error:r?I:"No conversion from "+a+" to "+o}}}return{state:"success",data:t}}(h,C,S,d),d?(h.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(x.lastModified[i]=w),(w=S.getResponseHeader("etag"))&&(x.etag[i]=w)),204===e||"HEAD"===h.type?_="nocontent":304===e?_="notmodified":(_=C.state,p=C.data,d=!(b=C.error))):(b=_,!e&&_||(_="error",e<0&&(e=0))),S.status=e,S.statusText=(t||_)+"",d?m.resolveWith(f,[p,_,S]):m.rejectWith(f,[S,_,b]),S.statusCode(y),y=void 0,c&&g.trigger(d?"ajaxSuccess":"ajaxError",[S,h,d?p:b]),v.fireWith(f,[S,_]),c&&(g.trigger("ajaxComplete",[S,h]),--x.active||x.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,void 0,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,l,i){return v(n)&&(i=i||l,l=n,n=void 0),x.ajax(x.extend({url:e,type:t,dataType:i,data:n,success:l},x.isPlainObject(e)&&e))}}),x.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),x._evalUrl=function(e,t,n){return x.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){x.globalEval(e,t,n)}})},x.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(e){return!x.expr.pseudos.visible(e)},x.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},Gt=x.ajaxSettings.xhr();m.cors=!!Gt&&"withCredentials"in Gt,m.ajax=Gt=!!Gt,x.ajaxTransport(function(e){var t,l;if(m.cors||Gt&&!e.crossDomain)return{send:function(i,o){var r,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)u[r]=e.xhrFields[r];for(r in e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)u.setRequestHeader(r,i[r]);t=function(e){return function(){t&&(t=l=u.onload=u.onerror=u.onabort=u.ontimeout=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?o(0,"error"):o(u.status,u.statusText):o($t[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),l=u.onerror=u.ontimeout=t("error"),void 0!==u.onabort?u.onabort=l:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){t&&l()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}}),x.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(l,i){t=x(" - - - -
-
- -
-
-
- -
- -
-
-
-
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_component.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_component.html deleted file mode 100644 index 2b99921b30..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_component.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - -
-
-
- -
- -
-
-
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_daterange.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_daterange.html deleted file mode 100644 index 9d158e78c0..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_daterange.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - -
-
-
- -
to
- -
-
-
-
- -
to
- -
-
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_inline.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_inline.html deleted file mode 100644 index ff4e8ed559..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_inline.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - -
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_input.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_input.html deleted file mode 100644 index 2e1c289f47..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/markup_input.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_calendarweeks.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_calendarweeks.html deleted file mode 100644 index 7565f89395..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_calendarweeks.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
- -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_clearbtn.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_clearbtn.html deleted file mode 100644 index a4b5ef059c..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_clearbtn.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_daysofweekdisabled.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_daysofweekdisabled.html deleted file mode 100644 index bd31b38c02..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_daysofweekdisabled.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_enddate.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_enddate.html deleted file mode 100644 index 43da9d9d64..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_enddate.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_language.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_language.html deleted file mode 100644 index 37f5930d02..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_language.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_multidate.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_multidate.html deleted file mode 100644 index 191b239b8b..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_multidate.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - -
-
- -
-
- -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_showweekdays.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_showweekdays.html deleted file mode 100644 index 85cb229dfd..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_showweekdays.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_startdate.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_startdate.html deleted file mode 100644 index ce97784308..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_startdate.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_todaybtn.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_todaybtn.html deleted file mode 100644 index 08430120d1..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_todaybtn.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_todayhighlight.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_todayhighlight.html deleted file mode 100644 index fb38008fb2..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_todayhighlight.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -
-
- -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_weekstart.html b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_weekstart.html deleted file mode 100644 index e55a04fc76..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/option_weekstart.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
- -
-
- -
-
- -
-
- - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/common.css b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/common.css deleted file mode 100644 index 0535e8cead..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/common.css +++ /dev/null @@ -1,9 +0,0 @@ -@import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'); -@import url('../../../dist/css/bootstrap-datepicker3.min.css'); - -body { - /* Padding around all elements to allow space for screenshots */ - padding: 10px; - /* Transparent background for PNG screenshots */ - background: none; -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/common.js b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/common.js deleted file mode 100644 index ebadc02712..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/common.js +++ /dev/null @@ -1,2 +0,0 @@ -document.write(""); -document.write(""); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/debug.js b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/debug.js deleted file mode 100644 index e609fa6ba4..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/debug.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - Usage: $ phantomjs --remote-debugger-port=9001 --remote-debugger-autorun=yes debug.js page.html - - Open Chrome tab to http://localhost:9001/; open second link (ie, path to page.html) -*/ -var system = require('system' ), fs = require('fs'), webpage = require('webpage'); - -(function(phantom){ - var page=webpage.create(); - - function debugPage(){ - console.log("Refresh a second debugger-port page and open a second webkit inspector for the target page."); - console.log("Letting this page continue will then trigger a break in the target page."); - debugger; // pause here in first web browser tab for steps 5 & 6 - page.open(system.args[1]); - page.evaluateAsync(function() { - debugger; // step 7 will wait here in the second web browser tab - }); - } - debugPage(); -}(phantom)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/html-imports.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/html-imports.min.js deleted file mode 100644 index 368d2261df..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/html-imports.min.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012 The Polymer Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -window.HTMLImports=window.HTMLImports||{flags:{}},function(a){var b=(a.path,a.xhr),c=function(a,b){this.cache={},this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={}};c.prototype={addNodes:function(a){this.inflight+=a.length,d(a,this.require,this),this.checkDone()},require:function(a){var b=a.src||a.href;a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){return this.pending[a]?(this.pending[a].push(b),!0):this.cache[a]?(this.onload(a,b,this.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,c){var d=function(b,d){this.receive(a,c,b,d)}.bind(this);b.load(a,d)},receive:function(a,b,c,d){c||(this.cache[a]=d),this.pending[a].forEach(function(b){c||this.onload(a,b,d),this.tail()},this),this.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},b=b||{async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(c,d,e){var f=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(c+="?"+Math.random()),f.open("GET",c,b.async),f.addEventListener("readystatechange",function(){4===f.readyState&&d.call(e,!b.ok(f)&&f,f.response||f.responseText,c)}),f.send(),f},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}};var d=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.xhr=b,a.Loader=c}(window.HTMLImports),function(a){function b(a){return c(a,j)}function c(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function d(a){return"script"===a.localName}function e(a,b){var c=a;c instanceof Document||(c=document.implementation.createHTMLDocument(j)),c._URL=b;var d=c.createElement("base");return d.setAttribute("href",b),c.baseURI||(c.baseURI=b),c.head.appendChild(d),a instanceof Document||(c.body.innerHTML=a),window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}function f(a,b){function c(){k==l&&requestAnimationFrame(a)}function d(){k++,c()}b=b||o;var e=HTMLImports.isIE?"complete":"interactive",h="complete"===b.readyState||b.readyState===e;if(!h){var i=function(){("complete"===b.readyState||b.readyState===e)&&(b.removeEventListener("readystatechange",i),f(a,b))};return void b.addEventListener("readystatechange",i)}var j=b.querySelectorAll("link[rel=import]"),k=0,l=j.length;if(l)for(var m,n=0;l>n&&(m=j[n]);n++)g(m)?d.call(m):(m.addEventListener("load",d),m.addEventListener("error",d));else c()}function g(a){return i?a.import&&"loading"!==a.import.readyState:a.__importParsed}var h="import"in document.createElement("link"),i=!a.flags.imports&&h,j="import";if(!i){{var k,l=a.Loader,m=(a.xhr,"stylesheet"),n={documents:{},cache:{},preloadSelectors:["link[rel="+j+"]","template","script[src]:not([type])",'script[src][type="text/javascript"]'].join(","),loader:function(a){if(k&&k.inflight){var b=k.oncomplete;return k.oncomplete=function(){b(),a()},k}return k=new l(n.loaded,a),k.cache=n.cache,k},load:function(a,b){k=n.loader(b),n.preload(a)},preload:function(a){var b=this.marshalNodes(a);k.addNodes(b)},marshalNodes:function(a){var b=a.querySelectorAll(n.preloadSelectors);return b=this.filterMainDocumentNodes(a,b),b=this.extractTemplateNodes(b)},filterMainDocumentNodes:function(a,b){return a===document&&(b=Array.prototype.filter.call(b,function(a){return!d(a)})),b},extractTemplateNodes:function(a){var b=[];return a=Array.prototype.filter.call(a,function(a){if("template"===a.localName){if(a.content){var c=a.content.querySelectorAll("link[rel="+m+"]");c.length&&(b=b.concat(Array.prototype.slice.call(c,0)))}return!1}return!0}),b.length&&(a=a.concat(b)),a},loaded:function(a,c,d){if(b(c)){var f=n.documents[a];f||(f=e(d,a),n.documents[a]=f,n.preload(f)),c.import=c.content=d=f}c.__resource=d}};Array.prototype.forEach.call.bind(Array.prototype.forEach)}a.importer=n}var o=window.ShadowDOMPolyfill?wrap(document):document;Object.defineProperty(o,"_currentScript",{get:function(){return HTMLImports.currentScript||o.currentScript},writeable:!0,configurable:!0}),a.hasNative=h,a.useNative=i,a.whenImportsReady=f,a.IMPORT_LINK_TYPE=j,a.isImportLoaded=g}(window.HTMLImports),function(a){function b(a){var b=a.ownerDocument.createElement("style");return b.textContent=a.textContent,g.resolveUrlsInStyle(b),b}function c(a,b){this.doc=a,this.doc.__loadTracker=this,this.callback=b}function d(a){return"link"===a.localName&&a.getAttribute("rel")===h}function e(a){return a.parentNode&&!f(a)}function f(a){return a.ownerDocument===document||a.ownerDocument.impl===document}var g=a.path,h="import",i=/Trident/.test(navigator.userAgent),j={selectors:["link[rel="+h+"]","link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'],map:{link:"parseLink",script:"parseScript",style:"parseStyle"},parse:function(a,b){if(a.__importParsed)b&&b();else{a.__importParsed=!0;for(var d,e=new c(a,b),f=a.querySelectorAll(j.selectors),g=a.scripts?a.scripts.length:0,h=0;hg&&(e=f[g]);g++)a.addEventListener(e,c)},receive:function(){this.pending--,this.checkDone()},checkDone:function(){this.isOpen&&this.pending<=0&&this.callback&&(this.isOpen=!1,this.callback())}};Array.prototype.forEach.call.bind(Array.prototype.forEach);a.parser=j,a.path=g,a.isIE=i}(HTMLImports),function(){function a(){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime(),c.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))}function b(){HTMLImports.useNative||HTMLImports.importer.load(c,function(){HTMLImports.parser.parse(c)})}"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a,b){var c=document.createEvent("HTMLEvents");return c.initEvent(a,b.bubbles===!1?!1:!0,b.cancelable===!1?!1:!0,b.detail),c});var c=window.ShadowDOMPolyfill?window.ShadowDOMPolyfill.wrapIfNeeded(document):document;HTMLImports.useNative||("complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?b():document.addEventListener("DOMContentLoaded",b)),HTMLImports.whenImportsReady(function(){a()})}(); -//# sourceMappingURL=html-imports.min.map \ No newline at end of file diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/screenshot.js b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/screenshot.js deleted file mode 100644 index 920d030cc0..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_screenshots/script/screenshot.js +++ /dev/null @@ -1,69 +0,0 @@ -/* jshint phantom:true, devel:true */ -/* Usage: phantomjs screenshot.js in.html out.png */ - -var sys = require('system'), - page = new WebPage(); -page.viewportSize = { - width: 800, - height: 600 -}; - -page.open(sys.args[1], function(status){ - if (status !== 'success'){ - console.log('Bad status: %s', status); - phantom.exit(1); - } - window.setTimeout(function(){ - var box = page.evaluate(function(){ - var lefts, rights, tops, bottoms, - padding = 10, // px - selection, show; - - // Call setup method - if (window.setup) - window.setup(); - // Show all pickers, or only those marked for showing - show = $('body').data('show'); - show = show ? $(show) : $('*'); - show - .filter(function(){ - return 'datepicker' in $(this).data(); - }) - .datepicker('show'); - - // Get bounds of selected elements - selection = $($('body').data('capture')); - tops = selection.map(function(){ - return $(this).offset().top; - }).toArray(); - lefts = selection.map(function(){ - return $(this).offset().left; - }).toArray(); - bottoms = selection.map(function(){ - return $(this).offset().top + $(this).outerHeight(); - }).toArray(); - rights = selection.map(function(){ - return $(this).offset().left + $(this).outerWidth(); - }).toArray(); - - // Convert bounds to single bounding box - var b = { - top: Math.min.apply(Math, tops), - left: Math.min.apply(Math, lefts) - }; - b.width = Math.max.apply(Math, rights) - b.left; - b.height = Math.max.apply(Math, bottoms) - b.top; - - // Return bounding box - return { - top: Math.max(b.top - padding, 0), - left: Math.max(b.left - padding, 0), - width: b.width + 2 * padding, - height: b.height + 2 * padding - }; - }); - page.clipRect = box; - page.render(sys.args[2]); - phantom.exit(); - }, 1); -}); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/demo_head.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/demo_head.png deleted file mode 100644 index 1207162c40..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/demo_head.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_component.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_component.png deleted file mode 100644 index 18df9d01df..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_component.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_daterange.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_daterange.png deleted file mode 100644 index 9c9a2d448c..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_daterange.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_inline.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_inline.png deleted file mode 100644 index 2e811ee0c2..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_inline.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_input.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_input.png deleted file mode 100644 index e0852075b9..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/markup_input.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_calendarweeks.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_calendarweeks.png deleted file mode 100644 index 588bb8d1ba..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_calendarweeks.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_clearbtn.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_clearbtn.png deleted file mode 100644 index a80cd1286c..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_clearbtn.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_daysofweekdisabled.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_daysofweekdisabled.png deleted file mode 100644 index 23efc19d9d..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_daysofweekdisabled.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_enddate.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_enddate.png deleted file mode 100644 index 9b960a2f4e..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_enddate.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_language.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_language.png deleted file mode 100644 index de840747c7..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_language.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_multidate.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_multidate.png deleted file mode 100644 index 25dd5a8d8f..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_multidate.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_showweekdays.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_showweekdays.png deleted file mode 100644 index 0475d1a044..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_showweekdays.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_startdate.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_startdate.png deleted file mode 100644 index 7766476a9c..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_startdate.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_todaybtn.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_todaybtn.png deleted file mode 100644 index de4a1450c1..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_todaybtn.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_todayhighlight.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_todayhighlight.png deleted file mode 100644 index f15408d647..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_todayhighlight.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_weekstart.png b/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_weekstart.png deleted file mode 100644 index bafbe9e1df..0000000000 Binary files a/modules/http/webif/gstatic/bootstrap-datepicker/docs/_static/screenshots/option_weekstart.png and /dev/null differ diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/conf.py b/modules/http/webif/gstatic/bootstrap-datepicker/docs/conf.py deleted file mode 100644 index 131dd5214e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/conf.py +++ /dev/null @@ -1,249 +0,0 @@ -# -*- coding: utf-8 -*- -# -# bootstrap-datepicker documentation build configuration file, created by -# sphinx-quickstart on Fri Aug 2 14:45:57 2013. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys, os - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -#version = '' -# The full version, including alpha/beta/rc tags. -#release = '' - -import sphinx_rtd_theme - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -primary_domain = 'js' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = [] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'bootstrap-datepicker' -copyright = u'2016, eternicode' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -highlight_language = 'javascript' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'sphinx_rtd_theme' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = ['_themes',] -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'bootstrap-datepickerdoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'bootstrap-datepicker.tex', u'bootstrap-datepicker Documentation', - u'eternicode', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'bootstrap-datepicker', u'bootstrap-datepicker Documentation', - [u'eternicode'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'bootstrap-datepicker', u'bootstrap-datepicker Documentation', - u'eternicode', 'bootstrap-datepicker', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/events.rst b/modules/http/webif/gstatic/bootstrap-datepicker/docs/events.rst deleted file mode 100644 index 89ffddb0b3..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/events.rst +++ /dev/null @@ -1,63 +0,0 @@ -Events -====== - -Datepicker triggers a number of events in certain circumstances. All events have extra data attached to the event object that is passed to any event handlers - -:: - - $('.datepicker').datepicker() - .on(picker_event, function(e) { - // `e` here contains the extra attributes - }); - -* ``date``: the relevant Date object, in local timezone. For a multidate picker, this will be the latest date picked. -* ``dates``: an Array of Date objects, in local timezone, when using a multidate picker. -* ``format([ix], [format])``: a function to make formatting ``date`` easier. ``ix`` can be the index of a Date in the ``dates`` array to format; if absent, the last date selected will be used. ``format`` can be any format string that datepicker supports; if absent, the format set on the datepicker will be used. Both arguments are optional. - - -show ----- - -Fired when the date picker is displayed. - - -hide ----- - -Fired when the date picker is hidden. - - -clearDate ---------- - -Fired when the date is cleared, normally when the "clear" button (enabled with the ``clearBtn`` option) is pressed. - - -changeDate ----------- - -Fired when the date is changed. - - -changeMonth ------------ - -Fired when the *view* month is changed from year view. - - -changeYear ----------- - -Fired when the *view* year is changed from decade view. - - -changeDecade ------------- - -Fired when the *view* decade is changed from century view. - - -changeCentury -------------- - -Fired when the *view* century is changed from millennium view. diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/i18n.rst b/modules/http/webif/gstatic/bootstrap-datepicker/docs/i18n.rst deleted file mode 100644 index ba2928aee6..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/i18n.rst +++ /dev/null @@ -1,36 +0,0 @@ -I18N -==== - -The plugin supports i18n for the month and weekday names and the ``weekStart`` option. The default is English ("en"); other available translations are available in the ``js/locales/`` directory, simply include your desired locale after the plugin. To add more languages, simply add a key to ``$.fn.datepicker.dates``, before calling ``.datepicker()``. Example - -:: - - $.fn.datepicker.dates['en'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - clear: "Clear", - format: "mm/dd/yyyy", - titleFormat: "MM yyyy", /* Leverages same syntax as 'format' */ - weekStart: 0 - }; - -Right-to-left languages may also include ``rtl: true`` to make the calendar display appropriately. - -If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add ``charset="UTF-8"`` to your ``script`` tag: - -.. code-block:: html - - - -:: - - $('.datepicker').datepicker({ - language: 'XX' - }); - -.. figure:: _static/screenshots/option_language.png - :align: center diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/index.rst b/modules/http/webif/gstatic/bootstrap-datepicker/docs/index.rst deleted file mode 100644 index 66f1b8cdc5..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/index.rst +++ /dev/null @@ -1,127 +0,0 @@ -bootstrap-datepicker -==================== - -Bootstrap-datepicker provides a flexible datepicker widget in the Bootstrap style. - -.. figure:: _static/screenshots/demo_head.png - :align: center - -Versions are incremented according to `semver `_. - -`Online Demo `_ - - -Requirements ------------- - -* `Bootstrap`_ 2.0.4+ -* `jQuery`_ 1.7.1+ - -.. _Bootstrap: https://getbootstrap.com/ -.. _jQuery: https://jquery.com/ - -These are the specific versions bootstrap-datepicker is tested against (``js`` files) and built against (``css`` files). Use other versions at your own risk. - - -Dependencies ------------- - -Requires bootstrap's dropdown component (``dropdowns.less``) for some styles, and bootstrap's sprites (``sprites.less`` and associated images) for arrows. - -A standalone .css file (including necessary dropdown styles and alternative, text-based arrows) can be generated by running ``build/build_standalone.less`` through the ``lessc`` compiler:: - - $ lessc build/build_standalone.less datepicker.css - - -Usage ------ - -Call the datepicker via javascript:: - - $('.datepicker').datepicker(); - - -Data API -^^^^^^^^ - -As with bootstrap's own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, simply set ``data-provide="datepicker"`` on the element you want to initialize, and it will be intialized lazily, in true bootstrap fashion. For inline datepickers, use ``data-provide="datepicker-inline"``; these will be immediately initialized on page load, and cannot be lazily loaded. - -.. code-block:: html - - - -Markup with component - -.. code-block:: html - -
- -
- -
-
- -You can disable datepicker's data-api in the same way as you would disable other bootstrap plugins:: - - $(document).off('.datepicker.data-api'); - - -Configuration -^^^^^^^^^^^^^ - -:doc:`options` are passed to the ``datepicker`` function via an options hash at instantiation:: - - $('.datepicker').datepicker({ - format: 'mm/dd/yyyy', - startDate: '-3d' - }); - -Most options may be provided as data-attributes on the target element: - -.. code-block:: html - - - -:: - - $('.datepicker').datepicker({ - startDate: '-3d' - }); - -Defaults for all options can be modified directly by changing values in the ``$.fn.datepicker.defaults`` hash:: - - $.fn.datepicker.defaults.format = "mm/dd/yyyy"; - $('.datepicker').datepicker({ - startDate: '-3d' - }); - - -Stylesheets -^^^^^^^^^^^ - -There are a few different stylesheets included in the library. This is an overview of what each file is to be used for: - -:code:`bootstrap-datepicker.css` gives legacy support for twitter bootstrap v2, :code:`bootstrap-datepicker3.css` is used for twitter bootstrap v3 support -and :code:`bootstrap-datepicker.standalone.css` can be used to include the datepicker without depending on the twitter bootstrap library. - -No Conflict mode -^^^^^^^^^^^^^^^^ - -``$.fn.datepicker.noConflict`` provides a way to avoid conflict with other jQuery datepicker plugins:: - - var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value - $.fn.bootstrapDP = datepicker; // give $().bootstrapDP the bootstrap-datepicker functionality - - - -Table of Contents ------------------ - -.. toctree:: - - markup - options - methods - events - keyboard - i18n diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/keyboard.rst b/modules/http/webif/gstatic/bootstrap-datepicker/docs/keyboard.rst deleted file mode 100644 index e34ba65d6e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/keyboard.rst +++ /dev/null @@ -1,27 +0,0 @@ -Keyboard support -================ - -The datepicker includes keyboard navigation. The "focused date" is kept track of and highlighted (as with mouse hover) during keyboard nav, and is cleared when a date is toggled or the picker is hidden. - -up, down, left, right arrow keys --------------------------------- - -By themselves, left/right will move focus backward/forward one day, up/down will move focus back/forward one week. - -With the shift key, up/left will move focus backward one month, down/right will move focus forward one month. - -With the ctrl key, up/left will move focus backward one year, down/right will move focus forward one year. - -Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year. - -enter ------ - -When the picker is visible, enter will toggle the focused date (if there is one). When the picker is not visible, enter will have normal effects -- submitting the current form, etc. - -When the date is deselected, the ``clearDate`` event is triggered; otherwise, the ``changeDate`` event is triggered. If ``autoclose`` is enabled, the picker will be hidden after selection or deselection. - -escape ------- - -The escape key can be used to clear the focused date and hide and re-show the datepicker; hiding the picker is necessary if the user wants to manually edit the value. diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/make.bat b/modules/http/webif/gstatic/bootstrap-datepicker/docs/make.bat deleted file mode 100644 index 282b37a8f3..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/make.bat +++ /dev/null @@ -1,190 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\bootstrap-datepicker.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\bootstrap-datepicker.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/markup.rst b/modules/http/webif/gstatic/bootstrap-datepicker/docs/markup.rst deleted file mode 100644 index 546b844e98..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/markup.rst +++ /dev/null @@ -1,89 +0,0 @@ -Markup -======= - -The following are examples of supported markup. On their own, these will not provide a datepicker widget; you will need to instantiate the datepicker on the markup. - - -input ------ - -The simplest case: focusing the input (clicking or tabbing into it) will show the picker. - -.. code-block:: html - - - -.. figure:: _static/screenshots/markup_input.png - :align: center - -component ---------- - -Adding the ``date`` class to an ``input-group`` bootstrap component will allow the ``input-group-addon`` elements to trigger the picker. - -.. code-block:: html - -
- -
- -
-
- -.. figure:: _static/screenshots/markup_component.png - :align: center - -.. _daterange: - -date-range ----------- - -Using the ``input-daterange`` construct with multiple child inputs will instantiate one picker per input and link them together to allow selecting ranges. - -.. code-block:: html - -
- -
to
- -
- -.. figure:: _static/screenshots/markup_daterange.png - :align: center - -Note that that ``input-daterange`` itself does not implement the ``datepicker`` methods. Methods should be directly called to the inputs. For example: - -:: - - $('.input-daterange input').each(function() { - $(this).datepicker('clearDates'); - }); - -inline or embedded ------------------- - -Instantiating the datepicker on a simple div will give an embedded picker that is always visible. - -.. code-block:: html - -
- -.. figure:: _static/screenshots/markup_inline.png - :align: center - - -Example to save the embedded datepicker value to a hidden field - -.. code-block:: html - -
- - -:: - - $('#datepicker').datepicker(); - $('#datepicker').on('changeDate', function() { - $('#my_hidden_input').val( - $('#datepicker').datepicker('getFormattedDate') - ); - }); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/methods.rst b/modules/http/webif/gstatic/bootstrap-datepicker/docs/methods.rst deleted file mode 100644 index f4be72b6e9..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/methods.rst +++ /dev/null @@ -1,226 +0,0 @@ -Methods -======= - -Methods are called on a datepicker by calling the ``datepicker`` function with a string first argument, followed by any arguments the method takes - -:: - - $('.datepicker').datepicker('method', arg1, arg2); - - -destroy -------- - -Arguments: None - -Remove the datepicker. Removes attached events, internal attached objects, and added HTML elements. - -*Alias: remove* - - -show ----- - -Arguments: None - -Show the picker. - - -hide ----- - -Arguments: None - -Hide the picker. - - -update ------- - -Arguments: - -* date (String|Date|Array, optional) -* date (String|Date, optional) -* ... - -Update the datepicker with given arguments or the current input value. -The arguments can be either an array of strings, an array of Date objects, multiples strings or multiples Date objects. -If ``date`` arguments are provided and they are Date objects, it is assumed to be "local" Date objects, and will be converted to UTC for internal use. - -:: - - $('.datepicker').datepicker('update'); - $('.datepicker').datepicker('update', '2011-03-05'); - $('.datepicker').datepicker('update', '2011-03-05', '2011-03-07'); - $('.datepicker').datepicker('update', new Date(2011, 2, 5)); - $('.datepicker').datepicker('update', [new Date(2011, 2, 5), new Date(2011, 2, 7)]); - -To reset the datepicker and clear the selected date, pass an empty string with ``update``: - -:: - - $('.datepicker').datepicker('update', ''); - - -setDate -------- - -Arguments: - -* date (Date) - -Sets the internal date. ``date`` is assumed to be a "local" date object, and will be converted to UTC for internal use. - - -setUTCDate ----------- - -Arguments: - -* date (Date) - -Sets the internal date. ``date`` is assumed to be a UTC date object, and will not be converted. - - -setDates --------- - -Arguments: - -* date[, date[, ...]] (Date) - -or - -* [date[, date[, ...]]] (Array) - -Sets the internal date list; accepts multiple dates or a single array of dates as arguments. Each ``date`` is assumed to be a "local" date object, and will be converted to UTC for internal use. For use with multidate pickers. - - -clearDates ----------- - -Arguments: None - -Clear dates. - - -setUTCDates ------------ - -Arguments: - -* date[, date[, ...]] (Date) - -or - -* [date[, date[, ...]]] (Array) - -Sets the internal date list. Each ``date`` is assumed to be a UTC date object, and will not be converted. For use with multidate pickers. - - -getDate -------- - -Arguments: None - -Returns a localized date object representing the internal date object of the first datepicker in the selection. For multidate pickers, returns the latest date selected. - - -getUTCDate ----------- - -Arguments: None - -Returns the internal UTC date object, as-is and unconverted to local time, of the first datepicker in the selection. For multidate pickers, returns the latest date selected. - - -getDates --------- - -Arguments: None - -Returns a list of localized date objects representing the internal date objects of the first datepicker in the selection. For use with multidate pickers. - - -getUTCDates ------------ - -Arguments: None - -Returns the internal list of UTC date objects, as they are and unconverted to local time, of the first datepicker in the selection. For use with multidate pickers. - - -getStartDate ------------- - -Arguments: None - -Returns the lower date limit on the datepicker. - - -getEndDate ----------- - -Arguments: None - -Returns the upper date limit on the datepicker. - - -setStartDate ------------- - -Arguments: - -* startDate (Date) - -Sets a new lower date limit on the datepicker. See :ref:`startDate` for valid values. - -Omit startDate (or provide an otherwise falsey value) to unset the limit. - - -setEndDate ----------- - -Arguments: - -* endDate (Date) - -Sets a new upper date limit on the datepicker. See :ref:`endDate` for valid values. - -Omit endDate (or provide an otherwise falsey value) to unset the limit. - - -setDatesDisabled ----------------- - -Arguments: - -* datesDisabled (String|Array) - -Sets the days that should be disabled. See :ref:`datesDisabled` for valid values. - -Omit datesDisabled (or provide an otherwise falsey value) to unset the disabled days. - - -setDaysOfWeekDisabled ---------------------- - -Arguments: - -* daysOfWeekDisabled (String|Array) - -Sets the days of week that should be disabled. See :ref:`daysOfWeekDisabled` for valid values. - -Omit daysOfWeekDisabled (or provide an otherwise falsey value) to unset the disabled days of week. - - -setDaysOfWeekHighlighted ------------------------- - -Arguments: - -* daysOfWeekHighlighted (String|Array) - -Sets the days of week that should be highlighted. See :ref:`daysOfWeekHighlighted` for valid values. - -Omit daysOfWeekHighlighted (or provide an otherwise falsey value) to unset the highlighted days of week. diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/options.rst b/modules/http/webif/gstatic/bootstrap-datepicker/docs/options.rst deleted file mode 100644 index 949cf9fac9..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/options.rst +++ /dev/null @@ -1,570 +0,0 @@ -Options -======= - -All options that take a "Date" can handle a ``Date`` object; a String formatted according to the given ``format``; or a timedelta relative to today, eg "-1d", "+6m +1y", etc, where valid units are "d" (day), "w" (week), "m" (month), and "y" (year). Use "0" as today. -There are also aliases for the relative timedelta's: "yesterday" equals "-1d", "today" is equal to "+0d" and "tomorrow" is equal to "+1d". - -Most options can be provided via data-attributes. An option can be converted to a data-attribute by taking its name, replacing each uppercase letter with its lowercase equivalent preceded by a dash, and prepending "data-date-" to the result. For example, ``startDate`` would be ``data-date-start-date``, ``format`` would be ``data-date-format``, and ``daysOfWeekDisabled`` would be ``data-date-days-of-week-disabled``. - -See the `quick reference`_ for an overview of all options and their default values - -autoclose ---------- - -Boolean. Default: false - -Whether or not to close the datepicker immediately when a date is selected. - - -assumeNearbyYear ----------------- - -Boolean or Integer. Default: false - -If true, manually-entered dates with two-digit years, such as "5/1/15", will be parsed as "2015", not "15". If the year is less than 10 years in advance, the picker will use the current century, otherwise, it will use the previous one. For example "5/1/15" would parse to May 1st, 2015, but "5/1/97" would be May 1st, 1997. - -To configure the number of years in advance that the picker will still use the current century, use an Integer instead of the Boolean true. E.g. "assumeNearbyYear: 20" - - -beforeShowDay -------------- - -Function(Date). Default: $.noop - -A function that takes a date as a parameter and returns one of the following values: - - * undefined to have no effect - * A Boolean, indicating whether or not this date is selectable - * A String representing additional CSS classes to apply to the date's cell - * An object with the following properties: - - * ``enabled``: same as the Boolean value above - * ``classes``: same as the String value above - * ``tooltip``: a tooltip to apply to this date, via the ``title`` HTML attribute - * ``content``: the content to display in the day cell, rather than the default (day of month as text) - - -beforeShowMonth ---------------- - -Function(Date). Default: $.noop - -A function that takes a date as a parameter and returns one of the following values: - - * undefined to have no effect - * A Boolean, indicating whether or not this month is selectable - * A String representing additional CSS classes to apply to the month's cell - * An object with the following properties: - - * ``enabled``: same as the Boolean value above - * ``classes``: same as the String value above - * ``tooltip``: a tooltip to apply to this date, via the ``title`` HTML attribute - - -beforeShowYear --------------- - -Function(Date). Default: $.noop - -A function that takes a date as a parameter and returns one of the following values: - - * undefined to have no effect - * A Boolean, indicating whether or not this year is selectable - * A String representing additional CSS classes to apply to the year's cell - * An object with the following properties: - - * ``enabled``: same as the Boolean value above - * ``classes``: same as the String value above - * ``tooltip``: a tooltip to apply to this year, via the ``title`` HTML attribute - - -beforeShowDecade ----------------- - -Function(Date). Default: $.noop - -A function that takes a date as a parameter and returns one of the following values: - - * undefined to have no effect - * A Boolean, indicating whether or not this year is selectable - * A String representing additional CSS classes to apply to the year's cell - * An object with the following properties: - - * ``enabled``: same as the Boolean value above - * ``classes``: same as the String value above - * ``tooltip``: a tooltip to apply to this year, via the ``title`` HTML attribute - - -beforeShowCentury ------------------ - -Function(Date). Default: $.noop - -A function that takes a date as a parameter and returns one of the following values: - - * undefined to have no effect - * A Boolean, indicating whether or not this year is selectable - * A String representing additional CSS classes to apply to the year's cell - * An object with the following properties: - - * ``enabled``: same as the Boolean value above - * ``classes``: same as the String value above - * ``tooltip``: a tooltip to apply to this year, via the ``title`` HTML attribute - - -calendarWeeks -------------- - -Boolean. Default: false - -Whether or not to show week numbers to the left of week rows. - -.. figure:: _static/screenshots/option_calendarweeks.png - :align: center - - -clearBtn --------- - -Boolean. Default: false - -If true, displays a "Clear" button at the bottom of the datepicker to clear the input value. If "autoclose" is also set to true, this button will also close the datepicker. - -.. figure:: _static/screenshots/option_clearbtn.png - :align: center - - -container ---------- - -String. Default: "body" - -Appends the date picker popup to a specific element; eg: container: '#picker-container' (will default to "body") - -.. _datesDisabled: - - -datesDisabled -------------- - -String, Array. Default: [] - -Array of date strings or a single date string formatted in the given date format - -.. _daysOfWeekDisabled: - - -daysOfWeekDisabled ------------------- - -String, Array. Default: [] - -Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: disable weekends: ``'06'`` or ``'0,6'`` or ``[0,6]``. - -.. figure:: _static/screenshots/option_daysofweekdisabled.png - :align: center - -.. _daysOfWeekHighlighted: - - -daysOfWeekHighlighted ---------------------- - -String, Array. Default: [] - -Days of the week that should be highlighted. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: highlight weekends: ``'06'`` or ``'0,6'`` or ``[0,6]``. - - -defaultViewDate ---------------- - -Date, String or Object with keys ``year``, ``month``, and ``day``. Default: today - -Date to view when initially opening the calendar. The internal value of the date remains today as default, but when the datepicker is first opened the calendar will open to ``defaultViewDate`` rather than today. If this option is not used, "today" remains the default view date. - -This option can be: - * A date, which should be in local timezone. - * A string which must be parsable with ``format``. - * An object with keys ``year``, ``month`` and ``day`` (can't be set from a data attribute). If the given object is missing any of the required keys, their defaults are: - - * ``year``: the current year - * ``month``: 0 (Note that it starts with 0 for January) - * ``day``: 1 - -disableTouchKeyboard --------------------- - -Boolean. Default: false - -If true, no keyboard will show on mobile devices - - -enableOnReadonly ----------------- - -Boolean. Default: true - -If false the datepicker will not show on a readonly datepicker field. - -.. _endDate: - - -endDate -------- - -Date or String. Default: End of time - -The latest date that may be selected; all later dates will be disabled. - -Date should be in local timezone. String must be parsable with ``format``. - -.. figure:: _static/screenshots/option_enddate.png - :align: center - -.. code-block:: html - - - -Will disable all dates after today. - - -forceParse ----------- - -Boolean. Default: true - -Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input's value to the new, valid date, conforming to the given `format`. - - -format ------- - -String. Default: "mm/dd/yyyy" - -The date format, combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy. - -* d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05. -* D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday. -* m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07. -* M, MM: Abbreviated and full month names, respectively. Eg, Jan, January -* yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012. - -Object. - -Custom formatting options - -* toDisplay: function (date, format, language) to convert date object to string, that will be stored in input field -* toValue: function (date, format, language) to convert string object to date, that will be used in date selection - -:: - - $('.datepicker').datepicker({ - format: { - /* - * Say our UI should display a week ahead, - * but textbox should store the actual date. - * This is useful if we need UI to select local dates, - * but store in UTC - */ - toDisplay: function (date, format, language) { - var d = new Date(date); - d.setDate(d.getDate() - 7); - return d.toISOString(); - }, - toValue: function (date, format, language) { - var d = new Date(date); - d.setDate(d.getDate() + 7); - return new Date(d); - } - } - }); - - -immediateUpdates ----------------- - -Boolean. Default: false - -If true, selecting a year or month in the datepicker will update the input value immediately. Otherwise, only selecting a day of the month will update the input value immediately. - - -inputs ------- - -Array, jQuery. Default: None - -A list of inputs to be used in a range picker, which will be attached to the selected element. Allows for explicitly creating a range picker on a non-standard element. - -.. code-block:: html - -
- - -
- -:: - - $('#event_period').datepicker({ - inputs: $('.actual_range') - }); - - -keepEmptyValues ---------------- - -Boolean. Default: false - -Only effective in a range picker. If true, the selected value does not get propagated to other, currently empty, pickers in the range. - - -keyboardNavigation ------------------- - -Boolean. Default: true - -Whether or not to allow date navigation by arrow keys. - -Keyboard navigation is not supported at all for embedded / inline mode. Also it's not working if input element hasn't focus. This could be an issue if used as component or if opened by `show` method. - - -language --------- - -String. Default: "en" - -The IETF code (eg "en" for English, "pt-BR" for Brazilian Portuguese) of the language to use for month and day names. These will also be used as the input's value (and subsequently sent to the server in the case of form submissions). If a full code (eg "de-DE") is supplied the picker will first check for an "de-DE" language and if not found will fallback and check for a "de" language. If an unknown language code is given, English will be used. See :doc:`i18n`. - -.. figure:: _static/screenshots/option_language.png - :align: center - - -maxViewMode ------------ - -Number, String. Default: 4, "centuries" - -Set a maximum limit for the view mode. Accepts: 0 or "days" or "month", 1 or "months" or "year", 2 or "years" or "decade", 3 or "decades" or "century", and 4 or "centuries" or "millenium". -Gives the ability to pick only a day, a month, a year or a decade. The day is set to the 1st for "months", the month is set to January for "years", the year is set to the first year from the decade for "decades", and the year is set to the first from the millennium for "centuries". - - -minViewMode ------------ - -Number, String. Default: 0, "days" - -Set a minimum limit for the view mode. Accepts: 0 or "days" or "month", 1 or "months" or "year", 2 or "years" or "decade", 3 or "decades" or "century", and 4 or "centuries" or "millenium". -Gives the ability to pick only a month, a year or a decade. The day is set to the 1st for "months", and the month is set to January for "years", the year is set to the first year from the decade for "decades", and the year is set to the first from the millennium for "centuries". - - -multidate ---------- - -Boolean, Number. Default: false - -Enable multidate picking. Each date in month view acts as a toggle button, keeping track of which dates the user has selected in order. If a number is given, the picker will limit how many dates can be selected to that number, dropping the oldest dates from the list when the number is exceeded. ``true`` equates to no limit. The input's value (if present) is set to a string generated by joining the dates, formatted, with ``multidateSeparator``. - -For selecting 2 dates as a range please see :ref:`daterange` - -.. figure:: _static/screenshots/option_multidate.png - :align: center - - -multidateSeparator ------------------- - -String. Default: "," - -The string that will appear between dates when generating the input's value. When parsing the input's value for a multidate picker, this will also be used to split the incoming string to separate multiple formatted dates; as such, it is highly recommended that you not use a string that could be a substring of a formatted date (eg, using '-' to separate dates when your format is 'yyyy-mm-dd'). - - -orientation ------------ - -String. Default: "auto" - -A space-separated string consisting of one or two of "left" or "right", "top" or "bottom", and "auto" (may be omitted); for example, "top left", "bottom" (horizontal orientation will default to "auto"), "right" (vertical orientation will default to "auto"), "auto top". Allows for fixed placement of the picker popup. - -"orientation" refers to the location of the picker popup's "anchor"; you can also think of it as the location of the trigger element (input, component, etc) relative to the picker. - -"auto" triggers "smart orientation" of the picker. Horizontal orientation will default to "left" and left offset will be tweaked to keep the picker inside the browser viewport; vertical orientation will simply choose "top" or "bottom", whichever will show more of the picker in the viewport. - - -showOnFocus ------------ - -Boolean. Default: true - -If false, the datepicker will be prevented from showing when the input field associated with it receives focus. - -.. _startdate: - -startDate ---------- - -Date or String. Default: Beginning of time - -The earliest date that may be selected; all earlier dates will be disabled. - -Date should be in local timezone. String must be parsable with ``format``. - -.. figure:: _static/screenshots/option_startdate.png - :align: center - - -startView ---------- - -Number, String. Default: 0, "days" - -The view that the datepicker should show when it is opened. Accepts: 0 or "days" or "month", 1 or "months" or "year", 2 or "years" or "decade", 3 or "decades" or "century", and 4 or "centuries" or "millenium". Useful for date-of-birth datepickers. - - -templates ---------- - -Object. Default: - -:: - - { - leftArrow: '«', - rightArrow: '»' - } - -The templates used to generate some parts of the picker. Each property must be a string with only text, or valid html. -You can use this property to use custom icons libs. for example: - -:: - - { - leftArrow: '', - rightArrow: '' - } - - -showWeekDays ------------- - -Boolean. Default: true - -If false, the datepicker will not append the names of the weekdays to its view. Default behavior is appending the weekdays. - -.. figure:: _static/screenshots/option_showweekdays.png - :align: center - - -title ------ - -String. Default: "" - -The string that will appear on top of the datepicker. If empty the title will be hidden. - - -todayBtn --------- - -Boolean, "linked". Default: false - -If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected. - -.. figure:: _static/screenshots/option_todaybtn.png - :align: center - - -todayHighlight --------------- - -Boolean. Default: false - -If true, highlights the current date. - -.. figure:: _static/screenshots/option_todayhighlight.png - :align: center - - -toggleActive ------------- - -Boolean. Default: false - -If true, selecting the currently active date in the datepicker will unset the respective date. This option is always true when the multidate option is being used. - - -updateViewDate --------------- - -Boolean. Default: true - -If false viewDate is set according to `value` on initialization and updated -* if a day in last oder next month is selected or -* if dates are changed by `setDate`, `setDates`, `setUTCDate` and `setUTCDates` methods. -If `multidate` option is `true` the last selected date or the last date in array -passed to `setDates` or `setUTCDates` is used. - -weekStart ---------- - -Integer. Default: 0 - -Day of the week start. 0 (Sunday) to 6 (Saturday) - -.. figure:: _static/screenshots/option_weekstart.png - :align: center - - -zIndexOffset ------------- - -Integer. Default: 10 - -The CSS z-index of the open datepicker is the maximum z-index of the input and all of its DOM ancestors *plus* the ``zIndexOffset``. - -Quick reference -=============== - -This is a quick overview of all the options and their default values - -===================== ============= -Option Default value -===================== ============= -autoclose false -assumeNearbyYear false -beforeShowDay -beforeShowMonth -beforeShowYear -beforeShowDecade -beforeShowCentury -calendarWeeks false -clearBtn false -container 'body' -datesDisabled [] -daysOfWeekDisabled [] -daysOfWeekHighlighted [] -defaultViewDate today -disableTouchKeyboard false -enableOnReadonly true -endDate Infinity -forceParse true -format 'mm/dd/yyyy' -immediateUpdates false -inputs -keepEmptyValues false -keyboardNavigation true -language 'en' -maxViewMode 4 'centuries' -minViewMode 0 'days' -multidate false -multidateSeparator ',' -orientation 'auto' -showOnFocus true -startDate -Infinity -startView 0 'days' (current month) -templates -title '' -todayBtn false -todayHighlight true -toggleActive false -weekStart 0 (Sunday) -zIndexOffset 10 -===================== ============= diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/docs/requirements.txt b/modules/http/webif/gstatic/bootstrap-datepicker/docs/requirements.txt deleted file mode 100644 index 483a4e9600..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/docs/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -sphinx_rtd_theme diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/grunt/.jshintrc b/modules/http/webif/gstatic/bootstrap-datepicker/grunt/.jshintrc deleted file mode 100644 index 0ea0495e9a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/grunt/.jshintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends" : "../js/.jshintrc", - "asi" : false, - "browser" : false, - "es3" : false, - "node" : true -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/.jscsrc b/modules/http/webif/gstatic/bootstrap-datepicker/js/.jscsrc deleted file mode 100644 index 638b14e2cf..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/.jscsrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "requireSpaceAfterKeywords": [ - "if", "else", "for", "while", "do", "switch", "return" - ], - "disallowSpacesInFunctionExpression": { - "beforeOpeningRoundBrace": true, - "beforeOpeningCurlyBrace": true - }, - "disallowSpacesInsideObjectBrackets": true, - "disallowSpacesInsideArrayBrackets": true, - "disallowSpacesInsideParentheses": true, - "disallowQuotedKeysInObjects": "allButReserved", - "disallowSpaceAfterObjectKeys": true, - "requireSpaceAfterBinaryOperators": ["==", "===", "!=", "!==", ">", "<", ">=", "<="], - "requireSpaceBeforeBinaryOperators": ["==", "===", "!=", "!==", ">", "<", ">=", "<="], - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "disallowSpaceBeforeBinaryOperators": [","], - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "validateLineBreaks": "LF", - "requireKeywordsOnNewLine": ["return", "break", "delete"], - "requireLineFeedAtFileEnd": true -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/.jshintrc b/modules/http/webif/gstatic/bootstrap-datepicker/js/.jshintrc deleted file mode 100644 index 3b766585cc..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/.jshintrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - // Extra globals. - "predef" : [ - "require", - "define" - ], - "jquery": true, - "browser": true, - - "eqeqeq": true, - "freeze": true, - //"indent": 4, // when we move to spaces - "latedef": false, - "undef": true, - "unused": false, - "immed": true, - "trailing": true, - "maxcomplexity": 50, // Can we get this under 5? - //"maxlen": 120, - - "-W014": false, // Bad line breaking before ? (in tertiary operator) - "-W065": false, // Missing radix parameter to parseInt (defaults to 10) - "-W069": false, // Literal accessor is better written in dot notation - "-W100": false // Silently deleted characters (in locales) -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/bootstrap-datepicker.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/bootstrap-datepicker.js index 0e825d2445..a94f79fc11 100644 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/bootstrap-datepicker.js +++ b/modules/http/webif/gstatic/bootstrap-datepicker/js/bootstrap-datepicker.js @@ -1,21 +1,8 @@ -/* ========================================================= - * bootstrap-datepicker.js - * Repo: https://github.com/uxsolutions/bootstrap-datepicker/ - * Demo: https://eternicode.github.io/bootstrap-datepicker/ - * Docs: https://bootstrap-datepicker.readthedocs.org/ - * ========================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at +/*! + * Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker) * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ + * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) + */ (function(factory){ if (typeof define === 'function' && define.amd) { diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/bootstrap-datepicker.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/js/bootstrap-datepicker.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker-en-CA.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker-en-CA.js deleted file mode 100644 index 853773f3a6..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker-en-CA.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Canadian English translation for bootstrap-datepicker - * Mike Nacey - * DEPRECATED: This filename doesn't follow the convention, use bootstrap-datepicker.en-CA.js instead - */ -;(function($){ - $.fn.datepicker.dates['en-CA'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - monthsTitle: "Months", - clear: "Clear", - weekStart: 0, - format: "yyyy-mm-dd" - }; - - $.fn.datepicker.deprecated('This filename doesn\'t follow the convention, use bootstrap-datepicker.en-CA.js instead.'); - -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ar-tn.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ar-tn.js deleted file mode 100644 index 110fe9102f..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ar-tn.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Arabic-Tunisia translation for bootstrap-datepicker - * Souhaieb Besbes - */ -;(function($){ - $.fn.datepicker.dates['ar-tn'] = { - days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], - daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], - daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], - months: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], - monthsShort: ["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويليه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"], - today: "هذا اليوم", - rtl: true - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ar.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ar.js deleted file mode 100644 index 12ae1821d5..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ar.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Arabic translation for bootstrap-datepicker - * Mohammed Alshehri - */ -;(function($){ - $.fn.datepicker.dates['ar'] = { - days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], - daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], - daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], - months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], - monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], - today: "هذا اليوم", - rtl: true - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.az.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.az.js deleted file mode 100644 index 0ca9cad9d1..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.az.js +++ /dev/null @@ -1,14 +0,0 @@ -// Azerbaijani -;(function($){ - $.fn.datepicker.dates['az'] = { - days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"], - daysShort: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], - daysMin: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."], - months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"], - monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"], - today: "Bu gün", - weekStart: 1, - clear: "Təmizlə", - monthsTitle: 'Aylar' - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bg.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bg.js deleted file mode 100644 index 3193e199b4..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bg.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Bulgarian translation for bootstrap-datepicker - * Apostol Apostolov - */ -;(function($){ - $.fn.datepicker.dates['bg'] = { - days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"], - daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб"], - daysMin: ["Н", "П", "В", "С", "Ч", "П", "С"], - months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"], - monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], - today: "днес" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bn.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bn.js deleted file mode 100644 index 05e9ccff32..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bn.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Bengali (Bangla) translation for bootstrap-datepicker - * Karim Khan - * Orif N. Jr. - */ -;(function($){ - $.fn.datepicker.dates['bn'] = { - days: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"], - daysShort: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"], - daysMin: ["রবি","সোম","মঙ্গল","বুধ","বৃহস্পতি","শুক্র","শনি"], - months: ["জানুয়ারী","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"], - monthsShort: ["জানুয়ারী","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","অগাস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"], - today: "আজ", - monthsTitle: "মাস", - clear: "পরিষ্কার", - weekStart: 0, - format: "mm/dd/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.br.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.br.js deleted file mode 100644 index e71e194a34..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.br.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Breton translation for bootstrap-datepicker - * Gwenn Meynier - */ -;(function($){ - $.fn.datepicker.dates['br'] = { - days: ["Sul", "Lun", "Meurzh", "Merc'her", "Yaou", "Gwener", "Sadorn"], - daysShort: ["Sul", "Lun", "Meu.", "Mer.", "Yao.", "Gwe.", "Sad."], - daysMin: ["Su", "L", "Meu", "Mer", "Y", "G", "Sa"], - months: ["Genver", "C'hwevrer", "Meurzh", "Ebrel", "Mae", "Mezheven", "Gouere", "Eost", "Gwengolo", "Here", "Du", "Kerzu"], - monthsShort: ["Genv.", "C'hw.", "Meur.", "Ebre.", "Mae", "Mezh.", "Goue.", "Eost", "Gwen.", "Here", "Du", "Kerz."], - today: "Hiziv", - monthsTitle: "Miz", - clear: "Dilemel", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bs.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bs.js deleted file mode 100644 index 4a76529d95..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.bs.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Bosnian translation for bootstrap-datepicker - */ -;(function($){ - $.fn.datepicker.dates['bs'] = { - days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], - daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], - daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], - months: ["Januar", "Februar", "Mart", "April", "Maj", "Juni", "Juli", "August", "Septembar", "Oktobar", "Novembar", "Decembar"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], - today: "Danas", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ca.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ca.js deleted file mode 100644 index 6ba993c876..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ca.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Catalan translation for bootstrap-datepicker - * J. Garcia - */ -;(function($){ - $.fn.datepicker.dates['ca'] = { - days: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"], - daysShort: ["Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis"], - daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds"], - months: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], - monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], - today: "Avui", - monthsTitle: "Mesos", - clear: "Esborrar", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.cs.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.cs.js deleted file mode 100644 index d4826506b6..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.cs.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Czech translation for bootstrap-datepicker - * Matěj Koubík - * Fixes by Michal Remiš - */ -;(function($){ - $.fn.datepicker.dates['cs'] = { - days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"], - daysShort: ["Ned", "Pon", "Úte", "Stř", "Čtv", "Pát", "Sob"], - daysMin: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"], - months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], - monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"], - today: "Dnes", - clear: "Vymazat", - monthsTitle: "Měsíc", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.cy.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.cy.js deleted file mode 100644 index 553933bc6b..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.cy.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Welsh translation for bootstrap-datepicker - * S. Morris - */ -;(function($){ - $.fn.datepicker.dates['cy'] = { - days: ["Sul", "Llun", "Mawrth", "Mercher", "Iau", "Gwener", "Sadwrn"], - daysShort: ["Sul", "Llu", "Maw", "Mer", "Iau", "Gwe", "Sad"], - daysMin: ["Su", "Ll", "Ma", "Me", "Ia", "Gwe", "Sa"], - months: ["Ionawr", "Chewfror", "Mawrth", "Ebrill", "Mai", "Mehefin", "Gorfennaf", "Awst", "Medi", "Hydref", "Tachwedd", "Rhagfyr"], - monthsShort: ["Ion", "Chw", "Maw", "Ebr", "Mai", "Meh", "Gor", "Aws", "Med", "Hyd", "Tach", "Rha"], - today: "Heddiw" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js deleted file mode 100644 index 022edd6966..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Danish translation for bootstrap-datepicker - * Christian Pedersen - * Ivan Mylyanyk - */ -;(function($){ - $.fn.datepicker.dates['da'] = { - days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], - daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"], - daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø"], - months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], - today: "I Dag", - weekStart: 1, - clear: "Nulstil", - format: "dd/mm/yyyy", - monthsTitle:"Måneder" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js deleted file mode 100644 index 52e7a9b5d7..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * German translation for bootstrap-datepicker - * Sam Zurcher - */ -;(function($){ - $.fn.datepicker.dates['de'] = { - days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], - daysShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"], - daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], - months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], - monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], - today: "Heute", - monthsTitle: "Monate", - clear: "Löschen", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js deleted file mode 100644 index 5e00c7d4a4..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Greek translation for bootstrap-datepicker - */ -;(function($){ - $.fn.datepicker.dates['el'] = { - days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"], - daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"], - daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα"], - months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], - monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], - today: "Σήμερα", - clear: "Καθαρισμός", - weekStart: 1, - format: "d/m/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-AU.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-AU.js deleted file mode 100644 index 5f1fa2474e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-AU.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Australian English translation for bootstrap-datepicker - * Steve Chapman - */ -;(function($){ - $.fn.datepicker.dates['en-AU'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - monthsTitle: "Months", - clear: "Clear", - weekStart: 1, - format: "d/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-CA.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-CA.js deleted file mode 100644 index 1a8e5639b9..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-CA.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Canadian English translation for bootstrap-datepicker - * Mike Nacey - */ -;(function($){ - $.fn.datepicker.dates['en-CA'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - monthsTitle: "Months", - clear: "Clear", - weekStart: 0, - format: "yyyy-mm-dd" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-GB.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-GB.js deleted file mode 100644 index 4f09467a1d..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-GB.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * British English translation for bootstrap-datepicker - * Xavier Dutreilh - */ -;(function($){ - $.fn.datepicker.dates['en-GB'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - monthsTitle: "Months", - clear: "Clear", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-IE.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-IE.js deleted file mode 100644 index 188e4fc126..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-IE.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Irish English translation for bootstrap-datepicker - */ -;(function($){ - $.fn.datepicker.dates['en-IE'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - monthsTitle: "Months", - clear: "Clear", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-NZ.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-NZ.js deleted file mode 100644 index 9b6910b7a2..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-NZ.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * New Zealand English translation for bootstrap-datepicker - */ -;(function($){ - $.fn.datepicker.dates['en-NZ'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - monthsTitle: "Months", - clear: "Clear", - weekStart: 1, - format: "d/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-ZA.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-ZA.js deleted file mode 100644 index 54b68f8003..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-ZA.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * South African English translation for bootstrap-datepicker - */ -;(function($){ - $.fn.datepicker.dates['en-ZA'] = { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - monthsTitle: "Months", - clear: "Clear", - weekStart: 1, - format: "yyyy/mm/d" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.eo.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.eo.js deleted file mode 100644 index 98e498875b..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.eo.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Esperanto translation for bootstrap-datepicker - * Emmanuel Debanne - */ -;(function($){ - $.fn.datepicker.dates['eo'] = { - days: ["dimanĉo", "lundo", "mardo", "merkredo", "ĵaŭdo", "vendredo", "sabato"], - daysShort: ["dim.", "lun.", "mar.", "mer.", "ĵaŭ.", "ven.", "sam."], - daysMin: ["d", "l", "ma", "me", "ĵ", "v", "s"], - months: ["januaro", "februaro", "marto", "aprilo", "majo", "junio", "julio", "aŭgusto", "septembro", "oktobro", "novembro", "decembro"], - monthsShort: ["jan.", "feb.", "mar.", "apr.", "majo", "jun.", "jul.", "aŭg.", "sep.", "okt.", "nov.", "dec."], - today: "Hodiaŭ", - clear: "Nuligi", - weekStart: 1, - format: "yyyy-mm-dd" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.es.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.es.js deleted file mode 100644 index ac9dd35820..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.es.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Spanish translation for bootstrap-datepicker - * Bruno Bonamin - */ -;(function($){ - $.fn.datepicker.dates['es'] = { - days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], - daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], - daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], - months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], - monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], - today: "Hoy", - monthsTitle: "Meses", - clear: "Borrar", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.et.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.et.js deleted file mode 100644 index 7f7100d42e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.et.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Estonian translation for bootstrap-datepicker - * Ando Roots - * Fixes by Illimar Tambek < - */ -;(function($){ - $.fn.datepicker.dates['et'] = { - days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"], - daysShort: ["Pühap", "Esmasp", "Teisip", "Kolmap", "Neljap", "Reede", "Laup"], - daysMin: ["P", "E", "T", "K", "N", "R", "L"], - months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"], - monthsShort: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"], - today: "Täna", - clear: "Tühjenda", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.eu.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.eu.js deleted file mode 100644 index c2c3c0aeb8..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.eu.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Basque translation for bootstrap-datepicker - * Arkaitz Etxeberria - */ -;(function($){ - $.fn.datepicker.dates['eu'] = { - days: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata'], - daysShort: ['Ig', 'Al', 'Ar', 'Az', 'Og', 'Ol', 'Lr'], - daysMin: ['Ig', 'Al', 'Ar', 'Az', 'Og', 'Ol', 'Lr'], - months: ['Urtarrila', 'Otsaila', 'Martxoa', 'Apirila', 'Maiatza', 'Ekaina', 'Uztaila', 'Abuztua', 'Iraila', 'Urria', 'Azaroa', 'Abendua'], - monthsShort: ['Urt', 'Ots', 'Mar', 'Api', 'Mai', 'Eka', 'Uzt', 'Abu', 'Ira', 'Urr', 'Aza', 'Abe'], - today: "Gaur", - monthsTitle: "Hilabeteak", - clear: "Ezabatu", - weekStart: 1, - format: "yyyy/mm/dd" - }; -}(jQuery)); - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fa.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fa.js deleted file mode 100644 index 6503c85dd4..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fa.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Persian translation for bootstrap-datepicker - * Mostafa Rokooie - */ -;(function($){ - $.fn.datepicker.dates['fa'] = { - days: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"], - daysShort: ["یک", "دو", "سه", "چهار", "پنج", "جمعه", "شنبه", "یک"], - daysMin: ["ی", "د", "س", "چ", "پ", "ج", "ش", "ی"], - months: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], - monthsShort: ["ژان", "فور", "مار", "آور", "مه", "ژون", "ژوی", "اوت", "سپت", "اکت", "نوا", "دسا"], - today: "امروز", - clear: "پاک کن", - weekStart: 1, - format: "yyyy/mm/dd" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fi.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fi.js deleted file mode 100644 index 220f6b2bf8..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fi.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Finnish translation for bootstrap-datepicker - * Jaakko Salonen - */ -;(function($){ - $.fn.datepicker.dates['fi'] = { - days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"], - daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau"], - daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la"], - months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], - monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mar", "jou"], - today: "tänään", - clear: "Tyhjennä", - weekStart: 1, - format: "d.m.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fo.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fo.js deleted file mode 100644 index eaada077b5..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fo.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Faroese translation for bootstrap-datepicker - * Theodor Johannesen - */ -;(function($){ - $.fn.datepicker.dates['fo'] = { - days: ["Sunnudagur", "Mánadagur", "Týsdagur", "Mikudagur", "Hósdagur", "Fríggjadagur", "Leygardagur"], - daysShort: ["Sun", "Mán", "Týs", "Mik", "Hós", "Frí", "Ley"], - daysMin: ["Su", "Má", "Tý", "Mi", "Hó", "Fr", "Le"], - months: ["Januar", "Februar", "Marts", "Apríl", "Mei", "Juni", "Juli", "August", "Septembur", "Oktobur", "Novembur", "Desembur"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], - today: "Í Dag", - clear: "Reinsa" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr-CH.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr-CH.js deleted file mode 100644 index 79b5026f02..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr-CH.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * French (Switzerland) translation for bootstrap-datepicker - * Christoph Jossi - * Based on - * French translation for bootstrap-datepicker - * Nico Mollet - */ -;(function($){ - $.fn.datepicker.dates['fr'] = { - days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"], - daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], - daysMin: ["D", "L", "Ma", "Me", "J", "V", "S"], - months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], - monthsShort: ["Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Déc"], - today: "Aujourd'hui", - monthsTitle: "Mois", - clear: "Effacer", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js deleted file mode 100644 index df65ed683a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * French translation for bootstrap-datepicker - * Nico Mollet - */ -;(function($){ - $.fn.datepicker.dates['fr'] = { - days: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], - daysShort: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], - daysMin: ["d", "l", "ma", "me", "j", "v", "s"], - months: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], - monthsShort: ["janv.", "févr.", "mars", "avril", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."], - today: "Aujourd'hui", - monthsTitle: "Mois", - clear: "Effacer", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.gl.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.gl.js deleted file mode 100644 index 592ce00452..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.gl.js +++ /dev/null @@ -1,13 +0,0 @@ -;(function($){ - $.fn.datepicker.dates['gl'] = { - days: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"], - daysShort: ["Dom", "Lun", "Mar", "Mér", "Xov", "Ven", "Sáb"], - daysMin: ["Do", "Lu", "Ma", "Me", "Xo", "Ve", "Sa"], - months: ["Xaneiro", "Febreiro", "Marzo", "Abril", "Maio", "Xuño", "Xullo", "Agosto", "Setembro", "Outubro", "Novembro", "Decembro"], - monthsShort: ["Xan", "Feb", "Mar", "Abr", "Mai", "Xun", "Xul", "Ago", "Sep", "Out", "Nov", "Dec"], - today: "Hoxe", - clear: "Limpar", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.he.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.he.js deleted file mode 100644 index 2e17393b12..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.he.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Hebrew translation for bootstrap-datepicker - * Sagie Maoz - */ -;(function($){ - $.fn.datepicker.dates['he'] = { - days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"], - daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], - daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], - months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], - monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], - today: "היום", - rtl: true - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hi.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hi.js deleted file mode 100644 index c15b485e01..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hi.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Hindi translation for bootstrap-datepicker - * Visar Uruqi - */ -; (function($){ - $.fn.datepicker.dates['hi'] = { - days: ["रविवार", "सोमवार", "मंगलवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"], - daysShort: ["सूर्य", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"], - daysMin: ["र", "सो", "मं", "बु", "गु", "शु", "श"], - months: ["जनवरी", "फ़रवरी", "मार्च", "अप्रैल", "मई", "जून", "जुलाई", "अगस्त", "सितम्बर", "अक्टूबर", "नवंबर", "दिसम्बर"], - monthsShort: ["जन", "फ़रवरी", "मार्च", "अप्रैल", "मई", "जून", "जुलाई", "अगस्त", "सितं", "अक्टूबर", "नवं", "दिसम्बर"], - today: "आज", - monthsTitle: "महीने", - clear: "साफ", - weekStart: 1, - format: "dd / mm / yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js deleted file mode 100644 index ec72952af7..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Croatian localisation - */ -;(function($){ - $.fn.datepicker.dates['hr'] = { - days: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], - daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], - daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], - months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], - monthsShort: ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"], - today: "Danas" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hu.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hu.js deleted file mode 100644 index 03a36ee8a5..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hu.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Hungarian translation for bootstrap-datepicker - * Sotus László - */ -;(function($){ - $.fn.datepicker.dates['hu'] = { - days: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"], - daysShort: ["vas", "hét", "ked", "sze", "csü", "pén", "szo"], - daysMin: ["V", "H", "K", "Sze", "Cs", "P", "Szo"], - months: ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], - monthsShort: ["jan", "feb", "már", "ápr", "máj", "jún", "júl", "aug", "sze", "okt", "nov", "dec"], - today: "ma", - weekStart: 1, - clear: "töröl", - titleFormat: "yyyy. MM", - format: "yyyy.mm.dd" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hy.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hy.js deleted file mode 100644 index a67c1b2811..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.hy.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Armenian translation for bootstrap-datepicker - * Hayk Chamyan - */ -;(function($){ - $.fn.datepicker.dates['hy'] = { - days: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"], - daysShort: ["Կիր", "Երկ", "Երե", "Չոր", "Հին", "Ուրբ", "Շաբ"], - daysMin: ["Կի", "Եկ", "Եք", "Չո", "Հի", "Ու", "Շա"], - months: ["Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"], - monthsShort: ["Հնվ", "Փետ", "Մար", "Ապր", "Մայ", "Հուն", "Հուլ", "Օգս", "Սեպ", "Հոկ", "Նոյ", "Դեկ"], - today: "Այսօր", - clear: "Ջնջել", - format: "dd.mm.yyyy", - weekStart: 1, - monthsTitle: 'Ամիսնէր' - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.id.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.id.js deleted file mode 100644 index 832045ac6a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.id.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Bahasa translation for bootstrap-datepicker - * Azwar Akbar - */ -;(function($){ - $.fn.datepicker.dates['id'] = { - days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], - daysShort: ["Mgu", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"], - daysMin: ["Mg", "Sn", "Sl", "Ra", "Ka", "Ju", "Sa"], - months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], - today: "Hari Ini", - clear: "Kosongkan" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.is.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.is.js deleted file mode 100644 index 2eef5e1299..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.is.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Icelandic translation for bootstrap-datepicker - * Hinrik Örn Sigurðsson - */ -;(function($){ - $.fn.datepicker.dates['is'] = { - days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"], - daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau"], - daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La"], - months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"], - today: "Í Dag" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.it-CH.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.it-CH.js deleted file mode 100644 index b4496aa9c8..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.it-CH.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Italian (Switzerland) translation for bootstrap-datepicker - * Christoph Jossi - * Based on - * Italian translation for bootstrap-datepicker - * Enrico Rubboli - */ -;(function($){ - $.fn.datepicker.dates['it'] = { - days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], - daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], - daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa"], - months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], - monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], - today: "Oggi", - clear: "Cancella", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js deleted file mode 100644 index 1722031dbb..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Italian translation for bootstrap-datepicker - * Enrico Rubboli - */ -;(function($){ - $.fn.datepicker.dates['it'] = { - days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], - daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], - daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa"], - months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], - monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], - today: "Oggi", - monthsTitle: "Mesi", - clear: "Cancella", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ja.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ja.js deleted file mode 100644 index c64a61472e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ja.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Japanese translation for bootstrap-datepicker - * Norio Suzuki - */ -;(function($){ - $.fn.datepicker.dates['ja'] = { - days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"], - daysShort: ["日", "月", "火", "水", "木", "金", "土"], - daysMin: ["日", "月", "火", "水", "木", "金", "土"], - months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], - monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], - today: "今日", - format: "yyyy/mm/dd", - titleFormat: "yyyy年mm月", - clear: "クリア" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ka.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ka.js deleted file mode 100644 index c49e4533dd..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ka.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Georgian translation for bootstrap-datepicker - * Levan Melikishvili - */ -;(function($){ - $.fn.datepicker.dates['ka'] = { - days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"], - daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"], - daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა"], - months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"], - monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], - today: "დღეს", - clear: "გასუფთავება", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kh.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kh.js deleted file mode 100644 index 2c9eb0f727..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kh.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Cambodia (Khmer) translation for bootstrap-datepicker - * Lytay TOUCH - * - * DEPRECATED: This language code 'kh' is deprecated and will be removed in 2.0. - * Khmer support is now in a 'km' translation file to follow the ISO language - * code - http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes - */ -;(function($){ - $.fn.datepicker.dates['kh'] = { - days: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"], - daysShort: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], - daysMin: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], - months: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], - monthsShort: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], - today: "ថ្ងៃនេះ", - clear: "សំអាត" - }; - - $.fn.datepicker.deprecated('The language code "kh" is deprecated and will be removed in 2.0. For Khmer support use "km" instead.'); -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kk.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kk.js deleted file mode 100644 index 9ffa8ca11a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kk.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Kazakh translation for bootstrap-datepicker - * Yerzhan Tolekov - */ -;(function($){ - $.fn.datepicker.dates['kk'] = { - days: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі"], - daysShort: ["Жек", "Дүй", "Сей", "Сәр", "Бей", "Жұм", "Сен"], - daysMin: ["Жк", "Дс", "Сс", "Ср", "Бс", "Жм", "Сн"], - months: ["Қаңтар", "Ақпан", "Наурыз", "Сәуір", "Мамыр", "Маусым", "Шілде", "Тамыз", "Қыркүйек", "Қазан", "Қараша", "Желтоқсан"], - monthsShort: ["Қаң", "Ақп", "Нау", "Сәу", "Мам", "Мау", "Шіл", "Там", "Қыр", "Қаз", "Қар", "Жел"], - today: "Бүгін", - weekStart: 1 - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.km.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.km.js deleted file mode 100644 index 8a71c8efc2..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.km.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Khmer translation for bootstrap-datepicker - * This is the Updated Version of: https://github.com/uxsolutions/bootstrap-datepicker/blob/71308d42cce9524284c50c6fac50422d1790ac0f/js/locales/bootstrap-datepicker.kh.js - */ -;(function($){ - $.fn.datepicker.dates['km'] = { - days: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"], - daysShort: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], - daysMin: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍"], - months: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], - monthsShort: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"], - today: "ថ្ងៃនេះ", - clear: "សំអាត" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ko.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ko.js deleted file mode 100644 index 95514b22e5..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ko.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Korean translation for bootstrap-datepicker - * This is a port from https://github.com/moment/moment/blob/develop/src/locale/ko.js - */ -;(function($){ - $.fn.datepicker.dates['ko'] = { - days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], - daysShort: ["일", "월", "화", "수", "목", "금", "토"], - daysMin: ["일", "월", "화", "수", "목", "금", "토"], - months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], - monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], - today: "오늘", - clear: "삭제", - format: "yyyy-mm-dd", - titleFormat: "yyyy년mm월", - weekStart: 0 - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kr.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kr.js deleted file mode 100644 index 8f9cda944c..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.kr.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Korean translation for bootstrap-datepicker - * Gu Youn - * - * DEPRECATED: This language code 'kr' is deprecated and will be removed in 2.0. - * Korean support is now in a 'ko' translation file to follow the ISO language - * code - http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes - */ -;(function($){ - $.fn.datepicker.dates['kr'] = { - days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], - daysShort: ["일", "월", "화", "수", "목", "금", "토"], - daysMin: ["일", "월", "화", "수", "목", "금", "토"], - months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], - monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"] - }; - - $.fn.datepicker.deprecated('The language code "kr" is deprecated and will be removed in 2.0. For korean support use "ko" instead.'); -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.lt.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.lt.js deleted file mode 100644 index 4845f26e65..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.lt.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Lithuanian translation for bootstrap-datepicker - * Šarūnas Gliebus - */ - -;(function($){ - $.fn.datepicker.dates['lt'] = { - days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"], - daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š"], - daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št"], - months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"], - monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"], - today: "Šiandien", - monthsTitle:"Mėnesiai", - clear:"Išvalyti", - weekStart: 1, - format:"yyyy-mm-dd" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js deleted file mode 100644 index 530aa56be0..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Latvian translation for bootstrap-datepicker - * Artis Avotins - */ - -;(function($){ - $.fn.datepicker.dates['lv'] = { - days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"], - daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S"], - daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se"], - months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec"], - monthsTitle: "Mēneši", - today: "Šodien", - clear: "Nodzēst", - weekStart: 1 - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.me.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.me.js deleted file mode 100644 index e581325d3b..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.me.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Montenegrin translation for bootstrap-datepicker - * Miodrag Nikač - */ -;(function($){ - $.fn.datepicker.dates['me'] = { - days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], - daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], - daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su"], - months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], - today: "Danas", - weekStart: 1, - clear: "Izbriši", - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.mk.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.mk.js deleted file mode 100644 index 2f041baad3..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.mk.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Macedonian translation for bootstrap-datepicker - * Marko Aleksic - */ -;(function($){ - $.fn.datepicker.dates['mk'] = { - days: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"], - daysShort: ["Нед", "Пон", "Вто", "Сре", "Чет", "Пет", "Саб"], - daysMin: ["Не", "По", "Вт", "Ср", "Че", "Пе", "Са"], - months: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"], - monthsShort: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"], - today: "Денес", - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.mn.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.mn.js deleted file mode 100644 index b3a66e8b27..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.mn.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Mongolian translation for bootstrap-datepicker - * Andrey Torsunov - */ -;(function($){ - $.fn.datepicker.dates['mn'] = { - days: ["Ням", "Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба"], - daysShort: ["Ням", "Дав", "Мяг", "Лха", "Пүр", "Баа", "Бям"], - daysMin: ["Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"], - months: ["Хулгана", "Үхэр", "Бар", "Туулай", "Луу", "Могой", "Морь", "Хонь", "Бич", "Тахиа", "Нохой", "Гахай"], - monthsShort: ["Хул", "Үхэ", "Бар", "Туу", "Луу", "Мог", "Мор", "Хон", "Бич", "Тах", "Нох", "Гах"], - today: "Өнөөдөр", - clear: "Тодорхой", - format: "yyyy.mm.dd", - weekStart: 1 - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ms.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ms.js deleted file mode 100644 index 8bb4194aeb..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ms.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Malay translation for bootstrap-datepicker - * Ateman Faiz - */ -;(function($){ - $.fn.datepicker.dates['ms'] = { - days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"], - daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"], - daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa"], - months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], - today: "Hari Ini", - clear: "Bersihkan" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl-BE.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl-BE.js deleted file mode 100644 index aadc374aca..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl-BE.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Belgium-Dutch translation for bootstrap-datepicker - * Julien Poulin - */ -;(function($){ - $.fn.datepicker.dates['nl-BE'] = { - days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], - daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za"], - daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za"], - months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], - monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], - today: "Vandaag", - monthsTitle: "Maanden", - clear: "Leegmaken", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl.js deleted file mode 100644 index bef19cf563..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Dutch translation for bootstrap-datepicker - * Reinier Goltstein - */ -;(function($){ - $.fn.datepicker.dates['nl'] = { - days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], - daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za"], - daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za"], - months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], - monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], - today: "Vandaag", - monthsTitle: "Maanden", - clear: "Wissen", - weekStart: 1, - format: "dd-mm-yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.no.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.no.js deleted file mode 100644 index 7d1732bd3f..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.no.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Norwegian translation for bootstrap-datepicker - * George Gooding - */ -;(function($){ - $.fn.datepicker.dates['no'] = { - days: ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], - daysShort: ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], - daysMin: ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], - months: ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], - monthsShort: ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], - today: 'i dag', - monthsTitle: 'Måneder', - clear: 'Nullstill', - weekStart: 1, - format: 'dd.mm.yyyy' - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.oc.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.oc.js deleted file mode 100644 index fada007e19..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.oc.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Occitan translation for bootstrap-datepicker - */ -;(function($){ - $.fn.datepicker.dates['oc'] = { - days: ["Dimenge", "Diluns", "Dimars", "Dimècres", "Dijòus", "Divendres", "Dissabte"], - daysShort: ["Dim", "Dil", "Dmr", "Dmc", "Dij", "Div", "Dis"], - daysMin: ["dg", "dl", "dr", "dc", "dj", "dv", "ds"], - months: ["Genièr", "Febrièr", "Març", "Abrial", "Mai", "Junh", "Julhet", "Agost", "Setembre", "Octobre", "Novembre", "Decembre"], - monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Dec"], - today: "Uèi", - monthsTitle: "Meses", - clear: "Escafar", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pl.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pl.js deleted file mode 100644 index 26c7ae860c..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pl.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Polish translation for bootstrap-datepicker - * Robert - */ -;(function($){ - $.fn.datepicker.dates['pl'] = { - days: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"], - daysShort: ["Niedz.", "Pon.", "Wt.", "Śr.", "Czw.", "Piąt.", "Sob."], - daysMin: ["Ndz.", "Pn.", "Wt.", "Śr.", "Czw.", "Pt.", "Sob."], - months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], - monthsShort: ["Sty.", "Lut.", "Mar.", "Kwi.", "Maj", "Cze.", "Lip.", "Sie.", "Wrz.", "Paź.", "Lis.", "Gru."], - today: "Dzisiaj", - weekStart: 1, - clear: "Wyczyść", - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt-BR.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt-BR.js deleted file mode 100644 index 852160bb95..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt-BR.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Brazilian translation for bootstrap-datepicker - * Cauan Cabral - */ -;(function($){ - $.fn.datepicker.dates['pt-BR'] = { - days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], - daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], - daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"], - months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], - monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], - today: "Hoje", - monthsTitle: "Meses", - clear: "Limpar", - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt.js deleted file mode 100644 index 011e01e07b..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Portuguese translation for bootstrap-datepicker - * Original code: Cauan Cabral - * Tiago Melo - */ -;(function($){ - $.fn.datepicker.dates['pt'] = { - days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], - daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], - daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"], - months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], - monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], - today: "Hoje", - monthsTitle: "Meses", - clear: "Limpar", - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js deleted file mode 100644 index 6637e9920e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Romanian translation for bootstrap-datepicker - * Cristian Vasile - */ -;(function($){ - $.fn.datepicker.dates['ro'] = { - days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"], - daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm"], - daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"], - months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], - monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Astăzi", - clear: "Șterge", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs-latin.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs-latin.js deleted file mode 100644 index 48e7ceaea9..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs-latin.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Serbian latin translation for bootstrap-datepicker - * Bojan Milosavlević - * - * DEPRECATED: This language code 'rs-latin' is deprecated (invalid serbian language code) and will be removed in 2.0. - */ -;(function($){ - $.fn.datepicker.dates['rs-latin'] = { - days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"], - daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"], - daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], - months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], - today: "Danas", - weekStart: 1, - format: "dd.mm.yyyy" - }; - - $.fn.datepicker.deprecated('This language code "rs-latin" is deprecated (invalid serbian language code) and will be removed in 2.0. For Serbian latin support use "sr-latin" instead.'); -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs.js deleted file mode 100644 index 96ef403960..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Serbian cyrillic translation for bootstrap-datepicker - * Bojan Milosavlević - * - * DEPRECATED: This language code 'rs' is deprecated (invalid serbian language code) and will be removed in 2.0. - */ -;(function($){ - $.fn.datepicker.dates['rs'] = { - days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"], - daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб"], - daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су"], - months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], - monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], - today: "Данас", - weekStart: 1, - format: "dd.mm.yyyy" - }; - - $.fn.datepicker.deprecated('This language code "rs" is deprecated (invalid serbian language code) and will be removed in 2.0. For Serbian support use "sr" instead.'); -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ru.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ru.js deleted file mode 100644 index 0c793ce6e6..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ru.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Russian translation for bootstrap-datepicker - * Victor Taranenko - */ -;(function($){ - $.fn.datepicker.dates['ru'] = { - days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"], - daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"], - daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], - months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], - monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], - today: "Сегодня", - clear: "Очистить", - format: "dd.mm.yyyy", - weekStart: 1, - monthsTitle: 'Месяцы' - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.si.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.si.js deleted file mode 100644 index 806e580d90..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.si.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Sinhala translation for bootstrap-datepicker - * Chanaka Fernando - */ -;(function($){ - $.fn.datepicker.dates['si'] = { - days: ["ඉරිදා", "සඳුදා", "අඟහරුවාදා", "බදාදා", "බ්‍රහස්පතින්දා", "සිකුරාදා", "සෙනසුරාදා"], - daysShort: ["ඉරි", "සඳු", "අඟ", "බදා", "බ්‍රහ", "සිකු", "සෙන"], - daysMin: ["ඉ", "ස", "අ", "බ", "බ්‍ර", "සි", "සෙ"], - months: ["ජනවාරි", "පෙබරවාරි", "මාර්තු", "අප්‍රේල්", "මැයි", "ජුනි", "ජූලි", "අගෝස්තු", "සැප්තැම්බර්", "ඔක්තෝබර්", "නොවැම්බර්", "දෙසැම්බර්"], - monthsShort: ["ජන", "පෙබ", "මාර්", "අප්‍රේ", "මැයි", "ජුනි", "ජූලි", "අගෝ", "සැප්", "ඔක්", "නොවැ", "දෙසැ"], - today: "අද", - monthsTitle: "මාස", - clear: "මකන්න", - weekStart: 0, - format: "yyyy-mm-dd" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sk.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sk.js deleted file mode 100644 index 388138689c..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sk.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Slovak translation for bootstrap-datepicker - * Marek Lichtner - * Fixes by Michal Remiš - */ -;(function($){ - $.fn.datepicker.dates["sk"] = { - days: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"], - daysShort: ["Ned", "Pon", "Uto", "Str", "Štv", "Pia", "Sob"], - daysMin: ["Ne", "Po", "Ut", "St", "Št", "Pia", "So"], - months: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], - today: "Dnes", - clear: "Vymazať", - weekStart: 1, - format: "d.m.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sl.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sl.js deleted file mode 100644 index 4a33748d2a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sl.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Slovene translation for bootstrap-datepicker - * Gregor Rudolf - */ -;(function($){ - $.fn.datepicker.dates['sl'] = { - days: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"], - daysShort: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"], - daysMin: ["Ne", "Po", "To", "Sr", "Če", "Pe", "So"], - months: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], - today: "Danes", - weekStart: 1 - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sq.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sq.js deleted file mode 100644 index 7440692135..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sq.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Albanian translation for bootstrap-datepicker - * Tomor Pupovci - */ -;(function($){ - $.fn.datepicker.dates['sq'] = { - days: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"], - daysShort: ["Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"], - daysMin: ["Di", "Hë", "Ma", "Më", "En", "Pr", "Sht"], - months: ["Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"], - monthsShort: ["Jan", "Shk", "Mar", "Pri", "Maj", "Qer", "Korr", "Gu", "Sht", "Tet", "Nën", "Dhjet"], - monthsTitle: "Muaj", - today: "Sot", - weekStart: 1, - format: "dd/mm/yyyy", - clear: "Pastro" - }; -}(jQuery)); - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sr-latin.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sr-latin.js deleted file mode 100644 index 058796336d..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sr-latin.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Serbian latin translation for bootstrap-datepicker - * Bojan Milosavlević - */ -;(function($){ - $.fn.datepicker.dates['sr-latin'] = { - days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"], - daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub"], - daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su"], - months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], - today: "Danas", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sr.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sr.js deleted file mode 100644 index a0dcb83f3a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sr.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Serbian cyrillic translation for bootstrap-datepicker - * Bojan Milosavlević - */ -;(function($){ - $.fn.datepicker.dates['sr'] = { - days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"], - daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб"], - daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су"], - months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], - monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], - today: "Данас", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js deleted file mode 100644 index 53c0c0d2ff..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Swedish translation for bootstrap-datepicker - * Patrik Ragnarsson - */ -;(function($){ - $.fn.datepicker.dates['sv'] = { - days: ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"], - daysShort: ["sön", "mån", "tis", "ons", "tor", "fre", "lör"], - daysMin: ["sö", "må", "ti", "on", "to", "fr", "lö"], - months: ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"], - monthsShort: ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"], - today: "Idag", - format: "yyyy-mm-dd", - weekStart: 1, - clear: "Rensa" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sw.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sw.js deleted file mode 100644 index 0e447b83ff..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.sw.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Swahili translation for bootstrap-datepicker - * Edwin Mugendi - * Source: http://scriptsource.org/cms/scripts/page.php?item_id=entry_detail&uid=xnfaqyzcku - */ -;(function($){ - $.fn.datepicker.dates['sw'] = { - days: ["Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"], - daysShort: ["J2", "J3", "J4", "J5", "Alh", "Ij", "J1"], - daysMin: ["2", "3", "4", "5", "A", "I", "1"], - months: ["Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"], - monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"], - today: "Leo" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ta.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ta.js deleted file mode 100644 index 85e765688f..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.ta.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Tamil translation for bootstrap-datepicker - * Abubacker Siddik A - */ -;(function($){ - $.fn.datepicker.dates['ta'] = { - days: ["ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"], - daysShort: ["ஞாயி", "திங்", "செவ்", "புத", "வியா", "வெள்", "சனி"], - daysMin: ["ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"], - months: ["ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்டு", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"], - monthsShort: ["ஜன", "பிப்", "மார்", "ஏப்", "மே", "ஜூன்", "ஜூலை", "ஆக", "செப்", "அக்", "நவ", "டிச"], - today: "இன்று", - monthsTitle: "மாதங்கள்", - clear: "நீக்கு", - weekStart: 1, - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tg.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tg.js deleted file mode 100644 index 26863a067a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tg.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Tajik (cyrillic) translation for bootstrap-datepicker - * Bakhtiyor Bahritidinov - * Orif N. Jr. - */ -;(function($){ - $.fn.datepicker.dates['tg'] = { - days: ["Якшанбе", "Душанбе", "Сешанбе", "Чоршанбе", "Панҷшанбе", "Ҷумъа", "Шанбе"], - daysShort: ["Яшб", "Дшб", "Сшб", "Чшб", "Пшб", "Ҷум", "Шнб"], - daysMin: ["Яш", "Дш", "Сш", "Чш", "Пш", "Ҷм", "Шб"], - months: ["Январ", "Феврал", "Март", "Апрел", "Май", "Июн", "Июл", "Август", "Сентябр", "Октябр", "Ноябр", "Декабр"], - monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], - today: "Имрӯз", - monthsTitle: "Моҳҳо", - clear: "Тоза намудан", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.th.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.th.js deleted file mode 100644 index 562b063c50..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.th.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Thai translation for bootstrap-datepicker - * Suchau Jiraprapot - */ -;(function($){ - $.fn.datepicker.dates['th'] = { - days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"], - daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], - daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], - months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], - monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], - today: "วันนี้" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tk.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tk.js deleted file mode 100644 index b06b6dc8a6..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tk.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Turkmen translation for bootstrap-datepicker - * N'Bayramberdiyev - */ -;(function($){ - $.fn.datepicker.dates['tk'] = { - days: ["Ýekşenbe", "Duşenbe", "Sişenbe", "Çarşenbe", "Penşenbe", "Anna", "Şenbe"], - daysShort: ["Ýek", "Duş", "Siş", "Çar", "Pen", "Ann", "Şen"], - daysMin: ["Ýe", "Du", "Si", "Ça", "Pe", "An", "Şe"], - months: ["Ýanwar", "Fewral", "Mart", "Aprel", "Maý", "Iýun", "Iýul", "Awgust", "Sentýabr", "Oktýabr", "Noýabr", "Dekabr"], - monthsShort: ["Ýan", "Few", "Mar", "Apr", "Maý", "Iýn", "Iýl", "Awg", "Sen", "Okt", "Noý", "Dek"], - today: "Bu gün", - monthsTitle: "Aýlar", - clear: "Aýyr", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tr.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tr.js deleted file mode 100644 index 0c8b0de4dc..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.tr.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Turkish translation for bootstrap-datepicker - * Serkan Algur - */ -;(function($){ - $.fn.datepicker.dates['tr'] = { - days: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], - daysShort: ["Pz", "Pzt", "Sal", "Çrş", "Prş", "Cu", "Cts"], - daysMin: ["Pz", "Pzt", "Sa", "Çr", "Pr", "Cu", "Ct"], - months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], - monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], - today: "Bugün", - clear: "Temizle", - weekStart: 1, - format: "dd.mm.yyyy" - }; -}(jQuery)); - diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uk.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uk.js deleted file mode 100644 index 1c4cf15aa5..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uk.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Ukrainian translation for bootstrap-datepicker - * Igor Polynets - */ -;(function($){ - $.fn.datepicker.dates['uk'] = { - days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"], - daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"], - daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], - months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], - monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], - today: "Сьогодні", - clear: "Очистити", - format: "dd.mm.yyyy", - weekStart: 1 - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uz-cyrl.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uz-cyrl.js deleted file mode 100644 index ce55543c63..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uz-cyrl.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Uzbek latin translation for bootstrap-datepicker - * Kakhramonov Javlonbek - */ -;(function($){ - $.fn.datepicker.dates['uz-cyrl'] = { - days: ["Якшанба", "Душанба", "Сешанба", "Чоршанба", "Пайшанба", "Жума", "Шанба"], - daysShort: ["Якш", "Ду", "Се", "Чор", "Пай", "Жу", "Ша"], - daysMin: ["Як", "Ду", "Се", "Чо", "Па", "Жу", "Ша"], - months: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"], - monthsShort: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"], - today: "Бугун", - clear: "Ўчириш", - format: "dd.mm.yyyy", - weekStart: 1, - monthsTitle: 'Ойлар' - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uz-latn.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uz-latn.js deleted file mode 100644 index 70fda6790c..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.uz-latn.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Uzbek latin translation for bootstrap-datepicker - * Kakhramonov Javlonbek - */ -;(function($){ - $.fn.datepicker.dates['uz-latn'] = { - days: ["Yakshanba", "Dushanba", "Seshanba", "Chorshanba", "Payshanba", "Juma", "Shanba"], - daysShort: ["Yak", "Du", "Se", "Chor", "Pay", "Ju", "Sha"], - daysMin: ["Ya", "Du", "Se", "Cho", "Pa", "Ju", "Sha"], - months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avgust", "Sentabr", "Oktabr", "Noyabr", "Dekabr"], - monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "Iyn", "Iyl", "Avg", "Sen", "Okt", "Noy", "Dek"], - today: "Bugun", - clear: "O'chirish", - format: "dd.mm.yyyy", - weekStart: 1, - monthsTitle: 'Oylar' - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.vi.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.vi.js deleted file mode 100644 index 0e8afc1b56..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.vi.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Vietnamese translation for bootstrap-datepicker - * An Vo - */ -;(function($){ - $.fn.datepicker.dates['vi'] = { - days: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"], - daysShort: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"], - daysMin: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"], - months: ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"], - monthsShort: ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"], - today: "Hôm nay", - clear: "Xóa", - format: "dd/mm/yyyy" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js deleted file mode 100644 index 67726c242d..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Simplified Chinese translation for bootstrap-datepicker - * Yuan Cheung - */ -;(function($){ - $.fn.datepicker.dates['zh-CN'] = { - days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], - daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], - daysMin: ["日", "一", "二", "三", "四", "五", "六"], - months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], - monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], - today: "今天", - monthsTitle: "选择月份", - clear: "清除", - format: "yyyy-mm-dd", - titleFormat: "yyyy年mm月", - weekStart: 1 - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-TW.js b/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-TW.js deleted file mode 100644 index ff241b56fc..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-TW.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Traditional Chinese translation for bootstrap-datepicker - * Rung-Sheng Jang - * FrankWu Fix more appropriate use of Traditional Chinese habit - */ -;(function($){ - $.fn.datepicker.dates['zh-TW'] = { - days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], - daysShort: ["週日", "週一", "週二", "週三", "週四", "週五", "週六"], - daysMin: ["日", "一", "二", "三", "四", "五", "六"], - months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], - monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], - today: "今天", - format: "yyyy年mm月dd日", - weekStart: 1, - clear: "清除" - }; -}(jQuery)); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/less/.csslintrc b/modules/http/webif/gstatic/bootstrap-datepicker/less/.csslintrc deleted file mode 100644 index 005b86236c..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/less/.csslintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "adjoining-classes": false, - "box-sizing": false, - "box-model": false, - "compatible-vendor-prefixes": false, - "floats": false, - "font-sizes": false, - "gradients": false, - "important": false, - "known-properties": false, - "outline-none": false, - "qualified-headings": false, - "regex-selectors": false, - "shorthand": false, - "text-indent": false, - "unique-headings": false, - "universal-selector": false, - "unqualified-attributes": false -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/less/datepicker.less b/modules/http/webif/gstatic/bootstrap-datepicker/less/datepicker.less deleted file mode 100644 index b1f8183700..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/less/datepicker.less +++ /dev/null @@ -1,242 +0,0 @@ -.datepicker { - padding: 4px; - .border-radius(@baseBorderRadius); - &-inline { - width: 220px; - } - direction: ltr; - &-rtl { - direction: rtl; - &.dropdown-menu { left: auto; } - table tr td span { - float: right; - } - } - &-dropdown { - top: 0; - left: 0; - &:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid @grayLight; - border-top: 0; - border-bottom-color: rgba(0,0,0,.2); - position: absolute; - } - &:after { - content: ''; - display: inline-block; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid @white; - border-top: 0; - position: absolute; - } - &.datepicker-orient-left:before { left: 6px; } - &.datepicker-orient-left:after { left: 7px; } - &.datepicker-orient-right:before { right: 6px; } - &.datepicker-orient-right:after { right: 7px; } - &.datepicker-orient-bottom:before { top: -7px; } - &.datepicker-orient-bottom:after { top: -6px; } - &.datepicker-orient-top:before { - bottom: -7px; - border-bottom: 0; - border-top: 7px solid @grayLight; - } - &.datepicker-orient-top:after { - bottom: -6px; - border-bottom: 0; - border-top: 6px solid @white; - } - } - table { - margin: 0; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - td, th { - text-align: center; - width: 20px; - height: 20px; - .border-radius(4px); - - border: none; - } - // Inline display inside a table presents some problems with - // border and background colors. - .table-striped & table tr { - td, th { - background-color: transparent; - } - } - table tr td { - &.day:hover, - &.day.focused { - background: @grayLighter; - cursor: pointer; - } - &.old, - &.new { - color: @grayLight; - } - &.disabled, - &.disabled:hover { - background: none; - color: @grayLight; - cursor: default; - } - &.highlighted { - background: @infoBackground; - border-radius: 0; - } - &.today, - &.today:hover, - &.today.disabled, - &.today.disabled:hover { - @todayBackground: lighten(@orange, 30%); - .buttonBackground(@todayBackground, spin(@todayBackground, 20)); - color: #000; - } - &.today:hover:hover { // Thank bootstrap 2.0 for this selector... - // TODO: Bump min BS to 2.1, use @textColor in buttonBackground above - color: #000; - } - &.today.active:hover { - color: #fff; - } - &.range, - &.range:hover, - &.range.disabled, - &.range.disabled:hover { - background: @grayLighter; - .border-radius(0); - } - &.range.today, - &.range.today:hover, - &.range.today.disabled, - &.range.today.disabled:hover { - @todayBackground: mix(@orange, @grayLighter, 50%); - .buttonBackground(@todayBackground, spin(@todayBackground, 20)); - .border-radius(0); - } - &.selected, - &.selected:hover, - &.selected.disabled, - &.selected.disabled:hover { - .buttonBackground(lighten(@grayLight, 10), darken(@grayLight, 10)); - color: #fff; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } - &.active, - &.active:hover, - &.active.disabled, - &.active.disabled:hover { - .buttonBackground(@btnPrimaryBackground, spin(@btnPrimaryBackground, 20)); - color: #fff; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } - span { - display: block; - width: 23%; - height: 54px; - line-height: 54px; - float: left; - margin: 1%; - cursor: pointer; - .border-radius(4px); - &:hover, - &.focused { - background: @grayLighter; - } - &.disabled, - &.disabled:hover { - background: none; - color: @grayLight; - cursor: default; - } - &.active, - &.active:hover, - &.active.disabled, - &.active.disabled:hover { - .buttonBackground(@btnPrimaryBackground, spin(@btnPrimaryBackground, 20)); - color: #fff; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } - &.old, - &.new { - color: @grayLight; - } - } - } - - .datepicker-switch { - width: 145px; - } - - .datepicker-switch, - .prev, - .next, - tfoot tr th { - cursor: pointer; - &:hover { - background: @grayLighter; - } - } - - .prev, .next { - &.disabled { - visibility: hidden; - } - } - - // Basic styling for calendar-week cells - .cw { - font-size: 10px; - width: 12px; - padding: 0 2px 0 5px; - vertical-align: middle; - } -} -.input-append, -.input-prepend { - &.date .add-on { - cursor: pointer; - - i { - margin-top: 3px; - } - } -} -.input-daterange { - input { - text-align:center; - } - input:first-child { - .border-radius(3px 0 0 3px); - } - input:last-child { - .border-radius(0 3px 3px 0); - } - .add-on { - display: inline-block; - width: auto; - min-width: 16px; - height: @baseLineHeight; - padding: 4px 5px; - font-weight: normal; - line-height: @baseLineHeight; - text-align: center; - text-shadow: 0 1px 0 @white; - vertical-align: middle; - background-color: @grayLighter; - border: 1px solid #ccc; - margin-left: -5px; - margin-right: -5px; - } -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/less/datepicker3.less b/modules/http/webif/gstatic/bootstrap-datepicker/less/datepicker3.less deleted file mode 100644 index 91e818112e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/less/datepicker3.less +++ /dev/null @@ -1,257 +0,0 @@ -.datepicker { - border-radius: @border-radius-base; - &-inline { - width: 220px; - } - direction: ltr; - &-rtl { - direction: rtl; - &.dropdown-menu { left: auto; } - table tr td span { - float: right; - } - } - &-dropdown { - top: 0; - left: 0; - padding: 4px; - &:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid @dropdown-border; - border-top: 0; - border-bottom-color: rgba(0,0,0,.2); - position: absolute; - } - &:after { - content: ''; - display: inline-block; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid @dropdown-bg; - border-top: 0; - position: absolute; - } - &.datepicker-orient-left:before { left: 6px; } - &.datepicker-orient-left:after { left: 7px; } - &.datepicker-orient-right:before { right: 6px; } - &.datepicker-orient-right:after { right: 7px; } - &.datepicker-orient-bottom:before { top: -7px; } - &.datepicker-orient-bottom:after { top: -6px; } - &.datepicker-orient-top:before { - bottom: -7px; - border-bottom: 0; - border-top: 7px solid @dropdown-border; - } - &.datepicker-orient-top:after { - bottom: -6px; - border-bottom: 0; - border-top: 6px solid @dropdown-bg; - } - } - table { - margin: 0; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - tr { - td, th { - text-align: center; - width: 30px; - height: 30px; - border-radius: 4px; - border: none; - } - } - } - // Inline display inside a table presents some problems with - // border and background colors. - .table-striped & table tr { - td, th { - background-color: transparent; - } - } - table tr td { - &.old, - &.new { - color: @btn-link-disabled-color; - } - &.day:hover, - &.focused { - background: @gray-lighter; - cursor: pointer; - } - &.disabled, - &.disabled:hover { - background: none; - color: @btn-link-disabled-color; - cursor: default; - } - &.highlighted { - @highlighted-bg: @state-info-bg; - .button-variant(#000, @highlighted-bg, darken(@highlighted-bg, 20%)); - border-radius: 0; - - &.focused { - background: darken(@highlighted-bg, 10%); - } - - &.disabled, - &.disabled:active { - background: @highlighted-bg; - color: @btn-link-disabled-color; - } - } - &.today { - @today-bg: lighten(orange, 30%); - .button-variant(#000, @today-bg, darken(@today-bg, 20%)); - - &.focused { - background: darken(@today-bg, 10%); - } - - &.disabled, - &.disabled:active { - background: @today-bg; - color: @btn-link-disabled-color; - } - } - &.range { - @range-bg: @gray-lighter; - .button-variant(#000, @range-bg, darken(@range-bg, 20%)); - border-radius: 0; - - &.focused { - background: darken(@range-bg, 10%); - } - - &.disabled, - &.disabled:active { - background: @range-bg; - color: @btn-link-disabled-color; - } - } - &.range.highlighted { - @range-highlighted-bg: mix(@state-info-bg, @gray-lighter, 50%); - .button-variant(#000, @range-highlighted-bg, darken(@range-highlighted-bg, 20%)); - - &.focused { - background: darken(@range-highlighted-bg, 10%); - } - - &.disabled, - &.disabled:active { - background: @range-highlighted-bg; - color: @btn-link-disabled-color; - } - } - &.range.today { - @range-today-bg: mix(orange, @gray-lighter, 50%); - .button-variant(#000, @range-today-bg, darken(@range-today-bg, 20%)); - - &.disabled, - &.disabled:active { - background: @range-today-bg; - color: @btn-link-disabled-color; - } - } - &.selected, - &.selected.highlighted { - .button-variant(#fff, @gray-light, @gray); - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } - &.active, - &.active.highlighted { - .button-variant(@btn-primary-color, @btn-primary-bg, @btn-primary-border); - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } - span { - display: block; - width: 23%; - height: 54px; - line-height: 54px; - float: left; - margin: 1%; - cursor: pointer; - border-radius: 4px; - &:hover, - &.focused { - background: @gray-lighter; - } - &.disabled, - &.disabled:hover { - background: none; - color: @btn-link-disabled-color; - cursor: default; - } - &.active, - &.active:hover, - &.active.disabled, - &.active.disabled:hover { - .button-variant(@btn-primary-color, @btn-primary-bg, @btn-primary-border); - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } - &.old, - &.new { - color: @btn-link-disabled-color; - } - } - } - - .datepicker-switch { - width: 145px; - } - - .datepicker-switch, - .prev, - .next, - tfoot tr th { - cursor: pointer; - &:hover { - background: @gray-lighter; - } - } - - .prev, .next { - &.disabled { - visibility: hidden; - } - } - - // Basic styling for calendar-week cells - .cw { - font-size: 10px; - width: 12px; - padding: 0 2px 0 5px; - vertical-align: middle; - } -} -.input-group.date .input-group-addon { - cursor: pointer; -} -.input-daterange { - width: 100%; - input { - text-align: center; - } - input:first-child { - border-radius: 3px 0 0 3px; - } - input:last-child { - border-radius: 0 3px 3px 0; - } - .input-group-addon { - width: auto; - min-width: 16px; - padding: 4px 5px; - line-height: @line-height-base; - border-width: 1px 0; - margin-left: -5px; - margin-right: -5px; - } -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker-en-CA.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker-en-CA.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker-en-CA.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker-en-CA.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ar-tn.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ar-tn.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ar-tn.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ar-tn.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ar.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ar.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ar.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ar.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.az.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.az.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.az.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.az.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.bg.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bg.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.bg.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bg.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bm.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bm.min.js new file mode 100644 index 0000000000..e0796a3ba7 --- /dev/null +++ b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bm.min.js @@ -0,0 +1 @@ +!function(a){a.fn.datepicker.dates.bm={days:["Kari","Ntɛnɛn","Tarata","Araba","Alamisa","Juma","Sibiri"],daysShort:["Kar","Ntɛ","Tar","Ara","Ala","Jum","Sib"],daysMin:["Ka","Nt","Ta","Ar","Al","Ju","Si"],months:["Zanwuyekalo","Fewuruyekalo","Marisikalo","Awirilikalo","Mɛkalo","Zuwɛnkalo","Zuluyekalo","Utikalo","Sɛtanburukalo","ɔkutɔburukalo","Nowanburukalo","Desanburukalo"],monthsShort:["Zan","Few","Mar","Awi","Mɛ","Zuw","Zul","Uti","Sɛt","ɔku","Now","Des"],today:"Bi",monthsTitle:"Kalo",clear:"Ka jɔsi",weekStart:1,format:"dd/mm/yyyy"}}(jQuery); \ No newline at end of file diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.bn.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bn.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.bn.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bn.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.br.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.br.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.br.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.br.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.bs.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bs.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.bs.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.bs.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ca.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ca.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ca.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ca.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.cs.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.cs.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.cs.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.cs.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.cy.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.cy.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.cy.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.cy.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.da.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.da.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.da.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.da.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.de.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.de.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.el.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.el.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.el.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.el.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-AU.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-AU.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-AU.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-AU.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-CA.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-CA.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-CA.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-CA.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-GB.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-IE.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-IE.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-IE.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-IE.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-NZ.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-NZ.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-NZ.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-NZ.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-ZA.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-ZA.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en-ZA.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.en-ZA.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.eo.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.eo.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.eo.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.eo.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.es.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.es.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.es.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.es.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.et.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.et.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.et.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.et.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.eu.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.eu.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.eu.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.eu.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fa.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fa.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fa.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fa.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fi.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fi.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fi.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fi.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fo.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fo.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fo.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fo.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fr-CH.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fr-CH.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fr-CH.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fr-CH.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fr.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fr.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fr.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.fr.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.gl.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.gl.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.gl.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.gl.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.he.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.he.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.he.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.he.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hi.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hi.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hi.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hi.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hr.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hr.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hr.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hr.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hu.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hu.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hu.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hu.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hy.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hy.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.hy.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.hy.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.id.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.id.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.id.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.id.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.is.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.is.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.is.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.is.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.it-CH.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.it-CH.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.it-CH.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.it-CH.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.it.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.it.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.it.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.it.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ja.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ja.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ja.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ja.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ka.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ka.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ka.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ka.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.kh.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.kh.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.kh.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.kh.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.kk.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.kk.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.kk.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.kk.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.km.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.km.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.km.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.km.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ko.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ko.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ko.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ko.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.kr.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.kr.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.kr.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.kr.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.lt.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.lt.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.lt.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.lt.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.lv.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.lv.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.lv.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.lv.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.me.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.me.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.me.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.me.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.mk.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.mk.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.mk.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.mk.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.mn.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.mn.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.mn.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.mn.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ms.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ms.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ms.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ms.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nl-BE.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.nl-BE.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nl-BE.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.nl-BE.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nl.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.nl.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nl.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.nl.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.no.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.no.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.no.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.no.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.oc.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.oc.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.oc.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.oc.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.pl.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.pl.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.pl.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.pl.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.pt-BR.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.pt-BR.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.pt-BR.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.pt-BR.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.pt.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.pt.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.pt.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.pt.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ro.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ro.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ro.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ro.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.rs-latin.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.rs-latin.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.rs-latin.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.rs-latin.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.rs.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.rs.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.rs.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.rs.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ru.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ru.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ru.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ru.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.si.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.si.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.si.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.si.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sk.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sk.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sk.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sk.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sl.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sl.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sl.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sl.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sq.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sq.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sq.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sq.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sr-latin.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sr-latin.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sr-latin.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sr-latin.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sr.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sr.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sr.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sr.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sv.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sv.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sv.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sv.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sw.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sw.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sw.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.sw.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ta.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ta.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.ta.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.ta.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.tg.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.tg.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.tg.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.tg.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.th.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.th.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.th.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.th.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.tk.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.tk.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.tk.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.tk.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.tr.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.tr.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.tr.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.tr.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.uk.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.uk.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.uk.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.uk.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.uz-cyrl.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.uz-cyrl.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.uz-cyrl.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.uz-cyrl.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.uz-latn.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.uz-latn.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.uz-latn.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.uz-latn.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.vi.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.vi.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.vi.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.vi.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-TW.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.min.js similarity index 100% rename from modules/http/webif/gstatic/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-TW.min.js rename to modules/http/webif/gstatic/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.min.js diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/package.json b/modules/http/webif/gstatic/bootstrap-datepicker/package.json deleted file mode 100644 index 8605e6b87e..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "bootstrap-datepicker", - "description": "A datepicker for Bootstrap", - "version": "1.9.0", - "license": "Apache-2.0", - "keywords": [ - "datepicker", - "bootstrap" - ], - "main": "./dist/js/bootstrap-datepicker.js", - "files": [ - "build", - "dist", - "js/**/*.js", - "less/*.less", - "LICENSE" - ], - "homepage": "https://github.com/uxsolutions/bootstrap-datepicker", - "author": "Andrew Rowls ", - "scripts": { - "test": "grunt test" - }, - "repository": { - "type": "git", - "url": "https://github.com/uxsolutions/bootstrap-datepicker.git" - }, - "dependencies": { - "jquery": ">=1.7.1 <4.0.0" - }, - "devDependencies": { - "grunt": "^1.0.4", - "grunt-banner": "~0.6.0", - "grunt-contrib-clean": "^1.0.0", - "grunt-contrib-compress": "^1.5.0", - "grunt-contrib-concat": "^1.0.1", - "grunt-contrib-csslint": "^2.0.0", - "grunt-contrib-cssmin": "^1.0.2", - "grunt-contrib-jshint": "^1.1.0", - "grunt-contrib-less": "^1.4.0", - "grunt-contrib-qunit": "^1.2.0", - "grunt-contrib-uglify": "^2.0.0", - "grunt-jscs": "^3.0.1", - "grunt-string-replace": "^1.3.1", - "load-grunt-tasks": "^3.5.2", - "phantomjs-prebuilt": "~2.1.16", - "time-grunt": "^1.4.0" - } -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/README.md b/modules/http/webif/gstatic/bootstrap-datepicker/tests/README.md deleted file mode 100644 index dc3ce9d80a..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/README.md +++ /dev/null @@ -1,30 +0,0 @@ -Unit tests, written with [QUnit](https://qunitjs.com), are used to -expose bugs for squashing, prevent bugs from respawning, and suppress new -bugs when adding new features and making changes. - -# Running the tests - -The simplest way to run the tests is to open `tests/tests.html` in your browser. -The test suites will automatically run themselves and present their results. - -To run the tests from the command line (after running jshint and jscs, which is -recommended), install Grunt and run the `test` task from anywhere within the -repo: - - $ grunt test - -# Adding tests - -Tests go in js files in the `tests/suites/` directory tree. QUnit organizes -tests into suites called "modules"; there is one module per js file. If the -tests you are adding do not fit into an existing module, create a new one at -`tests/suites/.js`, where `` is a broad yet -descriptive name for the suite. If tests have many year-specific cases (ie, -behave differently in leap years vs normal years, or have specific buggy -behavior in a certain year), create the module in a new directory, -`tests/suites//.js`, where `` is the decriptive -name and `` is the four-digit year the tests pertain to. - -In order for new tests to be run, they must be imported into `tests/tests.html`. -Find the script includes headed by the html comment ``, and -add a new one to the list which includes the new js files. diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/coverage.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/coverage.js deleted file mode 100644 index 2e5704bc83..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/coverage.js +++ /dev/null @@ -1,48 +0,0 @@ -(function(){ - //we want this at global scope so outside callers can find it. In a more realistic implementation we - //should probably put it in a namespace. - window.getCoverageByLine = function(silent) { - var key = null; - var lines = null; - var source = null; - //look for code coverage data - if (typeof window._$jscoverage === 'object') { - for (key in _$jscoverage) {} - lines = _$jscoverage[key]; - } - - if (!lines && !silent) { - console.log('code coverage data is NOT available'); - } - - return { 'key': key, 'lines': lines }; - }; - - QUnit.done = function(t) { - var cvgInfo = getCoverageByLine(true); - if (!!cvgInfo.key) { - var testableLines = 0; - var testedLines = 0; - var untestableLines = 0; - for (lineIdx in cvgInfo.lines) { - var cvg = cvgInfo.lines[lineIdx]; - if (typeof cvg === 'number') { - testableLines += 1; - if (cvg > 0) { - testedLines += 1; - } - } else { - untestableLines += 1; - } - } - var coverage = '' + Math.floor(100 * testedLines / testableLines) + '%'; - - var result = document.getElementById('qunit-testresult'); - if (result != null) { - result.innerHTML = result.innerHTML + ' ' + coverage + ' test coverage of ' + cvgInfo.key; - } else { - console.log('can\'t find test-result element to update'); - } - } - }; -}()); \ No newline at end of file diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/jquery-1.7.1.min.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/jquery-1.7.1.min.js deleted file mode 100644 index 198b3ff07d..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/jquery-1.7.1.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/mock.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/mock.js deleted file mode 100644 index a7d07dc9c3..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/mock.js +++ /dev/null @@ -1,49 +0,0 @@ -;(function(){ - -window.patch_date = function patch(f){ - var NativeDate = window.Date; - var date = function date(y,m,d,h,i,s,j){ - switch(arguments.length){ - case 0: return date.now ? new NativeDate(date.now) : new NativeDate(); - case 1: return new NativeDate(y); - case 2: return new NativeDate(y,m); - case 3: return new NativeDate(y,m,d); - case 4: return new NativeDate(y,m,d,h); - case 5: return new NativeDate(y,m,d,h,i); - case 6: return new NativeDate(y,m,d,h,i,s); - case 7: return new NativeDate(y,y,m,d,h,i,s,j); - } - }; - date.UTC = NativeDate.UTC; - return function(){ - Array.prototype.push.call(arguments, date); - window.Date = date; - f.apply(this, arguments); - window.Date = NativeDate; - }; -}; - - -window.patch_show_hide = function patch(f){ - var oldShow = $.fn.show, - newShow = function () { - $(this).removeClass('foo'); - return oldShow.apply(this, arguments); - }; - - var oldHide = $.fn.hide, - newHide = function () { - $(this).addClass('foo'); - return oldHide.apply(this, arguments); - }; - - return function(){ - $.fn.show = newShow; - $.fn.hide = newHide; - f.apply(this, arguments); - $.fn.show = oldShow; - $.fn.hide = oldHide; - }; -}; - -}()); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit-logging.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit-logging.js deleted file mode 100644 index 5bef1a5246..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit-logging.js +++ /dev/null @@ -1,29 +0,0 @@ -// Dummy logging calls (ie, if tests are run in IE) -window.console = window.console || {}; -window.console.log = window.console.log || function(){}; -window.console.debug = window.console.debug || function(){}; -window.console.info = window.console.info || function(){}; -window.console.warn = window.console.warn || function(){}; -window.console.error = window.console.error || function(){}; - -(function() { - var modName, testName; - - //arg: { name } - QUnit.testStart = function(t) { - modName = t.module; - testName = t.name; - }; - - //arg: { name, failed, passed, total } - QUnit.testDone = function(t) { - if (t.failed) - console.log('Test "' + t.module + ': ' + t.name + '" completed: ' + (0 === t.failed ? 'pass' : 'FAIL') + '\n') - }; - - //{ result, actual, expected, message } - QUnit.log = function(t) { - if (!t.result) - console.log('Test "' + modName + ': ' + testName + '" assertion failed. Expected <' + t.expected + '> Actual <' + t.actual + '>' + (t.message ? ': \'' + t.message + '\'' : '')); - }; -}()); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit.css b/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit.css deleted file mode 100644 index b948bae1c4..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit.css +++ /dev/null @@ -1,235 +0,0 @@ -/** - * QUnit v1.5.0 - A JavaScript Unit Testing Framework - * - * http://docs.jquery.com/QUnit - * - * Copyright (c) 2012 John Resig, Jörn Zaefferer - * Dual licensed under the MIT (MIT-LICENSE.txt) - * or GPL (GPL-LICENSE.txt) licenses. - */ - -/** Font Family and Sizes */ - -#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; -} - -#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } -#qunit-tests { font-size: smaller; } - - -/** Resets */ - -#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { - margin: 0; - padding: 0; -} - - -/** Header */ - -#qunit-header { - padding: 0.5em 0 0.5em 1em; - - color: #8699a4; - background-color: #0d3349; - - font-size: 1.5em; - line-height: 1em; - font-weight: normal; - - border-radius: 15px 15px 0 0; - -moz-border-radius: 15px 15px 0 0; - -webkit-border-top-right-radius: 15px; - -webkit-border-top-left-radius: 15px; -} - -#qunit-header a { - text-decoration: none; - color: #c2ccd1; -} - -#qunit-header a:hover, -#qunit-header a:focus { - color: #fff; -} - -#qunit-header label { - display: inline-block; -} - -#qunit-banner { - height: 5px; -} - -#qunit-testrunner-toolbar { - padding: 0.5em 0 0.5em 2em; - color: #5E740B; - background-color: #eee; -} - -#qunit-userAgent { - padding: 0.5em 0 0.5em 2.5em; - background-color: #2b81af; - color: #fff; - text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; -} - - -/** Tests: Pass/Fail */ - -#qunit-tests { - list-style-position: inside; -} - -#qunit-tests li { - padding: 0.4em 0.5em 0.4em 2.5em; - border-bottom: 1px solid #fff; - list-style-position: inside; -} - -#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { - display: none; -} - -#qunit-tests li strong { - cursor: pointer; -} - -#qunit-tests li a { - padding: 0.5em; - color: #c2ccd1; - text-decoration: none; -} -#qunit-tests li a:hover, -#qunit-tests li a:focus { - color: #000; -} - -#qunit-tests ol { - margin-top: 0.5em; - padding: 0.5em; - - background-color: #fff; - - border-radius: 15px; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; - - box-shadow: inset 0px 2px 13px #999; - -moz-box-shadow: inset 0px 2px 13px #999; - -webkit-box-shadow: inset 0px 2px 13px #999; -} - -#qunit-tests table { - border-collapse: collapse; - margin-top: .2em; -} - -#qunit-tests th { - text-align: right; - vertical-align: top; - padding: 0 .5em 0 0; -} - -#qunit-tests td { - vertical-align: top; -} - -#qunit-tests pre { - margin: 0; - white-space: pre-wrap; - word-wrap: break-word; -} - -#qunit-tests del { - background-color: #e0f2be; - color: #374e0c; - text-decoration: none; -} - -#qunit-tests ins { - background-color: #ffcaca; - color: #500; - text-decoration: none; -} - -/*** Test Counts */ - -#qunit-tests b.counts { color: black; } -#qunit-tests b.passed { color: #5E740B; } -#qunit-tests b.failed { color: #710909; } - -#qunit-tests li li { - margin: 0.5em; - padding: 0.4em 0.5em 0.4em 0.5em; - background-color: #fff; - border-bottom: none; - list-style-position: inside; -} - -/*** Passing Styles */ - -#qunit-tests li li.pass { - color: #5E740B; - background-color: #fff; - border-left: 26px solid #C6E746; -} - -#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } -#qunit-tests .pass .test-name { color: #366097; } - -#qunit-tests .pass .test-actual, -#qunit-tests .pass .test-expected { color: #999999; } - -#qunit-banner.qunit-pass { background-color: #C6E746; } - -/*** Failing Styles */ - -#qunit-tests li li.fail { - color: #710909; - background-color: #fff; - border-left: 26px solid #EE5757; - white-space: pre; -} - -#qunit-tests > li:last-child { - border-radius: 0 0 15px 15px; - -moz-border-radius: 0 0 15px 15px; - -webkit-border-bottom-right-radius: 15px; - -webkit-border-bottom-left-radius: 15px; -} - -#qunit-tests .fail { color: #000000; background-color: #EE5757; } -#qunit-tests .fail .test-name, -#qunit-tests .fail .module-name { color: #000000; } - -#qunit-tests .fail .test-actual { color: #EE5757; } -#qunit-tests .fail .test-expected { color: green; } - -#qunit-banner.qunit-fail { background-color: #EE5757; } - - -/** Result */ - -#qunit-testresult { - padding: 0.5em 0.5em 0.5em 2.5em; - - color: #2b81af; - background-color: #D2E0E6; - - border-bottom: 1px solid white; -} -#qunit-testresult .module-name { - font-weight: bold; -} - -/** Fixture */ - -#qunit-fixture { - position: absolute; - top: -10000px; - left: -10000px; - width: 1000px; - height: 1000px; -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit.js deleted file mode 100644 index 66dd721542..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/qunit.js +++ /dev/null @@ -1,1669 +0,0 @@ -/** - * QUnit v1.5.0 - A JavaScript Unit Testing Framework - * - * http://docs.jquery.com/QUnit - * - * Copyright (c) 2012 John Resig, Jörn Zaefferer - * Dual licensed under the MIT (MIT-LICENSE.txt) - * or GPL (GPL-LICENSE.txt) licenses. - */ - -(function(window) { - -var defined = { - setTimeout: typeof window.setTimeout !== "undefined", - sessionStorage: (function() { - var x = "qunit-test-string"; - try { - sessionStorage.setItem(x, x); - sessionStorage.removeItem(x); - return true; - } catch(e) { - return false; - } - }()) -}; - -var testId = 0, - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty; - -var Test = function(name, testName, expected, async, callback) { - this.name = name; - this.testName = testName; - this.expected = expected; - this.async = async; - this.callback = callback; - this.assertions = []; -}; -Test.prototype = { - init: function() { - var tests = id("qunit-tests"); - if (tests) { - var b = document.createElement("strong"); - b.innerHTML = "Running " + this.name; - var li = document.createElement("li"); - li.appendChild( b ); - li.className = "running"; - li.id = this.id = "test-output" + testId++; - tests.appendChild( li ); - } - }, - setup: function() { - if (this.module != config.previousModule) { - if ( config.previousModule ) { - runLoggingCallbacks('moduleDone', QUnit, { - name: config.previousModule, - failed: config.moduleStats.bad, - passed: config.moduleStats.all - config.moduleStats.bad, - total: config.moduleStats.all - } ); - } - config.previousModule = this.module; - config.moduleStats = { all: 0, bad: 0 }; - runLoggingCallbacks( 'moduleStart', QUnit, { - name: this.module - } ); - } else if (config.autorun) { - runLoggingCallbacks( 'moduleStart', QUnit, { - name: this.module - } ); - } - - config.current = this; - this.testEnvironment = extend({ - setup: function() {}, - teardown: function() {} - }, this.moduleTestEnvironment); - - runLoggingCallbacks( 'testStart', QUnit, { - name: this.testName, - module: this.module - }); - - // allow utility functions to access the current test environment - // TODO why?? - QUnit.current_testEnvironment = this.testEnvironment; - - if ( !config.pollution ) { - saveGlobal(); - } - if ( config.notrycatch ) { - this.testEnvironment.setup.call(this.testEnvironment); - return; - } - try { - this.testEnvironment.setup.call(this.testEnvironment); - } catch(e) { - QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); - } - }, - run: function() { - config.current = this; - - var running = id("qunit-testresult"); - - if ( running ) { - running.innerHTML = "Running:
" + this.name; - } - - if ( this.async ) { - QUnit.stop(); - } - - if ( config.notrycatch ) { - this.callback.call(this.testEnvironment); - return; - } - try { - this.callback.call(this.testEnvironment); - } catch(e) { - QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + ": " + e.message, extractStacktrace( e, 1 ) ); - // else next test will carry the responsibility - saveGlobal(); - - // Restart the tests if they're blocking - if ( config.blocking ) { - QUnit.start(); - } - } - }, - teardown: function() { - config.current = this; - if ( config.notrycatch ) { - this.testEnvironment.teardown.call(this.testEnvironment); - return; - } else { - try { - this.testEnvironment.teardown.call(this.testEnvironment); - } catch(e) { - QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); - } - } - checkPollution(); - }, - finish: function() { - config.current = this; - if ( this.expected != null && this.expected != this.assertions.length ) { - QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); - } else if ( this.expected == null && !this.assertions.length ) { - QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions." ); - } - - var good = 0, bad = 0, - li, i, - tests = id("qunit-tests"); - - config.stats.all += this.assertions.length; - config.moduleStats.all += this.assertions.length; - - if ( tests ) { - var ol = document.createElement("ol"); - - for ( i = 0; i < this.assertions.length; i++ ) { - var assertion = this.assertions[i]; - - li = document.createElement("li"); - li.className = assertion.result ? "pass" : "fail"; - li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); - ol.appendChild( li ); - - if ( assertion.result ) { - good++; - } else { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - - // store result when possible - if ( QUnit.config.reorder && defined.sessionStorage ) { - if (bad) { - sessionStorage.setItem("qunit-test-" + this.module + "-" + this.testName, bad); - } else { - sessionStorage.removeItem("qunit-test-" + this.module + "-" + this.testName); - } - } - - if (bad === 0) { - ol.style.display = "none"; - } - - var b = document.createElement("strong"); - b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; - - var a = document.createElement("a"); - a.innerHTML = "Rerun"; - a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); - - addEvent(b, "click", function() { - var next = b.nextSibling.nextSibling, - display = next.style.display; - next.style.display = display === "none" ? "block" : "none"; - }); - - addEvent(b, "dblclick", function(e) { - var target = e && e.target ? e.target : window.event.srcElement; - if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { - target = target.parentNode; - } - if ( window.location && target.nodeName.toLowerCase() === "strong" ) { - window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); - } - }); - - li = id(this.id); - li.className = bad ? "fail" : "pass"; - li.removeChild( li.firstChild ); - li.appendChild( b ); - li.appendChild( a ); - li.appendChild( ol ); - - } else { - for ( i = 0; i < this.assertions.length; i++ ) { - if ( !this.assertions[i].result ) { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - } - - QUnit.reset(); - - runLoggingCallbacks( 'testDone', QUnit, { - name: this.testName, - module: this.module, - failed: bad, - passed: this.assertions.length - bad, - total: this.assertions.length - } ); - }, - - queue: function() { - var test = this; - synchronize(function() { - test.init(); - }); - function run() { - // each of these can by async - synchronize(function() { - test.setup(); - }); - synchronize(function() { - test.run(); - }); - synchronize(function() { - test.teardown(); - }); - synchronize(function() { - test.finish(); - }); - } - // defer when previous test run passed, if storage is available - var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-test-" + this.module + "-" + this.testName); - if (bad) { - run(); - } else { - synchronize(run, true); - } - } - -}; - -var QUnit = { - - // call on start of module test to prepend name to all tests - module: function(name, testEnvironment) { - config.currentModule = name; - config.currentModuleTestEnviroment = testEnvironment; - }, - - asyncTest: function(testName, expected, callback) { - if ( arguments.length === 2 ) { - callback = expected; - expected = null; - } - - QUnit.test(testName, expected, callback, true); - }, - - test: function(testName, expected, callback, async) { - var name = '' + escapeInnerText(testName) + ''; - - if ( arguments.length === 2 ) { - callback = expected; - expected = null; - } - - if ( config.currentModule ) { - name = '' + config.currentModule + ": " + name; - } - - if ( !validTest(config.currentModule + ": " + testName) ) { - return; - } - - var test = new Test(name, testName, expected, async, callback); - test.module = config.currentModule; - test.moduleTestEnvironment = config.currentModuleTestEnviroment; - test.queue(); - }, - - // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. - expect: function(asserts) { - config.current.expected = asserts; - }, - - // Asserts true. - // @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); - ok: function(result, msg) { - if (!config.current) { - throw new Error("ok() assertion outside test context, was " + sourceFromStacktrace(2)); - } - result = !!result; - var details = { - result: result, - message: msg - }; - msg = escapeInnerText(msg || (result ? "okay" : "failed")); - if ( !result ) { - var source = sourceFromStacktrace(2); - if (source) { - details.source = source; - msg += '
Source:
' + escapeInnerText(source) + '
'; - } - } - runLoggingCallbacks( 'log', QUnit, details ); - config.current.assertions.push({ - result: result, - message: msg - }); - }, - - // Checks that the first two arguments are equal, with an optional message. Prints out both actual and expected values. - // @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); - equal: function(actual, expected, message) { - QUnit.push(expected == actual, actual, expected, message); - }, - - notEqual: function(actual, expected, message) { - QUnit.push(expected != actual, actual, expected, message); - }, - - deepEqual: function(actual, expected, message) { - QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); - }, - - notDeepEqual: function(actual, expected, message) { - QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); - }, - - strictEqual: function(actual, expected, message) { - QUnit.push(expected === actual, actual, expected, message); - }, - - notStrictEqual: function(actual, expected, message) { - QUnit.push(expected !== actual, actual, expected, message); - }, - - raises: function(block, expected, message) { - var actual, ok = false; - - if (typeof expected === 'string') { - message = expected; - expected = null; - } - - try { - block.call(config.current.testEnvironment); - } catch (e) { - actual = e; - } - - if (actual) { - // we don't want to validate thrown error - if (!expected) { - ok = true; - // expected is a regexp - } else if (QUnit.objectType(expected) === "regexp") { - ok = expected.test(actual); - // expected is a constructor - } else if (actual instanceof expected) { - ok = true; - // expected is a validation function which returns true is validation passed - } else if (expected.call({}, actual) === true) { - ok = true; - } - } - - QUnit.ok(ok, message); - }, - - start: function(count) { - config.semaphore -= count || 1; - if (config.semaphore > 0) { - // don't start until equal number of stop-calls - return; - } - if (config.semaphore < 0) { - // ignore if start is called more often then stop - config.semaphore = 0; - } - // A slight delay, to avoid any current callbacks - if ( defined.setTimeout ) { - window.setTimeout(function() { - if (config.semaphore > 0) { - return; - } - if ( config.timeout ) { - clearTimeout(config.timeout); - } - - config.blocking = false; - process(true); - }, 13); - } else { - config.blocking = false; - process(true); - } - }, - - stop: function(count) { - config.semaphore += count || 1; - config.blocking = true; - - if ( config.testTimeout && defined.setTimeout ) { - clearTimeout(config.timeout); - config.timeout = window.setTimeout(function() { - QUnit.ok( false, "Test timed out" ); - config.semaphore = 1; - QUnit.start(); - }, config.testTimeout); - } - } -}; - -//We want access to the constructor's prototype -(function() { - function F(){} - F.prototype = QUnit; - QUnit = new F(); - //Make F QUnit's constructor so that we can add to the prototype later - QUnit.constructor = F; -}()); - -// deprecated; still export them to window to provide clear error messages -// next step: remove entirely -QUnit.equals = function() { - QUnit.push(false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead"); -}; -QUnit.same = function() { - QUnit.push(false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead"); -}; - -// Maintain internal state -var config = { - // The queue of tests to run - queue: [], - - // block until document ready - blocking: true, - - // when enabled, show only failing tests - // gets persisted through sessionStorage and can be changed in UI via checkbox - hidepassed: false, - - // by default, run previously failed tests first - // very useful in combination with "Hide passed tests" checked - reorder: true, - - // by default, modify document.title when suite is done - altertitle: true, - - urlConfig: ['noglobals', 'notrycatch'], - - //logging callback queues - begin: [], - done: [], - log: [], - testStart: [], - testDone: [], - moduleStart: [], - moduleDone: [] -}; - -// Load paramaters -(function() { - var location = window.location || { search: "", protocol: "file:" }, - params = location.search.slice( 1 ).split( "&" ), - length = params.length, - urlParams = {}, - current; - - if ( params[ 0 ] ) { - for ( var i = 0; i < length; i++ ) { - current = params[ i ].split( "=" ); - current[ 0 ] = decodeURIComponent( current[ 0 ] ); - // allow just a key to turn on a flag, e.g., test.html?noglobals - current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; - urlParams[ current[ 0 ] ] = current[ 1 ]; - } - } - - QUnit.urlParams = urlParams; - config.filter = urlParams.filter; - - // Figure out if we're running the tests from a server or not - QUnit.isLocal = location.protocol === 'file:'; -}()); - -// Expose the API as global variables, unless an 'exports' -// object exists, in that case we assume we're in CommonJS - export everything at the end -if ( typeof exports === "undefined" || typeof require === "undefined" ) { - extend(window, QUnit); - window.QUnit = QUnit; -} - -// define these after exposing globals to keep them in these QUnit namespace only -extend(QUnit, { - config: config, - - // Initialize the configuration options - init: function() { - extend(config, { - stats: { all: 0, bad: 0 }, - moduleStats: { all: 0, bad: 0 }, - started: +new Date(), - updateRate: 1000, - blocking: false, - autostart: true, - autorun: false, - filter: "", - queue: [], - semaphore: 0 - }); - - var qunit = id( "qunit" ); - if ( qunit ) { - qunit.innerHTML = - '

' + escapeInnerText( document.title ) + '

' + - '

' + - '
' + - '

' + - '
    '; - } - - var tests = id( "qunit-tests" ), - banner = id( "qunit-banner" ), - result = id( "qunit-testresult" ); - - if ( tests ) { - tests.innerHTML = ""; - } - - if ( banner ) { - banner.className = ""; - } - - if ( result ) { - result.parentNode.removeChild( result ); - } - - if ( tests ) { - result = document.createElement( "p" ); - result.id = "qunit-testresult"; - result.className = "result"; - tests.parentNode.insertBefore( result, tests ); - result.innerHTML = 'Running...
     '; - } - }, - - // Resets the test setup. Useful for tests that modify the DOM. - // If jQuery is available, uses jQuery's html(), otherwise just innerHTML. - reset: function() { - if ( window.jQuery ) { - jQuery( "#qunit-fixture" ).html( config.fixture ); - } else { - var main = id( 'qunit-fixture' ); - if ( main ) { - main.innerHTML = config.fixture; - } - } - }, - - // Trigger an event on an element. - // @example triggerEvent( document.body, "click" ); - triggerEvent: function( elem, type, event ) { - if ( document.createEvent ) { - event = document.createEvent("MouseEvents"); - event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - elem.dispatchEvent( event ); - - } else if ( elem.fireEvent ) { - elem.fireEvent("on"+type); - } - }, - - // Safe object type checking - is: function( type, obj ) { - return QUnit.objectType( obj ) == type; - }, - - objectType: function( obj ) { - if (typeof obj === "undefined") { - return "undefined"; - - // consider: typeof null === object - } - if (obj === null) { - return "null"; - } - - var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || ''; - - switch (type) { - case 'Number': - if (isNaN(obj)) { - return "nan"; - } - return "number"; - case 'String': - case 'Boolean': - case 'Array': - case 'Date': - case 'RegExp': - case 'Function': - return type.toLowerCase(); - } - if (typeof obj === "object") { - return "object"; - } - return undefined; - }, - - push: function(result, actual, expected, message) { - if (!config.current) { - throw new Error("assertion outside test context, was " + sourceFromStacktrace()); - } - var details = { - result: result, - message: message, - actual: actual, - expected: expected - }; - - message = escapeInnerText(message) || (result ? "okay" : "failed"); - message = '' + message + ""; - var output = message; - if (!result) { - expected = escapeInnerText(QUnit.jsDump.parse(expected)); - actual = escapeInnerText(QUnit.jsDump.parse(actual)); - output += ''; - if (actual != expected) { - output += ''; - output += ''; - } - var source = sourceFromStacktrace(); - if (source) { - details.source = source; - output += ''; - } - output += "
    Expected:
    ' + expected + '
    Result:
    ' + actual + '
    Diff:
    ' + QUnit.diff(expected, actual) +'
    Source:
    ' + escapeInnerText(source) + '
    "; - } - - runLoggingCallbacks( 'log', QUnit, details ); - - config.current.assertions.push({ - result: !!result, - message: output - }); - }, - - pushFailure: function(message, source) { - var details = { - result: false, - message: message - }; - var output = escapeInnerText(message); - if (source) { - details.source = source; - output += '
    Source:
    ' + escapeInnerText(source) + '
    '; - } - runLoggingCallbacks( 'log', QUnit, details ); - config.current.assertions.push({ - result: false, - message: output - }); - }, - - url: function( params ) { - params = extend( extend( {}, QUnit.urlParams ), params ); - var querystring = "?", - key; - for ( key in params ) { - if ( !hasOwn.call( params, key ) ) { - continue; - } - querystring += encodeURIComponent( key ) + "=" + - encodeURIComponent( params[ key ] ) + "&"; - } - return window.location.pathname + querystring.slice( 0, -1 ); - }, - - extend: extend, - id: id, - addEvent: addEvent -}); - -//QUnit.constructor is set to the empty F() above so that we can add to it's prototype later -//Doing this allows us to tell if the following methods have been overwritten on the actual -//QUnit object, which is a deprecated way of using the callbacks. -extend(QUnit.constructor.prototype, { - // Logging callbacks; all receive a single argument with the listed properties - // run test/logs.html for any related changes - begin: registerLoggingCallback('begin'), - // done: { failed, passed, total, runtime } - done: registerLoggingCallback('done'), - // log: { result, actual, expected, message } - log: registerLoggingCallback('log'), - // testStart: { name } - testStart: registerLoggingCallback('testStart'), - // testDone: { name, failed, passed, total } - testDone: registerLoggingCallback('testDone'), - // moduleStart: { name } - moduleStart: registerLoggingCallback('moduleStart'), - // moduleDone: { name, failed, passed, total } - moduleDone: registerLoggingCallback('moduleDone') -}); - -if ( typeof document === "undefined" || document.readyState === "complete" ) { - config.autorun = true; -} - -QUnit.load = function() { - runLoggingCallbacks( 'begin', QUnit, {} ); - - // Initialize the config, saving the execution queue - var oldconfig = extend({}, config); - QUnit.init(); - extend(config, oldconfig); - - config.blocking = false; - - var urlConfigHtml = '', len = config.urlConfig.length; - for ( var i = 0, val; i < len; i++ ) { - val = config.urlConfig[i]; - config[val] = QUnit.urlParams[val]; - urlConfigHtml += ''; - } - - var userAgent = id("qunit-userAgent"); - if ( userAgent ) { - userAgent.innerHTML = navigator.userAgent; - } - var banner = id("qunit-header"); - if ( banner ) { - banner.innerHTML = ' ' + banner.innerHTML + ' ' + urlConfigHtml; - addEvent( banner, "change", function( event ) { - var params = {}; - params[ event.target.name ] = event.target.checked ? true : undefined; - window.location = QUnit.url( params ); - }); - } - - var toolbar = id("qunit-testrunner-toolbar"); - if ( toolbar ) { - var filter = document.createElement("input"); - filter.type = "checkbox"; - filter.id = "qunit-filter-pass"; - addEvent( filter, "click", function() { - var ol = document.getElementById("qunit-tests"); - if ( filter.checked ) { - ol.className = ol.className + " hidepass"; - } else { - var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; - ol.className = tmp.replace(/ hidepass /, " "); - } - if ( defined.sessionStorage ) { - if (filter.checked) { - sessionStorage.setItem("qunit-filter-passed-tests", "true"); - } else { - sessionStorage.removeItem("qunit-filter-passed-tests"); - } - } - }); - if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) { - filter.checked = true; - var ol = document.getElementById("qunit-tests"); - ol.className = ol.className + " hidepass"; - } - toolbar.appendChild( filter ); - - var label = document.createElement("label"); - label.setAttribute("for", "qunit-filter-pass"); - label.innerHTML = "Hide passed tests"; - toolbar.appendChild( label ); - } - - var main = id('qunit-fixture'); - if ( main ) { - config.fixture = main.innerHTML; - } - - if (config.autostart) { - QUnit.start(); - } -}; - -addEvent(window, "load", QUnit.load); - -// addEvent(window, "error") gives us a useless event object -window.onerror = function( message, file, line ) { - if ( QUnit.config.current ) { - QUnit.pushFailure( message, file + ":" + line ); - } else { - QUnit.test( "global failure", function() { - QUnit.pushFailure( message, file + ":" + line ); - }); - } -}; - -function done() { - config.autorun = true; - - // Log the last module results - if ( config.currentModule ) { - runLoggingCallbacks( 'moduleDone', QUnit, { - name: config.currentModule, - failed: config.moduleStats.bad, - passed: config.moduleStats.all - config.moduleStats.bad, - total: config.moduleStats.all - } ); - } - - var banner = id("qunit-banner"), - tests = id("qunit-tests"), - runtime = +new Date() - config.started, - passed = config.stats.all - config.stats.bad, - html = [ - 'Tests completed in ', - runtime, - ' milliseconds.
    ', - '', - passed, - ' tests of ', - config.stats.all, - ' passed, ', - config.stats.bad, - ' failed.' - ].join(''); - - if ( banner ) { - banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); - } - - if ( tests ) { - id( "qunit-testresult" ).innerHTML = html; - } - - if ( config.altertitle && typeof document !== "undefined" && document.title ) { - // show ✖ for good, ✔ for bad suite result in title - // use escape sequences in case file gets loaded with non-utf-8-charset - document.title = [ - (config.stats.bad ? "\u2716" : "\u2714"), - document.title.replace(/^[\u2714\u2716] /i, "") - ].join(" "); - } - - // clear own sessionStorage items if all tests passed - if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) { - var key; - for ( var i = 0; i < sessionStorage.length; i++ ) { - key = sessionStorage.key( i++ ); - if ( key.indexOf("qunit-test-") === 0 ) { - sessionStorage.removeItem( key ); - } - } - } - - runLoggingCallbacks( 'done', QUnit, { - failed: config.stats.bad, - passed: passed, - total: config.stats.all, - runtime: runtime - } ); -} - -function validTest( name ) { - var filter = config.filter, - run = false; - - if ( !filter ) { - return true; - } - - var not = filter.charAt( 0 ) === "!"; - if ( not ) { - filter = filter.slice( 1 ); - } - - if ( name.indexOf( filter ) !== -1 ) { - return !not; - } - - if ( not ) { - run = true; - } - - return run; -} - -// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions) -// Later Safari and IE10 are supposed to support error.stack as well -// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack -function extractStacktrace( e, offset ) { - offset = offset || 3; - if (e.stacktrace) { - // Opera - return e.stacktrace.split("\n")[offset + 3]; - } else if (e.stack) { - // Firefox, Chrome - var stack = e.stack.split("\n"); - if (/^error$/i.test(stack[0])) { - stack.shift(); - } - return stack[offset]; - } else if (e.sourceURL) { - // Safari, PhantomJS - // hopefully one day Safari provides actual stacktraces - // exclude useless self-reference for generated Error objects - if ( /qunit.js$/.test( e.sourceURL ) ) { - return; - } - // for actual exceptions, this is useful - return e.sourceURL + ":" + e.line; - } -} -function sourceFromStacktrace(offset) { - try { - throw new Error(); - } catch ( e ) { - return extractStacktrace( e, offset ); - } -} - -function escapeInnerText(s) { - if (!s) { - return ""; - } - s = s + ""; - return s.replace(/[\&<>]/g, function(s) { - switch(s) { - case "&": return "&"; - case "<": return "<"; - case ">": return ">"; - default: return s; - } - }); -} - -function synchronize( callback, last ) { - config.queue.push( callback ); - - if ( config.autorun && !config.blocking ) { - process(last); - } -} - -function process( last ) { - function next() { - process( last ); - } - var start = new Date().getTime(); - config.depth = config.depth ? config.depth + 1 : 1; - - while ( config.queue.length && !config.blocking ) { - if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { - config.queue.shift()(); - } else { - window.setTimeout( next, 13 ); - break; - } - } - config.depth--; - if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { - done(); - } -} - -function saveGlobal() { - config.pollution = []; - - if ( config.noglobals ) { - for ( var key in window ) { - if ( !hasOwn.call( window, key ) ) { - continue; - } - config.pollution.push( key ); - } - } -} - -function checkPollution( name ) { - var old = config.pollution; - saveGlobal(); - - var newGlobals = diff( config.pollution, old ); - if ( newGlobals.length > 0 ) { - QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") ); - } - - var deletedGlobals = diff( old, config.pollution ); - if ( deletedGlobals.length > 0 ) { - QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") ); - } -} - -// returns a new Array with the elements that are in a but not in b -function diff( a, b ) { - var result = a.slice(); - for ( var i = 0; i < result.length; i++ ) { - for ( var j = 0; j < b.length; j++ ) { - if ( result[i] === b[j] ) { - result.splice(i, 1); - i--; - break; - } - } - } - return result; -} - -function extend(a, b) { - for ( var prop in b ) { - if ( b[prop] === undefined ) { - delete a[prop]; - - // Avoid "Member not found" error in IE8 caused by setting window.constructor - } else if ( prop !== "constructor" || a !== window ) { - a[prop] = b[prop]; - } - } - - return a; -} - -function addEvent(elem, type, fn) { - if ( elem.addEventListener ) { - elem.addEventListener( type, fn, false ); - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, fn ); - } else { - fn(); - } -} - -function id(name) { - return !!(typeof document !== "undefined" && document && document.getElementById) && - document.getElementById( name ); -} - -function registerLoggingCallback(key){ - return function(callback){ - config[key].push( callback ); - }; -} - -// Supports deprecated method of completely overwriting logging callbacks -function runLoggingCallbacks(key, scope, args) { - //debugger; - var callbacks; - if ( QUnit.hasOwnProperty(key) ) { - QUnit[key].call(scope, args); - } else { - callbacks = config[key]; - for( var i = 0; i < callbacks.length; i++ ) { - callbacks[i].call( scope, args ); - } - } -} - -// Test for equality any JavaScript type. -// Author: Philippe Rathé -QUnit.equiv = (function() { - - var innerEquiv; // the real equiv function - var callers = []; // stack to decide between skip/abort functions - var parents = []; // stack to avoiding loops from circular referencing - - // Call the o related callback with the given arguments. - function bindCallbacks(o, callbacks, args) { - var prop = QUnit.objectType(o); - if (prop) { - if (QUnit.objectType(callbacks[prop]) === "function") { - return callbacks[prop].apply(callbacks, args); - } else { - return callbacks[prop]; // or undefined - } - } - } - - var getProto = Object.getPrototypeOf || function (obj) { - return obj.__proto__; - }; - - var callbacks = (function () { - - // for string, boolean, number and null - function useStrictEquality(b, a) { - if (b instanceof a.constructor || a instanceof b.constructor) { - // to catch short annotaion VS 'new' annotation of a - // declaration - // e.g. var i = 1; - // var j = new Number(1); - return a == b; - } else { - return a === b; - } - } - - return { - "string" : useStrictEquality, - "boolean" : useStrictEquality, - "number" : useStrictEquality, - "null" : useStrictEquality, - "undefined" : useStrictEquality, - - "nan" : function(b) { - return isNaN(b); - }, - - "date" : function(b, a) { - return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); - }, - - "regexp" : function(b, a) { - return QUnit.objectType(b) === "regexp" && - // the regex itself - a.source === b.source && - // and its modifers - a.global === b.global && - // (gmi) ... - a.ignoreCase === b.ignoreCase && - a.multiline === b.multiline; - }, - - // - skip when the property is a method of an instance (OOP) - // - abort otherwise, - // initial === would have catch identical references anyway - "function" : function() { - var caller = callers[callers.length - 1]; - return caller !== Object && typeof caller !== "undefined"; - }, - - "array" : function(b, a) { - var i, j, loop; - var len; - - // b could be an object literal here - if (QUnit.objectType(b) !== "array") { - return false; - } - - len = a.length; - if (len !== b.length) { // safe and faster - return false; - } - - // track reference to avoid circular references - parents.push(a); - for (i = 0; i < len; i++) { - loop = false; - for (j = 0; j < parents.length; j++) { - if (parents[j] === a[i]) { - loop = true;// dont rewalk array - } - } - if (!loop && !innerEquiv(a[i], b[i])) { - parents.pop(); - return false; - } - } - parents.pop(); - return true; - }, - - "object" : function(b, a) { - var i, j, loop; - var eq = true; // unless we can proove it - var aProperties = [], bProperties = []; // collection of - // strings - - // comparing constructors is more strict than using - // instanceof - if (a.constructor !== b.constructor) { - // Allow objects with no prototype to be equivalent to - // objects with Object as their constructor. - if (!((getProto(a) === null && getProto(b) === Object.prototype) || - (getProto(b) === null && getProto(a) === Object.prototype))) - { - return false; - } - } - - // stack constructor before traversing properties - callers.push(a.constructor); - // track reference to avoid circular references - parents.push(a); - - for (i in a) { // be strict: don't ensures hasOwnProperty - // and go deep - loop = false; - for (j = 0; j < parents.length; j++) { - if (parents[j] === a[i]) { - // don't go down the same path twice - loop = true; - } - } - aProperties.push(i); // collect a's properties - - if (!loop && !innerEquiv(a[i], b[i])) { - eq = false; - break; - } - } - - callers.pop(); // unstack, we are done - parents.pop(); - - for (i in b) { - bProperties.push(i); // collect b's properties - } - - // Ensures identical properties name - return eq && innerEquiv(aProperties.sort(), bProperties.sort()); - } - }; - }()); - - innerEquiv = function() { // can take multiple arguments - var args = Array.prototype.slice.apply(arguments); - if (args.length < 2) { - return true; // end transition - } - - return (function(a, b) { - if (a === b) { - return true; // catch the most you can - } else if (a === null || b === null || typeof a === "undefined" || - typeof b === "undefined" || - QUnit.objectType(a) !== QUnit.objectType(b)) { - return false; // don't lose time with error prone cases - } else { - return bindCallbacks(a, callbacks, [ b, a ]); - } - - // apply transition with (1..n) arguments - }(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length - 1))); - }; - - return innerEquiv; - -}()); - -/** - * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | - * http://flesler.blogspot.com Licensed under BSD - * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008 - * - * @projectDescription Advanced and extensible data dumping for Javascript. - * @version 1.0.0 - * @author Ariel Flesler - * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} - */ -QUnit.jsDump = (function() { - function quote( str ) { - return '"' + str.toString().replace(/"/g, '\\"') + '"'; - } - function literal( o ) { - return o + ''; - } - function join( pre, arr, post ) { - var s = jsDump.separator(), - base = jsDump.indent(), - inner = jsDump.indent(1); - if ( arr.join ) { - arr = arr.join( ',' + s + inner ); - } - if ( !arr ) { - return pre + post; - } - return [ pre, inner + arr, base + post ].join(s); - } - function array( arr, stack ) { - var i = arr.length, ret = new Array(i); - this.up(); - while ( i-- ) { - ret[i] = this.parse( arr[i] , undefined , stack); - } - this.down(); - return join( '[', ret, ']' ); - } - - var reName = /^function (\w+)/; - - var jsDump = { - parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance - stack = stack || [ ]; - var parser = this.parsers[ type || this.typeOf(obj) ]; - type = typeof parser; - var inStack = inArray(obj, stack); - if (inStack != -1) { - return 'recursion('+(inStack - stack.length)+')'; - } - //else - if (type == 'function') { - stack.push(obj); - var res = parser.call( this, obj, stack ); - stack.pop(); - return res; - } - // else - return (type == 'string') ? parser : this.parsers.error; - }, - typeOf: function( obj ) { - var type; - if ( obj === null ) { - type = "null"; - } else if (typeof obj === "undefined") { - type = "undefined"; - } else if (QUnit.is("RegExp", obj)) { - type = "regexp"; - } else if (QUnit.is("Date", obj)) { - type = "date"; - } else if (QUnit.is("Function", obj)) { - type = "function"; - } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") { - type = "window"; - } else if (obj.nodeType === 9) { - type = "document"; - } else if (obj.nodeType) { - type = "node"; - } else if ( - // native arrays - toString.call( obj ) === "[object Array]" || - // NodeList objects - ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) ) - ) { - type = "array"; - } else { - type = typeof obj; - } - return type; - }, - separator: function() { - return this.multiline ? this.HTML ? '
    ' : '\n' : this.HTML ? ' ' : ' '; - }, - indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing - if ( !this.multiline ) { - return ''; - } - var chr = this.indentChar; - if ( this.HTML ) { - chr = chr.replace(/\t/g,' ').replace(/ /g,' '); - } - return new Array( this._depth_ + (extra||0) ).join(chr); - }, - up: function( a ) { - this._depth_ += a || 1; - }, - down: function( a ) { - this._depth_ -= a || 1; - }, - setParser: function( name, parser ) { - this.parsers[name] = parser; - }, - // The next 3 are exposed so you can use them - quote: quote, - literal: literal, - join: join, - // - _depth_: 1, - // This is the list of parsers, to modify them, use jsDump.setParser - parsers: { - window: '[Window]', - document: '[Document]', - error: '[ERROR]', //when no parser is found, shouldn't happen - unknown: '[Unknown]', - 'null': 'null', - 'undefined': 'undefined', - 'function': function( fn ) { - var ret = 'function', - name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE - if ( name ) { - ret += ' ' + name; - } - ret += '('; - - ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); - return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); - }, - array: array, - nodelist: array, - 'arguments': array, - object: function( map, stack ) { - var ret = [ ], keys, key, val, i; - QUnit.jsDump.up(); - if (Object.keys) { - keys = Object.keys( map ); - } else { - keys = []; - for (key in map) { keys.push( key ); } - } - keys.sort(); - for (i = 0; i < keys.length; i++) { - key = keys[ i ]; - val = map[ key ]; - ret.push( QUnit.jsDump.parse( key, 'key' ) + ': ' + QUnit.jsDump.parse( val, undefined, stack ) ); - } - QUnit.jsDump.down(); - return join( '{', ret, '}' ); - }, - node: function( node ) { - var open = QUnit.jsDump.HTML ? '<' : '<', - close = QUnit.jsDump.HTML ? '>' : '>'; - - var tag = node.nodeName.toLowerCase(), - ret = open + tag; - - for ( var a in QUnit.jsDump.DOMAttrs ) { - var val = node[QUnit.jsDump.DOMAttrs[a]]; - if ( val ) { - ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' ); - } - } - return ret + close + open + '/' + tag + close; - }, - functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function - var l = fn.length; - if ( !l ) { - return ''; - } - - var args = new Array(l); - while ( l-- ) { - args[l] = String.fromCharCode(97+l);//97 is 'a' - } - return ' ' + args.join(', ') + ' '; - }, - key: quote, //object calls it internally, the key part of an item in a map - functionCode: '[code]', //function calls it internally, it's the content of the function - attribute: quote, //node calls it internally, it's an html attribute value - string: quote, - date: quote, - regexp: literal, //regex - number: literal, - 'boolean': literal - }, - DOMAttrs:{//attributes to dump from nodes, name=>realName - id:'id', - name:'name', - 'class':'className' - }, - HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) - indentChar:' ',//indentation unit - multiline:true //if true, items in a collection, are separated by a \n, else just a space. - }; - - return jsDump; -}()); - -// from Sizzle.js -function getText( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += getText( elem.childNodes ); - } - } - - return ret; -} - -//from jquery.js -function inArray( elem, array ) { - if ( array.indexOf ) { - return array.indexOf( elem ); - } - - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[ i ] === elem ) { - return i; - } - } - - return -1; -} - -/* - * Javascript Diff Algorithm - * By John Resig (http://ejohn.org/) - * Modified by Chu Alan "sprite" - * - * Released under the MIT license. - * - * More Info: - * http://ejohn.org/projects/javascript-diff-algorithm/ - * - * Usage: QUnit.diff(expected, actual) - * - * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" - */ -QUnit.diff = (function() { - function diff(o, n) { - var ns = {}; - var os = {}; - var i; - - for (i = 0; i < n.length; i++) { - if (ns[n[i]] == null) { - ns[n[i]] = { - rows: [], - o: null - }; - } - ns[n[i]].rows.push(i); - } - - for (i = 0; i < o.length; i++) { - if (os[o[i]] == null) { - os[o[i]] = { - rows: [], - n: null - }; - } - os[o[i]].rows.push(i); - } - - for (i in ns) { - if ( !hasOwn.call( ns, i ) ) { - continue; - } - if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { - n[ns[i].rows[0]] = { - text: n[ns[i].rows[0]], - row: os[i].rows[0] - }; - o[os[i].rows[0]] = { - text: o[os[i].rows[0]], - row: ns[i].rows[0] - }; - } - } - - for (i = 0; i < n.length - 1; i++) { - if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && - n[i + 1] == o[n[i].row + 1]) { - n[i + 1] = { - text: n[i + 1], - row: n[i].row + 1 - }; - o[n[i].row + 1] = { - text: o[n[i].row + 1], - row: i + 1 - }; - } - } - - for (i = n.length - 1; i > 0; i--) { - if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && - n[i - 1] == o[n[i].row - 1]) { - n[i - 1] = { - text: n[i - 1], - row: n[i].row - 1 - }; - o[n[i].row - 1] = { - text: o[n[i].row - 1], - row: i - 1 - }; - } - } - - return { - o: o, - n: n - }; - } - - return function(o, n) { - o = o.replace(/\s+$/, ''); - n = n.replace(/\s+$/, ''); - var out = diff(o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/)); - - var str = ""; - var i; - - var oSpace = o.match(/\s+/g); - if (oSpace == null) { - oSpace = [" "]; - } - else { - oSpace.push(" "); - } - var nSpace = n.match(/\s+/g); - if (nSpace == null) { - nSpace = [" "]; - } - else { - nSpace.push(" "); - } - - if (out.n.length === 0) { - for (i = 0; i < out.o.length; i++) { - str += '' + out.o[i] + oSpace[i] + ""; - } - } - else { - if (out.n[0].text == null) { - for (n = 0; n < out.o.length && out.o[n].text == null; n++) { - str += '' + out.o[n] + oSpace[n] + ""; - } - } - - for (i = 0; i < out.n.length; i++) { - if (out.n[i].text == null) { - str += '' + out.n[i] + nSpace[i] + ""; - } - else { - var pre = ""; - - for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { - pre += '' + out.o[n] + oSpace[n] + ""; - } - str += " " + out.n[i].text + nSpace[i] + pre; - } - } - } - - return str; - }; -}()); - -// for CommonJS enviroments, export everything -if ( typeof exports !== "undefined" || typeof require !== "undefined" ) { - extend(exports, QUnit); -} - -// get at whatever the global object is, like window in browsers -}( (function() {return this;}.call()) )); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/utils.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/utils.js deleted file mode 100644 index 6f9cac58f4..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/assets/utils.js +++ /dev/null @@ -1,21 +0,0 @@ -function UTCDate(){ - return new Date(Date.UTC.apply(Date, arguments)); -} - - -function format_date(date){ - var y = date.getUTCFullYear(), - m = date.getUTCMonth() + 1, - d = date.getUTCDate(), - h = date.getUTCHours(), - i = date.getUTCMinutes(), - s = date.getUTCSeconds(), - l = date.getUTCMilliseconds(); - function z(i){return (i <= 9 ? '0'+i : i);} - return y+'-'+z(m)+'-'+z(d)+' '+z(h)+':'+z(i)+':'+z(s)+'.'+z(l); -} - - -function datesEqual(actual, expected, message){ - QUnit.push(QUnit.equiv(actual, expected), format_date(actual), format_date(expected), message); -} diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/calendar-weeks.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/calendar-weeks.js deleted file mode 100644 index 258c29cba4..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/calendar-weeks.js +++ /dev/null @@ -1,48 +0,0 @@ -module('Calendar Weeks', { - setup: function(){ - this.input = $('') - .appendTo('#qunit-fixture') - .val('2013-01-14') - .datepicker({ - format: 'yyyy-mm-dd', - calendarWeeks: true - }) - .focus(); // Activate for visibility checks - this.dp = this.input.data('datepicker'); - this.picker = this.dp.picker; - }, - teardown: function(){ - this.picker.remove(); - } -}); - -test('adds cw header column', function(){ - var target = this.picker.find('.datepicker-days thead tr:nth-child(3) th:first-child'); - ok(target.hasClass('cw'), 'First column heading is from cw column'); -}); - -test('adds calendar week cells to each day row', function(){ - var target = this.picker.find('.datepicker-days tbody tr'); - - expect(target.length); - target.each(function(i){ - var t = $(this).children().first(); - ok(t.hasClass('cw'), "First column is cw column"); - }); -}); - -test('displays correct calendar week', function(){ - var target = this.picker.find('.datepicker-days tbody tr'); - - expect(target.length); - target.each(function(i){ - var t = $(this).children().first(); - equal(t.text(), i+1, "Displays correct calendar weeks"); - }); -}); - -test('it prepends column to switcher thead row', function(){ - var target = this.picker.find('.datepicker-days thead tr:nth-child(2)'); - equal(target.children().length, 3, 'first row has 3 columns'); - ok(!target.children().first().hasClass('cw'), 'cw column is not prepended'); -}); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/component.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/component.js deleted file mode 100644 index 0fee55a106..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/component.js +++ /dev/null @@ -1,274 +0,0 @@ -module('Component', { - setup: function(){ - this.fieldset = $('
    ' + - '
    '+ - ''+ - ''+ - '
    ' + - '
    ') - .appendTo('#qunit-fixture'); - - this.component = this.fieldset.find('.input-append') - .datepicker({format: "dd-mm-yyyy"}); - this.input = this.component.find('input'); - this.addon = this.component.find('.add-on'); - this.dp = this.component.data('datepicker'); - this.picker = this.dp.picker; - }, - teardown: function(){ - this.picker.remove(); - } -}); - - -test('Component gets date/viewDate from input value', function(){ - datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); - datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12)); -}); - -test('Activation by component', function(){ - ok(!this.picker.is(':visible')); - this.addon.click(); - ok(this.picker.is(':visible')); -}); - -test('Dont activation (by disabled) by component', function(){ - ok(!this.picker.is(':visible')); - this.input.prop('disabled', true); - this.addon.click(); - ok(!this.picker.is(':visible')); - this.input.prop('disabled', false); - this.fieldset.prop('disabled', true); - this.addon.click(); - ok(!this.picker.is(':visible')); -}); - -test('simple keyboard nav test', function(){ - var target; - - // Keyboard nav only works with non-readonly inputs - this.input.removeAttr('readonly'); - - equal(this.dp.viewMode, 0); - target = this.picker.find('.datepicker-days thead th.datepicker-switch'); - equal(target.text(), 'February 2012', 'Title is "February 2012"'); - datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); - datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12)); - - // Focus/open - this.addon.click(); - - // Navigation: -1 day, left arrow key - this.input.trigger({ - type: 'keydown', - keyCode: 37 - }); - datesEqual(this.dp.viewDate, UTCDate(2012, 1, 11)); - datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); - datesEqual(this.dp.focusDate, UTCDate(2012, 1, 11)); - // Month not changed - target = this.picker.find('.datepicker-days thead th.datepicker-switch'); - equal(target.text(), 'February 2012', 'Title is "February 2012"'); - - // Navigation: +1 month, shift + right arrow key - this.input.trigger({ - type: 'keydown', - keyCode: 39, - shiftKey: true - }); - datesEqual(this.dp.viewDate, UTCDate(2012, 2, 11)); - datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); - datesEqual(this.dp.focusDate, UTCDate(2012, 2, 11)); - target = this.picker.find('.datepicker-days thead th.datepicker-switch'); - equal(target.text(), 'March 2012', 'Title is "March 2012"'); - - // Navigation: -1 year, ctrl + left arrow key - this.input.trigger({ - type: 'keydown', - keyCode: 37, - ctrlKey: true - }); - datesEqual(this.dp.viewDate, UTCDate(2011, 2, 11)); - datesEqual(this.dp.getUTCDate(), UTCDate(2012, 1, 12)); - datesEqual(this.dp.focusDate, UTCDate(2011, 2, 11)); - target = this.picker.find('.datepicker-days thead th.datepicker-switch'); - equal(target.text(), 'March 2011', 'Title is "March 2011"'); -}); - -test('setValue', function(){ - this.dp.dates.replace(UTCDate(2012, 2, 13)); - this.dp.setValue(); - datesEqual(this.dp.dates[0], UTCDate(2012, 2, 13)); - equal(this.input.val(), '13-03-2012'); -}); - -test('update', function(){ - this.input.val('13-03-2012'); - this.dp.update(); - equal(this.dp.dates.length, 1); - datesEqual(this.dp.dates[0], UTCDate(2012, 2, 13)); -}); - -test('Navigating to/from decade view', function(){ - var target; - - this.addon.click(); - this.input.val('31-03-2012'); - this.dp.update(); - - equal(this.dp.viewMode, 0); - target = this.picker.find('.datepicker-days thead th.datepicker-switch'); - ok(target.is(':visible'), 'View switcher is visible'); - - target.click(); - ok(this.picker.find('.datepicker-months').is(':visible'), 'Month picker is visible'); - equal(this.dp.viewMode, 1); - // Not modified when switching modes - datesEqual(this.dp.viewDate, UTCDate(2012, 2, 31)); - datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); - - target = this.picker.find('.datepicker-months thead th.datepicker-switch'); - ok(target.is(':visible'), 'View switcher is visible'); - - target.click(); - ok(this.picker.find('.datepicker-years').is(':visible'), 'Year picker is visible'); - equal(this.dp.viewMode, 2); - // Not modified when switching modes - datesEqual(this.dp.viewDate, UTCDate(2012, 2, 31)); - datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); - - // Change years to test internal state changes - target = this.picker.find('.datepicker-years tbody span:contains(2011)'); - target.click(); - equal(this.dp.viewMode, 1); - // Only viewDate modified - datesEqual(this.dp.viewDate, UTCDate(2011, 2, 1)); - datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); - - target = this.picker.find('.datepicker-months tbody span:contains(Apr)'); - target.click(); - equal(this.dp.viewMode, 0); - // Only viewDate modified - datesEqual(this.dp.viewDate, UTCDate(2011, 3, 1)); - datesEqual(this.dp.dates[0], UTCDate(2012, 2, 31)); -}); - -test('Selecting date resets viewDate and date', function(){ - var target; - - this.addon.click(); - this.input.val('31-03-2012'); - this.dp.update(); - - // Rendered correctly - equal(this.dp.viewMode, 0); - target = this.picker.find('.datepicker-days tbody td:first'); - equal(target.text(), '26'); // Should be Feb 26 - - // Updated internally on click - target.click(); - datesEqual(this.dp.viewDate, UTCDate(2012, 1, 26)); - datesEqual(this.dp.dates[0], UTCDate(2012, 1, 26)); - - // Re-rendered on click - target = this.picker.find('.datepicker-days tbody td:first'); - equal(target.text(), '29'); // Should be Jan 29 -}); - -test('"destroy" removes associated HTML', function(){ - var datepickerDivSelector = '.datepicker'; - - $('#datepicker').datepicker('show'); - - //there should be one datepicker initiated so that means one hidden .datepicker div - equal($(datepickerDivSelector).length, 1); - this.component.datepicker('destroy'); - equal($(datepickerDivSelector).length, 0);//hidden HTML should be gone -}); - -test('"remove" is an alias for "destroy"', function(){ - var called, originalDestroy = this.dp.destroy; - this.dp.destroy = function () { - called = true; - return originalDestroy.apply(this, arguments); - }; - this.dp.remove(); - ok(called); -}); - -test('Does not block events', function(){ - var clicks = 0; - function handler(){ - clicks++; - } - $('#qunit-fixture').on('click', '.add-on', handler); - this.addon.click(); - equal(clicks, 1); - $('#qunit-fixture').off('click', '.add-on', handler); -}); - - -test('date and viewDate must be between startDate and endDate when setStartDate called', function() { - this.dp.setDate(new Date(2013, 1, 1)); - datesEqual(this.dp.dates[0], UTCDate(2013, 1, 1)); - datesEqual(this.dp.viewDate, UTCDate(2013, 1, 1)); - this.dp.setStartDate(new Date(2013, 5, 6)); - datesEqual(this.dp.viewDate, UTCDate(2013, 5, 6)); - equal(this.dp.dates.length, 0); -}); - -test('date and viewDate must be between startDate and endDate when setEndDate called', function() { - this.dp.setDate(new Date(2013, 11, 1)); - datesEqual(this.dp.dates[0], UTCDate(2013, 11, 1)); - datesEqual(this.dp.viewDate, UTCDate(2013, 11, 1)); - this.dp.setEndDate(new Date(2013, 5, 6)); - datesEqual(this.dp.viewDate, UTCDate(2013, 5, 6)); - equal(this.dp.dates.length, 0); -}); - -test('picker should render fine when `$.fn.show` and `$.fn.hide` are overridden', patch_show_hide(function () { - var viewModes = $.fn.datepicker.DPGlobal.viewModes, - minViewMode = this.dp.o.minViewMode, - maxViewMode = this.dp.o.maxViewMode, - childDivs = this.picker.children('div'); - - this.dp.setViewMode(minViewMode); - - // Overwritten `$.fn.hide` method adds the `foo` class to its matched elements - var curDivShowing = childDivs.filter('.datepicker-' + viewModes[minViewMode].clsName); - ok(!curDivShowing.hasClass('foo'), 'Shown div does not have overridden `$.fn.hide` side-effects'); - - // Check that other classes do have `foo` class - var divNotShown; - for (var curViewMode = minViewMode + 1; curViewMode <= maxViewMode; curViewMode++) { - divNotShown = childDivs.filter('.datepicker-' + viewModes[curViewMode].clsName); - ok(divNotShown.hasClass('foo'), 'Other divs do have overridden `$.fn.hide` side-effects'); - } -})); - -test('Focused ceil for decade/century/millenium views', function(){ - var input = $('') - .appendTo('#qunit-fixture') - .datepicker({ - startView: 2, - defaultViewDate: { - year: 2115 - } - }), - dp = input.data('datepicker'), - picker = dp.picker, - target; - - input.focus(); - - target = picker.find('.datepicker-years tbody .focused'); - ok(target.text() === '2115', 'Year cell is focused'); - - picker.find('.datepicker-years thead th.datepicker-switch').click(); - target = picker.find('.datepicker-decades tbody .focused'); - ok(target.text() === '2110', 'Decade cell is focused'); - - picker.find('.datepicker-decades thead th.datepicker-switch').click(); - target = picker.find('.datepicker-centuries tbody .focused'); - ok(target.text() === '2100', 'Century cell is focused'); -}); diff --git a/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/data-api.js b/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/data-api.js deleted file mode 100644 index a751f57111..0000000000 --- a/modules/http/webif/gstatic/bootstrap-datepicker/tests/suites/data-api.js +++ /dev/null @@ -1,114 +0,0 @@ -module('DATA-API'); - -test('DATA-API: data-provide="datepicker" on input; focus', function(){ - var input = $('') - .appendTo('#qunit-fixture'); - input.focus(); - ok(input.data('datepicker'), 'datepicker is initialized by "focus" event'); -}); - -test('DATA-API: data-provide="datepicker" on input; click', function(){ - var input = $('') - .appendTo('#qunit-fixture'); - input.click(); - ok(input.data('datepicker'), 'datepicker is initialized by "focus" event'); -}); - -test('DATA-API: data-provide="datepicker" on component', function(){ - var html, comp; - - html = '
    '+ - ''+ - '
    '; - - comp = $(html).appendTo('#qunit-fixture'); - comp.find('input').focus(); - ok(comp.data('datepicker'), 'append component initialized by "focus" event on input'); - comp.remove(); - - comp = $(html).appendTo('#qunit-fixture'); - comp.find('input').click(); - ok(comp.data('datepicker'), 'append component initialized by "click" event on input'); - comp.remove(); - - comp = $(html).appendTo('#qunit-fixture'); - comp.find('.add-on').focus(); - ok(comp.data('datepicker'), 'append component initialized by "focus" event on add-on'); - comp.remove(); - - comp = $(html).appendTo('#qunit-fixture'); - comp.find('.add-on').click(); - ok(comp.data('datepicker'), 'append component initialized by "click" event on add-on'); - comp.remove(); - - - html = '
    '+ - ''+ - '
    '; - - comp = $(html).prependTo('#qunit-fixture'); - comp.find('input').focus(); - ok(comp.data('datepicker'), 'prepend component initialized by "focus" event on input'); - comp.remove(); - - comp = $(html).prependTo('#qunit-fixture'); - comp.find('input').click(); - ok(comp.data('datepicker'), 'prepend component initialized by "click" event on input'); - comp.remove(); - - comp = $(html).prependTo('#qunit-fixture'); - comp.find('.add-on').focus(); - ok(comp.data('datepicker'), 'prepend component initialized by "focus" event on add-on'); - comp.remove(); - - comp = $(html).prependTo('#qunit-fixture'); - comp.find('.add-on').click(); - ok(comp.data('datepicker'), 'prepend component initialized by "click" event on add-on'); - comp.remove(); -}); - -test('DATA-API: data-provide="datepicker" on button', function(){ - var html, comp; - - html = '