diff --git a/sass/custom/_paulus.scss b/sass/custom/_paulus.scss index b5445e0bd51..6efc4c17a18 100644 --- a/sass/custom/_paulus.scss +++ b/sass/custom/_paulus.scss @@ -33,6 +33,49 @@ } } +.material-card { + // display: inline-block; + background-color: #fefefe; + border-radius: 2px; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.2); + + h1 { + font-family: Roboto, Noto, sans-serif; + -webkit-font-smoothing: antialiased; + font-size: 24px; + font-weight: 400; + letter-spacing: -.012em; + line-height: 40px; + color: #212121; + padding: 20px 16px 12px; + text-transform: capitalize; + margin: 0; + } + + &.text { + padding: 16px; + + h1 { + padding: 4px 0px 12px; + } + } +} + +.frontpage { + + .current-version { + margin-bottom: 16px; + + .release-date { + white-space: nowrap; + } + } + + .blog-date { + white-space: nowrap; + } +} + .supported-brands { text-align: center; img { diff --git a/source/_components/binary_sensor.apcupsd.markdown b/source/_components/binary_sensor.apcupsd.markdown index e2e1db42d4c..4b3b3f0005d 100644 --- a/source/_components/binary_sensor.apcupsd.markdown +++ b/source/_components/binary_sensor.apcupsd.markdown @@ -19,8 +19,8 @@ To enable this sensor, add the following lines to your `configuration.yaml` file ```yaml # Example configuration.yaml entry binary_sensor: - - platform: apcupsd - name: UPS Online + platform: apcupsd + name: UPS Online ``` Configuration variables: diff --git a/source/_components/binary_sensor.template.markdown b/source/_components/binary_sensor.template.markdown index 440c5a82592..0aa9b4797b4 100644 --- a/source/_components/binary_sensor.template.markdown +++ b/source/_components/binary_sensor.template.markdown @@ -31,6 +31,7 @@ Configuration variables: - **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend. - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. - **warnings** (*Optional*): Turn off warnings (useful if the sensor is loaded before devices it depends on). + - **entity_id** (*Optional*): Add a list of entity_ids so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update it's state. ## {% linkable_title Examples %} diff --git a/source/_components/device_tracker.owntracks.markdown b/source/_components/device_tracker.owntracks.markdown index 9aab6a52b14..3b15ac8eeac 100644 --- a/source/_components/device_tracker.owntracks.markdown +++ b/source/_components/device_tracker.owntracks.markdown @@ -32,7 +32,7 @@ Configuration variables: - **max_gps_accuracy** (*Optional*): Sometimes Owntracks can report GPS location with a very low accuracy (few kilometers). That can trigger false zoning in your Home Assistant installation. With the parameter, you can filter these GPS reports. The number has to be in meter. For example, if you put 200 only GPS report with an accuracy under 200 will be take in account. ### {% linkable_title Using Owntracks with other device trackers %} -Owntracks can also be used with other device trackers, such as [Nmap](/components/device_tracker.nmap_scanner/) or [Netgear](/components/device_tracker.netgear/). To do this, fill in the `mac` field to the Owntracks entry in `known_devices.yaml` with the MAC address of the device you want to track. This way the state of the device will be determined by the source that reported last. +Owntracks can also be used with other device trackers, such as [Nmap](/components/device_tracker.nmap_scanner/) or [Netgear](/components/device_tracker.netgear/). To do this, fill in the `mac` field to the Owntracks entry in `known_devices.yaml` with the MAC address of the device you want to track. This way the state of the device will be determined by the source that reported last. The naming convention for known device list is `_` and could be set in app configuration. More details about this config can found in [device tracker](/components/device_tracker/). ### {% linkable_title Using Owntracks regions %} Owntracks can track regions, and send region entry and exit information to Home Assistant(HA). You set up a region in the Owntracks app which you should name the same as your HA Zone, and then make sure to turn on the `share` option for the region in the owntracks app. Please see the [owntracks documentation](http://owntracks.org/booklet/guide/waypoints/) diff --git a/source/_components/lirc.markdown b/source/_components/lirc.markdown new file mode 100644 index 00000000000..bacf8b3cb1f --- /dev/null +++ b/source/_components/lirc.markdown @@ -0,0 +1,99 @@ +--- +layout: page +title: "LIRC" +description: "Instructions how to integrate IR remotes with LIRC into Home Assistant." +date: 2016-05-22 19:59 +sidebar: true +comments: false +sharing: true +footer: true +logo: lirc.gif +ha_category: Automation +featured: false +ha_release: 0.21 +ha_iot_class: "Local Push" +--- + +[LIRC](http://www.lirc.org/) integration for Home Assistant allows you to receive signals from an infrared remote control and control actions based on the buttons you press. You can use them to set scenes or trigger any other [automation](https://home-assistant.io/components/automation/). + +Sending IR commands is not supported in this component (yet), but can be accomplished using the [shell_command component](https://home-assistant.io/components/shell_command/) in conjunction with the `irsend` command. + +### {% linkable_title Installation %} + +To allow Home Assistant to talk to your IR receiver, you need to first make sure you have the correct dependencies installed: + +```bash +$ sudo apt-get install lirc +``` + +

+If you are configuring on a Raspberry Pi, there are excellent instructions with GPIO schematics and driver configurations [here](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/). Consider following these. +

+ +### {% linkable_title Configuring LIRC %} + +Now teach LIRC about your particular remote control by preparing a lircd configuration file (`/etc/lirc/lircd.conf`). Search the [LIRC remote database](http://lirc.sourceforge.net/remotes/) for your model. If you can't find it, then you can always use the `irrecord` program to learn your remote. This will create a valid configuration file. Add as many remotes as you want by pasting them into the file. If `irrecord` doesn't work (e.g. for some air conditioner remotes), then the `mode2` program is capable of reading the codes in raw mode, followed by `irrecord -a` to extract hex codes. + +Next, you have to make a `~/.lircrc` file that maps keypresses to system actions. [The configuration](http://www.lirc.org/html/configure.html) is a bit tedious but it must be done. Use the `prog = home-assistant` for all keys you want to be recognized by Home Assistant. The values you set for `button` must be the same as in the `lircd.conf` file and the values you put for `config` entry will be the sensor value in Home Assistant when you press the button. An example may look like this: + +```bash +begin + remote = SONY + button = KEY_1 + prog = home-assistant + config = KEY_1 +end +begin + remote = SONY + button = KEY_2 + prog = home-assistant + config = KEY_2 +end +begin + remote = SONY + button = KEY_3 + prog = home-assistant + config = KEY_3 +end +``` + +Test your LIRC installation before proceeding by running: + +```bash +$ irexec -n home-assistant +``` + +and pressing some buttons on the remote. + + +### {% linkable_title Configuration Home Assistant %} + +```yaml +# Example configuration.yaml entry +lirc: +``` + +

+If you are on a Debian based system (like Raspberry Pi) and are having issues loading the component due to it being unable to install python-lirc, install it manually using `apt-get install python3-lirc`. +

+ +#### {% linkable_title Events %} + +The LIRC component fires `ir_command_received` events on the bus. You can capture the events and respond to them in automation scripts like this: + +```yaml +# Example configuration.yaml automation entry +automation: +- alias: Off on Remote + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: KEY_0 + action: + service: homeassistant.turn_off + entity_id: group.a_lights + +``` + +The `button_name` data values (e.g. `KEY_0`) are set by you in the `.lircrc` file. diff --git a/source/_components/sensor.bloomsky.markdown b/source/_components/sensor.bloomsky.markdown index 08a9852e086..07c28221aa6 100644 --- a/source/_components/sensor.bloomsky.markdown +++ b/source/_components/sensor.bloomsky.markdown @@ -28,6 +28,7 @@ sensor: - UVIndex - Luminance - Night + - Voltage ``` Configuration variables: @@ -40,3 +41,4 @@ Configuration variables: - Rain - Temperature - UVIndex + - Voltage diff --git a/source/_components/sensor.dte_energy_bridge.markdown b/source/_components/sensor.dte_energy_bridge.markdown new file mode 100644 index 00000000000..1c2d7999f0f --- /dev/null +++ b/source/_components/sensor.dte_energy_bridge.markdown @@ -0,0 +1,29 @@ +--- +layout: page +title: "DTE Energy Bridge" +description: "Instructions how to setup DTE Energy Bridge with Home Assistant." +date: 2016-06-07 08:10 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Sensor +ha_release: 0.21 +ha_iot_class: "Local Polling" +--- + +A sensor platform for the [DTE](https://www.dteenergy.com/) Energy Bridge. + +To enable this sensor, add the following lines to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: dte_energy_bridge + ip: 192.168.1.11 +``` + +Configuration variables: + +- **ip** (*Required*): The IP address of your bridge. + diff --git a/source/_components/sensor.openweathermap.markdown b/source/_components/sensor.openweathermap.markdown index 6c8a4f85c69..01673022dc4 100644 --- a/source/_components/sensor.openweathermap.markdown +++ b/source/_components/sensor.openweathermap.markdown @@ -40,7 +40,7 @@ Configuration variables: - **api_key** (*Required*): Your API key for http://openweathermap.org/. - **forecast** (*Optional*): Enables the forecast. The default is to display the current conditions. -- **display_conditions** array (*Required*): Conditions to display in the frontend. +- **monitored_conditions** array (*Required*): Conditions to display in the frontend. - **weather**: A human-readable text summary. - **temperature**: The current temperature. - **wind_speed**: The wind speed. diff --git a/source/_components/sensor.template.markdown b/source/_components/sensor.template.markdown index ca42bcaf90f..925cec40b11 100644 --- a/source/_components/sensor.template.markdown +++ b/source/_components/sensor.template.markdown @@ -35,6 +35,7 @@ Configuration variables: - **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any. - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. - **warnings** (*Optional*): Turn off warnings (useful if the sensor is loaded before devices it depends on). + - **entity_id** (*Optional*): Add a list of entity_ids so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update it's state. ## {% linkable_title Examples %} diff --git a/source/_components/switch.flux.markdown b/source/_components/switch.flux.markdown index 23b1a645ce7..25213c21180 100644 --- a/source/_components/switch.flux.markdown +++ b/source/_components/switch.flux.markdown @@ -29,14 +29,14 @@ If you don't wish to have flux update on 30 second intervals, you can leave the switch turned off and use automation rules that call the service `switch.flux_update` whenever you want the lights updated. -Example `configuration.yaml`: ```yaml +# Example configuration.yaml entry switch: platform: flux lights: - light.desk - light.lamp - name: Fluxer # optional, default Flux + name: Fluxer # optional, default Flux start_time: 7:00 # optional, default sunrise stop_time: 23:00 # optional, default 22:00 start_colortemp: 4000 # optional, default 4000 diff --git a/source/_components/switch.template.markdown b/source/_components/switch.template.markdown index 21057e58786..7ddf487bf16 100644 --- a/source/_components/switch.template.markdown +++ b/source/_components/switch.template.markdown @@ -42,6 +42,7 @@ Configuration variables: - **value_template** (*Required*): Defines a [template](/topics/templating/) to set the state of the switch. - **turn_on** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned on. - **turn_off** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned off. + - **entity_id** (*Optional*): Add a list of entity_ids so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update it's state. ## {% linkable_title Examples %} diff --git a/source/_components/thermostat.zwave.markdown b/source/_components/thermostat.zwave.markdown index 17821dc3ea6..0ae7f181421 100644 --- a/source/_components/thermostat.zwave.markdown +++ b/source/_components/thermostat.zwave.markdown @@ -15,7 +15,7 @@ ha_release: 0.17 To get your Z-Wave thermostat working with Home Assistant, follow the instructions for the general [Z-Wave component](/components/zwave/).

-If your thermostat support fan modes or different operating modes, it should be considered a [HVAC component](components/hvac/), and will also be detected as one. Thermostat component does not support setting fan or operation mode. This is controlled via the HVAC component. +If your thermostat support fan modes or different operating modes, it should be considered a [HVAC component](/components/hvac.zwave/), and will also be detected as one. Thermostat component does not support setting fan or operation mode. This is controlled via the HVAC component. If the thermostat support different operationg modes, you will get one thermostat entity for each mode. These can be hidden with settings using the customize setting in the `configuration.yaml` file.

diff --git a/source/_components/zwave.markdown b/source/_components/zwave.markdown index c448ff35401..5615187a21f 100644 --- a/source/_components/zwave.markdown +++ b/source/_components/zwave.markdown @@ -12,210 +12,6 @@ ha_category: Hub featured: true --- -[Z-Wave](http://www.z-wave.com/) integration for Home Assistant allows you to observe and control connected Z-Wave devices. Z-Wave support requires a [supported Z-Wave USB stick](https://github.com/OpenZWave/open-zwave/wiki/Controller-Compatibility-List) to be plugged into the host. +Please see the [getting started section] for in-depth documentation on how to use the Z-Wave component. -There is currently support for switches, lights and sensors. All will be picked up automatically after configuring this platform. - -### {% linkable_title Installation %} - -To allow Home Assistant to talk to your Z-Wave USB stick you will have to compile the OpenZWave library and install the related [python-OpenZWave package](https://github.com/OpenZWave/python-openzwave). This can be done as follows. _(Note: The Home Assistant docker image has support for Z-Wave built-in)_ - -Make sure you have the correct dependencies installed before running the script: - -```bash -$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools -``` - -Make sure you have at least version 0.23 of cython. - -```bash -$ sudo pip3 install --upgrade cython -``` - -Then get the OpenZWave files and switch to the `python3` branch: -

Do not use root to build python-openzwave as it will surely fail.

-```bash -$ git clone https://github.com/OpenZWave/python-openzwave.git -$ cd python-openzwave -$ git checkout python3 -$ PYTHON_EXEC=$(which python3) make build -$ sudo PYTHON_EXEC=$(which python3) make install -``` -

-Instead of `make install`, you can alternatively build your own python-openzwave package which can be easily uninstalled: - -```$ sudo PYTHON_EXEC=$(which python3) checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave``` - -

- -With this installation, your `config_path` needed below will resemble: - -```bash -/usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config -``` - - -### {% linkable_title Configuration %} - -```yaml -# Example configuration.yaml entry -zwave: - usb_path: /dev/ttyUSB0 - config_path: /usr/local/share/python-openzwave/config - polling_interval: 60000 - customize: - sensor.greenwave_powernode_6_port_energy_10: - polling_intensity: 1 -``` - -Configuration variables: - -- **usb_path** (*Required*): The port where your device is connected to your Home Assistant host. -- **config_path** (*Optional*): The path to the Python Open Z-Wave configuration files. -- **autoheal** (*Optional*): Allows disabling auto ZWave heal at midnight. Defaults to True. -- **polling_interval** (*Optional*): The time period in milliseconds between polls of a nodes value. Be careful about using polling values below 30000 (30 seconds) as polling can flood the zwave network and cause problems. -- **customize** (*Optional*): This attribute contains node-specific override values: - - **polling_intensity** (*Optional*): Enables polling of a value and sets the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc). If not specified then your device will not be polled. - -To find the path of your Z-Wave stick, run: - -```bash -$ ls /dev/ttyUSB* -``` - -Or, on some other systems (such as Raspberry Pi), use: - -```bash -$ ls /dev/ttyACM* -``` - -

-Depending on what's plugged into your USB ports, the name found above may change. You can lock in a name, such as `/dev/zwave`, by following [these instructions](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/). -

- -#### {% linkable_title Events %} - -Some devices can also trigger scene activation events, which can be used in automation scripts (for example the press of a button on a wall switch): - -```yaml -# Example configuration.yaml automation entry -automation: - - alias: Turn on Desk light - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: zwaveme_zme_wallcs_secure_wall_controller_8 - scene_id: 11 -``` - -The *entity_id* and *scene_id* of all triggered events can be seen in the console output. - -#### {% linkable_title Services %} - -The Z-Wave component exposes four services to help maintain the network. - -| Service | Description | -| ------- | ----------- | -| add_node | Put the zwave controller in inclusion mode. Allows one to add a new device to the zwave network.| -| remove_node | Put the zwave controller in exclusion mode. Allows one to remove a device from the zwave network.| -| heal_network | Tells the controller to "heal" the network. Bascially asks the nodes to tell the controller all of their neighbors so the controller can refigure out optimal routing. | -| soft_reset | Tells the controller to do a "soft reset". This is not supposed to lose any data, but different controllers can behave differently to a "soft reset" command.| -| test_network | Tells the controller to send no-op commands to each node and measure the time for a response. In theory, this can also bring back nodes which have been marked "presumed dead".| - -The soft_reset and heal_network commands can be used as part of an automation script -to help keep a zwave network running relliably. For example: - -```yaml -# Example configuration.yaml automation entry -automation: - - alias: soft reset at 2:30am - trigger: - platform: time - after: '2:30:00' - action: - service: zwave.soft_reset - - - alias: heal at 2:31am - trigger: - platform: time - after: '2:31:00' - action: - service: zwave.heal_network -``` - -#### {% linkable_title Device Specific Notes & Configuration %} - -##### {% linkable_title Aeon Minimote %} - -Here's a handy configuration for the Aeon Labs Minimote that defines all possible button presses. Put it into `automation.yaml`. - -```yaml -- alias: Minimote Button 1 Pressed - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 1 - -- alias: Minimote Button 1 Held - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 2 - -- alias: Minimote Button 2 Pressed - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 3 - -- alias: Minimote Button 2 Held - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 4 - -- alias: Minimote Button 3 Pressed - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 5 - -- alias: Minimote Button 3 Held - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 6 - -- alias: Minimote Button 4 Pressed - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 7 - -- alias: Minimote Button 4 Held - trigger: - platform: event - event_type: zwave.scene_activated - event_data: - entity_id: aeon_labs_minimote_1 - scene_id: 8 -``` - -##### {% linkable_title Aeotec MultiSensor 6 %} - -In order for Home Assistant to recognize well the motion sensor, you will need to change its configuration from `Basic Set (default)` to `Binary Sensor report`. Currently there's no way to do this in Home Assistant but you can use ozwcp (OpenZWave control panel), Domoticz or similar to do it +[getting started section]: /getting-started/z-wave/ diff --git a/source/_includes/asides/getting_started_navigation.html b/source/_includes/asides/getting_started_navigation.html index 42221bc727d..46383b0136a 100644 --- a/source/_includes/asides/getting_started_navigation.html +++ b/source/_includes/asides/getting_started_navigation.html @@ -10,6 +10,7 @@
  • {% active_link /getting-started/installation-raspberry-pi/ Raspberry Pi %}
  • {% active_link /getting-started/installation-raspberry-pi-all-in-one/ Raspberry Pi All-In-One Installer %}
  • {% active_link /getting-started/installation-docker/ Docker %}
  • +
  • {% active_link /getting-started/installation-vagrant/ Vagrant %}
  • {% active_link /getting-started/installation-synology/ Synology NAS %}
  • {% active_link /getting-started/installation-virtualenv/ Virtualenv Linux %}
  • {% active_link /getting-started/updating/ Updating %}
  • @@ -44,6 +45,14 @@
  • {% active_link /getting-started/scripts-conditions/ Conditions %}
  • +
  • + {% active_link /getting-started/z-wave/ Z-Wave %} +
      +
    • {% active_link /getting-started/z-wave-controllers/ USB Controllers %}
    • +
    • {% active_link /getting-started/z-wave-settings/ Modifying Settings %}
    • +
    • {% active_link /getting-started/z-wave-device-specific/ Device Specific %}
    • +
    +
  • {% active_link /getting-started/autostart/ Autostart %}
      diff --git a/source/_posts/2016-06-08-super-fast-web-enocean-lirc.markdown b/source/_posts/2016-06-08-super-fast-web-enocean-lirc.markdown new file mode 100644 index 00000000000..110d6f789b2 --- /dev/null +++ b/source/_posts/2016-06-08-super-fast-web-enocean-lirc.markdown @@ -0,0 +1,74 @@ +--- +layout: post +title: "0.21: Improved Web and support for EnOcean, LIRC and Osram Lightify" +description: "This new release of Home Assistant is lightning fast with the new web stack and progressive web application. On top of that a handful of new components and platforms for EnOcean, LIRC and Osram Lightify support." +date: 2016-06-08 01:06:00 +0000 +date_formatted: "June 8, 2016" +author: Paulus Schoutsen +author_twitter: balloob +comments: true +categories: Release-Notes +--- + +It's time for release 0.21 and it contains massive core improvements: replacement of our home grown HTTP stack with a standardized WSGI stack. This will improve performance, speed, security and make future development of advanced HTTP features a breeze. + +This work was driven by the amazing Josh Wright. His knowledge, high standards and drive for security has helped improve Home Assistant a lot ever since he started helping out. Hip hip hurray for Josh! + +Alright, time for the changes: + + + + - New HTTP stack based on WSGI ([@JshWright], [@balloob]) + - Frontend: lots of performance improvements ([@balloob]) + - Initial support for EnOcean [lights][en-lights], [sensors][en-sensors] and [switches][en-switches] added ([@rubund]) + - Light: [Osram Lightify] is now supported ([@olimpiurob]) + - Light: [Insteon Hub] now supports brightness ([@wkonkel]) + - Add support for adding HA as Windows 10 tile ([@fabaff]) + - Condition: [time condition] can now cross midnight ([@jaharkes]) + - Template based sensors should now throw less warnings ([@Bart274]) + - New [LIRC component] allows receiving IR commands ([@partofthething]) + - The [Feedreader] component will now persist data to disk to prevent duplicate events ([@shaftoe]) + - Sun: azimuth attribute added ([@fabaff]) + - New [Flux like switch platform] to change light intensity in the evening ([@nkgilley]) + - We no longer crash if you live in a part of the world where the sun never sets ([@balloob]) + - Rollershutter: [RFXTRX] now supported ([@jacobtomlinson]) + - Switch: [Template switches] can now execute scripts ([@kellerza]) + - Z-Wave: automatically heal the network at midnight ([@infamy]) + - Sensor: [DTE Energy Bridge] now supported ([@kylehendricks]) + - Media Player: [Kodi] now supports different turn off commands ([@armills]) + +### Breaking Changes + + - Our work in the WSGI stack is not fully done yet. We still have a minor issues where retrieving the error log in the about screen can raise an encoding error + - The API used to incorrectly accept a JSON body with form-url-encoded headers. Our cURL examples on the website used to be wrong and have [been updated]. + +[@armills]: https://github.com/armills +[@balloob]: https://github.com/balloob +[@Bart274]: https://github.com/Bart274 +[@fabaff]: https://github.com/fabaff +[@infamy]: https://github.com/infamy +[@jacobtomlinson]: https://github.com/jacobtomlinson +[@jaharkes]: https://github.com/jaharkes +[@JshWright]: https://github.com/JshWright +[@kellerza]: https://github.com/kellerza +[@kylehendricks]: https://github.com/kylehendricks +[@nkgilley]: https://github.com/nkgilley +[@olimpiurob]: https://github.com/olimpiurob +[@partofthething]: https://github.com/partofthething +[@rubund]: https://github.com/rubund +[@shaftoe]: https://github.com/shaftoe +[@wkonkel]: https://github.com/wkonkel +[DTE Energy Bridge]: /components/sensor.dte_energy_bridge/ +[en-lights]: /components/light.enocean/ +[en-sensors]: /components/sensor.enocean/ +[en-switches]: /components/switch.enocean/ +[Feedreader]: /components/feedreader/ +[Flux like switch platform]: /components/switch.flux/ +[Insteon Hub]: /components/insteon_hub/ +[Kodi]: /components/media_player.kodi/ +[LIRC component]: /components/lirc/ +[Osram Lightify]: /components/light.osramlightify/ +[RFXTRX]: /components/rfxtrx/ +[Template switches]: /components/switch.template/ +[time condition]: /getting-started/scripts-conditions/#time-condition +[been updated]: /developers/rest_api/ diff --git a/source/_topics/z-wave.markdown b/source/_topics/z-wave.markdown deleted file mode 100644 index b341cb66f39..00000000000 --- a/source/_topics/z-wave.markdown +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: page -title: "Z-Wave" -description: "Extended instructions how to setup Z-Wave." -date: 2016-03-24 08:49 -0700 -sidebar: false -comments: false -sharing: true -footer: true ---- - -Z-Wave is a popular home automation protocol that is not always straightforward to setup. This page will try to help you make sense of it all. - -

      -Upon first run, the z-wave component will take time to initialize entities and entities may appear with incomplete names. Running a network heal may expidite this proccess. -

      - -## {% linkable_title Supported Z-Wave Sticks %} - -| Device | Works on Linux | Works on Windows | Works on OSX | Comments | -|-------------------------|----------------|------------------|--------------|-----------| -| Aeotec Z-Stick Series 2 | X | | | | -| Aeotec Z-Stick Series 5 | X | | | | -| Razberry GPIO Module | X | | | | - - -## {% linkable_title Stick Alternatives %} - -The alternative to a stick is a hub that supports Z-Wave. Home Assistant supports the following hubs with Z-Wave support: - - - [Vera](/components/vera/) - - -## {% linkable_title Modifying Zwave Device Settings %} -You may wish to modify the zwave settings ozw*.xml file in your .homeassistant root folder, or certain situations/devices may require it (i.e. Aeon Multisensor 6). To do this, utilize [Open-Zwave Control Panel](https://github.com/OpenZWave/open-zwave-control-panel). Alternatively, use [Domoticz](https://www.domoticz.com/), which incorporates the Open-Zwave Control Panel project into an easy to use Raspberry Pi image. - -The reasoning for using these tools is that your Zwave controller stores the values and data that are used to control the network. The XML file in the .homeassistant folder acts as a settings/values cache for the zwave network, so modifying it directly won't change the network values. The Open-Zwave Control Panel writes values directly to the network, and will provide you with an updated .xml file to overwrite in your .homeassistant folder. This is the most foolproof way to make modifications to your zwave devices. diff --git a/source/demo/core.js b/source/demo/core.js index b6d311a74a7..d3b32bf1226 100644 --- a/source/demo/core.js +++ b/source/demo/core.js @@ -1,5 +1,5 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=137)}([,function(t,e,n){!function(e,n){t.exports=n()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),n(1);var i=n(2),o=r(i),u=n(6),a=r(u),s=n(3),c=r(s),f=n(5),l=n(11),h=n(10),d=n(7),p=r(d);e["default"]={Reactor:a["default"],Store:o["default"],Immutable:c["default"],isKeyPath:l.isKeyPath,isGetter:h.isGetter,toJS:f.toJS,toImmutable:f.toImmutable,isImmutable:f.isImmutable,createReactMixin:p["default"]},t.exports=e["default"]},function(t,e){"use strict";try{window.console&&console.log||(console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){}})}catch(n){}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return t instanceof c}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;ni;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){if("number"!=typeof e){var n=+e;if(""+n!==e)return NaN;e=n}return 0>e?o(t)+e:e}function a(){return!0}function s(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return l(t,e,0)}function f(t,e){return l(t,e,e)}function l(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function h(t){return v(t)?t:P(t)}function d(t){return y(t)?t:D(t)}function p(t){return g(t)?t:C(t)}function _(t){return v(t)&&!m(t)?t:M(t)}function v(t){return!(!t||!t[_n])}function y(t){return!(!t||!t[vn])}function g(t){return!(!t||!t[yn])}function m(t){return y(t)||g(t)}function b(t){return!(!t||!t[gn])}function S(t){this.next=t}function O(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function w(){return{value:void 0,done:!0}}function E(t){return!!A(t)}function I(t){return t&&"function"==typeof t.next}function T(t){var e=A(t);return e&&e.call(t)}function A(t){var e=t&&(On&&t[On]||t[wn]);return"function"==typeof e?e:void 0}function j(t){return t&&"number"==typeof t.length}function P(t){return null===t||void 0===t?H():v(t)?t.toSeq():V(t)}function D(t){return null===t||void 0===t?H().toKeyedSeq():v(t)?y(t)?t.toSeq():t.fromEntrySeq():U(t)}function C(t){return null===t||void 0===t?H():v(t)?y(t)?t.entrySeq():t.toIndexedSeq():x(t)}function M(t){return(null===t||void 0===t?H():v(t)?y(t)?t.entrySeq():t:x(t)).toSetSeq()}function k(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function z(t){this._iterable=t,this.size=t.length||t.size}function L(t){this._iterator=t,this._iteratorCache=[]}function N(t){return!(!t||!t[In])}function H(){return Tn||(Tn=new k([]))}function U(t){var e=Array.isArray(t)?new k(t).fromEntrySeq():I(t)?new L(t).fromEntrySeq():E(t)?new z(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function x(t){var e=q(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function V(t){var e=q(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function q(t){return j(t)?new k(t):I(t)?new L(t):E(t)?new z(t):void 0}function G(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(e(a[1],r?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,n)}function F(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new S(function(){var t=i[n?o-u:u];return u++>o?w():O(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function K(){throw TypeError("Abstract")}function Y(){}function B(){}function J(){}function W(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function Z(t,e){return e?X(e,t,"",{"":t}):Q(t)}function X(t,e,n,r){return Array.isArray(e)?t.call(r,n,C(e).map(function(n,r){return X(t,n,r,e)})):$(e)?t.call(r,n,D(e).map(function(n,r){return X(t,n,r,e)})):e}function Q(t){return Array.isArray(t)?C(t).map(Q).toList():$(t)?D(t).map(Q).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Rn?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Nn[t];return void 0===e&&(e=rt(t),Ln===zn&&(Ln=0,Nn={}),Ln++,Nn[t]=e),e}function rt(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function lt(t){this._iter=t,this.size=t.size}function ht(t){var e=kt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Rt,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===Sn){var r=t.__iterator(e,n);return new S(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===bn?mn:bn,n)},e}function dt(t,e,n){var r=kt(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,hn);return o===hn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,u){return r(e.call(n,t,i,u),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(Sn,i);return new S(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return O(r,a,e.call(n,u[1],a,t),i)})},r}function pt(t,e){var n=kt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ht(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Rt,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function _t(t,e,n,r){var i=kt(t);return r&&(i.has=function(r){var i=t.get(r,hn);return i!==hn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,hn);return o!==hn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(n,t,o,s)?(a++,i(t,r?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(Sn,o),a=0;return new S(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return O(i,r?c:a++,f,o)}})},i}function vt(t,e,n){var r=Nt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function yt(t,e,n){var r=y(t),i=(b(t)?we():Nt()).asMutable();t.__iterate(function(o,u){i.update(e.call(n,o,u,t),function(t){return t=t||[],t.push(r?[u,o]:o),t})});var o=Mt(t);return i.map(function(e){return Pt(t,o(e))})}function gt(t,e,n,r){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==n&&(n=0|n),s(e,n,i))return t;var o=c(e,i),a=f(n,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),e,n,r);var l,h=a-o;h===h&&(l=0>h?0:h);var d=kt(t);return d.size=0===l?l:t.size&&l||void 0,!r&&N(t)&&l>=0&&(d.get=function(e,n){return e=u(this,e),e>=0&&l>e?t.get(e+o,n):n}),d.__iterateUncached=function(e,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(e,n);var u=0,a=!0,s=0;return t.__iterate(function(t,n){return a&&(a=u++l)return w();var t=i.next();return r||e===bn?t:e===mn?O(e,a-1,void 0,t):O(e,a-1,t.value[1],t)})},d}function mt(t,e,n){var r=kt(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var u=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++u&&r(t,i,o)}),u},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var u=t.__iterator(Sn,i),a=!0;return new S(function(){if(!a)return w();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===Sn?t:O(r,s,c,t):(a=!1,w())})},r}function bt(t,e,n,r){var i=kt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(n,t,o,c))?void 0:(s++,i(t,r?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(Sn,o),s=!0,c=0;return new S(function(){var t,o,f;do{if(t=a.next(),t.done)return r||i===bn?t:i===mn?O(i,c++,void 0,t):O(i,c++,t.value[1],t);var l=t.value;o=l[0],f=l[1],s&&(s=e.call(n,f,o,u))}while(s);return i===Sn?t:O(i,o,f,t)})},i}function St(t,e){var n=y(t),r=[t].concat(e).map(function(t){return v(t)?n&&(t=d(t)):t=n?U(t):x(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&y(i)||g(t)&&g(i))return i}var o=new k(r);return n?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),o}function Ot(t,e,n){var r=kt(t);return r.__iterateUncached=function(r,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&v(t)?o(t,s+1):r(t,n?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),u=[],a=0;return new S(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(r===Sn&&(s=s[1]),e&&!(u.length0}function jt(t,e,n){var r=kt(t);return r.size=new k(n).map(function(t){return t.size}).min(),r.__iterate=function(t,e){for(var n,r=this.__iterator(bn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},r.__iteratorUncached=function(t,r){var i=n.map(function(t){return t=h(t),T(r?t.reverse():t)}),o=0,u=!1;return new S(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?w():O(t,o++,e.apply(null,n.map(function(t){return t.value})))})},r}function Pt(t,e){return N(t)?e:t.constructor(e)}function Dt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ct(t){return at(t.size),o(t)}function Mt(t){return y(t)?d:g(t)?p:_}function kt(t){return Object.create((y(t)?D:g(t)?C:M).prototype)}function Rt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):P.prototype.cacheResult.call(this)}function zt(t,e){return t>e?1:e>t?-1:0}function Lt(t){var e=T(t);if(!e){if(!j(t))throw new TypeError("Expected iterable or array-like: "+t);e=T(h(t))}return e}function Nt(t){return null===t||void 0===t?Jt():Ht(t)&&!b(t)?t:Jt().withMutations(function(e){var n=d(t);at(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Ht(t){return!(!t||!t[Hn])}function Ut(t,e){this.ownerID=t,this.entries=e}function xt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function qt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Gt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Ft(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Yt(t._root)}function Kt(t,e){return O(t,e[0],e[1])}function Yt(t,e){return{node:t,index:0,__prev:e}}function Bt(t,e,n,r){var i=Object.create(Un);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Jt(){return xn||(xn=Bt(0))}function Wt(t,n,r){var i,o;if(t._root){var u=e(dn),a=e(pn);if(i=Zt(t._root,t.__ownerID,0,void 0,n,r,u,a),!a.value)return t;o=t.size+(u.value?r===hn?-1:1:0)}else{if(r===hn)return t;o=1,i=new Ut(t.__ownerID,[[n,r]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Bt(o,i):Jt()}function Zt(t,e,r,i,o,u,a,s){return t?t.update(e,r,i,o,u,a,s):u===hn?t:(n(s),n(a),new Gt(e,i,[o,u]))}function Xt(t){return t.constructor===Gt||t.constructor===qt}function Qt(t,e,n,r,i){if(t.keyHash===r)return new qt(e,r,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&ln,a=(0===n?r:r>>>n)&ln,s=u===a?[Qt(t,e,n+cn,r,i)]:(o=new Gt(e,r,i),a>u?[t,o]:[o,t]);return new xt(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==r&&(i|=s,u[o++]=f)}return new xt(t,i,u)}function ee(t,e,n,r,i){for(var o=0,u=new Array(fn),a=0;0!==n;a++,n>>>=1)u[a]=1&n?e[o++]:void 0;return u[r]=i,new Vt(t,o+1,u)}function ne(t,e,n){for(var r=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,n,r){var o=r?t:i(t);return o[e]=n,o}function se(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=n,u=-1):o[a]=t[a+u];return o}function ce(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,u=0;r>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=_e();if(null===t||void 0===t)return e;if(le(t))return t;var n=p(t),r=n.size;return 0===r?e:(at(r),r>0&&fn>r?pe(0,r,cn,null,new he(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function le(t){return!(!t||!t[Fn])}function he(t,e){this.array=t,this.ownerID=e}function de(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===a?s&&s.array:t&&t.array,i=n>o?0:o-n,c=u-n;return c>fn&&(c=fn),function(){if(i===c)return Bn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var a,s=t&&t.array,c=i>o?0:o-i>>r,f=(u-i>>r)+1;return f>fn&&(f=fn),function(){for(;;){if(a){var t=a();if(t!==Bn)return t;a=null}if(c===f)return Bn;var o=e?--f:c++;a=n(s&&s[o],r-cn,i+(o<=t.size||0>n)return t.withMutations(function(t){0>n?be(t,n).set(0,r):be(t,0,n+1).set(n,r)});n+=t._origin;var i=t._tail,o=t._root,a=e(pn);return n>=Oe(t._capacity)?i=ye(i,t.__ownerID,0,n,r,a):o=ye(o,t.__ownerID,t._level,n,r,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):pe(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,r,i,o,u){var a=i>>>r&ln,s=t&&a0){var f=t&&t.array[a],l=ye(f,e,r-cn,i,o,u);return l===f?t:(c=ge(t,e),c.array[a]=l,c)}return s&&t.array[a]===o?t:(n(u),c=ge(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new he(t?t.array.slice():[],e)}function me(t,e){if(e>=Oe(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&ln],r-=cn;return n}}function be(t,e,n){void 0!==e&&(e=0|e),void 0!==n&&(n=0|n);var i=t.__ownerID||new r,o=t._origin,u=t._capacity,a=o+e,s=void 0===n?u:0>n?u+n:o+n;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,l=0;0>a+l;)f=new he(f&&f.array.length?[void 0,f]:[],i),c+=cn,l+=1<=1<d?me(t,s-1):d>h?new he([],i):p;if(p&&d>h&&u>a&&p.array.length){f=ge(f,i);for(var v=f,y=c;y>cn;y-=cn){var g=h>>>y&ln;v=v.array[g]=ge(v.array[g],i)}v.array[h>>>cn&ln]=p}if(u>s&&(_=_&&_.removeAfter(i,0,s)),a>=d)a-=d,s-=d,c=cn,f=null,_=_&&_.removeBefore(i,0,a);else if(a>o||h>d){for(l=0;f;){var m=a>>>c&ln;if(m!==d>>>c&ln)break;m&&(l+=(1<o&&(f=f.removeBefore(i,c,a-l)),f&&h>d&&(f=f.removeAfter(i,c,d-l)),l&&(a-=l,s-=l)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=_,t.__hash=void 0,t.__altered=!0,t):pe(a,s,c,f,_)}function Se(t,e,n){for(var r=[],i=0,o=0;oi&&(i=a.size),v(u)||(a=a.map(function(t){return Z(t)})),r.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,r)}function Oe(t){return fn>t?0:t-1>>>cn<=fn&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(n===u.get(a)[1])return t;r=o,i=u.set(a,[e,n])}else r=o.set(e,u.size),i=u.set(u.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Ie(r,i)}function je(t){return null===t||void 0===t?Ce():Pe(t)?t:Ce().unshiftAll(t)}function Pe(t){return!(!t||!t[Wn])}function De(t,e,n,r){var i=Object.create(Zn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ce(){return Xn||(Xn=De(0))}function Me(t){return null===t||void 0===t?Le():ke(t)&&!b(t)?t:Le().withMutations(function(e){var n=_(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function ke(t){return!(!t||!t[Qn])}function Re(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function ze(t,e){var n=Object.create($n);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Le(){return tr||(tr=ze(Jt()))}function Ne(t){return null===t||void 0===t?xe():He(t)?t:xe().withMutations(function(e){var n=_(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function He(t){return ke(t)&&b(t)}function Ue(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function xe(){return nr||(nr=Ue(Te()))}function Ve(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var u=Object.keys(t);Fe(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Nt(o)},i=r.prototype=Object.create(rr);return i.constructor=r,r}function qe(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Ge(t){return t._name||t.constructor.name||"Record"}function Fe(t,e){try{e.forEach(Ke.bind(void 0,t))}catch(n){}}function Ke(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ye(t,e){if(t===e)return!0;if(!v(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||g(t)!==g(e)||b(t)!==b(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!m(t);if(b(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&W(i[1],t)&&(n||W(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,r){return(n?t.has(e):i?W(e,t.get(r,hn)):W(t.get(r,hn),e))?void 0:(u=!1,!1)});return u&&t.size===a}function Be(t,e,n){if(!(this instanceof Be))return new Be(t,e,n);if(ut(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(ir)return ir;ir=this}}function Je(t,e){if(!(this instanceof Je))return new Je(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(or)return or;or=this}}function We(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Ze(t,e){return e}function Xe(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function $e(t){return function(){return-t.apply(this,arguments)}}function tn(t){return"string"==typeof t?JSON.stringify(t):t}function en(){return i(arguments)}function nn(t,e){return e>t?1:t>e?-1:0}function rn(t){if(t.size===1/0)return 0;var e=b(t),n=y(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+un(et(t),et(e))|0}:function(t,e){r=r+un(et(t),et(e))|0}:e?function(t){r=31*r+et(t)|0}:function(t){r=r+et(t)|0});return on(i,r)}function on(t,e){return e=jn(e,3432918353),e=jn(e<<15|e>>>-15,461845907),e=jn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=jn(e^e>>>16,2246822507),e=jn(e^e>>>13,3266489909),e=tt(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var an=Array.prototype.slice,sn="delete",cn=5,fn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},k.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new S(function(){return i>r?w():O(t,i,n[e?r-i++:i++])})},t(R,D),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var u=r[e?i-o:o];if(t(n[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new S(function(){var u=r[e?i-o:o];return o++>i?w():O(t,u,n[u])})},R.prototype[gn]=!0,t(z,C),z.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=T(n),i=0;if(I(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},z.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=T(n);if(!I(r))return new S(w);var i=0;return new S(function(){var e=r.next();return e.done?e:O(t,i++,e.value)})},t(L,C),L.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return O(t,i,r[i++])})};var Tn;t(K,h),t(Y,K),t(B,K),t(J,K),K.Keyed=Y,K.Indexed=B,K.Set=J;var An,jn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Pn=Object.isExtensible,Dn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Cn="function"==typeof WeakMap;Cn&&(An=new WeakMap);var Mn=0,kn="__immutablehash__";"function"==typeof Symbol&&(kn=Symbol(kn));var Rn=16,zn=255,Ln=0,Nn={};t(st,D),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=pt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var n=this,r=dt(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},st.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?Ct(this):0,function(i){return t(i,e?--n:n++,r)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(bn,e),r=e?Ct(this):0;return new S(function(){var i=n.next();return i.done?i:O(t,e?--r:r++,i.value,i)})},st.prototype[gn]=!0,t(ct,C),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ct.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e),r=0;return new S(function(){var e=n.next();return e.done?e:O(t,r++,e.value,e)})},t(ft,M),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},ft.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new S(function(){var e=n.next();return e.done?e:O(t,e.value,e.value,e)})},t(lt,D),lt.prototype.entrySeq=function(){return this._iter.toSeq()},lt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Dt(e);var r=v(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},lt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new S(function(){ -for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Dt(r);var i=v(r);return O(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=lt.prototype.cacheResult=Rt,t(Nt,Y),Nt.prototype.toString=function(){return this.__toString("Map {","}")},Nt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Nt.prototype.set=function(t,e){return Wt(this,t,e)},Nt.prototype.setIn=function(t,e){return this.updateIn(t,hn,function(){return e})},Nt.prototype.remove=function(t){return Wt(this,t,hn)},Nt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hn})},Nt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Nt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,Lt(t),e,n);return r===hn?void 0:r},Nt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Jt()},Nt.prototype.merge=function(){return ne(this,void 0,arguments)},Nt.prototype.mergeWith=function(t){var e=an.call(arguments,1);return ne(this,t,e)},Nt.prototype.mergeIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Jt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Nt.prototype.mergeDeep=function(){return ne(this,re(void 0),arguments)},Nt.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return ne(this,re(t),e)},Nt.prototype.mergeDeepIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Jt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Nt.prototype.sort=function(t){return we(It(this,t))},Nt.prototype.sortBy=function(t,e){return we(It(this,e,t))},Nt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Nt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},Nt.prototype.asImmutable=function(){return this.__ensureOwner()},Nt.prototype.wasAltered=function(){return this.__altered},Nt.prototype.__iterator=function(t,e){return new Ft(this,t,e)},Nt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},Nt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Bt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Nt.isMap=Ht;var Hn="@@__IMMUTABLE_MAP__@@",Un=Nt.prototype;Un[Hn]=!0,Un[sn]=Un.remove,Un.removeIn=Un.deleteIn,Ut.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(W(n,i[o][0]))return i[o][1];return r},Ut.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===hn,f=this.entries,l=0,h=f.length;h>l&&!W(o,f[l][0]);l++);var d=h>l;if(d?f[l][1]===u:c)return this;if(n(s),(c||!d)&&n(a),!c||1!==f.length){if(!d&&!c&&f.length>=Vn)return $t(t,f,o,u);var p=t&&t===this.ownerID,_=p?f:i(f);return d?c?l===h-1?_.pop():_[l]=_.pop():_[l]=[o,u]:_.push([o,u]),p?(this.entries=_,this):new Ut(t,_)}},xt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+cn,e,n,r)},xt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=1<=qn)return ee(t,h,c,a,p);if(f&&!p&&2===h.length&&Xt(h[1^l]))return h[1^l];if(f&&p&&1===h.length&&Xt(p))return p;var _=t&&t===this.ownerID,v=f?p?c:c^s:c|s,y=f?p?ae(h,l,p,_):ce(h,l,_):se(h,l,p,_);return _?(this.bitmap=v,this.nodes=y,this):new xt(t,v,y)},Vt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&ln,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Vt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=i===hn,c=this.nodes,f=c[a];if(s&&!f)return this;var l=Zt(f,t,e+cn,n,r,i,o,u);if(l===f)return this;var h=this.count;if(f){if(!l&&(h--,Gn>h))return te(t,c,h,a)}else h++;var d=t&&t===this.ownerID,p=ae(c,a,l,d);return d?(this.count=h,this.nodes=p,this):new Vt(t,h,p)},qt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(W(n,i[o][0]))return i[o][1];return r},qt.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===hn;if(r!==this.keyHash)return c?this:(n(s),n(a),Qt(this,t,e,r,[o,u]));for(var f=this.entries,l=0,h=f.length;h>l&&!W(o,f[l][0]);l++);var d=h>l;if(d?f[l][1]===u:c)return this;if(n(s),(c||!d)&&n(a),c&&2===h)return new Gt(t,this.keyHash,f[1^l]);var p=t&&t===this.ownerID,_=p?f:i(f);return d?c?l===h-1?_.pop():_[l]=_.pop():_[l]=[o,u]:_.push([o,u]),p?(this.entries=_,this):new qt(t,this.keyHash,_)},Gt.prototype.get=function(t,e,n,r){return W(n,this.entry[0])?this.entry[1]:r},Gt.prototype.update=function(t,e,r,i,o,u,a){var s=o===hn,c=W(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(n(a),s?void n(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Gt(t,this.keyHash,[i,o]):(n(u),Qt(this,t,e,et(i),[i,o])))},Ut.prototype.iterate=qt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},xt.prototype.iterate=Vt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Gt.prototype.iterate=function(t,e){return t(this.entry)},t(Ft,S),Ft.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return Kt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return Kt(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Kt(t,o.entry);e=this._stack=Yt(o,e)}continue}e=this._stack=this._stack.__prev}return w()};var xn,Vn=fn/4,qn=fn/2,Gn=fn/4;t(fe,B),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&ln;if(r>=this.array.length)return new he([],t);var i,o=0===r;if(e>0){var u=this.array[r];if(i=u&&u.removeBefore(t,e-cn,n),i===u&&o)return this}if(o&&!i)return this;var a=ge(this,t);if(!o)for(var s=0;r>s;s++)a.array[s]=void 0;return i&&(a.array[r]=i),a},he.prototype.removeAfter=function(t,e,n){if(n===(e?1<>>e&ln;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-cn,n),i===o&&r===this.array.length-1)return this}var u=ge(this,t);return u.array.splice(r+1),i&&(u.array[r]=i),u};var Yn,Bn={};t(we,Nt),we.of=function(){return this(arguments)},we.prototype.toString=function(){return this.__toString("OrderedMap {","}")},we.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},we.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Te()},we.prototype.set=function(t,e){return Ae(this,t,e)},we.prototype.remove=function(t){return Ae(this,t,hn)},we.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},we.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},we.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},we.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Ie(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},we.isOrderedMap=Ee,we.prototype[gn]=!0,we.prototype[sn]=we.prototype.remove;var Jn;t(je,B),je.of=function(){return this(arguments)},je.prototype.toString=function(){return this.__toString("Stack [","]")},je.prototype.get=function(t,e){var n=this._head;for(t=u(this,t);n&&t--;)n=n.next;return n?n.value:e},je.prototype.peek=function(){return this._head&&this._head.value},je.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):De(t,e)},je.prototype.pushAll=function(t){if(t=p(t),0===t.size)return this;at(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):De(e,n)},je.prototype.pop=function(){return this.slice(1)},je.prototype.unshift=function(){return this.push.apply(this,arguments)},je.prototype.unshiftAll=function(t){return this.pushAll(t)},je.prototype.shift=function(){return this.pop.apply(this,arguments)},je.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ce()},je.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var n=c(t,this.size),r=f(e,this.size);if(r!==this.size)return B.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):De(i,o)},je.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},je.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},je.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new S(function(){if(r){var e=r.value;return r=r.next,O(t,n++,e)}return w()})},je.isStack=Pe;var Wn="@@__IMMUTABLE_STACK__@@",Zn=je.prototype;Zn[Wn]=!0,Zn.withMutations=Un.withMutations,Zn.asMutable=Un.asMutable,Zn.asImmutable=Un.asImmutable,Zn.wasAltered=Un.wasAltered;var Xn;t(Me,J),Me.of=function(){return this(arguments)},Me.fromKeys=function(t){return this(d(t).keySeq())},Me.prototype.toString=function(){return this.__toString("Set {","}")},Me.prototype.has=function(t){return this._map.has(t)},Me.prototype.add=function(t){return Re(this,this._map.set(t,!0))},Me.prototype.remove=function(t){return Re(this,this._map.remove(t))},Me.prototype.clear=function(){return Re(this,this._map.clear())},Me.prototype.union=function(){var t=an.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n1?" by "+this._step:"")+" ]"},Be.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Be.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Be(0,0):new Be(this.get(t,this._end),this.get(e,this._end),this._step))},Be.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},Be.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new S(function(){var u=i;return i+=e?-r:r,o>n?w():O(t,o++,u)})},Be.prototype.equals=function(t){return t instanceof Be?this._start===t._start&&this._end===t._end&&this._step===t._step:Ye(this,t)};var ir;t(Je,C),Je.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Je.prototype.get=function(t,e){return this.has(t)?this._value:e},Je.prototype.includes=function(t){return W(this._value,t)},Je.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new Je(this._value,f(e,n)-c(t,n))},Je.prototype.reverse=function(){return this},Je.prototype.indexOf=function(t){return W(this._value,t)?0:-1},Je.prototype.lastIndexOf=function(t){return W(this._value,t)?this.size:-1},Je.prototype.__iterate=function(t,e){for(var n=0;nt?this.count():this.size);var r=this.slice(0,t);return Pt(this,1===n?r:r.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return Pt(this,Ot(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===n(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===n(t)},"function"!=typeof/./&&"object"!=typeof Int8Array?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var n=1;e>n;n++)for(var r=arguments[n],i=Object.keys(r),o=i.length,u=0;o>u;u++){var a=i[u];t[a]=r[a]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,n){var i,o,u=t?t.length:0,a=-1;if(n&&(o=e,e=function(t,e,r){return o.call(n,t,e,r)}),r(u))for(;++ar;r++)n[r]=arguments[r];return new(i.apply(t,[null].concat(n)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!(0,f.isObject)(t)}function u(t){return i(t)?t.toJS():t}function a(t){return i(t)?t:c["default"].fromJS(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=u,e.toImmutable=a;var s=n(3),c=r(s),f=n(4)},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var n=c["default"].Set().withMutations(function(n){n.union(t.observerState.get("any")),e.forEach(function(e){var r=t.observerState.getIn(["stores",e]);r&&n.union(r)})});n.forEach(function(e){var n=t.observerState.getIn(["observersMap",e]);if(n){var r=n.get("getter"),i=n.get("handler"),o=d.evaluate(t.prevReactorState,r),u=d.evaluate(t.reactorState,r); -t.prevReactorState=o.reactorState,t.reactorState=u.reactorState;var a=o.result,s=u.result;c["default"].is(a,s)||i.call(null,s)}});var r=d.resetDirtyStores(this.reactorState);this.prevReactorState=r,this.reactorState=r}}}},{key:"batchStart",value:function(){this.__batchDepth++}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=(0,y.toFactory)(m),t.exports=e["default"]},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n={};return(0,o.each)(e,function(e,r){n[r]=t.evaluate(e)}),n}Object.defineProperty(e,"__esModule",{value:!0});var o=n(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],(0,o.each)(this.getDataBindings(),function(n,i){var o=t.observe(n,function(t){e.setState(r({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new M({result:t,reactorState:e})}function o(t,e){return t.withMutations(function(t){(0,C.each)(e,function(e,n){t.getIn(["stores",n])&&console.warn("Store already defined for id = "+n);var r=e.getInitialState();if(void 0===r&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store getInitialState() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,j.isImmutableValue)(r))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(n,e)}).update("state",function(t){return t.set(n,r)}).update("dirtyStores",function(t){return t.add(n)}).update("storeStates",function(t){return w(t,[n])})}),O(t)})}function u(t,e){return t.withMutations(function(t){(0,C.each)(e,function(e,n){t.update("stores",function(t){return t.set(n,e)})})})}function a(t,e,n){if(void 0===e&&f(t,"throwOnUndefinedActionType"))throw new Error("`dispatch` cannot be called with an `undefined` action type.");var r=t.get("state"),i=t.get("dirtyStores"),o=r.withMutations(function(r){A["default"].dispatchStart(t,e,n),t.get("stores").forEach(function(o,u){var a=r.get(u),s=void 0;try{s=o.handle(a,e,n)}catch(c){throw A["default"].dispatchError(t,c.message),c}if(void 0===s&&f(t,"throwOnUndefinedStoreReturnValue")){var l="Store handler must return a value, did you forget a return statement";throw A["default"].dispatchError(t,l),new Error(l)}r.set(u,s),a!==s&&(i=i.add(u))}),A["default"].dispatchEnd(t,r,i)}),u=t.set("state",o).set("dirtyStores",i).update("storeStates",function(t){return w(t,i)});return O(u)}function s(t,e){var n=[],r=(0,j.toImmutable)({}).withMutations(function(r){(0,C.each)(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var u=o.deserialize(e);void 0!==u&&(r.set(i,u),n.push(i))}})}),i=I["default"].Set(n);return t.update("state",function(t){return t.merge(r)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return w(t,n)})}function c(t,e,n){var r=e;(0,D.isKeyPath)(e)&&(e=(0,P.fromKeyPath)(e));var i=t.get("nextId"),o=(0,P.getStoreDeps)(e),u=I["default"].Map({id:i,storeDeps:o,getterKey:r,getter:e,handler:n}),a=void 0;return a=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var n=["stores",e];t.hasIn(n)||t.setIn(n,I["default"].Set()),t.updateIn(["stores",e],function(t){return t.add(i)})})}),a=a.set("nextId",i+1).setIn(["observersMap",i],u),{observerState:a,entry:u}}function f(t,e){var n=t.getIn(["options",e]);if(void 0===n)throw new Error("Invalid option: "+e);return n}function l(t,e,n){var r=t.get("observersMap").filter(function(t){var r=t.get("getterKey"),i=!n||t.get("handler")===n;return i?(0,D.isKeyPath)(e)&&(0,D.isKeyPath)(r)?(0,D.isEqual)(e,r):e===r:!1});return t.withMutations(function(t){r.forEach(function(e){return h(t,e)})})}function h(t,e){return t.withMutations(function(t){var n=e.get("id"),r=e.get("storeDeps");0===r.size?t.update("any",function(t){return t.remove(n)}):r.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(n):t})}),t.removeIn(["observersMap",n])})}function d(t){var e=t.get("state");return t.withMutations(function(t){var n=t.get("stores"),r=n.keySeq().toJS();n.forEach(function(n,r){var i=e.get(r),o=n.handleReset(i);if(void 0===o&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store handleReset() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,j.isImmutableValue)(o))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",r],o)}),t.update("storeStates",function(t){return w(t,r)}),v(t)})}function p(t,e){var n=t.get("state");if((0,D.isKeyPath)(e))return i(n.getIn(e),t);if(!(0,P.isGetter)(e))throw new Error("evaluate must be passed a keyPath or Getter");if(m(t,e))return i(S(t,e),t);var r=(0,P.getDeps)(e).map(function(e){return p(t,e).result}),o=(0,P.getComputeFn)(e).apply(null,r);return i(o,b(t,e,o))}function _(t){var e={};return t.get("stores").forEach(function(n,r){var i=t.getIn(["state",r]),o=n.serialize(i);void 0!==o&&(e[r]=o)}),e}function v(t){return t.set("dirtyStores",I["default"].Set())}function y(t){return t}function g(t,e){var n=y(e);return t.getIn(["cache",n])}function m(t,e){var n=g(t,e);if(!n)return!1;var r=n.get("storeStates");return 0===r.size?!1:r.every(function(e,n){return t.getIn(["storeStates",n])===e})}function b(t,e,n){var r=y(e),i=t.get("dispatchId"),o=(0,P.getStoreDeps)(e),u=(0,j.toImmutable)({}).withMutations(function(e){o.forEach(function(n){var r=t.getIn(["storeStates",n]);e.set(n,r)})});return t.setIn(["cache",r],I["default"].Map({value:n,storeStates:u,dispatchId:i}))}function S(t,e){var n=y(e);return t.getIn(["cache",n,"value"])}function O(t){return t.update("dispatchId",function(t){return t+1})}function w(t,e){return t.withMutations(function(t){e.forEach(function(e){var n=t.has(e)?t.get(e)+1:1;t.set(e,n)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.registerStores=o,e.replaceStores=u,e.dispatch=a,e.loadState=s,e.addObserver=c,e.getOption=f,e.removeObserver=l,e.removeObserverByEntry=h,e.reset=d,e.evaluate=p,e.serialize=_,e.resetDirtyStores=v;var E=n(3),I=r(E),T=n(9),A=r(T),j=n(5),P=n(10),D=n(11),C=n(4),M=I["default"].Record({result:null,reactorState:null})},function(t,e,n){"use strict";var r=n(8);e.dispatchStart=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.groupCollapsed("Dispatch: %s",e),console.group("payload"),console.debug(n),console.groupEnd())},e.dispatchError=function(t,e){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.debug("Dispatch error: "+e),console.groupEnd())},e.dispatchEnd=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&((0,r.getOption)(t,"logDirtyStores")&&console.log("Stores updated:",n.toList().toJS()),(0,r.getOption)(t,"logAppState")&&console.debug("Dispatch done, new state: ",e.toJS()),console.groupEnd())}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,h.isArray)(t)&&(0,h.isFunction)(t[t.length-1])}function o(t){return t[t.length-1]}function u(t){return t.slice(0,t.length-1)}function a(t,e){e||(e=l["default"].Set());var n=l["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");u(t).forEach(function(t){if((0,d.isKeyPath)(t))e.add((0,f.List)(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(a(t))}})});return e.union(n)}function s(t){if(!(0,d.isKeyPath)(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,p]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=a(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var f=n(3),l=r(f),h=n(4),d=n(11),p=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:a,getStoreDeps:c,getDeps:u,fromKeyPath:s},t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,s.isArray)(t)&&!(0,s.isFunction)(t[t.length-1])}function o(t,e){var n=a["default"].List(t),r=a["default"].List(e);return a["default"].is(n,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var u=n(3),a=r(u),s=n(4)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=(0,r.Map)({logDispatches:!1,logAppState:!1,logDirtyStores:!1,throwOnUndefinedActionType:!1,throwOnUndefinedStoreReturnValue:!1,throwOnNonImmutableStore:!1,throwOnDispatchInDispatch:!1});e.PROD_OPTIONS=i;var o=(0,r.Map)({logDispatches:!0,logAppState:!0,logDirtyStores:!0,throwOnUndefinedActionType:!0,throwOnUndefinedStoreReturnValue:!0,throwOnNonImmutableStore:!0,throwOnDispatchInDispatch:!0});e.DEBUG_OPTIONS=o;var u=(0,r.Record)({dispatchId:0,state:(0,r.Map)(),stores:(0,r.Map)(),cache:(0,r.Map)(),storeStates:(0,r.Map)(),dirtyStores:(0,r.Set)(),debug:!1,options:i});e.ReactorState=u;var a=(0,r.Record)({any:(0,r.Set)(),stores:(0,r.Map)({}),observersMap:(0,r.Map)({}),nextId:1});e.ObserverState=a}])})},,function(t,e){"use strict";var n=function(t){var e,n={};if(!(t instanceof Object)||Array.isArray(t))throw new Error("keyMirror(...): Argument must be an object.");for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=n},function(t,e,n){"use strict";var r=n(61),i=r.a;Object.defineProperty(e,"a",{configurable:!1,enumerable:!0,get:function(){return i}})},function(t,e,n){"use strict";var r=n(83),i=n(85),o=r.a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return o}});var u=i;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return u}})},,function(t,e,n){"use strict";function r(t){t.registerStores({restApiCache:c.a})}function i(t){return[["restApiCache",t.entity],function(t){return!!t}]}function o(t){return[["restApiCache",t.entity],function(t){return t||a.toImmutable.bind()({})}]}function u(t){return function(e){return["restApiCache",t.entity,e]}}var a=n(1),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var c=n(110),f=n(109);e.register=r,e.createHasDataGetter=i,e.createEntityMapGetter=o,e.createByIdGetter=u;var l=f.a;Object.defineProperty(e,"createApiActions",{configurable:!1,enumerable:!0,get:function(){return l}})},function(t,e,n){"use strict";var r=n(3),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({ENTITY_HISTORY_DATE_SELECTED:null,ENTITY_HISTORY_FETCH_START:null,ENTITY_HISTORY_FETCH_ERROR:null,ENTITY_HISTORY_FETCH_SUCCESS:null,RECENT_ENTITY_HISTORY_FETCH_START:null,RECENT_ENTITY_HISTORY_FETCH_ERROR:null,RECENT_ENTITY_HISTORY_FETCH_SUCCESS:null,LOG_OUT:null})},function(t,e,n){"use strict";var r=n(3),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({LOGBOOK_DATE_SELECTED:null,LOGBOOK_ENTRIES_FETCH_START:null,LOGBOOK_ENTRIES_FETCH_ERROR:null,LOGBOOK_ENTRIES_FETCH_SUCCESS:null})},function(t,e,n){"use strict";var r=n(111),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(41),u=i.a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return u}});var a=o;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return a}})},function(t,e,n){"use strict";var r=n(3),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({VALIDATING_AUTH_TOKEN:null,VALID_AUTH_TOKEN:null,INVALID_AUTH_TOKEN:null,LOG_OUT:null})},function(t,e,n){"use strict";function r(t){t.registerStores({authAttempt:i.a,authCurrent:o.a,rememberAuth:u.a})}var i=n(64),o=n(65),u=n(66),a=n(62),s=n(63);e.register=r;var c=a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return c}});var f=s;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};Object.defineProperty(a,"a",{get:a});var s=n(84),c=n(26),f=n(4),l=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var n=0;nn;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(o){return!1}}var i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,u,a=n(t),s=1;s6e4}e.a=r},,,,,,,,,function(t,e,n){var r=n(193);t.exports=function(t,e,n){function i(){var f=r()-s;e>f&&f>0?o=setTimeout(i,e-f):(o=null,n||(c=t.apply(a,u),o||(a=u=null)))}var o,u,a,s,c;return null==e&&(e=100),function(){a=this,u=arguments,s=r();var f=n&&!o;return o||(o=setTimeout(i,e)),f&&(c=t.apply(a,u),a=u=null),c}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function"); -}var i=n(107),o=n(132),u=n(134),a=n(136),s=n(12),c=n(17),f=n(5),l=n(33),h=n(87),d=n(18),p=n(92),_=n(36),v=n(39),y=n(20),g=n(46),m=n(10),b=n(22),S=n(24),O=n(123),w=n(129),E=n(7),I=function T(){r(this,T);var t=o.a.bind()();Object.defineProperties(this,{demo:{value:1,enumerable:!0},localStoragePreferences:{value:i.a,enumerable:!0},reactor:{value:t,enumerable:!0},util:{value:a.a,enumerable:!0},startLocalStoragePreferencesSync:{value:i.a.startSync.bind(i.a,t)},startUrlSync:{value:v.urlSync.startSync.bind(null,t)},stopUrlSync:{value:v.urlSync.stopSync.bind(null,t)}}),u.a.bind()(this,t,{auth:s,config:c,entity:f,entityHistory:l,errorLog:h,event:d,logbook:p,moreInfo:_,navigation:v,notification:y,view:g,service:m,stream:b,sync:S,template:O,voice:w,restApi:E})};e.a=I},,,function(t,e,n){"use strict";var r=n(12),i=function(t,e,n){var i=arguments.length<=3||void 0===arguments[3]?null:arguments[3],o=t.evaluate(r.getters.authInfo),u=o.host+"/api/"+n;return new Promise(function(t,n){var r=new XMLHttpRequest;r.open(e,u,!0),r.setRequestHeader("X-HA-access",o.authToken),r.onload=function(){var e=void 0;try{e="application/json"===r.getResponseHeader("content-type")?JSON.parse(r.responseText):r.responseText}catch(i){e=r.responseText}r.status>199&&r.status<300?t(e):n(e)},r.onerror=function(){return n({})},i?r.send(JSON.stringify(i)):r.send()})};i=function(t,e,r){return new Promise(function(t){if("GET"!==e)throw new Error("Method "+e+" not allowed in demo mode.");var i=r.split("/",1)[0];switch(i){case"bootstrap":t(n(71)["default"]);break;case"logbook":t(n(74)["default"]);break;case"history":t(n(76)["default"]);break;default:throw new Error("URL not implemented in demo mode /api/"+r)}})},e.a=i},function(t,e,n){"use strict";function r(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n.useStreaming,i=(void 0===r?t.evaluate(u.getters.isSupported):r,n.rememberAuth),c=void 0===i?!1:i,f=n.host,l=void 0===f?"":f;t.dispatch(o.a.VALIDATING_AUTH_TOKEN,{authToken:e,host:l}),a.actions.fetchAll(t).then(function(){return t.dispatch(o.a.VALID_AUTH_TOKEN,{authToken:e,host:l,rememberAuth:c}),void t.dispatch("STREAM_START")},function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.message,r=void 0===n?s:n;t.dispatch(o.a.INVALID_AUTH_TOKEN,{errorMessage:r})})}function i(t){t.dispatch(o.a.LOG_OUT,{})}var o=n(11),u=n(22),a=n(24);e.validate=r,e.logOut=i;var s="Unexpected result from API"},function(t,e,n){"use strict";var r=["authAttempt","isValidating"];Object.defineProperty(e,"isValidating",{configurable:!1,enumerable:!0,get:function(){return r}});var i=["authAttempt","isInvalid"];Object.defineProperty(e,"isInvalidAttempt",{configurable:!1,enumerable:!0,get:function(){return i}});var o=["authAttempt","errorMessage"];Object.defineProperty(e,"attemptErrorMessage",{configurable:!1,enumerable:!0,get:function(){return o}});var u=["rememberAuth"];Object.defineProperty(e,"rememberAuth",{configurable:!1,enumerable:!0,get:function(){return u}});var a=[["authAttempt","authToken"],["authAttempt","host"],function(t,e){return{authToken:t,host:e}}];Object.defineProperty(e,"attemptAuthInfo",{configurable:!1,enumerable:!0,get:function(){return a}});var s=["authCurrent","authToken"];Object.defineProperty(e,"currentAuthToken",{configurable:!1,enumerable:!0,get:function(){return s}});var c=[s,["authCurrent","host"],function(t,e){return{authToken:t,host:e}}];Object.defineProperty(e,"currentAuthInfo",{configurable:!1,enumerable:!0,get:function(){return c}});var f=[r,["authAttempt","authToken"],["authCurrent","authToken"],function(t,e,n){return t?e:n}];Object.defineProperty(e,"authToken",{configurable:!1,enumerable:!0,get:function(){return f}});var l=[r,a,c,function(t,e,n){return t?e:n}];Object.defineProperty(e,"authInfo",{configurable:!1,enumerable:!0,get:function(){return l}})},function(t,e,n){"use strict";function r(t,e){var n=e.authToken,r=e.host;return u.toImmutable.bind()({authToken:n,host:r,isValidating:!0,isInvalid:!1,errorMessage:""})}function i(){return c.getInitialState()}function o(t,e){var n=e.errorMessage;return t.withMutations(function(t){return t.set("isValidating",!1).set("isInvalid",!0).set("errorMessage",n)})}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};Object.defineProperty(a,"a",{get:a});var s=n(11),c=new u.Store({getInitialState:function(){return u.toImmutable.bind()({isValidating:!1,authToken:!1,host:null,isInvalid:!1,errorMessage:""})},initialize:function(){this.on(s.a.VALIDATING_AUTH_TOKEN,r),this.on(s.a.VALID_AUTH_TOKEN,i),this.on(s.a.INVALID_AUTH_TOKEN,o)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.authToken,r=e.host;return o.toImmutable.bind()({authToken:n,host:r})}function i(){return s.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(u,"a",{get:u});var a=n(11),s=new o.Store({getInitialState:function(){return o.toImmutable.bind()({authToken:null,host:""})},initialize:function(){this.on(a.a.VALID_AUTH_TOKEN,r),this.on(a.a.LOG_OUT,i)}});e.a=s},function(t,e,n){"use strict";function r(t,e){var n=e.rememberAuth;return n}var i=n(1),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o});var u=n(11),a=new i.Store({getInitialState:function(){return!0},initialize:function(){this.on(u.a.VALID_AUTH_TOKEN,r)}});e.a=a},function(t,e,n){"use strict";function r(t,e){t.dispatch(a.a.SERVER_CONFIG_LOADED,e)}function i(t){u.a.bind()(t,"GET","config").then(function(e){return r(t,e)})}function o(t,e){t.dispatch(a.a.COMPONENT_LOADED,{component:e})}var u=n(4),a=n(16);e.configLoaded=r,e.fetchAll=i,e.componentLoaded=o},function(t,e,n){"use strict";function r(t){return[["serverComponent"],function(e){return e.contains(t)}]}e.isComponentLoaded=r;var i=[["serverConfig","latitude"],["serverConfig","longitude"],function(t,e){return{latitude:t,longitude:e}}];Object.defineProperty(e,"locationGPS",{configurable:!1,enumerable:!0,get:function(){return i}});var o=["serverConfig","location_name"];Object.defineProperty(e,"locationName",{configurable:!1,enumerable:!0,get:function(){return o}});var u=["serverConfig","serverVersion"];Object.defineProperty(e,"serverVersion",{configurable:!1,enumerable:!0,get:function(){return u}})},function(t,e,n){"use strict";function r(t,e){var n=e.component;return t.push(n)}function i(t,e){var n=e.components;return u.toImmutable.bind()(n)}function o(){return c.getInitialState()}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};Object.defineProperty(a,"a",{get:a});var s=n(16),c=new u.Store({getInitialState:function(){return u.toImmutable.bind()([])},initialize:function(){this.on(s.a.COMPONENT_LOADED,r),this.on(s.a.SERVER_CONFIG_LOADED,i),this.on(s.a.LOG_OUT,o)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.latitude,r=e.longitude,i=e.location_name,u=e.temperature_unit,a=e.time_zone,s=e.version;return o.toImmutable.bind()({latitude:n,longitude:r,location_name:i,temperature_unit:u,time_zone:a,serverVersion:s})}function i(){return s.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(u,"a",{get:u});var a=n(16),s=new o.Store({getInitialState:function(){return o.toImmutable.bind()({latitude:null,longitude:null,location_name:"Home",temperature_unit:"°C",time_zone:"UTC",serverVersion:"unknown"})},initialize:function(){this.on(a.a.SERVER_CONFIG_LOADED,r),this.on(a.a.LOG_OUT,i)}});e.a=s},function(t,e,n){"use strict";var r=n(72),i=n(73),o=n(75),u=n(31);e["default"]={config:r.a,events:i.a,services:o.a,states:u.a}},function(t,e,n){"use strict";e.a={components:["configurator","http","api","frontend","history","conversation","logbook","introduction"],latitude:32.87336,location_name:"Home",longitude:-117.22743,temperature_unit:"°F",time_zone:"America/Los_Angeles",version:"0.9"}},function(t,e,n){"use strict";e.a=[{event:"call_service",listener_count:1},{event:"time_changed",listener_count:1},{event:"state_changed",listener_count:3},{event:"homeassistant_stop",listener_count:2}]},function(t,e,n){"use strict";e["default"]=[{domain:"sun",entity_id:"sun.sun",message:"has risen",name:"sun",when:"2015-04-24T06:08:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.paulus",message:"left home",name:"Paulus",when:"2015-04-24T08:54:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.anne_therese",message:"left home",name:"Anne Therese",when:"2015-04-24T09:08:47.000Z"},{domain:"group",entity_id:"group.all_devices",message:"left home",name:"All devices",when:"2015-04-24T09:08:47.000Z"},{domain:"thermostat",entity_id:"thermostat.nest",message:"changed to 17 °C",name:"Nest",when:"2015-04-24T09:08:47.000Z"},{domain:"thermostat",entity_id:"thermostat.nest",message:"changed to 21 °C",name:"Nest",when:"2015-04-24T16:00:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.anne_therese",message:"came home",name:"Anne Therese",when:"2015-04-24T16:24:47.000Z"},{domain:"group",entity_id:"group.all_devices",message:"came home",name:"All devices",when:"2015-04-24T16:24:47.000Z"},{domain:"light",entity_id:"light.bowl",message:"turned on",name:"Bowl",when:"2015-04-24T18:01:47.000Z"},{domain:"light",entity_id:"light.ceiling",message:"turned on",name:"Ceiling",when:"2015-04-24T18:16:47.000Z"},{domain:"light",entity_id:"light.tv_back_light",message:"turned on",name:"TV Back Light",when:"2015-04-24T18:31:47.000Z"},{domain:"sun",entity_id:"sun.sun",message:"has set",name:"sun",when:"2015-04-24T18:46:47.000Z"},{domain:"media_player",entity_id:"media_player.living_room",message:"changed to Plex",name:"Media Player",when:"2015-04-24T19:12:47.000Z"}]},function(t,e,n){"use strict";e.a=[{domain:"homeassistant",services:{stop:{description:"",fields:{}},turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"light",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"switch",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"input_boolean",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"configurator",services:{configure:{description:"",fields:{}}}}]},function(t,e,n){"use strict";function r(t){var e=new Date(Date.now()-60*t*1e3);return e.toISOString()}function i(t){return Math.random()*t-t/2}function o(t,e){s[t.entity_id]=!0;var n=void 0;n="string"==typeof e[0]?e.map(function(t){return{state:t}}):e;var o=900/n.length;c.push(n.map(function(e,n){var u=void 0;u=e.attributes||t.attributes?e.attributes?t.attributes?a.a.bind()({},t.attributes,e.attributes):e.attributes:t.attributes:{};var s=r(0===n?f:f-n*o+i(o));return{attributes:u,entity_id:t.entity_id,state:e.state||t.state,last_changed:s,last_updated:s}}))}var u=n(30),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};Object.defineProperty(a,"a",{get:a});var s=(n(31),{"a.demo_mode":!0,"configurator.philips_hue":!0,"group.default_view":!0,"group.rooms_view":!0,"group.rooms":!0,"zone.school":!0,"zone.work":!0,"zone.home":!0,"group.general":!0,"camera.roundabout":!0,"script.water_lawn":!0,"scene.romantic":!0,"scene.good_morning":!0,"group.cooking":!0}),c=[],f=1440;o({entity_id:"sensor.humidity",attributes:{unit_of_measurement:"%"}},["45","49","52","49","52","49","45","42"]),o({entity_id:"sensor.temperature",attributes:{unit_of_measurement:"°C"}},["23","27","25","23","24"]),o({entity_id:"thermostat.nest",attributes:{unit_of_measurement:"°C"}},[{state:"23",attributes:{current_temperature:20,temperature:23}},{state:"23",attributes:{current_temperature:22,temperature:23}},{state:"20",attributes:{current_temperature:21,temperature:20}},{state:"20",attributes:{current_temperature:20,temperature:20}},{state:"20",attributes:{current_temperature:19,temperature:20}}]),o({entity_id:"media_player.living_room",attributes:{friendly_name:"Chromecast"}},["Plex","idle","YouTube","Netflix","idle","Plex"]),o({entity_id:"group.all_devices"},["home","not_home","home"]),o({entity_id:"device_tracker.paulus"},["home","not_home","work","not_home"]),o({entity_id:"device_tracker.anne_therese"},["home","not_home","home","not_home","school"]),o({entity_id:"garage_door.garage_door"},["open","closed","open"]),o({entity_id:"alarm_control_panel.home"},["disarmed","pending","armed_home","pending","disarmed","pending","armed_home"]),o({entity_id:"lock.kitchen_door"},["unlocked","locked","unlocked","locked"]),o({entity_id:"light.tv_back_light"},["on","off","on","off"]),o({entity_id:"light.ceiling"},["on","off","on"]),o({entity_id:"light.table_lamp"},["on","off","on"]),o({entity_id:"switch.ac"},["on","off","on"]),o({entity_id:"group.bedroom"},["on","off","on","off"]),o({entity_id:"group.living_room"},["on","off","on"]),o({entity_id:"switch.decorative_lights"},["on","off","on","off"]),o({entity_id:"light.bed_light"},["on","off","on","off"]),o({entity_id:"rollershutter.bedroom_window"},["open","closed","open","closed"]),o({entity_id:"input_select.cook_today"},["Anne Therese","Paulus"]),o({entity_id:"input_boolean.notify_cook"},["off","on"]);e["default"]=c},function(t,e,n){"use strict";function r(t,e){t.dispatch(s.a.ENTITY_HISTORY_DATE_SELECTED,{date:e})}function i(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];t.dispatch(s.a.RECENT_ENTITY_HISTORY_FETCH_START,{});var n="history/period";return null!==e&&(n+="?filter_entity_id="+e),a.a.bind()(t,"GET",n).then(function(e){return t.dispatch(s.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,{stateHistory:e})},function(){return t.dispatch(s.a.RECENT_ENTITY_HISTORY_FETCH_ERROR,{})})}function o(t,e){return t.dispatch(s.a.ENTITY_HISTORY_FETCH_START,{date:e}),a.a.bind()(t,"GET","history/period/"+e).then(function(n){return t.dispatch(s.a.ENTITY_HISTORY_FETCH_SUCCESS,{date:e,stateHistory:n})},function(){return t.dispatch(s.a.ENTITY_HISTORY_FETCH_ERROR,{})})}function u(t){var e=t.evaluate(c.currentDate);return o(t,e)}var a=n(4),s=n(8),c=n(32);e.changeCurrentDate=r,e.fetchRecent=i,e.fetchDate=o,e.fetchSelectedDate=u},function(t,e,n){"use strict";function r(t,e){var n=e.date;return a.a.bind()(n)}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(u,"a",{get:u});var a=n(25),s=n(8),c=new o.Store({getInitialState:function(){var t=new Date;return t.setDate(t.getUTCDate()-1),a.a.bind()(t)},initialize:function(){this.on(s.a.ENTITY_HISTORY_DATE_SELECTED,r),this.on(s.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.date,r=e.stateHistory;return 0===r.length?t.set(n,o.toImmutable.bind()({})):t.withMutations(function(t){r.forEach(function(e){return t.setIn([n,e[0].entity_id],o.toImmutable.bind()(e.map(s.a.fromJSON)))})})}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(u,"a",{get:u});var a=n(8),s=n(13),c=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(a.a.ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(a.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";var r=n(1),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(8),u=new r.Store({getInitialState:function(){return!1},initialize:function(){this.on(o.a.ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(o.a.ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(o.a.ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(o.a.LOG_OUT,function(){return!1})}});e.a=u},function(t,e,n){"use strict";function r(t,e){var n=e.stateHistory;return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,o.toImmutable.bind()(e.map(s.a.fromJSON)))})})}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(u,"a",{get:u});var a=n(8),s=n(13),c=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(a.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(a.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.stateHistory,r=(new Date).getTime();return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,r)}),history.length>1&&t.set(s,r)})}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(u,"a",{get:u});var a=n(8),s="ALL_ENTRY_FETCH",c=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(a.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(a.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";var r=n(7),i=n(13),o=r.createApiActions.bind()(i.a);e.a=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;nu}var i=n(1),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o});var u=6e4,a=["currentLogbookDate"];Object.defineProperty(e,"currentDate",{configurable:!1,enumerable:!0,get:function(){return a}});var s=[a,["logbookEntriesUpdated"],function(t,e){return r(e.get(t))}];Object.defineProperty(e,"isCurrentStale",{configurable:!1,enumerable:!0,get:function(){return s}});var c=[a,["logbookEntries"],function(t,e){return e.get(t)||i.toImmutable.bind()([])}];Object.defineProperty(e,"currentEntries",{configurable:!1,enumerable:!0,get:function(){return c}});var f=["isLoadingLogbookEntries"];Object.defineProperty(e,"isLoadingEntries",{configurable:!1,enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";function r(t){t.registerStores({currentLogbookDate:i.a,isLoadingLogbookEntries:o.a,logbookEntries:u.a,logbookEntriesUpdated:a.a})}var i=n(94),o=n(95),u=n(96),a=n(97),s=n(90),c=n(91);e.register=r;var f=s;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return f}});var l=c;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return l}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};Object.defineProperty(a,"a",{get:a});var s=n(26),c=function(){function t(t,e){for(var n=0;ni;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,e){if("number"!=typeof e){var n=+e;if(""+n!==e)return NaN;e=n}return 0>e?o(t)+e:e}function a(){return!0}function s(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return l(t,e,0)}function f(t,e){return l(t,e,e)}function l(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function h(t){return v(t)?t:C(t)}function _(t){return y(t)?t:M(t)}function d(t){return m(t)?t:k(t)}function p(t){return v(t)&&!g(t)?t:R(t)}function v(t){return!(!t||!t[pn])}function y(t){return!(!t||!t[vn])}function m(t){return!(!t||!t[yn])}function g(t){return y(t)||m(t)}function S(t){return!(!t||!t[mn])}function b(t){this.next=t}function w(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function E(){return{value:void 0,done:!0}}function I(t){return!!A(t)}function T(t){return t&&"function"==typeof t.next}function O(t){var e=A(t);return e&&e.call(t)}function A(t){var e=t&&(wn&&t[wn]||t[En]);return"function"==typeof e?e:void 0}function D(t){return t&&"number"==typeof t.length}function C(t){return null===t||void 0===t?H():v(t)?t.toSeq():V(t)}function M(t){return null===t||void 0===t?H().toKeyedSeq():v(t)?y(t)?t.toSeq():t.fromEntrySeq():U(t)}function k(t){return null===t||void 0===t?H():v(t)?y(t)?t.entrySeq():t.toIndexedSeq():x(t)}function R(t){return(null===t||void 0===t?H():v(t)?y(t)?t.entrySeq():t:x(t)).toSetSeq()}function z(t){this._array=t,this.size=t.length}function L(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function j(t){this._iterable=t,this.size=t.length||t.size}function N(t){this._iterator=t,this._iteratorCache=[]}function P(t){return!(!t||!t[Tn])}function H(){return On||(On=new z([]))}function U(t){var e=Array.isArray(t)?new z(t).fromEntrySeq():T(t)?new N(t).fromEntrySeq():I(t)?new j(t).fromEntrySeq():"object"==typeof t?new L(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function x(t){var e=q(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function V(t){var e=q(t)||"object"==typeof t&&new L(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function q(t){return D(t)?new z(t):T(t)?new N(t):I(t)?new j(t):void 0}function G(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(e(a[1],r?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,n)}function F(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new b(function(){var t=i[n?o-u:u];return u++>o?E():w(e,r?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,n)}function K(){throw TypeError("Abstract")}function Y(){}function B(){}function J(){}function W(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function Z(t,e){return e?X(e,t,"",{"":t}):Q(t)}function X(t,e,n,r){return Array.isArray(e)?t.call(r,n,k(e).map(function(n,r){return X(t,n,r,e)})):$(e)?t.call(r,n,M(e).map(function(n,r){return X(t,n,r,e)})):e}function Q(t){return Array.isArray(t)?k(t).map(Q).toList():$(t)?M(t).map(Q).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Ln?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Pn[t];return void 0===e&&(e=rt(t),Nn===jn&&(Nn=0,Pn={}),Nn++,Pn[t]=e),e}function rt(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function lt(t){this._iter=t,this.size=t.size}function ht(t){var e=zt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Lt,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===bn){var r=t.__iterator(e,n);return new b(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===Sn?gn:Sn,n)},e}function _t(t,e,n){var r=zt(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,hn);return o===hn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,u){return r(e.call(n,t,i,u),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(bn,i);return new b(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return w(r,a,e.call(n,u[1],a,t),i)})},r}function dt(t,e){var n=zt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ht(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Lt,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function pt(t,e,n,r){var i=zt(t);return r&&(i.has=function(r){var i=t.get(r,hn);return i!==hn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,hn);return o!==hn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return e.call(n,t,o,s)?(a++,i(t,r?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(bn,o),a=0;return new b(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return w(i,r?c:a++,f,o)}})},i}function vt(t,e,n){var r=Pt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function yt(t,e,n){var r=y(t),i=(S(t)?Ee():Pt()).asMutable();t.__iterate(function(o,u){i.update(e.call(n,o,u,t),function(t){return t=t||[],t.push(r?[u,o]:o),t})});var o=Rt(t);return i.map(function(e){return Ct(t,o(e))})}function mt(t,e,n,r){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==n&&(n=0|n),s(e,n,i))return t;var o=c(e,i),a=f(n,i);if(o!==o||a!==a)return mt(t.toSeq().cacheResult(),e,n,r);var l,h=a-o;h===h&&(l=0>h?0:h);var _=zt(t);return _.size=0===l?l:t.size&&l||void 0,!r&&P(t)&&l>=0&&(_.get=function(e,n){return e=u(this,e),e>=0&&l>e?t.get(e+o,n):n}),_.__iterateUncached=function(e,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(e,n);var u=0,a=!0,s=0;return t.__iterate(function(t,n){return a&&(a=u++l)return E();var t=i.next();return r||e===Sn?t:e===gn?w(e,a-1,void 0,t):w(e,a-1,t.value[1],t)})},_}function gt(t,e,n){var r=zt(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var u=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++u&&r(t,i,o)}),u},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var u=t.__iterator(bn,i),a=!0;return new b(function(){if(!a)return E();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===bn?t:w(r,s,c,t):(a=!1,E())})},r}function St(t,e,n,r){var i=zt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,c){return a&&(a=e.call(n,t,o,c))?void 0:(s++,i(t,r?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(bn,o),s=!0,c=0;return new b(function(){var t,o,f;do{if(t=a.next(),t.done)return r||i===Sn?t:i===gn?w(i,c++,void 0,t):w(i,c++,t.value[1],t);var l=t.value;o=l[0],f=l[1],s&&(s=e.call(n,f,o,u))}while(s);return i===bn?t:w(i,o,f,t)})},i}function bt(t,e){var n=y(t),r=[t].concat(e).map(function(t){return v(t)?n&&(t=_(t)):t=n?U(t):x(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&y(i)||m(t)&&m(i))return i}var o=new z(r);return n?o=o.toKeyedSeq():m(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),o}function wt(t,e,n){var r=zt(t);return r.__iterateUncached=function(r,i){function o(t,s){var c=this;t.__iterate(function(t,i){return(!e||e>s)&&v(t)?o(t,s+1):r(t,n?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),u=[],a=0;return new b(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(r===bn&&(s=s[1]),e&&!(u.length0}function Dt(t,e,n){var r=zt(t);return r.size=new z(n).map(function(t){return t.size}).min(),r.__iterate=function(t,e){for(var n,r=this.__iterator(Sn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},r.__iteratorUncached=function(t,r){var i=n.map(function(t){return t=h(t),O(r?t.reverse():t)}),o=0,u=!1;return new b(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?E():w(t,o++,e.apply(null,n.map(function(t){return t.value})))})},r}function Ct(t,e){return P(t)?e:t.constructor(e)}function Mt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function kt(t){return at(t.size),o(t)}function Rt(t){return y(t)?_:m(t)?d:p}function zt(t){return Object.create((y(t)?M:m(t)?k:R).prototype)}function Lt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):C.prototype.cacheResult.call(this)}function jt(t,e){return t>e?1:e>t?-1:0}function Nt(t){var e=O(t);if(!e){if(!D(t))throw new TypeError("Expected iterable or array-like: "+t);e=O(h(t))}return e}function Pt(t){return null===t||void 0===t?Jt():Ht(t)&&!S(t)?t:Jt().withMutations(function(e){var n=_(t);at(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Ht(t){return!(!t||!t[Hn])}function Ut(t,e){this.ownerID=t,this.entries=e}function xt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function qt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Gt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Ft(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Yt(t._root)}function Kt(t,e){return w(t,e[0],e[1])}function Yt(t,e){return{node:t,index:0,__prev:e}}function Bt(t,e,n,r){var i=Object.create(Un);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Jt(){return xn||(xn=Bt(0))}function Wt(t,n,r){var i,o;if(t._root){var u=e(_n),a=e(dn);if(i=Zt(t._root,t.__ownerID,0,void 0,n,r,u,a),!a.value)return t;o=t.size+(u.value?r===hn?-1:1:0)}else{if(r===hn)return t;o=1,i=new Ut(t.__ownerID,[[n,r]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Bt(o,i):Jt()}function Zt(t,e,r,i,o,u,a,s){return t?t.update(e,r,i,o,u,a,s):u===hn?t:(n(s),n(a),new Gt(e,i,[o,u]))}function Xt(t){return t.constructor===Gt||t.constructor===qt}function Qt(t,e,n,r,i){if(t.keyHash===r)return new qt(e,r,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&ln,a=(0===n?r:r>>>n)&ln,s=u===a?[Qt(t,e,n+cn,r,i)]:(o=new Gt(e,r,i),a>u?[t,o]:[o,t]);return new xt(e,1<a;a++,s<<=1){var f=e[a];void 0!==f&&a!==r&&(i|=s,u[o++]=f)}return new xt(t,i,u)}function ee(t,e,n,r,i){for(var o=0,u=new Array(fn),a=0;0!==n;a++,n>>>=1)u[a]=1&n?e[o++]:void 0;return u[r]=i,new Vt(t,o+1,u)}function ne(t,e,n){for(var r=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ae(t,e,n,r){var o=r?t:i(t);return o[e]=n,o}function se(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===e?(o[a]=n,u=-1):o[a]=t[a+u];return o}function ce(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,u=0;r>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=pe();if(null===t||void 0===t)return e;if(le(t))return t;var n=d(t),r=n.size;return 0===r?e:(at(r),r>0&&fn>r?de(0,r,cn,null,new he(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function le(t){return!(!t||!t[Fn])}function he(t,e){this.array=t,this.ownerID=e}function _e(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===a?s&&s.array:t&&t.array,i=n>o?0:o-n,c=u-n;return c>fn&&(c=fn),function(){if(i===c)return Bn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var a,s=t&&t.array,c=i>o?0:o-i>>r,f=(u-i>>r)+1;return f>fn&&(f=fn),function(){for(;;){if(a){var t=a();if(t!==Bn)return t;a=null}if(c===f)return Bn;var o=e?--f:c++;a=n(s&&s[o],r-cn,i+(o<=t.size||0>n)return t.withMutations(function(t){0>n?Se(t,n).set(0,r):Se(t,0,n+1).set(n,r)});n+=t._origin;var i=t._tail,o=t._root,a=e(dn);return n>=we(t._capacity)?i=ye(i,t.__ownerID,0,n,r,a):o=ye(o,t.__ownerID,t._level,n,r,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):de(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,r,i,o,u){var a=i>>>r&ln,s=t&&a0){var f=t&&t.array[a],l=ye(f,e,r-cn,i,o,u);return l===f?t:(c=me(t,e),c.array[a]=l,c)}return s&&t.array[a]===o?t:(n(u),c=me(t,e),void 0===o&&a===c.array.length-1?c.array.pop():c.array[a]=o,c)}function me(t,e){return e&&t&&e===t.ownerID?t:new he(t?t.array.slice():[],e)}function ge(t,e){if(e>=we(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&ln],r-=cn;return n}}function Se(t,e,n){void 0!==e&&(e=0|e),void 0!==n&&(n=0|n);var i=t.__ownerID||new r,o=t._origin,u=t._capacity,a=o+e,s=void 0===n?u:0>n?u+n:o+n;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,l=0;0>a+l;)f=new he(f&&f.array.length?[void 0,f]:[],i),c+=cn,l+=1<=1<_?ge(t,s-1):_>h?new he([],i):d;if(d&&_>h&&u>a&&d.array.length){f=me(f,i);for(var v=f,y=c;y>cn;y-=cn){var m=h>>>y&ln;v=v.array[m]=me(v.array[m],i)}v.array[h>>>cn&ln]=d}if(u>s&&(p=p&&p.removeAfter(i,0,s)),a>=_)a-=_,s-=_,c=cn,f=null,p=p&&p.removeBefore(i,0,a);else if(a>o||h>_){for(l=0;f;){var g=a>>>c&ln;if(g!==_>>>c&ln)break;g&&(l+=(1<o&&(f=f.removeBefore(i,c,a-l)),f&&h>_&&(f=f.removeAfter(i,c,_-l)),l&&(a-=l,s-=l)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=p,t.__hash=void 0,t.__altered=!0,t):de(a,s,c,f,p)}function be(t,e,n){for(var r=[],i=0,o=0;oi&&(i=a.size),v(u)||(a=a.map(function(t){return Z(t)})),r.push(a)}return i>t.size&&(t=t.setSize(i)),ie(t,e,r)}function we(t){return fn>t?0:t-1>>>cn<=fn&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&a!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(n===u.get(a)[1])return t;r=o,i=u.set(a,[e,n])}else r=o.set(e,u.size),i=u.set(u.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Te(r,i)}function De(t){return null===t||void 0===t?ke():Ce(t)?t:ke().unshiftAll(t)}function Ce(t){return!(!t||!t[Wn])}function Me(t,e,n,r){var i=Object.create(Zn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function ke(){return Xn||(Xn=Me(0))}function Re(t){return null===t||void 0===t?Ne():ze(t)&&!S(t)?t:Ne().withMutations(function(e){var n=p(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function ze(t){return!(!t||!t[Qn])}function Le(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function je(t,e){var n=Object.create($n);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ne(){return tr||(tr=je(Jt()))}function Pe(t){return null===t||void 0===t?xe():He(t)?t:xe().withMutations(function(e){var n=p(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function He(t){return ze(t)&&S(t)}function Ue(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function xe(){return nr||(nr=Ue(Oe()))}function Ve(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var u=Object.keys(t);Fe(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Pt(o)},i=r.prototype=Object.create(rr);return i.constructor=r,r}function qe(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Ge(t){return t._name||t.constructor.name||"Record"}function Fe(t,e){try{e.forEach(Ke.bind(void 0,t))}catch(n){}}function Ke(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ye(t,e){if(t===e)return!0;if(!v(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||m(t)!==m(e)||S(t)!==S(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!g(t);if(S(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&W(i[1],t)&&(n||W(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,a=e.__iterate(function(e,r){return(n?t.has(e):i?W(e,t.get(r,hn)):W(t.get(r,hn),e))?void 0:(u=!1,!1)});return u&&t.size===a}function Be(t,e,n){if(!(this instanceof Be))return new Be(t,e,n);if(ut(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(ir)return ir;ir=this}}function Je(t,e){if(!(this instanceof Je))return new Je(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(or)return or;or=this}}function We(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Ze(t,e){return e}function Xe(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function $e(t){return function(){return-t.apply(this,arguments)}}function tn(t){return"string"==typeof t?JSON.stringify(t):t}function en(){return i(arguments)}function nn(t,e){return e>t?1:t>e?-1:0}function rn(t){if(t.size===1/0)return 0;var e=S(t),n=y(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+un(et(t),et(e))|0}:function(t,e){r=r+un(et(t),et(e))|0}:e?function(t){r=31*r+et(t)|0}:function(t){r=r+et(t)|0});return on(i,r)}function on(t,e){return e=Dn(e,3432918353),e=Dn(e<<15|e>>>-15,461845907),e=Dn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Dn(e^e>>>16,2246822507),e=Dn(e^e>>>13,3266489909),e=tt(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var an=Array.prototype.slice,sn="delete",cn=5,fn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},z.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new b(function(){return i>r?E():w(t,i,n[e?r-i++:i++])})},t(L,M),L.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},L.prototype.has=function(t){return this._object.hasOwnProperty(t)},L.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var u=r[e?i-o:o];if(t(n[u],u,this)===!1)return o+1}return o},L.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new b(function(){var u=r[e?i-o:o];return o++>i?E():w(t,u,n[u])})},L.prototype[mn]=!0,t(j,k),j.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=O(n),i=0;if(T(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},j.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=O(n);if(!T(r))return new b(E);var i=0;return new b(function(){var e=r.next();return e.done?e:w(t,i++,e.value)})},t(N,k),N.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return w(t,i,r[i++])})};var On;t(K,h),t(Y,K),t(B,K),t(J,K),K.Keyed=Y,K.Indexed=B,K.Set=J;var An,Dn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Cn=Object.isExtensible,Mn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),kn="function"==typeof WeakMap;kn&&(An=new WeakMap);var Rn=0,zn="__immutablehash__";"function"==typeof Symbol&&(zn=Symbol(zn));var Ln=16,jn=255,Nn=0,Pn={};t(st,M),st.prototype.get=function(t,e){return this._iter.get(t,e)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,e=dt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},st.prototype.map=function(t,e){var n=this,r=_t(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},st.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?kt(this):0,function(i){return t(i,e?--n:n++,r)}),e)},st.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(Sn,e),r=e?kt(this):0;return new b(function(){var i=n.next();return i.done?i:w(t,e?--r:r++,i.value,i)})},st.prototype[mn]=!0,t(ct,k),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ct.prototype.__iterator=function(t,e){var n=this._iter.__iterator(Sn,e),r=0;return new b(function(){var e=n.next();return e.done?e:w(t,r++,e.value,e)})},t(ft,R),ft.prototype.has=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},ft.prototype.__iterator=function(t,e){var n=this._iter.__iterator(Sn,e);return new b(function(){var e=n.next();return e.done?e:w(t,e.value,e.value,e)})},t(lt,M),lt.prototype.entrySeq=function(){return this._iter.toSeq()},lt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){ +if(e){Mt(e);var r=v(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},lt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(Sn,e);return new b(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Mt(r);var i=v(r);return w(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ct.prototype.cacheResult=st.prototype.cacheResult=ft.prototype.cacheResult=lt.prototype.cacheResult=Lt,t(Pt,Y),Pt.prototype.toString=function(){return this.__toString("Map {","}")},Pt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Pt.prototype.set=function(t,e){return Wt(this,t,e)},Pt.prototype.setIn=function(t,e){return this.updateIn(t,hn,function(){return e})},Pt.prototype.remove=function(t){return Wt(this,t,hn)},Pt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hn})},Pt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Pt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,Nt(t),e,n);return r===hn?void 0:r},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Jt()},Pt.prototype.merge=function(){return ne(this,void 0,arguments)},Pt.prototype.mergeWith=function(t){var e=an.call(arguments,1);return ne(this,t,e)},Pt.prototype.mergeIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Jt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Pt.prototype.mergeDeep=function(){return ne(this,re(void 0),arguments)},Pt.prototype.mergeDeepWith=function(t){var e=an.call(arguments,1);return ne(this,re(t),e)},Pt.prototype.mergeDeepIn=function(t){var e=an.call(arguments,1);return this.updateIn(t,Jt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Pt.prototype.sort=function(t){return Ee(Tt(this,t))},Pt.prototype.sortBy=function(t,e){return Ee(Tt(this,e,t))},Pt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Pt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},Pt.prototype.asImmutable=function(){return this.__ensureOwner()},Pt.prototype.wasAltered=function(){return this.__altered},Pt.prototype.__iterator=function(t,e){return new Ft(this,t,e)},Pt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},Pt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Bt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Pt.isMap=Ht;var Hn="@@__IMMUTABLE_MAP__@@",Un=Pt.prototype;Un[Hn]=!0,Un[sn]=Un.remove,Un.removeIn=Un.deleteIn,Ut.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(W(n,i[o][0]))return i[o][1];return r},Ut.prototype.update=function(t,e,r,o,u,a,s){for(var c=u===hn,f=this.entries,l=0,h=f.length;h>l&&!W(o,f[l][0]);l++);var _=h>l;if(_?f[l][1]===u:c)return this;if(n(s),(c||!_)&&n(a),!c||1!==f.length){if(!_&&!c&&f.length>=Vn)return $t(t,f,o,u);var d=t&&t===this.ownerID,p=d?f:i(f);return _?c?l===h-1?p.pop():p[l]=p.pop():p[l]=[o,u]:p.push([o,u]),d?(this.entries=p,this):new Ut(t,p)}},xt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&ln),o=this.bitmap;return 0===(o&i)?r:this.nodes[ue(o&i-1)].get(t+cn,e,n,r)},xt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=1<=qn)return ee(t,h,c,a,d);if(f&&!d&&2===h.length&&Xt(h[1^l]))return h[1^l];if(f&&d&&1===h.length&&Xt(d))return d;var p=t&&t===this.ownerID,v=f?d?c:c^s:c|s,y=f?d?ae(h,l,d,p):ce(h,l,p):se(h,l,d,p);return p?(this.bitmap=v,this.nodes=y,this):new xt(t,v,y)},Vt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&ln,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Vt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=et(r));var a=(0===e?n:n>>>e)&ln,s=i===hn,c=this.nodes,f=c[a];if(s&&!f)return this;var l=Zt(f,t,e+cn,n,r,i,o,u);if(l===f)return this;var h=this.count;if(f){if(!l&&(h--,Gn>h))return te(t,c,h,a)}else h++;var _=t&&t===this.ownerID,d=ae(c,a,l,_);return _?(this.count=h,this.nodes=d,this):new Vt(t,h,d)},qt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(W(n,i[o][0]))return i[o][1];return r},qt.prototype.update=function(t,e,r,o,u,a,s){void 0===r&&(r=et(o));var c=u===hn;if(r!==this.keyHash)return c?this:(n(s),n(a),Qt(this,t,e,r,[o,u]));for(var f=this.entries,l=0,h=f.length;h>l&&!W(o,f[l][0]);l++);var _=h>l;if(_?f[l][1]===u:c)return this;if(n(s),(c||!_)&&n(a),c&&2===h)return new Gt(t,this.keyHash,f[1^l]);var d=t&&t===this.ownerID,p=d?f:i(f);return _?c?l===h-1?p.pop():p[l]=p.pop():p[l]=[o,u]:p.push([o,u]),d?(this.entries=p,this):new qt(t,this.keyHash,p)},Gt.prototype.get=function(t,e,n,r){return W(n,this.entry[0])?this.entry[1]:r},Gt.prototype.update=function(t,e,r,i,o,u,a){var s=o===hn,c=W(i,this.entry[0]);return(c?o===this.entry[1]:s)?this:(n(a),s?void n(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Gt(t,this.keyHash,[i,o]):(n(u),Qt(this,t,e,et(i),[i,o])))},Ut.prototype.iterate=qt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},xt.prototype.iterate=Vt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Gt.prototype.iterate=function(t,e){return t(this.entry)},t(Ft,b),Ft.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return Kt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return Kt(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Kt(t,o.entry);e=this._stack=Yt(o,e)}continue}e=this._stack=this._stack.__prev}return E()};var xn,Vn=fn/4,qn=fn/2,Gn=fn/4;t(fe,B),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&ln;if(r>=this.array.length)return new he([],t);var i,o=0===r;if(e>0){var u=this.array[r];if(i=u&&u.removeBefore(t,e-cn,n),i===u&&o)return this}if(o&&!i)return this;var a=me(this,t);if(!o)for(var s=0;r>s;s++)a.array[s]=void 0;return i&&(a.array[r]=i),a},he.prototype.removeAfter=function(t,e,n){if(n===(e?1<>>e&ln;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-cn,n),i===o&&r===this.array.length-1)return this}var u=me(this,t);return u.array.splice(r+1),i&&(u.array[r]=i),u};var Yn,Bn={};t(Ee,Pt),Ee.of=function(){return this(arguments)},Ee.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ee.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Ee.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Oe()},Ee.prototype.set=function(t,e){return Ae(this,t,e)},Ee.prototype.remove=function(t){return Ae(this,t,hn)},Ee.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ee.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Ee.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ee.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Ee.isOrderedMap=Ie,Ee.prototype[mn]=!0,Ee.prototype[sn]=Ee.prototype.remove;var Jn;t(De,B),De.of=function(){return this(arguments)},De.prototype.toString=function(){return this.__toString("Stack [","]")},De.prototype.get=function(t,e){var n=this._head;for(t=u(this,t);n&&t--;)n=n.next;return n?n.value:e},De.prototype.peek=function(){return this._head&&this._head.value},De.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Me(t,e)},De.prototype.pushAll=function(t){if(t=d(t),0===t.size)return this;at(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Me(e,n)},De.prototype.pop=function(){return this.slice(1)},De.prototype.unshift=function(){return this.push.apply(this,arguments)},De.prototype.unshiftAll=function(t){return this.pushAll(t)},De.prototype.shift=function(){return this.pop.apply(this,arguments)},De.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):ke()},De.prototype.slice=function(t,e){if(s(t,e,this.size))return this;var n=c(t,this.size),r=f(e,this.size);if(r!==this.size)return B.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Me(i,o)},De.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Me(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},De.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},De.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new b(function(){if(r){var e=r.value;return r=r.next,w(t,n++,e)}return E()})},De.isStack=Ce;var Wn="@@__IMMUTABLE_STACK__@@",Zn=De.prototype;Zn[Wn]=!0,Zn.withMutations=Un.withMutations,Zn.asMutable=Un.asMutable,Zn.asImmutable=Un.asImmutable,Zn.wasAltered=Un.wasAltered;var Xn;t(Re,J),Re.of=function(){return this(arguments)},Re.fromKeys=function(t){return this(_(t).keySeq())},Re.prototype.toString=function(){return this.__toString("Set {","}")},Re.prototype.has=function(t){return this._map.has(t)},Re.prototype.add=function(t){return Le(this,this._map.set(t,!0))},Re.prototype.remove=function(t){return Le(this,this._map.remove(t))},Re.prototype.clear=function(){return Le(this,this._map.clear())},Re.prototype.union=function(){var t=an.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n1?" by "+this._step:"")+" ]"},Be.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Be.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Be(0,0):new Be(this.get(t,this._end),this.get(e,this._end),this._step))},Be.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},Be.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new b(function(){var u=i;return i+=e?-r:r,o>n?E():w(t,o++,u)})},Be.prototype.equals=function(t){return t instanceof Be?this._start===t._start&&this._end===t._end&&this._step===t._step:Ye(this,t)};var ir;t(Je,k),Je.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Je.prototype.get=function(t,e){return this.has(t)?this._value:e},Je.prototype.includes=function(t){return W(this._value,t)},Je.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new Je(this._value,f(e,n)-c(t,n))},Je.prototype.reverse=function(){return this},Je.prototype.indexOf=function(t){return W(this._value,t)?0:-1},Je.prototype.lastIndexOf=function(t){return W(this._value,t)?this.size:-1},Je.prototype.__iterate=function(t,e){for(var n=0;nt?this.count():this.size);var r=this.slice(0,t);return Ct(this,1===n?r:r.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return Ct(this,wt(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===n(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===n(t)},"function"!=typeof/./&&"object"!=typeof Int8Array?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var n=1;e>n;n++)for(var r=arguments[n],i=Object.keys(r),o=i.length,u=0;o>u;u++){var a=i[u];t[a]=r[a]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,n){var i,o,u=t?t.length:0,a=-1;if(n&&(o=e,e=function(t,e,r){return o.call(n,t,e,r)}),r(u))for(;++ar;r++)n[r]=arguments[r];return new(i.apply(t,[null].concat(n)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!(0,f.isObject)(t)}function u(t){return i(t)?t.toJS():t}function a(t){return i(t)?t:c["default"].fromJS(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=u,e.toImmutable=a;var s=n(3),c=r(s),f=n(4)},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var n=c["default"].Set().withMutations(function(n){n.union(t.observerState.get("any")),e.forEach(function(e){var r=t.observerState.getIn(["stores",e]); +r&&n.union(r)})});n.forEach(function(e){var n=t.observerState.getIn(["observersMap",e]);if(n){var r=n.get("getter"),i=n.get("handler"),o=_.evaluate(t.prevReactorState,r),u=_.evaluate(t.reactorState,r);t.prevReactorState=o.reactorState,t.reactorState=u.reactorState;var a=o.result,s=u.result;c["default"].is(a,s)||i.call(null,s)}});var r=_.resetDirtyStores(this.reactorState);this.prevReactorState=r,this.reactorState=r}}}},{key:"batchStart",value:function(){this.__batchDepth++}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=(0,y.toFactory)(g),t.exports=e["default"]},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n={};return(0,o.each)(e,function(e,r){n[r]=t.evaluate(e)}),n}Object.defineProperty(e,"__esModule",{value:!0});var o=n(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],(0,o.each)(this.getDataBindings(),function(n,i){var o=t.observe(n,function(t){e.setState(r({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new R({result:t,reactorState:e})}function o(t,e){return t.withMutations(function(t){(0,k.each)(e,function(e,n){t.getIn(["stores",n])&&console.warn("Store already defined for id = "+n);var r=e.getInitialState();if(void 0===r&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store getInitialState() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,D.isImmutableValue)(r))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(n,e)}).update("state",function(t){return t.set(n,r)}).update("dirtyStores",function(t){return t.add(n)}).update("storeStates",function(t){return E(t,[n])})}),w(t)})}function u(t,e){return t.withMutations(function(t){(0,k.each)(e,function(e,n){t.update("stores",function(t){return t.set(n,e)})})})}function a(t,e,n){if(void 0===e&&f(t,"throwOnUndefinedActionType"))throw new Error("`dispatch` cannot be called with an `undefined` action type.");var r=t.get("state"),i=t.get("dirtyStores"),o=r.withMutations(function(r){A["default"].dispatchStart(t,e,n),t.get("stores").forEach(function(o,u){var a=r.get(u),s=void 0;try{s=o.handle(a,e,n)}catch(c){throw A["default"].dispatchError(t,c.message),c}if(void 0===s&&f(t,"throwOnUndefinedStoreReturnValue")){var l="Store handler must return a value, did you forget a return statement";throw A["default"].dispatchError(t,l),new Error(l)}r.set(u,s),a!==s&&(i=i.add(u))}),A["default"].dispatchEnd(t,r,i)}),u=t.set("state",o).set("dirtyStores",i).update("storeStates",function(t){return E(t,i)});return w(u)}function s(t,e){var n=[],r=(0,D.toImmutable)({}).withMutations(function(r){(0,k.each)(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var u=o.deserialize(e);void 0!==u&&(r.set(i,u),n.push(i))}})}),i=T["default"].Set(n);return t.update("state",function(t){return t.merge(r)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return E(t,n)})}function c(t,e,n){var r=e;(0,M.isKeyPath)(e)&&(e=(0,C.fromKeyPath)(e));var i=t.get("nextId"),o=(0,C.getStoreDeps)(e),u=T["default"].Map({id:i,storeDeps:o,getterKey:r,getter:e,handler:n}),a=void 0;return a=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var n=["stores",e];t.hasIn(n)||t.setIn(n,T["default"].Set()),t.updateIn(["stores",e],function(t){return t.add(i)})})}),a=a.set("nextId",i+1).setIn(["observersMap",i],u),{observerState:a,entry:u}}function f(t,e){var n=t.getIn(["options",e]);if(void 0===n)throw new Error("Invalid option: "+e);return n}function l(t,e,n){var r=t.get("observersMap").filter(function(t){var r=t.get("getterKey"),i=!n||t.get("handler")===n;return i?(0,M.isKeyPath)(e)&&(0,M.isKeyPath)(r)?(0,M.isEqual)(e,r):e===r:!1});return t.withMutations(function(t){r.forEach(function(e){return h(t,e)})})}function h(t,e){return t.withMutations(function(t){var n=e.get("id"),r=e.get("storeDeps");0===r.size?t.update("any",function(t){return t.remove(n)}):r.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(n):t})}),t.removeIn(["observersMap",n])})}function _(t){var e=t.get("state");return t.withMutations(function(t){var n=t.get("stores"),r=n.keySeq().toJS();n.forEach(function(n,r){var i=e.get(r),o=n.handleReset(i);if(void 0===o&&f(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store handleReset() must return a value, did you forget a return statement");if(f(t,"throwOnNonImmutableStore")&&!(0,D.isImmutableValue)(o))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",r],o)}),t.update("storeStates",function(t){return E(t,r)}),v(t)})}function d(t,e){var n=t.get("state");if((0,M.isKeyPath)(e))return i(n.getIn(e),t);if(!(0,C.isGetter)(e))throw new Error("evaluate must be passed a keyPath or Getter");if(g(t,e))return i(b(t,e),t);var r=(0,C.getDeps)(e).map(function(e){return d(t,e).result}),o=(0,C.getComputeFn)(e).apply(null,r);return i(o,S(t,e,o))}function p(t){var e={};return t.get("stores").forEach(function(n,r){var i=t.getIn(["state",r]),o=n.serialize(i);void 0!==o&&(e[r]=o)}),e}function v(t){return t.set("dirtyStores",T["default"].Set())}function y(t){return t}function m(t,e){var n=y(e);return t.getIn(["cache",n])}function g(t,e){var n=m(t,e);if(!n)return!1;var r=n.get("storeStates");return 0===r.size?!1:r.every(function(e,n){return t.getIn(["storeStates",n])===e})}function S(t,e,n){var r=y(e),i=t.get("dispatchId"),o=(0,C.getStoreDeps)(e),u=(0,D.toImmutable)({}).withMutations(function(e){o.forEach(function(n){var r=t.getIn(["storeStates",n]);e.set(n,r)})});return t.setIn(["cache",r],T["default"].Map({value:n,storeStates:u,dispatchId:i}))}function b(t,e){var n=y(e);return t.getIn(["cache",n,"value"])}function w(t){return t.update("dispatchId",function(t){return t+1})}function E(t,e){return t.withMutations(function(t){e.forEach(function(e){var n=t.has(e)?t.get(e)+1:1;t.set(e,n)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.registerStores=o,e.replaceStores=u,e.dispatch=a,e.loadState=s,e.addObserver=c,e.getOption=f,e.removeObserver=l,e.removeObserverByEntry=h,e.reset=_,e.evaluate=d,e.serialize=p,e.resetDirtyStores=v;var I=n(3),T=r(I),O=n(9),A=r(O),D=n(5),C=n(10),M=n(11),k=n(4),R=T["default"].Record({result:null,reactorState:null})},function(t,e,n){"use strict";var r=n(8);e.dispatchStart=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.groupCollapsed("Dispatch: %s",e),console.group("payload"),console.debug(n),console.groupEnd())},e.dispatchError=function(t,e){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.debug("Dispatch error: "+e),console.groupEnd())},e.dispatchEnd=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&((0,r.getOption)(t,"logDirtyStores")&&console.log("Stores updated:",n.toList().toJS()),(0,r.getOption)(t,"logAppState")&&console.debug("Dispatch done, new state: ",e.toJS()),console.groupEnd())}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,h.isArray)(t)&&(0,h.isFunction)(t[t.length-1])}function o(t){return t[t.length-1]}function u(t){return t.slice(0,t.length-1)}function a(t,e){e||(e=l["default"].Set());var n=l["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");u(t).forEach(function(t){if((0,_.isKeyPath)(t))e.add((0,f.List)(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(a(t))}})});return e.union(n)}function s(t){if(!(0,_.isKeyPath)(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,d]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=a(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var f=n(3),l=r(f),h=n(4),_=n(11),d=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:a,getStoreDeps:c,getDeps:u,fromKeyPath:s},t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,s.isArray)(t)&&!(0,s.isFunction)(t[t.length-1])}function o(t,e){var n=a["default"].List(t),r=a["default"].List(e);return a["default"].is(n,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var u=n(3),a=r(u),s=n(4)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=(0,r.Map)({logDispatches:!1,logAppState:!1,logDirtyStores:!1,throwOnUndefinedActionType:!1,throwOnUndefinedStoreReturnValue:!1,throwOnNonImmutableStore:!1,throwOnDispatchInDispatch:!1});e.PROD_OPTIONS=i;var o=(0,r.Map)({logDispatches:!0,logAppState:!0,logDirtyStores:!0,throwOnUndefinedActionType:!0,throwOnUndefinedStoreReturnValue:!0,throwOnNonImmutableStore:!0,throwOnDispatchInDispatch:!0});e.DEBUG_OPTIONS=o;var u=(0,r.Record)({dispatchId:0,state:(0,r.Map)(),stores:(0,r.Map)(),cache:(0,r.Map)(),storeStates:(0,r.Map)(),dirtyStores:(0,r.Set)(),debug:!1,options:i});e.ReactorState=u;var a=(0,r.Record)({any:(0,r.Set)(),stores:(0,r.Map)({}),observersMap:(0,r.Map)({}),nextId:1});e.ObserverState=a}])})},function(t,e){"use strict";var n=function(t){var e,n={};if(!(t instanceof Object)||Array.isArray(t))throw new Error("keyMirror(...): Argument must be an object.");for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=n},function(t,e,n){"use strict";var r=n(58);n.d(e,"a",function(){return i});var i=r.a},function(t,e,n){"use strict";var r=n(80),i=n(82);n.d(e,"actions",function(){return o}),n.d(e,"getters",function(){return u});var o=r.a,u=i},,function(t,e,n){"use strict";function r(t){t.registerStores({restApiCache:c.a})}function i(t){return[["restApiCache",t.entity],function(t){return!!t}]}function o(t){return[["restApiCache",t.entity],function(t){return t||n.i(a.toImmutable)({})}]}function u(t){return function(e){return["restApiCache",t.entity,e]}}var a=n(1),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};n.d(s,"a",s);var c=n(107),f=n(106);n.d(e,"createApiActions",function(){return l}),e.register=r,e.createHasDataGetter=i,e.createEntityMapGetter=o,e.createByIdGetter=u;var l=f.a},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};n.d(i,"a",i),e.a=i()({ENTITY_HISTORY_DATE_SELECTED:null,ENTITY_HISTORY_FETCH_START:null,ENTITY_HISTORY_FETCH_ERROR:null,ENTITY_HISTORY_FETCH_SUCCESS:null,RECENT_ENTITY_HISTORY_FETCH_START:null,RECENT_ENTITY_HISTORY_FETCH_ERROR:null,RECENT_ENTITY_HISTORY_FETCH_SUCCESS:null,LOG_OUT:null})},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};n.d(i,"a",i),e.a=i()({LOGBOOK_DATE_SELECTED:null,LOGBOOK_ENTRIES_FETCH_START:null,LOGBOOK_ENTRIES_FETCH_ERROR:null,LOGBOOK_ENTRIES_FETCH_SUCCESS:null})},function(t,e,n){"use strict";var r=n(108),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};n.d(i,"a",i);var o=n(39);n.d(e,"actions",function(){return u}),n.d(e,"getters",function(){return a});var u=i.a,a=o},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};n.d(i,"a",i),e.a=i()({VALIDATING_AUTH_TOKEN:null,VALID_AUTH_TOKEN:null,INVALID_AUTH_TOKEN:null,LOG_OUT:null})},function(t,e,n){"use strict";function r(t){t.registerStores({authAttempt:i.a,authCurrent:o.a,rememberAuth:u.a})}var i=n(61),o=n(62),u=n(63),a=n(59),s=n(60);e.register=r,n.d(e,"actions",function(){return c}),n.d(e,"getters",function(){return f});var c=a,f=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};n.d(a,"a",a);var s=n(81),c=n(25),f=n(3),l=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var n=0;nn;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(o){return!1}}var i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,u,a=n(t),s=1;s6e4}e.a=r},,,,,,,,function(t,e,n){var r=n(180);t.exports=function(t,e,n){function i(){var f=r()-s;e>f&&f>0?o=setTimeout(i,e-f):(o=null,n||(c=t.apply(a,u),o||(a=u=null)))}var o,u,a,s,c;return null==e&&(e=100),function(){a=this,u=arguments,s=r();var f=n&&!o;return o||(o=setTimeout(i,e)),f&&(c=t.apply(a,u),a=u=null),c}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(104),o=n(129),u=n(131),a=n(133),s=n(11),c=n(16),f=n(4),l=n(31),h=n(84),_=n(17),d=n(89),p=n(34),v=n(37),y=n(19),m=n(44),g=n(9),S=n(21),b=n(23),w=n(120),E=n(126),I=n(6),T=function O(){r(this,O);var t=n.i(o.a)();Object.defineProperties(this,{demo:{value:1,enumerable:!0},localStoragePreferences:{value:i.a,enumerable:!0},reactor:{value:t,enumerable:!0},util:{value:a.a,enumerable:!0},startLocalStoragePreferencesSync:{value:i.a.startSync.bind(i.a,t)},startUrlSync:{value:v.urlSync.startSync.bind(null,t)},stopUrlSync:{value:v.urlSync.stopSync.bind(null,t)}}),n.i(u.a)(this,t,{auth:s,config:c,entity:f,entityHistory:l,errorLog:h,event:_,logbook:d,moreInfo:p,navigation:v,notification:y,view:m,service:g,stream:S,sync:b,template:w,voice:E,restApi:I})};e.a=T},,,function(t,e,n){"use strict";var r=n(11),i=function(t,e,n){var i=arguments.length<=3||void 0===arguments[3]?null:arguments[3],o=t.evaluate(r.getters.authInfo),u=o.host+"/api/"+n;return new Promise(function(t,n){var r=new XMLHttpRequest;r.open(e,u,!0),r.setRequestHeader("X-HA-access",o.authToken),r.onload=function(){var e=void 0;try{e="application/json"===r.getResponseHeader("content-type")?JSON.parse(r.responseText):r.responseText}catch(i){e=r.responseText}r.status>199&&r.status<300?t(e):n(e)},r.onerror=function(){return n({})},i?r.send(JSON.stringify(i)):r.send()})};i=function(t,e,r){return new Promise(function(t){if("GET"!==e)throw new Error("Method "+e+" not allowed in demo mode.");var i=r.split("/",1)[0];switch(i){case"bootstrap":t(n(68)["default"]);break;case"logbook":t(n(71)["default"]);break;case"history":t(n(73)["default"]);break;default:throw new Error("URL not implemented in demo mode /api/"+r)}})},e.a=i},function(t,e,n){"use strict";function r(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n.useStreaming,i=(void 0===r?t.evaluate(u.getters.isSupported):r,n.rememberAuth),c=void 0===i?!1:i,f=n.host,l=void 0===f?"":f;t.dispatch(o.a.VALIDATING_AUTH_TOKEN,{authToken:e,host:l}),a.actions.fetchAll(t).then(function(){return t.dispatch(o.a.VALID_AUTH_TOKEN,{authToken:e,host:l,rememberAuth:c}),void t.dispatch("STREAM_START")},function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.message,r=void 0===n?s:n;t.dispatch(o.a.INVALID_AUTH_TOKEN,{errorMessage:r})})}function i(t){t.dispatch(o.a.LOG_OUT,{})}var o=n(10),u=n(21),a=n(23);e.validate=r,e.logOut=i;var s="Unexpected result from API"},function(t,e,n){"use strict";n.d(e,"isValidating",function(){return r}),n.d(e,"isInvalidAttempt",function(){return i}),n.d(e,"attemptErrorMessage",function(){return o}),n.d(e,"rememberAuth",function(){return u}),n.d(e,"attemptAuthInfo",function(){ +return a}),n.d(e,"currentAuthToken",function(){return s}),n.d(e,"currentAuthInfo",function(){return c}),n.d(e,"authToken",function(){return f}),n.d(e,"authInfo",function(){return l});var r=["authAttempt","isValidating"],i=["authAttempt","isInvalid"],o=["authAttempt","errorMessage"],u=["rememberAuth"],a=[["authAttempt","authToken"],["authAttempt","host"],function(t,e){return{authToken:t,host:e}}],s=["authCurrent","authToken"],c=[s,["authCurrent","host"],function(t,e){return{authToken:t,host:e}}],f=[r,["authAttempt","authToken"],["authCurrent","authToken"],function(t,e,n){return t?e:n}],l=[r,a,c,function(t,e,n){return t?e:n}]},function(t,e,n){"use strict";function r(t,e){var r=e.authToken,i=e.host;return n.i(u.toImmutable)({authToken:r,host:i,isValidating:!0,isInvalid:!1,errorMessage:""})}function i(){return c.getInitialState()}function o(t,e){var n=e.errorMessage;return t.withMutations(function(t){return t.set("isValidating",!1).set("isInvalid",!0).set("errorMessage",n)})}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};n.d(a,"a",a);var s=n(10),c=new u.Store({getInitialState:function(){return n.i(u.toImmutable)({isValidating:!1,authToken:!1,host:null,isInvalid:!1,errorMessage:""})},initialize:function(){this.on(s.a.VALIDATING_AUTH_TOKEN,r),this.on(s.a.VALID_AUTH_TOKEN,i),this.on(s.a.INVALID_AUTH_TOKEN,o)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var r=e.authToken,i=e.host;return n.i(o.toImmutable)({authToken:r,host:i})}function i(){return s.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};n.d(u,"a",u);var a=n(10),s=new o.Store({getInitialState:function(){return n.i(o.toImmutable)({authToken:null,host:""})},initialize:function(){this.on(a.a.VALID_AUTH_TOKEN,r),this.on(a.a.LOG_OUT,i)}});e.a=s},function(t,e,n){"use strict";function r(t,e){var n=e.rememberAuth;return n}var i=n(1),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};n.d(o,"a",o);var u=n(10),a=new i.Store({getInitialState:function(){return!0},initialize:function(){this.on(u.a.VALID_AUTH_TOKEN,r)}});e.a=a},function(t,e,n){"use strict";function r(t,e){t.dispatch(a.a.SERVER_CONFIG_LOADED,e)}function i(t){n.i(u.a)(t,"GET","config").then(function(e){return r(t,e)})}function o(t,e){t.dispatch(a.a.COMPONENT_LOADED,{component:e})}var u=n(3),a=n(15);e.configLoaded=r,e.fetchAll=i,e.componentLoaded=o},function(t,e,n){"use strict";function r(t){return[["serverComponent"],function(e){return e.contains(t)}]}n.d(e,"locationGPS",function(){return i}),n.d(e,"locationName",function(){return o}),n.d(e,"serverVersion",function(){return u}),e.isComponentLoaded=r;var i=[["serverConfig","latitude"],["serverConfig","longitude"],function(t,e){return{latitude:t,longitude:e}}],o=["serverConfig","location_name"],u=["serverConfig","serverVersion"]},function(t,e,n){"use strict";function r(t,e){var n=e.component;return t.push(n)}function i(t,e){var r=e.components;return n.i(u.toImmutable)(r)}function o(){return c.getInitialState()}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};n.d(a,"a",a);var s=n(15),c=new u.Store({getInitialState:function(){return n.i(u.toImmutable)([])},initialize:function(){this.on(s.a.COMPONENT_LOADED,r),this.on(s.a.SERVER_CONFIG_LOADED,i),this.on(s.a.LOG_OUT,o)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var r=e.latitude,i=e.longitude,u=e.location_name,a=e.temperature_unit,s=e.time_zone,c=e.version;return n.i(o.toImmutable)({latitude:r,longitude:i,location_name:u,temperature_unit:a,time_zone:s,serverVersion:c})}function i(){return s.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};n.d(u,"a",u);var a=n(15),s=new o.Store({getInitialState:function(){return n.i(o.toImmutable)({latitude:null,longitude:null,location_name:"Home",temperature_unit:"°C",time_zone:"UTC",serverVersion:"unknown"})},initialize:function(){this.on(a.a.SERVER_CONFIG_LOADED,r),this.on(a.a.LOG_OUT,i)}});e.a=s},function(t,e,n){"use strict";var r=n(69),i=n(70),o=n(72),u=n(29);e["default"]={config:r.a,events:i.a,services:o.a,states:u.a}},function(t,e,n){"use strict";e.a={components:["configurator","http","api","frontend","history","conversation","logbook","introduction"],latitude:32.87336,location_name:"Home",longitude:-117.22743,temperature_unit:"°F",time_zone:"America/Los_Angeles",version:"0.9"}},function(t,e,n){"use strict";e.a=[{event:"call_service",listener_count:1},{event:"time_changed",listener_count:1},{event:"state_changed",listener_count:3},{event:"homeassistant_stop",listener_count:2}]},function(t,e,n){"use strict";e["default"]=[{domain:"sun",entity_id:"sun.sun",message:"has risen",name:"sun",when:"2015-04-24T06:08:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.paulus",message:"left home",name:"Paulus",when:"2015-04-24T08:54:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.anne_therese",message:"left home",name:"Anne Therese",when:"2015-04-24T09:08:47.000Z"},{domain:"group",entity_id:"group.all_devices",message:"left home",name:"All devices",when:"2015-04-24T09:08:47.000Z"},{domain:"thermostat",entity_id:"thermostat.nest",message:"changed to 17 °C",name:"Nest",when:"2015-04-24T09:08:47.000Z"},{domain:"thermostat",entity_id:"thermostat.nest",message:"changed to 21 °C",name:"Nest",when:"2015-04-24T16:00:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.anne_therese",message:"came home",name:"Anne Therese",when:"2015-04-24T16:24:47.000Z"},{domain:"group",entity_id:"group.all_devices",message:"came home",name:"All devices",when:"2015-04-24T16:24:47.000Z"},{domain:"light",entity_id:"light.bowl",message:"turned on",name:"Bowl",when:"2015-04-24T18:01:47.000Z"},{domain:"light",entity_id:"light.ceiling",message:"turned on",name:"Ceiling",when:"2015-04-24T18:16:47.000Z"},{domain:"light",entity_id:"light.tv_back_light",message:"turned on",name:"TV Back Light",when:"2015-04-24T18:31:47.000Z"},{domain:"sun",entity_id:"sun.sun",message:"has set",name:"sun",when:"2015-04-24T18:46:47.000Z"},{domain:"media_player",entity_id:"media_player.living_room",message:"changed to Plex",name:"Media Player",when:"2015-04-24T19:12:47.000Z"}]},function(t,e,n){"use strict";e.a=[{domain:"homeassistant",services:{stop:{description:"",fields:{}},turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"light",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"switch",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"input_boolean",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"configurator",services:{configure:{description:"",fields:{}}}}]},function(t,e,n){"use strict";function r(t){var e=new Date(Date.now()-60*t*1e3);return e.toISOString()}function i(t){return Math.random()*t-t/2}function o(t,e){s[t.entity_id]=!0;var n=void 0;n="string"==typeof e[0]?e.map(function(t){return{state:t}}):e;var o=900/n.length;c.push(n.map(function(e,n){var u=void 0;u=e.attributes||t.attributes?e.attributes?t.attributes?a()({},t.attributes,e.attributes):e.attributes:t.attributes:{};var s=r(0===n?f:f-n*o+i(o));return{attributes:u,entity_id:t.entity_id,state:e.state||t.state,last_changed:s,last_updated:s}}))}var u=n(28),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};n.d(a,"a",a);var s=(n(29),{"a.demo_mode":!0,"configurator.philips_hue":!0,"group.default_view":!0,"group.rooms_view":!0,"group.rooms":!0,"zone.school":!0,"zone.work":!0,"zone.home":!0,"group.general":!0,"camera.roundabout":!0,"script.water_lawn":!0,"scene.romantic":!0,"scene.good_morning":!0,"group.cooking":!0}),c=[],f=1440;o({entity_id:"sensor.humidity",attributes:{unit_of_measurement:"%"}},["45","49","52","49","52","49","45","42"]),o({entity_id:"sensor.temperature",attributes:{unit_of_measurement:"°C"}},["23","27","25","23","24"]),o({entity_id:"thermostat.nest",attributes:{unit_of_measurement:"°C"}},[{state:"23",attributes:{current_temperature:20,temperature:23}},{state:"23",attributes:{current_temperature:22,temperature:23}},{state:"20",attributes:{current_temperature:21,temperature:20}},{state:"20",attributes:{current_temperature:20,temperature:20}},{state:"20",attributes:{current_temperature:19,temperature:20}}]),o({entity_id:"media_player.living_room",attributes:{friendly_name:"Chromecast"}},["Plex","idle","YouTube","Netflix","idle","Plex"]),o({entity_id:"group.all_devices"},["home","not_home","home"]),o({entity_id:"device_tracker.paulus"},["home","not_home","work","not_home"]),o({entity_id:"device_tracker.anne_therese"},["home","not_home","home","not_home","school"]),o({entity_id:"garage_door.garage_door"},["open","closed","open"]),o({entity_id:"alarm_control_panel.home"},["disarmed","pending","armed_home","pending","disarmed","pending","armed_home"]),o({entity_id:"lock.kitchen_door"},["unlocked","locked","unlocked","locked"]),o({entity_id:"light.tv_back_light"},["on","off","on","off"]),o({entity_id:"light.ceiling"},["on","off","on"]),o({entity_id:"light.table_lamp"},["on","off","on"]),o({entity_id:"switch.ac"},["on","off","on"]),o({entity_id:"group.bedroom"},["on","off","on","off"]),o({entity_id:"group.living_room"},["on","off","on"]),o({entity_id:"switch.decorative_lights"},["on","off","on","off"]),o({entity_id:"light.bed_light"},["on","off","on","off"]),o({entity_id:"rollershutter.bedroom_window"},["open","closed","open","closed"]),o({entity_id:"input_select.cook_today"},["Anne Therese","Paulus"]),o({entity_id:"input_boolean.notify_cook"},["off","on"]);e["default"]=c},function(t,e,n){"use strict";function r(t,e){t.dispatch(s.a.ENTITY_HISTORY_DATE_SELECTED,{date:e})}function i(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];t.dispatch(s.a.RECENT_ENTITY_HISTORY_FETCH_START,{});var r="history/period";return null!==e&&(r+="?filter_entity_id="+e),n.i(a.a)(t,"GET",r).then(function(e){return t.dispatch(s.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,{stateHistory:e})},function(){return t.dispatch(s.a.RECENT_ENTITY_HISTORY_FETCH_ERROR,{})})}function o(t,e){return t.dispatch(s.a.ENTITY_HISTORY_FETCH_START,{date:e}),n.i(a.a)(t,"GET","history/period/"+e).then(function(n){return t.dispatch(s.a.ENTITY_HISTORY_FETCH_SUCCESS,{date:e,stateHistory:n})},function(){return t.dispatch(s.a.ENTITY_HISTORY_FETCH_ERROR,{})})}function u(t){var e=t.evaluate(c.currentDate);return o(t,e)}var a=n(3),s=n(7),c=n(30);e.changeCurrentDate=r,e.fetchRecent=i,e.fetchDate=o,e.fetchSelectedDate=u},function(t,e,n){"use strict";function r(t,e){var r=e.date;return n.i(a.a)(r)}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};n.d(u,"a",u);var a=n(24),s=n(7),c=new o.Store({getInitialState:function(){var t=new Date;return t.setDate(t.getUTCDate()-1),n.i(a.a)(t)},initialize:function(){this.on(s.a.ENTITY_HISTORY_DATE_SELECTED,r),this.on(s.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var r=e.date,i=e.stateHistory;return 0===i.length?t.set(r,n.i(o.toImmutable)({})):t.withMutations(function(t){i.forEach(function(e){return t.setIn([r,e[0].entity_id],n.i(o.toImmutable)(e.map(s.a.fromJSON)))})})}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};n.d(u,"a",u);var a=n(7),s=n(12),c=new o.Store({getInitialState:function(){return n.i(o.toImmutable)({})},initialize:function(){this.on(a.a.ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(a.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";var r=n(1),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};n.d(i,"a",i);var o=n(7),u=new r.Store({getInitialState:function(){return!1},initialize:function(){this.on(o.a.ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(o.a.ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(o.a.ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(o.a.LOG_OUT,function(){return!1})}});e.a=u},function(t,e,n){"use strict";function r(t,e){var r=e.stateHistory;return t.withMutations(function(t){r.forEach(function(e){return t.set(e[0].entity_id,n.i(o.toImmutable)(e.map(s.a.fromJSON)))})})}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};n.d(u,"a",u);var a=n(7),s=n(12),c=new o.Store({getInitialState:function(){return n.i(o.toImmutable)({})},initialize:function(){this.on(a.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(a.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.stateHistory,r=(new Date).getTime();return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,r)}),history.length>1&&t.set(s,r)})}function i(){return c.getInitialState()}var o=n(1),u=o&&o.__esModule?function(){return o["default"]}:function(){return o};n.d(u,"a",u);var a=n(7),s="ALL_ENTRY_FETCH",c=new o.Store({getInitialState:function(){return n.i(o.toImmutable)({})},initialize:function(){this.on(a.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(a.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";var r=n(6),i=n(12),o=n.i(r.createApiActions)(i.a);e.a=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;nu}var i=n(1),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};n.d(o,"a",o),n.d(e,"currentDate",function(){return a}),n.d(e,"isCurrentStale",function(){return s}),n.d(e,"currentEntries",function(){return c}),n.d(e,"isLoadingEntries",function(){return f});var u=6e4,a=["currentLogbookDate"],s=[a,["logbookEntriesUpdated"],function(t,e){return r(e.get(t))}],c=[a,["logbookEntries"],function(t,e){return e.get(t)||n.i(i.toImmutable)([])}],f=["isLoadingLogbookEntries"]},function(t,e,n){"use strict";function r(t){t.registerStores({currentLogbookDate:i.a,isLoadingLogbookEntries:o.a,logbookEntries:u.a,logbookEntriesUpdated:a.a})}var i=n(91),o=n(92),u=n(93),a=n(94),s=n(87),c=n(88);e.register=r,n.d(e,"actions",function(){return f}),n.d(e,"getters",function(){return l});var f=s,l=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(1),a=u&&u.__esModule?function(){return u["default"]}:function(){return u};n.d(a,"a",a);var s=n(25),c=function(){function t(t,e){for(var n=0;n \ No newline at end of file + clear: both;white-space:pre-wrap} \ No newline at end of file diff --git a/source/demo/index.html b/source/demo/index.html index cdac510057f..093351d1ce3 100644 --- a/source/demo/index.html +++ b/source/demo/index.html @@ -31,7 +31,7 @@ left: 0; right: 0; bottom: 0; - margin-bottom: 97px; + margin-bottom: 83px; font-family: Roboto, sans-serif; font-size: 0pt; transition: font-size 2s; diff --git a/source/demo/manifest.json b/source/demo/manifest.json index 4454a923df9..e4dfb6f3312 100644 --- a/source/demo/manifest.json +++ b/source/demo/manifest.json @@ -7,8 +7,7 @@ { "src": "\/static\/favicon-192x192.png", "sizes": "192x192", - "type": "image\/png", - "density": "4.0" + "type": "image\/png" } ] } diff --git a/source/getting-started/automation-templating.markdown b/source/getting-started/automation-templating.markdown index e80b973d3ce..f365047fd85 100644 --- a/source/getting-started/automation-templating.markdown +++ b/source/getting-started/automation-templating.markdown @@ -32,7 +32,7 @@ automation 2: topic: /notify/+ action: service_template: >{% raw %} - notify.{{ trigger.topic.split('/')[-1] }} + notify.{{ trigger.topic.split('/')[-1] }}{% endraw %} data_template: message: {% raw %}{{ trigger.payload }}{% endraw %} ``` diff --git a/source/getting-started/index.markdown b/source/getting-started/index.markdown index b48d8943d37..320dd88be9f 100644 --- a/source/getting-started/index.markdown +++ b/source/getting-started/index.markdown @@ -31,6 +31,10 @@ If you prefer to watch a video tutorial, [tktino](https://github.com/tktino) has - [Mac OS X](https://www.youtube.com/watch?v=hej6ipN86ls) - [Ubuntu 14.04](https://www.youtube.com/watch?v=SXaAG1lGNH0) +### {% linkable_title Updating %} + +To update Home Assistant to the latest release check the [Updating section](/getting-started/updating/). + ### {% linkable_title Troubleshooting %} If you run into any issues, please see [the troubleshooting page](/getting-started/troubleshooting/). It contains solutions to many of the common encountered issues. diff --git a/source/getting-started/installation-vagrant.markdown b/source/getting-started/installation-vagrant.markdown new file mode 100644 index 00000000000..6f965b0d3c3 --- /dev/null +++ b/source/getting-started/installation-vagrant.markdown @@ -0,0 +1,92 @@ +--- +layout: page +title: "Installation on Vagrant" +description: "Instructions to run Home Assistant on a Vagrant VM." +date: 2016-05-28 10:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +A `Vagrantfile` is avalable into `virtualization/vagrant` folder for quickly spinning up a Linux virtual machine running Home Assistant. This can be beneficial for those who want to experiment with Home Assistant and/or developers willing to easily test local changes and run test suite against them. + +

      +Vagrant is intended for testing/development only. It is NOT recommended for permanent installations. +

      + +## Install Vagrant + +You must have [Vagrant](https://www.vagrantup.com/downloads.html) and [Virtualbox](https://www.virtualbox.org/wiki/Downloads) installed on your workstation. + +## Get Home Assistant source code + +Download the home-assistant source code by either downloading the .zip file from [GitHub releases page](https://github.com/home-assistant/home-assistant/releases), or by using [Git](https://git-scm.com/) + +```bash +git clone https://github.com/home-assistant/home-assistant.git +cd home-assistant/virtualization/vagrant +``` + +

      +The following instructions will assume you changed your working directory to be home-assistant/virtualization/vagrant. This is mandatory because Vagrant will look for informations about the running VM inside that folder and won't work otherwise +

      + +## Create the Vagrant VM and start Home Assistant + +```bash +vagrant up +``` + +This will download + start a virtual machine using Virtualbox, which will internally setup the development environment necessary to start Home Assistant process and run test suite as well. After the VM has started succesfully, Home Assistant frontend will be accessible locally from your browser at [http://localhost:8123](http://localhost:8123) + +## Stopping Vagrant + +To shutdown the Vagrant host: + +```bash +vagrant halt +``` + +To start it again, just run `vagrant up` + +## Restarting Home Assistant process to test changes + +The root `home-assistant` directory on your workstation will be mirrored with `/home-assistant` inside the VM. In `virtualization/vagrant` there's also a `config` folder that you can use to drop configuration files ([here](https://home-assistant.io/getting-started/configuration/) you can find more information on how to configure HASS). + +Any changes made to the local directory on your workstation will be available from the Vagrant host, so to apply your changes to the HASS process, just restart it: + +```bash +touch restart ; vagrant provision +``` + +## Run test suite (Tox) + +To run tests against your changes: + +```bash +touch run_tests ; vagrant provision +``` + +## Cleanup + +To completely remove the VM: + +```bash +rm setup_done ; vagrant destroy -f +``` + +You can now recreate a completely new Vagrant host with `vagrant up` + + +### {% linkable_title Troubleshooting %} + +If you run into any issues, please see [the troubleshooting page](/getting-started/troubleshooting/). It contains solutions to many of the more commonly encountered issues. + +In addition to this site, check out these sources for additional help: + + - [Forum](https://community.home-assistant.io) for Home Assistant discussions and questions. + - [Gitter Chat Room](https://gitter.im/home-assistant/home-assistant) for real-time chat about Home Assistant. + - [GitHub Page](https://github.com/home-assistant/home-assistant/issues) for issue reporting. + +### [Next step: Configuring Home Assistant »](/getting-started/configuration/) \ No newline at end of file diff --git a/source/getting-started/scripts-service-calls.markdown b/source/getting-started/scripts-service-calls.markdown index 1090dc741ed..2f9e4b07a10 100644 --- a/source/getting-started/scripts-service-calls.markdown +++ b/source/getting-started/scripts-service-calls.markdown @@ -54,6 +54,17 @@ service_template: > entity_id: switch.ac ``` +### {% linkable_title Using the Services Developer Tool %} + +You can use the Services Developer Tool to test data to pass in a service call. +For example, you may test turning on or off a 'group' (See [groups] for more info) + +To turn a group on or off, pass the following info: +Domain: `homeassistant` +Service: `turn_on` +Service Data: `{ "entity_id": "group.kitchen" }` + + ### {% linkable_title Use templates to determine the attributes %} Templates can also be used for the data that you pass to the service call. diff --git a/source/getting-started/troubleshooting.markdown b/source/getting-started/troubleshooting.markdown index eda34e41dfc..f5d2b7c6d7c 100644 --- a/source/getting-started/troubleshooting.markdown +++ b/source/getting-started/troubleshooting.markdown @@ -69,11 +69,4 @@ Android Chrome chrome -> settings -> site settings -> storage -> search for your URL for home assistant-> "clear & reset" -#### {% linkable_title Run the development version %} -If you want to stay on top of the development of Home Assistant then you can upgrade to the `dev` branch. This can result in an unstable system, loss of data, etc. etc. - -```bash -$ pip3 install --upgrade git+git://github.com/balloob/home-assistant.git@dev -``` - ### [« Back to Getting Started](/getting-started/) diff --git a/source/getting-started/updating.markdown b/source/getting-started/updating.markdown index 649b6fe3539..b726cf6bbb7 100644 --- a/source/getting-started/updating.markdown +++ b/source/getting-started/updating.markdown @@ -18,3 +18,18 @@ $ pip3 install --upgrade homeassistant After updating, restart Home Assistant for the changes to take effect. This means that you have to restart `hass` itself or the [autostarting](/getting-started/autostart/) daemon if you use any. + +

      + The upgrade needs to be run as the same user as the installation was done to avoid permission errors. +

      + +#### {% linkable_title Run the development version %} +If you want to stay on top of the development of Home Assistant then you can upgrade to the `dev` branch. + +

      + This can result in an unstable system, loss of data, etc. etc. +

      + +```bash +$ pip3 install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev +``` diff --git a/source/getting-started/z-wave-controllers.markdown b/source/getting-started/z-wave-controllers.markdown new file mode 100644 index 00000000000..44d5495b3d5 --- /dev/null +++ b/source/getting-started/z-wave-controllers.markdown @@ -0,0 +1,31 @@ +--- +layout: page +title: "Z-Wave USB Controllers" +description: "Extended instructions how to setup Z-Wave." +date: 2016-03-24 08:49 -0700 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Z-Wave is a popular home automation protocol that is not always straightforward to setup. This page will try to help you make sense of it all. + +

      +Upon first run, the z-wave component will take time to initialize entities and entities may appear with incomplete names. Running a network heal may expidite this proccess. +

      + +## {% linkable_title Supported Z-Wave Sticks %} + +| Device | Works on Linux | Works on Windows | Works on OSX | +|-------------------------|----------------|------------------|--------------| +| Aeotec Z-Stick Series 2 | ✓ | | | +| Aeotec Z-Stick Series 5 | ✓ | | | +| Razberry GPIO Module | ✓ | | | + + +## {% linkable_title Stick Alternatives %} + +The alternative to a stick is a hub that supports Z-Wave. Home Assistant supports the following hubs with Z-Wave support: + + - [Vera](/components/vera/) diff --git a/source/getting-started/z-wave-device-specific.markdown b/source/getting-started/z-wave-device-specific.markdown new file mode 100644 index 00000000000..df0d7363c00 --- /dev/null +++ b/source/getting-started/z-wave-device-specific.markdown @@ -0,0 +1,84 @@ +--- +layout: page +title: "Z-Wave Device Specific Settings" +description: "Extended instructions how to setup Z-Wave." +date: 2016-03-24 08:49 -0700 +sidebar: true +comments: false +sharing: true +footer: true +--- + +##### {% linkable_title Aeon Minimote %} + +Here's a handy configuration for the Aeon Labs Minimote that defines all possible button presses. Put it into `automation.yaml`. + +```yaml +- alias: Minimote Button 1 Pressed + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 1 + +- alias: Minimote Button 1 Held + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 2 + +- alias: Minimote Button 2 Pressed + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 3 + +- alias: Minimote Button 2 Held + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 4 + +- alias: Minimote Button 3 Pressed + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 5 + +- alias: Minimote Button 3 Held + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 6 + +- alias: Minimote Button 4 Pressed + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 7 + +- alias: Minimote Button 4 Held + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: aeon_labs_minimote_1 + scene_id: 8 +``` + +##### {% linkable_title Aeotec MultiSensor 6 %} + +In order for Home Assistant to recognize well the motion sensor, you will need to change its configuration from `Basic Set (default)` to `Binary Sensor report`. Currently there's no way to do this in Home Assistant but you can use ozwcp (OpenZWave control panel), Domoticz or similar to do it diff --git a/source/getting-started/z-wave-settings.markdown b/source/getting-started/z-wave-settings.markdown new file mode 100644 index 00000000000..ff23871c919 --- /dev/null +++ b/source/getting-started/z-wave-settings.markdown @@ -0,0 +1,14 @@ +--- +layout: page +title: "Z-Wave Settings" +description: "Extended instructions how to setup Z-Wave." +date: 2016-03-24 08:49 -0700 +sidebar: true +comments: false +sharing: true +footer: true +--- + +You may wish to modify the zwave settings ozw*.xml file in your .homeassistant root folder, or certain situations/devices may require it (i.e. Aeon Multisensor 6). To do this, utilize [Open-Zwave Control Panel](https://github.com/OpenZWave/open-zwave-control-panel). Alternatively, use [Domoticz](https://www.domoticz.com/), which incorporates the Open-Zwave Control Panel project into an easy to use Raspberry Pi image. + +The reasoning for using these tools is that your Zwave controller stores the values and data that are used to control the network. The XML file in the .homeassistant folder acts as a settings/values cache for the zwave network, so modifying it directly won't change the network values. The Open-Zwave Control Panel writes values directly to the network, and will provide you with an updated .xml file to overwrite in your .homeassistant folder. This is the most foolproof way to make modifications to your zwave devices. diff --git a/source/getting-started/z-wave.markdown b/source/getting-started/z-wave.markdown new file mode 100644 index 00000000000..c188aa3b11f --- /dev/null +++ b/source/getting-started/z-wave.markdown @@ -0,0 +1,142 @@ +--- +layout: page +title: "Z-Wave" +description: "Instructions how to integrate your existing Z-Wave within Home Assistant." +date: 2016-02-27 19:59 +sidebar: true +comments: false +sharing: true +footer: true +--- + +[Z-Wave](http://www.z-wave.com/) integration for Home Assistant allows you to observe and control connected Z-Wave devices. Z-Wave support requires a [supported Z-Wave USB stick](https://github.com/OpenZWave/open-zwave/wiki/Controller-Compatibility-List) to be plugged into the host. + +There is currently support for switches, lights and sensors. All will be picked up automatically after configuring this platform. + +### {% linkable_title Installation %} + +To allow Home Assistant to talk to your Z-Wave USB stick you will have to compile the OpenZWave library and install the related [python-OpenZWave package](https://github.com/OpenZWave/python-openzwave). This can be done as follows. _(Note: The Home Assistant docker image has support for Z-Wave built-in)_ + +Make sure you have the correct dependencies installed before running the script: + +```bash +$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools +``` + +Make sure you have at least version 0.23 of cython. + +```bash +$ sudo pip3 install --upgrade cython +``` + +Then get the OpenZWave files and switch to the `python3` branch: +

      Do not use root to build python-openzwave as it will surely fail.

      +```bash +$ git clone https://github.com/OpenZWave/python-openzwave.git +$ cd python-openzwave +$ git checkout python3 +$ PYTHON_EXEC=$(which python3) make build +$ sudo PYTHON_EXEC=$(which python3) make install +``` +

      +Instead of `make install`, you can alternatively build your own python-openzwave package which can be easily uninstalled: + +```$ sudo PYTHON_EXEC=$(which python3) checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave``` + +

      + +With this installation, your `config_path` needed below will resemble: + +```bash +/usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config +``` + + +### {% linkable_title Configuration %} + +```yaml +# Example configuration.yaml entry +zwave: + usb_path: /dev/ttyUSB0 + config_path: /usr/local/share/python-openzwave/config + polling_interval: 60000 + customize: + sensor.greenwave_powernode_6_port_energy_10: + polling_intensity: 1 +``` + +Configuration variables: + +- **usb_path** (*Required*): The port where your device is connected to your Home Assistant host. +- **config_path** (*Optional*): The path to the Python Open Z-Wave configuration files. +- **autoheal** (*Optional*): Allows disabling auto ZWave heal at midnight. Defaults to True. +- **polling_interval** (*Optional*): The time period in milliseconds between polls of a nodes value. Be careful about using polling values below 30000 (30 seconds) as polling can flood the zwave network and cause problems. +- **customize** (*Optional*): This attribute contains node-specific override values: + - **polling_intensity** (*Optional*): Enables polling of a value and sets the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc). If not specified then your device will not be polled. + +To find the path of your Z-Wave stick, run: + +```bash +$ ls /dev/ttyUSB* +``` + +Or, on some other systems (such as Raspberry Pi), use: + +```bash +$ ls /dev/ttyACM* +``` + +

      +Depending on what's plugged into your USB ports, the name found above may change. You can lock in a name, such as `/dev/zwave`, by following [these instructions](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/). +

      + +#### {% linkable_title Events %} + +Some devices can also trigger scene activation events, which can be used in automation scripts (for example the press of a button on a wall switch): + +```yaml +# Example configuration.yaml automation entry +automation: + - alias: Turn on Desk light + trigger: + platform: event + event_type: zwave.scene_activated + event_data: + entity_id: zwaveme_zme_wallcs_secure_wall_controller_8 + scene_id: 11 +``` + +The *entity_id* and *scene_id* of all triggered events can be seen in the console output. + +#### {% linkable_title Services %} + +The Z-Wave component exposes four services to help maintain the network. + +| Service | Description | +| ------- | ----------- | +| add_node | Put the zwave controller in inclusion mode. Allows one to add a new device to the zwave network.| +| remove_node | Put the zwave controller in exclusion mode. Allows one to remove a device from the zwave network.| +| heal_network | Tells the controller to "heal" the network. Bascially asks the nodes to tell the controller all of their neighbors so the controller can refigure out optimal routing. | +| soft_reset | Tells the controller to do a "soft reset". This is not supposed to lose any data, but different controllers can behave differently to a "soft reset" command.| +| test_network | Tells the controller to send no-op commands to each node and measure the time for a response. In theory, this can also bring back nodes which have been marked "presumed dead".| + +The soft_reset and heal_network commands can be used as part of an automation script +to help keep a zwave network running relliably. For example: + +```yaml +# Example configuration.yaml automation entry +automation: + - alias: soft reset at 2:30am + trigger: + platform: time + after: '2:30:00' + action: + service: zwave.soft_reset + + - alias: heal at 2:31am + trigger: + platform: time + after: '2:31:00' + action: + service: zwave.heal_network +``` diff --git a/source/images/supported_brands/lirc.gif b/source/images/supported_brands/lirc.gif new file mode 100644 index 00000000000..ada4c1578e2 Binary files /dev/null and b/source/images/supported_brands/lirc.gif differ diff --git a/source/index.html b/source/index.html index 4f314154770..112f12eea78 100644 --- a/source/index.html +++ b/source/index.html @@ -12,6 +12,28 @@ hide_github_edit: true ---
      +
      + +
      +
      +

      Latest blog items

      + + {% for post in site.posts limit: 3 %} +
    • + {{ post.title }} + {{ post.date_formatted }} +
    • + {% endfor %} +
      +
      +
      +