diff --git a/src/conversejs/converse.css b/src/conversejs/converse.css
new file mode 100644
index 0000000000000000000000000000000000000000..1132354d18122eb98410b60e2ffcdd402040c72d
--- /dev/null
+++ b/src/conversejs/converse.css
@@ -0,0 +1,18816 @@
+@charset "UTF-8";
+
+/*!
+ * Converse.js (Web-based XMPP instant messaging client)
+ * https://conversejs.org
+ *
+ * Copyright (c) 2013-2018, JC Brand <jc@opkode.com>
+ * Licensed under the Mozilla Public License
+ */
+
+#conversejs :root {
+    --blue: #007bff;
+    --indigo: #6610f2;
+    --purple: #6f42c1;
+    --pink: #e83e8c;
+    --red: #dc3545;
+    --orange: #fd7e14;
+    --yellow: #ffc107;
+    --green: #28a745;
+    --teal: #20c997;
+    --cyan: #17a2b8;
+    --white: #fff;
+    --gray: #6c757d;
+    --gray-dark: #343a40;
+    --primary: #007bff;
+    --secondary: #6c757d;
+    --success: #28a745;
+    --info: #17a2b8;
+    --warning: #ffc107;
+    --danger: #dc3545;
+    --light: #f8f9fa;
+    --dark: #343a40;
+    --breakpoint-xs: 0;
+    --breakpoint-sm: 576px;
+    --breakpoint-md: 768px;
+    --breakpoint-lg: 992px;
+    --breakpoint-xl: 1200px;
+    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
+}
+
+#conversejs *,
+#conversejs ::after,
+#conversejs ::before {
+    box-sizing: border-box
+}
+
+#conversejs html {
+    font-family: sans-serif;
+    line-height: 1.15;
+    -webkit-text-size-adjust: 100%;
+    -webkit-tap-highlight-color: transparent
+}
+
+#conversejs article,
+#conversejs aside,
+#conversejs figcaption,
+#conversejs figure,
+#conversejs footer,
+#conversejs header,
+#conversejs hgroup,
+#conversejs main,
+#conversejs nav,
+#conversejs section {
+    display: block
+}
+
+#conversejs body {
+    margin: 0;
+    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+    font-size: 1rem;
+    font-weight: 400;
+    line-height: 1.5;
+    color: #212529;
+    text-align: left;
+    background-color: #fff
+}
+
+#conversejs [tabindex="-1"]:focus {
+    outline: 0!important
+}
+
+#conversejs hr {
+    box-sizing: content-box;
+    height: 0;
+    overflow: visible
+}
+
+#conversejs h1,
+#conversejs h2,
+#conversejs h3,
+#conversejs h4,
+#conversejs h5,
+#conversejs h6 {
+    margin-top: 0;
+    margin-bottom: .5rem
+}
+
+#conversejs p {
+    margin-top: 0;
+    margin-bottom: 1rem
+}
+
+#conversejs abbr[data-original-title],
+#conversejs abbr[title] {
+    text-decoration: underline;
+    -webkit-text-decoration: underline dotted;
+    text-decoration: underline dotted;
+    cursor: help;
+    border-bottom: 0;
+    -webkit-text-decoration-skip-ink: none;
+    text-decoration-skip-ink: none
+}
+
+#conversejs address {
+    margin-bottom: 1rem;
+    font-style: normal;
+    line-height: inherit
+}
+
+#conversejs dl,
+#conversejs ol,
+#conversejs ul {
+    margin-top: 0;
+    margin-bottom: 1rem
+}
+
+#conversejs ol ol,
+#conversejs ol ul,
+#conversejs ul ol,
+#conversejs ul ul {
+    margin-bottom: 0
+}
+
+#conversejs dt {
+    font-weight: 700
+}
+
+#conversejs dd {
+    margin-bottom: .5rem;
+    margin-left: 0
+}
+
+#conversejs blockquote {
+    margin: 0 0 1rem
+}
+
+#conversejs b,
+#conversejs strong {
+    font-weight: bolder
+}
+
+#conversejs small {
+    font-size: 80%
+}
+
+#conversejs sub,
+#conversejs sup {
+    position: relative;
+    font-size: 75%;
+    line-height: 0;
+    vertical-align: baseline
+}
+
+#conversejs sub {
+    bottom: -.25em
+}
+
+#conversejs sup {
+    top: -.5em
+}
+
+#conversejs a {
+    color: #007bff;
+    text-decoration: none;
+    background-color: transparent
+}
+
+#conversejs a:hover {
+    color: #0056b3;
+    text-decoration: underline
+}
+
+#conversejs a:not([href]):not([tabindex]) {
+    color: inherit;
+    text-decoration: none
+}
+
+#conversejs a:not([href]):not([tabindex]):focus,
+#conversejs a:not([href]):not([tabindex]):hover {
+    color: inherit;
+    text-decoration: none
+}
+
+#conversejs a:not([href]):not([tabindex]):focus {
+    outline: 0
+}
+
+#conversejs code,
+#conversejs kbd,
+#conversejs pre,
+#conversejs samp {
+    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+    font-size: 1em
+}
+
+#conversejs pre {
+    margin-top: 0;
+    margin-bottom: 1rem;
+    overflow: auto
+}
+
+#conversejs figure {
+    margin: 0 0 1rem
+}
+
+#conversejs img {
+    vertical-align: middle;
+    border-style: none
+}
+
+#conversejs svg {
+    overflow: hidden;
+    vertical-align: middle
+}
+
+#conversejs table {
+    border-collapse: collapse
+}
+
+#conversejs caption {
+    padding-top: .75rem;
+    padding-bottom: .75rem;
+    color: #6c757d;
+    text-align: left;
+    caption-side: bottom
+}
+
+#conversejs th {
+    text-align: inherit
+}
+
+#conversejs label {
+    display: inline-block;
+    margin-bottom: .5rem
+}
+
+#conversejs button {
+    border-radius: 0
+}
+
+#conversejs button:focus {
+    outline: 1px dotted;
+    outline: 5px auto -webkit-focus-ring-color
+}
+
+#conversejs button,
+#conversejs input,
+#conversejs optgroup,
+#conversejs select,
+#conversejs textarea {
+    margin: 0;
+    font-family: inherit;
+    font-size: inherit;
+    line-height: inherit
+}
+
+#conversejs button,
+#conversejs input {
+    overflow: visible
+}
+
+#conversejs button,
+#conversejs select {
+    text-transform: none
+}
+
+#conversejs select {
+    word-wrap: normal
+}
+
+#conversejs [type=button],
+#conversejs [type=reset],
+#conversejs [type=submit],
+#conversejs button {
+    -webkit-appearance: button
+}
+
+#conversejs [type=button]:not(:disabled),
+#conversejs [type=reset]:not(:disabled),
+#conversejs [type=submit]:not(:disabled),
+#conversejs button:not(:disabled) {
+    cursor: pointer
+}
+
+#conversejs [type=button]::-moz-focus-inner,
+#conversejs [type=reset]::-moz-focus-inner,
+#conversejs [type=submit]::-moz-focus-inner,
+#conversejs button::-moz-focus-inner {
+    padding: 0;
+    border-style: none
+}
+
+#conversejs input[type=checkbox],
+#conversejs input[type=radio] {
+    box-sizing: border-box;
+    padding: 0
+}
+
+#conversejs input[type=date],
+#conversejs input[type=datetime-local],
+#conversejs input[type=month],
+#conversejs input[type=time] {
+    -webkit-appearance: listbox
+}
+
+#conversejs textarea {
+    overflow: auto;
+    resize: vertical
+}
+
+#conversejs fieldset {
+    min-width: 0;
+    padding: 0;
+    margin: 0;
+    border: 0
+}
+
+#conversejs legend {
+    display: block;
+    width: 100%;
+    max-width: 100%;
+    padding: 0;
+    margin-bottom: .5rem;
+    font-size: 1.5rem;
+    line-height: inherit;
+    color: inherit;
+    white-space: normal
+}
+
+#conversejs progress {
+    vertical-align: baseline
+}
+
+#conversejs [type=number]::-webkit-inner-spin-button,
+#conversejs [type=number]::-webkit-outer-spin-button {
+    height: auto
+}
+
+#conversejs [type=search] {
+    outline-offset: -2px;
+    -webkit-appearance: none
+}
+
+#conversejs [type=search]::-webkit-search-decoration {
+    -webkit-appearance: none
+}
+
+#conversejs ::-webkit-file-upload-button {
+    font: inherit;
+    -webkit-appearance: button
+}
+
+#conversejs output {
+    display: inline-block
+}
+
+#conversejs summary {
+    display: list-item;
+    cursor: pointer
+}
+
+#conversejs template {
+    display: none
+}
+
+#conversejs [hidden] {
+    display: none!important
+}
+
+#conversejs .h1,
+#conversejs .h2,
+#conversejs .h3,
+#conversejs .h4,
+#conversejs .h5,
+#conversejs .h6,
+#conversejs h1,
+#conversejs h2,
+#conversejs h3,
+#conversejs h4,
+#conversejs h5,
+#conversejs h6 {
+    margin-bottom: .5rem;
+    font-weight: 500;
+    line-height: 1.2
+}
+
+#conversejs .h1,
+#conversejs h1 {
+    font-size: 2.5rem
+}
+
+#conversejs .h2,
+#conversejs h2 {
+    font-size: 2rem
+}
+
+#conversejs .h3,
+#conversejs h3 {
+    font-size: 1.75rem
+}
+
+#conversejs .h4,
+#conversejs h4 {
+    font-size: 1.5rem
+}
+
+#conversejs .h5,
+#conversejs h5 {
+    font-size: 1.25rem
+}
+
+#conversejs .h6,
+#conversejs h6 {
+    font-size: 1rem
+}
+
+#conversejs .lead {
+    font-size: 1.25rem;
+    font-weight: 300
+}
+
+#conversejs .display-1 {
+    font-size: 6rem;
+    font-weight: 300;
+    line-height: 1.2
+}
+
+#conversejs .display-2 {
+    font-size: 5.5rem;
+    font-weight: 300;
+    line-height: 1.2
+}
+
+#conversejs .display-3 {
+    font-size: 4.5rem;
+    font-weight: 300;
+    line-height: 1.2
+}
+
+#conversejs .display-4 {
+    font-size: 3.5rem;
+    font-weight: 300;
+    line-height: 1.2
+}
+
+#conversejs hr {
+    margin-top: 1rem;
+    margin-bottom: 1rem;
+    border: 0;
+    border-top: 1px solid rgba(0, 0, 0, .1)
+}
+
+#conversejs .small,
+#conversejs small {
+    font-size: 80%;
+    font-weight: 400
+}
+
+#conversejs .mark,
+#conversejs mark {
+    padding: .2em;
+    background-color: #fcf8e3
+}
+
+#conversejs .list-unstyled {
+    padding-left: 0;
+    list-style: none
+}
+
+#conversejs .list-inline {
+    padding-left: 0;
+    list-style: none
+}
+
+#conversejs .list-inline-item {
+    display: inline-block
+}
+
+#conversejs .list-inline-item:not(:last-child) {
+    margin-right: .5rem
+}
+
+#conversejs .initialism {
+    font-size: 90%;
+    text-transform: uppercase
+}
+
+#conversejs .blockquote {
+    margin-bottom: 1rem;
+    font-size: 1.25rem
+}
+
+#conversejs .blockquote-footer {
+    display: block;
+    font-size: 80%;
+    color: #6c757d
+}
+
+#conversejs .blockquote-footer::before {
+    content: "\2014\00A0"
+}
+
+#conversejs .img-fluid {
+    max-width: 100%;
+    height: auto
+}
+
+#conversejs .img-thumbnail {
+    padding: .25rem;
+    background-color: #fff;
+    border: 1px solid #dee2e6;
+    border-radius: .25rem;
+    max-width: 100%;
+    height: auto
+}
+
+#conversejs .figure {
+    display: inline-block
+}
+
+#conversejs .figure-img {
+    margin-bottom: .5rem;
+    line-height: 1
+}
+
+#conversejs .figure-caption {
+    font-size: 90%;
+    color: #6c757d
+}
+
+#conversejs .container {
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px;
+    margin-right: auto;
+    margin-left: auto
+}
+
+@media (min-width:576px) {
+    #conversejs .container {
+        max-width: 540px
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .container {
+        max-width: 720px
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .container {
+        max-width: 960px
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .container {
+        max-width: 1140px
+    }
+}
+
+#conversejs .container-fluid {
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px;
+    margin-right: auto;
+    margin-left: auto
+}
+
+#conversejs .row {
+    display: flex;
+    flex-wrap: wrap;
+    margin-right: -15px;
+    margin-left: -15px
+}
+
+#conversejs .no-gutters {
+    margin-right: 0;
+    margin-left: 0
+}
+
+#conversejs .no-gutters>.col,
+#conversejs .no-gutters>[class*=col-] {
+    padding-right: 0;
+    padding-left: 0
+}
+
+#conversejs .col,
+#conversejs .col-1,
+#conversejs .col-10,
+#conversejs .col-11,
+#conversejs .col-12,
+#conversejs .col-2,
+#conversejs .col-3,
+#conversejs .col-4,
+#conversejs .col-5,
+#conversejs .col-6,
+#conversejs .col-7,
+#conversejs .col-8,
+#conversejs .col-9,
+#conversejs .col-auto,
+#conversejs .col-lg,
+#conversejs .col-lg-1,
+#conversejs .col-lg-10,
+#conversejs .col-lg-11,
+#conversejs .col-lg-12,
+#conversejs .col-lg-2,
+#conversejs .col-lg-3,
+#conversejs .col-lg-4,
+#conversejs .col-lg-5,
+#conversejs .col-lg-6,
+#conversejs .col-lg-7,
+#conversejs .col-lg-8,
+#conversejs .col-lg-9,
+#conversejs .col-lg-auto,
+#conversejs .col-md,
+#conversejs .col-md-1,
+#conversejs .col-md-10,
+#conversejs .col-md-11,
+#conversejs .col-md-12,
+#conversejs .col-md-2,
+#conversejs .col-md-3,
+#conversejs .col-md-4,
+#conversejs .col-md-5,
+#conversejs .col-md-6,
+#conversejs .col-md-7,
+#conversejs .col-md-8,
+#conversejs .col-md-9,
+#conversejs .col-md-auto,
+#conversejs .col-sm,
+#conversejs .col-sm-1,
+#conversejs .col-sm-10,
+#conversejs .col-sm-11,
+#conversejs .col-sm-12,
+#conversejs .col-sm-2,
+#conversejs .col-sm-3,
+#conversejs .col-sm-4,
+#conversejs .col-sm-5,
+#conversejs .col-sm-6,
+#conversejs .col-sm-7,
+#conversejs .col-sm-8,
+#conversejs .col-sm-9,
+#conversejs .col-sm-auto,
+#conversejs .col-xl,
+#conversejs .col-xl-1,
+#conversejs .col-xl-10,
+#conversejs .col-xl-11,
+#conversejs .col-xl-12,
+#conversejs .col-xl-2,
+#conversejs .col-xl-3,
+#conversejs .col-xl-4,
+#conversejs .col-xl-5,
+#conversejs .col-xl-6,
+#conversejs .col-xl-7,
+#conversejs .col-xl-8,
+#conversejs .col-xl-9,
+#conversejs .col-xl-auto {
+    position: relative;
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px
+}
+
+#conversejs .col {
+    flex-basis: 0;
+    flex-grow: 1;
+    max-width: 100%
+}
+
+#conversejs .col-auto {
+    flex: 0 0 auto;
+    width: auto;
+    max-width: 100%
+}
+
+#conversejs .col-1 {
+    flex: 0 0 8.33333%;
+    max-width: 8.33333%
+}
+
+#conversejs .col-2 {
+    flex: 0 0 16.66667%;
+    max-width: 16.66667%
+}
+
+#conversejs .col-3 {
+    flex: 0 0 25%;
+    max-width: 25%
+}
+
+#conversejs .col-4 {
+    flex: 0 0 33.33333%;
+    max-width: 33.33333%
+}
+
+#conversejs .col-5 {
+    flex: 0 0 41.66667%;
+    max-width: 41.66667%
+}
+
+#conversejs .col-6 {
+    flex: 0 0 50%;
+    max-width: 50%
+}
+
+#conversejs .col-7 {
+    flex: 0 0 58.33333%;
+    max-width: 58.33333%
+}
+
+#conversejs .col-8 {
+    flex: 0 0 66.66667%;
+    max-width: 66.66667%
+}
+
+#conversejs .col-9 {
+    flex: 0 0 75%;
+    max-width: 75%
+}
+
+#conversejs .col-10 {
+    flex: 0 0 83.33333%;
+    max-width: 83.33333%
+}
+
+#conversejs .col-11 {
+    flex: 0 0 91.66667%;
+    max-width: 91.66667%
+}
+
+#conversejs .col-12 {
+    flex: 0 0 100%;
+    max-width: 100%
+}
+
+#conversejs .order-first {
+    order: -1
+}
+
+#conversejs .order-last {
+    order: 13
+}
+
+#conversejs .order-0 {
+    order: 0
+}
+
+#conversejs .order-1 {
+    order: 1
+}
+
+#conversejs .order-2 {
+    order: 2
+}
+
+#conversejs .order-3 {
+    order: 3
+}
+
+#conversejs .order-4 {
+    order: 4
+}
+
+#conversejs .order-5 {
+    order: 5
+}
+
+#conversejs .order-6 {
+    order: 6
+}
+
+#conversejs .order-7 {
+    order: 7
+}
+
+#conversejs .order-8 {
+    order: 8
+}
+
+#conversejs .order-9 {
+    order: 9
+}
+
+#conversejs .order-10 {
+    order: 10
+}
+
+#conversejs .order-11 {
+    order: 11
+}
+
+#conversejs .order-12 {
+    order: 12
+}
+
+#conversejs .offset-1 {
+    margin-left: 8.33333%
+}
+
+#conversejs .offset-2 {
+    margin-left: 16.66667%
+}
+
+#conversejs .offset-3 {
+    margin-left: 25%
+}
+
+#conversejs .offset-4 {
+    margin-left: 33.33333%
+}
+
+#conversejs .offset-5 {
+    margin-left: 41.66667%
+}
+
+#conversejs .offset-6 {
+    margin-left: 50%
+}
+
+#conversejs .offset-7 {
+    margin-left: 58.33333%
+}
+
+#conversejs .offset-8 {
+    margin-left: 66.66667%
+}
+
+#conversejs .offset-9 {
+    margin-left: 75%
+}
+
+#conversejs .offset-10 {
+    margin-left: 83.33333%
+}
+
+#conversejs .offset-11 {
+    margin-left: 91.66667%
+}
+
+@media (min-width:576px) {
+    #conversejs .col-sm {
+        flex-basis: 0;
+        flex-grow: 1;
+        max-width: 100%
+    }
+    #conversejs .col-sm-auto {
+        flex: 0 0 auto;
+        width: auto;
+        max-width: 100%
+    }
+    #conversejs .col-sm-1 {
+        flex: 0 0 8.33333%;
+        max-width: 8.33333%
+    }
+    #conversejs .col-sm-2 {
+        flex: 0 0 16.66667%;
+        max-width: 16.66667%
+    }
+    #conversejs .col-sm-3 {
+        flex: 0 0 25%;
+        max-width: 25%
+    }
+    #conversejs .col-sm-4 {
+        flex: 0 0 33.33333%;
+        max-width: 33.33333%
+    }
+    #conversejs .col-sm-5 {
+        flex: 0 0 41.66667%;
+        max-width: 41.66667%
+    }
+    #conversejs .col-sm-6 {
+        flex: 0 0 50%;
+        max-width: 50%
+    }
+    #conversejs .col-sm-7 {
+        flex: 0 0 58.33333%;
+        max-width: 58.33333%
+    }
+    #conversejs .col-sm-8 {
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%
+    }
+    #conversejs .col-sm-9 {
+        flex: 0 0 75%;
+        max-width: 75%
+    }
+    #conversejs .col-sm-10 {
+        flex: 0 0 83.33333%;
+        max-width: 83.33333%
+    }
+    #conversejs .col-sm-11 {
+        flex: 0 0 91.66667%;
+        max-width: 91.66667%
+    }
+    #conversejs .col-sm-12 {
+        flex: 0 0 100%;
+        max-width: 100%
+    }
+    #conversejs .order-sm-first {
+        order: -1
+    }
+    #conversejs .order-sm-last {
+        order: 13
+    }
+    #conversejs .order-sm-0 {
+        order: 0
+    }
+    #conversejs .order-sm-1 {
+        order: 1
+    }
+    #conversejs .order-sm-2 {
+        order: 2
+    }
+    #conversejs .order-sm-3 {
+        order: 3
+    }
+    #conversejs .order-sm-4 {
+        order: 4
+    }
+    #conversejs .order-sm-5 {
+        order: 5
+    }
+    #conversejs .order-sm-6 {
+        order: 6
+    }
+    #conversejs .order-sm-7 {
+        order: 7
+    }
+    #conversejs .order-sm-8 {
+        order: 8
+    }
+    #conversejs .order-sm-9 {
+        order: 9
+    }
+    #conversejs .order-sm-10 {
+        order: 10
+    }
+    #conversejs .order-sm-11 {
+        order: 11
+    }
+    #conversejs .order-sm-12 {
+        order: 12
+    }
+    #conversejs .offset-sm-0 {
+        margin-left: 0
+    }
+    #conversejs .offset-sm-1 {
+        margin-left: 8.33333%
+    }
+    #conversejs .offset-sm-2 {
+        margin-left: 16.66667%
+    }
+    #conversejs .offset-sm-3 {
+        margin-left: 25%
+    }
+    #conversejs .offset-sm-4 {
+        margin-left: 33.33333%
+    }
+    #conversejs .offset-sm-5 {
+        margin-left: 41.66667%
+    }
+    #conversejs .offset-sm-6 {
+        margin-left: 50%
+    }
+    #conversejs .offset-sm-7 {
+        margin-left: 58.33333%
+    }
+    #conversejs .offset-sm-8 {
+        margin-left: 66.66667%
+    }
+    #conversejs .offset-sm-9 {
+        margin-left: 75%
+    }
+    #conversejs .offset-sm-10 {
+        margin-left: 83.33333%
+    }
+    #conversejs .offset-sm-11 {
+        margin-left: 91.66667%
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .col-md {
+        flex-basis: 0;
+        flex-grow: 1;
+        max-width: 100%
+    }
+    #conversejs .col-md-auto {
+        flex: 0 0 auto;
+        width: auto;
+        max-width: 100%
+    }
+    #conversejs .col-md-1 {
+        flex: 0 0 8.33333%;
+        max-width: 8.33333%
+    }
+    #conversejs .col-md-2 {
+        flex: 0 0 16.66667%;
+        max-width: 16.66667%
+    }
+    #conversejs .col-md-3 {
+        flex: 0 0 25%;
+        max-width: 25%
+    }
+    #conversejs .col-md-4 {
+        flex: 0 0 33.33333%;
+        max-width: 33.33333%
+    }
+    #conversejs .col-md-5 {
+        flex: 0 0 41.66667%;
+        max-width: 41.66667%
+    }
+    #conversejs .col-md-6 {
+        flex: 0 0 50%;
+        max-width: 50%
+    }
+    #conversejs .col-md-7 {
+        flex: 0 0 58.33333%;
+        max-width: 58.33333%
+    }
+    #conversejs .col-md-8 {
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%
+    }
+    #conversejs .col-md-9 {
+        flex: 0 0 75%;
+        max-width: 75%
+    }
+    #conversejs .col-md-10 {
+        flex: 0 0 83.33333%;
+        max-width: 83.33333%
+    }
+    #conversejs .col-md-11 {
+        flex: 0 0 91.66667%;
+        max-width: 91.66667%
+    }
+    #conversejs .col-md-12 {
+        flex: 0 0 100%;
+        max-width: 100%
+    }
+    #conversejs .order-md-first {
+        order: -1
+    }
+    #conversejs .order-md-last {
+        order: 13
+    }
+    #conversejs .order-md-0 {
+        order: 0
+    }
+    #conversejs .order-md-1 {
+        order: 1
+    }
+    #conversejs .order-md-2 {
+        order: 2
+    }
+    #conversejs .order-md-3 {
+        order: 3
+    }
+    #conversejs .order-md-4 {
+        order: 4
+    }
+    #conversejs .order-md-5 {
+        order: 5
+    }
+    #conversejs .order-md-6 {
+        order: 6
+    }
+    #conversejs .order-md-7 {
+        order: 7
+    }
+    #conversejs .order-md-8 {
+        order: 8
+    }
+    #conversejs .order-md-9 {
+        order: 9
+    }
+    #conversejs .order-md-10 {
+        order: 10
+    }
+    #conversejs .order-md-11 {
+        order: 11
+    }
+    #conversejs .order-md-12 {
+        order: 12
+    }
+    #conversejs .offset-md-0 {
+        margin-left: 0
+    }
+    #conversejs .offset-md-1 {
+        margin-left: 8.33333%
+    }
+    #conversejs .offset-md-2 {
+        margin-left: 16.66667%
+    }
+    #conversejs .offset-md-3 {
+        margin-left: 25%
+    }
+    #conversejs .offset-md-4 {
+        margin-left: 33.33333%
+    }
+    #conversejs .offset-md-5 {
+        margin-left: 41.66667%
+    }
+    #conversejs .offset-md-6 {
+        margin-left: 50%
+    }
+    #conversejs .offset-md-7 {
+        margin-left: 58.33333%
+    }
+    #conversejs .offset-md-8 {
+        margin-left: 66.66667%
+    }
+    #conversejs .offset-md-9 {
+        margin-left: 75%
+    }
+    #conversejs .offset-md-10 {
+        margin-left: 83.33333%
+    }
+    #conversejs .offset-md-11 {
+        margin-left: 91.66667%
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .col-lg {
+        flex-basis: 0;
+        flex-grow: 1;
+        max-width: 100%
+    }
+    #conversejs .col-lg-auto {
+        flex: 0 0 auto;
+        width: auto;
+        max-width: 100%
+    }
+    #conversejs .col-lg-1 {
+        flex: 0 0 8.33333%;
+        max-width: 8.33333%
+    }
+    #conversejs .col-lg-2 {
+        flex: 0 0 16.66667%;
+        max-width: 16.66667%
+    }
+    #conversejs .col-lg-3 {
+        flex: 0 0 25%;
+        max-width: 25%
+    }
+    #conversejs .col-lg-4 {
+        flex: 0 0 33.33333%;
+        max-width: 33.33333%
+    }
+    #conversejs .col-lg-5 {
+        flex: 0 0 41.66667%;
+        max-width: 41.66667%
+    }
+    #conversejs .col-lg-6 {
+        flex: 0 0 50%;
+        max-width: 50%
+    }
+    #conversejs .col-lg-7 {
+        flex: 0 0 58.33333%;
+        max-width: 58.33333%
+    }
+    #conversejs .col-lg-8 {
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%
+    }
+    #conversejs .col-lg-9 {
+        flex: 0 0 75%;
+        max-width: 75%
+    }
+    #conversejs .col-lg-10 {
+        flex: 0 0 83.33333%;
+        max-width: 83.33333%
+    }
+    #conversejs .col-lg-11 {
+        flex: 0 0 91.66667%;
+        max-width: 91.66667%
+    }
+    #conversejs .col-lg-12 {
+        flex: 0 0 100%;
+        max-width: 100%
+    }
+    #conversejs .order-lg-first {
+        order: -1
+    }
+    #conversejs .order-lg-last {
+        order: 13
+    }
+    #conversejs .order-lg-0 {
+        order: 0
+    }
+    #conversejs .order-lg-1 {
+        order: 1
+    }
+    #conversejs .order-lg-2 {
+        order: 2
+    }
+    #conversejs .order-lg-3 {
+        order: 3
+    }
+    #conversejs .order-lg-4 {
+        order: 4
+    }
+    #conversejs .order-lg-5 {
+        order: 5
+    }
+    #conversejs .order-lg-6 {
+        order: 6
+    }
+    #conversejs .order-lg-7 {
+        order: 7
+    }
+    #conversejs .order-lg-8 {
+        order: 8
+    }
+    #conversejs .order-lg-9 {
+        order: 9
+    }
+    #conversejs .order-lg-10 {
+        order: 10
+    }
+    #conversejs .order-lg-11 {
+        order: 11
+    }
+    #conversejs .order-lg-12 {
+        order: 12
+    }
+    #conversejs .offset-lg-0 {
+        margin-left: 0
+    }
+    #conversejs .offset-lg-1 {
+        margin-left: 8.33333%
+    }
+    #conversejs .offset-lg-2 {
+        margin-left: 16.66667%
+    }
+    #conversejs .offset-lg-3 {
+        margin-left: 25%
+    }
+    #conversejs .offset-lg-4 {
+        margin-left: 33.33333%
+    }
+    #conversejs .offset-lg-5 {
+        margin-left: 41.66667%
+    }
+    #conversejs .offset-lg-6 {
+        margin-left: 50%
+    }
+    #conversejs .offset-lg-7 {
+        margin-left: 58.33333%
+    }
+    #conversejs .offset-lg-8 {
+        margin-left: 66.66667%
+    }
+    #conversejs .offset-lg-9 {
+        margin-left: 75%
+    }
+    #conversejs .offset-lg-10 {
+        margin-left: 83.33333%
+    }
+    #conversejs .offset-lg-11 {
+        margin-left: 91.66667%
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .col-xl {
+        flex-basis: 0;
+        flex-grow: 1;
+        max-width: 100%
+    }
+    #conversejs .col-xl-auto {
+        flex: 0 0 auto;
+        width: auto;
+        max-width: 100%
+    }
+    #conversejs .col-xl-1 {
+        flex: 0 0 8.33333%;
+        max-width: 8.33333%
+    }
+    #conversejs .col-xl-2 {
+        flex: 0 0 16.66667%;
+        max-width: 16.66667%
+    }
+    #conversejs .col-xl-3 {
+        flex: 0 0 25%;
+        max-width: 25%
+    }
+    #conversejs .col-xl-4 {
+        flex: 0 0 33.33333%;
+        max-width: 33.33333%
+    }
+    #conversejs .col-xl-5 {
+        flex: 0 0 41.66667%;
+        max-width: 41.66667%
+    }
+    #conversejs .col-xl-6 {
+        flex: 0 0 50%;
+        max-width: 50%
+    }
+    #conversejs .col-xl-7 {
+        flex: 0 0 58.33333%;
+        max-width: 58.33333%
+    }
+    #conversejs .col-xl-8 {
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%
+    }
+    #conversejs .col-xl-9 {
+        flex: 0 0 75%;
+        max-width: 75%
+    }
+    #conversejs .col-xl-10 {
+        flex: 0 0 83.33333%;
+        max-width: 83.33333%
+    }
+    #conversejs .col-xl-11 {
+        flex: 0 0 91.66667%;
+        max-width: 91.66667%
+    }
+    #conversejs .col-xl-12 {
+        flex: 0 0 100%;
+        max-width: 100%
+    }
+    #conversejs .order-xl-first {
+        order: -1
+    }
+    #conversejs .order-xl-last {
+        order: 13
+    }
+    #conversejs .order-xl-0 {
+        order: 0
+    }
+    #conversejs .order-xl-1 {
+        order: 1
+    }
+    #conversejs .order-xl-2 {
+        order: 2
+    }
+    #conversejs .order-xl-3 {
+        order: 3
+    }
+    #conversejs .order-xl-4 {
+        order: 4
+    }
+    #conversejs .order-xl-5 {
+        order: 5
+    }
+    #conversejs .order-xl-6 {
+        order: 6
+    }
+    #conversejs .order-xl-7 {
+        order: 7
+    }
+    #conversejs .order-xl-8 {
+        order: 8
+    }
+    #conversejs .order-xl-9 {
+        order: 9
+    }
+    #conversejs .order-xl-10 {
+        order: 10
+    }
+    #conversejs .order-xl-11 {
+        order: 11
+    }
+    #conversejs .order-xl-12 {
+        order: 12
+    }
+    #conversejs .offset-xl-0 {
+        margin-left: 0
+    }
+    #conversejs .offset-xl-1 {
+        margin-left: 8.33333%
+    }
+    #conversejs .offset-xl-2 {
+        margin-left: 16.66667%
+    }
+    #conversejs .offset-xl-3 {
+        margin-left: 25%
+    }
+    #conversejs .offset-xl-4 {
+        margin-left: 33.33333%
+    }
+    #conversejs .offset-xl-5 {
+        margin-left: 41.66667%
+    }
+    #conversejs .offset-xl-6 {
+        margin-left: 50%
+    }
+    #conversejs .offset-xl-7 {
+        margin-left: 58.33333%
+    }
+    #conversejs .offset-xl-8 {
+        margin-left: 66.66667%
+    }
+    #conversejs .offset-xl-9 {
+        margin-left: 75%
+    }
+    #conversejs .offset-xl-10 {
+        margin-left: 83.33333%
+    }
+    #conversejs .offset-xl-11 {
+        margin-left: 91.66667%
+    }
+}
+
+#conversejs .form-control {
+    display: block;
+    width: 100%;
+    height: calc(1.5em + .75rem + 2px);
+    padding: .375rem .75rem;
+    font-size: 1rem;
+    font-weight: 400;
+    line-height: 1.5;
+    color: #495057;
+    background-color: #fff;
+    background-clip: padding-box;
+    border: 1px solid #ced4da;
+    border-radius: .25rem;
+    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .form-control {
+        transition: none
+    }
+}
+
+#conversejs .form-control::-ms-expand {
+    background-color: transparent;
+    border: 0
+}
+
+#conversejs .form-control:focus {
+    color: #495057;
+    background-color: #fff;
+    border-color: #80bdff;
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .form-control::-webkit-input-placeholder {
+    color: #6c757d;
+    opacity: 1
+}
+
+#conversejs .form-control::-moz-placeholder {
+    color: #6c757d;
+    opacity: 1
+}
+
+#conversejs .form-control:-ms-input-placeholder {
+    color: #6c757d;
+    opacity: 1
+}
+
+#conversejs .form-control::-ms-input-placeholder {
+    color: #6c757d;
+    opacity: 1
+}
+
+#conversejs .form-control::placeholder {
+    color: #6c757d;
+    opacity: 1
+}
+
+#conversejs .form-control:disabled,
+#conversejs .form-control[readonly] {
+    background-color: #e9ecef;
+    opacity: 1
+}
+
+#conversejs select.form-control:focus::-ms-value {
+    color: #495057;
+    background-color: #fff
+}
+
+#conversejs .form-control-file,
+#conversejs .form-control-range {
+    display: block;
+    width: 100%
+}
+
+#conversejs .col-form-label {
+    padding-top: calc(.375rem + 1px);
+    padding-bottom: calc(.375rem + 1px);
+    margin-bottom: 0;
+    font-size: inherit;
+    line-height: 1.5
+}
+
+#conversejs .col-form-label-lg {
+    padding-top: calc(.5rem + 1px);
+    padding-bottom: calc(.5rem + 1px);
+    font-size: 1.25rem;
+    line-height: 1.5
+}
+
+#conversejs .col-form-label-sm {
+    padding-top: calc(.25rem + 1px);
+    padding-bottom: calc(.25rem + 1px);
+    font-size: .875rem;
+    line-height: 1.5
+}
+
+#conversejs .form-control-plaintext {
+    display: block;
+    width: 100%;
+    padding-top: .375rem;
+    padding-bottom: .375rem;
+    margin-bottom: 0;
+    line-height: 1.5;
+    color: #212529;
+    background-color: transparent;
+    border: solid transparent;
+    border-width: 1px 0
+}
+
+#conversejs .form-control-plaintext.form-control-lg,
+#conversejs .form-control-plaintext.form-control-sm {
+    padding-right: 0;
+    padding-left: 0
+}
+
+#conversejs .form-control-sm {
+    height: calc(1.5em + .5rem + 2px);
+    padding: .25rem .5rem;
+    font-size: .875rem;
+    line-height: 1.5;
+    border-radius: .2rem
+}
+
+#conversejs .form-control-lg {
+    height: calc(1.5em + 1rem + 2px);
+    padding: .5rem 1rem;
+    font-size: 1.25rem;
+    line-height: 1.5;
+    border-radius: .3rem
+}
+
+#conversejs select.form-control[multiple],
+#conversejs select.form-control[size] {
+    height: auto
+}
+
+#conversejs textarea.form-control {
+    height: auto
+}
+
+#conversejs .form-group {
+    margin-bottom: 1rem
+}
+
+#conversejs .form-text {
+    display: block;
+    margin-top: .25rem
+}
+
+#conversejs .form-row {
+    display: flex;
+    flex-wrap: wrap;
+    margin-right: -5px;
+    margin-left: -5px
+}
+
+#conversejs .form-row>.col,
+#conversejs .form-row>[class*=col-] {
+    padding-right: 5px;
+    padding-left: 5px
+}
+
+#conversejs .form-check {
+    position: relative;
+    display: block;
+    padding-left: 1.25rem
+}
+
+#conversejs .form-check-input {
+    position: absolute;
+    margin-top: .3rem;
+    margin-left: -1.25rem
+}
+
+#conversejs .form-check-input:disabled~.form-check-label {
+    color: #6c757d
+}
+
+#conversejs .form-check-label {
+    margin-bottom: 0
+}
+
+#conversejs .form-check-inline {
+    display: inline-flex;
+    align-items: center;
+    padding-left: 0;
+    margin-right: .75rem
+}
+
+#conversejs .form-check-inline .form-check-input {
+    position: static;
+    margin-top: 0;
+    margin-right: .3125rem;
+    margin-left: 0
+}
+
+#conversejs .valid-feedback {
+    display: none;
+    width: 100%;
+    margin-top: .25rem;
+    font-size: 80%;
+    color: #28a745
+}
+
+#conversejs .valid-tooltip {
+    position: absolute;
+    top: 100%;
+    z-index: 5;
+    display: none;
+    max-width: 100%;
+    padding: .25rem .5rem;
+    margin-top: .1rem;
+    font-size: .875rem;
+    line-height: 1.5;
+    color: #fff;
+    background-color: rgba(40, 167, 69, .9);
+    border-radius: .25rem
+}
+
+#conversejs .form-control.is-valid,
+.was-validated #conversejs .form-control:valid {
+    border-color: #28a745;
+    padding-right: calc(1.5em + .75rem);
+    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
+    background-repeat: no-repeat;
+    background-position: center right calc(.375em + .1875rem);
+    background-size: calc(.75em + .375rem) calc(.75em + .375rem)
+}
+
+#conversejs .form-control.is-valid:focus,
+.was-validated #conversejs .form-control:valid:focus {
+    border-color: #28a745;
+    box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .25)
+}
+
+#conversejs .form-control.is-valid~.valid-feedback,
+#conversejs .form-control.is-valid~.valid-tooltip,
+.was-validated #conversejs .form-control:valid~.valid-feedback,
+.was-validated #conversejs .form-control:valid~.valid-tooltip {
+    display: block
+}
+
+#conversejs textarea.form-control.is-valid,
+.was-validated #conversejs textarea.form-control:valid {
+    padding-right: calc(1.5em + .75rem);
+    background-position: top calc(.375em + .1875rem) right calc(.375em + .1875rem)
+}
+
+#conversejs .custom-select.is-valid,
+.was-validated #conversejs .custom-select:valid {
+    border-color: #28a745;
+    padding-right: calc((1em + .75rem) * 3 / 4 + 1.75rem);
+    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)
+}
+
+#conversejs .custom-select.is-valid:focus,
+.was-validated #conversejs .custom-select:valid:focus {
+    border-color: #28a745;
+    box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .25)
+}
+
+#conversejs .custom-select.is-valid~.valid-feedback,
+#conversejs .custom-select.is-valid~.valid-tooltip,
+.was-validated #conversejs .custom-select:valid~.valid-feedback,
+.was-validated #conversejs .custom-select:valid~.valid-tooltip {
+    display: block
+}
+
+#conversejs .form-control-file.is-valid~.valid-feedback,
+#conversejs .form-control-file.is-valid~.valid-tooltip,
+.was-validated #conversejs .form-control-file:valid~.valid-feedback,
+.was-validated #conversejs .form-control-file:valid~.valid-tooltip {
+    display: block
+}
+
+#conversejs .form-check-input.is-valid~.form-check-label,
+.was-validated #conversejs .form-check-input:valid~.form-check-label {
+    color: #28a745
+}
+
+#conversejs .form-check-input.is-valid~.valid-feedback,
+#conversejs .form-check-input.is-valid~.valid-tooltip,
+.was-validated #conversejs .form-check-input:valid~.valid-feedback,
+.was-validated #conversejs .form-check-input:valid~.valid-tooltip {
+    display: block
+}
+
+#conversejs .custom-control-input.is-valid~.custom-control-label,
+.was-validated #conversejs .custom-control-input:valid~.custom-control-label {
+    color: #28a745
+}
+
+#conversejs .custom-control-input.is-valid~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:valid~.custom-control-label::before {
+    border-color: #28a745
+}
+
+#conversejs .custom-control-input.is-valid~.valid-feedback,
+#conversejs .custom-control-input.is-valid~.valid-tooltip,
+.was-validated #conversejs .custom-control-input:valid~.valid-feedback,
+.was-validated #conversejs .custom-control-input:valid~.valid-tooltip {
+    display: block
+}
+
+#conversejs .custom-control-input.is-valid:checked~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:valid:checked~.custom-control-label::before {
+    border-color: #34ce57;
+    background-color: #34ce57
+}
+
+#conversejs .custom-control-input.is-valid:focus~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:valid:focus~.custom-control-label::before {
+    box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .25)
+}
+
+#conversejs .custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before {
+    border-color: #28a745
+}
+
+#conversejs .custom-file-input.is-valid~.custom-file-label,
+.was-validated #conversejs .custom-file-input:valid~.custom-file-label {
+    border-color: #28a745
+}
+
+#conversejs .custom-file-input.is-valid~.valid-feedback,
+#conversejs .custom-file-input.is-valid~.valid-tooltip,
+.was-validated #conversejs .custom-file-input:valid~.valid-feedback,
+.was-validated #conversejs .custom-file-input:valid~.valid-tooltip {
+    display: block
+}
+
+#conversejs .custom-file-input.is-valid:focus~.custom-file-label,
+.was-validated #conversejs .custom-file-input:valid:focus~.custom-file-label {
+    border-color: #28a745;
+    box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .25)
+}
+
+#conversejs .invalid-feedback {
+    display: none;
+    width: 100%;
+    margin-top: .25rem;
+    font-size: 80%;
+    color: #dc3545
+}
+
+#conversejs .invalid-tooltip {
+    position: absolute;
+    top: 100%;
+    z-index: 5;
+    display: none;
+    max-width: 100%;
+    padding: .25rem .5rem;
+    margin-top: .1rem;
+    font-size: .875rem;
+    line-height: 1.5;
+    color: #fff;
+    background-color: rgba(220, 53, 69, .9);
+    border-radius: .25rem
+}
+
+#conversejs .form-control.is-invalid,
+.was-validated #conversejs .form-control:invalid {
+    border-color: #dc3545;
+    padding-right: calc(1.5em + .75rem);
+    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");
+    background-repeat: no-repeat;
+    background-position: center right calc(.375em + .1875rem);
+    background-size: calc(.75em + .375rem) calc(.75em + .375rem)
+}
+
+#conversejs .form-control.is-invalid:focus,
+.was-validated #conversejs .form-control:invalid:focus {
+    border-color: #dc3545;
+    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .25)
+}
+
+#conversejs .form-control.is-invalid~.invalid-feedback,
+#conversejs .form-control.is-invalid~.invalid-tooltip,
+.was-validated #conversejs .form-control:invalid~.invalid-feedback,
+.was-validated #conversejs .form-control:invalid~.invalid-tooltip {
+    display: block
+}
+
+#conversejs textarea.form-control.is-invalid,
+.was-validated #conversejs textarea.form-control:invalid {
+    padding-right: calc(1.5em + .75rem);
+    background-position: top calc(.375em + .1875rem) right calc(.375em + .1875rem)
+}
+
+#conversejs .custom-select.is-invalid,
+.was-validated #conversejs .custom-select:invalid {
+    border-color: #dc3545;
+    padding-right: calc((1em + .75rem) * 3 / 4 + 1.75rem);
+    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)
+}
+
+#conversejs .custom-select.is-invalid:focus,
+.was-validated #conversejs .custom-select:invalid:focus {
+    border-color: #dc3545;
+    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .25)
+}
+
+#conversejs .custom-select.is-invalid~.invalid-feedback,
+#conversejs .custom-select.is-invalid~.invalid-tooltip,
+.was-validated #conversejs .custom-select:invalid~.invalid-feedback,
+.was-validated #conversejs .custom-select:invalid~.invalid-tooltip {
+    display: block
+}
+
+#conversejs .form-control-file.is-invalid~.invalid-feedback,
+#conversejs .form-control-file.is-invalid~.invalid-tooltip,
+.was-validated #conversejs .form-control-file:invalid~.invalid-feedback,
+.was-validated #conversejs .form-control-file:invalid~.invalid-tooltip {
+    display: block
+}
+
+#conversejs .form-check-input.is-invalid~.form-check-label,
+.was-validated #conversejs .form-check-input:invalid~.form-check-label {
+    color: #dc3545
+}
+
+#conversejs .form-check-input.is-invalid~.invalid-feedback,
+#conversejs .form-check-input.is-invalid~.invalid-tooltip,
+.was-validated #conversejs .form-check-input:invalid~.invalid-feedback,
+.was-validated #conversejs .form-check-input:invalid~.invalid-tooltip {
+    display: block
+}
+
+#conversejs .custom-control-input.is-invalid~.custom-control-label,
+.was-validated #conversejs .custom-control-input:invalid~.custom-control-label {
+    color: #dc3545
+}
+
+#conversejs .custom-control-input.is-invalid~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:invalid~.custom-control-label::before {
+    border-color: #dc3545
+}
+
+#conversejs .custom-control-input.is-invalid~.invalid-feedback,
+#conversejs .custom-control-input.is-invalid~.invalid-tooltip,
+.was-validated #conversejs .custom-control-input:invalid~.invalid-feedback,
+.was-validated #conversejs .custom-control-input:invalid~.invalid-tooltip {
+    display: block
+}
+
+#conversejs .custom-control-input.is-invalid:checked~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:invalid:checked~.custom-control-label::before {
+    border-color: #e4606d;
+    background-color: #e4606d
+}
+
+#conversejs .custom-control-input.is-invalid:focus~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:invalid:focus~.custom-control-label::before {
+    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .25)
+}
+
+#conversejs .custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,
+.was-validated #conversejs .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before {
+    border-color: #dc3545
+}
+
+#conversejs .custom-file-input.is-invalid~.custom-file-label,
+.was-validated #conversejs .custom-file-input:invalid~.custom-file-label {
+    border-color: #dc3545
+}
+
+#conversejs .custom-file-input.is-invalid~.invalid-feedback,
+#conversejs .custom-file-input.is-invalid~.invalid-tooltip,
+.was-validated #conversejs .custom-file-input:invalid~.invalid-feedback,
+.was-validated #conversejs .custom-file-input:invalid~.invalid-tooltip {
+    display: block
+}
+
+#conversejs .custom-file-input.is-invalid:focus~.custom-file-label,
+.was-validated #conversejs .custom-file-input:invalid:focus~.custom-file-label {
+    border-color: #dc3545;
+    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .25)
+}
+
+#conversejs .form-inline {
+    display: flex;
+    flex-flow: row wrap;
+    align-items: center
+}
+
+#conversejs .form-inline .form-check {
+    width: 100%
+}
+
+@media (min-width:576px) {
+    #conversejs .form-inline label {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-bottom: 0
+    }
+    #conversejs .form-inline .form-group {
+        display: flex;
+        flex: 0 0 auto;
+        flex-flow: row wrap;
+        align-items: center;
+        margin-bottom: 0
+    }
+    #conversejs .form-inline .form-control {
+        display: inline-block;
+        width: auto;
+        vertical-align: middle
+    }
+    #conversejs .form-inline .form-control-plaintext {
+        display: inline-block
+    }
+    #conversejs .form-inline .custom-select,
+    #conversejs .form-inline .input-group {
+        width: auto
+    }
+    #conversejs .form-inline .form-check {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: auto;
+        padding-left: 0
+    }
+    #conversejs .form-inline .form-check-input {
+        position: relative;
+        flex-shrink: 0;
+        margin-top: 0;
+        margin-right: .25rem;
+        margin-left: 0
+    }
+    #conversejs .form-inline .custom-control {
+        align-items: center;
+        justify-content: center
+    }
+    #conversejs .form-inline .custom-control-label {
+        margin-bottom: 0
+    }
+}
+
+#conversejs .btn {
+    display: inline-block;
+    font-weight: 400;
+    color: #212529;
+    text-align: center;
+    vertical-align: middle;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    background-color: transparent;
+    border: 1px solid transparent;
+    padding: .375rem .75rem;
+    font-size: 1rem;
+    line-height: 1.5;
+    border-radius: .25rem;
+    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .btn {
+        transition: none
+    }
+}
+
+#conversejs .btn:hover {
+    color: #212529;
+    text-decoration: none
+}
+
+#conversejs .btn.focus,
+#conversejs .btn:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .btn.disabled,
+#conversejs .btn:disabled {
+    opacity: .65
+}
+
+#conversejs a.btn.disabled,
+#conversejs fieldset:disabled a.btn {
+    pointer-events: none
+}
+
+#conversejs .btn-primary {
+    color: #fff;
+    background-color: #007bff;
+    border-color: #007bff
+}
+
+#conversejs .btn-primary:hover {
+    color: #fff;
+    background-color: #0069d9;
+    border-color: #0062cc
+}
+
+#conversejs .btn-primary.focus,
+#conversejs .btn-primary:focus {
+    box-shadow: 0 0 0 .2rem rgba(38, 143, 255, .5)
+}
+
+#conversejs .btn-primary.disabled,
+#conversejs .btn-primary:disabled {
+    color: #fff;
+    background-color: #007bff;
+    border-color: #007bff
+}
+
+#conversejs .btn-primary:not(:disabled):not(.disabled).active,
+#conversejs .btn-primary:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-primary.dropdown-toggle {
+    color: #fff;
+    background-color: #0062cc;
+    border-color: #005cbf
+}
+
+#conversejs .btn-primary:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-primary:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-primary.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(38, 143, 255, .5)
+}
+
+#conversejs .btn-secondary {
+    color: #fff;
+    background-color: #6c757d;
+    border-color: #6c757d
+}
+
+#conversejs .btn-secondary:hover {
+    color: #fff;
+    background-color: #5a6268;
+    border-color: #545b62
+}
+
+#conversejs .btn-secondary.focus,
+#conversejs .btn-secondary:focus {
+    box-shadow: 0 0 0 .2rem rgba(130, 138, 145, .5)
+}
+
+#conversejs .btn-secondary.disabled,
+#conversejs .btn-secondary:disabled {
+    color: #fff;
+    background-color: #6c757d;
+    border-color: #6c757d
+}
+
+#conversejs .btn-secondary:not(:disabled):not(.disabled).active,
+#conversejs .btn-secondary:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-secondary.dropdown-toggle {
+    color: #fff;
+    background-color: #545b62;
+    border-color: #4e555b
+}
+
+#conversejs .btn-secondary:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-secondary:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-secondary.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(130, 138, 145, .5)
+}
+
+#conversejs .btn-success {
+    color: #fff;
+    background-color: #28a745;
+    border-color: #28a745
+}
+
+#conversejs .btn-success:hover {
+    color: #fff;
+    background-color: #218838;
+    border-color: #1e7e34
+}
+
+#conversejs .btn-success.focus,
+#conversejs .btn-success:focus {
+    box-shadow: 0 0 0 .2rem rgba(72, 180, 97, .5)
+}
+
+#conversejs .btn-success.disabled,
+#conversejs .btn-success:disabled {
+    color: #fff;
+    background-color: #28a745;
+    border-color: #28a745
+}
+
+#conversejs .btn-success:not(:disabled):not(.disabled).active,
+#conversejs .btn-success:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-success.dropdown-toggle {
+    color: #fff;
+    background-color: #1e7e34;
+    border-color: #1c7430
+}
+
+#conversejs .btn-success:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-success:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-success.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(72, 180, 97, .5)
+}
+
+#conversejs .btn-info {
+    color: #fff;
+    background-color: #17a2b8;
+    border-color: #17a2b8
+}
+
+#conversejs .btn-info:hover {
+    color: #fff;
+    background-color: #138496;
+    border-color: #117a8b
+}
+
+#conversejs .btn-info.focus,
+#conversejs .btn-info:focus {
+    box-shadow: 0 0 0 .2rem rgba(58, 176, 195, .5)
+}
+
+#conversejs .btn-info.disabled,
+#conversejs .btn-info:disabled {
+    color: #fff;
+    background-color: #17a2b8;
+    border-color: #17a2b8
+}
+
+#conversejs .btn-info:not(:disabled):not(.disabled).active,
+#conversejs .btn-info:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-info.dropdown-toggle {
+    color: #fff;
+    background-color: #117a8b;
+    border-color: #10707f
+}
+
+#conversejs .btn-info:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-info:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-info.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(58, 176, 195, .5)
+}
+
+#conversejs .btn-warning {
+    color: #212529;
+    background-color: #ffc107;
+    border-color: #ffc107
+}
+
+#conversejs .btn-warning:hover {
+    color: #212529;
+    background-color: #e0a800;
+    border-color: #d39e00
+}
+
+#conversejs .btn-warning.focus,
+#conversejs .btn-warning:focus {
+    box-shadow: 0 0 0 .2rem rgba(222, 170, 12, .5)
+}
+
+#conversejs .btn-warning.disabled,
+#conversejs .btn-warning:disabled {
+    color: #212529;
+    background-color: #ffc107;
+    border-color: #ffc107
+}
+
+#conversejs .btn-warning:not(:disabled):not(.disabled).active,
+#conversejs .btn-warning:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-warning.dropdown-toggle {
+    color: #212529;
+    background-color: #d39e00;
+    border-color: #c69500
+}
+
+#conversejs .btn-warning:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-warning:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-warning.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(222, 170, 12, .5)
+}
+
+#conversejs .btn-danger {
+    color: #fff;
+    background-color: #dc3545;
+    border-color: #dc3545
+}
+
+#conversejs .btn-danger:hover {
+    color: #fff;
+    background-color: #c82333;
+    border-color: #bd2130
+}
+
+#conversejs .btn-danger.focus,
+#conversejs .btn-danger:focus {
+    box-shadow: 0 0 0 .2rem rgba(225, 83, 97, .5)
+}
+
+#conversejs .btn-danger.disabled,
+#conversejs .btn-danger:disabled {
+    color: #fff;
+    background-color: #dc3545;
+    border-color: #dc3545
+}
+
+#conversejs .btn-danger:not(:disabled):not(.disabled).active,
+#conversejs .btn-danger:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-danger.dropdown-toggle {
+    color: #fff;
+    background-color: #bd2130;
+    border-color: #b21f2d
+}
+
+#conversejs .btn-danger:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-danger:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-danger.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(225, 83, 97, .5)
+}
+
+#conversejs .btn-light {
+    color: #212529;
+    background-color: #f8f9fa;
+    border-color: #f8f9fa
+}
+
+#conversejs .btn-light:hover {
+    color: #212529;
+    background-color: #e2e6ea;
+    border-color: #dae0e5
+}
+
+#conversejs .btn-light.focus,
+#conversejs .btn-light:focus {
+    box-shadow: 0 0 0 .2rem rgba(216, 217, 219, .5)
+}
+
+#conversejs .btn-light.disabled,
+#conversejs .btn-light:disabled {
+    color: #212529;
+    background-color: #f8f9fa;
+    border-color: #f8f9fa
+}
+
+#conversejs .btn-light:not(:disabled):not(.disabled).active,
+#conversejs .btn-light:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-light.dropdown-toggle {
+    color: #212529;
+    background-color: #dae0e5;
+    border-color: #d3d9df
+}
+
+#conversejs .btn-light:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-light:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-light.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(216, 217, 219, .5)
+}
+
+#conversejs .btn-dark {
+    color: #fff;
+    background-color: #343a40;
+    border-color: #343a40
+}
+
+#conversejs .btn-dark:hover {
+    color: #fff;
+    background-color: #23272b;
+    border-color: #1d2124
+}
+
+#conversejs .btn-dark.focus,
+#conversejs .btn-dark:focus {
+    box-shadow: 0 0 0 .2rem rgba(82, 88, 93, .5)
+}
+
+#conversejs .btn-dark.disabled,
+#conversejs .btn-dark:disabled {
+    color: #fff;
+    background-color: #343a40;
+    border-color: #343a40
+}
+
+#conversejs .btn-dark:not(:disabled):not(.disabled).active,
+#conversejs .btn-dark:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-dark.dropdown-toggle {
+    color: #fff;
+    background-color: #1d2124;
+    border-color: #171a1d
+}
+
+#conversejs .btn-dark:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-dark:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-dark.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(82, 88, 93, .5)
+}
+
+#conversejs .btn-outline-primary {
+    color: #007bff;
+    border-color: #007bff
+}
+
+#conversejs .btn-outline-primary:hover {
+    color: #fff;
+    background-color: #007bff;
+    border-color: #007bff
+}
+
+#conversejs .btn-outline-primary.focus,
+#conversejs .btn-outline-primary:focus {
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .5)
+}
+
+#conversejs .btn-outline-primary.disabled,
+#conversejs .btn-outline-primary:disabled {
+    color: #007bff;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-primary:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-primary:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-primary.dropdown-toggle {
+    color: #fff;
+    background-color: #007bff;
+    border-color: #007bff
+}
+
+#conversejs .btn-outline-primary:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-primary:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-primary.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .5)
+}
+
+#conversejs .btn-outline-secondary {
+    color: #6c757d;
+    border-color: #6c757d
+}
+
+#conversejs .btn-outline-secondary:hover {
+    color: #fff;
+    background-color: #6c757d;
+    border-color: #6c757d
+}
+
+#conversejs .btn-outline-secondary.focus,
+#conversejs .btn-outline-secondary:focus {
+    box-shadow: 0 0 0 .2rem rgba(108, 117, 125, .5)
+}
+
+#conversejs .btn-outline-secondary.disabled,
+#conversejs .btn-outline-secondary:disabled {
+    color: #6c757d;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-secondary:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-secondary:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-secondary.dropdown-toggle {
+    color: #fff;
+    background-color: #6c757d;
+    border-color: #6c757d
+}
+
+#conversejs .btn-outline-secondary:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-secondary:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-secondary.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(108, 117, 125, .5)
+}
+
+#conversejs .btn-outline-success {
+    color: #28a745;
+    border-color: #28a745
+}
+
+#conversejs .btn-outline-success:hover {
+    color: #fff;
+    background-color: #28a745;
+    border-color: #28a745
+}
+
+#conversejs .btn-outline-success.focus,
+#conversejs .btn-outline-success:focus {
+    box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .5)
+}
+
+#conversejs .btn-outline-success.disabled,
+#conversejs .btn-outline-success:disabled {
+    color: #28a745;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-success:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-success:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-success.dropdown-toggle {
+    color: #fff;
+    background-color: #28a745;
+    border-color: #28a745
+}
+
+#conversejs .btn-outline-success:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-success:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-success.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .5)
+}
+
+#conversejs .btn-outline-info {
+    color: #17a2b8;
+    border-color: #17a2b8
+}
+
+#conversejs .btn-outline-info:hover {
+    color: #fff;
+    background-color: #17a2b8;
+    border-color: #17a2b8
+}
+
+#conversejs .btn-outline-info.focus,
+#conversejs .btn-outline-info:focus {
+    box-shadow: 0 0 0 .2rem rgba(23, 162, 184, .5)
+}
+
+#conversejs .btn-outline-info.disabled,
+#conversejs .btn-outline-info:disabled {
+    color: #17a2b8;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-info:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-info:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-info.dropdown-toggle {
+    color: #fff;
+    background-color: #17a2b8;
+    border-color: #17a2b8
+}
+
+#conversejs .btn-outline-info:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-info:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-info.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(23, 162, 184, .5)
+}
+
+#conversejs .btn-outline-warning {
+    color: #ffc107;
+    border-color: #ffc107
+}
+
+#conversejs .btn-outline-warning:hover {
+    color: #212529;
+    background-color: #ffc107;
+    border-color: #ffc107
+}
+
+#conversejs .btn-outline-warning.focus,
+#conversejs .btn-outline-warning:focus {
+    box-shadow: 0 0 0 .2rem rgba(255, 193, 7, .5)
+}
+
+#conversejs .btn-outline-warning.disabled,
+#conversejs .btn-outline-warning:disabled {
+    color: #ffc107;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-warning:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-warning:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-warning.dropdown-toggle {
+    color: #212529;
+    background-color: #ffc107;
+    border-color: #ffc107
+}
+
+#conversejs .btn-outline-warning:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-warning:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-warning.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(255, 193, 7, .5)
+}
+
+#conversejs .btn-outline-danger {
+    color: #dc3545;
+    border-color: #dc3545
+}
+
+#conversejs .btn-outline-danger:hover {
+    color: #fff;
+    background-color: #dc3545;
+    border-color: #dc3545
+}
+
+#conversejs .btn-outline-danger.focus,
+#conversejs .btn-outline-danger:focus {
+    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .5)
+}
+
+#conversejs .btn-outline-danger.disabled,
+#conversejs .btn-outline-danger:disabled {
+    color: #dc3545;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-danger:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-danger:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-danger.dropdown-toggle {
+    color: #fff;
+    background-color: #dc3545;
+    border-color: #dc3545
+}
+
+#conversejs .btn-outline-danger:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-danger:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-danger.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .5)
+}
+
+#conversejs .btn-outline-light {
+    color: #f8f9fa;
+    border-color: #f8f9fa
+}
+
+#conversejs .btn-outline-light:hover {
+    color: #212529;
+    background-color: #f8f9fa;
+    border-color: #f8f9fa
+}
+
+#conversejs .btn-outline-light.focus,
+#conversejs .btn-outline-light:focus {
+    box-shadow: 0 0 0 .2rem rgba(248, 249, 250, .5)
+}
+
+#conversejs .btn-outline-light.disabled,
+#conversejs .btn-outline-light:disabled {
+    color: #f8f9fa;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-light:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-light:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-light.dropdown-toggle {
+    color: #212529;
+    background-color: #f8f9fa;
+    border-color: #f8f9fa
+}
+
+#conversejs .btn-outline-light:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-light:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-light.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(248, 249, 250, .5)
+}
+
+#conversejs .btn-outline-dark {
+    color: #343a40;
+    border-color: #343a40
+}
+
+#conversejs .btn-outline-dark:hover {
+    color: #fff;
+    background-color: #343a40;
+    border-color: #343a40
+}
+
+#conversejs .btn-outline-dark.focus,
+#conversejs .btn-outline-dark:focus {
+    box-shadow: 0 0 0 .2rem rgba(52, 58, 64, .5)
+}
+
+#conversejs .btn-outline-dark.disabled,
+#conversejs .btn-outline-dark:disabled {
+    color: #343a40;
+    background-color: transparent
+}
+
+#conversejs .btn-outline-dark:not(:disabled):not(.disabled).active,
+#conversejs .btn-outline-dark:not(:disabled):not(.disabled):active,
+.show>#conversejs .btn-outline-dark.dropdown-toggle {
+    color: #fff;
+    background-color: #343a40;
+    border-color: #343a40
+}
+
+#conversejs .btn-outline-dark:not(:disabled):not(.disabled).active:focus,
+#conversejs .btn-outline-dark:not(:disabled):not(.disabled):active:focus,
+.show>#conversejs .btn-outline-dark.dropdown-toggle:focus {
+    box-shadow: 0 0 0 .2rem rgba(52, 58, 64, .5)
+}
+
+#conversejs .btn-link {
+    font-weight: 400;
+    color: #007bff;
+    text-decoration: none
+}
+
+#conversejs .btn-link:hover {
+    color: #0056b3;
+    text-decoration: underline
+}
+
+#conversejs .btn-link.focus,
+#conversejs .btn-link:focus {
+    text-decoration: underline;
+    box-shadow: none
+}
+
+#conversejs .btn-link.disabled,
+#conversejs .btn-link:disabled {
+    color: #6c757d;
+    pointer-events: none
+}
+
+#conversejs .btn-group-lg>.btn,
+#conversejs .btn-lg {
+    padding: .5rem 1rem;
+    font-size: 1.25rem;
+    line-height: 1.5;
+    border-radius: .3rem
+}
+
+#conversejs .btn-group-sm>.btn,
+#conversejs .btn-sm {
+    padding: .25rem .5rem;
+    font-size: .875rem;
+    line-height: 1.5;
+    border-radius: .2rem
+}
+
+#conversejs .btn-block {
+    display: block;
+    width: 100%
+}
+
+#conversejs .btn-block+.btn-block {
+    margin-top: .5rem
+}
+
+#conversejs input[type=button].btn-block,
+#conversejs input[type=reset].btn-block,
+#conversejs input[type=submit].btn-block {
+    width: 100%
+}
+
+#conversejs .fade {
+    transition: opacity .15s linear
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .fade {
+        transition: none
+    }
+}
+
+#conversejs .fade:not(.show) {
+    opacity: 0
+}
+
+#conversejs .collapse:not(.show) {
+    display: none
+}
+
+#conversejs .collapsing {
+    position: relative;
+    height: 0;
+    overflow: hidden;
+    transition: height .35s ease
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .collapsing {
+        transition: none
+    }
+}
+
+#conversejs .dropdown,
+#conversejs .dropleft,
+#conversejs .dropright,
+#conversejs .dropup {
+    position: relative
+}
+
+#conversejs .dropdown-toggle {
+    white-space: nowrap
+}
+
+#conversejs .dropdown-toggle::after {
+    display: inline-block;
+    margin-left: .255em;
+    vertical-align: .255em;
+    content: "";
+    border-top: .3em solid;
+    border-right: .3em solid transparent;
+    border-bottom: 0;
+    border-left: .3em solid transparent
+}
+
+#conversejs .dropdown-toggle:empty::after {
+    margin-left: 0
+}
+
+#conversejs .dropdown-menu {
+    position: absolute;
+    top: 100%;
+    left: 0;
+    z-index: 1000;
+    display: none;
+    float: left;
+    min-width: 10rem;
+    padding: .5rem 0;
+    margin: .125rem 0 0;
+    font-size: 1rem;
+    color: #212529;
+    text-align: left;
+    list-style: none;
+    background-color: #fff;
+    background-clip: padding-box;
+    border: 1px solid rgba(0, 0, 0, .15);
+    border-radius: .25rem
+}
+
+#conversejs .dropdown-menu-left {
+    right: auto;
+    left: 0
+}
+
+#conversejs .dropdown-menu-right {
+    right: 0;
+    left: auto
+}
+
+@media (min-width:576px) {
+    #conversejs .dropdown-menu-sm-left {
+        right: auto;
+        left: 0
+    }
+    #conversejs .dropdown-menu-sm-right {
+        right: 0;
+        left: auto
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .dropdown-menu-md-left {
+        right: auto;
+        left: 0
+    }
+    #conversejs .dropdown-menu-md-right {
+        right: 0;
+        left: auto
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .dropdown-menu-lg-left {
+        right: auto;
+        left: 0
+    }
+    #conversejs .dropdown-menu-lg-right {
+        right: 0;
+        left: auto
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .dropdown-menu-xl-left {
+        right: auto;
+        left: 0
+    }
+    #conversejs .dropdown-menu-xl-right {
+        right: 0;
+        left: auto
+    }
+}
+
+#conversejs .dropup .dropdown-menu {
+    top: auto;
+    bottom: 100%;
+    margin-top: 0;
+    margin-bottom: .125rem
+}
+
+#conversejs .dropup .dropdown-toggle::after {
+    display: inline-block;
+    margin-left: .255em;
+    vertical-align: .255em;
+    content: "";
+    border-top: 0;
+    border-right: .3em solid transparent;
+    border-bottom: .3em solid;
+    border-left: .3em solid transparent
+}
+
+#conversejs .dropup .dropdown-toggle:empty::after {
+    margin-left: 0
+}
+
+#conversejs .dropright .dropdown-menu {
+    top: 0;
+    right: auto;
+    left: 100%;
+    margin-top: 0;
+    margin-left: .125rem
+}
+
+#conversejs .dropright .dropdown-toggle::after {
+    display: inline-block;
+    margin-left: .255em;
+    vertical-align: .255em;
+    content: "";
+    border-top: .3em solid transparent;
+    border-right: 0;
+    border-bottom: .3em solid transparent;
+    border-left: .3em solid
+}
+
+#conversejs .dropright .dropdown-toggle:empty::after {
+    margin-left: 0
+}
+
+#conversejs .dropright .dropdown-toggle::after {
+    vertical-align: 0
+}
+
+#conversejs .dropleft .dropdown-menu {
+    top: 0;
+    right: 100%;
+    left: auto;
+    margin-top: 0;
+    margin-right: .125rem
+}
+
+#conversejs .dropleft .dropdown-toggle::after {
+    display: inline-block;
+    margin-left: .255em;
+    vertical-align: .255em;
+    content: ""
+}
+
+#conversejs .dropleft .dropdown-toggle::after {
+    display: none
+}
+
+#conversejs .dropleft .dropdown-toggle::before {
+    display: inline-block;
+    margin-right: .255em;
+    vertical-align: .255em;
+    content: "";
+    border-top: .3em solid transparent;
+    border-right: .3em solid;
+    border-bottom: .3em solid transparent
+}
+
+#conversejs .dropleft .dropdown-toggle:empty::after {
+    margin-left: 0
+}
+
+#conversejs .dropleft .dropdown-toggle::before {
+    vertical-align: 0
+}
+
+#conversejs .dropdown-menu[x-placement^=bottom],
+#conversejs .dropdown-menu[x-placement^=left],
+#conversejs .dropdown-menu[x-placement^=right],
+#conversejs .dropdown-menu[x-placement^=top] {
+    right: auto;
+    bottom: auto
+}
+
+#conversejs .dropdown-divider {
+    height: 0;
+    margin: .5rem 0;
+    overflow: hidden;
+    border-top: 1px solid #e9ecef
+}
+
+#conversejs .dropdown-item {
+    display: block;
+    width: 100%;
+    padding: .25rem 1.5rem;
+    clear: both;
+    font-weight: 400;
+    color: #212529;
+    text-align: inherit;
+    white-space: nowrap;
+    background-color: transparent;
+    border: 0
+}
+
+#conversejs .dropdown-item:focus,
+#conversejs .dropdown-item:hover {
+    color: #16181b;
+    text-decoration: none;
+    background-color: #f8f9fa
+}
+
+#conversejs .dropdown-item.active,
+#conversejs .dropdown-item:active {
+    color: #fff;
+    text-decoration: none;
+    background-color: #007bff
+}
+
+#conversejs .dropdown-item.disabled,
+#conversejs .dropdown-item:disabled {
+    color: #6c757d;
+    pointer-events: none;
+    background-color: transparent
+}
+
+#conversejs .dropdown-menu.show {
+    display: block
+}
+
+#conversejs .dropdown-header {
+    display: block;
+    padding: .5rem 1.5rem;
+    margin-bottom: 0;
+    font-size: .875rem;
+    color: #6c757d;
+    white-space: nowrap
+}
+
+#conversejs .dropdown-item-text {
+    display: block;
+    padding: .25rem 1.5rem;
+    color: #212529
+}
+
+#conversejs .btn-group,
+#conversejs .btn-group-vertical {
+    position: relative;
+    display: inline-flex;
+    vertical-align: middle
+}
+
+#conversejs .btn-group-vertical>.btn,
+#conversejs .btn-group>.btn {
+    position: relative;
+    flex: 1 1 auto
+}
+
+#conversejs .btn-group-vertical>.btn:hover,
+#conversejs .btn-group>.btn:hover {
+    z-index: 1
+}
+
+#conversejs .btn-group-vertical>.btn.active,
+#conversejs .btn-group-vertical>.btn:active,
+#conversejs .btn-group-vertical>.btn:focus,
+#conversejs .btn-group>.btn.active,
+#conversejs .btn-group>.btn:active,
+#conversejs .btn-group>.btn:focus {
+    z-index: 1
+}
+
+#conversejs .btn-toolbar {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: flex-start
+}
+
+#conversejs .btn-toolbar .input-group {
+    width: auto
+}
+
+#conversejs .btn-group>.btn-group:not(:first-child),
+#conversejs .btn-group>.btn:not(:first-child) {
+    margin-left: -1px
+}
+
+#conversejs .btn-group>.btn-group:not(:last-child)>.btn,
+#conversejs .btn-group>.btn:not(:last-child):not(.dropdown-toggle) {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0
+}
+
+#conversejs .btn-group>.btn-group:not(:first-child)>.btn,
+#conversejs .btn-group>.btn:not(:first-child) {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0
+}
+
+#conversejs .dropdown-toggle-split {
+    padding-right: .5625rem;
+    padding-left: .5625rem
+}
+
+#conversejs .dropdown-toggle-split::after,
+.dropright #conversejs .dropdown-toggle-split::after,
+.dropup #conversejs .dropdown-toggle-split::after {
+    margin-left: 0
+}
+
+.dropleft #conversejs .dropdown-toggle-split::before {
+    margin-right: 0
+}
+
+#conversejs .btn-group-sm>.btn+.dropdown-toggle-split,
+#conversejs .btn-sm+.dropdown-toggle-split {
+    padding-right: .375rem;
+    padding-left: .375rem
+}
+
+#conversejs .btn-group-lg>.btn+.dropdown-toggle-split,
+#conversejs .btn-lg+.dropdown-toggle-split {
+    padding-right: .75rem;
+    padding-left: .75rem
+}
+
+#conversejs .btn-group-vertical {
+    flex-direction: column;
+    align-items: flex-start;
+    justify-content: center
+}
+
+#conversejs .btn-group-vertical>.btn,
+#conversejs .btn-group-vertical>.btn-group {
+    width: 100%
+}
+
+#conversejs .btn-group-vertical>.btn-group:not(:first-child),
+#conversejs .btn-group-vertical>.btn:not(:first-child) {
+    margin-top: -1px
+}
+
+#conversejs .btn-group-vertical>.btn-group:not(:last-child)>.btn,
+#conversejs .btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle) {
+    border-bottom-right-radius: 0;
+    border-bottom-left-radius: 0
+}
+
+#conversejs .btn-group-vertical>.btn-group:not(:first-child)>.btn,
+#conversejs .btn-group-vertical>.btn:not(:first-child) {
+    border-top-left-radius: 0;
+    border-top-right-radius: 0
+}
+
+#conversejs .btn-group-toggle>.btn,
+#conversejs .btn-group-toggle>.btn-group>.btn {
+    margin-bottom: 0
+}
+
+#conversejs .btn-group-toggle>.btn input[type=checkbox],
+#conversejs .btn-group-toggle>.btn input[type=radio],
+#conversejs .btn-group-toggle>.btn-group>.btn input[type=checkbox],
+#conversejs .btn-group-toggle>.btn-group>.btn input[type=radio] {
+    position: absolute;
+    clip: rect(0, 0, 0, 0);
+    pointer-events: none
+}
+
+#conversejs .input-group {
+    position: relative;
+    display: flex;
+    flex-wrap: wrap;
+    align-items: stretch;
+    width: 100%
+}
+
+#conversejs .input-group>.custom-file,
+#conversejs .input-group>.custom-select,
+#conversejs .input-group>.form-control,
+#conversejs .input-group>.form-control-plaintext {
+    position: relative;
+    flex: 1 1 auto;
+    width: 1%;
+    margin-bottom: 0
+}
+
+#conversejs .input-group>.custom-file+.custom-file,
+#conversejs .input-group>.custom-file+.custom-select,
+#conversejs .input-group>.custom-file+.form-control,
+#conversejs .input-group>.custom-select+.custom-file,
+#conversejs .input-group>.custom-select+.custom-select,
+#conversejs .input-group>.custom-select+.form-control,
+#conversejs .input-group>.form-control+.custom-file,
+#conversejs .input-group>.form-control+.custom-select,
+#conversejs .input-group>.form-control+.form-control,
+#conversejs .input-group>.form-control-plaintext+.custom-file,
+#conversejs .input-group>.form-control-plaintext+.custom-select,
+#conversejs .input-group>.form-control-plaintext+.form-control {
+    margin-left: -1px
+}
+
+#conversejs .input-group>.custom-file .custom-file-input:focus~.custom-file-label,
+#conversejs .input-group>.custom-select:focus,
+#conversejs .input-group>.form-control:focus {
+    z-index: 3
+}
+
+#conversejs .input-group>.custom-file .custom-file-input:focus {
+    z-index: 4
+}
+
+#conversejs .input-group>.custom-select:not(:last-child),
+#conversejs .input-group>.form-control:not(:last-child) {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0
+}
+
+#conversejs .input-group>.custom-select:not(:first-child),
+#conversejs .input-group>.form-control:not(:first-child) {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0
+}
+
+#conversejs .input-group>.custom-file {
+    display: flex;
+    align-items: center
+}
+
+#conversejs .input-group>.custom-file:not(:last-child) .custom-file-label,
+#conversejs .input-group>.custom-file:not(:last-child) .custom-file-label::after {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0
+}
+
+#conversejs .input-group>.custom-file:not(:first-child) .custom-file-label {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0
+}
+
+#conversejs .input-group-append,
+#conversejs .input-group-prepend {
+    display: flex
+}
+
+#conversejs .input-group-append .btn,
+#conversejs .input-group-prepend .btn {
+    position: relative;
+    z-index: 2
+}
+
+#conversejs .input-group-append .btn:focus,
+#conversejs .input-group-prepend .btn:focus {
+    z-index: 3
+}
+
+#conversejs .input-group-append .btn+.btn,
+#conversejs .input-group-append .btn+.input-group-text,
+#conversejs .input-group-append .input-group-text+.btn,
+#conversejs .input-group-append .input-group-text+.input-group-text,
+#conversejs .input-group-prepend .btn+.btn,
+#conversejs .input-group-prepend .btn+.input-group-text,
+#conversejs .input-group-prepend .input-group-text+.btn,
+#conversejs .input-group-prepend .input-group-text+.input-group-text {
+    margin-left: -1px
+}
+
+#conversejs .input-group-prepend {
+    margin-right: -1px
+}
+
+#conversejs .input-group-append {
+    margin-left: -1px
+}
+
+#conversejs .input-group-text {
+    display: flex;
+    align-items: center;
+    padding: .375rem .75rem;
+    margin-bottom: 0;
+    font-size: 1rem;
+    font-weight: 400;
+    line-height: 1.5;
+    color: #495057;
+    text-align: center;
+    white-space: nowrap;
+    background-color: #e9ecef;
+    border: 1px solid #ced4da;
+    border-radius: .25rem
+}
+
+#conversejs .input-group-text input[type=checkbox],
+#conversejs .input-group-text input[type=radio] {
+    margin-top: 0
+}
+
+#conversejs .input-group-lg>.custom-select,
+#conversejs .input-group-lg>.form-control:not(textarea) {
+    height: calc(1.5em + 1rem + 2px)
+}
+
+#conversejs .input-group-lg>.custom-select,
+#conversejs .input-group-lg>.form-control,
+#conversejs .input-group-lg>.input-group-append>.btn,
+#conversejs .input-group-lg>.input-group-append>.input-group-text,
+#conversejs .input-group-lg>.input-group-prepend>.btn,
+#conversejs .input-group-lg>.input-group-prepend>.input-group-text {
+    padding: .5rem 1rem;
+    font-size: 1.25rem;
+    line-height: 1.5;
+    border-radius: .3rem
+}
+
+#conversejs .input-group-sm>.custom-select,
+#conversejs .input-group-sm>.form-control:not(textarea) {
+    height: calc(1.5em + .5rem + 2px)
+}
+
+#conversejs .input-group-sm>.custom-select,
+#conversejs .input-group-sm>.form-control,
+#conversejs .input-group-sm>.input-group-append>.btn,
+#conversejs .input-group-sm>.input-group-append>.input-group-text,
+#conversejs .input-group-sm>.input-group-prepend>.btn,
+#conversejs .input-group-sm>.input-group-prepend>.input-group-text {
+    padding: .25rem .5rem;
+    font-size: .875rem;
+    line-height: 1.5;
+    border-radius: .2rem
+}
+
+#conversejs .input-group-lg>.custom-select,
+#conversejs .input-group-sm>.custom-select {
+    padding-right: 1.75rem
+}
+
+#conversejs .input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),
+#conversejs .input-group>.input-group-append:last-child>.input-group-text:not(:last-child),
+#conversejs .input-group>.input-group-append:not(:last-child)>.btn,
+#conversejs .input-group>.input-group-append:not(:last-child)>.input-group-text,
+#conversejs .input-group>.input-group-prepend>.btn,
+#conversejs .input-group>.input-group-prepend>.input-group-text {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0
+}
+
+#conversejs .input-group>.input-group-append>.btn,
+#conversejs .input-group>.input-group-append>.input-group-text,
+#conversejs .input-group>.input-group-prepend:first-child>.btn:not(:first-child),
+#conversejs .input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),
+#conversejs .input-group>.input-group-prepend:not(:first-child)>.btn,
+#conversejs .input-group>.input-group-prepend:not(:first-child)>.input-group-text {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0
+}
+
+#conversejs .custom-control {
+    position: relative;
+    display: block;
+    min-height: 1.5rem;
+    padding-left: 1.5rem
+}
+
+#conversejs .custom-control-inline {
+    display: inline-flex;
+    margin-right: 1rem
+}
+
+#conversejs .custom-control-input {
+    position: absolute;
+    z-index: -1;
+    opacity: 0
+}
+
+#conversejs .custom-control-input:checked~.custom-control-label::before {
+    color: #fff;
+    border-color: #007bff;
+    background-color: #007bff
+}
+
+#conversejs .custom-control-input:focus~.custom-control-label::before {
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .custom-control-input:focus:not(:checked)~.custom-control-label::before {
+    border-color: #80bdff
+}
+
+#conversejs .custom-control-input:not(:disabled):active~.custom-control-label::before {
+    color: #fff;
+    background-color: #b3d7ff;
+    border-color: #b3d7ff
+}
+
+#conversejs .custom-control-input:disabled~.custom-control-label {
+    color: #6c757d
+}
+
+#conversejs .custom-control-input:disabled~.custom-control-label::before {
+    background-color: #e9ecef
+}
+
+#conversejs .custom-control-label {
+    position: relative;
+    margin-bottom: 0;
+    vertical-align: top
+}
+
+#conversejs .custom-control-label::before {
+    position: absolute;
+    top: .25rem;
+    left: -1.5rem;
+    display: block;
+    width: 1rem;
+    height: 1rem;
+    pointer-events: none;
+    content: "";
+    background-color: #fff;
+    border: #adb5bd solid 1px
+}
+
+#conversejs .custom-control-label::after {
+    position: absolute;
+    top: .25rem;
+    left: -1.5rem;
+    display: block;
+    width: 1rem;
+    height: 1rem;
+    content: "";
+    background: no-repeat 50%/50% 50%
+}
+
+#conversejs .custom-checkbox .custom-control-label::before {
+    border-radius: .25rem
+}
+
+#conversejs .custom-checkbox .custom-control-input:checked~.custom-control-label::after {
+    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e")
+}
+
+#conversejs .custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before {
+    border-color: #007bff;
+    background-color: #007bff
+}
+
+#conversejs .custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after {
+    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")
+}
+
+#conversejs .custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before {
+    background-color: rgba(0, 123, 255, .5)
+}
+
+#conversejs .custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before {
+    background-color: rgba(0, 123, 255, .5)
+}
+
+#conversejs .custom-radio .custom-control-label::before {
+    border-radius: 50%
+}
+
+#conversejs .custom-radio .custom-control-input:checked~.custom-control-label::after {
+    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")
+}
+
+#conversejs .custom-radio .custom-control-input:disabled:checked~.custom-control-label::before {
+    background-color: rgba(0, 123, 255, .5)
+}
+
+#conversejs .custom-switch {
+    padding-left: 2.25rem
+}
+
+#conversejs .custom-switch .custom-control-label::before {
+    left: -2.25rem;
+    width: 1.75rem;
+    pointer-events: all;
+    border-radius: .5rem
+}
+
+#conversejs .custom-switch .custom-control-label::after {
+    top: calc(.25rem + 2px);
+    left: calc(-2.25rem + 2px);
+    width: calc(1rem - 4px);
+    height: calc(1rem - 4px);
+    background-color: #adb5bd;
+    border-radius: .5rem;
+    transition: transform .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .custom-switch .custom-control-label::after {
+        transition: none
+    }
+}
+
+#conversejs .custom-switch .custom-control-input:checked~.custom-control-label::after {
+    background-color: #fff;
+    transform: translateX(.75rem)
+}
+
+#conversejs .custom-switch .custom-control-input:disabled:checked~.custom-control-label::before {
+    background-color: rgba(0, 123, 255, .5)
+}
+
+#conversejs .custom-select {
+    display: inline-block;
+    width: 100%;
+    height: calc(1.5em + .75rem + 2px);
+    padding: .375rem 1.75rem .375rem .75rem;
+    font-size: 1rem;
+    font-weight: 400;
+    line-height: 1.5;
+    color: #495057;
+    vertical-align: middle;
+    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;
+    background-color: #fff;
+    border: 1px solid #ced4da;
+    border-radius: .25rem;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none
+}
+
+#conversejs .custom-select:focus {
+    border-color: #80bdff;
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .custom-select:focus::-ms-value {
+    color: #495057;
+    background-color: #fff
+}
+
+#conversejs .custom-select[multiple],
+#conversejs .custom-select[size]:not([size="1"]) {
+    height: auto;
+    padding-right: .75rem;
+    background-image: none
+}
+
+#conversejs .custom-select:disabled {
+    color: #6c757d;
+    background-color: #e9ecef
+}
+
+#conversejs .custom-select::-ms-expand {
+    display: none
+}
+
+#conversejs .custom-select-sm {
+    height: calc(1.5em + .5rem + 2px);
+    padding-top: .25rem;
+    padding-bottom: .25rem;
+    padding-left: .5rem;
+    font-size: .875rem
+}
+
+#conversejs .custom-select-lg {
+    height: calc(1.5em + 1rem + 2px);
+    padding-top: .5rem;
+    padding-bottom: .5rem;
+    padding-left: 1rem;
+    font-size: 1.25rem
+}
+
+#conversejs .custom-file {
+    position: relative;
+    display: inline-block;
+    width: 100%;
+    height: calc(1.5em + .75rem + 2px);
+    margin-bottom: 0
+}
+
+#conversejs .custom-file-input {
+    position: relative;
+    z-index: 2;
+    width: 100%;
+    height: calc(1.5em + .75rem + 2px);
+    margin: 0;
+    opacity: 0
+}
+
+#conversejs .custom-file-input:focus~.custom-file-label {
+    border-color: #80bdff;
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .custom-file-input:disabled~.custom-file-label {
+    background-color: #e9ecef
+}
+
+#conversejs .custom-file-input:lang(en)~.custom-file-label::after {
+    content: "Browse"
+}
+
+#conversejs .custom-file-input~.custom-file-label[data-browse]::after {
+    content: attr(data-browse)
+}
+
+#conversejs .custom-file-label {
+    position: absolute;
+    top: 0;
+    right: 0;
+    left: 0;
+    z-index: 1;
+    height: calc(1.5em + .75rem + 2px);
+    padding: .375rem .75rem;
+    font-weight: 400;
+    line-height: 1.5;
+    color: #495057;
+    background-color: #fff;
+    border: 1px solid #ced4da;
+    border-radius: .25rem
+}
+
+#conversejs .custom-file-label::after {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    z-index: 3;
+    display: block;
+    height: calc(1.5em + .75rem);
+    padding: .375rem .75rem;
+    line-height: 1.5;
+    color: #495057;
+    content: "Browse";
+    background-color: #e9ecef;
+    border-left: inherit;
+    border-radius: 0 .25rem .25rem 0
+}
+
+#conversejs .custom-range {
+    width: 100%;
+    height: calc(1rem + .4rem);
+    padding: 0;
+    background-color: transparent;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none
+}
+
+#conversejs .custom-range:focus {
+    outline: 0
+}
+
+#conversejs .custom-range:focus::-webkit-slider-thumb {
+    box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .custom-range:focus::-moz-range-thumb {
+    box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .custom-range:focus::-ms-thumb {
+    box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(0, 123, 255, .25)
+}
+
+#conversejs .custom-range::-moz-focus-outer {
+    border: 0
+}
+
+#conversejs .custom-range::-webkit-slider-thumb {
+    width: 1rem;
+    height: 1rem;
+    margin-top: -.25rem;
+    background-color: #007bff;
+    border: 0;
+    border-radius: 1rem;
+    transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
+    -webkit-appearance: none;
+    appearance: none
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .custom-range::-webkit-slider-thumb {
+        transition: none
+    }
+}
+
+#conversejs .custom-range::-webkit-slider-thumb:active {
+    background-color: #b3d7ff
+}
+
+#conversejs .custom-range::-webkit-slider-runnable-track {
+    width: 100%;
+    height: .5rem;
+    color: transparent;
+    cursor: pointer;
+    background-color: #dee2e6;
+    border-color: transparent;
+    border-radius: 1rem
+}
+
+#conversejs .custom-range::-moz-range-thumb {
+    width: 1rem;
+    height: 1rem;
+    background-color: #007bff;
+    border: 0;
+    border-radius: 1rem;
+    transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
+    -moz-appearance: none;
+    appearance: none
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .custom-range::-moz-range-thumb {
+        transition: none
+    }
+}
+
+#conversejs .custom-range::-moz-range-thumb:active {
+    background-color: #b3d7ff
+}
+
+#conversejs .custom-range::-moz-range-track {
+    width: 100%;
+    height: .5rem;
+    color: transparent;
+    cursor: pointer;
+    background-color: #dee2e6;
+    border-color: transparent;
+    border-radius: 1rem
+}
+
+#conversejs .custom-range::-ms-thumb {
+    width: 1rem;
+    height: 1rem;
+    margin-top: 0;
+    margin-right: .2rem;
+    margin-left: .2rem;
+    background-color: #007bff;
+    border: 0;
+    border-radius: 1rem;
+    transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
+    appearance: none
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .custom-range::-ms-thumb {
+        transition: none
+    }
+}
+
+#conversejs .custom-range::-ms-thumb:active {
+    background-color: #b3d7ff
+}
+
+#conversejs .custom-range::-ms-track {
+    width: 100%;
+    height: .5rem;
+    color: transparent;
+    cursor: pointer;
+    background-color: transparent;
+    border-color: transparent;
+    border-width: .5rem
+}
+
+#conversejs .custom-range::-ms-fill-lower {
+    background-color: #dee2e6;
+    border-radius: 1rem
+}
+
+#conversejs .custom-range::-ms-fill-upper {
+    margin-right: 15px;
+    background-color: #dee2e6;
+    border-radius: 1rem
+}
+
+#conversejs .custom-range:disabled::-webkit-slider-thumb {
+    background-color: #adb5bd
+}
+
+#conversejs .custom-range:disabled::-webkit-slider-runnable-track {
+    cursor: default
+}
+
+#conversejs .custom-range:disabled::-moz-range-thumb {
+    background-color: #adb5bd
+}
+
+#conversejs .custom-range:disabled::-moz-range-track {
+    cursor: default
+}
+
+#conversejs .custom-range:disabled::-ms-thumb {
+    background-color: #adb5bd
+}
+
+#conversejs .custom-control-label::before,
+#conversejs .custom-file-label,
+#conversejs .custom-select {
+    transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .custom-control-label::before,
+    #conversejs .custom-file-label,
+    #conversejs .custom-select {
+        transition: none
+    }
+}
+
+#conversejs .nav {
+    display: flex;
+    flex-wrap: wrap;
+    padding-left: 0;
+    margin-bottom: 0;
+    list-style: none
+}
+
+#conversejs .nav-link {
+    display: block;
+    padding: .5rem 1rem
+}
+
+#conversejs .nav-link:focus,
+#conversejs .nav-link:hover {
+    text-decoration: none
+}
+
+#conversejs .nav-link.disabled {
+    color: #6c757d;
+    pointer-events: none;
+    cursor: default
+}
+
+#conversejs .nav-tabs {
+    border-bottom: 1px solid #dee2e6
+}
+
+#conversejs .nav-tabs .nav-item {
+    margin-bottom: -1px
+}
+
+#conversejs .nav-tabs .nav-link {
+    border: 1px solid transparent;
+    border-top-left-radius: .25rem;
+    border-top-right-radius: .25rem
+}
+
+#conversejs .nav-tabs .nav-link:focus,
+#conversejs .nav-tabs .nav-link:hover {
+    border-color: #e9ecef #e9ecef #dee2e6
+}
+
+#conversejs .nav-tabs .nav-link.disabled {
+    color: #6c757d;
+    background-color: transparent;
+    border-color: transparent
+}
+
+#conversejs .nav-tabs .nav-item.show .nav-link,
+#conversejs .nav-tabs .nav-link.active {
+    color: #495057;
+    background-color: #fff;
+    border-color: #dee2e6 #dee2e6 #fff
+}
+
+#conversejs .nav-tabs .dropdown-menu {
+    margin-top: -1px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0
+}
+
+#conversejs .nav-pills .nav-link {
+    border-radius: .25rem
+}
+
+#conversejs .nav-pills .nav-link.active,
+#conversejs .nav-pills .show>.nav-link {
+    color: #fff;
+    background-color: #007bff
+}
+
+#conversejs .nav-fill .nav-item {
+    flex: 1 1 auto;
+    text-align: center
+}
+
+#conversejs .nav-justified .nav-item {
+    flex-basis: 0;
+    flex-grow: 1;
+    text-align: center
+}
+
+#conversejs .tab-content>.tab-pane {
+    display: none
+}
+
+#conversejs .tab-content>.active {
+    display: block
+}
+
+#conversejs .badge {
+    display: inline-block;
+    padding: .25em .4em;
+    font-size: 75%;
+    font-weight: 700;
+    line-height: 1;
+    text-align: center;
+    white-space: nowrap;
+    vertical-align: baseline;
+    border-radius: .25rem;
+    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out
+}
+
+@media (prefers-reduced-motion:reduce) {
+    #conversejs .badge {
+        transition: none
+    }
+}
+
+a#conversejs .badge:focus,
+a#conversejs .badge:hover {
+    text-decoration: none
+}
+
+#conversejs .badge:empty {
+    display: none
+}
+
+#conversejs .btn .badge {
+    position: relative;
+    top: -1px
+}
+
+#conversejs .badge-pill {
+    padding-right: .6em;
+    padding-left: .6em;
+    border-radius: 10rem
+}
+
+#conversejs .badge-primary {
+    color: #fff;
+    background-color: #007bff
+}
+
+a#conversejs .badge-primary:focus,
+a#conversejs .badge-primary:hover {
+    color: #fff;
+    background-color: #0062cc
+}
+
+a#conversejs .badge-primary.focus,
+a#conversejs .badge-primary:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .5)
+}
+
+#conversejs .badge-secondary {
+    color: #fff;
+    background-color: #6c757d
+}
+
+a#conversejs .badge-secondary:focus,
+a#conversejs .badge-secondary:hover {
+    color: #fff;
+    background-color: #545b62
+}
+
+a#conversejs .badge-secondary.focus,
+a#conversejs .badge-secondary:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(108, 117, 125, .5)
+}
+
+#conversejs .badge-success {
+    color: #fff;
+    background-color: #28a745
+}
+
+a#conversejs .badge-success:focus,
+a#conversejs .badge-success:hover {
+    color: #fff;
+    background-color: #1e7e34
+}
+
+a#conversejs .badge-success.focus,
+a#conversejs .badge-success:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .5)
+}
+
+#conversejs .badge-info {
+    color: #fff;
+    background-color: #17a2b8
+}
+
+a#conversejs .badge-info:focus,
+a#conversejs .badge-info:hover {
+    color: #fff;
+    background-color: #117a8b
+}
+
+a#conversejs .badge-info.focus,
+a#conversejs .badge-info:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(23, 162, 184, .5)
+}
+
+#conversejs .badge-warning {
+    color: #212529;
+    background-color: #ffc107
+}
+
+a#conversejs .badge-warning:focus,
+a#conversejs .badge-warning:hover {
+    color: #212529;
+    background-color: #d39e00
+}
+
+a#conversejs .badge-warning.focus,
+a#conversejs .badge-warning:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(255, 193, 7, .5)
+}
+
+#conversejs .badge-danger {
+    color: #fff;
+    background-color: #dc3545
+}
+
+a#conversejs .badge-danger:focus,
+a#conversejs .badge-danger:hover {
+    color: #fff;
+    background-color: #bd2130
+}
+
+a#conversejs .badge-danger.focus,
+a#conversejs .badge-danger:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .5)
+}
+
+#conversejs .badge-light {
+    color: #212529;
+    background-color: #f8f9fa
+}
+
+a#conversejs .badge-light:focus,
+a#conversejs .badge-light:hover {
+    color: #212529;
+    background-color: #dae0e5
+}
+
+a#conversejs .badge-light.focus,
+a#conversejs .badge-light:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(248, 249, 250, .5)
+}
+
+#conversejs .badge-dark {
+    color: #fff;
+    background-color: #343a40
+}
+
+a#conversejs .badge-dark:focus,
+a#conversejs .badge-dark:hover {
+    color: #fff;
+    background-color: #1d2124
+}
+
+a#conversejs .badge-dark.focus,
+a#conversejs .badge-dark:focus {
+    outline: 0;
+    box-shadow: 0 0 0 .2rem rgba(52, 58, 64, .5)
+}
+
+#conversejs .alert {
+    position: relative;
+    padding: .75rem 1.25rem;
+    margin-bottom: 1rem;
+    border: 1px solid transparent;
+    border-radius: .25rem
+}
+
+#conversejs .alert-heading {
+    color: inherit
+}
+
+#conversejs .alert-link {
+    font-weight: 700
+}
+
+#conversejs .alert-dismissible {
+    padding-right: 4rem
+}
+
+#conversejs .alert-dismissible .close {
+    position: absolute;
+    top: 0;
+    right: 0;
+    padding: .75rem 1.25rem;
+    color: inherit
+}
+
+#conversejs .alert-primary {
+    color: #004085;
+    background-color: #cce5ff;
+    border-color: #b8daff
+}
+
+#conversejs .alert-primary hr {
+    border-top-color: #9fcdff
+}
+
+#conversejs .alert-primary .alert-link {
+    color: #002752
+}
+
+#conversejs .alert-secondary {
+    color: #383d41;
+    background-color: #e2e3e5;
+    border-color: #d6d8db
+}
+
+#conversejs .alert-secondary hr {
+    border-top-color: #c8cbcf
+}
+
+#conversejs .alert-secondary .alert-link {
+    color: #202326
+}
+
+#conversejs .alert-success {
+    color: #155724;
+    background-color: #d4edda;
+    border-color: #c3e6cb
+}
+
+#conversejs .alert-success hr {
+    border-top-color: #b1dfbb
+}
+
+#conversejs .alert-success .alert-link {
+    color: #0b2e13
+}
+
+#conversejs .alert-info {
+    color: #0c5460;
+    background-color: #d1ecf1;
+    border-color: #bee5eb
+}
+
+#conversejs .alert-info hr {
+    border-top-color: #abdde5
+}
+
+#conversejs .alert-info .alert-link {
+    color: #062c33
+}
+
+#conversejs .alert-warning {
+    color: #856404;
+    background-color: #fff3cd;
+    border-color: #ffeeba
+}
+
+#conversejs .alert-warning hr {
+    border-top-color: #ffe8a1
+}
+
+#conversejs .alert-warning .alert-link {
+    color: #533f03
+}
+
+#conversejs .alert-danger {
+    color: #721c24;
+    background-color: #f8d7da;
+    border-color: #f5c6cb
+}
+
+#conversejs .alert-danger hr {
+    border-top-color: #f1b0b7
+}
+
+#conversejs .alert-danger .alert-link {
+    color: #491217
+}
+
+#conversejs .alert-light {
+    color: #818182;
+    background-color: #fefefe;
+    border-color: #fdfdfe
+}
+
+#conversejs .alert-light hr {
+    border-top-color: #ececf6
+}
+
+#conversejs .alert-light .alert-link {
+    color: #686868
+}
+
+#conversejs .alert-dark {
+    color: #1b1e21;
+    background-color: #d6d8d9;
+    border-color: #c6c8ca
+}
+
+#conversejs .alert-dark hr {
+    border-top-color: #b9bbbe
+}
+
+#conversejs .alert-dark .alert-link {
+    color: #040505
+}
+
+#conversejs .media {
+    display: flex;
+    align-items: flex-start
+}
+
+#conversejs .media-body {
+    flex: 1
+}
+
+#conversejs .list-group {
+    display: flex;
+    flex-direction: column;
+    padding-left: 0;
+    margin-bottom: 0
+}
+
+#conversejs .list-group-item-action {
+    width: 100%;
+    color: #495057;
+    text-align: inherit
+}
+
+#conversejs .list-group-item-action:focus,
+#conversejs .list-group-item-action:hover {
+    z-index: 1;
+    color: #495057;
+    text-decoration: none;
+    background-color: #f8f9fa
+}
+
+#conversejs .list-group-item-action:active {
+    color: #212529;
+    background-color: #e9ecef
+}
+
+#conversejs .list-group-item {
+    position: relative;
+    display: block;
+    padding: .75rem 1.25rem;
+    margin-bottom: -1px;
+    background-color: #fff;
+    border: 1px solid rgba(0, 0, 0, .125)
+}
+
+#conversejs .list-group-item:first-child {
+    border-top-left-radius: .25rem;
+    border-top-right-radius: .25rem
+}
+
+#conversejs .list-group-item:last-child {
+    margin-bottom: 0;
+    border-bottom-right-radius: .25rem;
+    border-bottom-left-radius: .25rem
+}
+
+#conversejs .list-group-item.disabled,
+#conversejs .list-group-item:disabled {
+    color: #6c757d;
+    pointer-events: none;
+    background-color: #fff
+}
+
+#conversejs .list-group-item.active {
+    z-index: 2;
+    color: #fff;
+    background-color: #007bff;
+    border-color: #007bff
+}
+
+#conversejs .list-group-horizontal {
+    flex-direction: row
+}
+
+#conversejs .list-group-horizontal .list-group-item {
+    margin-right: -1px;
+    margin-bottom: 0
+}
+
+#conversejs .list-group-horizontal .list-group-item:first-child {
+    border-top-left-radius: .25rem;
+    border-bottom-left-radius: .25rem;
+    border-top-right-radius: 0
+}
+
+#conversejs .list-group-horizontal .list-group-item:last-child {
+    margin-right: 0;
+    border-top-right-radius: .25rem;
+    border-bottom-right-radius: .25rem;
+    border-bottom-left-radius: 0
+}
+
+@media (min-width:576px) {
+    #conversejs .list-group-horizontal-sm {
+        flex-direction: row
+    }
+    #conversejs .list-group-horizontal-sm .list-group-item {
+        margin-right: -1px;
+        margin-bottom: 0
+    }
+    #conversejs .list-group-horizontal-sm .list-group-item:first-child {
+        border-top-left-radius: .25rem;
+        border-bottom-left-radius: .25rem;
+        border-top-right-radius: 0
+    }
+    #conversejs .list-group-horizontal-sm .list-group-item:last-child {
+        margin-right: 0;
+        border-top-right-radius: .25rem;
+        border-bottom-right-radius: .25rem;
+        border-bottom-left-radius: 0
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .list-group-horizontal-md {
+        flex-direction: row
+    }
+    #conversejs .list-group-horizontal-md .list-group-item {
+        margin-right: -1px;
+        margin-bottom: 0
+    }
+    #conversejs .list-group-horizontal-md .list-group-item:first-child {
+        border-top-left-radius: .25rem;
+        border-bottom-left-radius: .25rem;
+        border-top-right-radius: 0
+    }
+    #conversejs .list-group-horizontal-md .list-group-item:last-child {
+        margin-right: 0;
+        border-top-right-radius: .25rem;
+        border-bottom-right-radius: .25rem;
+        border-bottom-left-radius: 0
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .list-group-horizontal-lg {
+        flex-direction: row
+    }
+    #conversejs .list-group-horizontal-lg .list-group-item {
+        margin-right: -1px;
+        margin-bottom: 0
+    }
+    #conversejs .list-group-horizontal-lg .list-group-item:first-child {
+        border-top-left-radius: .25rem;
+        border-bottom-left-radius: .25rem;
+        border-top-right-radius: 0
+    }
+    #conversejs .list-group-horizontal-lg .list-group-item:last-child {
+        margin-right: 0;
+        border-top-right-radius: .25rem;
+        border-bottom-right-radius: .25rem;
+        border-bottom-left-radius: 0
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .list-group-horizontal-xl {
+        flex-direction: row
+    }
+    #conversejs .list-group-horizontal-xl .list-group-item {
+        margin-right: -1px;
+        margin-bottom: 0
+    }
+    #conversejs .list-group-horizontal-xl .list-group-item:first-child {
+        border-top-left-radius: .25rem;
+        border-bottom-left-radius: .25rem;
+        border-top-right-radius: 0
+    }
+    #conversejs .list-group-horizontal-xl .list-group-item:last-child {
+        margin-right: 0;
+        border-top-right-radius: .25rem;
+        border-bottom-right-radius: .25rem;
+        border-bottom-left-radius: 0
+    }
+}
+
+#conversejs .list-group-flush .list-group-item {
+    border-right: 0;
+    border-left: 0;
+    border-radius: 0
+}
+
+#conversejs .list-group-flush .list-group-item:last-child {
+    margin-bottom: -1px
+}
+
+#conversejs .list-group-flush:first-child .list-group-item:first-child {
+    border-top: 0
+}
+
+#conversejs .list-group-flush:last-child .list-group-item:last-child {
+    margin-bottom: 0;
+    border-bottom: 0
+}
+
+#conversejs .list-group-item-primary {
+    color: #004085;
+    background-color: #b8daff
+}
+
+#conversejs .list-group-item-primary.list-group-item-action:focus,
+#conversejs .list-group-item-primary.list-group-item-action:hover {
+    color: #004085;
+    background-color: #9fcdff
+}
+
+#conversejs .list-group-item-primary.list-group-item-action.active {
+    color: #fff;
+    background-color: #004085;
+    border-color: #004085
+}
+
+#conversejs .list-group-item-secondary {
+    color: #383d41;
+    background-color: #d6d8db
+}
+
+#conversejs .list-group-item-secondary.list-group-item-action:focus,
+#conversejs .list-group-item-secondary.list-group-item-action:hover {
+    color: #383d41;
+    background-color: #c8cbcf
+}
+
+#conversejs .list-group-item-secondary.list-group-item-action.active {
+    color: #fff;
+    background-color: #383d41;
+    border-color: #383d41
+}
+
+#conversejs .list-group-item-success {
+    color: #155724;
+    background-color: #c3e6cb
+}
+
+#conversejs .list-group-item-success.list-group-item-action:focus,
+#conversejs .list-group-item-success.list-group-item-action:hover {
+    color: #155724;
+    background-color: #b1dfbb
+}
+
+#conversejs .list-group-item-success.list-group-item-action.active {
+    color: #fff;
+    background-color: #155724;
+    border-color: #155724
+}
+
+#conversejs .list-group-item-info {
+    color: #0c5460;
+    background-color: #bee5eb
+}
+
+#conversejs .list-group-item-info.list-group-item-action:focus,
+#conversejs .list-group-item-info.list-group-item-action:hover {
+    color: #0c5460;
+    background-color: #abdde5
+}
+
+#conversejs .list-group-item-info.list-group-item-action.active {
+    color: #fff;
+    background-color: #0c5460;
+    border-color: #0c5460
+}
+
+#conversejs .list-group-item-warning {
+    color: #856404;
+    background-color: #ffeeba
+}
+
+#conversejs .list-group-item-warning.list-group-item-action:focus,
+#conversejs .list-group-item-warning.list-group-item-action:hover {
+    color: #856404;
+    background-color: #ffe8a1
+}
+
+#conversejs .list-group-item-warning.list-group-item-action.active {
+    color: #fff;
+    background-color: #856404;
+    border-color: #856404
+}
+
+#conversejs .list-group-item-danger {
+    color: #721c24;
+    background-color: #f5c6cb
+}
+
+#conversejs .list-group-item-danger.list-group-item-action:focus,
+#conversejs .list-group-item-danger.list-group-item-action:hover {
+    color: #721c24;
+    background-color: #f1b0b7
+}
+
+#conversejs .list-group-item-danger.list-group-item-action.active {
+    color: #fff;
+    background-color: #721c24;
+    border-color: #721c24
+}
+
+#conversejs .list-group-item-light {
+    color: #818182;
+    background-color: #fdfdfe
+}
+
+#conversejs .list-group-item-light.list-group-item-action:focus,
+#conversejs .list-group-item-light.list-group-item-action:hover {
+    color: #818182;
+    background-color: #ececf6
+}
+
+#conversejs .list-group-item-light.list-group-item-action.active {
+    color: #fff;
+    background-color: #818182;
+    border-color: #818182
+}
+
+#conversejs .list-group-item-dark {
+    color: #1b1e21;
+    background-color: #c6c8ca
+}
+
+#conversejs .list-group-item-dark.list-group-item-action:focus,
+#conversejs .list-group-item-dark.list-group-item-action:hover {
+    color: #1b1e21;
+    background-color: #b9bbbe
+}
+
+#conversejs .list-group-item-dark.list-group-item-action.active {
+    color: #fff;
+    background-color: #1b1e21;
+    border-color: #1b1e21
+}
+
+#conversejs .close {
+    float: right;
+    font-size: 1.5rem;
+    font-weight: 700;
+    line-height: 1;
+    color: #000;
+    text-shadow: 0 1px 0 #fff;
+    opacity: .5
+}
+
+#conversejs .close:hover {
+    color: #000;
+    text-decoration: none
+}
+
+#conversejs .close:not(:disabled):not(.disabled):focus,
+#conversejs .close:not(:disabled):not(.disabled):hover {
+    opacity: .75
+}
+
+#conversejs button.close {
+    padding: 0;
+    background-color: transparent;
+    border: 0;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none
+}
+
+#conversejs a.close.disabled {
+    pointer-events: none
+}
+
+#conversejs .modal-open {
+    overflow: hidden
+}
+
+#conversejs .modal-open .modal {
+    overflow-x: hidden;
+    overflow-y: auto
+}
+
+#conversejs .modal {
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 1050;
+    display: none;
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    outline: 0
+}
+
+#conversejs .modal-dialog {
+    position: relative;
+    width: auto;
+    margin: .5rem;
+    pointer-events: none
+}
+
+.modal.fade #conversejs .modal-dialog {
+    transition: transform .3s ease-out;
+    transform: translate(0, -50px)
+}
+
+@media (prefers-reduced-motion:reduce) {
+    .modal.fade #conversejs .modal-dialog {
+        transition: none
+    }
+}
+
+.modal.show #conversejs .modal-dialog {
+    transform: none
+}
+
+#conversejs .modal-dialog-scrollable {
+    display: flex;
+    max-height: calc(100% - 1rem)
+}
+
+#conversejs .modal-dialog-scrollable .modal-content {
+    max-height: calc(100vh - 1rem);
+    overflow: hidden
+}
+
+#conversejs .modal-dialog-scrollable .modal-footer,
+#conversejs .modal-dialog-scrollable .modal-header {
+    flex-shrink: 0
+}
+
+#conversejs .modal-dialog-scrollable .modal-body {
+    overflow-y: auto
+}
+
+#conversejs .modal-dialog-centered {
+    display: flex;
+    align-items: center;
+    min-height: calc(100% - 1rem)
+}
+
+#conversejs .modal-dialog-centered::before {
+    display: block;
+    height: calc(100vh - 1rem);
+    content: ""
+}
+
+#conversejs .modal-dialog-centered.modal-dialog-scrollable {
+    flex-direction: column;
+    justify-content: center;
+    height: 100%
+}
+
+#conversejs .modal-dialog-centered.modal-dialog-scrollable .modal-content {
+    max-height: none
+}
+
+#conversejs .modal-dialog-centered.modal-dialog-scrollable::before {
+    content: none
+}
+
+#conversejs .modal-content {
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    pointer-events: auto;
+    background-color: #fff;
+    background-clip: padding-box;
+    border: 1px solid rgba(0, 0, 0, .2);
+    border-radius: .3rem;
+    outline: 0
+}
+
+#conversejs .modal-backdrop {
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 1040;
+    width: 100vw;
+    height: 100vh;
+    background-color: #000
+}
+
+#conversejs .modal-backdrop.fade {
+    opacity: 0
+}
+
+#conversejs .modal-backdrop.show {
+    opacity: .5
+}
+
+#conversejs .modal-header {
+    display: flex;
+    align-items: flex-start;
+    justify-content: space-between;
+    padding: 1rem 1rem;
+    border-bottom: 1px solid #dee2e6;
+    border-top-left-radius: .3rem;
+    border-top-right-radius: .3rem
+}
+
+#conversejs .modal-header .close {
+    padding: 1rem 1rem;
+    margin: -1rem -1rem -1rem auto
+}
+
+#conversejs .modal-title {
+    margin-bottom: 0;
+    line-height: 1.5
+}
+
+#conversejs .modal-body {
+    position: relative;
+    flex: 1 1 auto;
+    padding: 1rem
+}
+
+#conversejs .modal-footer {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    padding: 1rem;
+    border-top: 1px solid #dee2e6;
+    border-bottom-right-radius: .3rem;
+    border-bottom-left-radius: .3rem
+}
+
+#conversejs .modal-footer>:not(:first-child) {
+    margin-left: .25rem
+}
+
+#conversejs .modal-footer>:not(:last-child) {
+    margin-right: .25rem
+}
+
+#conversejs .modal-scrollbar-measure {
+    position: absolute;
+    top: -9999px;
+    width: 50px;
+    height: 50px;
+    overflow: scroll
+}
+
+@media (min-width:576px) {
+    #conversejs .modal-dialog {
+        max-width: 500px;
+        margin: 1.75rem auto
+    }
+    #conversejs .modal-dialog-scrollable {
+        max-height: calc(100% - 3.5rem)
+    }
+    #conversejs .modal-dialog-scrollable .modal-content {
+        max-height: calc(100vh - 3.5rem)
+    }
+    #conversejs .modal-dialog-centered {
+        min-height: calc(100% - 3.5rem)
+    }
+    #conversejs .modal-dialog-centered::before {
+        height: calc(100vh - 3.5rem)
+    }
+    #conversejs .modal-sm {
+        max-width: 300px
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .modal-lg,
+    #conversejs .modal-xl {
+        max-width: 800px
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .modal-xl {
+        max-width: 1140px
+    }
+}
+
+#conversejs .tooltip {
+    position: absolute;
+    z-index: 1070;
+    display: block;
+    margin: 0;
+    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+    font-style: normal;
+    font-weight: 400;
+    line-height: 1.5;
+    text-align: left;
+    text-align: start;
+    text-decoration: none;
+    text-shadow: none;
+    text-transform: none;
+    letter-spacing: normal;
+    word-break: normal;
+    word-spacing: normal;
+    white-space: normal;
+    line-break: auto;
+    font-size: .875rem;
+    word-wrap: break-word;
+    opacity: 0
+}
+
+#conversejs .tooltip.show {
+    opacity: .9
+}
+
+#conversejs .tooltip .arrow {
+    position: absolute;
+    display: block;
+    width: .8rem;
+    height: .4rem
+}
+
+#conversejs .tooltip .arrow::before {
+    position: absolute;
+    content: "";
+    border-color: transparent;
+    border-style: solid
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=top],
+#conversejs .bs-tooltip-top {
+    padding: .4rem 0
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=top] .arrow,
+#conversejs .bs-tooltip-top .arrow {
+    bottom: 0
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=top] .arrow::before,
+#conversejs .bs-tooltip-top .arrow::before {
+    top: 0;
+    border-width: .4rem .4rem 0;
+    border-top-color: #000
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=right],
+#conversejs .bs-tooltip-right {
+    padding: 0 .4rem
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=right] .arrow,
+#conversejs .bs-tooltip-right .arrow {
+    left: 0;
+    width: .4rem;
+    height: .8rem
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=right] .arrow::before,
+#conversejs .bs-tooltip-right .arrow::before {
+    right: 0;
+    border-width: .4rem .4rem .4rem 0;
+    border-right-color: #000
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=bottom],
+#conversejs .bs-tooltip-bottom {
+    padding: .4rem 0
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=bottom] .arrow,
+#conversejs .bs-tooltip-bottom .arrow {
+    top: 0
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=bottom] .arrow::before,
+#conversejs .bs-tooltip-bottom .arrow::before {
+    bottom: 0;
+    border-width: 0 .4rem .4rem;
+    border-bottom-color: #000
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=left],
+#conversejs .bs-tooltip-left {
+    padding: 0 .4rem
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=left] .arrow,
+#conversejs .bs-tooltip-left .arrow {
+    right: 0;
+    width: .4rem;
+    height: .8rem
+}
+
+#conversejs .bs-tooltip-auto[x-placement^=left] .arrow::before,
+#conversejs .bs-tooltip-left .arrow::before {
+    left: 0;
+    border-width: .4rem 0 .4rem .4rem;
+    border-left-color: #000
+}
+
+#conversejs .tooltip-inner {
+    max-width: 200px;
+    padding: .25rem .5rem;
+    color: #fff;
+    text-align: center;
+    background-color: #000;
+    border-radius: .25rem
+}
+
+#conversejs .popover {
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 1060;
+    display: block;
+    max-width: 276px;
+    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+    font-style: normal;
+    font-weight: 400;
+    line-height: 1.5;
+    text-align: left;
+    text-align: start;
+    text-decoration: none;
+    text-shadow: none;
+    text-transform: none;
+    letter-spacing: normal;
+    word-break: normal;
+    word-spacing: normal;
+    white-space: normal;
+    line-break: auto;
+    font-size: .875rem;
+    word-wrap: break-word;
+    background-color: #fff;
+    background-clip: padding-box;
+    border: 1px solid rgba(0, 0, 0, .2);
+    border-radius: .3rem
+}
+
+#conversejs .popover .arrow {
+    position: absolute;
+    display: block;
+    width: 1rem;
+    height: .5rem;
+    margin: 0 .3rem
+}
+
+#conversejs .popover .arrow::after,
+#conversejs .popover .arrow::before {
+    position: absolute;
+    display: block;
+    content: "";
+    border-color: transparent;
+    border-style: solid
+}
+
+#conversejs .bs-popover-auto[x-placement^=top],
+#conversejs .bs-popover-top {
+    margin-bottom: .5rem
+}
+
+#conversejs .bs-popover-auto[x-placement^=top]>.arrow,
+#conversejs .bs-popover-top>.arrow {
+    bottom: calc((.5rem + 1px) * -1)
+}
+
+#conversejs .bs-popover-auto[x-placement^=top]>.arrow::before,
+#conversejs .bs-popover-top>.arrow::before {
+    bottom: 0;
+    border-width: .5rem .5rem 0;
+    border-top-color: rgba(0, 0, 0, .25)
+}
+
+#conversejs .bs-popover-auto[x-placement^=top]>.arrow::after,
+#conversejs .bs-popover-top>.arrow::after {
+    bottom: 1px;
+    border-width: .5rem .5rem 0;
+    border-top-color: #fff
+}
+
+#conversejs .bs-popover-auto[x-placement^=right],
+#conversejs .bs-popover-right {
+    margin-left: .5rem
+}
+
+#conversejs .bs-popover-auto[x-placement^=right]>.arrow,
+#conversejs .bs-popover-right>.arrow {
+    left: calc((.5rem + 1px) * -1);
+    width: .5rem;
+    height: 1rem;
+    margin: .3rem 0
+}
+
+#conversejs .bs-popover-auto[x-placement^=right]>.arrow::before,
+#conversejs .bs-popover-right>.arrow::before {
+    left: 0;
+    border-width: .5rem .5rem .5rem 0;
+    border-right-color: rgba(0, 0, 0, .25)
+}
+
+#conversejs .bs-popover-auto[x-placement^=right]>.arrow::after,
+#conversejs .bs-popover-right>.arrow::after {
+    left: 1px;
+    border-width: .5rem .5rem .5rem 0;
+    border-right-color: #fff
+}
+
+#conversejs .bs-popover-auto[x-placement^=bottom],
+#conversejs .bs-popover-bottom {
+    margin-top: .5rem
+}
+
+#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow,
+#conversejs .bs-popover-bottom>.arrow {
+    top: calc((.5rem + 1px) * -1)
+}
+
+#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow::before,
+#conversejs .bs-popover-bottom>.arrow::before {
+    top: 0;
+    border-width: 0 .5rem .5rem .5rem;
+    border-bottom-color: rgba(0, 0, 0, .25)
+}
+
+#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow::after,
+#conversejs .bs-popover-bottom>.arrow::after {
+    top: 1px;
+    border-width: 0 .5rem .5rem .5rem;
+    border-bottom-color: #fff
+}
+
+#conversejs .bs-popover-auto[x-placement^=bottom] .popover-header::before,
+#conversejs .bs-popover-bottom .popover-header::before {
+    position: absolute;
+    top: 0;
+    left: 50%;
+    display: block;
+    width: 1rem;
+    margin-left: -.5rem;
+    content: "";
+    border-bottom: 1px solid #f7f7f7
+}
+
+#conversejs .bs-popover-auto[x-placement^=left],
+#conversejs .bs-popover-left {
+    margin-right: .5rem
+}
+
+#conversejs .bs-popover-auto[x-placement^=left]>.arrow,
+#conversejs .bs-popover-left>.arrow {
+    right: calc((.5rem + 1px) * -1);
+    width: .5rem;
+    height: 1rem;
+    margin: .3rem 0
+}
+
+#conversejs .bs-popover-auto[x-placement^=left]>.arrow::before,
+#conversejs .bs-popover-left>.arrow::before {
+    right: 0;
+    border-width: .5rem 0 .5rem .5rem;
+    border-left-color: rgba(0, 0, 0, .25)
+}
+
+#conversejs .bs-popover-auto[x-placement^=left]>.arrow::after,
+#conversejs .bs-popover-left>.arrow::after {
+    right: 1px;
+    border-width: .5rem 0 .5rem .5rem;
+    border-left-color: #fff
+}
+
+#conversejs .popover-header {
+    padding: .5rem .75rem;
+    margin-bottom: 0;
+    font-size: 1rem;
+    background-color: #f7f7f7;
+    border-bottom: 1px solid #ebebeb;
+    border-top-left-radius: calc(.3rem - 1px);
+    border-top-right-radius: calc(.3rem - 1px)
+}
+
+#conversejs .popover-header:empty {
+    display: none
+}
+
+#conversejs .popover-body {
+    padding: .5rem .75rem;
+    color: #212529
+}
+
+#conversejs .align-baseline {
+    vertical-align: baseline!important
+}
+
+#conversejs .align-top {
+    vertical-align: top!important
+}
+
+#conversejs .align-middle {
+    vertical-align: middle!important
+}
+
+#conversejs .align-bottom {
+    vertical-align: bottom!important
+}
+
+#conversejs .align-text-bottom {
+    vertical-align: text-bottom!important
+}
+
+#conversejs .align-text-top {
+    vertical-align: text-top!important
+}
+
+#conversejs .bg-primary {
+    background-color: #007bff!important
+}
+
+#conversejs a.bg-primary:focus,
+#conversejs a.bg-primary:hover,
+#conversejs button.bg-primary:focus,
+#conversejs button.bg-primary:hover {
+    background-color: #0062cc!important
+}
+
+#conversejs .bg-secondary {
+    background-color: #6c757d!important
+}
+
+#conversejs a.bg-secondary:focus,
+#conversejs a.bg-secondary:hover,
+#conversejs button.bg-secondary:focus,
+#conversejs button.bg-secondary:hover {
+    background-color: #545b62!important
+}
+
+#conversejs .bg-success {
+    background-color: #28a745!important
+}
+
+#conversejs a.bg-success:focus,
+#conversejs a.bg-success:hover,
+#conversejs button.bg-success:focus,
+#conversejs button.bg-success:hover {
+    background-color: #1e7e34!important
+}
+
+#conversejs .bg-info {
+    background-color: #17a2b8!important
+}
+
+#conversejs a.bg-info:focus,
+#conversejs a.bg-info:hover,
+#conversejs button.bg-info:focus,
+#conversejs button.bg-info:hover {
+    background-color: #117a8b!important
+}
+
+#conversejs .bg-warning {
+    background-color: #ffc107!important
+}
+
+#conversejs a.bg-warning:focus,
+#conversejs a.bg-warning:hover,
+#conversejs button.bg-warning:focus,
+#conversejs button.bg-warning:hover {
+    background-color: #d39e00!important
+}
+
+#conversejs .bg-danger {
+    background-color: #dc3545!important
+}
+
+#conversejs a.bg-danger:focus,
+#conversejs a.bg-danger:hover,
+#conversejs button.bg-danger:focus,
+#conversejs button.bg-danger:hover {
+    background-color: #bd2130!important
+}
+
+#conversejs .bg-light {
+    background-color: #f8f9fa!important
+}
+
+#conversejs a.bg-light:focus,
+#conversejs a.bg-light:hover,
+#conversejs button.bg-light:focus,
+#conversejs button.bg-light:hover {
+    background-color: #dae0e5!important
+}
+
+#conversejs .bg-dark {
+    background-color: #343a40!important
+}
+
+#conversejs a.bg-dark:focus,
+#conversejs a.bg-dark:hover,
+#conversejs button.bg-dark:focus,
+#conversejs button.bg-dark:hover {
+    background-color: #1d2124!important
+}
+
+#conversejs .bg-white {
+    background-color: #fff!important
+}
+
+#conversejs .bg-transparent {
+    background-color: transparent!important
+}
+
+#conversejs .border {
+    border: 1px solid #dee2e6!important
+}
+
+#conversejs .border-top {
+    border-top: 1px solid #dee2e6!important
+}
+
+#conversejs .border-right {
+    border-right: 1px solid #dee2e6!important
+}
+
+#conversejs .border-bottom {
+    border-bottom: 1px solid #dee2e6!important
+}
+
+#conversejs .border-left {
+    border-left: 1px solid #dee2e6!important
+}
+
+#conversejs .border-0 {
+    border: 0!important
+}
+
+#conversejs .border-top-0 {
+    border-top: 0!important
+}
+
+#conversejs .border-right-0 {
+    border-right: 0!important
+}
+
+#conversejs .border-bottom-0 {
+    border-bottom: 0!important
+}
+
+#conversejs .border-left-0 {
+    border-left: 0!important
+}
+
+#conversejs .border-primary {
+    border-color: #007bff!important
+}
+
+#conversejs .border-secondary {
+    border-color: #6c757d!important
+}
+
+#conversejs .border-success {
+    border-color: #28a745!important
+}
+
+#conversejs .border-info {
+    border-color: #17a2b8!important
+}
+
+#conversejs .border-warning {
+    border-color: #ffc107!important
+}
+
+#conversejs .border-danger {
+    border-color: #dc3545!important
+}
+
+#conversejs .border-light {
+    border-color: #f8f9fa!important
+}
+
+#conversejs .border-dark {
+    border-color: #343a40!important
+}
+
+#conversejs .border-white {
+    border-color: #fff!important
+}
+
+#conversejs .rounded-sm {
+    border-radius: .2rem!important
+}
+
+#conversejs .rounded {
+    border-radius: .25rem!important
+}
+
+#conversejs .rounded-top {
+    border-top-left-radius: .25rem!important;
+    border-top-right-radius: .25rem!important
+}
+
+#conversejs .rounded-right {
+    border-top-right-radius: .25rem!important;
+    border-bottom-right-radius: .25rem!important
+}
+
+#conversejs .rounded-bottom {
+    border-bottom-right-radius: .25rem!important;
+    border-bottom-left-radius: .25rem!important
+}
+
+#conversejs .rounded-left {
+    border-top-left-radius: .25rem!important;
+    border-bottom-left-radius: .25rem!important
+}
+
+#conversejs .rounded-lg {
+    border-radius: .3rem!important
+}
+
+#conversejs .rounded-circle {
+    border-radius: 50%!important
+}
+
+#conversejs .rounded-pill {
+    border-radius: 50rem!important
+}
+
+#conversejs .rounded-0 {
+    border-radius: 0!important
+}
+
+#conversejs .clearfix::after {
+    display: block;
+    clear: both;
+    content: ""
+}
+
+#conversejs .d-none {
+    display: none!important
+}
+
+#conversejs .d-inline {
+    display: inline!important
+}
+
+#conversejs .d-inline-block {
+    display: inline-block!important
+}
+
+#conversejs .d-block {
+    display: block!important
+}
+
+#conversejs .d-table {
+    display: table!important
+}
+
+#conversejs .d-table-row {
+    display: table-row!important
+}
+
+#conversejs .d-table-cell {
+    display: table-cell!important
+}
+
+#conversejs .d-flex {
+    display: flex!important
+}
+
+#conversejs .d-inline-flex {
+    display: inline-flex!important
+}
+
+@media (min-width:576px) {
+    #conversejs .d-sm-none {
+        display: none!important
+    }
+    #conversejs .d-sm-inline {
+        display: inline!important
+    }
+    #conversejs .d-sm-inline-block {
+        display: inline-block!important
+    }
+    #conversejs .d-sm-block {
+        display: block!important
+    }
+    #conversejs .d-sm-table {
+        display: table!important
+    }
+    #conversejs .d-sm-table-row {
+        display: table-row!important
+    }
+    #conversejs .d-sm-table-cell {
+        display: table-cell!important
+    }
+    #conversejs .d-sm-flex {
+        display: flex!important
+    }
+    #conversejs .d-sm-inline-flex {
+        display: inline-flex!important
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .d-md-none {
+        display: none!important
+    }
+    #conversejs .d-md-inline {
+        display: inline!important
+    }
+    #conversejs .d-md-inline-block {
+        display: inline-block!important
+    }
+    #conversejs .d-md-block {
+        display: block!important
+    }
+    #conversejs .d-md-table {
+        display: table!important
+    }
+    #conversejs .d-md-table-row {
+        display: table-row!important
+    }
+    #conversejs .d-md-table-cell {
+        display: table-cell!important
+    }
+    #conversejs .d-md-flex {
+        display: flex!important
+    }
+    #conversejs .d-md-inline-flex {
+        display: inline-flex!important
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .d-lg-none {
+        display: none!important
+    }
+    #conversejs .d-lg-inline {
+        display: inline!important
+    }
+    #conversejs .d-lg-inline-block {
+        display: inline-block!important
+    }
+    #conversejs .d-lg-block {
+        display: block!important
+    }
+    #conversejs .d-lg-table {
+        display: table!important
+    }
+    #conversejs .d-lg-table-row {
+        display: table-row!important
+    }
+    #conversejs .d-lg-table-cell {
+        display: table-cell!important
+    }
+    #conversejs .d-lg-flex {
+        display: flex!important
+    }
+    #conversejs .d-lg-inline-flex {
+        display: inline-flex!important
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .d-xl-none {
+        display: none!important
+    }
+    #conversejs .d-xl-inline {
+        display: inline!important
+    }
+    #conversejs .d-xl-inline-block {
+        display: inline-block!important
+    }
+    #conversejs .d-xl-block {
+        display: block!important
+    }
+    #conversejs .d-xl-table {
+        display: table!important
+    }
+    #conversejs .d-xl-table-row {
+        display: table-row!important
+    }
+    #conversejs .d-xl-table-cell {
+        display: table-cell!important
+    }
+    #conversejs .d-xl-flex {
+        display: flex!important
+    }
+    #conversejs .d-xl-inline-flex {
+        display: inline-flex!important
+    }
+}
+
+@media print {
+    #conversejs .d-print-none {
+        display: none!important
+    }
+    #conversejs .d-print-inline {
+        display: inline!important
+    }
+    #conversejs .d-print-inline-block {
+        display: inline-block!important
+    }
+    #conversejs .d-print-block {
+        display: block!important
+    }
+    #conversejs .d-print-table {
+        display: table!important
+    }
+    #conversejs .d-print-table-row {
+        display: table-row!important
+    }
+    #conversejs .d-print-table-cell {
+        display: table-cell!important
+    }
+    #conversejs .d-print-flex {
+        display: flex!important
+    }
+    #conversejs .d-print-inline-flex {
+        display: inline-flex!important
+    }
+}
+
+#conversejs .embed-responsive {
+    position: relative;
+    display: block;
+    width: 100%;
+    padding: 0;
+    overflow: hidden
+}
+
+#conversejs .embed-responsive::before {
+    display: block;
+    content: ""
+}
+
+#conversejs .embed-responsive .embed-responsive-item,
+#conversejs .embed-responsive embed,
+#conversejs .embed-responsive iframe,
+#conversejs .embed-responsive object,
+#conversejs .embed-responsive video {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    border: 0
+}
+
+#conversejs .embed-responsive-21by9::before {
+    padding-top: 42.85714%
+}
+
+#conversejs .embed-responsive-16by9::before {
+    padding-top: 56.25%
+}
+
+#conversejs .embed-responsive-4by3::before {
+    padding-top: 75%
+}
+
+#conversejs .embed-responsive-1by1::before {
+    padding-top: 100%
+}
+
+#conversejs .flex-row {
+    flex-direction: row!important
+}
+
+#conversejs .flex-column {
+    flex-direction: column!important
+}
+
+#conversejs .flex-row-reverse {
+    flex-direction: row-reverse!important
+}
+
+#conversejs .flex-column-reverse {
+    flex-direction: column-reverse!important
+}
+
+#conversejs .flex-wrap {
+    flex-wrap: wrap!important
+}
+
+#conversejs .flex-nowrap {
+    flex-wrap: nowrap!important
+}
+
+#conversejs .flex-wrap-reverse {
+    flex-wrap: wrap-reverse!important
+}
+
+#conversejs .flex-fill {
+    flex: 1 1 auto!important
+}
+
+#conversejs .flex-grow-0 {
+    flex-grow: 0!important
+}
+
+#conversejs .flex-grow-1 {
+    flex-grow: 1!important
+}
+
+#conversejs .flex-shrink-0 {
+    flex-shrink: 0!important
+}
+
+#conversejs .flex-shrink-1 {
+    flex-shrink: 1!important
+}
+
+#conversejs .justify-content-start {
+    justify-content: flex-start!important
+}
+
+#conversejs .justify-content-end {
+    justify-content: flex-end!important
+}
+
+#conversejs .justify-content-center {
+    justify-content: center!important
+}
+
+#conversejs .justify-content-between {
+    justify-content: space-between!important
+}
+
+#conversejs .justify-content-around {
+    justify-content: space-around!important
+}
+
+#conversejs .align-items-start {
+    align-items: flex-start!important
+}
+
+#conversejs .align-items-end {
+    align-items: flex-end!important
+}
+
+#conversejs .align-items-center {
+    align-items: center!important
+}
+
+#conversejs .align-items-baseline {
+    align-items: baseline!important
+}
+
+#conversejs .align-items-stretch {
+    align-items: stretch!important
+}
+
+#conversejs .align-content-start {
+    align-content: flex-start!important
+}
+
+#conversejs .align-content-end {
+    align-content: flex-end!important
+}
+
+#conversejs .align-content-center {
+    align-content: center!important
+}
+
+#conversejs .align-content-between {
+    align-content: space-between!important
+}
+
+#conversejs .align-content-around {
+    align-content: space-around!important
+}
+
+#conversejs .align-content-stretch {
+    align-content: stretch!important
+}
+
+#conversejs .align-self-auto {
+    align-self: auto!important
+}
+
+#conversejs .align-self-start {
+    align-self: flex-start!important
+}
+
+#conversejs .align-self-end {
+    align-self: flex-end!important
+}
+
+#conversejs .align-self-center {
+    align-self: center!important
+}
+
+#conversejs .align-self-baseline {
+    align-self: baseline!important
+}
+
+#conversejs .align-self-stretch {
+    align-self: stretch!important
+}
+
+@media (min-width:576px) {
+    #conversejs .flex-sm-row {
+        flex-direction: row!important
+    }
+    #conversejs .flex-sm-column {
+        flex-direction: column!important
+    }
+    #conversejs .flex-sm-row-reverse {
+        flex-direction: row-reverse!important
+    }
+    #conversejs .flex-sm-column-reverse {
+        flex-direction: column-reverse!important
+    }
+    #conversejs .flex-sm-wrap {
+        flex-wrap: wrap!important
+    }
+    #conversejs .flex-sm-nowrap {
+        flex-wrap: nowrap!important
+    }
+    #conversejs .flex-sm-wrap-reverse {
+        flex-wrap: wrap-reverse!important
+    }
+    #conversejs .flex-sm-fill {
+        flex: 1 1 auto!important
+    }
+    #conversejs .flex-sm-grow-0 {
+        flex-grow: 0!important
+    }
+    #conversejs .flex-sm-grow-1 {
+        flex-grow: 1!important
+    }
+    #conversejs .flex-sm-shrink-0 {
+        flex-shrink: 0!important
+    }
+    #conversejs .flex-sm-shrink-1 {
+        flex-shrink: 1!important
+    }
+    #conversejs .justify-content-sm-start {
+        justify-content: flex-start!important
+    }
+    #conversejs .justify-content-sm-end {
+        justify-content: flex-end!important
+    }
+    #conversejs .justify-content-sm-center {
+        justify-content: center!important
+    }
+    #conversejs .justify-content-sm-between {
+        justify-content: space-between!important
+    }
+    #conversejs .justify-content-sm-around {
+        justify-content: space-around!important
+    }
+    #conversejs .align-items-sm-start {
+        align-items: flex-start!important
+    }
+    #conversejs .align-items-sm-end {
+        align-items: flex-end!important
+    }
+    #conversejs .align-items-sm-center {
+        align-items: center!important
+    }
+    #conversejs .align-items-sm-baseline {
+        align-items: baseline!important
+    }
+    #conversejs .align-items-sm-stretch {
+        align-items: stretch!important
+    }
+    #conversejs .align-content-sm-start {
+        align-content: flex-start!important
+    }
+    #conversejs .align-content-sm-end {
+        align-content: flex-end!important
+    }
+    #conversejs .align-content-sm-center {
+        align-content: center!important
+    }
+    #conversejs .align-content-sm-between {
+        align-content: space-between!important
+    }
+    #conversejs .align-content-sm-around {
+        align-content: space-around!important
+    }
+    #conversejs .align-content-sm-stretch {
+        align-content: stretch!important
+    }
+    #conversejs .align-self-sm-auto {
+        align-self: auto!important
+    }
+    #conversejs .align-self-sm-start {
+        align-self: flex-start!important
+    }
+    #conversejs .align-self-sm-end {
+        align-self: flex-end!important
+    }
+    #conversejs .align-self-sm-center {
+        align-self: center!important
+    }
+    #conversejs .align-self-sm-baseline {
+        align-self: baseline!important
+    }
+    #conversejs .align-self-sm-stretch {
+        align-self: stretch!important
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .flex-md-row {
+        flex-direction: row!important
+    }
+    #conversejs .flex-md-column {
+        flex-direction: column!important
+    }
+    #conversejs .flex-md-row-reverse {
+        flex-direction: row-reverse!important
+    }
+    #conversejs .flex-md-column-reverse {
+        flex-direction: column-reverse!important
+    }
+    #conversejs .flex-md-wrap {
+        flex-wrap: wrap!important
+    }
+    #conversejs .flex-md-nowrap {
+        flex-wrap: nowrap!important
+    }
+    #conversejs .flex-md-wrap-reverse {
+        flex-wrap: wrap-reverse!important
+    }
+    #conversejs .flex-md-fill {
+        flex: 1 1 auto!important
+    }
+    #conversejs .flex-md-grow-0 {
+        flex-grow: 0!important
+    }
+    #conversejs .flex-md-grow-1 {
+        flex-grow: 1!important
+    }
+    #conversejs .flex-md-shrink-0 {
+        flex-shrink: 0!important
+    }
+    #conversejs .flex-md-shrink-1 {
+        flex-shrink: 1!important
+    }
+    #conversejs .justify-content-md-start {
+        justify-content: flex-start!important
+    }
+    #conversejs .justify-content-md-end {
+        justify-content: flex-end!important
+    }
+    #conversejs .justify-content-md-center {
+        justify-content: center!important
+    }
+    #conversejs .justify-content-md-between {
+        justify-content: space-between!important
+    }
+    #conversejs .justify-content-md-around {
+        justify-content: space-around!important
+    }
+    #conversejs .align-items-md-start {
+        align-items: flex-start!important
+    }
+    #conversejs .align-items-md-end {
+        align-items: flex-end!important
+    }
+    #conversejs .align-items-md-center {
+        align-items: center!important
+    }
+    #conversejs .align-items-md-baseline {
+        align-items: baseline!important
+    }
+    #conversejs .align-items-md-stretch {
+        align-items: stretch!important
+    }
+    #conversejs .align-content-md-start {
+        align-content: flex-start!important
+    }
+    #conversejs .align-content-md-end {
+        align-content: flex-end!important
+    }
+    #conversejs .align-content-md-center {
+        align-content: center!important
+    }
+    #conversejs .align-content-md-between {
+        align-content: space-between!important
+    }
+    #conversejs .align-content-md-around {
+        align-content: space-around!important
+    }
+    #conversejs .align-content-md-stretch {
+        align-content: stretch!important
+    }
+    #conversejs .align-self-md-auto {
+        align-self: auto!important
+    }
+    #conversejs .align-self-md-start {
+        align-self: flex-start!important
+    }
+    #conversejs .align-self-md-end {
+        align-self: flex-end!important
+    }
+    #conversejs .align-self-md-center {
+        align-self: center!important
+    }
+    #conversejs .align-self-md-baseline {
+        align-self: baseline!important
+    }
+    #conversejs .align-self-md-stretch {
+        align-self: stretch!important
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .flex-lg-row {
+        flex-direction: row!important
+    }
+    #conversejs .flex-lg-column {
+        flex-direction: column!important
+    }
+    #conversejs .flex-lg-row-reverse {
+        flex-direction: row-reverse!important
+    }
+    #conversejs .flex-lg-column-reverse {
+        flex-direction: column-reverse!important
+    }
+    #conversejs .flex-lg-wrap {
+        flex-wrap: wrap!important
+    }
+    #conversejs .flex-lg-nowrap {
+        flex-wrap: nowrap!important
+    }
+    #conversejs .flex-lg-wrap-reverse {
+        flex-wrap: wrap-reverse!important
+    }
+    #conversejs .flex-lg-fill {
+        flex: 1 1 auto!important
+    }
+    #conversejs .flex-lg-grow-0 {
+        flex-grow: 0!important
+    }
+    #conversejs .flex-lg-grow-1 {
+        flex-grow: 1!important
+    }
+    #conversejs .flex-lg-shrink-0 {
+        flex-shrink: 0!important
+    }
+    #conversejs .flex-lg-shrink-1 {
+        flex-shrink: 1!important
+    }
+    #conversejs .justify-content-lg-start {
+        justify-content: flex-start!important
+    }
+    #conversejs .justify-content-lg-end {
+        justify-content: flex-end!important
+    }
+    #conversejs .justify-content-lg-center {
+        justify-content: center!important
+    }
+    #conversejs .justify-content-lg-between {
+        justify-content: space-between!important
+    }
+    #conversejs .justify-content-lg-around {
+        justify-content: space-around!important
+    }
+    #conversejs .align-items-lg-start {
+        align-items: flex-start!important
+    }
+    #conversejs .align-items-lg-end {
+        align-items: flex-end!important
+    }
+    #conversejs .align-items-lg-center {
+        align-items: center!important
+    }
+    #conversejs .align-items-lg-baseline {
+        align-items: baseline!important
+    }
+    #conversejs .align-items-lg-stretch {
+        align-items: stretch!important
+    }
+    #conversejs .align-content-lg-start {
+        align-content: flex-start!important
+    }
+    #conversejs .align-content-lg-end {
+        align-content: flex-end!important
+    }
+    #conversejs .align-content-lg-center {
+        align-content: center!important
+    }
+    #conversejs .align-content-lg-between {
+        align-content: space-between!important
+    }
+    #conversejs .align-content-lg-around {
+        align-content: space-around!important
+    }
+    #conversejs .align-content-lg-stretch {
+        align-content: stretch!important
+    }
+    #conversejs .align-self-lg-auto {
+        align-self: auto!important
+    }
+    #conversejs .align-self-lg-start {
+        align-self: flex-start!important
+    }
+    #conversejs .align-self-lg-end {
+        align-self: flex-end!important
+    }
+    #conversejs .align-self-lg-center {
+        align-self: center!important
+    }
+    #conversejs .align-self-lg-baseline {
+        align-self: baseline!important
+    }
+    #conversejs .align-self-lg-stretch {
+        align-self: stretch!important
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .flex-xl-row {
+        flex-direction: row!important
+    }
+    #conversejs .flex-xl-column {
+        flex-direction: column!important
+    }
+    #conversejs .flex-xl-row-reverse {
+        flex-direction: row-reverse!important
+    }
+    #conversejs .flex-xl-column-reverse {
+        flex-direction: column-reverse!important
+    }
+    #conversejs .flex-xl-wrap {
+        flex-wrap: wrap!important
+    }
+    #conversejs .flex-xl-nowrap {
+        flex-wrap: nowrap!important
+    }
+    #conversejs .flex-xl-wrap-reverse {
+        flex-wrap: wrap-reverse!important
+    }
+    #conversejs .flex-xl-fill {
+        flex: 1 1 auto!important
+    }
+    #conversejs .flex-xl-grow-0 {
+        flex-grow: 0!important
+    }
+    #conversejs .flex-xl-grow-1 {
+        flex-grow: 1!important
+    }
+    #conversejs .flex-xl-shrink-0 {
+        flex-shrink: 0!important
+    }
+    #conversejs .flex-xl-shrink-1 {
+        flex-shrink: 1!important
+    }
+    #conversejs .justify-content-xl-start {
+        justify-content: flex-start!important
+    }
+    #conversejs .justify-content-xl-end {
+        justify-content: flex-end!important
+    }
+    #conversejs .justify-content-xl-center {
+        justify-content: center!important
+    }
+    #conversejs .justify-content-xl-between {
+        justify-content: space-between!important
+    }
+    #conversejs .justify-content-xl-around {
+        justify-content: space-around!important
+    }
+    #conversejs .align-items-xl-start {
+        align-items: flex-start!important
+    }
+    #conversejs .align-items-xl-end {
+        align-items: flex-end!important
+    }
+    #conversejs .align-items-xl-center {
+        align-items: center!important
+    }
+    #conversejs .align-items-xl-baseline {
+        align-items: baseline!important
+    }
+    #conversejs .align-items-xl-stretch {
+        align-items: stretch!important
+    }
+    #conversejs .align-content-xl-start {
+        align-content: flex-start!important
+    }
+    #conversejs .align-content-xl-end {
+        align-content: flex-end!important
+    }
+    #conversejs .align-content-xl-center {
+        align-content: center!important
+    }
+    #conversejs .align-content-xl-between {
+        align-content: space-between!important
+    }
+    #conversejs .align-content-xl-around {
+        align-content: space-around!important
+    }
+    #conversejs .align-content-xl-stretch {
+        align-content: stretch!important
+    }
+    #conversejs .align-self-xl-auto {
+        align-self: auto!important
+    }
+    #conversejs .align-self-xl-start {
+        align-self: flex-start!important
+    }
+    #conversejs .align-self-xl-end {
+        align-self: flex-end!important
+    }
+    #conversejs .align-self-xl-center {
+        align-self: center!important
+    }
+    #conversejs .align-self-xl-baseline {
+        align-self: baseline!important
+    }
+    #conversejs .align-self-xl-stretch {
+        align-self: stretch!important
+    }
+}
+
+#conversejs .float-left {
+    float: left!important
+}
+
+#conversejs .float-right {
+    float: right!important
+}
+
+#conversejs .float-none {
+    float: none!important
+}
+
+@media (min-width:576px) {
+    #conversejs .float-sm-left {
+        float: left!important
+    }
+    #conversejs .float-sm-right {
+        float: right!important
+    }
+    #conversejs .float-sm-none {
+        float: none!important
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .float-md-left {
+        float: left!important
+    }
+    #conversejs .float-md-right {
+        float: right!important
+    }
+    #conversejs .float-md-none {
+        float: none!important
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .float-lg-left {
+        float: left!important
+    }
+    #conversejs .float-lg-right {
+        float: right!important
+    }
+    #conversejs .float-lg-none {
+        float: none!important
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .float-xl-left {
+        float: left!important
+    }
+    #conversejs .float-xl-right {
+        float: right!important
+    }
+    #conversejs .float-xl-none {
+        float: none!important
+    }
+}
+
+#conversejs .overflow-auto {
+    overflow: auto!important
+}
+
+#conversejs .overflow-hidden {
+    overflow: hidden!important
+}
+
+#conversejs .position-static {
+    position: static!important
+}
+
+#conversejs .position-relative {
+    position: relative!important
+}
+
+#conversejs .position-absolute {
+    position: absolute!important
+}
+
+#conversejs .position-fixed {
+    position: fixed!important
+}
+
+#conversejs .position-sticky {
+    position: -webkit-sticky!important;
+    position: sticky!important
+}
+
+#conversejs .fixed-top {
+    position: fixed;
+    top: 0;
+    right: 0;
+    left: 0;
+    z-index: 1030
+}
+
+#conversejs .fixed-bottom {
+    position: fixed;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 1030
+}
+
+@supports ((position:-webkit-sticky) or (position:sticky)) {
+    #conversejs .sticky-top {
+        position: -webkit-sticky;
+        position: sticky;
+        top: 0;
+        z-index: 1020
+    }
+}
+
+#conversejs .sr-only {
+    position: absolute;
+    width: 1px;
+    height: 1px;
+    padding: 0;
+    overflow: hidden;
+    clip: rect(0, 0, 0, 0);
+    white-space: nowrap;
+    border: 0
+}
+
+#conversejs .sr-only-focusable:active,
+#conversejs .sr-only-focusable:focus {
+    position: static;
+    width: auto;
+    height: auto;
+    overflow: visible;
+    clip: auto;
+    white-space: normal
+}
+
+#conversejs .shadow-sm {
+    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075)!important
+}
+
+#conversejs .shadow {
+    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15)!important
+}
+
+#conversejs .shadow-lg {
+    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175)!important
+}
+
+#conversejs .shadow-none {
+    box-shadow: none!important
+}
+
+#conversejs .w-25 {
+    width: 25%!important
+}
+
+#conversejs .w-50 {
+    width: 50%!important
+}
+
+#conversejs .w-75 {
+    width: 75%!important
+}
+
+#conversejs .w-100 {
+    width: 100%!important
+}
+
+#conversejs .w-auto {
+    width: auto!important
+}
+
+#conversejs .h-25 {
+    height: 25%!important
+}
+
+#conversejs .h-50 {
+    height: 50%!important
+}
+
+#conversejs .h-75 {
+    height: 75%!important
+}
+
+#conversejs .h-100 {
+    height: 100%!important
+}
+
+#conversejs .h-auto {
+    height: auto!important
+}
+
+#conversejs .mw-100 {
+    max-width: 100%!important
+}
+
+#conversejs .mh-100 {
+    max-height: 100%!important
+}
+
+#conversejs .min-vw-100 {
+    min-width: 100vw!important
+}
+
+#conversejs .min-vh-100 {
+    min-height: 100vh!important
+}
+
+#conversejs .vw-100 {
+    width: 100vw!important
+}
+
+#conversejs .vh-100 {
+    height: 100vh!important
+}
+
+#conversejs .stretched-link::after {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 1;
+    pointer-events: auto;
+    content: "";
+    background-color: rgba(0, 0, 0, 0)
+}
+
+#conversejs .m-0 {
+    margin: 0!important
+}
+
+#conversejs .mt-0,
+#conversejs .my-0 {
+    margin-top: 0!important
+}
+
+#conversejs .mr-0,
+#conversejs .mx-0 {
+    margin-right: 0!important
+}
+
+#conversejs .mb-0,
+#conversejs .my-0 {
+    margin-bottom: 0!important
+}
+
+#conversejs .ml-0,
+#conversejs .mx-0 {
+    margin-left: 0!important
+}
+
+#conversejs .m-1 {
+    margin: .25rem!important
+}
+
+#conversejs .mt-1,
+#conversejs .my-1 {
+    margin-top: .25rem!important
+}
+
+#conversejs .mr-1,
+#conversejs .mx-1 {
+    margin-right: .25rem!important
+}
+
+#conversejs .mb-1,
+#conversejs .my-1 {
+    margin-bottom: .25rem!important
+}
+
+#conversejs .ml-1,
+#conversejs .mx-1 {
+    margin-left: .25rem!important
+}
+
+#conversejs .m-2 {
+    margin: .5rem!important
+}
+
+#conversejs .mt-2,
+#conversejs .my-2 {
+    margin-top: .5rem!important
+}
+
+#conversejs .mr-2,
+#conversejs .mx-2 {
+    margin-right: .5rem!important
+}
+
+#conversejs .mb-2,
+#conversejs .my-2 {
+    margin-bottom: .5rem!important
+}
+
+#conversejs .ml-2,
+#conversejs .mx-2 {
+    margin-left: .5rem!important
+}
+
+#conversejs .m-3 {
+    margin: 1rem!important
+}
+
+#conversejs .mt-3,
+#conversejs .my-3 {
+    margin-top: 1rem!important
+}
+
+#conversejs .mr-3,
+#conversejs .mx-3 {
+    margin-right: 1rem!important
+}
+
+#conversejs .mb-3,
+#conversejs .my-3 {
+    margin-bottom: 1rem!important
+}
+
+#conversejs .ml-3,
+#conversejs .mx-3 {
+    margin-left: 1rem!important
+}
+
+#conversejs .m-4 {
+    margin: 1.5rem!important
+}
+
+#conversejs .mt-4,
+#conversejs .my-4 {
+    margin-top: 1.5rem!important
+}
+
+#conversejs .mr-4,
+#conversejs .mx-4 {
+    margin-right: 1.5rem!important
+}
+
+#conversejs .mb-4,
+#conversejs .my-4 {
+    margin-bottom: 1.5rem!important
+}
+
+#conversejs .ml-4,
+#conversejs .mx-4 {
+    margin-left: 1.5rem!important
+}
+
+#conversejs .m-5 {
+    margin: 3rem!important
+}
+
+#conversejs .mt-5,
+#conversejs .my-5 {
+    margin-top: 3rem!important
+}
+
+#conversejs .mr-5,
+#conversejs .mx-5 {
+    margin-right: 3rem!important
+}
+
+#conversejs .mb-5,
+#conversejs .my-5 {
+    margin-bottom: 3rem!important
+}
+
+#conversejs .ml-5,
+#conversejs .mx-5 {
+    margin-left: 3rem!important
+}
+
+#conversejs .p-0 {
+    padding: 0!important
+}
+
+#conversejs .pt-0,
+#conversejs .py-0 {
+    padding-top: 0!important
+}
+
+#conversejs .pr-0,
+#conversejs .px-0 {
+    padding-right: 0!important
+}
+
+#conversejs .pb-0,
+#conversejs .py-0 {
+    padding-bottom: 0!important
+}
+
+#conversejs .pl-0,
+#conversejs .px-0 {
+    padding-left: 0!important
+}
+
+#conversejs .p-1 {
+    padding: .25rem!important
+}
+
+#conversejs .pt-1,
+#conversejs .py-1 {
+    padding-top: .25rem!important
+}
+
+#conversejs .pr-1,
+#conversejs .px-1 {
+    padding-right: .25rem!important
+}
+
+#conversejs .pb-1,
+#conversejs .py-1 {
+    padding-bottom: .25rem!important
+}
+
+#conversejs .pl-1,
+#conversejs .px-1 {
+    padding-left: .25rem!important
+}
+
+#conversejs .p-2 {
+    padding: .5rem!important
+}
+
+#conversejs .pt-2,
+#conversejs .py-2 {
+    padding-top: .5rem!important
+}
+
+#conversejs .pr-2,
+#conversejs .px-2 {
+    padding-right: .5rem!important
+}
+
+#conversejs .pb-2,
+#conversejs .py-2 {
+    padding-bottom: .5rem!important
+}
+
+#conversejs .pl-2,
+#conversejs .px-2 {
+    padding-left: .5rem!important
+}
+
+#conversejs .p-3 {
+    padding: 1rem!important
+}
+
+#conversejs .pt-3,
+#conversejs .py-3 {
+    padding-top: 1rem!important
+}
+
+#conversejs .pr-3,
+#conversejs .px-3 {
+    padding-right: 1rem!important
+}
+
+#conversejs .pb-3,
+#conversejs .py-3 {
+    padding-bottom: 1rem!important
+}
+
+#conversejs .pl-3,
+#conversejs .px-3 {
+    padding-left: 1rem!important
+}
+
+#conversejs .p-4 {
+    padding: 1.5rem!important
+}
+
+#conversejs .pt-4,
+#conversejs .py-4 {
+    padding-top: 1.5rem!important
+}
+
+#conversejs .pr-4,
+#conversejs .px-4 {
+    padding-right: 1.5rem!important
+}
+
+#conversejs .pb-4,
+#conversejs .py-4 {
+    padding-bottom: 1.5rem!important
+}
+
+#conversejs .pl-4,
+#conversejs .px-4 {
+    padding-left: 1.5rem!important
+}
+
+#conversejs .p-5 {
+    padding: 3rem!important
+}
+
+#conversejs .pt-5,
+#conversejs .py-5 {
+    padding-top: 3rem!important
+}
+
+#conversejs .pr-5,
+#conversejs .px-5 {
+    padding-right: 3rem!important
+}
+
+#conversejs .pb-5,
+#conversejs .py-5 {
+    padding-bottom: 3rem!important
+}
+
+#conversejs .pl-5,
+#conversejs .px-5 {
+    padding-left: 3rem!important
+}
+
+#conversejs .m-n1 {
+    margin: -.25rem!important
+}
+
+#conversejs .mt-n1,
+#conversejs .my-n1 {
+    margin-top: -.25rem!important
+}
+
+#conversejs .mr-n1,
+#conversejs .mx-n1 {
+    margin-right: -.25rem!important
+}
+
+#conversejs .mb-n1,
+#conversejs .my-n1 {
+    margin-bottom: -.25rem!important
+}
+
+#conversejs .ml-n1,
+#conversejs .mx-n1 {
+    margin-left: -.25rem!important
+}
+
+#conversejs .m-n2 {
+    margin: -.5rem!important
+}
+
+#conversejs .mt-n2,
+#conversejs .my-n2 {
+    margin-top: -.5rem!important
+}
+
+#conversejs .mr-n2,
+#conversejs .mx-n2 {
+    margin-right: -.5rem!important
+}
+
+#conversejs .mb-n2,
+#conversejs .my-n2 {
+    margin-bottom: -.5rem!important
+}
+
+#conversejs .ml-n2,
+#conversejs .mx-n2 {
+    margin-left: -.5rem!important
+}
+
+#conversejs .m-n3 {
+    margin: -1rem!important
+}
+
+#conversejs .mt-n3,
+#conversejs .my-n3 {
+    margin-top: -1rem!important
+}
+
+#conversejs .mr-n3,
+#conversejs .mx-n3 {
+    margin-right: -1rem!important
+}
+
+#conversejs .mb-n3,
+#conversejs .my-n3 {
+    margin-bottom: -1rem!important
+}
+
+#conversejs .ml-n3,
+#conversejs .mx-n3 {
+    margin-left: -1rem!important
+}
+
+#conversejs .m-n4 {
+    margin: -1.5rem!important
+}
+
+#conversejs .mt-n4,
+#conversejs .my-n4 {
+    margin-top: -1.5rem!important
+}
+
+#conversejs .mr-n4,
+#conversejs .mx-n4 {
+    margin-right: -1.5rem!important
+}
+
+#conversejs .mb-n4,
+#conversejs .my-n4 {
+    margin-bottom: -1.5rem!important
+}
+
+#conversejs .ml-n4,
+#conversejs .mx-n4 {
+    margin-left: -1.5rem!important
+}
+
+#conversejs .m-n5 {
+    margin: -3rem!important
+}
+
+#conversejs .mt-n5,
+#conversejs .my-n5 {
+    margin-top: -3rem!important
+}
+
+#conversejs .mr-n5,
+#conversejs .mx-n5 {
+    margin-right: -3rem!important
+}
+
+#conversejs .mb-n5,
+#conversejs .my-n5 {
+    margin-bottom: -3rem!important
+}
+
+#conversejs .ml-n5,
+#conversejs .mx-n5 {
+    margin-left: -3rem!important
+}
+
+#conversejs .m-auto {
+    margin: auto!important
+}
+
+#conversejs .mt-auto,
+#conversejs .my-auto {
+    margin-top: auto!important
+}
+
+#conversejs .mr-auto,
+#conversejs .mx-auto {
+    margin-right: auto!important
+}
+
+#conversejs .mb-auto,
+#conversejs .my-auto {
+    margin-bottom: auto!important
+}
+
+#conversejs .ml-auto,
+#conversejs .mx-auto {
+    margin-left: auto!important
+}
+
+@media (min-width:576px) {
+    #conversejs .m-sm-0 {
+        margin: 0!important
+    }
+    #conversejs .mt-sm-0,
+    #conversejs .my-sm-0 {
+        margin-top: 0!important
+    }
+    #conversejs .mr-sm-0,
+    #conversejs .mx-sm-0 {
+        margin-right: 0!important
+    }
+    #conversejs .mb-sm-0,
+    #conversejs .my-sm-0 {
+        margin-bottom: 0!important
+    }
+    #conversejs .ml-sm-0,
+    #conversejs .mx-sm-0 {
+        margin-left: 0!important
+    }
+    #conversejs .m-sm-1 {
+        margin: .25rem!important
+    }
+    #conversejs .mt-sm-1,
+    #conversejs .my-sm-1 {
+        margin-top: .25rem!important
+    }
+    #conversejs .mr-sm-1,
+    #conversejs .mx-sm-1 {
+        margin-right: .25rem!important
+    }
+    #conversejs .mb-sm-1,
+    #conversejs .my-sm-1 {
+        margin-bottom: .25rem!important
+    }
+    #conversejs .ml-sm-1,
+    #conversejs .mx-sm-1 {
+        margin-left: .25rem!important
+    }
+    #conversejs .m-sm-2 {
+        margin: .5rem!important
+    }
+    #conversejs .mt-sm-2,
+    #conversejs .my-sm-2 {
+        margin-top: .5rem!important
+    }
+    #conversejs .mr-sm-2,
+    #conversejs .mx-sm-2 {
+        margin-right: .5rem!important
+    }
+    #conversejs .mb-sm-2,
+    #conversejs .my-sm-2 {
+        margin-bottom: .5rem!important
+    }
+    #conversejs .ml-sm-2,
+    #conversejs .mx-sm-2 {
+        margin-left: .5rem!important
+    }
+    #conversejs .m-sm-3 {
+        margin: 1rem!important
+    }
+    #conversejs .mt-sm-3,
+    #conversejs .my-sm-3 {
+        margin-top: 1rem!important
+    }
+    #conversejs .mr-sm-3,
+    #conversejs .mx-sm-3 {
+        margin-right: 1rem!important
+    }
+    #conversejs .mb-sm-3,
+    #conversejs .my-sm-3 {
+        margin-bottom: 1rem!important
+    }
+    #conversejs .ml-sm-3,
+    #conversejs .mx-sm-3 {
+        margin-left: 1rem!important
+    }
+    #conversejs .m-sm-4 {
+        margin: 1.5rem!important
+    }
+    #conversejs .mt-sm-4,
+    #conversejs .my-sm-4 {
+        margin-top: 1.5rem!important
+    }
+    #conversejs .mr-sm-4,
+    #conversejs .mx-sm-4 {
+        margin-right: 1.5rem!important
+    }
+    #conversejs .mb-sm-4,
+    #conversejs .my-sm-4 {
+        margin-bottom: 1.5rem!important
+    }
+    #conversejs .ml-sm-4,
+    #conversejs .mx-sm-4 {
+        margin-left: 1.5rem!important
+    }
+    #conversejs .m-sm-5 {
+        margin: 3rem!important
+    }
+    #conversejs .mt-sm-5,
+    #conversejs .my-sm-5 {
+        margin-top: 3rem!important
+    }
+    #conversejs .mr-sm-5,
+    #conversejs .mx-sm-5 {
+        margin-right: 3rem!important
+    }
+    #conversejs .mb-sm-5,
+    #conversejs .my-sm-5 {
+        margin-bottom: 3rem!important
+    }
+    #conversejs .ml-sm-5,
+    #conversejs .mx-sm-5 {
+        margin-left: 3rem!important
+    }
+    #conversejs .p-sm-0 {
+        padding: 0!important
+    }
+    #conversejs .pt-sm-0,
+    #conversejs .py-sm-0 {
+        padding-top: 0!important
+    }
+    #conversejs .pr-sm-0,
+    #conversejs .px-sm-0 {
+        padding-right: 0!important
+    }
+    #conversejs .pb-sm-0,
+    #conversejs .py-sm-0 {
+        padding-bottom: 0!important
+    }
+    #conversejs .pl-sm-0,
+    #conversejs .px-sm-0 {
+        padding-left: 0!important
+    }
+    #conversejs .p-sm-1 {
+        padding: .25rem!important
+    }
+    #conversejs .pt-sm-1,
+    #conversejs .py-sm-1 {
+        padding-top: .25rem!important
+    }
+    #conversejs .pr-sm-1,
+    #conversejs .px-sm-1 {
+        padding-right: .25rem!important
+    }
+    #conversejs .pb-sm-1,
+    #conversejs .py-sm-1 {
+        padding-bottom: .25rem!important
+    }
+    #conversejs .pl-sm-1,
+    #conversejs .px-sm-1 {
+        padding-left: .25rem!important
+    }
+    #conversejs .p-sm-2 {
+        padding: .5rem!important
+    }
+    #conversejs .pt-sm-2,
+    #conversejs .py-sm-2 {
+        padding-top: .5rem!important
+    }
+    #conversejs .pr-sm-2,
+    #conversejs .px-sm-2 {
+        padding-right: .5rem!important
+    }
+    #conversejs .pb-sm-2,
+    #conversejs .py-sm-2 {
+        padding-bottom: .5rem!important
+    }
+    #conversejs .pl-sm-2,
+    #conversejs .px-sm-2 {
+        padding-left: .5rem!important
+    }
+    #conversejs .p-sm-3 {
+        padding: 1rem!important
+    }
+    #conversejs .pt-sm-3,
+    #conversejs .py-sm-3 {
+        padding-top: 1rem!important
+    }
+    #conversejs .pr-sm-3,
+    #conversejs .px-sm-3 {
+        padding-right: 1rem!important
+    }
+    #conversejs .pb-sm-3,
+    #conversejs .py-sm-3 {
+        padding-bottom: 1rem!important
+    }
+    #conversejs .pl-sm-3,
+    #conversejs .px-sm-3 {
+        padding-left: 1rem!important
+    }
+    #conversejs .p-sm-4 {
+        padding: 1.5rem!important
+    }
+    #conversejs .pt-sm-4,
+    #conversejs .py-sm-4 {
+        padding-top: 1.5rem!important
+    }
+    #conversejs .pr-sm-4,
+    #conversejs .px-sm-4 {
+        padding-right: 1.5rem!important
+    }
+    #conversejs .pb-sm-4,
+    #conversejs .py-sm-4 {
+        padding-bottom: 1.5rem!important
+    }
+    #conversejs .pl-sm-4,
+    #conversejs .px-sm-4 {
+        padding-left: 1.5rem!important
+    }
+    #conversejs .p-sm-5 {
+        padding: 3rem!important
+    }
+    #conversejs .pt-sm-5,
+    #conversejs .py-sm-5 {
+        padding-top: 3rem!important
+    }
+    #conversejs .pr-sm-5,
+    #conversejs .px-sm-5 {
+        padding-right: 3rem!important
+    }
+    #conversejs .pb-sm-5,
+    #conversejs .py-sm-5 {
+        padding-bottom: 3rem!important
+    }
+    #conversejs .pl-sm-5,
+    #conversejs .px-sm-5 {
+        padding-left: 3rem!important
+    }
+    #conversejs .m-sm-n1 {
+        margin: -.25rem!important
+    }
+    #conversejs .mt-sm-n1,
+    #conversejs .my-sm-n1 {
+        margin-top: -.25rem!important
+    }
+    #conversejs .mr-sm-n1,
+    #conversejs .mx-sm-n1 {
+        margin-right: -.25rem!important
+    }
+    #conversejs .mb-sm-n1,
+    #conversejs .my-sm-n1 {
+        margin-bottom: -.25rem!important
+    }
+    #conversejs .ml-sm-n1,
+    #conversejs .mx-sm-n1 {
+        margin-left: -.25rem!important
+    }
+    #conversejs .m-sm-n2 {
+        margin: -.5rem!important
+    }
+    #conversejs .mt-sm-n2,
+    #conversejs .my-sm-n2 {
+        margin-top: -.5rem!important
+    }
+    #conversejs .mr-sm-n2,
+    #conversejs .mx-sm-n2 {
+        margin-right: -.5rem!important
+    }
+    #conversejs .mb-sm-n2,
+    #conversejs .my-sm-n2 {
+        margin-bottom: -.5rem!important
+    }
+    #conversejs .ml-sm-n2,
+    #conversejs .mx-sm-n2 {
+        margin-left: -.5rem!important
+    }
+    #conversejs .m-sm-n3 {
+        margin: -1rem!important
+    }
+    #conversejs .mt-sm-n3,
+    #conversejs .my-sm-n3 {
+        margin-top: -1rem!important
+    }
+    #conversejs .mr-sm-n3,
+    #conversejs .mx-sm-n3 {
+        margin-right: -1rem!important
+    }
+    #conversejs .mb-sm-n3,
+    #conversejs .my-sm-n3 {
+        margin-bottom: -1rem!important
+    }
+    #conversejs .ml-sm-n3,
+    #conversejs .mx-sm-n3 {
+        margin-left: -1rem!important
+    }
+    #conversejs .m-sm-n4 {
+        margin: -1.5rem!important
+    }
+    #conversejs .mt-sm-n4,
+    #conversejs .my-sm-n4 {
+        margin-top: -1.5rem!important
+    }
+    #conversejs .mr-sm-n4,
+    #conversejs .mx-sm-n4 {
+        margin-right: -1.5rem!important
+    }
+    #conversejs .mb-sm-n4,
+    #conversejs .my-sm-n4 {
+        margin-bottom: -1.5rem!important
+    }
+    #conversejs .ml-sm-n4,
+    #conversejs .mx-sm-n4 {
+        margin-left: -1.5rem!important
+    }
+    #conversejs .m-sm-n5 {
+        margin: -3rem!important
+    }
+    #conversejs .mt-sm-n5,
+    #conversejs .my-sm-n5 {
+        margin-top: -3rem!important
+    }
+    #conversejs .mr-sm-n5,
+    #conversejs .mx-sm-n5 {
+        margin-right: -3rem!important
+    }
+    #conversejs .mb-sm-n5,
+    #conversejs .my-sm-n5 {
+        margin-bottom: -3rem!important
+    }
+    #conversejs .ml-sm-n5,
+    #conversejs .mx-sm-n5 {
+        margin-left: -3rem!important
+    }
+    #conversejs .m-sm-auto {
+        margin: auto!important
+    }
+    #conversejs .mt-sm-auto,
+    #conversejs .my-sm-auto {
+        margin-top: auto!important
+    }
+    #conversejs .mr-sm-auto,
+    #conversejs .mx-sm-auto {
+        margin-right: auto!important
+    }
+    #conversejs .mb-sm-auto,
+    #conversejs .my-sm-auto {
+        margin-bottom: auto!important
+    }
+    #conversejs .ml-sm-auto,
+    #conversejs .mx-sm-auto {
+        margin-left: auto!important
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .m-md-0 {
+        margin: 0!important
+    }
+    #conversejs .mt-md-0,
+    #conversejs .my-md-0 {
+        margin-top: 0!important
+    }
+    #conversejs .mr-md-0,
+    #conversejs .mx-md-0 {
+        margin-right: 0!important
+    }
+    #conversejs .mb-md-0,
+    #conversejs .my-md-0 {
+        margin-bottom: 0!important
+    }
+    #conversejs .ml-md-0,
+    #conversejs .mx-md-0 {
+        margin-left: 0!important
+    }
+    #conversejs .m-md-1 {
+        margin: .25rem!important
+    }
+    #conversejs .mt-md-1,
+    #conversejs .my-md-1 {
+        margin-top: .25rem!important
+    }
+    #conversejs .mr-md-1,
+    #conversejs .mx-md-1 {
+        margin-right: .25rem!important
+    }
+    #conversejs .mb-md-1,
+    #conversejs .my-md-1 {
+        margin-bottom: .25rem!important
+    }
+    #conversejs .ml-md-1,
+    #conversejs .mx-md-1 {
+        margin-left: .25rem!important
+    }
+    #conversejs .m-md-2 {
+        margin: .5rem!important
+    }
+    #conversejs .mt-md-2,
+    #conversejs .my-md-2 {
+        margin-top: .5rem!important
+    }
+    #conversejs .mr-md-2,
+    #conversejs .mx-md-2 {
+        margin-right: .5rem!important
+    }
+    #conversejs .mb-md-2,
+    #conversejs .my-md-2 {
+        margin-bottom: .5rem!important
+    }
+    #conversejs .ml-md-2,
+    #conversejs .mx-md-2 {
+        margin-left: .5rem!important
+    }
+    #conversejs .m-md-3 {
+        margin: 1rem!important
+    }
+    #conversejs .mt-md-3,
+    #conversejs .my-md-3 {
+        margin-top: 1rem!important
+    }
+    #conversejs .mr-md-3,
+    #conversejs .mx-md-3 {
+        margin-right: 1rem!important
+    }
+    #conversejs .mb-md-3,
+    #conversejs .my-md-3 {
+        margin-bottom: 1rem!important
+    }
+    #conversejs .ml-md-3,
+    #conversejs .mx-md-3 {
+        margin-left: 1rem!important
+    }
+    #conversejs .m-md-4 {
+        margin: 1.5rem!important
+    }
+    #conversejs .mt-md-4,
+    #conversejs .my-md-4 {
+        margin-top: 1.5rem!important
+    }
+    #conversejs .mr-md-4,
+    #conversejs .mx-md-4 {
+        margin-right: 1.5rem!important
+    }
+    #conversejs .mb-md-4,
+    #conversejs .my-md-4 {
+        margin-bottom: 1.5rem!important
+    }
+    #conversejs .ml-md-4,
+    #conversejs .mx-md-4 {
+        margin-left: 1.5rem!important
+    }
+    #conversejs .m-md-5 {
+        margin: 3rem!important
+    }
+    #conversejs .mt-md-5,
+    #conversejs .my-md-5 {
+        margin-top: 3rem!important
+    }
+    #conversejs .mr-md-5,
+    #conversejs .mx-md-5 {
+        margin-right: 3rem!important
+    }
+    #conversejs .mb-md-5,
+    #conversejs .my-md-5 {
+        margin-bottom: 3rem!important
+    }
+    #conversejs .ml-md-5,
+    #conversejs .mx-md-5 {
+        margin-left: 3rem!important
+    }
+    #conversejs .p-md-0 {
+        padding: 0!important
+    }
+    #conversejs .pt-md-0,
+    #conversejs .py-md-0 {
+        padding-top: 0!important
+    }
+    #conversejs .pr-md-0,
+    #conversejs .px-md-0 {
+        padding-right: 0!important
+    }
+    #conversejs .pb-md-0,
+    #conversejs .py-md-0 {
+        padding-bottom: 0!important
+    }
+    #conversejs .pl-md-0,
+    #conversejs .px-md-0 {
+        padding-left: 0!important
+    }
+    #conversejs .p-md-1 {
+        padding: .25rem!important
+    }
+    #conversejs .pt-md-1,
+    #conversejs .py-md-1 {
+        padding-top: .25rem!important
+    }
+    #conversejs .pr-md-1,
+    #conversejs .px-md-1 {
+        padding-right: .25rem!important
+    }
+    #conversejs .pb-md-1,
+    #conversejs .py-md-1 {
+        padding-bottom: .25rem!important
+    }
+    #conversejs .pl-md-1,
+    #conversejs .px-md-1 {
+        padding-left: .25rem!important
+    }
+    #conversejs .p-md-2 {
+        padding: .5rem!important
+    }
+    #conversejs .pt-md-2,
+    #conversejs .py-md-2 {
+        padding-top: .5rem!important
+    }
+    #conversejs .pr-md-2,
+    #conversejs .px-md-2 {
+        padding-right: .5rem!important
+    }
+    #conversejs .pb-md-2,
+    #conversejs .py-md-2 {
+        padding-bottom: .5rem!important
+    }
+    #conversejs .pl-md-2,
+    #conversejs .px-md-2 {
+        padding-left: .5rem!important
+    }
+    #conversejs .p-md-3 {
+        padding: 1rem!important
+    }
+    #conversejs .pt-md-3,
+    #conversejs .py-md-3 {
+        padding-top: 1rem!important
+    }
+    #conversejs .pr-md-3,
+    #conversejs .px-md-3 {
+        padding-right: 1rem!important
+    }
+    #conversejs .pb-md-3,
+    #conversejs .py-md-3 {
+        padding-bottom: 1rem!important
+    }
+    #conversejs .pl-md-3,
+    #conversejs .px-md-3 {
+        padding-left: 1rem!important
+    }
+    #conversejs .p-md-4 {
+        padding: 1.5rem!important
+    }
+    #conversejs .pt-md-4,
+    #conversejs .py-md-4 {
+        padding-top: 1.5rem!important
+    }
+    #conversejs .pr-md-4,
+    #conversejs .px-md-4 {
+        padding-right: 1.5rem!important
+    }
+    #conversejs .pb-md-4,
+    #conversejs .py-md-4 {
+        padding-bottom: 1.5rem!important
+    }
+    #conversejs .pl-md-4,
+    #conversejs .px-md-4 {
+        padding-left: 1.5rem!important
+    }
+    #conversejs .p-md-5 {
+        padding: 3rem!important
+    }
+    #conversejs .pt-md-5,
+    #conversejs .py-md-5 {
+        padding-top: 3rem!important
+    }
+    #conversejs .pr-md-5,
+    #conversejs .px-md-5 {
+        padding-right: 3rem!important
+    }
+    #conversejs .pb-md-5,
+    #conversejs .py-md-5 {
+        padding-bottom: 3rem!important
+    }
+    #conversejs .pl-md-5,
+    #conversejs .px-md-5 {
+        padding-left: 3rem!important
+    }
+    #conversejs .m-md-n1 {
+        margin: -.25rem!important
+    }
+    #conversejs .mt-md-n1,
+    #conversejs .my-md-n1 {
+        margin-top: -.25rem!important
+    }
+    #conversejs .mr-md-n1,
+    #conversejs .mx-md-n1 {
+        margin-right: -.25rem!important
+    }
+    #conversejs .mb-md-n1,
+    #conversejs .my-md-n1 {
+        margin-bottom: -.25rem!important
+    }
+    #conversejs .ml-md-n1,
+    #conversejs .mx-md-n1 {
+        margin-left: -.25rem!important
+    }
+    #conversejs .m-md-n2 {
+        margin: -.5rem!important
+    }
+    #conversejs .mt-md-n2,
+    #conversejs .my-md-n2 {
+        margin-top: -.5rem!important
+    }
+    #conversejs .mr-md-n2,
+    #conversejs .mx-md-n2 {
+        margin-right: -.5rem!important
+    }
+    #conversejs .mb-md-n2,
+    #conversejs .my-md-n2 {
+        margin-bottom: -.5rem!important
+    }
+    #conversejs .ml-md-n2,
+    #conversejs .mx-md-n2 {
+        margin-left: -.5rem!important
+    }
+    #conversejs .m-md-n3 {
+        margin: -1rem!important
+    }
+    #conversejs .mt-md-n3,
+    #conversejs .my-md-n3 {
+        margin-top: -1rem!important
+    }
+    #conversejs .mr-md-n3,
+    #conversejs .mx-md-n3 {
+        margin-right: -1rem!important
+    }
+    #conversejs .mb-md-n3,
+    #conversejs .my-md-n3 {
+        margin-bottom: -1rem!important
+    }
+    #conversejs .ml-md-n3,
+    #conversejs .mx-md-n3 {
+        margin-left: -1rem!important
+    }
+    #conversejs .m-md-n4 {
+        margin: -1.5rem!important
+    }
+    #conversejs .mt-md-n4,
+    #conversejs .my-md-n4 {
+        margin-top: -1.5rem!important
+    }
+    #conversejs .mr-md-n4,
+    #conversejs .mx-md-n4 {
+        margin-right: -1.5rem!important
+    }
+    #conversejs .mb-md-n4,
+    #conversejs .my-md-n4 {
+        margin-bottom: -1.5rem!important
+    }
+    #conversejs .ml-md-n4,
+    #conversejs .mx-md-n4 {
+        margin-left: -1.5rem!important
+    }
+    #conversejs .m-md-n5 {
+        margin: -3rem!important
+    }
+    #conversejs .mt-md-n5,
+    #conversejs .my-md-n5 {
+        margin-top: -3rem!important
+    }
+    #conversejs .mr-md-n5,
+    #conversejs .mx-md-n5 {
+        margin-right: -3rem!important
+    }
+    #conversejs .mb-md-n5,
+    #conversejs .my-md-n5 {
+        margin-bottom: -3rem!important
+    }
+    #conversejs .ml-md-n5,
+    #conversejs .mx-md-n5 {
+        margin-left: -3rem!important
+    }
+    #conversejs .m-md-auto {
+        margin: auto!important
+    }
+    #conversejs .mt-md-auto,
+    #conversejs .my-md-auto {
+        margin-top: auto!important
+    }
+    #conversejs .mr-md-auto,
+    #conversejs .mx-md-auto {
+        margin-right: auto!important
+    }
+    #conversejs .mb-md-auto,
+    #conversejs .my-md-auto {
+        margin-bottom: auto!important
+    }
+    #conversejs .ml-md-auto,
+    #conversejs .mx-md-auto {
+        margin-left: auto!important
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .m-lg-0 {
+        margin: 0!important
+    }
+    #conversejs .mt-lg-0,
+    #conversejs .my-lg-0 {
+        margin-top: 0!important
+    }
+    #conversejs .mr-lg-0,
+    #conversejs .mx-lg-0 {
+        margin-right: 0!important
+    }
+    #conversejs .mb-lg-0,
+    #conversejs .my-lg-0 {
+        margin-bottom: 0!important
+    }
+    #conversejs .ml-lg-0,
+    #conversejs .mx-lg-0 {
+        margin-left: 0!important
+    }
+    #conversejs .m-lg-1 {
+        margin: .25rem!important
+    }
+    #conversejs .mt-lg-1,
+    #conversejs .my-lg-1 {
+        margin-top: .25rem!important
+    }
+    #conversejs .mr-lg-1,
+    #conversejs .mx-lg-1 {
+        margin-right: .25rem!important
+    }
+    #conversejs .mb-lg-1,
+    #conversejs .my-lg-1 {
+        margin-bottom: .25rem!important
+    }
+    #conversejs .ml-lg-1,
+    #conversejs .mx-lg-1 {
+        margin-left: .25rem!important
+    }
+    #conversejs .m-lg-2 {
+        margin: .5rem!important
+    }
+    #conversejs .mt-lg-2,
+    #conversejs .my-lg-2 {
+        margin-top: .5rem!important
+    }
+    #conversejs .mr-lg-2,
+    #conversejs .mx-lg-2 {
+        margin-right: .5rem!important
+    }
+    #conversejs .mb-lg-2,
+    #conversejs .my-lg-2 {
+        margin-bottom: .5rem!important
+    }
+    #conversejs .ml-lg-2,
+    #conversejs .mx-lg-2 {
+        margin-left: .5rem!important
+    }
+    #conversejs .m-lg-3 {
+        margin: 1rem!important
+    }
+    #conversejs .mt-lg-3,
+    #conversejs .my-lg-3 {
+        margin-top: 1rem!important
+    }
+    #conversejs .mr-lg-3,
+    #conversejs .mx-lg-3 {
+        margin-right: 1rem!important
+    }
+    #conversejs .mb-lg-3,
+    #conversejs .my-lg-3 {
+        margin-bottom: 1rem!important
+    }
+    #conversejs .ml-lg-3,
+    #conversejs .mx-lg-3 {
+        margin-left: 1rem!important
+    }
+    #conversejs .m-lg-4 {
+        margin: 1.5rem!important
+    }
+    #conversejs .mt-lg-4,
+    #conversejs .my-lg-4 {
+        margin-top: 1.5rem!important
+    }
+    #conversejs .mr-lg-4,
+    #conversejs .mx-lg-4 {
+        margin-right: 1.5rem!important
+    }
+    #conversejs .mb-lg-4,
+    #conversejs .my-lg-4 {
+        margin-bottom: 1.5rem!important
+    }
+    #conversejs .ml-lg-4,
+    #conversejs .mx-lg-4 {
+        margin-left: 1.5rem!important
+    }
+    #conversejs .m-lg-5 {
+        margin: 3rem!important
+    }
+    #conversejs .mt-lg-5,
+    #conversejs .my-lg-5 {
+        margin-top: 3rem!important
+    }
+    #conversejs .mr-lg-5,
+    #conversejs .mx-lg-5 {
+        margin-right: 3rem!important
+    }
+    #conversejs .mb-lg-5,
+    #conversejs .my-lg-5 {
+        margin-bottom: 3rem!important
+    }
+    #conversejs .ml-lg-5,
+    #conversejs .mx-lg-5 {
+        margin-left: 3rem!important
+    }
+    #conversejs .p-lg-0 {
+        padding: 0!important
+    }
+    #conversejs .pt-lg-0,
+    #conversejs .py-lg-0 {
+        padding-top: 0!important
+    }
+    #conversejs .pr-lg-0,
+    #conversejs .px-lg-0 {
+        padding-right: 0!important
+    }
+    #conversejs .pb-lg-0,
+    #conversejs .py-lg-0 {
+        padding-bottom: 0!important
+    }
+    #conversejs .pl-lg-0,
+    #conversejs .px-lg-0 {
+        padding-left: 0!important
+    }
+    #conversejs .p-lg-1 {
+        padding: .25rem!important
+    }
+    #conversejs .pt-lg-1,
+    #conversejs .py-lg-1 {
+        padding-top: .25rem!important
+    }
+    #conversejs .pr-lg-1,
+    #conversejs .px-lg-1 {
+        padding-right: .25rem!important
+    }
+    #conversejs .pb-lg-1,
+    #conversejs .py-lg-1 {
+        padding-bottom: .25rem!important
+    }
+    #conversejs .pl-lg-1,
+    #conversejs .px-lg-1 {
+        padding-left: .25rem!important
+    }
+    #conversejs .p-lg-2 {
+        padding: .5rem!important
+    }
+    #conversejs .pt-lg-2,
+    #conversejs .py-lg-2 {
+        padding-top: .5rem!important
+    }
+    #conversejs .pr-lg-2,
+    #conversejs .px-lg-2 {
+        padding-right: .5rem!important
+    }
+    #conversejs .pb-lg-2,
+    #conversejs .py-lg-2 {
+        padding-bottom: .5rem!important
+    }
+    #conversejs .pl-lg-2,
+    #conversejs .px-lg-2 {
+        padding-left: .5rem!important
+    }
+    #conversejs .p-lg-3 {
+        padding: 1rem!important
+    }
+    #conversejs .pt-lg-3,
+    #conversejs .py-lg-3 {
+        padding-top: 1rem!important
+    }
+    #conversejs .pr-lg-3,
+    #conversejs .px-lg-3 {
+        padding-right: 1rem!important
+    }
+    #conversejs .pb-lg-3,
+    #conversejs .py-lg-3 {
+        padding-bottom: 1rem!important
+    }
+    #conversejs .pl-lg-3,
+    #conversejs .px-lg-3 {
+        padding-left: 1rem!important
+    }
+    #conversejs .p-lg-4 {
+        padding: 1.5rem!important
+    }
+    #conversejs .pt-lg-4,
+    #conversejs .py-lg-4 {
+        padding-top: 1.5rem!important
+    }
+    #conversejs .pr-lg-4,
+    #conversejs .px-lg-4 {
+        padding-right: 1.5rem!important
+    }
+    #conversejs .pb-lg-4,
+    #conversejs .py-lg-4 {
+        padding-bottom: 1.5rem!important
+    }
+    #conversejs .pl-lg-4,
+    #conversejs .px-lg-4 {
+        padding-left: 1.5rem!important
+    }
+    #conversejs .p-lg-5 {
+        padding: 3rem!important
+    }
+    #conversejs .pt-lg-5,
+    #conversejs .py-lg-5 {
+        padding-top: 3rem!important
+    }
+    #conversejs .pr-lg-5,
+    #conversejs .px-lg-5 {
+        padding-right: 3rem!important
+    }
+    #conversejs .pb-lg-5,
+    #conversejs .py-lg-5 {
+        padding-bottom: 3rem!important
+    }
+    #conversejs .pl-lg-5,
+    #conversejs .px-lg-5 {
+        padding-left: 3rem!important
+    }
+    #conversejs .m-lg-n1 {
+        margin: -.25rem!important
+    }
+    #conversejs .mt-lg-n1,
+    #conversejs .my-lg-n1 {
+        margin-top: -.25rem!important
+    }
+    #conversejs .mr-lg-n1,
+    #conversejs .mx-lg-n1 {
+        margin-right: -.25rem!important
+    }
+    #conversejs .mb-lg-n1,
+    #conversejs .my-lg-n1 {
+        margin-bottom: -.25rem!important
+    }
+    #conversejs .ml-lg-n1,
+    #conversejs .mx-lg-n1 {
+        margin-left: -.25rem!important
+    }
+    #conversejs .m-lg-n2 {
+        margin: -.5rem!important
+    }
+    #conversejs .mt-lg-n2,
+    #conversejs .my-lg-n2 {
+        margin-top: -.5rem!important
+    }
+    #conversejs .mr-lg-n2,
+    #conversejs .mx-lg-n2 {
+        margin-right: -.5rem!important
+    }
+    #conversejs .mb-lg-n2,
+    #conversejs .my-lg-n2 {
+        margin-bottom: -.5rem!important
+    }
+    #conversejs .ml-lg-n2,
+    #conversejs .mx-lg-n2 {
+        margin-left: -.5rem!important
+    }
+    #conversejs .m-lg-n3 {
+        margin: -1rem!important
+    }
+    #conversejs .mt-lg-n3,
+    #conversejs .my-lg-n3 {
+        margin-top: -1rem!important
+    }
+    #conversejs .mr-lg-n3,
+    #conversejs .mx-lg-n3 {
+        margin-right: -1rem!important
+    }
+    #conversejs .mb-lg-n3,
+    #conversejs .my-lg-n3 {
+        margin-bottom: -1rem!important
+    }
+    #conversejs .ml-lg-n3,
+    #conversejs .mx-lg-n3 {
+        margin-left: -1rem!important
+    }
+    #conversejs .m-lg-n4 {
+        margin: -1.5rem!important
+    }
+    #conversejs .mt-lg-n4,
+    #conversejs .my-lg-n4 {
+        margin-top: -1.5rem!important
+    }
+    #conversejs .mr-lg-n4,
+    #conversejs .mx-lg-n4 {
+        margin-right: -1.5rem!important
+    }
+    #conversejs .mb-lg-n4,
+    #conversejs .my-lg-n4 {
+        margin-bottom: -1.5rem!important
+    }
+    #conversejs .ml-lg-n4,
+    #conversejs .mx-lg-n4 {
+        margin-left: -1.5rem!important
+    }
+    #conversejs .m-lg-n5 {
+        margin: -3rem!important
+    }
+    #conversejs .mt-lg-n5,
+    #conversejs .my-lg-n5 {
+        margin-top: -3rem!important
+    }
+    #conversejs .mr-lg-n5,
+    #conversejs .mx-lg-n5 {
+        margin-right: -3rem!important
+    }
+    #conversejs .mb-lg-n5,
+    #conversejs .my-lg-n5 {
+        margin-bottom: -3rem!important
+    }
+    #conversejs .ml-lg-n5,
+    #conversejs .mx-lg-n5 {
+        margin-left: -3rem!important
+    }
+    #conversejs .m-lg-auto {
+        margin: auto!important
+    }
+    #conversejs .mt-lg-auto,
+    #conversejs .my-lg-auto {
+        margin-top: auto!important
+    }
+    #conversejs .mr-lg-auto,
+    #conversejs .mx-lg-auto {
+        margin-right: auto!important
+    }
+    #conversejs .mb-lg-auto,
+    #conversejs .my-lg-auto {
+        margin-bottom: auto!important
+    }
+    #conversejs .ml-lg-auto,
+    #conversejs .mx-lg-auto {
+        margin-left: auto!important
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .m-xl-0 {
+        margin: 0!important
+    }
+    #conversejs .mt-xl-0,
+    #conversejs .my-xl-0 {
+        margin-top: 0!important
+    }
+    #conversejs .mr-xl-0,
+    #conversejs .mx-xl-0 {
+        margin-right: 0!important
+    }
+    #conversejs .mb-xl-0,
+    #conversejs .my-xl-0 {
+        margin-bottom: 0!important
+    }
+    #conversejs .ml-xl-0,
+    #conversejs .mx-xl-0 {
+        margin-left: 0!important
+    }
+    #conversejs .m-xl-1 {
+        margin: .25rem!important
+    }
+    #conversejs .mt-xl-1,
+    #conversejs .my-xl-1 {
+        margin-top: .25rem!important
+    }
+    #conversejs .mr-xl-1,
+    #conversejs .mx-xl-1 {
+        margin-right: .25rem!important
+    }
+    #conversejs .mb-xl-1,
+    #conversejs .my-xl-1 {
+        margin-bottom: .25rem!important
+    }
+    #conversejs .ml-xl-1,
+    #conversejs .mx-xl-1 {
+        margin-left: .25rem!important
+    }
+    #conversejs .m-xl-2 {
+        margin: .5rem!important
+    }
+    #conversejs .mt-xl-2,
+    #conversejs .my-xl-2 {
+        margin-top: .5rem!important
+    }
+    #conversejs .mr-xl-2,
+    #conversejs .mx-xl-2 {
+        margin-right: .5rem!important
+    }
+    #conversejs .mb-xl-2,
+    #conversejs .my-xl-2 {
+        margin-bottom: .5rem!important
+    }
+    #conversejs .ml-xl-2,
+    #conversejs .mx-xl-2 {
+        margin-left: .5rem!important
+    }
+    #conversejs .m-xl-3 {
+        margin: 1rem!important
+    }
+    #conversejs .mt-xl-3,
+    #conversejs .my-xl-3 {
+        margin-top: 1rem!important
+    }
+    #conversejs .mr-xl-3,
+    #conversejs .mx-xl-3 {
+        margin-right: 1rem!important
+    }
+    #conversejs .mb-xl-3,
+    #conversejs .my-xl-3 {
+        margin-bottom: 1rem!important
+    }
+    #conversejs .ml-xl-3,
+    #conversejs .mx-xl-3 {
+        margin-left: 1rem!important
+    }
+    #conversejs .m-xl-4 {
+        margin: 1.5rem!important
+    }
+    #conversejs .mt-xl-4,
+    #conversejs .my-xl-4 {
+        margin-top: 1.5rem!important
+    }
+    #conversejs .mr-xl-4,
+    #conversejs .mx-xl-4 {
+        margin-right: 1.5rem!important
+    }
+    #conversejs .mb-xl-4,
+    #conversejs .my-xl-4 {
+        margin-bottom: 1.5rem!important
+    }
+    #conversejs .ml-xl-4,
+    #conversejs .mx-xl-4 {
+        margin-left: 1.5rem!important
+    }
+    #conversejs .m-xl-5 {
+        margin: 3rem!important
+    }
+    #conversejs .mt-xl-5,
+    #conversejs .my-xl-5 {
+        margin-top: 3rem!important
+    }
+    #conversejs .mr-xl-5,
+    #conversejs .mx-xl-5 {
+        margin-right: 3rem!important
+    }
+    #conversejs .mb-xl-5,
+    #conversejs .my-xl-5 {
+        margin-bottom: 3rem!important
+    }
+    #conversejs .ml-xl-5,
+    #conversejs .mx-xl-5 {
+        margin-left: 3rem!important
+    }
+    #conversejs .p-xl-0 {
+        padding: 0!important
+    }
+    #conversejs .pt-xl-0,
+    #conversejs .py-xl-0 {
+        padding-top: 0!important
+    }
+    #conversejs .pr-xl-0,
+    #conversejs .px-xl-0 {
+        padding-right: 0!important
+    }
+    #conversejs .pb-xl-0,
+    #conversejs .py-xl-0 {
+        padding-bottom: 0!important
+    }
+    #conversejs .pl-xl-0,
+    #conversejs .px-xl-0 {
+        padding-left: 0!important
+    }
+    #conversejs .p-xl-1 {
+        padding: .25rem!important
+    }
+    #conversejs .pt-xl-1,
+    #conversejs .py-xl-1 {
+        padding-top: .25rem!important
+    }
+    #conversejs .pr-xl-1,
+    #conversejs .px-xl-1 {
+        padding-right: .25rem!important
+    }
+    #conversejs .pb-xl-1,
+    #conversejs .py-xl-1 {
+        padding-bottom: .25rem!important
+    }
+    #conversejs .pl-xl-1,
+    #conversejs .px-xl-1 {
+        padding-left: .25rem!important
+    }
+    #conversejs .p-xl-2 {
+        padding: .5rem!important
+    }
+    #conversejs .pt-xl-2,
+    #conversejs .py-xl-2 {
+        padding-top: .5rem!important
+    }
+    #conversejs .pr-xl-2,
+    #conversejs .px-xl-2 {
+        padding-right: .5rem!important
+    }
+    #conversejs .pb-xl-2,
+    #conversejs .py-xl-2 {
+        padding-bottom: .5rem!important
+    }
+    #conversejs .pl-xl-2,
+    #conversejs .px-xl-2 {
+        padding-left: .5rem!important
+    }
+    #conversejs .p-xl-3 {
+        padding: 1rem!important
+    }
+    #conversejs .pt-xl-3,
+    #conversejs .py-xl-3 {
+        padding-top: 1rem!important
+    }
+    #conversejs .pr-xl-3,
+    #conversejs .px-xl-3 {
+        padding-right: 1rem!important
+    }
+    #conversejs .pb-xl-3,
+    #conversejs .py-xl-3 {
+        padding-bottom: 1rem!important
+    }
+    #conversejs .pl-xl-3,
+    #conversejs .px-xl-3 {
+        padding-left: 1rem!important
+    }
+    #conversejs .p-xl-4 {
+        padding: 1.5rem!important
+    }
+    #conversejs .pt-xl-4,
+    #conversejs .py-xl-4 {
+        padding-top: 1.5rem!important
+    }
+    #conversejs .pr-xl-4,
+    #conversejs .px-xl-4 {
+        padding-right: 1.5rem!important
+    }
+    #conversejs .pb-xl-4,
+    #conversejs .py-xl-4 {
+        padding-bottom: 1.5rem!important
+    }
+    #conversejs .pl-xl-4,
+    #conversejs .px-xl-4 {
+        padding-left: 1.5rem!important
+    }
+    #conversejs .p-xl-5 {
+        padding: 3rem!important
+    }
+    #conversejs .pt-xl-5,
+    #conversejs .py-xl-5 {
+        padding-top: 3rem!important
+    }
+    #conversejs .pr-xl-5,
+    #conversejs .px-xl-5 {
+        padding-right: 3rem!important
+    }
+    #conversejs .pb-xl-5,
+    #conversejs .py-xl-5 {
+        padding-bottom: 3rem!important
+    }
+    #conversejs .pl-xl-5,
+    #conversejs .px-xl-5 {
+        padding-left: 3rem!important
+    }
+    #conversejs .m-xl-n1 {
+        margin: -.25rem!important
+    }
+    #conversejs .mt-xl-n1,
+    #conversejs .my-xl-n1 {
+        margin-top: -.25rem!important
+    }
+    #conversejs .mr-xl-n1,
+    #conversejs .mx-xl-n1 {
+        margin-right: -.25rem!important
+    }
+    #conversejs .mb-xl-n1,
+    #conversejs .my-xl-n1 {
+        margin-bottom: -.25rem!important
+    }
+    #conversejs .ml-xl-n1,
+    #conversejs .mx-xl-n1 {
+        margin-left: -.25rem!important
+    }
+    #conversejs .m-xl-n2 {
+        margin: -.5rem!important
+    }
+    #conversejs .mt-xl-n2,
+    #conversejs .my-xl-n2 {
+        margin-top: -.5rem!important
+    }
+    #conversejs .mr-xl-n2,
+    #conversejs .mx-xl-n2 {
+        margin-right: -.5rem!important
+    }
+    #conversejs .mb-xl-n2,
+    #conversejs .my-xl-n2 {
+        margin-bottom: -.5rem!important
+    }
+    #conversejs .ml-xl-n2,
+    #conversejs .mx-xl-n2 {
+        margin-left: -.5rem!important
+    }
+    #conversejs .m-xl-n3 {
+        margin: -1rem!important
+    }
+    #conversejs .mt-xl-n3,
+    #conversejs .my-xl-n3 {
+        margin-top: -1rem!important
+    }
+    #conversejs .mr-xl-n3,
+    #conversejs .mx-xl-n3 {
+        margin-right: -1rem!important
+    }
+    #conversejs .mb-xl-n3,
+    #conversejs .my-xl-n3 {
+        margin-bottom: -1rem!important
+    }
+    #conversejs .ml-xl-n3,
+    #conversejs .mx-xl-n3 {
+        margin-left: -1rem!important
+    }
+    #conversejs .m-xl-n4 {
+        margin: -1.5rem!important
+    }
+    #conversejs .mt-xl-n4,
+    #conversejs .my-xl-n4 {
+        margin-top: -1.5rem!important
+    }
+    #conversejs .mr-xl-n4,
+    #conversejs .mx-xl-n4 {
+        margin-right: -1.5rem!important
+    }
+    #conversejs .mb-xl-n4,
+    #conversejs .my-xl-n4 {
+        margin-bottom: -1.5rem!important
+    }
+    #conversejs .ml-xl-n4,
+    #conversejs .mx-xl-n4 {
+        margin-left: -1.5rem!important
+    }
+    #conversejs .m-xl-n5 {
+        margin: -3rem!important
+    }
+    #conversejs .mt-xl-n5,
+    #conversejs .my-xl-n5 {
+        margin-top: -3rem!important
+    }
+    #conversejs .mr-xl-n5,
+    #conversejs .mx-xl-n5 {
+        margin-right: -3rem!important
+    }
+    #conversejs .mb-xl-n5,
+    #conversejs .my-xl-n5 {
+        margin-bottom: -3rem!important
+    }
+    #conversejs .ml-xl-n5,
+    #conversejs .mx-xl-n5 {
+        margin-left: -3rem!important
+    }
+    #conversejs .m-xl-auto {
+        margin: auto!important
+    }
+    #conversejs .mt-xl-auto,
+    #conversejs .my-xl-auto {
+        margin-top: auto!important
+    }
+    #conversejs .mr-xl-auto,
+    #conversejs .mx-xl-auto {
+        margin-right: auto!important
+    }
+    #conversejs .mb-xl-auto,
+    #conversejs .my-xl-auto {
+        margin-bottom: auto!important
+    }
+    #conversejs .ml-xl-auto,
+    #conversejs .mx-xl-auto {
+        margin-left: auto!important
+    }
+}
+
+#conversejs .text-monospace {
+    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace!important
+}
+
+#conversejs .text-justify {
+    text-align: justify!important
+}
+
+#conversejs .text-wrap {
+    white-space: normal!important
+}
+
+#conversejs .text-nowrap {
+    white-space: nowrap!important
+}
+
+#conversejs .text-truncate {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap
+}
+
+#conversejs .text-left {
+    text-align: left!important
+}
+
+#conversejs .text-right {
+    text-align: right!important
+}
+
+#conversejs .text-center {
+    text-align: center!important
+}
+
+@media (min-width:576px) {
+    #conversejs .text-sm-left {
+        text-align: left!important
+    }
+    #conversejs .text-sm-right {
+        text-align: right!important
+    }
+    #conversejs .text-sm-center {
+        text-align: center!important
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs .text-md-left {
+        text-align: left!important
+    }
+    #conversejs .text-md-right {
+        text-align: right!important
+    }
+    #conversejs .text-md-center {
+        text-align: center!important
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs .text-lg-left {
+        text-align: left!important
+    }
+    #conversejs .text-lg-right {
+        text-align: right!important
+    }
+    #conversejs .text-lg-center {
+        text-align: center!important
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs .text-xl-left {
+        text-align: left!important
+    }
+    #conversejs .text-xl-right {
+        text-align: right!important
+    }
+    #conversejs .text-xl-center {
+        text-align: center!important
+    }
+}
+
+#conversejs .text-lowercase {
+    text-transform: lowercase!important
+}
+
+#conversejs .text-uppercase {
+    text-transform: uppercase!important
+}
+
+#conversejs .text-capitalize {
+    text-transform: capitalize!important
+}
+
+#conversejs .font-weight-light {
+    font-weight: 300!important
+}
+
+#conversejs .font-weight-lighter {
+    font-weight: lighter!important
+}
+
+#conversejs .font-weight-normal {
+    font-weight: 400!important
+}
+
+#conversejs .font-weight-bold {
+    font-weight: 700!important
+}
+
+#conversejs .font-weight-bolder {
+    font-weight: bolder!important
+}
+
+#conversejs .font-italic {
+    font-style: italic!important
+}
+
+#conversejs .text-white {
+    color: #fff!important
+}
+
+#conversejs .text-primary {
+    color: #007bff!important
+}
+
+#conversejs a.text-primary:focus,
+#conversejs a.text-primary:hover {
+    color: #0056b3!important
+}
+
+#conversejs .text-secondary {
+    color: #6c757d!important
+}
+
+#conversejs a.text-secondary:focus,
+#conversejs a.text-secondary:hover {
+    color: #494f54!important
+}
+
+#conversejs .text-success {
+    color: #28a745!important
+}
+
+#conversejs a.text-success:focus,
+#conversejs a.text-success:hover {
+    color: #19692c!important
+}
+
+#conversejs .text-info {
+    color: #17a2b8!important
+}
+
+#conversejs a.text-info:focus,
+#conversejs a.text-info:hover {
+    color: #0f6674!important
+}
+
+#conversejs .text-warning {
+    color: #ffc107!important
+}
+
+#conversejs a.text-warning:focus,
+#conversejs a.text-warning:hover {
+    color: #ba8b00!important
+}
+
+#conversejs .text-danger {
+    color: #dc3545!important
+}
+
+#conversejs a.text-danger:focus,
+#conversejs a.text-danger:hover {
+    color: #a71d2a!important
+}
+
+#conversejs .text-light {
+    color: #f8f9fa!important
+}
+
+#conversejs a.text-light:focus,
+#conversejs a.text-light:hover {
+    color: #cbd3da!important
+}
+
+#conversejs .text-dark {
+    color: #343a40!important
+}
+
+#conversejs a.text-dark:focus,
+#conversejs a.text-dark:hover {
+    color: #121416!important
+}
+
+#conversejs .text-body {
+    color: #212529!important
+}
+
+#conversejs .text-muted {
+    color: #6c757d!important
+}
+
+#conversejs .text-black-50 {
+    color: rgba(0, 0, 0, .5)!important
+}
+
+#conversejs .text-white-50 {
+    color: rgba(255, 255, 255, .5)!important
+}
+
+#conversejs .text-hide {
+    font: 0/0 a;
+    color: transparent;
+    text-shadow: none;
+    background-color: transparent;
+    border: 0
+}
+
+#conversejs .text-decoration-none {
+    text-decoration: none!important
+}
+
+#conversejs .text-break {
+    word-break: break-word!important;
+    overflow-wrap: break-word!important
+}
+
+#conversejs .text-reset {
+    color: inherit!important
+}
+
+#conversejs .visible {
+    visibility: visible!important
+}
+
+#conversejs .invisible {
+    visibility: hidden!important
+}
+
+@font-face {
+    font-family: Baumans;
+    font-style: normal;
+    font-weight: 400;
+    src: local("Baumans Regular"), local("Baumans-Regular"), url(webfonts/baumans.ttf) format("truetype")
+}
+
+@font-face {
+    font-family: Muli;
+    font-style: normal;
+    font-weight: 400;
+    src: local("Muli Regular"), local("Muli-Regular"), url(webfonts/muli.ttf) format("truetype")
+}
+
+@font-face {
+    font-family: ConverseFontAwesomeBrands;
+    font-style: normal;
+    font-weight: 400;
+    src: url(webfonts/fa-brands-400.eot);
+    src: url(webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"), url(webfonts/fa-brands-400.woff2) format("woff2"), url(webfonts/fa-brands-400.woff) format("woff"), url(webfonts/fa-brands-400.ttf) format("truetype"), url(webfonts/fa-brands-400.svg#fontawesome) format("svg")
+}
+
+@font-face {
+    font-family: ConverseFontAwesomeRegular;
+    font-style: normal;
+    font-weight: 400;
+    src: url(webfonts/fa-regular-400.eot);
+    src: url(webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"), url(webfonts/fa-regular-400.woff2) format("woff2"), url(webfonts/fa-regular-400.woff) format("woff"), url(webfonts/fa-regular-400.ttf) format("truetype"), url(webfonts/fa-regular-400.svg#fontawesome) format("svg");
+    font-weight: 400;
+    font-style: normal
+}
+
+@font-face {
+    font-family: ConverseFontAwesomeSolid;
+    font-style: normal;
+    font-weight: 900;
+    src: url(webfonts/fa-solid-900.eot);
+    src: url(webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"), url(webfonts/fa-solid-900.svg#fontawesome) format("svg"), url(webfonts/fa-solid-900.woff2) format("woff2"), url(webfonts/fa-solid-900.woff) format("woff"), url(webfonts/fa-solid-900.ttf) format("truetype")
+}
+
+.fa,
+.fab,
+.fal,
+.far,
+.fas {
+    -moz-osx-font-smoothing: grayscale;
+    -webkit-font-smoothing: antialiased;
+    display: inline-block;
+    font-style: normal;
+    font-variant: normal;
+    text-rendering: auto;
+    line-height: 1
+}
+
+.fa-lg {
+    font-size: 1.33333em;
+    line-height: .75em;
+    vertical-align: -.0667em
+}
+
+.fa-xs {
+    font-size: .75em
+}
+
+.fa-sm {
+    font-size: .875em
+}
+
+.fa-1x {
+    font-size: 1em
+}
+
+.fa-2x {
+    font-size: 2em
+}
+
+.fa-3x {
+    font-size: 3em
+}
+
+.fa-4x {
+    font-size: 4em
+}
+
+.fa-5x {
+    font-size: 5em
+}
+
+.fa-6x {
+    font-size: 6em
+}
+
+.fa-7x {
+    font-size: 7em
+}
+
+.fa-8x {
+    font-size: 8em
+}
+
+.fa-9x {
+    font-size: 9em
+}
+
+.fa-10x {
+    font-size: 10em
+}
+
+.fa-fw {
+    text-align: center;
+    width: 1.25em
+}
+
+.fa-ul {
+    list-style-type: none;
+    margin-left: 2.5em;
+    padding-left: 0
+}
+
+.fa-ul>li {
+    position: relative
+}
+
+.fa-li {
+    left: -2em;
+    position: absolute;
+    text-align: center;
+    width: 2em;
+    line-height: inherit
+}
+
+.fa-border {
+    border: solid .08em #eee;
+    border-radius: .1em;
+    padding: .2em .25em .15em
+}
+
+.fa-pull-left {
+    float: left
+}
+
+.fa-pull-right {
+    float: right
+}
+
+.fa.fa-pull-left,
+.fab.fa-pull-left,
+.fal.fa-pull-left,
+.far.fa-pull-left,
+.fas.fa-pull-left {
+    margin-right: .3em
+}
+
+.fa.fa-pull-right,
+.fab.fa-pull-right,
+.fal.fa-pull-right,
+.far.fa-pull-right,
+.fas.fa-pull-right {
+    margin-left: .3em
+}
+
+.fa-spin {
+    -webkit-animation: fa-spin 2s infinite linear;
+    animation: fa-spin 2s infinite linear
+}
+
+.fa-pulse {
+    -webkit-animation: fa-spin 1s infinite steps(8);
+    animation: fa-spin 1s infinite steps(8)
+}
+
+@-webkit-keyframes fa-spin {
+    0% {
+        transform: rotate(0)
+    }
+    100% {
+        transform: rotate(360deg)
+    }
+}
+
+@keyframes fa-spin {
+    0% {
+        transform: rotate(0)
+    }
+    100% {
+        transform: rotate(360deg)
+    }
+}
+
+.fa-rotate-90 {
+    transform: rotate(90deg)
+}
+
+.fa-rotate-180 {
+    transform: rotate(180deg)
+}
+
+.fa-rotate-270 {
+    transform: rotate(270deg)
+}
+
+.fa-flip-horizontal {
+    transform: scale(-1, 1)
+}
+
+.fa-flip-vertical {
+    transform: scale(1, -1)
+}
+
+.fa-flip-both,
+.fa-flip-horizontal.fa-flip-vertical {
+    transform: scale(-1, -1)
+}
+
+:root .fa-flip-both,
+:root .fa-flip-horizontal,
+:root .fa-flip-vertical,
+:root .fa-rotate-180,
+:root .fa-rotate-270,
+:root .fa-rotate-90 {
+    -webkit-filter: none;
+    filter: none
+}
+
+.fa-stack {
+    display: inline-block;
+    height: 2em;
+    line-height: 2em;
+    position: relative;
+    vertical-align: middle;
+    width: 2.5em
+}
+
+.fa-stack-1x,
+.fa-stack-2x {
+    left: 0;
+    position: absolute;
+    text-align: center;
+    width: 100%
+}
+
+.fa-stack-1x {
+    line-height: inherit
+}
+
+.fa-stack-2x {
+    font-size: 2em
+}
+
+.fa-inverse {
+    color: #fff
+}
+
+.fa-500px:before {
+    content: "\f26e"
+}
+
+.fa-accessible-icon:before {
+    content: "\f368"
+}
+
+.fa-accusoft:before {
+    content: "\f369"
+}
+
+.fa-acquisitions-incorporated:before {
+    content: "\f6af"
+}
+
+.fa-ad:before {
+    content: "\f641"
+}
+
+.fa-address-book:before {
+    content: "\f2b9"
+}
+
+.fa-address-card:before {
+    content: "\f2bb"
+}
+
+.fa-adjust:before {
+    content: "\f042"
+}
+
+.fa-adn:before {
+    content: "\f170"
+}
+
+.fa-adobe:before {
+    content: "\f778"
+}
+
+.fa-adversal:before {
+    content: "\f36a"
+}
+
+.fa-affiliatetheme:before {
+    content: "\f36b"
+}
+
+.fa-air-freshener:before {
+    content: "\f5d0"
+}
+
+.fa-airbnb:before {
+    content: "\f834"
+}
+
+.fa-algolia:before {
+    content: "\f36c"
+}
+
+.fa-align-center:before {
+    content: "\f037"
+}
+
+.fa-align-justify:before {
+    content: "\f039"
+}
+
+.fa-align-left:before {
+    content: "\f036"
+}
+
+.fa-align-right:before {
+    content: "\f038"
+}
+
+.fa-alipay:before {
+    content: "\f642"
+}
+
+.fa-allergies:before {
+    content: "\f461"
+}
+
+.fa-amazon:before {
+    content: "\f270"
+}
+
+.fa-amazon-pay:before {
+    content: "\f42c"
+}
+
+.fa-ambulance:before {
+    content: "\f0f9"
+}
+
+.fa-american-sign-language-interpreting:before {
+    content: "\f2a3"
+}
+
+.fa-amilia:before {
+    content: "\f36d"
+}
+
+.fa-anchor:before {
+    content: "\f13d"
+}
+
+.fa-android:before {
+    content: "\f17b"
+}
+
+.fa-angellist:before {
+    content: "\f209"
+}
+
+.fa-angle-double-down:before {
+    content: "\f103"
+}
+
+.fa-angle-double-left:before {
+    content: "\f100"
+}
+
+.fa-angle-double-right:before {
+    content: "\f101"
+}
+
+.fa-angle-double-up:before {
+    content: "\f102"
+}
+
+.fa-angle-down:before {
+    content: "\f107"
+}
+
+.fa-angle-left:before {
+    content: "\f104"
+}
+
+.fa-angle-right:before {
+    content: "\f105"
+}
+
+.fa-angle-up:before {
+    content: "\f106"
+}
+
+.fa-angry:before {
+    content: "\f556"
+}
+
+.fa-angrycreative:before {
+    content: "\f36e"
+}
+
+.fa-angular:before {
+    content: "\f420"
+}
+
+.fa-ankh:before {
+    content: "\f644"
+}
+
+.fa-app-store:before {
+    content: "\f36f"
+}
+
+.fa-app-store-ios:before {
+    content: "\f370"
+}
+
+.fa-apper:before {
+    content: "\f371"
+}
+
+.fa-apple:before {
+    content: "\f179"
+}
+
+.fa-apple-alt:before {
+    content: "\f5d1"
+}
+
+.fa-apple-pay:before {
+    content: "\f415"
+}
+
+.fa-archive:before {
+    content: "\f187"
+}
+
+.fa-archway:before {
+    content: "\f557"
+}
+
+.fa-arrow-alt-circle-down:before {
+    content: "\f358"
+}
+
+.fa-arrow-alt-circle-left:before {
+    content: "\f359"
+}
+
+.fa-arrow-alt-circle-right:before {
+    content: "\f35a"
+}
+
+.fa-arrow-alt-circle-up:before {
+    content: "\f35b"
+}
+
+.fa-arrow-circle-down:before {
+    content: "\f0ab"
+}
+
+.fa-arrow-circle-left:before {
+    content: "\f0a8"
+}
+
+.fa-arrow-circle-right:before {
+    content: "\f0a9"
+}
+
+.fa-arrow-circle-up:before {
+    content: "\f0aa"
+}
+
+.fa-arrow-down:before {
+    content: "\f063"
+}
+
+.fa-arrow-left:before {
+    content: "\f060"
+}
+
+.fa-arrow-right:before {
+    content: "\f061"
+}
+
+.fa-arrow-up:before {
+    content: "\f062"
+}
+
+.fa-arrows-alt:before {
+    content: "\f0b2"
+}
+
+.fa-arrows-alt-h:before {
+    content: "\f337"
+}
+
+.fa-arrows-alt-v:before {
+    content: "\f338"
+}
+
+.fa-artstation:before {
+    content: "\f77a"
+}
+
+.fa-assistive-listening-systems:before {
+    content: "\f2a2"
+}
+
+.fa-asterisk:before {
+    content: "\f069"
+}
+
+.fa-asymmetrik:before {
+    content: "\f372"
+}
+
+.fa-at:before {
+    content: "\f1fa"
+}
+
+.fa-atlas:before {
+    content: "\f558"
+}
+
+.fa-atlassian:before {
+    content: "\f77b"
+}
+
+.fa-atom:before {
+    content: "\f5d2"
+}
+
+.fa-audible:before {
+    content: "\f373"
+}
+
+.fa-audio-description:before {
+    content: "\f29e"
+}
+
+.fa-autoprefixer:before {
+    content: "\f41c"
+}
+
+.fa-avianex:before {
+    content: "\f374"
+}
+
+.fa-aviato:before {
+    content: "\f421"
+}
+
+.fa-award:before {
+    content: "\f559"
+}
+
+.fa-aws:before {
+    content: "\f375"
+}
+
+.fa-baby:before {
+    content: "\f77c"
+}
+
+.fa-baby-carriage:before {
+    content: "\f77d"
+}
+
+.fa-backspace:before {
+    content: "\f55a"
+}
+
+.fa-backward:before {
+    content: "\f04a"
+}
+
+.fa-bacon:before {
+    content: "\f7e5"
+}
+
+.fa-balance-scale:before {
+    content: "\f24e"
+}
+
+.fa-balance-scale-left:before {
+    content: "\f515"
+}
+
+.fa-balance-scale-right:before {
+    content: "\f516"
+}
+
+.fa-ban:before {
+    content: "\f05e"
+}
+
+.fa-band-aid:before {
+    content: "\f462"
+}
+
+.fa-bandcamp:before {
+    content: "\f2d5"
+}
+
+.fa-barcode:before {
+    content: "\f02a"
+}
+
+.fa-bars:before {
+    content: "\f0c9"
+}
+
+.fa-baseball-ball:before {
+    content: "\f433"
+}
+
+.fa-basketball-ball:before {
+    content: "\f434"
+}
+
+.fa-bath:before {
+    content: "\f2cd"
+}
+
+.fa-battery-empty:before {
+    content: "\f244"
+}
+
+.fa-battery-full:before {
+    content: "\f240"
+}
+
+.fa-battery-half:before {
+    content: "\f242"
+}
+
+.fa-battery-quarter:before {
+    content: "\f243"
+}
+
+.fa-battery-three-quarters:before {
+    content: "\f241"
+}
+
+.fa-battle-net:before {
+    content: "\f835"
+}
+
+.fa-bed:before {
+    content: "\f236"
+}
+
+.fa-beer:before {
+    content: "\f0fc"
+}
+
+.fa-behance:before {
+    content: "\f1b4"
+}
+
+.fa-behance-square:before {
+    content: "\f1b5"
+}
+
+.fa-bell:before {
+    content: "\f0f3"
+}
+
+.fa-bell-slash:before {
+    content: "\f1f6"
+}
+
+.fa-bezier-curve:before {
+    content: "\f55b"
+}
+
+.fa-bible:before {
+    content: "\f647"
+}
+
+.fa-bicycle:before {
+    content: "\f206"
+}
+
+.fa-biking:before {
+    content: "\f84a"
+}
+
+.fa-bimobject:before {
+    content: "\f378"
+}
+
+.fa-binoculars:before {
+    content: "\f1e5"
+}
+
+.fa-biohazard:before {
+    content: "\f780"
+}
+
+.fa-birthday-cake:before {
+    content: "\f1fd"
+}
+
+.fa-bitbucket:before {
+    content: "\f171"
+}
+
+.fa-bitcoin:before {
+    content: "\f379"
+}
+
+.fa-bity:before {
+    content: "\f37a"
+}
+
+.fa-black-tie:before {
+    content: "\f27e"
+}
+
+.fa-blackberry:before {
+    content: "\f37b"
+}
+
+.fa-blender:before {
+    content: "\f517"
+}
+
+.fa-blender-phone:before {
+    content: "\f6b6"
+}
+
+.fa-blind:before {
+    content: "\f29d"
+}
+
+.fa-blog:before {
+    content: "\f781"
+}
+
+.fa-blogger:before {
+    content: "\f37c"
+}
+
+.fa-blogger-b:before {
+    content: "\f37d"
+}
+
+.fa-bluetooth:before {
+    content: "\f293"
+}
+
+.fa-bluetooth-b:before {
+    content: "\f294"
+}
+
+.fa-bold:before {
+    content: "\f032"
+}
+
+.fa-bolt:before {
+    content: "\f0e7"
+}
+
+.fa-bomb:before {
+    content: "\f1e2"
+}
+
+.fa-bone:before {
+    content: "\f5d7"
+}
+
+.fa-bong:before {
+    content: "\f55c"
+}
+
+.fa-book:before {
+    content: "\f02d"
+}
+
+.fa-book-dead:before {
+    content: "\f6b7"
+}
+
+.fa-book-medical:before {
+    content: "\f7e6"
+}
+
+.fa-book-open:before {
+    content: "\f518"
+}
+
+.fa-book-reader:before {
+    content: "\f5da"
+}
+
+.fa-bookmark:before {
+    content: "\f02e"
+}
+
+.fa-bootstrap:before {
+    content: "\f836"
+}
+
+.fa-border-all:before {
+    content: "\f84c"
+}
+
+.fa-border-none:before {
+    content: "\f850"
+}
+
+.fa-border-style:before {
+    content: "\f853"
+}
+
+.fa-bowling-ball:before {
+    content: "\f436"
+}
+
+.fa-box:before {
+    content: "\f466"
+}
+
+.fa-box-open:before {
+    content: "\f49e"
+}
+
+.fa-boxes:before {
+    content: "\f468"
+}
+
+.fa-braille:before {
+    content: "\f2a1"
+}
+
+.fa-brain:before {
+    content: "\f5dc"
+}
+
+.fa-bread-slice:before {
+    content: "\f7ec"
+}
+
+.fa-briefcase:before {
+    content: "\f0b1"
+}
+
+.fa-briefcase-medical:before {
+    content: "\f469"
+}
+
+.fa-broadcast-tower:before {
+    content: "\f519"
+}
+
+.fa-broom:before {
+    content: "\f51a"
+}
+
+.fa-brush:before {
+    content: "\f55d"
+}
+
+.fa-btc:before {
+    content: "\f15a"
+}
+
+.fa-buffer:before {
+    content: "\f837"
+}
+
+.fa-bug:before {
+    content: "\f188"
+}
+
+.fa-building:before {
+    content: "\f1ad"
+}
+
+.fa-bullhorn:before {
+    content: "\f0a1"
+}
+
+.fa-bullseye:before {
+    content: "\f140"
+}
+
+.fa-burn:before {
+    content: "\f46a"
+}
+
+.fa-buromobelexperte:before {
+    content: "\f37f"
+}
+
+.fa-bus:before {
+    content: "\f207"
+}
+
+.fa-bus-alt:before {
+    content: "\f55e"
+}
+
+.fa-business-time:before {
+    content: "\f64a"
+}
+
+.fa-buysellads:before {
+    content: "\f20d"
+}
+
+.fa-calculator:before {
+    content: "\f1ec"
+}
+
+.fa-calendar:before {
+    content: "\f133"
+}
+
+.fa-calendar-alt:before {
+    content: "\f073"
+}
+
+.fa-calendar-check:before {
+    content: "\f274"
+}
+
+.fa-calendar-day:before {
+    content: "\f783"
+}
+
+.fa-calendar-minus:before {
+    content: "\f272"
+}
+
+.fa-calendar-plus:before {
+    content: "\f271"
+}
+
+.fa-calendar-times:before {
+    content: "\f273"
+}
+
+.fa-calendar-week:before {
+    content: "\f784"
+}
+
+.fa-camera:before {
+    content: "\f030"
+}
+
+.fa-camera-retro:before {
+    content: "\f083"
+}
+
+.fa-campground:before {
+    content: "\f6bb"
+}
+
+.fa-canadian-maple-leaf:before {
+    content: "\f785"
+}
+
+.fa-candy-cane:before {
+    content: "\f786"
+}
+
+.fa-cannabis:before {
+    content: "\f55f"
+}
+
+.fa-capsules:before {
+    content: "\f46b"
+}
+
+.fa-car:before {
+    content: "\f1b9"
+}
+
+.fa-car-alt:before {
+    content: "\f5de"
+}
+
+.fa-car-battery:before {
+    content: "\f5df"
+}
+
+.fa-car-crash:before {
+    content: "\f5e1"
+}
+
+.fa-car-side:before {
+    content: "\f5e4"
+}
+
+.fa-caret-down:before {
+    content: "\f0d7"
+}
+
+.fa-caret-left:before {
+    content: "\f0d9"
+}
+
+.fa-caret-right:before {
+    content: "\f0da"
+}
+
+.fa-caret-square-down:before {
+    content: "\f150"
+}
+
+.fa-caret-square-left:before {
+    content: "\f191"
+}
+
+.fa-caret-square-right:before {
+    content: "\f152"
+}
+
+.fa-caret-square-up:before {
+    content: "\f151"
+}
+
+.fa-caret-up:before {
+    content: "\f0d8"
+}
+
+.fa-carrot:before {
+    content: "\f787"
+}
+
+.fa-cart-arrow-down:before {
+    content: "\f218"
+}
+
+.fa-cart-plus:before {
+    content: "\f217"
+}
+
+.fa-cash-register:before {
+    content: "\f788"
+}
+
+.fa-cat:before {
+    content: "\f6be"
+}
+
+.fa-cc-amazon-pay:before {
+    content: "\f42d"
+}
+
+.fa-cc-amex:before {
+    content: "\f1f3"
+}
+
+.fa-cc-apple-pay:before {
+    content: "\f416"
+}
+
+.fa-cc-diners-club:before {
+    content: "\f24c"
+}
+
+.fa-cc-discover:before {
+    content: "\f1f2"
+}
+
+.fa-cc-jcb:before {
+    content: "\f24b"
+}
+
+.fa-cc-mastercard:before {
+    content: "\f1f1"
+}
+
+.fa-cc-paypal:before {
+    content: "\f1f4"
+}
+
+.fa-cc-stripe:before {
+    content: "\f1f5"
+}
+
+.fa-cc-visa:before {
+    content: "\f1f0"
+}
+
+.fa-centercode:before {
+    content: "\f380"
+}
+
+.fa-centos:before {
+    content: "\f789"
+}
+
+.fa-certificate:before {
+    content: "\f0a3"
+}
+
+.fa-chair:before {
+    content: "\f6c0"
+}
+
+.fa-chalkboard:before {
+    content: "\f51b"
+}
+
+.fa-chalkboard-teacher:before {
+    content: "\f51c"
+}
+
+.fa-charging-station:before {
+    content: "\f5e7"
+}
+
+.fa-chart-area:before {
+    content: "\f1fe"
+}
+
+.fa-chart-bar:before {
+    content: "\f080"
+}
+
+.fa-chart-line:before {
+    content: "\f201"
+}
+
+.fa-chart-pie:before {
+    content: "\f200"
+}
+
+.fa-check:before {
+    content: "\f00c"
+}
+
+.fa-check-circle:before {
+    content: "\f058"
+}
+
+.fa-check-double:before {
+    content: "\f560"
+}
+
+.fa-check-square:before {
+    content: "\f14a"
+}
+
+.fa-cheese:before {
+    content: "\f7ef"
+}
+
+.fa-chess:before {
+    content: "\f439"
+}
+
+.fa-chess-bishop:before {
+    content: "\f43a"
+}
+
+.fa-chess-board:before {
+    content: "\f43c"
+}
+
+.fa-chess-king:before {
+    content: "\f43f"
+}
+
+.fa-chess-knight:before {
+    content: "\f441"
+}
+
+.fa-chess-pawn:before {
+    content: "\f443"
+}
+
+.fa-chess-queen:before {
+    content: "\f445"
+}
+
+.fa-chess-rook:before {
+    content: "\f447"
+}
+
+.fa-chevron-circle-down:before {
+    content: "\f13a"
+}
+
+.fa-chevron-circle-left:before {
+    content: "\f137"
+}
+
+.fa-chevron-circle-right:before {
+    content: "\f138"
+}
+
+.fa-chevron-circle-up:before {
+    content: "\f139"
+}
+
+.fa-chevron-down:before {
+    content: "\f078"
+}
+
+.fa-chevron-left:before {
+    content: "\f053"
+}
+
+.fa-chevron-right:before {
+    content: "\f054"
+}
+
+.fa-chevron-up:before {
+    content: "\f077"
+}
+
+.fa-child:before {
+    content: "\f1ae"
+}
+
+.fa-chrome:before {
+    content: "\f268"
+}
+
+.fa-chromecast:before {
+    content: "\f838"
+}
+
+.fa-church:before {
+    content: "\f51d"
+}
+
+.fa-circle:before {
+    content: "\f111"
+}
+
+.fa-circle-notch:before {
+    content: "\f1ce"
+}
+
+.fa-city:before {
+    content: "\f64f"
+}
+
+.fa-clinic-medical:before {
+    content: "\f7f2"
+}
+
+.fa-clipboard:before {
+    content: "\f328"
+}
+
+.fa-clipboard-check:before {
+    content: "\f46c"
+}
+
+.fa-clipboard-list:before {
+    content: "\f46d"
+}
+
+.fa-clock:before {
+    content: "\f017"
+}
+
+.fa-clone:before {
+    content: "\f24d"
+}
+
+.fa-closed-captioning:before {
+    content: "\f20a"
+}
+
+.fa-cloud:before {
+    content: "\f0c2"
+}
+
+.fa-cloud-download-alt:before {
+    content: "\f381"
+}
+
+.fa-cloud-meatball:before {
+    content: "\f73b"
+}
+
+.fa-cloud-moon:before {
+    content: "\f6c3"
+}
+
+.fa-cloud-moon-rain:before {
+    content: "\f73c"
+}
+
+.fa-cloud-rain:before {
+    content: "\f73d"
+}
+
+.fa-cloud-showers-heavy:before {
+    content: "\f740"
+}
+
+.fa-cloud-sun:before {
+    content: "\f6c4"
+}
+
+.fa-cloud-sun-rain:before {
+    content: "\f743"
+}
+
+.fa-cloud-upload-alt:before {
+    content: "\f382"
+}
+
+.fa-cloudscale:before {
+    content: "\f383"
+}
+
+.fa-cloudsmith:before {
+    content: "\f384"
+}
+
+.fa-cloudversify:before {
+    content: "\f385"
+}
+
+.fa-cocktail:before {
+    content: "\f561"
+}
+
+.fa-code:before {
+    content: "\f121"
+}
+
+.fa-code-branch:before {
+    content: "\f126"
+}
+
+.fa-codepen:before {
+    content: "\f1cb"
+}
+
+.fa-codiepie:before {
+    content: "\f284"
+}
+
+.fa-coffee:before {
+    content: "\f0f4"
+}
+
+.fa-cog:before {
+    content: "\f013"
+}
+
+.fa-cogs:before {
+    content: "\f085"
+}
+
+.fa-coins:before {
+    content: "\f51e"
+}
+
+.fa-columns:before {
+    content: "\f0db"
+}
+
+.fa-comment:before {
+    content: "\f075"
+}
+
+.fa-comment-alt:before {
+    content: "\f27a"
+}
+
+.fa-comment-dollar:before {
+    content: "\f651"
+}
+
+.fa-comment-dots:before {
+    content: "\f4ad"
+}
+
+.fa-comment-medical:before {
+    content: "\f7f5"
+}
+
+.fa-comment-slash:before {
+    content: "\f4b3"
+}
+
+.fa-comments:before {
+    content: "\f086"
+}
+
+.fa-comments-dollar:before {
+    content: "\f653"
+}
+
+.fa-compact-disc:before {
+    content: "\f51f"
+}
+
+.fa-compass:before {
+    content: "\f14e"
+}
+
+.fa-compress:before {
+    content: "\f066"
+}
+
+.fa-compress-arrows-alt:before {
+    content: "\f78c"
+}
+
+.fa-concierge-bell:before {
+    content: "\f562"
+}
+
+.fa-confluence:before {
+    content: "\f78d"
+}
+
+.fa-connectdevelop:before {
+    content: "\f20e"
+}
+
+.fa-contao:before {
+    content: "\f26d"
+}
+
+.fa-cookie:before {
+    content: "\f563"
+}
+
+.fa-cookie-bite:before {
+    content: "\f564"
+}
+
+.fa-copy:before {
+    content: "\f0c5"
+}
+
+.fa-copyright:before {
+    content: "\f1f9"
+}
+
+.fa-couch:before {
+    content: "\f4b8"
+}
+
+.fa-cpanel:before {
+    content: "\f388"
+}
+
+.fa-creative-commons:before {
+    content: "\f25e"
+}
+
+.fa-creative-commons-by:before {
+    content: "\f4e7"
+}
+
+.fa-creative-commons-nc:before {
+    content: "\f4e8"
+}
+
+.fa-creative-commons-nc-eu:before {
+    content: "\f4e9"
+}
+
+.fa-creative-commons-nc-jp:before {
+    content: "\f4ea"
+}
+
+.fa-creative-commons-nd:before {
+    content: "\f4eb"
+}
+
+.fa-creative-commons-pd:before {
+    content: "\f4ec"
+}
+
+.fa-creative-commons-pd-alt:before {
+    content: "\f4ed"
+}
+
+.fa-creative-commons-remix:before {
+    content: "\f4ee"
+}
+
+.fa-creative-commons-sa:before {
+    content: "\f4ef"
+}
+
+.fa-creative-commons-sampling:before {
+    content: "\f4f0"
+}
+
+.fa-creative-commons-sampling-plus:before {
+    content: "\f4f1"
+}
+
+.fa-creative-commons-share:before {
+    content: "\f4f2"
+}
+
+.fa-creative-commons-zero:before {
+    content: "\f4f3"
+}
+
+.fa-credit-card:before {
+    content: "\f09d"
+}
+
+.fa-critical-role:before {
+    content: "\f6c9"
+}
+
+.fa-crop:before {
+    content: "\f125"
+}
+
+.fa-crop-alt:before {
+    content: "\f565"
+}
+
+.fa-cross:before {
+    content: "\f654"
+}
+
+.fa-crosshairs:before {
+    content: "\f05b"
+}
+
+.fa-crow:before {
+    content: "\f520"
+}
+
+.fa-crown:before {
+    content: "\f521"
+}
+
+.fa-crutch:before {
+    content: "\f7f7"
+}
+
+.fa-css3:before {
+    content: "\f13c"
+}
+
+.fa-css3-alt:before {
+    content: "\f38b"
+}
+
+.fa-cube:before {
+    content: "\f1b2"
+}
+
+.fa-cubes:before {
+    content: "\f1b3"
+}
+
+.fa-cut:before {
+    content: "\f0c4"
+}
+
+.fa-cuttlefish:before {
+    content: "\f38c"
+}
+
+.fa-d-and-d:before {
+    content: "\f38d"
+}
+
+.fa-d-and-d-beyond:before {
+    content: "\f6ca"
+}
+
+.fa-dashcube:before {
+    content: "\f210"
+}
+
+.fa-database:before {
+    content: "\f1c0"
+}
+
+.fa-deaf:before {
+    content: "\f2a4"
+}
+
+.fa-delicious:before {
+    content: "\f1a5"
+}
+
+.fa-democrat:before {
+    content: "\f747"
+}
+
+.fa-deploydog:before {
+    content: "\f38e"
+}
+
+.fa-deskpro:before {
+    content: "\f38f"
+}
+
+.fa-desktop:before {
+    content: "\f108"
+}
+
+.fa-dev:before {
+    content: "\f6cc"
+}
+
+.fa-deviantart:before {
+    content: "\f1bd"
+}
+
+.fa-dharmachakra:before {
+    content: "\f655"
+}
+
+.fa-dhl:before {
+    content: "\f790"
+}
+
+.fa-diagnoses:before {
+    content: "\f470"
+}
+
+.fa-diaspora:before {
+    content: "\f791"
+}
+
+.fa-dice:before {
+    content: "\f522"
+}
+
+.fa-dice-d20:before {
+    content: "\f6cf"
+}
+
+.fa-dice-d6:before {
+    content: "\f6d1"
+}
+
+.fa-dice-five:before {
+    content: "\f523"
+}
+
+.fa-dice-four:before {
+    content: "\f524"
+}
+
+.fa-dice-one:before {
+    content: "\f525"
+}
+
+.fa-dice-six:before {
+    content: "\f526"
+}
+
+.fa-dice-three:before {
+    content: "\f527"
+}
+
+.fa-dice-two:before {
+    content: "\f528"
+}
+
+.fa-digg:before {
+    content: "\f1a6"
+}
+
+.fa-digital-ocean:before {
+    content: "\f391"
+}
+
+.fa-digital-tachograph:before {
+    content: "\f566"
+}
+
+.fa-directions:before {
+    content: "\f5eb"
+}
+
+.fa-discord:before {
+    content: "\f392"
+}
+
+.fa-discourse:before {
+    content: "\f393"
+}
+
+.fa-divide:before {
+    content: "\f529"
+}
+
+.fa-dizzy:before {
+    content: "\f567"
+}
+
+.fa-dna:before {
+    content: "\f471"
+}
+
+.fa-dochub:before {
+    content: "\f394"
+}
+
+.fa-docker:before {
+    content: "\f395"
+}
+
+.fa-dog:before {
+    content: "\f6d3"
+}
+
+.fa-dollar-sign:before {
+    content: "\f155"
+}
+
+.fa-dolly:before {
+    content: "\f472"
+}
+
+.fa-dolly-flatbed:before {
+    content: "\f474"
+}
+
+.fa-donate:before {
+    content: "\f4b9"
+}
+
+.fa-door-closed:before {
+    content: "\f52a"
+}
+
+.fa-door-open:before {
+    content: "\f52b"
+}
+
+.fa-dot-circle:before {
+    content: "\f192"
+}
+
+.fa-dove:before {
+    content: "\f4ba"
+}
+
+.fa-download:before {
+    content: "\f019"
+}
+
+.fa-draft2digital:before {
+    content: "\f396"
+}
+
+.fa-drafting-compass:before {
+    content: "\f568"
+}
+
+.fa-dragon:before {
+    content: "\f6d5"
+}
+
+.fa-draw-polygon:before {
+    content: "\f5ee"
+}
+
+.fa-dribbble:before {
+    content: "\f17d"
+}
+
+.fa-dribbble-square:before {
+    content: "\f397"
+}
+
+.fa-dropbox:before {
+    content: "\f16b"
+}
+
+.fa-drum:before {
+    content: "\f569"
+}
+
+.fa-drum-steelpan:before {
+    content: "\f56a"
+}
+
+.fa-drumstick-bite:before {
+    content: "\f6d7"
+}
+
+.fa-drupal:before {
+    content: "\f1a9"
+}
+
+.fa-dumbbell:before {
+    content: "\f44b"
+}
+
+.fa-dumpster:before {
+    content: "\f793"
+}
+
+.fa-dumpster-fire:before {
+    content: "\f794"
+}
+
+.fa-dungeon:before {
+    content: "\f6d9"
+}
+
+.fa-dyalog:before {
+    content: "\f399"
+}
+
+.fa-earlybirds:before {
+    content: "\f39a"
+}
+
+.fa-ebay:before {
+    content: "\f4f4"
+}
+
+.fa-edge:before {
+    content: "\f282"
+}
+
+.fa-edit:before {
+    content: "\f044"
+}
+
+.fa-egg:before {
+    content: "\f7fb"
+}
+
+.fa-eject:before {
+    content: "\f052"
+}
+
+.fa-elementor:before {
+    content: "\f430"
+}
+
+.fa-ellipsis-h:before {
+    content: "\f141"
+}
+
+.fa-ellipsis-v:before {
+    content: "\f142"
+}
+
+.fa-ello:before {
+    content: "\f5f1"
+}
+
+.fa-ember:before {
+    content: "\f423"
+}
+
+.fa-empire:before {
+    content: "\f1d1"
+}
+
+.fa-envelope:before {
+    content: "\f0e0"
+}
+
+.fa-envelope-open:before {
+    content: "\f2b6"
+}
+
+.fa-envelope-open-text:before {
+    content: "\f658"
+}
+
+.fa-envelope-square:before {
+    content: "\f199"
+}
+
+.fa-envira:before {
+    content: "\f299"
+}
+
+.fa-equals:before {
+    content: "\f52c"
+}
+
+.fa-eraser:before {
+    content: "\f12d"
+}
+
+.fa-erlang:before {
+    content: "\f39d"
+}
+
+.fa-ethereum:before {
+    content: "\f42e"
+}
+
+.fa-ethernet:before {
+    content: "\f796"
+}
+
+.fa-etsy:before {
+    content: "\f2d7"
+}
+
+.fa-euro-sign:before {
+    content: "\f153"
+}
+
+.fa-evernote:before {
+    content: "\f839"
+}
+
+.fa-exchange-alt:before {
+    content: "\f362"
+}
+
+.fa-exclamation:before {
+    content: "\f12a"
+}
+
+.fa-exclamation-circle:before {
+    content: "\f06a"
+}
+
+.fa-exclamation-triangle:before {
+    content: "\f071"
+}
+
+.fa-expand:before {
+    content: "\f065"
+}
+
+.fa-expand-arrows-alt:before {
+    content: "\f31e"
+}
+
+.fa-expeditedssl:before {
+    content: "\f23e"
+}
+
+.fa-external-link-alt:before {
+    content: "\f35d"
+}
+
+.fa-external-link-square-alt:before {
+    content: "\f360"
+}
+
+.fa-eye:before {
+    content: "\f06e"
+}
+
+.fa-eye-dropper:before {
+    content: "\f1fb"
+}
+
+.fa-eye-slash:before {
+    content: "\f070"
+}
+
+.fa-facebook:before {
+    content: "\f09a"
+}
+
+.fa-facebook-f:before {
+    content: "\f39e"
+}
+
+.fa-facebook-messenger:before {
+    content: "\f39f"
+}
+
+.fa-facebook-square:before {
+    content: "\f082"
+}
+
+.fa-fan:before {
+    content: "\f863"
+}
+
+.fa-fantasy-flight-games:before {
+    content: "\f6dc"
+}
+
+.fa-fast-backward:before {
+    content: "\f049"
+}
+
+.fa-fast-forward:before {
+    content: "\f050"
+}
+
+.fa-fax:before {
+    content: "\f1ac"
+}
+
+.fa-feather:before {
+    content: "\f52d"
+}
+
+.fa-feather-alt:before {
+    content: "\f56b"
+}
+
+.fa-fedex:before {
+    content: "\f797"
+}
+
+.fa-fedora:before {
+    content: "\f798"
+}
+
+.fa-female:before {
+    content: "\f182"
+}
+
+.fa-fighter-jet:before {
+    content: "\f0fb"
+}
+
+.fa-figma:before {
+    content: "\f799"
+}
+
+.fa-file:before {
+    content: "\f15b"
+}
+
+.fa-file-alt:before {
+    content: "\f15c"
+}
+
+.fa-file-archive:before {
+    content: "\f1c6"
+}
+
+.fa-file-audio:before {
+    content: "\f1c7"
+}
+
+.fa-file-code:before {
+    content: "\f1c9"
+}
+
+.fa-file-contract:before {
+    content: "\f56c"
+}
+
+.fa-file-csv:before {
+    content: "\f6dd"
+}
+
+.fa-file-download:before {
+    content: "\f56d"
+}
+
+.fa-file-excel:before {
+    content: "\f1c3"
+}
+
+.fa-file-export:before {
+    content: "\f56e"
+}
+
+.fa-file-image:before {
+    content: "\f1c5"
+}
+
+.fa-file-import:before {
+    content: "\f56f"
+}
+
+.fa-file-invoice:before {
+    content: "\f570"
+}
+
+.fa-file-invoice-dollar:before {
+    content: "\f571"
+}
+
+.fa-file-medical:before {
+    content: "\f477"
+}
+
+.fa-file-medical-alt:before {
+    content: "\f478"
+}
+
+.fa-file-pdf:before {
+    content: "\f1c1"
+}
+
+.fa-file-powerpoint:before {
+    content: "\f1c4"
+}
+
+.fa-file-prescription:before {
+    content: "\f572"
+}
+
+.fa-file-signature:before {
+    content: "\f573"
+}
+
+.fa-file-upload:before {
+    content: "\f574"
+}
+
+.fa-file-video:before {
+    content: "\f1c8"
+}
+
+.fa-file-word:before {
+    content: "\f1c2"
+}
+
+.fa-fill:before {
+    content: "\f575"
+}
+
+.fa-fill-drip:before {
+    content: "\f576"
+}
+
+.fa-film:before {
+    content: "\f008"
+}
+
+.fa-filter:before {
+    content: "\f0b0"
+}
+
+.fa-fingerprint:before {
+    content: "\f577"
+}
+
+.fa-fire:before {
+    content: "\f06d"
+}
+
+.fa-fire-alt:before {
+    content: "\f7e4"
+}
+
+.fa-fire-extinguisher:before {
+    content: "\f134"
+}
+
+.fa-firefox:before {
+    content: "\f269"
+}
+
+.fa-first-aid:before {
+    content: "\f479"
+}
+
+.fa-first-order:before {
+    content: "\f2b0"
+}
+
+.fa-first-order-alt:before {
+    content: "\f50a"
+}
+
+.fa-firstdraft:before {
+    content: "\f3a1"
+}
+
+.fa-fish:before {
+    content: "\f578"
+}
+
+.fa-fist-raised:before {
+    content: "\f6de"
+}
+
+.fa-flag:before {
+    content: "\f024"
+}
+
+.fa-flag-checkered:before {
+    content: "\f11e"
+}
+
+.fa-flag-usa:before {
+    content: "\f74d"
+}
+
+.fa-flask:before {
+    content: "\f0c3"
+}
+
+.fa-flickr:before {
+    content: "\f16e"
+}
+
+.fa-flipboard:before {
+    content: "\f44d"
+}
+
+.fa-flushed:before {
+    content: "\f579"
+}
+
+.fa-fly:before {
+    content: "\f417"
+}
+
+.fa-folder:before {
+    content: "\f07b"
+}
+
+.fa-folder-minus:before {
+    content: "\f65d"
+}
+
+.fa-folder-open:before {
+    content: "\f07c"
+}
+
+.fa-folder-plus:before {
+    content: "\f65e"
+}
+
+.fa-font:before {
+    content: "\f031"
+}
+
+.fa-font-awesome:before {
+    content: "\f2b4"
+}
+
+.fa-font-awesome-alt:before {
+    content: "\f35c"
+}
+
+.fa-font-awesome-flag:before {
+    content: "\f425"
+}
+
+.fa-font-awesome-logo-full:before {
+    content: "\f4e6"
+}
+
+.fa-fonticons:before {
+    content: "\f280"
+}
+
+.fa-fonticons-fi:before {
+    content: "\f3a2"
+}
+
+.fa-football-ball:before {
+    content: "\f44e"
+}
+
+.fa-fort-awesome:before {
+    content: "\f286"
+}
+
+.fa-fort-awesome-alt:before {
+    content: "\f3a3"
+}
+
+.fa-forumbee:before {
+    content: "\f211"
+}
+
+.fa-forward:before {
+    content: "\f04e"
+}
+
+.fa-foursquare:before {
+    content: "\f180"
+}
+
+.fa-free-code-camp:before {
+    content: "\f2c5"
+}
+
+.fa-freebsd:before {
+    content: "\f3a4"
+}
+
+.fa-frog:before {
+    content: "\f52e"
+}
+
+.fa-frown:before {
+    content: "\f119"
+}
+
+.fa-frown-open:before {
+    content: "\f57a"
+}
+
+.fa-fulcrum:before {
+    content: "\f50b"
+}
+
+.fa-funnel-dollar:before {
+    content: "\f662"
+}
+
+.fa-futbol:before {
+    content: "\f1e3"
+}
+
+.fa-galactic-republic:before {
+    content: "\f50c"
+}
+
+.fa-galactic-senate:before {
+    content: "\f50d"
+}
+
+.fa-gamepad:before {
+    content: "\f11b"
+}
+
+.fa-gas-pump:before {
+    content: "\f52f"
+}
+
+.fa-gavel:before {
+    content: "\f0e3"
+}
+
+.fa-gem:before {
+    content: "\f3a5"
+}
+
+.fa-genderless:before {
+    content: "\f22d"
+}
+
+.fa-get-pocket:before {
+    content: "\f265"
+}
+
+.fa-gg:before {
+    content: "\f260"
+}
+
+.fa-gg-circle:before {
+    content: "\f261"
+}
+
+.fa-ghost:before {
+    content: "\f6e2"
+}
+
+.fa-gift:before {
+    content: "\f06b"
+}
+
+.fa-gifts:before {
+    content: "\f79c"
+}
+
+.fa-git:before {
+    content: "\f1d3"
+}
+
+.fa-git-alt:before {
+    content: "\f841"
+}
+
+.fa-git-square:before {
+    content: "\f1d2"
+}
+
+.fa-github:before {
+    content: "\f09b"
+}
+
+.fa-github-alt:before {
+    content: "\f113"
+}
+
+.fa-github-square:before {
+    content: "\f092"
+}
+
+.fa-gitkraken:before {
+    content: "\f3a6"
+}
+
+.fa-gitlab:before {
+    content: "\f296"
+}
+
+.fa-gitter:before {
+    content: "\f426"
+}
+
+.fa-glass-cheers:before {
+    content: "\f79f"
+}
+
+.fa-glass-martini:before {
+    content: "\f000"
+}
+
+.fa-glass-martini-alt:before {
+    content: "\f57b"
+}
+
+.fa-glass-whiskey:before {
+    content: "\f7a0"
+}
+
+.fa-glasses:before {
+    content: "\f530"
+}
+
+.fa-glide:before {
+    content: "\f2a5"
+}
+
+.fa-glide-g:before {
+    content: "\f2a6"
+}
+
+.fa-globe:before {
+    content: "\f0ac"
+}
+
+.fa-globe-africa:before {
+    content: "\f57c"
+}
+
+.fa-globe-americas:before {
+    content: "\f57d"
+}
+
+.fa-globe-asia:before {
+    content: "\f57e"
+}
+
+.fa-globe-europe:before {
+    content: "\f7a2"
+}
+
+.fa-gofore:before {
+    content: "\f3a7"
+}
+
+.fa-golf-ball:before {
+    content: "\f450"
+}
+
+.fa-goodreads:before {
+    content: "\f3a8"
+}
+
+.fa-goodreads-g:before {
+    content: "\f3a9"
+}
+
+.fa-google:before {
+    content: "\f1a0"
+}
+
+.fa-google-drive:before {
+    content: "\f3aa"
+}
+
+.fa-google-play:before {
+    content: "\f3ab"
+}
+
+.fa-google-plus:before {
+    content: "\f2b3"
+}
+
+.fa-google-plus-g:before {
+    content: "\f0d5"
+}
+
+.fa-google-plus-square:before {
+    content: "\f0d4"
+}
+
+.fa-google-wallet:before {
+    content: "\f1ee"
+}
+
+.fa-gopuram:before {
+    content: "\f664"
+}
+
+.fa-graduation-cap:before {
+    content: "\f19d"
+}
+
+.fa-gratipay:before {
+    content: "\f184"
+}
+
+.fa-grav:before {
+    content: "\f2d6"
+}
+
+.fa-greater-than:before {
+    content: "\f531"
+}
+
+.fa-greater-than-equal:before {
+    content: "\f532"
+}
+
+.fa-grimace:before {
+    content: "\f57f"
+}
+
+.fa-grin:before {
+    content: "\f580"
+}
+
+.fa-grin-alt:before {
+    content: "\f581"
+}
+
+.fa-grin-beam:before {
+    content: "\f582"
+}
+
+.fa-grin-beam-sweat:before {
+    content: "\f583"
+}
+
+.fa-grin-hearts:before {
+    content: "\f584"
+}
+
+.fa-grin-squint:before {
+    content: "\f585"
+}
+
+.fa-grin-squint-tears:before {
+    content: "\f586"
+}
+
+.fa-grin-stars:before {
+    content: "\f587"
+}
+
+.fa-grin-tears:before {
+    content: "\f588"
+}
+
+.fa-grin-tongue:before {
+    content: "\f589"
+}
+
+.fa-grin-tongue-squint:before {
+    content: "\f58a"
+}
+
+.fa-grin-tongue-wink:before {
+    content: "\f58b"
+}
+
+.fa-grin-wink:before {
+    content: "\f58c"
+}
+
+.fa-grip-horizontal:before {
+    content: "\f58d"
+}
+
+.fa-grip-lines:before {
+    content: "\f7a4"
+}
+
+.fa-grip-lines-vertical:before {
+    content: "\f7a5"
+}
+
+.fa-grip-vertical:before {
+    content: "\f58e"
+}
+
+.fa-gripfire:before {
+    content: "\f3ac"
+}
+
+.fa-grunt:before {
+    content: "\f3ad"
+}
+
+.fa-guitar:before {
+    content: "\f7a6"
+}
+
+.fa-gulp:before {
+    content: "\f3ae"
+}
+
+.fa-h-square:before {
+    content: "\f0fd"
+}
+
+.fa-hacker-news:before {
+    content: "\f1d4"
+}
+
+.fa-hacker-news-square:before {
+    content: "\f3af"
+}
+
+.fa-hackerrank:before {
+    content: "\f5f7"
+}
+
+.fa-hamburger:before {
+    content: "\f805"
+}
+
+.fa-hammer:before {
+    content: "\f6e3"
+}
+
+.fa-hamsa:before {
+    content: "\f665"
+}
+
+.fa-hand-holding:before {
+    content: "\f4bd"
+}
+
+.fa-hand-holding-heart:before {
+    content: "\f4be"
+}
+
+.fa-hand-holding-usd:before {
+    content: "\f4c0"
+}
+
+.fa-hand-lizard:before {
+    content: "\f258"
+}
+
+.fa-hand-middle-finger:before {
+    content: "\f806"
+}
+
+.fa-hand-paper:before {
+    content: "\f256"
+}
+
+.fa-hand-peace:before {
+    content: "\f25b"
+}
+
+.fa-hand-point-down:before {
+    content: "\f0a7"
+}
+
+.fa-hand-point-left:before {
+    content: "\f0a5"
+}
+
+.fa-hand-point-right:before {
+    content: "\f0a4"
+}
+
+.fa-hand-point-up:before {
+    content: "\f0a6"
+}
+
+.fa-hand-pointer:before {
+    content: "\f25a"
+}
+
+.fa-hand-rock:before {
+    content: "\f255"
+}
+
+.fa-hand-scissors:before {
+    content: "\f257"
+}
+
+.fa-hand-spock:before {
+    content: "\f259"
+}
+
+.fa-hands:before {
+    content: "\f4c2"
+}
+
+.fa-hands-helping:before {
+    content: "\f4c4"
+}
+
+.fa-handshake:before {
+    content: "\f2b5"
+}
+
+.fa-hanukiah:before {
+    content: "\f6e6"
+}
+
+.fa-hard-hat:before {
+    content: "\f807"
+}
+
+.fa-hashtag:before {
+    content: "\f292"
+}
+
+.fa-hat-wizard:before {
+    content: "\f6e8"
+}
+
+.fa-haykal:before {
+    content: "\f666"
+}
+
+.fa-hdd:before {
+    content: "\f0a0"
+}
+
+.fa-heading:before {
+    content: "\f1dc"
+}
+
+.fa-headphones:before {
+    content: "\f025"
+}
+
+.fa-headphones-alt:before {
+    content: "\f58f"
+}
+
+.fa-headset:before {
+    content: "\f590"
+}
+
+.fa-heart:before {
+    content: "\f004"
+}
+
+.fa-heart-broken:before {
+    content: "\f7a9"
+}
+
+.fa-heartbeat:before {
+    content: "\f21e"
+}
+
+.fa-helicopter:before {
+    content: "\f533"
+}
+
+.fa-highlighter:before {
+    content: "\f591"
+}
+
+.fa-hiking:before {
+    content: "\f6ec"
+}
+
+.fa-hippo:before {
+    content: "\f6ed"
+}
+
+.fa-hips:before {
+    content: "\f452"
+}
+
+.fa-hire-a-helper:before {
+    content: "\f3b0"
+}
+
+.fa-history:before {
+    content: "\f1da"
+}
+
+.fa-hockey-puck:before {
+    content: "\f453"
+}
+
+.fa-holly-berry:before {
+    content: "\f7aa"
+}
+
+.fa-home:before {
+    content: "\f015"
+}
+
+.fa-hooli:before {
+    content: "\f427"
+}
+
+.fa-hornbill:before {
+    content: "\f592"
+}
+
+.fa-horse:before {
+    content: "\f6f0"
+}
+
+.fa-horse-head:before {
+    content: "\f7ab"
+}
+
+.fa-hospital:before {
+    content: "\f0f8"
+}
+
+.fa-hospital-alt:before {
+    content: "\f47d"
+}
+
+.fa-hospital-symbol:before {
+    content: "\f47e"
+}
+
+.fa-hot-tub:before {
+    content: "\f593"
+}
+
+.fa-hotdog:before {
+    content: "\f80f"
+}
+
+.fa-hotel:before {
+    content: "\f594"
+}
+
+.fa-hotjar:before {
+    content: "\f3b1"
+}
+
+.fa-hourglass:before {
+    content: "\f254"
+}
+
+.fa-hourglass-end:before {
+    content: "\f253"
+}
+
+.fa-hourglass-half:before {
+    content: "\f252"
+}
+
+.fa-hourglass-start:before {
+    content: "\f251"
+}
+
+.fa-house-damage:before {
+    content: "\f6f1"
+}
+
+.fa-houzz:before {
+    content: "\f27c"
+}
+
+.fa-hryvnia:before {
+    content: "\f6f2"
+}
+
+.fa-html5:before {
+    content: "\f13b"
+}
+
+.fa-hubspot:before {
+    content: "\f3b2"
+}
+
+.fa-i-cursor:before {
+    content: "\f246"
+}
+
+.fa-ice-cream:before {
+    content: "\f810"
+}
+
+.fa-icicles:before {
+    content: "\f7ad"
+}
+
+.fa-icons:before {
+    content: "\f86d"
+}
+
+.fa-id-badge:before {
+    content: "\f2c1"
+}
+
+.fa-id-card:before {
+    content: "\f2c2"
+}
+
+.fa-id-card-alt:before {
+    content: "\f47f"
+}
+
+.fa-igloo:before {
+    content: "\f7ae"
+}
+
+.fa-image:before {
+    content: "\f03e"
+}
+
+.fa-images:before {
+    content: "\f302"
+}
+
+.fa-imdb:before {
+    content: "\f2d8"
+}
+
+.fa-inbox:before {
+    content: "\f01c"
+}
+
+.fa-indent:before {
+    content: "\f03c"
+}
+
+.fa-industry:before {
+    content: "\f275"
+}
+
+.fa-infinity:before {
+    content: "\f534"
+}
+
+.fa-info:before {
+    content: "\f129"
+}
+
+.fa-info-circle:before {
+    content: "\f05a"
+}
+
+.fa-instagram:before {
+    content: "\f16d"
+}
+
+.fa-intercom:before {
+    content: "\f7af"
+}
+
+.fa-internet-explorer:before {
+    content: "\f26b"
+}
+
+.fa-invision:before {
+    content: "\f7b0"
+}
+
+.fa-ioxhost:before {
+    content: "\f208"
+}
+
+.fa-italic:before {
+    content: "\f033"
+}
+
+.fa-itch-io:before {
+    content: "\f83a"
+}
+
+.fa-itunes:before {
+    content: "\f3b4"
+}
+
+.fa-itunes-note:before {
+    content: "\f3b5"
+}
+
+.fa-java:before {
+    content: "\f4e4"
+}
+
+.fa-jedi:before {
+    content: "\f669"
+}
+
+.fa-jedi-order:before {
+    content: "\f50e"
+}
+
+.fa-jenkins:before {
+    content: "\f3b6"
+}
+
+.fa-jira:before {
+    content: "\f7b1"
+}
+
+.fa-joget:before {
+    content: "\f3b7"
+}
+
+.fa-joint:before {
+    content: "\f595"
+}
+
+.fa-joomla:before {
+    content: "\f1aa"
+}
+
+.fa-journal-whills:before {
+    content: "\f66a"
+}
+
+.fa-js:before {
+    content: "\f3b8"
+}
+
+.fa-js-square:before {
+    content: "\f3b9"
+}
+
+.fa-jsfiddle:before {
+    content: "\f1cc"
+}
+
+.fa-kaaba:before {
+    content: "\f66b"
+}
+
+.fa-kaggle:before {
+    content: "\f5fa"
+}
+
+.fa-key:before {
+    content: "\f084"
+}
+
+.fa-keybase:before {
+    content: "\f4f5"
+}
+
+.fa-keyboard:before {
+    content: "\f11c"
+}
+
+.fa-keycdn:before {
+    content: "\f3ba"
+}
+
+.fa-khanda:before {
+    content: "\f66d"
+}
+
+.fa-kickstarter:before {
+    content: "\f3bb"
+}
+
+.fa-kickstarter-k:before {
+    content: "\f3bc"
+}
+
+.fa-kiss:before {
+    content: "\f596"
+}
+
+.fa-kiss-beam:before {
+    content: "\f597"
+}
+
+.fa-kiss-wink-heart:before {
+    content: "\f598"
+}
+
+.fa-kiwi-bird:before {
+    content: "\f535"
+}
+
+.fa-korvue:before {
+    content: "\f42f"
+}
+
+.fa-landmark:before {
+    content: "\f66f"
+}
+
+.fa-language:before {
+    content: "\f1ab"
+}
+
+.fa-laptop:before {
+    content: "\f109"
+}
+
+.fa-laptop-code:before {
+    content: "\f5fc"
+}
+
+.fa-laptop-medical:before {
+    content: "\f812"
+}
+
+.fa-laravel:before {
+    content: "\f3bd"
+}
+
+.fa-lastfm:before {
+    content: "\f202"
+}
+
+.fa-lastfm-square:before {
+    content: "\f203"
+}
+
+.fa-laugh:before {
+    content: "\f599"
+}
+
+.fa-laugh-beam:before {
+    content: "\f59a"
+}
+
+.fa-laugh-squint:before {
+    content: "\f59b"
+}
+
+.fa-laugh-wink:before {
+    content: "\f59c"
+}
+
+.fa-layer-group:before {
+    content: "\f5fd"
+}
+
+.fa-leaf:before {
+    content: "\f06c"
+}
+
+.fa-leanpub:before {
+    content: "\f212"
+}
+
+.fa-lemon:before {
+    content: "\f094"
+}
+
+.fa-less:before {
+    content: "\f41d"
+}
+
+.fa-less-than:before {
+    content: "\f536"
+}
+
+.fa-less-than-equal:before {
+    content: "\f537"
+}
+
+.fa-level-down-alt:before {
+    content: "\f3be"
+}
+
+.fa-level-up-alt:before {
+    content: "\f3bf"
+}
+
+.fa-life-ring:before {
+    content: "\f1cd"
+}
+
+.fa-lightbulb:before {
+    content: "\f0eb"
+}
+
+.fa-line:before {
+    content: "\f3c0"
+}
+
+.fa-link:before {
+    content: "\f0c1"
+}
+
+.fa-linkedin:before {
+    content: "\f08c"
+}
+
+.fa-linkedin-in:before {
+    content: "\f0e1"
+}
+
+.fa-linode:before {
+    content: "\f2b8"
+}
+
+.fa-linux:before {
+    content: "\f17c"
+}
+
+.fa-lira-sign:before {
+    content: "\f195"
+}
+
+.fa-list:before {
+    content: "\f03a"
+}
+
+.fa-list-alt:before {
+    content: "\f022"
+}
+
+.fa-list-ol:before {
+    content: "\f0cb"
+}
+
+.fa-list-ul:before {
+    content: "\f0ca"
+}
+
+.fa-location-arrow:before {
+    content: "\f124"
+}
+
+.fa-lock:before {
+    content: "\f023"
+}
+
+.fa-lock-open:before {
+    content: "\f3c1"
+}
+
+.fa-long-arrow-alt-down:before {
+    content: "\f309"
+}
+
+.fa-long-arrow-alt-left:before {
+    content: "\f30a"
+}
+
+.fa-long-arrow-alt-right:before {
+    content: "\f30b"
+}
+
+.fa-long-arrow-alt-up:before {
+    content: "\f30c"
+}
+
+.fa-low-vision:before {
+    content: "\f2a8"
+}
+
+.fa-luggage-cart:before {
+    content: "\f59d"
+}
+
+.fa-lyft:before {
+    content: "\f3c3"
+}
+
+.fa-magento:before {
+    content: "\f3c4"
+}
+
+.fa-magic:before {
+    content: "\f0d0"
+}
+
+.fa-magnet:before {
+    content: "\f076"
+}
+
+.fa-mail-bulk:before {
+    content: "\f674"
+}
+
+.fa-mailchimp:before {
+    content: "\f59e"
+}
+
+.fa-male:before {
+    content: "\f183"
+}
+
+.fa-mandalorian:before {
+    content: "\f50f"
+}
+
+.fa-map:before {
+    content: "\f279"
+}
+
+.fa-map-marked:before {
+    content: "\f59f"
+}
+
+.fa-map-marked-alt:before {
+    content: "\f5a0"
+}
+
+.fa-map-marker:before {
+    content: "\f041"
+}
+
+.fa-map-marker-alt:before {
+    content: "\f3c5"
+}
+
+.fa-map-pin:before {
+    content: "\f276"
+}
+
+.fa-map-signs:before {
+    content: "\f277"
+}
+
+.fa-markdown:before {
+    content: "\f60f"
+}
+
+.fa-marker:before {
+    content: "\f5a1"
+}
+
+.fa-mars:before {
+    content: "\f222"
+}
+
+.fa-mars-double:before {
+    content: "\f227"
+}
+
+.fa-mars-stroke:before {
+    content: "\f229"
+}
+
+.fa-mars-stroke-h:before {
+    content: "\f22b"
+}
+
+.fa-mars-stroke-v:before {
+    content: "\f22a"
+}
+
+.fa-mask:before {
+    content: "\f6fa"
+}
+
+.fa-mastodon:before {
+    content: "\f4f6"
+}
+
+.fa-maxcdn:before {
+    content: "\f136"
+}
+
+.fa-medal:before {
+    content: "\f5a2"
+}
+
+.fa-medapps:before {
+    content: "\f3c6"
+}
+
+.fa-medium:before {
+    content: "\f23a"
+}
+
+.fa-medium-m:before {
+    content: "\f3c7"
+}
+
+.fa-medkit:before {
+    content: "\f0fa"
+}
+
+.fa-medrt:before {
+    content: "\f3c8"
+}
+
+.fa-meetup:before {
+    content: "\f2e0"
+}
+
+.fa-megaport:before {
+    content: "\f5a3"
+}
+
+.fa-meh:before {
+    content: "\f11a"
+}
+
+.fa-meh-blank:before {
+    content: "\f5a4"
+}
+
+.fa-meh-rolling-eyes:before {
+    content: "\f5a5"
+}
+
+.fa-memory:before {
+    content: "\f538"
+}
+
+.fa-mendeley:before {
+    content: "\f7b3"
+}
+
+.fa-menorah:before {
+    content: "\f676"
+}
+
+.fa-mercury:before {
+    content: "\f223"
+}
+
+.fa-meteor:before {
+    content: "\f753"
+}
+
+.fa-microchip:before {
+    content: "\f2db"
+}
+
+.fa-microphone:before {
+    content: "\f130"
+}
+
+.fa-microphone-alt:before {
+    content: "\f3c9"
+}
+
+.fa-microphone-alt-slash:before {
+    content: "\f539"
+}
+
+.fa-microphone-slash:before {
+    content: "\f131"
+}
+
+.fa-microscope:before {
+    content: "\f610"
+}
+
+.fa-microsoft:before {
+    content: "\f3ca"
+}
+
+.fa-minus:before {
+    content: "\f068"
+}
+
+.fa-minus-circle:before {
+    content: "\f056"
+}
+
+.fa-minus-square:before {
+    content: "\f146"
+}
+
+.fa-mitten:before {
+    content: "\f7b5"
+}
+
+.fa-mix:before {
+    content: "\f3cb"
+}
+
+.fa-mixcloud:before {
+    content: "\f289"
+}
+
+.fa-mizuni:before {
+    content: "\f3cc"
+}
+
+.fa-mobile:before {
+    content: "\f10b"
+}
+
+.fa-mobile-alt:before {
+    content: "\f3cd"
+}
+
+.fa-modx:before {
+    content: "\f285"
+}
+
+.fa-monero:before {
+    content: "\f3d0"
+}
+
+.fa-money-bill:before {
+    content: "\f0d6"
+}
+
+.fa-money-bill-alt:before {
+    content: "\f3d1"
+}
+
+.fa-money-bill-wave:before {
+    content: "\f53a"
+}
+
+.fa-money-bill-wave-alt:before {
+    content: "\f53b"
+}
+
+.fa-money-check:before {
+    content: "\f53c"
+}
+
+.fa-money-check-alt:before {
+    content: "\f53d"
+}
+
+.fa-monument:before {
+    content: "\f5a6"
+}
+
+.fa-moon:before {
+    content: "\f186"
+}
+
+.fa-mortar-pestle:before {
+    content: "\f5a7"
+}
+
+.fa-mosque:before {
+    content: "\f678"
+}
+
+.fa-motorcycle:before {
+    content: "\f21c"
+}
+
+.fa-mountain:before {
+    content: "\f6fc"
+}
+
+.fa-mouse-pointer:before {
+    content: "\f245"
+}
+
+.fa-mug-hot:before {
+    content: "\f7b6"
+}
+
+.fa-music:before {
+    content: "\f001"
+}
+
+.fa-napster:before {
+    content: "\f3d2"
+}
+
+.fa-neos:before {
+    content: "\f612"
+}
+
+.fa-network-wired:before {
+    content: "\f6ff"
+}
+
+.fa-neuter:before {
+    content: "\f22c"
+}
+
+.fa-newspaper:before {
+    content: "\f1ea"
+}
+
+.fa-nimblr:before {
+    content: "\f5a8"
+}
+
+.fa-node:before {
+    content: "\f419"
+}
+
+.fa-node-js:before {
+    content: "\f3d3"
+}
+
+.fa-not-equal:before {
+    content: "\f53e"
+}
+
+.fa-notes-medical:before {
+    content: "\f481"
+}
+
+.fa-npm:before {
+    content: "\f3d4"
+}
+
+.fa-ns8:before {
+    content: "\f3d5"
+}
+
+.fa-nutritionix:before {
+    content: "\f3d6"
+}
+
+.fa-object-group:before {
+    content: "\f247"
+}
+
+.fa-object-ungroup:before {
+    content: "\f248"
+}
+
+.fa-odnoklassniki:before {
+    content: "\f263"
+}
+
+.fa-odnoklassniki-square:before {
+    content: "\f264"
+}
+
+.fa-oil-can:before {
+    content: "\f613"
+}
+
+.fa-old-republic:before {
+    content: "\f510"
+}
+
+.fa-om:before {
+    content: "\f679"
+}
+
+.fa-opencart:before {
+    content: "\f23d"
+}
+
+.fa-openid:before {
+    content: "\f19b"
+}
+
+.fa-opera:before {
+    content: "\f26a"
+}
+
+.fa-optin-monster:before {
+    content: "\f23c"
+}
+
+.fa-osi:before {
+    content: "\f41a"
+}
+
+.fa-otter:before {
+    content: "\f700"
+}
+
+.fa-outdent:before {
+    content: "\f03b"
+}
+
+.fa-page4:before {
+    content: "\f3d7"
+}
+
+.fa-pagelines:before {
+    content: "\f18c"
+}
+
+.fa-pager:before {
+    content: "\f815"
+}
+
+.fa-paint-brush:before {
+    content: "\f1fc"
+}
+
+.fa-paint-roller:before {
+    content: "\f5aa"
+}
+
+.fa-palette:before {
+    content: "\f53f"
+}
+
+.fa-palfed:before {
+    content: "\f3d8"
+}
+
+.fa-pallet:before {
+    content: "\f482"
+}
+
+.fa-paper-plane:before {
+    content: "\f1d8"
+}
+
+.fa-paperclip:before {
+    content: "\f0c6"
+}
+
+.fa-parachute-box:before {
+    content: "\f4cd"
+}
+
+.fa-paragraph:before {
+    content: "\f1dd"
+}
+
+.fa-parking:before {
+    content: "\f540"
+}
+
+.fa-passport:before {
+    content: "\f5ab"
+}
+
+.fa-pastafarianism:before {
+    content: "\f67b"
+}
+
+.fa-paste:before {
+    content: "\f0ea"
+}
+
+.fa-patreon:before {
+    content: "\f3d9"
+}
+
+.fa-pause:before {
+    content: "\f04c"
+}
+
+.fa-pause-circle:before {
+    content: "\f28b"
+}
+
+.fa-paw:before {
+    content: "\f1b0"
+}
+
+.fa-paypal:before {
+    content: "\f1ed"
+}
+
+.fa-peace:before {
+    content: "\f67c"
+}
+
+.fa-pen:before {
+    content: "\f304"
+}
+
+.fa-pen-alt:before {
+    content: "\f305"
+}
+
+.fa-pen-fancy:before {
+    content: "\f5ac"
+}
+
+.fa-pen-nib:before {
+    content: "\f5ad"
+}
+
+.fa-pen-square:before {
+    content: "\f14b"
+}
+
+.fa-pencil-alt:before {
+    content: "\f303"
+}
+
+.fa-pencil-ruler:before {
+    content: "\f5ae"
+}
+
+.fa-penny-arcade:before {
+    content: "\f704"
+}
+
+.fa-people-carry:before {
+    content: "\f4ce"
+}
+
+.fa-pepper-hot:before {
+    content: "\f816"
+}
+
+.fa-percent:before {
+    content: "\f295"
+}
+
+.fa-percentage:before {
+    content: "\f541"
+}
+
+.fa-periscope:before {
+    content: "\f3da"
+}
+
+.fa-person-booth:before {
+    content: "\f756"
+}
+
+.fa-phabricator:before {
+    content: "\f3db"
+}
+
+.fa-phoenix-framework:before {
+    content: "\f3dc"
+}
+
+.fa-phoenix-squadron:before {
+    content: "\f511"
+}
+
+.fa-phone:before {
+    content: "\f095"
+}
+
+.fa-phone-alt:before {
+    content: "\f879"
+}
+
+.fa-phone-slash:before {
+    content: "\f3dd"
+}
+
+.fa-phone-square:before {
+    content: "\f098"
+}
+
+.fa-phone-square-alt:before {
+    content: "\f87b"
+}
+
+.fa-phone-volume:before {
+    content: "\f2a0"
+}
+
+.fa-photo-video:before {
+    content: "\f87c"
+}
+
+.fa-php:before {
+    content: "\f457"
+}
+
+.fa-pied-piper:before {
+    content: "\f2ae"
+}
+
+.fa-pied-piper-alt:before {
+    content: "\f1a8"
+}
+
+.fa-pied-piper-hat:before {
+    content: "\f4e5"
+}
+
+.fa-pied-piper-pp:before {
+    content: "\f1a7"
+}
+
+.fa-piggy-bank:before {
+    content: "\f4d3"
+}
+
+.fa-pills:before {
+    content: "\f484"
+}
+
+.fa-pinterest:before {
+    content: "\f0d2"
+}
+
+.fa-pinterest-p:before {
+    content: "\f231"
+}
+
+.fa-pinterest-square:before {
+    content: "\f0d3"
+}
+
+.fa-pizza-slice:before {
+    content: "\f818"
+}
+
+.fa-place-of-worship:before {
+    content: "\f67f"
+}
+
+.fa-plane:before {
+    content: "\f072"
+}
+
+.fa-plane-arrival:before {
+    content: "\f5af"
+}
+
+.fa-plane-departure:before {
+    content: "\f5b0"
+}
+
+.fa-play:before {
+    content: "\f04b"
+}
+
+.fa-play-circle:before {
+    content: "\f144"
+}
+
+.fa-playstation:before {
+    content: "\f3df"
+}
+
+.fa-plug:before {
+    content: "\f1e6"
+}
+
+.fa-plus:before {
+    content: "\f067"
+}
+
+.fa-plus-circle:before {
+    content: "\f055"
+}
+
+.fa-plus-square:before {
+    content: "\f0fe"
+}
+
+.fa-podcast:before {
+    content: "\f2ce"
+}
+
+.fa-poll:before {
+    content: "\f681"
+}
+
+.fa-poll-h:before {
+    content: "\f682"
+}
+
+.fa-poo:before {
+    content: "\f2fe"
+}
+
+.fa-poo-storm:before {
+    content: "\f75a"
+}
+
+.fa-poop:before {
+    content: "\f619"
+}
+
+.fa-portrait:before {
+    content: "\f3e0"
+}
+
+.fa-pound-sign:before {
+    content: "\f154"
+}
+
+.fa-power-off:before {
+    content: "\f011"
+}
+
+.fa-pray:before {
+    content: "\f683"
+}
+
+.fa-praying-hands:before {
+    content: "\f684"
+}
+
+.fa-prescription:before {
+    content: "\f5b1"
+}
+
+.fa-prescription-bottle:before {
+    content: "\f485"
+}
+
+.fa-prescription-bottle-alt:before {
+    content: "\f486"
+}
+
+.fa-print:before {
+    content: "\f02f"
+}
+
+.fa-procedures:before {
+    content: "\f487"
+}
+
+.fa-product-hunt:before {
+    content: "\f288"
+}
+
+.fa-project-diagram:before {
+    content: "\f542"
+}
+
+.fa-pushed:before {
+    content: "\f3e1"
+}
+
+.fa-puzzle-piece:before {
+    content: "\f12e"
+}
+
+.fa-python:before {
+    content: "\f3e2"
+}
+
+.fa-qq:before {
+    content: "\f1d6"
+}
+
+.fa-qrcode:before {
+    content: "\f029"
+}
+
+.fa-question:before {
+    content: "\f128"
+}
+
+.fa-question-circle:before {
+    content: "\f059"
+}
+
+.fa-quidditch:before {
+    content: "\f458"
+}
+
+.fa-quinscape:before {
+    content: "\f459"
+}
+
+.fa-quora:before {
+    content: "\f2c4"
+}
+
+.fa-quote-left:before {
+    content: "\f10d"
+}
+
+.fa-quote-right:before {
+    content: "\f10e"
+}
+
+.fa-quran:before {
+    content: "\f687"
+}
+
+.fa-r-project:before {
+    content: "\f4f7"
+}
+
+.fa-radiation:before {
+    content: "\f7b9"
+}
+
+.fa-radiation-alt:before {
+    content: "\f7ba"
+}
+
+.fa-rainbow:before {
+    content: "\f75b"
+}
+
+.fa-random:before {
+    content: "\f074"
+}
+
+.fa-raspberry-pi:before {
+    content: "\f7bb"
+}
+
+.fa-ravelry:before {
+    content: "\f2d9"
+}
+
+.fa-react:before {
+    content: "\f41b"
+}
+
+.fa-reacteurope:before {
+    content: "\f75d"
+}
+
+.fa-readme:before {
+    content: "\f4d5"
+}
+
+.fa-rebel:before {
+    content: "\f1d0"
+}
+
+.fa-receipt:before {
+    content: "\f543"
+}
+
+.fa-recycle:before {
+    content: "\f1b8"
+}
+
+.fa-red-river:before {
+    content: "\f3e3"
+}
+
+.fa-reddit:before {
+    content: "\f1a1"
+}
+
+.fa-reddit-alien:before {
+    content: "\f281"
+}
+
+.fa-reddit-square:before {
+    content: "\f1a2"
+}
+
+.fa-redhat:before {
+    content: "\f7bc"
+}
+
+.fa-redo:before {
+    content: "\f01e"
+}
+
+.fa-redo-alt:before {
+    content: "\f2f9"
+}
+
+.fa-registered:before {
+    content: "\f25d"
+}
+
+.fa-remove-format:before {
+    content: "\f87d"
+}
+
+.fa-renren:before {
+    content: "\f18b"
+}
+
+.fa-reply:before {
+    content: "\f3e5"
+}
+
+.fa-reply-all:before {
+    content: "\f122"
+}
+
+.fa-replyd:before {
+    content: "\f3e6"
+}
+
+.fa-republican:before {
+    content: "\f75e"
+}
+
+.fa-researchgate:before {
+    content: "\f4f8"
+}
+
+.fa-resolving:before {
+    content: "\f3e7"
+}
+
+.fa-restroom:before {
+    content: "\f7bd"
+}
+
+.fa-retweet:before {
+    content: "\f079"
+}
+
+.fa-rev:before {
+    content: "\f5b2"
+}
+
+.fa-ribbon:before {
+    content: "\f4d6"
+}
+
+.fa-ring:before {
+    content: "\f70b"
+}
+
+.fa-road:before {
+    content: "\f018"
+}
+
+.fa-robot:before {
+    content: "\f544"
+}
+
+.fa-rocket:before {
+    content: "\f135"
+}
+
+.fa-rocketchat:before {
+    content: "\f3e8"
+}
+
+.fa-rockrms:before {
+    content: "\f3e9"
+}
+
+.fa-route:before {
+    content: "\f4d7"
+}
+
+.fa-rss:before {
+    content: "\f09e"
+}
+
+.fa-rss-square:before {
+    content: "\f143"
+}
+
+.fa-ruble-sign:before {
+    content: "\f158"
+}
+
+.fa-ruler:before {
+    content: "\f545"
+}
+
+.fa-ruler-combined:before {
+    content: "\f546"
+}
+
+.fa-ruler-horizontal:before {
+    content: "\f547"
+}
+
+.fa-ruler-vertical:before {
+    content: "\f548"
+}
+
+.fa-running:before {
+    content: "\f70c"
+}
+
+.fa-rupee-sign:before {
+    content: "\f156"
+}
+
+.fa-sad-cry:before {
+    content: "\f5b3"
+}
+
+.fa-sad-tear:before {
+    content: "\f5b4"
+}
+
+.fa-safari:before {
+    content: "\f267"
+}
+
+.fa-salesforce:before {
+    content: "\f83b"
+}
+
+.fa-sass:before {
+    content: "\f41e"
+}
+
+.fa-satellite:before {
+    content: "\f7bf"
+}
+
+.fa-satellite-dish:before {
+    content: "\f7c0"
+}
+
+.fa-save:before {
+    content: "\f0c7"
+}
+
+.fa-schlix:before {
+    content: "\f3ea"
+}
+
+.fa-school:before {
+    content: "\f549"
+}
+
+.fa-screwdriver:before {
+    content: "\f54a"
+}
+
+.fa-scribd:before {
+    content: "\f28a"
+}
+
+.fa-scroll:before {
+    content: "\f70e"
+}
+
+.fa-sd-card:before {
+    content: "\f7c2"
+}
+
+.fa-search:before {
+    content: "\f002"
+}
+
+.fa-search-dollar:before {
+    content: "\f688"
+}
+
+.fa-search-location:before {
+    content: "\f689"
+}
+
+.fa-search-minus:before {
+    content: "\f010"
+}
+
+.fa-search-plus:before {
+    content: "\f00e"
+}
+
+.fa-searchengin:before {
+    content: "\f3eb"
+}
+
+.fa-seedling:before {
+    content: "\f4d8"
+}
+
+.fa-sellcast:before {
+    content: "\f2da"
+}
+
+.fa-sellsy:before {
+    content: "\f213"
+}
+
+.fa-server:before {
+    content: "\f233"
+}
+
+.fa-servicestack:before {
+    content: "\f3ec"
+}
+
+.fa-shapes:before {
+    content: "\f61f"
+}
+
+.fa-share:before {
+    content: "\f064"
+}
+
+.fa-share-alt:before {
+    content: "\f1e0"
+}
+
+.fa-share-alt-square:before {
+    content: "\f1e1"
+}
+
+.fa-share-square:before {
+    content: "\f14d"
+}
+
+.fa-shekel-sign:before {
+    content: "\f20b"
+}
+
+.fa-shield-alt:before {
+    content: "\f3ed"
+}
+
+.fa-ship:before {
+    content: "\f21a"
+}
+
+.fa-shipping-fast:before {
+    content: "\f48b"
+}
+
+.fa-shirtsinbulk:before {
+    content: "\f214"
+}
+
+.fa-shoe-prints:before {
+    content: "\f54b"
+}
+
+.fa-shopping-bag:before {
+    content: "\f290"
+}
+
+.fa-shopping-basket:before {
+    content: "\f291"
+}
+
+.fa-shopping-cart:before {
+    content: "\f07a"
+}
+
+.fa-shopware:before {
+    content: "\f5b5"
+}
+
+.fa-shower:before {
+    content: "\f2cc"
+}
+
+.fa-shuttle-van:before {
+    content: "\f5b6"
+}
+
+.fa-sign:before {
+    content: "\f4d9"
+}
+
+.fa-sign-in-alt:before {
+    content: "\f2f6"
+}
+
+.fa-sign-language:before {
+    content: "\f2a7"
+}
+
+.fa-sign-out-alt:before {
+    content: "\f2f5"
+}
+
+.fa-signal:before {
+    content: "\f012"
+}
+
+.fa-signature:before {
+    content: "\f5b7"
+}
+
+.fa-sim-card:before {
+    content: "\f7c4"
+}
+
+.fa-simplybuilt:before {
+    content: "\f215"
+}
+
+.fa-sistrix:before {
+    content: "\f3ee"
+}
+
+.fa-sitemap:before {
+    content: "\f0e8"
+}
+
+.fa-sith:before {
+    content: "\f512"
+}
+
+.fa-skating:before {
+    content: "\f7c5"
+}
+
+.fa-sketch:before {
+    content: "\f7c6"
+}
+
+.fa-skiing:before {
+    content: "\f7c9"
+}
+
+.fa-skiing-nordic:before {
+    content: "\f7ca"
+}
+
+.fa-skull:before {
+    content: "\f54c"
+}
+
+.fa-skull-crossbones:before {
+    content: "\f714"
+}
+
+.fa-skyatlas:before {
+    content: "\f216"
+}
+
+.fa-skype:before {
+    content: "\f17e"
+}
+
+.fa-slack:before {
+    content: "\f198"
+}
+
+.fa-slack-hash:before {
+    content: "\f3ef"
+}
+
+.fa-slash:before {
+    content: "\f715"
+}
+
+.fa-sleigh:before {
+    content: "\f7cc"
+}
+
+.fa-sliders-h:before {
+    content: "\f1de"
+}
+
+.fa-slideshare:before {
+    content: "\f1e7"
+}
+
+.fa-smile:before {
+    content: "\f118"
+}
+
+.fa-smile-beam:before {
+    content: "\f5b8"
+}
+
+.fa-smile-wink:before {
+    content: "\f4da"
+}
+
+.fa-smog:before {
+    content: "\f75f"
+}
+
+.fa-smoking:before {
+    content: "\f48d"
+}
+
+.fa-smoking-ban:before {
+    content: "\f54d"
+}
+
+.fa-sms:before {
+    content: "\f7cd"
+}
+
+.fa-snapchat:before {
+    content: "\f2ab"
+}
+
+.fa-snapchat-ghost:before {
+    content: "\f2ac"
+}
+
+.fa-snapchat-square:before {
+    content: "\f2ad"
+}
+
+.fa-snowboarding:before {
+    content: "\f7ce"
+}
+
+.fa-snowflake:before {
+    content: "\f2dc"
+}
+
+.fa-snowman:before {
+    content: "\f7d0"
+}
+
+.fa-snowplow:before {
+    content: "\f7d2"
+}
+
+.fa-socks:before {
+    content: "\f696"
+}
+
+.fa-solar-panel:before {
+    content: "\f5ba"
+}
+
+.fa-sort:before {
+    content: "\f0dc"
+}
+
+.fa-sort-alpha-down:before {
+    content: "\f15d"
+}
+
+.fa-sort-alpha-down-alt:before {
+    content: "\f881"
+}
+
+.fa-sort-alpha-up:before {
+    content: "\f15e"
+}
+
+.fa-sort-alpha-up-alt:before {
+    content: "\f882"
+}
+
+.fa-sort-amount-down:before {
+    content: "\f160"
+}
+
+.fa-sort-amount-down-alt:before {
+    content: "\f884"
+}
+
+.fa-sort-amount-up:before {
+    content: "\f161"
+}
+
+.fa-sort-amount-up-alt:before {
+    content: "\f885"
+}
+
+.fa-sort-down:before {
+    content: "\f0dd"
+}
+
+.fa-sort-numeric-down:before {
+    content: "\f162"
+}
+
+.fa-sort-numeric-down-alt:before {
+    content: "\f886"
+}
+
+.fa-sort-numeric-up:before {
+    content: "\f163"
+}
+
+.fa-sort-numeric-up-alt:before {
+    content: "\f887"
+}
+
+.fa-sort-up:before {
+    content: "\f0de"
+}
+
+.fa-soundcloud:before {
+    content: "\f1be"
+}
+
+.fa-sourcetree:before {
+    content: "\f7d3"
+}
+
+.fa-spa:before {
+    content: "\f5bb"
+}
+
+.fa-space-shuttle:before {
+    content: "\f197"
+}
+
+.fa-speakap:before {
+    content: "\f3f3"
+}
+
+.fa-speaker-deck:before {
+    content: "\f83c"
+}
+
+.fa-spell-check:before {
+    content: "\f891"
+}
+
+.fa-spider:before {
+    content: "\f717"
+}
+
+.fa-spinner:before {
+    content: "\f110"
+}
+
+.fa-splotch:before {
+    content: "\f5bc"
+}
+
+.fa-spotify:before {
+    content: "\f1bc"
+}
+
+.fa-spray-can:before {
+    content: "\f5bd"
+}
+
+.fa-square:before {
+    content: "\f0c8"
+}
+
+.fa-square-full:before {
+    content: "\f45c"
+}
+
+.fa-square-root-alt:before {
+    content: "\f698"
+}
+
+.fa-squarespace:before {
+    content: "\f5be"
+}
+
+.fa-stack-exchange:before {
+    content: "\f18d"
+}
+
+.fa-stack-overflow:before {
+    content: "\f16c"
+}
+
+.fa-stackpath:before {
+    content: "\f842"
+}
+
+.fa-stamp:before {
+    content: "\f5bf"
+}
+
+.fa-star:before {
+    content: "\f005"
+}
+
+.fa-star-and-crescent:before {
+    content: "\f699"
+}
+
+.fa-star-half:before {
+    content: "\f089"
+}
+
+.fa-star-half-alt:before {
+    content: "\f5c0"
+}
+
+.fa-star-of-david:before {
+    content: "\f69a"
+}
+
+.fa-star-of-life:before {
+    content: "\f621"
+}
+
+.fa-staylinked:before {
+    content: "\f3f5"
+}
+
+.fa-steam:before {
+    content: "\f1b6"
+}
+
+.fa-steam-square:before {
+    content: "\f1b7"
+}
+
+.fa-steam-symbol:before {
+    content: "\f3f6"
+}
+
+.fa-step-backward:before {
+    content: "\f048"
+}
+
+.fa-step-forward:before {
+    content: "\f051"
+}
+
+.fa-stethoscope:before {
+    content: "\f0f1"
+}
+
+.fa-sticker-mule:before {
+    content: "\f3f7"
+}
+
+.fa-sticky-note:before {
+    content: "\f249"
+}
+
+.fa-stop:before {
+    content: "\f04d"
+}
+
+.fa-stop-circle:before {
+    content: "\f28d"
+}
+
+.fa-stopwatch:before {
+    content: "\f2f2"
+}
+
+.fa-store:before {
+    content: "\f54e"
+}
+
+.fa-store-alt:before {
+    content: "\f54f"
+}
+
+.fa-strava:before {
+    content: "\f428"
+}
+
+.fa-stream:before {
+    content: "\f550"
+}
+
+.fa-street-view:before {
+    content: "\f21d"
+}
+
+.fa-strikethrough:before {
+    content: "\f0cc"
+}
+
+.fa-stripe:before {
+    content: "\f429"
+}
+
+.fa-stripe-s:before {
+    content: "\f42a"
+}
+
+.fa-stroopwafel:before {
+    content: "\f551"
+}
+
+.fa-studiovinari:before {
+    content: "\f3f8"
+}
+
+.fa-stumbleupon:before {
+    content: "\f1a4"
+}
+
+.fa-stumbleupon-circle:before {
+    content: "\f1a3"
+}
+
+.fa-subscript:before {
+    content: "\f12c"
+}
+
+.fa-subway:before {
+    content: "\f239"
+}
+
+.fa-suitcase:before {
+    content: "\f0f2"
+}
+
+.fa-suitcase-rolling:before {
+    content: "\f5c1"
+}
+
+.fa-sun:before {
+    content: "\f185"
+}
+
+.fa-superpowers:before {
+    content: "\f2dd"
+}
+
+.fa-superscript:before {
+    content: "\f12b"
+}
+
+.fa-supple:before {
+    content: "\f3f9"
+}
+
+.fa-surprise:before {
+    content: "\f5c2"
+}
+
+.fa-suse:before {
+    content: "\f7d6"
+}
+
+.fa-swatchbook:before {
+    content: "\f5c3"
+}
+
+.fa-swimmer:before {
+    content: "\f5c4"
+}
+
+.fa-swimming-pool:before {
+    content: "\f5c5"
+}
+
+.fa-symfony:before {
+    content: "\f83d"
+}
+
+.fa-synagogue:before {
+    content: "\f69b"
+}
+
+.fa-sync:before {
+    content: "\f021"
+}
+
+.fa-sync-alt:before {
+    content: "\f2f1"
+}
+
+.fa-syringe:before {
+    content: "\f48e"
+}
+
+.fa-table:before {
+    content: "\f0ce"
+}
+
+.fa-table-tennis:before {
+    content: "\f45d"
+}
+
+.fa-tablet:before {
+    content: "\f10a"
+}
+
+.fa-tablet-alt:before {
+    content: "\f3fa"
+}
+
+.fa-tablets:before {
+    content: "\f490"
+}
+
+.fa-tachometer-alt:before {
+    content: "\f3fd"
+}
+
+.fa-tag:before {
+    content: "\f02b"
+}
+
+.fa-tags:before {
+    content: "\f02c"
+}
+
+.fa-tape:before {
+    content: "\f4db"
+}
+
+.fa-tasks:before {
+    content: "\f0ae"
+}
+
+.fa-taxi:before {
+    content: "\f1ba"
+}
+
+.fa-teamspeak:before {
+    content: "\f4f9"
+}
+
+.fa-teeth:before {
+    content: "\f62e"
+}
+
+.fa-teeth-open:before {
+    content: "\f62f"
+}
+
+.fa-telegram:before {
+    content: "\f2c6"
+}
+
+.fa-telegram-plane:before {
+    content: "\f3fe"
+}
+
+.fa-temperature-high:before {
+    content: "\f769"
+}
+
+.fa-temperature-low:before {
+    content: "\f76b"
+}
+
+.fa-tencent-weibo:before {
+    content: "\f1d5"
+}
+
+.fa-tenge:before {
+    content: "\f7d7"
+}
+
+.fa-terminal:before {
+    content: "\f120"
+}
+
+.fa-text-height:before {
+    content: "\f034"
+}
+
+.fa-text-width:before {
+    content: "\f035"
+}
+
+.fa-th:before {
+    content: "\f00a"
+}
+
+.fa-th-large:before {
+    content: "\f009"
+}
+
+.fa-th-list:before {
+    content: "\f00b"
+}
+
+.fa-the-red-yeti:before {
+    content: "\f69d"
+}
+
+.fa-theater-masks:before {
+    content: "\f630"
+}
+
+.fa-themeco:before {
+    content: "\f5c6"
+}
+
+.fa-themeisle:before {
+    content: "\f2b2"
+}
+
+.fa-thermometer:before {
+    content: "\f491"
+}
+
+.fa-thermometer-empty:before {
+    content: "\f2cb"
+}
+
+.fa-thermometer-full:before {
+    content: "\f2c7"
+}
+
+.fa-thermometer-half:before {
+    content: "\f2c9"
+}
+
+.fa-thermometer-quarter:before {
+    content: "\f2ca"
+}
+
+.fa-thermometer-three-quarters:before {
+    content: "\f2c8"
+}
+
+.fa-think-peaks:before {
+    content: "\f731"
+}
+
+.fa-thumbs-down:before {
+    content: "\f165"
+}
+
+.fa-thumbs-up:before {
+    content: "\f164"
+}
+
+.fa-thumbtack:before {
+    content: "\f08d"
+}
+
+.fa-ticket-alt:before {
+    content: "\f3ff"
+}
+
+.fa-times:before {
+    content: "\f00d"
+}
+
+.fa-times-circle:before {
+    content: "\f057"
+}
+
+.fa-tint:before {
+    content: "\f043"
+}
+
+.fa-tint-slash:before {
+    content: "\f5c7"
+}
+
+.fa-tired:before {
+    content: "\f5c8"
+}
+
+.fa-toggle-off:before {
+    content: "\f204"
+}
+
+.fa-toggle-on:before {
+    content: "\f205"
+}
+
+.fa-toilet:before {
+    content: "\f7d8"
+}
+
+.fa-toilet-paper:before {
+    content: "\f71e"
+}
+
+.fa-toolbox:before {
+    content: "\f552"
+}
+
+.fa-tools:before {
+    content: "\f7d9"
+}
+
+.fa-tooth:before {
+    content: "\f5c9"
+}
+
+.fa-torah:before {
+    content: "\f6a0"
+}
+
+.fa-torii-gate:before {
+    content: "\f6a1"
+}
+
+.fa-tractor:before {
+    content: "\f722"
+}
+
+.fa-trade-federation:before {
+    content: "\f513"
+}
+
+.fa-trademark:before {
+    content: "\f25c"
+}
+
+.fa-traffic-light:before {
+    content: "\f637"
+}
+
+.fa-train:before {
+    content: "\f238"
+}
+
+.fa-tram:before {
+    content: "\f7da"
+}
+
+.fa-transgender:before {
+    content: "\f224"
+}
+
+.fa-transgender-alt:before {
+    content: "\f225"
+}
+
+.fa-trash:before {
+    content: "\f1f8"
+}
+
+.fa-trash-alt:before {
+    content: "\f2ed"
+}
+
+.fa-trash-restore:before {
+    content: "\f829"
+}
+
+.fa-trash-restore-alt:before {
+    content: "\f82a"
+}
+
+.fa-tree:before {
+    content: "\f1bb"
+}
+
+.fa-trello:before {
+    content: "\f181"
+}
+
+.fa-tripadvisor:before {
+    content: "\f262"
+}
+
+.fa-trophy:before {
+    content: "\f091"
+}
+
+.fa-truck:before {
+    content: "\f0d1"
+}
+
+.fa-truck-loading:before {
+    content: "\f4de"
+}
+
+.fa-truck-monster:before {
+    content: "\f63b"
+}
+
+.fa-truck-moving:before {
+    content: "\f4df"
+}
+
+.fa-truck-pickup:before {
+    content: "\f63c"
+}
+
+.fa-tshirt:before {
+    content: "\f553"
+}
+
+.fa-tty:before {
+    content: "\f1e4"
+}
+
+.fa-tumblr:before {
+    content: "\f173"
+}
+
+.fa-tumblr-square:before {
+    content: "\f174"
+}
+
+.fa-tv:before {
+    content: "\f26c"
+}
+
+.fa-twitch:before {
+    content: "\f1e8"
+}
+
+.fa-twitter:before {
+    content: "\f099"
+}
+
+.fa-twitter-square:before {
+    content: "\f081"
+}
+
+.fa-typo3:before {
+    content: "\f42b"
+}
+
+.fa-uber:before {
+    content: "\f402"
+}
+
+.fa-ubuntu:before {
+    content: "\f7df"
+}
+
+.fa-uikit:before {
+    content: "\f403"
+}
+
+.fa-umbrella:before {
+    content: "\f0e9"
+}
+
+.fa-umbrella-beach:before {
+    content: "\f5ca"
+}
+
+.fa-underline:before {
+    content: "\f0cd"
+}
+
+.fa-undo:before {
+    content: "\f0e2"
+}
+
+.fa-undo-alt:before {
+    content: "\f2ea"
+}
+
+.fa-uniregistry:before {
+    content: "\f404"
+}
+
+.fa-universal-access:before {
+    content: "\f29a"
+}
+
+.fa-university:before {
+    content: "\f19c"
+}
+
+.fa-unlink:before {
+    content: "\f127"
+}
+
+.fa-unlock:before {
+    content: "\f09c"
+}
+
+.fa-unlock-alt:before {
+    content: "\f13e"
+}
+
+.fa-untappd:before {
+    content: "\f405"
+}
+
+.fa-upload:before {
+    content: "\f093"
+}
+
+.fa-ups:before {
+    content: "\f7e0"
+}
+
+.fa-usb:before {
+    content: "\f287"
+}
+
+.fa-user:before {
+    content: "\f007"
+}
+
+.fa-user-alt:before {
+    content: "\f406"
+}
+
+.fa-user-alt-slash:before {
+    content: "\f4fa"
+}
+
+.fa-user-astronaut:before {
+    content: "\f4fb"
+}
+
+.fa-user-check:before {
+    content: "\f4fc"
+}
+
+.fa-user-circle:before {
+    content: "\f2bd"
+}
+
+.fa-user-clock:before {
+    content: "\f4fd"
+}
+
+.fa-user-cog:before {
+    content: "\f4fe"
+}
+
+.fa-user-edit:before {
+    content: "\f4ff"
+}
+
+.fa-user-friends:before {
+    content: "\f500"
+}
+
+.fa-user-graduate:before {
+    content: "\f501"
+}
+
+.fa-user-injured:before {
+    content: "\f728"
+}
+
+.fa-user-lock:before {
+    content: "\f502"
+}
+
+.fa-user-md:before {
+    content: "\f0f0"
+}
+
+.fa-user-minus:before {
+    content: "\f503"
+}
+
+.fa-user-ninja:before {
+    content: "\f504"
+}
+
+.fa-user-nurse:before {
+    content: "\f82f"
+}
+
+.fa-user-plus:before {
+    content: "\f234"
+}
+
+.fa-user-secret:before {
+    content: "\f21b"
+}
+
+.fa-user-shield:before {
+    content: "\f505"
+}
+
+.fa-user-slash:before {
+    content: "\f506"
+}
+
+.fa-user-tag:before {
+    content: "\f507"
+}
+
+.fa-user-tie:before {
+    content: "\f508"
+}
+
+.fa-user-times:before {
+    content: "\f235"
+}
+
+.fa-users:before {
+    content: "\f0c0"
+}
+
+.fa-users-cog:before {
+    content: "\f509"
+}
+
+.fa-usps:before {
+    content: "\f7e1"
+}
+
+.fa-ussunnah:before {
+    content: "\f407"
+}
+
+.fa-utensil-spoon:before {
+    content: "\f2e5"
+}
+
+.fa-utensils:before {
+    content: "\f2e7"
+}
+
+.fa-vaadin:before {
+    content: "\f408"
+}
+
+.fa-vector-square:before {
+    content: "\f5cb"
+}
+
+.fa-venus:before {
+    content: "\f221"
+}
+
+.fa-venus-double:before {
+    content: "\f226"
+}
+
+.fa-venus-mars:before {
+    content: "\f228"
+}
+
+.fa-viacoin:before {
+    content: "\f237"
+}
+
+.fa-viadeo:before {
+    content: "\f2a9"
+}
+
+.fa-viadeo-square:before {
+    content: "\f2aa"
+}
+
+.fa-vial:before {
+    content: "\f492"
+}
+
+.fa-vials:before {
+    content: "\f493"
+}
+
+.fa-viber:before {
+    content: "\f409"
+}
+
+.fa-video:before {
+    content: "\f03d"
+}
+
+.fa-video-slash:before {
+    content: "\f4e2"
+}
+
+.fa-vihara:before {
+    content: "\f6a7"
+}
+
+.fa-vimeo:before {
+    content: "\f40a"
+}
+
+.fa-vimeo-square:before {
+    content: "\f194"
+}
+
+.fa-vimeo-v:before {
+    content: "\f27d"
+}
+
+.fa-vine:before {
+    content: "\f1ca"
+}
+
+.fa-vk:before {
+    content: "\f189"
+}
+
+.fa-vnv:before {
+    content: "\f40b"
+}
+
+.fa-voicemail:before {
+    content: "\f897"
+}
+
+.fa-volleyball-ball:before {
+    content: "\f45f"
+}
+
+.fa-volume-down:before {
+    content: "\f027"
+}
+
+.fa-volume-mute:before {
+    content: "\f6a9"
+}
+
+.fa-volume-off:before {
+    content: "\f026"
+}
+
+.fa-volume-up:before {
+    content: "\f028"
+}
+
+.fa-vote-yea:before {
+    content: "\f772"
+}
+
+.fa-vr-cardboard:before {
+    content: "\f729"
+}
+
+.fa-vuejs:before {
+    content: "\f41f"
+}
+
+.fa-walking:before {
+    content: "\f554"
+}
+
+.fa-wallet:before {
+    content: "\f555"
+}
+
+.fa-warehouse:before {
+    content: "\f494"
+}
+
+.fa-water:before {
+    content: "\f773"
+}
+
+.fa-wave-square:before {
+    content: "\f83e"
+}
+
+.fa-waze:before {
+    content: "\f83f"
+}
+
+.fa-weebly:before {
+    content: "\f5cc"
+}
+
+.fa-weibo:before {
+    content: "\f18a"
+}
+
+.fa-weight:before {
+    content: "\f496"
+}
+
+.fa-weight-hanging:before {
+    content: "\f5cd"
+}
+
+.fa-weixin:before {
+    content: "\f1d7"
+}
+
+.fa-whatsapp:before {
+    content: "\f232"
+}
+
+.fa-whatsapp-square:before {
+    content: "\f40c"
+}
+
+.fa-wheelchair:before {
+    content: "\f193"
+}
+
+.fa-whmcs:before {
+    content: "\f40d"
+}
+
+.fa-wifi:before {
+    content: "\f1eb"
+}
+
+.fa-wikipedia-w:before {
+    content: "\f266"
+}
+
+.fa-wind:before {
+    content: "\f72e"
+}
+
+.fa-window-close:before {
+    content: "\f410"
+}
+
+.fa-window-maximize:before {
+    content: "\f2d0"
+}
+
+.fa-window-minimize:before {
+    content: "\f2d1"
+}
+
+.fa-window-restore:before {
+    content: "\f2d2"
+}
+
+.fa-windows:before {
+    content: "\f17a"
+}
+
+.fa-wine-bottle:before {
+    content: "\f72f"
+}
+
+.fa-wine-glass:before {
+    content: "\f4e3"
+}
+
+.fa-wine-glass-alt:before {
+    content: "\f5ce"
+}
+
+.fa-wix:before {
+    content: "\f5cf"
+}
+
+.fa-wizards-of-the-coast:before {
+    content: "\f730"
+}
+
+.fa-wolf-pack-battalion:before {
+    content: "\f514"
+}
+
+.fa-won-sign:before {
+    content: "\f159"
+}
+
+.fa-wordpress:before {
+    content: "\f19a"
+}
+
+.fa-wordpress-simple:before {
+    content: "\f411"
+}
+
+.fa-wpbeginner:before {
+    content: "\f297"
+}
+
+.fa-wpexplorer:before {
+    content: "\f2de"
+}
+
+.fa-wpforms:before {
+    content: "\f298"
+}
+
+.fa-wpressr:before {
+    content: "\f3e4"
+}
+
+.fa-wrench:before {
+    content: "\f0ad"
+}
+
+.fa-x-ray:before {
+    content: "\f497"
+}
+
+.fa-xbox:before {
+    content: "\f412"
+}
+
+.fa-xing:before {
+    content: "\f168"
+}
+
+.fa-xing-square:before {
+    content: "\f169"
+}
+
+.fa-y-combinator:before {
+    content: "\f23b"
+}
+
+.fa-yahoo:before {
+    content: "\f19e"
+}
+
+.fa-yammer:before {
+    content: "\f840"
+}
+
+.fa-yandex:before {
+    content: "\f413"
+}
+
+.fa-yandex-international:before {
+    content: "\f414"
+}
+
+.fa-yarn:before {
+    content: "\f7e3"
+}
+
+.fa-yelp:before {
+    content: "\f1e9"
+}
+
+.fa-yen-sign:before {
+    content: "\f157"
+}
+
+.fa-yin-yang:before {
+    content: "\f6ad"
+}
+
+.fa-yoast:before {
+    content: "\f2b1"
+}
+
+.fa-youtube:before {
+    content: "\f167"
+}
+
+.fa-youtube-square:before {
+    content: "\f431"
+}
+
+.fa-zhihu:before {
+    content: "\f63f"
+}
+
+.sr-only {
+    border: 0;
+    clip: rect(0, 0, 0, 0);
+    height: 1px;
+    margin: -1px;
+    overflow: hidden;
+    padding: 0;
+    position: absolute;
+    width: 1px
+}
+
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+    clip: auto;
+    height: auto;
+    margin: 0;
+    overflow: visible;
+    position: static;
+    width: auto
+}
+
+#conversejs .far,
+.converse-website .far {
+    font-family: ConverseFontAwesomeRegular!important;
+    font-weight: 400
+}
+
+#conversejs .fa,
+#conversejs .fas,
+.converse-website .fa,
+.converse-website .fas {
+    font-family: ConverseFontAwesomeSolid!important;
+    font-weight: 900
+}
+
+#conversejs .fab,
+.converse-website .fab {
+    font-family: ConverseFontAwesomeBrands
+}
+
+#conversejs .fa,
+#conversejs .fab,
+#conversejs .far,
+#conversejs .fas,
+.converse-website .fa,
+.converse-website .fab,
+.converse-website .far,
+.converse-website .fas {
+    display: inline-block;
+    font-size: inherit;
+    text-rendering: auto;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale
+}
+
+#conversejs .fa-info-circle,
+.converse-website .fa-info-circle {
+    height: 1em
+}
+
+#conversejs,
+#conversejs-bg,
+.converse-fullscreen {
+    --subdued-color: #A8ABA1;
+    --green: #3AA569;
+    --redder-orange: #E77051;
+    --orange: #E7A151;
+    --light-blue: #578EA9;
+    --chat-status-online: var(--green);
+    --chat-status-busy: var(--redder-orange);
+    --chat-status-away: var(--orange);
+    --brand-heading-color: #387592;
+    --completion-light-color: #FFB9A7;
+    --completion-normal-color: var(--redder-orange);
+    --completion-dark-color: #D24E2B;
+    --link-color: var(--light-blue);
+    --link-hover-color: #345566;
+    --link-color-lighten-10-percent: #79a5ba;
+    --dark-link-color: #206485;
+    --global-background-color: #397491;
+    --inverse-link-color: white;
+    --text-shadow-color: #FAFAFA;
+    --text-color: #666;
+    --text-color-lighten-15-percent: #8c8c8c;
+    --message-text-color: #555;
+    --message-receipt-color: var(--green);
+    --save-button-color: var(--green);
+    --message-avatar-width: 36px;
+    --message-avatar-height: 36px;
+    --chat-textarea-color: #666;
+    --chat-textarea-background-color: white;
+    --chat-textarea-height: 60px;
+    --send-button-height: 27px;
+    --send-button-margin: 3px;
+    --controlbox-heading-top-margin: 0.75em;
+    --inline-action-margin: 0.75em;
+    --roster-height: 194px;
+    --flyout-padding: 1.2em;
+    --chat-head-color: var(--green);
+    --chat-head-color-dark: #1E9652;
+    --chat-head-color-darker: #0E763B;
+    --chat-head-color-lighten-50-percent: #e7f7ee;
+    --chat-head-text-color: white;
+    --chat-correcting-color: var(--chat-head-color-lighten-50-percent);
+    --chat-content-background-color: white;
+    --chat-topic-display: block;
+    --chat-info-display: block;
+    --highlight-color: #DCF9F6;
+    --primary-color: var(--light-blue);
+    --primary-color-dark: #397491;
+    --secondary-color: #818479;
+    --secondary-color-dark: #585B51;
+    --warning-color: var(--orange);
+    --warning-color-dark: #D2842B;
+    --danger-color: #D24E2B;
+    --danger-color-dark: #A93415;
+    --light-background-color: #FCFDFD;
+    --error-color: #D24E2B;
+    --info-color: #1E9652;
+    --button-border-radius: 5px;
+    --chatbox-border-radius: 4px;
+    --controlbox-width: 250px;
+    --controlbox-head-color: var(--light-blue);
+    --controlbox-head-color-lighten-45-percent: #eff4f7;
+    --controlbox-pane-background-color: white;
+    --controlbox-heading-color: inherit;
+    --controlbox-heading-font-weight: bold;
+    --chat-gutter: 0.5em;
+    --minimized-chats-width: 130px;
+    --mobile-chat-width: 100%;
+    --mobile-chat-height: 400px;
+    --normal-font: "Helvetica", "Arial", sans-serif;
+    --heading-font: 'Muli', normal;
+    --branding-font: 'Baumans', cursive;
+    --heading-display: block;
+    --heading-color: white;
+    --chatroom-head-color: var(--redder-orange);
+    --chatroom-head-color-dark: #D24E2B;
+    --chatroom-head-color-lighten-25-percent: #f6ccc1;
+    --chatroom-head-button-color: var(--chatroom-head-color);
+    --chatroom-head-title-font-weight: normal;
+    --chatroom-head-title-padding-right: 0px;
+    --chatroom-head-description-color: var(--chatroom-head-color-lighten-25-percent);
+    --chatroom-head-description-link-color: white;
+    --chatroom-head-description-display: block;
+    --chatroom-head-description-border-left: 0px;
+    --chatroom-head-description-padding-left: 0px;
+    --chatroom-head-border-bottom: 0px;
+    --chatroom-width: 400px;
+    --chatroom-correcting-color: #fadfd7;
+    --chatroom-badge-color: var(--chatroom-head-color);
+    --chatroom-badge-hover-color: var(--chatroom-head-color-dark);
+    --headline-head-color: var(--orange);
+    --headline-message-color: #D2842B;
+    --chatbox-button-size: 14px;
+    --fullpage-chatbox-button-size: 16px;
+    --font-size-tiny: 10px;
+    --font-size-small: 12px;
+    --font-size: 14px;
+    --font-size-large: 16px;
+    --font-size-huge: 20px;
+    --message-font-size: var(--font-size);
+    --separator-text-color: var(--message-text-color);
+    --chat-separator-border-bottom: 2px solid var(--chat-head-color);
+    --chatroom-separator-border-bottom: 2px solid var(--chatroom-head-color);
+    --message-input-border-top: 4px solid var(--chatroom-head-color);
+    --message-input-color: var(--chatroom-head-color);
+    --line-height-small: 14px;
+    --line-height: 16px;
+    --line-height-large: 20px;
+    --line-height-huge: 27px;
+    --occupants-padding: 1em;
+    --occupants-background-color: white;
+    --occupants-border-left: 1px solid var(--text-color);
+    --occupants-border-bottom: 1px solid lightgrey;
+    --occupants-features-display: block;
+    --embedded-emoji-picker-height: 300px;
+    --avatar-border-radius: 10%;
+    --avatar-border: 1px solid lightgrey;
+    --avatar-background-color: white;
+    --fullpage-chat-head-height: 62px;
+    --fullpage-chat-height: calc(var(--vh, 1vh) * 100);
+    --fullpage-chat-width: 100%;
+    --fullpage-emoji-picker-height: 300px;
+    --fullpage-max-chat-textarea-height: 15em;
+    --overlayed-chat-head-height: 55px;
+    --overlayed-chat-height: 450px;
+    --overlayed-chat-width: 250px;
+    --overlayed-chatbox-hover-height: 1em;
+    --overlayed-emoji-picker-height: 200px;
+    --overlayed-max-chat-textarea-height: 200px;
+    --overlayed-badge-color: #818479;
+    --list-toggle-color: #818479;
+    --list-toggle-hover-color: #585B51;
+    --list-toggle-font-weight: normal;
+    --list-item-action-color: #e3eef3;
+    --list-item-link-color: inherit;
+    --list-item-link-hover-color: var(--dark-link-color);
+    --list-item-open-color: var(--controlbox-head-color);
+    --list-item-open-hover-color: var(--controlbox-head-color);
+    --list-dot-circle-color: #f6dec1
+}
+
+#conversejs.theme-concord {
+    --avatar-border-radius: 100%;
+    --avatar-border: 0px;
+    --avatar-background-color: none;
+    --controlbox-pane-background-color: #333;
+    --controlbox-heading-color: #777;
+    --controlbox-heading-font-weight: bold;
+    --chat-topic-display: none;
+    --chat-info-display: none;
+    --chat-textarea-background-color: #F6F6F6;
+    --chat-correcting-color: #FFFFC0;
+    --chat-head-text-color: #AAA;
+    --chatbox-border-radius: 0px;
+    --heading-display: inline;
+    --heading-color: #4F545C;
+    --chatroom-head-color: white;
+    --chatroom-head-color-lighten-25-percent: blue;
+    --chatroom-head-button-color: #999;
+    --chatroom-head-title-font-weight: bold;
+    --chatroom-head-title-padding-right: 12px;
+    --chatroom-head-description-color: black;
+    --chatroom-head-description-link-color: #00b3f4;
+    --chatroom-head-description-display: inline;
+    --chatroom-head-description-border-left: 1px solid #DDD;
+    --chatroom-head-description-padding-left: 12px;
+    --chatroom-head-border-bottom: 1px solid #EEE;
+    --chatroom-correcting-color: #FFFFC0;
+    --chatroom-badge-color: var(--redder-orange);
+    --chatroom-badge-hover-color: #D24E2B;
+    --occupants-background-color: #F3F3F3;
+    --occupants-border-left: 0px;
+    --occupants-border-bottom: 0px;
+    --occupants-features-display: none;
+    --separator-text-color: #AAA;
+    --chat-separator-border-bottom: 1px solid #AAA;
+    --chatroom-separator-border-bottom: 1px solid #AAA;
+    --message-input-border-top: 1px solid #CCC;
+    --message-input-color: #CCC;
+    --fullpage-chat-head-height: 62px;
+    --fullpage-chatbox-button-size: 24px;
+    --list-toggle-font-weight: bold;
+    --list-item-link-color: #F1F1F1;
+    --list-item-link-hover-color: #DDD;
+    --list-item-open-color: #444;
+    --list-item-open-hover-color: #444
+}
+
+body.converse-fullscreen {
+    margin: 0
+}
+
+#conversejs-bg .converse-brand {
+    display: flex;
+    justify-content: space-between;
+    margin-top: 15vh;
+    -webkit-animation-name: fadein;
+    animation-name: fadein;
+    -webkit-animation-fill-mode: forwards;
+    animation-fill-mode: forwards;
+    -webkit-animation-duration: 5s;
+    animation-duration: 5s;
+    -webkit-animation-timing-function: ease;
+    animation-timing-function: ease
+}
+
+#conversejs-bg .converse-brand__padding {
+    position: relative;
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px;
+    padding: 0
+}
+
+@media (min-width:768px) {
+    #conversejs-bg .converse-brand__padding {
+        flex: 0 0 33.33333%;
+        max-width: 33.33333%
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs-bg .converse-brand__padding {
+        flex: 0 0 25%;
+        max-width: 25%
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs-bg .converse-brand__padding {
+        flex: 0 0 16.66667%;
+        max-width: 16.66667%
+    }
+}
+
+#conversejs-bg .converse-brand__heading {
+    position: relative;
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px;
+    padding: 0;
+    display: flex;
+    justify-content: center;
+    margin: auto
+}
+
+@media (min-width:768px) {
+    #conversejs-bg .converse-brand__heading {
+        font-size: 4em;
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs-bg .converse-brand__heading {
+        font-size: 5em;
+        flex: 0 0 75%;
+        max-width: 75%
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs-bg .converse-brand__heading {
+        font-size: 6em;
+        flex: 0 0 83.33333%;
+        max-width: 83.33333%
+    }
+}
+
+#conversejs-bg .converse-brand__heading svg {
+    margin-top: .3em
+}
+
+#conversejs-bg .converse-brand__text {
+    color: #fff;
+    font-family: var(--branding-font);
+    font-weight: 400;
+    text-align: center;
+    font-size: 140%;
+    margin-left: .2em
+}
+
+#conversejs-bg .converse-brand__text .byline {
+    margin: 0;
+    font-family: var(--heading-font);
+    font-size: .3em;
+    opacity: .55;
+    margin-bottom: 2em;
+    margin-left: -2.7em;
+    word-spacing: 5px
+}
+
+#conversejs .subdued,
+#conversejs-bg .subdued {
+    opacity: .35
+}
+
+#conversejs {
+    bottom: 0;
+    height: 100%;
+    position: fixed;
+    padding-left: env(safe-area-inset-left);
+    padding-right: env(safe-area-inset-right);
+    color: var(--text-color);
+    font-family: var(--normal-font);
+    font-size: var(--font-size);
+    direction: ltr;
+    z-index: 1031
+}
+
+#conversejs textarea:disabled {
+    background-color: #eee!important
+}
+
+#conversejs .nopadding {
+    padding: 0!important
+}
+
+/* BAO issue #405 */
+#conversejs .smooth-scroll {
+    scroll-behavior: smooth !important;
+}
+
+#conversejs.converse-overlayed>.row {
+    flex-direction: row-reverse
+}
+
+#conversejs.converse-fullscreen .converse-chatboxes,
+#conversejs.converse-mobile .converse-chatboxes {
+    width: 100vw;
+    left: -15px
+}
+
+#conversejs.converse-overlayed {
+    height: 3em
+}
+
+#conversejs.converse-embedded {
+    box-sizing: border-box;
+    bottom: auto;
+    height: 100%;
+    position: relative;
+    right: auto;
+    width: 100%
+}
+
+#conversejs.converse-embedded *,
+#conversejs.converse-embedded :after,
+#conversejs.converse-embedded :before {
+    box-sizing: border-box
+}
+
+#conversejs .brand-heading-container {
+    text-align: center
+}
+
+#conversejs .brand-heading {
+    display: inline-flex;
+    flex-direction: row;
+    align-items: flex-start;
+    font-family: var(--branding-font);
+    color: var(--link-color);
+    margin-bottom: 1em
+}
+
+#conversejs .brand-heading .brand-name {
+    color: var(--link-color);
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    margin-top: -.5em
+}
+
+#conversejs .brand-heading .brand-name__text {
+    font-size: 120%;
+    vertical-align: text-bottom
+}
+
+#conversejs .brand-heading .converse-svg-logo {
+    color: var(--link-color);
+    height: 1.5em;
+    margin-right: .25em;
+    margin-bottom: -.25em
+}
+
+#conversejs .brand-heading .converse-svg-logo .cls-1 {
+    isolation: isolate
+}
+
+#conversejs .brand-heading .converse-svg-logo .cls-2 {
+    opacity: .5;
+    mix-blend-mode: multiply
+}
+
+#conversejs .brand-heading .converse-svg-logo .cls-3 {
+    fill: var(--link-color)
+}
+
+#conversejs .brand-heading .converse-svg-logo .cls-4 {
+    fill: var(--link-color)
+}
+
+#conversejs .brand-heading--inverse .converse-svg-logo {
+    margin-bottom: 0;
+    margin-top: -.2em
+}
+
+#conversejs .brand-heading--inverse .byline {
+    margin: 0;
+    font-family: var(--heading-font);
+    font-size: .25em;
+    opacity: .55;
+    margin-left: -7em;
+    word-spacing: 5px
+}
+
+#conversejs .popover {
+    position: fixed
+}
+
+#conversejs .converse-chatboxes {
+    z-index: 1031;
+    position: fixed;
+    bottom: 0;
+    right: 0
+}
+
+#conversejs ::-webkit-input-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs ::-moz-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs :-ms-input-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs ::-ms-input-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs ::placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs ::-moz-selection {
+    background-color: var(--highlight-color)
+}
+
+#conversejs ::selection {
+    background-color: var(--highlight-color)
+}
+
+#conversejs ::-moz-selection {
+    background-color: var(--highlight-color)
+}
+
+@media screen and (max-width:480px) {
+    #conversejs {
+        margin: 0;
+        right: 10px;
+        left: 10px;
+        bottom: 5px
+    }
+}
+
+@media screen and (max-height:450px) {
+    #conversejs {
+        margin: 0;
+        right: 10px;
+        left: 10px;
+        bottom: 5px
+    }
+}
+
+#conversejs ul li {
+    height: auto
+}
+
+#conversejs a,
+#conversejs article,
+#conversejs aside,
+#conversejs audio,
+#conversejs blockquote,
+#conversejs caption,
+#conversejs dd,
+#conversejs details,
+#conversejs div,
+#conversejs dl,
+#conversejs dt,
+#conversejs em,
+#conversejs embed,
+#conversejs fieldset,
+#conversejs figcaption,
+#conversejs figure,
+#conversejs footer,
+#conversejs form,
+#conversejs h1,
+#conversejs h2,
+#conversejs h3,
+#conversejs h4,
+#conversejs h5,
+#conversejs h6,
+#conversejs header,
+#conversejs hgroup,
+#conversejs img,
+#conversejs legend,
+#conversejs li,
+#conversejs mark,
+#conversejs menu,
+#conversejs nav,
+#conversejs ol,
+#conversejs output,
+#conversejs p,
+#conversejs pre,
+#conversejs ruby,
+#conversejs section,
+#conversejs span,
+#conversejs strong,
+#conversejs summary,
+#conversejs table,
+#conversejs tbody,
+#conversejs td,
+#conversejs tfoot,
+#conversejs th,
+#conversejs thead,
+#conversejs time,
+#conversejs tr,
+#conversejs ul,
+#conversejs video {
+    margin: 0;
+    padding: 0;
+    border: 0;
+    font: inherit;
+    vertical-align: baseline
+}
+
+#conversejs button,
+#conversejs input[type=button],
+#conversejs input[type=password],
+#conversejs input[type=submit],
+#conversejs input[type=text],
+#conversejs textarea {
+    font-size: var(--font-size);
+    min-height: 0
+}
+
+#conversejs strong {
+    font-weight: 700
+}
+
+#conversejs em {
+    font-style: italic
+}
+
+#conversejs ol,
+#conversejs ul {
+    list-style: none
+}
+
+#conversejs li {
+    height: 10px
+}
+
+#conversejs dl,
+#conversejs ol,
+#conversejs ul {
+    font: inherit;
+    margin: 0
+}
+
+#conversejs a {
+    cursor: pointer
+}
+
+#conversejs a,
+#conversejs a:not([href]):not([tabindex]),
+#conversejs a:visited {
+    text-decoration: none;
+    color: var(--link-color);
+    text-shadow: none
+}
+
+#conversejs a:hover,
+#conversejs a:not([href]):not([tabindex]):hover,
+#conversejs a:visited:hover {
+    color: var(--link-hover-color);
+    text-decoration: none;
+    text-shadow: none
+}
+
+#conversejs a.fa,
+#conversejs a.far,
+#conversejs a.fas,
+#conversejs a:not([href]):not([tabindex]).fa,
+#conversejs a:not([href]):not([tabindex]).far,
+#conversejs a:not([href]):not([tabindex]).fas,
+#conversejs a:visited.fa,
+#conversejs a:visited.far,
+#conversejs a:visited.fas {
+    color: var(--subdued-color)
+}
+
+#conversejs a.fa:hover,
+#conversejs a.far:hover,
+#conversejs a.fas:hover,
+#conversejs a:not([href]):not([tabindex]).fa:hover,
+#conversejs a:not([href]):not([tabindex]).far:hover,
+#conversejs a:not([href]):not([tabindex]).fas:hover,
+#conversejs a:visited.fa:hover,
+#conversejs a:visited.far:hover,
+#conversejs a:visited.fas:hover {
+    color: var(--gray-color)
+}
+
+#conversejs svg {
+    border-radius: var(--chatbox-border-radius)
+}
+
+#conversejs .fa,
+#conversejs .far,
+#conversejs .fas {
+    color: var(--subdued-color)
+}
+
+#conversejs .fa:hover,
+#conversejs .far:hover,
+#conversejs .fas:hover {
+    color: var(--gray-color)
+}
+
+#conversejs q {
+    quotes: "“" "”" "‘" "’"
+}
+
+#conversejs q:before {
+    content: open-quote
+}
+
+#conversejs q:after {
+    content: close-quote
+}
+
+#conversejs .helptext {
+    font-size: var(--font-size-tiny);
+    color: var(--text-color-lighten-15-percent)
+}
+
+#conversejs .selected {
+    color: var(--link-color)!important
+}
+
+#conversejs .circle {
+    border-radius: 50%
+}
+
+#conversejs .badge {
+    line-height: 1;
+    font-weight: 400;
+    font-size: 90%
+}
+
+#conversejs .btn {
+    font-weight: 400;
+    color: #fff
+}
+
+#conversejs .btn .fa,
+#conversejs .btn .far,
+#conversejs .btn .fas {
+    color: #fff;
+    margin-right: .5em
+}
+
+#conversejs .no-text-select {
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none
+}
+
+@keyframes colorchange-chatmessage {
+    0% {
+        background-color: #8dd8ae
+    }
+    25% {
+        background-color: rgba(141, 216, 174, .75)
+    }
+    50% {
+        background-color: rgba(141, 216, 174, .5)
+    }
+    75% {
+        background-color: rgba(141, 216, 174, .25)
+    }
+    100% {
+        background-color: transparent
+    }
+}
+
+@-webkit-keyframes colorchange-chatmessage {
+    0% {
+        background-color: #8dd8ae
+    }
+    25% {
+        background-color: rgba(141, 216, 174, .75)
+    }
+    50% {
+        background-color: rgba(141, 216, 174, .5)
+    }
+    75% {
+        background-color: rgba(141, 216, 174, .25)
+    }
+    100% {
+        background-color: transparent
+    }
+}
+
+@keyframes colorchange-chatmessage-muc {
+    0% {
+        background-color: #ffb5a2
+    }
+    25% {
+        background-color: rgba(255, 181, 162, .75)
+    }
+    50% {
+        background-color: rgba(255, 181, 162, .5)
+    }
+    75% {
+        background-color: rgba(255, 181, 162, .25)
+    }
+    100% {
+        background-color: transparent
+    }
+}
+
+@-webkit-keyframes colorchange-chatmessage-muc {
+    0% {
+        background-color: #ffb5a2
+    }
+    25% {
+        background-color: rgba(255, 181, 162, .75)
+    }
+    50% {
+        background-color: rgba(255, 181, 162, .5)
+    }
+    75% {
+        background-color: rgba(255, 181, 162, .25)
+    }
+    100% {
+        background-color: transparent
+    }
+}
+
+@keyframes fadein {
+    0% {
+        opacity: 0
+    }
+    100% {
+        opacity: 1
+    }
+}
+
+@-webkit-keyframes fadein {
+    0% {
+        opacity: 0
+    }
+    100% {
+        opacity: 1
+    }
+}
+
+@-webkit-keyframes fadeOut {
+    0% {
+        opacity: 1;
+        visibility: visible
+    }
+    100% {
+        opacity: 0;
+        visibility: hidden
+    }
+}
+
+@keyframes fadeOut {
+    0% {
+        opacity: 1;
+        visibility: visible
+    }
+    100% {
+        opacity: 0;
+        visibility: hidden
+    }
+}
+
+#conversejs .fade-in {
+    opacity: 0;
+    -webkit-animation-name: fadein;
+    animation-name: fadein;
+    -webkit-animation-fill-mode: forwards;
+    animation-fill-mode: forwards;
+    -webkit-animation-duration: .75s;
+    animation-duration: .75s;
+    -webkit-animation-timing-function: ease;
+    animation-timing-function: ease
+}
+
+#conversejs .visible {
+    opacity: 0;
+    -webkit-animation-name: fadein;
+    animation-name: fadein;
+    -webkit-animation-fill-mode: forwards;
+    animation-fill-mode: forwards;
+    -webkit-animation-duration: .5s;
+    animation-duration: .5s;
+    -webkit-animation-timing-function: ease;
+    animation-timing-function: ease
+}
+
+#conversejs .hidden {
+    opacity: 0!important;
+    display: none!important
+}
+
+#conversejs .fade-out {
+    -webkit-animation-duration: .5s;
+    animation-duration: .5s;
+    -webkit-animation-fill-mode: forwards;
+    animation-fill-mode: forwards;
+    -webkit-animation-name: fadeOut;
+    animation-name: fadeOut;
+    -webkit-animation-timing-function: ease-in-out;
+    animation-timing-function: ease-in-out
+}
+
+#conversejs .collapsed {
+    height: 0!important;
+    overflow: hidden!important;
+    padding: 0!important
+}
+
+#conversejs .locked {
+    padding-right: 22px
+}
+
+@-webkit-keyframes spin {
+    from {
+        transform: rotate(0)
+    }
+    to {
+        transform: rotate(359deg)
+    }
+}
+
+@keyframes spin {
+    from {
+        transform: rotate(0)
+    }
+    to {
+        transform: rotate(359deg)
+    }
+}
+
+#conversejs .spinner {
+    -webkit-animation: spin 2s infinite, linear;
+    animation: spin 2s infinite, linear;
+    width: 1em;
+    display: block;
+    text-align: center;
+    padding: .5em 0;
+    font-size: 24px
+}
+
+#conversejs .left {
+    float: left
+}
+
+#conversejs .right {
+    float: right
+}
+
+#conversejs .centered {
+    text-align: center;
+    display: block;
+    margin: auto
+}
+
+#conversejs .hor_centered {
+    text-align: center;
+    display: block;
+    margin: 0 auto;
+    clear: both
+}
+
+#conversejs .error {
+    color: var(--error-color)
+}
+
+#conversejs .info {
+    color: var(--info-color)
+}
+
+#conversejs .reg-feedback {
+    font-size: 85%;
+    margin-bottom: 1em
+}
+
+#conversejs #converse-login .conn-feedback,
+#conversejs .reg-feedback {
+    display: block;
+    text-align: center;
+    width: 100%
+}
+
+#conversejs .avatar {
+    border-radius: var(--avatar-border-radius);
+    border: var(--avatar-border);
+    background-color: var(--avatar-background-color)
+}
+
+#conversejs .avatar-autocomplete {
+    margin-right: .5em;
+    vertical-align: middle
+}
+
+#conversejs .activated {
+    display: block!important
+}
+
+#conversejs .nav-pills .nav-link.active,
+#conversejs .nav-pills .show>.nav-link {
+    background-color: var(--primary-color)
+}
+
+#conversejs .list-group-item.active {
+    background-color: var(--primary-color);
+    border-color: var(--primary-color-dark)
+}
+
+#conversejs .badge {
+    text-shadow: none;
+    color: #fff
+}
+
+#conversejs .badge-light {
+    color: var(--text-color)
+}
+
+#conversejs .badge-primary,
+#conversejs .btn-primary,
+#conversejs .button-primary {
+    background-color: var(--primary-color);
+    border-color: transparent
+}
+
+#conversejs .badge-primary:hover,
+#conversejs .btn-primary:hover,
+#conversejs .button-primary:hover {
+    background-color: var(--primary-color-dark);
+    border-color: transparent
+}
+
+#conversejs .badge-primary.active,
+#conversejs .btn-primary.active,
+#conversejs .button-primary.active {
+    background-color: var(--primary-color-dark)!important;
+    border-color: transparent!important
+}
+
+#conversejs .badge-groupchat {
+    background-color: var(--chatroom-badge-color);
+    border-color: transparent
+}
+
+#conversejs .badge-groupchat:hover {
+    background-color: var(--chatroom-badge-hover-color);
+    border-color: transparent
+}
+
+#conversejs .badge-groupchat.active {
+    background-color: var(--chatroom-badge-hover-color)!important;
+    border-color: transparent!important
+}
+
+#conversejs .badge-info,
+#conversejs .btn-info {
+    background-color: var(--primary-color);
+    border-color: var(--primary-color)
+}
+
+#conversejs .badge-info:hover,
+#conversejs .btn-info:hover {
+    background-color: var(--primary-color-dark);
+    border-color: var(--primary-color-dark)
+}
+
+#conversejs .badge-secondary,
+#conversejs .btn-secondary,
+#conversejs .button-cancel {
+    color: #fff;
+    background-color: var(--secondary-color);
+    border-color: var(--secondary-color)
+}
+
+#conversejs .badge-secondary:hover,
+#conversejs .btn-secondary:hover,
+#conversejs .button-cancel:hover {
+    background-color: var(--secondary-color-dark);
+    border-color: var(--secondary-color-dark)
+}
+
+#conversejs .btn-warning {
+    color: #fff;
+    background-color: var(--warning-color);
+    border-color: var(--warning-color)
+}
+
+#conversejs .btn-warning:hover {
+    color: #fff;
+    background-color: var(--warning-color-dark);
+    border-color: var(--warning-color-dark)
+}
+
+#conversejs .btn-danger {
+    color: #fff;
+    background-color: var(--danger-color);
+    border-color: var(--danger-color)!important
+}
+
+#conversejs .btn-danger:hover {
+    background-color: var(--danger-color-dark);
+    border-color: var(--danger-color-dark)
+}
+
+@media screen and (max-width:575px) {
+    body .converse-brand {
+        font-size: 3.75em
+    }
+    #conversejs:not(.converse-embedded) .chatbox .chat-body {
+        border-radius: var(--chatbox-border-radius)
+    }
+    #conversejs:not(.converse-embedded) .flyout {
+        border-radius: var(--chatbox-border-radius)
+    }
+}
+
+@media screen and (min-width:576px) {
+    #conversejs .offset-sm-2 {
+        margin-left: 16.666667%
+    }
+}
+
+@media screen and (min-width:768px) {
+    #conversejs .offset-md-2 {
+        margin-left: 16.666667%
+    }
+    #conversejs .offset-md-3 {
+        margin-left: 25%
+    }
+}
+
+@media screen and (min-width:992px) {
+    #conversejs .offset-lg-2 {
+        margin-left: 16.666667%
+    }
+    #conversejs .offset-lg-3 {
+        margin-left: 25%
+    }
+}
+
+@media screen and (min-width:1200px) {
+    #conversejs .offset-xl-2 {
+        margin-left: 16.666667%
+    }
+}
+
+@media screen and (max-height:450px) {
+    #conversejs {
+        left: 0
+    }
+}
+
+#conversejs .btn--small {
+    font-size: 80%;
+    font-weight: 400
+}
+
+#conversejs form .hidden-username {
+    opacity: 0!important;
+    height: 0!important;
+    padding: 0!important
+}
+
+#conversejs form .error-feedback {
+    margin-bottom: .5em
+}
+
+#conversejs form .form-check-label {
+    margin-top: .3rem
+}
+
+#conversejs form .form-control::-webkit-input-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs form .form-control::-moz-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs form .form-control:-ms-input-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs form .form-control::-ms-input-placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs form .form-control::placeholder {
+    color: var(--subdued-color)
+}
+
+#conversejs form .clear-input {
+    margin-top: .5em;
+    margin-bottom: .5em;
+    position: absolute;
+    right: .2em;
+    cursor: pointer;
+    font-size: var(--font-size)
+}
+
+#conversejs form#converse-login,
+#conversejs form#converse-register {
+    background: var(--controlbox-pane-background-color)
+}
+
+#conversejs form#converse-login legend,
+#conversejs form#converse-register legend {
+    width: 100%;
+    text-align: center;
+    margin: 0 auto .5em auto
+}
+
+#conversejs form#converse-login fieldset.buttons,
+#conversejs form#converse-register fieldset.buttons {
+    text-align: center
+}
+
+#conversejs form#converse-login .login-anon,
+#conversejs form#converse-register .login-anon {
+    height: auto;
+    white-space: normal
+}
+
+#conversejs form#converse-login .save-submit,
+#conversejs form#converse-register .save-submit {
+    color: var(--save-button-color)
+}
+
+#conversejs form#converse-login .form-url,
+#conversejs form#converse-register .form-url {
+    display: block;
+    font-weight: 400;
+    margin: 1em 0
+}
+
+#conversejs form.converse-form {
+    padding: 1.2rem
+}
+
+#conversejs form.converse-form legend {
+    color: var(--text-color);
+    font-size: 125%;
+    margin-bottom: 1.5em
+}
+
+#conversejs form.converse-form input[type=number],
+#conversejs form.converse-form input[type=password],
+#conversejs form.converse-form input[type=text],
+#conversejs form.converse-form select {
+    min-width: 50%
+}
+
+#conversejs form.converse-form input[type=button],
+#conversejs form.converse-form input[type=number],
+#conversejs form.converse-form input[type=password],
+#conversejs form.converse-form input[type=submit],
+#conversejs form.converse-form input[type=text] {
+    padding: .5em
+}
+
+#conversejs form.converse-form input[type=button],
+#conversejs form.converse-form input[type=submit] {
+    padding-left: 1em;
+    padding-right: 1em;
+    border: none
+}
+
+#conversejs form.converse-form input.error {
+    border: 1px solid var(--error-color);
+    color: var(--text-color)
+}
+
+#conversejs form.converse-form .text-muted {
+    color: var(--subdued-color)!important;
+    font-size: 85%;
+    padding-top: .5em
+}
+
+#conversejs form.converse-form .text-muted a {
+    color: var(--link-color-lighten-10-percent)
+}
+
+#conversejs form.converse-form .text-muted.error {
+    color: var(--error-color)
+}
+
+#conversejs form.converse-form--modal {
+    padding-bottom: 0
+}
+
+#conversejs form.converse-centered-form {
+    min-height: 66%;
+    text-align: center
+}
+
+#conversejs form.converse-centered-form input {
+    max-width: 30em;
+    margin: auto
+}
+
+#conversejs .chatbox-navback {
+    display: none
+}
+
+#conversejs .flyout {
+    border-radius: var(--chatbox-border-radius);
+    position: absolute
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .flyout {
+        border-radius: 0
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .flyout {
+        border-radius: 0
+    }
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .flyout {
+        bottom: 0
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .flyout {
+        bottom: 0
+    }
+}
+
+#conversejs .chatbox-btn {
+    border-radius: 25%;
+    border: none;
+    cursor: pointer;
+    font-size: var(--chatbox-button-size);
+    margin: 0 .2em;
+    padding: 0 0 0 .5em;
+    text-decoration: none
+}
+
+#conversejs .chatbox-btn:active {
+    position: relative;
+    top: 1px
+}
+
+#conversejs .chat-head {
+    display: flex;
+    flex-direction: row;
+    color: #fff;
+    font-size: 100%;
+    margin: 0;
+    padding: 0;
+    padding-bottom: .5em;
+    position: relative
+}
+
+#conversejs .chat-head.chat-head-chatbox {
+    background-color: var(--chat-head-color)
+}
+
+#conversejs .chat-head .avatar {
+    margin-right: .5em
+}
+
+#conversejs .chat-head .chat-head__desc {
+    font-size: 80%
+}
+
+#conversejs .chat-head .chatbox-title {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    width: 100%
+}
+
+#conversejs .chat-head .chatbox-title--row {
+    display: flex;
+    flex-direction: row;
+    overflow: hidden
+}
+
+#conversejs .chat-head .chatbox-title__text {
+    overflow: hidden;
+    text-overflow: ellipsis
+}
+
+#conversejs .chat-head .chatbox-title__buttons {
+    display: flex;
+    flex-direction: row-reverse;
+    flex-wrap: nowrap;
+    padding: 0
+}
+
+#conversejs .chat-head .user-custom-message {
+    color: var(--chat-head-color-lighten-50-percent);
+    font-size: 75%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    margin: 0;
+    padding-top: .2em
+}
+
+#conversejs .chat-head a.chatbox-btn.fa,
+#conversejs .chat-head a.chatbox-btn.far,
+#conversejs .chat-head a.chatbox-btn.fas,
+#conversejs .chat-head a:hover.chatbox-btn.fa,
+#conversejs .chat-head a:hover.chatbox-btn.far,
+#conversejs .chat-head a:hover.chatbox-btn.fas,
+#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fa,
+#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.far,
+#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fas,
+#conversejs .chat-head a:visited.chatbox-btn.fa,
+#conversejs .chat-head a:visited.chatbox-btn.far,
+#conversejs .chat-head a:visited.chatbox-btn.fas {
+    color: #fff
+}
+
+#conversejs .chat-head a.chatbox-btn.fa.button-on:before,
+#conversejs .chat-head a.chatbox-btn.far.button-on:before,
+#conversejs .chat-head a.chatbox-btn.fas.button-on:before,
+#conversejs .chat-head a:hover.chatbox-btn.fa.button-on:before,
+#conversejs .chat-head a:hover.chatbox-btn.far.button-on:before,
+#conversejs .chat-head a:hover.chatbox-btn.fas.button-on:before,
+#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,
+#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.far.button-on:before,
+#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fas.button-on:before,
+#conversejs .chat-head a:visited.chatbox-btn.fa.button-on:before,
+#conversejs .chat-head a:visited.chatbox-btn.far.button-on:before,
+#conversejs .chat-head a:visited.chatbox-btn.fas.button-on:before {
+    padding: .2em;
+    background-color: var(--chat-head-text-color);
+    color: var(--chat-head-color)
+}
+
+#conversejs .chat-head .chatbox-btn {
+    color: #fff
+}
+
+#conversejs .chat-head .chatbox-btn.fa,
+#conversejs .chat-head .chatbox-btn.far,
+#conversejs .chat-head .chatbox-btn.fas {
+    color: #fff
+}
+
+#conversejs .chat-head .chatbox-btn:active {
+    position: relative;
+    top: 1px
+}
+
+#conversejs .chat-head .chatbox-btn.button-on:before {
+    border-radius: 5%;
+    background-color: var(--chat-head-text-color);
+    color: var(--chat-head-color)
+}
+
+#conversejs .chatbox {
+    text-align: left;
+    margin: 0 var(--chat-gutter)
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .chatbox {
+        margin: 0;
+        width: var(--mobile-chat-width)
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .chatbox {
+        margin: 0;
+        width: var(--mobile-chat-width)
+    }
+}
+
+#conversejs .chatbox .box-flyout {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    background-color: var(--chat-head-color);
+    box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, .4);
+    z-index: 2;
+    overflow: hidden;
+    width: 100%
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .chatbox .box-flyout {
+        height: var(--mobile-chat-height);
+        width: var(--mobile-chat-width);
+        height: 100vh
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .chatbox .box-flyout {
+        height: var(--mobile-chat-height);
+        width: var(--mobile-chat-width);
+        height: 100vh
+    }
+}
+
+#conversejs .chatbox .chat-title {
+    display: var(--heading-display);
+    font-family: var(--heading-font);
+    color: var(--heading-color);
+    display: block;
+    line-height: var(--line-height-large);
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap
+}
+
+#conversejs .chatbox .chat-title.groupchat {
+    padding-right: var(--chatroom-head-title-padding-right)
+}
+
+#conversejs .chatbox .chat-title a {
+    color: var(--chat-head-text-color);
+    width: 100%
+}
+
+#conversejs .chatbox .chat-body {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: 100%;
+    background-color: var(--chat-head-color);
+    border-bottom-left-radius: var(--chatbox-border-radius);
+    border-bottom-right-radius: var(--chatbox-border-radius);
+    border-top: 0
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .chatbox .chat-body {
+        border-bottom-left-radius: 0;
+        border-bottom-right-radius: 0
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .chatbox .chat-body {
+        border-bottom-left-radius: 0;
+        border-bottom-right-radius: 0
+    }
+}
+
+#conversejs .chatbox .chat-body p {
+    color: var(--text-color);
+    font-size: var(--message-font-size);
+    margin: 0;
+    padding: 5px
+}
+
+#conversejs .chatbox .new-msgs-indicator {
+    position: relative;
+    width: 100%;
+    cursor: pointer;
+    background-color: var(--chat-head-color);
+    color: var(--light-background-color);
+    padding: .5em;
+    font-size: .9em;
+    text-align: center;
+    z-index: 20;
+    white-space: nowrap;
+    margin-bottom: .25em
+}
+
+#conversejs .chatbox .chat-content {
+    padding: 1em 0;
+    height: 100%;
+    font-size: var(--message-font-size);
+    color: var(--text-color);
+    overflow-y: auto;
+    border: 0;
+    background-color: var(--chat-content-background-color);
+    line-height: 1.3em
+}
+
+#conversejs .chatbox .chat-content video {
+    width: 100%
+}
+
+#conversejs .chatbox .chat-content progress {
+    margin: .5em 0;
+    width: 100%
+}
+
+#conversejs .chatbox .chat-content-sendbutton {
+    height: calc(100% - (var(--chat-textarea-height) + var(--send-button-height) + 2 * var(--send-button-margin)))
+}
+
+#conversejs .chatbox .dropdown {
+    background-color: var(--light-background-color)
+}
+
+#conversejs .chatbox .dropdown dd {
+    margin: 0;
+    padding: 0;
+    position: relative
+}
+
+#conversejs .chatbox .sendXMPPMessage {
+    -moz-background-clip: padding;
+    -webkit-background-clip: padding-box;
+    border-bottom-radius: var(--chatbox-border-radius);
+    background-clip: padding-box;
+    background-color: #fff;
+    border: 0;
+    margin: 0;
+    padding: 0
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .chatbox .sendXMPPMessage {
+        width: 100%
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .chatbox .sendXMPPMessage {
+        width: 100%
+    }
+}
+
+#conversejs .chatbox .sendXMPPMessage .suggestion-box__results:after {
+    display: none
+}
+
+#conversejs .chatbox .sendXMPPMessage .spoiler-hint {
+    width: 100%
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-textarea {
+    color: var(--chat-textarea-color);
+    background-color: var(--chat-textarea-background-color);
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    border-bottom-radius: var(--chatbox-border-radius);
+    padding-left: .5em;
+    padding-right: 4.5em;
+    padding-top: .5em;
+    padding-bottom: .5em;
+    width: 100%;
+    border: none;
+    min-height: var(--chat-textarea-height);
+    margin-bottom: -4px;
+    resize: none;
+    text-align: justify
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-textarea:active,
+#conversejs .chatbox .sendXMPPMessage .chat-textarea:focus {
+    outline-color: var(--chat-head-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-textarea.spoiler {
+    height: 42px
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-textarea.correcting {
+    background-color: var(--chat-correcting-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .send-button {
+    border-radius: 0;
+    bottom: var(--send-button-bottom);
+    background-color: var(--chat-head-color);
+    color: var(--inverse-link-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar--container {
+    display: flex;
+    flex-wrap: nowrap
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar {
+    box-sizing: border-box;
+    margin: 0;
+    width: 100%;
+    padding: .25em;
+    display: block;
+    border-top: 4px solid var(--chat-head-color);
+    background-color: #fff;
+    color: var(--chat-head-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fa,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fa:hover,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .far,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .far:hover,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fas,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fas:hover {
+    color: var(--chat-head-color);
+    font-size: var(--font-size-large)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .disabled {
+    color: var(--text-color-lighten-15-percent)!important
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted a {
+    color: var(--text-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted .toolbar-menu a,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted a .toolbar-menu a {
+    color: var(--link-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unverified,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unverified a {
+    color: #cf5300
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .private,
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar .private a {
+    color: #4b7003
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li {
+    cursor: pointer;
+    display: inline-block;
+    list-style: none;
+    padding: 0 .5em
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li:hover {
+    cursor: pointer
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu {
+    background-color: #fff;
+    bottom: 1.7rem;
+    box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, .4);
+    height: auto;
+    margin-bottom: 0;
+    min-width: 21rem;
+    position: absolute;
+    right: 0;
+    top: auto;
+    z-index: 1000
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu.otr-menu {
+    left: -6em;
+    min-width: 15rem
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu.otr-menu.show {
+    display: flex;
+    flex-direction: column
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu a {
+    color: var(--link-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul {
+    z-index: 99
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li {
+    display: block;
+    padding: 7px
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li:hover {
+    background-color: var(--highlight-color)
+}
+
+#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li a {
+    display: block
+}
+
+#conversejs .chatbox .dragresize {
+    background: 0 0;
+    border: 0;
+    margin: 0;
+    position: absolute;
+    top: 0;
+    z-index: 20
+}
+
+#conversejs .chatbox .dragresize-top {
+    cursor: n-resize;
+    height: 5px;
+    width: 100%
+}
+
+#conversejs .chatbox .dragresize-left,
+#conversejs .chatbox .dragresize-occupants-left {
+    cursor: w-resize;
+    width: 5px;
+    height: 100%;
+    left: 0
+}
+
+#conversejs .chatbox .dragresize-topleft {
+    cursor: nw-resize;
+    width: 15px;
+    height: 15px;
+    top: 0;
+    left: 0
+}
+
+#conversejs.converse-embedded .chat-head,
+#conversejs.converse-overlayed .chat-head {
+    padding: .5em;
+    border-top-left-radius: var(--chatbox-border-radius);
+    border-top-right-radius: var(--chatbox-border-radius)
+}
+
+@media screen and (max-height:450px) {
+    #conversejs.converse-embedded .chat-head,
+    #conversejs.converse-overlayed .chat-head {
+        border-top-left-radius: 0;
+        border-top-right-radius: 0
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs.converse-embedded .chat-head,
+    #conversejs.converse-overlayed .chat-head {
+        border-top-left-radius: 0;
+        border-top-right-radius: 0
+    }
+}
+
+#conversejs.converse-embedded .chatbox,
+#conversejs.converse-overlayed .chatbox {
+    min-width: var(--overlayed-chat-width)!important;
+    width: var(--overlayed-chat-width)
+}
+
+#conversejs.converse-embedded .chatbox .box-flyout,
+#conversejs.converse-overlayed .chatbox .box-flyout {
+    min-width: var(--overlayed-chat-width)!important;
+    width: var(--overlayed-chat-width)
+}
+
+#conversejs.converse-overlayed .flyout {
+    bottom: var(--overlayed-chatbox-hover-height)
+}
+
+#conversejs.converse-overlayed .box-flyout {
+    height: var(--overlayed-chat-height);
+    min-height: calc(var(--overlayed-chat-height)/ 2)
+}
+
+#conversejs.converse-overlayed .chat-head {
+    min-height: var(--overlayed-chat-head-height)
+}
+
+#conversejs.converse-overlayed .chat-textarea {
+    max-height: var(--overlayed-max-chat-textarea-height)
+}
+
+#conversejs.converse-overlayed .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu {
+    min-width: 235px
+}
+
+@media (max-width:767.98px) {
+    #conversejs.converse-overlayed>.row {
+        flex-direction: column
+    }
+    #conversejs.converse-overlayed>.row.no-gutters {
+        margin: -1em
+    }
+}
+
+#conversejs.converse-embedded .flyout,
+#conversejs.converse-fullscreen .flyout {
+    border-radius: 0;
+    border-top: .8em solid var(--chat-head-color);
+    border: var(--flyout-padding) solid var(--chat-head-color);
+    bottom: 0
+}
+
+#conversejs.converse-embedded .chat-head,
+#conversejs.converse-fullscreen .chat-head {
+    height: var(--fullpage-chat-head-height)
+}
+
+#conversejs.converse-embedded .chat-head .user-custom-message,
+#conversejs.converse-fullscreen .chat-head .user-custom-message {
+    font-size: 70%;
+    height: auto;
+    line-height: var(--line-height)
+}
+
+#conversejs.converse-embedded .chatbox,
+#conversejs.converse-fullscreen .chatbox {
+    margin: 0;
+    position: relative;
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px
+}
+
+#conversejs.converse-embedded .chatbox .box-flyout,
+#conversejs.converse-fullscreen .chatbox .box-flyout {
+    box-shadow: none;
+    overflow: hidden
+}
+
+@media (min-width:768px) {
+    #conversejs.converse-embedded .chatbox,
+    #conversejs.converse-fullscreen .chatbox {
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs.converse-embedded .chatbox,
+    #conversejs.converse-fullscreen .chatbox {
+        flex: 0 0 75%;
+        max-width: 75%
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs.converse-embedded .chatbox,
+    #conversejs.converse-fullscreen .chatbox {
+        flex: 0 0 83.33333%;
+        max-width: 83.33333%
+    }
+}
+
+#conversejs.converse-embedded.converse-singleton .flyout,
+#conversejs.converse-fullscreen.converse-singleton .flyout {
+    border: none!important
+}
+
+#conversejs.converse-embedded.converse-singleton .chat-head,
+#conversejs.converse-fullscreen.converse-singleton .chat-head {
+    min-height: var(--fullpage-chat-head-height);
+    padding: .5em
+}
+
+#conversejs.converse-embedded.converse-singleton .chatbox,
+#conversejs.converse-fullscreen.converse-singleton .chatbox {
+    margin: 0;
+    position: relative;
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px
+}
+
+@media (min-width:768px) {
+    #conversejs.converse-embedded.converse-singleton .chatbox,
+    #conversejs.converse-fullscreen.converse-singleton .chatbox {
+        flex: 0 0 100%;
+        max-width: 100%
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs.converse-embedded.converse-singleton .chatbox,
+    #conversejs.converse-fullscreen.converse-singleton .chatbox {
+        flex: 0 0 100%;
+        max-width: 100%
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs.converse-embedded.converse-singleton .chatbox,
+    #conversejs.converse-fullscreen.converse-singleton .chatbox {
+        flex: 0 0 100%;
+        max-width: 100%
+    }
+}
+
+#conversejs.converse-embedded .converse-chatboxes {
+    z-index: 1031;
+    position: inherit;
+    flex-wrap: nowrap;
+    bottom: auto;
+    height: 100%;
+    width: 100%;
+    margin-left: -15px
+}
+
+#conversejs.converse-embedded .chatbox .box-flyout {
+    bottom: 0;
+    height: 100%;
+    min-width: auto;
+    width: 100%
+}
+
+#conversejs.converse-embedded .chatbox .chat-title--text {
+    padding: .3em;
+    font-size: 120%
+}
+
+#conversejs.converse-embedded .chat-textarea {
+    max-height: var(--fullpage-max-chat-textarea-height)
+}
+
+#conversejs.converse-fullscreen .chatbox-btn {
+    font-size: var(--fullpage-chatbox-button-size);
+    margin: 0 .3em
+}
+
+#conversejs.converse-fullscreen .chat-head {
+    font-size: var(--font-size-huge)
+}
+
+#conversejs.converse-fullscreen .chat-textarea {
+    max-height: var(--fullpage-max-chat-textarea-height)
+}
+
+#conversejs.converse-fullscreen .chatbox .box-flyout {
+    background-color: var(--chat-head-color);
+    box-shadow: none;
+    height: var(--fullpage-chat-height);
+    min-height: calc(var(--fullpage-chat-height)/ 2);
+    width: var(--fullpage-chat-width);
+    overflow: hidden
+}
+
+#conversejs.converse-fullscreen .chatbox .chat-body {
+    background-color: var(--chat-head-color);
+    border-top-left-radius: var(--chatbox-border-radius);
+    border-top-right-radius: var(--chatbox-border-radius)
+}
+
+#conversejs.converse-fullscreen .chatbox .chat-content {
+    border-top-left-radius: var(--chatbox-border-radius);
+    border-top-right-radius: var(--chatbox-border-radius)
+}
+
+#conversejs.converse-fullscreen .chatbox .chat-title {
+    font-size: var(--font-size-huge);
+    line-height: var(--line-height-huge)
+}
+
+#conversejs.converse-fullscreen .chatbox .sendXMPPMessage ul {
+    width: 100%
+}
+
+@media (max-width:767.98px) {
+    #conversejs:not(.converse-embedded)>.row {
+        flex-direction: row-reverse
+    }
+    #conversejs:not(.converse-embedded) #converse-login-panel .converse-form {
+        padding: 3em 2em 3em
+    }
+    #conversejs:not(.converse-embedded) .chatbox {
+        width: calc(100% - 50px)
+    }
+    #conversejs:not(.converse-embedded) .chatbox .row .box-flyout {
+        left: 50px;
+        bottom: 0;
+        height: 100vh;
+        box-shadow: none
+    }
+    #conversejs.converse-fullscreen .chatbox .box-flyout .chatbox-navback,
+    #conversejs.converse-mobile .chatbox .box-flyout .chatbox-navback,
+    #conversejs.converse-overlayed .chatbox .box-flyout .chatbox-navback {
+        display: flex;
+        padding-right: 1em
+    }
+    #conversejs.converse-fullscreen .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before,
+    #conversejs.converse-mobile .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before,
+    #conversejs.converse-overlayed .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before {
+        color: #fff
+    }
+}
+
+#conversejs .oauth-providers {
+    text-align: center
+}
+
+#conversejs .oauth-providers .oauth-provider {
+    margin: 1em 0
+}
+
+#conversejs .oauth-providers .oauth-provider .oauth-login {
+    margin-left: 0;
+    color: var(--link-color);
+    font-size: var(--font-size-large)
+}
+
+#conversejs .oauth-providers .oauth-provider .oauth-login:hover {
+    color: var(--link-hover-color)
+}
+
+#conversejs .oauth-providers .oauth-provider .oauth-login i {
+    color: var(--link-color);
+    font-size: var(--font-size-huge);
+    margin-right: .5em
+}
+
+#conversejs .set-xmpp-status .chat-status--online,
+#conversejs .xmpp-status .chat-status--online {
+    color: var(--chat-status-online)
+}
+
+#conversejs .set-xmpp-status .chat-status--busy,
+#conversejs .xmpp-status .chat-status--busy {
+    color: var(--chat-status-busy)
+}
+
+#conversejs .set-xmpp-status .chat-status--away,
+#conversejs .xmpp-status .chat-status--away {
+    color: var(--chat-status-away)
+}
+
+#conversejs .set-xmpp-status .fa-times-circle,
+#conversejs .set-xmpp-status .far.fa-circle,
+#conversejs .xmpp-status .fa-times-circle,
+#conversejs .xmpp-status .far.fa-circle {
+    color: var(--subdued-color)
+}
+
+#conversejs .room-info {
+    font-size: var(--font-size-small);
+    font-style: normal;
+    font-weight: 400
+}
+
+#conversejs .room-info li.room-info {
+    display: block;
+    margin-left: 5px
+}
+
+#conversejs .room-info p.room-info {
+    line-height: var(--line-height);
+    margin: 0;
+    display: block;
+    white-space: normal
+}
+
+#conversejs div.room-info {
+    padding: .3em 0;
+    clear: left;
+    width: 100%
+}
+
+#conversejs #controlbox {
+    order: -1;
+    margin-right: calc(3 * var(--chat-gutter))
+}
+
+#conversejs #controlbox .open-rooms-toggle,
+#conversejs #controlbox .open-rooms-toggle .fa {
+    color: var(--chatroom-head-color)!important
+}
+
+#conversejs #controlbox .open-rooms-toggle .fa:hover,
+#conversejs #controlbox .open-rooms-toggle:hover {
+    color: var(--chatroom-head-color-dark)!important
+}
+
+#conversejs #controlbox .box-flyout {
+    background-color: #fff
+}
+
+#conversejs #controlbox.logged-out .box-flyout .controlbox-pane {
+    overflow-y: auto
+}
+
+#conversejs #controlbox form.search-xmpp-contact {
+    margin: 0;
+    padding-left: 5px;
+    padding: 0 0 5px 5px
+}
+
+#conversejs #controlbox form.search-xmpp-contact input {
+    width: 8em
+}
+
+#conversejs #controlbox .msgs-indicator {
+    margin-right: .5em
+}
+
+#conversejs #controlbox a.subscribe-to-user {
+    padding-left: 2em;
+    font-weight: 700
+}
+
+#conversejs #controlbox #converse-register {
+    opacity: 0;
+    -webkit-animation-name: fadein;
+    animation-name: fadein;
+    -webkit-animation-fill-mode: forwards;
+    animation-fill-mode: forwards;
+    -webkit-animation-duration: .75s;
+    animation-duration: .75s;
+    -webkit-animation-timing-function: ease;
+    animation-timing-function: ease;
+    background: #fff
+}
+
+#conversejs #controlbox #converse-register .title {
+    font-weight: 700
+}
+
+#conversejs #controlbox #converse-register .info {
+    color: green;
+    font-size: 90%;
+    margin: 1.5em 0
+}
+
+#conversejs #controlbox #converse-register .form-errors {
+    color: var(--error-color);
+    margin: 1em 0
+}
+
+#conversejs #controlbox #converse-register .provider-title {
+    font-size: var(--font-size-huge);
+    margin: 0
+}
+
+#conversejs #controlbox #converse-register .provider-score {
+    width: 178px;
+    margin-bottom: 8px
+}
+
+#conversejs #controlbox #converse-register .form-help .url {
+    font-weight: 700;
+    color: var(--link-color)
+}
+
+#conversejs #controlbox #converse-register .input-group {
+    display: table;
+    margin: auto;
+    width: 100%
+}
+
+#conversejs #controlbox #converse-register .input-group span {
+    overflow-x: hidden;
+    text-overflow: ellipsis;
+    max-width: 110px
+}
+
+#conversejs #controlbox #converse-register .input-group input[name=username],
+#conversejs #controlbox #converse-register .input-group span {
+    display: table-cell;
+    text-align: left
+}
+
+#conversejs #controlbox #converse-register .instructions {
+    color: gray;
+    font-size: 85%
+}
+
+#conversejs #controlbox #converse-register .instructions:hover {
+    color: var(--text-color)
+}
+
+#conversejs #controlbox .conn-feedback {
+    color: var(--controlbox-head-color)
+}
+
+#conversejs #controlbox .conn-feedback.error {
+    color: var(--error-color)
+}
+
+#conversejs #controlbox .conn-feedback p {
+    padding-bottom: 1em
+}
+
+#conversejs #controlbox .conn-feedback p.feedback-subject.error {
+    font-weight: 700
+}
+
+#conversejs #controlbox #converse-login-panel,
+#conversejs #controlbox #converse-register-panel {
+    padding-top: 0;
+    padding-bottom: 0
+}
+
+#conversejs #controlbox #converse-login-panel {
+    flex-direction: column
+}
+
+#conversejs #controlbox #converse-login-panel .brand-heading {
+    color: var(--global-background-color)
+}
+
+#conversejs #controlbox .toggle-register-login {
+    font-weight: 700
+}
+
+#conversejs #controlbox .controlbox-pane .userinfo {
+    padding-bottom: 1em
+}
+
+#conversejs #controlbox .controlbox-pane .userinfo .username {
+    margin-left: .5em;
+    overflow: hidden;
+    text-overflow: ellipsis
+}
+
+#conversejs #controlbox .controlbox-pane .userinfo .profile {
+    margin-bottom: .75em
+}
+
+#conversejs #controlbox #chatrooms {
+    padding: 0
+}
+
+#conversejs #controlbox #chatrooms .add-chatroom {
+    margin: 0;
+    padding: 0
+}
+
+#conversejs #controlbox #chatrooms .add-chatroom input[type=button],
+#conversejs #controlbox #chatrooms .add-chatroom input[type=submit],
+#conversejs #controlbox #chatrooms .add-chatroom input[type=text] {
+    width: 100%
+}
+
+#conversejs #controlbox .controlbox-section .controlbox-heading {
+    font-family: var(--heading-font);
+    color: var(--controlbox-heading-color);
+    font-weight: var(--controlbox-heading-font-weight);
+    padding: 0;
+    font-size: 1.1em;
+    line-height: 1.1em;
+    text-transform: uppercase
+}
+
+#conversejs #controlbox .controlbox-section .controlbox-heading--groupchats {
+    color: var(--chatroom-head-color)
+}
+
+#conversejs #controlbox .controlbox-section .controlbox-heading--contacts {
+    color: var(--chat-head-color-dark)
+}
+
+#conversejs #controlbox .controlbox-section .controlbox-heading__btn {
+    cursor: pointer;
+    font-size: 1em;
+    padding: 0;
+    margin: var(--controlbox-heading-top-margin) 0 var(--inline-action-margin) 0;
+    min-width: 25px;
+    text-align: center
+}
+
+#conversejs #controlbox .controlbox-section .controlbox-heading__btn.fa-vcard {
+    margin-top: 1em
+}
+
+#conversejs #controlbox .dropdown a {
+    width: 143px;
+    display: inline-block
+}
+
+#conversejs #controlbox .dropdown li {
+    list-style: none;
+    padding-left: 0
+}
+
+#conversejs #controlbox .dropdown dd ul {
+    padding: 0;
+    list-style: none;
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    z-index: 21;
+    background-color: var(--light-background-color)
+}
+
+#conversejs #controlbox .dropdown dd ul li:hover {
+    background-color: var(--highlight-color)
+}
+
+#conversejs #controlbox .dropdown dd.search-xmpp {
+    height: 0
+}
+
+#conversejs #controlbox .dropdown dd.search-xmpp .contact-form-container {
+    position: absolute;
+    z-index: 22
+}
+
+#conversejs #controlbox .dropdown dd.search-xmpp .contact-form-container form {
+    box-shadow: 1px 4px 10px 1px rgba(0, 0, 0, .4);
+    background-color: #fff
+}
+
+#conversejs #controlbox .dropdown dd.search-xmpp li:hover {
+    background-color: var(--light-background-color)
+}
+
+#conversejs #controlbox .dropdown dt a span {
+    cursor: pointer;
+    display: block;
+    padding: 4px 7px 0 5px
+}
+
+#conversejs #controlbox .controlbox-panes {
+    background-color: var(--controlbox-pane-background-color);
+    height: 100%;
+    overflow-y: auto
+}
+
+#conversejs #controlbox .controlbox-subtitle {
+    font-size: 90%;
+    padding: .5em;
+    text-align: right
+}
+
+#conversejs #controlbox .controlbox-pane {
+    background-color: var(--controlbox-pane-background-color);
+    border: 0;
+    font-size: var(--font-size);
+    left: 0;
+    text-align: left;
+    overflow-x: hidden;
+    padding: 0 0 1em 0
+}
+
+#conversejs #controlbox .controlbox-pane .controlbox-padded {
+    padding-left: 1em;
+    padding-right: 1em;
+    align-items: center;
+    line-height: normal
+}
+
+#conversejs #controlbox .controlbox-pane .controlbox-padded .change-status {
+    min-width: 25px;
+    text-align: center
+}
+
+#conversejs #controlbox .controlbox-pane .add-converse-contact {
+    margin: 0 0 .75em 0
+}
+
+#conversejs #controlbox .controlbox-pane .chatbox-btn {
+    margin: 0
+}
+
+#conversejs #controlbox .controlbox-pane .switch-form {
+    text-align: center;
+    padding: 2em 0
+}
+
+#conversejs #controlbox .controlbox-pane .switch-form p {
+    margin-top: .5em
+}
+
+#conversejs #controlbox .controlbox-pane dd {
+    margin-left: 0;
+    margin-bottom: 0
+}
+
+#conversejs #controlbox .controlbox-pane dd.odd {
+    background-color: #dceac5
+}
+
+#conversejs #controlbox .add-xmpp-contact {
+    padding: 1em .5em
+}
+
+#conversejs #controlbox .add-xmpp-contact input {
+    margin: 0 0 1rem;
+    width: 100%
+}
+
+#conversejs #controlbox .add-xmpp-contact button {
+    width: 100%
+}
+
+#conversejs.converse-overlayed .toggle-controlbox {
+    order: -1;
+    text-align: center;
+    background-color: var(--link-color);
+    border-top-left-radius: var(--button-border-radius);
+    border-top-right-radius: var(--button-border-radius);
+    color: #0a0a0a;
+    float: right;
+    height: 100%;
+    margin: 0 var(--chat-gutter);
+    padding: 1em
+}
+
+#conversejs.converse-overlayed .toggle-controlbox span {
+    color: var(--inverse-link-color)
+}
+
+#conversejs.converse-overlayed #controlbox {
+    min-width: var(--controlbox-width)!important;
+    width: var(--controlbox-width)
+}
+
+#conversejs.converse-overlayed #controlbox .box-flyout {
+    min-width: var(--controlbox-width)!important;
+    width: var(--controlbox-width)
+}
+
+#conversejs.converse-overlayed #controlbox .login-trusted {
+    white-space: nowrap;
+    font-size: 90%
+}
+
+#conversejs.converse-overlayed #controlbox #converse-login-trusted {
+    margin-top: .5em
+}
+
+#conversejs.converse-overlayed #controlbox:not(.logged-out) .controlbox-head {
+    height: 15px
+}
+
+#conversejs.converse-overlayed #controlbox .brand-heading-container {
+    width: 100%
+}
+
+#conversejs.converse-overlayed #controlbox .controlbox-head {
+    display: flex;
+    flex-direction: row-reverse;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    min-height: 0
+}
+
+#conversejs.converse-overlayed #controlbox .controlbox-head .brand-heading {
+    color: var(--text-color);
+    font-size: 2em
+}
+
+#conversejs.converse-overlayed #controlbox .controlbox-head .chatbox-btn {
+    color: var(--controlbox-head-color);
+    margin: 0
+}
+
+#conversejs.converse-overlayed #controlbox #converse-login,
+#conversejs.converse-overlayed #controlbox #converse-register {
+    flex: 0 0 100%;
+    max-width: 100%;
+    padding-bottom: 0
+}
+
+#conversejs.converse-overlayed #controlbox #converse-register .button-cancel {
+    font-size: 90%
+}
+
+#conversejs.converse-overlayed #controlbox .controlbox-panes {
+    border-radius: var(--chatbox-border-radius)
+}
+
+#conversejs.converse-embedded .toggle-controlbox,
+#conversejs.converse-fullscreen .toggle-controlbox {
+    display: none
+}
+
+#conversejs.converse-embedded #controlbox,
+#conversejs.converse-fullscreen #controlbox,
+#conversejs.converse-mobile #controlbox {
+    position: relative;
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px;
+    margin: 0
+}
+
+@media (min-width:768px) {
+    #conversejs.converse-embedded #controlbox,
+    #conversejs.converse-fullscreen #controlbox,
+    #conversejs.converse-mobile #controlbox {
+        flex: 0 0 33.33333%;
+        max-width: 33.33333%
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs.converse-embedded #controlbox,
+    #conversejs.converse-fullscreen #controlbox,
+    #conversejs.converse-mobile #controlbox {
+        flex: 0 0 25%;
+        max-width: 25%
+    }
+}
+
+@media (min-width:1200px) {
+    #conversejs.converse-embedded #controlbox,
+    #conversejs.converse-fullscreen #controlbox,
+    #conversejs.converse-mobile #controlbox {
+        flex: 0 0 16.66667%;
+        max-width: 16.66667%
+    }
+}
+
+#conversejs.converse-embedded #controlbox.logged-out,
+#conversejs.converse-fullscreen #controlbox.logged-out,
+#conversejs.converse-mobile #controlbox.logged-out {
+    flex: 0 0 100%;
+    max-width: 100%
+}
+
+#conversejs.converse-embedded #controlbox .controlbox-pane,
+#conversejs.converse-fullscreen #controlbox .controlbox-pane,
+#conversejs.converse-mobile #controlbox .controlbox-pane {
+    border-radius: 0
+}
+
+#conversejs.converse-embedded #controlbox .flyout,
+#conversejs.converse-fullscreen #controlbox .flyout,
+#conversejs.converse-mobile #controlbox .flyout {
+    border-radius: 0
+}
+
+#conversejs.converse-embedded #controlbox #converse-login-panel,
+#conversejs.converse-fullscreen #controlbox #converse-login-panel,
+#conversejs.converse-mobile #controlbox #converse-login-panel {
+    border-radius: 0
+}
+
+#conversejs.converse-embedded #controlbox #converse-login-panel .converse-form,
+#conversejs.converse-fullscreen #controlbox #converse-login-panel .converse-form,
+#conversejs.converse-mobile #controlbox #converse-login-panel .converse-form {
+    padding: 3em 2em 3em
+}
+
+#conversejs.converse-embedded #controlbox .toggle-register-login,
+#conversejs.converse-fullscreen #controlbox .toggle-register-login,
+#conversejs.converse-mobile #controlbox .toggle-register-login {
+    line-height: var(--line-height-huge)
+}
+
+#conversejs.converse-embedded #controlbox .brand-heading-container,
+#conversejs.converse-fullscreen #controlbox .brand-heading-container,
+#conversejs.converse-mobile #controlbox .brand-heading-container {
+    flex: 0 0 100%;
+    max-width: 100%;
+    margin-top: 5em;
+    margin-bottom: 1em
+}
+
+#conversejs.converse-embedded #controlbox .brand-heading-container .brand-heading,
+#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-heading,
+#conversejs.converse-mobile #controlbox .brand-heading-container .brand-heading {
+    font-size: 500%;
+    padding: .7em 0 0 0;
+    opacity: .8;
+    color: var(--brand-heading-color)
+}
+
+#conversejs.converse-embedded #controlbox .brand-heading-container .brand-subtitle,
+#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-subtitle,
+#conversejs.converse-mobile #controlbox .brand-heading-container .brand-subtitle {
+    font-size: 90%;
+    padding: .5em
+}
+
+@media screen and (max-width:480px) {
+    #conversejs.converse-embedded #controlbox .brand-heading-container .brand-heading,
+    #conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-heading,
+    #conversejs.converse-mobile #controlbox .brand-heading-container .brand-heading {
+        font-size: 300%
+    }
+}
+
+#conversejs.converse-embedded #controlbox.logged-out,
+#conversejs.converse-fullscreen #controlbox.logged-out,
+#conversejs.converse-mobile #controlbox.logged-out {
+    flex: 0 0 100%;
+    max-width: 100%;
+    opacity: 0;
+    -webkit-animation-name: fadein;
+    animation-name: fadein;
+    -webkit-animation-fill-mode: forwards;
+    animation-fill-mode: forwards;
+    -webkit-animation-duration: .75s;
+    animation-duration: .75s;
+    -webkit-animation-timing-function: ease;
+    animation-timing-function: ease;
+    width: 100%
+}
+
+#conversejs.converse-embedded #controlbox.logged-out .box-flyout,
+#conversejs.converse-fullscreen #controlbox.logged-out .box-flyout,
+#conversejs.converse-mobile #controlbox.logged-out .box-flyout {
+    width: 100%
+}
+
+#conversejs.converse-embedded #controlbox .box-flyout,
+#conversejs.converse-fullscreen #controlbox .box-flyout,
+#conversejs.converse-mobile #controlbox .box-flyout {
+    border: 0;
+    width: 100%;
+    z-index: 1;
+    background-color: var(--controlbox-head-color)
+}
+
+#conversejs.converse-embedded #controlbox .box-flyout .controlbox-head,
+#conversejs.converse-fullscreen #controlbox .box-flyout .controlbox-head,
+#conversejs.converse-mobile #controlbox .box-flyout .controlbox-head {
+    display: none
+}
+
+#conversejs.converse-embedded #controlbox #converse-login,
+#conversejs.converse-embedded #controlbox #converse-register,
+#conversejs.converse-fullscreen #controlbox #converse-login,
+#conversejs.converse-fullscreen #controlbox #converse-register,
+#conversejs.converse-mobile #controlbox #converse-login,
+#conversejs.converse-mobile #controlbox #converse-register {
+    position: relative;
+    width: 100%;
+    padding-right: 15px;
+    padding-left: 15px;
+    flex: 0 0 66.66667%;
+    max-width: 66.66667%;
+    margin-left: 16.66667%
+}
+
+@media (min-width:576px) {
+    #conversejs.converse-embedded #controlbox #converse-login,
+    #conversejs.converse-embedded #controlbox #converse-register,
+    #conversejs.converse-fullscreen #controlbox #converse-login,
+    #conversejs.converse-fullscreen #controlbox #converse-register,
+    #conversejs.converse-mobile #controlbox #converse-login,
+    #conversejs.converse-mobile #controlbox #converse-register {
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%;
+        margin-left: 16.66667%
+    }
+}
+
+@media (min-width:768px) {
+    #conversejs.converse-embedded #controlbox #converse-login,
+    #conversejs.converse-embedded #controlbox #converse-register,
+    #conversejs.converse-fullscreen #controlbox #converse-login,
+    #conversejs.converse-fullscreen #controlbox #converse-register,
+    #conversejs.converse-mobile #controlbox #converse-login,
+    #conversejs.converse-mobile #controlbox #converse-register {
+        flex: 0 0 66.66667%;
+        max-width: 66.66667%;
+        margin-left: 16.66667%
+    }
+}
+
+@media (min-width:992px) {
+    #conversejs.converse-embedded #controlbox #converse-login,
+    #conversejs.converse-embedded #controlbox #converse-register,
+    #conversejs.converse-fullscreen #controlbox #converse-login,
+    #conversejs.converse-fullscreen #controlbox #converse-register,
+    #conversejs.converse-mobile #controlbox #converse-login,
+    #conversejs.converse-mobile #controlbox #converse-register {
+        flex: 0 0 50%;
+        max-width: 50%;
+        margin-left: 25%
+    }
+}
+
+#conversejs.converse-embedded #controlbox #converse-login .instructions,
+#conversejs.converse-embedded #controlbox #converse-login .title,
+#conversejs.converse-embedded #controlbox #converse-register .instructions,
+#conversejs.converse-embedded #controlbox #converse-register .title,
+#conversejs.converse-fullscreen #controlbox #converse-login .instructions,
+#conversejs.converse-fullscreen #controlbox #converse-login .title,
+#conversejs.converse-fullscreen #controlbox #converse-register .instructions,
+#conversejs.converse-fullscreen #controlbox #converse-register .title,
+#conversejs.converse-mobile #controlbox #converse-login .instructions,
+#conversejs.converse-mobile #controlbox #converse-login .title,
+#conversejs.converse-mobile #controlbox #converse-register .instructions,
+#conversejs.converse-mobile #controlbox #converse-register .title {
+    margin: 1em 0
+}
+
+#conversejs.converse-embedded #controlbox #converse-login input[type=button],
+#conversejs.converse-embedded #controlbox #converse-login input[type=submit],
+#conversejs.converse-embedded #controlbox #converse-register input[type=button],
+#conversejs.converse-embedded #controlbox #converse-register input[type=submit],
+#conversejs.converse-fullscreen #controlbox #converse-login input[type=button],
+#conversejs.converse-fullscreen #controlbox #converse-login input[type=submit],
+#conversejs.converse-fullscreen #controlbox #converse-register input[type=button],
+#conversejs.converse-fullscreen #controlbox #converse-register input[type=submit],
+#conversejs.converse-mobile #controlbox #converse-login input[type=button],
+#conversejs.converse-mobile #controlbox #converse-login input[type=submit],
+#conversejs.converse-mobile #controlbox #converse-register input[type=button],
+#conversejs.converse-mobile #controlbox #converse-register input[type=submit] {
+    width: auto
+}
+
+@media (max-width:767.98px) {
+    #conversejs {
+        left: 0;
+        right: 0;
+        padding-left: env(safe-area-inset-left);
+        padding-right: env(safe-area-inset-right)
+    }
+    #conversejs .converse-chatboxes {
+        margin: 0!important;
+        flex-direction: row!important;
+        justify-content: space-between
+    }
+    #conversejs .converse-chatboxes .converse-chatroom {
+        font-size: 14px
+    }
+    #conversejs .converse-chatboxes .chatbox .box-flyout {
+        margin-left: 15px;
+        left: 0;
+        bottom: 0;
+        border-radius: 0;
+        width: 100vw!important;
+        height: 100vh!important
+    }
+    #conversejs .converse-chatboxes #controlbox {
+        width: 100vw!important
+    }
+    #conversejs .converse-chatboxes #controlbox .box-flyout {
+        width: 100vw!important;
+        height: 100vh!important;
+        margin-right: -15px
+    }
+    #conversejs .converse-chatboxes #controlbox .sidebar {
+        display: block
+    }
+    #conversejs .converse-chatboxes.sidebar-open .chatbox:not(#controlbox) {
+        display: none
+    }
+    #conversejs .converse-chatboxes.sidebar-open #controlbox .controlbox-pane {
+        display: block
+    }
+}
+
+#conversejs.converse-fullscreen .controlbox-panes {
+    padding-top: 1em
+}
+
+#conversejs.converse-overlayed .brand-heading {
+    padding-top: .8rem;
+    padding-left: .8rem;
+    width: 100%
+}
+
+#conversejs.converse-overlayed .converse-svg-logo {
+    height: 1em
+}
+
+#conversejs.converse-overlayed #controlbox #converse-login-panel {
+    height: 100%
+}
+
+#conversejs.converse-overlayed #controlbox .controlbox-panes {
+    margin-top: .5em
+}
+
+#conversejs #converse-modals .modal {
+    background-color: rgba(0, 0, 0, .4)
+}
+
+#conversejs #converse-modals .modal .modal-body {
+    overflow-y: auto;
+    max-height: 75vh;
+    margin-bottom: 2em
+}
+
+#conversejs #converse-modals .modal .modal-body p {
+    padding: .25rem 0
+}
+
+#conversejs #converse-modals .modal .modal-body .confirm .form-group p:first-child {
+    font-size: 110%;
+    font-weight: 700
+}
+
+#conversejs #converse-modals .modal .modal-footer {
+    justify-content: flex-start
+}
+
+#conversejs #converse-modals .modal .roomid-policy-error {
+    color: var(--error-color);
+    font-size: var(--font-size-small);
+    float: right
+}
+
+#conversejs #converse-modals .scrollable-container {
+    max-height: 50vh;
+    overflow-y: auto
+}
+
+#conversejs #converse-modals .affiliation-form,
+#conversejs #converse-modals .role-form {
+    padding: 2em 0 1em 0
+}
+
+#conversejs #converse-modals .set-xmpp-status {
+    margin: 1em
+}
+
+#conversejs #converse-modals .set-xmpp-status .custom-control-label {
+    margin-top: .25em
+}
+
+#conversejs #converse-modals #omemo-tabpanel {
+    margin-top: 1em
+}
+
+#conversejs #converse-modals .btn {
+    font-weight: 400
+}
+
+#conversejs #converse-modals #user-profile-modal .profile-form label {
+    font-weight: 700
+}
+
+#conversejs #converse-modals #user-profile-modal .fingerprint-removal label {
+    display: flex;
+    padding: .75rem 1.25rem
+}
+
+#conversejs #converse-modals #user-profile-modal .list-group-item {
+    display: flex;
+    justify-content: left;
+    font-size: 95%
+}
+
+#conversejs #converse-modals #user-profile-modal .list-group-item input[type=checkbox] {
+    margin-right: 1em
+}
+
+#conversejs #converse-modals .fingerprints {
+    width: 100%;
+    margin-bottom: 1em
+}
+
+#conversejs #converse-modals .fingerprint-trust {
+    display: flex;
+    justify-content: space-between;
+    font-size: 95%
+}
+
+#conversejs #converse-modals .fingerprint-trust .fingerprint {
+    margin-left: 1em
+}
+
+#conversejs #converse-roster {
+    text-align: left;
+    width: 100%;
+    position: relative;
+    margin: 0;
+    height: var(--roster-height);
+    padding: 0;
+    overflow: hidden;
+    height: calc(100% - 70px)
+}
+
+#conversejs #converse-roster #online-count {
+    display: none
+}
+
+#conversejs #converse-roster .search-xmpp ul li.chat-info {
+    padding-left: 10px
+}
+
+#conversejs #converse-roster .roster-filter-form {
+    width: 100%
+}
+
+#conversejs #converse-roster .roster-filter-form .button-group {
+    padding: .2em
+}
+
+#conversejs #converse-roster .roster-filter-form span {
+    padding: .3em;
+    cursor: pointer;
+    min-width: 25px;
+    text-align: center
+}
+
+#conversejs #converse-roster .roster-filter-form .roster-filter {
+    width: 100%;
+    margin: .2em;
+    font-size: calc(var(--font-size) - 2px)
+}
+
+#conversejs #converse-roster .roster-filter-form .state-type {
+    font-size: calc(var(--font-size) - 2px);
+    width: 100%
+}
+
+#conversejs #converse-roster .roster-contacts {
+    padding: 0;
+    margin: 0 0 .2em 0;
+    height: 100%;
+    overflow-x: hidden;
+    overflow-y: auto
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group {
+    border: none;
+    color: var(--text-color);
+    font-weight: 400;
+    text-shadow: 0 1px 0 var(--text-shadow-color);
+    margin: .75em 0 .75em 0
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .group-toggle {
+    font-family: var(--heading-font);
+    display: block;
+    width: 100%;
+    padding-top: 0;
+    padding-bottom: .3rem
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .group-toggle,
+#conversejs #converse-roster .roster-contacts .roster-group .group-toggle .fa {
+    color: var(--chat-head-color-dark)!important
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .group-toggle .fa:hover,
+#conversejs #converse-roster .roster-contacts .roster-group .group-toggle:hover {
+    color: var(--chat-head-color-darker)!important
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact {
+    margin: .25em 0
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status {
+    vertical-align: middle;
+    font-size: .6em;
+    margin-right: 0;
+    margin-left: -.7em;
+    margin-bottom: -1.5em;
+    border-radius: 50%;
+    border: 2px solid var(--occupants-background-color)
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--offline {
+    margin-right: .8em
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--online {
+    color: var(--chat-status-online)
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--busy {
+    color: var(--chat-status-busy)
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--away {
+    color: var(--chat-status-away)
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--offline {
+    display: none
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .fa-times-circle,
+#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .far.fa-circle {
+    color: var(--subdued-color)
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li.requesting-xmpp-contact a {
+    line-height: var(--line-height)
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li.requesting-xmpp-contact .req-contact-name {
+    padding: 0 .2em 0 0
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .open-chat {
+    margin: 0;
+    padding: 0
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .open-chat.unread-msgs {
+    font-weight: 700
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .open-chat.unread-msgs .contact-name {
+    width: 70%
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .msgs-indicator {
+    color: #fff;
+    background-color: var(--chat-head-color);
+    opacity: 1;
+    border-radius: 10%;
+    padding: .2em;
+    font-size: var(--font-size-small)
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    padding: 0;
+    margin: 0;
+    max-width: 85%;
+    float: none;
+    height: 100%
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name.unread-msgs {
+    max-width: 60%
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name.contact-name--offline {
+    margin-left: .7em
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li.odd {
+    background-color: #dceac5
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li a,
+#conversejs #converse-roster .roster-contacts .roster-group li span {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .span {
+    display: inline-block
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li .decline-xmpp-request {
+    margin-left: 5px
+}
+
+#conversejs #converse-roster .roster-contacts .roster-group li:hover {
+    background-color: var(--controlbox-head-color-lighten-45-percent)
+}
+
+#conversejs #converse-roster span.pending-contact-name {
+    line-height: var(--line-height);
+    width: 100%
+}
+
+#conversejs .list-container {
+    text-align: left;
+    padding: .3em 0
+}
+
+#conversejs .list-container .list-toggle {
+    font-family: var(--heading-font);
+    font-weight: var(--list-toggle-font-weight);
+    display: block;
+    color: var(--list-toggle-color);
+    padding: 0 0 .5rem 0
+}
+
+#conversejs .list-container .list-toggle:hover {
+    color: var(--list-toggle-hover-color)
+}
+
+#conversejs .items-list {
+    text-align: left
+}
+
+#conversejs .items-list .list-item {
+    border: none;
+    clear: both;
+    color: var(--text-color);
+    overflow: hidden;
+    padding: .5em 0;
+    text-shadow: 0 1px 0 var(--text-shadow-color);
+    word-wrap: break-word;
+    height: 2.5em
+}
+
+#conversejs .items-list .list-item.unread-msgs {
+    font-weight: 700
+}
+
+#conversejs .items-list .list-item .list-item-link {
+    color: var(--list-item-link-color);
+    margin: auto;
+    font-size: var(--font-size);
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    vertical-align: baseline
+}
+
+#conversejs .items-list .list-item .list-item-link:hover {
+    color: var(--list-item-link-hover-color)
+}
+
+#conversejs .items-list .list-item .list-item-badge {
+    opacity: 1;
+    border-radius: 25%;
+    color: #fff;
+    font-size: var(--font-size-small);
+    line-height: var(--font-size-small)
+}
+
+#conversejs .items-list .list-item .list-item-action {
+    opacity: 0;
+    font-size: var(--font-size-tiny);
+    padding: .3em 0 0 0;
+    margin: 0 0 0 var(--inline-action-margin);
+    width: 2em;
+    height: 2em;
+    color: var(--subdued-color)
+}
+
+#conversejs .items-list .list-item .list-item-action:before {
+    font-size: var(--font-size)
+}
+
+#conversejs .items-list .list-item .list-item-action.button-on {
+    color: var(--list-item-link-color)
+}
+
+#conversejs .items-list .list-item .list-item-action.button-on:hover {
+    color: var(--list-item-link-hover-color)
+}
+
+#conversejs .items-list .list-item .list-item-action:hover {
+    color: var(--list-toggle-hover-color);
+    opacity: 1
+}
+
+#conversejs .items-list .list-item .list-item-action--visible {
+    opacity: 1!important
+}
+
+#conversejs .items-list .list-item.open {
+    background-color: var(--list-item-open-color)
+}
+
+#conversejs .items-list .list-item.open:hover {
+    background-color: var(--list-item-open-hover-color)!important
+}
+
+#conversejs .items-list .list-item.open a {
+    color: #fff
+}
+
+#conversejs .items-list .list-item.open .list-item-link:hover {
+    color: #fff
+}
+
+#conversejs .items-list .list-item.open .list-item-action {
+    color: var(--list-item-action-color)
+}
+
+#conversejs .items-list .list-item.open .list-item-action:hover {
+    color: #fff
+}
+
+#conversejs .items-list .list-item:hover {
+    background-color: var(--controlbox-head-color-lighten-45-percent)
+}
+
+#conversejs .items-list .list-item:hover .fa,
+#conversejs .items-list .list-item:hover .far,
+#conversejs .items-list .list-item:hover .fas {
+    opacity: 1
+}
+
+#conversejs .badge-room-color,
+#conversejs.converse-embedded .badge-room-color {
+    background-color: var(--chatroom-head-color)
+}
+
+#conversejs .add-chatroom input[type=button],
+#conversejs .add-chatroom input[type=submit],
+#conversejs.converse-embedded .add-chatroom input[type=button],
+#conversejs.converse-embedded .add-chatroom input[type=submit] {
+    margin: .3em 0
+}
+
+#conversejs #room-details-modal .features-list,
+#conversejs.converse-embedded #room-details-modal .features-list {
+    margin-left: 1em
+}
+
+#conversejs .chatroom-features,
+#conversejs.converse-embedded .chatroom-features {
+    width: 100%
+}
+
+#conversejs .chatroom-features .features-list,
+#conversejs.converse-embedded .chatroom-features .features-list {
+    padding-top: 0
+}
+
+#conversejs .chatroom-features .features-list .feature,
+#conversejs.converse-embedded .chatroom-features .features-list .feature {
+    width: 100%;
+    margin-right: .5em;
+    padding-right: 0;
+    font-size: 1em;
+    cursor: help
+}
+
+#conversejs .chatroom-features .features-list .feature .fa,
+#conversejs.converse-embedded .chatroom-features .features-list .feature .fa {
+    margin-right: .5em;
+    color: var(--text-color)
+}
+
+#conversejs .chat-head-chatroom,
+#conversejs.converse-embedded .chat-head-chatroom {
+    background-color: var(--chatroom-head-color);
+    border-bottom: var(--chatroom-head-border-bottom)
+}
+
+#conversejs .chat-head-chatroom .chat-head__desc,
+#conversejs.converse-embedded .chat-head-chatroom .chat-head__desc {
+    color: var(--chatroom-head-description-color);
+    display: var(--chatroom-head-description-display);
+    font-size: 70%;
+    margin-top: 3px;
+    border-left: var(--chatroom-head-description-border-left);
+    padding-left: var(--chatroom-head-description-padding-left)
+}
+
+#conversejs .chat-head-chatroom .chat-head__desc a,
+#conversejs.converse-embedded .chat-head-chatroom .chat-head__desc a {
+    color: var(--chatroom-head-description-link-color)
+}
+
+#conversejs .chat-head-chatroom a.chatbox-btn.fa,
+#conversejs .chat-head-chatroom a:hover.chatbox-btn.fa,
+#conversejs .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa,
+#conversejs .chat-head-chatroom a:visited.chatbox-btn.fa,
+#conversejs.converse-embedded .chat-head-chatroom a.chatbox-btn.fa,
+#conversejs.converse-embedded .chat-head-chatroom a:hover.chatbox-btn.fa,
+#conversejs.converse-embedded .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa,
+#conversejs.converse-embedded .chat-head-chatroom a:visited.chatbox-btn.fa {
+    color: var(--chat-head-text-color)
+}
+
+#conversejs .chat-head-chatroom a.chatbox-btn.fa.button-on:before,
+#conversejs .chat-head-chatroom a:hover.chatbox-btn.fa.button-on:before,
+#conversejs .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,
+#conversejs .chat-head-chatroom a:visited.chatbox-btn.fa.button-on:before,
+#conversejs.converse-embedded .chat-head-chatroom a.chatbox-btn.fa.button-on:before,
+#conversejs.converse-embedded .chat-head-chatroom a:hover.chatbox-btn.fa.button-on:before,
+#conversejs.converse-embedded .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,
+#conversejs.converse-embedded .chat-head-chatroom a:visited.chatbox-btn.fa.button-on:before {
+    color: var(--chatroom-head-button-color)
+}
+
+#conversejs .chat-head-chatroom .chatbox-btn.button-on:before,
+#conversejs.converse-embedded .chat-head-chatroom .chatbox-btn.button-on:before {
+    color: var(--chatroom-head-button-color)
+}
+
+#conversejs .chat-head-chatroom .chatbox-title__text,
+#conversejs.converse-embedded .chat-head-chatroom .chatbox-title__text {
+    display: var(--heading-display);
+    font-weight: var(--chatroom-head-title-font-weight);
+    padding-right: var(--chatroom-head-title-padding-right)
+}
+
+#conversejs .chat-head-chatroom .chatbox-title__text .chatroom-jid,
+#conversejs.converse-embedded .chat-head-chatroom .chatbox-title__text .chatroom-jid {
+    font-size: var(--font-size-small)
+}
+
+#conversejs .chatroom,
+#conversejs.converse-embedded .chatroom {
+    width: var(--chatroom-width)
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .chatroom,
+    #conversejs.converse-embedded .chatroom {
+        width: var(--mobile-chat-width)
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .chatroom,
+    #conversejs.converse-embedded .chatroom {
+        width: var(--mobile-chat-width)
+    }
+}
+
+#conversejs .chatroom .box-flyout,
+#conversejs.converse-embedded .chatroom .box-flyout {
+    overflow-y: hidden;
+    background-color: var(--chatroom-head-color);
+    width: 100%
+}
+
+@media screen and (max-height:450px) {
+    #conversejs .chatroom .box-flyout,
+    #conversejs.converse-embedded .chatroom .box-flyout {
+        height: var(--mobile-chat-height);
+        width: var(--mobile-chat-width);
+        height: 100vh
+    }
+}
+
+@media screen and (max-width:480px) {
+    #conversejs .chatroom .box-flyout,
+    #conversejs.converse-embedded .chatroom .box-flyout {
+        height: var(--mobile-chat-height);
+        width: var(--mobile-chat-width);
+        height: 100vh
+    }
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body {
+    flex-direction: row;
+    flex-flow: nowrap;
+    border-bottom-radius: var(--chatbox-border-radius);
+    background-color: #fff;
+    border-top: 0;
+    width: 100%;
+    overflow: hidden
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .row,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .row {
+    flex-direction: row
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chat-topic,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-topic {
+    display: var(--chat-topic-display);
+    font-weight: 700;
+    color: var(--chatroom-head-color)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chat-info,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info {
+    display: var(--chat-info-display);
+    color: var(--chatroom-head-color);
+    line-height: normal
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chat-info.badge,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info.badge {
+    color: var(--chat-head-text-color)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chat-info.chat-msg--retracted,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info.chat-msg--retracted {
+    color: var(--subdued-color)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .disconnect-container,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .disconnect-container {
+    margin: 1em;
+    width: 100%
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .disconnect-container h3.disconnect-msg,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .disconnect-container h3.disconnect-msg {
+    padding-bottom: 1em
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chat-area,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area {
+    display: flex;
+    flex-direction: column;
+    flex: 0 1 100%;
+    justify-content: flex-end;
+    min-width: 25%;
+    word-wrap: break-word
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chat-area .new-msgs-indicator,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .new-msgs-indicator {
+    background-color: var(--chatroom-head-color)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chat-area .chat-content,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .chat-content {
+    height: 100%
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    overflow-x: hidden;
+    overflow-y: hidden;
+    vertical-align: top;
+    background-color: var(--occupants-background-color);
+    border-left: var(--occupants-border-left);
+    border-bottom-right-radius: var(--chatbox-border-radius);
+    padding: .5em;
+    max-width: 75%;
+    min-width: 20%;
+    flex: 0 0 25%
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header {
+    display: flex;
+    flex-direction: column
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants {
+    align-self: flex-end;
+    cursor: pointer
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-heading {
+    font-family: var(--heading-font);
+    margin-bottom: .5em;
+    padding-left: 0
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants .chatroom-features,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .chatroom-features {
+    display: var(--occupants-features-display)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul {
+    padding: 0
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul li,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul li {
+    padding: .5em
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul {
+    padding: 0;
+    margin-bottom: .5em;
+    overflow-x: hidden;
+    overflow-y: auto;
+    list-style: none
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list {
+    overflow-y: auto;
+    flex-basis: 0;
+    flex-grow: 1;
+    border-bottom: var(--occupants-border-bottom)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li {
+    cursor: default;
+    display: block;
+    font-size: var(--font-size-small);
+    overflow: hidden;
+    padding: .25em .25em .25em 0;
+    text-overflow: ellipsis
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li .fa,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li .fa {
+    margin-right: .5em
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.feature,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.feature {
+    font-size: var(--font-size-tiny)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant {
+    cursor: pointer
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge {
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges {
+    display: flex;
+    justify-content: flex-end;
+    flex-wrap: wrap;
+    flex-direction: row
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges span,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges span {
+    margin-right: .25rem
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant div.row.no-gutters,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant div.row.no-gutters {
+    flex-wrap: nowrap;
+    min-height: 1.5em
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .badge,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .badge {
+    margin-bottom: .125rem
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status {
+    display: inline-block;
+    margin: 0 .5em .125em 0;
+    width: .5em;
+    height: .5em
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-chat,
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-online,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-chat,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-online {
+    background-color: #1a9707
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-dnd,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-dnd {
+    background-color: red
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-away,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-away {
+    background-color: #ff8c00
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-xa,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-xa {
+    background-color: orange
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-offline,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-offline {
+    background-color: #a9a9a9
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container {
+    background-color: #fff;
+    border-bottom-left-radius: var(--chatbox-border-radius);
+    border-bottom-right-radius: var(--chatbox-border-radius);
+    border: 0;
+    color: var(--text-color);
+    font-size: var(--font-size);
+    height: 100%;
+    width: 100%;
+    overflow-y: auto
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container .validation-message,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container .validation-message {
+    font-size: 90%;
+    color: var(--error-color)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=button],
+#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=submit],
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=button],
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=submit] {
+    margin: 0 .5em
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container .button-primary,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container .button-primary {
+    background-color: var(--chatroom-head-button-color)
+}
+
+#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form,
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    padding: 2em
+}
+
+#conversejs .chatroom .empty-history-feedback,
+#conversejs.converse-embedded .chatroom .empty-history-feedback {
+    position: relative;
+    height: 100%;
+    color: var(--text-color-lighten-15-percent)
+}
+
+#conversejs .chatroom .empty-history-feedback span,
+#conversejs.converse-embedded .chatroom .empty-history-feedback span {
+    width: 100%;
+    text-align: center;
+    position: absolute;
+    margin-top: 50%
+}
+
+#conversejs .chatroom .muc-bottom-panel,
+#conversejs.converse-embedded .chatroom .muc-bottom-panel {
+    border-top: var(--message-input-border-top);
+    height: 3em;
+    padding: .5em;
+    text-align: center;
+    font-size: var(--font-size-small);
+    background-color: var(--chatroom-head-color);
+    color: #fff
+}
+
+#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname,
+#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname {
+    padding: 0;
+    height: 16em
+}
+
+#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container,
+#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container {
+    border-radius: 0!important
+}
+
+#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container .chatroom-form,
+#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container .chatroom-form {
+    padding-top: 2em;
+    padding-bottom: 0
+}
+
+#conversejs .chatroom .sendXMPPMessage .suggestion-box__results--above,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .suggestion-box__results--above {
+    bottom: 4.5em
+}
+
+#conversejs .chatroom .sendXMPPMessage .chat-toolbar,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar {
+    background-color: #fff;
+    border-top: var(--message-input-border-top);
+    color: var(--message-input-color)
+}
+
+#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fa,
+#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fa:hover,
+#conversejs .chatroom .sendXMPPMessage .chat-toolbar .far,
+#conversejs .chatroom .sendXMPPMessage .chat-toolbar .far:hover,
+#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fas,
+#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fas:hover,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fa,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fa:hover,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .far,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .far:hover,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fas,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fas:hover {
+    color: var(--message-input-color)
+}
+
+#conversejs .chatroom .sendXMPPMessage .chat-textarea,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea {
+    border-bottom-right-radius: 0
+}
+
+#conversejs .chatroom .sendXMPPMessage .chat-textarea:active,
+#conversejs .chatroom .sendXMPPMessage .chat-textarea:focus,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea:active,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea:focus {
+    outline-color: var(--chatroom-head-color)
+}
+
+#conversejs .chatroom .sendXMPPMessage .chat-textarea.correcting,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea.correcting {
+    background-color: var(--chatroom-correcting-color)
+}
+
+#conversejs .chatroom .sendXMPPMessage .send-button,
+#conversejs.converse-embedded .chatroom .sendXMPPMessage .send-button {
+    background-color: var(--message-input-color)
+}
+
+#conversejs .chatroom .room-invite .invited-contact,
+#conversejs.converse-embedded .chatroom .room-invite .invited-contact {
+    margin: -1px 0 0 -1px;
+    width: 100%;
+    border: 1px solid #999
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom {
+    min-width: var(--chatroom-width)!important;
+    width: var(--chatroom-width)
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chat-head {
+    padding-bottom: 1em
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatroom-features {
+    display: none!important
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .box-flyout {
+    min-width: var(--chatroom-width)!important;
+    width: var(--chatroom-width)
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatbox-title__text {
+    flex: 0 0 58.33333%;
+    max-width: 58.33333%
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatbox-title__buttons {
+    flex: 0 0 41.66667%;
+    max-width: 41.66667%
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chat-head__desc {
+    font-size: 80%
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .occupants-heading {
+    padding: 0
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .occupant-list {
+    border-bottom: none
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .chatroom-features .feature {
+    font-size: var(--font-size-tiny)
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants ul .occupant .occupant-nick-badge .occupant-badges {
+    display: none
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants ul .occupant .occupant-status {
+    margin-top: 6px
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .chat-area {
+    min-width: var(--overlayed-chat-width)
+}
+
+#conversejs.converse-overlayed .chatbox.chatroom .sendXMPPMessage .chat-toolbar li .toolbar-menu {
+    min-width: 280px
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout,
+#conversejs.converse-fullscreen .chatroom .box-flyout,
+#conversejs.converse-mobile .chatroom .box-flyout {
+    background-color: var(--chatroom-head-color);
+    border: var(--flyout-padding) solid var(--chatroom-head-color);
+    border-top: .8em solid var(--chatroom-head-color);
+    width: 100%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chat-head__desc,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chat-head__desc,
+#conversejs.converse-mobile .chatroom .box-flyout .chat-head__desc {
+    font-size: 70%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body {
+    border-top-radius: var(--chatbox-border-radius)
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chatroom-form-container,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chatroom-form-container {
+    border-radius: var(--chatbox-border-radius)
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area {
+    border-top-left-radius: var(--chatbox-border-radius)
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .chat-content,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area .chat-content,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area .chat-content {
+    border-top-left-radius: var(--chatbox-border-radius)
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator {
+    max-width: 100%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants {
+    border-top-right-radius: var(--chatbox-border-radius);
+    padding: var(--occupants-padding)
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants .occupants-heading {
+    font-size: var(--font-size-large)
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li,
+#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li,
+#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li {
+    font-size: var(--font-size-small)
+}
+
+#conversejs.converse-embedded .chatroom .room-invite span .invited-contact,
+#conversejs.converse-fullscreen .chatroom .room-invite span .invited-contact,
+#conversejs.converse-mobile .chatroom .room-invite span .invited-contact {
+    margin: 0 0 .5em -1px
+}
+
+#conversejs.converse-embedded .chatroom {
+    margin: 0;
+    width: 100%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .occupants-heading {
+    font-size: 120%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chat-content .chat-message {
+    margin: .5em;
+    font-size: 120%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .sendXMPPMessage .chat-textarea {
+    padding: .5em;
+    font-size: 110%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body {
+    height: 100%
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container {
+    height: 100%;
+    position: relative
+}
+
+#conversejs.converse-embedded .chatroom .box-flyout .occupants .occupant-list {
+    padding-left: .3em
+}
+
+#conversejs .chat-head-headline {
+    background-color: var(--headline-head-color)
+}
+
+#conversejs .chatbox.headlines .chat-head.chat-head-chatbox {
+    background-color: var(--headline-head-color)
+}
+
+#conversejs .chatbox.headlines .chat-body {
+    background-color: var(--headline-head-color);
+    border-radius: var(--chatbox-border-radius)
+}
+
+#conversejs .chatbox.headlines .chat-body .chat-message {
+    color: var(--headline-message-color)
+}
+
+#conversejs .chatbox.headlines .chat-content {
+    height: 100%
+}
+
+#conversejs.converse-fullscreen .chatbox.headlines .box-flyout {
+    background-color: var(--headline-head-color)
+}
+
+#conversejs.converse-fullscreen .chatbox.headlines .chat-head.chat-head-chatbox {
+    background-color: var(--headline-head-color)
+}
+
+#conversejs.converse-fullscreen .chatbox.headlines .flyout {
+    border: var(--flyout-padding) solid var(--headline-head-color);
+    border-top: .8em solid var(--headline-head-color)
+}
+
+#conversejs .older-msg time {
+    font-weight: 700
+}
+
+#conversejs .message .mention {
+    font-weight: 700
+}
+
+#conversejs .message .mention--self {
+    font-weight: 400
+}
+
+#conversejs .message.date-separator {
+    height: 2em;
+    margin: 0;
+    position: relative;
+    text-align: center;
+    z-index: 0
+}
+
+#conversejs .message.date-separator .separator {
+    border-top: 0;
+    border-bottom: var(--chat-separator-border-bottom);
+    margin: 0 1em;
+    position: relative;
+    top: 1em;
+    z-index: 5
+}
+
+#conversejs .message.date-separator .separator-text {
+    background: #fff;
+    bottom: 1px;
+    color: var(--separator-text-color);
+    display: inline-block;
+    line-height: 2em;
+    padding: 0 1em;
+    position: relative;
+    z-index: 5
+}
+
+#conversejs .message.chat-msg--retracted .chat-msg__message {
+    color: var(--subdued-color)
+}
+
+#conversejs .message.chat-info {
+    color: var(--chat-head-color);
+    font-size: var(--message-font-size);
+    line-height: var(--line-height-small);
+    font-size: 90%;
+    padding: .17rem 1rem
+}
+
+#conversejs .message.chat-info.badge {
+    color: var(--chat-head-text-color)
+}
+
+#conversejs .message.chat-info.chat-state-notification {
+    font-style: italic
+}
+
+#conversejs .message.chat-info.chat-event {
+    clear: left;
+    font-style: italic
+}
+
+#conversejs .message.chat-info.chat-error {
+    color: var(--error-color);
+    font-weight: 700
+}
+
+#conversejs .message.chat-info .q {
+    font-style: italic
+}
+
+#conversejs .message .chat-image {
+    height: auto;
+    width: auto;
+    max-height: 15em;
+    max-width: 100%
+}
+
+#conversejs .message.chat-msg--action {
+    font-style: italic
+}
+
+#conversejs .message.chat-msg--action .chat-msg__author {
+    padding-right: .2em
+}
+
+#conversejs .message.chat-msg {
+    display: inline-flex;
+    width: 100%;
+    flex-direction: row;
+    overflow: auto;
+    padding: .125rem 1rem
+}
+
+#conversejs .message.chat-msg.onload {
+    animation: colorchange-chatmessage 1s;
+    -webkit-animation: colorchange-chatmessage 1s
+}
+
+#conversejs .message.chat-msg:hover {
+    background-color: rgba(0, 0, 0, .035)
+}
+
+#conversejs .message.chat-msg:hover .chat-msg__actions .chat-msg__action {
+    opacity: 1
+}
+
+#conversejs .message.chat-msg.correcting.groupchat {
+    background-color: var(--chatroom-correcting-color)
+}
+
+#conversejs .message.chat-msg.correcting:not(.groupchat) {
+    background-color: var(--chat-correcting-color)
+}
+
+#conversejs .message.chat-msg .spoiler {
+    margin-top: .5em
+}
+
+#conversejs .message.chat-msg .spoiler-hint {
+    margin-bottom: .5em
+}
+
+#conversejs .message.chat-msg .spoiler-toggle {
+    color: #fff
+}
+
+#conversejs .message.chat-msg .spoiler-toggle i {
+    color: #fff;
+    padding-right: .5em
+}
+
+#conversejs .message.chat-msg .spoiler-toggle:before {
+    padding-right: .25em;
+    whitespace: nowrap
+}
+
+#conversejs .message.chat-msg .chat-msg__content {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    align-items: stretch;
+    margin-left: .5rem;
+    width: calc(100% - var(--message-avatar-width))
+}
+
+#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat .chat-msg__text {
+    color: var(--subdued-color)
+}
+
+#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat.chat-msg__body--delayed .chat-msg__text,
+#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat.chat-msg__body--received .chat-msg__text {
+    color: var(--message-text-color)
+}
+
+#conversejs .message.chat-msg .chat-msg__content--action {
+    width: 100%;
+    margin-left: 0
+}
+
+#conversejs .message.chat-msg .chat-msg__body {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between
+}
+
+#conversejs .message.chat-msg .chat-msg__message {
+    display: inline-flex;
+    flex-direction: column;
+    width: 100%;
+    overflow-wrap: break-word
+}
+
+#conversejs .message.chat-msg .chat-msg__edit-modal {
+    cursor: pointer;
+    padding-right: .5em
+}
+
+#conversejs .message.chat-msg.headline .chat-msg__body {
+    margin-left: 0
+}
+
+#conversejs .message.chat-msg .chat-msg__subject {
+    font-weight: 700;
+    clear: right
+}
+
+#conversejs .message.chat-msg .chat-msg__text {
+    color: var(--message-text-color);
+    padding: 0;
+    width: 100%;
+    white-space: pre-wrap;
+    word-wrap: break-word;
+    word-break: break-word
+}
+
+#conversejs .message.chat-msg .chat-msg__text a {
+    word-wrap: break-word;
+    word-break: break-all;
+    display: inline-block
+}
+
+#conversejs .message.chat-msg .chat-msg__text img.emoji {
+    height: 1.5em;
+    width: 1.5em;
+    margin: 0 .05em 0 .1em;
+    vertical-align: -.1em
+}
+
+#conversejs .message.chat-msg .chat-msg__text .emojione {
+    margin-bottom: -6px
+}
+
+#conversejs .message.chat-msg .chat-msg__text--larger {
+    font-size: 1.6em;
+    padding-top: .25em;
+    padding-bottom: .25em
+}
+
+#conversejs .message.chat-msg .chat-msg__media {
+    margin-top: .25rem;
+    word-break: break-all
+}
+
+#conversejs .message.chat-msg .chat-msg__media a {
+    word-wrap: break-word
+}
+
+#conversejs .message.chat-msg .chat-msg__media audio {
+    width: 100%
+}
+
+#conversejs .message.chat-msg .chat-msg__actions {
+    display: flex;
+    flex-wrap: nowrap
+}
+
+#conversejs .message.chat-msg .chat-msg__actions .chat-msg__action {
+    height: var(--message-font-size);
+    font-size: var(--message-font-size);
+    padding: 0;
+    padding-left: .75em;
+    border: none;
+    opacity: 0;
+    background: 0 0;
+    cursor: pointer
+}
+
+#conversejs .message.chat-msg .chat-msg__actions .chat-msg__action:focus {
+    display: block
+}
+
+#conversejs .message.chat-msg .chat-msg__avatar {
+    margin-top: .5em;
+    vertical-align: middle;
+    height: var(--message-avatar-height);
+    width: var(--message-avatar-width);
+    min-height: var(--message-avatar-height);
+    min-width: var(--message-avatar-width)
+}
+
+#conversejs .message.chat-msg .chat-msg__heading {
+    width: 100%;
+    margin-top: .5em;
+    padding-right: .25rem;
+    padding-bottom: .25rem;
+    display: flex
+}
+
+#conversejs .message.chat-msg .chat-msg__heading .chat-msg__author {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-family: var(--heading-font);
+    font-size: 115%;
+    font-weight: 700;
+    padding-bottom: 1px
+}
+
+#conversejs .message.chat-msg .chat-msg__heading .badge {
+    margin-left: .5em;
+    font-family: var(--normal_font)
+}
+
+#conversejs .message.chat-msg .chat-msg__heading .chat-msg__time {
+    padding-left: .25em;
+    padding-right: .25em;
+    color: var(--text-color-lighten-15-percent)
+}
+
+#conversejs .message.chat-msg.chat-msg--action .chat-msg__content {
+    flex-wrap: wrap;
+    flex-direction: row;
+    justify-content: flex-start
+}
+
+#conversejs .message.chat-msg.chat-msg--action .chat-msg__text {
+    width: auto
+}
+
+#conversejs .message.chat-msg.chat-msg--action .chat-msg__heading {
+    margin-top: 0;
+    padding-bottom: 0;
+    width: auto
+}
+
+#conversejs .message.chat-msg.chat-msg--action .chat-msg__heading .fa {
+    margin-left: .5em
+}
+
+#conversejs .message.chat-msg.chat-msg--action .chat-msg__author {
+    font-size: var(--message-font-size)
+}
+
+#conversejs .message.chat-msg.chat-msg--action .chat-msg__time {
+    margin-left: 0
+}
+
+#conversejs .message.chat-msg.chat-msg--followup .chat-msg__avatar,
+#conversejs .message.chat-msg.chat-msg--followup .chat-msg__heading {
+    display: none
+}
+
+#conversejs .message.chat-msg.chat-msg--followup .chat-msg__content {
+    margin-left: 2.75rem;
+    width: 100%
+}
+
+#conversejs .message.chat-msg .chat-msg__receipt {
+    margin-right: .5em;
+    color: var(--message-receipt-color)
+}
+
+#conversejs .chatroom-body .message.onload {
+    animation: colorchange-chatmessage-muc 1s;
+    -webkit-animation: colorchange-chatmessage-muc 1s
+}
+
+#conversejs .chatroom-body .message .separator {
+    border-top: 0;
+    border-bottom: var(--chatroom-separator-border-bottom)
+}
+
+#conversejs.converse-overlayed .message.chat-msg.chat-msg--followup .chat-msg__content {
+    margin-left: 0
+}
+
+@media screen and (max-width:767px) {
+    #conversejs:not(.converse-embedded) .message.chat-msg .chat-msg__author {
+        white-space: normal
+    }
+}
+
+#conversejs.converse-overlayed #minimized-chats {
+    order: 100;
+    width: var(--minimized-chats-width);
+    margin-bottom: 0;
+    border-top-left-radius: var(--chatbox-border-radius);
+    border-top-right-radius: var(--chatbox-border-radius);
+    color: var(--inverse-link-color);
+    margin-right: var(--chat-gutter);
+    padding: 0
+}
+
+#conversejs.converse-overlayed #minimized-chats .badge {
+    bottom: 8px;
+    border: 1px solid var(--overlayed-badge-color)
+}
+
+#conversejs.converse-overlayed #minimized-chats #toggle-minimized-chats {
+    border-top-left-radius: var(--chatbox-border-radius);
+    border-top-right-radius: var(--chatbox-border-radius);
+    background-color: var(--link-color);
+    padding: 1em 0 0 0;
+    text-align: center;
+    color: #fff;
+    white-space: nowrap;
+    overflow-y: hidden;
+    text-overflow: ellipsis;
+    display: block;
+    height: 45px;
+    width: 9em
+}
+
+#conversejs.converse-overlayed #minimized-chats a.restore-chat {
+    cursor: pointer;
+    padding: 1px 0 1px 5px;
+    color: var(--chat-head-text-color);
+    line-height: 15px;
+    display: block;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap
+}
+
+#conversejs.converse-overlayed #minimized-chats a.restore-chat:hover {
+    text-decoration: none
+}
+
+#conversejs.converse-overlayed #minimized-chats a.restore-chat:visited {
+    color: var(--chat-head-text-color)
+}
+
+#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout {
+    flex-direction: column-reverse;
+    bottom: 42px;
+    width: var(--minimized-chats-width)
+}
+
+#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout .chat-head {
+    padding: .3em;
+    border-radius: var(--chatbox-border-radius);
+    height: 35px;
+    margin-bottom: .2em;
+    box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, .4);
+    width: 100%;
+    max-width: 9em
+}
+
+#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout.minimized {
+    height: auto
+}
+
+#conversejs.converse-overlayed #minimized-chats .unread-message-count {
+    font-weight: 700;
+    background-color: #fff;
+    border: 1px solid;
+    text-shadow: 1px 1px 0 var(--text-shadow-color);
+    color: var(--warning-color);
+    border-radius: 5px;
+    padding: 2px 4px;
+    font-size: 16px;
+    text-align: center;
+    position: absolute;
+    right: 116px;
+    bottom: 10px
+}
+
+#conversejs.converse-overlayed #minimized-chats .chat-head-message-count-hidden,
+#conversejs.converse-overlayed #minimized-chats .unread-message-count-hidden {
+    display: none
+}
+
+#conversejs #controlbox .bookmarks-toggle,
+#conversejs #controlbox .bookmarks-toggle .fa {
+    color: var(--chatroom-head-color)!important
+}
+
+#conversejs #controlbox .bookmarks-toggle .fa:hover,
+#conversejs #controlbox .bookmarks-toggle:hover {
+    color: var(--chatroom-head-color-dark)!important
+}
+
+#conversejs.fullscreen #controlbox #chatrooms .bookmarks-list dl.rooms-list.bookmarks dd.available-chatroom a.open-room {
+    width: 80%
+}
+
+#conversejs [hidden] {
+    display: none
+}
+
+#conversejs .visually-hidden {
+    position: absolute;
+    clip: rect(0, 0, 0, 0)
+}
+
+#conversejs .form-group .suggestion-box {
+    width: 100%
+}
+
+#conversejs .suggestion-box {
+    position: relative
+}
+
+#conversejs .suggestion-box mark {
+    background: var(--completion-light-color)
+}
+
+#conversejs .suggestion-box>input {
+    display: block
+}
+
+#conversejs .suggestion-box .suggestion-box__results,
+#conversejs .suggestion-box>ul {
+    position: absolute;
+    left: 0;
+    right: 0;
+    z-index: 2;
+    min-width: 100%;
+    box-sizing: border-box;
+    list-style: none;
+    padding: 0;
+    border-radius: .3em;
+    margin: .2em 0 0;
+    background: rgba(255, 255, 255, .9);
+    background: linear-gradient(to bottom right, #fff, rgba(255, 255, 255, .9));
+    border: 1px solid rgba(0, 0, 0, .3);
+    box-shadow: .05em .2em .6em rgba(0, 0, 0, .1);
+    text-shadow: none
+}
+
+#conversejs .suggestion-box .suggestion-box__results:before,
+#conversejs .suggestion-box>ul:before {
+    content: "";
+    position: absolute;
+    top: -.43em;
+    left: 1em;
+    width: 0;
+    height: 0;
+    padding: .4em;
+    background: #fff;
+    border: inherit;
+    border-right: 0;
+    border-bottom: 0;
+    transform: rotate(45deg);
+    z-index: -1
+}
+
+#conversejs .suggestion-box .suggestion-box__results>li,
+#conversejs .suggestion-box>ul>li {
+    text-overflow: ellipsis;
+    overflow-x: hidden;
+    position: relative;
+    cursor: pointer;
+    padding: 1em
+}
+
+#conversejs .suggestion-box .suggestion-box__results--below {
+    top: 2em
+}
+
+#conversejs .suggestion-box .suggestion-box__results--above {
+    bottom: 4.5em
+}
+
+#conversejs .suggestion-box .suggestion-box__results--above:before {
+    display: none
+}
+
+#conversejs .suggestion-box .suggestion-box__results--above:after {
+    z-index: -1;
+    content: "";
+    position: absolute;
+    bottom: -.43em;
+    left: 1em;
+    width: 0;
+    height: 0;
+    padding: .4em;
+    background: #fff;
+    border: inherit;
+    border-left: 0;
+    border-top: 0;
+    transform: rotate(45deg)
+}
+
+#conversejs .suggestion-box>ul:empty,
+#conversejs .suggestion-box>ul[hidden] {
+    display: none
+}
+
+@supports (transform:scale(0)) {
+    #conversejs .suggestion-box>ul {
+        transition: .3s cubic-bezier(.4, .2, .5, 1.4);
+        transform-origin: 1.43em -.43em
+    }
+    #conversejs .suggestion-box>ul:empty,
+    #conversejs .suggestion-box>ul[hidden] {
+        opacity: 0;
+        transform: scale(0);
+        display: block;
+        transition-timing-function: ease
+    }
+}
+
+#conversejs .suggestion-box>ul>li[aria-selected=true] {
+    background: var(--completion-dark-color);
+    color: var(--inverse-link-color)
+}
+
+#conversejs .suggestion-box li:hover mark {
+    background: var(--completion-light-color);
+    color: var(--inverse-link-color)
+}
+
+#conversejs .suggestion-box li[aria-selected=true] mark {
+    background: var(--completion-normal-color);
+    color: inherit
+}
+
+#conversejs.converse-fullscreen .suggestion-box__results--above {
+    bottom: 4.5em
+}
+
+#conversejs.converse-overlayed .suggestion-box__results--above {
+    bottom: 3.5em
+}
+
+#conversejs .chatbox img.emoji {
+    height: 1.2em;
+    width: 1.2em;
+    margin: 0 .05em 0 .1em;
+    vertical-align: -.1em
+}
+
+#conversejs .chatbox .sendXMPPMessage .toggle-smiley a.toggle-smiley {
+    padding: 0
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu {
+    width: 100%;
+    padding-top: 0;
+    padding-bottom: 0;
+    background-color: var(--chat-head-color);
+    overflow-y: hidden;
+    background: #fff
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists {
+    height: 8em;
+    overflow-y: auto;
+    display: flex;
+    flex-direction: column
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists .emoji-category__heading {
+    cursor: auto;
+    color: var(--subdued-color);
+    font-size: var(--font-size);
+    margin: 0;
+    padding: .75em 0 0 .5em
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists .emoji-picker li {
+    float: left
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker {
+    display: flex;
+    padding: .5em 0;
+    background-color: var(--chat-head-color);
+    width: auto;
+    font-size: var(--font-size)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker label {
+    margin: 0;
+    padding: 0 .5em;
+    white-space: nowrap;
+    font-size: var(--font-size-small);
+    color: var(--heading-color)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker ul {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker ul li {
+    padding: 0 .25em
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker {
+    background-color: #fff;
+    padding: .5em 0 0 .5em
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker:last-child {
+    padding-bottom: .5em
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li {
+    margin-left: 0;
+    cursor: pointer;
+    list-style: none;
+    position: relative
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji {
+    margin: 0;
+    height: 30px;
+    width: 32px
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji.selected a {
+    background-color: var(--highlight-color)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji a {
+    padding: 3px;
+    font-size: var(--font-size-huge)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji a:hover {
+    background-color: var(--highlight-color)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header {
+    display: flex;
+    flex-direction: column;
+    padding-top: .5em;
+    background-color: var(--chat-head-color)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header .emoji-search {
+    width: auto;
+    margin: .25em;
+    height: 2em;
+    font-size: var(--font-size-small)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category {
+    padding: .25em 0;
+    font-size: var(--font-size-huge)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.picked {
+    background-color: #fff;
+    border: 1px var(--chat-head-color) solid;
+    border-bottom: none
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.selected a,
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category:hover a {
+    background-color: var(--highlight-color)
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category a {
+    padding: .25em
+}
+
+#conversejs .chatroom .emoji-picker.toolbar-menu {
+    background-color: var(--chatroom-head-color);
+    background: #fff
+}
+
+#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-skintone-picker {
+    background-color: var(--chatroom-head-color)
+}
+
+#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-picker__header {
+    background-color: var(--chatroom-head-color)
+}
+
+#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.picked {
+    border: 1px var(--chatroom-head-color) solid;
+    border-bottom: none
+}
+
+#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu li.insert-emoji {
+    height: 20px;
+    width: 20px
+}
+
+#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker .insert-emoji a {
+    font-size: var(--font-size)
+}
+
+#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker {
+    font-size: var(--font-size-small)
+}
+
+#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker__header .emoji-category {
+    font-size: var(--font-size-small)
+}
+
+#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists {
+    height: 7em
+}
+
+#conversejs.converse-fullscreen .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists {
+    height: 12em
+}
+
+#conversejs .chatbox .emoji-picker.toolbar-menu {
+    max-width: 40em
+}
diff --git a/src/conversejs/converse.js b/src/conversejs/converse.js
new file mode 100644
index 0000000000000000000000000000000000000000..a1a7bd43513999e3676b4a4d30be8ab901b462fd
--- /dev/null
+++ b/src/conversejs/converse.js
@@ -0,0 +1,81544 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/    // install a JSONP callback for chunk loading
+/******/    function webpackJsonpCallback(data) {
+/******/        var chunkIds = data[0];
+/******/        var moreModules = data[1];
+/******/
+/******/
+/******/        // add "moreModules" to the modules object,
+/******/        // then flag all "chunkIds" as loaded and fire callback
+/******/        var moduleId, chunkId, i = 0, resolves = [];
+/******/        for(;i < chunkIds.length; i++) {
+/******/            chunkId = chunkIds[i];
+/******/            if(installedChunks[chunkId]) {
+/******/                resolves.push(installedChunks[chunkId][0]);
+/******/            }
+/******/            installedChunks[chunkId] = 0;
+/******/        }
+/******/        for(moduleId in moreModules) {
+/******/            if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
+/******/                modules[moduleId] = moreModules[moduleId];
+/******/            }
+/******/        }
+/******/        if(parentJsonpFunction) parentJsonpFunction(data);
+/******/
+/******/        while(resolves.length) {
+/******/            resolves.shift()();
+/******/        }
+/******/
+/******/    };
+/******/
+/******/
+/******/    // The module cache
+/******/    var installedModules = {};
+/******/
+/******/    // object to store loaded and loading chunks
+/******/    // undefined = chunk not loaded, null = chunk preloaded/prefetched
+/******/    // Promise = chunk loading, 0 = chunk loaded
+/******/    var installedChunks = {
+/******/        163: 0
+/******/    };
+/******/
+/******/
+/******/
+/******/    // script path function
+/******/    function jsonpScriptSrc(chunkId) {
+/******/        return __webpack_require__.p + "" + ({"0":"locales/dayjs/af","1":"locales/dayjs/ar","2":"locales/dayjs/ar-dz","3":"locales/dayjs/ar-kw","4":"locales/dayjs/ar-ly","5":"locales/dayjs/ar-ma","6":"locales/dayjs/ar-sa","7":"locales/dayjs/ar-tn","8":"locales/dayjs/az","9":"locales/dayjs/be","10":"locales/dayjs/bg","11":"locales/dayjs/bm","12":"locales/dayjs/bn","13":"locales/dayjs/bo","14":"locales/dayjs/br","15":"locales/dayjs/bs","16":"locales/dayjs/ca","17":"locales/dayjs/cs","18":"locales/dayjs/cv","19":"locales/dayjs/cy","20":"locales/dayjs/da","21":"locales/dayjs/de","22":"locales/dayjs/de-at","23":"locales/dayjs/de-ch","24":"locales/dayjs/dv","25":"locales/dayjs/el","26":"locales/dayjs/en","27":"locales/dayjs/en-SG","28":"locales/dayjs/en-au","29":"locales/dayjs/en-ca","30":"locales/dayjs/en-gb","31":"locales/dayjs/en-ie","32":"locales/dayjs/en-il","33":"locales/dayjs/en-nz","34":"locales/dayjs/eo","35":"locales/dayjs/es","36":"locales/dayjs/es-do","37":"locales/dayjs/es-us","38":"locales/dayjs/et","39":"locales/dayjs/eu","40":"locales/dayjs/fa","41":"locales/dayjs/fi","42":"locales/dayjs/fo","43":"locales/dayjs/fr","44":"locales/dayjs/fr-ca","45":"locales/dayjs/fr-ch","46":"locales/dayjs/fy","47":"locales/dayjs/ga","48":"locales/dayjs/gd","49":"locales/dayjs/gl","50":"locales/dayjs/gom-latn","51":"locales/dayjs/gu","52":"locales/dayjs/he","53":"locales/dayjs/hi","54":"locales/dayjs/hr","55":"locales/dayjs/hu","56":"locales/dayjs/hy-am","57":"locales/dayjs/id","58":"locales/dayjs/is","59":"locales/dayjs/it","60":"locales/dayjs/it-ch","61":"locales/dayjs/ja","62":"locales/dayjs/jv","63":"locales/dayjs/ka","64":"locales/dayjs/kk","65":"locales/dayjs/km","66":"locales/dayjs/kn","67":"locales/dayjs/ko","68":"locales/dayjs/ku","69":"locales/dayjs/ky","70":"locales/dayjs/lb","71":"locales/dayjs/lo","72":"locales/dayjs/lt","73":"locales/dayjs/lv","74":"locales/dayjs/me","75":"locales/dayjs/mi","76":"locales/dayjs/mk","77":"locales/dayjs/ml","78":"locales/dayjs/mn","79":"locales/dayjs/mr","80":"locales/dayjs/ms","81":"locales/dayjs/ms-my","82":"locales/dayjs/mt","83":"locales/dayjs/my","84":"locales/dayjs/nb","85":"locales/dayjs/ne","86":"locales/dayjs/nl","87":"locales/dayjs/nl-be","88":"locales/dayjs/nn","89":"locales/dayjs/oc-lnc","90":"locales/dayjs/pa-in","91":"locales/dayjs/pl","92":"locales/dayjs/pt","93":"locales/dayjs/pt-br","94":"locales/dayjs/ro","95":"locales/dayjs/ru","96":"locales/dayjs/sd","97":"locales/dayjs/se","98":"locales/dayjs/si","99":"locales/dayjs/sk","100":"locales/dayjs/sl","101":"locales/dayjs/sq","102":"locales/dayjs/sr","103":"locales/dayjs/sr-cyrl","104":"locales/dayjs/ss","105":"locales/dayjs/sv","106":"locales/dayjs/sw","107":"locales/dayjs/ta","108":"locales/dayjs/te","109":"locales/dayjs/tet","110":"locales/dayjs/tg","111":"locales/dayjs/th","112":"locales/dayjs/tl-ph","113":"locales/dayjs/tlh","114":"locales/dayjs/tr","115":"locales/dayjs/tzl","116":"locales/dayjs/tzm","117":"locales/dayjs/tzm-latn","118":"locales/dayjs/ug-cn","119":"locales/dayjs/uk","120":"locales/dayjs/ur","121":"locales/dayjs/uz","122":"locales/dayjs/uz-latn","123":"locales/dayjs/vi","124":"locales/dayjs/x-pseudo","125":"locales/dayjs/yo","126":"locales/dayjs/zh-cn","127":"locales/dayjs/zh-hk","128":"locales/dayjs/zh-tw","129":"emojis","130":"locales/af-LC_MESSAGES-converse-po","131":"locales/ar-LC_MESSAGES-converse-po","132":"locales/bg-LC_MESSAGES-converse-po","133":"locales/ca-LC_MESSAGES-converse-po","134":"locales/cs-LC_MESSAGES-converse-po","135":"locales/de-LC_MESSAGES-converse-po","136":"locales/eo-LC_MESSAGES-converse-po","137":"locales/es-LC_MESSAGES-converse-po","138":"locales/eu-LC_MESSAGES-converse-po","139":"locales/fr-LC_MESSAGES-converse-po","140":"locales/gl-LC_MESSAGES-converse-po","141":"locales/he-LC_MESSAGES-converse-po","142":"locales/hi-LC_MESSAGES-converse-po","143":"locales/hu-LC_MESSAGES-converse-po","144":"locales/id-LC_MESSAGES-converse-po","145":"locales/it-LC_MESSAGES-converse-po","146":"locales/ja-LC_MESSAGES-converse-po","147":"locales/lt-LC_MESSAGES-converse-po","148":"locales/mr-LC_MESSAGES-converse-po","149":"locales/nb-LC_MESSAGES-converse-po","150":"locales/nl-LC_MESSAGES-converse-po","151":"locales/nl_BE-LC_MESSAGES-converse-po","152":"locales/oc-LC_MESSAGES-converse-po","153":"locales/pl-LC_MESSAGES-converse-po","154":"locales/pt-LC_MESSAGES-converse-po","155":"locales/pt_BR-LC_MESSAGES-converse-po","156":"locales/ro-LC_MESSAGES-converse-po","157":"locales/ru-LC_MESSAGES-converse-po","158":"locales/tr-LC_MESSAGES-converse-po","159":"locales/uk-LC_MESSAGES-converse-po","160":"locales/vi-LC_MESSAGES-converse-po","161":"locales/zh_CN-LC_MESSAGES-converse-po","162":"locales/zh_TW-LC_MESSAGES-converse-po"}[chunkId]||chunkId) + ".js"
+/******/    }
+/******/
+/******/    // The require function
+/******/    function __webpack_require__(moduleId) {
+/******/
+/******/        // Check if module is in cache
+/******/        if(installedModules[moduleId]) {
+/******/            return installedModules[moduleId].exports;
+/******/        }
+/******/        // Create a new module (and put it into the cache)
+/******/        var module = installedModules[moduleId] = {
+/******/            i: moduleId,
+/******/            l: false,
+/******/            exports: {}
+/******/        };
+/******/
+/******/        // Execute the module function
+/******/        modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/        // Flag the module as loaded
+/******/        module.l = true;
+/******/
+/******/        // Return the exports of the module
+/******/        return module.exports;
+/******/    }
+/******/
+/******/    // This file contains only the entry chunk.
+/******/    // The chunk loading function for additional chunks
+/******/    __webpack_require__.e = function requireEnsure(chunkId) {
+/******/        var promises = [];
+/******/
+/******/
+/******/        // JSONP chunk loading for javascript
+/******/
+/******/        var installedChunkData = installedChunks[chunkId];
+/******/        if(installedChunkData !== 0) { // 0 means "already installed".
+/******/
+/******/            // a Promise means "currently loading".
+/******/            if(installedChunkData) {
+/******/                promises.push(installedChunkData[2]);
+/******/            } else {
+/******/                // setup Promise in chunk cache
+/******/                var promise = new Promise(function(resolve, reject) {
+/******/                    installedChunkData = installedChunks[chunkId] = [resolve, reject];
+/******/                });
+/******/                promises.push(installedChunkData[2] = promise);
+/******/
+/******/                // start chunk loading
+/******/                var script = document.createElement('script');
+/******/                var onScriptComplete;
+/******/
+/******/                script.charset = 'utf-8';
+/******/                script.timeout = 120;
+/******/                if (__webpack_require__.nc) {
+/******/                    script.setAttribute("nonce", __webpack_require__.nc);
+/******/                }
+/******/                script.src = jsonpScriptSrc(chunkId);
+/******/
+/******/                // create error before stack unwound to get useful stacktrace later
+/******/                var error = new Error();
+/******/                onScriptComplete = function (event) {
+/******/                    // avoid mem leaks in IE.
+/******/                    script.onerror = script.onload = null;
+/******/                    clearTimeout(timeout);
+/******/                    var chunk = installedChunks[chunkId];
+/******/                    if(chunk !== 0) {
+/******/                        if(chunk) {
+/******/                            var errorType = event && (event.type === 'load' ? 'missing' : event.type);
+/******/                            var realSrc = event && event.target && event.target.src;
+/******/                            error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
+/******/                            error.name = 'ChunkLoadError';
+/******/                            error.type = errorType;
+/******/                            error.request = realSrc;
+/******/                            chunk[1](error);
+/******/                        }
+/******/                        installedChunks[chunkId] = undefined;
+/******/                    }
+/******/                };
+/******/                var timeout = setTimeout(function(){
+/******/                    onScriptComplete({ type: 'timeout', target: script });
+/******/                }, 120000);
+/******/                script.onerror = script.onload = onScriptComplete;
+/******/                document.head.appendChild(script);
+/******/            }
+/******/        }
+/******/        return Promise.all(promises);
+/******/    };
+/******/
+/******/    // expose the modules object (__webpack_modules__)
+/******/    __webpack_require__.m = modules;
+/******/
+/******/    // expose the module cache
+/******/    __webpack_require__.c = installedModules;
+/******/
+/******/    // define getter function for harmony exports
+/******/    __webpack_require__.d = function(exports, name, getter) {
+/******/        if(!__webpack_require__.o(exports, name)) {
+/******/            Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/        }
+/******/    };
+/******/
+/******/    // define __esModule on exports
+/******/    __webpack_require__.r = function(exports) {
+/******/        if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/            Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/        }
+/******/        Object.defineProperty(exports, '__esModule', { value: true });
+/******/    };
+/******/
+/******/    // create a fake namespace object
+/******/    // mode & 1: value is a module id, require it
+/******/    // mode & 2: merge all properties of value into the ns
+/******/    // mode & 4: return value when already ns object
+/******/    // mode & 8|1: behave like require
+/******/    __webpack_require__.t = function(value, mode) {
+/******/        if(mode & 1) value = __webpack_require__(value);
+/******/        if(mode & 8) return value;
+/******/        if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/        var ns = Object.create(null);
+/******/        __webpack_require__.r(ns);
+/******/        Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/        if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/        return ns;
+/******/    };
+/******/
+/******/    // getDefaultExport function for compatibility with non-harmony modules
+/******/    __webpack_require__.n = function(module) {
+/******/        var getter = module && module.__esModule ?
+/******/            function getDefault() { return module['default']; } :
+/******/            function getModuleExports() { return module; };
+/******/        __webpack_require__.d(getter, 'a', getter);
+/******/        return getter;
+/******/    };
+/******/
+/******/    // Object.prototype.hasOwnProperty.call
+/******/    __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/    // __webpack_public_path__
+/******/    __webpack_require__.p = "/dist/";
+/******/
+/******/    // on error function for async loading
+/******/    __webpack_require__.oe = function(err) { console.error(err); throw err; };
+/******/
+/******/    var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
+/******/    var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
+/******/    jsonpArray.push = webpackJsonpCallback;
+/******/    jsonpArray = jsonpArray.slice();
+/******/    for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
+/******/    var parentJsonpFunction = oldJsonpFunction;
+/******/
+/******/
+/******/    // Load entry module and return exports
+/******/    return __webpack_require__(__webpack_require__.s = 328);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+  /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+  var undefined;
+
+  /** Used as the semantic version number. */
+  var VERSION = '4.17.15';
+
+  /** Used as the size to enable large array optimizations. */
+  var LARGE_ARRAY_SIZE = 200;
+
+  /** Error message constants. */
+  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
+      FUNC_ERROR_TEXT = 'Expected a function';
+
+  /** Used to stand-in for `undefined` hash values. */
+  var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+  /** Used as the maximum memoize cache size. */
+  var MAX_MEMOIZE_SIZE = 500;
+
+  /** Used as the internal argument placeholder. */
+  var PLACEHOLDER = '__lodash_placeholder__';
+
+  /** Used to compose bitmasks for cloning. */
+  var CLONE_DEEP_FLAG = 1,
+      CLONE_FLAT_FLAG = 2,
+      CLONE_SYMBOLS_FLAG = 4;
+
+  /** Used to compose bitmasks for value comparisons. */
+  var COMPARE_PARTIAL_FLAG = 1,
+      COMPARE_UNORDERED_FLAG = 2;
+
+  /** Used to compose bitmasks for function metadata. */
+  var WRAP_BIND_FLAG = 1,
+      WRAP_BIND_KEY_FLAG = 2,
+      WRAP_CURRY_BOUND_FLAG = 4,
+      WRAP_CURRY_FLAG = 8,
+      WRAP_CURRY_RIGHT_FLAG = 16,
+      WRAP_PARTIAL_FLAG = 32,
+      WRAP_PARTIAL_RIGHT_FLAG = 64,
+      WRAP_ARY_FLAG = 128,
+      WRAP_REARG_FLAG = 256,
+      WRAP_FLIP_FLAG = 512;
+
+  /** Used as default options for `_.truncate`. */
+  var DEFAULT_TRUNC_LENGTH = 30,
+      DEFAULT_TRUNC_OMISSION = '...';
+
+  /** Used to detect hot functions by number of calls within a span of milliseconds. */
+  var HOT_COUNT = 800,
+      HOT_SPAN = 16;
+
+  /** Used to indicate the type of lazy iteratees. */
+  var LAZY_FILTER_FLAG = 1,
+      LAZY_MAP_FLAG = 2,
+      LAZY_WHILE_FLAG = 3;
+
+  /** Used as references for various `Number` constants. */
+  var INFINITY = 1 / 0,
+      MAX_SAFE_INTEGER = 9007199254740991,
+      MAX_INTEGER = 1.7976931348623157e+308,
+      NAN = 0 / 0;
+
+  /** Used as references for the maximum length and index of an array. */
+  var MAX_ARRAY_LENGTH = 4294967295,
+      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+  /** Used to associate wrap methods with their bit flags. */
+  var wrapFlags = [
+    ['ary', WRAP_ARY_FLAG],
+    ['bind', WRAP_BIND_FLAG],
+    ['bindKey', WRAP_BIND_KEY_FLAG],
+    ['curry', WRAP_CURRY_FLAG],
+    ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+    ['flip', WRAP_FLIP_FLAG],
+    ['partial', WRAP_PARTIAL_FLAG],
+    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+    ['rearg', WRAP_REARG_FLAG]
+  ];
+
+  /** `Object#toString` result references. */
+  var argsTag = '[object Arguments]',
+      arrayTag = '[object Array]',
+      asyncTag = '[object AsyncFunction]',
+      boolTag = '[object Boolean]',
+      dateTag = '[object Date]',
+      domExcTag = '[object DOMException]',
+      errorTag = '[object Error]',
+      funcTag = '[object Function]',
+      genTag = '[object GeneratorFunction]',
+      mapTag = '[object Map]',
+      numberTag = '[object Number]',
+      nullTag = '[object Null]',
+      objectTag = '[object Object]',
+      promiseTag = '[object Promise]',
+      proxyTag = '[object Proxy]',
+      regexpTag = '[object RegExp]',
+      setTag = '[object Set]',
+      stringTag = '[object String]',
+      symbolTag = '[object Symbol]',
+      undefinedTag = '[object Undefined]',
+      weakMapTag = '[object WeakMap]',
+      weakSetTag = '[object WeakSet]';
+
+  var arrayBufferTag = '[object ArrayBuffer]',
+      dataViewTag = '[object DataView]',
+      float32Tag = '[object Float32Array]',
+      float64Tag = '[object Float64Array]',
+      int8Tag = '[object Int8Array]',
+      int16Tag = '[object Int16Array]',
+      int32Tag = '[object Int32Array]',
+      uint8Tag = '[object Uint8Array]',
+      uint8ClampedTag = '[object Uint8ClampedArray]',
+      uint16Tag = '[object Uint16Array]',
+      uint32Tag = '[object Uint32Array]';
+
+  /** Used to match empty string literals in compiled template source. */
+  var reEmptyStringLeading = /\b__p \+= '';/g,
+      reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+      reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+  /** Used to match HTML entities and HTML characters. */
+  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+      reUnescapedHtml = /[&<>"']/g,
+      reHasEscapedHtml = RegExp(reEscapedHtml.source),
+      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+  /** Used to match template delimiters. */
+  var reEscape = /<%-([\s\S]+?)%>/g,
+      reEvaluate = /<%([\s\S]+?)%>/g,
+      reInterpolate = /<%=([\s\S]+?)%>/g;
+
+  /** Used to match property names within property paths. */
+  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+      reIsPlainProp = /^\w*$/,
+      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+  /**
+   * Used to match `RegExp`
+   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+   */
+  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+      reHasRegExpChar = RegExp(reRegExpChar.source);
+
+  /** Used to match leading and trailing whitespace. */
+  var reTrim = /^\s+|\s+$/g,
+      reTrimStart = /^\s+/,
+      reTrimEnd = /\s+$/;
+
+  /** Used to match wrap detail comments. */
+  var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
+      reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+      reSplitDetails = /,? & /;
+
+  /** Used to match words composed of alphanumeric characters. */
+  var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+  /** Used to match backslashes in property paths. */
+  var reEscapeChar = /\\(\\)?/g;
+
+  /**
+   * Used to match
+   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+   */
+  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+  /** Used to match `RegExp` flags from their coerced string values. */
+  var reFlags = /\w*$/;
+
+  /** Used to detect bad signed hexadecimal string values. */
+  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+  /** Used to detect binary string values. */
+  var reIsBinary = /^0b[01]+$/i;
+
+  /** Used to detect host constructors (Safari). */
+  var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+  /** Used to detect octal string values. */
+  var reIsOctal = /^0o[0-7]+$/i;
+
+  /** Used to detect unsigned integer values. */
+  var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+  /** Used to match Latin Unicode letters (excluding mathematical operators). */
+  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+  /** Used to ensure capturing order of template delimiters. */
+  var reNoMatch = /($^)/;
+
+  /** Used to match unescaped characters in compiled string literals. */
+  var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+  /** Used to compose unicode character classes. */
+  var rsAstralRange = '\\ud800-\\udfff',
+      rsComboMarksRange = '\\u0300-\\u036f',
+      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+      rsComboSymbolsRange = '\\u20d0-\\u20ff',
+      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+      rsDingbatRange = '\\u2700-\\u27bf',
+      rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+      rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+      rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+      rsPunctuationRange = '\\u2000-\\u206f',
+      rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+      rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+      rsVarRange = '\\ufe0e\\ufe0f',
+      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+  /** Used to compose unicode capture groups. */
+  var rsApos = "['\u2019]",
+      rsAstral = '[' + rsAstralRange + ']',
+      rsBreak = '[' + rsBreakRange + ']',
+      rsCombo = '[' + rsComboRange + ']',
+      rsDigits = '\\d+',
+      rsDingbat = '[' + rsDingbatRange + ']',
+      rsLower = '[' + rsLowerRange + ']',
+      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+      rsFitz = '\\ud83c[\\udffb-\\udfff]',
+      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+      rsNonAstral = '[^' + rsAstralRange + ']',
+      rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+      rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+      rsUpper = '[' + rsUpperRange + ']',
+      rsZWJ = '\\u200d';
+
+  /** Used to compose unicode regexes. */
+  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+      reOptMod = rsModifier + '?',
+      rsOptVar = '[' + rsVarRange + ']?',
+      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+      rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+      rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+      rsSeq = rsOptVar + reOptMod + rsOptJoin,
+      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+  /** Used to match apostrophes. */
+  var reApos = RegExp(rsApos, 'g');
+
+  /**
+   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+   */
+  var reComboMark = RegExp(rsCombo, 'g');
+
+  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+  /** Used to match complex or compound words. */
+  var reUnicodeWord = RegExp([
+    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+    rsUpper + '+' + rsOptContrUpper,
+    rsOrdUpper,
+    rsOrdLower,
+    rsDigits,
+    rsEmoji
+  ].join('|'), 'g');
+
+  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
+
+  /** Used to detect strings that need a more robust regexp to match words. */
+  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+  /** Used to assign default `context` object properties. */
+  var contextProps = [
+    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
+    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+  ];
+
+  /** Used to make template sourceURLs easier to identify. */
+  var templateCounter = -1;
+
+  /** Used to identify `toStringTag` values of typed arrays. */
+  var typedArrayTags = {};
+  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+  typedArrayTags[uint32Tag] = true;
+  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+  typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+  typedArrayTags[setTag] = typedArrayTags[stringTag] =
+  typedArrayTags[weakMapTag] = false;
+
+  /** Used to identify `toStringTag` values supported by `_.clone`. */
+  var cloneableTags = {};
+  cloneableTags[argsTag] = cloneableTags[arrayTag] =
+  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+  cloneableTags[boolTag] = cloneableTags[dateTag] =
+  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+  cloneableTags[int32Tag] = cloneableTags[mapTag] =
+  cloneableTags[numberTag] = cloneableTags[objectTag] =
+  cloneableTags[regexpTag] = cloneableTags[setTag] =
+  cloneableTags[stringTag] = cloneableTags[symbolTag] =
+  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+  cloneableTags[errorTag] = cloneableTags[funcTag] =
+  cloneableTags[weakMapTag] = false;
+
+  /** Used to map Latin Unicode letters to basic Latin letters. */
+  var deburredLetters = {
+    // Latin-1 Supplement block.
+    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+    '\xc7': 'C',  '\xe7': 'c',
+    '\xd0': 'D',  '\xf0': 'd',
+    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
+    '\xd1': 'N',  '\xf1': 'n',
+    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
+    '\xc6': 'Ae', '\xe6': 'ae',
+    '\xde': 'Th', '\xfe': 'th',
+    '\xdf': 'ss',
+    // Latin Extended-A block.
+    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
+    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
+    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+    '\u0134': 'J',  '\u0135': 'j',
+    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
+    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
+    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
+    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
+    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
+    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
+    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
+    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
+    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+    '\u0174': 'W',  '\u0175': 'w',
+    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
+    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
+    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
+    '\u0132': 'IJ', '\u0133': 'ij',
+    '\u0152': 'Oe', '\u0153': 'oe',
+    '\u0149': "'n", '\u017f': 's'
+  };
+
+  /** Used to map characters to HTML entities. */
+  var htmlEscapes = {
+    '&': '&amp;',
+    '<': '&lt;',
+    '>': '&gt;',
+    '"': '&quot;',
+    "'": '&#39;'
+  };
+
+  /** Used to map HTML entities to characters. */
+  var htmlUnescapes = {
+    '&amp;': '&',
+    '&lt;': '<',
+    '&gt;': '>',
+    '&quot;': '"',
+    '&#39;': "'"
+  };
+
+  /** Used to escape characters for inclusion in compiled string literals. */
+  var stringEscapes = {
+    '\\': '\\',
+    "'": "'",
+    '\n': 'n',
+    '\r': 'r',
+    '\u2028': 'u2028',
+    '\u2029': 'u2029'
+  };
+
+  /** Built-in method references without a dependency on `root`. */
+  var freeParseFloat = parseFloat,
+      freeParseInt = parseInt;
+
+  /** Detect free variable `global` from Node.js. */
+  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+  /** Detect free variable `self`. */
+  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+  /** Used as a reference to the global object. */
+  var root = freeGlobal || freeSelf || Function('return this')();
+
+  /** Detect free variable `exports`. */
+  var freeExports =  true && exports && !exports.nodeType && exports;
+
+  /** Detect free variable `module`. */
+  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+  /** Detect the popular CommonJS extension `module.exports`. */
+  var moduleExports = freeModule && freeModule.exports === freeExports;
+
+  /** Detect free variable `process` from Node.js. */
+  var freeProcess = moduleExports && freeGlobal.process;
+
+  /** Used to access faster Node.js helpers. */
+  var nodeUtil = (function() {
+    try {
+      // Use `util.types` for Node.js 10+.
+      var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+      if (types) {
+        return types;
+      }
+
+      // Legacy `process.binding('util')` for Node.js < 10.
+      return freeProcess && freeProcess.binding && freeProcess.binding('util');
+    } catch (e) {}
+  }());
+
+  /* Node.js helper references. */
+  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
+      nodeIsDate = nodeUtil && nodeUtil.isDate,
+      nodeIsMap = nodeUtil && nodeUtil.isMap,
+      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
+      nodeIsSet = nodeUtil && nodeUtil.isSet,
+      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+  /*--------------------------------------------------------------------------*/
+
+  /**
+   * A faster alternative to `Function#apply`, this function invokes `func`
+   * with the `this` binding of `thisArg` and the arguments of `args`.
+   *
+   * @private
+   * @param {Function} func The function to invoke.
+   * @param {*} thisArg The `this` binding of `func`.
+   * @param {Array} args The arguments to invoke `func` with.
+   * @returns {*} Returns the result of `func`.
+   */
+  function apply(func, thisArg, args) {
+    switch (args.length) {
+      case 0: return func.call(thisArg);
+      case 1: return func.call(thisArg, args[0]);
+      case 2: return func.call(thisArg, args[0], args[1]);
+      case 3: return func.call(thisArg, args[0], args[1], args[2]);
+    }
+    return func.apply(thisArg, args);
+  }
+
+  /**
+   * A specialized version of `baseAggregator` for arrays.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} setter The function to set `accumulator` values.
+   * @param {Function} iteratee The iteratee to transform keys.
+   * @param {Object} accumulator The initial aggregated object.
+   * @returns {Function} Returns `accumulator`.
+   */
+  function arrayAggregator(array, setter, iteratee, accumulator) {
+    var index = -1,
+        length = array == null ? 0 : array.length;
+
+    while (++index < length) {
+      var value = array[index];
+      setter(accumulator, value, iteratee(value), array);
+    }
+    return accumulator;
+  }
+
+  /**
+   * A specialized version of `_.forEach` for arrays without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array} Returns `array`.
+   */
+  function arrayEach(array, iteratee) {
+    var index = -1,
+        length = array == null ? 0 : array.length;
+
+    while (++index < length) {
+      if (iteratee(array[index], index, array) === false) {
+        break;
+      }
+    }
+    return array;
+  }
+
+  /**
+   * A specialized version of `_.forEachRight` for arrays without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array} Returns `array`.
+   */
+  function arrayEachRight(array, iteratee) {
+    var length = array == null ? 0 : array.length;
+
+    while (length--) {
+      if (iteratee(array[length], length, array) === false) {
+        break;
+      }
+    }
+    return array;
+  }
+
+  /**
+   * A specialized version of `_.every` for arrays without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {boolean} Returns `true` if all elements pass the predicate check,
+   *  else `false`.
+   */
+  function arrayEvery(array, predicate) {
+    var index = -1,
+        length = array == null ? 0 : array.length;
+
+    while (++index < length) {
+      if (!predicate(array[index], index, array)) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * A specialized version of `_.filter` for arrays without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {Array} Returns the new filtered array.
+   */
+  function arrayFilter(array, predicate) {
+    var index = -1,
+        length = array == null ? 0 : array.length,
+        resIndex = 0,
+        result = [];
+
+    while (++index < length) {
+      var value = array[index];
+      if (predicate(value, index, array)) {
+        result[resIndex++] = value;
+      }
+    }
+    return result;
+  }
+
+  /**
+   * A specialized version of `_.includes` for arrays without support for
+   * specifying an index to search from.
+   *
+   * @private
+   * @param {Array} [array] The array to inspect.
+   * @param {*} target The value to search for.
+   * @returns {boolean} Returns `true` if `target` is found, else `false`.
+   */
+  function arrayIncludes(array, value) {
+    var length = array == null ? 0 : array.length;
+    return !!length && baseIndexOf(array, value, 0) > -1;
+  }
+
+  /**
+   * This function is like `arrayIncludes` except that it accepts a comparator.
+   *
+   * @private
+   * @param {Array} [array] The array to inspect.
+   * @param {*} target The value to search for.
+   * @param {Function} comparator The comparator invoked per element.
+   * @returns {boolean} Returns `true` if `target` is found, else `false`.
+   */
+  function arrayIncludesWith(array, value, comparator) {
+    var index = -1,
+        length = array == null ? 0 : array.length;
+
+    while (++index < length) {
+      if (comparator(value, array[index])) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * A specialized version of `_.map` for arrays without support for iteratee
+   * shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array} Returns the new mapped array.
+   */
+  function arrayMap(array, iteratee) {
+    var index = -1,
+        length = array == null ? 0 : array.length,
+        result = Array(length);
+
+    while (++index < length) {
+      result[index] = iteratee(array[index], index, array);
+    }
+    return result;
+  }
+
+  /**
+   * Appends the elements of `values` to `array`.
+   *
+   * @private
+   * @param {Array} array The array to modify.
+   * @param {Array} values The values to append.
+   * @returns {Array} Returns `array`.
+   */
+  function arrayPush(array, values) {
+    var index = -1,
+        length = values.length,
+        offset = array.length;
+
+    while (++index < length) {
+      array[offset + index] = values[index];
+    }
+    return array;
+  }
+
+  /**
+   * A specialized version of `_.reduce` for arrays without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @param {*} [accumulator] The initial value.
+   * @param {boolean} [initAccum] Specify using the first element of `array` as
+   *  the initial value.
+   * @returns {*} Returns the accumulated value.
+   */
+  function arrayReduce(array, iteratee, accumulator, initAccum) {
+    var index = -1,
+        length = array == null ? 0 : array.length;
+
+    if (initAccum && length) {
+      accumulator = array[++index];
+    }
+    while (++index < length) {
+      accumulator = iteratee(accumulator, array[index], index, array);
+    }
+    return accumulator;
+  }
+
+  /**
+   * A specialized version of `_.reduceRight` for arrays without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @param {*} [accumulator] The initial value.
+   * @param {boolean} [initAccum] Specify using the last element of `array` as
+   *  the initial value.
+   * @returns {*} Returns the accumulated value.
+   */
+  function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+    var length = array == null ? 0 : array.length;
+    if (initAccum && length) {
+      accumulator = array[--length];
+    }
+    while (length--) {
+      accumulator = iteratee(accumulator, array[length], length, array);
+    }
+    return accumulator;
+  }
+
+  /**
+   * A specialized version of `_.some` for arrays without support for iteratee
+   * shorthands.
+   *
+   * @private
+   * @param {Array} [array] The array to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {boolean} Returns `true` if any element passes the predicate check,
+   *  else `false`.
+   */
+  function arraySome(array, predicate) {
+    var index = -1,
+        length = array == null ? 0 : array.length;
+
+    while (++index < length) {
+      if (predicate(array[index], index, array)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Gets the size of an ASCII `string`.
+   *
+   * @private
+   * @param {string} string The string inspect.
+   * @returns {number} Returns the string size.
+   */
+  var asciiSize = baseProperty('length');
+
+  /**
+   * Converts an ASCII `string` to an array.
+   *
+   * @private
+   * @param {string} string The string to convert.
+   * @returns {Array} Returns the converted array.
+   */
+  function asciiToArray(string) {
+    return string.split('');
+  }
+
+  /**
+   * Splits an ASCII `string` into an array of its words.
+   *
+   * @private
+   * @param {string} The string to inspect.
+   * @returns {Array} Returns the words of `string`.
+   */
+  function asciiWords(string) {
+    return string.match(reAsciiWord) || [];
+  }
+
+  /**
+   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+   * without support for iteratee shorthands, which iterates over `collection`
+   * using `eachFunc`.
+   *
+   * @private
+   * @param {Array|Object} collection The collection to inspect.
+   * @param {Function} predicate The function invoked per iteration.
+   * @param {Function} eachFunc The function to iterate over `collection`.
+   * @returns {*} Returns the found element or its key, else `undefined`.
+   */
+  function baseFindKey(collection, predicate, eachFunc) {
+    var result;
+    eachFunc(collection, function(value, key, collection) {
+      if (predicate(value, key, collection)) {
+        result = key;
+        return false;
+      }
+    });
+    return result;
+  }
+
+  /**
+   * The base implementation of `_.findIndex` and `_.findLastIndex` without
+   * support for iteratee shorthands.
+   *
+   * @private
+   * @param {Array} array The array to inspect.
+   * @param {Function} predicate The function invoked per iteration.
+   * @param {number} fromIndex The index to search from.
+   * @param {boolean} [fromRight] Specify iterating from right to left.
+   * @returns {number} Returns the index of the matched value, else `-1`.
+   */
+  function baseFindIndex(array, predicate, fromIndex, fromRight) {
+    var length = array.length,
+        index = fromIndex + (fromRight ? 1 : -1);
+
+    while ((fromRight ? index-- : ++index < length)) {
+      if (predicate(array[index], index, array)) {
+        return index;
+      }
+    }
+    return -1;
+  }
+
+  /**
+   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+   *
+   * @private
+   * @param {Array} array The array to inspect.
+   * @param {*} value The value to search for.
+   * @param {number} fromIndex The index to search from.
+   * @returns {number} Returns the index of the matched value, else `-1`.
+   */
+  function baseIndexOf(array, value, fromIndex) {
+    return value === value
+      ? strictIndexOf(array, value, fromIndex)
+      : baseFindIndex(array, baseIsNaN, fromIndex);
+  }
+
+  /**
+   * This function is like `baseIndexOf` except that it accepts a comparator.
+   *
+   * @private
+   * @param {Array} array The array to inspect.
+   * @param {*} value The value to search for.
+   * @param {number} fromIndex The index to search from.
+   * @param {Function} comparator The comparator invoked per element.
+   * @returns {number} Returns the index of the matched value, else `-1`.
+   */
+  function baseIndexOfWith(array, value, fromIndex, comparator) {
+    var index = fromIndex - 1,
+        length = array.length;
+
+    while (++index < length) {
+      if (comparator(array[index], value)) {
+        return index;
+      }
+    }
+    return -1;
+  }
+
+  /**
+   * The base implementation of `_.isNaN` without support for number objects.
+   *
+   * @private
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+   */
+  function baseIsNaN(value) {
+    return value !== value;
+  }
+
+  /**
+   * The base implementation of `_.mean` and `_.meanBy` without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} array The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {number} Returns the mean.
+   */
+  function baseMean(array, iteratee) {
+    var length = array == null ? 0 : array.length;
+    return length ? (baseSum(array, iteratee) / length) : NAN;
+  }
+
+  /**
+   * The base implementation of `_.property` without support for deep paths.
+   *
+   * @private
+   * @param {string} key The key of the property to get.
+   * @returns {Function} Returns the new accessor function.
+   */
+  function baseProperty(key) {
+    return function(object) {
+      return object == null ? undefined : object[key];
+    };
+  }
+
+  /**
+   * The base implementation of `_.propertyOf` without support for deep paths.
+   *
+   * @private
+   * @param {Object} object The object to query.
+   * @returns {Function} Returns the new accessor function.
+   */
+  function basePropertyOf(object) {
+    return function(key) {
+      return object == null ? undefined : object[key];
+    };
+  }
+
+  /**
+   * The base implementation of `_.reduce` and `_.reduceRight`, without support
+   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+   *
+   * @private
+   * @param {Array|Object} collection The collection to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @param {*} accumulator The initial value.
+   * @param {boolean} initAccum Specify using the first or last element of
+   *  `collection` as the initial value.
+   * @param {Function} eachFunc The function to iterate over `collection`.
+   * @returns {*} Returns the accumulated value.
+   */
+  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+    eachFunc(collection, function(value, index, collection) {
+      accumulator = initAccum
+        ? (initAccum = false, value)
+        : iteratee(accumulator, value, index, collection);
+    });
+    return accumulator;
+  }
+
+  /**
+   * The base implementation of `_.sortBy` which uses `comparer` to define the
+   * sort order of `array` and replaces criteria objects with their corresponding
+   * values.
+   *
+   * @private
+   * @param {Array} array The array to sort.
+   * @param {Function} comparer The function to define sort order.
+   * @returns {Array} Returns `array`.
+   */
+  function baseSortBy(array, comparer) {
+    var length = array.length;
+
+    array.sort(comparer);
+    while (length--) {
+      array[length] = array[length].value;
+    }
+    return array;
+  }
+
+  /**
+   * The base implementation of `_.sum` and `_.sumBy` without support for
+   * iteratee shorthands.
+   *
+   * @private
+   * @param {Array} array The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {number} Returns the sum.
+   */
+  function baseSum(array, iteratee) {
+    var result,
+        index = -1,
+        length = array.length;
+
+    while (++index < length) {
+      var current = iteratee(array[index]);
+      if (current !== undefined) {
+        result = result === undefined ? current : (result + current);
+      }
+    }
+    return result;
+  }
+
+  /**
+   * The base implementation of `_.times` without support for iteratee shorthands
+   * or max array length checks.
+   *
+   * @private
+   * @param {number} n The number of times to invoke `iteratee`.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array} Returns the array of results.
+   */
+  function baseTimes(n, iteratee) {
+    var index = -1,
+        result = Array(n);
+
+    while (++index < n) {
+      result[index] = iteratee(index);
+    }
+    return result;
+  }
+
+  /**
+   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+   * of key-value pairs for `object` corresponding to the property names of `props`.
+   *
+   * @private
+   * @param {Object} object The object to query.
+   * @param {Array} props The property names to get values for.
+   * @returns {Object} Returns the key-value pairs.
+   */
+  function baseToPairs(object, props) {
+    return arrayMap(props, function(key) {
+      return [key, object[key]];
+    });
+  }
+
+  /**
+   * The base implementation of `_.unary` without support for storing metadata.
+   *
+   * @private
+   * @param {Function} func The function to cap arguments for.
+   * @returns {Function} Returns the new capped function.
+   */
+  function baseUnary(func) {
+    return function(value) {
+      return func(value);
+    };
+  }
+
+  /**
+   * The base implementation of `_.values` and `_.valuesIn` which creates an
+   * array of `object` property values corresponding to the property names
+   * of `props`.
+   *
+   * @private
+   * @param {Object} object The object to query.
+   * @param {Array} props The property names to get values for.
+   * @returns {Object} Returns the array of property values.
+   */
+  function baseValues(object, props) {
+    return arrayMap(props, function(key) {
+      return object[key];
+    });
+  }
+
+  /**
+   * Checks if a `cache` value for `key` exists.
+   *
+   * @private
+   * @param {Object} cache The cache to query.
+   * @param {string} key The key of the entry to check.
+   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+   */
+  function cacheHas(cache, key) {
+    return cache.has(key);
+  }
+
+  /**
+   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+   * that is not found in the character symbols.
+   *
+   * @private
+   * @param {Array} strSymbols The string symbols to inspect.
+   * @param {Array} chrSymbols The character symbols to find.
+   * @returns {number} Returns the index of the first unmatched string symbol.
+   */
+  function charsStartIndex(strSymbols, chrSymbols) {
+    var index = -1,
+        length = strSymbols.length;
+
+    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+    return index;
+  }
+
+  /**
+   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+   * that is not found in the character symbols.
+   *
+   * @private
+   * @param {Array} strSymbols The string symbols to inspect.
+   * @param {Array} chrSymbols The character symbols to find.
+   * @returns {number} Returns the index of the last unmatched string symbol.
+   */
+  function charsEndIndex(strSymbols, chrSymbols) {
+    var index = strSymbols.length;
+
+    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+    return index;
+  }
+
+  /**
+   * Gets the number of `placeholder` occurrences in `array`.
+   *
+   * @private
+   * @param {Array} array The array to inspect.
+   * @param {*} placeholder The placeholder to search for.
+   * @returns {number} Returns the placeholder count.
+   */
+  function countHolders(array, placeholder) {
+    var length = array.length,
+        result = 0;
+
+    while (length--) {
+      if (array[length] === placeholder) {
+        ++result;
+      }
+    }
+    return result;
+  }
+
+  /**
+   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+   * letters to basic Latin letters.
+   *
+   * @private
+   * @param {string} letter The matched letter to deburr.
+   * @returns {string} Returns the deburred letter.
+   */
+  var deburrLetter = basePropertyOf(deburredLetters);
+
+  /**
+   * Used by `_.escape` to convert characters to HTML entities.
+   *
+   * @private
+   * @param {string} chr The matched character to escape.
+   * @returns {string} Returns the escaped character.
+   */
+  var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+  /**
+   * Used by `_.template` to escape characters for inclusion in compiled string literals.
+   *
+   * @private
+   * @param {string} chr The matched character to escape.
+   * @returns {string} Returns the escaped character.
+   */
+  function escapeStringChar(chr) {
+    return '\\' + stringEscapes[chr];
+  }
+
+  /**
+   * Gets the value at `key` of `object`.
+   *
+   * @private
+   * @param {Object} [object] The object to query.
+   * @param {string} key The key of the property to get.
+   * @returns {*} Returns the property value.
+   */
+  function getValue(object, key) {
+    return object == null ? undefined : object[key];
+  }
+
+  /**
+   * Checks if `string` contains Unicode symbols.
+   *
+   * @private
+   * @param {string} string The string to inspect.
+   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+   */
+  function hasUnicode(string) {
+    return reHasUnicode.test(string);
+  }
+
+  /**
+   * Checks if `string` contains a word composed of Unicode symbols.
+   *
+   * @private
+   * @param {string} string The string to inspect.
+   * @returns {boolean} Returns `true` if a word is found, else `false`.
+   */
+  function hasUnicodeWord(string) {
+    return reHasUnicodeWord.test(string);
+  }
+
+  /**
+   * Converts `iterator` to an array.
+   *
+   * @private
+   * @param {Object} iterator The iterator to convert.
+   * @returns {Array} Returns the converted array.
+   */
+  function iteratorToArray(iterator) {
+    var data,
+        result = [];
+
+    while (!(data = iterator.next()).done) {
+      result.push(data.value);
+    }
+    return result;
+  }
+
+  /**
+   * Converts `map` to its key-value pairs.
+   *
+   * @private
+   * @param {Object} map The map to convert.
+   * @returns {Array} Returns the key-value pairs.
+   */
+  function mapToArray(map) {
+    var index = -1,
+        result = Array(map.size);
+
+    map.forEach(function(value, key) {
+      result[++index] = [key, value];
+    });
+    return result;
+  }
+
+  /**
+   * Creates a unary function that invokes `func` with its argument transformed.
+   *
+   * @private
+   * @param {Function} func The function to wrap.
+   * @param {Function} transform The argument transform.
+   * @returns {Function} Returns the new function.
+   */
+  function overArg(func, transform) {
+    return function(arg) {
+      return func(transform(arg));
+    };
+  }
+
+  /**
+   * Replaces all `placeholder` elements in `array` with an internal placeholder
+   * and returns an array of their indexes.
+   *
+   * @private
+   * @param {Array} array The array to modify.
+   * @param {*} placeholder The placeholder to replace.
+   * @returns {Array} Returns the new array of placeholder indexes.
+   */
+  function replaceHolders(array, placeholder) {
+    var index = -1,
+        length = array.length,
+        resIndex = 0,
+        result = [];
+
+    while (++index < length) {
+      var value = array[index];
+      if (value === placeholder || value === PLACEHOLDER) {
+        array[index] = PLACEHOLDER;
+        result[resIndex++] = index;
+      }
+    }
+    return result;
+  }
+
+  /**
+   * Converts `set` to an array of its values.
+   *
+   * @private
+   * @param {Object} set The set to convert.
+   * @returns {Array} Returns the values.
+   */
+  function setToArray(set) {
+    var index = -1,
+        result = Array(set.size);
+
+    set.forEach(function(value) {
+      result[++index] = value;
+    });
+    return result;
+  }
+
+  /**
+   * Converts `set` to its value-value pairs.
+   *
+   * @private
+   * @param {Object} set The set to convert.
+   * @returns {Array} Returns the value-value pairs.
+   */
+  function setToPairs(set) {
+    var index = -1,
+        result = Array(set.size);
+
+    set.forEach(function(value) {
+      result[++index] = [value, value];
+    });
+    return result;
+  }
+
+  /**
+   * A specialized version of `_.indexOf` which performs strict equality
+   * comparisons of values, i.e. `===`.
+   *
+   * @private
+   * @param {Array} array The array to inspect.
+   * @param {*} value The value to search for.
+   * @param {number} fromIndex The index to search from.
+   * @returns {number} Returns the index of the matched value, else `-1`.
+   */
+  function strictIndexOf(array, value, fromIndex) {
+    var index = fromIndex - 1,
+        length = array.length;
+
+    while (++index < length) {
+      if (array[index] === value) {
+        return index;
+      }
+    }
+    return -1;
+  }
+
+  /**
+   * A specialized version of `_.lastIndexOf` which performs strict equality
+   * comparisons of values, i.e. `===`.
+   *
+   * @private
+   * @param {Array} array The array to inspect.
+   * @param {*} value The value to search for.
+   * @param {number} fromIndex The index to search from.
+   * @returns {number} Returns the index of the matched value, else `-1`.
+   */
+  function strictLastIndexOf(array, value, fromIndex) {
+    var index = fromIndex + 1;
+    while (index--) {
+      if (array[index] === value) {
+        return index;
+      }
+    }
+    return index;
+  }
+
+  /**
+   * Gets the number of symbols in `string`.
+   *
+   * @private
+   * @param {string} string The string to inspect.
+   * @returns {number} Returns the string size.
+   */
+  function stringSize(string) {
+    return hasUnicode(string)
+      ? unicodeSize(string)
+      : asciiSize(string);
+  }
+
+  /**
+   * Converts `string` to an array.
+   *
+   * @private
+   * @param {string} string The string to convert.
+   * @returns {Array} Returns the converted array.
+   */
+  function stringToArray(string) {
+    return hasUnicode(string)
+      ? unicodeToArray(string)
+      : asciiToArray(string);
+  }
+
+  /**
+   * Used by `_.unescape` to convert HTML entities to characters.
+   *
+   * @private
+   * @param {string} chr The matched character to unescape.
+   * @returns {string} Returns the unescaped character.
+   */
+  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+  /**
+   * Gets the size of a Unicode `string`.
+   *
+   * @private
+   * @param {string} string The string inspect.
+   * @returns {number} Returns the string size.
+   */
+  function unicodeSize(string) {
+    var result = reUnicode.lastIndex = 0;
+    while (reUnicode.test(string)) {
+      ++result;
+    }
+    return result;
+  }
+
+  /**
+   * Converts a Unicode `string` to an array.
+   *
+   * @private
+   * @param {string} string The string to convert.
+   * @returns {Array} Returns the converted array.
+   */
+  function unicodeToArray(string) {
+    return string.match(reUnicode) || [];
+  }
+
+  /**
+   * Splits a Unicode `string` into an array of its words.
+   *
+   * @private
+   * @param {string} The string to inspect.
+   * @returns {Array} Returns the words of `string`.
+   */
+  function unicodeWords(string) {
+    return string.match(reUnicodeWord) || [];
+  }
+
+  /*--------------------------------------------------------------------------*/
+
+  /**
+   * Create a new pristine `lodash` function using the `context` object.
+   *
+   * @static
+   * @memberOf _
+   * @since 1.1.0
+   * @category Util
+   * @param {Object} [context=root] The context object.
+   * @returns {Function} Returns a new `lodash` function.
+   * @example
+   *
+   * _.mixin({ 'foo': _.constant('foo') });
+   *
+   * var lodash = _.runInContext();
+   * lodash.mixin({ 'bar': lodash.constant('bar') });
+   *
+   * _.isFunction(_.foo);
+   * // => true
+   * _.isFunction(_.bar);
+   * // => false
+   *
+   * lodash.isFunction(lodash.foo);
+   * // => false
+   * lodash.isFunction(lodash.bar);
+   * // => true
+   *
+   * // Create a suped-up `defer` in Node.js.
+   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+   */
+  var runInContext = (function runInContext(context) {
+    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
+
+    /** Built-in constructor references. */
+    var Array = context.Array,
+        Date = context.Date,
+        Error = context.Error,
+        Function = context.Function,
+        Math = context.Math,
+        Object = context.Object,
+        RegExp = context.RegExp,
+        String = context.String,
+        TypeError = context.TypeError;
+
+    /** Used for built-in method references. */
+    var arrayProto = Array.prototype,
+        funcProto = Function.prototype,
+        objectProto = Object.prototype;
+
+    /** Used to detect overreaching core-js shims. */
+    var coreJsData = context['__core-js_shared__'];
+
+    /** Used to resolve the decompiled source of functions. */
+    var funcToString = funcProto.toString;
+
+    /** Used to check objects for own properties. */
+    var hasOwnProperty = objectProto.hasOwnProperty;
+
+    /** Used to generate unique IDs. */
+    var idCounter = 0;
+
+    /** Used to detect methods masquerading as native. */
+    var maskSrcKey = (function() {
+      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+      return uid ? ('Symbol(src)_1.' + uid) : '';
+    }());
+
+    /**
+     * Used to resolve the
+     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+     * of values.
+     */
+    var nativeObjectToString = objectProto.toString;
+
+    /** Used to infer the `Object` constructor. */
+    var objectCtorString = funcToString.call(Object);
+
+    /** Used to restore the original `_` reference in `_.noConflict`. */
+    var oldDash = root._;
+
+    /** Used to detect if a method is native. */
+    var reIsNative = RegExp('^' +
+      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+      .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+    );
+
+    /** Built-in value references. */
+    var Buffer = moduleExports ? context.Buffer : undefined,
+        Symbol = context.Symbol,
+        Uint8Array = context.Uint8Array,
+        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
+        getPrototype = overArg(Object.getPrototypeOf, Object),
+        objectCreate = Object.create,
+        propertyIsEnumerable = objectProto.propertyIsEnumerable,
+        splice = arrayProto.splice,
+        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
+        symIterator = Symbol ? Symbol.iterator : undefined,
+        symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+    var defineProperty = (function() {
+      try {
+        var func = getNative(Object, 'defineProperty');
+        func({}, '', {});
+        return func;
+      } catch (e) {}
+    }());
+
+    /** Mocked built-ins. */
+    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
+        ctxNow = Date && Date.now !== root.Date.now && Date.now,
+        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
+
+    /* Built-in method references for those with the same name as other `lodash` methods. */
+    var nativeCeil = Math.ceil,
+        nativeFloor = Math.floor,
+        nativeGetSymbols = Object.getOwnPropertySymbols,
+        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+        nativeIsFinite = context.isFinite,
+        nativeJoin = arrayProto.join,
+        nativeKeys = overArg(Object.keys, Object),
+        nativeMax = Math.max,
+        nativeMin = Math.min,
+        nativeNow = Date.now,
+        nativeParseInt = context.parseInt,
+        nativeRandom = Math.random,
+        nativeReverse = arrayProto.reverse;
+
+    /* Built-in method references that are verified to be native. */
+    var DataView = getNative(context, 'DataView'),
+        Map = getNative(context, 'Map'),
+        Promise = getNative(context, 'Promise'),
+        Set = getNative(context, 'Set'),
+        WeakMap = getNative(context, 'WeakMap'),
+        nativeCreate = getNative(Object, 'create');
+
+    /** Used to store function metadata. */
+    var metaMap = WeakMap && new WeakMap;
+
+    /** Used to lookup unminified function names. */
+    var realNames = {};
+
+    /** Used to detect maps, sets, and weakmaps. */
+    var dataViewCtorString = toSource(DataView),
+        mapCtorString = toSource(Map),
+        promiseCtorString = toSource(Promise),
+        setCtorString = toSource(Set),
+        weakMapCtorString = toSource(WeakMap);
+
+    /** Used to convert symbols to primitives and strings. */
+    var symbolProto = Symbol ? Symbol.prototype : undefined,
+        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+        symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates a `lodash` object which wraps `value` to enable implicit method
+     * chain sequences. Methods that operate on and return arrays, collections,
+     * and functions can be chained together. Methods that retrieve a single value
+     * or may return a primitive value will automatically end the chain sequence
+     * and return the unwrapped value. Otherwise, the value must be unwrapped
+     * with `_#value`.
+     *
+     * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+     * enabled using `_.chain`.
+     *
+     * The execution of chained methods is lazy, that is, it's deferred until
+     * `_#value` is implicitly or explicitly called.
+     *
+     * Lazy evaluation allows several methods to support shortcut fusion.
+     * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+     * the creation of intermediate arrays and can greatly reduce the number of
+     * iteratee executions. Sections of a chain sequence qualify for shortcut
+     * fusion if the section is applied to an array and iteratees accept only
+     * one argument. The heuristic for whether a section qualifies for shortcut
+     * fusion is subject to change.
+     *
+     * Chaining is supported in custom builds as long as the `_#value` method is
+     * directly or indirectly included in the build.
+     *
+     * In addition to lodash methods, wrappers have `Array` and `String` methods.
+     *
+     * The wrapper `Array` methods are:
+     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+     *
+     * The wrapper `String` methods are:
+     * `replace` and `split`
+     *
+     * The wrapper methods that support shortcut fusion are:
+     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+     *
+     * The chainable wrapper methods are:
+     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+     * `zipObject`, `zipObjectDeep`, and `zipWith`
+     *
+     * The wrapper methods that are **not** chainable by default are:
+     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+     * `upperFirst`, `value`, and `words`
+     *
+     * @name _
+     * @constructor
+     * @category Seq
+     * @param {*} value The value to wrap in a `lodash` instance.
+     * @returns {Object} Returns the new `lodash` wrapper instance.
+     * @example
+     *
+     * function square(n) {
+     *   return n * n;
+     * }
+     *
+     * var wrapped = _([1, 2, 3]);
+     *
+     * // Returns an unwrapped value.
+     * wrapped.reduce(_.add);
+     * // => 6
+     *
+     * // Returns a wrapped value.
+     * var squares = wrapped.map(square);
+     *
+     * _.isArray(squares);
+     * // => false
+     *
+     * _.isArray(squares.value());
+     * // => true
+     */
+    function lodash(value) {
+      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+        if (value instanceof LodashWrapper) {
+          return value;
+        }
+        if (hasOwnProperty.call(value, '__wrapped__')) {
+          return wrapperClone(value);
+        }
+      }
+      return new LodashWrapper(value);
+    }
+
+    /**
+     * The base implementation of `_.create` without support for assigning
+     * properties to the created object.
+     *
+     * @private
+     * @param {Object} proto The object to inherit from.
+     * @returns {Object} Returns the new object.
+     */
+    var baseCreate = (function() {
+      function object() {}
+      return function(proto) {
+        if (!isObject(proto)) {
+          return {};
+        }
+        if (objectCreate) {
+          return objectCreate(proto);
+        }
+        object.prototype = proto;
+        var result = new object;
+        object.prototype = undefined;
+        return result;
+      };
+    }());
+
+    /**
+     * The function whose prototype chain sequence wrappers inherit from.
+     *
+     * @private
+     */
+    function baseLodash() {
+      // No operation performed.
+    }
+
+    /**
+     * The base constructor for creating `lodash` wrapper objects.
+     *
+     * @private
+     * @param {*} value The value to wrap.
+     * @param {boolean} [chainAll] Enable explicit method chain sequences.
+     */
+    function LodashWrapper(value, chainAll) {
+      this.__wrapped__ = value;
+      this.__actions__ = [];
+      this.__chain__ = !!chainAll;
+      this.__index__ = 0;
+      this.__values__ = undefined;
+    }
+
+    /**
+     * By default, the template delimiters used by lodash are like those in
+     * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+     * following template settings to use alternative delimiters.
+     *
+     * @static
+     * @memberOf _
+     * @type {Object}
+     */
+    lodash.templateSettings = {
+
+      /**
+       * Used to detect `data` property values to be HTML-escaped.
+       *
+       * @memberOf _.templateSettings
+       * @type {RegExp}
+       */
+      'escape': reEscape,
+
+      /**
+       * Used to detect code to be evaluated.
+       *
+       * @memberOf _.templateSettings
+       * @type {RegExp}
+       */
+      'evaluate': reEvaluate,
+
+      /**
+       * Used to detect `data` property values to inject.
+       *
+       * @memberOf _.templateSettings
+       * @type {RegExp}
+       */
+      'interpolate': reInterpolate,
+
+      /**
+       * Used to reference the data object in the template text.
+       *
+       * @memberOf _.templateSettings
+       * @type {string}
+       */
+      'variable': '',
+
+      /**
+       * Used to import variables into the compiled template.
+       *
+       * @memberOf _.templateSettings
+       * @type {Object}
+       */
+      'imports': {
+
+        /**
+         * A reference to the `lodash` function.
+         *
+         * @memberOf _.templateSettings.imports
+         * @type {Function}
+         */
+        '_': lodash
+      }
+    };
+
+    // Ensure wrappers are instances of `baseLodash`.
+    lodash.prototype = baseLodash.prototype;
+    lodash.prototype.constructor = lodash;
+
+    LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+    LodashWrapper.prototype.constructor = LodashWrapper;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+     *
+     * @private
+     * @constructor
+     * @param {*} value The value to wrap.
+     */
+    function LazyWrapper(value) {
+      this.__wrapped__ = value;
+      this.__actions__ = [];
+      this.__dir__ = 1;
+      this.__filtered__ = false;
+      this.__iteratees__ = [];
+      this.__takeCount__ = MAX_ARRAY_LENGTH;
+      this.__views__ = [];
+    }
+
+    /**
+     * Creates a clone of the lazy wrapper object.
+     *
+     * @private
+     * @name clone
+     * @memberOf LazyWrapper
+     * @returns {Object} Returns the cloned `LazyWrapper` object.
+     */
+    function lazyClone() {
+      var result = new LazyWrapper(this.__wrapped__);
+      result.__actions__ = copyArray(this.__actions__);
+      result.__dir__ = this.__dir__;
+      result.__filtered__ = this.__filtered__;
+      result.__iteratees__ = copyArray(this.__iteratees__);
+      result.__takeCount__ = this.__takeCount__;
+      result.__views__ = copyArray(this.__views__);
+      return result;
+    }
+
+    /**
+     * Reverses the direction of lazy iteration.
+     *
+     * @private
+     * @name reverse
+     * @memberOf LazyWrapper
+     * @returns {Object} Returns the new reversed `LazyWrapper` object.
+     */
+    function lazyReverse() {
+      if (this.__filtered__) {
+        var result = new LazyWrapper(this);
+        result.__dir__ = -1;
+        result.__filtered__ = true;
+      } else {
+        result = this.clone();
+        result.__dir__ *= -1;
+      }
+      return result;
+    }
+
+    /**
+     * Extracts the unwrapped value from its lazy wrapper.
+     *
+     * @private
+     * @name value
+     * @memberOf LazyWrapper
+     * @returns {*} Returns the unwrapped value.
+     */
+    function lazyValue() {
+      var array = this.__wrapped__.value(),
+          dir = this.__dir__,
+          isArr = isArray(array),
+          isRight = dir < 0,
+          arrLength = isArr ? array.length : 0,
+          view = getView(0, arrLength, this.__views__),
+          start = view.start,
+          end = view.end,
+          length = end - start,
+          index = isRight ? end : (start - 1),
+          iteratees = this.__iteratees__,
+          iterLength = iteratees.length,
+          resIndex = 0,
+          takeCount = nativeMin(length, this.__takeCount__);
+
+      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+        return baseWrapperValue(array, this.__actions__);
+      }
+      var result = [];
+
+      outer:
+      while (length-- && resIndex < takeCount) {
+        index += dir;
+
+        var iterIndex = -1,
+            value = array[index];
+
+        while (++iterIndex < iterLength) {
+          var data = iteratees[iterIndex],
+              iteratee = data.iteratee,
+              type = data.type,
+              computed = iteratee(value);
+
+          if (type == LAZY_MAP_FLAG) {
+            value = computed;
+          } else if (!computed) {
+            if (type == LAZY_FILTER_FLAG) {
+              continue outer;
+            } else {
+              break outer;
+            }
+          }
+        }
+        result[resIndex++] = value;
+      }
+      return result;
+    }
+
+    // Ensure `LazyWrapper` is an instance of `baseLodash`.
+    LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+    LazyWrapper.prototype.constructor = LazyWrapper;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates a hash object.
+     *
+     * @private
+     * @constructor
+     * @param {Array} [entries] The key-value pairs to cache.
+     */
+    function Hash(entries) {
+      var index = -1,
+          length = entries == null ? 0 : entries.length;
+
+      this.clear();
+      while (++index < length) {
+        var entry = entries[index];
+        this.set(entry[0], entry[1]);
+      }
+    }
+
+    /**
+     * Removes all key-value entries from the hash.
+     *
+     * @private
+     * @name clear
+     * @memberOf Hash
+     */
+    function hashClear() {
+      this.__data__ = nativeCreate ? nativeCreate(null) : {};
+      this.size = 0;
+    }
+
+    /**
+     * Removes `key` and its value from the hash.
+     *
+     * @private
+     * @name delete
+     * @memberOf Hash
+     * @param {Object} hash The hash to modify.
+     * @param {string} key The key of the value to remove.
+     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+     */
+    function hashDelete(key) {
+      var result = this.has(key) && delete this.__data__[key];
+      this.size -= result ? 1 : 0;
+      return result;
+    }
+
+    /**
+     * Gets the hash value for `key`.
+     *
+     * @private
+     * @name get
+     * @memberOf Hash
+     * @param {string} key The key of the value to get.
+     * @returns {*} Returns the entry value.
+     */
+    function hashGet(key) {
+      var data = this.__data__;
+      if (nativeCreate) {
+        var result = data[key];
+        return result === HASH_UNDEFINED ? undefined : result;
+      }
+      return hasOwnProperty.call(data, key) ? data[key] : undefined;
+    }
+
+    /**
+     * Checks if a hash value for `key` exists.
+     *
+     * @private
+     * @name has
+     * @memberOf Hash
+     * @param {string} key The key of the entry to check.
+     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+     */
+    function hashHas(key) {
+      var data = this.__data__;
+      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+    }
+
+    /**
+     * Sets the hash `key` to `value`.
+     *
+     * @private
+     * @name set
+     * @memberOf Hash
+     * @param {string} key The key of the value to set.
+     * @param {*} value The value to set.
+     * @returns {Object} Returns the hash instance.
+     */
+    function hashSet(key, value) {
+      var data = this.__data__;
+      this.size += this.has(key) ? 0 : 1;
+      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+      return this;
+    }
+
+    // Add methods to `Hash`.
+    Hash.prototype.clear = hashClear;
+    Hash.prototype['delete'] = hashDelete;
+    Hash.prototype.get = hashGet;
+    Hash.prototype.has = hashHas;
+    Hash.prototype.set = hashSet;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates an list cache object.
+     *
+     * @private
+     * @constructor
+     * @param {Array} [entries] The key-value pairs to cache.
+     */
+    function ListCache(entries) {
+      var index = -1,
+          length = entries == null ? 0 : entries.length;
+
+      this.clear();
+      while (++index < length) {
+        var entry = entries[index];
+        this.set(entry[0], entry[1]);
+      }
+    }
+
+    /**
+     * Removes all key-value entries from the list cache.
+     *
+     * @private
+     * @name clear
+     * @memberOf ListCache
+     */
+    function listCacheClear() {
+      this.__data__ = [];
+      this.size = 0;
+    }
+
+    /**
+     * Removes `key` and its value from the list cache.
+     *
+     * @private
+     * @name delete
+     * @memberOf ListCache
+     * @param {string} key The key of the value to remove.
+     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+     */
+    function listCacheDelete(key) {
+      var data = this.__data__,
+          index = assocIndexOf(data, key);
+
+      if (index < 0) {
+        return false;
+      }
+      var lastIndex = data.length - 1;
+      if (index == lastIndex) {
+        data.pop();
+      } else {
+        splice.call(data, index, 1);
+      }
+      --this.size;
+      return true;
+    }
+
+    /**
+     * Gets the list cache value for `key`.
+     *
+     * @private
+     * @name get
+     * @memberOf ListCache
+     * @param {string} key The key of the value to get.
+     * @returns {*} Returns the entry value.
+     */
+    function listCacheGet(key) {
+      var data = this.__data__,
+          index = assocIndexOf(data, key);
+
+      return index < 0 ? undefined : data[index][1];
+    }
+
+    /**
+     * Checks if a list cache value for `key` exists.
+     *
+     * @private
+     * @name has
+     * @memberOf ListCache
+     * @param {string} key The key of the entry to check.
+     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+     */
+    function listCacheHas(key) {
+      return assocIndexOf(this.__data__, key) > -1;
+    }
+
+    /**
+     * Sets the list cache `key` to `value`.
+     *
+     * @private
+     * @name set
+     * @memberOf ListCache
+     * @param {string} key The key of the value to set.
+     * @param {*} value The value to set.
+     * @returns {Object} Returns the list cache instance.
+     */
+    function listCacheSet(key, value) {
+      var data = this.__data__,
+          index = assocIndexOf(data, key);
+
+      if (index < 0) {
+        ++this.size;
+        data.push([key, value]);
+      } else {
+        data[index][1] = value;
+      }
+      return this;
+    }
+
+    // Add methods to `ListCache`.
+    ListCache.prototype.clear = listCacheClear;
+    ListCache.prototype['delete'] = listCacheDelete;
+    ListCache.prototype.get = listCacheGet;
+    ListCache.prototype.has = listCacheHas;
+    ListCache.prototype.set = listCacheSet;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates a map cache object to store key-value pairs.
+     *
+     * @private
+     * @constructor
+     * @param {Array} [entries] The key-value pairs to cache.
+     */
+    function MapCache(entries) {
+      var index = -1,
+          length = entries == null ? 0 : entries.length;
+
+      this.clear();
+      while (++index < length) {
+        var entry = entries[index];
+        this.set(entry[0], entry[1]);
+      }
+    }
+
+    /**
+     * Removes all key-value entries from the map.
+     *
+     * @private
+     * @name clear
+     * @memberOf MapCache
+     */
+    function mapCacheClear() {
+      this.size = 0;
+      this.__data__ = {
+        'hash': new Hash,
+        'map': new (Map || ListCache),
+        'string': new Hash
+      };
+    }
+
+    /**
+     * Removes `key` and its value from the map.
+     *
+     * @private
+     * @name delete
+     * @memberOf MapCache
+     * @param {string} key The key of the value to remove.
+     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+     */
+    function mapCacheDelete(key) {
+      var result = getMapData(this, key)['delete'](key);
+      this.size -= result ? 1 : 0;
+      return result;
+    }
+
+    /**
+     * Gets the map value for `key`.
+     *
+     * @private
+     * @name get
+     * @memberOf MapCache
+     * @param {string} key The key of the value to get.
+     * @returns {*} Returns the entry value.
+     */
+    function mapCacheGet(key) {
+      return getMapData(this, key).get(key);
+    }
+
+    /**
+     * Checks if a map value for `key` exists.
+     *
+     * @private
+     * @name has
+     * @memberOf MapCache
+     * @param {string} key The key of the entry to check.
+     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+     */
+    function mapCacheHas(key) {
+      return getMapData(this, key).has(key);
+    }
+
+    /**
+     * Sets the map `key` to `value`.
+     *
+     * @private
+     * @name set
+     * @memberOf MapCache
+     * @param {string} key The key of the value to set.
+     * @param {*} value The value to set.
+     * @returns {Object} Returns the map cache instance.
+     */
+    function mapCacheSet(key, value) {
+      var data = getMapData(this, key),
+          size = data.size;
+
+      data.set(key, value);
+      this.size += data.size == size ? 0 : 1;
+      return this;
+    }
+
+    // Add methods to `MapCache`.
+    MapCache.prototype.clear = mapCacheClear;
+    MapCache.prototype['delete'] = mapCacheDelete;
+    MapCache.prototype.get = mapCacheGet;
+    MapCache.prototype.has = mapCacheHas;
+    MapCache.prototype.set = mapCacheSet;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     *
+     * Creates an array cache object to store unique values.
+     *
+     * @private
+     * @constructor
+     * @param {Array} [values] The values to cache.
+     */
+    function SetCache(values) {
+      var index = -1,
+          length = values == null ? 0 : values.length;
+
+      this.__data__ = new MapCache;
+      while (++index < length) {
+        this.add(values[index]);
+      }
+    }
+
+    /**
+     * Adds `value` to the array cache.
+     *
+     * @private
+     * @name add
+     * @memberOf SetCache
+     * @alias push
+     * @param {*} value The value to cache.
+     * @returns {Object} Returns the cache instance.
+     */
+    function setCacheAdd(value) {
+      this.__data__.set(value, HASH_UNDEFINED);
+      return this;
+    }
+
+    /**
+     * Checks if `value` is in the array cache.
+     *
+     * @private
+     * @name has
+     * @memberOf SetCache
+     * @param {*} value The value to search for.
+     * @returns {number} Returns `true` if `value` is found, else `false`.
+     */
+    function setCacheHas(value) {
+      return this.__data__.has(value);
+    }
+
+    // Add methods to `SetCache`.
+    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+    SetCache.prototype.has = setCacheHas;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates a stack cache object to store key-value pairs.
+     *
+     * @private
+     * @constructor
+     * @param {Array} [entries] The key-value pairs to cache.
+     */
+    function Stack(entries) {
+      var data = this.__data__ = new ListCache(entries);
+      this.size = data.size;
+    }
+
+    /**
+     * Removes all key-value entries from the stack.
+     *
+     * @private
+     * @name clear
+     * @memberOf Stack
+     */
+    function stackClear() {
+      this.__data__ = new ListCache;
+      this.size = 0;
+    }
+
+    /**
+     * Removes `key` and its value from the stack.
+     *
+     * @private
+     * @name delete
+     * @memberOf Stack
+     * @param {string} key The key of the value to remove.
+     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+     */
+    function stackDelete(key) {
+      var data = this.__data__,
+          result = data['delete'](key);
+
+      this.size = data.size;
+      return result;
+    }
+
+    /**
+     * Gets the stack value for `key`.
+     *
+     * @private
+     * @name get
+     * @memberOf Stack
+     * @param {string} key The key of the value to get.
+     * @returns {*} Returns the entry value.
+     */
+    function stackGet(key) {
+      return this.__data__.get(key);
+    }
+
+    /**
+     * Checks if a stack value for `key` exists.
+     *
+     * @private
+     * @name has
+     * @memberOf Stack
+     * @param {string} key The key of the entry to check.
+     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+     */
+    function stackHas(key) {
+      return this.__data__.has(key);
+    }
+
+    /**
+     * Sets the stack `key` to `value`.
+     *
+     * @private
+     * @name set
+     * @memberOf Stack
+     * @param {string} key The key of the value to set.
+     * @param {*} value The value to set.
+     * @returns {Object} Returns the stack cache instance.
+     */
+    function stackSet(key, value) {
+      var data = this.__data__;
+      if (data instanceof ListCache) {
+        var pairs = data.__data__;
+        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+          pairs.push([key, value]);
+          this.size = ++data.size;
+          return this;
+        }
+        data = this.__data__ = new MapCache(pairs);
+      }
+      data.set(key, value);
+      this.size = data.size;
+      return this;
+    }
+
+    // Add methods to `Stack`.
+    Stack.prototype.clear = stackClear;
+    Stack.prototype['delete'] = stackDelete;
+    Stack.prototype.get = stackGet;
+    Stack.prototype.has = stackHas;
+    Stack.prototype.set = stackSet;
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates an array of the enumerable property names of the array-like `value`.
+     *
+     * @private
+     * @param {*} value The value to query.
+     * @param {boolean} inherited Specify returning inherited property names.
+     * @returns {Array} Returns the array of property names.
+     */
+    function arrayLikeKeys(value, inherited) {
+      var isArr = isArray(value),
+          isArg = !isArr && isArguments(value),
+          isBuff = !isArr && !isArg && isBuffer(value),
+          isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+          skipIndexes = isArr || isArg || isBuff || isType,
+          result = skipIndexes ? baseTimes(value.length, String) : [],
+          length = result.length;
+
+      for (var key in value) {
+        if ((inherited || hasOwnProperty.call(value, key)) &&
+            !(skipIndexes && (
+               // Safari 9 has enumerable `arguments.length` in strict mode.
+               key == 'length' ||
+               // Node.js 0.10 has enumerable non-index properties on buffers.
+               (isBuff && (key == 'offset' || key == 'parent')) ||
+               // PhantomJS 2 has enumerable non-index properties on typed arrays.
+               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+               // Skip index properties.
+               isIndex(key, length)
+            ))) {
+          result.push(key);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * A specialized version of `_.sample` for arrays.
+     *
+     * @private
+     * @param {Array} array The array to sample.
+     * @returns {*} Returns the random element.
+     */
+    function arraySample(array) {
+      var length = array.length;
+      return length ? array[baseRandom(0, length - 1)] : undefined;
+    }
+
+    /**
+     * A specialized version of `_.sampleSize` for arrays.
+     *
+     * @private
+     * @param {Array} array The array to sample.
+     * @param {number} n The number of elements to sample.
+     * @returns {Array} Returns the random elements.
+     */
+    function arraySampleSize(array, n) {
+      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+    }
+
+    /**
+     * A specialized version of `_.shuffle` for arrays.
+     *
+     * @private
+     * @param {Array} array The array to shuffle.
+     * @returns {Array} Returns the new shuffled array.
+     */
+    function arrayShuffle(array) {
+      return shuffleSelf(copyArray(array));
+    }
+
+    /**
+     * This function is like `assignValue` except that it doesn't assign
+     * `undefined` values.
+     *
+     * @private
+     * @param {Object} object The object to modify.
+     * @param {string} key The key of the property to assign.
+     * @param {*} value The value to assign.
+     */
+    function assignMergeValue(object, key, value) {
+      if ((value !== undefined && !eq(object[key], value)) ||
+          (value === undefined && !(key in object))) {
+        baseAssignValue(object, key, value);
+      }
+    }
+
+    /**
+     * Assigns `value` to `key` of `object` if the existing value is not equivalent
+     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons.
+     *
+     * @private
+     * @param {Object} object The object to modify.
+     * @param {string} key The key of the property to assign.
+     * @param {*} value The value to assign.
+     */
+    function assignValue(object, key, value) {
+      var objValue = object[key];
+      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+          (value === undefined && !(key in object))) {
+        baseAssignValue(object, key, value);
+      }
+    }
+
+    /**
+     * Gets the index at which the `key` is found in `array` of key-value pairs.
+     *
+     * @private
+     * @param {Array} array The array to inspect.
+     * @param {*} key The key to search for.
+     * @returns {number} Returns the index of the matched value, else `-1`.
+     */
+    function assocIndexOf(array, key) {
+      var length = array.length;
+      while (length--) {
+        if (eq(array[length][0], key)) {
+          return length;
+        }
+      }
+      return -1;
+    }
+
+    /**
+     * Aggregates elements of `collection` on `accumulator` with keys transformed
+     * by `iteratee` and values set by `setter`.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} setter The function to set `accumulator` values.
+     * @param {Function} iteratee The iteratee to transform keys.
+     * @param {Object} accumulator The initial aggregated object.
+     * @returns {Function} Returns `accumulator`.
+     */
+    function baseAggregator(collection, setter, iteratee, accumulator) {
+      baseEach(collection, function(value, key, collection) {
+        setter(accumulator, value, iteratee(value), collection);
+      });
+      return accumulator;
+    }
+
+    /**
+     * The base implementation of `_.assign` without support for multiple sources
+     * or `customizer` functions.
+     *
+     * @private
+     * @param {Object} object The destination object.
+     * @param {Object} source The source object.
+     * @returns {Object} Returns `object`.
+     */
+    function baseAssign(object, source) {
+      return object && copyObject(source, keys(source), object);
+    }
+
+    /**
+     * The base implementation of `_.assignIn` without support for multiple sources
+     * or `customizer` functions.
+     *
+     * @private
+     * @param {Object} object The destination object.
+     * @param {Object} source The source object.
+     * @returns {Object} Returns `object`.
+     */
+    function baseAssignIn(object, source) {
+      return object && copyObject(source, keysIn(source), object);
+    }
+
+    /**
+     * The base implementation of `assignValue` and `assignMergeValue` without
+     * value checks.
+     *
+     * @private
+     * @param {Object} object The object to modify.
+     * @param {string} key The key of the property to assign.
+     * @param {*} value The value to assign.
+     */
+    function baseAssignValue(object, key, value) {
+      if (key == '__proto__' && defineProperty) {
+        defineProperty(object, key, {
+          'configurable': true,
+          'enumerable': true,
+          'value': value,
+          'writable': true
+        });
+      } else {
+        object[key] = value;
+      }
+    }
+
+    /**
+     * The base implementation of `_.at` without support for individual paths.
+     *
+     * @private
+     * @param {Object} object The object to iterate over.
+     * @param {string[]} paths The property paths to pick.
+     * @returns {Array} Returns the picked elements.
+     */
+    function baseAt(object, paths) {
+      var index = -1,
+          length = paths.length,
+          result = Array(length),
+          skip = object == null;
+
+      while (++index < length) {
+        result[index] = skip ? undefined : get(object, paths[index]);
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.clamp` which doesn't coerce arguments.
+     *
+     * @private
+     * @param {number} number The number to clamp.
+     * @param {number} [lower] The lower bound.
+     * @param {number} upper The upper bound.
+     * @returns {number} Returns the clamped number.
+     */
+    function baseClamp(number, lower, upper) {
+      if (number === number) {
+        if (upper !== undefined) {
+          number = number <= upper ? number : upper;
+        }
+        if (lower !== undefined) {
+          number = number >= lower ? number : lower;
+        }
+      }
+      return number;
+    }
+
+    /**
+     * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+     * traversed objects.
+     *
+     * @private
+     * @param {*} value The value to clone.
+     * @param {boolean} bitmask The bitmask flags.
+     *  1 - Deep clone
+     *  2 - Flatten inherited properties
+     *  4 - Clone symbols
+     * @param {Function} [customizer] The function to customize cloning.
+     * @param {string} [key] The key of `value`.
+     * @param {Object} [object] The parent object of `value`.
+     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+     * @returns {*} Returns the cloned value.
+     */
+    function baseClone(value, bitmask, customizer, key, object, stack) {
+      var result,
+          isDeep = bitmask & CLONE_DEEP_FLAG,
+          isFlat = bitmask & CLONE_FLAT_FLAG,
+          isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+      if (customizer) {
+        result = object ? customizer(value, key, object, stack) : customizer(value);
+      }
+      if (result !== undefined) {
+        return result;
+      }
+      if (!isObject(value)) {
+        return value;
+      }
+      var isArr = isArray(value);
+      if (isArr) {
+        result = initCloneArray(value);
+        if (!isDeep) {
+          return copyArray(value, result);
+        }
+      } else {
+        var tag = getTag(value),
+            isFunc = tag == funcTag || tag == genTag;
+
+        if (isBuffer(value)) {
+          return cloneBuffer(value, isDeep);
+        }
+        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+          result = (isFlat || isFunc) ? {} : initCloneObject(value);
+          if (!isDeep) {
+            return isFlat
+              ? copySymbolsIn(value, baseAssignIn(result, value))
+              : copySymbols(value, baseAssign(result, value));
+          }
+        } else {
+          if (!cloneableTags[tag]) {
+            return object ? value : {};
+          }
+          result = initCloneByTag(value, tag, isDeep);
+        }
+      }
+      // Check for circular references and return its corresponding clone.
+      stack || (stack = new Stack);
+      var stacked = stack.get(value);
+      if (stacked) {
+        return stacked;
+      }
+      stack.set(value, result);
+
+      if (isSet(value)) {
+        value.forEach(function(subValue) {
+          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+        });
+      } else if (isMap(value)) {
+        value.forEach(function(subValue, key) {
+          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+        });
+      }
+
+      var keysFunc = isFull
+        ? (isFlat ? getAllKeysIn : getAllKeys)
+        : (isFlat ? keysIn : keys);
+
+      var props = isArr ? undefined : keysFunc(value);
+      arrayEach(props || value, function(subValue, key) {
+        if (props) {
+          key = subValue;
+          subValue = value[key];
+        }
+        // Recursively populate clone (susceptible to call stack limits).
+        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+      });
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.conforms` which doesn't clone `source`.
+     *
+     * @private
+     * @param {Object} source The object of property predicates to conform to.
+     * @returns {Function} Returns the new spec function.
+     */
+    function baseConforms(source) {
+      var props = keys(source);
+      return function(object) {
+        return baseConformsTo(object, source, props);
+      };
+    }
+
+    /**
+     * The base implementation of `_.conformsTo` which accepts `props` to check.
+     *
+     * @private
+     * @param {Object} object The object to inspect.
+     * @param {Object} source The object of property predicates to conform to.
+     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+     */
+    function baseConformsTo(object, source, props) {
+      var length = props.length;
+      if (object == null) {
+        return !length;
+      }
+      object = Object(object);
+      while (length--) {
+        var key = props[length],
+            predicate = source[key],
+            value = object[key];
+
+        if ((value === undefined && !(key in object)) || !predicate(value)) {
+          return false;
+        }
+      }
+      return true;
+    }
+
+    /**
+     * The base implementation of `_.delay` and `_.defer` which accepts `args`
+     * to provide to `func`.
+     *
+     * @private
+     * @param {Function} func The function to delay.
+     * @param {number} wait The number of milliseconds to delay invocation.
+     * @param {Array} args The arguments to provide to `func`.
+     * @returns {number|Object} Returns the timer id or timeout object.
+     */
+    function baseDelay(func, wait, args) {
+      if (typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      return setTimeout(function() { func.apply(undefined, args); }, wait);
+    }
+
+    /**
+     * The base implementation of methods like `_.difference` without support
+     * for excluding multiple arrays or iteratee shorthands.
+     *
+     * @private
+     * @param {Array} array The array to inspect.
+     * @param {Array} values The values to exclude.
+     * @param {Function} [iteratee] The iteratee invoked per element.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new array of filtered values.
+     */
+    function baseDifference(array, values, iteratee, comparator) {
+      var index = -1,
+          includes = arrayIncludes,
+          isCommon = true,
+          length = array.length,
+          result = [],
+          valuesLength = values.length;
+
+      if (!length) {
+        return result;
+      }
+      if (iteratee) {
+        values = arrayMap(values, baseUnary(iteratee));
+      }
+      if (comparator) {
+        includes = arrayIncludesWith;
+        isCommon = false;
+      }
+      else if (values.length >= LARGE_ARRAY_SIZE) {
+        includes = cacheHas;
+        isCommon = false;
+        values = new SetCache(values);
+      }
+      outer:
+      while (++index < length) {
+        var value = array[index],
+            computed = iteratee == null ? value : iteratee(value);
+
+        value = (comparator || value !== 0) ? value : 0;
+        if (isCommon && computed === computed) {
+          var valuesIndex = valuesLength;
+          while (valuesIndex--) {
+            if (values[valuesIndex] === computed) {
+              continue outer;
+            }
+          }
+          result.push(value);
+        }
+        else if (!includes(values, computed, comparator)) {
+          result.push(value);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.forEach` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} iteratee The function invoked per iteration.
+     * @returns {Array|Object} Returns `collection`.
+     */
+    var baseEach = createBaseEach(baseForOwn);
+
+    /**
+     * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} iteratee The function invoked per iteration.
+     * @returns {Array|Object} Returns `collection`.
+     */
+    var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+    /**
+     * The base implementation of `_.every` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} predicate The function invoked per iteration.
+     * @returns {boolean} Returns `true` if all elements pass the predicate check,
+     *  else `false`
+     */
+    function baseEvery(collection, predicate) {
+      var result = true;
+      baseEach(collection, function(value, index, collection) {
+        result = !!predicate(value, index, collection);
+        return result;
+      });
+      return result;
+    }
+
+    /**
+     * The base implementation of methods like `_.max` and `_.min` which accepts a
+     * `comparator` to determine the extremum value.
+     *
+     * @private
+     * @param {Array} array The array to iterate over.
+     * @param {Function} iteratee The iteratee invoked per iteration.
+     * @param {Function} comparator The comparator used to compare values.
+     * @returns {*} Returns the extremum value.
+     */
+    function baseExtremum(array, iteratee, comparator) {
+      var index = -1,
+          length = array.length;
+
+      while (++index < length) {
+        var value = array[index],
+            current = iteratee(value);
+
+        if (current != null && (computed === undefined
+              ? (current === current && !isSymbol(current))
+              : comparator(current, computed)
+            )) {
+          var computed = current,
+              result = value;
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.fill` without an iteratee call guard.
+     *
+     * @private
+     * @param {Array} array The array to fill.
+     * @param {*} value The value to fill `array` with.
+     * @param {number} [start=0] The start position.
+     * @param {number} [end=array.length] The end position.
+     * @returns {Array} Returns `array`.
+     */
+    function baseFill(array, value, start, end) {
+      var length = array.length;
+
+      start = toInteger(start);
+      if (start < 0) {
+        start = -start > length ? 0 : (length + start);
+      }
+      end = (end === undefined || end > length) ? length : toInteger(end);
+      if (end < 0) {
+        end += length;
+      }
+      end = start > end ? 0 : toLength(end);
+      while (start < end) {
+        array[start++] = value;
+      }
+      return array;
+    }
+
+    /**
+     * The base implementation of `_.filter` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} predicate The function invoked per iteration.
+     * @returns {Array} Returns the new filtered array.
+     */
+    function baseFilter(collection, predicate) {
+      var result = [];
+      baseEach(collection, function(value, index, collection) {
+        if (predicate(value, index, collection)) {
+          result.push(value);
+        }
+      });
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.flatten` with support for restricting flattening.
+     *
+     * @private
+     * @param {Array} array The array to flatten.
+     * @param {number} depth The maximum recursion depth.
+     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+     * @param {Array} [result=[]] The initial result value.
+     * @returns {Array} Returns the new flattened array.
+     */
+    function baseFlatten(array, depth, predicate, isStrict, result) {
+      var index = -1,
+          length = array.length;
+
+      predicate || (predicate = isFlattenable);
+      result || (result = []);
+
+      while (++index < length) {
+        var value = array[index];
+        if (depth > 0 && predicate(value)) {
+          if (depth > 1) {
+            // Recursively flatten arrays (susceptible to call stack limits).
+            baseFlatten(value, depth - 1, predicate, isStrict, result);
+          } else {
+            arrayPush(result, value);
+          }
+        } else if (!isStrict) {
+          result[result.length] = value;
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `baseForOwn` which iterates over `object`
+     * properties returned by `keysFunc` and invokes `iteratee` for each property.
+     * Iteratee functions may exit iteration early by explicitly returning `false`.
+     *
+     * @private
+     * @param {Object} object The object to iterate over.
+     * @param {Function} iteratee The function invoked per iteration.
+     * @param {Function} keysFunc The function to get the keys of `object`.
+     * @returns {Object} Returns `object`.
+     */
+    var baseFor = createBaseFor();
+
+    /**
+     * This function is like `baseFor` except that it iterates over properties
+     * in the opposite order.
+     *
+     * @private
+     * @param {Object} object The object to iterate over.
+     * @param {Function} iteratee The function invoked per iteration.
+     * @param {Function} keysFunc The function to get the keys of `object`.
+     * @returns {Object} Returns `object`.
+     */
+    var baseForRight = createBaseFor(true);
+
+    /**
+     * The base implementation of `_.forOwn` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Object} object The object to iterate over.
+     * @param {Function} iteratee The function invoked per iteration.
+     * @returns {Object} Returns `object`.
+     */
+    function baseForOwn(object, iteratee) {
+      return object && baseFor(object, iteratee, keys);
+    }
+
+    /**
+     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Object} object The object to iterate over.
+     * @param {Function} iteratee The function invoked per iteration.
+     * @returns {Object} Returns `object`.
+     */
+    function baseForOwnRight(object, iteratee) {
+      return object && baseForRight(object, iteratee, keys);
+    }
+
+    /**
+     * The base implementation of `_.functions` which creates an array of
+     * `object` function property names filtered from `props`.
+     *
+     * @private
+     * @param {Object} object The object to inspect.
+     * @param {Array} props The property names to filter.
+     * @returns {Array} Returns the function names.
+     */
+    function baseFunctions(object, props) {
+      return arrayFilter(props, function(key) {
+        return isFunction(object[key]);
+      });
+    }
+
+    /**
+     * The base implementation of `_.get` without support for default values.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path of the property to get.
+     * @returns {*} Returns the resolved value.
+     */
+    function baseGet(object, path) {
+      path = castPath(path, object);
+
+      var index = 0,
+          length = path.length;
+
+      while (object != null && index < length) {
+        object = object[toKey(path[index++])];
+      }
+      return (index && index == length) ? object : undefined;
+    }
+
+    /**
+     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+     * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+     * symbols of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @param {Function} keysFunc The function to get the keys of `object`.
+     * @param {Function} symbolsFunc The function to get the symbols of `object`.
+     * @returns {Array} Returns the array of property names and symbols.
+     */
+    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+      var result = keysFunc(object);
+      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+    }
+
+    /**
+     * The base implementation of `getTag` without fallbacks for buggy environments.
+     *
+     * @private
+     * @param {*} value The value to query.
+     * @returns {string} Returns the `toStringTag`.
+     */
+    function baseGetTag(value) {
+      if (value == null) {
+        return value === undefined ? undefinedTag : nullTag;
+      }
+      return (symToStringTag && symToStringTag in Object(value))
+        ? getRawTag(value)
+        : objectToString(value);
+    }
+
+    /**
+     * The base implementation of `_.gt` which doesn't coerce arguments.
+     *
+     * @private
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if `value` is greater than `other`,
+     *  else `false`.
+     */
+    function baseGt(value, other) {
+      return value > other;
+    }
+
+    /**
+     * The base implementation of `_.has` without support for deep paths.
+     *
+     * @private
+     * @param {Object} [object] The object to query.
+     * @param {Array|string} key The key to check.
+     * @returns {boolean} Returns `true` if `key` exists, else `false`.
+     */
+    function baseHas(object, key) {
+      return object != null && hasOwnProperty.call(object, key);
+    }
+
+    /**
+     * The base implementation of `_.hasIn` without support for deep paths.
+     *
+     * @private
+     * @param {Object} [object] The object to query.
+     * @param {Array|string} key The key to check.
+     * @returns {boolean} Returns `true` if `key` exists, else `false`.
+     */
+    function baseHasIn(object, key) {
+      return object != null && key in Object(object);
+    }
+
+    /**
+     * The base implementation of `_.inRange` which doesn't coerce arguments.
+     *
+     * @private
+     * @param {number} number The number to check.
+     * @param {number} start The start of the range.
+     * @param {number} end The end of the range.
+     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+     */
+    function baseInRange(number, start, end) {
+      return number >= nativeMin(start, end) && number < nativeMax(start, end);
+    }
+
+    /**
+     * The base implementation of methods like `_.intersection`, without support
+     * for iteratee shorthands, that accepts an array of arrays to inspect.
+     *
+     * @private
+     * @param {Array} arrays The arrays to inspect.
+     * @param {Function} [iteratee] The iteratee invoked per element.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new array of shared values.
+     */
+    function baseIntersection(arrays, iteratee, comparator) {
+      var includes = comparator ? arrayIncludesWith : arrayIncludes,
+          length = arrays[0].length,
+          othLength = arrays.length,
+          othIndex = othLength,
+          caches = Array(othLength),
+          maxLength = Infinity,
+          result = [];
+
+      while (othIndex--) {
+        var array = arrays[othIndex];
+        if (othIndex && iteratee) {
+          array = arrayMap(array, baseUnary(iteratee));
+        }
+        maxLength = nativeMin(array.length, maxLength);
+        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+          ? new SetCache(othIndex && array)
+          : undefined;
+      }
+      array = arrays[0];
+
+      var index = -1,
+          seen = caches[0];
+
+      outer:
+      while (++index < length && result.length < maxLength) {
+        var value = array[index],
+            computed = iteratee ? iteratee(value) : value;
+
+        value = (comparator || value !== 0) ? value : 0;
+        if (!(seen
+              ? cacheHas(seen, computed)
+              : includes(result, computed, comparator)
+            )) {
+          othIndex = othLength;
+          while (--othIndex) {
+            var cache = caches[othIndex];
+            if (!(cache
+                  ? cacheHas(cache, computed)
+                  : includes(arrays[othIndex], computed, comparator))
+                ) {
+              continue outer;
+            }
+          }
+          if (seen) {
+            seen.push(computed);
+          }
+          result.push(value);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.invert` and `_.invertBy` which inverts
+     * `object` with values transformed by `iteratee` and set by `setter`.
+     *
+     * @private
+     * @param {Object} object The object to iterate over.
+     * @param {Function} setter The function to set `accumulator` values.
+     * @param {Function} iteratee The iteratee to transform values.
+     * @param {Object} accumulator The initial inverted object.
+     * @returns {Function} Returns `accumulator`.
+     */
+    function baseInverter(object, setter, iteratee, accumulator) {
+      baseForOwn(object, function(value, key, object) {
+        setter(accumulator, iteratee(value), key, object);
+      });
+      return accumulator;
+    }
+
+    /**
+     * The base implementation of `_.invoke` without support for individual
+     * method arguments.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path of the method to invoke.
+     * @param {Array} args The arguments to invoke the method with.
+     * @returns {*} Returns the result of the invoked method.
+     */
+    function baseInvoke(object, path, args) {
+      path = castPath(path, object);
+      object = parent(object, path);
+      var func = object == null ? object : object[toKey(last(path))];
+      return func == null ? undefined : apply(func, object, args);
+    }
+
+    /**
+     * The base implementation of `_.isArguments`.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+     */
+    function baseIsArguments(value) {
+      return isObjectLike(value) && baseGetTag(value) == argsTag;
+    }
+
+    /**
+     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+     */
+    function baseIsArrayBuffer(value) {
+      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+    }
+
+    /**
+     * The base implementation of `_.isDate` without Node.js optimizations.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+     */
+    function baseIsDate(value) {
+      return isObjectLike(value) && baseGetTag(value) == dateTag;
+    }
+
+    /**
+     * The base implementation of `_.isEqual` which supports partial comparisons
+     * and tracks traversed objects.
+     *
+     * @private
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @param {boolean} bitmask The bitmask flags.
+     *  1 - Unordered comparison
+     *  2 - Partial comparison
+     * @param {Function} [customizer] The function to customize comparisons.
+     * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+     */
+    function baseIsEqual(value, other, bitmask, customizer, stack) {
+      if (value === other) {
+        return true;
+      }
+      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+        return value !== value && other !== other;
+      }
+      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+    }
+
+    /**
+     * A specialized version of `baseIsEqual` for arrays and objects which performs
+     * deep comparisons and tracks traversed objects enabling objects with circular
+     * references to be compared.
+     *
+     * @private
+     * @param {Object} object The object to compare.
+     * @param {Object} other The other object to compare.
+     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+     * @param {Function} customizer The function to customize comparisons.
+     * @param {Function} equalFunc The function to determine equivalents of values.
+     * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+     */
+    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+      var objIsArr = isArray(object),
+          othIsArr = isArray(other),
+          objTag = objIsArr ? arrayTag : getTag(object),
+          othTag = othIsArr ? arrayTag : getTag(other);
+
+      objTag = objTag == argsTag ? objectTag : objTag;
+      othTag = othTag == argsTag ? objectTag : othTag;
+
+      var objIsObj = objTag == objectTag,
+          othIsObj = othTag == objectTag,
+          isSameTag = objTag == othTag;
+
+      if (isSameTag && isBuffer(object)) {
+        if (!isBuffer(other)) {
+          return false;
+        }
+        objIsArr = true;
+        objIsObj = false;
+      }
+      if (isSameTag && !objIsObj) {
+        stack || (stack = new Stack);
+        return (objIsArr || isTypedArray(object))
+          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+      }
+      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+        if (objIsWrapped || othIsWrapped) {
+          var objUnwrapped = objIsWrapped ? object.value() : object,
+              othUnwrapped = othIsWrapped ? other.value() : other;
+
+          stack || (stack = new Stack);
+          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+        }
+      }
+      if (!isSameTag) {
+        return false;
+      }
+      stack || (stack = new Stack);
+      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+    }
+
+    /**
+     * The base implementation of `_.isMap` without Node.js optimizations.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+     */
+    function baseIsMap(value) {
+      return isObjectLike(value) && getTag(value) == mapTag;
+    }
+
+    /**
+     * The base implementation of `_.isMatch` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Object} object The object to inspect.
+     * @param {Object} source The object of property values to match.
+     * @param {Array} matchData The property names, values, and compare flags to match.
+     * @param {Function} [customizer] The function to customize comparisons.
+     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+     */
+    function baseIsMatch(object, source, matchData, customizer) {
+      var index = matchData.length,
+          length = index,
+          noCustomizer = !customizer;
+
+      if (object == null) {
+        return !length;
+      }
+      object = Object(object);
+      while (index--) {
+        var data = matchData[index];
+        if ((noCustomizer && data[2])
+              ? data[1] !== object[data[0]]
+              : !(data[0] in object)
+            ) {
+          return false;
+        }
+      }
+      while (++index < length) {
+        data = matchData[index];
+        var key = data[0],
+            objValue = object[key],
+            srcValue = data[1];
+
+        if (noCustomizer && data[2]) {
+          if (objValue === undefined && !(key in object)) {
+            return false;
+          }
+        } else {
+          var stack = new Stack;
+          if (customizer) {
+            var result = customizer(objValue, srcValue, key, object, source, stack);
+          }
+          if (!(result === undefined
+                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+                : result
+              )) {
+            return false;
+          }
+        }
+      }
+      return true;
+    }
+
+    /**
+     * The base implementation of `_.isNative` without bad shim checks.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a native function,
+     *  else `false`.
+     */
+    function baseIsNative(value) {
+      if (!isObject(value) || isMasked(value)) {
+        return false;
+      }
+      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+      return pattern.test(toSource(value));
+    }
+
+    /**
+     * The base implementation of `_.isRegExp` without Node.js optimizations.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+     */
+    function baseIsRegExp(value) {
+      return isObjectLike(value) && baseGetTag(value) == regexpTag;
+    }
+
+    /**
+     * The base implementation of `_.isSet` without Node.js optimizations.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+     */
+    function baseIsSet(value) {
+      return isObjectLike(value) && getTag(value) == setTag;
+    }
+
+    /**
+     * The base implementation of `_.isTypedArray` without Node.js optimizations.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+     */
+    function baseIsTypedArray(value) {
+      return isObjectLike(value) &&
+        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+    }
+
+    /**
+     * The base implementation of `_.iteratee`.
+     *
+     * @private
+     * @param {*} [value=_.identity] The value to convert to an iteratee.
+     * @returns {Function} Returns the iteratee.
+     */
+    function baseIteratee(value) {
+      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+      if (typeof value == 'function') {
+        return value;
+      }
+      if (value == null) {
+        return identity;
+      }
+      if (typeof value == 'object') {
+        return isArray(value)
+          ? baseMatchesProperty(value[0], value[1])
+          : baseMatches(value);
+      }
+      return property(value);
+    }
+
+    /**
+     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property names.
+     */
+    function baseKeys(object) {
+      if (!isPrototype(object)) {
+        return nativeKeys(object);
+      }
+      var result = [];
+      for (var key in Object(object)) {
+        if (hasOwnProperty.call(object, key) && key != 'constructor') {
+          result.push(key);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property names.
+     */
+    function baseKeysIn(object) {
+      if (!isObject(object)) {
+        return nativeKeysIn(object);
+      }
+      var isProto = isPrototype(object),
+          result = [];
+
+      for (var key in object) {
+        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+          result.push(key);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.lt` which doesn't coerce arguments.
+     *
+     * @private
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if `value` is less than `other`,
+     *  else `false`.
+     */
+    function baseLt(value, other) {
+      return value < other;
+    }
+
+    /**
+     * The base implementation of `_.map` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} iteratee The function invoked per iteration.
+     * @returns {Array} Returns the new mapped array.
+     */
+    function baseMap(collection, iteratee) {
+      var index = -1,
+          result = isArrayLike(collection) ? Array(collection.length) : [];
+
+      baseEach(collection, function(value, key, collection) {
+        result[++index] = iteratee(value, key, collection);
+      });
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.matches` which doesn't clone `source`.
+     *
+     * @private
+     * @param {Object} source The object of property values to match.
+     * @returns {Function} Returns the new spec function.
+     */
+    function baseMatches(source) {
+      var matchData = getMatchData(source);
+      if (matchData.length == 1 && matchData[0][2]) {
+        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+      }
+      return function(object) {
+        return object === source || baseIsMatch(object, source, matchData);
+      };
+    }
+
+    /**
+     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+     *
+     * @private
+     * @param {string} path The path of the property to get.
+     * @param {*} srcValue The value to match.
+     * @returns {Function} Returns the new spec function.
+     */
+    function baseMatchesProperty(path, srcValue) {
+      if (isKey(path) && isStrictComparable(srcValue)) {
+        return matchesStrictComparable(toKey(path), srcValue);
+      }
+      return function(object) {
+        var objValue = get(object, path);
+        return (objValue === undefined && objValue === srcValue)
+          ? hasIn(object, path)
+          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+      };
+    }
+
+    /**
+     * The base implementation of `_.merge` without support for multiple sources.
+     *
+     * @private
+     * @param {Object} object The destination object.
+     * @param {Object} source The source object.
+     * @param {number} srcIndex The index of `source`.
+     * @param {Function} [customizer] The function to customize merged values.
+     * @param {Object} [stack] Tracks traversed source values and their merged
+     *  counterparts.
+     */
+    function baseMerge(object, source, srcIndex, customizer, stack) {
+      if (object === source) {
+        return;
+      }
+      baseFor(source, function(srcValue, key) {
+        stack || (stack = new Stack);
+        if (isObject(srcValue)) {
+          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+        }
+        else {
+          var newValue = customizer
+            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+            : undefined;
+
+          if (newValue === undefined) {
+            newValue = srcValue;
+          }
+          assignMergeValue(object, key, newValue);
+        }
+      }, keysIn);
+    }
+
+    /**
+     * A specialized version of `baseMerge` for arrays and objects which performs
+     * deep merges and tracks traversed objects enabling objects with circular
+     * references to be merged.
+     *
+     * @private
+     * @param {Object} object The destination object.
+     * @param {Object} source The source object.
+     * @param {string} key The key of the value to merge.
+     * @param {number} srcIndex The index of `source`.
+     * @param {Function} mergeFunc The function to merge values.
+     * @param {Function} [customizer] The function to customize assigned values.
+     * @param {Object} [stack] Tracks traversed source values and their merged
+     *  counterparts.
+     */
+    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+      var objValue = safeGet(object, key),
+          srcValue = safeGet(source, key),
+          stacked = stack.get(srcValue);
+
+      if (stacked) {
+        assignMergeValue(object, key, stacked);
+        return;
+      }
+      var newValue = customizer
+        ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+        : undefined;
+
+      var isCommon = newValue === undefined;
+
+      if (isCommon) {
+        var isArr = isArray(srcValue),
+            isBuff = !isArr && isBuffer(srcValue),
+            isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+        newValue = srcValue;
+        if (isArr || isBuff || isTyped) {
+          if (isArray(objValue)) {
+            newValue = objValue;
+          }
+          else if (isArrayLikeObject(objValue)) {
+            newValue = copyArray(objValue);
+          }
+          else if (isBuff) {
+            isCommon = false;
+            newValue = cloneBuffer(srcValue, true);
+          }
+          else if (isTyped) {
+            isCommon = false;
+            newValue = cloneTypedArray(srcValue, true);
+          }
+          else {
+            newValue = [];
+          }
+        }
+        else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+          newValue = objValue;
+          if (isArguments(objValue)) {
+            newValue = toPlainObject(objValue);
+          }
+          else if (!isObject(objValue) || isFunction(objValue)) {
+            newValue = initCloneObject(srcValue);
+          }
+        }
+        else {
+          isCommon = false;
+        }
+      }
+      if (isCommon) {
+        // Recursively merge objects and arrays (susceptible to call stack limits).
+        stack.set(srcValue, newValue);
+        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+        stack['delete'](srcValue);
+      }
+      assignMergeValue(object, key, newValue);
+    }
+
+    /**
+     * The base implementation of `_.nth` which doesn't coerce arguments.
+     *
+     * @private
+     * @param {Array} array The array to query.
+     * @param {number} n The index of the element to return.
+     * @returns {*} Returns the nth element of `array`.
+     */
+    function baseNth(array, n) {
+      var length = array.length;
+      if (!length) {
+        return;
+      }
+      n += n < 0 ? length : 0;
+      return isIndex(n, length) ? array[n] : undefined;
+    }
+
+    /**
+     * The base implementation of `_.orderBy` without param guards.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+     * @param {string[]} orders The sort orders of `iteratees`.
+     * @returns {Array} Returns the new sorted array.
+     */
+    function baseOrderBy(collection, iteratees, orders) {
+      var index = -1;
+      iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
+
+      var result = baseMap(collection, function(value, key, collection) {
+        var criteria = arrayMap(iteratees, function(iteratee) {
+          return iteratee(value);
+        });
+        return { 'criteria': criteria, 'index': ++index, 'value': value };
+      });
+
+      return baseSortBy(result, function(object, other) {
+        return compareMultiple(object, other, orders);
+      });
+    }
+
+    /**
+     * The base implementation of `_.pick` without support for individual
+     * property identifiers.
+     *
+     * @private
+     * @param {Object} object The source object.
+     * @param {string[]} paths The property paths to pick.
+     * @returns {Object} Returns the new object.
+     */
+    function basePick(object, paths) {
+      return basePickBy(object, paths, function(value, path) {
+        return hasIn(object, path);
+      });
+    }
+
+    /**
+     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Object} object The source object.
+     * @param {string[]} paths The property paths to pick.
+     * @param {Function} predicate The function invoked per property.
+     * @returns {Object} Returns the new object.
+     */
+    function basePickBy(object, paths, predicate) {
+      var index = -1,
+          length = paths.length,
+          result = {};
+
+      while (++index < length) {
+        var path = paths[index],
+            value = baseGet(object, path);
+
+        if (predicate(value, path)) {
+          baseSet(result, castPath(path, object), value);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * A specialized version of `baseProperty` which supports deep paths.
+     *
+     * @private
+     * @param {Array|string} path The path of the property to get.
+     * @returns {Function} Returns the new accessor function.
+     */
+    function basePropertyDeep(path) {
+      return function(object) {
+        return baseGet(object, path);
+      };
+    }
+
+    /**
+     * The base implementation of `_.pullAllBy` without support for iteratee
+     * shorthands.
+     *
+     * @private
+     * @param {Array} array The array to modify.
+     * @param {Array} values The values to remove.
+     * @param {Function} [iteratee] The iteratee invoked per element.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns `array`.
+     */
+    function basePullAll(array, values, iteratee, comparator) {
+      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+          index = -1,
+          length = values.length,
+          seen = array;
+
+      if (array === values) {
+        values = copyArray(values);
+      }
+      if (iteratee) {
+        seen = arrayMap(array, baseUnary(iteratee));
+      }
+      while (++index < length) {
+        var fromIndex = 0,
+            value = values[index],
+            computed = iteratee ? iteratee(value) : value;
+
+        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+          if (seen !== array) {
+            splice.call(seen, fromIndex, 1);
+          }
+          splice.call(array, fromIndex, 1);
+        }
+      }
+      return array;
+    }
+
+    /**
+     * The base implementation of `_.pullAt` without support for individual
+     * indexes or capturing the removed elements.
+     *
+     * @private
+     * @param {Array} array The array to modify.
+     * @param {number[]} indexes The indexes of elements to remove.
+     * @returns {Array} Returns `array`.
+     */
+    function basePullAt(array, indexes) {
+      var length = array ? indexes.length : 0,
+          lastIndex = length - 1;
+
+      while (length--) {
+        var index = indexes[length];
+        if (length == lastIndex || index !== previous) {
+          var previous = index;
+          if (isIndex(index)) {
+            splice.call(array, index, 1);
+          } else {
+            baseUnset(array, index);
+          }
+        }
+      }
+      return array;
+    }
+
+    /**
+     * The base implementation of `_.random` without support for returning
+     * floating-point numbers.
+     *
+     * @private
+     * @param {number} lower The lower bound.
+     * @param {number} upper The upper bound.
+     * @returns {number} Returns the random number.
+     */
+    function baseRandom(lower, upper) {
+      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+    }
+
+    /**
+     * The base implementation of `_.range` and `_.rangeRight` which doesn't
+     * coerce arguments.
+     *
+     * @private
+     * @param {number} start The start of the range.
+     * @param {number} end The end of the range.
+     * @param {number} step The value to increment or decrement by.
+     * @param {boolean} [fromRight] Specify iterating from right to left.
+     * @returns {Array} Returns the range of numbers.
+     */
+    function baseRange(start, end, step, fromRight) {
+      var index = -1,
+          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+          result = Array(length);
+
+      while (length--) {
+        result[fromRight ? length : ++index] = start;
+        start += step;
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.repeat` which doesn't coerce arguments.
+     *
+     * @private
+     * @param {string} string The string to repeat.
+     * @param {number} n The number of times to repeat the string.
+     * @returns {string} Returns the repeated string.
+     */
+    function baseRepeat(string, n) {
+      var result = '';
+      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+        return result;
+      }
+      // Leverage the exponentiation by squaring algorithm for a faster repeat.
+      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+      do {
+        if (n % 2) {
+          result += string;
+        }
+        n = nativeFloor(n / 2);
+        if (n) {
+          string += string;
+        }
+      } while (n);
+
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+     *
+     * @private
+     * @param {Function} func The function to apply a rest parameter to.
+     * @param {number} [start=func.length-1] The start position of the rest parameter.
+     * @returns {Function} Returns the new function.
+     */
+    function baseRest(func, start) {
+      return setToString(overRest(func, start, identity), func + '');
+    }
+
+    /**
+     * The base implementation of `_.sample`.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to sample.
+     * @returns {*} Returns the random element.
+     */
+    function baseSample(collection) {
+      return arraySample(values(collection));
+    }
+
+    /**
+     * The base implementation of `_.sampleSize` without param guards.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to sample.
+     * @param {number} n The number of elements to sample.
+     * @returns {Array} Returns the random elements.
+     */
+    function baseSampleSize(collection, n) {
+      var array = values(collection);
+      return shuffleSelf(array, baseClamp(n, 0, array.length));
+    }
+
+    /**
+     * The base implementation of `_.set`.
+     *
+     * @private
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The path of the property to set.
+     * @param {*} value The value to set.
+     * @param {Function} [customizer] The function to customize path creation.
+     * @returns {Object} Returns `object`.
+     */
+    function baseSet(object, path, value, customizer) {
+      if (!isObject(object)) {
+        return object;
+      }
+      path = castPath(path, object);
+
+      var index = -1,
+          length = path.length,
+          lastIndex = length - 1,
+          nested = object;
+
+      while (nested != null && ++index < length) {
+        var key = toKey(path[index]),
+            newValue = value;
+
+        if (index != lastIndex) {
+          var objValue = nested[key];
+          newValue = customizer ? customizer(objValue, key, nested) : undefined;
+          if (newValue === undefined) {
+            newValue = isObject(objValue)
+              ? objValue
+              : (isIndex(path[index + 1]) ? [] : {});
+          }
+        }
+        assignValue(nested, key, newValue);
+        nested = nested[key];
+      }
+      return object;
+    }
+
+    /**
+     * The base implementation of `setData` without support for hot loop shorting.
+     *
+     * @private
+     * @param {Function} func The function to associate metadata with.
+     * @param {*} data The metadata.
+     * @returns {Function} Returns `func`.
+     */
+    var baseSetData = !metaMap ? identity : function(func, data) {
+      metaMap.set(func, data);
+      return func;
+    };
+
+    /**
+     * The base implementation of `setToString` without support for hot loop shorting.
+     *
+     * @private
+     * @param {Function} func The function to modify.
+     * @param {Function} string The `toString` result.
+     * @returns {Function} Returns `func`.
+     */
+    var baseSetToString = !defineProperty ? identity : function(func, string) {
+      return defineProperty(func, 'toString', {
+        'configurable': true,
+        'enumerable': false,
+        'value': constant(string),
+        'writable': true
+      });
+    };
+
+    /**
+     * The base implementation of `_.shuffle`.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to shuffle.
+     * @returns {Array} Returns the new shuffled array.
+     */
+    function baseShuffle(collection) {
+      return shuffleSelf(values(collection));
+    }
+
+    /**
+     * The base implementation of `_.slice` without an iteratee call guard.
+     *
+     * @private
+     * @param {Array} array The array to slice.
+     * @param {number} [start=0] The start position.
+     * @param {number} [end=array.length] The end position.
+     * @returns {Array} Returns the slice of `array`.
+     */
+    function baseSlice(array, start, end) {
+      var index = -1,
+          length = array.length;
+
+      if (start < 0) {
+        start = -start > length ? 0 : (length + start);
+      }
+      end = end > length ? length : end;
+      if (end < 0) {
+        end += length;
+      }
+      length = start > end ? 0 : ((end - start) >>> 0);
+      start >>>= 0;
+
+      var result = Array(length);
+      while (++index < length) {
+        result[index] = array[index + start];
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.some` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} predicate The function invoked per iteration.
+     * @returns {boolean} Returns `true` if any element passes the predicate check,
+     *  else `false`.
+     */
+    function baseSome(collection, predicate) {
+      var result;
+
+      baseEach(collection, function(value, index, collection) {
+        result = predicate(value, index, collection);
+        return !result;
+      });
+      return !!result;
+    }
+
+    /**
+     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+     * performs a binary search of `array` to determine the index at which `value`
+     * should be inserted into `array` in order to maintain its sort order.
+     *
+     * @private
+     * @param {Array} array The sorted array to inspect.
+     * @param {*} value The value to evaluate.
+     * @param {boolean} [retHighest] Specify returning the highest qualified index.
+     * @returns {number} Returns the index at which `value` should be inserted
+     *  into `array`.
+     */
+    function baseSortedIndex(array, value, retHighest) {
+      var low = 0,
+          high = array == null ? low : array.length;
+
+      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+        while (low < high) {
+          var mid = (low + high) >>> 1,
+              computed = array[mid];
+
+          if (computed !== null && !isSymbol(computed) &&
+              (retHighest ? (computed <= value) : (computed < value))) {
+            low = mid + 1;
+          } else {
+            high = mid;
+          }
+        }
+        return high;
+      }
+      return baseSortedIndexBy(array, value, identity, retHighest);
+    }
+
+    /**
+     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+     * which invokes `iteratee` for `value` and each element of `array` to compute
+     * their sort ranking. The iteratee is invoked with one argument; (value).
+     *
+     * @private
+     * @param {Array} array The sorted array to inspect.
+     * @param {*} value The value to evaluate.
+     * @param {Function} iteratee The iteratee invoked per element.
+     * @param {boolean} [retHighest] Specify returning the highest qualified index.
+     * @returns {number} Returns the index at which `value` should be inserted
+     *  into `array`.
+     */
+    function baseSortedIndexBy(array, value, iteratee, retHighest) {
+      value = iteratee(value);
+
+      var low = 0,
+          high = array == null ? 0 : array.length,
+          valIsNaN = value !== value,
+          valIsNull = value === null,
+          valIsSymbol = isSymbol(value),
+          valIsUndefined = value === undefined;
+
+      while (low < high) {
+        var mid = nativeFloor((low + high) / 2),
+            computed = iteratee(array[mid]),
+            othIsDefined = computed !== undefined,
+            othIsNull = computed === null,
+            othIsReflexive = computed === computed,
+            othIsSymbol = isSymbol(computed);
+
+        if (valIsNaN) {
+          var setLow = retHighest || othIsReflexive;
+        } else if (valIsUndefined) {
+          setLow = othIsReflexive && (retHighest || othIsDefined);
+        } else if (valIsNull) {
+          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+        } else if (valIsSymbol) {
+          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+        } else if (othIsNull || othIsSymbol) {
+          setLow = false;
+        } else {
+          setLow = retHighest ? (computed <= value) : (computed < value);
+        }
+        if (setLow) {
+          low = mid + 1;
+        } else {
+          high = mid;
+        }
+      }
+      return nativeMin(high, MAX_ARRAY_INDEX);
+    }
+
+    /**
+     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+     * support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array} array The array to inspect.
+     * @param {Function} [iteratee] The iteratee invoked per element.
+     * @returns {Array} Returns the new duplicate free array.
+     */
+    function baseSortedUniq(array, iteratee) {
+      var index = -1,
+          length = array.length,
+          resIndex = 0,
+          result = [];
+
+      while (++index < length) {
+        var value = array[index],
+            computed = iteratee ? iteratee(value) : value;
+
+        if (!index || !eq(computed, seen)) {
+          var seen = computed;
+          result[resIndex++] = value === 0 ? 0 : value;
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.toNumber` which doesn't ensure correct
+     * conversions of binary, hexadecimal, or octal string values.
+     *
+     * @private
+     * @param {*} value The value to process.
+     * @returns {number} Returns the number.
+     */
+    function baseToNumber(value) {
+      if (typeof value == 'number') {
+        return value;
+      }
+      if (isSymbol(value)) {
+        return NAN;
+      }
+      return +value;
+    }
+
+    /**
+     * The base implementation of `_.toString` which doesn't convert nullish
+     * values to empty strings.
+     *
+     * @private
+     * @param {*} value The value to process.
+     * @returns {string} Returns the string.
+     */
+    function baseToString(value) {
+      // Exit early for strings to avoid a performance hit in some environments.
+      if (typeof value == 'string') {
+        return value;
+      }
+      if (isArray(value)) {
+        // Recursively convert values (susceptible to call stack limits).
+        return arrayMap(value, baseToString) + '';
+      }
+      if (isSymbol(value)) {
+        return symbolToString ? symbolToString.call(value) : '';
+      }
+      var result = (value + '');
+      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+    }
+
+    /**
+     * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array} array The array to inspect.
+     * @param {Function} [iteratee] The iteratee invoked per element.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new duplicate free array.
+     */
+    function baseUniq(array, iteratee, comparator) {
+      var index = -1,
+          includes = arrayIncludes,
+          length = array.length,
+          isCommon = true,
+          result = [],
+          seen = result;
+
+      if (comparator) {
+        isCommon = false;
+        includes = arrayIncludesWith;
+      }
+      else if (length >= LARGE_ARRAY_SIZE) {
+        var set = iteratee ? null : createSet(array);
+        if (set) {
+          return setToArray(set);
+        }
+        isCommon = false;
+        includes = cacheHas;
+        seen = new SetCache;
+      }
+      else {
+        seen = iteratee ? [] : result;
+      }
+      outer:
+      while (++index < length) {
+        var value = array[index],
+            computed = iteratee ? iteratee(value) : value;
+
+        value = (comparator || value !== 0) ? value : 0;
+        if (isCommon && computed === computed) {
+          var seenIndex = seen.length;
+          while (seenIndex--) {
+            if (seen[seenIndex] === computed) {
+              continue outer;
+            }
+          }
+          if (iteratee) {
+            seen.push(computed);
+          }
+          result.push(value);
+        }
+        else if (!includes(seen, computed, comparator)) {
+          if (seen !== result) {
+            seen.push(computed);
+          }
+          result.push(value);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * The base implementation of `_.unset`.
+     *
+     * @private
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The property path to unset.
+     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+     */
+    function baseUnset(object, path) {
+      path = castPath(path, object);
+      object = parent(object, path);
+      return object == null || delete object[toKey(last(path))];
+    }
+
+    /**
+     * The base implementation of `_.update`.
+     *
+     * @private
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The path of the property to update.
+     * @param {Function} updater The function to produce the updated value.
+     * @param {Function} [customizer] The function to customize path creation.
+     * @returns {Object} Returns `object`.
+     */
+    function baseUpdate(object, path, updater, customizer) {
+      return baseSet(object, path, updater(baseGet(object, path)), customizer);
+    }
+
+    /**
+     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+     * without support for iteratee shorthands.
+     *
+     * @private
+     * @param {Array} array The array to query.
+     * @param {Function} predicate The function invoked per iteration.
+     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+     * @param {boolean} [fromRight] Specify iterating from right to left.
+     * @returns {Array} Returns the slice of `array`.
+     */
+    function baseWhile(array, predicate, isDrop, fromRight) {
+      var length = array.length,
+          index = fromRight ? length : -1;
+
+      while ((fromRight ? index-- : ++index < length) &&
+        predicate(array[index], index, array)) {}
+
+      return isDrop
+        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+    }
+
+    /**
+     * The base implementation of `wrapperValue` which returns the result of
+     * performing a sequence of actions on the unwrapped `value`, where each
+     * successive action is supplied the return value of the previous.
+     *
+     * @private
+     * @param {*} value The unwrapped value.
+     * @param {Array} actions Actions to perform to resolve the unwrapped value.
+     * @returns {*} Returns the resolved value.
+     */
+    function baseWrapperValue(value, actions) {
+      var result = value;
+      if (result instanceof LazyWrapper) {
+        result = result.value();
+      }
+      return arrayReduce(actions, function(result, action) {
+        return action.func.apply(action.thisArg, arrayPush([result], action.args));
+      }, result);
+    }
+
+    /**
+     * The base implementation of methods like `_.xor`, without support for
+     * iteratee shorthands, that accepts an array of arrays to inspect.
+     *
+     * @private
+     * @param {Array} arrays The arrays to inspect.
+     * @param {Function} [iteratee] The iteratee invoked per element.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new array of values.
+     */
+    function baseXor(arrays, iteratee, comparator) {
+      var length = arrays.length;
+      if (length < 2) {
+        return length ? baseUniq(arrays[0]) : [];
+      }
+      var index = -1,
+          result = Array(length);
+
+      while (++index < length) {
+        var array = arrays[index],
+            othIndex = -1;
+
+        while (++othIndex < length) {
+          if (othIndex != index) {
+            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+          }
+        }
+      }
+      return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+    }
+
+    /**
+     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+     *
+     * @private
+     * @param {Array} props The property identifiers.
+     * @param {Array} values The property values.
+     * @param {Function} assignFunc The function to assign values.
+     * @returns {Object} Returns the new object.
+     */
+    function baseZipObject(props, values, assignFunc) {
+      var index = -1,
+          length = props.length,
+          valsLength = values.length,
+          result = {};
+
+      while (++index < length) {
+        var value = index < valsLength ? values[index] : undefined;
+        assignFunc(result, props[index], value);
+      }
+      return result;
+    }
+
+    /**
+     * Casts `value` to an empty array if it's not an array like object.
+     *
+     * @private
+     * @param {*} value The value to inspect.
+     * @returns {Array|Object} Returns the cast array-like object.
+     */
+    function castArrayLikeObject(value) {
+      return isArrayLikeObject(value) ? value : [];
+    }
+
+    /**
+     * Casts `value` to `identity` if it's not a function.
+     *
+     * @private
+     * @param {*} value The value to inspect.
+     * @returns {Function} Returns cast function.
+     */
+    function castFunction(value) {
+      return typeof value == 'function' ? value : identity;
+    }
+
+    /**
+     * Casts `value` to a path array if it's not one.
+     *
+     * @private
+     * @param {*} value The value to inspect.
+     * @param {Object} [object] The object to query keys on.
+     * @returns {Array} Returns the cast property path array.
+     */
+    function castPath(value, object) {
+      if (isArray(value)) {
+        return value;
+      }
+      return isKey(value, object) ? [value] : stringToPath(toString(value));
+    }
+
+    /**
+     * A `baseRest` alias which can be replaced with `identity` by module
+     * replacement plugins.
+     *
+     * @private
+     * @type {Function}
+     * @param {Function} func The function to apply a rest parameter to.
+     * @returns {Function} Returns the new function.
+     */
+    var castRest = baseRest;
+
+    /**
+     * Casts `array` to a slice if it's needed.
+     *
+     * @private
+     * @param {Array} array The array to inspect.
+     * @param {number} start The start position.
+     * @param {number} [end=array.length] The end position.
+     * @returns {Array} Returns the cast slice.
+     */
+    function castSlice(array, start, end) {
+      var length = array.length;
+      end = end === undefined ? length : end;
+      return (!start && end >= length) ? array : baseSlice(array, start, end);
+    }
+
+    /**
+     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
+     *
+     * @private
+     * @param {number|Object} id The timer id or timeout object of the timer to clear.
+     */
+    var clearTimeout = ctxClearTimeout || function(id) {
+      return root.clearTimeout(id);
+    };
+
+    /**
+     * Creates a clone of  `buffer`.
+     *
+     * @private
+     * @param {Buffer} buffer The buffer to clone.
+     * @param {boolean} [isDeep] Specify a deep clone.
+     * @returns {Buffer} Returns the cloned buffer.
+     */
+    function cloneBuffer(buffer, isDeep) {
+      if (isDeep) {
+        return buffer.slice();
+      }
+      var length = buffer.length,
+          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+      buffer.copy(result);
+      return result;
+    }
+
+    /**
+     * Creates a clone of `arrayBuffer`.
+     *
+     * @private
+     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+     * @returns {ArrayBuffer} Returns the cloned array buffer.
+     */
+    function cloneArrayBuffer(arrayBuffer) {
+      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+      new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+      return result;
+    }
+
+    /**
+     * Creates a clone of `dataView`.
+     *
+     * @private
+     * @param {Object} dataView The data view to clone.
+     * @param {boolean} [isDeep] Specify a deep clone.
+     * @returns {Object} Returns the cloned data view.
+     */
+    function cloneDataView(dataView, isDeep) {
+      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+    }
+
+    /**
+     * Creates a clone of `regexp`.
+     *
+     * @private
+     * @param {Object} regexp The regexp to clone.
+     * @returns {Object} Returns the cloned regexp.
+     */
+    function cloneRegExp(regexp) {
+      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+      result.lastIndex = regexp.lastIndex;
+      return result;
+    }
+
+    /**
+     * Creates a clone of the `symbol` object.
+     *
+     * @private
+     * @param {Object} symbol The symbol object to clone.
+     * @returns {Object} Returns the cloned symbol object.
+     */
+    function cloneSymbol(symbol) {
+      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+    }
+
+    /**
+     * Creates a clone of `typedArray`.
+     *
+     * @private
+     * @param {Object} typedArray The typed array to clone.
+     * @param {boolean} [isDeep] Specify a deep clone.
+     * @returns {Object} Returns the cloned typed array.
+     */
+    function cloneTypedArray(typedArray, isDeep) {
+      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+    }
+
+    /**
+     * Compares values to sort them in ascending order.
+     *
+     * @private
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {number} Returns the sort order indicator for `value`.
+     */
+    function compareAscending(value, other) {
+      if (value !== other) {
+        var valIsDefined = value !== undefined,
+            valIsNull = value === null,
+            valIsReflexive = value === value,
+            valIsSymbol = isSymbol(value);
+
+        var othIsDefined = other !== undefined,
+            othIsNull = other === null,
+            othIsReflexive = other === other,
+            othIsSymbol = isSymbol(other);
+
+        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+            (valIsNull && othIsDefined && othIsReflexive) ||
+            (!valIsDefined && othIsReflexive) ||
+            !valIsReflexive) {
+          return 1;
+        }
+        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+            (othIsNull && valIsDefined && valIsReflexive) ||
+            (!othIsDefined && valIsReflexive) ||
+            !othIsReflexive) {
+          return -1;
+        }
+      }
+      return 0;
+    }
+
+    /**
+     * Used by `_.orderBy` to compare multiple properties of a value to another
+     * and stable sort them.
+     *
+     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+     * specify an order of "desc" for descending or "asc" for ascending sort order
+     * of corresponding values.
+     *
+     * @private
+     * @param {Object} object The object to compare.
+     * @param {Object} other The other object to compare.
+     * @param {boolean[]|string[]} orders The order to sort by for each property.
+     * @returns {number} Returns the sort order indicator for `object`.
+     */
+    function compareMultiple(object, other, orders) {
+      var index = -1,
+          objCriteria = object.criteria,
+          othCriteria = other.criteria,
+          length = objCriteria.length,
+          ordersLength = orders.length;
+
+      while (++index < length) {
+        var result = compareAscending(objCriteria[index], othCriteria[index]);
+        if (result) {
+          if (index >= ordersLength) {
+            return result;
+          }
+          var order = orders[index];
+          return result * (order == 'desc' ? -1 : 1);
+        }
+      }
+      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+      // that causes it, under certain circumstances, to provide the same value for
+      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+      // for more details.
+      //
+      // This also ensures a stable sort in V8 and other engines.
+      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+      return object.index - other.index;
+    }
+
+    /**
+     * Creates an array that is the composition of partially applied arguments,
+     * placeholders, and provided arguments into a single array of arguments.
+     *
+     * @private
+     * @param {Array} args The provided arguments.
+     * @param {Array} partials The arguments to prepend to those provided.
+     * @param {Array} holders The `partials` placeholder indexes.
+     * @params {boolean} [isCurried] Specify composing for a curried function.
+     * @returns {Array} Returns the new array of composed arguments.
+     */
+    function composeArgs(args, partials, holders, isCurried) {
+      var argsIndex = -1,
+          argsLength = args.length,
+          holdersLength = holders.length,
+          leftIndex = -1,
+          leftLength = partials.length,
+          rangeLength = nativeMax(argsLength - holdersLength, 0),
+          result = Array(leftLength + rangeLength),
+          isUncurried = !isCurried;
+
+      while (++leftIndex < leftLength) {
+        result[leftIndex] = partials[leftIndex];
+      }
+      while (++argsIndex < holdersLength) {
+        if (isUncurried || argsIndex < argsLength) {
+          result[holders[argsIndex]] = args[argsIndex];
+        }
+      }
+      while (rangeLength--) {
+        result[leftIndex++] = args[argsIndex++];
+      }
+      return result;
+    }
+
+    /**
+     * This function is like `composeArgs` except that the arguments composition
+     * is tailored for `_.partialRight`.
+     *
+     * @private
+     * @param {Array} args The provided arguments.
+     * @param {Array} partials The arguments to append to those provided.
+     * @param {Array} holders The `partials` placeholder indexes.
+     * @params {boolean} [isCurried] Specify composing for a curried function.
+     * @returns {Array} Returns the new array of composed arguments.
+     */
+    function composeArgsRight(args, partials, holders, isCurried) {
+      var argsIndex = -1,
+          argsLength = args.length,
+          holdersIndex = -1,
+          holdersLength = holders.length,
+          rightIndex = -1,
+          rightLength = partials.length,
+          rangeLength = nativeMax(argsLength - holdersLength, 0),
+          result = Array(rangeLength + rightLength),
+          isUncurried = !isCurried;
+
+      while (++argsIndex < rangeLength) {
+        result[argsIndex] = args[argsIndex];
+      }
+      var offset = argsIndex;
+      while (++rightIndex < rightLength) {
+        result[offset + rightIndex] = partials[rightIndex];
+      }
+      while (++holdersIndex < holdersLength) {
+        if (isUncurried || argsIndex < argsLength) {
+          result[offset + holders[holdersIndex]] = args[argsIndex++];
+        }
+      }
+      return result;
+    }
+
+    /**
+     * Copies the values of `source` to `array`.
+     *
+     * @private
+     * @param {Array} source The array to copy values from.
+     * @param {Array} [array=[]] The array to copy values to.
+     * @returns {Array} Returns `array`.
+     */
+    function copyArray(source, array) {
+      var index = -1,
+          length = source.length;
+
+      array || (array = Array(length));
+      while (++index < length) {
+        array[index] = source[index];
+      }
+      return array;
+    }
+
+    /**
+     * Copies properties of `source` to `object`.
+     *
+     * @private
+     * @param {Object} source The object to copy properties from.
+     * @param {Array} props The property identifiers to copy.
+     * @param {Object} [object={}] The object to copy properties to.
+     * @param {Function} [customizer] The function to customize copied values.
+     * @returns {Object} Returns `object`.
+     */
+    function copyObject(source, props, object, customizer) {
+      var isNew = !object;
+      object || (object = {});
+
+      var index = -1,
+          length = props.length;
+
+      while (++index < length) {
+        var key = props[index];
+
+        var newValue = customizer
+          ? customizer(object[key], source[key], key, object, source)
+          : undefined;
+
+        if (newValue === undefined) {
+          newValue = source[key];
+        }
+        if (isNew) {
+          baseAssignValue(object, key, newValue);
+        } else {
+          assignValue(object, key, newValue);
+        }
+      }
+      return object;
+    }
+
+    /**
+     * Copies own symbols of `source` to `object`.
+     *
+     * @private
+     * @param {Object} source The object to copy symbols from.
+     * @param {Object} [object={}] The object to copy symbols to.
+     * @returns {Object} Returns `object`.
+     */
+    function copySymbols(source, object) {
+      return copyObject(source, getSymbols(source), object);
+    }
+
+    /**
+     * Copies own and inherited symbols of `source` to `object`.
+     *
+     * @private
+     * @param {Object} source The object to copy symbols from.
+     * @param {Object} [object={}] The object to copy symbols to.
+     * @returns {Object} Returns `object`.
+     */
+    function copySymbolsIn(source, object) {
+      return copyObject(source, getSymbolsIn(source), object);
+    }
+
+    /**
+     * Creates a function like `_.groupBy`.
+     *
+     * @private
+     * @param {Function} setter The function to set accumulator values.
+     * @param {Function} [initializer] The accumulator object initializer.
+     * @returns {Function} Returns the new aggregator function.
+     */
+    function createAggregator(setter, initializer) {
+      return function(collection, iteratee) {
+        var func = isArray(collection) ? arrayAggregator : baseAggregator,
+            accumulator = initializer ? initializer() : {};
+
+        return func(collection, setter, getIteratee(iteratee, 2), accumulator);
+      };
+    }
+
+    /**
+     * Creates a function like `_.assign`.
+     *
+     * @private
+     * @param {Function} assigner The function to assign values.
+     * @returns {Function} Returns the new assigner function.
+     */
+    function createAssigner(assigner) {
+      return baseRest(function(object, sources) {
+        var index = -1,
+            length = sources.length,
+            customizer = length > 1 ? sources[length - 1] : undefined,
+            guard = length > 2 ? sources[2] : undefined;
+
+        customizer = (assigner.length > 3 && typeof customizer == 'function')
+          ? (length--, customizer)
+          : undefined;
+
+        if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+          customizer = length < 3 ? undefined : customizer;
+          length = 1;
+        }
+        object = Object(object);
+        while (++index < length) {
+          var source = sources[index];
+          if (source) {
+            assigner(object, source, index, customizer);
+          }
+        }
+        return object;
+      });
+    }
+
+    /**
+     * Creates a `baseEach` or `baseEachRight` function.
+     *
+     * @private
+     * @param {Function} eachFunc The function to iterate over a collection.
+     * @param {boolean} [fromRight] Specify iterating from right to left.
+     * @returns {Function} Returns the new base function.
+     */
+    function createBaseEach(eachFunc, fromRight) {
+      return function(collection, iteratee) {
+        if (collection == null) {
+          return collection;
+        }
+        if (!isArrayLike(collection)) {
+          return eachFunc(collection, iteratee);
+        }
+        var length = collection.length,
+            index = fromRight ? length : -1,
+            iterable = Object(collection);
+
+        while ((fromRight ? index-- : ++index < length)) {
+          if (iteratee(iterable[index], index, iterable) === false) {
+            break;
+          }
+        }
+        return collection;
+      };
+    }
+
+    /**
+     * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+     *
+     * @private
+     * @param {boolean} [fromRight] Specify iterating from right to left.
+     * @returns {Function} Returns the new base function.
+     */
+    function createBaseFor(fromRight) {
+      return function(object, iteratee, keysFunc) {
+        var index = -1,
+            iterable = Object(object),
+            props = keysFunc(object),
+            length = props.length;
+
+        while (length--) {
+          var key = props[fromRight ? length : ++index];
+          if (iteratee(iterable[key], key, iterable) === false) {
+            break;
+          }
+        }
+        return object;
+      };
+    }
+
+    /**
+     * Creates a function that wraps `func` to invoke it with the optional `this`
+     * binding of `thisArg`.
+     *
+     * @private
+     * @param {Function} func The function to wrap.
+     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+     * @param {*} [thisArg] The `this` binding of `func`.
+     * @returns {Function} Returns the new wrapped function.
+     */
+    function createBind(func, bitmask, thisArg) {
+      var isBind = bitmask & WRAP_BIND_FLAG,
+          Ctor = createCtor(func);
+
+      function wrapper() {
+        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+        return fn.apply(isBind ? thisArg : this, arguments);
+      }
+      return wrapper;
+    }
+
+    /**
+     * Creates a function like `_.lowerFirst`.
+     *
+     * @private
+     * @param {string} methodName The name of the `String` case method to use.
+     * @returns {Function} Returns the new case function.
+     */
+    function createCaseFirst(methodName) {
+      return function(string) {
+        string = toString(string);
+
+        var strSymbols = hasUnicode(string)
+          ? stringToArray(string)
+          : undefined;
+
+        var chr = strSymbols
+          ? strSymbols[0]
+          : string.charAt(0);
+
+        var trailing = strSymbols
+          ? castSlice(strSymbols, 1).join('')
+          : string.slice(1);
+
+        return chr[methodName]() + trailing;
+      };
+    }
+
+    /**
+     * Creates a function like `_.camelCase`.
+     *
+     * @private
+     * @param {Function} callback The function to combine each word.
+     * @returns {Function} Returns the new compounder function.
+     */
+    function createCompounder(callback) {
+      return function(string) {
+        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+      };
+    }
+
+    /**
+     * Creates a function that produces an instance of `Ctor` regardless of
+     * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+     *
+     * @private
+     * @param {Function} Ctor The constructor to wrap.
+     * @returns {Function} Returns the new wrapped function.
+     */
+    function createCtor(Ctor) {
+      return function() {
+        // Use a `switch` statement to work with class constructors. See
+        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+        // for more details.
+        var args = arguments;
+        switch (args.length) {
+          case 0: return new Ctor;
+          case 1: return new Ctor(args[0]);
+          case 2: return new Ctor(args[0], args[1]);
+          case 3: return new Ctor(args[0], args[1], args[2]);
+          case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+        }
+        var thisBinding = baseCreate(Ctor.prototype),
+            result = Ctor.apply(thisBinding, args);
+
+        // Mimic the constructor's `return` behavior.
+        // See https://es5.github.io/#x13.2.2 for more details.
+        return isObject(result) ? result : thisBinding;
+      };
+    }
+
+    /**
+     * Creates a function that wraps `func` to enable currying.
+     *
+     * @private
+     * @param {Function} func The function to wrap.
+     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+     * @param {number} arity The arity of `func`.
+     * @returns {Function} Returns the new wrapped function.
+     */
+    function createCurry(func, bitmask, arity) {
+      var Ctor = createCtor(func);
+
+      function wrapper() {
+        var length = arguments.length,
+            args = Array(length),
+            index = length,
+            placeholder = getHolder(wrapper);
+
+        while (index--) {
+          args[index] = arguments[index];
+        }
+        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+          ? []
+          : replaceHolders(args, placeholder);
+
+        length -= holders.length;
+        if (length < arity) {
+          return createRecurry(
+            func, bitmask, createHybrid, wrapper.placeholder, undefined,
+            args, holders, undefined, undefined, arity - length);
+        }
+        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+        return apply(fn, this, args);
+      }
+      return wrapper;
+    }
+
+    /**
+     * Creates a `_.find` or `_.findLast` function.
+     *
+     * @private
+     * @param {Function} findIndexFunc The function to find the collection index.
+     * @returns {Function} Returns the new find function.
+     */
+    function createFind(findIndexFunc) {
+      return function(collection, predicate, fromIndex) {
+        var iterable = Object(collection);
+        if (!isArrayLike(collection)) {
+          var iteratee = getIteratee(predicate, 3);
+          collection = keys(collection);
+          predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+        }
+        var index = findIndexFunc(collection, predicate, fromIndex);
+        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+      };
+    }
+
+    /**
+     * Creates a `_.flow` or `_.flowRight` function.
+     *
+     * @private
+     * @param {boolean} [fromRight] Specify iterating from right to left.
+     * @returns {Function} Returns the new flow function.
+     */
+    function createFlow(fromRight) {
+      return flatRest(function(funcs) {
+        var length = funcs.length,
+            index = length,
+            prereq = LodashWrapper.prototype.thru;
+
+        if (fromRight) {
+          funcs.reverse();
+        }
+        while (index--) {
+          var func = funcs[index];
+          if (typeof func != 'function') {
+            throw new TypeError(FUNC_ERROR_TEXT);
+          }
+          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+            var wrapper = new LodashWrapper([], true);
+          }
+        }
+        index = wrapper ? index : length;
+        while (++index < length) {
+          func = funcs[index];
+
+          var funcName = getFuncName(func),
+              data = funcName == 'wrapper' ? getData(func) : undefined;
+
+          if (data && isLaziable(data[0]) &&
+                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+                !data[4].length && data[9] == 1
+              ) {
+            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+          } else {
+            wrapper = (func.length == 1 && isLaziable(func))
+              ? wrapper[funcName]()
+              : wrapper.thru(func);
+          }
+        }
+        return function() {
+          var args = arguments,
+              value = args[0];
+
+          if (wrapper && args.length == 1 && isArray(value)) {
+            return wrapper.plant(value).value();
+          }
+          var index = 0,
+              result = length ? funcs[index].apply(this, args) : value;
+
+          while (++index < length) {
+            result = funcs[index].call(this, result);
+          }
+          return result;
+        };
+      });
+    }
+
+    /**
+     * Creates a function that wraps `func` to invoke it with optional `this`
+     * binding of `thisArg`, partial application, and currying.
+     *
+     * @private
+     * @param {Function|string} func The function or method name to wrap.
+     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+     * @param {*} [thisArg] The `this` binding of `func`.
+     * @param {Array} [partials] The arguments to prepend to those provided to
+     *  the new function.
+     * @param {Array} [holders] The `partials` placeholder indexes.
+     * @param {Array} [partialsRight] The arguments to append to those provided
+     *  to the new function.
+     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+     * @param {Array} [argPos] The argument positions of the new function.
+     * @param {number} [ary] The arity cap of `func`.
+     * @param {number} [arity] The arity of `func`.
+     * @returns {Function} Returns the new wrapped function.
+     */
+    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+      var isAry = bitmask & WRAP_ARY_FLAG,
+          isBind = bitmask & WRAP_BIND_FLAG,
+          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+          isFlip = bitmask & WRAP_FLIP_FLAG,
+          Ctor = isBindKey ? undefined : createCtor(func);
+
+      function wrapper() {
+        var length = arguments.length,
+            args = Array(length),
+            index = length;
+
+        while (index--) {
+          args[index] = arguments[index];
+        }
+        if (isCurried) {
+          var placeholder = getHolder(wrapper),
+              holdersCount = countHolders(args, placeholder);
+        }
+        if (partials) {
+          args = composeArgs(args, partials, holders, isCurried);
+        }
+        if (partialsRight) {
+          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+        }
+        length -= holdersCount;
+        if (isCurried && length < arity) {
+          var newHolders = replaceHolders(args, placeholder);
+          return createRecurry(
+            func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+            args, newHolders, argPos, ary, arity - length
+          );
+        }
+        var thisBinding = isBind ? thisArg : this,
+            fn = isBindKey ? thisBinding[func] : func;
+
+        length = args.length;
+        if (argPos) {
+          args = reorder(args, argPos);
+        } else if (isFlip && length > 1) {
+          args.reverse();
+        }
+        if (isAry && ary < length) {
+          args.length = ary;
+        }
+        if (this && this !== root && this instanceof wrapper) {
+          fn = Ctor || createCtor(fn);
+        }
+        return fn.apply(thisBinding, args);
+      }
+      return wrapper;
+    }
+
+    /**
+     * Creates a function like `_.invertBy`.
+     *
+     * @private
+     * @param {Function} setter The function to set accumulator values.
+     * @param {Function} toIteratee The function to resolve iteratees.
+     * @returns {Function} Returns the new inverter function.
+     */
+    function createInverter(setter, toIteratee) {
+      return function(object, iteratee) {
+        return baseInverter(object, setter, toIteratee(iteratee), {});
+      };
+    }
+
+    /**
+     * Creates a function that performs a mathematical operation on two values.
+     *
+     * @private
+     * @param {Function} operator The function to perform the operation.
+     * @param {number} [defaultValue] The value used for `undefined` arguments.
+     * @returns {Function} Returns the new mathematical operation function.
+     */
+    function createMathOperation(operator, defaultValue) {
+      return function(value, other) {
+        var result;
+        if (value === undefined && other === undefined) {
+          return defaultValue;
+        }
+        if (value !== undefined) {
+          result = value;
+        }
+        if (other !== undefined) {
+          if (result === undefined) {
+            return other;
+          }
+          if (typeof value == 'string' || typeof other == 'string') {
+            value = baseToString(value);
+            other = baseToString(other);
+          } else {
+            value = baseToNumber(value);
+            other = baseToNumber(other);
+          }
+          result = operator(value, other);
+        }
+        return result;
+      };
+    }
+
+    /**
+     * Creates a function like `_.over`.
+     *
+     * @private
+     * @param {Function} arrayFunc The function to iterate over iteratees.
+     * @returns {Function} Returns the new over function.
+     */
+    function createOver(arrayFunc) {
+      return flatRest(function(iteratees) {
+        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+        return baseRest(function(args) {
+          var thisArg = this;
+          return arrayFunc(iteratees, function(iteratee) {
+            return apply(iteratee, thisArg, args);
+          });
+        });
+      });
+    }
+
+    /**
+     * Creates the padding for `string` based on `length`. The `chars` string
+     * is truncated if the number of characters exceeds `length`.
+     *
+     * @private
+     * @param {number} length The padding length.
+     * @param {string} [chars=' '] The string used as padding.
+     * @returns {string} Returns the padding for `string`.
+     */
+    function createPadding(length, chars) {
+      chars = chars === undefined ? ' ' : baseToString(chars);
+
+      var charsLength = chars.length;
+      if (charsLength < 2) {
+        return charsLength ? baseRepeat(chars, length) : chars;
+      }
+      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+      return hasUnicode(chars)
+        ? castSlice(stringToArray(result), 0, length).join('')
+        : result.slice(0, length);
+    }
+
+    /**
+     * Creates a function that wraps `func` to invoke it with the `this` binding
+     * of `thisArg` and `partials` prepended to the arguments it receives.
+     *
+     * @private
+     * @param {Function} func The function to wrap.
+     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+     * @param {*} thisArg The `this` binding of `func`.
+     * @param {Array} partials The arguments to prepend to those provided to
+     *  the new function.
+     * @returns {Function} Returns the new wrapped function.
+     */
+    function createPartial(func, bitmask, thisArg, partials) {
+      var isBind = bitmask & WRAP_BIND_FLAG,
+          Ctor = createCtor(func);
+
+      function wrapper() {
+        var argsIndex = -1,
+            argsLength = arguments.length,
+            leftIndex = -1,
+            leftLength = partials.length,
+            args = Array(leftLength + argsLength),
+            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+        while (++leftIndex < leftLength) {
+          args[leftIndex] = partials[leftIndex];
+        }
+        while (argsLength--) {
+          args[leftIndex++] = arguments[++argsIndex];
+        }
+        return apply(fn, isBind ? thisArg : this, args);
+      }
+      return wrapper;
+    }
+
+    /**
+     * Creates a `_.range` or `_.rangeRight` function.
+     *
+     * @private
+     * @param {boolean} [fromRight] Specify iterating from right to left.
+     * @returns {Function} Returns the new range function.
+     */
+    function createRange(fromRight) {
+      return function(start, end, step) {
+        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+          end = step = undefined;
+        }
+        // Ensure the sign of `-0` is preserved.
+        start = toFinite(start);
+        if (end === undefined) {
+          end = start;
+          start = 0;
+        } else {
+          end = toFinite(end);
+        }
+        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+        return baseRange(start, end, step, fromRight);
+      };
+    }
+
+    /**
+     * Creates a function that performs a relational operation on two values.
+     *
+     * @private
+     * @param {Function} operator The function to perform the operation.
+     * @returns {Function} Returns the new relational operation function.
+     */
+    function createRelationalOperation(operator) {
+      return function(value, other) {
+        if (!(typeof value == 'string' && typeof other == 'string')) {
+          value = toNumber(value);
+          other = toNumber(other);
+        }
+        return operator(value, other);
+      };
+    }
+
+    /**
+     * Creates a function that wraps `func` to continue currying.
+     *
+     * @private
+     * @param {Function} func The function to wrap.
+     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+     * @param {Function} wrapFunc The function to create the `func` wrapper.
+     * @param {*} placeholder The placeholder value.
+     * @param {*} [thisArg] The `this` binding of `func`.
+     * @param {Array} [partials] The arguments to prepend to those provided to
+     *  the new function.
+     * @param {Array} [holders] The `partials` placeholder indexes.
+     * @param {Array} [argPos] The argument positions of the new function.
+     * @param {number} [ary] The arity cap of `func`.
+     * @param {number} [arity] The arity of `func`.
+     * @returns {Function} Returns the new wrapped function.
+     */
+    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+      var isCurry = bitmask & WRAP_CURRY_FLAG,
+          newHolders = isCurry ? holders : undefined,
+          newHoldersRight = isCurry ? undefined : holders,
+          newPartials = isCurry ? partials : undefined,
+          newPartialsRight = isCurry ? undefined : partials;
+
+      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+      }
+      var newData = [
+        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+        newHoldersRight, argPos, ary, arity
+      ];
+
+      var result = wrapFunc.apply(undefined, newData);
+      if (isLaziable(func)) {
+        setData(result, newData);
+      }
+      result.placeholder = placeholder;
+      return setWrapToString(result, func, bitmask);
+    }
+
+    /**
+     * Creates a function like `_.round`.
+     *
+     * @private
+     * @param {string} methodName The name of the `Math` method to use when rounding.
+     * @returns {Function} Returns the new round function.
+     */
+    function createRound(methodName) {
+      var func = Math[methodName];
+      return function(number, precision) {
+        number = toNumber(number);
+        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
+        if (precision && nativeIsFinite(number)) {
+          // Shift with exponential notation to avoid floating-point issues.
+          // See [MDN](https://mdn.io/round#Examples) for more details.
+          var pair = (toString(number) + 'e').split('e'),
+              value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+          pair = (toString(value) + 'e').split('e');
+          return +(pair[0] + 'e' + (+pair[1] - precision));
+        }
+        return func(number);
+      };
+    }
+
+    /**
+     * Creates a set object of `values`.
+     *
+     * @private
+     * @param {Array} values The values to add to the set.
+     * @returns {Object} Returns the new set.
+     */
+    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+      return new Set(values);
+    };
+
+    /**
+     * Creates a `_.toPairs` or `_.toPairsIn` function.
+     *
+     * @private
+     * @param {Function} keysFunc The function to get the keys of a given object.
+     * @returns {Function} Returns the new pairs function.
+     */
+    function createToPairs(keysFunc) {
+      return function(object) {
+        var tag = getTag(object);
+        if (tag == mapTag) {
+          return mapToArray(object);
+        }
+        if (tag == setTag) {
+          return setToPairs(object);
+        }
+        return baseToPairs(object, keysFunc(object));
+      };
+    }
+
+    /**
+     * Creates a function that either curries or invokes `func` with optional
+     * `this` binding and partially applied arguments.
+     *
+     * @private
+     * @param {Function|string} func The function or method name to wrap.
+     * @param {number} bitmask The bitmask flags.
+     *    1 - `_.bind`
+     *    2 - `_.bindKey`
+     *    4 - `_.curry` or `_.curryRight` of a bound function
+     *    8 - `_.curry`
+     *   16 - `_.curryRight`
+     *   32 - `_.partial`
+     *   64 - `_.partialRight`
+     *  128 - `_.rearg`
+     *  256 - `_.ary`
+     *  512 - `_.flip`
+     * @param {*} [thisArg] The `this` binding of `func`.
+     * @param {Array} [partials] The arguments to be partially applied.
+     * @param {Array} [holders] The `partials` placeholder indexes.
+     * @param {Array} [argPos] The argument positions of the new function.
+     * @param {number} [ary] The arity cap of `func`.
+     * @param {number} [arity] The arity of `func`.
+     * @returns {Function} Returns the new wrapped function.
+     */
+    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+      if (!isBindKey && typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      var length = partials ? partials.length : 0;
+      if (!length) {
+        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+        partials = holders = undefined;
+      }
+      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+      arity = arity === undefined ? arity : toInteger(arity);
+      length -= holders ? holders.length : 0;
+
+      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+        var partialsRight = partials,
+            holdersRight = holders;
+
+        partials = holders = undefined;
+      }
+      var data = isBindKey ? undefined : getData(func);
+
+      var newData = [
+        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+        argPos, ary, arity
+      ];
+
+      if (data) {
+        mergeData(newData, data);
+      }
+      func = newData[0];
+      bitmask = newData[1];
+      thisArg = newData[2];
+      partials = newData[3];
+      holders = newData[4];
+      arity = newData[9] = newData[9] === undefined
+        ? (isBindKey ? 0 : func.length)
+        : nativeMax(newData[9] - length, 0);
+
+      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+      }
+      if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+        var result = createBind(func, bitmask, thisArg);
+      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+        result = createCurry(func, bitmask, arity);
+      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+        result = createPartial(func, bitmask, thisArg, partials);
+      } else {
+        result = createHybrid.apply(undefined, newData);
+      }
+      var setter = data ? baseSetData : setData;
+      return setWrapToString(setter(result, newData), func, bitmask);
+    }
+
+    /**
+     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+     * of source objects to the destination object for all destination properties
+     * that resolve to `undefined`.
+     *
+     * @private
+     * @param {*} objValue The destination value.
+     * @param {*} srcValue The source value.
+     * @param {string} key The key of the property to assign.
+     * @param {Object} object The parent object of `objValue`.
+     * @returns {*} Returns the value to assign.
+     */
+    function customDefaultsAssignIn(objValue, srcValue, key, object) {
+      if (objValue === undefined ||
+          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+        return srcValue;
+      }
+      return objValue;
+    }
+
+    /**
+     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+     * objects into destination objects that are passed thru.
+     *
+     * @private
+     * @param {*} objValue The destination value.
+     * @param {*} srcValue The source value.
+     * @param {string} key The key of the property to merge.
+     * @param {Object} object The parent object of `objValue`.
+     * @param {Object} source The parent object of `srcValue`.
+     * @param {Object} [stack] Tracks traversed source values and their merged
+     *  counterparts.
+     * @returns {*} Returns the value to assign.
+     */
+    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+      if (isObject(objValue) && isObject(srcValue)) {
+        // Recursively merge objects and arrays (susceptible to call stack limits).
+        stack.set(srcValue, objValue);
+        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+        stack['delete'](srcValue);
+      }
+      return objValue;
+    }
+
+    /**
+     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+     * objects.
+     *
+     * @private
+     * @param {*} value The value to inspect.
+     * @param {string} key The key of the property to inspect.
+     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+     */
+    function customOmitClone(value) {
+      return isPlainObject(value) ? undefined : value;
+    }
+
+    /**
+     * A specialized version of `baseIsEqualDeep` for arrays with support for
+     * partial deep comparisons.
+     *
+     * @private
+     * @param {Array} array The array to compare.
+     * @param {Array} other The other array to compare.
+     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+     * @param {Function} customizer The function to customize comparisons.
+     * @param {Function} equalFunc The function to determine equivalents of values.
+     * @param {Object} stack Tracks traversed `array` and `other` objects.
+     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+     */
+    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+          arrLength = array.length,
+          othLength = other.length;
+
+      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+        return false;
+      }
+      // Assume cyclic values are equal.
+      var stacked = stack.get(array);
+      if (stacked && stack.get(other)) {
+        return stacked == other;
+      }
+      var index = -1,
+          result = true,
+          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+      stack.set(array, other);
+      stack.set(other, array);
+
+      // Ignore non-index properties.
+      while (++index < arrLength) {
+        var arrValue = array[index],
+            othValue = other[index];
+
+        if (customizer) {
+          var compared = isPartial
+            ? customizer(othValue, arrValue, index, other, array, stack)
+            : customizer(arrValue, othValue, index, array, other, stack);
+        }
+        if (compared !== undefined) {
+          if (compared) {
+            continue;
+          }
+          result = false;
+          break;
+        }
+        // Recursively compare arrays (susceptible to call stack limits).
+        if (seen) {
+          if (!arraySome(other, function(othValue, othIndex) {
+                if (!cacheHas(seen, othIndex) &&
+                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+                  return seen.push(othIndex);
+                }
+              })) {
+            result = false;
+            break;
+          }
+        } else if (!(
+              arrValue === othValue ||
+                equalFunc(arrValue, othValue, bitmask, customizer, stack)
+            )) {
+          result = false;
+          break;
+        }
+      }
+      stack['delete'](array);
+      stack['delete'](other);
+      return result;
+    }
+
+    /**
+     * A specialized version of `baseIsEqualDeep` for comparing objects of
+     * the same `toStringTag`.
+     *
+     * **Note:** This function only supports comparing values with tags of
+     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+     *
+     * @private
+     * @param {Object} object The object to compare.
+     * @param {Object} other The other object to compare.
+     * @param {string} tag The `toStringTag` of the objects to compare.
+     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+     * @param {Function} customizer The function to customize comparisons.
+     * @param {Function} equalFunc The function to determine equivalents of values.
+     * @param {Object} stack Tracks traversed `object` and `other` objects.
+     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+     */
+    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+      switch (tag) {
+        case dataViewTag:
+          if ((object.byteLength != other.byteLength) ||
+              (object.byteOffset != other.byteOffset)) {
+            return false;
+          }
+          object = object.buffer;
+          other = other.buffer;
+
+        case arrayBufferTag:
+          if ((object.byteLength != other.byteLength) ||
+              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+            return false;
+          }
+          return true;
+
+        case boolTag:
+        case dateTag:
+        case numberTag:
+          // Coerce booleans to `1` or `0` and dates to milliseconds.
+          // Invalid dates are coerced to `NaN`.
+          return eq(+object, +other);
+
+        case errorTag:
+          return object.name == other.name && object.message == other.message;
+
+        case regexpTag:
+        case stringTag:
+          // Coerce regexes to strings and treat strings, primitives and objects,
+          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+          // for more details.
+          return object == (other + '');
+
+        case mapTag:
+          var convert = mapToArray;
+
+        case setTag:
+          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+          convert || (convert = setToArray);
+
+          if (object.size != other.size && !isPartial) {
+            return false;
+          }
+          // Assume cyclic values are equal.
+          var stacked = stack.get(object);
+          if (stacked) {
+            return stacked == other;
+          }
+          bitmask |= COMPARE_UNORDERED_FLAG;
+
+          // Recursively compare objects (susceptible to call stack limits).
+          stack.set(object, other);
+          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+          stack['delete'](object);
+          return result;
+
+        case symbolTag:
+          if (symbolValueOf) {
+            return symbolValueOf.call(object) == symbolValueOf.call(other);
+          }
+      }
+      return false;
+    }
+
+    /**
+     * A specialized version of `baseIsEqualDeep` for objects with support for
+     * partial deep comparisons.
+     *
+     * @private
+     * @param {Object} object The object to compare.
+     * @param {Object} other The other object to compare.
+     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+     * @param {Function} customizer The function to customize comparisons.
+     * @param {Function} equalFunc The function to determine equivalents of values.
+     * @param {Object} stack Tracks traversed `object` and `other` objects.
+     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+     */
+    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+          objProps = getAllKeys(object),
+          objLength = objProps.length,
+          othProps = getAllKeys(other),
+          othLength = othProps.length;
+
+      if (objLength != othLength && !isPartial) {
+        return false;
+      }
+      var index = objLength;
+      while (index--) {
+        var key = objProps[index];
+        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+          return false;
+        }
+      }
+      // Assume cyclic values are equal.
+      var stacked = stack.get(object);
+      if (stacked && stack.get(other)) {
+        return stacked == other;
+      }
+      var result = true;
+      stack.set(object, other);
+      stack.set(other, object);
+
+      var skipCtor = isPartial;
+      while (++index < objLength) {
+        key = objProps[index];
+        var objValue = object[key],
+            othValue = other[key];
+
+        if (customizer) {
+          var compared = isPartial
+            ? customizer(othValue, objValue, key, other, object, stack)
+            : customizer(objValue, othValue, key, object, other, stack);
+        }
+        // Recursively compare objects (susceptible to call stack limits).
+        if (!(compared === undefined
+              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+              : compared
+            )) {
+          result = false;
+          break;
+        }
+        skipCtor || (skipCtor = key == 'constructor');
+      }
+      if (result && !skipCtor) {
+        var objCtor = object.constructor,
+            othCtor = other.constructor;
+
+        // Non `Object` object instances with different constructors are not equal.
+        if (objCtor != othCtor &&
+            ('constructor' in object && 'constructor' in other) &&
+            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+              typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+          result = false;
+        }
+      }
+      stack['delete'](object);
+      stack['delete'](other);
+      return result;
+    }
+
+    /**
+     * A specialized version of `baseRest` which flattens the rest array.
+     *
+     * @private
+     * @param {Function} func The function to apply a rest parameter to.
+     * @returns {Function} Returns the new function.
+     */
+    function flatRest(func) {
+      return setToString(overRest(func, undefined, flatten), func + '');
+    }
+
+    /**
+     * Creates an array of own enumerable property names and symbols of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property names and symbols.
+     */
+    function getAllKeys(object) {
+      return baseGetAllKeys(object, keys, getSymbols);
+    }
+
+    /**
+     * Creates an array of own and inherited enumerable property names and
+     * symbols of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property names and symbols.
+     */
+    function getAllKeysIn(object) {
+      return baseGetAllKeys(object, keysIn, getSymbolsIn);
+    }
+
+    /**
+     * Gets metadata for `func`.
+     *
+     * @private
+     * @param {Function} func The function to query.
+     * @returns {*} Returns the metadata for `func`.
+     */
+    var getData = !metaMap ? noop : function(func) {
+      return metaMap.get(func);
+    };
+
+    /**
+     * Gets the name of `func`.
+     *
+     * @private
+     * @param {Function} func The function to query.
+     * @returns {string} Returns the function name.
+     */
+    function getFuncName(func) {
+      var result = (func.name + ''),
+          array = realNames[result],
+          length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+      while (length--) {
+        var data = array[length],
+            otherFunc = data.func;
+        if (otherFunc == null || otherFunc == func) {
+          return data.name;
+        }
+      }
+      return result;
+    }
+
+    /**
+     * Gets the argument placeholder value for `func`.
+     *
+     * @private
+     * @param {Function} func The function to inspect.
+     * @returns {*} Returns the placeholder value.
+     */
+    function getHolder(func) {
+      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+      return object.placeholder;
+    }
+
+    /**
+     * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+     * this function returns the custom method, otherwise it returns `baseIteratee`.
+     * If arguments are provided, the chosen function is invoked with them and
+     * its result is returned.
+     *
+     * @private
+     * @param {*} [value] The value to convert to an iteratee.
+     * @param {number} [arity] The arity of the created iteratee.
+     * @returns {Function} Returns the chosen function or its result.
+     */
+    function getIteratee() {
+      var result = lodash.iteratee || iteratee;
+      result = result === iteratee ? baseIteratee : result;
+      return arguments.length ? result(arguments[0], arguments[1]) : result;
+    }
+
+    /**
+     * Gets the data for `map`.
+     *
+     * @private
+     * @param {Object} map The map to query.
+     * @param {string} key The reference key.
+     * @returns {*} Returns the map data.
+     */
+    function getMapData(map, key) {
+      var data = map.__data__;
+      return isKeyable(key)
+        ? data[typeof key == 'string' ? 'string' : 'hash']
+        : data.map;
+    }
+
+    /**
+     * Gets the property names, values, and compare flags of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the match data of `object`.
+     */
+    function getMatchData(object) {
+      var result = keys(object),
+          length = result.length;
+
+      while (length--) {
+        var key = result[length],
+            value = object[key];
+
+        result[length] = [key, value, isStrictComparable(value)];
+      }
+      return result;
+    }
+
+    /**
+     * Gets the native function at `key` of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @param {string} key The key of the method to get.
+     * @returns {*} Returns the function if it's native, else `undefined`.
+     */
+    function getNative(object, key) {
+      var value = getValue(object, key);
+      return baseIsNative(value) ? value : undefined;
+    }
+
+    /**
+     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+     *
+     * @private
+     * @param {*} value The value to query.
+     * @returns {string} Returns the raw `toStringTag`.
+     */
+    function getRawTag(value) {
+      var isOwn = hasOwnProperty.call(value, symToStringTag),
+          tag = value[symToStringTag];
+
+      try {
+        value[symToStringTag] = undefined;
+        var unmasked = true;
+      } catch (e) {}
+
+      var result = nativeObjectToString.call(value);
+      if (unmasked) {
+        if (isOwn) {
+          value[symToStringTag] = tag;
+        } else {
+          delete value[symToStringTag];
+        }
+      }
+      return result;
+    }
+
+    /**
+     * Creates an array of the own enumerable symbols of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of symbols.
+     */
+    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+      if (object == null) {
+        return [];
+      }
+      object = Object(object);
+      return arrayFilter(nativeGetSymbols(object), function(symbol) {
+        return propertyIsEnumerable.call(object, symbol);
+      });
+    };
+
+    /**
+     * Creates an array of the own and inherited enumerable symbols of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of symbols.
+     */
+    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+      var result = [];
+      while (object) {
+        arrayPush(result, getSymbols(object));
+        object = getPrototype(object);
+      }
+      return result;
+    };
+
+    /**
+     * Gets the `toStringTag` of `value`.
+     *
+     * @private
+     * @param {*} value The value to query.
+     * @returns {string} Returns the `toStringTag`.
+     */
+    var getTag = baseGetTag;
+
+    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+        (Map && getTag(new Map) != mapTag) ||
+        (Promise && getTag(Promise.resolve()) != promiseTag) ||
+        (Set && getTag(new Set) != setTag) ||
+        (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+      getTag = function(value) {
+        var result = baseGetTag(value),
+            Ctor = result == objectTag ? value.constructor : undefined,
+            ctorString = Ctor ? toSource(Ctor) : '';
+
+        if (ctorString) {
+          switch (ctorString) {
+            case dataViewCtorString: return dataViewTag;
+            case mapCtorString: return mapTag;
+            case promiseCtorString: return promiseTag;
+            case setCtorString: return setTag;
+            case weakMapCtorString: return weakMapTag;
+          }
+        }
+        return result;
+      };
+    }
+
+    /**
+     * Gets the view, applying any `transforms` to the `start` and `end` positions.
+     *
+     * @private
+     * @param {number} start The start of the view.
+     * @param {number} end The end of the view.
+     * @param {Array} transforms The transformations to apply to the view.
+     * @returns {Object} Returns an object containing the `start` and `end`
+     *  positions of the view.
+     */
+    function getView(start, end, transforms) {
+      var index = -1,
+          length = transforms.length;
+
+      while (++index < length) {
+        var data = transforms[index],
+            size = data.size;
+
+        switch (data.type) {
+          case 'drop':      start += size; break;
+          case 'dropRight': end -= size; break;
+          case 'take':      end = nativeMin(end, start + size); break;
+          case 'takeRight': start = nativeMax(start, end - size); break;
+        }
+      }
+      return { 'start': start, 'end': end };
+    }
+
+    /**
+     * Extracts wrapper details from the `source` body comment.
+     *
+     * @private
+     * @param {string} source The source to inspect.
+     * @returns {Array} Returns the wrapper details.
+     */
+    function getWrapDetails(source) {
+      var match = source.match(reWrapDetails);
+      return match ? match[1].split(reSplitDetails) : [];
+    }
+
+    /**
+     * Checks if `path` exists on `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path to check.
+     * @param {Function} hasFunc The function to check properties.
+     * @returns {boolean} Returns `true` if `path` exists, else `false`.
+     */
+    function hasPath(object, path, hasFunc) {
+      path = castPath(path, object);
+
+      var index = -1,
+          length = path.length,
+          result = false;
+
+      while (++index < length) {
+        var key = toKey(path[index]);
+        if (!(result = object != null && hasFunc(object, key))) {
+          break;
+        }
+        object = object[key];
+      }
+      if (result || ++index != length) {
+        return result;
+      }
+      length = object == null ? 0 : object.length;
+      return !!length && isLength(length) && isIndex(key, length) &&
+        (isArray(object) || isArguments(object));
+    }
+
+    /**
+     * Initializes an array clone.
+     *
+     * @private
+     * @param {Array} array The array to clone.
+     * @returns {Array} Returns the initialized clone.
+     */
+    function initCloneArray(array) {
+      var length = array.length,
+          result = new array.constructor(length);
+
+      // Add properties assigned by `RegExp#exec`.
+      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+        result.index = array.index;
+        result.input = array.input;
+      }
+      return result;
+    }
+
+    /**
+     * Initializes an object clone.
+     *
+     * @private
+     * @param {Object} object The object to clone.
+     * @returns {Object} Returns the initialized clone.
+     */
+    function initCloneObject(object) {
+      return (typeof object.constructor == 'function' && !isPrototype(object))
+        ? baseCreate(getPrototype(object))
+        : {};
+    }
+
+    /**
+     * Initializes an object clone based on its `toStringTag`.
+     *
+     * **Note:** This function only supports cloning values with tags of
+     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+     *
+     * @private
+     * @param {Object} object The object to clone.
+     * @param {string} tag The `toStringTag` of the object to clone.
+     * @param {boolean} [isDeep] Specify a deep clone.
+     * @returns {Object} Returns the initialized clone.
+     */
+    function initCloneByTag(object, tag, isDeep) {
+      var Ctor = object.constructor;
+      switch (tag) {
+        case arrayBufferTag:
+          return cloneArrayBuffer(object);
+
+        case boolTag:
+        case dateTag:
+          return new Ctor(+object);
+
+        case dataViewTag:
+          return cloneDataView(object, isDeep);
+
+        case float32Tag: case float64Tag:
+        case int8Tag: case int16Tag: case int32Tag:
+        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+          return cloneTypedArray(object, isDeep);
+
+        case mapTag:
+          return new Ctor;
+
+        case numberTag:
+        case stringTag:
+          return new Ctor(object);
+
+        case regexpTag:
+          return cloneRegExp(object);
+
+        case setTag:
+          return new Ctor;
+
+        case symbolTag:
+          return cloneSymbol(object);
+      }
+    }
+
+    /**
+     * Inserts wrapper `details` in a comment at the top of the `source` body.
+     *
+     * @private
+     * @param {string} source The source to modify.
+     * @returns {Array} details The details to insert.
+     * @returns {string} Returns the modified source.
+     */
+    function insertWrapDetails(source, details) {
+      var length = details.length;
+      if (!length) {
+        return source;
+      }
+      var lastIndex = length - 1;
+      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+      details = details.join(length > 2 ? ', ' : ' ');
+      return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+    }
+
+    /**
+     * Checks if `value` is a flattenable `arguments` object or array.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+     */
+    function isFlattenable(value) {
+      return isArray(value) || isArguments(value) ||
+        !!(spreadableSymbol && value && value[spreadableSymbol]);
+    }
+
+    /**
+     * Checks if `value` is a valid array-like index.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+     */
+    function isIndex(value, length) {
+      var type = typeof value;
+      length = length == null ? MAX_SAFE_INTEGER : length;
+
+      return !!length &&
+        (type == 'number' ||
+          (type != 'symbol' && reIsUint.test(value))) &&
+            (value > -1 && value % 1 == 0 && value < length);
+    }
+
+    /**
+     * Checks if the given arguments are from an iteratee call.
+     *
+     * @private
+     * @param {*} value The potential iteratee value argument.
+     * @param {*} index The potential iteratee index or key argument.
+     * @param {*} object The potential iteratee object argument.
+     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+     *  else `false`.
+     */
+    function isIterateeCall(value, index, object) {
+      if (!isObject(object)) {
+        return false;
+      }
+      var type = typeof index;
+      if (type == 'number'
+            ? (isArrayLike(object) && isIndex(index, object.length))
+            : (type == 'string' && index in object)
+          ) {
+        return eq(object[index], value);
+      }
+      return false;
+    }
+
+    /**
+     * Checks if `value` is a property name and not a property path.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @param {Object} [object] The object to query keys on.
+     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+     */
+    function isKey(value, object) {
+      if (isArray(value)) {
+        return false;
+      }
+      var type = typeof value;
+      if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+          value == null || isSymbol(value)) {
+        return true;
+      }
+      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+        (object != null && value in Object(object));
+    }
+
+    /**
+     * Checks if `value` is suitable for use as unique object key.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+     */
+    function isKeyable(value) {
+      var type = typeof value;
+      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+        ? (value !== '__proto__')
+        : (value === null);
+    }
+
+    /**
+     * Checks if `func` has a lazy counterpart.
+     *
+     * @private
+     * @param {Function} func The function to check.
+     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+     *  else `false`.
+     */
+    function isLaziable(func) {
+      var funcName = getFuncName(func),
+          other = lodash[funcName];
+
+      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+        return false;
+      }
+      if (func === other) {
+        return true;
+      }
+      var data = getData(other);
+      return !!data && func === data[0];
+    }
+
+    /**
+     * Checks if `func` has its source masked.
+     *
+     * @private
+     * @param {Function} func The function to check.
+     * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+     */
+    function isMasked(func) {
+      return !!maskSrcKey && (maskSrcKey in func);
+    }
+
+    /**
+     * Checks if `func` is capable of being masked.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+     */
+    var isMaskable = coreJsData ? isFunction : stubFalse;
+
+    /**
+     * Checks if `value` is likely a prototype object.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+     */
+    function isPrototype(value) {
+      var Ctor = value && value.constructor,
+          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+      return value === proto;
+    }
+
+    /**
+     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+     *
+     * @private
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` if suitable for strict
+     *  equality comparisons, else `false`.
+     */
+    function isStrictComparable(value) {
+      return value === value && !isObject(value);
+    }
+
+    /**
+     * A specialized version of `matchesProperty` for source values suitable
+     * for strict equality comparisons, i.e. `===`.
+     *
+     * @private
+     * @param {string} key The key of the property to get.
+     * @param {*} srcValue The value to match.
+     * @returns {Function} Returns the new spec function.
+     */
+    function matchesStrictComparable(key, srcValue) {
+      return function(object) {
+        if (object == null) {
+          return false;
+        }
+        return object[key] === srcValue &&
+          (srcValue !== undefined || (key in Object(object)));
+      };
+    }
+
+    /**
+     * A specialized version of `_.memoize` which clears the memoized function's
+     * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+     *
+     * @private
+     * @param {Function} func The function to have its output memoized.
+     * @returns {Function} Returns the new memoized function.
+     */
+    function memoizeCapped(func) {
+      var result = memoize(func, function(key) {
+        if (cache.size === MAX_MEMOIZE_SIZE) {
+          cache.clear();
+        }
+        return key;
+      });
+
+      var cache = result.cache;
+      return result;
+    }
+
+    /**
+     * Merges the function metadata of `source` into `data`.
+     *
+     * Merging metadata reduces the number of wrappers used to invoke a function.
+     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+     * may be applied regardless of execution order. Methods like `_.ary` and
+     * `_.rearg` modify function arguments, making the order in which they are
+     * executed important, preventing the merging of metadata. However, we make
+     * an exception for a safe combined case where curried functions have `_.ary`
+     * and or `_.rearg` applied.
+     *
+     * @private
+     * @param {Array} data The destination metadata.
+     * @param {Array} source The source metadata.
+     * @returns {Array} Returns `data`.
+     */
+    function mergeData(data, source) {
+      var bitmask = data[1],
+          srcBitmask = source[1],
+          newBitmask = bitmask | srcBitmask,
+          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+      var isCombo =
+        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+      // Exit early if metadata can't be merged.
+      if (!(isCommon || isCombo)) {
+        return data;
+      }
+      // Use source `thisArg` if available.
+      if (srcBitmask & WRAP_BIND_FLAG) {
+        data[2] = source[2];
+        // Set when currying a bound function.
+        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+      }
+      // Compose partial arguments.
+      var value = source[3];
+      if (value) {
+        var partials = data[3];
+        data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+      }
+      // Compose partial right arguments.
+      value = source[5];
+      if (value) {
+        partials = data[5];
+        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+      }
+      // Use source `argPos` if available.
+      value = source[7];
+      if (value) {
+        data[7] = value;
+      }
+      // Use source `ary` if it's smaller.
+      if (srcBitmask & WRAP_ARY_FLAG) {
+        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+      }
+      // Use source `arity` if one is not provided.
+      if (data[9] == null) {
+        data[9] = source[9];
+      }
+      // Use source `func` and merge bitmasks.
+      data[0] = source[0];
+      data[1] = newBitmask;
+
+      return data;
+    }
+
+    /**
+     * This function is like
+     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+     * except that it includes inherited enumerable properties.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property names.
+     */
+    function nativeKeysIn(object) {
+      var result = [];
+      if (object != null) {
+        for (var key in Object(object)) {
+          result.push(key);
+        }
+      }
+      return result;
+    }
+
+    /**
+     * Converts `value` to a string using `Object.prototype.toString`.
+     *
+     * @private
+     * @param {*} value The value to convert.
+     * @returns {string} Returns the converted string.
+     */
+    function objectToString(value) {
+      return nativeObjectToString.call(value);
+    }
+
+    /**
+     * A specialized version of `baseRest` which transforms the rest array.
+     *
+     * @private
+     * @param {Function} func The function to apply a rest parameter to.
+     * @param {number} [start=func.length-1] The start position of the rest parameter.
+     * @param {Function} transform The rest array transform.
+     * @returns {Function} Returns the new function.
+     */
+    function overRest(func, start, transform) {
+      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+      return function() {
+        var args = arguments,
+            index = -1,
+            length = nativeMax(args.length - start, 0),
+            array = Array(length);
+
+        while (++index < length) {
+          array[index] = args[start + index];
+        }
+        index = -1;
+        var otherArgs = Array(start + 1);
+        while (++index < start) {
+          otherArgs[index] = args[index];
+        }
+        otherArgs[start] = transform(array);
+        return apply(func, this, otherArgs);
+      };
+    }
+
+    /**
+     * Gets the parent value at `path` of `object`.
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @param {Array} path The path to get the parent value of.
+     * @returns {*} Returns the parent value.
+     */
+    function parent(object, path) {
+      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+    }
+
+    /**
+     * Reorder `array` according to the specified indexes where the element at
+     * the first index is assigned as the first element, the element at
+     * the second index is assigned as the second element, and so on.
+     *
+     * @private
+     * @param {Array} array The array to reorder.
+     * @param {Array} indexes The arranged array indexes.
+     * @returns {Array} Returns `array`.
+     */
+    function reorder(array, indexes) {
+      var arrLength = array.length,
+          length = nativeMin(indexes.length, arrLength),
+          oldArray = copyArray(array);
+
+      while (length--) {
+        var index = indexes[length];
+        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+      }
+      return array;
+    }
+
+    /**
+     * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
+     *
+     * @private
+     * @param {Object} object The object to query.
+     * @param {string} key The key of the property to get.
+     * @returns {*} Returns the property value.
+     */
+    function safeGet(object, key) {
+      if (key === 'constructor' && typeof object[key] === 'function') {
+        return;
+      }
+
+      if (key == '__proto__') {
+        return;
+      }
+
+      return object[key];
+    }
+
+    /**
+     * Sets metadata for `func`.
+     *
+     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+     * period of time, it will trip its breaker and transition to an identity
+     * function to avoid garbage collection pauses in V8. See
+     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+     * for more details.
+     *
+     * @private
+     * @param {Function} func The function to associate metadata with.
+     * @param {*} data The metadata.
+     * @returns {Function} Returns `func`.
+     */
+    var setData = shortOut(baseSetData);
+
+    /**
+     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
+     *
+     * @private
+     * @param {Function} func The function to delay.
+     * @param {number} wait The number of milliseconds to delay invocation.
+     * @returns {number|Object} Returns the timer id or timeout object.
+     */
+    var setTimeout = ctxSetTimeout || function(func, wait) {
+      return root.setTimeout(func, wait);
+    };
+
+    /**
+     * Sets the `toString` method of `func` to return `string`.
+     *
+     * @private
+     * @param {Function} func The function to modify.
+     * @param {Function} string The `toString` result.
+     * @returns {Function} Returns `func`.
+     */
+    var setToString = shortOut(baseSetToString);
+
+    /**
+     * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+     * with wrapper details in a comment at the top of the source body.
+     *
+     * @private
+     * @param {Function} wrapper The function to modify.
+     * @param {Function} reference The reference function.
+     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+     * @returns {Function} Returns `wrapper`.
+     */
+    function setWrapToString(wrapper, reference, bitmask) {
+      var source = (reference + '');
+      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+    }
+
+    /**
+     * Creates a function that'll short out and invoke `identity` instead
+     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+     * milliseconds.
+     *
+     * @private
+     * @param {Function} func The function to restrict.
+     * @returns {Function} Returns the new shortable function.
+     */
+    function shortOut(func) {
+      var count = 0,
+          lastCalled = 0;
+
+      return function() {
+        var stamp = nativeNow(),
+            remaining = HOT_SPAN - (stamp - lastCalled);
+
+        lastCalled = stamp;
+        if (remaining > 0) {
+          if (++count >= HOT_COUNT) {
+            return arguments[0];
+          }
+        } else {
+          count = 0;
+        }
+        return func.apply(undefined, arguments);
+      };
+    }
+
+    /**
+     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+     *
+     * @private
+     * @param {Array} array The array to shuffle.
+     * @param {number} [size=array.length] The size of `array`.
+     * @returns {Array} Returns `array`.
+     */
+    function shuffleSelf(array, size) {
+      var index = -1,
+          length = array.length,
+          lastIndex = length - 1;
+
+      size = size === undefined ? length : size;
+      while (++index < size) {
+        var rand = baseRandom(index, lastIndex),
+            value = array[rand];
+
+        array[rand] = array[index];
+        array[index] = value;
+      }
+      array.length = size;
+      return array;
+    }
+
+    /**
+     * Converts `string` to a property path array.
+     *
+     * @private
+     * @param {string} string The string to convert.
+     * @returns {Array} Returns the property path array.
+     */
+    var stringToPath = memoizeCapped(function(string) {
+      var result = [];
+      if (string.charCodeAt(0) === 46 /* . */) {
+        result.push('');
+      }
+      string.replace(rePropName, function(match, number, quote, subString) {
+        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+      });
+      return result;
+    });
+
+    /**
+     * Converts `value` to a string key if it's not a string or symbol.
+     *
+     * @private
+     * @param {*} value The value to inspect.
+     * @returns {string|symbol} Returns the key.
+     */
+    function toKey(value) {
+      if (typeof value == 'string' || isSymbol(value)) {
+        return value;
+      }
+      var result = (value + '');
+      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+    }
+
+    /**
+     * Converts `func` to its source code.
+     *
+     * @private
+     * @param {Function} func The function to convert.
+     * @returns {string} Returns the source code.
+     */
+    function toSource(func) {
+      if (func != null) {
+        try {
+          return funcToString.call(func);
+        } catch (e) {}
+        try {
+          return (func + '');
+        } catch (e) {}
+      }
+      return '';
+    }
+
+    /**
+     * Updates wrapper `details` based on `bitmask` flags.
+     *
+     * @private
+     * @returns {Array} details The details to modify.
+     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+     * @returns {Array} Returns `details`.
+     */
+    function updateWrapDetails(details, bitmask) {
+      arrayEach(wrapFlags, function(pair) {
+        var value = '_.' + pair[0];
+        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+          details.push(value);
+        }
+      });
+      return details.sort();
+    }
+
+    /**
+     * Creates a clone of `wrapper`.
+     *
+     * @private
+     * @param {Object} wrapper The wrapper to clone.
+     * @returns {Object} Returns the cloned wrapper.
+     */
+    function wrapperClone(wrapper) {
+      if (wrapper instanceof LazyWrapper) {
+        return wrapper.clone();
+      }
+      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+      result.__actions__ = copyArray(wrapper.__actions__);
+      result.__index__  = wrapper.__index__;
+      result.__values__ = wrapper.__values__;
+      return result;
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates an array of elements split into groups the length of `size`.
+     * If `array` can't be split evenly, the final chunk will be the remaining
+     * elements.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to process.
+     * @param {number} [size=1] The length of each chunk
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Array} Returns the new array of chunks.
+     * @example
+     *
+     * _.chunk(['a', 'b', 'c', 'd'], 2);
+     * // => [['a', 'b'], ['c', 'd']]
+     *
+     * _.chunk(['a', 'b', 'c', 'd'], 3);
+     * // => [['a', 'b', 'c'], ['d']]
+     */
+    function chunk(array, size, guard) {
+      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+        size = 1;
+      } else {
+        size = nativeMax(toInteger(size), 0);
+      }
+      var length = array == null ? 0 : array.length;
+      if (!length || size < 1) {
+        return [];
+      }
+      var index = 0,
+          resIndex = 0,
+          result = Array(nativeCeil(length / size));
+
+      while (index < length) {
+        result[resIndex++] = baseSlice(array, index, (index += size));
+      }
+      return result;
+    }
+
+    /**
+     * Creates an array with all falsey values removed. The values `false`, `null`,
+     * `0`, `""`, `undefined`, and `NaN` are falsey.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to compact.
+     * @returns {Array} Returns the new array of filtered values.
+     * @example
+     *
+     * _.compact([0, 1, false, 2, '', 3]);
+     * // => [1, 2, 3]
+     */
+    function compact(array) {
+      var index = -1,
+          length = array == null ? 0 : array.length,
+          resIndex = 0,
+          result = [];
+
+      while (++index < length) {
+        var value = array[index];
+        if (value) {
+          result[resIndex++] = value;
+        }
+      }
+      return result;
+    }
+
+    /**
+     * Creates a new array concatenating `array` with any additional arrays
+     * and/or values.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to concatenate.
+     * @param {...*} [values] The values to concatenate.
+     * @returns {Array} Returns the new concatenated array.
+     * @example
+     *
+     * var array = [1];
+     * var other = _.concat(array, 2, [3], [[4]]);
+     *
+     * console.log(other);
+     * // => [1, 2, 3, [4]]
+     *
+     * console.log(array);
+     * // => [1]
+     */
+    function concat() {
+      var length = arguments.length;
+      if (!length) {
+        return [];
+      }
+      var args = Array(length - 1),
+          array = arguments[0],
+          index = length;
+
+      while (index--) {
+        args[index - 1] = arguments[index];
+      }
+      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+    }
+
+    /**
+     * Creates an array of `array` values not included in the other given arrays
+     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons. The order and references of result values are
+     * determined by the first array.
+     *
+     * **Note:** Unlike `_.pullAll`, this method returns a new array.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {...Array} [values] The values to exclude.
+     * @returns {Array} Returns the new array of filtered values.
+     * @see _.without, _.xor
+     * @example
+     *
+     * _.difference([2, 1], [2, 3]);
+     * // => [1]
+     */
+    var difference = baseRest(function(array, values) {
+      return isArrayLikeObject(array)
+        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+        : [];
+    });
+
+    /**
+     * This method is like `_.difference` except that it accepts `iteratee` which
+     * is invoked for each element of `array` and `values` to generate the criterion
+     * by which they're compared. The order and references of result values are
+     * determined by the first array. The iteratee is invoked with one argument:
+     * (value).
+     *
+     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {...Array} [values] The values to exclude.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {Array} Returns the new array of filtered values.
+     * @example
+     *
+     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+     * // => [1.2]
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+     * // => [{ 'x': 2 }]
+     */
+    var differenceBy = baseRest(function(array, values) {
+      var iteratee = last(values);
+      if (isArrayLikeObject(iteratee)) {
+        iteratee = undefined;
+      }
+      return isArrayLikeObject(array)
+        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
+        : [];
+    });
+
+    /**
+     * This method is like `_.difference` except that it accepts `comparator`
+     * which is invoked to compare elements of `array` to `values`. The order and
+     * references of result values are determined by the first array. The comparator
+     * is invoked with two arguments: (arrVal, othVal).
+     *
+     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {...Array} [values] The values to exclude.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new array of filtered values.
+     * @example
+     *
+     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+     *
+     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+     * // => [{ 'x': 2, 'y': 1 }]
+     */
+    var differenceWith = baseRest(function(array, values) {
+      var comparator = last(values);
+      if (isArrayLikeObject(comparator)) {
+        comparator = undefined;
+      }
+      return isArrayLikeObject(array)
+        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+        : [];
+    });
+
+    /**
+     * Creates a slice of `array` with `n` elements dropped from the beginning.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.5.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {number} [n=1] The number of elements to drop.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * _.drop([1, 2, 3]);
+     * // => [2, 3]
+     *
+     * _.drop([1, 2, 3], 2);
+     * // => [3]
+     *
+     * _.drop([1, 2, 3], 5);
+     * // => []
+     *
+     * _.drop([1, 2, 3], 0);
+     * // => [1, 2, 3]
+     */
+    function drop(array, n, guard) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return [];
+      }
+      n = (guard || n === undefined) ? 1 : toInteger(n);
+      return baseSlice(array, n < 0 ? 0 : n, length);
+    }
+
+    /**
+     * Creates a slice of `array` with `n` elements dropped from the end.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {number} [n=1] The number of elements to drop.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * _.dropRight([1, 2, 3]);
+     * // => [1, 2]
+     *
+     * _.dropRight([1, 2, 3], 2);
+     * // => [1]
+     *
+     * _.dropRight([1, 2, 3], 5);
+     * // => []
+     *
+     * _.dropRight([1, 2, 3], 0);
+     * // => [1, 2, 3]
+     */
+    function dropRight(array, n, guard) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return [];
+      }
+      n = (guard || n === undefined) ? 1 : toInteger(n);
+      n = length - n;
+      return baseSlice(array, 0, n < 0 ? 0 : n);
+    }
+
+    /**
+     * Creates a slice of `array` excluding elements dropped from the end.
+     * Elements are dropped until `predicate` returns falsey. The predicate is
+     * invoked with three arguments: (value, index, array).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'active': true },
+     *   { 'user': 'fred',    'active': false },
+     *   { 'user': 'pebbles', 'active': false }
+     * ];
+     *
+     * _.dropRightWhile(users, function(o) { return !o.active; });
+     * // => objects for ['barney']
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+     * // => objects for ['barney', 'fred']
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.dropRightWhile(users, ['active', false]);
+     * // => objects for ['barney']
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.dropRightWhile(users, 'active');
+     * // => objects for ['barney', 'fred', 'pebbles']
+     */
+    function dropRightWhile(array, predicate) {
+      return (array && array.length)
+        ? baseWhile(array, getIteratee(predicate, 3), true, true)
+        : [];
+    }
+
+    /**
+     * Creates a slice of `array` excluding elements dropped from the beginning.
+     * Elements are dropped until `predicate` returns falsey. The predicate is
+     * invoked with three arguments: (value, index, array).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'active': false },
+     *   { 'user': 'fred',    'active': false },
+     *   { 'user': 'pebbles', 'active': true }
+     * ];
+     *
+     * _.dropWhile(users, function(o) { return !o.active; });
+     * // => objects for ['pebbles']
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.dropWhile(users, { 'user': 'barney', 'active': false });
+     * // => objects for ['fred', 'pebbles']
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.dropWhile(users, ['active', false]);
+     * // => objects for ['pebbles']
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.dropWhile(users, 'active');
+     * // => objects for ['barney', 'fred', 'pebbles']
+     */
+    function dropWhile(array, predicate) {
+      return (array && array.length)
+        ? baseWhile(array, getIteratee(predicate, 3), true)
+        : [];
+    }
+
+    /**
+     * Fills elements of `array` with `value` from `start` up to, but not
+     * including, `end`.
+     *
+     * **Note:** This method mutates `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.2.0
+     * @category Array
+     * @param {Array} array The array to fill.
+     * @param {*} value The value to fill `array` with.
+     * @param {number} [start=0] The start position.
+     * @param {number} [end=array.length] The end position.
+     * @returns {Array} Returns `array`.
+     * @example
+     *
+     * var array = [1, 2, 3];
+     *
+     * _.fill(array, 'a');
+     * console.log(array);
+     * // => ['a', 'a', 'a']
+     *
+     * _.fill(Array(3), 2);
+     * // => [2, 2, 2]
+     *
+     * _.fill([4, 6, 8, 10], '*', 1, 3);
+     * // => [4, '*', '*', 10]
+     */
+    function fill(array, value, start, end) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return [];
+      }
+      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+        start = 0;
+        end = length;
+      }
+      return baseFill(array, value, start, end);
+    }
+
+    /**
+     * This method is like `_.find` except that it returns the index of the first
+     * element `predicate` returns truthy for instead of the element itself.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.1.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @param {number} [fromIndex=0] The index to search from.
+     * @returns {number} Returns the index of the found element, else `-1`.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'active': false },
+     *   { 'user': 'fred',    'active': false },
+     *   { 'user': 'pebbles', 'active': true }
+     * ];
+     *
+     * _.findIndex(users, function(o) { return o.user == 'barney'; });
+     * // => 0
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.findIndex(users, { 'user': 'fred', 'active': false });
+     * // => 1
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.findIndex(users, ['active', false]);
+     * // => 0
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.findIndex(users, 'active');
+     * // => 2
+     */
+    function findIndex(array, predicate, fromIndex) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return -1;
+      }
+      var index = fromIndex == null ? 0 : toInteger(fromIndex);
+      if (index < 0) {
+        index = nativeMax(length + index, 0);
+      }
+      return baseFindIndex(array, getIteratee(predicate, 3), index);
+    }
+
+    /**
+     * This method is like `_.findIndex` except that it iterates over elements
+     * of `collection` from right to left.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @param {number} [fromIndex=array.length-1] The index to search from.
+     * @returns {number} Returns the index of the found element, else `-1`.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'active': true },
+     *   { 'user': 'fred',    'active': false },
+     *   { 'user': 'pebbles', 'active': false }
+     * ];
+     *
+     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+     * // => 2
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+     * // => 0
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.findLastIndex(users, ['active', false]);
+     * // => 2
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.findLastIndex(users, 'active');
+     * // => 0
+     */
+    function findLastIndex(array, predicate, fromIndex) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return -1;
+      }
+      var index = length - 1;
+      if (fromIndex !== undefined) {
+        index = toInteger(fromIndex);
+        index = fromIndex < 0
+          ? nativeMax(length + index, 0)
+          : nativeMin(index, length - 1);
+      }
+      return baseFindIndex(array, getIteratee(predicate, 3), index, true);
+    }
+
+    /**
+     * Flattens `array` a single level deep.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to flatten.
+     * @returns {Array} Returns the new flattened array.
+     * @example
+     *
+     * _.flatten([1, [2, [3, [4]], 5]]);
+     * // => [1, 2, [3, [4]], 5]
+     */
+    function flatten(array) {
+      var length = array == null ? 0 : array.length;
+      return length ? baseFlatten(array, 1) : [];
+    }
+
+    /**
+     * Recursively flattens `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to flatten.
+     * @returns {Array} Returns the new flattened array.
+     * @example
+     *
+     * _.flattenDeep([1, [2, [3, [4]], 5]]);
+     * // => [1, 2, 3, 4, 5]
+     */
+    function flattenDeep(array) {
+      var length = array == null ? 0 : array.length;
+      return length ? baseFlatten(array, INFINITY) : [];
+    }
+
+    /**
+     * Recursively flatten `array` up to `depth` times.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.4.0
+     * @category Array
+     * @param {Array} array The array to flatten.
+     * @param {number} [depth=1] The maximum recursion depth.
+     * @returns {Array} Returns the new flattened array.
+     * @example
+     *
+     * var array = [1, [2, [3, [4]], 5]];
+     *
+     * _.flattenDepth(array, 1);
+     * // => [1, 2, [3, [4]], 5]
+     *
+     * _.flattenDepth(array, 2);
+     * // => [1, 2, 3, [4], 5]
+     */
+    function flattenDepth(array, depth) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return [];
+      }
+      depth = depth === undefined ? 1 : toInteger(depth);
+      return baseFlatten(array, depth);
+    }
+
+    /**
+     * The inverse of `_.toPairs`; this method returns an object composed
+     * from key-value `pairs`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} pairs The key-value pairs.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * _.fromPairs([['a', 1], ['b', 2]]);
+     * // => { 'a': 1, 'b': 2 }
+     */
+    function fromPairs(pairs) {
+      var index = -1,
+          length = pairs == null ? 0 : pairs.length,
+          result = {};
+
+      while (++index < length) {
+        var pair = pairs[index];
+        result[pair[0]] = pair[1];
+      }
+      return result;
+    }
+
+    /**
+     * Gets the first element of `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @alias first
+     * @category Array
+     * @param {Array} array The array to query.
+     * @returns {*} Returns the first element of `array`.
+     * @example
+     *
+     * _.head([1, 2, 3]);
+     * // => 1
+     *
+     * _.head([]);
+     * // => undefined
+     */
+    function head(array) {
+      return (array && array.length) ? array[0] : undefined;
+    }
+
+    /**
+     * Gets the index at which the first occurrence of `value` is found in `array`
+     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons. If `fromIndex` is negative, it's used as the
+     * offset from the end of `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {*} value The value to search for.
+     * @param {number} [fromIndex=0] The index to search from.
+     * @returns {number} Returns the index of the matched value, else `-1`.
+     * @example
+     *
+     * _.indexOf([1, 2, 1, 2], 2);
+     * // => 1
+     *
+     * // Search from the `fromIndex`.
+     * _.indexOf([1, 2, 1, 2], 2, 2);
+     * // => 3
+     */
+    function indexOf(array, value, fromIndex) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return -1;
+      }
+      var index = fromIndex == null ? 0 : toInteger(fromIndex);
+      if (index < 0) {
+        index = nativeMax(length + index, 0);
+      }
+      return baseIndexOf(array, value, index);
+    }
+
+    /**
+     * Gets all but the last element of `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * _.initial([1, 2, 3]);
+     * // => [1, 2]
+     */
+    function initial(array) {
+      var length = array == null ? 0 : array.length;
+      return length ? baseSlice(array, 0, -1) : [];
+    }
+
+    /**
+     * Creates an array of unique values that are included in all given arrays
+     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons. The order and references of result values are
+     * determined by the first array.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @returns {Array} Returns the new array of intersecting values.
+     * @example
+     *
+     * _.intersection([2, 1], [2, 3]);
+     * // => [2]
+     */
+    var intersection = baseRest(function(arrays) {
+      var mapped = arrayMap(arrays, castArrayLikeObject);
+      return (mapped.length && mapped[0] === arrays[0])
+        ? baseIntersection(mapped)
+        : [];
+    });
+
+    /**
+     * This method is like `_.intersection` except that it accepts `iteratee`
+     * which is invoked for each element of each `arrays` to generate the criterion
+     * by which they're compared. The order and references of result values are
+     * determined by the first array. The iteratee is invoked with one argument:
+     * (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {Array} Returns the new array of intersecting values.
+     * @example
+     *
+     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+     * // => [2.1]
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+     * // => [{ 'x': 1 }]
+     */
+    var intersectionBy = baseRest(function(arrays) {
+      var iteratee = last(arrays),
+          mapped = arrayMap(arrays, castArrayLikeObject);
+
+      if (iteratee === last(mapped)) {
+        iteratee = undefined;
+      } else {
+        mapped.pop();
+      }
+      return (mapped.length && mapped[0] === arrays[0])
+        ? baseIntersection(mapped, getIteratee(iteratee, 2))
+        : [];
+    });
+
+    /**
+     * This method is like `_.intersection` except that it accepts `comparator`
+     * which is invoked to compare elements of `arrays`. The order and references
+     * of result values are determined by the first array. The comparator is
+     * invoked with two arguments: (arrVal, othVal).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new array of intersecting values.
+     * @example
+     *
+     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+     *
+     * _.intersectionWith(objects, others, _.isEqual);
+     * // => [{ 'x': 1, 'y': 2 }]
+     */
+    var intersectionWith = baseRest(function(arrays) {
+      var comparator = last(arrays),
+          mapped = arrayMap(arrays, castArrayLikeObject);
+
+      comparator = typeof comparator == 'function' ? comparator : undefined;
+      if (comparator) {
+        mapped.pop();
+      }
+      return (mapped.length && mapped[0] === arrays[0])
+        ? baseIntersection(mapped, undefined, comparator)
+        : [];
+    });
+
+    /**
+     * Converts all elements in `array` into a string separated by `separator`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to convert.
+     * @param {string} [separator=','] The element separator.
+     * @returns {string} Returns the joined string.
+     * @example
+     *
+     * _.join(['a', 'b', 'c'], '~');
+     * // => 'a~b~c'
+     */
+    function join(array, separator) {
+      return array == null ? '' : nativeJoin.call(array, separator);
+    }
+
+    /**
+     * Gets the last element of `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @returns {*} Returns the last element of `array`.
+     * @example
+     *
+     * _.last([1, 2, 3]);
+     * // => 3
+     */
+    function last(array) {
+      var length = array == null ? 0 : array.length;
+      return length ? array[length - 1] : undefined;
+    }
+
+    /**
+     * This method is like `_.indexOf` except that it iterates over elements of
+     * `array` from right to left.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {*} value The value to search for.
+     * @param {number} [fromIndex=array.length-1] The index to search from.
+     * @returns {number} Returns the index of the matched value, else `-1`.
+     * @example
+     *
+     * _.lastIndexOf([1, 2, 1, 2], 2);
+     * // => 3
+     *
+     * // Search from the `fromIndex`.
+     * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+     * // => 1
+     */
+    function lastIndexOf(array, value, fromIndex) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return -1;
+      }
+      var index = length;
+      if (fromIndex !== undefined) {
+        index = toInteger(fromIndex);
+        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+      }
+      return value === value
+        ? strictLastIndexOf(array, value, index)
+        : baseFindIndex(array, baseIsNaN, index, true);
+    }
+
+    /**
+     * Gets the element at index `n` of `array`. If `n` is negative, the nth
+     * element from the end is returned.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.11.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {number} [n=0] The index of the element to return.
+     * @returns {*} Returns the nth element of `array`.
+     * @example
+     *
+     * var array = ['a', 'b', 'c', 'd'];
+     *
+     * _.nth(array, 1);
+     * // => 'b'
+     *
+     * _.nth(array, -2);
+     * // => 'c';
+     */
+    function nth(array, n) {
+      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+    }
+
+    /**
+     * Removes all given values from `array` using
+     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons.
+     *
+     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+     * to remove elements from an array by predicate.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Array
+     * @param {Array} array The array to modify.
+     * @param {...*} [values] The values to remove.
+     * @returns {Array} Returns `array`.
+     * @example
+     *
+     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+     *
+     * _.pull(array, 'a', 'c');
+     * console.log(array);
+     * // => ['b', 'b']
+     */
+    var pull = baseRest(pullAll);
+
+    /**
+     * This method is like `_.pull` except that it accepts an array of values to remove.
+     *
+     * **Note:** Unlike `_.difference`, this method mutates `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to modify.
+     * @param {Array} values The values to remove.
+     * @returns {Array} Returns `array`.
+     * @example
+     *
+     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+     *
+     * _.pullAll(array, ['a', 'c']);
+     * console.log(array);
+     * // => ['b', 'b']
+     */
+    function pullAll(array, values) {
+      return (array && array.length && values && values.length)
+        ? basePullAll(array, values)
+        : array;
+    }
+
+    /**
+     * This method is like `_.pullAll` except that it accepts `iteratee` which is
+     * invoked for each element of `array` and `values` to generate the criterion
+     * by which they're compared. The iteratee is invoked with one argument: (value).
+     *
+     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to modify.
+     * @param {Array} values The values to remove.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {Array} Returns `array`.
+     * @example
+     *
+     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+     *
+     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+     * console.log(array);
+     * // => [{ 'x': 2 }]
+     */
+    function pullAllBy(array, values, iteratee) {
+      return (array && array.length && values && values.length)
+        ? basePullAll(array, values, getIteratee(iteratee, 2))
+        : array;
+    }
+
+    /**
+     * This method is like `_.pullAll` except that it accepts `comparator` which
+     * is invoked to compare elements of `array` to `values`. The comparator is
+     * invoked with two arguments: (arrVal, othVal).
+     *
+     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.6.0
+     * @category Array
+     * @param {Array} array The array to modify.
+     * @param {Array} values The values to remove.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns `array`.
+     * @example
+     *
+     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+     *
+     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+     * console.log(array);
+     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+     */
+    function pullAllWith(array, values, comparator) {
+      return (array && array.length && values && values.length)
+        ? basePullAll(array, values, undefined, comparator)
+        : array;
+    }
+
+    /**
+     * Removes elements from `array` corresponding to `indexes` and returns an
+     * array of removed elements.
+     *
+     * **Note:** Unlike `_.at`, this method mutates `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to modify.
+     * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+     * @returns {Array} Returns the new array of removed elements.
+     * @example
+     *
+     * var array = ['a', 'b', 'c', 'd'];
+     * var pulled = _.pullAt(array, [1, 3]);
+     *
+     * console.log(array);
+     * // => ['a', 'c']
+     *
+     * console.log(pulled);
+     * // => ['b', 'd']
+     */
+    var pullAt = flatRest(function(array, indexes) {
+      var length = array == null ? 0 : array.length,
+          result = baseAt(array, indexes);
+
+      basePullAt(array, arrayMap(indexes, function(index) {
+        return isIndex(index, length) ? +index : index;
+      }).sort(compareAscending));
+
+      return result;
+    });
+
+    /**
+     * Removes all elements from `array` that `predicate` returns truthy for
+     * and returns an array of the removed elements. The predicate is invoked
+     * with three arguments: (value, index, array).
+     *
+     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+     * to pull elements from an array by value.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Array
+     * @param {Array} array The array to modify.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the new array of removed elements.
+     * @example
+     *
+     * var array = [1, 2, 3, 4];
+     * var evens = _.remove(array, function(n) {
+     *   return n % 2 == 0;
+     * });
+     *
+     * console.log(array);
+     * // => [1, 3]
+     *
+     * console.log(evens);
+     * // => [2, 4]
+     */
+    function remove(array, predicate) {
+      var result = [];
+      if (!(array && array.length)) {
+        return result;
+      }
+      var index = -1,
+          indexes = [],
+          length = array.length;
+
+      predicate = getIteratee(predicate, 3);
+      while (++index < length) {
+        var value = array[index];
+        if (predicate(value, index, array)) {
+          result.push(value);
+          indexes.push(index);
+        }
+      }
+      basePullAt(array, indexes);
+      return result;
+    }
+
+    /**
+     * Reverses `array` so that the first element becomes the last, the second
+     * element becomes the second to last, and so on.
+     *
+     * **Note:** This method mutates `array` and is based on
+     * [`Array#reverse`](https://mdn.io/Array/reverse).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to modify.
+     * @returns {Array} Returns `array`.
+     * @example
+     *
+     * var array = [1, 2, 3];
+     *
+     * _.reverse(array);
+     * // => [3, 2, 1]
+     *
+     * console.log(array);
+     * // => [3, 2, 1]
+     */
+    function reverse(array) {
+      return array == null ? array : nativeReverse.call(array);
+    }
+
+    /**
+     * Creates a slice of `array` from `start` up to, but not including, `end`.
+     *
+     * **Note:** This method is used instead of
+     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+     * returned.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to slice.
+     * @param {number} [start=0] The start position.
+     * @param {number} [end=array.length] The end position.
+     * @returns {Array} Returns the slice of `array`.
+     */
+    function slice(array, start, end) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return [];
+      }
+      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+        start = 0;
+        end = length;
+      }
+      else {
+        start = start == null ? 0 : toInteger(start);
+        end = end === undefined ? length : toInteger(end);
+      }
+      return baseSlice(array, start, end);
+    }
+
+    /**
+     * Uses a binary search to determine the lowest index at which `value`
+     * should be inserted into `array` in order to maintain its sort order.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The sorted array to inspect.
+     * @param {*} value The value to evaluate.
+     * @returns {number} Returns the index at which `value` should be inserted
+     *  into `array`.
+     * @example
+     *
+     * _.sortedIndex([30, 50], 40);
+     * // => 1
+     */
+    function sortedIndex(array, value) {
+      return baseSortedIndex(array, value);
+    }
+
+    /**
+     * This method is like `_.sortedIndex` except that it accepts `iteratee`
+     * which is invoked for `value` and each element of `array` to compute their
+     * sort ranking. The iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The sorted array to inspect.
+     * @param {*} value The value to evaluate.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {number} Returns the index at which `value` should be inserted
+     *  into `array`.
+     * @example
+     *
+     * var objects = [{ 'x': 4 }, { 'x': 5 }];
+     *
+     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+     * // => 0
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+     * // => 0
+     */
+    function sortedIndexBy(array, value, iteratee) {
+      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
+    }
+
+    /**
+     * This method is like `_.indexOf` except that it performs a binary
+     * search on a sorted `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {*} value The value to search for.
+     * @returns {number} Returns the index of the matched value, else `-1`.
+     * @example
+     *
+     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+     * // => 1
+     */
+    function sortedIndexOf(array, value) {
+      var length = array == null ? 0 : array.length;
+      if (length) {
+        var index = baseSortedIndex(array, value);
+        if (index < length && eq(array[index], value)) {
+          return index;
+        }
+      }
+      return -1;
+    }
+
+    /**
+     * This method is like `_.sortedIndex` except that it returns the highest
+     * index at which `value` should be inserted into `array` in order to
+     * maintain its sort order.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The sorted array to inspect.
+     * @param {*} value The value to evaluate.
+     * @returns {number} Returns the index at which `value` should be inserted
+     *  into `array`.
+     * @example
+     *
+     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+     * // => 4
+     */
+    function sortedLastIndex(array, value) {
+      return baseSortedIndex(array, value, true);
+    }
+
+    /**
+     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+     * which is invoked for `value` and each element of `array` to compute their
+     * sort ranking. The iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The sorted array to inspect.
+     * @param {*} value The value to evaluate.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {number} Returns the index at which `value` should be inserted
+     *  into `array`.
+     * @example
+     *
+     * var objects = [{ 'x': 4 }, { 'x': 5 }];
+     *
+     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+     * // => 1
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+     * // => 1
+     */
+    function sortedLastIndexBy(array, value, iteratee) {
+      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
+    }
+
+    /**
+     * This method is like `_.lastIndexOf` except that it performs a binary
+     * search on a sorted `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {*} value The value to search for.
+     * @returns {number} Returns the index of the matched value, else `-1`.
+     * @example
+     *
+     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+     * // => 3
+     */
+    function sortedLastIndexOf(array, value) {
+      var length = array == null ? 0 : array.length;
+      if (length) {
+        var index = baseSortedIndex(array, value, true) - 1;
+        if (eq(array[index], value)) {
+          return index;
+        }
+      }
+      return -1;
+    }
+
+    /**
+     * This method is like `_.uniq` except that it's designed and optimized
+     * for sorted arrays.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @returns {Array} Returns the new duplicate free array.
+     * @example
+     *
+     * _.sortedUniq([1, 1, 2]);
+     * // => [1, 2]
+     */
+    function sortedUniq(array) {
+      return (array && array.length)
+        ? baseSortedUniq(array)
+        : [];
+    }
+
+    /**
+     * This method is like `_.uniqBy` except that it's designed and optimized
+     * for sorted arrays.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {Function} [iteratee] The iteratee invoked per element.
+     * @returns {Array} Returns the new duplicate free array.
+     * @example
+     *
+     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+     * // => [1.1, 2.3]
+     */
+    function sortedUniqBy(array, iteratee) {
+      return (array && array.length)
+        ? baseSortedUniq(array, getIteratee(iteratee, 2))
+        : [];
+    }
+
+    /**
+     * Gets all but the first element of `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * _.tail([1, 2, 3]);
+     * // => [2, 3]
+     */
+    function tail(array) {
+      var length = array == null ? 0 : array.length;
+      return length ? baseSlice(array, 1, length) : [];
+    }
+
+    /**
+     * Creates a slice of `array` with `n` elements taken from the beginning.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {number} [n=1] The number of elements to take.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * _.take([1, 2, 3]);
+     * // => [1]
+     *
+     * _.take([1, 2, 3], 2);
+     * // => [1, 2]
+     *
+     * _.take([1, 2, 3], 5);
+     * // => [1, 2, 3]
+     *
+     * _.take([1, 2, 3], 0);
+     * // => []
+     */
+    function take(array, n, guard) {
+      if (!(array && array.length)) {
+        return [];
+      }
+      n = (guard || n === undefined) ? 1 : toInteger(n);
+      return baseSlice(array, 0, n < 0 ? 0 : n);
+    }
+
+    /**
+     * Creates a slice of `array` with `n` elements taken from the end.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {number} [n=1] The number of elements to take.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * _.takeRight([1, 2, 3]);
+     * // => [3]
+     *
+     * _.takeRight([1, 2, 3], 2);
+     * // => [2, 3]
+     *
+     * _.takeRight([1, 2, 3], 5);
+     * // => [1, 2, 3]
+     *
+     * _.takeRight([1, 2, 3], 0);
+     * // => []
+     */
+    function takeRight(array, n, guard) {
+      var length = array == null ? 0 : array.length;
+      if (!length) {
+        return [];
+      }
+      n = (guard || n === undefined) ? 1 : toInteger(n);
+      n = length - n;
+      return baseSlice(array, n < 0 ? 0 : n, length);
+    }
+
+    /**
+     * Creates a slice of `array` with elements taken from the end. Elements are
+     * taken until `predicate` returns falsey. The predicate is invoked with
+     * three arguments: (value, index, array).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'active': true },
+     *   { 'user': 'fred',    'active': false },
+     *   { 'user': 'pebbles', 'active': false }
+     * ];
+     *
+     * _.takeRightWhile(users, function(o) { return !o.active; });
+     * // => objects for ['fred', 'pebbles']
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+     * // => objects for ['pebbles']
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.takeRightWhile(users, ['active', false]);
+     * // => objects for ['fred', 'pebbles']
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.takeRightWhile(users, 'active');
+     * // => []
+     */
+    function takeRightWhile(array, predicate) {
+      return (array && array.length)
+        ? baseWhile(array, getIteratee(predicate, 3), false, true)
+        : [];
+    }
+
+    /**
+     * Creates a slice of `array` with elements taken from the beginning. Elements
+     * are taken until `predicate` returns falsey. The predicate is invoked with
+     * three arguments: (value, index, array).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Array
+     * @param {Array} array The array to query.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the slice of `array`.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'active': false },
+     *   { 'user': 'fred',    'active': false },
+     *   { 'user': 'pebbles', 'active': true }
+     * ];
+     *
+     * _.takeWhile(users, function(o) { return !o.active; });
+     * // => objects for ['barney', 'fred']
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.takeWhile(users, { 'user': 'barney', 'active': false });
+     * // => objects for ['barney']
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.takeWhile(users, ['active', false]);
+     * // => objects for ['barney', 'fred']
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.takeWhile(users, 'active');
+     * // => []
+     */
+    function takeWhile(array, predicate) {
+      return (array && array.length)
+        ? baseWhile(array, getIteratee(predicate, 3))
+        : [];
+    }
+
+    /**
+     * Creates an array of unique values, in order, from all given arrays using
+     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @returns {Array} Returns the new array of combined values.
+     * @example
+     *
+     * _.union([2], [1, 2]);
+     * // => [2, 1]
+     */
+    var union = baseRest(function(arrays) {
+      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+    });
+
+    /**
+     * This method is like `_.union` except that it accepts `iteratee` which is
+     * invoked for each element of each `arrays` to generate the criterion by
+     * which uniqueness is computed. Result values are chosen from the first
+     * array in which the value occurs. The iteratee is invoked with one argument:
+     * (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {Array} Returns the new array of combined values.
+     * @example
+     *
+     * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+     * // => [2.1, 1.2]
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+     * // => [{ 'x': 1 }, { 'x': 2 }]
+     */
+    var unionBy = baseRest(function(arrays) {
+      var iteratee = last(arrays);
+      if (isArrayLikeObject(iteratee)) {
+        iteratee = undefined;
+      }
+      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
+    });
+
+    /**
+     * This method is like `_.union` except that it accepts `comparator` which
+     * is invoked to compare elements of `arrays`. Result values are chosen from
+     * the first array in which the value occurs. The comparator is invoked
+     * with two arguments: (arrVal, othVal).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new array of combined values.
+     * @example
+     *
+     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+     *
+     * _.unionWith(objects, others, _.isEqual);
+     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+     */
+    var unionWith = baseRest(function(arrays) {
+      var comparator = last(arrays);
+      comparator = typeof comparator == 'function' ? comparator : undefined;
+      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+    });
+
+    /**
+     * Creates a duplicate-free version of an array, using
+     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons, in which only the first occurrence of each element
+     * is kept. The order of result values is determined by the order they occur
+     * in the array.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @returns {Array} Returns the new duplicate free array.
+     * @example
+     *
+     * _.uniq([2, 1, 2]);
+     * // => [2, 1]
+     */
+    function uniq(array) {
+      return (array && array.length) ? baseUniq(array) : [];
+    }
+
+    /**
+     * This method is like `_.uniq` except that it accepts `iteratee` which is
+     * invoked for each element in `array` to generate the criterion by which
+     * uniqueness is computed. The order of result values is determined by the
+     * order they occur in the array. The iteratee is invoked with one argument:
+     * (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {Array} Returns the new duplicate free array.
+     * @example
+     *
+     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+     * // => [2.1, 1.2]
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+     * // => [{ 'x': 1 }, { 'x': 2 }]
+     */
+    function uniqBy(array, iteratee) {
+      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
+    }
+
+    /**
+     * This method is like `_.uniq` except that it accepts `comparator` which
+     * is invoked to compare elements of `array`. The order of result values is
+     * determined by the order they occur in the array.The comparator is invoked
+     * with two arguments: (arrVal, othVal).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new duplicate free array.
+     * @example
+     *
+     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+     *
+     * _.uniqWith(objects, _.isEqual);
+     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+     */
+    function uniqWith(array, comparator) {
+      comparator = typeof comparator == 'function' ? comparator : undefined;
+      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+    }
+
+    /**
+     * This method is like `_.zip` except that it accepts an array of grouped
+     * elements and creates an array regrouping the elements to their pre-zip
+     * configuration.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.2.0
+     * @category Array
+     * @param {Array} array The array of grouped elements to process.
+     * @returns {Array} Returns the new array of regrouped elements.
+     * @example
+     *
+     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+     * // => [['a', 1, true], ['b', 2, false]]
+     *
+     * _.unzip(zipped);
+     * // => [['a', 'b'], [1, 2], [true, false]]
+     */
+    function unzip(array) {
+      if (!(array && array.length)) {
+        return [];
+      }
+      var length = 0;
+      array = arrayFilter(array, function(group) {
+        if (isArrayLikeObject(group)) {
+          length = nativeMax(group.length, length);
+          return true;
+        }
+      });
+      return baseTimes(length, function(index) {
+        return arrayMap(array, baseProperty(index));
+      });
+    }
+
+    /**
+     * This method is like `_.unzip` except that it accepts `iteratee` to specify
+     * how regrouped values should be combined. The iteratee is invoked with the
+     * elements of each group: (...group).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.8.0
+     * @category Array
+     * @param {Array} array The array of grouped elements to process.
+     * @param {Function} [iteratee=_.identity] The function to combine
+     *  regrouped values.
+     * @returns {Array} Returns the new array of regrouped elements.
+     * @example
+     *
+     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+     * // => [[1, 10, 100], [2, 20, 200]]
+     *
+     * _.unzipWith(zipped, _.add);
+     * // => [3, 30, 300]
+     */
+    function unzipWith(array, iteratee) {
+      if (!(array && array.length)) {
+        return [];
+      }
+      var result = unzip(array);
+      if (iteratee == null) {
+        return result;
+      }
+      return arrayMap(result, function(group) {
+        return apply(iteratee, undefined, group);
+      });
+    }
+
+    /**
+     * Creates an array excluding all given values using
+     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * for equality comparisons.
+     *
+     * **Note:** Unlike `_.pull`, this method returns a new array.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {Array} array The array to inspect.
+     * @param {...*} [values] The values to exclude.
+     * @returns {Array} Returns the new array of filtered values.
+     * @see _.difference, _.xor
+     * @example
+     *
+     * _.without([2, 1, 2, 3], 1, 2);
+     * // => [3]
+     */
+    var without = baseRest(function(array, values) {
+      return isArrayLikeObject(array)
+        ? baseDifference(array, values)
+        : [];
+    });
+
+    /**
+     * Creates an array of unique values that is the
+     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+     * of the given arrays. The order of result values is determined by the order
+     * they occur in the arrays.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.4.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @returns {Array} Returns the new array of filtered values.
+     * @see _.difference, _.without
+     * @example
+     *
+     * _.xor([2, 1], [2, 3]);
+     * // => [1, 3]
+     */
+    var xor = baseRest(function(arrays) {
+      return baseXor(arrayFilter(arrays, isArrayLikeObject));
+    });
+
+    /**
+     * This method is like `_.xor` except that it accepts `iteratee` which is
+     * invoked for each element of each `arrays` to generate the criterion by
+     * which by which they're compared. The order of result values is determined
+     * by the order they occur in the arrays. The iteratee is invoked with one
+     * argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {Array} Returns the new array of filtered values.
+     * @example
+     *
+     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+     * // => [1.2, 3.4]
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+     * // => [{ 'x': 2 }]
+     */
+    var xorBy = baseRest(function(arrays) {
+      var iteratee = last(arrays);
+      if (isArrayLikeObject(iteratee)) {
+        iteratee = undefined;
+      }
+      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
+    });
+
+    /**
+     * This method is like `_.xor` except that it accepts `comparator` which is
+     * invoked to compare elements of `arrays`. The order of result values is
+     * determined by the order they occur in the arrays. The comparator is invoked
+     * with two arguments: (arrVal, othVal).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to inspect.
+     * @param {Function} [comparator] The comparator invoked per element.
+     * @returns {Array} Returns the new array of filtered values.
+     * @example
+     *
+     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+     *
+     * _.xorWith(objects, others, _.isEqual);
+     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+     */
+    var xorWith = baseRest(function(arrays) {
+      var comparator = last(arrays);
+      comparator = typeof comparator == 'function' ? comparator : undefined;
+      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+    });
+
+    /**
+     * Creates an array of grouped elements, the first of which contains the
+     * first elements of the given arrays, the second of which contains the
+     * second elements of the given arrays, and so on.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to process.
+     * @returns {Array} Returns the new array of grouped elements.
+     * @example
+     *
+     * _.zip(['a', 'b'], [1, 2], [true, false]);
+     * // => [['a', 1, true], ['b', 2, false]]
+     */
+    var zip = baseRest(unzip);
+
+    /**
+     * This method is like `_.fromPairs` except that it accepts two arrays,
+     * one of property identifiers and one of corresponding values.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.4.0
+     * @category Array
+     * @param {Array} [props=[]] The property identifiers.
+     * @param {Array} [values=[]] The property values.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * _.zipObject(['a', 'b'], [1, 2]);
+     * // => { 'a': 1, 'b': 2 }
+     */
+    function zipObject(props, values) {
+      return baseZipObject(props || [], values || [], assignValue);
+    }
+
+    /**
+     * This method is like `_.zipObject` except that it supports property paths.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.1.0
+     * @category Array
+     * @param {Array} [props=[]] The property identifiers.
+     * @param {Array} [values=[]] The property values.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+     */
+    function zipObjectDeep(props, values) {
+      return baseZipObject(props || [], values || [], baseSet);
+    }
+
+    /**
+     * This method is like `_.zip` except that it accepts `iteratee` to specify
+     * how grouped values should be combined. The iteratee is invoked with the
+     * elements of each group: (...group).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.8.0
+     * @category Array
+     * @param {...Array} [arrays] The arrays to process.
+     * @param {Function} [iteratee=_.identity] The function to combine
+     *  grouped values.
+     * @returns {Array} Returns the new array of grouped elements.
+     * @example
+     *
+     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+     *   return a + b + c;
+     * });
+     * // => [111, 222]
+     */
+    var zipWith = baseRest(function(arrays) {
+      var length = arrays.length,
+          iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+      return unzipWith(arrays, iteratee);
+    });
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+     * chain sequences enabled. The result of such sequences must be unwrapped
+     * with `_#value`.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.3.0
+     * @category Seq
+     * @param {*} value The value to wrap.
+     * @returns {Object} Returns the new `lodash` wrapper instance.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'age': 36 },
+     *   { 'user': 'fred',    'age': 40 },
+     *   { 'user': 'pebbles', 'age': 1 }
+     * ];
+     *
+     * var youngest = _
+     *   .chain(users)
+     *   .sortBy('age')
+     *   .map(function(o) {
+     *     return o.user + ' is ' + o.age;
+     *   })
+     *   .head()
+     *   .value();
+     * // => 'pebbles is 1'
+     */
+    function chain(value) {
+      var result = lodash(value);
+      result.__chain__ = true;
+      return result;
+    }
+
+    /**
+     * This method invokes `interceptor` and returns `value`. The interceptor
+     * is invoked with one argument; (value). The purpose of this method is to
+     * "tap into" a method chain sequence in order to modify intermediate results.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Seq
+     * @param {*} value The value to provide to `interceptor`.
+     * @param {Function} interceptor The function to invoke.
+     * @returns {*} Returns `value`.
+     * @example
+     *
+     * _([1, 2, 3])
+     *  .tap(function(array) {
+     *    // Mutate input array.
+     *    array.pop();
+     *  })
+     *  .reverse()
+     *  .value();
+     * // => [2, 1]
+     */
+    function tap(value, interceptor) {
+      interceptor(value);
+      return value;
+    }
+
+    /**
+     * This method is like `_.tap` except that it returns the result of `interceptor`.
+     * The purpose of this method is to "pass thru" values replacing intermediate
+     * results in a method chain sequence.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Seq
+     * @param {*} value The value to provide to `interceptor`.
+     * @param {Function} interceptor The function to invoke.
+     * @returns {*} Returns the result of `interceptor`.
+     * @example
+     *
+     * _('  abc  ')
+     *  .chain()
+     *  .trim()
+     *  .thru(function(value) {
+     *    return [value];
+     *  })
+     *  .value();
+     * // => ['abc']
+     */
+    function thru(value, interceptor) {
+      return interceptor(value);
+    }
+
+    /**
+     * This method is the wrapper version of `_.at`.
+     *
+     * @name at
+     * @memberOf _
+     * @since 1.0.0
+     * @category Seq
+     * @param {...(string|string[])} [paths] The property paths to pick.
+     * @returns {Object} Returns the new `lodash` wrapper instance.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+     *
+     * _(object).at(['a[0].b.c', 'a[1]']).value();
+     * // => [3, 4]
+     */
+    var wrapperAt = flatRest(function(paths) {
+      var length = paths.length,
+          start = length ? paths[0] : 0,
+          value = this.__wrapped__,
+          interceptor = function(object) { return baseAt(object, paths); };
+
+      if (length > 1 || this.__actions__.length ||
+          !(value instanceof LazyWrapper) || !isIndex(start)) {
+        return this.thru(interceptor);
+      }
+      value = value.slice(start, +start + (length ? 1 : 0));
+      value.__actions__.push({
+        'func': thru,
+        'args': [interceptor],
+        'thisArg': undefined
+      });
+      return new LodashWrapper(value, this.__chain__).thru(function(array) {
+        if (length && !array.length) {
+          array.push(undefined);
+        }
+        return array;
+      });
+    });
+
+    /**
+     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+     *
+     * @name chain
+     * @memberOf _
+     * @since 0.1.0
+     * @category Seq
+     * @returns {Object} Returns the new `lodash` wrapper instance.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney', 'age': 36 },
+     *   { 'user': 'fred',   'age': 40 }
+     * ];
+     *
+     * // A sequence without explicit chaining.
+     * _(users).head();
+     * // => { 'user': 'barney', 'age': 36 }
+     *
+     * // A sequence with explicit chaining.
+     * _(users)
+     *   .chain()
+     *   .head()
+     *   .pick('user')
+     *   .value();
+     * // => { 'user': 'barney' }
+     */
+    function wrapperChain() {
+      return chain(this);
+    }
+
+    /**
+     * Executes the chain sequence and returns the wrapped result.
+     *
+     * @name commit
+     * @memberOf _
+     * @since 3.2.0
+     * @category Seq
+     * @returns {Object} Returns the new `lodash` wrapper instance.
+     * @example
+     *
+     * var array = [1, 2];
+     * var wrapped = _(array).push(3);
+     *
+     * console.log(array);
+     * // => [1, 2]
+     *
+     * wrapped = wrapped.commit();
+     * console.log(array);
+     * // => [1, 2, 3]
+     *
+     * wrapped.last();
+     * // => 3
+     *
+     * console.log(array);
+     * // => [1, 2, 3]
+     */
+    function wrapperCommit() {
+      return new LodashWrapper(this.value(), this.__chain__);
+    }
+
+    /**
+     * Gets the next value on a wrapped object following the
+     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+     *
+     * @name next
+     * @memberOf _
+     * @since 4.0.0
+     * @category Seq
+     * @returns {Object} Returns the next iterator value.
+     * @example
+     *
+     * var wrapped = _([1, 2]);
+     *
+     * wrapped.next();
+     * // => { 'done': false, 'value': 1 }
+     *
+     * wrapped.next();
+     * // => { 'done': false, 'value': 2 }
+     *
+     * wrapped.next();
+     * // => { 'done': true, 'value': undefined }
+     */
+    function wrapperNext() {
+      if (this.__values__ === undefined) {
+        this.__values__ = toArray(this.value());
+      }
+      var done = this.__index__ >= this.__values__.length,
+          value = done ? undefined : this.__values__[this.__index__++];
+
+      return { 'done': done, 'value': value };
+    }
+
+    /**
+     * Enables the wrapper to be iterable.
+     *
+     * @name Symbol.iterator
+     * @memberOf _
+     * @since 4.0.0
+     * @category Seq
+     * @returns {Object} Returns the wrapper object.
+     * @example
+     *
+     * var wrapped = _([1, 2]);
+     *
+     * wrapped[Symbol.iterator]() === wrapped;
+     * // => true
+     *
+     * Array.from(wrapped);
+     * // => [1, 2]
+     */
+    function wrapperToIterator() {
+      return this;
+    }
+
+    /**
+     * Creates a clone of the chain sequence planting `value` as the wrapped value.
+     *
+     * @name plant
+     * @memberOf _
+     * @since 3.2.0
+     * @category Seq
+     * @param {*} value The value to plant.
+     * @returns {Object} Returns the new `lodash` wrapper instance.
+     * @example
+     *
+     * function square(n) {
+     *   return n * n;
+     * }
+     *
+     * var wrapped = _([1, 2]).map(square);
+     * var other = wrapped.plant([3, 4]);
+     *
+     * other.value();
+     * // => [9, 16]
+     *
+     * wrapped.value();
+     * // => [1, 4]
+     */
+    function wrapperPlant(value) {
+      var result,
+          parent = this;
+
+      while (parent instanceof baseLodash) {
+        var clone = wrapperClone(parent);
+        clone.__index__ = 0;
+        clone.__values__ = undefined;
+        if (result) {
+          previous.__wrapped__ = clone;
+        } else {
+          result = clone;
+        }
+        var previous = clone;
+        parent = parent.__wrapped__;
+      }
+      previous.__wrapped__ = value;
+      return result;
+    }
+
+    /**
+     * This method is the wrapper version of `_.reverse`.
+     *
+     * **Note:** This method mutates the wrapped array.
+     *
+     * @name reverse
+     * @memberOf _
+     * @since 0.1.0
+     * @category Seq
+     * @returns {Object} Returns the new `lodash` wrapper instance.
+     * @example
+     *
+     * var array = [1, 2, 3];
+     *
+     * _(array).reverse().value()
+     * // => [3, 2, 1]
+     *
+     * console.log(array);
+     * // => [3, 2, 1]
+     */
+    function wrapperReverse() {
+      var value = this.__wrapped__;
+      if (value instanceof LazyWrapper) {
+        var wrapped = value;
+        if (this.__actions__.length) {
+          wrapped = new LazyWrapper(this);
+        }
+        wrapped = wrapped.reverse();
+        wrapped.__actions__.push({
+          'func': thru,
+          'args': [reverse],
+          'thisArg': undefined
+        });
+        return new LodashWrapper(wrapped, this.__chain__);
+      }
+      return this.thru(reverse);
+    }
+
+    /**
+     * Executes the chain sequence to resolve the unwrapped value.
+     *
+     * @name value
+     * @memberOf _
+     * @since 0.1.0
+     * @alias toJSON, valueOf
+     * @category Seq
+     * @returns {*} Returns the resolved unwrapped value.
+     * @example
+     *
+     * _([1, 2, 3]).value();
+     * // => [1, 2, 3]
+     */
+    function wrapperValue() {
+      return baseWrapperValue(this.__wrapped__, this.__actions__);
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Creates an object composed of keys generated from the results of running
+     * each element of `collection` thru `iteratee`. The corresponding value of
+     * each key is the number of times the key was returned by `iteratee`. The
+     * iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.5.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+     * @returns {Object} Returns the composed aggregate object.
+     * @example
+     *
+     * _.countBy([6.1, 4.2, 6.3], Math.floor);
+     * // => { '4': 1, '6': 2 }
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.countBy(['one', 'two', 'three'], 'length');
+     * // => { '3': 2, '5': 1 }
+     */
+    var countBy = createAggregator(function(result, value, key) {
+      if (hasOwnProperty.call(result, key)) {
+        ++result[key];
+      } else {
+        baseAssignValue(result, key, 1);
+      }
+    });
+
+    /**
+     * Checks if `predicate` returns truthy for **all** elements of `collection`.
+     * Iteration is stopped once `predicate` returns falsey. The predicate is
+     * invoked with three arguments: (value, index|key, collection).
+     *
+     * **Note:** This method returns `true` for
+     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+     * elements of empty collections.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {boolean} Returns `true` if all elements pass the predicate check,
+     *  else `false`.
+     * @example
+     *
+     * _.every([true, 1, null, 'yes'], Boolean);
+     * // => false
+     *
+     * var users = [
+     *   { 'user': 'barney', 'age': 36, 'active': false },
+     *   { 'user': 'fred',   'age': 40, 'active': false }
+     * ];
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.every(users, { 'user': 'barney', 'active': false });
+     * // => false
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.every(users, ['active', false]);
+     * // => true
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.every(users, 'active');
+     * // => false
+     */
+    function every(collection, predicate, guard) {
+      var func = isArray(collection) ? arrayEvery : baseEvery;
+      if (guard && isIterateeCall(collection, predicate, guard)) {
+        predicate = undefined;
+      }
+      return func(collection, getIteratee(predicate, 3));
+    }
+
+    /**
+     * Iterates over elements of `collection`, returning an array of all elements
+     * `predicate` returns truthy for. The predicate is invoked with three
+     * arguments: (value, index|key, collection).
+     *
+     * **Note:** Unlike `_.remove`, this method returns a new array.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the new filtered array.
+     * @see _.reject
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney', 'age': 36, 'active': true },
+     *   { 'user': 'fred',   'age': 40, 'active': false }
+     * ];
+     *
+     * _.filter(users, function(o) { return !o.active; });
+     * // => objects for ['fred']
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.filter(users, { 'age': 36, 'active': true });
+     * // => objects for ['barney']
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.filter(users, ['active', false]);
+     * // => objects for ['fred']
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.filter(users, 'active');
+     * // => objects for ['barney']
+     */
+    function filter(collection, predicate) {
+      var func = isArray(collection) ? arrayFilter : baseFilter;
+      return func(collection, getIteratee(predicate, 3));
+    }
+
+    /**
+     * Iterates over elements of `collection`, returning the first element
+     * `predicate` returns truthy for. The predicate is invoked with three
+     * arguments: (value, index|key, collection).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to inspect.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @param {number} [fromIndex=0] The index to search from.
+     * @returns {*} Returns the matched element, else `undefined`.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'age': 36, 'active': true },
+     *   { 'user': 'fred',    'age': 40, 'active': false },
+     *   { 'user': 'pebbles', 'age': 1,  'active': true }
+     * ];
+     *
+     * _.find(users, function(o) { return o.age < 40; });
+     * // => object for 'barney'
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.find(users, { 'age': 1, 'active': true });
+     * // => object for 'pebbles'
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.find(users, ['active', false]);
+     * // => object for 'fred'
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.find(users, 'active');
+     * // => object for 'barney'
+     */
+    var find = createFind(findIndex);
+
+    /**
+     * This method is like `_.find` except that it iterates over elements of
+     * `collection` from right to left.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to inspect.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @param {number} [fromIndex=collection.length-1] The index to search from.
+     * @returns {*} Returns the matched element, else `undefined`.
+     * @example
+     *
+     * _.findLast([1, 2, 3, 4], function(n) {
+     *   return n % 2 == 1;
+     * });
+     * // => 3
+     */
+    var findLast = createFind(findLastIndex);
+
+    /**
+     * Creates a flattened array of values by running each element in `collection`
+     * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+     * with three arguments: (value, index|key, collection).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the new flattened array.
+     * @example
+     *
+     * function duplicate(n) {
+     *   return [n, n];
+     * }
+     *
+     * _.flatMap([1, 2], duplicate);
+     * // => [1, 1, 2, 2]
+     */
+    function flatMap(collection, iteratee) {
+      return baseFlatten(map(collection, iteratee), 1);
+    }
+
+    /**
+     * This method is like `_.flatMap` except that it recursively flattens the
+     * mapped results.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.7.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the new flattened array.
+     * @example
+     *
+     * function duplicate(n) {
+     *   return [[[n, n]]];
+     * }
+     *
+     * _.flatMapDeep([1, 2], duplicate);
+     * // => [1, 1, 2, 2]
+     */
+    function flatMapDeep(collection, iteratee) {
+      return baseFlatten(map(collection, iteratee), INFINITY);
+    }
+
+    /**
+     * This method is like `_.flatMap` except that it recursively flattens the
+     * mapped results up to `depth` times.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.7.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @param {number} [depth=1] The maximum recursion depth.
+     * @returns {Array} Returns the new flattened array.
+     * @example
+     *
+     * function duplicate(n) {
+     *   return [[[n, n]]];
+     * }
+     *
+     * _.flatMapDepth([1, 2], duplicate, 2);
+     * // => [[1, 1], [2, 2]]
+     */
+    function flatMapDepth(collection, iteratee, depth) {
+      depth = depth === undefined ? 1 : toInteger(depth);
+      return baseFlatten(map(collection, iteratee), depth);
+    }
+
+    /**
+     * Iterates over elements of `collection` and invokes `iteratee` for each element.
+     * The iteratee is invoked with three arguments: (value, index|key, collection).
+     * Iteratee functions may exit iteration early by explicitly returning `false`.
+     *
+     * **Note:** As with other "Collections" methods, objects with a "length"
+     * property are iterated like arrays. To avoid this behavior use `_.forIn`
+     * or `_.forOwn` for object iteration.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @alias each
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Array|Object} Returns `collection`.
+     * @see _.forEachRight
+     * @example
+     *
+     * _.forEach([1, 2], function(value) {
+     *   console.log(value);
+     * });
+     * // => Logs `1` then `2`.
+     *
+     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+     *   console.log(key);
+     * });
+     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+     */
+    function forEach(collection, iteratee) {
+      var func = isArray(collection) ? arrayEach : baseEach;
+      return func(collection, getIteratee(iteratee, 3));
+    }
+
+    /**
+     * This method is like `_.forEach` except that it iterates over elements of
+     * `collection` from right to left.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @alias eachRight
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Array|Object} Returns `collection`.
+     * @see _.forEach
+     * @example
+     *
+     * _.forEachRight([1, 2], function(value) {
+     *   console.log(value);
+     * });
+     * // => Logs `2` then `1`.
+     */
+    function forEachRight(collection, iteratee) {
+      var func = isArray(collection) ? arrayEachRight : baseEachRight;
+      return func(collection, getIteratee(iteratee, 3));
+    }
+
+    /**
+     * Creates an object composed of keys generated from the results of running
+     * each element of `collection` thru `iteratee`. The order of grouped values
+     * is determined by the order they occur in `collection`. The corresponding
+     * value of each key is an array of elements responsible for generating the
+     * key. The iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+     * @returns {Object} Returns the composed aggregate object.
+     * @example
+     *
+     * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+     * // => { '4': [4.2], '6': [6.1, 6.3] }
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.groupBy(['one', 'two', 'three'], 'length');
+     * // => { '3': ['one', 'two'], '5': ['three'] }
+     */
+    var groupBy = createAggregator(function(result, value, key) {
+      if (hasOwnProperty.call(result, key)) {
+        result[key].push(value);
+      } else {
+        baseAssignValue(result, key, [value]);
+      }
+    });
+
+    /**
+     * Checks if `value` is in `collection`. If `collection` is a string, it's
+     * checked for a substring of `value`, otherwise
+     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * is used for equality comparisons. If `fromIndex` is negative, it's used as
+     * the offset from the end of `collection`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object|string} collection The collection to inspect.
+     * @param {*} value The value to search for.
+     * @param {number} [fromIndex=0] The index to search from.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+     * @returns {boolean} Returns `true` if `value` is found, else `false`.
+     * @example
+     *
+     * _.includes([1, 2, 3], 1);
+     * // => true
+     *
+     * _.includes([1, 2, 3], 1, 2);
+     * // => false
+     *
+     * _.includes({ 'a': 1, 'b': 2 }, 1);
+     * // => true
+     *
+     * _.includes('abcd', 'bc');
+     * // => true
+     */
+    function includes(collection, value, fromIndex, guard) {
+      collection = isArrayLike(collection) ? collection : values(collection);
+      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+      var length = collection.length;
+      if (fromIndex < 0) {
+        fromIndex = nativeMax(length + fromIndex, 0);
+      }
+      return isString(collection)
+        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+    }
+
+    /**
+     * Invokes the method at `path` of each element in `collection`, returning
+     * an array of the results of each invoked method. Any additional arguments
+     * are provided to each invoked method. If `path` is a function, it's invoked
+     * for, and `this` bound to, each element in `collection`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Array|Function|string} path The path of the method to invoke or
+     *  the function invoked per iteration.
+     * @param {...*} [args] The arguments to invoke each method with.
+     * @returns {Array} Returns the array of results.
+     * @example
+     *
+     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+     * // => [[1, 5, 7], [1, 2, 3]]
+     *
+     * _.invokeMap([123, 456], String.prototype.split, '');
+     * // => [['1', '2', '3'], ['4', '5', '6']]
+     */
+    var invokeMap = baseRest(function(collection, path, args) {
+      var index = -1,
+          isFunc = typeof path == 'function',
+          result = isArrayLike(collection) ? Array(collection.length) : [];
+
+      baseEach(collection, function(value) {
+        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+      });
+      return result;
+    });
+
+    /**
+     * Creates an object composed of keys generated from the results of running
+     * each element of `collection` thru `iteratee`. The corresponding value of
+     * each key is the last element responsible for generating the key. The
+     * iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+     * @returns {Object} Returns the composed aggregate object.
+     * @example
+     *
+     * var array = [
+     *   { 'dir': 'left', 'code': 97 },
+     *   { 'dir': 'right', 'code': 100 }
+     * ];
+     *
+     * _.keyBy(array, function(o) {
+     *   return String.fromCharCode(o.code);
+     * });
+     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+     *
+     * _.keyBy(array, 'dir');
+     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+     */
+    var keyBy = createAggregator(function(result, value, key) {
+      baseAssignValue(result, key, value);
+    });
+
+    /**
+     * Creates an array of values by running each element in `collection` thru
+     * `iteratee`. The iteratee is invoked with three arguments:
+     * (value, index|key, collection).
+     *
+     * Many lodash methods are guarded to work as iteratees for methods like
+     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+     *
+     * The guarded methods are:
+     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the new mapped array.
+     * @example
+     *
+     * function square(n) {
+     *   return n * n;
+     * }
+     *
+     * _.map([4, 8], square);
+     * // => [16, 64]
+     *
+     * _.map({ 'a': 4, 'b': 8 }, square);
+     * // => [16, 64] (iteration order is not guaranteed)
+     *
+     * var users = [
+     *   { 'user': 'barney' },
+     *   { 'user': 'fred' }
+     * ];
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.map(users, 'user');
+     * // => ['barney', 'fred']
+     */
+    function map(collection, iteratee) {
+      var func = isArray(collection) ? arrayMap : baseMap;
+      return func(collection, getIteratee(iteratee, 3));
+    }
+
+    /**
+     * This method is like `_.sortBy` except that it allows specifying the sort
+     * orders of the iteratees to sort by. If `orders` is unspecified, all values
+     * are sorted in ascending order. Otherwise, specify an order of "desc" for
+     * descending or "asc" for ascending sort order of corresponding values.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+     *  The iteratees to sort by.
+     * @param {string[]} [orders] The sort orders of `iteratees`.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+     * @returns {Array} Returns the new sorted array.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'fred',   'age': 48 },
+     *   { 'user': 'barney', 'age': 34 },
+     *   { 'user': 'fred',   'age': 40 },
+     *   { 'user': 'barney', 'age': 36 }
+     * ];
+     *
+     * // Sort by `user` in ascending order and by `age` in descending order.
+     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+     */
+    function orderBy(collection, iteratees, orders, guard) {
+      if (collection == null) {
+        return [];
+      }
+      if (!isArray(iteratees)) {
+        iteratees = iteratees == null ? [] : [iteratees];
+      }
+      orders = guard ? undefined : orders;
+      if (!isArray(orders)) {
+        orders = orders == null ? [] : [orders];
+      }
+      return baseOrderBy(collection, iteratees, orders);
+    }
+
+    /**
+     * Creates an array of elements split into two groups, the first of which
+     * contains elements `predicate` returns truthy for, the second of which
+     * contains elements `predicate` returns falsey for. The predicate is
+     * invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the array of grouped elements.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney',  'age': 36, 'active': false },
+     *   { 'user': 'fred',    'age': 40, 'active': true },
+     *   { 'user': 'pebbles', 'age': 1,  'active': false }
+     * ];
+     *
+     * _.partition(users, function(o) { return o.active; });
+     * // => objects for [['fred'], ['barney', 'pebbles']]
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.partition(users, { 'age': 1, 'active': false });
+     * // => objects for [['pebbles'], ['barney', 'fred']]
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.partition(users, ['active', false]);
+     * // => objects for [['barney', 'pebbles'], ['fred']]
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.partition(users, 'active');
+     * // => objects for [['fred'], ['barney', 'pebbles']]
+     */
+    var partition = createAggregator(function(result, value, key) {
+      result[key ? 0 : 1].push(value);
+    }, function() { return [[], []]; });
+
+    /**
+     * Reduces `collection` to a value which is the accumulated result of running
+     * each element in `collection` thru `iteratee`, where each successive
+     * invocation is supplied the return value of the previous. If `accumulator`
+     * is not given, the first element of `collection` is used as the initial
+     * value. The iteratee is invoked with four arguments:
+     * (accumulator, value, index|key, collection).
+     *
+     * Many lodash methods are guarded to work as iteratees for methods like
+     * `_.reduce`, `_.reduceRight`, and `_.transform`.
+     *
+     * The guarded methods are:
+     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+     * and `sortBy`
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @param {*} [accumulator] The initial value.
+     * @returns {*} Returns the accumulated value.
+     * @see _.reduceRight
+     * @example
+     *
+     * _.reduce([1, 2], function(sum, n) {
+     *   return sum + n;
+     * }, 0);
+     * // => 3
+     *
+     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+     *   (result[value] || (result[value] = [])).push(key);
+     *   return result;
+     * }, {});
+     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+     */
+    function reduce(collection, iteratee, accumulator) {
+      var func = isArray(collection) ? arrayReduce : baseReduce,
+          initAccum = arguments.length < 3;
+
+      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+    }
+
+    /**
+     * This method is like `_.reduce` except that it iterates over elements of
+     * `collection` from right to left.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @param {*} [accumulator] The initial value.
+     * @returns {*} Returns the accumulated value.
+     * @see _.reduce
+     * @example
+     *
+     * var array = [[0, 1], [2, 3], [4, 5]];
+     *
+     * _.reduceRight(array, function(flattened, other) {
+     *   return flattened.concat(other);
+     * }, []);
+     * // => [4, 5, 2, 3, 0, 1]
+     */
+    function reduceRight(collection, iteratee, accumulator) {
+      var func = isArray(collection) ? arrayReduceRight : baseReduce,
+          initAccum = arguments.length < 3;
+
+      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+    }
+
+    /**
+     * The opposite of `_.filter`; this method returns the elements of `collection`
+     * that `predicate` does **not** return truthy for.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the new filtered array.
+     * @see _.filter
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney', 'age': 36, 'active': false },
+     *   { 'user': 'fred',   'age': 40, 'active': true }
+     * ];
+     *
+     * _.reject(users, function(o) { return !o.active; });
+     * // => objects for ['fred']
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.reject(users, { 'age': 40, 'active': true });
+     * // => objects for ['barney']
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.reject(users, ['active', false]);
+     * // => objects for ['fred']
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.reject(users, 'active');
+     * // => objects for ['barney']
+     */
+    function reject(collection, predicate) {
+      var func = isArray(collection) ? arrayFilter : baseFilter;
+      return func(collection, negate(getIteratee(predicate, 3)));
+    }
+
+    /**
+     * Gets a random element from `collection`.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to sample.
+     * @returns {*} Returns the random element.
+     * @example
+     *
+     * _.sample([1, 2, 3, 4]);
+     * // => 2
+     */
+    function sample(collection) {
+      var func = isArray(collection) ? arraySample : baseSample;
+      return func(collection);
+    }
+
+    /**
+     * Gets `n` random elements at unique keys from `collection` up to the
+     * size of `collection`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to sample.
+     * @param {number} [n=1] The number of elements to sample.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Array} Returns the random elements.
+     * @example
+     *
+     * _.sampleSize([1, 2, 3], 2);
+     * // => [3, 1]
+     *
+     * _.sampleSize([1, 2, 3], 4);
+     * // => [2, 3, 1]
+     */
+    function sampleSize(collection, n, guard) {
+      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+        n = 1;
+      } else {
+        n = toInteger(n);
+      }
+      var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+      return func(collection, n);
+    }
+
+    /**
+     * Creates an array of shuffled values, using a version of the
+     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to shuffle.
+     * @returns {Array} Returns the new shuffled array.
+     * @example
+     *
+     * _.shuffle([1, 2, 3, 4]);
+     * // => [4, 1, 3, 2]
+     */
+    function shuffle(collection) {
+      var func = isArray(collection) ? arrayShuffle : baseShuffle;
+      return func(collection);
+    }
+
+    /**
+     * Gets the size of `collection` by returning its length for array-like
+     * values or the number of own enumerable string keyed properties for objects.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object|string} collection The collection to inspect.
+     * @returns {number} Returns the collection size.
+     * @example
+     *
+     * _.size([1, 2, 3]);
+     * // => 3
+     *
+     * _.size({ 'a': 1, 'b': 2 });
+     * // => 2
+     *
+     * _.size('pebbles');
+     * // => 7
+     */
+    function size(collection) {
+      if (collection == null) {
+        return 0;
+      }
+      if (isArrayLike(collection)) {
+        return isString(collection) ? stringSize(collection) : collection.length;
+      }
+      var tag = getTag(collection);
+      if (tag == mapTag || tag == setTag) {
+        return collection.size;
+      }
+      return baseKeys(collection).length;
+    }
+
+    /**
+     * Checks if `predicate` returns truthy for **any** element of `collection`.
+     * Iteration is stopped once `predicate` returns truthy. The predicate is
+     * invoked with three arguments: (value, index|key, collection).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {boolean} Returns `true` if any element passes the predicate check,
+     *  else `false`.
+     * @example
+     *
+     * _.some([null, 0, 'yes', false], Boolean);
+     * // => true
+     *
+     * var users = [
+     *   { 'user': 'barney', 'active': true },
+     *   { 'user': 'fred',   'active': false }
+     * ];
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.some(users, { 'user': 'barney', 'active': false });
+     * // => false
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.some(users, ['active', false]);
+     * // => true
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.some(users, 'active');
+     * // => true
+     */
+    function some(collection, predicate, guard) {
+      var func = isArray(collection) ? arraySome : baseSome;
+      if (guard && isIterateeCall(collection, predicate, guard)) {
+        predicate = undefined;
+      }
+      return func(collection, getIteratee(predicate, 3));
+    }
+
+    /**
+     * Creates an array of elements, sorted in ascending order by the results of
+     * running each element in a collection thru each iteratee. This method
+     * performs a stable sort, that is, it preserves the original sort order of
+     * equal elements. The iteratees are invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Collection
+     * @param {Array|Object} collection The collection to iterate over.
+     * @param {...(Function|Function[])} [iteratees=[_.identity]]
+     *  The iteratees to sort by.
+     * @returns {Array} Returns the new sorted array.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'fred',   'age': 48 },
+     *   { 'user': 'barney', 'age': 36 },
+     *   { 'user': 'fred',   'age': 40 },
+     *   { 'user': 'barney', 'age': 34 }
+     * ];
+     *
+     * _.sortBy(users, [function(o) { return o.user; }]);
+     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+     *
+     * _.sortBy(users, ['user', 'age']);
+     * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+     */
+    var sortBy = baseRest(function(collection, iteratees) {
+      if (collection == null) {
+        return [];
+      }
+      var length = iteratees.length;
+      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+        iteratees = [];
+      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+        iteratees = [iteratees[0]];
+      }
+      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+    });
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Gets the timestamp of the number of milliseconds that have elapsed since
+     * the Unix epoch (1 January 1970 00:00:00 UTC).
+     *
+     * @static
+     * @memberOf _
+     * @since 2.4.0
+     * @category Date
+     * @returns {number} Returns the timestamp.
+     * @example
+     *
+     * _.defer(function(stamp) {
+     *   console.log(_.now() - stamp);
+     * }, _.now());
+     * // => Logs the number of milliseconds it took for the deferred invocation.
+     */
+    var now = ctxNow || function() {
+      return root.Date.now();
+    };
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * The opposite of `_.before`; this method creates a function that invokes
+     * `func` once it's called `n` or more times.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {number} n The number of calls before `func` is invoked.
+     * @param {Function} func The function to restrict.
+     * @returns {Function} Returns the new restricted function.
+     * @example
+     *
+     * var saves = ['profile', 'settings'];
+     *
+     * var done = _.after(saves.length, function() {
+     *   console.log('done saving!');
+     * });
+     *
+     * _.forEach(saves, function(type) {
+     *   asyncSave({ 'type': type, 'complete': done });
+     * });
+     * // => Logs 'done saving!' after the two async saves have completed.
+     */
+    function after(n, func) {
+      if (typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      n = toInteger(n);
+      return function() {
+        if (--n < 1) {
+          return func.apply(this, arguments);
+        }
+      };
+    }
+
+    /**
+     * Creates a function that invokes `func`, with up to `n` arguments,
+     * ignoring any additional arguments.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Function
+     * @param {Function} func The function to cap arguments for.
+     * @param {number} [n=func.length] The arity cap.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Function} Returns the new capped function.
+     * @example
+     *
+     * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+     * // => [6, 8, 10]
+     */
+    function ary(func, n, guard) {
+      n = guard ? undefined : n;
+      n = (func && n == null) ? func.length : n;
+      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+    }
+
+    /**
+     * Creates a function that invokes `func`, with the `this` binding and arguments
+     * of the created function, while it's called less than `n` times. Subsequent
+     * calls to the created function return the result of the last `func` invocation.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Function
+     * @param {number} n The number of calls at which `func` is no longer invoked.
+     * @param {Function} func The function to restrict.
+     * @returns {Function} Returns the new restricted function.
+     * @example
+     *
+     * jQuery(element).on('click', _.before(5, addContactToList));
+     * // => Allows adding up to 4 contacts to the list.
+     */
+    function before(n, func) {
+      var result;
+      if (typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      n = toInteger(n);
+      return function() {
+        if (--n > 0) {
+          result = func.apply(this, arguments);
+        }
+        if (n <= 1) {
+          func = undefined;
+        }
+        return result;
+      };
+    }
+
+    /**
+     * Creates a function that invokes `func` with the `this` binding of `thisArg`
+     * and `partials` prepended to the arguments it receives.
+     *
+     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+     * may be used as a placeholder for partially applied arguments.
+     *
+     * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+     * property of bound functions.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {Function} func The function to bind.
+     * @param {*} thisArg The `this` binding of `func`.
+     * @param {...*} [partials] The arguments to be partially applied.
+     * @returns {Function} Returns the new bound function.
+     * @example
+     *
+     * function greet(greeting, punctuation) {
+     *   return greeting + ' ' + this.user + punctuation;
+     * }
+     *
+     * var object = { 'user': 'fred' };
+     *
+     * var bound = _.bind(greet, object, 'hi');
+     * bound('!');
+     * // => 'hi fred!'
+     *
+     * // Bound with placeholders.
+     * var bound = _.bind(greet, object, _, '!');
+     * bound('hi');
+     * // => 'hi fred!'
+     */
+    var bind = baseRest(function(func, thisArg, partials) {
+      var bitmask = WRAP_BIND_FLAG;
+      if (partials.length) {
+        var holders = replaceHolders(partials, getHolder(bind));
+        bitmask |= WRAP_PARTIAL_FLAG;
+      }
+      return createWrap(func, bitmask, thisArg, partials, holders);
+    });
+
+    /**
+     * Creates a function that invokes the method at `object[key]` with `partials`
+     * prepended to the arguments it receives.
+     *
+     * This method differs from `_.bind` by allowing bound functions to reference
+     * methods that may be redefined or don't yet exist. See
+     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+     * for more details.
+     *
+     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+     * builds, may be used as a placeholder for partially applied arguments.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.10.0
+     * @category Function
+     * @param {Object} object The object to invoke the method on.
+     * @param {string} key The key of the method.
+     * @param {...*} [partials] The arguments to be partially applied.
+     * @returns {Function} Returns the new bound function.
+     * @example
+     *
+     * var object = {
+     *   'user': 'fred',
+     *   'greet': function(greeting, punctuation) {
+     *     return greeting + ' ' + this.user + punctuation;
+     *   }
+     * };
+     *
+     * var bound = _.bindKey(object, 'greet', 'hi');
+     * bound('!');
+     * // => 'hi fred!'
+     *
+     * object.greet = function(greeting, punctuation) {
+     *   return greeting + 'ya ' + this.user + punctuation;
+     * };
+     *
+     * bound('!');
+     * // => 'hiya fred!'
+     *
+     * // Bound with placeholders.
+     * var bound = _.bindKey(object, 'greet', _, '!');
+     * bound('hi');
+     * // => 'hiya fred!'
+     */
+    var bindKey = baseRest(function(object, key, partials) {
+      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+      if (partials.length) {
+        var holders = replaceHolders(partials, getHolder(bindKey));
+        bitmask |= WRAP_PARTIAL_FLAG;
+      }
+      return createWrap(key, bitmask, object, partials, holders);
+    });
+
+    /**
+     * Creates a function that accepts arguments of `func` and either invokes
+     * `func` returning its result, if at least `arity` number of arguments have
+     * been provided, or returns a function that accepts the remaining `func`
+     * arguments, and so on. The arity of `func` may be specified if `func.length`
+     * is not sufficient.
+     *
+     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+     * may be used as a placeholder for provided arguments.
+     *
+     * **Note:** This method doesn't set the "length" property of curried functions.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Function
+     * @param {Function} func The function to curry.
+     * @param {number} [arity=func.length] The arity of `func`.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Function} Returns the new curried function.
+     * @example
+     *
+     * var abc = function(a, b, c) {
+     *   return [a, b, c];
+     * };
+     *
+     * var curried = _.curry(abc);
+     *
+     * curried(1)(2)(3);
+     * // => [1, 2, 3]
+     *
+     * curried(1, 2)(3);
+     * // => [1, 2, 3]
+     *
+     * curried(1, 2, 3);
+     * // => [1, 2, 3]
+     *
+     * // Curried with placeholders.
+     * curried(1)(_, 3)(2);
+     * // => [1, 2, 3]
+     */
+    function curry(func, arity, guard) {
+      arity = guard ? undefined : arity;
+      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+      result.placeholder = curry.placeholder;
+      return result;
+    }
+
+    /**
+     * This method is like `_.curry` except that arguments are applied to `func`
+     * in the manner of `_.partialRight` instead of `_.partial`.
+     *
+     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+     * builds, may be used as a placeholder for provided arguments.
+     *
+     * **Note:** This method doesn't set the "length" property of curried functions.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Function
+     * @param {Function} func The function to curry.
+     * @param {number} [arity=func.length] The arity of `func`.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Function} Returns the new curried function.
+     * @example
+     *
+     * var abc = function(a, b, c) {
+     *   return [a, b, c];
+     * };
+     *
+     * var curried = _.curryRight(abc);
+     *
+     * curried(3)(2)(1);
+     * // => [1, 2, 3]
+     *
+     * curried(2, 3)(1);
+     * // => [1, 2, 3]
+     *
+     * curried(1, 2, 3);
+     * // => [1, 2, 3]
+     *
+     * // Curried with placeholders.
+     * curried(3)(1, _)(2);
+     * // => [1, 2, 3]
+     */
+    function curryRight(func, arity, guard) {
+      arity = guard ? undefined : arity;
+      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+      result.placeholder = curryRight.placeholder;
+      return result;
+    }
+
+    /**
+     * Creates a debounced function that delays invoking `func` until after `wait`
+     * milliseconds have elapsed since the last time the debounced function was
+     * invoked. The debounced function comes with a `cancel` method to cancel
+     * delayed `func` invocations and a `flush` method to immediately invoke them.
+     * Provide `options` to indicate whether `func` should be invoked on the
+     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+     * with the last arguments provided to the debounced function. Subsequent
+     * calls to the debounced function return the result of the last `func`
+     * invocation.
+     *
+     * **Note:** If `leading` and `trailing` options are `true`, `func` is
+     * invoked on the trailing edge of the timeout only if the debounced function
+     * is invoked more than once during the `wait` timeout.
+     *
+     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+     *
+     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+     * for details over the differences between `_.debounce` and `_.throttle`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {Function} func The function to debounce.
+     * @param {number} [wait=0] The number of milliseconds to delay.
+     * @param {Object} [options={}] The options object.
+     * @param {boolean} [options.leading=false]
+     *  Specify invoking on the leading edge of the timeout.
+     * @param {number} [options.maxWait]
+     *  The maximum time `func` is allowed to be delayed before it's invoked.
+     * @param {boolean} [options.trailing=true]
+     *  Specify invoking on the trailing edge of the timeout.
+     * @returns {Function} Returns the new debounced function.
+     * @example
+     *
+     * // Avoid costly calculations while the window size is in flux.
+     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+     *
+     * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+     * jQuery(element).on('click', _.debounce(sendMail, 300, {
+     *   'leading': true,
+     *   'trailing': false
+     * }));
+     *
+     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+     * var source = new EventSource('/stream');
+     * jQuery(source).on('message', debounced);
+     *
+     * // Cancel the trailing debounced invocation.
+     * jQuery(window).on('popstate', debounced.cancel);
+     */
+    function debounce(func, wait, options) {
+      var lastArgs,
+          lastThis,
+          maxWait,
+          result,
+          timerId,
+          lastCallTime,
+          lastInvokeTime = 0,
+          leading = false,
+          maxing = false,
+          trailing = true;
+
+      if (typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      wait = toNumber(wait) || 0;
+      if (isObject(options)) {
+        leading = !!options.leading;
+        maxing = 'maxWait' in options;
+        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+        trailing = 'trailing' in options ? !!options.trailing : trailing;
+      }
+
+      function invokeFunc(time) {
+        var args = lastArgs,
+            thisArg = lastThis;
+
+        lastArgs = lastThis = undefined;
+        lastInvokeTime = time;
+        result = func.apply(thisArg, args);
+        return result;
+      }
+
+      function leadingEdge(time) {
+        // Reset any `maxWait` timer.
+        lastInvokeTime = time;
+        // Start the timer for the trailing edge.
+        timerId = setTimeout(timerExpired, wait);
+        // Invoke the leading edge.
+        return leading ? invokeFunc(time) : result;
+      }
+
+      function remainingWait(time) {
+        var timeSinceLastCall = time - lastCallTime,
+            timeSinceLastInvoke = time - lastInvokeTime,
+            timeWaiting = wait - timeSinceLastCall;
+
+        return maxing
+          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+          : timeWaiting;
+      }
+
+      function shouldInvoke(time) {
+        var timeSinceLastCall = time - lastCallTime,
+            timeSinceLastInvoke = time - lastInvokeTime;
+
+        // Either this is the first call, activity has stopped and we're at the
+        // trailing edge, the system time has gone backwards and we're treating
+        // it as the trailing edge, or we've hit the `maxWait` limit.
+        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+      }
+
+      function timerExpired() {
+        var time = now();
+        if (shouldInvoke(time)) {
+          return trailingEdge(time);
+        }
+        // Restart the timer.
+        timerId = setTimeout(timerExpired, remainingWait(time));
+      }
+
+      function trailingEdge(time) {
+        timerId = undefined;
+
+        // Only invoke if we have `lastArgs` which means `func` has been
+        // debounced at least once.
+        if (trailing && lastArgs) {
+          return invokeFunc(time);
+        }
+        lastArgs = lastThis = undefined;
+        return result;
+      }
+
+      function cancel() {
+        if (timerId !== undefined) {
+          clearTimeout(timerId);
+        }
+        lastInvokeTime = 0;
+        lastArgs = lastCallTime = lastThis = timerId = undefined;
+      }
+
+      function flush() {
+        return timerId === undefined ? result : trailingEdge(now());
+      }
+
+      function debounced() {
+        var time = now(),
+            isInvoking = shouldInvoke(time);
+
+        lastArgs = arguments;
+        lastThis = this;
+        lastCallTime = time;
+
+        if (isInvoking) {
+          if (timerId === undefined) {
+            return leadingEdge(lastCallTime);
+          }
+          if (maxing) {
+            // Handle invocations in a tight loop.
+            clearTimeout(timerId);
+            timerId = setTimeout(timerExpired, wait);
+            return invokeFunc(lastCallTime);
+          }
+        }
+        if (timerId === undefined) {
+          timerId = setTimeout(timerExpired, wait);
+        }
+        return result;
+      }
+      debounced.cancel = cancel;
+      debounced.flush = flush;
+      return debounced;
+    }
+
+    /**
+     * Defers invoking the `func` until the current call stack has cleared. Any
+     * additional arguments are provided to `func` when it's invoked.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {Function} func The function to defer.
+     * @param {...*} [args] The arguments to invoke `func` with.
+     * @returns {number} Returns the timer id.
+     * @example
+     *
+     * _.defer(function(text) {
+     *   console.log(text);
+     * }, 'deferred');
+     * // => Logs 'deferred' after one millisecond.
+     */
+    var defer = baseRest(function(func, args) {
+      return baseDelay(func, 1, args);
+    });
+
+    /**
+     * Invokes `func` after `wait` milliseconds. Any additional arguments are
+     * provided to `func` when it's invoked.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {Function} func The function to delay.
+     * @param {number} wait The number of milliseconds to delay invocation.
+     * @param {...*} [args] The arguments to invoke `func` with.
+     * @returns {number} Returns the timer id.
+     * @example
+     *
+     * _.delay(function(text) {
+     *   console.log(text);
+     * }, 1000, 'later');
+     * // => Logs 'later' after one second.
+     */
+    var delay = baseRest(function(func, wait, args) {
+      return baseDelay(func, toNumber(wait) || 0, args);
+    });
+
+    /**
+     * Creates a function that invokes `func` with arguments reversed.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Function
+     * @param {Function} func The function to flip arguments for.
+     * @returns {Function} Returns the new flipped function.
+     * @example
+     *
+     * var flipped = _.flip(function() {
+     *   return _.toArray(arguments);
+     * });
+     *
+     * flipped('a', 'b', 'c', 'd');
+     * // => ['d', 'c', 'b', 'a']
+     */
+    function flip(func) {
+      return createWrap(func, WRAP_FLIP_FLAG);
+    }
+
+    /**
+     * Creates a function that memoizes the result of `func`. If `resolver` is
+     * provided, it determines the cache key for storing the result based on the
+     * arguments provided to the memoized function. By default, the first argument
+     * provided to the memoized function is used as the map cache key. The `func`
+     * is invoked with the `this` binding of the memoized function.
+     *
+     * **Note:** The cache is exposed as the `cache` property on the memoized
+     * function. Its creation may be customized by replacing the `_.memoize.Cache`
+     * constructor with one whose instances implement the
+     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+     * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {Function} func The function to have its output memoized.
+     * @param {Function} [resolver] The function to resolve the cache key.
+     * @returns {Function} Returns the new memoized function.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': 2 };
+     * var other = { 'c': 3, 'd': 4 };
+     *
+     * var values = _.memoize(_.values);
+     * values(object);
+     * // => [1, 2]
+     *
+     * values(other);
+     * // => [3, 4]
+     *
+     * object.a = 2;
+     * values(object);
+     * // => [1, 2]
+     *
+     * // Modify the result cache.
+     * values.cache.set(object, ['a', 'b']);
+     * values(object);
+     * // => ['a', 'b']
+     *
+     * // Replace `_.memoize.Cache`.
+     * _.memoize.Cache = WeakMap;
+     */
+    function memoize(func, resolver) {
+      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      var memoized = function() {
+        var args = arguments,
+            key = resolver ? resolver.apply(this, args) : args[0],
+            cache = memoized.cache;
+
+        if (cache.has(key)) {
+          return cache.get(key);
+        }
+        var result = func.apply(this, args);
+        memoized.cache = cache.set(key, result) || cache;
+        return result;
+      };
+      memoized.cache = new (memoize.Cache || MapCache);
+      return memoized;
+    }
+
+    // Expose `MapCache`.
+    memoize.Cache = MapCache;
+
+    /**
+     * Creates a function that negates the result of the predicate `func`. The
+     * `func` predicate is invoked with the `this` binding and arguments of the
+     * created function.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Function
+     * @param {Function} predicate The predicate to negate.
+     * @returns {Function} Returns the new negated function.
+     * @example
+     *
+     * function isEven(n) {
+     *   return n % 2 == 0;
+     * }
+     *
+     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+     * // => [1, 3, 5]
+     */
+    function negate(predicate) {
+      if (typeof predicate != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      return function() {
+        var args = arguments;
+        switch (args.length) {
+          case 0: return !predicate.call(this);
+          case 1: return !predicate.call(this, args[0]);
+          case 2: return !predicate.call(this, args[0], args[1]);
+          case 3: return !predicate.call(this, args[0], args[1], args[2]);
+        }
+        return !predicate.apply(this, args);
+      };
+    }
+
+    /**
+     * Creates a function that is restricted to invoking `func` once. Repeat calls
+     * to the function return the value of the first invocation. The `func` is
+     * invoked with the `this` binding and arguments of the created function.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {Function} func The function to restrict.
+     * @returns {Function} Returns the new restricted function.
+     * @example
+     *
+     * var initialize = _.once(createApplication);
+     * initialize();
+     * initialize();
+     * // => `createApplication` is invoked once
+     */
+    function once(func) {
+      return before(2, func);
+    }
+
+    /**
+     * Creates a function that invokes `func` with its arguments transformed.
+     *
+     * @static
+     * @since 4.0.0
+     * @memberOf _
+     * @category Function
+     * @param {Function} func The function to wrap.
+     * @param {...(Function|Function[])} [transforms=[_.identity]]
+     *  The argument transforms.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * function doubled(n) {
+     *   return n * 2;
+     * }
+     *
+     * function square(n) {
+     *   return n * n;
+     * }
+     *
+     * var func = _.overArgs(function(x, y) {
+     *   return [x, y];
+     * }, [square, doubled]);
+     *
+     * func(9, 3);
+     * // => [81, 6]
+     *
+     * func(10, 5);
+     * // => [100, 10]
+     */
+    var overArgs = castRest(function(func, transforms) {
+      transforms = (transforms.length == 1 && isArray(transforms[0]))
+        ? arrayMap(transforms[0], baseUnary(getIteratee()))
+        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
+
+      var funcsLength = transforms.length;
+      return baseRest(function(args) {
+        var index = -1,
+            length = nativeMin(args.length, funcsLength);
+
+        while (++index < length) {
+          args[index] = transforms[index].call(this, args[index]);
+        }
+        return apply(func, this, args);
+      });
+    });
+
+    /**
+     * Creates a function that invokes `func` with `partials` prepended to the
+     * arguments it receives. This method is like `_.bind` except it does **not**
+     * alter the `this` binding.
+     *
+     * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+     * builds, may be used as a placeholder for partially applied arguments.
+     *
+     * **Note:** This method doesn't set the "length" property of partially
+     * applied functions.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.2.0
+     * @category Function
+     * @param {Function} func The function to partially apply arguments to.
+     * @param {...*} [partials] The arguments to be partially applied.
+     * @returns {Function} Returns the new partially applied function.
+     * @example
+     *
+     * function greet(greeting, name) {
+     *   return greeting + ' ' + name;
+     * }
+     *
+     * var sayHelloTo = _.partial(greet, 'hello');
+     * sayHelloTo('fred');
+     * // => 'hello fred'
+     *
+     * // Partially applied with placeholders.
+     * var greetFred = _.partial(greet, _, 'fred');
+     * greetFred('hi');
+     * // => 'hi fred'
+     */
+    var partial = baseRest(function(func, partials) {
+      var holders = replaceHolders(partials, getHolder(partial));
+      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+    });
+
+    /**
+     * This method is like `_.partial` except that partially applied arguments
+     * are appended to the arguments it receives.
+     *
+     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+     * builds, may be used as a placeholder for partially applied arguments.
+     *
+     * **Note:** This method doesn't set the "length" property of partially
+     * applied functions.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.0.0
+     * @category Function
+     * @param {Function} func The function to partially apply arguments to.
+     * @param {...*} [partials] The arguments to be partially applied.
+     * @returns {Function} Returns the new partially applied function.
+     * @example
+     *
+     * function greet(greeting, name) {
+     *   return greeting + ' ' + name;
+     * }
+     *
+     * var greetFred = _.partialRight(greet, 'fred');
+     * greetFred('hi');
+     * // => 'hi fred'
+     *
+     * // Partially applied with placeholders.
+     * var sayHelloTo = _.partialRight(greet, 'hello', _);
+     * sayHelloTo('fred');
+     * // => 'hello fred'
+     */
+    var partialRight = baseRest(function(func, partials) {
+      var holders = replaceHolders(partials, getHolder(partialRight));
+      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+    });
+
+    /**
+     * Creates a function that invokes `func` with arguments arranged according
+     * to the specified `indexes` where the argument value at the first index is
+     * provided as the first argument, the argument value at the second index is
+     * provided as the second argument, and so on.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Function
+     * @param {Function} func The function to rearrange arguments for.
+     * @param {...(number|number[])} indexes The arranged argument indexes.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * var rearged = _.rearg(function(a, b, c) {
+     *   return [a, b, c];
+     * }, [2, 0, 1]);
+     *
+     * rearged('b', 'c', 'a')
+     * // => ['a', 'b', 'c']
+     */
+    var rearg = flatRest(function(func, indexes) {
+      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+    });
+
+    /**
+     * Creates a function that invokes `func` with the `this` binding of the
+     * created function and arguments from `start` and beyond provided as
+     * an array.
+     *
+     * **Note:** This method is based on the
+     * [rest parameter](https://mdn.io/rest_parameters).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Function
+     * @param {Function} func The function to apply a rest parameter to.
+     * @param {number} [start=func.length-1] The start position of the rest parameter.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * var say = _.rest(function(what, names) {
+     *   return what + ' ' + _.initial(names).join(', ') +
+     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+     * });
+     *
+     * say('hello', 'fred', 'barney', 'pebbles');
+     * // => 'hello fred, barney, & pebbles'
+     */
+    function rest(func, start) {
+      if (typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      start = start === undefined ? start : toInteger(start);
+      return baseRest(func, start);
+    }
+
+    /**
+     * Creates a function that invokes `func` with the `this` binding of the
+     * create function and an array of arguments much like
+     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+     *
+     * **Note:** This method is based on the
+     * [spread operator](https://mdn.io/spread_operator).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.2.0
+     * @category Function
+     * @param {Function} func The function to spread arguments over.
+     * @param {number} [start=0] The start position of the spread.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * var say = _.spread(function(who, what) {
+     *   return who + ' says ' + what;
+     * });
+     *
+     * say(['fred', 'hello']);
+     * // => 'fred says hello'
+     *
+     * var numbers = Promise.all([
+     *   Promise.resolve(40),
+     *   Promise.resolve(36)
+     * ]);
+     *
+     * numbers.then(_.spread(function(x, y) {
+     *   return x + y;
+     * }));
+     * // => a Promise of 76
+     */
+    function spread(func, start) {
+      if (typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      start = start == null ? 0 : nativeMax(toInteger(start), 0);
+      return baseRest(function(args) {
+        var array = args[start],
+            otherArgs = castSlice(args, 0, start);
+
+        if (array) {
+          arrayPush(otherArgs, array);
+        }
+        return apply(func, this, otherArgs);
+      });
+    }
+
+    /**
+     * Creates a throttled function that only invokes `func` at most once per
+     * every `wait` milliseconds. The throttled function comes with a `cancel`
+     * method to cancel delayed `func` invocations and a `flush` method to
+     * immediately invoke them. Provide `options` to indicate whether `func`
+     * should be invoked on the leading and/or trailing edge of the `wait`
+     * timeout. The `func` is invoked with the last arguments provided to the
+     * throttled function. Subsequent calls to the throttled function return the
+     * result of the last `func` invocation.
+     *
+     * **Note:** If `leading` and `trailing` options are `true`, `func` is
+     * invoked on the trailing edge of the timeout only if the throttled function
+     * is invoked more than once during the `wait` timeout.
+     *
+     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+     *
+     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+     * for details over the differences between `_.throttle` and `_.debounce`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {Function} func The function to throttle.
+     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+     * @param {Object} [options={}] The options object.
+     * @param {boolean} [options.leading=true]
+     *  Specify invoking on the leading edge of the timeout.
+     * @param {boolean} [options.trailing=true]
+     *  Specify invoking on the trailing edge of the timeout.
+     * @returns {Function} Returns the new throttled function.
+     * @example
+     *
+     * // Avoid excessively updating the position while scrolling.
+     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+     *
+     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+     * jQuery(element).on('click', throttled);
+     *
+     * // Cancel the trailing throttled invocation.
+     * jQuery(window).on('popstate', throttled.cancel);
+     */
+    function throttle(func, wait, options) {
+      var leading = true,
+          trailing = true;
+
+      if (typeof func != 'function') {
+        throw new TypeError(FUNC_ERROR_TEXT);
+      }
+      if (isObject(options)) {
+        leading = 'leading' in options ? !!options.leading : leading;
+        trailing = 'trailing' in options ? !!options.trailing : trailing;
+      }
+      return debounce(func, wait, {
+        'leading': leading,
+        'maxWait': wait,
+        'trailing': trailing
+      });
+    }
+
+    /**
+     * Creates a function that accepts up to one argument, ignoring any
+     * additional arguments.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Function
+     * @param {Function} func The function to cap arguments for.
+     * @returns {Function} Returns the new capped function.
+     * @example
+     *
+     * _.map(['6', '8', '10'], _.unary(parseInt));
+     * // => [6, 8, 10]
+     */
+    function unary(func) {
+      return ary(func, 1);
+    }
+
+    /**
+     * Creates a function that provides `value` to `wrapper` as its first
+     * argument. Any additional arguments provided to the function are appended
+     * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+     * binding of the created function.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Function
+     * @param {*} value The value to wrap.
+     * @param {Function} [wrapper=identity] The wrapper function.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * var p = _.wrap(_.escape, function(func, text) {
+     *   return '<p>' + func(text) + '</p>';
+     * });
+     *
+     * p('fred, barney, & pebbles');
+     * // => '<p>fred, barney, &amp; pebbles</p>'
+     */
+    function wrap(value, wrapper) {
+      return partial(castFunction(wrapper), value);
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Casts `value` as an array if it's not one.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.4.0
+     * @category Lang
+     * @param {*} value The value to inspect.
+     * @returns {Array} Returns the cast array.
+     * @example
+     *
+     * _.castArray(1);
+     * // => [1]
+     *
+     * _.castArray({ 'a': 1 });
+     * // => [{ 'a': 1 }]
+     *
+     * _.castArray('abc');
+     * // => ['abc']
+     *
+     * _.castArray(null);
+     * // => [null]
+     *
+     * _.castArray(undefined);
+     * // => [undefined]
+     *
+     * _.castArray();
+     * // => []
+     *
+     * var array = [1, 2, 3];
+     * console.log(_.castArray(array) === array);
+     * // => true
+     */
+    function castArray() {
+      if (!arguments.length) {
+        return [];
+      }
+      var value = arguments[0];
+      return isArray(value) ? value : [value];
+    }
+
+    /**
+     * Creates a shallow clone of `value`.
+     *
+     * **Note:** This method is loosely based on the
+     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+     * and supports cloning arrays, array buffers, booleans, date objects, maps,
+     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+     * arrays. The own enumerable properties of `arguments` objects are cloned
+     * as plain objects. An empty object is returned for uncloneable values such
+     * as error objects, functions, DOM nodes, and WeakMaps.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to clone.
+     * @returns {*} Returns the cloned value.
+     * @see _.cloneDeep
+     * @example
+     *
+     * var objects = [{ 'a': 1 }, { 'b': 2 }];
+     *
+     * var shallow = _.clone(objects);
+     * console.log(shallow[0] === objects[0]);
+     * // => true
+     */
+    function clone(value) {
+      return baseClone(value, CLONE_SYMBOLS_FLAG);
+    }
+
+    /**
+     * This method is like `_.clone` except that it accepts `customizer` which
+     * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+     * cloning is handled by the method instead. The `customizer` is invoked with
+     * up to four arguments; (value [, index|key, object, stack]).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to clone.
+     * @param {Function} [customizer] The function to customize cloning.
+     * @returns {*} Returns the cloned value.
+     * @see _.cloneDeepWith
+     * @example
+     *
+     * function customizer(value) {
+     *   if (_.isElement(value)) {
+     *     return value.cloneNode(false);
+     *   }
+     * }
+     *
+     * var el = _.cloneWith(document.body, customizer);
+     *
+     * console.log(el === document.body);
+     * // => false
+     * console.log(el.nodeName);
+     * // => 'BODY'
+     * console.log(el.childNodes.length);
+     * // => 0
+     */
+    function cloneWith(value, customizer) {
+      customizer = typeof customizer == 'function' ? customizer : undefined;
+      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+    }
+
+    /**
+     * This method is like `_.clone` except that it recursively clones `value`.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.0.0
+     * @category Lang
+     * @param {*} value The value to recursively clone.
+     * @returns {*} Returns the deep cloned value.
+     * @see _.clone
+     * @example
+     *
+     * var objects = [{ 'a': 1 }, { 'b': 2 }];
+     *
+     * var deep = _.cloneDeep(objects);
+     * console.log(deep[0] === objects[0]);
+     * // => false
+     */
+    function cloneDeep(value) {
+      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+    }
+
+    /**
+     * This method is like `_.cloneWith` except that it recursively clones `value`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to recursively clone.
+     * @param {Function} [customizer] The function to customize cloning.
+     * @returns {*} Returns the deep cloned value.
+     * @see _.cloneWith
+     * @example
+     *
+     * function customizer(value) {
+     *   if (_.isElement(value)) {
+     *     return value.cloneNode(true);
+     *   }
+     * }
+     *
+     * var el = _.cloneDeepWith(document.body, customizer);
+     *
+     * console.log(el === document.body);
+     * // => false
+     * console.log(el.nodeName);
+     * // => 'BODY'
+     * console.log(el.childNodes.length);
+     * // => 20
+     */
+    function cloneDeepWith(value, customizer) {
+      customizer = typeof customizer == 'function' ? customizer : undefined;
+      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+    }
+
+    /**
+     * Checks if `object` conforms to `source` by invoking the predicate
+     * properties of `source` with the corresponding property values of `object`.
+     *
+     * **Note:** This method is equivalent to `_.conforms` when `source` is
+     * partially applied.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.14.0
+     * @category Lang
+     * @param {Object} object The object to inspect.
+     * @param {Object} source The object of property predicates to conform to.
+     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': 2 };
+     *
+     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+     * // => true
+     *
+     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+     * // => false
+     */
+    function conformsTo(object, source) {
+      return source == null || baseConformsTo(object, source, keys(source));
+    }
+
+    /**
+     * Performs a
+     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+     * comparison between two values to determine if they are equivalent.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+     * @example
+     *
+     * var object = { 'a': 1 };
+     * var other = { 'a': 1 };
+     *
+     * _.eq(object, object);
+     * // => true
+     *
+     * _.eq(object, other);
+     * // => false
+     *
+     * _.eq('a', 'a');
+     * // => true
+     *
+     * _.eq('a', Object('a'));
+     * // => false
+     *
+     * _.eq(NaN, NaN);
+     * // => true
+     */
+    function eq(value, other) {
+      return value === other || (value !== value && other !== other);
+    }
+
+    /**
+     * Checks if `value` is greater than `other`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.9.0
+     * @category Lang
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if `value` is greater than `other`,
+     *  else `false`.
+     * @see _.lt
+     * @example
+     *
+     * _.gt(3, 1);
+     * // => true
+     *
+     * _.gt(3, 3);
+     * // => false
+     *
+     * _.gt(1, 3);
+     * // => false
+     */
+    var gt = createRelationalOperation(baseGt);
+
+    /**
+     * Checks if `value` is greater than or equal to `other`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.9.0
+     * @category Lang
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if `value` is greater than or equal to
+     *  `other`, else `false`.
+     * @see _.lte
+     * @example
+     *
+     * _.gte(3, 1);
+     * // => true
+     *
+     * _.gte(3, 3);
+     * // => true
+     *
+     * _.gte(1, 3);
+     * // => false
+     */
+    var gte = createRelationalOperation(function(value, other) {
+      return value >= other;
+    });
+
+    /**
+     * Checks if `value` is likely an `arguments` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+     *  else `false`.
+     * @example
+     *
+     * _.isArguments(function() { return arguments; }());
+     * // => true
+     *
+     * _.isArguments([1, 2, 3]);
+     * // => false
+     */
+    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+        !propertyIsEnumerable.call(value, 'callee');
+    };
+
+    /**
+     * Checks if `value` is classified as an `Array` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+     * @example
+     *
+     * _.isArray([1, 2, 3]);
+     * // => true
+     *
+     * _.isArray(document.body.children);
+     * // => false
+     *
+     * _.isArray('abc');
+     * // => false
+     *
+     * _.isArray(_.noop);
+     * // => false
+     */
+    var isArray = Array.isArray;
+
+    /**
+     * Checks if `value` is classified as an `ArrayBuffer` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.3.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+     * @example
+     *
+     * _.isArrayBuffer(new ArrayBuffer(2));
+     * // => true
+     *
+     * _.isArrayBuffer(new Array(2));
+     * // => false
+     */
+    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+    /**
+     * Checks if `value` is array-like. A value is considered array-like if it's
+     * not a function and has a `value.length` that's an integer greater than or
+     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+     * @example
+     *
+     * _.isArrayLike([1, 2, 3]);
+     * // => true
+     *
+     * _.isArrayLike(document.body.children);
+     * // => true
+     *
+     * _.isArrayLike('abc');
+     * // => true
+     *
+     * _.isArrayLike(_.noop);
+     * // => false
+     */
+    function isArrayLike(value) {
+      return value != null && isLength(value.length) && !isFunction(value);
+    }
+
+    /**
+     * This method is like `_.isArrayLike` except that it also checks if `value`
+     * is an object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an array-like object,
+     *  else `false`.
+     * @example
+     *
+     * _.isArrayLikeObject([1, 2, 3]);
+     * // => true
+     *
+     * _.isArrayLikeObject(document.body.children);
+     * // => true
+     *
+     * _.isArrayLikeObject('abc');
+     * // => false
+     *
+     * _.isArrayLikeObject(_.noop);
+     * // => false
+     */
+    function isArrayLikeObject(value) {
+      return isObjectLike(value) && isArrayLike(value);
+    }
+
+    /**
+     * Checks if `value` is classified as a boolean primitive or object.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+     * @example
+     *
+     * _.isBoolean(false);
+     * // => true
+     *
+     * _.isBoolean(null);
+     * // => false
+     */
+    function isBoolean(value) {
+      return value === true || value === false ||
+        (isObjectLike(value) && baseGetTag(value) == boolTag);
+    }
+
+    /**
+     * Checks if `value` is a buffer.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.3.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+     * @example
+     *
+     * _.isBuffer(new Buffer(2));
+     * // => true
+     *
+     * _.isBuffer(new Uint8Array(2));
+     * // => false
+     */
+    var isBuffer = nativeIsBuffer || stubFalse;
+
+    /**
+     * Checks if `value` is classified as a `Date` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+     * @example
+     *
+     * _.isDate(new Date);
+     * // => true
+     *
+     * _.isDate('Mon April 23 2012');
+     * // => false
+     */
+    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+    /**
+     * Checks if `value` is likely a DOM element.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+     * @example
+     *
+     * _.isElement(document.body);
+     * // => true
+     *
+     * _.isElement('<body>');
+     * // => false
+     */
+    function isElement(value) {
+      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+    }
+
+    /**
+     * Checks if `value` is an empty object, collection, map, or set.
+     *
+     * Objects are considered empty if they have no own enumerable string keyed
+     * properties.
+     *
+     * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+     * jQuery-like collections are considered empty if they have a `length` of `0`.
+     * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+     * @example
+     *
+     * _.isEmpty(null);
+     * // => true
+     *
+     * _.isEmpty(true);
+     * // => true
+     *
+     * _.isEmpty(1);
+     * // => true
+     *
+     * _.isEmpty([1, 2, 3]);
+     * // => false
+     *
+     * _.isEmpty({ 'a': 1 });
+     * // => false
+     */
+    function isEmpty(value) {
+      if (value == null) {
+        return true;
+      }
+      if (isArrayLike(value) &&
+          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+            isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+        return !value.length;
+      }
+      var tag = getTag(value);
+      if (tag == mapTag || tag == setTag) {
+        return !value.size;
+      }
+      if (isPrototype(value)) {
+        return !baseKeys(value).length;
+      }
+      for (var key in value) {
+        if (hasOwnProperty.call(value, key)) {
+          return false;
+        }
+      }
+      return true;
+    }
+
+    /**
+     * Performs a deep comparison between two values to determine if they are
+     * equivalent.
+     *
+     * **Note:** This method supports comparing arrays, array buffers, booleans,
+     * date objects, error objects, maps, numbers, `Object` objects, regexes,
+     * sets, strings, symbols, and typed arrays. `Object` objects are compared
+     * by their own, not inherited, enumerable properties. Functions and DOM
+     * nodes are compared by strict equality, i.e. `===`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+     * @example
+     *
+     * var object = { 'a': 1 };
+     * var other = { 'a': 1 };
+     *
+     * _.isEqual(object, other);
+     * // => true
+     *
+     * object === other;
+     * // => false
+     */
+    function isEqual(value, other) {
+      return baseIsEqual(value, other);
+    }
+
+    /**
+     * This method is like `_.isEqual` except that it accepts `customizer` which
+     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+     * are handled by the method instead. The `customizer` is invoked with up to
+     * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @param {Function} [customizer] The function to customize comparisons.
+     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+     * @example
+     *
+     * function isGreeting(value) {
+     *   return /^h(?:i|ello)$/.test(value);
+     * }
+     *
+     * function customizer(objValue, othValue) {
+     *   if (isGreeting(objValue) && isGreeting(othValue)) {
+     *     return true;
+     *   }
+     * }
+     *
+     * var array = ['hello', 'goodbye'];
+     * var other = ['hi', 'goodbye'];
+     *
+     * _.isEqualWith(array, other, customizer);
+     * // => true
+     */
+    function isEqualWith(value, other, customizer) {
+      customizer = typeof customizer == 'function' ? customizer : undefined;
+      var result = customizer ? customizer(value, other) : undefined;
+      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+    }
+
+    /**
+     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+     * `SyntaxError`, `TypeError`, or `URIError` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+     * @example
+     *
+     * _.isError(new Error);
+     * // => true
+     *
+     * _.isError(Error);
+     * // => false
+     */
+    function isError(value) {
+      if (!isObjectLike(value)) {
+        return false;
+      }
+      var tag = baseGetTag(value);
+      return tag == errorTag || tag == domExcTag ||
+        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+    }
+
+    /**
+     * Checks if `value` is a finite primitive number.
+     *
+     * **Note:** This method is based on
+     * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+     * @example
+     *
+     * _.isFinite(3);
+     * // => true
+     *
+     * _.isFinite(Number.MIN_VALUE);
+     * // => true
+     *
+     * _.isFinite(Infinity);
+     * // => false
+     *
+     * _.isFinite('3');
+     * // => false
+     */
+    function isFinite(value) {
+      return typeof value == 'number' && nativeIsFinite(value);
+    }
+
+    /**
+     * Checks if `value` is classified as a `Function` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+     * @example
+     *
+     * _.isFunction(_);
+     * // => true
+     *
+     * _.isFunction(/abc/);
+     * // => false
+     */
+    function isFunction(value) {
+      if (!isObject(value)) {
+        return false;
+      }
+      // The use of `Object#toString` avoids issues with the `typeof` operator
+      // in Safari 9 which returns 'object' for typed arrays and other constructors.
+      var tag = baseGetTag(value);
+      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+    }
+
+    /**
+     * Checks if `value` is an integer.
+     *
+     * **Note:** This method is based on
+     * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+     * @example
+     *
+     * _.isInteger(3);
+     * // => true
+     *
+     * _.isInteger(Number.MIN_VALUE);
+     * // => false
+     *
+     * _.isInteger(Infinity);
+     * // => false
+     *
+     * _.isInteger('3');
+     * // => false
+     */
+    function isInteger(value) {
+      return typeof value == 'number' && value == toInteger(value);
+    }
+
+    /**
+     * Checks if `value` is a valid array-like length.
+     *
+     * **Note:** This method is loosely based on
+     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+     * @example
+     *
+     * _.isLength(3);
+     * // => true
+     *
+     * _.isLength(Number.MIN_VALUE);
+     * // => false
+     *
+     * _.isLength(Infinity);
+     * // => false
+     *
+     * _.isLength('3');
+     * // => false
+     */
+    function isLength(value) {
+      return typeof value == 'number' &&
+        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+    }
+
+    /**
+     * Checks if `value` is the
+     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+     * @example
+     *
+     * _.isObject({});
+     * // => true
+     *
+     * _.isObject([1, 2, 3]);
+     * // => true
+     *
+     * _.isObject(_.noop);
+     * // => true
+     *
+     * _.isObject(null);
+     * // => false
+     */
+    function isObject(value) {
+      var type = typeof value;
+      return value != null && (type == 'object' || type == 'function');
+    }
+
+    /**
+     * Checks if `value` is object-like. A value is object-like if it's not `null`
+     * and has a `typeof` result of "object".
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+     * @example
+     *
+     * _.isObjectLike({});
+     * // => true
+     *
+     * _.isObjectLike([1, 2, 3]);
+     * // => true
+     *
+     * _.isObjectLike(_.noop);
+     * // => false
+     *
+     * _.isObjectLike(null);
+     * // => false
+     */
+    function isObjectLike(value) {
+      return value != null && typeof value == 'object';
+    }
+
+    /**
+     * Checks if `value` is classified as a `Map` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.3.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+     * @example
+     *
+     * _.isMap(new Map);
+     * // => true
+     *
+     * _.isMap(new WeakMap);
+     * // => false
+     */
+    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+    /**
+     * Performs a partial deep comparison between `object` and `source` to
+     * determine if `object` contains equivalent property values.
+     *
+     * **Note:** This method is equivalent to `_.matches` when `source` is
+     * partially applied.
+     *
+     * Partial comparisons will match empty array and empty object `source`
+     * values against any array or object value, respectively. See `_.isEqual`
+     * for a list of supported value comparisons.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Lang
+     * @param {Object} object The object to inspect.
+     * @param {Object} source The object of property values to match.
+     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': 2 };
+     *
+     * _.isMatch(object, { 'b': 2 });
+     * // => true
+     *
+     * _.isMatch(object, { 'b': 1 });
+     * // => false
+     */
+    function isMatch(object, source) {
+      return object === source || baseIsMatch(object, source, getMatchData(source));
+    }
+
+    /**
+     * This method is like `_.isMatch` except that it accepts `customizer` which
+     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+     * are handled by the method instead. The `customizer` is invoked with five
+     * arguments: (objValue, srcValue, index|key, object, source).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {Object} object The object to inspect.
+     * @param {Object} source The object of property values to match.
+     * @param {Function} [customizer] The function to customize comparisons.
+     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+     * @example
+     *
+     * function isGreeting(value) {
+     *   return /^h(?:i|ello)$/.test(value);
+     * }
+     *
+     * function customizer(objValue, srcValue) {
+     *   if (isGreeting(objValue) && isGreeting(srcValue)) {
+     *     return true;
+     *   }
+     * }
+     *
+     * var object = { 'greeting': 'hello' };
+     * var source = { 'greeting': 'hi' };
+     *
+     * _.isMatchWith(object, source, customizer);
+     * // => true
+     */
+    function isMatchWith(object, source, customizer) {
+      customizer = typeof customizer == 'function' ? customizer : undefined;
+      return baseIsMatch(object, source, getMatchData(source), customizer);
+    }
+
+    /**
+     * Checks if `value` is `NaN`.
+     *
+     * **Note:** This method is based on
+     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+     * `undefined` and other non-number values.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+     * @example
+     *
+     * _.isNaN(NaN);
+     * // => true
+     *
+     * _.isNaN(new Number(NaN));
+     * // => true
+     *
+     * isNaN(undefined);
+     * // => true
+     *
+     * _.isNaN(undefined);
+     * // => false
+     */
+    function isNaN(value) {
+      // An `NaN` primitive is the only value that is not equal to itself.
+      // Perform the `toStringTag` check first to avoid errors with some
+      // ActiveX objects in IE.
+      return isNumber(value) && value != +value;
+    }
+
+    /**
+     * Checks if `value` is a pristine native function.
+     *
+     * **Note:** This method can't reliably detect native functions in the presence
+     * of the core-js package because core-js circumvents this kind of detection.
+     * Despite multiple requests, the core-js maintainer has made it clear: any
+     * attempt to fix the detection will be obstructed. As a result, we're left
+     * with little choice but to throw an error. Unfortunately, this also affects
+     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+     * which rely on core-js.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a native function,
+     *  else `false`.
+     * @example
+     *
+     * _.isNative(Array.prototype.push);
+     * // => true
+     *
+     * _.isNative(_);
+     * // => false
+     */
+    function isNative(value) {
+      if (isMaskable(value)) {
+        throw new Error(CORE_ERROR_TEXT);
+      }
+      return baseIsNative(value);
+    }
+
+    /**
+     * Checks if `value` is `null`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+     * @example
+     *
+     * _.isNull(null);
+     * // => true
+     *
+     * _.isNull(void 0);
+     * // => false
+     */
+    function isNull(value) {
+      return value === null;
+    }
+
+    /**
+     * Checks if `value` is `null` or `undefined`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+     * @example
+     *
+     * _.isNil(null);
+     * // => true
+     *
+     * _.isNil(void 0);
+     * // => true
+     *
+     * _.isNil(NaN);
+     * // => false
+     */
+    function isNil(value) {
+      return value == null;
+    }
+
+    /**
+     * Checks if `value` is classified as a `Number` primitive or object.
+     *
+     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+     * classified as numbers, use the `_.isFinite` method.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+     * @example
+     *
+     * _.isNumber(3);
+     * // => true
+     *
+     * _.isNumber(Number.MIN_VALUE);
+     * // => true
+     *
+     * _.isNumber(Infinity);
+     * // => true
+     *
+     * _.isNumber('3');
+     * // => false
+     */
+    function isNumber(value) {
+      return typeof value == 'number' ||
+        (isObjectLike(value) && baseGetTag(value) == numberTag);
+    }
+
+    /**
+     * Checks if `value` is a plain object, that is, an object created by the
+     * `Object` constructor or one with a `[[Prototype]]` of `null`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.8.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     * }
+     *
+     * _.isPlainObject(new Foo);
+     * // => false
+     *
+     * _.isPlainObject([1, 2, 3]);
+     * // => false
+     *
+     * _.isPlainObject({ 'x': 0, 'y': 0 });
+     * // => true
+     *
+     * _.isPlainObject(Object.create(null));
+     * // => true
+     */
+    function isPlainObject(value) {
+      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+        return false;
+      }
+      var proto = getPrototype(value);
+      if (proto === null) {
+        return true;
+      }
+      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+      return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+        funcToString.call(Ctor) == objectCtorString;
+    }
+
+    /**
+     * Checks if `value` is classified as a `RegExp` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.1.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+     * @example
+     *
+     * _.isRegExp(/abc/);
+     * // => true
+     *
+     * _.isRegExp('/abc/');
+     * // => false
+     */
+    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+    /**
+     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+     * double precision number which isn't the result of a rounded unsafe integer.
+     *
+     * **Note:** This method is based on
+     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+     * @example
+     *
+     * _.isSafeInteger(3);
+     * // => true
+     *
+     * _.isSafeInteger(Number.MIN_VALUE);
+     * // => false
+     *
+     * _.isSafeInteger(Infinity);
+     * // => false
+     *
+     * _.isSafeInteger('3');
+     * // => false
+     */
+    function isSafeInteger(value) {
+      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+    }
+
+    /**
+     * Checks if `value` is classified as a `Set` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.3.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+     * @example
+     *
+     * _.isSet(new Set);
+     * // => true
+     *
+     * _.isSet(new WeakSet);
+     * // => false
+     */
+    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+    /**
+     * Checks if `value` is classified as a `String` primitive or object.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+     * @example
+     *
+     * _.isString('abc');
+     * // => true
+     *
+     * _.isString(1);
+     * // => false
+     */
+    function isString(value) {
+      return typeof value == 'string' ||
+        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+    }
+
+    /**
+     * Checks if `value` is classified as a `Symbol` primitive or object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+     * @example
+     *
+     * _.isSymbol(Symbol.iterator);
+     * // => true
+     *
+     * _.isSymbol('abc');
+     * // => false
+     */
+    function isSymbol(value) {
+      return typeof value == 'symbol' ||
+        (isObjectLike(value) && baseGetTag(value) == symbolTag);
+    }
+
+    /**
+     * Checks if `value` is classified as a typed array.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+     * @example
+     *
+     * _.isTypedArray(new Uint8Array);
+     * // => true
+     *
+     * _.isTypedArray([]);
+     * // => false
+     */
+    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+    /**
+     * Checks if `value` is `undefined`.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+     * @example
+     *
+     * _.isUndefined(void 0);
+     * // => true
+     *
+     * _.isUndefined(null);
+     * // => false
+     */
+    function isUndefined(value) {
+      return value === undefined;
+    }
+
+    /**
+     * Checks if `value` is classified as a `WeakMap` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.3.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+     * @example
+     *
+     * _.isWeakMap(new WeakMap);
+     * // => true
+     *
+     * _.isWeakMap(new Map);
+     * // => false
+     */
+    function isWeakMap(value) {
+      return isObjectLike(value) && getTag(value) == weakMapTag;
+    }
+
+    /**
+     * Checks if `value` is classified as a `WeakSet` object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.3.0
+     * @category Lang
+     * @param {*} value The value to check.
+     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+     * @example
+     *
+     * _.isWeakSet(new WeakSet);
+     * // => true
+     *
+     * _.isWeakSet(new Set);
+     * // => false
+     */
+    function isWeakSet(value) {
+      return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+    }
+
+    /**
+     * Checks if `value` is less than `other`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.9.0
+     * @category Lang
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if `value` is less than `other`,
+     *  else `false`.
+     * @see _.gt
+     * @example
+     *
+     * _.lt(1, 3);
+     * // => true
+     *
+     * _.lt(3, 3);
+     * // => false
+     *
+     * _.lt(3, 1);
+     * // => false
+     */
+    var lt = createRelationalOperation(baseLt);
+
+    /**
+     * Checks if `value` is less than or equal to `other`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.9.0
+     * @category Lang
+     * @param {*} value The value to compare.
+     * @param {*} other The other value to compare.
+     * @returns {boolean} Returns `true` if `value` is less than or equal to
+     *  `other`, else `false`.
+     * @see _.gte
+     * @example
+     *
+     * _.lte(1, 3);
+     * // => true
+     *
+     * _.lte(3, 3);
+     * // => true
+     *
+     * _.lte(3, 1);
+     * // => false
+     */
+    var lte = createRelationalOperation(function(value, other) {
+      return value <= other;
+    });
+
+    /**
+     * Converts `value` to an array.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Lang
+     * @param {*} value The value to convert.
+     * @returns {Array} Returns the converted array.
+     * @example
+     *
+     * _.toArray({ 'a': 1, 'b': 2 });
+     * // => [1, 2]
+     *
+     * _.toArray('abc');
+     * // => ['a', 'b', 'c']
+     *
+     * _.toArray(1);
+     * // => []
+     *
+     * _.toArray(null);
+     * // => []
+     */
+    function toArray(value) {
+      if (!value) {
+        return [];
+      }
+      if (isArrayLike(value)) {
+        return isString(value) ? stringToArray(value) : copyArray(value);
+      }
+      if (symIterator && value[symIterator]) {
+        return iteratorToArray(value[symIterator]());
+      }
+      var tag = getTag(value),
+          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+      return func(value);
+    }
+
+    /**
+     * Converts `value` to a finite number.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.12.0
+     * @category Lang
+     * @param {*} value The value to convert.
+     * @returns {number} Returns the converted number.
+     * @example
+     *
+     * _.toFinite(3.2);
+     * // => 3.2
+     *
+     * _.toFinite(Number.MIN_VALUE);
+     * // => 5e-324
+     *
+     * _.toFinite(Infinity);
+     * // => 1.7976931348623157e+308
+     *
+     * _.toFinite('3.2');
+     * // => 3.2
+     */
+    function toFinite(value) {
+      if (!value) {
+        return value === 0 ? value : 0;
+      }
+      value = toNumber(value);
+      if (value === INFINITY || value === -INFINITY) {
+        var sign = (value < 0 ? -1 : 1);
+        return sign * MAX_INTEGER;
+      }
+      return value === value ? value : 0;
+    }
+
+    /**
+     * Converts `value` to an integer.
+     *
+     * **Note:** This method is loosely based on
+     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to convert.
+     * @returns {number} Returns the converted integer.
+     * @example
+     *
+     * _.toInteger(3.2);
+     * // => 3
+     *
+     * _.toInteger(Number.MIN_VALUE);
+     * // => 0
+     *
+     * _.toInteger(Infinity);
+     * // => 1.7976931348623157e+308
+     *
+     * _.toInteger('3.2');
+     * // => 3
+     */
+    function toInteger(value) {
+      var result = toFinite(value),
+          remainder = result % 1;
+
+      return result === result ? (remainder ? result - remainder : result) : 0;
+    }
+
+    /**
+     * Converts `value` to an integer suitable for use as the length of an
+     * array-like object.
+     *
+     * **Note:** This method is based on
+     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to convert.
+     * @returns {number} Returns the converted integer.
+     * @example
+     *
+     * _.toLength(3.2);
+     * // => 3
+     *
+     * _.toLength(Number.MIN_VALUE);
+     * // => 0
+     *
+     * _.toLength(Infinity);
+     * // => 4294967295
+     *
+     * _.toLength('3.2');
+     * // => 3
+     */
+    function toLength(value) {
+      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+    }
+
+    /**
+     * Converts `value` to a number.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to process.
+     * @returns {number} Returns the number.
+     * @example
+     *
+     * _.toNumber(3.2);
+     * // => 3.2
+     *
+     * _.toNumber(Number.MIN_VALUE);
+     * // => 5e-324
+     *
+     * _.toNumber(Infinity);
+     * // => Infinity
+     *
+     * _.toNumber('3.2');
+     * // => 3.2
+     */
+    function toNumber(value) {
+      if (typeof value == 'number') {
+        return value;
+      }
+      if (isSymbol(value)) {
+        return NAN;
+      }
+      if (isObject(value)) {
+        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+        value = isObject(other) ? (other + '') : other;
+      }
+      if (typeof value != 'string') {
+        return value === 0 ? value : +value;
+      }
+      value = value.replace(reTrim, '');
+      var isBinary = reIsBinary.test(value);
+      return (isBinary || reIsOctal.test(value))
+        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+        : (reIsBadHex.test(value) ? NAN : +value);
+    }
+
+    /**
+     * Converts `value` to a plain object flattening inherited enumerable string
+     * keyed properties of `value` to own properties of the plain object.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Lang
+     * @param {*} value The value to convert.
+     * @returns {Object} Returns the converted plain object.
+     * @example
+     *
+     * function Foo() {
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.assign({ 'a': 1 }, new Foo);
+     * // => { 'a': 1, 'b': 2 }
+     *
+     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+     * // => { 'a': 1, 'b': 2, 'c': 3 }
+     */
+    function toPlainObject(value) {
+      return copyObject(value, keysIn(value));
+    }
+
+    /**
+     * Converts `value` to a safe integer. A safe integer can be compared and
+     * represented correctly.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to convert.
+     * @returns {number} Returns the converted integer.
+     * @example
+     *
+     * _.toSafeInteger(3.2);
+     * // => 3
+     *
+     * _.toSafeInteger(Number.MIN_VALUE);
+     * // => 0
+     *
+     * _.toSafeInteger(Infinity);
+     * // => 9007199254740991
+     *
+     * _.toSafeInteger('3.2');
+     * // => 3
+     */
+    function toSafeInteger(value) {
+      return value
+        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+        : (value === 0 ? value : 0);
+    }
+
+    /**
+     * Converts `value` to a string. An empty string is returned for `null`
+     * and `undefined` values. The sign of `-0` is preserved.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Lang
+     * @param {*} value The value to convert.
+     * @returns {string} Returns the converted string.
+     * @example
+     *
+     * _.toString(null);
+     * // => ''
+     *
+     * _.toString(-0);
+     * // => '-0'
+     *
+     * _.toString([1, 2, 3]);
+     * // => '1,2,3'
+     */
+    function toString(value) {
+      return value == null ? '' : baseToString(value);
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Assigns own enumerable string keyed properties of source objects to the
+     * destination object. Source objects are applied from left to right.
+     * Subsequent sources overwrite property assignments of previous sources.
+     *
+     * **Note:** This method mutates `object` and is loosely based on
+     * [`Object.assign`](https://mdn.io/Object/assign).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.10.0
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} [sources] The source objects.
+     * @returns {Object} Returns `object`.
+     * @see _.assignIn
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     * }
+     *
+     * function Bar() {
+     *   this.c = 3;
+     * }
+     *
+     * Foo.prototype.b = 2;
+     * Bar.prototype.d = 4;
+     *
+     * _.assign({ 'a': 0 }, new Foo, new Bar);
+     * // => { 'a': 1, 'c': 3 }
+     */
+    var assign = createAssigner(function(object, source) {
+      if (isPrototype(source) || isArrayLike(source)) {
+        copyObject(source, keys(source), object);
+        return;
+      }
+      for (var key in source) {
+        if (hasOwnProperty.call(source, key)) {
+          assignValue(object, key, source[key]);
+        }
+      }
+    });
+
+    /**
+     * This method is like `_.assign` except that it iterates over own and
+     * inherited source properties.
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @alias extend
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} [sources] The source objects.
+     * @returns {Object} Returns `object`.
+     * @see _.assign
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     * }
+     *
+     * function Bar() {
+     *   this.c = 3;
+     * }
+     *
+     * Foo.prototype.b = 2;
+     * Bar.prototype.d = 4;
+     *
+     * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+     */
+    var assignIn = createAssigner(function(object, source) {
+      copyObject(source, keysIn(source), object);
+    });
+
+    /**
+     * This method is like `_.assignIn` except that it accepts `customizer`
+     * which is invoked to produce the assigned values. If `customizer` returns
+     * `undefined`, assignment is handled by the method instead. The `customizer`
+     * is invoked with five arguments: (objValue, srcValue, key, object, source).
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @alias extendWith
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} sources The source objects.
+     * @param {Function} [customizer] The function to customize assigned values.
+     * @returns {Object} Returns `object`.
+     * @see _.assignWith
+     * @example
+     *
+     * function customizer(objValue, srcValue) {
+     *   return _.isUndefined(objValue) ? srcValue : objValue;
+     * }
+     *
+     * var defaults = _.partialRight(_.assignInWith, customizer);
+     *
+     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+     * // => { 'a': 1, 'b': 2 }
+     */
+    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+      copyObject(source, keysIn(source), object, customizer);
+    });
+
+    /**
+     * This method is like `_.assign` except that it accepts `customizer`
+     * which is invoked to produce the assigned values. If `customizer` returns
+     * `undefined`, assignment is handled by the method instead. The `customizer`
+     * is invoked with five arguments: (objValue, srcValue, key, object, source).
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} sources The source objects.
+     * @param {Function} [customizer] The function to customize assigned values.
+     * @returns {Object} Returns `object`.
+     * @see _.assignInWith
+     * @example
+     *
+     * function customizer(objValue, srcValue) {
+     *   return _.isUndefined(objValue) ? srcValue : objValue;
+     * }
+     *
+     * var defaults = _.partialRight(_.assignWith, customizer);
+     *
+     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+     * // => { 'a': 1, 'b': 2 }
+     */
+    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+      copyObject(source, keys(source), object, customizer);
+    });
+
+    /**
+     * Creates an array of values corresponding to `paths` of `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.0.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {...(string|string[])} [paths] The property paths to pick.
+     * @returns {Array} Returns the picked values.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+     *
+     * _.at(object, ['a[0].b.c', 'a[1]']);
+     * // => [3, 4]
+     */
+    var at = flatRest(baseAt);
+
+    /**
+     * Creates an object that inherits from the `prototype` object. If a
+     * `properties` object is given, its own enumerable string keyed properties
+     * are assigned to the created object.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.3.0
+     * @category Object
+     * @param {Object} prototype The object to inherit from.
+     * @param {Object} [properties] The properties to assign to the object.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * function Shape() {
+     *   this.x = 0;
+     *   this.y = 0;
+     * }
+     *
+     * function Circle() {
+     *   Shape.call(this);
+     * }
+     *
+     * Circle.prototype = _.create(Shape.prototype, {
+     *   'constructor': Circle
+     * });
+     *
+     * var circle = new Circle;
+     * circle instanceof Circle;
+     * // => true
+     *
+     * circle instanceof Shape;
+     * // => true
+     */
+    function create(prototype, properties) {
+      var result = baseCreate(prototype);
+      return properties == null ? result : baseAssign(result, properties);
+    }
+
+    /**
+     * Assigns own and inherited enumerable string keyed properties of source
+     * objects to the destination object for all destination properties that
+     * resolve to `undefined`. Source objects are applied from left to right.
+     * Once a property is set, additional values of the same property are ignored.
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} [sources] The source objects.
+     * @returns {Object} Returns `object`.
+     * @see _.defaultsDeep
+     * @example
+     *
+     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+     * // => { 'a': 1, 'b': 2 }
+     */
+    var defaults = baseRest(function(object, sources) {
+      object = Object(object);
+
+      var index = -1;
+      var length = sources.length;
+      var guard = length > 2 ? sources[2] : undefined;
+
+      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+        length = 1;
+      }
+
+      while (++index < length) {
+        var source = sources[index];
+        var props = keysIn(source);
+        var propsIndex = -1;
+        var propsLength = props.length;
+
+        while (++propsIndex < propsLength) {
+          var key = props[propsIndex];
+          var value = object[key];
+
+          if (value === undefined ||
+              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+            object[key] = source[key];
+          }
+        }
+      }
+
+      return object;
+    });
+
+    /**
+     * This method is like `_.defaults` except that it recursively assigns
+     * default properties.
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.10.0
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} [sources] The source objects.
+     * @returns {Object} Returns `object`.
+     * @see _.defaults
+     * @example
+     *
+     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+     * // => { 'a': { 'b': 2, 'c': 3 } }
+     */
+    var defaultsDeep = baseRest(function(args) {
+      args.push(undefined, customDefaultsMerge);
+      return apply(mergeWith, undefined, args);
+    });
+
+    /**
+     * This method is like `_.find` except that it returns the key of the first
+     * element `predicate` returns truthy for instead of the element itself.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.1.0
+     * @category Object
+     * @param {Object} object The object to inspect.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {string|undefined} Returns the key of the matched element,
+     *  else `undefined`.
+     * @example
+     *
+     * var users = {
+     *   'barney':  { 'age': 36, 'active': true },
+     *   'fred':    { 'age': 40, 'active': false },
+     *   'pebbles': { 'age': 1,  'active': true }
+     * };
+     *
+     * _.findKey(users, function(o) { return o.age < 40; });
+     * // => 'barney' (iteration order is not guaranteed)
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.findKey(users, { 'age': 1, 'active': true });
+     * // => 'pebbles'
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.findKey(users, ['active', false]);
+     * // => 'fred'
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.findKey(users, 'active');
+     * // => 'barney'
+     */
+    function findKey(object, predicate) {
+      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
+    }
+
+    /**
+     * This method is like `_.findKey` except that it iterates over elements of
+     * a collection in the opposite order.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Object
+     * @param {Object} object The object to inspect.
+     * @param {Function} [predicate=_.identity] The function invoked per iteration.
+     * @returns {string|undefined} Returns the key of the matched element,
+     *  else `undefined`.
+     * @example
+     *
+     * var users = {
+     *   'barney':  { 'age': 36, 'active': true },
+     *   'fred':    { 'age': 40, 'active': false },
+     *   'pebbles': { 'age': 1,  'active': true }
+     * };
+     *
+     * _.findLastKey(users, function(o) { return o.age < 40; });
+     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.findLastKey(users, { 'age': 36, 'active': true });
+     * // => 'barney'
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.findLastKey(users, ['active', false]);
+     * // => 'fred'
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.findLastKey(users, 'active');
+     * // => 'pebbles'
+     */
+    function findLastKey(object, predicate) {
+      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
+    }
+
+    /**
+     * Iterates over own and inherited enumerable string keyed properties of an
+     * object and invokes `iteratee` for each property. The iteratee is invoked
+     * with three arguments: (value, key, object). Iteratee functions may exit
+     * iteration early by explicitly returning `false`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.3.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Object} Returns `object`.
+     * @see _.forInRight
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.forIn(new Foo, function(value, key) {
+     *   console.log(key);
+     * });
+     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+     */
+    function forIn(object, iteratee) {
+      return object == null
+        ? object
+        : baseFor(object, getIteratee(iteratee, 3), keysIn);
+    }
+
+    /**
+     * This method is like `_.forIn` except that it iterates over properties of
+     * `object` in the opposite order.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Object} Returns `object`.
+     * @see _.forIn
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.forInRight(new Foo, function(value, key) {
+     *   console.log(key);
+     * });
+     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+     */
+    function forInRight(object, iteratee) {
+      return object == null
+        ? object
+        : baseForRight(object, getIteratee(iteratee, 3), keysIn);
+    }
+
+    /**
+     * Iterates over own enumerable string keyed properties of an object and
+     * invokes `iteratee` for each property. The iteratee is invoked with three
+     * arguments: (value, key, object). Iteratee functions may exit iteration
+     * early by explicitly returning `false`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.3.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Object} Returns `object`.
+     * @see _.forOwnRight
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.forOwn(new Foo, function(value, key) {
+     *   console.log(key);
+     * });
+     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+     */
+    function forOwn(object, iteratee) {
+      return object && baseForOwn(object, getIteratee(iteratee, 3));
+    }
+
+    /**
+     * This method is like `_.forOwn` except that it iterates over properties of
+     * `object` in the opposite order.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.0.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Object} Returns `object`.
+     * @see _.forOwn
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.forOwnRight(new Foo, function(value, key) {
+     *   console.log(key);
+     * });
+     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+     */
+    function forOwnRight(object, iteratee) {
+      return object && baseForOwnRight(object, getIteratee(iteratee, 3));
+    }
+
+    /**
+     * Creates an array of function property names from own enumerable properties
+     * of `object`.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The object to inspect.
+     * @returns {Array} Returns the function names.
+     * @see _.functionsIn
+     * @example
+     *
+     * function Foo() {
+     *   this.a = _.constant('a');
+     *   this.b = _.constant('b');
+     * }
+     *
+     * Foo.prototype.c = _.constant('c');
+     *
+     * _.functions(new Foo);
+     * // => ['a', 'b']
+     */
+    function functions(object) {
+      return object == null ? [] : baseFunctions(object, keys(object));
+    }
+
+    /**
+     * Creates an array of function property names from own and inherited
+     * enumerable properties of `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The object to inspect.
+     * @returns {Array} Returns the function names.
+     * @see _.functions
+     * @example
+     *
+     * function Foo() {
+     *   this.a = _.constant('a');
+     *   this.b = _.constant('b');
+     * }
+     *
+     * Foo.prototype.c = _.constant('c');
+     *
+     * _.functionsIn(new Foo);
+     * // => ['a', 'b', 'c']
+     */
+    function functionsIn(object) {
+      return object == null ? [] : baseFunctions(object, keysIn(object));
+    }
+
+    /**
+     * Gets the value at `path` of `object`. If the resolved value is
+     * `undefined`, the `defaultValue` is returned in its place.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.7.0
+     * @category Object
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path of the property to get.
+     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+     * @returns {*} Returns the resolved value.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+     *
+     * _.get(object, 'a[0].b.c');
+     * // => 3
+     *
+     * _.get(object, ['a', '0', 'b', 'c']);
+     * // => 3
+     *
+     * _.get(object, 'a.b.c', 'default');
+     * // => 'default'
+     */
+    function get(object, path, defaultValue) {
+      var result = object == null ? undefined : baseGet(object, path);
+      return result === undefined ? defaultValue : result;
+    }
+
+    /**
+     * Checks if `path` is a direct property of `object`.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path to check.
+     * @returns {boolean} Returns `true` if `path` exists, else `false`.
+     * @example
+     *
+     * var object = { 'a': { 'b': 2 } };
+     * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+     *
+     * _.has(object, 'a');
+     * // => true
+     *
+     * _.has(object, 'a.b');
+     * // => true
+     *
+     * _.has(object, ['a', 'b']);
+     * // => true
+     *
+     * _.has(other, 'a');
+     * // => false
+     */
+    function has(object, path) {
+      return object != null && hasPath(object, path, baseHas);
+    }
+
+    /**
+     * Checks if `path` is a direct or inherited property of `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path to check.
+     * @returns {boolean} Returns `true` if `path` exists, else `false`.
+     * @example
+     *
+     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+     *
+     * _.hasIn(object, 'a');
+     * // => true
+     *
+     * _.hasIn(object, 'a.b');
+     * // => true
+     *
+     * _.hasIn(object, ['a', 'b']);
+     * // => true
+     *
+     * _.hasIn(object, 'b');
+     * // => false
+     */
+    function hasIn(object, path) {
+      return object != null && hasPath(object, path, baseHasIn);
+    }
+
+    /**
+     * Creates an object composed of the inverted keys and values of `object`.
+     * If `object` contains duplicate values, subsequent values overwrite
+     * property assignments of previous values.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.7.0
+     * @category Object
+     * @param {Object} object The object to invert.
+     * @returns {Object} Returns the new inverted object.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': 2, 'c': 1 };
+     *
+     * _.invert(object);
+     * // => { '1': 'c', '2': 'b' }
+     */
+    var invert = createInverter(function(result, value, key) {
+      if (value != null &&
+          typeof value.toString != 'function') {
+        value = nativeObjectToString.call(value);
+      }
+
+      result[value] = key;
+    }, constant(identity));
+
+    /**
+     * This method is like `_.invert` except that the inverted object is generated
+     * from the results of running each element of `object` thru `iteratee`. The
+     * corresponding inverted value of each inverted key is an array of keys
+     * responsible for generating the inverted value. The iteratee is invoked
+     * with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.1.0
+     * @category Object
+     * @param {Object} object The object to invert.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {Object} Returns the new inverted object.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': 2, 'c': 1 };
+     *
+     * _.invertBy(object);
+     * // => { '1': ['a', 'c'], '2': ['b'] }
+     *
+     * _.invertBy(object, function(value) {
+     *   return 'group' + value;
+     * });
+     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+     */
+    var invertBy = createInverter(function(result, value, key) {
+      if (value != null &&
+          typeof value.toString != 'function') {
+        value = nativeObjectToString.call(value);
+      }
+
+      if (hasOwnProperty.call(result, value)) {
+        result[value].push(key);
+      } else {
+        result[value] = [key];
+      }
+    }, getIteratee);
+
+    /**
+     * Invokes the method at `path` of `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path of the method to invoke.
+     * @param {...*} [args] The arguments to invoke the method with.
+     * @returns {*} Returns the result of the invoked method.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+     *
+     * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+     * // => [2, 3]
+     */
+    var invoke = baseRest(baseInvoke);
+
+    /**
+     * Creates an array of the own enumerable property names of `object`.
+     *
+     * **Note:** Non-object values are coerced to objects. See the
+     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+     * for more details.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property names.
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.keys(new Foo);
+     * // => ['a', 'b'] (iteration order is not guaranteed)
+     *
+     * _.keys('hi');
+     * // => ['0', '1']
+     */
+    function keys(object) {
+      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+    }
+
+    /**
+     * Creates an array of the own and inherited enumerable property names of `object`.
+     *
+     * **Note:** Non-object values are coerced to objects.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Object
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property names.
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.keysIn(new Foo);
+     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+     */
+    function keysIn(object) {
+      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+    }
+
+    /**
+     * The opposite of `_.mapValues`; this method creates an object with the
+     * same values as `object` and keys generated by running each own enumerable
+     * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+     * with three arguments: (value, key, object).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.8.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Object} Returns the new mapped object.
+     * @see _.mapValues
+     * @example
+     *
+     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+     *   return key + value;
+     * });
+     * // => { 'a1': 1, 'b2': 2 }
+     */
+    function mapKeys(object, iteratee) {
+      var result = {};
+      iteratee = getIteratee(iteratee, 3);
+
+      baseForOwn(object, function(value, key, object) {
+        baseAssignValue(result, iteratee(value, key, object), value);
+      });
+      return result;
+    }
+
+    /**
+     * Creates an object with the same keys as `object` and values generated
+     * by running each own enumerable string keyed property of `object` thru
+     * `iteratee`. The iteratee is invoked with three arguments:
+     * (value, key, object).
+     *
+     * @static
+     * @memberOf _
+     * @since 2.4.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Object} Returns the new mapped object.
+     * @see _.mapKeys
+     * @example
+     *
+     * var users = {
+     *   'fred':    { 'user': 'fred',    'age': 40 },
+     *   'pebbles': { 'user': 'pebbles', 'age': 1 }
+     * };
+     *
+     * _.mapValues(users, function(o) { return o.age; });
+     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.mapValues(users, 'age');
+     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+     */
+    function mapValues(object, iteratee) {
+      var result = {};
+      iteratee = getIteratee(iteratee, 3);
+
+      baseForOwn(object, function(value, key, object) {
+        baseAssignValue(result, key, iteratee(value, key, object));
+      });
+      return result;
+    }
+
+    /**
+     * This method is like `_.assign` except that it recursively merges own and
+     * inherited enumerable string keyed properties of source objects into the
+     * destination object. Source properties that resolve to `undefined` are
+     * skipped if a destination value exists. Array and plain object properties
+     * are merged recursively. Other objects and value types are overridden by
+     * assignment. Source objects are applied from left to right. Subsequent
+     * sources overwrite property assignments of previous sources.
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.5.0
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} [sources] The source objects.
+     * @returns {Object} Returns `object`.
+     * @example
+     *
+     * var object = {
+     *   'a': [{ 'b': 2 }, { 'd': 4 }]
+     * };
+     *
+     * var other = {
+     *   'a': [{ 'c': 3 }, { 'e': 5 }]
+     * };
+     *
+     * _.merge(object, other);
+     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+     */
+    var merge = createAssigner(function(object, source, srcIndex) {
+      baseMerge(object, source, srcIndex);
+    });
+
+    /**
+     * This method is like `_.merge` except that it accepts `customizer` which
+     * is invoked to produce the merged values of the destination and source
+     * properties. If `customizer` returns `undefined`, merging is handled by the
+     * method instead. The `customizer` is invoked with six arguments:
+     * (objValue, srcValue, key, object, source, stack).
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The destination object.
+     * @param {...Object} sources The source objects.
+     * @param {Function} customizer The function to customize assigned values.
+     * @returns {Object} Returns `object`.
+     * @example
+     *
+     * function customizer(objValue, srcValue) {
+     *   if (_.isArray(objValue)) {
+     *     return objValue.concat(srcValue);
+     *   }
+     * }
+     *
+     * var object = { 'a': [1], 'b': [2] };
+     * var other = { 'a': [3], 'b': [4] };
+     *
+     * _.mergeWith(object, other, customizer);
+     * // => { 'a': [1, 3], 'b': [2, 4] }
+     */
+    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+      baseMerge(object, source, srcIndex, customizer);
+    });
+
+    /**
+     * The opposite of `_.pick`; this method creates an object composed of the
+     * own and inherited enumerable property paths of `object` that are not omitted.
+     *
+     * **Note:** This method is considerably slower than `_.pick`.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The source object.
+     * @param {...(string|string[])} [paths] The property paths to omit.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': '2', 'c': 3 };
+     *
+     * _.omit(object, ['a', 'c']);
+     * // => { 'b': '2' }
+     */
+    var omit = flatRest(function(object, paths) {
+      var result = {};
+      if (object == null) {
+        return result;
+      }
+      var isDeep = false;
+      paths = arrayMap(paths, function(path) {
+        path = castPath(path, object);
+        isDeep || (isDeep = path.length > 1);
+        return path;
+      });
+      copyObject(object, getAllKeysIn(object), result);
+      if (isDeep) {
+        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+      }
+      var length = paths.length;
+      while (length--) {
+        baseUnset(result, paths[length]);
+      }
+      return result;
+    });
+
+    /**
+     * The opposite of `_.pickBy`; this method creates an object composed of
+     * the own and inherited enumerable string keyed properties of `object` that
+     * `predicate` doesn't return truthy for. The predicate is invoked with two
+     * arguments: (value, key).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The source object.
+     * @param {Function} [predicate=_.identity] The function invoked per property.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': '2', 'c': 3 };
+     *
+     * _.omitBy(object, _.isNumber);
+     * // => { 'b': '2' }
+     */
+    function omitBy(object, predicate) {
+      return pickBy(object, negate(getIteratee(predicate)));
+    }
+
+    /**
+     * Creates an object composed of the picked `object` properties.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The source object.
+     * @param {...(string|string[])} [paths] The property paths to pick.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': '2', 'c': 3 };
+     *
+     * _.pick(object, ['a', 'c']);
+     * // => { 'a': 1, 'c': 3 }
+     */
+    var pick = flatRest(function(object, paths) {
+      return object == null ? {} : basePick(object, paths);
+    });
+
+    /**
+     * Creates an object composed of the `object` properties `predicate` returns
+     * truthy for. The predicate is invoked with two arguments: (value, key).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The source object.
+     * @param {Function} [predicate=_.identity] The function invoked per property.
+     * @returns {Object} Returns the new object.
+     * @example
+     *
+     * var object = { 'a': 1, 'b': '2', 'c': 3 };
+     *
+     * _.pickBy(object, _.isNumber);
+     * // => { 'a': 1, 'c': 3 }
+     */
+    function pickBy(object, predicate) {
+      if (object == null) {
+        return {};
+      }
+      var props = arrayMap(getAllKeysIn(object), function(prop) {
+        return [prop];
+      });
+      predicate = getIteratee(predicate);
+      return basePickBy(object, props, function(value, path) {
+        return predicate(value, path[0]);
+      });
+    }
+
+    /**
+     * This method is like `_.get` except that if the resolved value is a
+     * function it's invoked with the `this` binding of its parent object and
+     * its result is returned.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The object to query.
+     * @param {Array|string} path The path of the property to resolve.
+     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+     * @returns {*} Returns the resolved value.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+     *
+     * _.result(object, 'a[0].b.c1');
+     * // => 3
+     *
+     * _.result(object, 'a[0].b.c2');
+     * // => 4
+     *
+     * _.result(object, 'a[0].b.c3', 'default');
+     * // => 'default'
+     *
+     * _.result(object, 'a[0].b.c3', _.constant('default'));
+     * // => 'default'
+     */
+    function result(object, path, defaultValue) {
+      path = castPath(path, object);
+
+      var index = -1,
+          length = path.length;
+
+      // Ensure the loop is entered when path is empty.
+      if (!length) {
+        length = 1;
+        object = undefined;
+      }
+      while (++index < length) {
+        var value = object == null ? undefined : object[toKey(path[index])];
+        if (value === undefined) {
+          index = length;
+          value = defaultValue;
+        }
+        object = isFunction(value) ? value.call(object) : value;
+      }
+      return object;
+    }
+
+    /**
+     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+     * it's created. Arrays are created for missing index properties while objects
+     * are created for all other missing properties. Use `_.setWith` to customize
+     * `path` creation.
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.7.0
+     * @category Object
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The path of the property to set.
+     * @param {*} value The value to set.
+     * @returns {Object} Returns `object`.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+     *
+     * _.set(object, 'a[0].b.c', 4);
+     * console.log(object.a[0].b.c);
+     * // => 4
+     *
+     * _.set(object, ['x', '0', 'y', 'z'], 5);
+     * console.log(object.x[0].y.z);
+     * // => 5
+     */
+    function set(object, path, value) {
+      return object == null ? object : baseSet(object, path, value);
+    }
+
+    /**
+     * This method is like `_.set` except that it accepts `customizer` which is
+     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
+     * path creation is handled by the method instead. The `customizer` is invoked
+     * with three arguments: (nsValue, key, nsObject).
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The path of the property to set.
+     * @param {*} value The value to set.
+     * @param {Function} [customizer] The function to customize assigned values.
+     * @returns {Object} Returns `object`.
+     * @example
+     *
+     * var object = {};
+     *
+     * _.setWith(object, '[0][1]', 'a', Object);
+     * // => { '0': { '1': 'a' } }
+     */
+    function setWith(object, path, value, customizer) {
+      customizer = typeof customizer == 'function' ? customizer : undefined;
+      return object == null ? object : baseSet(object, path, value, customizer);
+    }
+
+    /**
+     * Creates an array of own enumerable string keyed-value pairs for `object`
+     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+     * entries are returned.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @alias entries
+     * @category Object
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the key-value pairs.
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.toPairs(new Foo);
+     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+     */
+    var toPairs = createToPairs(keys);
+
+    /**
+     * Creates an array of own and inherited enumerable string keyed-value pairs
+     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+     * or set, its entries are returned.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @alias entriesIn
+     * @category Object
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the key-value pairs.
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.toPairsIn(new Foo);
+     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+     */
+    var toPairsIn = createToPairs(keysIn);
+
+    /**
+     * An alternative to `_.reduce`; this method transforms `object` to a new
+     * `accumulator` object which is the result of running each of its own
+     * enumerable string keyed properties thru `iteratee`, with each invocation
+     * potentially mutating the `accumulator` object. If `accumulator` is not
+     * provided, a new object with the same `[[Prototype]]` will be used. The
+     * iteratee is invoked with four arguments: (accumulator, value, key, object).
+     * Iteratee functions may exit iteration early by explicitly returning `false`.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.3.0
+     * @category Object
+     * @param {Object} object The object to iterate over.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @param {*} [accumulator] The custom accumulator value.
+     * @returns {*} Returns the accumulated value.
+     * @example
+     *
+     * _.transform([2, 3, 4], function(result, n) {
+     *   result.push(n *= n);
+     *   return n % 2 == 0;
+     * }, []);
+     * // => [4, 9]
+     *
+     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+     *   (result[value] || (result[value] = [])).push(key);
+     * }, {});
+     * // => { '1': ['a', 'c'], '2': ['b'] }
+     */
+    function transform(object, iteratee, accumulator) {
+      var isArr = isArray(object),
+          isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+      iteratee = getIteratee(iteratee, 4);
+      if (accumulator == null) {
+        var Ctor = object && object.constructor;
+        if (isArrLike) {
+          accumulator = isArr ? new Ctor : [];
+        }
+        else if (isObject(object)) {
+          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+        }
+        else {
+          accumulator = {};
+        }
+      }
+      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+        return iteratee(accumulator, value, index, object);
+      });
+      return accumulator;
+    }
+
+    /**
+     * Removes the property at `path` of `object`.
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Object
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The path of the property to unset.
+     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+     * _.unset(object, 'a[0].b.c');
+     * // => true
+     *
+     * console.log(object);
+     * // => { 'a': [{ 'b': {} }] };
+     *
+     * _.unset(object, ['a', '0', 'b', 'c']);
+     * // => true
+     *
+     * console.log(object);
+     * // => { 'a': [{ 'b': {} }] };
+     */
+    function unset(object, path) {
+      return object == null ? true : baseUnset(object, path);
+    }
+
+    /**
+     * This method is like `_.set` except that accepts `updater` to produce the
+     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+     * is invoked with one argument: (value).
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.6.0
+     * @category Object
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The path of the property to set.
+     * @param {Function} updater The function to produce the updated value.
+     * @returns {Object} Returns `object`.
+     * @example
+     *
+     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+     *
+     * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+     * console.log(object.a[0].b.c);
+     * // => 9
+     *
+     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+     * console.log(object.x[0].y.z);
+     * // => 0
+     */
+    function update(object, path, updater) {
+      return object == null ? object : baseUpdate(object, path, castFunction(updater));
+    }
+
+    /**
+     * This method is like `_.update` except that it accepts `customizer` which is
+     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
+     * path creation is handled by the method instead. The `customizer` is invoked
+     * with three arguments: (nsValue, key, nsObject).
+     *
+     * **Note:** This method mutates `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.6.0
+     * @category Object
+     * @param {Object} object The object to modify.
+     * @param {Array|string} path The path of the property to set.
+     * @param {Function} updater The function to produce the updated value.
+     * @param {Function} [customizer] The function to customize assigned values.
+     * @returns {Object} Returns `object`.
+     * @example
+     *
+     * var object = {};
+     *
+     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+     * // => { '0': { '1': 'a' } }
+     */
+    function updateWith(object, path, updater, customizer) {
+      customizer = typeof customizer == 'function' ? customizer : undefined;
+      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+    }
+
+    /**
+     * Creates an array of the own enumerable string keyed property values of `object`.
+     *
+     * **Note:** Non-object values are coerced to objects.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Object
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property values.
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.values(new Foo);
+     * // => [1, 2] (iteration order is not guaranteed)
+     *
+     * _.values('hi');
+     * // => ['h', 'i']
+     */
+    function values(object) {
+      return object == null ? [] : baseValues(object, keys(object));
+    }
+
+    /**
+     * Creates an array of the own and inherited enumerable string keyed property
+     * values of `object`.
+     *
+     * **Note:** Non-object values are coerced to objects.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Object
+     * @param {Object} object The object to query.
+     * @returns {Array} Returns the array of property values.
+     * @example
+     *
+     * function Foo() {
+     *   this.a = 1;
+     *   this.b = 2;
+     * }
+     *
+     * Foo.prototype.c = 3;
+     *
+     * _.valuesIn(new Foo);
+     * // => [1, 2, 3] (iteration order is not guaranteed)
+     */
+    function valuesIn(object) {
+      return object == null ? [] : baseValues(object, keysIn(object));
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Clamps `number` within the inclusive `lower` and `upper` bounds.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Number
+     * @param {number} number The number to clamp.
+     * @param {number} [lower] The lower bound.
+     * @param {number} upper The upper bound.
+     * @returns {number} Returns the clamped number.
+     * @example
+     *
+     * _.clamp(-10, -5, 5);
+     * // => -5
+     *
+     * _.clamp(10, -5, 5);
+     * // => 5
+     */
+    function clamp(number, lower, upper) {
+      if (upper === undefined) {
+        upper = lower;
+        lower = undefined;
+      }
+      if (upper !== undefined) {
+        upper = toNumber(upper);
+        upper = upper === upper ? upper : 0;
+      }
+      if (lower !== undefined) {
+        lower = toNumber(lower);
+        lower = lower === lower ? lower : 0;
+      }
+      return baseClamp(toNumber(number), lower, upper);
+    }
+
+    /**
+     * Checks if `n` is between `start` and up to, but not including, `end`. If
+     * `end` is not specified, it's set to `start` with `start` then set to `0`.
+     * If `start` is greater than `end` the params are swapped to support
+     * negative ranges.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.3.0
+     * @category Number
+     * @param {number} number The number to check.
+     * @param {number} [start=0] The start of the range.
+     * @param {number} end The end of the range.
+     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+     * @see _.range, _.rangeRight
+     * @example
+     *
+     * _.inRange(3, 2, 4);
+     * // => true
+     *
+     * _.inRange(4, 8);
+     * // => true
+     *
+     * _.inRange(4, 2);
+     * // => false
+     *
+     * _.inRange(2, 2);
+     * // => false
+     *
+     * _.inRange(1.2, 2);
+     * // => true
+     *
+     * _.inRange(5.2, 4);
+     * // => false
+     *
+     * _.inRange(-3, -2, -6);
+     * // => true
+     */
+    function inRange(number, start, end) {
+      start = toFinite(start);
+      if (end === undefined) {
+        end = start;
+        start = 0;
+      } else {
+        end = toFinite(end);
+      }
+      number = toNumber(number);
+      return baseInRange(number, start, end);
+    }
+
+    /**
+     * Produces a random number between the inclusive `lower` and `upper` bounds.
+     * If only one argument is provided a number between `0` and the given number
+     * is returned. If `floating` is `true`, or either `lower` or `upper` are
+     * floats, a floating-point number is returned instead of an integer.
+     *
+     * **Note:** JavaScript follows the IEEE-754 standard for resolving
+     * floating-point values which can produce unexpected results.
+     *
+     * @static
+     * @memberOf _
+     * @since 0.7.0
+     * @category Number
+     * @param {number} [lower=0] The lower bound.
+     * @param {number} [upper=1] The upper bound.
+     * @param {boolean} [floating] Specify returning a floating-point number.
+     * @returns {number} Returns the random number.
+     * @example
+     *
+     * _.random(0, 5);
+     * // => an integer between 0 and 5
+     *
+     * _.random(5);
+     * // => also an integer between 0 and 5
+     *
+     * _.random(5, true);
+     * // => a floating-point number between 0 and 5
+     *
+     * _.random(1.2, 5.2);
+     * // => a floating-point number between 1.2 and 5.2
+     */
+    function random(lower, upper, floating) {
+      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+        upper = floating = undefined;
+      }
+      if (floating === undefined) {
+        if (typeof upper == 'boolean') {
+          floating = upper;
+          upper = undefined;
+        }
+        else if (typeof lower == 'boolean') {
+          floating = lower;
+          lower = undefined;
+        }
+      }
+      if (lower === undefined && upper === undefined) {
+        lower = 0;
+        upper = 1;
+      }
+      else {
+        lower = toFinite(lower);
+        if (upper === undefined) {
+          upper = lower;
+          lower = 0;
+        } else {
+          upper = toFinite(upper);
+        }
+      }
+      if (lower > upper) {
+        var temp = lower;
+        lower = upper;
+        upper = temp;
+      }
+      if (floating || lower % 1 || upper % 1) {
+        var rand = nativeRandom();
+        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+      }
+      return baseRandom(lower, upper);
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the camel cased string.
+     * @example
+     *
+     * _.camelCase('Foo Bar');
+     * // => 'fooBar'
+     *
+     * _.camelCase('--foo-bar--');
+     * // => 'fooBar'
+     *
+     * _.camelCase('__FOO_BAR__');
+     * // => 'fooBar'
+     */
+    var camelCase = createCompounder(function(result, word, index) {
+      word = word.toLowerCase();
+      return result + (index ? capitalize(word) : word);
+    });
+
+    /**
+     * Converts the first character of `string` to upper case and the remaining
+     * to lower case.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to capitalize.
+     * @returns {string} Returns the capitalized string.
+     * @example
+     *
+     * _.capitalize('FRED');
+     * // => 'Fred'
+     */
+    function capitalize(string) {
+      return upperFirst(toString(string).toLowerCase());
+    }
+
+    /**
+     * Deburrs `string` by converting
+     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+     * letters to basic Latin letters and removing
+     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to deburr.
+     * @returns {string} Returns the deburred string.
+     * @example
+     *
+     * _.deburr('déjà vu');
+     * // => 'deja vu'
+     */
+    function deburr(string) {
+      string = toString(string);
+      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+    }
+
+    /**
+     * Checks if `string` ends with the given target string.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to inspect.
+     * @param {string} [target] The string to search for.
+     * @param {number} [position=string.length] The position to search up to.
+     * @returns {boolean} Returns `true` if `string` ends with `target`,
+     *  else `false`.
+     * @example
+     *
+     * _.endsWith('abc', 'c');
+     * // => true
+     *
+     * _.endsWith('abc', 'b');
+     * // => false
+     *
+     * _.endsWith('abc', 'b', 2);
+     * // => true
+     */
+    function endsWith(string, target, position) {
+      string = toString(string);
+      target = baseToString(target);
+
+      var length = string.length;
+      position = position === undefined
+        ? length
+        : baseClamp(toInteger(position), 0, length);
+
+      var end = position;
+      position -= target.length;
+      return position >= 0 && string.slice(position, end) == target;
+    }
+
+    /**
+     * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+     * corresponding HTML entities.
+     *
+     * **Note:** No other characters are escaped. To escape additional
+     * characters use a third-party library like [_he_](https://mths.be/he).
+     *
+     * Though the ">" character is escaped for symmetry, characters like
+     * ">" and "/" don't need escaping in HTML and have no special meaning
+     * unless they're part of a tag or unquoted attribute value. See
+     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+     * (under "semi-related fun fact") for more details.
+     *
+     * When working with HTML you should always
+     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+     * XSS vectors.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category String
+     * @param {string} [string=''] The string to escape.
+     * @returns {string} Returns the escaped string.
+     * @example
+     *
+     * _.escape('fred, barney, & pebbles');
+     * // => 'fred, barney, &amp; pebbles'
+     */
+    function escape(string) {
+      string = toString(string);
+      return (string && reHasUnescapedHtml.test(string))
+        ? string.replace(reUnescapedHtml, escapeHtmlChar)
+        : string;
+    }
+
+    /**
+     * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+     * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to escape.
+     * @returns {string} Returns the escaped string.
+     * @example
+     *
+     * _.escapeRegExp('[lodash](https://lodash.com/)');
+     * // => '\[lodash\]\(https://lodash\.com/\)'
+     */
+    function escapeRegExp(string) {
+      string = toString(string);
+      return (string && reHasRegExpChar.test(string))
+        ? string.replace(reRegExpChar, '\\$&')
+        : string;
+    }
+
+    /**
+     * Converts `string` to
+     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the kebab cased string.
+     * @example
+     *
+     * _.kebabCase('Foo Bar');
+     * // => 'foo-bar'
+     *
+     * _.kebabCase('fooBar');
+     * // => 'foo-bar'
+     *
+     * _.kebabCase('__FOO_BAR__');
+     * // => 'foo-bar'
+     */
+    var kebabCase = createCompounder(function(result, word, index) {
+      return result + (index ? '-' : '') + word.toLowerCase();
+    });
+
+    /**
+     * Converts `string`, as space separated words, to lower case.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the lower cased string.
+     * @example
+     *
+     * _.lowerCase('--Foo-Bar--');
+     * // => 'foo bar'
+     *
+     * _.lowerCase('fooBar');
+     * // => 'foo bar'
+     *
+     * _.lowerCase('__FOO_BAR__');
+     * // => 'foo bar'
+     */
+    var lowerCase = createCompounder(function(result, word, index) {
+      return result + (index ? ' ' : '') + word.toLowerCase();
+    });
+
+    /**
+     * Converts the first character of `string` to lower case.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the converted string.
+     * @example
+     *
+     * _.lowerFirst('Fred');
+     * // => 'fred'
+     *
+     * _.lowerFirst('FRED');
+     * // => 'fRED'
+     */
+    var lowerFirst = createCaseFirst('toLowerCase');
+
+    /**
+     * Pads `string` on the left and right sides if it's shorter than `length`.
+     * Padding characters are truncated if they can't be evenly divided by `length`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to pad.
+     * @param {number} [length=0] The padding length.
+     * @param {string} [chars=' '] The string used as padding.
+     * @returns {string} Returns the padded string.
+     * @example
+     *
+     * _.pad('abc', 8);
+     * // => '  abc   '
+     *
+     * _.pad('abc', 8, '_-');
+     * // => '_-abc_-_'
+     *
+     * _.pad('abc', 3);
+     * // => 'abc'
+     */
+    function pad(string, length, chars) {
+      string = toString(string);
+      length = toInteger(length);
+
+      var strLength = length ? stringSize(string) : 0;
+      if (!length || strLength >= length) {
+        return string;
+      }
+      var mid = (length - strLength) / 2;
+      return (
+        createPadding(nativeFloor(mid), chars) +
+        string +
+        createPadding(nativeCeil(mid), chars)
+      );
+    }
+
+    /**
+     * Pads `string` on the right side if it's shorter than `length`. Padding
+     * characters are truncated if they exceed `length`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to pad.
+     * @param {number} [length=0] The padding length.
+     * @param {string} [chars=' '] The string used as padding.
+     * @returns {string} Returns the padded string.
+     * @example
+     *
+     * _.padEnd('abc', 6);
+     * // => 'abc   '
+     *
+     * _.padEnd('abc', 6, '_-');
+     * // => 'abc_-_'
+     *
+     * _.padEnd('abc', 3);
+     * // => 'abc'
+     */
+    function padEnd(string, length, chars) {
+      string = toString(string);
+      length = toInteger(length);
+
+      var strLength = length ? stringSize(string) : 0;
+      return (length && strLength < length)
+        ? (string + createPadding(length - strLength, chars))
+        : string;
+    }
+
+    /**
+     * Pads `string` on the left side if it's shorter than `length`. Padding
+     * characters are truncated if they exceed `length`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to pad.
+     * @param {number} [length=0] The padding length.
+     * @param {string} [chars=' '] The string used as padding.
+     * @returns {string} Returns the padded string.
+     * @example
+     *
+     * _.padStart('abc', 6);
+     * // => '   abc'
+     *
+     * _.padStart('abc', 6, '_-');
+     * // => '_-_abc'
+     *
+     * _.padStart('abc', 3);
+     * // => 'abc'
+     */
+    function padStart(string, length, chars) {
+      string = toString(string);
+      length = toInteger(length);
+
+      var strLength = length ? stringSize(string) : 0;
+      return (length && strLength < length)
+        ? (createPadding(length - strLength, chars) + string)
+        : string;
+    }
+
+    /**
+     * Converts `string` to an integer of the specified radix. If `radix` is
+     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+     * hexadecimal, in which case a `radix` of `16` is used.
+     *
+     * **Note:** This method aligns with the
+     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+     *
+     * @static
+     * @memberOf _
+     * @since 1.1.0
+     * @category String
+     * @param {string} string The string to convert.
+     * @param {number} [radix=10] The radix to interpret `value` by.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {number} Returns the converted integer.
+     * @example
+     *
+     * _.parseInt('08');
+     * // => 8
+     *
+     * _.map(['6', '08', '10'], _.parseInt);
+     * // => [6, 8, 10]
+     */
+    function parseInt(string, radix, guard) {
+      if (guard || radix == null) {
+        radix = 0;
+      } else if (radix) {
+        radix = +radix;
+      }
+      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+    }
+
+    /**
+     * Repeats the given string `n` times.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to repeat.
+     * @param {number} [n=1] The number of times to repeat the string.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {string} Returns the repeated string.
+     * @example
+     *
+     * _.repeat('*', 3);
+     * // => '***'
+     *
+     * _.repeat('abc', 2);
+     * // => 'abcabc'
+     *
+     * _.repeat('abc', 0);
+     * // => ''
+     */
+    function repeat(string, n, guard) {
+      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+        n = 1;
+      } else {
+        n = toInteger(n);
+      }
+      return baseRepeat(toString(string), n);
+    }
+
+    /**
+     * Replaces matches for `pattern` in `string` with `replacement`.
+     *
+     * **Note:** This method is based on
+     * [`String#replace`](https://mdn.io/String/replace).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to modify.
+     * @param {RegExp|string} pattern The pattern to replace.
+     * @param {Function|string} replacement The match replacement.
+     * @returns {string} Returns the modified string.
+     * @example
+     *
+     * _.replace('Hi Fred', 'Fred', 'Barney');
+     * // => 'Hi Barney'
+     */
+    function replace() {
+      var args = arguments,
+          string = toString(args[0]);
+
+      return args.length < 3 ? string : string.replace(args[1], args[2]);
+    }
+
+    /**
+     * Converts `string` to
+     * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the snake cased string.
+     * @example
+     *
+     * _.snakeCase('Foo Bar');
+     * // => 'foo_bar'
+     *
+     * _.snakeCase('fooBar');
+     * // => 'foo_bar'
+     *
+     * _.snakeCase('--FOO-BAR--');
+     * // => 'foo_bar'
+     */
+    var snakeCase = createCompounder(function(result, word, index) {
+      return result + (index ? '_' : '') + word.toLowerCase();
+    });
+
+    /**
+     * Splits `string` by `separator`.
+     *
+     * **Note:** This method is based on
+     * [`String#split`](https://mdn.io/String/split).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to split.
+     * @param {RegExp|string} separator The separator pattern to split by.
+     * @param {number} [limit] The length to truncate results to.
+     * @returns {Array} Returns the string segments.
+     * @example
+     *
+     * _.split('a-b-c', '-', 2);
+     * // => ['a', 'b']
+     */
+    function split(string, separator, limit) {
+      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+        separator = limit = undefined;
+      }
+      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+      if (!limit) {
+        return [];
+      }
+      string = toString(string);
+      if (string && (
+            typeof separator == 'string' ||
+            (separator != null && !isRegExp(separator))
+          )) {
+        separator = baseToString(separator);
+        if (!separator && hasUnicode(string)) {
+          return castSlice(stringToArray(string), 0, limit);
+        }
+      }
+      return string.split(separator, limit);
+    }
+
+    /**
+     * Converts `string` to
+     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+     *
+     * @static
+     * @memberOf _
+     * @since 3.1.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the start cased string.
+     * @example
+     *
+     * _.startCase('--foo-bar--');
+     * // => 'Foo Bar'
+     *
+     * _.startCase('fooBar');
+     * // => 'Foo Bar'
+     *
+     * _.startCase('__FOO_BAR__');
+     * // => 'FOO BAR'
+     */
+    var startCase = createCompounder(function(result, word, index) {
+      return result + (index ? ' ' : '') + upperFirst(word);
+    });
+
+    /**
+     * Checks if `string` starts with the given target string.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to inspect.
+     * @param {string} [target] The string to search for.
+     * @param {number} [position=0] The position to search from.
+     * @returns {boolean} Returns `true` if `string` starts with `target`,
+     *  else `false`.
+     * @example
+     *
+     * _.startsWith('abc', 'a');
+     * // => true
+     *
+     * _.startsWith('abc', 'b');
+     * // => false
+     *
+     * _.startsWith('abc', 'b', 1);
+     * // => true
+     */
+    function startsWith(string, target, position) {
+      string = toString(string);
+      position = position == null
+        ? 0
+        : baseClamp(toInteger(position), 0, string.length);
+
+      target = baseToString(target);
+      return string.slice(position, position + target.length) == target;
+    }
+
+    /**
+     * Creates a compiled template function that can interpolate data properties
+     * in "interpolate" delimiters, HTML-escape interpolated data properties in
+     * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+     * properties may be accessed as free variables in the template. If a setting
+     * object is given, it takes precedence over `_.templateSettings` values.
+     *
+     * **Note:** In the development build `_.template` utilizes
+     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+     * for easier debugging.
+     *
+     * For more information on precompiling templates see
+     * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+     *
+     * For more information on Chrome extension sandboxes see
+     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category String
+     * @param {string} [string=''] The template string.
+     * @param {Object} [options={}] The options object.
+     * @param {RegExp} [options.escape=_.templateSettings.escape]
+     *  The HTML "escape" delimiter.
+     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+     *  The "evaluate" delimiter.
+     * @param {Object} [options.imports=_.templateSettings.imports]
+     *  An object to import into the template as free variables.
+     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+     *  The "interpolate" delimiter.
+     * @param {string} [options.sourceURL='lodash.templateSources[n]']
+     *  The sourceURL of the compiled template.
+     * @param {string} [options.variable='obj']
+     *  The data object variable name.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Function} Returns the compiled template function.
+     * @example
+     *
+     * // Use the "interpolate" delimiter to create a compiled template.
+     * var compiled = _.template('hello <%= user %>!');
+     * compiled({ 'user': 'fred' });
+     * // => 'hello fred!'
+     *
+     * // Use the HTML "escape" delimiter to escape data property values.
+     * var compiled = _.template('<b><%- value %></b>');
+     * compiled({ 'value': '<script>' });
+     * // => '<b>&lt;script&gt;</b>'
+     *
+     * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+     * compiled({ 'users': ['fred', 'barney'] });
+     * // => '<li>fred</li><li>barney</li>'
+     *
+     * // Use the internal `print` function in "evaluate" delimiters.
+     * var compiled = _.template('<% print("hello " + user); %>!');
+     * compiled({ 'user': 'barney' });
+     * // => 'hello barney!'
+     *
+     * // Use the ES template literal delimiter as an "interpolate" delimiter.
+     * // Disable support by replacing the "interpolate" delimiter.
+     * var compiled = _.template('hello ${ user }!');
+     * compiled({ 'user': 'pebbles' });
+     * // => 'hello pebbles!'
+     *
+     * // Use backslashes to treat delimiters as plain text.
+     * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+     * compiled({ 'value': 'ignored' });
+     * // => '<%- value %>'
+     *
+     * // Use the `imports` option to import `jQuery` as `jq`.
+     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+     * compiled({ 'users': ['fred', 'barney'] });
+     * // => '<li>fred</li><li>barney</li>'
+     *
+     * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+     * compiled(data);
+     * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+     *
+     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+     * compiled.source;
+     * // => function(data) {
+     * //   var __t, __p = '';
+     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+     * //   return __p;
+     * // }
+     *
+     * // Use custom template delimiters.
+     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+     * var compiled = _.template('hello {{ user }}!');
+     * compiled({ 'user': 'mustache' });
+     * // => 'hello mustache!'
+     *
+     * // Use the `source` property to inline compiled templates for meaningful
+     * // line numbers in error messages and stack traces.
+     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+     *   var JST = {\
+     *     "main": ' + _.template(mainText).source + '\
+     *   };\
+     * ');
+     */
+    function template(string, options, guard) {
+      // Based on John Resig's `tmpl` implementation
+      // (http://ejohn.org/blog/javascript-micro-templating/)
+      // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+      var settings = lodash.templateSettings;
+
+      if (guard && isIterateeCall(string, options, guard)) {
+        options = undefined;
+      }
+      string = toString(string);
+      options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+          importsKeys = keys(imports),
+          importsValues = baseValues(imports, importsKeys);
+
+      var isEscaping,
+          isEvaluating,
+          index = 0,
+          interpolate = options.interpolate || reNoMatch,
+          source = "__p += '";
+
+      // Compile the regexp to match each delimiter.
+      var reDelimiters = RegExp(
+        (options.escape || reNoMatch).source + '|' +
+        interpolate.source + '|' +
+        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+        (options.evaluate || reNoMatch).source + '|$'
+      , 'g');
+
+      // Use a sourceURL for easier debugging.
+      // The sourceURL gets injected into the source that's eval-ed, so be careful
+      // with lookup (in case of e.g. prototype pollution), and strip newlines if any.
+      // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
+      var sourceURL = '//# sourceURL=' +
+        (hasOwnProperty.call(options, 'sourceURL')
+          ? (options.sourceURL + '').replace(/[\r\n]/g, ' ')
+          : ('lodash.templateSources[' + (++templateCounter) + ']')
+        ) + '\n';
+
+      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+        interpolateValue || (interpolateValue = esTemplateValue);
+
+        // Escape characters that can't be included in string literals.
+        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+        // Replace delimiters with snippets.
+        if (escapeValue) {
+          isEscaping = true;
+          source += "' +\n__e(" + escapeValue + ") +\n'";
+        }
+        if (evaluateValue) {
+          isEvaluating = true;
+          source += "';\n" + evaluateValue + ";\n__p += '";
+        }
+        if (interpolateValue) {
+          source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+        }
+        index = offset + match.length;
+
+        // The JS engine embedded in Adobe products needs `match` returned in
+        // order to produce the correct `offset` value.
+        return match;
+      });
+
+      source += "';\n";
+
+      // If `variable` is not specified wrap a with-statement around the generated
+      // code to add the data object to the top of the scope chain.
+      // Like with sourceURL, we take care to not check the option's prototype,
+      // as this configuration is a code injection vector.
+      var variable = hasOwnProperty.call(options, 'variable') && options.variable;
+      if (!variable) {
+        source = 'with (obj) {\n' + source + '\n}\n';
+      }
+      // Cleanup code by stripping empty strings.
+      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+        .replace(reEmptyStringMiddle, '$1')
+        .replace(reEmptyStringTrailing, '$1;');
+
+      // Frame code as the function body.
+      source = 'function(' + (variable || 'obj') + ') {\n' +
+        (variable
+          ? ''
+          : 'obj || (obj = {});\n'
+        ) +
+        "var __t, __p = ''" +
+        (isEscaping
+           ? ', __e = _.escape'
+           : ''
+        ) +
+        (isEvaluating
+          ? ', __j = Array.prototype.join;\n' +
+            "function print() { __p += __j.call(arguments, '') }\n"
+          : ';\n'
+        ) +
+        source +
+        'return __p\n}';
+
+      var result = attempt(function() {
+        return Function(importsKeys, sourceURL + 'return ' + source)
+          .apply(undefined, importsValues);
+      });
+
+      // Provide the compiled function's source by its `toString` method or
+      // the `source` property as a convenience for inlining compiled templates.
+      result.source = source;
+      if (isError(result)) {
+        throw result;
+      }
+      return result;
+    }
+
+    /**
+     * Converts `string`, as a whole, to lower case just like
+     * [String#toLowerCase](https://mdn.io/toLowerCase).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the lower cased string.
+     * @example
+     *
+     * _.toLower('--Foo-Bar--');
+     * // => '--foo-bar--'
+     *
+     * _.toLower('fooBar');
+     * // => 'foobar'
+     *
+     * _.toLower('__FOO_BAR__');
+     * // => '__foo_bar__'
+     */
+    function toLower(value) {
+      return toString(value).toLowerCase();
+    }
+
+    /**
+     * Converts `string`, as a whole, to upper case just like
+     * [String#toUpperCase](https://mdn.io/toUpperCase).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the upper cased string.
+     * @example
+     *
+     * _.toUpper('--foo-bar--');
+     * // => '--FOO-BAR--'
+     *
+     * _.toUpper('fooBar');
+     * // => 'FOOBAR'
+     *
+     * _.toUpper('__foo_bar__');
+     * // => '__FOO_BAR__'
+     */
+    function toUpper(value) {
+      return toString(value).toUpperCase();
+    }
+
+    /**
+     * Removes leading and trailing whitespace or specified characters from `string`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to trim.
+     * @param {string} [chars=whitespace] The characters to trim.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {string} Returns the trimmed string.
+     * @example
+     *
+     * _.trim('  abc  ');
+     * // => 'abc'
+     *
+     * _.trim('-_-abc-_-', '_-');
+     * // => 'abc'
+     *
+     * _.map(['  foo  ', '  bar  '], _.trim);
+     * // => ['foo', 'bar']
+     */
+    function trim(string, chars, guard) {
+      string = toString(string);
+      if (string && (guard || chars === undefined)) {
+        return string.replace(reTrim, '');
+      }
+      if (!string || !(chars = baseToString(chars))) {
+        return string;
+      }
+      var strSymbols = stringToArray(string),
+          chrSymbols = stringToArray(chars),
+          start = charsStartIndex(strSymbols, chrSymbols),
+          end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+      return castSlice(strSymbols, start, end).join('');
+    }
+
+    /**
+     * Removes trailing whitespace or specified characters from `string`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to trim.
+     * @param {string} [chars=whitespace] The characters to trim.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {string} Returns the trimmed string.
+     * @example
+     *
+     * _.trimEnd('  abc  ');
+     * // => '  abc'
+     *
+     * _.trimEnd('-_-abc-_-', '_-');
+     * // => '-_-abc'
+     */
+    function trimEnd(string, chars, guard) {
+      string = toString(string);
+      if (string && (guard || chars === undefined)) {
+        return string.replace(reTrimEnd, '');
+      }
+      if (!string || !(chars = baseToString(chars))) {
+        return string;
+      }
+      var strSymbols = stringToArray(string),
+          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+      return castSlice(strSymbols, 0, end).join('');
+    }
+
+    /**
+     * Removes leading whitespace or specified characters from `string`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to trim.
+     * @param {string} [chars=whitespace] The characters to trim.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {string} Returns the trimmed string.
+     * @example
+     *
+     * _.trimStart('  abc  ');
+     * // => 'abc  '
+     *
+     * _.trimStart('-_-abc-_-', '_-');
+     * // => 'abc-_-'
+     */
+    function trimStart(string, chars, guard) {
+      string = toString(string);
+      if (string && (guard || chars === undefined)) {
+        return string.replace(reTrimStart, '');
+      }
+      if (!string || !(chars = baseToString(chars))) {
+        return string;
+      }
+      var strSymbols = stringToArray(string),
+          start = charsStartIndex(strSymbols, stringToArray(chars));
+
+      return castSlice(strSymbols, start).join('');
+    }
+
+    /**
+     * Truncates `string` if it's longer than the given maximum string length.
+     * The last characters of the truncated string are replaced with the omission
+     * string which defaults to "...".
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to truncate.
+     * @param {Object} [options={}] The options object.
+     * @param {number} [options.length=30] The maximum string length.
+     * @param {string} [options.omission='...'] The string to indicate text is omitted.
+     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+     * @returns {string} Returns the truncated string.
+     * @example
+     *
+     * _.truncate('hi-diddly-ho there, neighborino');
+     * // => 'hi-diddly-ho there, neighbo...'
+     *
+     * _.truncate('hi-diddly-ho there, neighborino', {
+     *   'length': 24,
+     *   'separator': ' '
+     * });
+     * // => 'hi-diddly-ho there,...'
+     *
+     * _.truncate('hi-diddly-ho there, neighborino', {
+     *   'length': 24,
+     *   'separator': /,? +/
+     * });
+     * // => 'hi-diddly-ho there...'
+     *
+     * _.truncate('hi-diddly-ho there, neighborino', {
+     *   'omission': ' [...]'
+     * });
+     * // => 'hi-diddly-ho there, neig [...]'
+     */
+    function truncate(string, options) {
+      var length = DEFAULT_TRUNC_LENGTH,
+          omission = DEFAULT_TRUNC_OMISSION;
+
+      if (isObject(options)) {
+        var separator = 'separator' in options ? options.separator : separator;
+        length = 'length' in options ? toInteger(options.length) : length;
+        omission = 'omission' in options ? baseToString(options.omission) : omission;
+      }
+      string = toString(string);
+
+      var strLength = string.length;
+      if (hasUnicode(string)) {
+        var strSymbols = stringToArray(string);
+        strLength = strSymbols.length;
+      }
+      if (length >= strLength) {
+        return string;
+      }
+      var end = length - stringSize(omission);
+      if (end < 1) {
+        return omission;
+      }
+      var result = strSymbols
+        ? castSlice(strSymbols, 0, end).join('')
+        : string.slice(0, end);
+
+      if (separator === undefined) {
+        return result + omission;
+      }
+      if (strSymbols) {
+        end += (result.length - end);
+      }
+      if (isRegExp(separator)) {
+        if (string.slice(end).search(separator)) {
+          var match,
+              substring = result;
+
+          if (!separator.global) {
+            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+          }
+          separator.lastIndex = 0;
+          while ((match = separator.exec(substring))) {
+            var newEnd = match.index;
+          }
+          result = result.slice(0, newEnd === undefined ? end : newEnd);
+        }
+      } else if (string.indexOf(baseToString(separator), end) != end) {
+        var index = result.lastIndexOf(separator);
+        if (index > -1) {
+          result = result.slice(0, index);
+        }
+      }
+      return result + omission;
+    }
+
+    /**
+     * The inverse of `_.escape`; this method converts the HTML entities
+     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+     * their corresponding characters.
+     *
+     * **Note:** No other HTML entities are unescaped. To unescape additional
+     * HTML entities use a third-party library like [_he_](https://mths.be/he).
+     *
+     * @static
+     * @memberOf _
+     * @since 0.6.0
+     * @category String
+     * @param {string} [string=''] The string to unescape.
+     * @returns {string} Returns the unescaped string.
+     * @example
+     *
+     * _.unescape('fred, barney, &amp; pebbles');
+     * // => 'fred, barney, & pebbles'
+     */
+    function unescape(string) {
+      string = toString(string);
+      return (string && reHasEscapedHtml.test(string))
+        ? string.replace(reEscapedHtml, unescapeHtmlChar)
+        : string;
+    }
+
+    /**
+     * Converts `string`, as space separated words, to upper case.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the upper cased string.
+     * @example
+     *
+     * _.upperCase('--foo-bar');
+     * // => 'FOO BAR'
+     *
+     * _.upperCase('fooBar');
+     * // => 'FOO BAR'
+     *
+     * _.upperCase('__foo_bar__');
+     * // => 'FOO BAR'
+     */
+    var upperCase = createCompounder(function(result, word, index) {
+      return result + (index ? ' ' : '') + word.toUpperCase();
+    });
+
+    /**
+     * Converts the first character of `string` to upper case.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category String
+     * @param {string} [string=''] The string to convert.
+     * @returns {string} Returns the converted string.
+     * @example
+     *
+     * _.upperFirst('fred');
+     * // => 'Fred'
+     *
+     * _.upperFirst('FRED');
+     * // => 'FRED'
+     */
+    var upperFirst = createCaseFirst('toUpperCase');
+
+    /**
+     * Splits `string` into an array of its words.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category String
+     * @param {string} [string=''] The string to inspect.
+     * @param {RegExp|string} [pattern] The pattern to match words.
+     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+     * @returns {Array} Returns the words of `string`.
+     * @example
+     *
+     * _.words('fred, barney, & pebbles');
+     * // => ['fred', 'barney', 'pebbles']
+     *
+     * _.words('fred, barney, & pebbles', /[^, ]+/g);
+     * // => ['fred', 'barney', '&', 'pebbles']
+     */
+    function words(string, pattern, guard) {
+      string = toString(string);
+      pattern = guard ? undefined : pattern;
+
+      if (pattern === undefined) {
+        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+      }
+      return string.match(pattern) || [];
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Attempts to invoke `func`, returning either the result or the caught error
+     * object. Any additional arguments are provided to `func` when it's invoked.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Util
+     * @param {Function} func The function to attempt.
+     * @param {...*} [args] The arguments to invoke `func` with.
+     * @returns {*} Returns the `func` result or error object.
+     * @example
+     *
+     * // Avoid throwing errors for invalid selectors.
+     * var elements = _.attempt(function(selector) {
+     *   return document.querySelectorAll(selector);
+     * }, '>_>');
+     *
+     * if (_.isError(elements)) {
+     *   elements = [];
+     * }
+     */
+    var attempt = baseRest(function(func, args) {
+      try {
+        return apply(func, undefined, args);
+      } catch (e) {
+        return isError(e) ? e : new Error(e);
+      }
+    });
+
+    /**
+     * Binds methods of an object to the object itself, overwriting the existing
+     * method.
+     *
+     * **Note:** This method doesn't set the "length" property of bound functions.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Util
+     * @param {Object} object The object to bind and assign the bound methods to.
+     * @param {...(string|string[])} methodNames The object method names to bind.
+     * @returns {Object} Returns `object`.
+     * @example
+     *
+     * var view = {
+     *   'label': 'docs',
+     *   'click': function() {
+     *     console.log('clicked ' + this.label);
+     *   }
+     * };
+     *
+     * _.bindAll(view, ['click']);
+     * jQuery(element).on('click', view.click);
+     * // => Logs 'clicked docs' when clicked.
+     */
+    var bindAll = flatRest(function(object, methodNames) {
+      arrayEach(methodNames, function(key) {
+        key = toKey(key);
+        baseAssignValue(object, key, bind(object[key], object));
+      });
+      return object;
+    });
+
+    /**
+     * Creates a function that iterates over `pairs` and invokes the corresponding
+     * function of the first predicate to return truthy. The predicate-function
+     * pairs are invoked with the `this` binding and arguments of the created
+     * function.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {Array} pairs The predicate-function pairs.
+     * @returns {Function} Returns the new composite function.
+     * @example
+     *
+     * var func = _.cond([
+     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
+     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+     *   [_.stubTrue,                      _.constant('no match')]
+     * ]);
+     *
+     * func({ 'a': 1, 'b': 2 });
+     * // => 'matches A'
+     *
+     * func({ 'a': 0, 'b': 1 });
+     * // => 'matches B'
+     *
+     * func({ 'a': '1', 'b': '2' });
+     * // => 'no match'
+     */
+    function cond(pairs) {
+      var length = pairs == null ? 0 : pairs.length,
+          toIteratee = getIteratee();
+
+      pairs = !length ? [] : arrayMap(pairs, function(pair) {
+        if (typeof pair[1] != 'function') {
+          throw new TypeError(FUNC_ERROR_TEXT);
+        }
+        return [toIteratee(pair[0]), pair[1]];
+      });
+
+      return baseRest(function(args) {
+        var index = -1;
+        while (++index < length) {
+          var pair = pairs[index];
+          if (apply(pair[0], this, args)) {
+            return apply(pair[1], this, args);
+          }
+        }
+      });
+    }
+
+    /**
+     * Creates a function that invokes the predicate properties of `source` with
+     * the corresponding property values of a given object, returning `true` if
+     * all predicates return truthy, else `false`.
+     *
+     * **Note:** The created function is equivalent to `_.conformsTo` with
+     * `source` partially applied.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {Object} source The object of property predicates to conform to.
+     * @returns {Function} Returns the new spec function.
+     * @example
+     *
+     * var objects = [
+     *   { 'a': 2, 'b': 1 },
+     *   { 'a': 1, 'b': 2 }
+     * ];
+     *
+     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+     * // => [{ 'a': 1, 'b': 2 }]
+     */
+    function conforms(source) {
+      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+    }
+
+    /**
+     * Creates a function that returns `value`.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.4.0
+     * @category Util
+     * @param {*} value The value to return from the new function.
+     * @returns {Function} Returns the new constant function.
+     * @example
+     *
+     * var objects = _.times(2, _.constant({ 'a': 1 }));
+     *
+     * console.log(objects);
+     * // => [{ 'a': 1 }, { 'a': 1 }]
+     *
+     * console.log(objects[0] === objects[1]);
+     * // => true
+     */
+    function constant(value) {
+      return function() {
+        return value;
+      };
+    }
+
+    /**
+     * Checks `value` to determine whether a default value should be returned in
+     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+     * or `undefined`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.14.0
+     * @category Util
+     * @param {*} value The value to check.
+     * @param {*} defaultValue The default value.
+     * @returns {*} Returns the resolved value.
+     * @example
+     *
+     * _.defaultTo(1, 10);
+     * // => 1
+     *
+     * _.defaultTo(undefined, 10);
+     * // => 10
+     */
+    function defaultTo(value, defaultValue) {
+      return (value == null || value !== value) ? defaultValue : value;
+    }
+
+    /**
+     * Creates a function that returns the result of invoking the given functions
+     * with the `this` binding of the created function, where each successive
+     * invocation is supplied the return value of the previous.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Util
+     * @param {...(Function|Function[])} [funcs] The functions to invoke.
+     * @returns {Function} Returns the new composite function.
+     * @see _.flowRight
+     * @example
+     *
+     * function square(n) {
+     *   return n * n;
+     * }
+     *
+     * var addSquare = _.flow([_.add, square]);
+     * addSquare(1, 2);
+     * // => 9
+     */
+    var flow = createFlow();
+
+    /**
+     * This method is like `_.flow` except that it creates a function that
+     * invokes the given functions from right to left.
+     *
+     * @static
+     * @since 3.0.0
+     * @memberOf _
+     * @category Util
+     * @param {...(Function|Function[])} [funcs] The functions to invoke.
+     * @returns {Function} Returns the new composite function.
+     * @see _.flow
+     * @example
+     *
+     * function square(n) {
+     *   return n * n;
+     * }
+     *
+     * var addSquare = _.flowRight([square, _.add]);
+     * addSquare(1, 2);
+     * // => 9
+     */
+    var flowRight = createFlow(true);
+
+    /**
+     * This method returns the first argument it receives.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Util
+     * @param {*} value Any value.
+     * @returns {*} Returns `value`.
+     * @example
+     *
+     * var object = { 'a': 1 };
+     *
+     * console.log(_.identity(object) === object);
+     * // => true
+     */
+    function identity(value) {
+      return value;
+    }
+
+    /**
+     * Creates a function that invokes `func` with the arguments of the created
+     * function. If `func` is a property name, the created function returns the
+     * property value for a given element. If `func` is an array or object, the
+     * created function returns `true` for elements that contain the equivalent
+     * source properties, otherwise it returns `false`.
+     *
+     * @static
+     * @since 4.0.0
+     * @memberOf _
+     * @category Util
+     * @param {*} [func=_.identity] The value to convert to a callback.
+     * @returns {Function} Returns the callback.
+     * @example
+     *
+     * var users = [
+     *   { 'user': 'barney', 'age': 36, 'active': true },
+     *   { 'user': 'fred',   'age': 40, 'active': false }
+     * ];
+     *
+     * // The `_.matches` iteratee shorthand.
+     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+     *
+     * // The `_.matchesProperty` iteratee shorthand.
+     * _.filter(users, _.iteratee(['user', 'fred']));
+     * // => [{ 'user': 'fred', 'age': 40 }]
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.map(users, _.iteratee('user'));
+     * // => ['barney', 'fred']
+     *
+     * // Create custom iteratee shorthands.
+     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
+     *     return func.test(string);
+     *   };
+     * });
+     *
+     * _.filter(['abc', 'def'], /ef/);
+     * // => ['def']
+     */
+    function iteratee(func) {
+      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+    }
+
+    /**
+     * Creates a function that performs a partial deep comparison between a given
+     * object and `source`, returning `true` if the given object has equivalent
+     * property values, else `false`.
+     *
+     * **Note:** The created function is equivalent to `_.isMatch` with `source`
+     * partially applied.
+     *
+     * Partial comparisons will match empty array and empty object `source`
+     * values against any array or object value, respectively. See `_.isEqual`
+     * for a list of supported value comparisons.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Util
+     * @param {Object} source The object of property values to match.
+     * @returns {Function} Returns the new spec function.
+     * @example
+     *
+     * var objects = [
+     *   { 'a': 1, 'b': 2, 'c': 3 },
+     *   { 'a': 4, 'b': 5, 'c': 6 }
+     * ];
+     *
+     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+     */
+    function matches(source) {
+      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+    }
+
+    /**
+     * Creates a function that performs a partial deep comparison between the
+     * value at `path` of a given object to `srcValue`, returning `true` if the
+     * object value is equivalent, else `false`.
+     *
+     * **Note:** Partial comparisons will match empty array and empty object
+     * `srcValue` values against any array or object value, respectively. See
+     * `_.isEqual` for a list of supported value comparisons.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.2.0
+     * @category Util
+     * @param {Array|string} path The path of the property to get.
+     * @param {*} srcValue The value to match.
+     * @returns {Function} Returns the new spec function.
+     * @example
+     *
+     * var objects = [
+     *   { 'a': 1, 'b': 2, 'c': 3 },
+     *   { 'a': 4, 'b': 5, 'c': 6 }
+     * ];
+     *
+     * _.find(objects, _.matchesProperty('a', 4));
+     * // => { 'a': 4, 'b': 5, 'c': 6 }
+     */
+    function matchesProperty(path, srcValue) {
+      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+    }
+
+    /**
+     * Creates a function that invokes the method at `path` of a given object.
+     * Any additional arguments are provided to the invoked method.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.7.0
+     * @category Util
+     * @param {Array|string} path The path of the method to invoke.
+     * @param {...*} [args] The arguments to invoke the method with.
+     * @returns {Function} Returns the new invoker function.
+     * @example
+     *
+     * var objects = [
+     *   { 'a': { 'b': _.constant(2) } },
+     *   { 'a': { 'b': _.constant(1) } }
+     * ];
+     *
+     * _.map(objects, _.method('a.b'));
+     * // => [2, 1]
+     *
+     * _.map(objects, _.method(['a', 'b']));
+     * // => [2, 1]
+     */
+    var method = baseRest(function(path, args) {
+      return function(object) {
+        return baseInvoke(object, path, args);
+      };
+    });
+
+    /**
+     * The opposite of `_.method`; this method creates a function that invokes
+     * the method at a given path of `object`. Any additional arguments are
+     * provided to the invoked method.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.7.0
+     * @category Util
+     * @param {Object} object The object to query.
+     * @param {...*} [args] The arguments to invoke the method with.
+     * @returns {Function} Returns the new invoker function.
+     * @example
+     *
+     * var array = _.times(3, _.constant),
+     *     object = { 'a': array, 'b': array, 'c': array };
+     *
+     * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+     * // => [2, 0]
+     *
+     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+     * // => [2, 0]
+     */
+    var methodOf = baseRest(function(object, args) {
+      return function(path) {
+        return baseInvoke(object, path, args);
+      };
+    });
+
+    /**
+     * Adds all own enumerable string keyed function properties of a source
+     * object to the destination object. If `object` is a function, then methods
+     * are added to its prototype as well.
+     *
+     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+     * avoid conflicts caused by modifying the original.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Util
+     * @param {Function|Object} [object=lodash] The destination object.
+     * @param {Object} source The object of functions to add.
+     * @param {Object} [options={}] The options object.
+     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+     * @returns {Function|Object} Returns `object`.
+     * @example
+     *
+     * function vowels(string) {
+     *   return _.filter(string, function(v) {
+     *     return /[aeiou]/i.test(v);
+     *   });
+     * }
+     *
+     * _.mixin({ 'vowels': vowels });
+     * _.vowels('fred');
+     * // => ['e']
+     *
+     * _('fred').vowels().value();
+     * // => ['e']
+     *
+     * _.mixin({ 'vowels': vowels }, { 'chain': false });
+     * _('fred').vowels();
+     * // => ['e']
+     */
+    function mixin(object, source, options) {
+      var props = keys(source),
+          methodNames = baseFunctions(source, props);
+
+      if (options == null &&
+          !(isObject(source) && (methodNames.length || !props.length))) {
+        options = source;
+        source = object;
+        object = this;
+        methodNames = baseFunctions(source, keys(source));
+      }
+      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+          isFunc = isFunction(object);
+
+      arrayEach(methodNames, function(methodName) {
+        var func = source[methodName];
+        object[methodName] = func;
+        if (isFunc) {
+          object.prototype[methodName] = function() {
+            var chainAll = this.__chain__;
+            if (chain || chainAll) {
+              var result = object(this.__wrapped__),
+                  actions = result.__actions__ = copyArray(this.__actions__);
+
+              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+              result.__chain__ = chainAll;
+              return result;
+            }
+            return func.apply(object, arrayPush([this.value()], arguments));
+          };
+        }
+      });
+
+      return object;
+    }
+
+    /**
+     * Reverts the `_` variable to its previous value and returns a reference to
+     * the `lodash` function.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Util
+     * @returns {Function} Returns the `lodash` function.
+     * @example
+     *
+     * var lodash = _.noConflict();
+     */
+    function noConflict() {
+      if (root._ === this) {
+        root._ = oldDash;
+      }
+      return this;
+    }
+
+    /**
+     * This method returns `undefined`.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.3.0
+     * @category Util
+     * @example
+     *
+     * _.times(2, _.noop);
+     * // => [undefined, undefined]
+     */
+    function noop() {
+      // No operation performed.
+    }
+
+    /**
+     * Creates a function that gets the argument at index `n`. If `n` is negative,
+     * the nth argument from the end is returned.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {number} [n=0] The index of the argument to return.
+     * @returns {Function} Returns the new pass-thru function.
+     * @example
+     *
+     * var func = _.nthArg(1);
+     * func('a', 'b', 'c', 'd');
+     * // => 'b'
+     *
+     * var func = _.nthArg(-2);
+     * func('a', 'b', 'c', 'd');
+     * // => 'c'
+     */
+    function nthArg(n) {
+      n = toInteger(n);
+      return baseRest(function(args) {
+        return baseNth(args, n);
+      });
+    }
+
+    /**
+     * Creates a function that invokes `iteratees` with the arguments it receives
+     * and returns their results.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {...(Function|Function[])} [iteratees=[_.identity]]
+     *  The iteratees to invoke.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * var func = _.over([Math.max, Math.min]);
+     *
+     * func(1, 2, 3, 4);
+     * // => [4, 1]
+     */
+    var over = createOver(arrayMap);
+
+    /**
+     * Creates a function that checks if **all** of the `predicates` return
+     * truthy when invoked with the arguments it receives.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {...(Function|Function[])} [predicates=[_.identity]]
+     *  The predicates to check.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * var func = _.overEvery([Boolean, isFinite]);
+     *
+     * func('1');
+     * // => true
+     *
+     * func(null);
+     * // => false
+     *
+     * func(NaN);
+     * // => false
+     */
+    var overEvery = createOver(arrayEvery);
+
+    /**
+     * Creates a function that checks if **any** of the `predicates` return
+     * truthy when invoked with the arguments it receives.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {...(Function|Function[])} [predicates=[_.identity]]
+     *  The predicates to check.
+     * @returns {Function} Returns the new function.
+     * @example
+     *
+     * var func = _.overSome([Boolean, isFinite]);
+     *
+     * func('1');
+     * // => true
+     *
+     * func(null);
+     * // => true
+     *
+     * func(NaN);
+     * // => false
+     */
+    var overSome = createOver(arraySome);
+
+    /**
+     * Creates a function that returns the value at `path` of a given object.
+     *
+     * @static
+     * @memberOf _
+     * @since 2.4.0
+     * @category Util
+     * @param {Array|string} path The path of the property to get.
+     * @returns {Function} Returns the new accessor function.
+     * @example
+     *
+     * var objects = [
+     *   { 'a': { 'b': 2 } },
+     *   { 'a': { 'b': 1 } }
+     * ];
+     *
+     * _.map(objects, _.property('a.b'));
+     * // => [2, 1]
+     *
+     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+     * // => [1, 2]
+     */
+    function property(path) {
+      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+    }
+
+    /**
+     * The opposite of `_.property`; this method creates a function that returns
+     * the value at a given path of `object`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.0.0
+     * @category Util
+     * @param {Object} object The object to query.
+     * @returns {Function} Returns the new accessor function.
+     * @example
+     *
+     * var array = [0, 1, 2],
+     *     object = { 'a': array, 'b': array, 'c': array };
+     *
+     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+     * // => [2, 0]
+     *
+     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+     * // => [2, 0]
+     */
+    function propertyOf(object) {
+      return function(path) {
+        return object == null ? undefined : baseGet(object, path);
+      };
+    }
+
+    /**
+     * Creates an array of numbers (positive and/or negative) progressing from
+     * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+     * `start` is specified without an `end` or `step`. If `end` is not specified,
+     * it's set to `start` with `start` then set to `0`.
+     *
+     * **Note:** JavaScript follows the IEEE-754 standard for resolving
+     * floating-point values which can produce unexpected results.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Util
+     * @param {number} [start=0] The start of the range.
+     * @param {number} end The end of the range.
+     * @param {number} [step=1] The value to increment or decrement by.
+     * @returns {Array} Returns the range of numbers.
+     * @see _.inRange, _.rangeRight
+     * @example
+     *
+     * _.range(4);
+     * // => [0, 1, 2, 3]
+     *
+     * _.range(-4);
+     * // => [0, -1, -2, -3]
+     *
+     * _.range(1, 5);
+     * // => [1, 2, 3, 4]
+     *
+     * _.range(0, 20, 5);
+     * // => [0, 5, 10, 15]
+     *
+     * _.range(0, -4, -1);
+     * // => [0, -1, -2, -3]
+     *
+     * _.range(1, 4, 0);
+     * // => [1, 1, 1]
+     *
+     * _.range(0);
+     * // => []
+     */
+    var range = createRange();
+
+    /**
+     * This method is like `_.range` except that it populates values in
+     * descending order.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {number} [start=0] The start of the range.
+     * @param {number} end The end of the range.
+     * @param {number} [step=1] The value to increment or decrement by.
+     * @returns {Array} Returns the range of numbers.
+     * @see _.inRange, _.range
+     * @example
+     *
+     * _.rangeRight(4);
+     * // => [3, 2, 1, 0]
+     *
+     * _.rangeRight(-4);
+     * // => [-3, -2, -1, 0]
+     *
+     * _.rangeRight(1, 5);
+     * // => [4, 3, 2, 1]
+     *
+     * _.rangeRight(0, 20, 5);
+     * // => [15, 10, 5, 0]
+     *
+     * _.rangeRight(0, -4, -1);
+     * // => [-3, -2, -1, 0]
+     *
+     * _.rangeRight(1, 4, 0);
+     * // => [1, 1, 1]
+     *
+     * _.rangeRight(0);
+     * // => []
+     */
+    var rangeRight = createRange(true);
+
+    /**
+     * This method returns a new empty array.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.13.0
+     * @category Util
+     * @returns {Array} Returns the new empty array.
+     * @example
+     *
+     * var arrays = _.times(2, _.stubArray);
+     *
+     * console.log(arrays);
+     * // => [[], []]
+     *
+     * console.log(arrays[0] === arrays[1]);
+     * // => false
+     */
+    function stubArray() {
+      return [];
+    }
+
+    /**
+     * This method returns `false`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.13.0
+     * @category Util
+     * @returns {boolean} Returns `false`.
+     * @example
+     *
+     * _.times(2, _.stubFalse);
+     * // => [false, false]
+     */
+    function stubFalse() {
+      return false;
+    }
+
+    /**
+     * This method returns a new empty object.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.13.0
+     * @category Util
+     * @returns {Object} Returns the new empty object.
+     * @example
+     *
+     * var objects = _.times(2, _.stubObject);
+     *
+     * console.log(objects);
+     * // => [{}, {}]
+     *
+     * console.log(objects[0] === objects[1]);
+     * // => false
+     */
+    function stubObject() {
+      return {};
+    }
+
+    /**
+     * This method returns an empty string.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.13.0
+     * @category Util
+     * @returns {string} Returns the empty string.
+     * @example
+     *
+     * _.times(2, _.stubString);
+     * // => ['', '']
+     */
+    function stubString() {
+      return '';
+    }
+
+    /**
+     * This method returns `true`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.13.0
+     * @category Util
+     * @returns {boolean} Returns `true`.
+     * @example
+     *
+     * _.times(2, _.stubTrue);
+     * // => [true, true]
+     */
+    function stubTrue() {
+      return true;
+    }
+
+    /**
+     * Invokes the iteratee `n` times, returning an array of the results of
+     * each invocation. The iteratee is invoked with one argument; (index).
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Util
+     * @param {number} n The number of times to invoke `iteratee`.
+     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+     * @returns {Array} Returns the array of results.
+     * @example
+     *
+     * _.times(3, String);
+     * // => ['0', '1', '2']
+     *
+     *  _.times(4, _.constant(0));
+     * // => [0, 0, 0, 0]
+     */
+    function times(n, iteratee) {
+      n = toInteger(n);
+      if (n < 1 || n > MAX_SAFE_INTEGER) {
+        return [];
+      }
+      var index = MAX_ARRAY_LENGTH,
+          length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+      iteratee = getIteratee(iteratee);
+      n -= MAX_ARRAY_LENGTH;
+
+      var result = baseTimes(length, iteratee);
+      while (++index < n) {
+        iteratee(index);
+      }
+      return result;
+    }
+
+    /**
+     * Converts `value` to a property path array.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Util
+     * @param {*} value The value to convert.
+     * @returns {Array} Returns the new property path array.
+     * @example
+     *
+     * _.toPath('a.b.c');
+     * // => ['a', 'b', 'c']
+     *
+     * _.toPath('a[0].b.c');
+     * // => ['a', '0', 'b', 'c']
+     */
+    function toPath(value) {
+      if (isArray(value)) {
+        return arrayMap(value, toKey);
+      }
+      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+    }
+
+    /**
+     * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Util
+     * @param {string} [prefix=''] The value to prefix the ID with.
+     * @returns {string} Returns the unique ID.
+     * @example
+     *
+     * _.uniqueId('contact_');
+     * // => 'contact_104'
+     *
+     * _.uniqueId();
+     * // => '105'
+     */
+    function uniqueId(prefix) {
+      var id = ++idCounter;
+      return toString(prefix) + id;
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * Adds two numbers.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.4.0
+     * @category Math
+     * @param {number} augend The first number in an addition.
+     * @param {number} addend The second number in an addition.
+     * @returns {number} Returns the total.
+     * @example
+     *
+     * _.add(6, 4);
+     * // => 10
+     */
+    var add = createMathOperation(function(augend, addend) {
+      return augend + addend;
+    }, 0);
+
+    /**
+     * Computes `number` rounded up to `precision`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.10.0
+     * @category Math
+     * @param {number} number The number to round up.
+     * @param {number} [precision=0] The precision to round up to.
+     * @returns {number} Returns the rounded up number.
+     * @example
+     *
+     * _.ceil(4.006);
+     * // => 5
+     *
+     * _.ceil(6.004, 2);
+     * // => 6.01
+     *
+     * _.ceil(6040, -2);
+     * // => 6100
+     */
+    var ceil = createRound('ceil');
+
+    /**
+     * Divide two numbers.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.7.0
+     * @category Math
+     * @param {number} dividend The first number in a division.
+     * @param {number} divisor The second number in a division.
+     * @returns {number} Returns the quotient.
+     * @example
+     *
+     * _.divide(6, 4);
+     * // => 1.5
+     */
+    var divide = createMathOperation(function(dividend, divisor) {
+      return dividend / divisor;
+    }, 1);
+
+    /**
+     * Computes `number` rounded down to `precision`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.10.0
+     * @category Math
+     * @param {number} number The number to round down.
+     * @param {number} [precision=0] The precision to round down to.
+     * @returns {number} Returns the rounded down number.
+     * @example
+     *
+     * _.floor(4.006);
+     * // => 4
+     *
+     * _.floor(0.046, 2);
+     * // => 0.04
+     *
+     * _.floor(4060, -2);
+     * // => 4000
+     */
+    var floor = createRound('floor');
+
+    /**
+     * Computes the maximum value of `array`. If `array` is empty or falsey,
+     * `undefined` is returned.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @returns {*} Returns the maximum value.
+     * @example
+     *
+     * _.max([4, 2, 8, 6]);
+     * // => 8
+     *
+     * _.max([]);
+     * // => undefined
+     */
+    function max(array) {
+      return (array && array.length)
+        ? baseExtremum(array, identity, baseGt)
+        : undefined;
+    }
+
+    /**
+     * This method is like `_.max` except that it accepts `iteratee` which is
+     * invoked for each element in `array` to generate the criterion by which
+     * the value is ranked. The iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {*} Returns the maximum value.
+     * @example
+     *
+     * var objects = [{ 'n': 1 }, { 'n': 2 }];
+     *
+     * _.maxBy(objects, function(o) { return o.n; });
+     * // => { 'n': 2 }
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.maxBy(objects, 'n');
+     * // => { 'n': 2 }
+     */
+    function maxBy(array, iteratee) {
+      return (array && array.length)
+        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
+        : undefined;
+    }
+
+    /**
+     * Computes the mean of the values in `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @returns {number} Returns the mean.
+     * @example
+     *
+     * _.mean([4, 2, 8, 6]);
+     * // => 5
+     */
+    function mean(array) {
+      return baseMean(array, identity);
+    }
+
+    /**
+     * This method is like `_.mean` except that it accepts `iteratee` which is
+     * invoked for each element in `array` to generate the value to be averaged.
+     * The iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.7.0
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {number} Returns the mean.
+     * @example
+     *
+     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+     *
+     * _.meanBy(objects, function(o) { return o.n; });
+     * // => 5
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.meanBy(objects, 'n');
+     * // => 5
+     */
+    function meanBy(array, iteratee) {
+      return baseMean(array, getIteratee(iteratee, 2));
+    }
+
+    /**
+     * Computes the minimum value of `array`. If `array` is empty or falsey,
+     * `undefined` is returned.
+     *
+     * @static
+     * @since 0.1.0
+     * @memberOf _
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @returns {*} Returns the minimum value.
+     * @example
+     *
+     * _.min([4, 2, 8, 6]);
+     * // => 2
+     *
+     * _.min([]);
+     * // => undefined
+     */
+    function min(array) {
+      return (array && array.length)
+        ? baseExtremum(array, identity, baseLt)
+        : undefined;
+    }
+
+    /**
+     * This method is like `_.min` except that it accepts `iteratee` which is
+     * invoked for each element in `array` to generate the criterion by which
+     * the value is ranked. The iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {*} Returns the minimum value.
+     * @example
+     *
+     * var objects = [{ 'n': 1 }, { 'n': 2 }];
+     *
+     * _.minBy(objects, function(o) { return o.n; });
+     * // => { 'n': 1 }
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.minBy(objects, 'n');
+     * // => { 'n': 1 }
+     */
+    function minBy(array, iteratee) {
+      return (array && array.length)
+        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
+        : undefined;
+    }
+
+    /**
+     * Multiply two numbers.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.7.0
+     * @category Math
+     * @param {number} multiplier The first number in a multiplication.
+     * @param {number} multiplicand The second number in a multiplication.
+     * @returns {number} Returns the product.
+     * @example
+     *
+     * _.multiply(6, 4);
+     * // => 24
+     */
+    var multiply = createMathOperation(function(multiplier, multiplicand) {
+      return multiplier * multiplicand;
+    }, 1);
+
+    /**
+     * Computes `number` rounded to `precision`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.10.0
+     * @category Math
+     * @param {number} number The number to round.
+     * @param {number} [precision=0] The precision to round to.
+     * @returns {number} Returns the rounded number.
+     * @example
+     *
+     * _.round(4.006);
+     * // => 4
+     *
+     * _.round(4.006, 2);
+     * // => 4.01
+     *
+     * _.round(4060, -2);
+     * // => 4100
+     */
+    var round = createRound('round');
+
+    /**
+     * Subtract two numbers.
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Math
+     * @param {number} minuend The first number in a subtraction.
+     * @param {number} subtrahend The second number in a subtraction.
+     * @returns {number} Returns the difference.
+     * @example
+     *
+     * _.subtract(6, 4);
+     * // => 2
+     */
+    var subtract = createMathOperation(function(minuend, subtrahend) {
+      return minuend - subtrahend;
+    }, 0);
+
+    /**
+     * Computes the sum of the values in `array`.
+     *
+     * @static
+     * @memberOf _
+     * @since 3.4.0
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @returns {number} Returns the sum.
+     * @example
+     *
+     * _.sum([4, 2, 8, 6]);
+     * // => 20
+     */
+    function sum(array) {
+      return (array && array.length)
+        ? baseSum(array, identity)
+        : 0;
+    }
+
+    /**
+     * This method is like `_.sum` except that it accepts `iteratee` which is
+     * invoked for each element in `array` to generate the value to be summed.
+     * The iteratee is invoked with one argument: (value).
+     *
+     * @static
+     * @memberOf _
+     * @since 4.0.0
+     * @category Math
+     * @param {Array} array The array to iterate over.
+     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+     * @returns {number} Returns the sum.
+     * @example
+     *
+     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+     *
+     * _.sumBy(objects, function(o) { return o.n; });
+     * // => 20
+     *
+     * // The `_.property` iteratee shorthand.
+     * _.sumBy(objects, 'n');
+     * // => 20
+     */
+    function sumBy(array, iteratee) {
+      return (array && array.length)
+        ? baseSum(array, getIteratee(iteratee, 2))
+        : 0;
+    }
+
+    /*------------------------------------------------------------------------*/
+
+    // Add methods that return wrapped values in chain sequences.
+    lodash.after = after;
+    lodash.ary = ary;
+    lodash.assign = assign;
+    lodash.assignIn = assignIn;
+    lodash.assignInWith = assignInWith;
+    lodash.assignWith = assignWith;
+    lodash.at = at;
+    lodash.before = before;
+    lodash.bind = bind;
+    lodash.bindAll = bindAll;
+    lodash.bindKey = bindKey;
+    lodash.castArray = castArray;
+    lodash.chain = chain;
+    lodash.chunk = chunk;
+    lodash.compact = compact;
+    lodash.concat = concat;
+    lodash.cond = cond;
+    lodash.conforms = conforms;
+    lodash.constant = constant;
+    lodash.countBy = countBy;
+    lodash.create = create;
+    lodash.curry = curry;
+    lodash.curryRight = curryRight;
+    lodash.debounce = debounce;
+    lodash.defaults = defaults;
+    lodash.defaultsDeep = defaultsDeep;
+    lodash.defer = defer;
+    lodash.delay = delay;
+    lodash.difference = difference;
+    lodash.differenceBy = differenceBy;
+    lodash.differenceWith = differenceWith;
+    lodash.drop = drop;
+    lodash.dropRight = dropRight;
+    lodash.dropRightWhile = dropRightWhile;
+    lodash.dropWhile = dropWhile;
+    lodash.fill = fill;
+    lodash.filter = filter;
+    lodash.flatMap = flatMap;
+    lodash.flatMapDeep = flatMapDeep;
+    lodash.flatMapDepth = flatMapDepth;
+    lodash.flatten = flatten;
+    lodash.flattenDeep = flattenDeep;
+    lodash.flattenDepth = flattenDepth;
+    lodash.flip = flip;
+    lodash.flow = flow;
+    lodash.flowRight = flowRight;
+    lodash.fromPairs = fromPairs;
+    lodash.functions = functions;
+    lodash.functionsIn = functionsIn;
+    lodash.groupBy = groupBy;
+    lodash.initial = initial;
+    lodash.intersection = intersection;
+    lodash.intersectionBy = intersectionBy;
+    lodash.intersectionWith = intersectionWith;
+    lodash.invert = invert;
+    lodash.invertBy = invertBy;
+    lodash.invokeMap = invokeMap;
+    lodash.iteratee = iteratee;
+    lodash.keyBy = keyBy;
+    lodash.keys = keys;
+    lodash.keysIn = keysIn;
+    lodash.map = map;
+    lodash.mapKeys = mapKeys;
+    lodash.mapValues = mapValues;
+    lodash.matches = matches;
+    lodash.matchesProperty = matchesProperty;
+    lodash.memoize = memoize;
+    lodash.merge = merge;
+    lodash.mergeWith = mergeWith;
+    lodash.method = method;
+    lodash.methodOf = methodOf;
+    lodash.mixin = mixin;
+    lodash.negate = negate;
+    lodash.nthArg = nthArg;
+    lodash.omit = omit;
+    lodash.omitBy = omitBy;
+    lodash.once = once;
+    lodash.orderBy = orderBy;
+    lodash.over = over;
+    lodash.overArgs = overArgs;
+    lodash.overEvery = overEvery;
+    lodash.overSome = overSome;
+    lodash.partial = partial;
+    lodash.partialRight = partialRight;
+    lodash.partition = partition;
+    lodash.pick = pick;
+    lodash.pickBy = pickBy;
+    lodash.property = property;
+    lodash.propertyOf = propertyOf;
+    lodash.pull = pull;
+    lodash.pullAll = pullAll;
+    lodash.pullAllBy = pullAllBy;
+    lodash.pullAllWith = pullAllWith;
+    lodash.pullAt = pullAt;
+    lodash.range = range;
+    lodash.rangeRight = rangeRight;
+    lodash.rearg = rearg;
+    lodash.reject = reject;
+    lodash.remove = remove;
+    lodash.rest = rest;
+    lodash.reverse = reverse;
+    lodash.sampleSize = sampleSize;
+    lodash.set = set;
+    lodash.setWith = setWith;
+    lodash.shuffle = shuffle;
+    lodash.slice = slice;
+    lodash.sortBy = sortBy;
+    lodash.sortedUniq = sortedUniq;
+    lodash.sortedUniqBy = sortedUniqBy;
+    lodash.split = split;
+    lodash.spread = spread;
+    lodash.tail = tail;
+    lodash.take = take;
+    lodash.takeRight = takeRight;
+    lodash.takeRightWhile = takeRightWhile;
+    lodash.takeWhile = takeWhile;
+    lodash.tap = tap;
+    lodash.throttle = throttle;
+    lodash.thru = thru;
+    lodash.toArray = toArray;
+    lodash.toPairs = toPairs;
+    lodash.toPairsIn = toPairsIn;
+    lodash.toPath = toPath;
+    lodash.toPlainObject = toPlainObject;
+    lodash.transform = transform;
+    lodash.unary = unary;
+    lodash.union = union;
+    lodash.unionBy = unionBy;
+    lodash.unionWith = unionWith;
+    lodash.uniq = uniq;
+    lodash.uniqBy = uniqBy;
+    lodash.uniqWith = uniqWith;
+    lodash.unset = unset;
+    lodash.unzip = unzip;
+    lodash.unzipWith = unzipWith;
+    lodash.update = update;
+    lodash.updateWith = updateWith;
+    lodash.values = values;
+    lodash.valuesIn = valuesIn;
+    lodash.without = without;
+    lodash.words = words;
+    lodash.wrap = wrap;
+    lodash.xor = xor;
+    lodash.xorBy = xorBy;
+    lodash.xorWith = xorWith;
+    lodash.zip = zip;
+    lodash.zipObject = zipObject;
+    lodash.zipObjectDeep = zipObjectDeep;
+    lodash.zipWith = zipWith;
+
+    // Add aliases.
+    lodash.entries = toPairs;
+    lodash.entriesIn = toPairsIn;
+    lodash.extend = assignIn;
+    lodash.extendWith = assignInWith;
+
+    // Add methods to `lodash.prototype`.
+    mixin(lodash, lodash);
+
+    /*------------------------------------------------------------------------*/
+
+    // Add methods that return unwrapped values in chain sequences.
+    lodash.add = add;
+    lodash.attempt = attempt;
+    lodash.camelCase = camelCase;
+    lodash.capitalize = capitalize;
+    lodash.ceil = ceil;
+    lodash.clamp = clamp;
+    lodash.clone = clone;
+    lodash.cloneDeep = cloneDeep;
+    lodash.cloneDeepWith = cloneDeepWith;
+    lodash.cloneWith = cloneWith;
+    lodash.conformsTo = conformsTo;
+    lodash.deburr = deburr;
+    lodash.defaultTo = defaultTo;
+    lodash.divide = divide;
+    lodash.endsWith = endsWith;
+    lodash.eq = eq;
+    lodash.escape = escape;
+    lodash.escapeRegExp = escapeRegExp;
+    lodash.every = every;
+    lodash.find = find;
+    lodash.findIndex = findIndex;
+    lodash.findKey = findKey;
+    lodash.findLast = findLast;
+    lodash.findLastIndex = findLastIndex;
+    lodash.findLastKey = findLastKey;
+    lodash.floor = floor;
+    lodash.forEach = forEach;
+    lodash.forEachRight = forEachRight;
+    lodash.forIn = forIn;
+    lodash.forInRight = forInRight;
+    lodash.forOwn = forOwn;
+    lodash.forOwnRight = forOwnRight;
+    lodash.get = get;
+    lodash.gt = gt;
+    lodash.gte = gte;
+    lodash.has = has;
+    lodash.hasIn = hasIn;
+    lodash.head = head;
+    lodash.identity = identity;
+    lodash.includes = includes;
+    lodash.indexOf = indexOf;
+    lodash.inRange = inRange;
+    lodash.invoke = invoke;
+    lodash.isArguments = isArguments;
+    lodash.isArray = isArray;
+    lodash.isArrayBuffer = isArrayBuffer;
+    lodash.isArrayLike = isArrayLike;
+    lodash.isArrayLikeObject = isArrayLikeObject;
+    lodash.isBoolean = isBoolean;
+    lodash.isBuffer = isBuffer;
+    lodash.isDate = isDate;
+    lodash.isElement = isElement;
+    lodash.isEmpty = isEmpty;
+    lodash.isEqual = isEqual;
+    lodash.isEqualWith = isEqualWith;
+    lodash.isError = isError;
+    lodash.isFinite = isFinite;
+    lodash.isFunction = isFunction;
+    lodash.isInteger = isInteger;
+    lodash.isLength = isLength;
+    lodash.isMap = isMap;
+    lodash.isMatch = isMatch;
+    lodash.isMatchWith = isMatchWith;
+    lodash.isNaN = isNaN;
+    lodash.isNative = isNative;
+    lodash.isNil = isNil;
+    lodash.isNull = isNull;
+    lodash.isNumber = isNumber;
+    lodash.isObject = isObject;
+    lodash.isObjectLike = isObjectLike;
+    lodash.isPlainObject = isPlainObject;
+    lodash.isRegExp = isRegExp;
+    lodash.isSafeInteger = isSafeInteger;
+    lodash.isSet = isSet;
+    lodash.isString = isString;
+    lodash.isSymbol = isSymbol;
+    lodash.isTypedArray = isTypedArray;
+    lodash.isUndefined = isUndefined;
+    lodash.isWeakMap = isWeakMap;
+    lodash.isWeakSet = isWeakSet;
+    lodash.join = join;
+    lodash.kebabCase = kebabCase;
+    lodash.last = last;
+    lodash.lastIndexOf = lastIndexOf;
+    lodash.lowerCase = lowerCase;
+    lodash.lowerFirst = lowerFirst;
+    lodash.lt = lt;
+    lodash.lte = lte;
+    lodash.max = max;
+    lodash.maxBy = maxBy;
+    lodash.mean = mean;
+    lodash.meanBy = meanBy;
+    lodash.min = min;
+    lodash.minBy = minBy;
+    lodash.stubArray = stubArray;
+    lodash.stubFalse = stubFalse;
+    lodash.stubObject = stubObject;
+    lodash.stubString = stubString;
+    lodash.stubTrue = stubTrue;
+    lodash.multiply = multiply;
+    lodash.nth = nth;
+    lodash.noConflict = noConflict;
+    lodash.noop = noop;
+    lodash.now = now;
+    lodash.pad = pad;
+    lodash.padEnd = padEnd;
+    lodash.padStart = padStart;
+    lodash.parseInt = parseInt;
+    lodash.random = random;
+    lodash.reduce = reduce;
+    lodash.reduceRight = reduceRight;
+    lodash.repeat = repeat;
+    lodash.replace = replace;
+    lodash.result = result;
+    lodash.round = round;
+    lodash.runInContext = runInContext;
+    lodash.sample = sample;
+    lodash.size = size;
+    lodash.snakeCase = snakeCase;
+    lodash.some = some;
+    lodash.sortedIndex = sortedIndex;
+    lodash.sortedIndexBy = sortedIndexBy;
+    lodash.sortedIndexOf = sortedIndexOf;
+    lodash.sortedLastIndex = sortedLastIndex;
+    lodash.sortedLastIndexBy = sortedLastIndexBy;
+    lodash.sortedLastIndexOf = sortedLastIndexOf;
+    lodash.startCase = startCase;
+    lodash.startsWith = startsWith;
+    lodash.subtract = subtract;
+    lodash.sum = sum;
+    lodash.sumBy = sumBy;
+    lodash.template = template;
+    lodash.times = times;
+    lodash.toFinite = toFinite;
+    lodash.toInteger = toInteger;
+    lodash.toLength = toLength;
+    lodash.toLower = toLower;
+    lodash.toNumber = toNumber;
+    lodash.toSafeInteger = toSafeInteger;
+    lodash.toString = toString;
+    lodash.toUpper = toUpper;
+    lodash.trim = trim;
+    lodash.trimEnd = trimEnd;
+    lodash.trimStart = trimStart;
+    lodash.truncate = truncate;
+    lodash.unescape = unescape;
+    lodash.uniqueId = uniqueId;
+    lodash.upperCase = upperCase;
+    lodash.upperFirst = upperFirst;
+
+    // Add aliases.
+    lodash.each = forEach;
+    lodash.eachRight = forEachRight;
+    lodash.first = head;
+
+    mixin(lodash, (function() {
+      var source = {};
+      baseForOwn(lodash, function(func, methodName) {
+        if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+          source[methodName] = func;
+        }
+      });
+      return source;
+    }()), { 'chain': false });
+
+    /*------------------------------------------------------------------------*/
+
+    /**
+     * The semantic version number.
+     *
+     * @static
+     * @memberOf _
+     * @type {string}
+     */
+    lodash.VERSION = VERSION;
+
+    // Assign default placeholders.
+    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+      lodash[methodName].placeholder = lodash;
+    });
+
+    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+    arrayEach(['drop', 'take'], function(methodName, index) {
+      LazyWrapper.prototype[methodName] = function(n) {
+        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+        var result = (this.__filtered__ && !index)
+          ? new LazyWrapper(this)
+          : this.clone();
+
+        if (result.__filtered__) {
+          result.__takeCount__ = nativeMin(n, result.__takeCount__);
+        } else {
+          result.__views__.push({
+            'size': nativeMin(n, MAX_ARRAY_LENGTH),
+            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+          });
+        }
+        return result;
+      };
+
+      LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+        return this.reverse()[methodName](n).reverse();
+      };
+    });
+
+    // Add `LazyWrapper` methods that accept an `iteratee` value.
+    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+      var type = index + 1,
+          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+      LazyWrapper.prototype[methodName] = function(iteratee) {
+        var result = this.clone();
+        result.__iteratees__.push({
+          'iteratee': getIteratee(iteratee, 3),
+          'type': type
+        });
+        result.__filtered__ = result.__filtered__ || isFilter;
+        return result;
+      };
+    });
+
+    // Add `LazyWrapper` methods for `_.head` and `_.last`.
+    arrayEach(['head', 'last'], function(methodName, index) {
+      var takeName = 'take' + (index ? 'Right' : '');
+
+      LazyWrapper.prototype[methodName] = function() {
+        return this[takeName](1).value()[0];
+      };
+    });
+
+    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+    arrayEach(['initial', 'tail'], function(methodName, index) {
+      var dropName = 'drop' + (index ? '' : 'Right');
+
+      LazyWrapper.prototype[methodName] = function() {
+        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+      };
+    });
+
+    LazyWrapper.prototype.compact = function() {
+      return this.filter(identity);
+    };
+
+    LazyWrapper.prototype.find = function(predicate) {
+      return this.filter(predicate).head();
+    };
+
+    LazyWrapper.prototype.findLast = function(predicate) {
+      return this.reverse().find(predicate);
+    };
+
+    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
+      if (typeof path == 'function') {
+        return new LazyWrapper(this);
+      }
+      return this.map(function(value) {
+        return baseInvoke(value, path, args);
+      });
+    });
+
+    LazyWrapper.prototype.reject = function(predicate) {
+      return this.filter(negate(getIteratee(predicate)));
+    };
+
+    LazyWrapper.prototype.slice = function(start, end) {
+      start = toInteger(start);
+
+      var result = this;
+      if (result.__filtered__ && (start > 0 || end < 0)) {
+        return new LazyWrapper(result);
+      }
+      if (start < 0) {
+        result = result.takeRight(-start);
+      } else if (start) {
+        result = result.drop(start);
+      }
+      if (end !== undefined) {
+        end = toInteger(end);
+        result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+      }
+      return result;
+    };
+
+    LazyWrapper.prototype.takeRightWhile = function(predicate) {
+      return this.reverse().takeWhile(predicate).reverse();
+    };
+
+    LazyWrapper.prototype.toArray = function() {
+      return this.take(MAX_ARRAY_LENGTH);
+    };
+
+    // Add `LazyWrapper` methods to `lodash.prototype`.
+    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+          isTaker = /^(?:head|last)$/.test(methodName),
+          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+          retUnwrapped = isTaker || /^find/.test(methodName);
+
+      if (!lodashFunc) {
+        return;
+      }
+      lodash.prototype[methodName] = function() {
+        var value = this.__wrapped__,
+            args = isTaker ? [1] : arguments,
+            isLazy = value instanceof LazyWrapper,
+            iteratee = args[0],
+            useLazy = isLazy || isArray(value);
+
+        var interceptor = function(value) {
+          var result = lodashFunc.apply(lodash, arrayPush([value], args));
+          return (isTaker && chainAll) ? result[0] : result;
+        };
+
+        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+          // Avoid lazy use if the iteratee has a "length" value other than `1`.
+          isLazy = useLazy = false;
+        }
+        var chainAll = this.__chain__,
+            isHybrid = !!this.__actions__.length,
+            isUnwrapped = retUnwrapped && !chainAll,
+            onlyLazy = isLazy && !isHybrid;
+
+        if (!retUnwrapped && useLazy) {
+          value = onlyLazy ? value : new LazyWrapper(this);
+          var result = func.apply(value, args);
+          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+          return new LodashWrapper(result, chainAll);
+        }
+        if (isUnwrapped && onlyLazy) {
+          return func.apply(this, args);
+        }
+        result = this.thru(interceptor);
+        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+      };
+    });
+
+    // Add `Array` methods to `lodash.prototype`.
+    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+      var func = arrayProto[methodName],
+          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+          retUnwrapped = /^(?:pop|shift)$/.test(methodName);
+
+      lodash.prototype[methodName] = function() {
+        var args = arguments;
+        if (retUnwrapped && !this.__chain__) {
+          var value = this.value();
+          return func.apply(isArray(value) ? value : [], args);
+        }
+        return this[chainName](function(value) {
+          return func.apply(isArray(value) ? value : [], args);
+        });
+      };
+    });
+
+    // Map minified method names to their real names.
+    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+      var lodashFunc = lodash[methodName];
+      if (lodashFunc) {
+        var key = lodashFunc.name + '';
+        if (!hasOwnProperty.call(realNames, key)) {
+          realNames[key] = [];
+        }
+        realNames[key].push({ 'name': methodName, 'func': lodashFunc });
+      }
+    });
+
+    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
+      'name': 'wrapper',
+      'func': undefined
+    }];
+
+    // Add methods to `LazyWrapper`.
+    LazyWrapper.prototype.clone = lazyClone;
+    LazyWrapper.prototype.reverse = lazyReverse;
+    LazyWrapper.prototype.value = lazyValue;
+
+    // Add chain sequence methods to the `lodash` wrapper.
+    lodash.prototype.at = wrapperAt;
+    lodash.prototype.chain = wrapperChain;
+    lodash.prototype.commit = wrapperCommit;
+    lodash.prototype.next = wrapperNext;
+    lodash.prototype.plant = wrapperPlant;
+    lodash.prototype.reverse = wrapperReverse;
+    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+    // Add lazy aliases.
+    lodash.prototype.first = lodash.prototype.head;
+
+    if (symIterator) {
+      lodash.prototype[symIterator] = wrapperToIterator;
+    }
+    return lodash;
+  });
+
+  /*--------------------------------------------------------------------------*/
+
+  // Export lodash.
+  var _ = runInContext();
+
+  // Some AMD build optimizers, like r.js, check for condition patterns like:
+  if (true) {
+    // Expose Lodash on the global object to prevent errors when Lodash is
+    // loaded by a script tag in the presence of an AMD loader.
+    // See http://requirejs.org/docs/errors.html#mismatch for more details.
+    // Use `_.noConflict` to remove Lodash from the global object.
+    root._ = _;
+
+    // Define as an anonymous module so, through path mapping, it can be
+    // referenced as the "underscore" module.
+    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
+      return _;
+    }).call(exports, __webpack_require__, exports, module),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  }
+  // Check for `exports` after `define` in case a build optimizer adds it.
+  else {}
+}.call(this));
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14), __webpack_require__(27)(module)))
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var escapeHtmlChar = __webpack_require__(448),
+    toString = __webpack_require__(108);
+
+/** Used to match HTML entities and HTML characters. */
+var reUnescapedHtml = /[&<>"']/g,
+    reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+/**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+function escape(string) {
+  string = toString(string);
+  return (string && reHasUnescapedHtml.test(string))
+    ? string.replace(reUnescapedHtml, escapeHtmlChar)
+    : string;
+}
+
+module.exports = escape;
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (_) {
+  return _.noConflict();
+}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_RESULT__;/*!
+ * Sizzle CSS Selector Engine v2.3.4
+ * https://sizzlejs.com/
+ *
+ * Copyright JS Foundation and other contributors
+ * Released under the MIT license
+ * https://js.foundation/
+ *
+ * Date: 2019-04-08
+ */
+(function( window ) {
+
+var i,
+    support,
+    Expr,
+    getText,
+    isXML,
+    tokenize,
+    compile,
+    select,
+    outermostContext,
+    sortInput,
+    hasDuplicate,
+
+    // Local document vars
+    setDocument,
+    document,
+    docElem,
+    documentIsHTML,
+    rbuggyQSA,
+    rbuggyMatches,
+    matches,
+    contains,
+
+    // Instance-specific data
+    expando = "sizzle" + 1 * new Date(),
+    preferredDoc = window.document,
+    dirruns = 0,
+    done = 0,
+    classCache = createCache(),
+    tokenCache = createCache(),
+    compilerCache = createCache(),
+    nonnativeSelectorCache = createCache(),
+    sortOrder = function( a, b ) {
+        if ( a === b ) {
+            hasDuplicate = true;
+        }
+        return 0;
+    },
+
+    // Instance methods
+    hasOwn = ({}).hasOwnProperty,
+    arr = [],
+    pop = arr.pop,
+    push_native = arr.push,
+    push = arr.push,
+    slice = arr.slice,
+    // Use a stripped-down indexOf as it's faster than native
+    // https://jsperf.com/thor-indexof-vs-for/5
+    indexOf = function( list, elem ) {
+        var i = 0,
+            len = list.length;
+        for ( ; i < len; i++ ) {
+            if ( list[i] === elem ) {
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+    // Regular expressions
+
+    // http://www.w3.org/TR/css3-selectors/#whitespace
+    whitespace = "[\\x20\\t\\r\\n\\f]",
+
+    // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+    identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
+
+    // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+    attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+        // Operator (capture 2)
+        "*([*^$|!~]?=)" + whitespace +
+        // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+        "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+        "*\\]",
+
+    pseudos = ":(" + identifier + ")(?:\\((" +
+        // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+        // 1. quoted (capture 3; capture 4 or capture 5)
+        "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+        // 2. simple (capture 6)
+        "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+        // 3. anything else (capture 2)
+        ".*" +
+        ")\\)|)",
+
+    // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+    rwhitespace = new RegExp( whitespace + "+", "g" ),
+    rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+    rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+    rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+    rdescend = new RegExp( whitespace + "|>" ),
+
+    rpseudo = new RegExp( pseudos ),
+    ridentifier = new RegExp( "^" + identifier + "$" ),
+
+    matchExpr = {
+        "ID": new RegExp( "^#(" + identifier + ")" ),
+        "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
+        "TAG": new RegExp( "^(" + identifier + "|[*])" ),
+        "ATTR": new RegExp( "^" + attributes ),
+        "PSEUDO": new RegExp( "^" + pseudos ),
+        "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+            "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+            "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+        "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+        // For use in libraries implementing .is()
+        // We use this for POS matching in `select`
+        "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+            whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+    },
+
+    rhtml = /HTML$/i,
+    rinputs = /^(?:input|select|textarea|button)$/i,
+    rheader = /^h\d$/i,
+
+    rnative = /^[^{]+\{\s*\[native \w/,
+
+    // Easily-parseable/retrievable ID or TAG or CLASS selectors
+    rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+    rsibling = /[+~]/,
+
+    // CSS escapes
+    // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+    runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+    funescape = function( _, escaped, escapedWhitespace ) {
+        var high = "0x" + escaped - 0x10000;
+        // NaN means non-codepoint
+        // Support: Firefox<24
+        // Workaround erroneous numeric interpretation of +"0x"
+        return high !== high || escapedWhitespace ?
+            escaped :
+            high < 0 ?
+                // BMP codepoint
+                String.fromCharCode( high + 0x10000 ) :
+                // Supplemental Plane codepoint (surrogate pair)
+                String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+    },
+
+    // CSS string/identifier serialization
+    // https://drafts.csswg.org/cssom/#common-serializing-idioms
+    rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
+    fcssescape = function( ch, asCodePoint ) {
+        if ( asCodePoint ) {
+
+            // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
+            if ( ch === "\0" ) {
+                return "\uFFFD";
+            }
+
+            // Control characters and (dependent upon position) numbers get escaped as code points
+            return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+        }
+
+        // Other potentially-special ASCII characters get backslash-escaped
+        return "\\" + ch;
+    },
+
+    // Used for iframes
+    // See setDocument()
+    // Removing the function wrapper causes a "Permission Denied"
+    // error in IE
+    unloadHandler = function() {
+        setDocument();
+    },
+
+    inDisabledFieldset = addCombinator(
+        function( elem ) {
+            return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
+        },
+        { dir: "parentNode", next: "legend" }
+    );
+
+// Optimize for push.apply( _, NodeList )
+try {
+    push.apply(
+        (arr = slice.call( preferredDoc.childNodes )),
+        preferredDoc.childNodes
+    );
+    // Support: Android<4.0
+    // Detect silently failing push.apply
+    arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+    push = { apply: arr.length ?
+
+        // Leverage slice if possible
+        function( target, els ) {
+            push_native.apply( target, slice.call(els) );
+        } :
+
+        // Support: IE<9
+        // Otherwise append directly
+        function( target, els ) {
+            var j = target.length,
+                i = 0;
+            // Can't trust NodeList.length
+            while ( (target[j++] = els[i++]) ) {}
+            target.length = j - 1;
+        }
+    };
+}
+
+function Sizzle( selector, context, results, seed ) {
+    var m, i, elem, nid, match, groups, newSelector,
+        newContext = context && context.ownerDocument,
+
+        // nodeType defaults to 9, since context defaults to document
+        nodeType = context ? context.nodeType : 9;
+
+    results = results || [];
+
+    // Return early from calls with invalid selector or context
+    if ( typeof selector !== "string" || !selector ||
+        nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+        return results;
+    }
+
+    // Try to shortcut find operations (as opposed to filters) in HTML documents
+    if ( !seed ) {
+
+        if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+            setDocument( context );
+        }
+        context = context || document;
+
+        if ( documentIsHTML ) {
+
+            // If the selector is sufficiently simple, try using a "get*By*" DOM method
+            // (excepting DocumentFragment context, where the methods don't exist)
+            if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+
+                // ID selector
+                if ( (m = match[1]) ) {
+
+                    // Document context
+                    if ( nodeType === 9 ) {
+                        if ( (elem = context.getElementById( m )) ) {
+
+                            // Support: IE, Opera, Webkit
+                            // TODO: identify versions
+                            // getElementById can match elements by name instead of ID
+                            if ( elem.id === m ) {
+                                results.push( elem );
+                                return results;
+                            }
+                        } else {
+                            return results;
+                        }
+
+                    // Element context
+                    } else {
+
+                        // Support: IE, Opera, Webkit
+                        // TODO: identify versions
+                        // getElementById can match elements by name instead of ID
+                        if ( newContext && (elem = newContext.getElementById( m )) &&
+                            contains( context, elem ) &&
+                            elem.id === m ) {
+
+                            results.push( elem );
+                            return results;
+                        }
+                    }
+
+                // Type selector
+                } else if ( match[2] ) {
+                    push.apply( results, context.getElementsByTagName( selector ) );
+                    return results;
+
+                // Class selector
+                } else if ( (m = match[3]) && support.getElementsByClassName &&
+                    context.getElementsByClassName ) {
+
+                    push.apply( results, context.getElementsByClassName( m ) );
+                    return results;
+                }
+            }
+
+            // Take advantage of querySelectorAll
+            if ( support.qsa &&
+                !nonnativeSelectorCache[ selector + " " ] &&
+                (!rbuggyQSA || !rbuggyQSA.test( selector )) &&
+
+                // Support: IE 8 only
+                // Exclude object elements
+                (nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) {
+
+                newSelector = selector;
+                newContext = context;
+
+                // qSA considers elements outside a scoping root when evaluating child or
+                // descendant combinators, which is not what we want.
+                // In such cases, we work around the behavior by prefixing every selector in the
+                // list with an ID selector referencing the scope context.
+                // Thanks to Andrew Dupont for this technique.
+                if ( nodeType === 1 && rdescend.test( selector ) ) {
+
+                    // Capture the context ID, setting it first if necessary
+                    if ( (nid = context.getAttribute( "id" )) ) {
+                        nid = nid.replace( rcssescape, fcssescape );
+                    } else {
+                        context.setAttribute( "id", (nid = expando) );
+                    }
+
+                    // Prefix every selector in the list
+                    groups = tokenize( selector );
+                    i = groups.length;
+                    while ( i-- ) {
+                        groups[i] = "#" + nid + " " + toSelector( groups[i] );
+                    }
+                    newSelector = groups.join( "," );
+
+                    // Expand context for sibling selectors
+                    newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
+                        context;
+                }
+
+                try {
+                    push.apply( results,
+                        newContext.querySelectorAll( newSelector )
+                    );
+                    return results;
+                } catch ( qsaError ) {
+                    nonnativeSelectorCache( selector, true );
+                } finally {
+                    if ( nid === expando ) {
+                        context.removeAttribute( "id" );
+                    }
+                }
+            }
+        }
+    }
+
+    // All others
+    return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {function(string, object)} Returns the Object data after storing it on itself with
+ *  property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *  deleting the oldest entry
+ */
+function createCache() {
+    var keys = [];
+
+    function cache( key, value ) {
+        // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+        if ( keys.push( key + " " ) > Expr.cacheLength ) {
+            // Only keep the most recent entries
+            delete cache[ keys.shift() ];
+        }
+        return (cache[ key + " " ] = value);
+    }
+    return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+    fn[ expando ] = true;
+    return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created element and returns a boolean result
+ */
+function assert( fn ) {
+    var el = document.createElement("fieldset");
+
+    try {
+        return !!fn( el );
+    } catch (e) {
+        return false;
+    } finally {
+        // Remove from its parent by default
+        if ( el.parentNode ) {
+            el.parentNode.removeChild( el );
+        }
+        // release memory in IE
+        el = null;
+    }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+    var arr = attrs.split("|"),
+        i = arr.length;
+
+    while ( i-- ) {
+        Expr.attrHandle[ arr[i] ] = handler;
+    }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+    var cur = b && a,
+        diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+            a.sourceIndex - b.sourceIndex;
+
+    // Use IE sourceIndex if available on both nodes
+    if ( diff ) {
+        return diff;
+    }
+
+    // Check if b follows a
+    if ( cur ) {
+        while ( (cur = cur.nextSibling) ) {
+            if ( cur === b ) {
+                return -1;
+            }
+        }
+    }
+
+    return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+    return function( elem ) {
+        var name = elem.nodeName.toLowerCase();
+        return name === "input" && elem.type === type;
+    };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+    return function( elem ) {
+        var name = elem.nodeName.toLowerCase();
+        return (name === "input" || name === "button") && elem.type === type;
+    };
+}
+
+/**
+ * Returns a function to use in pseudos for :enabled/:disabled
+ * @param {Boolean} disabled true for :disabled; false for :enabled
+ */
+function createDisabledPseudo( disabled ) {
+
+    // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
+    return function( elem ) {
+
+        // Only certain elements can match :enabled or :disabled
+        // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
+        // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
+        if ( "form" in elem ) {
+
+            // Check for inherited disabledness on relevant non-disabled elements:
+            // * listed form-associated elements in a disabled fieldset
+            //   https://html.spec.whatwg.org/multipage/forms.html#category-listed
+            //   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
+            // * option elements in a disabled optgroup
+            //   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
+            // All such elements have a "form" property.
+            if ( elem.parentNode && elem.disabled === false ) {
+
+                // Option elements defer to a parent optgroup if present
+                if ( "label" in elem ) {
+                    if ( "label" in elem.parentNode ) {
+                        return elem.parentNode.disabled === disabled;
+                    } else {
+                        return elem.disabled === disabled;
+                    }
+                }
+
+                // Support: IE 6 - 11
+                // Use the isDisabled shortcut property to check for disabled fieldset ancestors
+                return elem.isDisabled === disabled ||
+
+                    // Where there is no isDisabled, check manually
+                    /* jshint -W018 */
+                    elem.isDisabled !== !disabled &&
+                        inDisabledFieldset( elem ) === disabled;
+            }
+
+            return elem.disabled === disabled;
+
+        // Try to winnow out elements that can't be disabled before trusting the disabled property.
+        // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
+        // even exist on them, let alone have a boolean value.
+        } else if ( "label" in elem ) {
+            return elem.disabled === disabled;
+        }
+
+        // Remaining elements are neither :enabled nor :disabled
+        return false;
+    };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+    return markFunction(function( argument ) {
+        argument = +argument;
+        return markFunction(function( seed, matches ) {
+            var j,
+                matchIndexes = fn( [], seed.length, argument ),
+                i = matchIndexes.length;
+
+            // Match elements found at the specified indexes
+            while ( i-- ) {
+                if ( seed[ (j = matchIndexes[i]) ] ) {
+                    seed[j] = !(matches[j] = seed[j]);
+                }
+            }
+        });
+    });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+    return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+    var namespace = elem.namespaceURI,
+        docElem = (elem.ownerDocument || elem).documentElement;
+
+    // Support: IE <=8
+    // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
+    // https://bugs.jquery.com/ticket/4833
+    return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+    var hasCompare, subWindow,
+        doc = node ? node.ownerDocument || node : preferredDoc;
+
+    // Return early if doc is invalid or already selected
+    if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+        return document;
+    }
+
+    // Update global variables
+    document = doc;
+    docElem = document.documentElement;
+    documentIsHTML = !isXML( document );
+
+    // Support: IE 9-11, Edge
+    // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
+    if ( preferredDoc !== document &&
+        (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
+
+        // Support: IE 11, Edge
+        if ( subWindow.addEventListener ) {
+            subWindow.addEventListener( "unload", unloadHandler, false );
+
+        // Support: IE 9 - 10 only
+        } else if ( subWindow.attachEvent ) {
+            subWindow.attachEvent( "onunload", unloadHandler );
+        }
+    }
+
+    /* Attributes
+    ---------------------------------------------------------------------- */
+
+    // Support: IE<8
+    // Verify that getAttribute really returns attributes and not properties
+    // (excepting IE8 booleans)
+    support.attributes = assert(function( el ) {
+        el.className = "i";
+        return !el.getAttribute("className");
+    });
+
+    /* getElement(s)By*
+    ---------------------------------------------------------------------- */
+
+    // Check if getElementsByTagName("*") returns only elements
+    support.getElementsByTagName = assert(function( el ) {
+        el.appendChild( document.createComment("") );
+        return !el.getElementsByTagName("*").length;
+    });
+
+    // Support: IE<9
+    support.getElementsByClassName = rnative.test( document.getElementsByClassName );
+
+    // Support: IE<10
+    // Check if getElementById returns elements by name
+    // The broken getElementById methods don't pick up programmatically-set names,
+    // so use a roundabout getElementsByName test
+    support.getById = assert(function( el ) {
+        docElem.appendChild( el ).id = expando;
+        return !document.getElementsByName || !document.getElementsByName( expando ).length;
+    });
+
+    // ID filter and find
+    if ( support.getById ) {
+        Expr.filter["ID"] = function( id ) {
+            var attrId = id.replace( runescape, funescape );
+            return function( elem ) {
+                return elem.getAttribute("id") === attrId;
+            };
+        };
+        Expr.find["ID"] = function( id, context ) {
+            if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+                var elem = context.getElementById( id );
+                return elem ? [ elem ] : [];
+            }
+        };
+    } else {
+        Expr.filter["ID"] =  function( id ) {
+            var attrId = id.replace( runescape, funescape );
+            return function( elem ) {
+                var node = typeof elem.getAttributeNode !== "undefined" &&
+                    elem.getAttributeNode("id");
+                return node && node.value === attrId;
+            };
+        };
+
+        // Support: IE 6 - 7 only
+        // getElementById is not reliable as a find shortcut
+        Expr.find["ID"] = function( id, context ) {
+            if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+                var node, i, elems,
+                    elem = context.getElementById( id );
+
+                if ( elem ) {
+
+                    // Verify the id attribute
+                    node = elem.getAttributeNode("id");
+                    if ( node && node.value === id ) {
+                        return [ elem ];
+                    }
+
+                    // Fall back on getElementsByName
+                    elems = context.getElementsByName( id );
+                    i = 0;
+                    while ( (elem = elems[i++]) ) {
+                        node = elem.getAttributeNode("id");
+                        if ( node && node.value === id ) {
+                            return [ elem ];
+                        }
+                    }
+                }
+
+                return [];
+            }
+        };
+    }
+
+    // Tag
+    Expr.find["TAG"] = support.getElementsByTagName ?
+        function( tag, context ) {
+            if ( typeof context.getElementsByTagName !== "undefined" ) {
+                return context.getElementsByTagName( tag );
+
+            // DocumentFragment nodes don't have gEBTN
+            } else if ( support.qsa ) {
+                return context.querySelectorAll( tag );
+            }
+        } :
+
+        function( tag, context ) {
+            var elem,
+                tmp = [],
+                i = 0,
+                // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+                results = context.getElementsByTagName( tag );
+
+            // Filter out possible comments
+            if ( tag === "*" ) {
+                while ( (elem = results[i++]) ) {
+                    if ( elem.nodeType === 1 ) {
+                        tmp.push( elem );
+                    }
+                }
+
+                return tmp;
+            }
+            return results;
+        };
+
+    // Class
+    Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+        if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
+            return context.getElementsByClassName( className );
+        }
+    };
+
+    /* QSA/matchesSelector
+    ---------------------------------------------------------------------- */
+
+    // QSA and matchesSelector support
+
+    // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+    rbuggyMatches = [];
+
+    // qSa(:focus) reports false when true (Chrome 21)
+    // We allow this because of a bug in IE8/9 that throws an error
+    // whenever `document.activeElement` is accessed on an iframe
+    // So, we allow :focus to pass through QSA all the time to avoid the IE error
+    // See https://bugs.jquery.com/ticket/13378
+    rbuggyQSA = [];
+
+    if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
+        // Build QSA regex
+        // Regex strategy adopted from Diego Perini
+        assert(function( el ) {
+            // Select is set to empty string on purpose
+            // This is to test IE's treatment of not explicitly
+            // setting a boolean content attribute,
+            // since its presence should be enough
+            // https://bugs.jquery.com/ticket/12359
+            docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
+                "<select id='" + expando + "-\r\\' msallowcapture=''>" +
+                "<option selected=''></option></select>";
+
+            // Support: IE8, Opera 11-12.16
+            // Nothing should be selected when empty strings follow ^= or $= or *=
+            // The test attribute must be unknown in Opera but "safe" for WinRT
+            // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+            if ( el.querySelectorAll("[msallowcapture^='']").length ) {
+                rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+            }
+
+            // Support: IE8
+            // Boolean attributes and "value" are not treated correctly
+            if ( !el.querySelectorAll("[selected]").length ) {
+                rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+            }
+
+            // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
+            if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+                rbuggyQSA.push("~=");
+            }
+
+            // Webkit/Opera - :checked should return selected option elements
+            // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+            // IE8 throws error here and will not see later tests
+            if ( !el.querySelectorAll(":checked").length ) {
+                rbuggyQSA.push(":checked");
+            }
+
+            // Support: Safari 8+, iOS 8+
+            // https://bugs.webkit.org/show_bug.cgi?id=136851
+            // In-page `selector#id sibling-combinator selector` fails
+            if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
+                rbuggyQSA.push(".#.+[+~]");
+            }
+        });
+
+        assert(function( el ) {
+            el.innerHTML = "<a href='' disabled='disabled'></a>" +
+                "<select disabled='disabled'><option/></select>";
+
+            // Support: Windows 8 Native Apps
+            // The type and name attributes are restricted during .innerHTML assignment
+            var input = document.createElement("input");
+            input.setAttribute( "type", "hidden" );
+            el.appendChild( input ).setAttribute( "name", "D" );
+
+            // Support: IE8
+            // Enforce case-sensitivity of name attribute
+            if ( el.querySelectorAll("[name=d]").length ) {
+                rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+            }
+
+            // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+            // IE8 throws error here and will not see later tests
+            if ( el.querySelectorAll(":enabled").length !== 2 ) {
+                rbuggyQSA.push( ":enabled", ":disabled" );
+            }
+
+            // Support: IE9-11+
+            // IE's :disabled selector does not pick up the children of disabled fieldsets
+            docElem.appendChild( el ).disabled = true;
+            if ( el.querySelectorAll(":disabled").length !== 2 ) {
+                rbuggyQSA.push( ":enabled", ":disabled" );
+            }
+
+            // Opera 10-11 does not throw on post-comma invalid pseudos
+            el.querySelectorAll("*,:x");
+            rbuggyQSA.push(",.*:");
+        });
+    }
+
+    if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+        docElem.webkitMatchesSelector ||
+        docElem.mozMatchesSelector ||
+        docElem.oMatchesSelector ||
+        docElem.msMatchesSelector) )) ) {
+
+        assert(function( el ) {
+            // Check to see if it's possible to do matchesSelector
+            // on a disconnected node (IE 9)
+            support.disconnectedMatch = matches.call( el, "*" );
+
+            // This should fail with an exception
+            // Gecko does not error, returns false instead
+            matches.call( el, "[s!='']:x" );
+            rbuggyMatches.push( "!=", pseudos );
+        });
+    }
+
+    rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+    rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+    /* Contains
+    ---------------------------------------------------------------------- */
+    hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+    // Element contains another
+    // Purposefully self-exclusive
+    // As in, an element does not contain itself
+    contains = hasCompare || rnative.test( docElem.contains ) ?
+        function( a, b ) {
+            var adown = a.nodeType === 9 ? a.documentElement : a,
+                bup = b && b.parentNode;
+            return a === bup || !!( bup && bup.nodeType === 1 && (
+                adown.contains ?
+                    adown.contains( bup ) :
+                    a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+            ));
+        } :
+        function( a, b ) {
+            if ( b ) {
+                while ( (b = b.parentNode) ) {
+                    if ( b === a ) {
+                        return true;
+                    }
+                }
+            }
+            return false;
+        };
+
+    /* Sorting
+    ---------------------------------------------------------------------- */
+
+    // Document order sorting
+    sortOrder = hasCompare ?
+    function( a, b ) {
+
+        // Flag for duplicate removal
+        if ( a === b ) {
+            hasDuplicate = true;
+            return 0;
+        }
+
+        // Sort on method existence if only one input has compareDocumentPosition
+        var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+        if ( compare ) {
+            return compare;
+        }
+
+        // Calculate position if both inputs belong to the same document
+        compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+            a.compareDocumentPosition( b ) :
+
+            // Otherwise we know they are disconnected
+            1;
+
+        // Disconnected nodes
+        if ( compare & 1 ||
+            (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+            // Choose the first element that is related to our preferred document
+            if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+                return -1;
+            }
+            if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+                return 1;
+            }
+
+            // Maintain original order
+            return sortInput ?
+                ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+                0;
+        }
+
+        return compare & 4 ? -1 : 1;
+    } :
+    function( a, b ) {
+        // Exit early if the nodes are identical
+        if ( a === b ) {
+            hasDuplicate = true;
+            return 0;
+        }
+
+        var cur,
+            i = 0,
+            aup = a.parentNode,
+            bup = b.parentNode,
+            ap = [ a ],
+            bp = [ b ];
+
+        // Parentless nodes are either documents or disconnected
+        if ( !aup || !bup ) {
+            return a === document ? -1 :
+                b === document ? 1 :
+                aup ? -1 :
+                bup ? 1 :
+                sortInput ?
+                ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+                0;
+
+        // If the nodes are siblings, we can do a quick check
+        } else if ( aup === bup ) {
+            return siblingCheck( a, b );
+        }
+
+        // Otherwise we need full lists of their ancestors for comparison
+        cur = a;
+        while ( (cur = cur.parentNode) ) {
+            ap.unshift( cur );
+        }
+        cur = b;
+        while ( (cur = cur.parentNode) ) {
+            bp.unshift( cur );
+        }
+
+        // Walk down the tree looking for a discrepancy
+        while ( ap[i] === bp[i] ) {
+            i++;
+        }
+
+        return i ?
+            // Do a sibling check if the nodes have a common ancestor
+            siblingCheck( ap[i], bp[i] ) :
+
+            // Otherwise nodes in our document sort first
+            ap[i] === preferredDoc ? -1 :
+            bp[i] === preferredDoc ? 1 :
+            0;
+    };
+
+    return document;
+};
+
+Sizzle.matches = function( expr, elements ) {
+    return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+    // Set document vars if needed
+    if ( ( elem.ownerDocument || elem ) !== document ) {
+        setDocument( elem );
+    }
+
+    if ( support.matchesSelector && documentIsHTML &&
+        !nonnativeSelectorCache[ expr + " " ] &&
+        ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+        ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+        try {
+            var ret = matches.call( elem, expr );
+
+            // IE 9's matchesSelector returns false on disconnected nodes
+            if ( ret || support.disconnectedMatch ||
+                    // As well, disconnected nodes are said to be in a document
+                    // fragment in IE 9
+                    elem.document && elem.document.nodeType !== 11 ) {
+                return ret;
+            }
+        } catch (e) {
+            nonnativeSelectorCache( expr, true );
+        }
+    }
+
+    return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+    // Set document vars if needed
+    if ( ( context.ownerDocument || context ) !== document ) {
+        setDocument( context );
+    }
+    return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+    // Set document vars if needed
+    if ( ( elem.ownerDocument || elem ) !== document ) {
+        setDocument( elem );
+    }
+
+    var fn = Expr.attrHandle[ name.toLowerCase() ],
+        // Don't get fooled by Object.prototype properties (jQuery #13807)
+        val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+            fn( elem, name, !documentIsHTML ) :
+            undefined;
+
+    return val !== undefined ?
+        val :
+        support.attributes || !documentIsHTML ?
+            elem.getAttribute( name ) :
+            (val = elem.getAttributeNode(name)) && val.specified ?
+                val.value :
+                null;
+};
+
+Sizzle.escape = function( sel ) {
+    return (sel + "").replace( rcssescape, fcssescape );
+};
+
+Sizzle.error = function( msg ) {
+    throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+    var elem,
+        duplicates = [],
+        j = 0,
+        i = 0;
+
+    // Unless we *know* we can detect duplicates, assume their presence
+    hasDuplicate = !support.detectDuplicates;
+    sortInput = !support.sortStable && results.slice( 0 );
+    results.sort( sortOrder );
+
+    if ( hasDuplicate ) {
+        while ( (elem = results[i++]) ) {
+            if ( elem === results[ i ] ) {
+                j = duplicates.push( i );
+            }
+        }
+        while ( j-- ) {
+            results.splice( duplicates[ j ], 1 );
+        }
+    }
+
+    // Clear input after sorting to release objects
+    // See https://github.com/jquery/sizzle/pull/225
+    sortInput = null;
+
+    return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+    var node,
+        ret = "",
+        i = 0,
+        nodeType = elem.nodeType;
+
+    if ( !nodeType ) {
+        // If no nodeType, this is expected to be an array
+        while ( (node = elem[i++]) ) {
+            // Do not traverse comment nodes
+            ret += getText( node );
+        }
+    } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+        // Use textContent for elements
+        // innerText usage removed for consistency of new lines (jQuery #11153)
+        if ( typeof elem.textContent === "string" ) {
+            return elem.textContent;
+        } else {
+            // Traverse its children
+            for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+                ret += getText( elem );
+            }
+        }
+    } else if ( nodeType === 3 || nodeType === 4 ) {
+        return elem.nodeValue;
+    }
+    // Do not include comment or processing instruction nodes
+
+    return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+    // Can be adjusted by the user
+    cacheLength: 50,
+
+    createPseudo: markFunction,
+
+    match: matchExpr,
+
+    attrHandle: {},
+
+    find: {},
+
+    relative: {
+        ">": { dir: "parentNode", first: true },
+        " ": { dir: "parentNode" },
+        "+": { dir: "previousSibling", first: true },
+        "~": { dir: "previousSibling" }
+    },
+
+    preFilter: {
+        "ATTR": function( match ) {
+            match[1] = match[1].replace( runescape, funescape );
+
+            // Move the given value to match[3] whether quoted or unquoted
+            match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+            if ( match[2] === "~=" ) {
+                match[3] = " " + match[3] + " ";
+            }
+
+            return match.slice( 0, 4 );
+        },
+
+        "CHILD": function( match ) {
+            /* matches from matchExpr["CHILD"]
+                1 type (only|nth|...)
+                2 what (child|of-type)
+                3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+                4 xn-component of xn+y argument ([+-]?\d*n|)
+                5 sign of xn-component
+                6 x of xn-component
+                7 sign of y-component
+                8 y of y-component
+            */
+            match[1] = match[1].toLowerCase();
+
+            if ( match[1].slice( 0, 3 ) === "nth" ) {
+                // nth-* requires argument
+                if ( !match[3] ) {
+                    Sizzle.error( match[0] );
+                }
+
+                // numeric x and y parameters for Expr.filter.CHILD
+                // remember that false/true cast respectively to 0/1
+                match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+                match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+            // other types prohibit arguments
+            } else if ( match[3] ) {
+                Sizzle.error( match[0] );
+            }
+
+            return match;
+        },
+
+        "PSEUDO": function( match ) {
+            var excess,
+                unquoted = !match[6] && match[2];
+
+            if ( matchExpr["CHILD"].test( match[0] ) ) {
+                return null;
+            }
+
+            // Accept quoted arguments as-is
+            if ( match[3] ) {
+                match[2] = match[4] || match[5] || "";
+
+            // Strip excess characters from unquoted arguments
+            } else if ( unquoted && rpseudo.test( unquoted ) &&
+                // Get excess from tokenize (recursively)
+                (excess = tokenize( unquoted, true )) &&
+                // advance to the next closing parenthesis
+                (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+                // excess is a negative index
+                match[0] = match[0].slice( 0, excess );
+                match[2] = unquoted.slice( 0, excess );
+            }
+
+            // Return only captures needed by the pseudo filter method (type and argument)
+            return match.slice( 0, 3 );
+        }
+    },
+
+    filter: {
+
+        "TAG": function( nodeNameSelector ) {
+            var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+            return nodeNameSelector === "*" ?
+                function() { return true; } :
+                function( elem ) {
+                    return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+                };
+        },
+
+        "CLASS": function( className ) {
+            var pattern = classCache[ className + " " ];
+
+            return pattern ||
+                (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+                classCache( className, function( elem ) {
+                    return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+                });
+        },
+
+        "ATTR": function( name, operator, check ) {
+            return function( elem ) {
+                var result = Sizzle.attr( elem, name );
+
+                if ( result == null ) {
+                    return operator === "!=";
+                }
+                if ( !operator ) {
+                    return true;
+                }
+
+                result += "";
+
+                return operator === "=" ? result === check :
+                    operator === "!=" ? result !== check :
+                    operator === "^=" ? check && result.indexOf( check ) === 0 :
+                    operator === "*=" ? check && result.indexOf( check ) > -1 :
+                    operator === "$=" ? check && result.slice( -check.length ) === check :
+                    operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+                    operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+                    false;
+            };
+        },
+
+        "CHILD": function( type, what, argument, first, last ) {
+            var simple = type.slice( 0, 3 ) !== "nth",
+                forward = type.slice( -4 ) !== "last",
+                ofType = what === "of-type";
+
+            return first === 1 && last === 0 ?
+
+                // Shortcut for :nth-*(n)
+                function( elem ) {
+                    return !!elem.parentNode;
+                } :
+
+                function( elem, context, xml ) {
+                    var cache, uniqueCache, outerCache, node, nodeIndex, start,
+                        dir = simple !== forward ? "nextSibling" : "previousSibling",
+                        parent = elem.parentNode,
+                        name = ofType && elem.nodeName.toLowerCase(),
+                        useCache = !xml && !ofType,
+                        diff = false;
+
+                    if ( parent ) {
+
+                        // :(first|last|only)-(child|of-type)
+                        if ( simple ) {
+                            while ( dir ) {
+                                node = elem;
+                                while ( (node = node[ dir ]) ) {
+                                    if ( ofType ?
+                                        node.nodeName.toLowerCase() === name :
+                                        node.nodeType === 1 ) {
+
+                                        return false;
+                                    }
+                                }
+                                // Reverse direction for :only-* (if we haven't yet done so)
+                                start = dir = type === "only" && !start && "nextSibling";
+                            }
+                            return true;
+                        }
+
+                        start = [ forward ? parent.firstChild : parent.lastChild ];
+
+                        // non-xml :nth-child(...) stores cache data on `parent`
+                        if ( forward && useCache ) {
+
+                            // Seek `elem` from a previously-cached index
+
+                            // ...in a gzip-friendly way
+                            node = parent;
+                            outerCache = node[ expando ] || (node[ expando ] = {});
+
+                            // Support: IE <9 only
+                            // Defend against cloned attroperties (jQuery gh-1709)
+                            uniqueCache = outerCache[ node.uniqueID ] ||
+                                (outerCache[ node.uniqueID ] = {});
+
+                            cache = uniqueCache[ type ] || [];
+                            nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+                            diff = nodeIndex && cache[ 2 ];
+                            node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+                            while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+                                // Fallback to seeking `elem` from the start
+                                (diff = nodeIndex = 0) || start.pop()) ) {
+
+                                // When found, cache indexes on `parent` and break
+                                if ( node.nodeType === 1 && ++diff && node === elem ) {
+                                    uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
+                                    break;
+                                }
+                            }
+
+                        } else {
+                            // Use previously-cached element index if available
+                            if ( useCache ) {
+                                // ...in a gzip-friendly way
+                                node = elem;
+                                outerCache = node[ expando ] || (node[ expando ] = {});
+
+                                // Support: IE <9 only
+                                // Defend against cloned attroperties (jQuery gh-1709)
+                                uniqueCache = outerCache[ node.uniqueID ] ||
+                                    (outerCache[ node.uniqueID ] = {});
+
+                                cache = uniqueCache[ type ] || [];
+                                nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+                                diff = nodeIndex;
+                            }
+
+                            // xml :nth-child(...)
+                            // or :nth-last-child(...) or :nth(-last)?-of-type(...)
+                            if ( diff === false ) {
+                                // Use the same loop as above to seek `elem` from the start
+                                while ( (node = ++nodeIndex && node && node[ dir ] ||
+                                    (diff = nodeIndex = 0) || start.pop()) ) {
+
+                                    if ( ( ofType ?
+                                        node.nodeName.toLowerCase() === name :
+                                        node.nodeType === 1 ) &&
+                                        ++diff ) {
+
+                                        // Cache the index of each encountered element
+                                        if ( useCache ) {
+                                            outerCache = node[ expando ] || (node[ expando ] = {});
+
+                                            // Support: IE <9 only
+                                            // Defend against cloned attroperties (jQuery gh-1709)
+                                            uniqueCache = outerCache[ node.uniqueID ] ||
+                                                (outerCache[ node.uniqueID ] = {});
+
+                                            uniqueCache[ type ] = [ dirruns, diff ];
+                                        }
+
+                                        if ( node === elem ) {
+                                            break;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+
+                        // Incorporate the offset, then check against cycle size
+                        diff -= last;
+                        return diff === first || ( diff % first === 0 && diff / first >= 0 );
+                    }
+                };
+        },
+
+        "PSEUDO": function( pseudo, argument ) {
+            // pseudo-class names are case-insensitive
+            // http://www.w3.org/TR/selectors/#pseudo-classes
+            // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+            // Remember that setFilters inherits from pseudos
+            var args,
+                fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+                    Sizzle.error( "unsupported pseudo: " + pseudo );
+
+            // The user may use createPseudo to indicate that
+            // arguments are needed to create the filter function
+            // just as Sizzle does
+            if ( fn[ expando ] ) {
+                return fn( argument );
+            }
+
+            // But maintain support for old signatures
+            if ( fn.length > 1 ) {
+                args = [ pseudo, pseudo, "", argument ];
+                return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+                    markFunction(function( seed, matches ) {
+                        var idx,
+                            matched = fn( seed, argument ),
+                            i = matched.length;
+                        while ( i-- ) {
+                            idx = indexOf( seed, matched[i] );
+                            seed[ idx ] = !( matches[ idx ] = matched[i] );
+                        }
+                    }) :
+                    function( elem ) {
+                        return fn( elem, 0, args );
+                    };
+            }
+
+            return fn;
+        }
+    },
+
+    pseudos: {
+        // Potentially complex pseudos
+        "not": markFunction(function( selector ) {
+            // Trim the selector passed to compile
+            // to avoid treating leading and trailing
+            // spaces as combinators
+            var input = [],
+                results = [],
+                matcher = compile( selector.replace( rtrim, "$1" ) );
+
+            return matcher[ expando ] ?
+                markFunction(function( seed, matches, context, xml ) {
+                    var elem,
+                        unmatched = matcher( seed, null, xml, [] ),
+                        i = seed.length;
+
+                    // Match elements unmatched by `matcher`
+                    while ( i-- ) {
+                        if ( (elem = unmatched[i]) ) {
+                            seed[i] = !(matches[i] = elem);
+                        }
+                    }
+                }) :
+                function( elem, context, xml ) {
+                    input[0] = elem;
+                    matcher( input, null, xml, results );
+                    // Don't keep the element (issue #299)
+                    input[0] = null;
+                    return !results.pop();
+                };
+        }),
+
+        "has": markFunction(function( selector ) {
+            return function( elem ) {
+                return Sizzle( selector, elem ).length > 0;
+            };
+        }),
+
+        "contains": markFunction(function( text ) {
+            text = text.replace( runescape, funescape );
+            return function( elem ) {
+                return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
+            };
+        }),
+
+        // "Whether an element is represented by a :lang() selector
+        // is based solely on the element's language value
+        // being equal to the identifier C,
+        // or beginning with the identifier C immediately followed by "-".
+        // The matching of C against the element's language value is performed case-insensitively.
+        // The identifier C does not have to be a valid language name."
+        // http://www.w3.org/TR/selectors/#lang-pseudo
+        "lang": markFunction( function( lang ) {
+            // lang value must be a valid identifier
+            if ( !ridentifier.test(lang || "") ) {
+                Sizzle.error( "unsupported lang: " + lang );
+            }
+            lang = lang.replace( runescape, funescape ).toLowerCase();
+            return function( elem ) {
+                var elemLang;
+                do {
+                    if ( (elemLang = documentIsHTML ?
+                        elem.lang :
+                        elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+                        elemLang = elemLang.toLowerCase();
+                        return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+                    }
+                } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+                return false;
+            };
+        }),
+
+        // Miscellaneous
+        "target": function( elem ) {
+            var hash = window.location && window.location.hash;
+            return hash && hash.slice( 1 ) === elem.id;
+        },
+
+        "root": function( elem ) {
+            return elem === docElem;
+        },
+
+        "focus": function( elem ) {
+            return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+        },
+
+        // Boolean properties
+        "enabled": createDisabledPseudo( false ),
+        "disabled": createDisabledPseudo( true ),
+
+        "checked": function( elem ) {
+            // In CSS3, :checked should return both checked and selected elements
+            // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+            var nodeName = elem.nodeName.toLowerCase();
+            return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+        },
+
+        "selected": function( elem ) {
+            // Accessing this property makes selected-by-default
+            // options in Safari work properly
+            if ( elem.parentNode ) {
+                elem.parentNode.selectedIndex;
+            }
+
+            return elem.selected === true;
+        },
+
+        // Contents
+        "empty": function( elem ) {
+            // http://www.w3.org/TR/selectors/#empty-pseudo
+            // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+            //   but not by others (comment: 8; processing instruction: 7; etc.)
+            // nodeType < 6 works because attributes (2) do not appear as children
+            for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+                if ( elem.nodeType < 6 ) {
+                    return false;
+                }
+            }
+            return true;
+        },
+
+        "parent": function( elem ) {
+            return !Expr.pseudos["empty"]( elem );
+        },
+
+        // Element/input types
+        "header": function( elem ) {
+            return rheader.test( elem.nodeName );
+        },
+
+        "input": function( elem ) {
+            return rinputs.test( elem.nodeName );
+        },
+
+        "button": function( elem ) {
+            var name = elem.nodeName.toLowerCase();
+            return name === "input" && elem.type === "button" || name === "button";
+        },
+
+        "text": function( elem ) {
+            var attr;
+            return elem.nodeName.toLowerCase() === "input" &&
+                elem.type === "text" &&
+
+                // Support: IE<8
+                // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+                ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+        },
+
+        // Position-in-collection
+        "first": createPositionalPseudo(function() {
+            return [ 0 ];
+        }),
+
+        "last": createPositionalPseudo(function( matchIndexes, length ) {
+            return [ length - 1 ];
+        }),
+
+        "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+            return [ argument < 0 ? argument + length : argument ];
+        }),
+
+        "even": createPositionalPseudo(function( matchIndexes, length ) {
+            var i = 0;
+            for ( ; i < length; i += 2 ) {
+                matchIndexes.push( i );
+            }
+            return matchIndexes;
+        }),
+
+        "odd": createPositionalPseudo(function( matchIndexes, length ) {
+            var i = 1;
+            for ( ; i < length; i += 2 ) {
+                matchIndexes.push( i );
+            }
+            return matchIndexes;
+        }),
+
+        "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+            var i = argument < 0 ?
+                argument + length :
+                argument > length ?
+                    length :
+                    argument;
+            for ( ; --i >= 0; ) {
+                matchIndexes.push( i );
+            }
+            return matchIndexes;
+        }),
+
+        "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+            var i = argument < 0 ? argument + length : argument;
+            for ( ; ++i < length; ) {
+                matchIndexes.push( i );
+            }
+            return matchIndexes;
+        })
+    }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+    Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+    Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+    var matched, match, tokens, type,
+        soFar, groups, preFilters,
+        cached = tokenCache[ selector + " " ];
+
+    if ( cached ) {
+        return parseOnly ? 0 : cached.slice( 0 );
+    }
+
+    soFar = selector;
+    groups = [];
+    preFilters = Expr.preFilter;
+
+    while ( soFar ) {
+
+        // Comma and first run
+        if ( !matched || (match = rcomma.exec( soFar )) ) {
+            if ( match ) {
+                // Don't consume trailing commas as valid
+                soFar = soFar.slice( match[0].length ) || soFar;
+            }
+            groups.push( (tokens = []) );
+        }
+
+        matched = false;
+
+        // Combinators
+        if ( (match = rcombinators.exec( soFar )) ) {
+            matched = match.shift();
+            tokens.push({
+                value: matched,
+                // Cast descendant combinators to space
+                type: match[0].replace( rtrim, " " )
+            });
+            soFar = soFar.slice( matched.length );
+        }
+
+        // Filters
+        for ( type in Expr.filter ) {
+            if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+                (match = preFilters[ type ]( match ))) ) {
+                matched = match.shift();
+                tokens.push({
+                    value: matched,
+                    type: type,
+                    matches: match
+                });
+                soFar = soFar.slice( matched.length );
+            }
+        }
+
+        if ( !matched ) {
+            break;
+        }
+    }
+
+    // Return the length of the invalid excess
+    // if we're just parsing
+    // Otherwise, throw an error or return tokens
+    return parseOnly ?
+        soFar.length :
+        soFar ?
+            Sizzle.error( selector ) :
+            // Cache the tokens
+            tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+    var i = 0,
+        len = tokens.length,
+        selector = "";
+    for ( ; i < len; i++ ) {
+        selector += tokens[i].value;
+    }
+    return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+    var dir = combinator.dir,
+        skip = combinator.next,
+        key = skip || dir,
+        checkNonElements = base && key === "parentNode",
+        doneName = done++;
+
+    return combinator.first ?
+        // Check against closest ancestor/preceding element
+        function( elem, context, xml ) {
+            while ( (elem = elem[ dir ]) ) {
+                if ( elem.nodeType === 1 || checkNonElements ) {
+                    return matcher( elem, context, xml );
+                }
+            }
+            return false;
+        } :
+
+        // Check against all ancestor/preceding elements
+        function( elem, context, xml ) {
+            var oldCache, uniqueCache, outerCache,
+                newCache = [ dirruns, doneName ];
+
+            // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
+            if ( xml ) {
+                while ( (elem = elem[ dir ]) ) {
+                    if ( elem.nodeType === 1 || checkNonElements ) {
+                        if ( matcher( elem, context, xml ) ) {
+                            return true;
+                        }
+                    }
+                }
+            } else {
+                while ( (elem = elem[ dir ]) ) {
+                    if ( elem.nodeType === 1 || checkNonElements ) {
+                        outerCache = elem[ expando ] || (elem[ expando ] = {});
+
+                        // Support: IE <9 only
+                        // Defend against cloned attroperties (jQuery gh-1709)
+                        uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
+
+                        if ( skip && skip === elem.nodeName.toLowerCase() ) {
+                            elem = elem[ dir ] || elem;
+                        } else if ( (oldCache = uniqueCache[ key ]) &&
+                            oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+                            // Assign to newCache so results back-propagate to previous elements
+                            return (newCache[ 2 ] = oldCache[ 2 ]);
+                        } else {
+                            // Reuse newcache so results back-propagate to previous elements
+                            uniqueCache[ key ] = newCache;
+
+                            // A match means we're done; a fail means we have to keep checking
+                            if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+                                return true;
+                            }
+                        }
+                    }
+                }
+            }
+            return false;
+        };
+}
+
+function elementMatcher( matchers ) {
+    return matchers.length > 1 ?
+        function( elem, context, xml ) {
+            var i = matchers.length;
+            while ( i-- ) {
+                if ( !matchers[i]( elem, context, xml ) ) {
+                    return false;
+                }
+            }
+            return true;
+        } :
+        matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+    var i = 0,
+        len = contexts.length;
+    for ( ; i < len; i++ ) {
+        Sizzle( selector, contexts[i], results );
+    }
+    return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+    var elem,
+        newUnmatched = [],
+        i = 0,
+        len = unmatched.length,
+        mapped = map != null;
+
+    for ( ; i < len; i++ ) {
+        if ( (elem = unmatched[i]) ) {
+            if ( !filter || filter( elem, context, xml ) ) {
+                newUnmatched.push( elem );
+                if ( mapped ) {
+                    map.push( i );
+                }
+            }
+        }
+    }
+
+    return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+    if ( postFilter && !postFilter[ expando ] ) {
+        postFilter = setMatcher( postFilter );
+    }
+    if ( postFinder && !postFinder[ expando ] ) {
+        postFinder = setMatcher( postFinder, postSelector );
+    }
+    return markFunction(function( seed, results, context, xml ) {
+        var temp, i, elem,
+            preMap = [],
+            postMap = [],
+            preexisting = results.length,
+
+            // Get initial elements from seed or context
+            elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+            // Prefilter to get matcher input, preserving a map for seed-results synchronization
+            matcherIn = preFilter && ( seed || !selector ) ?
+                condense( elems, preMap, preFilter, context, xml ) :
+                elems,
+
+            matcherOut = matcher ?
+                // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+                postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+                    // ...intermediate processing is necessary
+                    [] :
+
+                    // ...otherwise use results directly
+                    results :
+                matcherIn;
+
+        // Find primary matches
+        if ( matcher ) {
+            matcher( matcherIn, matcherOut, context, xml );
+        }
+
+        // Apply postFilter
+        if ( postFilter ) {
+            temp = condense( matcherOut, postMap );
+            postFilter( temp, [], context, xml );
+
+            // Un-match failing elements by moving them back to matcherIn
+            i = temp.length;
+            while ( i-- ) {
+                if ( (elem = temp[i]) ) {
+                    matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+                }
+            }
+        }
+
+        if ( seed ) {
+            if ( postFinder || preFilter ) {
+                if ( postFinder ) {
+                    // Get the final matcherOut by condensing this intermediate into postFinder contexts
+                    temp = [];
+                    i = matcherOut.length;
+                    while ( i-- ) {
+                        if ( (elem = matcherOut[i]) ) {
+                            // Restore matcherIn since elem is not yet a final match
+                            temp.push( (matcherIn[i] = elem) );
+                        }
+                    }
+                    postFinder( null, (matcherOut = []), temp, xml );
+                }
+
+                // Move matched elements from seed to results to keep them synchronized
+                i = matcherOut.length;
+                while ( i-- ) {
+                    if ( (elem = matcherOut[i]) &&
+                        (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+                        seed[temp] = !(results[temp] = elem);
+                    }
+                }
+            }
+
+        // Add elements to results, through postFinder if defined
+        } else {
+            matcherOut = condense(
+                matcherOut === results ?
+                    matcherOut.splice( preexisting, matcherOut.length ) :
+                    matcherOut
+            );
+            if ( postFinder ) {
+                postFinder( null, results, matcherOut, xml );
+            } else {
+                push.apply( results, matcherOut );
+            }
+        }
+    });
+}
+
+function matcherFromTokens( tokens ) {
+    var checkContext, matcher, j,
+        len = tokens.length,
+        leadingRelative = Expr.relative[ tokens[0].type ],
+        implicitRelative = leadingRelative || Expr.relative[" "],
+        i = leadingRelative ? 1 : 0,
+
+        // The foundational matcher ensures that elements are reachable from top-level context(s)
+        matchContext = addCombinator( function( elem ) {
+            return elem === checkContext;
+        }, implicitRelative, true ),
+        matchAnyContext = addCombinator( function( elem ) {
+            return indexOf( checkContext, elem ) > -1;
+        }, implicitRelative, true ),
+        matchers = [ function( elem, context, xml ) {
+            var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+                (checkContext = context).nodeType ?
+                    matchContext( elem, context, xml ) :
+                    matchAnyContext( elem, context, xml ) );
+            // Avoid hanging onto element (issue #299)
+            checkContext = null;
+            return ret;
+        } ];
+
+    for ( ; i < len; i++ ) {
+        if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+            matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+        } else {
+            matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+            // Return special upon seeing a positional matcher
+            if ( matcher[ expando ] ) {
+                // Find the next relative operator (if any) for proper handling
+                j = ++i;
+                for ( ; j < len; j++ ) {
+                    if ( Expr.relative[ tokens[j].type ] ) {
+                        break;
+                    }
+                }
+                return setMatcher(
+                    i > 1 && elementMatcher( matchers ),
+                    i > 1 && toSelector(
+                        // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+                        tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+                    ).replace( rtrim, "$1" ),
+                    matcher,
+                    i < j && matcherFromTokens( tokens.slice( i, j ) ),
+                    j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+                    j < len && toSelector( tokens )
+                );
+            }
+            matchers.push( matcher );
+        }
+    }
+
+    return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+    var bySet = setMatchers.length > 0,
+        byElement = elementMatchers.length > 0,
+        superMatcher = function( seed, context, xml, results, outermost ) {
+            var elem, j, matcher,
+                matchedCount = 0,
+                i = "0",
+                unmatched = seed && [],
+                setMatched = [],
+                contextBackup = outermostContext,
+                // We must always have either seed elements or outermost context
+                elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+                // Use integer dirruns iff this is the outermost matcher
+                dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+                len = elems.length;
+
+            if ( outermost ) {
+                outermostContext = context === document || context || outermost;
+            }
+
+            // Add elements passing elementMatchers directly to results
+            // Support: IE<9, Safari
+            // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+            for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+                if ( byElement && elem ) {
+                    j = 0;
+                    if ( !context && elem.ownerDocument !== document ) {
+                        setDocument( elem );
+                        xml = !documentIsHTML;
+                    }
+                    while ( (matcher = elementMatchers[j++]) ) {
+                        if ( matcher( elem, context || document, xml) ) {
+                            results.push( elem );
+                            break;
+                        }
+                    }
+                    if ( outermost ) {
+                        dirruns = dirrunsUnique;
+                    }
+                }
+
+                // Track unmatched elements for set filters
+                if ( bySet ) {
+                    // They will have gone through all possible matchers
+                    if ( (elem = !matcher && elem) ) {
+                        matchedCount--;
+                    }
+
+                    // Lengthen the array for every element, matched or not
+                    if ( seed ) {
+                        unmatched.push( elem );
+                    }
+                }
+            }
+
+            // `i` is now the count of elements visited above, and adding it to `matchedCount`
+            // makes the latter nonnegative.
+            matchedCount += i;
+
+            // Apply set filters to unmatched elements
+            // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
+            // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
+            // no element matchers and no seed.
+            // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
+            // case, which will result in a "00" `matchedCount` that differs from `i` but is also
+            // numerically zero.
+            if ( bySet && i !== matchedCount ) {
+                j = 0;
+                while ( (matcher = setMatchers[j++]) ) {
+                    matcher( unmatched, setMatched, context, xml );
+                }
+
+                if ( seed ) {
+                    // Reintegrate element matches to eliminate the need for sorting
+                    if ( matchedCount > 0 ) {
+                        while ( i-- ) {
+                            if ( !(unmatched[i] || setMatched[i]) ) {
+                                setMatched[i] = pop.call( results );
+                            }
+                        }
+                    }
+
+                    // Discard index placeholder values to get only actual matches
+                    setMatched = condense( setMatched );
+                }
+
+                // Add matches to results
+                push.apply( results, setMatched );
+
+                // Seedless set matches succeeding multiple successful matchers stipulate sorting
+                if ( outermost && !seed && setMatched.length > 0 &&
+                    ( matchedCount + setMatchers.length ) > 1 ) {
+
+                    Sizzle.uniqueSort( results );
+                }
+            }
+
+            // Override manipulation of globals by nested matchers
+            if ( outermost ) {
+                dirruns = dirrunsUnique;
+                outermostContext = contextBackup;
+            }
+
+            return unmatched;
+        };
+
+    return bySet ?
+        markFunction( superMatcher ) :
+        superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+    var i,
+        setMatchers = [],
+        elementMatchers = [],
+        cached = compilerCache[ selector + " " ];
+
+    if ( !cached ) {
+        // Generate a function of recursive functions that can be used to check each element
+        if ( !match ) {
+            match = tokenize( selector );
+        }
+        i = match.length;
+        while ( i-- ) {
+            cached = matcherFromTokens( match[i] );
+            if ( cached[ expando ] ) {
+                setMatchers.push( cached );
+            } else {
+                elementMatchers.push( cached );
+            }
+        }
+
+        // Cache the compiled function
+        cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+        // Save selector and tokenization
+        cached.selector = selector;
+    }
+    return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ *  selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ *  selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+    var i, tokens, token, type, find,
+        compiled = typeof selector === "function" && selector,
+        match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+    results = results || [];
+
+    // Try to minimize operations if there is only one selector in the list and no seed
+    // (the latter of which guarantees us context)
+    if ( match.length === 1 ) {
+
+        // Reduce context if the leading compound selector is an ID
+        tokens = match[0] = match[0].slice( 0 );
+        if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+                context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
+
+            context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+            if ( !context ) {
+                return results;
+
+            // Precompiled matchers will still verify ancestry, so step up a level
+            } else if ( compiled ) {
+                context = context.parentNode;
+            }
+
+            selector = selector.slice( tokens.shift().value.length );
+        }
+
+        // Fetch a seed set for right-to-left matching
+        i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+        while ( i-- ) {
+            token = tokens[i];
+
+            // Abort if we hit a combinator
+            if ( Expr.relative[ (type = token.type) ] ) {
+                break;
+            }
+            if ( (find = Expr.find[ type ]) ) {
+                // Search, expanding context for leading sibling combinators
+                if ( (seed = find(
+                    token.matches[0].replace( runescape, funescape ),
+                    rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+                )) ) {
+
+                    // If seed is empty or no tokens remain, we can return early
+                    tokens.splice( i, 1 );
+                    selector = seed.length && toSelector( tokens );
+                    if ( !selector ) {
+                        push.apply( results, seed );
+                        return results;
+                    }
+
+                    break;
+                }
+            }
+        }
+    }
+
+    // Compile and execute a filtering function if one is not provided
+    // Provide `match` to avoid retokenization if we modified the selector above
+    ( compiled || compile( selector, match ) )(
+        seed,
+        context,
+        !documentIsHTML,
+        results,
+        !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
+    );
+    return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( el ) {
+    // Should return 1, but returns 4 (following)
+    return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( el ) {
+    el.innerHTML = "<a href='#'></a>";
+    return el.firstChild.getAttribute("href") === "#" ;
+}) ) {
+    addHandle( "type|href|height|width", function( elem, name, isXML ) {
+        if ( !isXML ) {
+            return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+        }
+    });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( el ) {
+    el.innerHTML = "<input/>";
+    el.firstChild.setAttribute( "value", "" );
+    return el.firstChild.getAttribute( "value" ) === "";
+}) ) {
+    addHandle( "value", function( elem, name, isXML ) {
+        if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+            return elem.defaultValue;
+        }
+    });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( el ) {
+    return el.getAttribute("disabled") == null;
+}) ) {
+    addHandle( booleans, function( elem, name, isXML ) {
+        var val;
+        if ( !isXML ) {
+            return elem[ name ] === true ? name.toLowerCase() :
+                    (val = elem.getAttributeNode( name )) && val.specified ?
+                    val.value :
+                null;
+        }
+    });
+}
+
+// EXPOSE
+var _sizzle = window.Sizzle;
+
+Sizzle.noConflict = function() {
+    if ( window.Sizzle === Sizzle ) {
+        window.Sizzle = _sizzle;
+    }
+
+    return Sizzle;
+};
+
+if ( true ) {
+    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return Sizzle; }).call(exports, __webpack_require__, exports, module),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+// Sizzle requires that there be a global window in Common-JS like environments
+} else {}
+// EXPOSE
+
+})( window );
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/info.html -->\n<div class="message chat-info ' +
+__e(o.extra_classes) +
+'" data-isodate="' +
+__e(o.isodate) +
+'" ';
+ if (o.data_name) { ;
+__p += ' data-' +
+__e(o.data_name) +
+'="' +
+__e(o.data_value) +
+'"';
+ } ;
+__p += '>\n';
+ if (o.render_message) {
+    // XXX: Should only ever be rendered if the message text has been sanitized already
+;
+__p += '\n    ' +
+((__t = (o.message)) == null ? '' : __t) +
+'\n';
+ } else { ;
+__p += '\n    ' +
+__e(o.message) +
+'\n';
+ } ;
+__p += '\n';
+ if (o.retry) { ;
+__p += '\n    <a class="retry">Retry</a>\n';
+ } ;
+__p += '\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var freeGlobal = __webpack_require__(67);
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+module.exports = root;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+module.exports = isArray;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+!function(t,n){ true?module.exports=n():undefined}(this,function(){"use strict";var t="millisecond",n="second",e="minute",r="hour",i="day",s="week",u="month",o="quarter",a="year",h=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,f=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=function(t,n,e){var r=String(t);return!r||r.length>=n?t:""+Array(n+1-r.length).join(e)+t},d={s:c,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),r=Math.floor(e/60),i=e%60;return(n<=0?"+":"-")+c(r,2,"0")+":"+c(i,2,"0")},m:function(t,n){var e=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(e,u),i=n-r<0,s=t.clone().add(e+(i?-1:1),u);return Number(-(e+(n-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return{M:u,y:a,w:s,d:i,h:r,m:e,s:n,ms:t,Q:o}[h]||String(h||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},l="en",m={};m[l]=$;var y=function(t){return t instanceof v},M=function(t,n,e){var r;if(!t)return l;if("string"==typeof t)m[t]&&(r=t),n&&(m[t]=n,r=t);else{var i=t.name;m[i]=t,r=i}return e||(l=r),r},g=function(t,n,e){if(y(t))return t.clone();var r=n?"string"==typeof n?{format:n,pl:e}:n:{};return r.date=t,new v(r)},D=d;D.l=M,D.i=y,D.w=function(t,n){return g(t,{locale:n.$L,utc:n.$u})};var v=function(){function c(t){this.$L=this.$L||M(t.locale,null,!0),this.parse(t)}var d=c.prototype;return d.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(D.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var r=n.match(h);if(r)return e?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(n)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return D},d.isValid=function(){return!("Invalid Date"===this.$d.toString())},d.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},d.isAfter=function(t,n){return g(t)<this.startOf(n)},d.isBefore=function(t,n){return this.endOf(n)<g(t)},d.$g=function(t,n,e){return D.u(t)?this[n]:this.set(e,t)},d.year=function(t){return this.$g(t,"$y",a)},d.month=function(t){return this.$g(t,"$M",u)},d.day=function(t){return this.$g(t,"$W",i)},d.date=function(t){return this.$g(t,"$D","date")},d.hour=function(t){return this.$g(t,"$H",r)},d.minute=function(t){return this.$g(t,"$m",e)},d.second=function(t){return this.$g(t,"$s",n)},d.millisecond=function(n){return this.$g(n,"$ms",t)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(t,o){var h=this,f=!!D.u(o)||o,c=D.p(t),d=function(t,n){var e=D.w(h.$u?Date.UTC(h.$y,n,t):new Date(h.$y,n,t),h);return f?e:e.endOf(i)},$=function(t,n){return D.w(h.toDate()[t].apply(h.toDate(),(f?[0,0,0,0]:[23,59,59,999]).slice(n)),h)},l=this.$W,m=this.$M,y=this.$D,M="set"+(this.$u?"UTC":"");switch(c){case a:return f?d(1,0):d(31,11);case u:return f?d(1,m):d(0,m+1);case s:var g=this.$locale().weekStart||0,v=(l<g?l+7:l)-g;return d(f?y-v:y+(6-v),m);case i:case"date":return $(M+"Hours",0);case r:return $(M+"Minutes",1);case e:return $(M+"Seconds",2);case n:return $(M+"Milliseconds",3);default:return this.clone()}},d.endOf=function(t){return this.startOf(t,!1)},d.$set=function(s,o){var h,f=D.p(s),c="set"+(this.$u?"UTC":""),d=(h={},h[i]=c+"Date",h.date=c+"Date",h[u]=c+"Month",h[a]=c+"FullYear",h[r]=c+"Hours",h[e]=c+"Minutes",h[n]=c+"Seconds",h[t]=c+"Milliseconds",h)[f],$=f===i?this.$D+(o-this.$W):o;if(f===u||f===a){var l=this.clone().set("date",1);l.$d[d]($),l.init(),this.$d=l.set("date",Math.min(this.$D,l.daysInMonth())).toDate()}else d&&this.$d[d]($);return this.init(),this},d.set=function(t,n){return this.clone().$set(t,n)},d.get=function(t){return this[D.p(t)]()},d.add=function(t,o){var h,f=this;t=Number(t);var c=D.p(o),d=function(n){var e=g(f);return D.w(e.date(e.date()+Math.round(n*t)),f)};if(c===u)return this.set(u,this.$M+t);if(c===a)return this.set(a,this.$y+t);if(c===i)return d(1);if(c===s)return d(7);var $=(h={},h[e]=6e4,h[r]=36e5,h[n]=1e3,h)[c]||1,l=this.valueOf()+t*$;return D.w(l,this)},d.subtract=function(t,n){return this.add(-1*t,n)},d.format=function(t){var n=this;if(!this.isValid())return"Invalid Date";var e=t||"YYYY-MM-DDTHH:mm:ssZ",r=D.z(this),i=this.$locale(),s=this.$H,u=this.$m,o=this.$M,a=i.weekdays,h=i.months,c=function(t,r,i,s){return t&&(t[r]||t(n,e))||i[r].substr(0,s)},d=function(t){return D.s(s%12||12,t,"0")},$=i.meridiem||function(t,n,e){var r=t<12?"AM":"PM";return e?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:D.s(o+1,2,"0"),MMM:c(i.monthsShort,o,h,3),MMMM:h[o]||h(this,e),D:this.$D,DD:D.s(this.$D,2,"0"),d:String(this.$W),dd:c(i.weekdaysMin,this.$W,a,2),ddd:c(i.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(s),HH:D.s(s,2,"0"),h:d(1),hh:d(2),a:$(s,u,!0),A:$(s,u,!1),m:String(u),mm:D.s(u,2,"0"),s:String(this.$s),ss:D.s(this.$s,2,"0"),SSS:D.s(this.$ms,3,"0"),Z:r};return e.replace(f,function(t,n){return n||l[t]||r.replace(":","")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(t,h,f){var c,d=D.p(h),$=g(t),l=6e4*($.utcOffset()-this.utcOffset()),m=this-$,y=D.m(this,$);return y=(c={},c[a]=y/12,c[u]=y,c[o]=y/3,c[s]=(m-l)/6048e5,c[i]=(m-l)/864e5,c[r]=m/36e5,c[e]=m/6e4,c[n]=m/1e3,c)[d]||m,f?y:D.a(y)},d.daysInMonth=function(){return this.endOf(u).$D},d.$locale=function(){return m[this.$L]},d.locale=function(t,n){if(!t)return this.$L;var e=this.clone();return e.$L=M(t,n,!0),e},d.clone=function(){return D.w(this.toDate(),this)},d.toDate=function(){return new Date(this.$d)},d.toJSON=function(){return this.toISOString()},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},c}();return g.prototype=v.prototype,g.extend=function(t,n){return t(n,v,g),g},g.locale=M,g.isDayjs=y,g.unix=function(t){return g(1e3*t)},g.en=m[l],g.Ls=m,g});
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '';
+__p += '<!-- src/templates/spinner.html -->\n<span class="spinner fa fa-spinner centered"/>\n';
+return __p
+};
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+  var type = typeof value;
+  return value != null && (type == 'object' || type == 'function');
+}
+
+module.exports = isObject;
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//     Backbone.js 1.4.0
+
+//     (c) 2010-2019 Jeremy Ashkenas and DocumentCloud
+//     Backbone may be freely distributed under the MIT license.
+//     For all details and documentation:
+//     http://backbonejs.org
+
+(function(factory) {
+
+  // Establish the root object, `window` (`self`) in the browser, or `global` on the server.
+  // We use `self` instead of `window` for `WebWorker` support.
+  var root = typeof self == 'object' && self.self === self && self ||
+            typeof global == 'object' && global.global === global && global;
+
+  // Set up Backbone appropriately for the environment. Start with AMD.
+  if (true) {
+    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(46), __webpack_require__(330), exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function(_, $, exports) {
+      // Export global even in AMD case in case this script is loaded with
+      // others that may still expect a global Backbone.
+      root.Backbone = factory(root, exports, _, $);
+    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+
+  // Next for Node.js or CommonJS. jQuery may not be needed as a module.
+  } else { var _, $; }
+
+})(function(root, Backbone, _, $) {
+
+  // Initial Setup
+  // -------------
+
+  // Save the previous value of the `Backbone` variable, so that it can be
+  // restored later on, if `noConflict` is used.
+  var previousBackbone = root.Backbone;
+
+  // Create a local reference to a common array method we'll want to use later.
+  var slice = Array.prototype.slice;
+
+  // Current version of the library. Keep in sync with `package.json`.
+  Backbone.VERSION = '1.4.0';
+
+  // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
+  // the `$` variable.
+  Backbone.$ = $;
+
+  // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
+  // to its previous owner. Returns a reference to this Backbone object.
+  Backbone.noConflict = function() {
+    root.Backbone = previousBackbone;
+    return this;
+  };
+
+  // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
+  // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
+  // set a `X-Http-Method-Override` header.
+  Backbone.emulateHTTP = false;
+
+  // Turn on `emulateJSON` to support legacy servers that can't deal with direct
+  // `application/json` requests ... this will encode the body as
+  // `application/x-www-form-urlencoded` instead and will send the model in a
+  // form param named `model`.
+  Backbone.emulateJSON = false;
+
+  // Backbone.Events
+  // ---------------
+
+  // A module that can be mixed in to *any object* in order to provide it with
+  // a custom event channel. You may bind a callback to an event with `on` or
+  // remove with `off`; `trigger`-ing an event fires all callbacks in
+  // succession.
+  //
+  //     var object = {};
+  //     _.extend(object, Backbone.Events);
+  //     object.on('expand', function(){ alert('expanded'); });
+  //     object.trigger('expand');
+  //
+  var Events = Backbone.Events = {};
+
+  // Regular expression used to split event strings.
+  var eventSplitter = /\s+/;
+
+  // A private global variable to share between listeners and listenees.
+  var _listening;
+
+  // Iterates over the standard `event, callback` (as well as the fancy multiple
+  // space-separated events `"change blur", callback` and jQuery-style event
+  // maps `{event: callback}`).
+  var eventsApi = function(iteratee, events, name, callback, opts) {
+    var i = 0, names;
+    if (name && typeof name === 'object') {
+      // Handle event maps.
+      if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;
+      for (names = _.keys(name); i < names.length ; i++) {
+        events = eventsApi(iteratee, events, names[i], name[names[i]], opts);
+      }
+    } else if (name && eventSplitter.test(name)) {
+      // Handle space-separated event names by delegating them individually.
+      for (names = name.split(eventSplitter); i < names.length; i++) {
+        events = iteratee(events, names[i], callback, opts);
+      }
+    } else {
+      // Finally, standard events.
+      events = iteratee(events, name, callback, opts);
+    }
+    return events;
+  };
+
+  // Bind an event to a `callback` function. Passing `"all"` will bind
+  // the callback to all events fired.
+  Events.on = function(name, callback, context) {
+    this._events = eventsApi(onApi, this._events || {}, name, callback, {
+      context: context,
+      ctx: this,
+      listening: _listening
+    });
+
+    if (_listening) {
+      var listeners = this._listeners || (this._listeners = {});
+      listeners[_listening.id] = _listening;
+      // Allow the listening to use a counter, instead of tracking
+      // callbacks for library interop
+      _listening.interop = false;
+    }
+
+    return this;
+  };
+
+  // Inversion-of-control versions of `on`. Tell *this* object to listen to
+  // an event in another object... keeping track of what it's listening to
+  // for easier unbinding later.
+  Events.listenTo = function(obj, name, callback) {
+    if (!obj) return this;
+    var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
+    var listeningTo = this._listeningTo || (this._listeningTo = {});
+    var listening = _listening = listeningTo[id];
+
+    // This object is not listening to any other events on `obj` yet.
+    // Setup the necessary references to track the listening callbacks.
+    if (!listening) {
+      this._listenId || (this._listenId = _.uniqueId('l'));
+      listening = _listening = listeningTo[id] = new Listening(this, obj);
+    }
+
+    // Bind callbacks on obj.
+    var error = tryCatchOn(obj, name, callback, this);
+    _listening = void 0;
+
+    if (error) throw error;
+    // If the target obj is not Backbone.Events, track events manually.
+    if (listening.interop) listening.on(name, callback);
+
+    return this;
+  };
+
+  // The reducing API that adds a callback to the `events` object.
+  var onApi = function(events, name, callback, options) {
+    if (callback) {
+      var handlers = events[name] || (events[name] = []);
+      var context = options.context, ctx = options.ctx, listening = options.listening;
+      if (listening) listening.count++;
+
+      handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});
+    }
+    return events;
+  };
+
+  // An try-catch guarded #on function, to prevent poisoning the global
+  // `_listening` variable.
+  var tryCatchOn = function(obj, name, callback, context) {
+    try {
+      obj.on(name, callback, context);
+    } catch (e) {
+      return e;
+    }
+  };
+
+  // Remove one or many callbacks. If `context` is null, removes all
+  // callbacks with that function. If `callback` is null, removes all
+  // callbacks for the event. If `name` is null, removes all bound
+  // callbacks for all events.
+  Events.off = function(name, callback, context) {
+    if (!this._events) return this;
+    this._events = eventsApi(offApi, this._events, name, callback, {
+      context: context,
+      listeners: this._listeners
+    });
+
+    return this;
+  };
+
+  // Tell this object to stop listening to either specific events ... or
+  // to every object it's currently listening to.
+  Events.stopListening = function(obj, name, callback) {
+    var listeningTo = this._listeningTo;
+    if (!listeningTo) return this;
+
+    var ids = obj ? [obj._listenId] : _.keys(listeningTo);
+    for (var i = 0; i < ids.length; i++) {
+      var listening = listeningTo[ids[i]];
+
+      // If listening doesn't exist, this object is not currently
+      // listening to obj. Break out early.
+      if (!listening) break;
+
+      listening.obj.off(name, callback, this);
+      if (listening.interop) listening.off(name, callback);
+    }
+    if (_.isEmpty(listeningTo)) this._listeningTo = void 0;
+
+    return this;
+  };
+
+  // The reducing API that removes a callback from the `events` object.
+  var offApi = function(events, name, callback, options) {
+    if (!events) return;
+
+    var context = options.context, listeners = options.listeners;
+    var i = 0, names;
+
+    // Delete all event listeners and "drop" events.
+    if (!name && !context && !callback) {
+      for (names = _.keys(listeners); i < names.length; i++) {
+        listeners[names[i]].cleanup();
+      }
+      return;
+    }
+
+    names = name ? [name] : _.keys(events);
+    for (; i < names.length; i++) {
+      name = names[i];
+      var handlers = events[name];
+
+      // Bail out if there are no events stored.
+      if (!handlers) break;
+
+      // Find any remaining events.
+      var remaining = [];
+      for (var j = 0; j < handlers.length; j++) {
+        var handler = handlers[j];
+        if (
+          callback && callback !== handler.callback &&
+            callback !== handler.callback._callback ||
+              context && context !== handler.context
+        ) {
+          remaining.push(handler);
+        } else {
+          var listening = handler.listening;
+          if (listening) listening.off(name, callback);
+        }
+      }
+
+      // Replace events if there are any remaining.  Otherwise, clean up.
+      if (remaining.length) {
+        events[name] = remaining;
+      } else {
+        delete events[name];
+      }
+    }
+
+    return events;
+  };
+
+  // Bind an event to only be triggered a single time. After the first time
+  // the callback is invoked, its listener will be removed. If multiple events
+  // are passed in using the space-separated syntax, the handler will fire
+  // once for each event, not once for a combination of all events.
+  Events.once = function(name, callback, context) {
+    // Map the event into a `{event: once}` object.
+    var events = eventsApi(onceMap, {}, name, callback, this.off.bind(this));
+    if (typeof name === 'string' && context == null) callback = void 0;
+    return this.on(events, callback, context);
+  };
+
+  // Inversion-of-control versions of `once`.
+  Events.listenToOnce = function(obj, name, callback) {
+    // Map the event into a `{event: once}` object.
+    var events = eventsApi(onceMap, {}, name, callback, this.stopListening.bind(this, obj));
+    return this.listenTo(obj, events);
+  };
+
+  // Reduces the event callbacks into a map of `{event: onceWrapper}`.
+  // `offer` unbinds the `onceWrapper` after it has been called.
+  var onceMap = function(map, name, callback, offer) {
+    if (callback) {
+      var once = map[name] = _.once(function() {
+        offer(name, once);
+        callback.apply(this, arguments);
+      });
+      once._callback = callback;
+    }
+    return map;
+  };
+
+  // Trigger one or many events, firing all bound callbacks. Callbacks are
+  // passed the same arguments as `trigger` is, apart from the event name
+  // (unless you're listening on `"all"`, which will cause your callback to
+  // receive the true name of the event as the first argument).
+  Events.trigger = function(name) {
+    if (!this._events) return this;
+
+    var length = Math.max(0, arguments.length - 1);
+    var args = Array(length);
+    for (var i = 0; i < length; i++) args[i] = arguments[i + 1];
+
+    eventsApi(triggerApi, this._events, name, void 0, args);
+    return this;
+  };
+
+  // Handles triggering the appropriate event callbacks.
+  var triggerApi = function(objEvents, name, callback, args) {
+    if (objEvents) {
+      var events = objEvents[name];
+      var allEvents = objEvents.all;
+      if (events && allEvents) allEvents = allEvents.slice();
+      if (events) triggerEvents(events, args);
+      if (allEvents) triggerEvents(allEvents, [name].concat(args));
+    }
+    return objEvents;
+  };
+
+  // A difficult-to-believe, but optimized internal dispatch function for
+  // triggering events. Tries to keep the usual cases speedy (most internal
+  // Backbone events have 3 arguments).
+  var triggerEvents = function(events, args) {
+    var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
+    switch (args.length) {
+      case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
+      case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
+      case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
+      case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
+      default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
+    }
+  };
+
+  // A listening class that tracks and cleans up memory bindings
+  // when all callbacks have been offed.
+  var Listening = function(listener, obj) {
+    this.id = listener._listenId;
+    this.listener = listener;
+    this.obj = obj;
+    this.interop = true;
+    this.count = 0;
+    this._events = void 0;
+  };
+
+  Listening.prototype.on = Events.on;
+
+  // Offs a callback (or several).
+  // Uses an optimized counter if the listenee uses Backbone.Events.
+  // Otherwise, falls back to manual tracking to support events
+  // library interop.
+  Listening.prototype.off = function(name, callback) {
+    var cleanup;
+    if (this.interop) {
+      this._events = eventsApi(offApi, this._events, name, callback, {
+        context: void 0,
+        listeners: void 0
+      });
+      cleanup = !this._events;
+    } else {
+      this.count--;
+      cleanup = this.count === 0;
+    }
+    if (cleanup) this.cleanup();
+  };
+
+  // Cleans up memory bindings between the listener and the listenee.
+  Listening.prototype.cleanup = function() {
+    delete this.listener._listeningTo[this.obj._listenId];
+    if (!this.interop) delete this.obj._listeners[this.id];
+  };
+
+  // Aliases for backwards compatibility.
+  Events.bind   = Events.on;
+  Events.unbind = Events.off;
+
+  // Allow the `Backbone` object to serve as a global event bus, for folks who
+  // want global "pubsub" in a convenient place.
+  _.extend(Backbone, Events);
+
+  // Backbone.Model
+  // --------------
+
+  // Backbone **Models** are the basic data object in the framework --
+  // frequently representing a row in a table in a database on your server.
+  // A discrete chunk of data and a bunch of useful, related methods for
+  // performing computations and transformations on that data.
+
+  // Create a new model with the specified attributes. A client id (`cid`)
+  // is automatically generated and assigned for you.
+  var Model = Backbone.Model = function(attributes, options) {
+    var attrs = attributes || {};
+    options || (options = {});
+    this.preinitialize.apply(this, arguments);
+    this.cid = _.uniqueId(this.cidPrefix);
+    this.attributes = {};
+    if (options.collection) this.collection = options.collection;
+    if (options.parse) attrs = this.parse(attrs, options) || {};
+    var defaults = _.result(this, 'defaults');
+    attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
+    this.set(attrs, options);
+    this.changed = {};
+    this.initialize.apply(this, arguments);
+  };
+
+  // Attach all inheritable methods to the Model prototype.
+  _.extend(Model.prototype, Events, {
+
+    // A hash of attributes whose current and previous value differ.
+    changed: null,
+
+    // The value returned during the last failed validation.
+    validationError: null,
+
+    // The default name for the JSON `id` attribute is `"id"`. MongoDB and
+    // CouchDB users may want to set this to `"_id"`.
+    idAttribute: 'id',
+
+    // The prefix is used to create the client id which is used to identify models locally.
+    // You may want to override this if you're experiencing name clashes with model ids.
+    cidPrefix: 'c',
+
+    // preinitialize is an empty function by default. You can override it with a function
+    // or object.  preinitialize will run before any instantiation logic is run in the Model.
+    preinitialize: function(){},
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // Return a copy of the model's `attributes` object.
+    toJSON: function(options) {
+      return _.clone(this.attributes);
+    },
+
+    // Proxy `Backbone.sync` by default -- but override this if you need
+    // custom syncing semantics for *this* particular model.
+    sync: function() {
+      return Backbone.sync.apply(this, arguments);
+    },
+
+    // Get the value of an attribute.
+    get: function(attr) {
+      return this.attributes[attr];
+    },
+
+    // Get the HTML-escaped value of an attribute.
+    escape: function(attr) {
+      return _.escape(this.get(attr));
+    },
+
+    // Returns `true` if the attribute contains a value that is not null
+    // or undefined.
+    has: function(attr) {
+      return this.get(attr) != null;
+    },
+
+    // Special-cased proxy to underscore's `_.matches` method.
+    matches: function(attrs) {
+      return !!_.iteratee(attrs, this)(this.attributes);
+    },
+
+    // Set a hash of model attributes on the object, firing `"change"`. This is
+    // the core primitive operation of a model, updating the data and notifying
+    // anyone who needs to know about the change in state. The heart of the beast.
+    set: function(key, val, options) {
+      if (key == null) return this;
+
+      // Handle both `"key", value` and `{key: value}` -style arguments.
+      var attrs;
+      if (typeof key === 'object') {
+        attrs = key;
+        options = val;
+      } else {
+        (attrs = {})[key] = val;
+      }
+
+      options || (options = {});
+
+      // Run validation.
+      if (!this._validate(attrs, options)) return false;
+
+      // Extract attributes and options.
+      var unset      = options.unset;
+      var silent     = options.silent;
+      var changes    = [];
+      var changing   = this._changing;
+      this._changing = true;
+
+      if (!changing) {
+        this._previousAttributes = _.clone(this.attributes);
+        this.changed = {};
+      }
+
+      var current = this.attributes;
+      var changed = this.changed;
+      var prev    = this._previousAttributes;
+
+      // For each `set` attribute, update or delete the current value.
+      for (var attr in attrs) {
+        val = attrs[attr];
+        if (!_.isEqual(current[attr], val)) changes.push(attr);
+        if (!_.isEqual(prev[attr], val)) {
+          changed[attr] = val;
+        } else {
+          delete changed[attr];
+        }
+        unset ? delete current[attr] : current[attr] = val;
+      }
+
+      // Update the `id`.
+      if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);
+
+      // Trigger all relevant attribute changes.
+      if (!silent) {
+        if (changes.length) this._pending = options;
+        for (var i = 0; i < changes.length; i++) {
+          this.trigger('change:' + changes[i], this, current[changes[i]], options);
+        }
+      }
+
+      // You might be wondering why there's a `while` loop here. Changes can
+      // be recursively nested within `"change"` events.
+      if (changing) return this;
+      if (!silent) {
+        while (this._pending) {
+          options = this._pending;
+          this._pending = false;
+          this.trigger('change', this, options);
+        }
+      }
+      this._pending = false;
+      this._changing = false;
+      return this;
+    },
+
+    // Remove an attribute from the model, firing `"change"`. `unset` is a noop
+    // if the attribute doesn't exist.
+    unset: function(attr, options) {
+      return this.set(attr, void 0, _.extend({}, options, {unset: true}));
+    },
+
+    // Clear all attributes on the model, firing `"change"`.
+    clear: function(options) {
+      var attrs = {};
+      for (var key in this.attributes) attrs[key] = void 0;
+      return this.set(attrs, _.extend({}, options, {unset: true}));
+    },
+
+    // Determine if the model has changed since the last `"change"` event.
+    // If you specify an attribute name, determine if that attribute has changed.
+    hasChanged: function(attr) {
+      if (attr == null) return !_.isEmpty(this.changed);
+      return _.has(this.changed, attr);
+    },
+
+    // Return an object containing all the attributes that have changed, or
+    // false if there are no changed attributes. Useful for determining what
+    // parts of a view need to be updated and/or what attributes need to be
+    // persisted to the server. Unset attributes will be set to undefined.
+    // You can also pass an attributes object to diff against the model,
+    // determining if there *would be* a change.
+    changedAttributes: function(diff) {
+      if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
+      var old = this._changing ? this._previousAttributes : this.attributes;
+      var changed = {};
+      var hasChanged;
+      for (var attr in diff) {
+        var val = diff[attr];
+        if (_.isEqual(old[attr], val)) continue;
+        changed[attr] = val;
+        hasChanged = true;
+      }
+      return hasChanged ? changed : false;
+    },
+
+    // Get the previous value of an attribute, recorded at the time the last
+    // `"change"` event was fired.
+    previous: function(attr) {
+      if (attr == null || !this._previousAttributes) return null;
+      return this._previousAttributes[attr];
+    },
+
+    // Get all of the attributes of the model at the time of the previous
+    // `"change"` event.
+    previousAttributes: function() {
+      return _.clone(this._previousAttributes);
+    },
+
+    // Fetch the model from the server, merging the response with the model's
+    // local attributes. Any changed attributes will trigger a "change" event.
+    fetch: function(options) {
+      options = _.extend({parse: true}, options);
+      var model = this;
+      var success = options.success;
+      options.success = function(resp) {
+        var serverAttrs = options.parse ? model.parse(resp, options) : resp;
+        if (!model.set(serverAttrs, options)) return false;
+        if (success) success.call(options.context, model, resp, options);
+        model.trigger('sync', model, resp, options);
+      };
+      wrapError(this, options);
+      return this.sync('read', this, options);
+    },
+
+    // Set a hash of model attributes, and sync the model to the server.
+    // If the server returns an attributes hash that differs, the model's
+    // state will be `set` again.
+    save: function(key, val, options) {
+      // Handle both `"key", value` and `{key: value}` -style arguments.
+      var attrs;
+      if (key == null || typeof key === 'object') {
+        attrs = key;
+        options = val;
+      } else {
+        (attrs = {})[key] = val;
+      }
+
+      options = _.extend({validate: true, parse: true}, options);
+      var wait = options.wait;
+
+      // If we're not waiting and attributes exist, save acts as
+      // `set(attr).save(null, opts)` with validation. Otherwise, check if
+      // the model will be valid when the attributes, if any, are set.
+      if (attrs && !wait) {
+        if (!this.set(attrs, options)) return false;
+      } else if (!this._validate(attrs, options)) {
+        return false;
+      }
+
+      // After a successful server-side save, the client is (optionally)
+      // updated with the server-side state.
+      var model = this;
+      var success = options.success;
+      var attributes = this.attributes;
+      options.success = function(resp) {
+        // Ensure attributes are restored during synchronous saves.
+        model.attributes = attributes;
+        var serverAttrs = options.parse ? model.parse(resp, options) : resp;
+        if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);
+        if (serverAttrs && !model.set(serverAttrs, options)) return false;
+        if (success) success.call(options.context, model, resp, options);
+        model.trigger('sync', model, resp, options);
+      };
+      wrapError(this, options);
+
+      // Set temporary attributes if `{wait: true}` to properly find new ids.
+      if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);
+
+      var method = this.isNew() ? 'create' : options.patch ? 'patch' : 'update';
+      if (method === 'patch' && !options.attrs) options.attrs = attrs;
+      var xhr = this.sync(method, this, options);
+
+      // Restore attributes.
+      this.attributes = attributes;
+
+      return xhr;
+    },
+
+    // Destroy this model on the server if it was already persisted.
+    // Optimistically removes the model from its collection, if it has one.
+    // If `wait: true` is passed, waits for the server to respond before removal.
+    destroy: function(options) {
+      options = options ? _.clone(options) : {};
+      var model = this;
+      var success = options.success;
+      var wait = options.wait;
+
+      var destroy = function() {
+        model.stopListening();
+        model.trigger('destroy', model, model.collection, options);
+      };
+
+      options.success = function(resp) {
+        if (wait) destroy();
+        if (success) success.call(options.context, model, resp, options);
+        if (!model.isNew()) model.trigger('sync', model, resp, options);
+      };
+
+      var xhr = false;
+      if (this.isNew()) {
+        _.defer(options.success);
+      } else {
+        wrapError(this, options);
+        xhr = this.sync('delete', this, options);
+      }
+      if (!wait) destroy();
+      return xhr;
+    },
+
+    // Default URL for the model's representation on the server -- if you're
+    // using Backbone's restful methods, override this to change the endpoint
+    // that will be called.
+    url: function() {
+      var base =
+        _.result(this, 'urlRoot') ||
+        _.result(this.collection, 'url') ||
+        urlError();
+      if (this.isNew()) return base;
+      var id = this.get(this.idAttribute);
+      return base.replace(/[^\/]$/, '$&/') + encodeURIComponent(id);
+    },
+
+    // **parse** converts a response into the hash of attributes to be `set` on
+    // the model. The default implementation is just to pass the response along.
+    parse: function(resp, options) {
+      return resp;
+    },
+
+    // Create a new model with identical attributes to this one.
+    clone: function() {
+      return new this.constructor(this.attributes);
+    },
+
+    // A model is new if it has never been saved to the server, and lacks an id.
+    isNew: function() {
+      return !this.has(this.idAttribute);
+    },
+
+    // Check if the model is currently in a valid state.
+    isValid: function(options) {
+      return this._validate({}, _.extend({}, options, {validate: true}));
+    },
+
+    // Run validation against the next complete set of model attributes,
+    // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
+    _validate: function(attrs, options) {
+      if (!options.validate || !this.validate) return true;
+      attrs = _.extend({}, this.attributes, attrs);
+      var error = this.validationError = this.validate(attrs, options) || null;
+      if (!error) return true;
+      this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
+      return false;
+    }
+
+  });
+
+  // Backbone.Collection
+  // -------------------
+
+  // If models tend to represent a single row of data, a Backbone Collection is
+  // more analogous to a table full of data ... or a small slice or page of that
+  // table, or a collection of rows that belong together for a particular reason
+  // -- all of the messages in this particular folder, all of the documents
+  // belonging to this particular author, and so on. Collections maintain
+  // indexes of their models, both in order, and for lookup by `id`.
+
+  // Create a new **Collection**, perhaps to contain a specific type of `model`.
+  // If a `comparator` is specified, the Collection will maintain
+  // its models in sort order, as they're added and removed.
+  var Collection = Backbone.Collection = function(models, options) {
+    options || (options = {});
+    this.preinitialize.apply(this, arguments);
+    if (options.model) this.model = options.model;
+    if (options.comparator !== void 0) this.comparator = options.comparator;
+    this._reset();
+    this.initialize.apply(this, arguments);
+    if (models) this.reset(models, _.extend({silent: true}, options));
+  };
+
+  // Default options for `Collection#set`.
+  var setOptions = {add: true, remove: true, merge: true};
+  var addOptions = {add: true, remove: false};
+
+  // Splices `insert` into `array` at index `at`.
+  var splice = function(array, insert, at) {
+    at = Math.min(Math.max(at, 0), array.length);
+    var tail = Array(array.length - at);
+    var length = insert.length;
+    var i;
+    for (i = 0; i < tail.length; i++) tail[i] = array[i + at];
+    for (i = 0; i < length; i++) array[i + at] = insert[i];
+    for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];
+  };
+
+  // Define the Collection's inheritable methods.
+  _.extend(Collection.prototype, Events, {
+
+    // The default model for a collection is just a **Backbone.Model**.
+    // This should be overridden in most cases.
+    model: Model,
+
+
+    // preinitialize is an empty function by default. You can override it with a function
+    // or object.  preinitialize will run before any instantiation logic is run in the Collection.
+    preinitialize: function(){},
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // The JSON representation of a Collection is an array of the
+    // models' attributes.
+    toJSON: function(options) {
+      return this.map(function(model) { return model.toJSON(options); });
+    },
+
+    // Proxy `Backbone.sync` by default.
+    sync: function() {
+      return Backbone.sync.apply(this, arguments);
+    },
+
+    // Add a model, or list of models to the set. `models` may be Backbone
+    // Models or raw JavaScript objects to be converted to Models, or any
+    // combination of the two.
+    add: function(models, options) {
+      return this.set(models, _.extend({merge: false}, options, addOptions));
+    },
+
+    // Remove a model, or a list of models from the set.
+    remove: function(models, options) {
+      options = _.extend({}, options);
+      var singular = !_.isArray(models);
+      models = singular ? [models] : models.slice();
+      var removed = this._removeModels(models, options);
+      if (!options.silent && removed.length) {
+        options.changes = {added: [], merged: [], removed: removed};
+        this.trigger('update', this, options);
+      }
+      return singular ? removed[0] : removed;
+    },
+
+    // Update a collection by `set`-ing a new list of models, adding new ones,
+    // removing models that are no longer present, and merging models that
+    // already exist in the collection, as necessary. Similar to **Model#set**,
+    // the core operation for updating the data contained by the collection.
+    set: function(models, options) {
+      if (models == null) return;
+
+      options = _.extend({}, setOptions, options);
+      if (options.parse && !this._isModel(models)) {
+        models = this.parse(models, options) || [];
+      }
+
+      var singular = !_.isArray(models);
+      models = singular ? [models] : models.slice();
+
+      var at = options.at;
+      if (at != null) at = +at;
+      if (at > this.length) at = this.length;
+      if (at < 0) at += this.length + 1;
+
+      var set = [];
+      var toAdd = [];
+      var toMerge = [];
+      var toRemove = [];
+      var modelMap = {};
+
+      var add = options.add;
+      var merge = options.merge;
+      var remove = options.remove;
+
+      var sort = false;
+      var sortable = this.comparator && at == null && options.sort !== false;
+      var sortAttr = _.isString(this.comparator) ? this.comparator : null;
+
+      // Turn bare objects into model references, and prevent invalid models
+      // from being added.
+      var model, i;
+      for (i = 0; i < models.length; i++) {
+        model = models[i];
+
+        // If a duplicate is found, prevent it from being added and
+        // optionally merge it into the existing model.
+        var existing = this.get(model);
+        if (existing) {
+          if (merge && model !== existing) {
+            var attrs = this._isModel(model) ? model.attributes : model;
+            if (options.parse) attrs = existing.parse(attrs, options);
+            existing.set(attrs, options);
+            toMerge.push(existing);
+            if (sortable && !sort) sort = existing.hasChanged(sortAttr);
+          }
+          if (!modelMap[existing.cid]) {
+            modelMap[existing.cid] = true;
+            set.push(existing);
+          }
+          models[i] = existing;
+
+        // If this is a new, valid model, push it to the `toAdd` list.
+        } else if (add) {
+          model = models[i] = this._prepareModel(model, options);
+          if (model) {
+            toAdd.push(model);
+            this._addReference(model, options);
+            modelMap[model.cid] = true;
+            set.push(model);
+          }
+        }
+      }
+
+      // Remove stale models.
+      if (remove) {
+        for (i = 0; i < this.length; i++) {
+          model = this.models[i];
+          if (!modelMap[model.cid]) toRemove.push(model);
+        }
+        if (toRemove.length) this._removeModels(toRemove, options);
+      }
+
+      // See if sorting is needed, update `length` and splice in new models.
+      var orderChanged = false;
+      var replace = !sortable && add && remove;
+      if (set.length && replace) {
+        orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {
+          return m !== set[index];
+        });
+        this.models.length = 0;
+        splice(this.models, set, 0);
+        this.length = this.models.length;
+      } else if (toAdd.length) {
+        if (sortable) sort = true;
+        splice(this.models, toAdd, at == null ? this.length : at);
+        this.length = this.models.length;
+      }
+
+      // Silently sort the collection if appropriate.
+      if (sort) this.sort({silent: true});
+
+      // Unless silenced, it's time to fire all appropriate add/sort/update events.
+      if (!options.silent) {
+        for (i = 0; i < toAdd.length; i++) {
+          if (at != null) options.index = at + i;
+          model = toAdd[i];
+          model.trigger('add', model, this, options);
+        }
+        if (sort || orderChanged) this.trigger('sort', this, options);
+        if (toAdd.length || toRemove.length || toMerge.length) {
+          options.changes = {
+            added: toAdd,
+            removed: toRemove,
+            merged: toMerge
+          };
+          this.trigger('update', this, options);
+        }
+      }
+
+      // Return the added (or merged) model (or models).
+      return singular ? models[0] : models;
+    },
+
+    // When you have more items than you want to add or remove individually,
+    // you can reset the entire set with a new list of models, without firing
+    // any granular `add` or `remove` events. Fires `reset` when finished.
+    // Useful for bulk operations and optimizations.
+    reset: function(models, options) {
+      options = options ? _.clone(options) : {};
+      for (var i = 0; i < this.models.length; i++) {
+        this._removeReference(this.models[i], options);
+      }
+      options.previousModels = this.models;
+      this._reset();
+      models = this.add(models, _.extend({silent: true}, options));
+      if (!options.silent) this.trigger('reset', this, options);
+      return models;
+    },
+
+    // Add a model to the end of the collection.
+    push: function(model, options) {
+      return this.add(model, _.extend({at: this.length}, options));
+    },
+
+    // Remove a model from the end of the collection.
+    pop: function(options) {
+      var model = this.at(this.length - 1);
+      return this.remove(model, options);
+    },
+
+    // Add a model to the beginning of the collection.
+    unshift: function(model, options) {
+      return this.add(model, _.extend({at: 0}, options));
+    },
+
+    // Remove a model from the beginning of the collection.
+    shift: function(options) {
+      var model = this.at(0);
+      return this.remove(model, options);
+    },
+
+    // Slice out a sub-array of models from the collection.
+    slice: function() {
+      return slice.apply(this.models, arguments);
+    },
+
+    // Get a model from the set by id, cid, model object with id or cid
+    // properties, or an attributes object that is transformed through modelId.
+    get: function(obj) {
+      if (obj == null) return void 0;
+      return this._byId[obj] ||
+        this._byId[this.modelId(this._isModel(obj) ? obj.attributes : obj)] ||
+        obj.cid && this._byId[obj.cid];
+    },
+
+    // Returns `true` if the model is in the collection.
+    has: function(obj) {
+      return this.get(obj) != null;
+    },
+
+    // Get the model at the given index.
+    at: function(index) {
+      if (index < 0) index += this.length;
+      return this.models[index];
+    },
+
+    // Return models with matching attributes. Useful for simple cases of
+    // `filter`.
+    where: function(attrs, first) {
+      return this[first ? 'find' : 'filter'](attrs);
+    },
+
+    // Return the first model with matching attributes. Useful for simple cases
+    // of `find`.
+    findWhere: function(attrs) {
+      return this.where(attrs, true);
+    },
+
+    // Force the collection to re-sort itself. You don't need to call this under
+    // normal circumstances, as the set will maintain sort order as each item
+    // is added.
+    sort: function(options) {
+      var comparator = this.comparator;
+      if (!comparator) throw new Error('Cannot sort a set without a comparator');
+      options || (options = {});
+
+      var length = comparator.length;
+      if (_.isFunction(comparator)) comparator = comparator.bind(this);
+
+      // Run sort based on type of `comparator`.
+      if (length === 1 || _.isString(comparator)) {
+        this.models = this.sortBy(comparator);
+      } else {
+        this.models.sort(comparator);
+      }
+      if (!options.silent) this.trigger('sort', this, options);
+      return this;
+    },
+
+    // Pluck an attribute from each model in the collection.
+    pluck: function(attr) {
+      return this.map(attr + '');
+    },
+
+    // Fetch the default set of models for this collection, resetting the
+    // collection when they arrive. If `reset: true` is passed, the response
+    // data will be passed through the `reset` method instead of `set`.
+    fetch: function(options) {
+      options = _.extend({parse: true}, options);
+      var success = options.success;
+      var collection = this;
+      options.success = function(resp) {
+        var method = options.reset ? 'reset' : 'set';
+        collection[method](resp, options);
+        if (success) success.call(options.context, collection, resp, options);
+        collection.trigger('sync', collection, resp, options);
+      };
+      wrapError(this, options);
+      return this.sync('read', this, options);
+    },
+
+    // Create a new instance of a model in this collection. Add the model to the
+    // collection immediately, unless `wait: true` is passed, in which case we
+    // wait for the server to agree.
+    create: function(model, options) {
+      options = options ? _.clone(options) : {};
+      var wait = options.wait;
+      model = this._prepareModel(model, options);
+      if (!model) return false;
+      if (!wait) this.add(model, options);
+      var collection = this;
+      var success = options.success;
+      options.success = function(m, resp, callbackOpts) {
+        if (wait) collection.add(m, callbackOpts);
+        if (success) success.call(callbackOpts.context, m, resp, callbackOpts);
+      };
+      model.save(null, options);
+      return model;
+    },
+
+    // **parse** converts a response into a list of models to be added to the
+    // collection. The default implementation is just to pass it through.
+    parse: function(resp, options) {
+      return resp;
+    },
+
+    // Create a new collection with an identical list of models as this one.
+    clone: function() {
+      return new this.constructor(this.models, {
+        model: this.model,
+        comparator: this.comparator
+      });
+    },
+
+    // Define how to uniquely identify models in the collection.
+    modelId: function(attrs) {
+      return attrs[this.model.prototype.idAttribute || 'id'];
+    },
+
+    // Get an iterator of all models in this collection.
+    values: function() {
+      return new CollectionIterator(this, ITERATOR_VALUES);
+    },
+
+    // Get an iterator of all model IDs in this collection.
+    keys: function() {
+      return new CollectionIterator(this, ITERATOR_KEYS);
+    },
+
+    // Get an iterator of all [ID, model] tuples in this collection.
+    entries: function() {
+      return new CollectionIterator(this, ITERATOR_KEYSVALUES);
+    },
+
+    // Private method to reset all internal state. Called when the collection
+    // is first initialized or reset.
+    _reset: function() {
+      this.length = 0;
+      this.models = [];
+      this._byId  = {};
+    },
+
+    // Prepare a hash of attributes (or other model) to be added to this
+    // collection.
+    _prepareModel: function(attrs, options) {
+      if (this._isModel(attrs)) {
+        if (!attrs.collection) attrs.collection = this;
+        return attrs;
+      }
+      options = options ? _.clone(options) : {};
+      options.collection = this;
+      var model = new this.model(attrs, options);
+      if (!model.validationError) return model;
+      this.trigger('invalid', this, model.validationError, options);
+      return false;
+    },
+
+    // Internal method called by both remove and set.
+    _removeModels: function(models, options) {
+      var removed = [];
+      for (var i = 0; i < models.length; i++) {
+        var model = this.get(models[i]);
+        if (!model) continue;
+
+        var index = this.indexOf(model);
+        this.models.splice(index, 1);
+        this.length--;
+
+        // Remove references before triggering 'remove' event to prevent an
+        // infinite loop. #3693
+        delete this._byId[model.cid];
+        var id = this.modelId(model.attributes);
+        if (id != null) delete this._byId[id];
+
+        if (!options.silent) {
+          options.index = index;
+          model.trigger('remove', model, this, options);
+        }
+
+        removed.push(model);
+        this._removeReference(model, options);
+      }
+      return removed;
+    },
+
+    // Method for checking whether an object should be considered a model for
+    // the purposes of adding to the collection.
+    _isModel: function(model) {
+      return model instanceof Model;
+    },
+
+    // Internal method to create a model's ties to a collection.
+    _addReference: function(model, options) {
+      this._byId[model.cid] = model;
+      var id = this.modelId(model.attributes);
+      if (id != null) this._byId[id] = model;
+      model.on('all', this._onModelEvent, this);
+    },
+
+    // Internal method to sever a model's ties to a collection.
+    _removeReference: function(model, options) {
+      delete this._byId[model.cid];
+      var id = this.modelId(model.attributes);
+      if (id != null) delete this._byId[id];
+      if (this === model.collection) delete model.collection;
+      model.off('all', this._onModelEvent, this);
+    },
+
+    // Internal method called every time a model in the set fires an event.
+    // Sets need to update their indexes when models change ids. All other
+    // events simply proxy through. "add" and "remove" events that originate
+    // in other collections are ignored.
+    _onModelEvent: function(event, model, collection, options) {
+      if (model) {
+        if ((event === 'add' || event === 'remove') && collection !== this) return;
+        if (event === 'destroy') this.remove(model, options);
+        if (event === 'change') {
+          var prevId = this.modelId(model.previousAttributes());
+          var id = this.modelId(model.attributes);
+          if (prevId !== id) {
+            if (prevId != null) delete this._byId[prevId];
+            if (id != null) this._byId[id] = model;
+          }
+        }
+      }
+      this.trigger.apply(this, arguments);
+    }
+
+  });
+
+  // Defining an @@iterator method implements JavaScript's Iterable protocol.
+  // In modern ES2015 browsers, this value is found at Symbol.iterator.
+  /* global Symbol */
+  var $$iterator = typeof Symbol === 'function' && Symbol.iterator;
+  if ($$iterator) {
+    Collection.prototype[$$iterator] = Collection.prototype.values;
+  }
+
+  // CollectionIterator
+  // ------------------
+
+  // A CollectionIterator implements JavaScript's Iterator protocol, allowing the
+  // use of `for of` loops in modern browsers and interoperation between
+  // Backbone.Collection and other JavaScript functions and third-party libraries
+  // which can operate on Iterables.
+  var CollectionIterator = function(collection, kind) {
+    this._collection = collection;
+    this._kind = kind;
+    this._index = 0;
+  };
+
+  // This "enum" defines the three possible kinds of values which can be emitted
+  // by a CollectionIterator that correspond to the values(), keys() and entries()
+  // methods on Collection, respectively.
+  var ITERATOR_VALUES = 1;
+  var ITERATOR_KEYS = 2;
+  var ITERATOR_KEYSVALUES = 3;
+
+  // All Iterators should themselves be Iterable.
+  if ($$iterator) {
+    CollectionIterator.prototype[$$iterator] = function() {
+      return this;
+    };
+  }
+
+  CollectionIterator.prototype.next = function() {
+    if (this._collection) {
+
+      // Only continue iterating if the iterated collection is long enough.
+      if (this._index < this._collection.length) {
+        var model = this._collection.at(this._index);
+        this._index++;
+
+        // Construct a value depending on what kind of values should be iterated.
+        var value;
+        if (this._kind === ITERATOR_VALUES) {
+          value = model;
+        } else {
+          var id = this._collection.modelId(model.attributes);
+          if (this._kind === ITERATOR_KEYS) {
+            value = id;
+          } else { // ITERATOR_KEYSVALUES
+            value = [id, model];
+          }
+        }
+        return {value: value, done: false};
+      }
+
+      // Once exhausted, remove the reference to the collection so future
+      // calls to the next method always return done.
+      this._collection = void 0;
+    }
+
+    return {value: void 0, done: true};
+  };
+
+  // Backbone.View
+  // -------------
+
+  // Backbone Views are almost more convention than they are actual code. A View
+  // is simply a JavaScript object that represents a logical chunk of UI in the
+  // DOM. This might be a single item, an entire list, a sidebar or panel, or
+  // even the surrounding frame which wraps your whole app. Defining a chunk of
+  // UI as a **View** allows you to define your DOM events declaratively, without
+  // having to worry about render order ... and makes it easy for the view to
+  // react to specific changes in the state of your models.
+
+  // Creating a Backbone.View creates its initial element outside of the DOM,
+  // if an existing element is not provided...
+  var View = Backbone.View = function(options) {
+    this.cid = _.uniqueId('view');
+    this.preinitialize.apply(this, arguments);
+    _.extend(this, _.pick(options, viewOptions));
+    this._ensureElement();
+    this.initialize.apply(this, arguments);
+  };
+
+  // Cached regex to split keys for `delegate`.
+  var delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+  // List of view options to be set as properties.
+  var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
+
+  // Set up all inheritable **Backbone.View** properties and methods.
+  _.extend(View.prototype, Events, {
+
+    // The default `tagName` of a View's element is `"div"`.
+    tagName: 'div',
+
+    // jQuery delegate for element lookup, scoped to DOM elements within the
+    // current view. This should be preferred to global lookups where possible.
+    $: function(selector) {
+      return this.$el.find(selector);
+    },
+
+    // preinitialize is an empty function by default. You can override it with a function
+    // or object.  preinitialize will run before any instantiation logic is run in the View
+    preinitialize: function(){},
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // **render** is the core function that your view should override, in order
+    // to populate its element (`this.el`), with the appropriate HTML. The
+    // convention is for **render** to always return `this`.
+    render: function() {
+      return this;
+    },
+
+    // Remove this view by taking the element out of the DOM, and removing any
+    // applicable Backbone.Events listeners.
+    remove: function() {
+      this._removeElement();
+      this.stopListening();
+      return this;
+    },
+
+    // Remove this view's element from the document and all event listeners
+    // attached to it. Exposed for subclasses using an alternative DOM
+    // manipulation API.
+    _removeElement: function() {
+      this.$el.remove();
+    },
+
+    // Change the view's element (`this.el` property) and re-delegate the
+    // view's events on the new element.
+    setElement: function(element) {
+      this.undelegateEvents();
+      this._setElement(element);
+      this.delegateEvents();
+      return this;
+    },
+
+    // Creates the `this.el` and `this.$el` references for this view using the
+    // given `el`. `el` can be a CSS selector or an HTML string, a jQuery
+    // context or an element. Subclasses can override this to utilize an
+    // alternative DOM manipulation API and are only required to set the
+    // `this.el` property.
+    _setElement: function(el) {
+      this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);
+      this.el = this.$el[0];
+    },
+
+    // Set callbacks, where `this.events` is a hash of
+    //
+    // *{"event selector": "callback"}*
+    //
+    //     {
+    //       'mousedown .title':  'edit',
+    //       'click .button':     'save',
+    //       'click .open':       function(e) { ... }
+    //     }
+    //
+    // pairs. Callbacks will be bound to the view, with `this` set properly.
+    // Uses event delegation for efficiency.
+    // Omitting the selector binds the event to `this.el`.
+    delegateEvents: function(events) {
+      events || (events = _.result(this, 'events'));
+      if (!events) return this;
+      this.undelegateEvents();
+      for (var key in events) {
+        var method = events[key];
+        if (!_.isFunction(method)) method = this[method];
+        if (!method) continue;
+        var match = key.match(delegateEventSplitter);
+        this.delegate(match[1], match[2], method.bind(this));
+      }
+      return this;
+    },
+
+    // Add a single event listener to the view's element (or a child element
+    // using `selector`). This only works for delegate-able events: not `focus`,
+    // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.
+    delegate: function(eventName, selector, listener) {
+      this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);
+      return this;
+    },
+
+    // Clears all callbacks previously bound to the view by `delegateEvents`.
+    // You usually don't need to use this, but may wish to if you have multiple
+    // Backbone views attached to the same DOM element.
+    undelegateEvents: function() {
+      if (this.$el) this.$el.off('.delegateEvents' + this.cid);
+      return this;
+    },
+
+    // A finer-grained `undelegateEvents` for removing a single delegated event.
+    // `selector` and `listener` are both optional.
+    undelegate: function(eventName, selector, listener) {
+      this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);
+      return this;
+    },
+
+    // Produces a DOM element to be assigned to your view. Exposed for
+    // subclasses using an alternative DOM manipulation API.
+    _createElement: function(tagName) {
+      return document.createElement(tagName);
+    },
+
+    // Ensure that the View has a DOM element to render into.
+    // If `this.el` is a string, pass it through `$()`, take the first
+    // matching element, and re-assign it to `el`. Otherwise, create
+    // an element from the `id`, `className` and `tagName` properties.
+    _ensureElement: function() {
+      if (!this.el) {
+        var attrs = _.extend({}, _.result(this, 'attributes'));
+        if (this.id) attrs.id = _.result(this, 'id');
+        if (this.className) attrs['class'] = _.result(this, 'className');
+        this.setElement(this._createElement(_.result(this, 'tagName')));
+        this._setAttributes(attrs);
+      } else {
+        this.setElement(_.result(this, 'el'));
+      }
+    },
+
+    // Set attributes from a hash on this view's element.  Exposed for
+    // subclasses using an alternative DOM manipulation API.
+    _setAttributes: function(attributes) {
+      this.$el.attr(attributes);
+    }
+
+  });
+
+  // Proxy Backbone class methods to Underscore functions, wrapping the model's
+  // `attributes` object or collection's `models` array behind the scenes.
+  //
+  // collection.filter(function(model) { return model.get('age') > 10 });
+  // collection.each(this.addView);
+  //
+  // `Function#apply` can be slow so we use the method's arg count, if we know it.
+  var addMethod = function(base, length, method, attribute) {
+    switch (length) {
+      case 1: return function() {
+        return base[method](this[attribute]);
+      };
+      case 2: return function(value) {
+        return base[method](this[attribute], value);
+      };
+      case 3: return function(iteratee, context) {
+        return base[method](this[attribute], cb(iteratee, this), context);
+      };
+      case 4: return function(iteratee, defaultVal, context) {
+        return base[method](this[attribute], cb(iteratee, this), defaultVal, context);
+      };
+      default: return function() {
+        var args = slice.call(arguments);
+        args.unshift(this[attribute]);
+        return base[method].apply(base, args);
+      };
+    }
+  };
+
+  var addUnderscoreMethods = function(Class, base, methods, attribute) {
+    _.each(methods, function(length, method) {
+      if (base[method]) Class.prototype[method] = addMethod(base, length, method, attribute);
+    });
+  };
+
+  // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.
+  var cb = function(iteratee, instance) {
+    if (_.isFunction(iteratee)) return iteratee;
+    if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);
+    if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };
+    return iteratee;
+  };
+  var modelMatcher = function(attrs) {
+    var matcher = _.matches(attrs);
+    return function(model) {
+      return matcher(model.attributes);
+    };
+  };
+
+  // Underscore methods that we want to implement on the Collection.
+  // 90% of the core usefulness of Backbone Collections is actually implemented
+  // right here:
+  var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,
+    foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,
+    select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
+    contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
+    head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
+    without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
+    isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
+    sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};
+
+
+  // Underscore methods that we want to implement on the Model, mapped to the
+  // number of arguments they take.
+  var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,
+    omit: 0, chain: 1, isEmpty: 1};
+
+  // Mix in each Underscore method as a proxy to `Collection#models`.
+
+  _.each([
+    [Collection, collectionMethods, 'models'],
+    [Model, modelMethods, 'attributes']
+  ], function(config) {
+    var Base = config[0],
+        methods = config[1],
+        attribute = config[2];
+
+    Base.mixin = function(obj) {
+      var mappings = _.reduce(_.functions(obj), function(memo, name) {
+        memo[name] = 0;
+        return memo;
+      }, {});
+      addUnderscoreMethods(Base, obj, mappings, attribute);
+    };
+
+    addUnderscoreMethods(Base, _, methods, attribute);
+  });
+
+  // Backbone.sync
+  // -------------
+
+  // Override this function to change the manner in which Backbone persists
+  // models to the server. You will be passed the type of request, and the
+  // model in question. By default, makes a RESTful Ajax request
+  // to the model's `url()`. Some possible customizations could be:
+  //
+  // * Use `setTimeout` to batch rapid-fire updates into a single request.
+  // * Send up the models as XML instead of JSON.
+  // * Persist models via WebSockets instead of Ajax.
+  //
+  // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
+  // as `POST`, with a `_method` parameter containing the true HTTP method,
+  // as well as all requests with the body as `application/x-www-form-urlencoded`
+  // instead of `application/json` with the model in a param named `model`.
+  // Useful when interfacing with server-side languages like **PHP** that make
+  // it difficult to read the body of `PUT` requests.
+  Backbone.sync = function(method, model, options) {
+    var type = methodMap[method];
+
+    // Default options, unless specified.
+    _.defaults(options || (options = {}), {
+      emulateHTTP: Backbone.emulateHTTP,
+      emulateJSON: Backbone.emulateJSON
+    });
+
+    // Default JSON-request options.
+    var params = {type: type, dataType: 'json'};
+
+    // Ensure that we have a URL.
+    if (!options.url) {
+      params.url = _.result(model, 'url') || urlError();
+    }
+
+    // Ensure that we have the appropriate request data.
+    if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
+      params.contentType = 'application/json';
+      params.data = JSON.stringify(options.attrs || model.toJSON(options));
+    }
+
+    // For older servers, emulate JSON by encoding the request into an HTML-form.
+    if (options.emulateJSON) {
+      params.contentType = 'application/x-www-form-urlencoded';
+      params.data = params.data ? {model: params.data} : {};
+    }
+
+    // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
+    // And an `X-HTTP-Method-Override` header.
+    if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
+      params.type = 'POST';
+      if (options.emulateJSON) params.data._method = type;
+      var beforeSend = options.beforeSend;
+      options.beforeSend = function(xhr) {
+        xhr.setRequestHeader('X-HTTP-Method-Override', type);
+        if (beforeSend) return beforeSend.apply(this, arguments);
+      };
+    }
+
+    // Don't process data on a non-GET request.
+    if (params.type !== 'GET' && !options.emulateJSON) {
+      params.processData = false;
+    }
+
+    // Pass along `textStatus` and `errorThrown` from jQuery.
+    var error = options.error;
+    options.error = function(xhr, textStatus, errorThrown) {
+      options.textStatus = textStatus;
+      options.errorThrown = errorThrown;
+      if (error) error.call(options.context, xhr, textStatus, errorThrown);
+    };
+
+    // Make the request, allowing the user to override any Ajax options.
+    var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
+    model.trigger('request', model, xhr, options);
+    return xhr;
+  };
+
+  // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
+  var methodMap = {
+    create: 'POST',
+    update: 'PUT',
+    patch: 'PATCH',
+    delete: 'DELETE',
+    read: 'GET'
+  };
+
+  // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
+  // Override this if you'd like to use a different library.
+  Backbone.ajax = function() {
+    return Backbone.$.ajax.apply(Backbone.$, arguments);
+  };
+
+  // Backbone.Router
+  // ---------------
+
+  // Routers map faux-URLs to actions, and fire events when routes are
+  // matched. Creating a new one sets its `routes` hash, if not set statically.
+  var Router = Backbone.Router = function(options) {
+    options || (options = {});
+    this.preinitialize.apply(this, arguments);
+    if (options.routes) this.routes = options.routes;
+    this._bindRoutes();
+    this.initialize.apply(this, arguments);
+  };
+
+  // Cached regular expressions for matching named param parts and splatted
+  // parts of route strings.
+  var optionalParam = /\((.*?)\)/g;
+  var namedParam    = /(\(\?)?:\w+/g;
+  var splatParam    = /\*\w+/g;
+  var escapeRegExp  = /[\-{}\[\]+?.,\\\^$|#\s]/g;
+
+  // Set up all inheritable **Backbone.Router** properties and methods.
+  _.extend(Router.prototype, Events, {
+
+    // preinitialize is an empty function by default. You can override it with a function
+    // or object.  preinitialize will run before any instantiation logic is run in the Router.
+    preinitialize: function(){},
+
+    // Initialize is an empty function by default. Override it with your own
+    // initialization logic.
+    initialize: function(){},
+
+    // Manually bind a single named route to a callback. For example:
+    //
+    //     this.route('search/:query/p:num', 'search', function(query, num) {
+    //       ...
+    //     });
+    //
+    route: function(route, name, callback) {
+      if (!_.isRegExp(route)) route = this._routeToRegExp(route);
+      if (_.isFunction(name)) {
+        callback = name;
+        name = '';
+      }
+      if (!callback) callback = this[name];
+      var router = this;
+      Backbone.history.route(route, function(fragment) {
+        var args = router._extractParameters(route, fragment);
+        if (router.execute(callback, args, name) !== false) {
+          router.trigger.apply(router, ['route:' + name].concat(args));
+          router.trigger('route', name, args);
+          Backbone.history.trigger('route', router, name, args);
+        }
+      });
+      return this;
+    },
+
+    // Execute a route handler with the provided parameters.  This is an
+    // excellent place to do pre-route setup or post-route cleanup.
+    execute: function(callback, args, name) {
+      if (callback) callback.apply(this, args);
+    },
+
+    // Simple proxy to `Backbone.history` to save a fragment into the history.
+    navigate: function(fragment, options) {
+      Backbone.history.navigate(fragment, options);
+      return this;
+    },
+
+    // Bind all defined routes to `Backbone.history`. We have to reverse the
+    // order of the routes here to support behavior where the most general
+    // routes can be defined at the bottom of the route map.
+    _bindRoutes: function() {
+      if (!this.routes) return;
+      this.routes = _.result(this, 'routes');
+      var route, routes = _.keys(this.routes);
+      while ((route = routes.pop()) != null) {
+        this.route(route, this.routes[route]);
+      }
+    },
+
+    // Convert a route string into a regular expression, suitable for matching
+    // against the current location hash.
+    _routeToRegExp: function(route) {
+      route = route.replace(escapeRegExp, '\\$&')
+        .replace(optionalParam, '(?:$1)?')
+        .replace(namedParam, function(match, optional) {
+          return optional ? match : '([^/?]+)';
+        })
+        .replace(splatParam, '([^?]*?)');
+      return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
+    },
+
+    // Given a route, and a URL fragment that it matches, return the array of
+    // extracted decoded parameters. Empty or unmatched parameters will be
+    // treated as `null` to normalize cross-browser behavior.
+    _extractParameters: function(route, fragment) {
+      var params = route.exec(fragment).slice(1);
+      return _.map(params, function(param, i) {
+        // Don't decode the search params.
+        if (i === params.length - 1) return param || null;
+        return param ? decodeURIComponent(param) : null;
+      });
+    }
+
+  });
+
+  // Backbone.History
+  // ----------------
+
+  // Handles cross-browser history management, based on either
+  // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
+  // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
+  // and URL fragments. If the browser supports neither (old IE, natch),
+  // falls back to polling.
+  var History = Backbone.History = function() {
+    this.handlers = [];
+    this.checkUrl = this.checkUrl.bind(this);
+
+    // Ensure that `History` can be used outside of the browser.
+    if (typeof window !== 'undefined') {
+      this.location = window.location;
+      this.history = window.history;
+    }
+  };
+
+  // Cached regex for stripping a leading hash/slash and trailing space.
+  var routeStripper = /^[#\/]|\s+$/g;
+
+  // Cached regex for stripping leading and trailing slashes.
+  var rootStripper = /^\/+|\/+$/g;
+
+  // Cached regex for stripping urls of hash.
+  var pathStripper = /#.*$/;
+
+  // Has the history handling already been started?
+  History.started = false;
+
+  // Set up all inheritable **Backbone.History** properties and methods.
+  _.extend(History.prototype, Events, {
+
+    // The default interval to poll for hash changes, if necessary, is
+    // twenty times a second.
+    interval: 50,
+
+    // Are we at the app root?
+    atRoot: function() {
+      var path = this.location.pathname.replace(/[^\/]$/, '$&/');
+      return path === this.root && !this.getSearch();
+    },
+
+    // Does the pathname match the root?
+    matchRoot: function() {
+      var path = this.decodeFragment(this.location.pathname);
+      var rootPath = path.slice(0, this.root.length - 1) + '/';
+      return rootPath === this.root;
+    },
+
+    // Unicode characters in `location.pathname` are percent encoded so they're
+    // decoded for comparison. `%25` should not be decoded since it may be part
+    // of an encoded parameter.
+    decodeFragment: function(fragment) {
+      return decodeURI(fragment.replace(/%25/g, '%2525'));
+    },
+
+    // In IE6, the hash fragment and search params are incorrect if the
+    // fragment contains `?`.
+    getSearch: function() {
+      var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
+      return match ? match[0] : '';
+    },
+
+    // Gets the true hash value. Cannot use location.hash directly due to bug
+    // in Firefox where location.hash will always be decoded.
+    getHash: function(window) {
+      var match = (window || this).location.href.match(/#(.*)$/);
+      return match ? match[1] : '';
+    },
+
+    // Get the pathname and search params, without the root.
+    getPath: function() {
+      var path = this.decodeFragment(
+        this.location.pathname + this.getSearch()
+      ).slice(this.root.length - 1);
+      return path.charAt(0) === '/' ? path.slice(1) : path;
+    },
+
+    // Get the cross-browser normalized URL fragment from the path or hash.
+    getFragment: function(fragment) {
+      if (fragment == null) {
+        if (this._usePushState || !this._wantsHashChange) {
+          fragment = this.getPath();
+        } else {
+          fragment = this.getHash();
+        }
+      }
+      return fragment.replace(routeStripper, '');
+    },
+
+    // Start the hash change handling, returning `true` if the current URL matches
+    // an existing route, and `false` otherwise.
+    start: function(options) {
+      if (History.started) throw new Error('Backbone.history has already been started');
+      History.started = true;
+
+      // Figure out the initial configuration. Do we need an iframe?
+      // Is pushState desired ... is it available?
+      this.options          = _.extend({root: '/'}, this.options, options);
+      this.root             = this.options.root;
+      this._wantsHashChange = this.options.hashChange !== false;
+      this._hasHashChange   = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);
+      this._useHashChange   = this._wantsHashChange && this._hasHashChange;
+      this._wantsPushState  = !!this.options.pushState;
+      this._hasPushState    = !!(this.history && this.history.pushState);
+      this._usePushState    = this._wantsPushState && this._hasPushState;
+      this.fragment         = this.getFragment();
+
+      // Normalize root to always include a leading and trailing slash.
+      this.root = ('/' + this.root + '/').replace(rootStripper, '/');
+
+      // Transition from hashChange to pushState or vice versa if both are
+      // requested.
+      if (this._wantsHashChange && this._wantsPushState) {
+
+        // If we've started off with a route from a `pushState`-enabled
+        // browser, but we're currently in a browser that doesn't support it...
+        if (!this._hasPushState && !this.atRoot()) {
+          var rootPath = this.root.slice(0, -1) || '/';
+          this.location.replace(rootPath + '#' + this.getPath());
+          // Return immediately as browser will do redirect to new url
+          return true;
+
+        // Or if we've started out with a hash-based route, but we're currently
+        // in a browser where it could be `pushState`-based instead...
+        } else if (this._hasPushState && this.atRoot()) {
+          this.navigate(this.getHash(), {replace: true});
+        }
+
+      }
+
+      // Proxy an iframe to handle location events if the browser doesn't
+      // support the `hashchange` event, HTML5 history, or the user wants
+      // `hashChange` but not `pushState`.
+      if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
+        this.iframe = document.createElement('iframe');
+        this.iframe.src = 'javascript:0';
+        this.iframe.style.display = 'none';
+        this.iframe.tabIndex = -1;
+        var body = document.body;
+        // Using `appendChild` will throw on IE < 9 if the document is not ready.
+        var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;
+        iWindow.document.open();
+        iWindow.document.close();
+        iWindow.location.hash = '#' + this.fragment;
+      }
+
+      // Add a cross-platform `addEventListener` shim for older browsers.
+      var addEventListener = window.addEventListener || function(eventName, listener) {
+        return attachEvent('on' + eventName, listener);
+      };
+
+      // Depending on whether we're using pushState or hashes, and whether
+      // 'onhashchange' is supported, determine how we check the URL state.
+      if (this._usePushState) {
+        addEventListener('popstate', this.checkUrl, false);
+      } else if (this._useHashChange && !this.iframe) {
+        addEventListener('hashchange', this.checkUrl, false);
+      } else if (this._wantsHashChange) {
+        this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
+      }
+
+      if (!this.options.silent) return this.loadUrl();
+    },
+
+    // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
+    // but possibly useful for unit testing Routers.
+    stop: function() {
+      // Add a cross-platform `removeEventListener` shim for older browsers.
+      var removeEventListener = window.removeEventListener || function(eventName, listener) {
+        return detachEvent('on' + eventName, listener);
+      };
+
+      // Remove window listeners.
+      if (this._usePushState) {
+        removeEventListener('popstate', this.checkUrl, false);
+      } else if (this._useHashChange && !this.iframe) {
+        removeEventListener('hashchange', this.checkUrl, false);
+      }
+
+      // Clean up the iframe if necessary.
+      if (this.iframe) {
+        document.body.removeChild(this.iframe);
+        this.iframe = null;
+      }
+
+      // Some environments will throw when clearing an undefined interval.
+      if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
+      History.started = false;
+    },
+
+    // Add a route to be tested when the fragment changes. Routes added later
+    // may override previous routes.
+    route: function(route, callback) {
+      this.handlers.unshift({route: route, callback: callback});
+    },
+
+    // Checks the current URL to see if it has changed, and if it has,
+    // calls `loadUrl`, normalizing across the hidden iframe.
+    checkUrl: function(e) {
+      var current = this.getFragment();
+
+      // If the user pressed the back button, the iframe's hash will have
+      // changed and we should use that for comparison.
+      if (current === this.fragment && this.iframe) {
+        current = this.getHash(this.iframe.contentWindow);
+      }
+
+      if (current === this.fragment) return false;
+      if (this.iframe) this.navigate(current);
+      this.loadUrl();
+    },
+
+    // Attempt to load the current URL fragment. If a route succeeds with a
+    // match, returns `true`. If no defined routes matches the fragment,
+    // returns `false`.
+    loadUrl: function(fragment) {
+      // If the root doesn't match, no routes can match either.
+      if (!this.matchRoot()) return false;
+      fragment = this.fragment = this.getFragment(fragment);
+      return _.some(this.handlers, function(handler) {
+        if (handler.route.test(fragment)) {
+          handler.callback(fragment);
+          return true;
+        }
+      });
+    },
+
+    // Save a fragment into the hash history, or replace the URL state if the
+    // 'replace' option is passed. You are responsible for properly URL-encoding
+    // the fragment in advance.
+    //
+    // The options object can contain `trigger: true` if you wish to have the
+    // route callback be fired (not usually desirable), or `replace: true`, if
+    // you wish to modify the current URL without adding an entry to the history.
+    navigate: function(fragment, options) {
+      if (!History.started) return false;
+      if (!options || options === true) options = {trigger: !!options};
+
+      // Normalize the fragment.
+      fragment = this.getFragment(fragment || '');
+
+      // Don't include a trailing slash on the root.
+      var rootPath = this.root;
+      if (fragment === '' || fragment.charAt(0) === '?') {
+        rootPath = rootPath.slice(0, -1) || '/';
+      }
+      var url = rootPath + fragment;
+
+      // Strip the fragment of the query and hash for matching.
+      fragment = fragment.replace(pathStripper, '');
+
+      // Decode for matching.
+      var decodedFragment = this.decodeFragment(fragment);
+
+      if (this.fragment === decodedFragment) return;
+      this.fragment = decodedFragment;
+
+      // If pushState is available, we use it to set the fragment as a real URL.
+      if (this._usePushState) {
+        this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
+
+      // If hash changes haven't been explicitly disabled, update the hash
+      // fragment to store history.
+      } else if (this._wantsHashChange) {
+        this._updateHash(this.location, fragment, options.replace);
+        if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {
+          var iWindow = this.iframe.contentWindow;
+
+          // Opening and closing the iframe tricks IE7 and earlier to push a
+          // history entry on hash-tag change.  When replace is true, we don't
+          // want this.
+          if (!options.replace) {
+            iWindow.document.open();
+            iWindow.document.close();
+          }
+
+          this._updateHash(iWindow.location, fragment, options.replace);
+        }
+
+      // If you've told us that you explicitly don't want fallback hashchange-
+      // based history, then `navigate` becomes a page refresh.
+      } else {
+        return this.location.assign(url);
+      }
+      if (options.trigger) return this.loadUrl(fragment);
+    },
+
+    // Update the hash location, either replacing the current entry, or adding
+    // a new one to the browser history.
+    _updateHash: function(location, fragment, replace) {
+      if (replace) {
+        var href = location.href.replace(/(javascript:|#).*$/, '');
+        location.replace(href + '#' + fragment);
+      } else {
+        // Some browsers require that `hash` contains a leading #.
+        location.hash = '#' + fragment;
+      }
+    }
+
+  });
+
+  // Create the default Backbone.history.
+  Backbone.history = new History;
+
+  // Helpers
+  // -------
+
+  // Helper function to correctly set up the prototype chain for subclasses.
+  // Similar to `goog.inherits`, but uses a hash of prototype properties and
+  // class properties to be extended.
+  var extend = function(protoProps, staticProps) {
+    var parent = this;
+    var child;
+
+    // The constructor function for the new subclass is either defined by you
+    // (the "constructor" property in your `extend` definition), or defaulted
+    // by us to simply call the parent constructor.
+    if (protoProps && _.has(protoProps, 'constructor')) {
+      child = protoProps.constructor;
+    } else {
+      child = function(){ return parent.apply(this, arguments); };
+    }
+
+    // Add static properties to the constructor function, if supplied.
+    _.extend(child, parent, staticProps);
+
+    // Set the prototype chain to inherit from `parent`, without calling
+    // `parent`'s constructor function and add the prototype properties.
+    child.prototype = _.create(parent.prototype, protoProps);
+    child.prototype.constructor = child;
+
+    // Set a convenience property in case the parent's prototype is needed
+    // later.
+    child.__super__ = parent.prototype;
+
+    return child;
+  };
+
+  // Set up inheritance for the model, collection, router, view and history.
+  Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
+
+  // Throw an error when a URL is needed, and none is supplied.
+  var urlError = function() {
+    throw new Error('A "url" property or function must be specified');
+  };
+
+  // Wrap an optional error callback with a fallback error event.
+  var wrapError = function(model, options) {
+    var error = options.error;
+    options.error = function(resp) {
+      if (error) error.call(options.context, model, resp, options);
+      model.trigger('error', model, resp, options);
+    };
+  };
+
+  return Backbone;
+});
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+  return value != null && typeof value == 'object';
+}
+
+module.exports = isObjectLike;
+
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Native Javascript for Bootstrap 4 v2.0.26 | © dnp_theme | MIT-License
+(function (root, factory) {
+  if (true) {
+    // AMD support:
+    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+                __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+                (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  } else { var bsn; }
+}(this, function () {
+
+  /* Native Javascript for Bootstrap 4 | Internal Utility Functions
+  ----------------------------------------------------------------*/
+  "use strict";
+
+  // globals
+  var globalObject = typeof global !== 'undefined' ? global : this||window,
+    DOC = document, HTML = DOC.documentElement, body = 'body', // allow the library to be used in <head>
+
+    // Native Javascript for Bootstrap Global Object
+    BSN = globalObject.BSN = {},
+    supports = BSN.supports = [],
+
+    // function toggle attributes
+    dataToggle    = 'data-toggle',
+    dataDismiss   = 'data-dismiss',
+    dataSpy       = 'data-spy',
+    dataRide      = 'data-ride',
+
+    // components
+    stringAlert     = 'Alert',
+    stringButton    = 'Button',
+    stringCarousel  = 'Carousel',
+    stringCollapse  = 'Collapse',
+    stringDropdown  = 'Dropdown',
+    stringModal     = 'Modal',
+    stringPopover   = 'Popover',
+    stringScrollSpy = 'ScrollSpy',
+    stringTab       = 'Tab',
+    stringTooltip   = 'Tooltip',
+    stringToast     = 'Toast',
+
+    // options DATA API
+    dataAutohide      = 'data-autohide',
+    databackdrop      = 'data-backdrop',
+    dataKeyboard      = 'data-keyboard',
+    dataTarget        = 'data-target',
+    dataInterval      = 'data-interval',
+    dataHeight        = 'data-height',
+    dataPause         = 'data-pause',
+    dataTitle         = 'data-title',
+    dataOriginalTitle = 'data-original-title',
+    dataDismissible   = 'data-dismissible',
+    dataTrigger       = 'data-trigger',
+    dataAnimation     = 'data-animation',
+    dataContainer     = 'data-container',
+    dataPlacement     = 'data-placement',
+    dataDelay         = 'data-delay',
+
+    // option keys
+    backdrop = 'backdrop', keyboard = 'keyboard', delay = 'delay',
+    content = 'content', target = 'target', currentTarget = 'currentTarget',
+    interval = 'interval', pause = 'pause', animation = 'animation',
+    placement = 'placement', container = 'container',
+
+    // box model
+    offsetTop    = 'offsetTop',      offsetBottom   = 'offsetBottom',
+    offsetLeft   = 'offsetLeft',
+    scrollTop    = 'scrollTop',      scrollLeft     = 'scrollLeft',
+    clientWidth  = 'clientWidth',    clientHeight   = 'clientHeight',
+    offsetWidth  = 'offsetWidth',    offsetHeight   = 'offsetHeight',
+    innerWidth   = 'innerWidth',     innerHeight    = 'innerHeight',
+    scrollHeight = 'scrollHeight',   height         = 'height',
+
+    // aria
+    ariaExpanded = 'aria-expanded',
+    ariaHidden   = 'aria-hidden',
+    ariaSelected = 'aria-selected',
+
+    // event names
+    clickEvent    = 'click',
+    hoverEvent    = 'hover',
+    keydownEvent  = 'keydown',
+    keyupEvent    = 'keyup',
+    resizeEvent   = 'resize',
+    scrollEvent   = 'scroll',
+    // originalEvents
+    showEvent     = 'show',
+    shownEvent    = 'shown',
+    hideEvent     = 'hide',
+    hiddenEvent   = 'hidden',
+    closeEvent    = 'close',
+    closedEvent   = 'closed',
+    slidEvent     = 'slid',
+    slideEvent    = 'slide',
+    changeEvent   = 'change',
+
+    // other
+    getAttribute           = 'getAttribute',
+    setAttribute           = 'setAttribute',
+    hasAttribute           = 'hasAttribute',
+    createElement          = 'createElement',
+    appendChild            = 'appendChild',
+    innerHTML              = 'innerHTML',
+    getElementsByTagName   = 'getElementsByTagName',
+    preventDefault         = 'preventDefault',
+    getBoundingClientRect  = 'getBoundingClientRect',
+    querySelectorAll       = 'querySelectorAll',
+    getElementsByCLASSNAME = 'getElementsByClassName',
+    getComputedStyle       = 'getComputedStyle',
+
+    indexOf      = 'indexOf',
+    parentNode   = 'parentNode',
+    length       = 'length',
+    toLowerCase  = 'toLowerCase',
+    Transition   = 'Transition',
+    Duration     = 'Duration',
+    Webkit       = 'Webkit',
+    style        = 'style',
+    push         = 'push',
+    tabindex     = 'tabindex',
+    contains     = 'contains',
+
+    active     = 'active',
+    showClass  = 'show',
+    collapsing = 'collapsing',
+    disabled   = 'disabled',
+    loading    = 'loading',
+    left       = 'left',
+    right      = 'right',
+    top        = 'top',
+    bottom     = 'bottom',
+
+    // tooltip / popover
+    mouseHover = ('onmouseleave' in DOC) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ],
+    tipPositions = /\b(top|bottom|left|right)+/,
+
+    // modal
+    modalOverlay = 0,
+    fixedTop = 'fixed-top',
+    fixedBottom = 'fixed-bottom',
+
+    // transitionEnd since 2.0.4
+    supportTransitions = Webkit+Transition in HTML[style] || Transition[toLowerCase]() in HTML[style],
+    transitionEndEvent = Webkit+Transition in HTML[style] ? Webkit[toLowerCase]()+Transition+'End' : Transition[toLowerCase]()+'end',
+    transitionDuration = Webkit+Duration in HTML[style] ? Webkit[toLowerCase]()+Transition+Duration : Transition[toLowerCase]()+Duration,
+
+    // touch since 2.0.26
+    touchEvents = { start: 'touchstart', end: 'touchend', move:'touchmove' },
+
+    // set new focus element since 2.0.3
+    setFocus = function(element){
+      element.focus ? element.focus() : element.setActive();
+    },
+
+    // class manipulation, since 2.0.0 requires polyfill.js
+    addClass = function(element,classNAME) {
+      element.classList.add(classNAME);
+    },
+    removeClass = function(element,classNAME) {
+      element.classList.remove(classNAME);
+    },
+    hasClass = function(element,classNAME){ // since 2.0.0
+      return element.classList[contains](classNAME);
+    },
+
+    // selection methods
+    getElementsByClassName = function(element,classNAME) { // returns Array
+      return [].slice.call(element[getElementsByCLASSNAME]( classNAME ));
+    },
+    queryElement = function (selector, parent) {
+      var lookUp = parent ? parent : DOC;
+      return typeof selector === 'object' ? selector : lookUp.querySelector(selector);
+    },
+    getClosest = function (element, selector) { //element is the element and selector is for the closest parent element to find
+      // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
+      var firstChar = selector.charAt(0), selectorSubstring = selector.substr(1);
+      if ( firstChar === '.' ) {// If selector is a class
+        for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
+          if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selectorSubstring) ) { return element; }
+        }
+      } else if ( firstChar === '#' ) { // If selector is an ID
+        for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
+          if ( element.id === selectorSubstring ) { return element; }
+        }
+      }
+      return false;
+    },
+
+    // event attach jQuery style / trigger  since 1.2.0
+    on = function (element, event, handler) {
+      element.addEventListener(event, handler, false);
+    },
+    off = function(element, event, handler) {
+      element.removeEventListener(event, handler, false);
+    },
+    one = function (element, event, handler) { // one since 2.0.4
+      on(element, event, function handlerWrapper(e){
+        handler(e);
+        off(element, event, handlerWrapper);
+      });
+    },
+    getTransitionDurationFromElement = function(element) {
+      var duration = supportTransitions ? globalObject[getComputedStyle](element)[transitionDuration] : 0;
+      duration = parseFloat(duration);
+      duration = typeof duration === 'number' && !isNaN(duration) ? duration * 1000 : 0;
+      return duration; // we take a short offset to make sure we fire on the next frame after animation
+    },
+    emulateTransitionEnd = function(element,handler){ // emulateTransitionEnd since 2.0.4
+      var called = 0, duration = getTransitionDurationFromElement(element);
+      duration ? one(element, transitionEndEvent, function(e){ !called && handler(e), called = 1; })
+               : setTimeout(function() { !called && handler(), called = 1; }, 17);
+    },
+    bootstrapCustomEvent = function (eventName, componentName, related) {
+      var OriginalCustomEvent = new CustomEvent( eventName + '.bs.' + componentName);
+      OriginalCustomEvent.relatedTarget = related;
+      this.dispatchEvent(OriginalCustomEvent);
+    },
+
+    // tooltip / popover stuff
+    getScroll = function() { // also Affix and ScrollSpy uses it
+      return {
+        y : globalObject.pageYOffset || HTML[scrollTop],
+        x : globalObject.pageXOffset || HTML[scrollLeft]
+      }
+    },
+    styleTip = function(link,element,position,parent) { // both popovers and tooltips (target,tooltip,placement,elementToAppendTo)
+      var elementDimensions = { w : element[offsetWidth], h: element[offsetHeight] },
+          windowWidth = (HTML[clientWidth] || DOC[body][clientWidth]),
+          windowHeight = (HTML[clientHeight] || DOC[body][clientHeight]),
+          rect = link[getBoundingClientRect](),
+          scroll = parent === DOC[body] ? getScroll() : { x: parent[offsetLeft] + parent[scrollLeft], y: parent[offsetTop] + parent[scrollTop] },
+          linkDimensions = { w: rect[right] - rect[left], h: rect[bottom] - rect[top] },
+          isPopover = hasClass(element,'popover'),
+          topPosition, leftPosition,
+
+          arrow = queryElement('.arrow',element),
+          arrowTop, arrowLeft, arrowWidth, arrowHeight,
+
+          halfTopExceed = rect[top] + linkDimensions.h/2 - elementDimensions.h/2 < 0,
+          halfLeftExceed = rect[left] + linkDimensions.w/2 - elementDimensions.w/2 < 0,
+          halfRightExceed = rect[left] + elementDimensions.w/2 + linkDimensions.w/2 >= windowWidth,
+          halfBottomExceed = rect[top] + elementDimensions.h/2 + linkDimensions.h/2 >= windowHeight,
+          topExceed = rect[top] - elementDimensions.h < 0,
+          leftExceed = rect[left] - elementDimensions.w < 0,
+          bottomExceed = rect[top] + elementDimensions.h + linkDimensions.h >= windowHeight,
+          rightExceed = rect[left] + elementDimensions.w + linkDimensions.w >= windowWidth;
+
+      // recompute position
+      position = (position === left || position === right) && leftExceed && rightExceed ? top : position; // first, when both left and right limits are exceeded, we fall back to top|bottom
+      position = position === top && topExceed ? bottom : position;
+      position = position === bottom && bottomExceed ? top : position;
+      position = position === left && leftExceed ? right : position;
+      position = position === right && rightExceed ? left : position;
+
+      // update tooltip/popover class
+      element.className[indexOf](position) === -1 && (element.className = element.className.replace(tipPositions,position));
+
+      // we check the computed width & height and update here
+      arrowWidth = arrow[offsetWidth]; arrowHeight = arrow[offsetHeight];
+
+      // apply styling to tooltip or popover
+      if ( position === left || position === right ) { // secondary|side positions
+        if ( position === left ) { // LEFT
+          leftPosition = rect[left] + scroll.x - elementDimensions.w - ( isPopover ? arrowWidth : 0 );
+        } else { // RIGHT
+          leftPosition = rect[left] + scroll.x + linkDimensions.w;
+        }
+
+        // adjust top and arrow
+        if (halfTopExceed) {
+          topPosition = rect[top] + scroll.y;
+          arrowTop = linkDimensions.h/2 - arrowWidth;
+        } else if (halfBottomExceed) {
+          topPosition = rect[top] + scroll.y - elementDimensions.h + linkDimensions.h;
+          arrowTop = elementDimensions.h - linkDimensions.h/2 - arrowWidth;
+        } else {
+          topPosition = rect[top] + scroll.y - elementDimensions.h/2 + linkDimensions.h/2;
+          arrowTop = elementDimensions.h/2 - (isPopover ? arrowHeight*0.9 : arrowHeight/2);
+        }
+      } else if ( position === top || position === bottom ) { // primary|vertical positions
+        if ( position === top) { // TOP
+          topPosition =  rect[top] + scroll.y - elementDimensions.h - ( isPopover ? arrowHeight : 0 );
+        } else { // BOTTOM
+          topPosition = rect[top] + scroll.y + linkDimensions.h;
+        }
+        // adjust left | right and also the arrow
+        if (halfLeftExceed) {
+          leftPosition = 0;
+          arrowLeft = rect[left] + linkDimensions.w/2 - arrowWidth;
+        } else if (halfRightExceed) {
+          leftPosition = windowWidth - elementDimensions.w*1.01;
+          arrowLeft = elementDimensions.w - ( windowWidth - rect[left] ) + linkDimensions.w/2 - arrowWidth/2;
+        } else {
+          leftPosition = rect[left] + scroll.x - elementDimensions.w/2 + linkDimensions.w/2;
+          arrowLeft = elementDimensions.w/2 - arrowWidth/2;
+        }
+      }
+
+      // apply style to tooltip/popover and its arrow
+      element[style][top] = topPosition + 'px';
+      element[style][left] = leftPosition + 'px';
+
+      arrowTop && (arrow[style][top] = arrowTop + 'px');
+      arrowLeft && (arrow[style][left] = arrowLeft + 'px');
+    };
+
+  BSN.version = '2.0.26';
+
+  /* Native Javascript for Bootstrap 4 | Alert
+  -------------------------------------------*/
+
+  // ALERT DEFINITION
+  // ================
+  var Alert = function( element ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // bind, target alert, duration and stuff
+    var self = this, component = 'alert',
+      alert = getClosest(element,'.'+component),
+      triggerHandler = function(){ hasClass(alert,'fade') ? emulateTransitionEnd(alert,transitionEndHandler) : transitionEndHandler(); },
+      // handlers
+      clickHandler = function(e){
+        alert = getClosest(e[target],'.'+component);
+        element = queryElement('['+dataDismiss+'="'+component+'"]',alert);
+        element && alert && (element === e[target] || element[contains](e[target])) && self.close();
+      },
+      transitionEndHandler = function(){
+        bootstrapCustomEvent.call(alert, closedEvent, component);
+        off(element, clickEvent, clickHandler); // detach it's listener
+        alert[parentNode].removeChild(alert);
+      };
+
+    // public method
+    this.close = function() {
+      if ( alert && element && hasClass(alert,showClass) ) {
+        bootstrapCustomEvent.call(alert, closeEvent, component);
+        removeClass(alert,showClass);
+        alert && triggerHandler();
+      }
+    };
+
+    // init
+    if ( !(stringAlert in element ) ) { // prevent adding event handlers twice
+      on(element, clickEvent, clickHandler);
+    }
+    element[stringAlert] = self;
+  };
+
+  // ALERT DATA API
+  // ==============
+  supports[push]([stringAlert, Alert, '['+dataDismiss+'="alert"]']);
+
+
+  /* Native Javascript for Bootstrap 4 | Button
+  ---------------------------------------------*/
+
+  // BUTTON DEFINITION
+  // ===================
+  var Button = function( element ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // constant
+    var toggled = false, // toggled makes sure to prevent triggering twice the change.bs.button events
+
+        // strings
+        component = 'button',
+        checked = 'checked',
+        reset = 'reset',
+        LABEL = 'LABEL',
+        INPUT = 'INPUT',
+
+      // private methods
+      keyHandler = function(e){
+        var key = e.which || e.keyCode;
+        key === 32 && e[target] === DOC.activeElement && toggle(e);
+      },
+      preventScroll = function(e){
+        var key = e.which || e.keyCode;
+        key === 32 && e[preventDefault]();
+      },
+      toggle = function(e) {
+        var label = e[target].tagName === LABEL ? e[target] : e[target][parentNode].tagName === LABEL ? e[target][parentNode] : null; // the .btn label
+
+        if ( !label ) return; //react if a label or its immediate child is clicked
+
+        var eventTarget = e[target], // the button itself, the target of the handler function
+          labels = getElementsByClassName(eventTarget[parentNode],'btn'), // all the button group buttons
+          input = label[getElementsByTagName](INPUT)[0];
+
+        if ( !input ) return; //return if no input found
+
+        // manage the dom manipulation
+        if ( input.type === 'checkbox' ) { //checkboxes
+          if ( !input[checked] ) {
+            addClass(label,active);
+            input[getAttribute](checked);
+            input[setAttribute](checked,checked);
+            input[checked] = true;
+          } else {
+            removeClass(label,active);
+            input[getAttribute](checked);
+            input.removeAttribute(checked);
+            input[checked] = false;
+          }
+
+          if (!toggled) { // prevent triggering the event twice
+            toggled = true;
+            bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
+            bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
+          }
+        }
+
+        if ( input.type === 'radio' && !toggled ) { // radio buttons
+          if ( !input[checked] ) { // don't trigger if already active
+            addClass(label,active);
+            input[setAttribute](checked,checked);
+            input[checked] = true;
+            bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
+            bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
+
+            toggled = true;
+            for (var i = 0, ll = labels[length]; i<ll; i++) {
+              var otherLabel = labels[i], otherInput = otherLabel[getElementsByTagName](INPUT)[0];
+              if ( otherLabel !== label && hasClass(otherLabel,active) )  {
+                removeClass(otherLabel,active);
+                otherInput.removeAttribute(checked);
+                otherInput[checked] = false;
+                bootstrapCustomEvent.call(otherInput, changeEvent, component); // trigger the change
+              }
+            }
+          }
+        }
+        setTimeout( function() { toggled = false; }, 50 );
+      };
+
+    // init
+    if ( !( stringButton in element ) ) { // prevent adding event handlers twice
+      on( element, clickEvent, toggle );
+      queryElement('['+tabindex+']',element) && on( element, keyupEvent, keyHandler ),
+                                                on( element, keydownEvent, preventScroll );
+    }
+
+    // activate items on load
+    var labelsToACtivate = getElementsByClassName(element, 'btn'), lbll = labelsToACtivate[length];
+    for (var i=0; i<lbll; i++) {
+      !hasClass(labelsToACtivate[i],active) && queryElement('input:checked',labelsToACtivate[i])
+                                            && addClass(labelsToACtivate[i],active);
+    }
+    element[stringButton] = this;
+  };
+
+  // BUTTON DATA API
+  // =================
+  supports[push]( [ stringButton, Button, '['+dataToggle+'="buttons"]' ] );
+
+
+  /* Native Javascript for Bootstrap 4 | Collapse
+  -----------------------------------------------*/
+
+  // COLLAPSE DEFINITION
+  // ===================
+  var Collapse = function( element, options ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // set options
+    options = options || {};
+
+    // event targets and constants
+    var accordion = null, collapse = null, self = this,
+      accordionData = element[getAttribute]('data-parent'),
+      activeCollapse, activeElement,
+
+      // component strings
+      component = 'collapse',
+      collapsed = 'collapsed',
+      isAnimating = 'isAnimating',
+
+      // private methods
+      openAction = function(collapseElement,toggle) {
+        bootstrapCustomEvent.call(collapseElement, showEvent, component);
+        collapseElement[isAnimating] = true;
+        addClass(collapseElement,collapsing);
+        removeClass(collapseElement,component);
+        collapseElement[style][height] = collapseElement[scrollHeight] + 'px';
+
+        emulateTransitionEnd(collapseElement, function() {
+          collapseElement[isAnimating] = false;
+          collapseElement[setAttribute](ariaExpanded,'true');
+          toggle[setAttribute](ariaExpanded,'true');
+          removeClass(collapseElement,collapsing);
+          addClass(collapseElement, component);
+          addClass(collapseElement,showClass);
+          collapseElement[style][height] = '';
+          bootstrapCustomEvent.call(collapseElement, shownEvent, component);
+        });
+      },
+      closeAction = function(collapseElement,toggle) {
+        bootstrapCustomEvent.call(collapseElement, hideEvent, component);
+        collapseElement[isAnimating] = true;
+        collapseElement[style][height] = collapseElement[scrollHeight] + 'px'; // set height first
+        removeClass(collapseElement,component);
+        removeClass(collapseElement,showClass);
+        addClass(collapseElement,collapsing);
+        collapseElement[offsetWidth]; // force reflow to enable transition
+        collapseElement[style][height] = '0px';
+
+        emulateTransitionEnd(collapseElement, function() {
+          collapseElement[isAnimating] = false;
+          collapseElement[setAttribute](ariaExpanded,'false');
+          toggle[setAttribute](ariaExpanded,'false');
+          removeClass(collapseElement,collapsing);
+          addClass(collapseElement,component);
+          collapseElement[style][height] = '';
+          bootstrapCustomEvent.call(collapseElement, hiddenEvent, component);
+        });
+      },
+      getTarget = function() {
+        var href = element.href && element[getAttribute]('href'),
+          parent = element[getAttribute](dataTarget),
+          id = href || ( parent && parent.charAt(0) === '#' ) && parent;
+        return id && queryElement(id);
+      };
+
+    // public methods
+    this.toggle = function(e) {
+      e[preventDefault]();
+      if (!hasClass(collapse,showClass)) { self.show(); }
+      else { self.hide(); }
+    };
+    this.hide = function() {
+      if ( collapse[isAnimating] ) return;
+      closeAction(collapse,element);
+      addClass(element,collapsed);
+    };
+    this.show = function() {
+      if ( accordion ) {
+        activeCollapse = queryElement('.'+component+'.'+showClass,accordion);
+        activeElement = activeCollapse && (queryElement('['+dataTarget+'="#'+activeCollapse.id+'"]',accordion)
+                      || queryElement('[href="#'+activeCollapse.id+'"]',accordion) );
+      }
+
+      if ( !collapse[isAnimating] || activeCollapse && !activeCollapse[isAnimating] ) {
+        if ( activeElement && activeCollapse !== collapse ) {
+          closeAction(activeCollapse,activeElement);
+          addClass(activeElement,collapsed);
+        }
+        openAction(collapse,element);
+        removeClass(element,collapsed);
+      }
+    };
+
+    // init
+    if ( !(stringCollapse in element ) ) { // prevent adding event handlers twice
+      on(element, clickEvent, self.toggle);
+    }
+    collapse = getTarget();
+    collapse[isAnimating] = false;  // when true it will prevent click handlers
+    accordion = queryElement(options.parent) || accordionData && getClosest(element, accordionData);
+    element[stringCollapse] = self;
+  };
+
+  // COLLAPSE DATA API
+  // =================
+  supports[push]( [ stringCollapse, Collapse, '['+dataToggle+'="collapse"]' ] );
+
+
+  /* Native Javascript for Bootstrap 4 | Dropdown
+  ----------------------------------------------*/
+
+  // DROPDOWN DEFINITION
+  // ===================
+  var Dropdown = function( element, option ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // set option
+    this.persist = option === true || element[getAttribute]('data-persist') === 'true' || false;
+
+    // constants, event targets, strings
+    var self = this, children = 'children',
+      parent = element[parentNode],
+      component = 'dropdown', open = 'open',
+      relatedTarget = null,
+      menu = queryElement('.dropdown-menu', parent),
+      menuItems = (function(){
+        var set = menu[children], newSet = [];
+        for ( var i=0; i<set[length]; i++ ){
+          set[i][children][length] && (set[i][children][0].tagName === 'A' && newSet[push](set[i][children][0]));
+          set[i].tagName === 'A' && newSet[push](set[i]);
+        }
+        return newSet;
+      })(),
+
+      // preventDefault on empty anchor links
+      preventEmptyAnchor = function(anchor){
+        (anchor.href && anchor.href.slice(-1) === '#' || anchor[parentNode] && anchor[parentNode].href
+          && anchor[parentNode].href.slice(-1) === '#') && this[preventDefault]();
+      },
+
+      // toggle dismissible events
+      toggleDismiss = function(){
+        var type = element[open] ? on : off;
+        type(DOC, clickEvent, dismissHandler);
+        type(DOC, keydownEvent, preventScroll);
+        type(DOC, keyupEvent, keyHandler);
+      },
+
+      // handlers
+      dismissHandler = function(e) {
+        var eventTarget = e[target], hasData = eventTarget && (stringDropdown in eventTarget || stringDropdown in eventTarget[parentNode]);
+        if ( (eventTarget === menu || menu[contains](eventTarget)) && (self.persist || hasData) ) { return; }
+        else {
+          relatedTarget = eventTarget === element || element[contains](eventTarget) ? element : null;
+          hide();
+        }
+        preventEmptyAnchor.call(e,eventTarget);
+      },
+      clickHandler = function(e) {
+        relatedTarget = element;
+        show();
+        preventEmptyAnchor.call(e,e[target]);
+      },
+      preventScroll = function(e){
+        var key = e.which || e.keyCode;
+        if( key === 38 || key === 40 ) { e[preventDefault](); }
+      },
+      keyHandler = function(e){
+        var key = e.which || e.keyCode,
+          activeItem = DOC.activeElement,
+          idx = menuItems[indexOf](activeItem),
+          isSameElement = activeItem === element,
+          isInsideMenu = menu[contains](activeItem),
+          isMenuItem = activeItem[parentNode] === menu || activeItem[parentNode][parentNode] === menu;
+
+        if ( isMenuItem || isSameElement ) { // navigate up | down
+          idx = isSameElement ? 0
+                              : key === 38 ? (idx>1?idx-1:0)
+                              : key === 40 ? (idx<menuItems[length]-1?idx+1:idx) : idx;
+          menuItems[idx] && setFocus(menuItems[idx]);
+        }
+        if ( (menuItems[length] && isMenuItem // menu has items
+              || !menuItems[length] && (isInsideMenu || isSameElement)  // menu might be a form
+              || !isInsideMenu ) // or the focused element is not in the menu at all
+              && element[open] && key === 27  // menu must be open
+        ) {
+          self.toggle();
+          relatedTarget = null;
+        }
+      },
+
+      // private methods
+      show = function() {
+        bootstrapCustomEvent.call(parent, showEvent, component, relatedTarget);
+        addClass(menu,showClass);
+        addClass(parent,showClass);
+        element[setAttribute](ariaExpanded,true);
+        bootstrapCustomEvent.call(parent, shownEvent, component, relatedTarget);
+        element[open] = true;
+        off(element, clickEvent, clickHandler);
+        setTimeout(function(){
+          setFocus( menu[getElementsByTagName]('INPUT')[0] || element ); // focus the first input item | element
+          toggleDismiss();
+        },1);
+      },
+      hide = function() {
+        bootstrapCustomEvent.call(parent, hideEvent, component, relatedTarget);
+        removeClass(menu,showClass);
+        removeClass(parent,showClass);
+        element[setAttribute](ariaExpanded,false);
+        bootstrapCustomEvent.call(parent, hiddenEvent, component, relatedTarget);
+        element[open] = false;
+        toggleDismiss();
+        setFocus(element);
+        setTimeout(function(){ on(element, clickEvent, clickHandler); },1);
+      };
+
+    // set initial state to closed
+    element[open] = false;
+
+    // public methods
+    this.toggle = function() {
+      if (hasClass(parent,showClass) && element[open]) { hide(); }
+      else { show(); }
+    };
+
+    // init
+    if ( !(stringDropdown in element) ) { // prevent adding event handlers twice
+      !tabindex in menu && menu[setAttribute](tabindex, '0'); // Fix onblur on Chrome | Safari
+      on(element, clickEvent, clickHandler);
+    }
+
+    element[stringDropdown] = self;
+  };
+
+  // DROPDOWN DATA API
+  // =================
+  supports[push]( [stringDropdown, Dropdown, '['+dataToggle+'="dropdown"]'] );
+
+
+  /* Native Javascript for Bootstrap 4 | Modal
+  -------------------------------------------*/
+
+  // MODAL DEFINITION
+  // ===============
+  var Modal = function(element, options) { // element can be the modal/triggering button
+
+    // the modal (both JavaScript / DATA API init) / triggering button element (DATA API)
+    element = queryElement(element);
+
+      // strings
+      var component = 'modal',
+        staticString = 'static',
+        modalTrigger = 'modalTrigger',
+        paddingRight = 'paddingRight',
+        modalBackdropString = 'modal-backdrop',
+        // determine modal, triggering element
+        btnCheck = element[getAttribute](dataTarget)||element[getAttribute]('href'),
+        checkModal = queryElement( btnCheck ),
+        modal = hasClass(element,component) ? element : checkModal;
+
+      if ( hasClass(element, component) ) { element = null; } // modal is now independent of it's triggering element
+
+    if ( !modal ) { return; } // invalidate
+
+    // set options
+    options = options || {};
+
+    this[keyboard] = options[keyboard] === false || modal[getAttribute](dataKeyboard) === 'false' ? false : true;
+    this[backdrop] = options[backdrop] === staticString || modal[getAttribute](databackdrop) === staticString ? staticString : true;
+    this[backdrop] = options[backdrop] === false || modal[getAttribute](databackdrop) === 'false' ? false : this[backdrop];
+    this[content]  = options[content]; // JavaScript only
+
+    // bind, constants, event targets and other vars
+    var self = this, relatedTarget = null,
+      bodyIsOverflowing, scrollBarWidth, overlay, overlayDelay,
+
+      // also find fixed-top / fixed-bottom items
+      fixedItems = getElementsByClassName(HTML,fixedTop).concat(getElementsByClassName(HTML,fixedBottom)),
+
+      // private methods
+      getWindowWidth = function() {
+        var htmlRect = HTML[getBoundingClientRect]();
+        return globalObject[innerWidth] || (htmlRect[right] - Math.abs(htmlRect[left]));
+      },
+      setScrollbar = function () {
+        var bodyStyle = globalObject[getComputedStyle](DOC[body]),
+            bodyPad = parseInt((bodyStyle[paddingRight]), 10), itemPad;
+        if (bodyIsOverflowing) {
+          DOC[body][style][paddingRight] = (bodyPad + scrollBarWidth) + 'px';
+          modal[style][paddingRight] = scrollBarWidth+'px';
+          if (fixedItems[length]){
+            for (var i = 0; i < fixedItems[length]; i++) {
+              itemPad = globalObject[getComputedStyle](fixedItems[i])[paddingRight];
+              fixedItems[i][style][paddingRight] = ( parseInt(itemPad) + scrollBarWidth) + 'px';
+            }
+          }
+        }
+      },
+      resetScrollbar = function () {
+        DOC[body][style][paddingRight] = '';
+        modal[style][paddingRight] = '';
+        if (fixedItems[length]){
+          for (var i = 0; i < fixedItems[length]; i++) {
+            fixedItems[i][style][paddingRight] = '';
+          }
+        }
+      },
+      measureScrollbar = function () { // thx walsh
+        var scrollDiv = DOC[createElement]('div'), widthValue;
+        scrollDiv.className = component+'-scrollbar-measure'; // this is here to stay
+        DOC[body][appendChild](scrollDiv);
+        widthValue = scrollDiv[offsetWidth] - scrollDiv[clientWidth];
+        DOC[body].removeChild(scrollDiv);
+        return widthValue;
+      },
+      checkScrollbar = function () {
+        bodyIsOverflowing = DOC[body][clientWidth] < getWindowWidth();
+        scrollBarWidth = measureScrollbar();
+      },
+      createOverlay = function() {
+        modalOverlay = 1;
+
+        var newOverlay = DOC[createElement]('div');
+        overlay = queryElement('.'+modalBackdropString);
+
+        if ( overlay === null ) {
+          newOverlay[setAttribute]('class',modalBackdropString+' fade');
+          overlay = newOverlay;
+          DOC[body][appendChild](overlay);
+        }
+      },
+      removeOverlay = function() {
+        overlay = queryElement('.'+modalBackdropString);
+        if ( overlay && overlay !== null && typeof overlay === 'object' ) {
+          modalOverlay = 0;
+          DOC[body].removeChild(overlay); overlay = null;
+        }
+        bootstrapCustomEvent.call(modal, hiddenEvent, component);
+      },
+      keydownHandlerToggle = function() {
+        if (hasClass(modal,showClass)) {
+          on(DOC, keydownEvent, keyHandler);
+        } else {
+          off(DOC, keydownEvent, keyHandler);
+        }
+      },
+      resizeHandlerToggle = function() {
+        if (hasClass(modal,showClass)) {
+          on(globalObject, resizeEvent, self.update);
+        } else {
+          off(globalObject, resizeEvent, self.update);
+        }
+      },
+      dismissHandlerToggle = function() {
+        if (hasClass(modal,showClass)) {
+          on(modal, clickEvent, dismissHandler);
+        } else {
+          off(modal, clickEvent, dismissHandler);
+        }
+      },
+      // triggers
+      triggerShow = function() {
+        resizeHandlerToggle();
+        dismissHandlerToggle();
+        keydownHandlerToggle();
+        setFocus(modal);
+        bootstrapCustomEvent.call(modal, shownEvent, component, relatedTarget);
+      },
+      triggerHide = function() {
+        modal[style].display = '';
+        element && (setFocus(element));
+
+        (function(){
+          if (!getElementsByClassName(DOC,component+' '+showClass)[0]) {
+            resetScrollbar();
+            removeClass(DOC[body],component+'-open');
+            overlay && hasClass(overlay,'fade') ? (removeClass(overlay,showClass), emulateTransitionEnd(overlay,removeOverlay))
+            : removeOverlay();
+
+            resizeHandlerToggle();
+            dismissHandlerToggle();
+            keydownHandlerToggle();
+          }
+        }());
+      },
+      // handlers
+      clickHandler = function(e) {
+        var clickTarget = e[target];
+        clickTarget = clickTarget[hasAttribute](dataTarget) || clickTarget[hasAttribute]('href') ? clickTarget : clickTarget[parentNode];
+        if ( clickTarget === element && !hasClass(modal,showClass) ) {
+          modal[modalTrigger] = element;
+          relatedTarget = element;
+          self.show();
+          e[preventDefault]();
+        }
+      },
+      keyHandler = function(e) {
+        if (self[keyboard] && e.which == 27 && hasClass(modal,showClass)) {
+          self.hide();
+        }
+      },
+      dismissHandler = function(e) {
+        var clickTarget = e[target];
+        if ( hasClass(modal,showClass) && (clickTarget[parentNode][getAttribute](dataDismiss) === component
+            || clickTarget[getAttribute](dataDismiss) === component
+            || (clickTarget === modal && self[backdrop] !== staticString) ) ) {
+          self.hide(); relatedTarget = null;
+          e[preventDefault]();
+        }
+      };
+
+    // public methods
+    this.toggle = function() {
+      if ( hasClass(modal,showClass) ) {this.hide();} else {this.show();}
+    };
+    this.show = function() {
+      bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget);
+
+      // we elegantly hide any opened modal
+      var currentOpen = getElementsByClassName(DOC,component+' '+showClass)[0];
+      if (currentOpen && currentOpen !== modal) {
+        modalTrigger in currentOpen && currentOpen[modalTrigger][stringModal].hide();
+        stringModal in currentOpen && currentOpen[stringModal].hide();
+      }
+
+      if ( this[backdrop] ) {
+        !modalOverlay && createOverlay();
+      }
+
+      if ( overlay && modalOverlay && !hasClass(overlay,showClass)) {
+        overlay[offsetWidth]; // force reflow to enable trasition
+        overlayDelay = getTransitionDurationFromElement(overlay);
+        addClass(overlay, showClass);
+      }
+
+      setTimeout( function() {
+        modal[style].display = 'block';
+
+        checkScrollbar();
+        setScrollbar();
+
+        addClass(DOC[body],component+'-open');
+        addClass(modal,showClass);
+        modal[setAttribute](ariaHidden, false);
+
+        hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow();
+      }, supportTransitions && overlay ? overlayDelay : 0);
+    };
+    this.hide = function() {
+      bootstrapCustomEvent.call(modal, hideEvent, component);
+      overlay = queryElement('.'+modalBackdropString);
+      overlayDelay = overlay && getTransitionDurationFromElement(overlay);
+
+      removeClass(modal,showClass);
+      modal[setAttribute](ariaHidden, true);
+
+      setTimeout(function(){
+        hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide();
+      }, supportTransitions && overlay ? overlayDelay : 0);
+    };
+    this.setContent = function( content ) {
+      queryElement('.'+component+'-content',modal)[innerHTML] = content;
+    };
+    this.update = function() {
+      if (hasClass(modal,showClass)) {
+        checkScrollbar();
+        setScrollbar();
+      }
+    };
+
+    // init
+    // prevent adding event handlers over and over
+    // modal is independent of a triggering element
+    if ( !!element && !(stringModal in element) ) {
+      on(element, clickEvent, clickHandler);
+    }
+    if ( !!self[content] ) { self.setContent( self[content] ); }
+    if (element) { element[stringModal] = self; modal[modalTrigger] = element; }
+    else { modal[stringModal] = self; }
+  };
+
+  // DATA API
+  supports[push]( [ stringModal, Modal, '['+dataToggle+'="modal"]' ] );
+
+  /* Native Javascript for Bootstrap 4 | Popover
+  ----------------------------------------------*/
+
+  // POPOVER DEFINITION
+  // ==================
+  var Popover = function( element, options ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // set options
+    options = options || {};
+
+    // DATA API
+    var triggerData = element[getAttribute](dataTrigger), // click / hover / focus
+        animationData = element[getAttribute](dataAnimation), // true / false
+        placementData = element[getAttribute](dataPlacement),
+        dismissibleData = element[getAttribute](dataDismissible),
+        delayData = element[getAttribute](dataDelay),
+        containerData = element[getAttribute](dataContainer),
+
+        // internal strings
+        component = 'popover',
+        template = 'template',
+        trigger = 'trigger',
+        classString = 'class',
+        div = 'div',
+        fade = 'fade',
+        dataContent = 'data-content',
+        dismissible = 'dismissible',
+        closeBtn = '<button type="button" class="close">×</button>',
+
+        // check container
+        containerElement = queryElement(options[container]),
+        containerDataElement = queryElement(containerData),
+
+        // maybe the element is inside a modal
+        modal = getClosest(element,'.modal'),
+
+        // maybe the element is inside a fixed navbar
+        navbarFixedTop = getClosest(element,'.'+fixedTop),
+        navbarFixedBottom = getClosest(element,'.'+fixedBottom);
+
+    // set instance options
+    this[template] = options[template] ? options[template] : null; // JavaScript only
+    this[trigger] = options[trigger] ? options[trigger] : triggerData || hoverEvent;
+    this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
+    this[placement] = options[placement] ? options[placement] : placementData || top;
+    this[delay] = parseInt(options[delay] || delayData) || 200;
+    this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false;
+    this[container] = containerElement ? containerElement
+                    : containerDataElement ? containerDataElement
+                    : navbarFixedTop ? navbarFixedTop
+                    : navbarFixedBottom ? navbarFixedBottom
+                    : modal ? modal : DOC[body];
+
+    // bind, content
+    var self = this,
+      titleString = element[getAttribute](dataTitle) || null,
+      contentString = element[getAttribute](dataContent) || null;
+
+    if ( !contentString && !this[template] ) return; // invalidate
+
+    // constants, vars
+    var popover = null, timer = 0, placementSetting = this[placement],
+
+      // handlers
+      dismissibleHandler = function(e) {
+        if (popover !== null && e[target] === queryElement('.close',popover)) {
+          self.hide();
+        }
+      },
+
+      // private methods
+      removePopover = function() {
+        self[container].removeChild(popover);
+        timer = null; popover = null;
+      },
+      createPopover = function() {
+        titleString = options.title || element[getAttribute](dataTitle) || null,
+        contentString = options.content || element[getAttribute](dataContent) || null;
+
+        popover = DOC[createElement](div);
+
+        // popover arrow
+        var popoverArrow = DOC[createElement](div);
+        popoverArrow[setAttribute](classString,'arrow');
+        popover[appendChild](popoverArrow);
+
+        if ( contentString !== null && self[template] === null ) { //create the popover from data attributes
+
+          popover[setAttribute]('role','tooltip');
+
+          if (titleString !== null) {
+            var popoverTitle = DOC[createElement]('h3');
+            popoverTitle[setAttribute](classString,component+'-header');
+
+            popoverTitle[innerHTML] = self[dismissible] ? titleString + closeBtn : titleString;
+            popover[appendChild](popoverTitle);
+          }
+
+          //set popover content
+          var popoverContent = DOC[createElement](div);
+          popoverContent[setAttribute](classString,component+'-body');
+          popoverContent[innerHTML] = self[dismissible] && titleString === null ? contentString + closeBtn : contentString;
+          popover[appendChild](popoverContent);
+
+        } else {  // or create the popover from template
+          var popoverTemplate = DOC[createElement](div);
+          popoverTemplate[innerHTML] = self[template];
+          popover[innerHTML] = popoverTemplate.firstChild[innerHTML];
+        }
+
+        //append to the container
+        self[container][appendChild](popover);
+        popover[style].display = 'block';
+        popover[setAttribute](classString, component+ ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
+      },
+      showPopover = function () {
+        !hasClass(popover,showClass) && ( addClass(popover,showClass) );
+      },
+      updatePopover = function() {
+        styleTip(element,popover,placementSetting,self[container]);
+      },
+
+      // event toggle
+      dismissHandlerToggle = function(type){
+        if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
+          !self[dismissible] && type( element, 'blur', self.hide );
+        }
+        self[dismissible] && type( DOC, clickEvent, dismissibleHandler );
+        type( globalObject, resizeEvent, self.hide );
+      },
+
+      // triggers
+      showTrigger = function() {
+        dismissHandlerToggle(on);
+        bootstrapCustomEvent.call(element, shownEvent, component);
+      },
+      hideTrigger = function() {
+        dismissHandlerToggle(off);
+        removePopover();
+        bootstrapCustomEvent.call(element, hiddenEvent, component);
+      };
+
+    // public methods / handlers
+    this.toggle = function() {
+      if (popover === null) { self.show(); }
+      else { self.hide(); }
+    };
+    this.show = function() {
+      clearTimeout(timer);
+      timer = setTimeout( function() {
+        if (popover === null) {
+          placementSetting = self[placement]; // we reset placement in all cases
+          createPopover();
+          updatePopover();
+          showPopover();
+          bootstrapCustomEvent.call(element, showEvent, component);
+          !!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger();
+        }
+      }, 20 );
+    };
+    this.hide = function() {
+      clearTimeout(timer);
+      timer = setTimeout( function() {
+        if (popover && popover !== null && hasClass(popover,showClass)) {
+          bootstrapCustomEvent.call(element, hideEvent, component);
+          removeClass(popover,showClass);
+          !!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger();
+        }
+      }, self[delay] );
+    };
+
+    // init
+    if ( !(stringPopover in element) ) { // prevent adding event handlers twice
+      if (self[trigger] === hoverEvent) {
+        on( element, mouseHover[0], self.show );
+        if (!self[dismissible]) { on( element, mouseHover[1], self.hide ); }
+      } else if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
+        on( element, self[trigger], self.toggle );
+      }
+    }
+    element[stringPopover] = self;
+  };
+
+  // POPOVER DATA API
+  // ================
+  supports[push]( [ stringPopover, Popover, '['+dataToggle+'="popover"]' ] );
+
+
+  /* Native Javascript for Bootstrap 4 | Tab
+  -----------------------------------------*/
+
+  // TAB DEFINITION
+  // ==============
+  var Tab = function( element, options ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // DATA API
+    var heightData = element[getAttribute](dataHeight),
+
+        // strings
+        component = 'tab', height = 'height', float = 'float', isAnimating = 'isAnimating';
+
+    // set options
+    options = options || {};
+    this[height] = supportTransitions ? (options[height] || heightData === 'true') : false;
+
+    // bind, event targets
+    var self = this, next,
+      tabs = getClosest(element,'.nav'),
+      tabsContentContainer = false,
+      dropdown = tabs && queryElement('.dropdown-toggle',tabs),
+      activeTab, activeContent, nextContent, containerHeight, equalContents, nextHeight,
+
+      // trigger
+      triggerEnd = function(){
+        tabsContentContainer[style][height] = '';
+        removeClass(tabsContentContainer,collapsing);
+        tabs[isAnimating] = false;
+      },
+      triggerShow = function() {
+        if (tabsContentContainer) { // height animation
+          if ( equalContents ) {
+            triggerEnd();
+          } else {
+            setTimeout(function(){ // enables height animation
+              tabsContentContainer[style][height] = nextHeight + 'px'; // height animation
+              tabsContentContainer[offsetWidth];
+              emulateTransitionEnd(tabsContentContainer, triggerEnd);
+            },50);
+          }
+        } else {
+          tabs[isAnimating] = false;
+        }
+        bootstrapCustomEvent.call(next, shownEvent, component, activeTab);
+      },
+      triggerHide = function() {
+        if (tabsContentContainer) {
+          activeContent[style][float] = left;
+          nextContent[style][float] = left;
+          containerHeight = activeContent[scrollHeight];
+        }
+
+        addClass(nextContent,active);
+        bootstrapCustomEvent.call(next, showEvent, component, activeTab);
+
+        removeClass(activeContent,active);
+        bootstrapCustomEvent.call(activeTab, hiddenEvent, component, next);
+
+        if (tabsContentContainer) {
+          nextHeight = nextContent[scrollHeight];
+          equalContents = nextHeight === containerHeight;
+          addClass(tabsContentContainer,collapsing);
+          tabsContentContainer[style][height] = containerHeight + 'px'; // height animation
+          tabsContentContainer[offsetHeight];
+          activeContent[style][float] = '';
+          nextContent[style][float] = '';
+        }
+
+        if ( hasClass(nextContent, 'fade') ) {
+          setTimeout(function(){
+            addClass(nextContent,showClass);
+            emulateTransitionEnd(nextContent,triggerShow);
+          },20);
+        } else { triggerShow(); }
+      };
+
+    if (!tabs) return; // invalidate
+
+    // set default animation state
+    tabs[isAnimating] = false;
+
+    // private methods
+    var getActiveTab = function() {
+        var activeTabs = getElementsByClassName(tabs,active), activeTab;
+        if ( activeTabs[length] === 1 && !hasClass(activeTabs[0][parentNode],'dropdown') ) {
+          activeTab = activeTabs[0];
+        } else if ( activeTabs[length] > 1 ) {
+          activeTab = activeTabs[activeTabs[length]-1];
+        }
+        return activeTab;
+      },
+      getActiveContent = function() {
+        return queryElement(getActiveTab()[getAttribute]('href'));
+      },
+      // handler
+      clickHandler = function(e) {
+        e[preventDefault]();
+        next = e[currentTarget];
+        !tabs[isAnimating] && !hasClass(next,active) && self.show();
+      };
+
+    // public method
+    this.show = function() { // the tab we clicked is now the next tab
+      next = next || element;
+      nextContent = queryElement(next[getAttribute]('href')); //this is the actual object, the next tab content to activate
+      activeTab = getActiveTab();
+      activeContent = getActiveContent();
+
+      tabs[isAnimating] = true;
+      removeClass(activeTab,active);
+      activeTab[setAttribute](ariaSelected,'false');
+      addClass(next,active);
+      next[setAttribute](ariaSelected,'true');
+
+      if ( dropdown ) {
+        if ( !hasClass(element[parentNode],'dropdown-menu') ) {
+          if (hasClass(dropdown,active)) removeClass(dropdown,active);
+        } else {
+          if (!hasClass(dropdown,active)) addClass(dropdown,active);
+        }
+      }
+
+      bootstrapCustomEvent.call(activeTab, hideEvent, component, next);
+
+      if (hasClass(activeContent, 'fade')) {
+        removeClass(activeContent,showClass);
+        emulateTransitionEnd(activeContent, triggerHide);
+      } else { triggerHide(); }
+    };
+
+    // init
+    if ( !(stringTab in element) ) { // prevent adding event handlers twice
+      on(element, clickEvent, clickHandler);
+    }
+    if (self[height]) { tabsContentContainer = getActiveContent()[parentNode]; }
+    element[stringTab] = self;
+  };
+
+  // TAB DATA API
+  // ============
+  supports[push]( [ stringTab, Tab, '['+dataToggle+'="tab"]' ] );
+
+
+  /* Native Javascript for Bootstrap 4 | Toast
+  ---------------------------------------------*/
+
+  // TOAST DEFINITION
+  // ==================
+  var Toast = function( element,options ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // set options
+    options = options || {};
+
+    // DATA API
+    var animationData = element[getAttribute](dataAnimation),
+        autohideData = element[getAttribute](dataAutohide),
+        delayData = element[getAttribute](dataDelay),
+
+        // strings
+        component = 'toast',
+        autohide = 'autohide',
+        animation = 'animation',
+        showing = 'showing',
+        hide = 'hide',
+        fade = 'fade';
+
+    // set instance options
+    this[animation] = options[animation] === false || animationData === 'false' ? 0 : 1; // true by default
+    this[autohide] = options[autohide] === false || autohideData === 'false' ? 0 : 1; // true by default
+    this[delay] = parseInt(options[delay] || delayData) || 500; // 500ms default
+
+    // bind,toast and timer
+    var self = this, timer = 0,
+        // get the toast element
+        toast = getClosest(element,'.toast');
+
+    // private methods
+    // animation complete
+    var showComplete = function() {
+        removeClass( toast, showing );
+        addClass( toast, showClass );
+        bootstrapCustomEvent.call(toast, shownEvent, component);
+        if (self[autohide]) { self.hide(); }
+      },
+      hideComplete = function() {
+        addClass( toast, hide );
+        bootstrapCustomEvent.call(toast, hiddenEvent, component);
+      },
+      close = function() {
+        removeClass( toast,showClass );
+        self[animation] ? emulateTransitionEnd(toast, hideComplete) : hideComplete();
+      },
+      disposeComplete = function(){
+        clearTimeout(timer); timer = null;
+        addClass( toast, hide );
+        off(element, clickEvent, self.hide);
+        element[stringToast] = null;
+        element = null;
+        toast = null;
+      };
+
+    // public methods
+    this.show = function() {
+      if (toast) {
+        bootstrapCustomEvent.call(toast, showEvent, component);
+        self[animation] && addClass( toast,fade );
+        removeClass( toast,hide );
+        addClass( toast,showing );
+
+        self[animation] ? emulateTransitionEnd(toast, showComplete) : showComplete();
+      }
+    };
+    this.hide = function(noTimer) {
+      if (toast && hasClass(toast,showClass)) {
+        bootstrapCustomEvent.call(toast, hideEvent, component);
+
+        if (noTimer) {
+          close();
+        } else {
+          timer = setTimeout( close, self[delay]);
+        }
+      }
+    };
+    this.dispose = function() {
+      if ( toast && hasClass(toast,showClass) ) {
+        removeClass( toast,showClass );
+        self[animation] ? emulateTransitionEnd(toast, disposeComplete) : disposeComplete();
+      }
+    };
+
+    // init
+    if ( !(stringToast in element) ) { // prevent adding event handlers twice
+      on(element, clickEvent, self.hide);
+    }
+    element[stringToast] = self;
+  };
+
+  // TOAST DATA API
+  // =================
+  supports[push]( [ stringToast, Toast, '['+dataDismiss+'="toast"]' ] );
+
+
+  /* Native Javascript for Bootstrap 4 | Tooltip
+  ---------------------------------------------*/
+
+  // TOOLTIP DEFINITION
+  // ==================
+  var Tooltip = function( element,options ) {
+
+    // initialization element
+    element = queryElement(element);
+
+    // set options
+    options = options || {};
+
+    // DATA API
+    var animationData = element[getAttribute](dataAnimation),
+        placementData = element[getAttribute](dataPlacement),
+        delayData = element[getAttribute](dataDelay),
+        containerData = element[getAttribute](dataContainer),
+
+        // strings
+        component = 'tooltip',
+        classString = 'class',
+        title = 'title',
+        fade = 'fade',
+        div = 'div',
+
+        // check container
+        containerElement = queryElement(options[container]),
+        containerDataElement = queryElement(containerData),
+
+        // maybe the element is inside a modal
+        modal = getClosest(element,'.modal'),
+
+        // maybe the element is inside a fixed navbar
+        navbarFixedTop = getClosest(element,'.'+fixedTop),
+        navbarFixedBottom = getClosest(element,'.'+fixedBottom);
+
+    // set instance options
+    this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
+    this[placement] = options[placement] ? options[placement] : placementData || top;
+    this[delay] = parseInt(options[delay] || delayData) || 200;
+    this[container] = containerElement ? containerElement
+                    : containerDataElement ? containerDataElement
+                    : navbarFixedTop ? navbarFixedTop
+                    : navbarFixedBottom ? navbarFixedBottom
+                    : modal ? modal : DOC[body];
+
+    // bind, event targets, title and constants
+    var self = this, timer = 0, placementSetting = this[placement], tooltip = null,
+      titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle);
+
+    if ( !titleString || titleString == "" ) return; // invalidate
+
+    // private methods
+    var removeToolTip = function() {
+        self[container].removeChild(tooltip);
+        tooltip = null; timer = null;
+      },
+      createToolTip = function() {
+        titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle); // read the title again
+        if ( !titleString || titleString == "" ) return false; // invalidate
+        tooltip = DOC[createElement](div);
+        tooltip[setAttribute]('role',component);
+
+        // tooltip arrow
+        var tooltipArrow = DOC[createElement](div);
+        tooltipArrow[setAttribute](classString,'arrow');
+        tooltip[appendChild](tooltipArrow);
+
+        var tooltipInner = DOC[createElement](div);
+        tooltipInner[setAttribute](classString,component+'-inner');
+        tooltip[appendChild](tooltipInner);
+        tooltipInner[innerHTML] = titleString;
+
+        self[container][appendChild](tooltip);
+        tooltip[setAttribute](classString, component + ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
+      },
+      updateTooltip = function () {
+        styleTip(element,tooltip,placementSetting,self[container]);
+      },
+      showTooltip = function () {
+        !hasClass(tooltip,showClass) && ( addClass(tooltip,showClass) );
+      },
+      // triggers
+      showTrigger = function() {
+        on( globalObject, resizeEvent, self.hide );
+        bootstrapCustomEvent.call(element, shownEvent, component);
+      },
+      hideTrigger = function() {
+        off( globalObject, resizeEvent, self.hide );
+        removeToolTip();
+        bootstrapCustomEvent.call(element, hiddenEvent, component);
+      };
+
+    // public methods
+    this.show = function() {
+      clearTimeout(timer);
+      timer = setTimeout( function() {
+        if (tooltip === null) {
+          placementSetting = self[placement]; // we reset placement in all cases
+          if(createToolTip() == false) return;
+          updateTooltip();
+          showTooltip();
+          bootstrapCustomEvent.call(element, showEvent, component);
+          !!self[animation] ? emulateTransitionEnd(tooltip, showTrigger) : showTrigger();
+        }
+      }, 20 );
+    };
+    this.hide = function() {
+      clearTimeout(timer);
+      timer = setTimeout( function() {
+        if (tooltip && hasClass(tooltip,showClass)) {
+          bootstrapCustomEvent.call(element, hideEvent, component);
+          removeClass(tooltip,showClass);
+          !!self[animation] ? emulateTransitionEnd(tooltip, hideTrigger) : hideTrigger();
+        }
+      }, self[delay]);
+    };
+    this.toggle = function() {
+      if (!tooltip) { self.show(); }
+      else { self.hide(); }
+    };
+
+    // init
+    if ( !(stringTooltip in element) ) { // prevent adding event handlers twice
+      element[setAttribute](dataOriginalTitle,titleString);
+      element.removeAttribute(title);
+      on(element, mouseHover[0], self.show);
+      on(element, mouseHover[1], self.hide);
+    }
+    element[stringTooltip] = self;
+  };
+
+  // TOOLTIP DATA API
+  // =================
+  supports[push]( [ stringTooltip, Tooltip, '['+dataToggle+'="tooltip"]' ] );
+
+
+
+  /* Native Javascript for Bootstrap | Initialize Data API
+  --------------------------------------------------------*/
+  var initializeDataAPI = function( constructor, collection ){
+      for (var i=0, l=collection[length]; i<l; i++) {
+        new constructor(collection[i]);
+      }
+    },
+    initCallback = BSN.initCallback = function(lookUp){
+      lookUp = lookUp || DOC;
+      for (var i=0, l=supports[length]; i<l; i++) {
+        initializeDataAPI( supports[i][1], lookUp[querySelectorAll] (supports[i][2]) );
+      }
+    };
+
+  // bulk initialize all components
+  DOC[body] ? initCallback() : on( DOC, 'DOMContentLoaded', function(){ initCallback(); } );
+
+  return {
+    Alert: Alert,
+    Button: Button,
+    Collapse: Collapse,
+    Dropdown: Dropdown,
+    Modal: Modal,
+    Popover: Popover,
+    Tab: Tab,
+    Toast: Toast,
+    Tooltip: Tooltip
+  };
+}));
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+/**
+ * default settings
+ *
+ * @author Zongmin Lei<leizongmin@gmail.com>
+ */
+
+var FilterCSS = require("cssfilter").FilterCSS;
+var getDefaultCSSWhiteList = require("cssfilter").getDefaultWhiteList;
+var _ = require("./util");
+
+function getDefaultWhiteList() {
+  return {
+    a: ["target", "href", "title"],
+    abbr: ["title"],
+    address: [],
+    area: ["shape", "coords", "href", "alt"],
+    article: [],
+    aside: [],
+    audio: ["autoplay", "controls", "loop", "preload", "src"],
+    b: [],
+    bdi: ["dir"],
+    bdo: ["dir"],
+    big: [],
+    blockquote: ["cite"],
+    br: [],
+    caption: [],
+    center: [],
+    cite: [],
+    code: [],
+    col: ["align", "valign", "span", "width"],
+    colgroup: ["align", "valign", "span", "width"],
+    dd: [],
+    del: ["datetime"],
+    details: ["open"],
+    div: [],
+    dl: [],
+    dt: [],
+    em: [],
+    font: ["color", "size", "face"],
+    footer: [],
+    h1: [],
+    h2: [],
+    h3: [],
+    h4: [],
+    h5: [],
+    h6: [],
+    header: [],
+    hr: [],
+    i: [],
+    img: ["src", "alt", "title", "width", "height"],
+    ins: ["datetime"],
+    li: [],
+    mark: [],
+    nav: [],
+    ol: [],
+    p: [],
+    pre: [],
+    s: [],
+    section: [],
+    small: [],
+    span: [],
+    sub: [],
+    sup: [],
+    strong: [],
+    table: ["width", "border", "align", "valign"],
+    tbody: ["align", "valign"],
+    td: ["width", "rowspan", "colspan", "align", "valign"],
+    tfoot: ["align", "valign"],
+    th: ["width", "rowspan", "colspan", "align", "valign"],
+    thead: ["align", "valign"],
+    tr: ["rowspan", "align", "valign"],
+    tt: [],
+    u: [],
+    ul: [],
+    video: ["autoplay", "controls", "loop", "preload", "src", "height", "width"]
+  };
+}
+
+var defaultCSSFilter = new FilterCSS();
+
+/**
+ * default onTag function
+ *
+ * @param {String} tag
+ * @param {String} html
+ * @param {Object} options
+ * @return {String}
+ */
+function onTag(tag, html, options) {
+  // do nothing
+}
+
+/**
+ * default onIgnoreTag function
+ *
+ * @param {String} tag
+ * @param {String} html
+ * @param {Object} options
+ * @return {String}
+ */
+function onIgnoreTag(tag, html, options) {
+  // do nothing
+}
+
+/**
+ * default onTagAttr function
+ *
+ * @param {String} tag
+ * @param {String} name
+ * @param {String} value
+ * @return {String}
+ */
+function onTagAttr(tag, name, value) {
+  // do nothing
+}
+
+/**
+ * default onIgnoreTagAttr function
+ *
+ * @param {String} tag
+ * @param {String} name
+ * @param {String} value
+ * @return {String}
+ */
+function onIgnoreTagAttr(tag, name, value) {
+  // do nothing
+}
+
+/**
+ * default escapeHtml function
+ *
+ * @param {String} html
+ */
+function escapeHtml(html) {
+  return html.replace(REGEXP_LT, "&lt;").replace(REGEXP_GT, "&gt;");
+}
+
+/**
+ * default safeAttrValue function
+ *
+ * @param {String} tag
+ * @param {String} name
+ * @param {String} value
+ * @param {Object} cssFilter
+ * @return {String}
+ */
+function safeAttrValue(tag, name, value, cssFilter) {
+  // unescape attribute value firstly
+  value = friendlyAttrValue(value);
+
+  if (name === "href" || name === "src") {
+    // filter `href` and `src` attribute
+    // only allow the value that starts with `http://` | `https://` | `mailto:` | `/` | `#`
+    value = _.trim(value);
+    if (value === "#") return "#";
+    if (
+      !(
+        value.substr(0, 7) === "http://" ||
+        value.substr(0, 8) === "https://" ||
+        value.substr(0, 7) === "mailto:" ||
+        value.substr(0, 4) === "tel:" ||
+        value[0] === "#" ||
+        value[0] === "/"
+      )
+    ) {
+      return "";
+    }
+  } else if (name === "background") {
+    // filter `background` attribute (maybe no use)
+    // `javascript:`
+    REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
+    if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
+      return "";
+    }
+  } else if (name === "style") {
+    // `expression()`
+    REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
+    if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
+      return "";
+    }
+    // `url()`
+    REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
+    if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
+      REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
+      if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
+        return "";
+      }
+    }
+    if (cssFilter !== false) {
+      cssFilter = cssFilter || defaultCSSFilter;
+      value = cssFilter.process(value);
+    }
+  }
+
+  // escape `<>"` before returns
+  value = escapeAttrValue(value);
+  return value;
+}
+
+// RegExp list
+var REGEXP_LT = /</g;
+var REGEXP_GT = />/g;
+var REGEXP_QUOTE = /"/g;
+var REGEXP_QUOTE_2 = /&quot;/g;
+var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
+var REGEXP_ATTR_VALUE_COLON = /&colon;?/gim;
+var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
+var REGEXP_DEFAULT_ON_TAG_ATTR_3 = /\/\*|\*\//gm;
+var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi;
+var REGEXP_DEFAULT_ON_TAG_ATTR_5 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:/gi;
+var REGEXP_DEFAULT_ON_TAG_ATTR_6 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:\s*image\//gi;
+var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
+var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
+
+/**
+ * escape doube quote
+ *
+ * @param {String} str
+ * @return {String} str
+ */
+function escapeQuote(str) {
+  return str.replace(REGEXP_QUOTE, "&quot;");
+}
+
+/**
+ * unescape double quote
+ *
+ * @param {String} str
+ * @return {String} str
+ */
+function unescapeQuote(str) {
+  return str.replace(REGEXP_QUOTE_2, '"');
+}
+
+/**
+ * escape html entities
+ *
+ * @param {String} str
+ * @return {String}
+ */
+function escapeHtmlEntities(str) {
+  return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str, code) {
+    return code[0] === "x" || code[0] === "X"
+      ? String.fromCharCode(parseInt(code.substr(1), 16))
+      : String.fromCharCode(parseInt(code, 10));
+  });
+}
+
+/**
+ * escape html5 new danger entities
+ *
+ * @param {String} str
+ * @return {String}
+ */
+function escapeDangerHtml5Entities(str) {
+  return str
+    .replace(REGEXP_ATTR_VALUE_COLON, ":")
+    .replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
+}
+
+/**
+ * clear nonprintable characters
+ *
+ * @param {String} str
+ * @return {String}
+ */
+function clearNonPrintableCharacter(str) {
+  var str2 = "";
+  for (var i = 0, len = str.length; i < len; i++) {
+    str2 += str.charCodeAt(i) < 32 ? " " : str.charAt(i);
+  }
+  return _.trim(str2);
+}
+
+/**
+ * get friendly attribute value
+ *
+ * @param {String} str
+ * @return {String}
+ */
+function friendlyAttrValue(str) {
+  str = unescapeQuote(str);
+  str = escapeHtmlEntities(str);
+  str = escapeDangerHtml5Entities(str);
+  str = clearNonPrintableCharacter(str);
+  return str;
+}
+
+/**
+ * unescape attribute value
+ *
+ * @param {String} str
+ * @return {String}
+ */
+function escapeAttrValue(str) {
+  str = escapeQuote(str);
+  str = escapeHtml(str);
+  return str;
+}
+
+/**
+ * `onIgnoreTag` function for removing all the tags that are not in whitelist
+ */
+function onIgnoreTagStripAll() {
+  return "";
+}
+
+/**
+ * remove tag body
+ * specify a `tags` list, if the tag is not in the `tags` list then process by the specify function (optional)
+ *
+ * @param {array} tags
+ * @param {function} next
+ */
+function StripTagBody(tags, next) {
+  if (typeof next !== "function") {
+    next = function() {};
+  }
+
+  var isRemoveAllTag = !Array.isArray(tags);
+  function isRemoveTag(tag) {
+    if (isRemoveAllTag) return true;
+    return _.indexOf(tags, tag) !== -1;
+  }
+
+  var removeList = [];
+  var posStart = false;
+
+  return {
+    onIgnoreTag: function(tag, html, options) {
+      if (isRemoveTag(tag)) {
+        if (options.isClosing) {
+          var ret = "[/removed]";
+          var end = options.position + ret.length;
+          removeList.push([
+            posStart !== false ? posStart : options.position,
+            end
+          ]);
+          posStart = false;
+          return ret;
+        } else {
+          if (!posStart) {
+            posStart = options.position;
+          }
+          return "[removed]";
+        }
+      } else {
+        return next(tag, html, options);
+      }
+    },
+    remove: function(html) {
+      var rethtml = "";
+      var lastPos = 0;
+      _.forEach(removeList, function(pos) {
+        rethtml += html.slice(lastPos, pos[0]);
+        lastPos = pos[1];
+      });
+      rethtml += html.slice(lastPos);
+      return rethtml;
+    }
+  };
+}
+
+/**
+ * remove html comments
+ *
+ * @param {String} html
+ * @return {String}
+ */
+function stripCommentTag(html) {
+  return html.replace(STRIP_COMMENT_TAG_REGEXP, "");
+}
+var STRIP_COMMENT_TAG_REGEXP = /<!--[\s\S]*?-->/g;
+
+/**
+ * remove invisible characters
+ *
+ * @param {String} html
+ * @return {String}
+ */
+function stripBlankChar(html) {
+  var chars = html.split("");
+  chars = chars.filter(function(char) {
+    var c = char.charCodeAt(0);
+    if (c === 127) return false;
+    if (c <= 31) {
+      if (c === 10 || c === 13) return true;
+      return false;
+    }
+    return true;
+  });
+  return chars.join("");
+}
+
+exports.whiteList = getDefaultWhiteList();
+exports.getDefaultWhiteList = getDefaultWhiteList;
+exports.onTag = onTag;
+exports.onIgnoreTag = onIgnoreTag;
+exports.onTagAttr = onTagAttr;
+exports.onIgnoreTagAttr = onIgnoreTagAttr;
+exports.safeAttrValue = safeAttrValue;
+exports.escapeHtml = escapeHtml;
+exports.escapeQuote = escapeQuote;
+exports.unescapeQuote = unescapeQuote;
+exports.escapeHtmlEntities = escapeHtmlEntities;
+exports.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
+exports.clearNonPrintableCharacter = clearNonPrintableCharacter;
+exports.friendlyAttrValue = friendlyAttrValue;
+exports.escapeAttrValue = escapeAttrValue;
+exports.onIgnoreTagStripAll = onIgnoreTagStripAll;
+exports.StripTagBody = StripTagBody;
+exports.stripCommentTag = stripCommentTag;
+exports.stripBlankChar = stripBlankChar;
+exports.cssFilter = defaultCSSFilter;
+exports.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
+
+},{"./util":4,"cssfilter":8}],2:[function(require,module,exports){
+/**
+ * xss
+ *
+ * @author Zongmin Lei<leizongmin@gmail.com>
+ */
+
+var DEFAULT = require("./default");
+var parser = require("./parser");
+var FilterXSS = require("./xss");
+
+/**
+ * filter xss function
+ *
+ * @param {String} html
+ * @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }
+ * @return {String}
+ */
+function filterXSS(html, options) {
+  var xss = new FilterXSS(options);
+  return xss.process(html);
+}
+
+exports = module.exports = filterXSS;
+exports.filterXSS = filterXSS;
+exports.FilterXSS = FilterXSS;
+for (var i in DEFAULT) exports[i] = DEFAULT[i];
+for (var i in parser) exports[i] = parser[i];
+
+// using `xss` on the browser, output `filterXSS` to the globals
+if (typeof window !== "undefined") {
+  window.filterXSS = module.exports;
+}
+
+// using `xss` on the WebWorker, output `filterXSS` to the globals
+function isWorkerEnv() {
+  return typeof self !== 'undefined' && typeof DedicatedWorkerGlobalScope !== 'undefined' && self instanceof DedicatedWorkerGlobalScope;
+}
+if (isWorkerEnv()) {
+  self.filterXSS = module.exports;
+}
+
+},{"./default":1,"./parser":3,"./xss":5}],3:[function(require,module,exports){
+/**
+ * Simple HTML Parser
+ *
+ * @author Zongmin Lei<leizongmin@gmail.com>
+ */
+
+var _ = require("./util");
+
+/**
+ * get tag name
+ *
+ * @param {String} html e.g. '<a hef="#">'
+ * @return {String}
+ */
+function getTagName(html) {
+  var i = _.spaceIndex(html);
+  if (i === -1) {
+    var tagName = html.slice(1, -1);
+  } else {
+    var tagName = html.slice(1, i + 1);
+  }
+  tagName = _.trim(tagName).toLowerCase();
+  if (tagName.slice(0, 1) === "/") tagName = tagName.slice(1);
+  if (tagName.slice(-1) === "/") tagName = tagName.slice(0, -1);
+  return tagName;
+}
+
+/**
+ * is close tag?
+ *
+ * @param {String} html 如:'<a hef="#">'
+ * @return {Boolean}
+ */
+function isClosing(html) {
+  return html.slice(0, 2) === "</";
+}
+
+/**
+ * parse input html and returns processed html
+ *
+ * @param {String} html
+ * @param {Function} onTag e.g. function (sourcePosition, position, tag, html, isClosing)
+ * @param {Function} escapeHtml
+ * @return {String}
+ */
+function parseTag(html, onTag, escapeHtml) {
+  "user strict";
+
+  var rethtml = "";
+  var lastPos = 0;
+  var tagStart = false;
+  var quoteStart = false;
+  var currentPos = 0;
+  var len = html.length;
+  var currentTagName = "";
+  var currentHtml = "";
+
+  for (currentPos = 0; currentPos < len; currentPos++) {
+    var c = html.charAt(currentPos);
+    if (tagStart === false) {
+      if (c === "<") {
+        tagStart = currentPos;
+        continue;
+      }
+    } else {
+      if (quoteStart === false) {
+        if (c === "<") {
+          rethtml += escapeHtml(html.slice(lastPos, currentPos));
+          tagStart = currentPos;
+          lastPos = currentPos;
+          continue;
+        }
+        if (c === ">") {
+          rethtml += escapeHtml(html.slice(lastPos, tagStart));
+          currentHtml = html.slice(tagStart, currentPos + 1);
+          currentTagName = getTagName(currentHtml);
+          rethtml += onTag(
+            tagStart,
+            rethtml.length,
+            currentTagName,
+            currentHtml,
+            isClosing(currentHtml)
+          );
+          lastPos = currentPos + 1;
+          tagStart = false;
+          continue;
+        }
+        if ((c === '"' || c === "'") && html.charAt(currentPos - 1) === "=") {
+          quoteStart = c;
+          continue;
+        }
+      } else {
+        if (c === quoteStart) {
+          quoteStart = false;
+          continue;
+        }
+      }
+    }
+  }
+  if (lastPos < html.length) {
+    rethtml += escapeHtml(html.substr(lastPos));
+  }
+
+  return rethtml;
+}
+
+var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9_:\.\-]/gim;
+
+/**
+ * parse input attributes and returns processed attributes
+ *
+ * @param {String} html e.g. `href="#" target="_blank"`
+ * @param {Function} onAttr e.g. `function (name, value)`
+ * @return {String}
+ */
+function parseAttr(html, onAttr) {
+  "user strict";
+
+  var lastPos = 0;
+  var retAttrs = [];
+  var tmpName = false;
+  var len = html.length;
+
+  function addAttr(name, value) {
+    name = _.trim(name);
+    name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
+    if (name.length < 1) return;
+    var ret = onAttr(name, value || "");
+    if (ret) retAttrs.push(ret);
+  }
+
+  // 逐个分析字符
+  for (var i = 0; i < len; i++) {
+    var c = html.charAt(i);
+    var v, j;
+    if (tmpName === false && c === "=") {
+      tmpName = html.slice(lastPos, i);
+      lastPos = i + 1;
+      continue;
+    }
+    if (tmpName !== false) {
+      if (
+        i === lastPos &&
+        (c === '"' || c === "'") &&
+        html.charAt(i - 1) === "="
+      ) {
+        j = html.indexOf(c, i + 1);
+        if (j === -1) {
+          break;
+        } else {
+          v = _.trim(html.slice(lastPos + 1, j));
+          addAttr(tmpName, v);
+          tmpName = false;
+          i = j;
+          lastPos = i + 1;
+          continue;
+        }
+      }
+    }
+    if (/\s|\n|\t/.test(c)) {
+      html = html.replace(/\s|\n|\t/g, " ");
+      if (tmpName === false) {
+        j = findNextEqual(html, i);
+        if (j === -1) {
+          v = _.trim(html.slice(lastPos, i));
+          addAttr(v);
+          tmpName = false;
+          lastPos = i + 1;
+          continue;
+        } else {
+          i = j - 1;
+          continue;
+        }
+      } else {
+        j = findBeforeEqual(html, i - 1);
+        if (j === -1) {
+          v = _.trim(html.slice(lastPos, i));
+          v = stripQuoteWrap(v);
+          addAttr(tmpName, v);
+          tmpName = false;
+          lastPos = i + 1;
+          continue;
+        } else {
+          continue;
+        }
+      }
+    }
+  }
+
+  if (lastPos < html.length) {
+    if (tmpName === false) {
+      addAttr(html.slice(lastPos));
+    } else {
+      addAttr(tmpName, stripQuoteWrap(_.trim(html.slice(lastPos))));
+    }
+  }
+
+  return _.trim(retAttrs.join(" "));
+}
+
+function findNextEqual(str, i) {
+  for (; i < str.length; i++) {
+    var c = str[i];
+    if (c === " ") continue;
+    if (c === "=") return i;
+    return -1;
+  }
+}
+
+function findBeforeEqual(str, i) {
+  for (; i > 0; i--) {
+    var c = str[i];
+    if (c === " ") continue;
+    if (c === "=") return i;
+    return -1;
+  }
+}
+
+function isQuoteWrapString(text) {
+  if (
+    (text[0] === '"' && text[text.length - 1] === '"') ||
+    (text[0] === "'" && text[text.length - 1] === "'")
+  ) {
+    return true;
+  } else {
+    return false;
+  }
+}
+
+function stripQuoteWrap(text) {
+  if (isQuoteWrapString(text)) {
+    return text.substr(1, text.length - 2);
+  } else {
+    return text;
+  }
+}
+
+exports.parseTag = parseTag;
+exports.parseAttr = parseAttr;
+
+},{"./util":4}],4:[function(require,module,exports){
+module.exports = {
+  indexOf: function(arr, item) {
+    var i, j;
+    if (Array.prototype.indexOf) {
+      return arr.indexOf(item);
+    }
+    for (i = 0, j = arr.length; i < j; i++) {
+      if (arr[i] === item) {
+        return i;
+      }
+    }
+    return -1;
+  },
+  forEach: function(arr, fn, scope) {
+    var i, j;
+    if (Array.prototype.forEach) {
+      return arr.forEach(fn, scope);
+    }
+    for (i = 0, j = arr.length; i < j; i++) {
+      fn.call(scope, arr[i], i, arr);
+    }
+  },
+  trim: function(str) {
+    if (String.prototype.trim) {
+      return str.trim();
+    }
+    return str.replace(/(^\s*)|(\s*$)/g, "");
+  },
+  spaceIndex: function(str) {
+    var reg = /\s|\n|\t/;
+    var match = reg.exec(str);
+    return match ? match.index : -1;
+  }
+};
+
+},{}],5:[function(require,module,exports){
+/**
+ * filter xss
+ *
+ * @author Zongmin Lei<leizongmin@gmail.com>
+ */
+
+var FilterCSS = require("cssfilter").FilterCSS;
+var DEFAULT = require("./default");
+var parser = require("./parser");
+var parseTag = parser.parseTag;
+var parseAttr = parser.parseAttr;
+var _ = require("./util");
+
+/**
+ * returns `true` if the input value is `undefined` or `null`
+ *
+ * @param {Object} obj
+ * @return {Boolean}
+ */
+function isNull(obj) {
+  return obj === undefined || obj === null;
+}
+
+/**
+ * get attributes for a tag
+ *
+ * @param {String} html
+ * @return {Object}
+ *   - {String} html
+ *   - {Boolean} closing
+ */
+function getAttrs(html) {
+  var i = _.spaceIndex(html);
+  if (i === -1) {
+    return {
+      html: "",
+      closing: html[html.length - 2] === "/"
+    };
+  }
+  html = _.trim(html.slice(i + 1, -1));
+  var isClosing = html[html.length - 1] === "/";
+  if (isClosing) html = _.trim(html.slice(0, -1));
+  return {
+    html: html,
+    closing: isClosing
+  };
+}
+
+/**
+ * shallow copy
+ *
+ * @param {Object} obj
+ * @return {Object}
+ */
+function shallowCopyObject(obj) {
+  var ret = {};
+  for (var i in obj) {
+    ret[i] = obj[i];
+  }
+  return ret;
+}
+
+/**
+ * FilterXSS class
+ *
+ * @param {Object} options
+ *        whiteList, onTag, onTagAttr, onIgnoreTag,
+ *        onIgnoreTagAttr, safeAttrValue, escapeHtml
+ *        stripIgnoreTagBody, allowCommentTag, stripBlankChar
+ *        css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`
+ */
+function FilterXSS(options) {
+  options = shallowCopyObject(options || {});
+
+  if (options.stripIgnoreTag) {
+    if (options.onIgnoreTag) {
+      console.error(
+        'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
+      );
+    }
+    options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
+  }
+
+  options.whiteList = options.whiteList || DEFAULT.whiteList;
+  options.onTag = options.onTag || DEFAULT.onTag;
+  options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
+  options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
+  options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
+  options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
+  options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
+  this.options = options;
+
+  if (options.css === false) {
+    this.cssFilter = false;
+  } else {
+    options.css = options.css || {};
+    this.cssFilter = new FilterCSS(options.css);
+  }
+}
+
+/**
+ * start process and returns result
+ *
+ * @param {String} html
+ * @return {String}
+ */
+FilterXSS.prototype.process = function(html) {
+  // compatible with the input
+  html = html || "";
+  html = html.toString();
+  if (!html) return "";
+
+  var me = this;
+  var options = me.options;
+  var whiteList = options.whiteList;
+  var onTag = options.onTag;
+  var onIgnoreTag = options.onIgnoreTag;
+  var onTagAttr = options.onTagAttr;
+  var onIgnoreTagAttr = options.onIgnoreTagAttr;
+  var safeAttrValue = options.safeAttrValue;
+  var escapeHtml = options.escapeHtml;
+  var cssFilter = me.cssFilter;
+
+  // remove invisible characters
+  if (options.stripBlankChar) {
+    html = DEFAULT.stripBlankChar(html);
+  }
+
+  // remove html comments
+  if (!options.allowCommentTag) {
+    html = DEFAULT.stripCommentTag(html);
+  }
+
+  // if enable stripIgnoreTagBody
+  var stripIgnoreTagBody = false;
+  if (options.stripIgnoreTagBody) {
+    var stripIgnoreTagBody = DEFAULT.StripTagBody(
+      options.stripIgnoreTagBody,
+      onIgnoreTag
+    );
+    onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;
+  }
+
+  var retHtml = parseTag(
+    html,
+    function(sourcePosition, position, tag, html, isClosing) {
+      var info = {
+        sourcePosition: sourcePosition,
+        position: position,
+        isClosing: isClosing,
+        isWhite: whiteList.hasOwnProperty(tag)
+      };
+
+      // call `onTag()`
+      var ret = onTag(tag, html, info);
+      if (!isNull(ret)) return ret;
+
+      if (info.isWhite) {
+        if (info.isClosing) {
+          return "</" + tag + ">";
+        }
+
+        var attrs = getAttrs(html);
+        var whiteAttrList = whiteList[tag];
+        var attrsHtml = parseAttr(attrs.html, function(name, value) {
+          // call `onTagAttr()`
+          var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
+          var ret = onTagAttr(tag, name, value, isWhiteAttr);
+          if (!isNull(ret)) return ret;
+
+          if (isWhiteAttr) {
+            // call `safeAttrValue()`
+            value = safeAttrValue(tag, name, value, cssFilter);
+            if (value) {
+              return name + '="' + value + '"';
+            } else {
+              return name;
+            }
+          } else {
+            // call `onIgnoreTagAttr()`
+            var ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);
+            if (!isNull(ret)) return ret;
+            return;
+          }
+        });
+
+        // build new tag html
+        var html = "<" + tag;
+        if (attrsHtml) html += " " + attrsHtml;
+        if (attrs.closing) html += " /";
+        html += ">";
+        return html;
+      } else {
+        // call `onIgnoreTag()`
+        var ret = onIgnoreTag(tag, html, info);
+        if (!isNull(ret)) return ret;
+        return escapeHtml(html);
+      }
+    },
+    escapeHtml
+  );
+
+  // if enable stripIgnoreTagBody
+  if (stripIgnoreTagBody) {
+    retHtml = stripIgnoreTagBody.remove(retHtml);
+  }
+
+  return retHtml;
+};
+
+module.exports = FilterXSS;
+
+},{"./default":1,"./parser":3,"./util":4,"cssfilter":8}],6:[function(require,module,exports){
+/**
+ * cssfilter
+ *
+ * @author 老雷<leizongmin@gmail.com>
+ */
+
+var DEFAULT = require('./default');
+var parseStyle = require('./parser');
+var _ = require('./util');
+
+
+/**
+ * 返回值是否为空
+ *
+ * @param {Object} obj
+ * @return {Boolean}
+ */
+function isNull (obj) {
+  return (obj === undefined || obj === null);
+}
+
+/**
+ * 浅拷贝对象
+ *
+ * @param {Object} obj
+ * @return {Object}
+ */
+function shallowCopyObject (obj) {
+  var ret = {};
+  for (var i in obj) {
+    ret[i] = obj[i];
+  }
+  return ret;
+}
+
+/**
+ * 创建CSS过滤器
+ *
+ * @param {Object} options
+ *   - {Object} whiteList
+ *   - {Function} onAttr
+ *   - {Function} onIgnoreAttr
+ *   - {Function} safeAttrValue
+ */
+function FilterCSS (options) {
+  options = shallowCopyObject(options || {});
+  options.whiteList = options.whiteList || DEFAULT.whiteList;
+  options.onAttr = options.onAttr || DEFAULT.onAttr;
+  options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;
+  options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
+  this.options = options;
+}
+
+FilterCSS.prototype.process = function (css) {
+  // 兼容各种奇葩输入
+  css = css || '';
+  css = css.toString();
+  if (!css) return '';
+
+  var me = this;
+  var options = me.options;
+  var whiteList = options.whiteList;
+  var onAttr = options.onAttr;
+  var onIgnoreAttr = options.onIgnoreAttr;
+  var safeAttrValue = options.safeAttrValue;
+
+  var retCSS = parseStyle(css, function (sourcePosition, position, name, value, source) {
+
+    var check = whiteList[name];
+    var isWhite = false;
+    if (check === true) isWhite = check;
+    else if (typeof check === 'function') isWhite = check(value);
+    else if (check instanceof RegExp) isWhite = check.test(value);
+    if (isWhite !== true) isWhite = false;
+
+    // 如果过滤后 value 为空则直接忽略
+    value = safeAttrValue(name, value);
+    if (!value) return;
+
+    var opts = {
+      position: position,
+      sourcePosition: sourcePosition,
+      source: source,
+      isWhite: isWhite
+    };
+
+    if (isWhite) {
+
+      var ret = onAttr(name, value, opts);
+      if (isNull(ret)) {
+        return name + ':' + value;
+      } else {
+        return ret;
+      }
+
+    } else {
+
+      var ret = onIgnoreAttr(name, value, opts);
+      if (!isNull(ret)) {
+        return ret;
+      }
+
+    }
+  });
+
+  return retCSS;
+};
+
+
+module.exports = FilterCSS;
+
+},{"./default":7,"./parser":9,"./util":10}],7:[function(require,module,exports){
+/**
+ * cssfilter
+ *
+ * @author 老雷<leizongmin@gmail.com>
+ */
+
+function getDefaultWhiteList () {
+  // 白名单值说明:
+  // true: 允许该属性
+  // Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许
+  // RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许
+  // 除上面列出的值外均表示不允许
+  var whiteList = {};
+
+  whiteList['align-content'] = false; // default: auto
+  whiteList['align-items'] = false; // default: auto
+  whiteList['align-self'] = false; // default: auto
+  whiteList['alignment-adjust'] = false; // default: auto
+  whiteList['alignment-baseline'] = false; // default: baseline
+  whiteList['all'] = false; // default: depending on individual properties
+  whiteList['anchor-point'] = false; // default: none
+  whiteList['animation'] = false; // default: depending on individual properties
+  whiteList['animation-delay'] = false; // default: 0
+  whiteList['animation-direction'] = false; // default: normal
+  whiteList['animation-duration'] = false; // default: 0
+  whiteList['animation-fill-mode'] = false; // default: none
+  whiteList['animation-iteration-count'] = false; // default: 1
+  whiteList['animation-name'] = false; // default: none
+  whiteList['animation-play-state'] = false; // default: running
+  whiteList['animation-timing-function'] = false; // default: ease
+  whiteList['azimuth'] = false; // default: center
+  whiteList['backface-visibility'] = false; // default: visible
+  whiteList['background'] = true; // default: depending on individual properties
+  whiteList['background-attachment'] = true; // default: scroll
+  whiteList['background-clip'] = true; // default: border-box
+  whiteList['background-color'] = true; // default: transparent
+  whiteList['background-image'] = true; // default: none
+  whiteList['background-origin'] = true; // default: padding-box
+  whiteList['background-position'] = true; // default: 0% 0%
+  whiteList['background-repeat'] = true; // default: repeat
+  whiteList['background-size'] = true; // default: auto
+  whiteList['baseline-shift'] = false; // default: baseline
+  whiteList['binding'] = false; // default: none
+  whiteList['bleed'] = false; // default: 6pt
+  whiteList['bookmark-label'] = false; // default: content()
+  whiteList['bookmark-level'] = false; // default: none
+  whiteList['bookmark-state'] = false; // default: open
+  whiteList['border'] = true; // default: depending on individual properties
+  whiteList['border-bottom'] = true; // default: depending on individual properties
+  whiteList['border-bottom-color'] = true; // default: current color
+  whiteList['border-bottom-left-radius'] = true; // default: 0
+  whiteList['border-bottom-right-radius'] = true; // default: 0
+  whiteList['border-bottom-style'] = true; // default: none
+  whiteList['border-bottom-width'] = true; // default: medium
+  whiteList['border-collapse'] = true; // default: separate
+  whiteList['border-color'] = true; // default: depending on individual properties
+  whiteList['border-image'] = true; // default: none
+  whiteList['border-image-outset'] = true; // default: 0
+  whiteList['border-image-repeat'] = true; // default: stretch
+  whiteList['border-image-slice'] = true; // default: 100%
+  whiteList['border-image-source'] = true; // default: none
+  whiteList['border-image-width'] = true; // default: 1
+  whiteList['border-left'] = true; // default: depending on individual properties
+  whiteList['border-left-color'] = true; // default: current color
+  whiteList['border-left-style'] = true; // default: none
+  whiteList['border-left-width'] = true; // default: medium
+  whiteList['border-radius'] = true; // default: 0
+  whiteList['border-right'] = true; // default: depending on individual properties
+  whiteList['border-right-color'] = true; // default: current color
+  whiteList['border-right-style'] = true; // default: none
+  whiteList['border-right-width'] = true; // default: medium
+  whiteList['border-spacing'] = true; // default: 0
+  whiteList['border-style'] = true; // default: depending on individual properties
+  whiteList['border-top'] = true; // default: depending on individual properties
+  whiteList['border-top-color'] = true; // default: current color
+  whiteList['border-top-left-radius'] = true; // default: 0
+  whiteList['border-top-right-radius'] = true; // default: 0
+  whiteList['border-top-style'] = true; // default: none
+  whiteList['border-top-width'] = true; // default: medium
+  whiteList['border-width'] = true; // default: depending on individual properties
+  whiteList['bottom'] = false; // default: auto
+  whiteList['box-decoration-break'] = true; // default: slice
+  whiteList['box-shadow'] = true; // default: none
+  whiteList['box-sizing'] = true; // default: content-box
+  whiteList['box-snap'] = true; // default: none
+  whiteList['box-suppress'] = true; // default: show
+  whiteList['break-after'] = true; // default: auto
+  whiteList['break-before'] = true; // default: auto
+  whiteList['break-inside'] = true; // default: auto
+  whiteList['caption-side'] = false; // default: top
+  whiteList['chains'] = false; // default: none
+  whiteList['clear'] = true; // default: none
+  whiteList['clip'] = false; // default: auto
+  whiteList['clip-path'] = false; // default: none
+  whiteList['clip-rule'] = false; // default: nonzero
+  whiteList['color'] = true; // default: implementation dependent
+  whiteList['color-interpolation-filters'] = true; // default: auto
+  whiteList['column-count'] = false; // default: auto
+  whiteList['column-fill'] = false; // default: balance
+  whiteList['column-gap'] = false; // default: normal
+  whiteList['column-rule'] = false; // default: depending on individual properties
+  whiteList['column-rule-color'] = false; // default: current color
+  whiteList['column-rule-style'] = false; // default: medium
+  whiteList['column-rule-width'] = false; // default: medium
+  whiteList['column-span'] = false; // default: none
+  whiteList['column-width'] = false; // default: auto
+  whiteList['columns'] = false; // default: depending on individual properties
+  whiteList['contain'] = false; // default: none
+  whiteList['content'] = false; // default: normal
+  whiteList['counter-increment'] = false; // default: none
+  whiteList['counter-reset'] = false; // default: none
+  whiteList['counter-set'] = false; // default: none
+  whiteList['crop'] = false; // default: auto
+  whiteList['cue'] = false; // default: depending on individual properties
+  whiteList['cue-after'] = false; // default: none
+  whiteList['cue-before'] = false; // default: none
+  whiteList['cursor'] = false; // default: auto
+  whiteList['direction'] = false; // default: ltr
+  whiteList['display'] = true; // default: depending on individual properties
+  whiteList['display-inside'] = true; // default: auto
+  whiteList['display-list'] = true; // default: none
+  whiteList['display-outside'] = true; // default: inline-level
+  whiteList['dominant-baseline'] = false; // default: auto
+  whiteList['elevation'] = false; // default: level
+  whiteList['empty-cells'] = false; // default: show
+  whiteList['filter'] = false; // default: none
+  whiteList['flex'] = false; // default: depending on individual properties
+  whiteList['flex-basis'] = false; // default: auto
+  whiteList['flex-direction'] = false; // default: row
+  whiteList['flex-flow'] = false; // default: depending on individual properties
+  whiteList['flex-grow'] = false; // default: 0
+  whiteList['flex-shrink'] = false; // default: 1
+  whiteList['flex-wrap'] = false; // default: nowrap
+  whiteList['float'] = false; // default: none
+  whiteList['float-offset'] = false; // default: 0 0
+  whiteList['flood-color'] = false; // default: black
+  whiteList['flood-opacity'] = false; // default: 1
+  whiteList['flow-from'] = false; // default: none
+  whiteList['flow-into'] = false; // default: none
+  whiteList['font'] = true; // default: depending on individual properties
+  whiteList['font-family'] = true; // default: implementation dependent
+  whiteList['font-feature-settings'] = true; // default: normal
+  whiteList['font-kerning'] = true; // default: auto
+  whiteList['font-language-override'] = true; // default: normal
+  whiteList['font-size'] = true; // default: medium
+  whiteList['font-size-adjust'] = true; // default: none
+  whiteList['font-stretch'] = true; // default: normal
+  whiteList['font-style'] = true; // default: normal
+  whiteList['font-synthesis'] = true; // default: weight style
+  whiteList['font-variant'] = true; // default: normal
+  whiteList['font-variant-alternates'] = true; // default: normal
+  whiteList['font-variant-caps'] = true; // default: normal
+  whiteList['font-variant-east-asian'] = true; // default: normal
+  whiteList['font-variant-ligatures'] = true; // default: normal
+  whiteList['font-variant-numeric'] = true; // default: normal
+  whiteList['font-variant-position'] = true; // default: normal
+  whiteList['font-weight'] = true; // default: normal
+  whiteList['grid'] = false; // default: depending on individual properties
+  whiteList['grid-area'] = false; // default: depending on individual properties
+  whiteList['grid-auto-columns'] = false; // default: auto
+  whiteList['grid-auto-flow'] = false; // default: none
+  whiteList['grid-auto-rows'] = false; // default: auto
+  whiteList['grid-column'] = false; // default: depending on individual properties
+  whiteList['grid-column-end'] = false; // default: auto
+  whiteList['grid-column-start'] = false; // default: auto
+  whiteList['grid-row'] = false; // default: depending on individual properties
+  whiteList['grid-row-end'] = false; // default: auto
+  whiteList['grid-row-start'] = false; // default: auto
+  whiteList['grid-template'] = false; // default: depending on individual properties
+  whiteList['grid-template-areas'] = false; // default: none
+  whiteList['grid-template-columns'] = false; // default: none
+  whiteList['grid-template-rows'] = false; // default: none
+  whiteList['hanging-punctuation'] = false; // default: none
+  whiteList['height'] = true; // default: auto
+  whiteList['hyphens'] = false; // default: manual
+  whiteList['icon'] = false; // default: auto
+  whiteList['image-orientation'] = false; // default: auto
+  whiteList['image-resolution'] = false; // default: normal
+  whiteList['ime-mode'] = false; // default: auto
+  whiteList['initial-letters'] = false; // default: normal
+  whiteList['inline-box-align'] = false; // default: last
+  whiteList['justify-content'] = false; // default: auto
+  whiteList['justify-items'] = false; // default: auto
+  whiteList['justify-self'] = false; // default: auto
+  whiteList['left'] = false; // default: auto
+  whiteList['letter-spacing'] = true; // default: normal
+  whiteList['lighting-color'] = true; // default: white
+  whiteList['line-box-contain'] = false; // default: block inline replaced
+  whiteList['line-break'] = false; // default: auto
+  whiteList['line-grid'] = false; // default: match-parent
+  whiteList['line-height'] = false; // default: normal
+  whiteList['line-snap'] = false; // default: none
+  whiteList['line-stacking'] = false; // default: depending on individual properties
+  whiteList['line-stacking-ruby'] = false; // default: exclude-ruby
+  whiteList['line-stacking-shift'] = false; // default: consider-shifts
+  whiteList['line-stacking-strategy'] = false; // default: inline-line-height
+  whiteList['list-style'] = true; // default: depending on individual properties
+  whiteList['list-style-image'] = true; // default: none
+  whiteList['list-style-position'] = true; // default: outside
+  whiteList['list-style-type'] = true; // default: disc
+  whiteList['margin'] = true; // default: depending on individual properties
+  whiteList['margin-bottom'] = true; // default: 0
+  whiteList['margin-left'] = true; // default: 0
+  whiteList['margin-right'] = true; // default: 0
+  whiteList['margin-top'] = true; // default: 0
+  whiteList['marker-offset'] = false; // default: auto
+  whiteList['marker-side'] = false; // default: list-item
+  whiteList['marks'] = false; // default: none
+  whiteList['mask'] = false; // default: border-box
+  whiteList['mask-box'] = false; // default: see individual properties
+  whiteList['mask-box-outset'] = false; // default: 0
+  whiteList['mask-box-repeat'] = false; // default: stretch
+  whiteList['mask-box-slice'] = false; // default: 0 fill
+  whiteList['mask-box-source'] = false; // default: none
+  whiteList['mask-box-width'] = false; // default: auto
+  whiteList['mask-clip'] = false; // default: border-box
+  whiteList['mask-image'] = false; // default: none
+  whiteList['mask-origin'] = false; // default: border-box
+  whiteList['mask-position'] = false; // default: center
+  whiteList['mask-repeat'] = false; // default: no-repeat
+  whiteList['mask-size'] = false; // default: border-box
+  whiteList['mask-source-type'] = false; // default: auto
+  whiteList['mask-type'] = false; // default: luminance
+  whiteList['max-height'] = true; // default: none
+  whiteList['max-lines'] = false; // default: none
+  whiteList['max-width'] = true; // default: none
+  whiteList['min-height'] = true; // default: 0
+  whiteList['min-width'] = true; // default: 0
+  whiteList['move-to'] = false; // default: normal
+  whiteList['nav-down'] = false; // default: auto
+  whiteList['nav-index'] = false; // default: auto
+  whiteList['nav-left'] = false; // default: auto
+  whiteList['nav-right'] = false; // default: auto
+  whiteList['nav-up'] = false; // default: auto
+  whiteList['object-fit'] = false; // default: fill
+  whiteList['object-position'] = false; // default: 50% 50%
+  whiteList['opacity'] = false; // default: 1
+  whiteList['order'] = false; // default: 0
+  whiteList['orphans'] = false; // default: 2
+  whiteList['outline'] = false; // default: depending on individual properties
+  whiteList['outline-color'] = false; // default: invert
+  whiteList['outline-offset'] = false; // default: 0
+  whiteList['outline-style'] = false; // default: none
+  whiteList['outline-width'] = false; // default: medium
+  whiteList['overflow'] = false; // default: depending on individual properties
+  whiteList['overflow-wrap'] = false; // default: normal
+  whiteList['overflow-x'] = false; // default: visible
+  whiteList['overflow-y'] = false; // default: visible
+  whiteList['padding'] = true; // default: depending on individual properties
+  whiteList['padding-bottom'] = true; // default: 0
+  whiteList['padding-left'] = true; // default: 0
+  whiteList['padding-right'] = true; // default: 0
+  whiteList['padding-top'] = true; // default: 0
+  whiteList['page'] = false; // default: auto
+  whiteList['page-break-after'] = false; // default: auto
+  whiteList['page-break-before'] = false; // default: auto
+  whiteList['page-break-inside'] = false; // default: auto
+  whiteList['page-policy'] = false; // default: start
+  whiteList['pause'] = false; // default: implementation dependent
+  whiteList['pause-after'] = false; // default: implementation dependent
+  whiteList['pause-before'] = false; // default: implementation dependent
+  whiteList['perspective'] = false; // default: none
+  whiteList['perspective-origin'] = false; // default: 50% 50%
+  whiteList['pitch'] = false; // default: medium
+  whiteList['pitch-range'] = false; // default: 50
+  whiteList['play-during'] = false; // default: auto
+  whiteList['position'] = false; // default: static
+  whiteList['presentation-level'] = false; // default: 0
+  whiteList['quotes'] = false; // default: text
+  whiteList['region-fragment'] = false; // default: auto
+  whiteList['resize'] = false; // default: none
+  whiteList['rest'] = false; // default: depending on individual properties
+  whiteList['rest-after'] = false; // default: none
+  whiteList['rest-before'] = false; // default: none
+  whiteList['richness'] = false; // default: 50
+  whiteList['right'] = false; // default: auto
+  whiteList['rotation'] = false; // default: 0
+  whiteList['rotation-point'] = false; // default: 50% 50%
+  whiteList['ruby-align'] = false; // default: auto
+  whiteList['ruby-merge'] = false; // default: separate
+  whiteList['ruby-position'] = false; // default: before
+  whiteList['shape-image-threshold'] = false; // default: 0.0
+  whiteList['shape-outside'] = false; // default: none
+  whiteList['shape-margin'] = false; // default: 0
+  whiteList['size'] = false; // default: auto
+  whiteList['speak'] = false; // default: auto
+  whiteList['speak-as'] = false; // default: normal
+  whiteList['speak-header'] = false; // default: once
+  whiteList['speak-numeral'] = false; // default: continuous
+  whiteList['speak-punctuation'] = false; // default: none
+  whiteList['speech-rate'] = false; // default: medium
+  whiteList['stress'] = false; // default: 50
+  whiteList['string-set'] = false; // default: none
+  whiteList['tab-size'] = false; // default: 8
+  whiteList['table-layout'] = false; // default: auto
+  whiteList['text-align'] = true; // default: start
+  whiteList['text-align-last'] = true; // default: auto
+  whiteList['text-combine-upright'] = true; // default: none
+  whiteList['text-decoration'] = true; // default: none
+  whiteList['text-decoration-color'] = true; // default: currentColor
+  whiteList['text-decoration-line'] = true; // default: none
+  whiteList['text-decoration-skip'] = true; // default: objects
+  whiteList['text-decoration-style'] = true; // default: solid
+  whiteList['text-emphasis'] = true; // default: depending on individual properties
+  whiteList['text-emphasis-color'] = true; // default: currentColor
+  whiteList['text-emphasis-position'] = true; // default: over right
+  whiteList['text-emphasis-style'] = true; // default: none
+  whiteList['text-height'] = true; // default: auto
+  whiteList['text-indent'] = true; // default: 0
+  whiteList['text-justify'] = true; // default: auto
+  whiteList['text-orientation'] = true; // default: mixed
+  whiteList['text-overflow'] = true; // default: clip
+  whiteList['text-shadow'] = true; // default: none
+  whiteList['text-space-collapse'] = true; // default: collapse
+  whiteList['text-transform'] = true; // default: none
+  whiteList['text-underline-position'] = true; // default: auto
+  whiteList['text-wrap'] = true; // default: normal
+  whiteList['top'] = false; // default: auto
+  whiteList['transform'] = false; // default: none
+  whiteList['transform-origin'] = false; // default: 50% 50% 0
+  whiteList['transform-style'] = false; // default: flat
+  whiteList['transition'] = false; // default: depending on individual properties
+  whiteList['transition-delay'] = false; // default: 0s
+  whiteList['transition-duration'] = false; // default: 0s
+  whiteList['transition-property'] = false; // default: all
+  whiteList['transition-timing-function'] = false; // default: ease
+  whiteList['unicode-bidi'] = false; // default: normal
+  whiteList['vertical-align'] = false; // default: baseline
+  whiteList['visibility'] = false; // default: visible
+  whiteList['voice-balance'] = false; // default: center
+  whiteList['voice-duration'] = false; // default: auto
+  whiteList['voice-family'] = false; // default: implementation dependent
+  whiteList['voice-pitch'] = false; // default: medium
+  whiteList['voice-range'] = false; // default: medium
+  whiteList['voice-rate'] = false; // default: normal
+  whiteList['voice-stress'] = false; // default: normal
+  whiteList['voice-volume'] = false; // default: medium
+  whiteList['volume'] = false; // default: medium
+  whiteList['white-space'] = false; // default: normal
+  whiteList['widows'] = false; // default: 2
+  whiteList['width'] = true; // default: auto
+  whiteList['will-change'] = false; // default: auto
+  whiteList['word-break'] = true; // default: normal
+  whiteList['word-spacing'] = true; // default: normal
+  whiteList['word-wrap'] = true; // default: normal
+  whiteList['wrap-flow'] = false; // default: auto
+  whiteList['wrap-through'] = false; // default: wrap
+  whiteList['writing-mode'] = false; // default: horizontal-tb
+  whiteList['z-index'] = false; // default: auto
+
+  return whiteList;
+}
+
+
+/**
+ * 匹配到白名单上的一个属性时
+ *
+ * @param {String} name
+ * @param {String} value
+ * @param {Object} options
+ * @return {String}
+ */
+function onAttr (name, value, options) {
+  // do nothing
+}
+
+/**
+ * 匹配到不在白名单上的一个属性时
+ *
+ * @param {String} name
+ * @param {String} value
+ * @param {Object} options
+ * @return {String}
+ */
+function onIgnoreAttr (name, value, options) {
+  // do nothing
+}
+
+var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
+
+/**
+ * 过滤属性值
+ *
+ * @param {String} name
+ * @param {String} value
+ * @return {String}
+ */
+function safeAttrValue(name, value) {
+  if (REGEXP_URL_JAVASCRIPT.test(value)) return '';
+  return value;
+}
+
+
+exports.whiteList = getDefaultWhiteList();
+exports.getDefaultWhiteList = getDefaultWhiteList;
+exports.onAttr = onAttr;
+exports.onIgnoreAttr = onIgnoreAttr;
+exports.safeAttrValue = safeAttrValue;
+
+},{}],8:[function(require,module,exports){
+/**
+ * cssfilter
+ *
+ * @author 老雷<leizongmin@gmail.com>
+ */
+
+var DEFAULT = require('./default');
+var FilterCSS = require('./css');
+
+
+/**
+ * XSS过滤
+ *
+ * @param {String} css 要过滤的CSS代码
+ * @param {Object} options 选项:whiteList, onAttr, onIgnoreAttr
+ * @return {String}
+ */
+function filterCSS (html, options) {
+  var xss = new FilterCSS(options);
+  return xss.process(html);
+}
+
+
+// 输出
+exports = module.exports = filterCSS;
+exports.FilterCSS = FilterCSS;
+for (var i in DEFAULT) exports[i] = DEFAULT[i];
+
+// 在浏览器端使用
+if (typeof window !== 'undefined') {
+  window.filterCSS = module.exports;
+}
+
+},{"./css":6,"./default":7}],9:[function(require,module,exports){
+/**
+ * cssfilter
+ *
+ * @author 老雷<leizongmin@gmail.com>
+ */
+
+var _ = require('./util');
+
+
+/**
+ * 解析style
+ *
+ * @param {String} css
+ * @param {Function} onAttr 处理属性的函数
+ *   参数格式: function (sourcePosition, position, name, value, source)
+ * @return {String}
+ */
+function parseStyle (css, onAttr) {
+  css = _.trimRight(css);
+  if (css[css.length - 1] !== ';') css += ';';
+  var cssLength = css.length;
+  var isParenthesisOpen = false;
+  var lastPos = 0;
+  var i = 0;
+  var retCSS = '';
+
+  function addNewAttr () {
+    // 如果没有正常的闭合圆括号,则直接忽略当前属性
+    if (!isParenthesisOpen) {
+      var source = _.trim(css.slice(lastPos, i));
+      var j = source.indexOf(':');
+      if (j !== -1) {
+        var name = _.trim(source.slice(0, j));
+        var value = _.trim(source.slice(j + 1));
+        // 必须有属性名称
+        if (name) {
+          var ret = onAttr(lastPos, retCSS.length, name, value, source);
+          if (ret) retCSS += ret + '; ';
+        }
+      }
+    }
+    lastPos = i + 1;
+  }
+
+  for (; i < cssLength; i++) {
+    var c = css[i];
+    if (c === '/' && css[i + 1] === '*') {
+      // 备注开始
+      var j = css.indexOf('*/', i + 2);
+      // 如果没有正常的备注结束,则后面的部分全部跳过
+      if (j === -1) break;
+      // 直接将当前位置调到备注结尾,并且初始化状态
+      i = j + 1;
+      lastPos = i + 1;
+      isParenthesisOpen = false;
+    } else if (c === '(') {
+      isParenthesisOpen = true;
+    } else if (c === ')') {
+      isParenthesisOpen = false;
+    } else if (c === ';') {
+      if (isParenthesisOpen) {
+        // 在圆括号里面,忽略
+      } else {
+        addNewAttr();
+      }
+    } else if (c === '\n') {
+      addNewAttr();
+    }
+  }
+
+  return _.trim(retCSS);
+}
+
+module.exports = parseStyle;
+
+},{"./util":10}],10:[function(require,module,exports){
+module.exports = {
+  indexOf: function (arr, item) {
+    var i, j;
+    if (Array.prototype.indexOf) {
+      return arr.indexOf(item);
+    }
+    for (i = 0, j = arr.length; i < j; i++) {
+      if (arr[i] === item) {
+        return i;
+      }
+    }
+    return -1;
+  },
+  forEach: function (arr, fn, scope) {
+    var i, j;
+    if (Array.prototype.forEach) {
+      return arr.forEach(fn, scope);
+    }
+    for (i = 0, j = arr.length; i < j; i++) {
+      fn.call(scope, arr[i], i, arr);
+    }
+  },
+  trim: function (str) {
+    if (String.prototype.trim) {
+      return str.trim();
+    }
+    return str.replace(/(^\s*)|(\s*$)/g, '');
+  },
+  trimRight: function (str) {
+    if (String.prototype.trimRight) {
+      return str.trimRight();
+    }
+    return str.replace(/(\s*$)/g, '');
+  }
+};
+
+},{}]},{},[2]);
+
+
+/*** EXPORTS FROM exports-loader ***/
+exports["filterXSS"] = (filterXSS);
+exports["filterCSS"] = (filterCSS);
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+    return this;
+})();
+
+try {
+    // This works if eval is allowed (see CSP)
+    g = g || new Function("return this")();
+} catch (e) {
+    // This works if the window reference is available
+    if (typeof window === "object") g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Symbol = __webpack_require__(29),
+    getRawTag = __webpack_require__(336),
+    objectToString = __webpack_require__(337);
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+    undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+  if (value == null) {
+    return value === undefined ? undefinedTag : nullTag;
+  }
+  return (symToStringTag && symToStringTag in Object(value))
+    ? getRawTag(value)
+    : objectToString(value);
+}
+
+module.exports = baseGetTag;
+
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsNative = __webpack_require__(354),
+    getValue = __webpack_require__(357);
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+  var value = getValue(object, key);
+  return baseIsNative(value) ? value : undefined;
+}
+
+module.exports = getNative;
+
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/*!
+    localForage -- Offline Storage, Improved
+    Version 1.7.3
+    https://localforage.github.io/localForage
+    (c) 2013-2017 Mozilla, Apache License 2.0
+*/
+(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+(function (global){
+'use strict';
+var Mutation = global.MutationObserver || global.WebKitMutationObserver;
+
+var scheduleDrain;
+
+{
+  if (Mutation) {
+    var called = 0;
+    var observer = new Mutation(nextTick);
+    var element = global.document.createTextNode('');
+    observer.observe(element, {
+      characterData: true
+    });
+    scheduleDrain = function () {
+      element.data = (called = ++called % 2);
+    };
+  } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {
+    var channel = new global.MessageChannel();
+    channel.port1.onmessage = nextTick;
+    scheduleDrain = function () {
+      channel.port2.postMessage(0);
+    };
+  } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {
+    scheduleDrain = function () {
+
+      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
+      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
+      var scriptEl = global.document.createElement('script');
+      scriptEl.onreadystatechange = function () {
+        nextTick();
+
+        scriptEl.onreadystatechange = null;
+        scriptEl.parentNode.removeChild(scriptEl);
+        scriptEl = null;
+      };
+      global.document.documentElement.appendChild(scriptEl);
+    };
+  } else {
+    scheduleDrain = function () {
+      setTimeout(nextTick, 0);
+    };
+  }
+}
+
+var draining;
+var queue = [];
+//named nextTick for less confusing stack traces
+function nextTick() {
+  draining = true;
+  var i, oldQueue;
+  var len = queue.length;
+  while (len) {
+    oldQueue = queue;
+    queue = [];
+    i = -1;
+    while (++i < len) {
+      oldQueue[i]();
+    }
+    len = queue.length;
+  }
+  draining = false;
+}
+
+module.exports = immediate;
+function immediate(task) {
+  if (queue.push(task) === 1 && !draining) {
+    scheduleDrain();
+  }
+}
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],2:[function(_dereq_,module,exports){
+'use strict';
+var immediate = _dereq_(1);
+
+/* istanbul ignore next */
+function INTERNAL() {}
+
+var handlers = {};
+
+var REJECTED = ['REJECTED'];
+var FULFILLED = ['FULFILLED'];
+var PENDING = ['PENDING'];
+
+module.exports = Promise;
+
+function Promise(resolver) {
+  if (typeof resolver !== 'function') {
+    throw new TypeError('resolver must be a function');
+  }
+  this.state = PENDING;
+  this.queue = [];
+  this.outcome = void 0;
+  if (resolver !== INTERNAL) {
+    safelyResolveThenable(this, resolver);
+  }
+}
+
+Promise.prototype["catch"] = function (onRejected) {
+  return this.then(null, onRejected);
+};
+Promise.prototype.then = function (onFulfilled, onRejected) {
+  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||
+    typeof onRejected !== 'function' && this.state === REJECTED) {
+    return this;
+  }
+  var promise = new this.constructor(INTERNAL);
+  if (this.state !== PENDING) {
+    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;
+    unwrap(promise, resolver, this.outcome);
+  } else {
+    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));
+  }
+
+  return promise;
+};
+function QueueItem(promise, onFulfilled, onRejected) {
+  this.promise = promise;
+  if (typeof onFulfilled === 'function') {
+    this.onFulfilled = onFulfilled;
+    this.callFulfilled = this.otherCallFulfilled;
+  }
+  if (typeof onRejected === 'function') {
+    this.onRejected = onRejected;
+    this.callRejected = this.otherCallRejected;
+  }
+}
+QueueItem.prototype.callFulfilled = function (value) {
+  handlers.resolve(this.promise, value);
+};
+QueueItem.prototype.otherCallFulfilled = function (value) {
+  unwrap(this.promise, this.onFulfilled, value);
+};
+QueueItem.prototype.callRejected = function (value) {
+  handlers.reject(this.promise, value);
+};
+QueueItem.prototype.otherCallRejected = function (value) {
+  unwrap(this.promise, this.onRejected, value);
+};
+
+function unwrap(promise, func, value) {
+  immediate(function () {
+    var returnValue;
+    try {
+      returnValue = func(value);
+    } catch (e) {
+      return handlers.reject(promise, e);
+    }
+    if (returnValue === promise) {
+      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));
+    } else {
+      handlers.resolve(promise, returnValue);
+    }
+  });
+}
+
+handlers.resolve = function (self, value) {
+  var result = tryCatch(getThen, value);
+  if (result.status === 'error') {
+    return handlers.reject(self, result.value);
+  }
+  var thenable = result.value;
+
+  if (thenable) {
+    safelyResolveThenable(self, thenable);
+  } else {
+    self.state = FULFILLED;
+    self.outcome = value;
+    var i = -1;
+    var len = self.queue.length;
+    while (++i < len) {
+      self.queue[i].callFulfilled(value);
+    }
+  }
+  return self;
+};
+handlers.reject = function (self, error) {
+  self.state = REJECTED;
+  self.outcome = error;
+  var i = -1;
+  var len = self.queue.length;
+  while (++i < len) {
+    self.queue[i].callRejected(error);
+  }
+  return self;
+};
+
+function getThen(obj) {
+  // Make sure we only access the accessor once as required by the spec
+  var then = obj && obj.then;
+  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {
+    return function appyThen() {
+      then.apply(obj, arguments);
+    };
+  }
+}
+
+function safelyResolveThenable(self, thenable) {
+  // Either fulfill, reject or reject with error
+  var called = false;
+  function onError(value) {
+    if (called) {
+      return;
+    }
+    called = true;
+    handlers.reject(self, value);
+  }
+
+  function onSuccess(value) {
+    if (called) {
+      return;
+    }
+    called = true;
+    handlers.resolve(self, value);
+  }
+
+  function tryToUnwrap() {
+    thenable(onSuccess, onError);
+  }
+
+  var result = tryCatch(tryToUnwrap);
+  if (result.status === 'error') {
+    onError(result.value);
+  }
+}
+
+function tryCatch(func, value) {
+  var out = {};
+  try {
+    out.value = func(value);
+    out.status = 'success';
+  } catch (e) {
+    out.status = 'error';
+    out.value = e;
+  }
+  return out;
+}
+
+Promise.resolve = resolve;
+function resolve(value) {
+  if (value instanceof this) {
+    return value;
+  }
+  return handlers.resolve(new this(INTERNAL), value);
+}
+
+Promise.reject = reject;
+function reject(reason) {
+  var promise = new this(INTERNAL);
+  return handlers.reject(promise, reason);
+}
+
+Promise.all = all;
+function all(iterable) {
+  var self = this;
+  if (Object.prototype.toString.call(iterable) !== '[object Array]') {
+    return this.reject(new TypeError('must be an array'));
+  }
+
+  var len = iterable.length;
+  var called = false;
+  if (!len) {
+    return this.resolve([]);
+  }
+
+  var values = new Array(len);
+  var resolved = 0;
+  var i = -1;
+  var promise = new this(INTERNAL);
+
+  while (++i < len) {
+    allResolver(iterable[i], i);
+  }
+  return promise;
+  function allResolver(value, i) {
+    self.resolve(value).then(resolveFromAll, function (error) {
+      if (!called) {
+        called = true;
+        handlers.reject(promise, error);
+      }
+    });
+    function resolveFromAll(outValue) {
+      values[i] = outValue;
+      if (++resolved === len && !called) {
+        called = true;
+        handlers.resolve(promise, values);
+      }
+    }
+  }
+}
+
+Promise.race = race;
+function race(iterable) {
+  var self = this;
+  if (Object.prototype.toString.call(iterable) !== '[object Array]') {
+    return this.reject(new TypeError('must be an array'));
+  }
+
+  var len = iterable.length;
+  var called = false;
+  if (!len) {
+    return this.resolve([]);
+  }
+
+  var i = -1;
+  var promise = new this(INTERNAL);
+
+  while (++i < len) {
+    resolver(iterable[i]);
+  }
+  return promise;
+  function resolver(value) {
+    self.resolve(value).then(function (response) {
+      if (!called) {
+        called = true;
+        handlers.resolve(promise, response);
+      }
+    }, function (error) {
+      if (!called) {
+        called = true;
+        handlers.reject(promise, error);
+      }
+    });
+  }
+}
+
+},{"1":1}],3:[function(_dereq_,module,exports){
+(function (global){
+'use strict';
+if (typeof global.Promise !== 'function') {
+  global.Promise = _dereq_(2);
+}
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"2":2}],4:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function getIDB() {
+    /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */
+    try {
+        if (typeof indexedDB !== 'undefined') {
+            return indexedDB;
+        }
+        if (typeof webkitIndexedDB !== 'undefined') {
+            return webkitIndexedDB;
+        }
+        if (typeof mozIndexedDB !== 'undefined') {
+            return mozIndexedDB;
+        }
+        if (typeof OIndexedDB !== 'undefined') {
+            return OIndexedDB;
+        }
+        if (typeof msIndexedDB !== 'undefined') {
+            return msIndexedDB;
+        }
+    } catch (e) {
+        return;
+    }
+}
+
+var idb = getIDB();
+
+function isIndexedDBValid() {
+    try {
+        // Initialize IndexedDB; fall back to vendor-prefixed versions
+        // if needed.
+        if (!idb) {
+            return false;
+        }
+        // We mimic PouchDB here;
+        //
+        // We test for openDatabase because IE Mobile identifies itself
+        // as Safari. Oh the lulz...
+        var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);
+
+        var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;
+
+        // Safari <10.1 does not meet our requirements for IDB support (#5572)
+        // since Safari 10.1 shipped with fetch, we can use that to detect it
+        return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&
+        // some outdated implementations of IDB that appear on Samsung
+        // and HTC Android devices <4.4 are missing IDBKeyRange
+        // See: https://github.com/mozilla/localForage/issues/128
+        // See: https://github.com/mozilla/localForage/issues/272
+        typeof IDBKeyRange !== 'undefined';
+    } catch (e) {
+        return false;
+    }
+}
+
+// Abstracts constructing a Blob object, so it also works in older
+// browsers that don't support the native Blob constructor. (i.e.
+// old QtWebKit versions, at least).
+// Abstracts constructing a Blob object, so it also works in older
+// browsers that don't support the native Blob constructor. (i.e.
+// old QtWebKit versions, at least).
+function createBlob(parts, properties) {
+    /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */
+    parts = parts || [];
+    properties = properties || {};
+    try {
+        return new Blob(parts, properties);
+    } catch (e) {
+        if (e.name !== 'TypeError') {
+            throw e;
+        }
+        var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;
+        var builder = new Builder();
+        for (var i = 0; i < parts.length; i += 1) {
+            builder.append(parts[i]);
+        }
+        return builder.getBlob(properties.type);
+    }
+}
+
+// This is CommonJS because lie is an external dependency, so Rollup
+// can just ignore it.
+if (typeof Promise === 'undefined') {
+    // In the "nopromises" build this will just throw if you don't have
+    // a global promise object, but it would throw anyway later.
+    _dereq_(3);
+}
+var Promise$1 = Promise;
+
+function executeCallback(promise, callback) {
+    if (callback) {
+        promise.then(function (result) {
+            callback(null, result);
+        }, function (error) {
+            callback(error);
+        });
+    }
+}
+
+function executeTwoCallbacks(promise, callback, errorCallback) {
+    if (typeof callback === 'function') {
+        promise.then(callback);
+    }
+
+    if (typeof errorCallback === 'function') {
+        promise["catch"](errorCallback);
+    }
+}
+
+function normalizeKey(key) {
+    // Cast the key to a string, as that's all we can set as a key.
+    if (typeof key !== 'string') {
+        console.warn(key + ' used as a key, but it is not a string.');
+        key = String(key);
+    }
+
+    return key;
+}
+
+function getCallback() {
+    if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {
+        return arguments[arguments.length - 1];
+    }
+}
+
+// Some code originally from async_storage.js in
+// [Gaia](https://github.com/mozilla-b2g/gaia).
+
+var DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';
+var supportsBlobs = void 0;
+var dbContexts = {};
+var toString = Object.prototype.toString;
+
+// Transaction Modes
+var READ_ONLY = 'readonly';
+var READ_WRITE = 'readwrite';
+
+// Transform a binary string to an array buffer, because otherwise
+// weird stuff happens when you try to work with the binary string directly.
+// It is known.
+// From http://stackoverflow.com/questions/14967647/ (continues on next line)
+// encode-decode-image-with-base64-breaks-image (2013-04-21)
+function _binStringToArrayBuffer(bin) {
+    var length = bin.length;
+    var buf = new ArrayBuffer(length);
+    var arr = new Uint8Array(buf);
+    for (var i = 0; i < length; i++) {
+        arr[i] = bin.charCodeAt(i);
+    }
+    return buf;
+}
+
+//
+// Blobs are not supported in all versions of IndexedDB, notably
+// Chrome <37 and Android <5. In those versions, storing a blob will throw.
+//
+// Various other blob bugs exist in Chrome v37-42 (inclusive).
+// Detecting them is expensive and confusing to users, and Chrome 37-42
+// is at very low usage worldwide, so we do a hacky userAgent check instead.
+//
+// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120
+// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916
+// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836
+//
+// Code borrowed from PouchDB. See:
+// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js
+//
+function _checkBlobSupportWithoutCaching(idb) {
+    return new Promise$1(function (resolve) {
+        var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);
+        var blob = createBlob(['']);
+        txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');
+
+        txn.onabort = function (e) {
+            // If the transaction aborts now its due to not being able to
+            // write to the database, likely due to the disk being full
+            e.preventDefault();
+            e.stopPropagation();
+            resolve(false);
+        };
+
+        txn.oncomplete = function () {
+            var matchedChrome = navigator.userAgent.match(/Chrome\/(\d+)/);
+            var matchedEdge = navigator.userAgent.match(/Edge\//);
+            // MS Edge pretends to be Chrome 42:
+            // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx
+            resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);
+        };
+    })["catch"](function () {
+        return false; // error, so assume unsupported
+    });
+}
+
+function _checkBlobSupport(idb) {
+    if (typeof supportsBlobs === 'boolean') {
+        return Promise$1.resolve(supportsBlobs);
+    }
+    return _checkBlobSupportWithoutCaching(idb).then(function (value) {
+        supportsBlobs = value;
+        return supportsBlobs;
+    });
+}
+
+function _deferReadiness(dbInfo) {
+    var dbContext = dbContexts[dbInfo.name];
+
+    // Create a deferred object representing the current database operation.
+    var deferredOperation = {};
+
+    deferredOperation.promise = new Promise$1(function (resolve, reject) {
+        deferredOperation.resolve = resolve;
+        deferredOperation.reject = reject;
+    });
+
+    // Enqueue the deferred operation.
+    dbContext.deferredOperations.push(deferredOperation);
+
+    // Chain its promise to the database readiness.
+    if (!dbContext.dbReady) {
+        dbContext.dbReady = deferredOperation.promise;
+    } else {
+        dbContext.dbReady = dbContext.dbReady.then(function () {
+            return deferredOperation.promise;
+        });
+    }
+}
+
+function _advanceReadiness(dbInfo) {
+    var dbContext = dbContexts[dbInfo.name];
+
+    // Dequeue a deferred operation.
+    var deferredOperation = dbContext.deferredOperations.pop();
+
+    // Resolve its promise (which is part of the database readiness
+    // chain of promises).
+    if (deferredOperation) {
+        deferredOperation.resolve();
+        return deferredOperation.promise;
+    }
+}
+
+function _rejectReadiness(dbInfo, err) {
+    var dbContext = dbContexts[dbInfo.name];
+
+    // Dequeue a deferred operation.
+    var deferredOperation = dbContext.deferredOperations.pop();
+
+    // Reject its promise (which is part of the database readiness
+    // chain of promises).
+    if (deferredOperation) {
+        deferredOperation.reject(err);
+        return deferredOperation.promise;
+    }
+}
+
+function _getConnection(dbInfo, upgradeNeeded) {
+    return new Promise$1(function (resolve, reject) {
+        dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();
+
+        if (dbInfo.db) {
+            if (upgradeNeeded) {
+                _deferReadiness(dbInfo);
+                dbInfo.db.close();
+            } else {
+                return resolve(dbInfo.db);
+            }
+        }
+
+        var dbArgs = [dbInfo.name];
+
+        if (upgradeNeeded) {
+            dbArgs.push(dbInfo.version);
+        }
+
+        var openreq = idb.open.apply(idb, dbArgs);
+
+        if (upgradeNeeded) {
+            openreq.onupgradeneeded = function (e) {
+                var db = openreq.result;
+                try {
+                    db.createObjectStore(dbInfo.storeName);
+                    if (e.oldVersion <= 1) {
+                        // Added when support for blob shims was added
+                        db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);
+                    }
+                } catch (ex) {
+                    if (ex.name === 'ConstraintError') {
+                        console.warn('The database "' + dbInfo.name + '"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage "' + dbInfo.storeName + '" already exists.');
+                    } else {
+                        throw ex;
+                    }
+                }
+            };
+        }
+
+        openreq.onerror = function (e) {
+            e.preventDefault();
+            reject(openreq.error);
+        };
+
+        openreq.onsuccess = function () {
+            resolve(openreq.result);
+            _advanceReadiness(dbInfo);
+        };
+    });
+}
+
+function _getOriginalConnection(dbInfo) {
+    return _getConnection(dbInfo, false);
+}
+
+function _getUpgradedConnection(dbInfo) {
+    return _getConnection(dbInfo, true);
+}
+
+function _isUpgradeNeeded(dbInfo, defaultVersion) {
+    if (!dbInfo.db) {
+        return true;
+    }
+
+    var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);
+    var isDowngrade = dbInfo.version < dbInfo.db.version;
+    var isUpgrade = dbInfo.version > dbInfo.db.version;
+
+    if (isDowngrade) {
+        // If the version is not the default one
+        // then warn for impossible downgrade.
+        if (dbInfo.version !== defaultVersion) {
+            console.warn('The database "' + dbInfo.name + '"' + " can't be downgraded from version " + dbInfo.db.version + ' to version ' + dbInfo.version + '.');
+        }
+        // Align the versions to prevent errors.
+        dbInfo.version = dbInfo.db.version;
+    }
+
+    if (isUpgrade || isNewStore) {
+        // If the store is new then increment the version (if needed).
+        // This will trigger an "upgradeneeded" event which is required
+        // for creating a store.
+        if (isNewStore) {
+            var incVersion = dbInfo.db.version + 1;
+            if (incVersion > dbInfo.version) {
+                dbInfo.version = incVersion;
+            }
+        }
+
+        return true;
+    }
+
+    return false;
+}
+
+// encode a blob for indexeddb engines that don't support blobs
+function _encodeBlob(blob) {
+    return new Promise$1(function (resolve, reject) {
+        var reader = new FileReader();
+        reader.onerror = reject;
+        reader.onloadend = function (e) {
+            var base64 = btoa(e.target.result || '');
+            resolve({
+                __local_forage_encoded_blob: true,
+                data: base64,
+                type: blob.type
+            });
+        };
+        reader.readAsBinaryString(blob);
+    });
+}
+
+// decode an encoded blob
+function _decodeBlob(encodedBlob) {
+    var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));
+    return createBlob([arrayBuff], { type: encodedBlob.type });
+}
+
+// is this one of our fancy encoded blobs?
+function _isEncodedBlob(value) {
+    return value && value.__local_forage_encoded_blob;
+}
+
+// Specialize the default `ready()` function by making it dependent
+// on the current database operations. Thus, the driver will be actually
+// ready when it's been initialized (default) *and* there are no pending
+// operations on the database (initiated by some other instances).
+function _fullyReady(callback) {
+    var self = this;
+
+    var promise = self._initReady().then(function () {
+        var dbContext = dbContexts[self._dbInfo.name];
+
+        if (dbContext && dbContext.dbReady) {
+            return dbContext.dbReady;
+        }
+    });
+
+    executeTwoCallbacks(promise, callback, callback);
+    return promise;
+}
+
+// Try to establish a new db connection to replace the
+// current one which is broken (i.e. experiencing
+// InvalidStateError while creating a transaction).
+function _tryReconnect(dbInfo) {
+    _deferReadiness(dbInfo);
+
+    var dbContext = dbContexts[dbInfo.name];
+    var forages = dbContext.forages;
+
+    for (var i = 0; i < forages.length; i++) {
+        var forage = forages[i];
+        if (forage._dbInfo.db) {
+            forage._dbInfo.db.close();
+            forage._dbInfo.db = null;
+        }
+    }
+    dbInfo.db = null;
+
+    return _getOriginalConnection(dbInfo).then(function (db) {
+        dbInfo.db = db;
+        if (_isUpgradeNeeded(dbInfo)) {
+            // Reopen the database for upgrading.
+            return _getUpgradedConnection(dbInfo);
+        }
+        return db;
+    }).then(function (db) {
+        // store the latest db reference
+        // in case the db was upgraded
+        dbInfo.db = dbContext.db = db;
+        for (var i = 0; i < forages.length; i++) {
+            forages[i]._dbInfo.db = db;
+        }
+    })["catch"](function (err) {
+        _rejectReadiness(dbInfo, err);
+        throw err;
+    });
+}
+
+// FF doesn't like Promises (micro-tasks) and IDDB store operations,
+// so we have to do it with callbacks
+function createTransaction(dbInfo, mode, callback, retries) {
+    if (retries === undefined) {
+        retries = 1;
+    }
+
+    try {
+        var tx = dbInfo.db.transaction(dbInfo.storeName, mode);
+        callback(null, tx);
+    } catch (err) {
+        if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {
+            return Promise$1.resolve().then(function () {
+                if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {
+                    // increase the db version, to create the new ObjectStore
+                    if (dbInfo.db) {
+                        dbInfo.version = dbInfo.db.version + 1;
+                    }
+                    // Reopen the database for upgrading.
+                    return _getUpgradedConnection(dbInfo);
+                }
+            }).then(function () {
+                return _tryReconnect(dbInfo).then(function () {
+                    createTransaction(dbInfo, mode, callback, retries - 1);
+                });
+            })["catch"](callback);
+        }
+
+        callback(err);
+    }
+}
+
+function createDbContext() {
+    return {
+        // Running localForages sharing a database.
+        forages: [],
+        // Shared database.
+        db: null,
+        // Database readiness (promise).
+        dbReady: null,
+        // Deferred operations on the database.
+        deferredOperations: []
+    };
+}
+
+// Open the IndexedDB database (automatically creates one if one didn't
+// previously exist), using any options set in the config.
+function _initStorage(options) {
+    var self = this;
+    var dbInfo = {
+        db: null
+    };
+
+    if (options) {
+        for (var i in options) {
+            dbInfo[i] = options[i];
+        }
+    }
+
+    // Get the current context of the database;
+    var dbContext = dbContexts[dbInfo.name];
+
+    // ...or create a new context.
+    if (!dbContext) {
+        dbContext = createDbContext();
+        // Register the new context in the global container.
+        dbContexts[dbInfo.name] = dbContext;
+    }
+
+    // Register itself as a running localForage in the current context.
+    dbContext.forages.push(self);
+
+    // Replace the default `ready()` function with the specialized one.
+    if (!self._initReady) {
+        self._initReady = self.ready;
+        self.ready = _fullyReady;
+    }
+
+    // Create an array of initialization states of the related localForages.
+    var initPromises = [];
+
+    function ignoreErrors() {
+        // Don't handle errors here,
+        // just makes sure related localForages aren't pending.
+        return Promise$1.resolve();
+    }
+
+    for (var j = 0; j < dbContext.forages.length; j++) {
+        var forage = dbContext.forages[j];
+        if (forage !== self) {
+            // Don't wait for itself...
+            initPromises.push(forage._initReady()["catch"](ignoreErrors));
+        }
+    }
+
+    // Take a snapshot of the related localForages.
+    var forages = dbContext.forages.slice(0);
+
+    // Initialize the connection process only when
+    // all the related localForages aren't pending.
+    return Promise$1.all(initPromises).then(function () {
+        dbInfo.db = dbContext.db;
+        // Get the connection or open a new one without upgrade.
+        return _getOriginalConnection(dbInfo);
+    }).then(function (db) {
+        dbInfo.db = db;
+        if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {
+            // Reopen the database for upgrading.
+            return _getUpgradedConnection(dbInfo);
+        }
+        return db;
+    }).then(function (db) {
+        dbInfo.db = dbContext.db = db;
+        self._dbInfo = dbInfo;
+        // Share the final connection amongst related localForages.
+        for (var k = 0; k < forages.length; k++) {
+            var forage = forages[k];
+            if (forage !== self) {
+                // Self is already up-to-date.
+                forage._dbInfo.db = dbInfo.db;
+                forage._dbInfo.version = dbInfo.version;
+            }
+        }
+    });
+}
+
+function getItem(key, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+                    var req = store.get(key);
+
+                    req.onsuccess = function () {
+                        var value = req.result;
+                        if (value === undefined) {
+                            value = null;
+                        }
+                        if (_isEncodedBlob(value)) {
+                            value = _decodeBlob(value);
+                        }
+                        resolve(value);
+                    };
+
+                    req.onerror = function () {
+                        reject(req.error);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Iterate over all items stored in database.
+function iterate(iterator, callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+                    var req = store.openCursor();
+                    var iterationNumber = 1;
+
+                    req.onsuccess = function () {
+                        var cursor = req.result;
+
+                        if (cursor) {
+                            var value = cursor.value;
+                            if (_isEncodedBlob(value)) {
+                                value = _decodeBlob(value);
+                            }
+                            var result = iterator(value, cursor.key, iterationNumber++);
+
+                            // when the iterator callback retuns any
+                            // (non-`undefined`) value, then we stop
+                            // the iteration immediately
+                            if (result !== void 0) {
+                                resolve(result);
+                            } else {
+                                cursor["continue"]();
+                            }
+                        } else {
+                            resolve();
+                        }
+                    };
+
+                    req.onerror = function () {
+                        reject(req.error);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+
+    return promise;
+}
+
+function setItem(key, value, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = new Promise$1(function (resolve, reject) {
+        var dbInfo;
+        self.ready().then(function () {
+            dbInfo = self._dbInfo;
+            if (toString.call(value) === '[object Blob]') {
+                return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {
+                    if (blobSupport) {
+                        return value;
+                    }
+                    return _encodeBlob(value);
+                });
+            }
+            return value;
+        }).then(function (value) {
+            createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+
+                    // The reason we don't _save_ null is because IE 10 does
+                    // not support saving the `null` type in IndexedDB. How
+                    // ironic, given the bug below!
+                    // See: https://github.com/mozilla/localForage/issues/161
+                    if (value === null) {
+                        value = undefined;
+                    }
+
+                    var req = store.put(value, key);
+
+                    transaction.oncomplete = function () {
+                        // Cast to undefined so the value passed to
+                        // callback/promise is the same as what one would get out
+                        // of `getItem()` later. This leads to some weirdness
+                        // (setItem('foo', undefined) will return `null`), but
+                        // it's not my fault localStorage is our baseline and that
+                        // it's weird.
+                        if (value === undefined) {
+                            value = null;
+                        }
+
+                        resolve(value);
+                    };
+                    transaction.onabort = transaction.onerror = function () {
+                        var err = req.error ? req.error : req.transaction.error;
+                        reject(err);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function removeItem(key, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+                    // We use a Grunt task to make this safe for IE and some
+                    // versions of Android (including those used by Cordova).
+                    // Normally IE won't like `.delete()` and will insist on
+                    // using `['delete']()`, but we have a build step that
+                    // fixes this for us now.
+                    var req = store["delete"](key);
+                    transaction.oncomplete = function () {
+                        resolve();
+                    };
+
+                    transaction.onerror = function () {
+                        reject(req.error);
+                    };
+
+                    // The request will be also be aborted if we've exceeded our storage
+                    // space.
+                    transaction.onabort = function () {
+                        var err = req.error ? req.error : req.transaction.error;
+                        reject(err);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function clear(callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+                    var req = store.clear();
+
+                    transaction.oncomplete = function () {
+                        resolve();
+                    };
+
+                    transaction.onabort = transaction.onerror = function () {
+                        var err = req.error ? req.error : req.transaction.error;
+                        reject(err);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function length(callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+                    var req = store.count();
+
+                    req.onsuccess = function () {
+                        resolve(req.result);
+                    };
+
+                    req.onerror = function () {
+                        reject(req.error);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function key(n, callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        if (n < 0) {
+            resolve(null);
+
+            return;
+        }
+
+        self.ready().then(function () {
+            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+                    var advanced = false;
+                    var req = store.openCursor();
+
+                    req.onsuccess = function () {
+                        var cursor = req.result;
+                        if (!cursor) {
+                            // this means there weren't enough keys
+                            resolve(null);
+
+                            return;
+                        }
+
+                        if (n === 0) {
+                            // We have the first key, return it if that's what they
+                            // wanted.
+                            resolve(cursor.key);
+                        } else {
+                            if (!advanced) {
+                                // Otherwise, ask the cursor to skip ahead n
+                                // records.
+                                advanced = true;
+                                cursor.advance(n);
+                            } else {
+                                // When we get here, we've got the nth key.
+                                resolve(cursor.key);
+                            }
+                        }
+                    };
+
+                    req.onerror = function () {
+                        reject(req.error);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function keys(callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {
+                if (err) {
+                    return reject(err);
+                }
+
+                try {
+                    var store = transaction.objectStore(self._dbInfo.storeName);
+                    var req = store.openCursor();
+                    var keys = [];
+
+                    req.onsuccess = function () {
+                        var cursor = req.result;
+
+                        if (!cursor) {
+                            resolve(keys);
+                            return;
+                        }
+
+                        keys.push(cursor.key);
+                        cursor["continue"]();
+                    };
+
+                    req.onerror = function () {
+                        reject(req.error);
+                    };
+                } catch (e) {
+                    reject(e);
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function dropInstance(options, callback) {
+    callback = getCallback.apply(this, arguments);
+
+    var currentConfig = this.config();
+    options = typeof options !== 'function' && options || {};
+    if (!options.name) {
+        options.name = options.name || currentConfig.name;
+        options.storeName = options.storeName || currentConfig.storeName;
+    }
+
+    var self = this;
+    var promise;
+    if (!options.name) {
+        promise = Promise$1.reject('Invalid arguments');
+    } else {
+        var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;
+
+        var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {
+            var dbContext = dbContexts[options.name];
+            var forages = dbContext.forages;
+            dbContext.db = db;
+            for (var i = 0; i < forages.length; i++) {
+                forages[i]._dbInfo.db = db;
+            }
+            return db;
+        });
+
+        if (!options.storeName) {
+            promise = dbPromise.then(function (db) {
+                _deferReadiness(options);
+
+                var dbContext = dbContexts[options.name];
+                var forages = dbContext.forages;
+
+                db.close();
+                for (var i = 0; i < forages.length; i++) {
+                    var forage = forages[i];
+                    forage._dbInfo.db = null;
+                }
+
+                var dropDBPromise = new Promise$1(function (resolve, reject) {
+                    var req = idb.deleteDatabase(options.name);
+
+                    req.onerror = req.onblocked = function (err) {
+                        var db = req.result;
+                        if (db) {
+                            db.close();
+                        }
+                        reject(err);
+                    };
+
+                    req.onsuccess = function () {
+                        var db = req.result;
+                        if (db) {
+                            db.close();
+                        }
+                        resolve(db);
+                    };
+                });
+
+                return dropDBPromise.then(function (db) {
+                    dbContext.db = db;
+                    for (var i = 0; i < forages.length; i++) {
+                        var _forage = forages[i];
+                        _advanceReadiness(_forage._dbInfo);
+                    }
+                })["catch"](function (err) {
+                    (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function () {});
+                    throw err;
+                });
+            });
+        } else {
+            promise = dbPromise.then(function (db) {
+                if (!db.objectStoreNames.contains(options.storeName)) {
+                    return;
+                }
+
+                var newVersion = db.version + 1;
+
+                _deferReadiness(options);
+
+                var dbContext = dbContexts[options.name];
+                var forages = dbContext.forages;
+
+                db.close();
+                for (var i = 0; i < forages.length; i++) {
+                    var forage = forages[i];
+                    forage._dbInfo.db = null;
+                    forage._dbInfo.version = newVersion;
+                }
+
+                var dropObjectPromise = new Promise$1(function (resolve, reject) {
+                    var req = idb.open(options.name, newVersion);
+
+                    req.onerror = function (err) {
+                        var db = req.result;
+                        db.close();
+                        reject(err);
+                    };
+
+                    req.onupgradeneeded = function () {
+                        var db = req.result;
+                        db.deleteObjectStore(options.storeName);
+                    };
+
+                    req.onsuccess = function () {
+                        var db = req.result;
+                        db.close();
+                        resolve(db);
+                    };
+                });
+
+                return dropObjectPromise.then(function (db) {
+                    dbContext.db = db;
+                    for (var j = 0; j < forages.length; j++) {
+                        var _forage2 = forages[j];
+                        _forage2._dbInfo.db = db;
+                        _advanceReadiness(_forage2._dbInfo);
+                    }
+                })["catch"](function (err) {
+                    (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function () {});
+                    throw err;
+                });
+            });
+        }
+    }
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+var asyncStorage = {
+    _driver: 'asyncStorage',
+    _initStorage: _initStorage,
+    _support: isIndexedDBValid(),
+    iterate: iterate,
+    getItem: getItem,
+    setItem: setItem,
+    removeItem: removeItem,
+    clear: clear,
+    length: length,
+    key: key,
+    keys: keys,
+    dropInstance: dropInstance
+};
+
+function isWebSQLValid() {
+    return typeof openDatabase === 'function';
+}
+
+// Sadly, the best way to save binary data in WebSQL/localStorage is serializing
+// it to Base64, so this is how we store it to prevent very strange errors with less
+// verbose ways of binary <-> string data storage.
+var BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+var BLOB_TYPE_PREFIX = '~~local_forage_type~';
+var BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;
+
+var SERIALIZED_MARKER = '__lfsc__:';
+var SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;
+
+// OMG the serializations!
+var TYPE_ARRAYBUFFER = 'arbf';
+var TYPE_BLOB = 'blob';
+var TYPE_INT8ARRAY = 'si08';
+var TYPE_UINT8ARRAY = 'ui08';
+var TYPE_UINT8CLAMPEDARRAY = 'uic8';
+var TYPE_INT16ARRAY = 'si16';
+var TYPE_INT32ARRAY = 'si32';
+var TYPE_UINT16ARRAY = 'ur16';
+var TYPE_UINT32ARRAY = 'ui32';
+var TYPE_FLOAT32ARRAY = 'fl32';
+var TYPE_FLOAT64ARRAY = 'fl64';
+var TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;
+
+var toString$1 = Object.prototype.toString;
+
+function stringToBuffer(serializedString) {
+    // Fill the string into a ArrayBuffer.
+    var bufferLength = serializedString.length * 0.75;
+    var len = serializedString.length;
+    var i;
+    var p = 0;
+    var encoded1, encoded2, encoded3, encoded4;
+
+    if (serializedString[serializedString.length - 1] === '=') {
+        bufferLength--;
+        if (serializedString[serializedString.length - 2] === '=') {
+            bufferLength--;
+        }
+    }
+
+    var buffer = new ArrayBuffer(bufferLength);
+    var bytes = new Uint8Array(buffer);
+
+    for (i = 0; i < len; i += 4) {
+        encoded1 = BASE_CHARS.indexOf(serializedString[i]);
+        encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);
+        encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);
+        encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);
+
+        /*jslint bitwise: true */
+        bytes[p++] = encoded1 << 2 | encoded2 >> 4;
+        bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
+        bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
+    }
+    return buffer;
+}
+
+// Converts a buffer to a string to store, serialized, in the backend
+// storage library.
+function bufferToString(buffer) {
+    // base64-arraybuffer
+    var bytes = new Uint8Array(buffer);
+    var base64String = '';
+    var i;
+
+    for (i = 0; i < bytes.length; i += 3) {
+        /*jslint bitwise: true */
+        base64String += BASE_CHARS[bytes[i] >> 2];
+        base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];
+        base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];
+        base64String += BASE_CHARS[bytes[i + 2] & 63];
+    }
+
+    if (bytes.length % 3 === 2) {
+        base64String = base64String.substring(0, base64String.length - 1) + '=';
+    } else if (bytes.length % 3 === 1) {
+        base64String = base64String.substring(0, base64String.length - 2) + '==';
+    }
+
+    return base64String;
+}
+
+// Serialize a value, afterwards executing a callback (which usually
+// instructs the `setItem()` callback/promise to be executed). This is how
+// we store binary data with localStorage.
+function serialize(value, callback) {
+    var valueType = '';
+    if (value) {
+        valueType = toString$1.call(value);
+    }
+
+    // Cannot use `value instanceof ArrayBuffer` or such here, as these
+    // checks fail when running the tests using casper.js...
+    //
+    // TODO: See why those tests fail and use a better solution.
+    if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {
+        // Convert binary arrays to a string and prefix the string with
+        // a special marker.
+        var buffer;
+        var marker = SERIALIZED_MARKER;
+
+        if (value instanceof ArrayBuffer) {
+            buffer = value;
+            marker += TYPE_ARRAYBUFFER;
+        } else {
+            buffer = value.buffer;
+
+            if (valueType === '[object Int8Array]') {
+                marker += TYPE_INT8ARRAY;
+            } else if (valueType === '[object Uint8Array]') {
+                marker += TYPE_UINT8ARRAY;
+            } else if (valueType === '[object Uint8ClampedArray]') {
+                marker += TYPE_UINT8CLAMPEDARRAY;
+            } else if (valueType === '[object Int16Array]') {
+                marker += TYPE_INT16ARRAY;
+            } else if (valueType === '[object Uint16Array]') {
+                marker += TYPE_UINT16ARRAY;
+            } else if (valueType === '[object Int32Array]') {
+                marker += TYPE_INT32ARRAY;
+            } else if (valueType === '[object Uint32Array]') {
+                marker += TYPE_UINT32ARRAY;
+            } else if (valueType === '[object Float32Array]') {
+                marker += TYPE_FLOAT32ARRAY;
+            } else if (valueType === '[object Float64Array]') {
+                marker += TYPE_FLOAT64ARRAY;
+            } else {
+                callback(new Error('Failed to get type for BinaryArray'));
+            }
+        }
+
+        callback(marker + bufferToString(buffer));
+    } else if (valueType === '[object Blob]') {
+        // Conver the blob to a binaryArray and then to a string.
+        var fileReader = new FileReader();
+
+        fileReader.onload = function () {
+            // Backwards-compatible prefix for the blob type.
+            var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);
+
+            callback(SERIALIZED_MARKER + TYPE_BLOB + str);
+        };
+
+        fileReader.readAsArrayBuffer(value);
+    } else {
+        try {
+            callback(JSON.stringify(value));
+        } catch (e) {
+            console.error("Couldn't convert value into a JSON string: ", value);
+
+            callback(null, e);
+        }
+    }
+}
+
+// Deserialize data we've inserted into a value column/field. We place
+// special markers into our strings to mark them as encoded; this isn't
+// as nice as a meta field, but it's the only sane thing we can do whilst
+// keeping localStorage support intact.
+//
+// Oftentimes this will just deserialize JSON content, but if we have a
+// special marker (SERIALIZED_MARKER, defined above), we will extract
+// some kind of arraybuffer/binary data/typed array out of the string.
+function deserialize(value) {
+    // If we haven't marked this string as being specially serialized (i.e.
+    // something other than serialized JSON), we can just return it and be
+    // done with it.
+    if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {
+        return JSON.parse(value);
+    }
+
+    // The following code deals with deserializing some kind of Blob or
+    // TypedArray. First we separate out the type of data we're dealing
+    // with from the data itself.
+    var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);
+    var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);
+
+    var blobType;
+    // Backwards-compatible blob type serialization strategy.
+    // DBs created with older versions of localForage will simply not have the blob type.
+    if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {
+        var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);
+        blobType = matcher[1];
+        serializedString = serializedString.substring(matcher[0].length);
+    }
+    var buffer = stringToBuffer(serializedString);
+
+    // Return the right type based on the code/type set during
+    // serialization.
+    switch (type) {
+        case TYPE_ARRAYBUFFER:
+            return buffer;
+        case TYPE_BLOB:
+            return createBlob([buffer], { type: blobType });
+        case TYPE_INT8ARRAY:
+            return new Int8Array(buffer);
+        case TYPE_UINT8ARRAY:
+            return new Uint8Array(buffer);
+        case TYPE_UINT8CLAMPEDARRAY:
+            return new Uint8ClampedArray(buffer);
+        case TYPE_INT16ARRAY:
+            return new Int16Array(buffer);
+        case TYPE_UINT16ARRAY:
+            return new Uint16Array(buffer);
+        case TYPE_INT32ARRAY:
+            return new Int32Array(buffer);
+        case TYPE_UINT32ARRAY:
+            return new Uint32Array(buffer);
+        case TYPE_FLOAT32ARRAY:
+            return new Float32Array(buffer);
+        case TYPE_FLOAT64ARRAY:
+            return new Float64Array(buffer);
+        default:
+            throw new Error('Unkown type: ' + type);
+    }
+}
+
+var localforageSerializer = {
+    serialize: serialize,
+    deserialize: deserialize,
+    stringToBuffer: stringToBuffer,
+    bufferToString: bufferToString
+};
+
+/*
+ * Includes code from:
+ *
+ * base64-arraybuffer
+ * https://github.com/niklasvh/base64-arraybuffer
+ *
+ * Copyright (c) 2012 Niklas von Hertzen
+ * Licensed under the MIT license.
+ */
+
+function createDbTable(t, dbInfo, callback, errorCallback) {
+    t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);
+}
+
+// Open the WebSQL database (automatically creates one if one didn't
+// previously exist), using any options set in the config.
+function _initStorage$1(options) {
+    var self = this;
+    var dbInfo = {
+        db: null
+    };
+
+    if (options) {
+        for (var i in options) {
+            dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];
+        }
+    }
+
+    var dbInfoPromise = new Promise$1(function (resolve, reject) {
+        // Open the database; the openDatabase API will automatically
+        // create it for us if it doesn't exist.
+        try {
+            dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);
+        } catch (e) {
+            return reject(e);
+        }
+
+        // Create our key/value table if it doesn't exist.
+        dbInfo.db.transaction(function (t) {
+            createDbTable(t, dbInfo, function () {
+                self._dbInfo = dbInfo;
+                resolve();
+            }, function (t, error) {
+                reject(error);
+            });
+        }, reject);
+    });
+
+    dbInfo.serializer = localforageSerializer;
+    return dbInfoPromise;
+}
+
+function tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {
+    t.executeSql(sqlStatement, args, callback, function (t, error) {
+        if (error.code === error.SYNTAX_ERR) {
+            t.executeSql('SELECT name FROM sqlite_master ' + "WHERE type='table' AND name = ?", [dbInfo.storeName], function (t, results) {
+                if (!results.rows.length) {
+                    // if the table is missing (was deleted)
+                    // re-create it table and retry
+                    createDbTable(t, dbInfo, function () {
+                        t.executeSql(sqlStatement, args, callback, errorCallback);
+                    }, errorCallback);
+                } else {
+                    errorCallback(t, error);
+                }
+            }, errorCallback);
+        } else {
+            errorCallback(t, error);
+        }
+    }, errorCallback);
+}
+
+function getItem$1(key, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            var dbInfo = self._dbInfo;
+            dbInfo.db.transaction(function (t) {
+                tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {
+                    var result = results.rows.length ? results.rows.item(0).value : null;
+
+                    // Check to see if this is serialized content we need to
+                    // unpack.
+                    if (result) {
+                        result = dbInfo.serializer.deserialize(result);
+                    }
+
+                    resolve(result);
+                }, function (t, error) {
+                    reject(error);
+                });
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function iterate$1(iterator, callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            var dbInfo = self._dbInfo;
+
+            dbInfo.db.transaction(function (t) {
+                tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {
+                    var rows = results.rows;
+                    var length = rows.length;
+
+                    for (var i = 0; i < length; i++) {
+                        var item = rows.item(i);
+                        var result = item.value;
+
+                        // Check to see if this is serialized content
+                        // we need to unpack.
+                        if (result) {
+                            result = dbInfo.serializer.deserialize(result);
+                        }
+
+                        result = iterator(result, item.key, i + 1);
+
+                        // void(0) prevents problems with redefinition
+                        // of `undefined`.
+                        if (result !== void 0) {
+                            resolve(result);
+                            return;
+                        }
+                    }
+
+                    resolve();
+                }, function (t, error) {
+                    reject(error);
+                });
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function _setItem(key, value, callback, retriesLeft) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            // The localStorage API doesn't return undefined values in an
+            // "expected" way, so undefined is always cast to null in all
+            // drivers. See: https://github.com/mozilla/localForage/pull/42
+            if (value === undefined) {
+                value = null;
+            }
+
+            // Save the original value to pass to the callback.
+            var originalValue = value;
+
+            var dbInfo = self._dbInfo;
+            dbInfo.serializer.serialize(value, function (value, error) {
+                if (error) {
+                    reject(error);
+                } else {
+                    dbInfo.db.transaction(function (t) {
+                        tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {
+                            resolve(originalValue);
+                        }, function (t, error) {
+                            reject(error);
+                        });
+                    }, function (sqlError) {
+                        // The transaction failed; check
+                        // to see if it's a quota error.
+                        if (sqlError.code === sqlError.QUOTA_ERR) {
+                            // We reject the callback outright for now, but
+                            // it's worth trying to re-run the transaction.
+                            // Even if the user accepts the prompt to use
+                            // more storage on Safari, this error will
+                            // be called.
+                            //
+                            // Try to re-run the transaction.
+                            if (retriesLeft > 0) {
+                                resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));
+                                return;
+                            }
+                            reject(sqlError);
+                        }
+                    });
+                }
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function setItem$1(key, value, callback) {
+    return _setItem.apply(this, [key, value, callback, 1]);
+}
+
+function removeItem$1(key, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            var dbInfo = self._dbInfo;
+            dbInfo.db.transaction(function (t) {
+                tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {
+                    resolve();
+                }, function (t, error) {
+                    reject(error);
+                });
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Deletes every item in the table.
+// TODO: Find out if this resets the AUTO_INCREMENT number.
+function clear$1(callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            var dbInfo = self._dbInfo;
+            dbInfo.db.transaction(function (t) {
+                tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {
+                    resolve();
+                }, function (t, error) {
+                    reject(error);
+                });
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Does a simple `COUNT(key)` to get the number of items stored in
+// localForage.
+function length$1(callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            var dbInfo = self._dbInfo;
+            dbInfo.db.transaction(function (t) {
+                // Ahhh, SQL makes this one soooooo easy.
+                tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {
+                    var result = results.rows.item(0).c;
+                    resolve(result);
+                }, function (t, error) {
+                    reject(error);
+                });
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Return the key located at key index X; essentially gets the key from a
+// `WHERE id = ?`. This is the most efficient way I can think to implement
+// this rarely-used (in my experience) part of the API, but it can seem
+// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so
+// the ID of each key will change every time it's updated. Perhaps a stored
+// procedure for the `setItem()` SQL would solve this problem?
+// TODO: Don't change ID on `setItem()`.
+function key$1(n, callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            var dbInfo = self._dbInfo;
+            dbInfo.db.transaction(function (t) {
+                tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {
+                    var result = results.rows.length ? results.rows.item(0).key : null;
+                    resolve(result);
+                }, function (t, error) {
+                    reject(error);
+                });
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function keys$1(callback) {
+    var self = this;
+
+    var promise = new Promise$1(function (resolve, reject) {
+        self.ready().then(function () {
+            var dbInfo = self._dbInfo;
+            dbInfo.db.transaction(function (t) {
+                tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {
+                    var keys = [];
+
+                    for (var i = 0; i < results.rows.length; i++) {
+                        keys.push(results.rows.item(i).key);
+                    }
+
+                    resolve(keys);
+                }, function (t, error) {
+                    reject(error);
+                });
+            });
+        })["catch"](reject);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// https://www.w3.org/TR/webdatabase/#databases
+// > There is no way to enumerate or delete the databases available for an origin from this API.
+function getAllStoreNames(db) {
+    return new Promise$1(function (resolve, reject) {
+        db.transaction(function (t) {
+            t.executeSql('SELECT name FROM sqlite_master ' + "WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function (t, results) {
+                var storeNames = [];
+
+                for (var i = 0; i < results.rows.length; i++) {
+                    storeNames.push(results.rows.item(i).name);
+                }
+
+                resolve({
+                    db: db,
+                    storeNames: storeNames
+                });
+            }, function (t, error) {
+                reject(error);
+            });
+        }, function (sqlError) {
+            reject(sqlError);
+        });
+    });
+}
+
+function dropInstance$1(options, callback) {
+    callback = getCallback.apply(this, arguments);
+
+    var currentConfig = this.config();
+    options = typeof options !== 'function' && options || {};
+    if (!options.name) {
+        options.name = options.name || currentConfig.name;
+        options.storeName = options.storeName || currentConfig.storeName;
+    }
+
+    var self = this;
+    var promise;
+    if (!options.name) {
+        promise = Promise$1.reject('Invalid arguments');
+    } else {
+        promise = new Promise$1(function (resolve) {
+            var db;
+            if (options.name === currentConfig.name) {
+                // use the db reference of the current instance
+                db = self._dbInfo.db;
+            } else {
+                db = openDatabase(options.name, '', '', 0);
+            }
+
+            if (!options.storeName) {
+                // drop all database tables
+                resolve(getAllStoreNames(db));
+            } else {
+                resolve({
+                    db: db,
+                    storeNames: [options.storeName]
+                });
+            }
+        }).then(function (operationInfo) {
+            return new Promise$1(function (resolve, reject) {
+                operationInfo.db.transaction(function (t) {
+                    function dropTable(storeName) {
+                        return new Promise$1(function (resolve, reject) {
+                            t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {
+                                resolve();
+                            }, function (t, error) {
+                                reject(error);
+                            });
+                        });
+                    }
+
+                    var operations = [];
+                    for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {
+                        operations.push(dropTable(operationInfo.storeNames[i]));
+                    }
+
+                    Promise$1.all(operations).then(function () {
+                        resolve();
+                    })["catch"](function (e) {
+                        reject(e);
+                    });
+                }, function (sqlError) {
+                    reject(sqlError);
+                });
+            });
+        });
+    }
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+var webSQLStorage = {
+    _driver: 'webSQLStorage',
+    _initStorage: _initStorage$1,
+    _support: isWebSQLValid(),
+    iterate: iterate$1,
+    getItem: getItem$1,
+    setItem: setItem$1,
+    removeItem: removeItem$1,
+    clear: clear$1,
+    length: length$1,
+    key: key$1,
+    keys: keys$1,
+    dropInstance: dropInstance$1
+};
+
+function isLocalStorageValid() {
+    try {
+        return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&
+        // in IE8 typeof localStorage.setItem === 'object'
+        !!localStorage.setItem;
+    } catch (e) {
+        return false;
+    }
+}
+
+function _getKeyPrefix(options, defaultConfig) {
+    var keyPrefix = options.name + '/';
+
+    if (options.storeName !== defaultConfig.storeName) {
+        keyPrefix += options.storeName + '/';
+    }
+    return keyPrefix;
+}
+
+// Check if localStorage throws when saving an item
+function checkIfLocalStorageThrows() {
+    var localStorageTestKey = '_localforage_support_test';
+
+    try {
+        localStorage.setItem(localStorageTestKey, true);
+        localStorage.removeItem(localStorageTestKey);
+
+        return false;
+    } catch (e) {
+        return true;
+    }
+}
+
+// Check if localStorage is usable and allows to save an item
+// This method checks if localStorage is usable in Safari Private Browsing
+// mode, or in any other case where the available quota for localStorage
+// is 0 and there wasn't any saved items yet.
+function _isLocalStorageUsable() {
+    return !checkIfLocalStorageThrows() || localStorage.length > 0;
+}
+
+// Config the localStorage backend, using options set in the config.
+function _initStorage$2(options) {
+    var self = this;
+    var dbInfo = {};
+    if (options) {
+        for (var i in options) {
+            dbInfo[i] = options[i];
+        }
+    }
+
+    dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);
+
+    if (!_isLocalStorageUsable()) {
+        return Promise$1.reject();
+    }
+
+    self._dbInfo = dbInfo;
+    dbInfo.serializer = localforageSerializer;
+
+    return Promise$1.resolve();
+}
+
+// Remove all keys from the datastore, effectively destroying all data in
+// the app's key/value store!
+function clear$2(callback) {
+    var self = this;
+    var promise = self.ready().then(function () {
+        var keyPrefix = self._dbInfo.keyPrefix;
+
+        for (var i = localStorage.length - 1; i >= 0; i--) {
+            var key = localStorage.key(i);
+
+            if (key.indexOf(keyPrefix) === 0) {
+                localStorage.removeItem(key);
+            }
+        }
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Retrieve an item from the store. Unlike the original async_storage
+// library in Gaia, we don't modify return values at all. If a key's value
+// is `undefined`, we pass that value to the callback function.
+function getItem$2(key, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = self.ready().then(function () {
+        var dbInfo = self._dbInfo;
+        var result = localStorage.getItem(dbInfo.keyPrefix + key);
+
+        // If a result was found, parse it from the serialized
+        // string into a JS object. If result isn't truthy, the key
+        // is likely undefined and we'll pass it straight to the
+        // callback.
+        if (result) {
+            result = dbInfo.serializer.deserialize(result);
+        }
+
+        return result;
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Iterate over all items in the store.
+function iterate$2(iterator, callback) {
+    var self = this;
+
+    var promise = self.ready().then(function () {
+        var dbInfo = self._dbInfo;
+        var keyPrefix = dbInfo.keyPrefix;
+        var keyPrefixLength = keyPrefix.length;
+        var length = localStorage.length;
+
+        // We use a dedicated iterator instead of the `i` variable below
+        // so other keys we fetch in localStorage aren't counted in
+        // the `iterationNumber` argument passed to the `iterate()`
+        // callback.
+        //
+        // See: github.com/mozilla/localForage/pull/435#discussion_r38061530
+        var iterationNumber = 1;
+
+        for (var i = 0; i < length; i++) {
+            var key = localStorage.key(i);
+            if (key.indexOf(keyPrefix) !== 0) {
+                continue;
+            }
+            var value = localStorage.getItem(key);
+
+            // If a result was found, parse it from the serialized
+            // string into a JS object. If result isn't truthy, the
+            // key is likely undefined and we'll pass it straight
+            // to the iterator.
+            if (value) {
+                value = dbInfo.serializer.deserialize(value);
+            }
+
+            value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);
+
+            if (value !== void 0) {
+                return value;
+            }
+        }
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Same as localStorage's key() method, except takes a callback.
+function key$2(n, callback) {
+    var self = this;
+    var promise = self.ready().then(function () {
+        var dbInfo = self._dbInfo;
+        var result;
+        try {
+            result = localStorage.key(n);
+        } catch (error) {
+            result = null;
+        }
+
+        // Remove the prefix from the key, if a key is found.
+        if (result) {
+            result = result.substring(dbInfo.keyPrefix.length);
+        }
+
+        return result;
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function keys$2(callback) {
+    var self = this;
+    var promise = self.ready().then(function () {
+        var dbInfo = self._dbInfo;
+        var length = localStorage.length;
+        var keys = [];
+
+        for (var i = 0; i < length; i++) {
+            var itemKey = localStorage.key(i);
+            if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {
+                keys.push(itemKey.substring(dbInfo.keyPrefix.length));
+            }
+        }
+
+        return keys;
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Supply the number of keys in the datastore to the callback function.
+function length$2(callback) {
+    var self = this;
+    var promise = self.keys().then(function (keys) {
+        return keys.length;
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Remove an item from the store, nice and simple.
+function removeItem$2(key, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = self.ready().then(function () {
+        var dbInfo = self._dbInfo;
+        localStorage.removeItem(dbInfo.keyPrefix + key);
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+// Set a key's value and run an optional callback once the value is set.
+// Unlike Gaia's implementation, the callback function is passed the value,
+// in case you want to operate on that value only after you're sure it
+// saved, or something like that.
+function setItem$2(key, value, callback) {
+    var self = this;
+
+    key = normalizeKey(key);
+
+    var promise = self.ready().then(function () {
+        // Convert undefined values to null.
+        // https://github.com/mozilla/localForage/pull/42
+        if (value === undefined) {
+            value = null;
+        }
+
+        // Save the original value to pass to the callback.
+        var originalValue = value;
+
+        return new Promise$1(function (resolve, reject) {
+            var dbInfo = self._dbInfo;
+            dbInfo.serializer.serialize(value, function (value, error) {
+                if (error) {
+                    reject(error);
+                } else {
+                    try {
+                        localStorage.setItem(dbInfo.keyPrefix + key, value);
+                        resolve(originalValue);
+                    } catch (e) {
+                        // localStorage capacity exceeded.
+                        // TODO: Make this a specific error/event.
+                        if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {
+                            reject(e);
+                        }
+                        reject(e);
+                    }
+                }
+            });
+        });
+    });
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+function dropInstance$2(options, callback) {
+    callback = getCallback.apply(this, arguments);
+
+    options = typeof options !== 'function' && options || {};
+    if (!options.name) {
+        var currentConfig = this.config();
+        options.name = options.name || currentConfig.name;
+        options.storeName = options.storeName || currentConfig.storeName;
+    }
+
+    var self = this;
+    var promise;
+    if (!options.name) {
+        promise = Promise$1.reject('Invalid arguments');
+    } else {
+        promise = new Promise$1(function (resolve) {
+            if (!options.storeName) {
+                resolve(options.name + '/');
+            } else {
+                resolve(_getKeyPrefix(options, self._defaultConfig));
+            }
+        }).then(function (keyPrefix) {
+            for (var i = localStorage.length - 1; i >= 0; i--) {
+                var key = localStorage.key(i);
+
+                if (key.indexOf(keyPrefix) === 0) {
+                    localStorage.removeItem(key);
+                }
+            }
+        });
+    }
+
+    executeCallback(promise, callback);
+    return promise;
+}
+
+var localStorageWrapper = {
+    _driver: 'localStorageWrapper',
+    _initStorage: _initStorage$2,
+    _support: isLocalStorageValid(),
+    iterate: iterate$2,
+    getItem: getItem$2,
+    setItem: setItem$2,
+    removeItem: removeItem$2,
+    clear: clear$2,
+    length: length$2,
+    key: key$2,
+    keys: keys$2,
+    dropInstance: dropInstance$2
+};
+
+var sameValue = function sameValue(x, y) {
+    return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);
+};
+
+var includes = function includes(array, searchElement) {
+    var len = array.length;
+    var i = 0;
+    while (i < len) {
+        if (sameValue(array[i], searchElement)) {
+            return true;
+        }
+        i++;
+    }
+
+    return false;
+};
+
+var isArray = Array.isArray || function (arg) {
+    return Object.prototype.toString.call(arg) === '[object Array]';
+};
+
+// Drivers are stored here when `defineDriver()` is called.
+// They are shared across all instances of localForage.
+var DefinedDrivers = {};
+
+var DriverSupport = {};
+
+var DefaultDrivers = {
+    INDEXEDDB: asyncStorage,
+    WEBSQL: webSQLStorage,
+    LOCALSTORAGE: localStorageWrapper
+};
+
+var DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];
+
+var OptionalDriverMethods = ['dropInstance'];
+
+var LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);
+
+var DefaultConfig = {
+    description: '',
+    driver: DefaultDriverOrder.slice(),
+    name: 'localforage',
+    // Default DB size is _JUST UNDER_ 5MB, as it's the highest size
+    // we can use without a prompt.
+    size: 4980736,
+    storeName: 'keyvaluepairs',
+    version: 1.0
+};
+
+function callWhenReady(localForageInstance, libraryMethod) {
+    localForageInstance[libraryMethod] = function () {
+        var _args = arguments;
+        return localForageInstance.ready().then(function () {
+            return localForageInstance[libraryMethod].apply(localForageInstance, _args);
+        });
+    };
+}
+
+function extend() {
+    for (var i = 1; i < arguments.length; i++) {
+        var arg = arguments[i];
+
+        if (arg) {
+            for (var _key in arg) {
+                if (arg.hasOwnProperty(_key)) {
+                    if (isArray(arg[_key])) {
+                        arguments[0][_key] = arg[_key].slice();
+                    } else {
+                        arguments[0][_key] = arg[_key];
+                    }
+                }
+            }
+        }
+    }
+
+    return arguments[0];
+}
+
+var LocalForage = function () {
+    function LocalForage(options) {
+        _classCallCheck(this, LocalForage);
+
+        for (var driverTypeKey in DefaultDrivers) {
+            if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {
+                var driver = DefaultDrivers[driverTypeKey];
+                var driverName = driver._driver;
+                this[driverTypeKey] = driverName;
+
+                if (!DefinedDrivers[driverName]) {
+                    // we don't need to wait for the promise,
+                    // since the default drivers can be defined
+                    // in a blocking manner
+                    this.defineDriver(driver);
+                }
+            }
+        }
+
+        this._defaultConfig = extend({}, DefaultConfig);
+        this._config = extend({}, this._defaultConfig, options);
+        this._driverSet = null;
+        this._initDriver = null;
+        this._ready = false;
+        this._dbInfo = null;
+
+        this._wrapLibraryMethodsWithReady();
+        this.setDriver(this._config.driver)["catch"](function () {});
+    }
+
+    // Set any config values for localForage; can be called anytime before
+    // the first API call (e.g. `getItem`, `setItem`).
+    // We loop through options so we don't overwrite existing config
+    // values.
+
+
+    LocalForage.prototype.config = function config(options) {
+        // If the options argument is an object, we use it to set values.
+        // Otherwise, we return either a specified config value or all
+        // config values.
+        if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {
+            // If localforage is ready and fully initialized, we can't set
+            // any new configuration values. Instead, we return an error.
+            if (this._ready) {
+                return new Error("Can't call config() after localforage " + 'has been used.');
+            }
+
+            for (var i in options) {
+                if (i === 'storeName') {
+                    options[i] = options[i].replace(/\W/g, '_');
+                }
+
+                if (i === 'version' && typeof options[i] !== 'number') {
+                    return new Error('Database version must be a number.');
+                }
+
+                this._config[i] = options[i];
+            }
+
+            // after all config options are set and
+            // the driver option is used, try setting it
+            if ('driver' in options && options.driver) {
+                return this.setDriver(this._config.driver);
+            }
+
+            return true;
+        } else if (typeof options === 'string') {
+            return this._config[options];
+        } else {
+            return this._config;
+        }
+    };
+
+    // Used to define a custom driver, shared across all instances of
+    // localForage.
+
+
+    LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {
+        var promise = new Promise$1(function (resolve, reject) {
+            try {
+                var driverName = driverObject._driver;
+                var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');
+
+                // A driver name should be defined and not overlap with the
+                // library-defined, default drivers.
+                if (!driverObject._driver) {
+                    reject(complianceError);
+                    return;
+                }
+
+                var driverMethods = LibraryMethods.concat('_initStorage');
+                for (var i = 0, len = driverMethods.length; i < len; i++) {
+                    var driverMethodName = driverMethods[i];
+
+                    // when the property is there,
+                    // it should be a method even when optional
+                    var isRequired = !includes(OptionalDriverMethods, driverMethodName);
+                    if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {
+                        reject(complianceError);
+                        return;
+                    }
+                }
+
+                var configureMissingMethods = function configureMissingMethods() {
+                    var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {
+                        return function () {
+                            var error = new Error('Method ' + methodName + ' is not implemented by the current driver');
+                            var promise = Promise$1.reject(error);
+                            executeCallback(promise, arguments[arguments.length - 1]);
+                            return promise;
+                        };
+                    };
+
+                    for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {
+                        var optionalDriverMethod = OptionalDriverMethods[_i];
+                        if (!driverObject[optionalDriverMethod]) {
+                            driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);
+                        }
+                    }
+                };
+
+                configureMissingMethods();
+
+                var setDriverSupport = function setDriverSupport(support) {
+                    if (DefinedDrivers[driverName]) {
+                        console.info('Redefining LocalForage driver: ' + driverName);
+                    }
+                    DefinedDrivers[driverName] = driverObject;
+                    DriverSupport[driverName] = support;
+                    // don't use a then, so that we can define
+                    // drivers that have simple _support methods
+                    // in a blocking manner
+                    resolve();
+                };
+
+                if ('_support' in driverObject) {
+                    if (driverObject._support && typeof driverObject._support === 'function') {
+                        driverObject._support().then(setDriverSupport, reject);
+                    } else {
+                        setDriverSupport(!!driverObject._support);
+                    }
+                } else {
+                    setDriverSupport(true);
+                }
+            } catch (e) {
+                reject(e);
+            }
+        });
+
+        executeTwoCallbacks(promise, callback, errorCallback);
+        return promise;
+    };
+
+    LocalForage.prototype.driver = function driver() {
+        return this._driver || null;
+    };
+
+    LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {
+        var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));
+
+        executeTwoCallbacks(getDriverPromise, callback, errorCallback);
+        return getDriverPromise;
+    };
+
+    LocalForage.prototype.getSerializer = function getSerializer(callback) {
+        var serializerPromise = Promise$1.resolve(localforageSerializer);
+        executeTwoCallbacks(serializerPromise, callback);
+        return serializerPromise;
+    };
+
+    LocalForage.prototype.ready = function ready(callback) {
+        var self = this;
+
+        var promise = self._driverSet.then(function () {
+            if (self._ready === null) {
+                self._ready = self._initDriver();
+            }
+
+            return self._ready;
+        });
+
+        executeTwoCallbacks(promise, callback, callback);
+        return promise;
+    };
+
+    LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {
+        var self = this;
+
+        if (!isArray(drivers)) {
+            drivers = [drivers];
+        }
+
+        var supportedDrivers = this._getSupportedDrivers(drivers);
+
+        function setDriverToConfig() {
+            self._config.driver = self.driver();
+        }
+
+        function extendSelfWithDriver(driver) {
+            self._extend(driver);
+            setDriverToConfig();
+
+            self._ready = self._initStorage(self._config);
+            return self._ready;
+        }
+
+        function initDriver(supportedDrivers) {
+            return function () {
+                var currentDriverIndex = 0;
+
+                function driverPromiseLoop() {
+                    while (currentDriverIndex < supportedDrivers.length) {
+                        var driverName = supportedDrivers[currentDriverIndex];
+                        currentDriverIndex++;
+
+                        self._dbInfo = null;
+                        self._ready = null;
+
+                        return self.getDriver(driverName).then(extendSelfWithDriver)["catch"](driverPromiseLoop);
+                    }
+
+                    setDriverToConfig();
+                    var error = new Error('No available storage method found.');
+                    self._driverSet = Promise$1.reject(error);
+                    return self._driverSet;
+                }
+
+                return driverPromiseLoop();
+            };
+        }
+
+        // There might be a driver initialization in progress
+        // so wait for it to finish in order to avoid a possible
+        // race condition to set _dbInfo
+        var oldDriverSetDone = this._driverSet !== null ? this._driverSet["catch"](function () {
+            return Promise$1.resolve();
+        }) : Promise$1.resolve();
+
+        this._driverSet = oldDriverSetDone.then(function () {
+            var driverName = supportedDrivers[0];
+            self._dbInfo = null;
+            self._ready = null;
+
+            return self.getDriver(driverName).then(function (driver) {
+                self._driver = driver._driver;
+                setDriverToConfig();
+                self._wrapLibraryMethodsWithReady();
+                self._initDriver = initDriver(supportedDrivers);
+            });
+        })["catch"](function () {
+            setDriverToConfig();
+            var error = new Error('No available storage method found.');
+            self._driverSet = Promise$1.reject(error);
+            return self._driverSet;
+        });
+
+        executeTwoCallbacks(this._driverSet, callback, errorCallback);
+        return this._driverSet;
+    };
+
+    LocalForage.prototype.supports = function supports(driverName) {
+        return !!DriverSupport[driverName];
+    };
+
+    LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {
+        extend(this, libraryMethodsAndProperties);
+    };
+
+    LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {
+        var supportedDrivers = [];
+        for (var i = 0, len = drivers.length; i < len; i++) {
+            var driverName = drivers[i];
+            if (this.supports(driverName)) {
+                supportedDrivers.push(driverName);
+            }
+        }
+        return supportedDrivers;
+    };
+
+    LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {
+        // Add a stub for each driver API method that delays the call to the
+        // corresponding driver method until localForage is ready. These stubs
+        // will be replaced by the driver methods as soon as the driver is
+        // loaded, so there is no performance impact.
+        for (var i = 0, len = LibraryMethods.length; i < len; i++) {
+            callWhenReady(this, LibraryMethods[i]);
+        }
+    };
+
+    LocalForage.prototype.createInstance = function createInstance(options) {
+        return new LocalForage(options);
+    };
+
+    return LocalForage;
+}();
+
+// The actual localForage object that we expose as a module or via a
+// global. It's extended by pulling in one of our other libraries.
+
+
+var localforage_js = new LocalForage();
+
+module.exports = localforage_js;
+
+},{"3":3}]},{},[4])(4)
+});
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isFunction = __webpack_require__(40),
+    isLength = __webpack_require__(48);
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+  return value != null && isLength(value.length) && !isFunction(value);
+}
+
+module.exports = isArrayLike;
+
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayLikeKeys = __webpack_require__(69),
+    baseKeys = __webpack_require__(73),
+    isArrayLike = __webpack_require__(18);
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ *   this.a = 1;
+ *   this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
+
+module.exports = keys;
+
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
+ * URI.js - Mutating URLs
+ *
+ * Version: 1.19.1
+ *
+ * Author: Rodney Rehm
+ * Web: http://medialize.github.io/URI.js/
+ *
+ * Licensed under
+ *   MIT License http://www.opensource.org/licenses/mit-license
+ *
+ */
+(function (root, factory) {
+  'use strict';
+  // https://github.com/umdjs/umd/blob/master/returnExports.js
+  if ( true && module.exports) {
+    // Node
+    module.exports = factory(__webpack_require__(110), __webpack_require__(111), __webpack_require__(112));
+  } else if (true) {
+    // AMD. Register as an anonymous module.
+    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(110), __webpack_require__(111), __webpack_require__(112)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+                __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+                (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  } else {}
+}(this, function (punycode, IPv6, SLD, root) {
+  'use strict';
+  /*global location, escape, unescape */
+  // FIXME: v2.0.0 renamce non-camelCase properties to uppercase
+  /*jshint camelcase: false */
+
+  // save current URI variable, if any
+  var _URI = root && root.URI;
+
+  function URI(url, base) {
+    var _urlSupplied = arguments.length >= 1;
+    var _baseSupplied = arguments.length >= 2;
+
+    // Allow instantiation without the 'new' keyword
+    if (!(this instanceof URI)) {
+      if (_urlSupplied) {
+        if (_baseSupplied) {
+          return new URI(url, base);
+        }
+
+        return new URI(url);
+      }
+
+      return new URI();
+    }
+
+    if (url === undefined) {
+      if (_urlSupplied) {
+        throw new TypeError('undefined is not a valid argument for URI');
+      }
+
+      if (typeof location !== 'undefined') {
+        url = location.href + '';
+      } else {
+        url = '';
+      }
+    }
+
+    if (url === null) {
+      if (_urlSupplied) {
+        throw new TypeError('null is not a valid argument for URI');
+      }
+    }
+
+    this.href(url);
+
+    // resolve to base according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor
+    if (base !== undefined) {
+      return this.absoluteTo(base);
+    }
+
+    return this;
+  }
+
+  function isInteger(value) {
+    return /^[0-9]+$/.test(value);
+  }
+
+  URI.version = '1.19.1';
+
+  var p = URI.prototype;
+  var hasOwn = Object.prototype.hasOwnProperty;
+
+  function escapeRegEx(string) {
+    // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963
+    return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+  }
+
+  function getType(value) {
+    // IE8 doesn't return [Object Undefined] but [Object Object] for undefined value
+    if (value === undefined) {
+      return 'Undefined';
+    }
+
+    return String(Object.prototype.toString.call(value)).slice(8, -1);
+  }
+
+  function isArray(obj) {
+    return getType(obj) === 'Array';
+  }
+
+  function filterArrayValues(data, value) {
+    var lookup = {};
+    var i, length;
+
+    if (getType(value) === 'RegExp') {
+      lookup = null;
+    } else if (isArray(value)) {
+      for (i = 0, length = value.length; i < length; i++) {
+        lookup[value[i]] = true;
+      }
+    } else {
+      lookup[value] = true;
+    }
+
+    for (i = 0, length = data.length; i < length; i++) {
+      /*jshint laxbreak: true */
+      var _match = lookup && lookup[data[i]] !== undefined
+        || !lookup && value.test(data[i]);
+      /*jshint laxbreak: false */
+      if (_match) {
+        data.splice(i, 1);
+        length--;
+        i--;
+      }
+    }
+
+    return data;
+  }
+
+  function arrayContains(list, value) {
+    var i, length;
+
+    // value may be string, number, array, regexp
+    if (isArray(value)) {
+      // Note: this can be optimized to O(n) (instead of current O(m * n))
+      for (i = 0, length = value.length; i < length; i++) {
+        if (!arrayContains(list, value[i])) {
+          return false;
+        }
+      }
+
+      return true;
+    }
+
+    var _type = getType(value);
+    for (i = 0, length = list.length; i < length; i++) {
+      if (_type === 'RegExp') {
+        if (typeof list[i] === 'string' && list[i].match(value)) {
+          return true;
+        }
+      } else if (list[i] === value) {
+        return true;
+      }
+    }
+
+    return false;
+  }
+
+  function arraysEqual(one, two) {
+    if (!isArray(one) || !isArray(two)) {
+      return false;
+    }
+
+    // arrays can't be equal if they have different amount of content
+    if (one.length !== two.length) {
+      return false;
+    }
+
+    one.sort();
+    two.sort();
+
+    for (var i = 0, l = one.length; i < l; i++) {
+      if (one[i] !== two[i]) {
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  function trimSlashes(text) {
+    var trim_expression = /^\/+|\/+$/g;
+    return text.replace(trim_expression, '');
+  }
+
+  URI._parts = function() {
+    return {
+      protocol: null,
+      username: null,
+      password: null,
+      hostname: null,
+      urn: null,
+      port: null,
+      path: null,
+      query: null,
+      fragment: null,
+      // state
+      preventInvalidHostname: URI.preventInvalidHostname,
+      duplicateQueryParameters: URI.duplicateQueryParameters,
+      escapeQuerySpace: URI.escapeQuerySpace
+    };
+  };
+  // state: throw on invalid hostname
+  // see https://github.com/medialize/URI.js/pull/345
+  // and https://github.com/medialize/URI.js/issues/354
+  URI.preventInvalidHostname = false;
+  // state: allow duplicate query parameters (a=1&a=1)
+  URI.duplicateQueryParameters = false;
+  // state: replaces + with %20 (space in query strings)
+  URI.escapeQuerySpace = true;
+  // static properties
+  URI.protocol_expression = /^[a-z][a-z0-9.+-]*$/i;
+  URI.idn_expression = /[^a-z0-9\._-]/i;
+  URI.punycode_expression = /(xn--)/i;
+  // well, 333.444.555.666 matches, but it sure ain't no IPv4 - do we care?
+  URI.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
+  // credits to Rich Brown
+  // source: http://forums.intermapper.com/viewtopic.php?p=1096#1096
+  // specification: http://www.ietf.org/rfc/rfc4291.txt
+  URI.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
+  // expression used is "gruber revised" (@gruber v2) determined to be the
+  // best solution in a regex-golf we did a couple of ages ago at
+  // * http://mathiasbynens.be/demo/url-regex
+  // * http://rodneyrehm.de/t/url-regex.html
+  URI.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig;
+  URI.findUri = {
+    // valid "scheme://" or "www."
+    start: /\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,
+    // everything up to the next whitespace
+    end: /[\s\r\n]|$/,
+    // trim trailing punctuation captured by end RegExp
+    trim: /[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,
+    // balanced parens inclusion (), [], {}, <>
+    parens: /(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g,
+  };
+  // http://www.iana.org/assignments/uri-schemes.html
+  // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports
+  URI.defaultPorts = {
+    http: '80',
+    https: '443',
+    ftp: '21',
+    gopher: '70',
+    ws: '80',
+    wss: '443'
+  };
+  // list of protocols which always require a hostname
+  URI.hostProtocols = [
+    'http',
+    'https'
+  ];
+
+  // allowed hostname characters according to RFC 3986
+  // ALPHA DIGIT "-" "." "_" "~" "!" "$" "&" "'" "(" ")" "*" "+" "," ";" "=" %encoded
+  // I've never seen a (non-IDN) hostname other than: ALPHA DIGIT . - _
+  URI.invalid_hostname_characters = /[^a-zA-Z0-9\.\-:_]/;
+  // map DOM Elements to their URI attribute
+  URI.domAttributes = {
+    'a': 'href',
+    'blockquote': 'cite',
+    'link': 'href',
+    'base': 'href',
+    'script': 'src',
+    'form': 'action',
+    'img': 'src',
+    'area': 'href',
+    'iframe': 'src',
+    'embed': 'src',
+    'source': 'src',
+    'track': 'src',
+    'input': 'src', // but only if type="image"
+    'audio': 'src',
+    'video': 'src'
+  };
+  URI.getDomAttribute = function(node) {
+    if (!node || !node.nodeName) {
+      return undefined;
+    }
+
+    var nodeName = node.nodeName.toLowerCase();
+    // <input> should only expose src for type="image"
+    if (nodeName === 'input' && node.type !== 'image') {
+      return undefined;
+    }
+
+    return URI.domAttributes[nodeName];
+  };
+
+  function escapeForDumbFirefox36(value) {
+    // https://github.com/medialize/URI.js/issues/91
+    return escape(value);
+  }
+
+  // encoding / decoding according to RFC3986
+  function strictEncodeURIComponent(string) {
+    // see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent
+    return encodeURIComponent(string)
+      .replace(/[!'()*]/g, escapeForDumbFirefox36)
+      .replace(/\*/g, '%2A');
+  }
+  URI.encode = strictEncodeURIComponent;
+  URI.decode = decodeURIComponent;
+  URI.iso8859 = function() {
+    URI.encode = escape;
+    URI.decode = unescape;
+  };
+  URI.unicode = function() {
+    URI.encode = strictEncodeURIComponent;
+    URI.decode = decodeURIComponent;
+  };
+  URI.characters = {
+    pathname: {
+      encode: {
+        // RFC3986 2.1: For consistency, URI producers and normalizers should
+        // use uppercase hexadecimal digits for all percent-encodings.
+        expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,
+        map: {
+          // -._~!'()*
+          '%24': '$',
+          '%26': '&',
+          '%2B': '+',
+          '%2C': ',',
+          '%3B': ';',
+          '%3D': '=',
+          '%3A': ':',
+          '%40': '@'
+        }
+      },
+      decode: {
+        expression: /[\/\?#]/g,
+        map: {
+          '/': '%2F',
+          '?': '%3F',
+          '#': '%23'
+        }
+      }
+    },
+    reserved: {
+      encode: {
+        // RFC3986 2.1: For consistency, URI producers and normalizers should
+        // use uppercase hexadecimal digits for all percent-encodings.
+        expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,
+        map: {
+          // gen-delims
+          '%3A': ':',
+          '%2F': '/',
+          '%3F': '?',
+          '%23': '#',
+          '%5B': '[',
+          '%5D': ']',
+          '%40': '@',
+          // sub-delims
+          '%21': '!',
+          '%24': '$',
+          '%26': '&',
+          '%27': '\'',
+          '%28': '(',
+          '%29': ')',
+          '%2A': '*',
+          '%2B': '+',
+          '%2C': ',',
+          '%3B': ';',
+          '%3D': '='
+        }
+      }
+    },
+    urnpath: {
+      // The characters under `encode` are the characters called out by RFC 2141 as being acceptable
+      // for usage in a URN. RFC2141 also calls out "-", ".", and "_" as acceptable characters, but
+      // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also
+      // note that the colon character is not featured in the encoding map; this is because URI.js
+      // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it
+      // should not appear unencoded in a segment itself.
+      // See also the note above about RFC3986 and capitalalized hex digits.
+      encode: {
+        expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,
+        map: {
+          '%21': '!',
+          '%24': '$',
+          '%27': '\'',
+          '%28': '(',
+          '%29': ')',
+          '%2A': '*',
+          '%2B': '+',
+          '%2C': ',',
+          '%3B': ';',
+          '%3D': '=',
+          '%40': '@'
+        }
+      },
+      // These characters are the characters called out by RFC2141 as "reserved" characters that
+      // should never appear in a URN, plus the colon character (see note above).
+      decode: {
+        expression: /[\/\?#:]/g,
+        map: {
+          '/': '%2F',
+          '?': '%3F',
+          '#': '%23',
+          ':': '%3A'
+        }
+      }
+    }
+  };
+  URI.encodeQuery = function(string, escapeQuerySpace) {
+    var escaped = URI.encode(string + '');
+    if (escapeQuerySpace === undefined) {
+      escapeQuerySpace = URI.escapeQuerySpace;
+    }
+
+    return escapeQuerySpace ? escaped.replace(/%20/g, '+') : escaped;
+  };
+  URI.decodeQuery = function(string, escapeQuerySpace) {
+    string += '';
+    if (escapeQuerySpace === undefined) {
+      escapeQuerySpace = URI.escapeQuerySpace;
+    }
+
+    try {
+      return URI.decode(escapeQuerySpace ? string.replace(/\+/g, '%20') : string);
+    } catch(e) {
+      // we're not going to mess with weird encodings,
+      // give up and return the undecoded original string
+      // see https://github.com/medialize/URI.js/issues/87
+      // see https://github.com/medialize/URI.js/issues/92
+      return string;
+    }
+  };
+  // generate encode/decode path functions
+  var _parts = {'encode':'encode', 'decode':'decode'};
+  var _part;
+  var generateAccessor = function(_group, _part) {
+    return function(string) {
+      try {
+        return URI[_part](string + '').replace(URI.characters[_group][_part].expression, function(c) {
+          return URI.characters[_group][_part].map[c];
+        });
+      } catch (e) {
+        // we're not going to mess with weird encodings,
+        // give up and return the undecoded original string
+        // see https://github.com/medialize/URI.js/issues/87
+        // see https://github.com/medialize/URI.js/issues/92
+        return string;
+      }
+    };
+  };
+
+  for (_part in _parts) {
+    URI[_part + 'PathSegment'] = generateAccessor('pathname', _parts[_part]);
+    URI[_part + 'UrnPathSegment'] = generateAccessor('urnpath', _parts[_part]);
+  }
+
+  var generateSegmentedPathFunction = function(_sep, _codingFuncName, _innerCodingFuncName) {
+    return function(string) {
+      // Why pass in names of functions, rather than the function objects themselves? The
+      // definitions of some functions (but in particular, URI.decode) will occasionally change due
+      // to URI.js having ISO8859 and Unicode modes. Passing in the name and getting it will ensure
+      // that the functions we use here are "fresh".
+      var actualCodingFunc;
+      if (!_innerCodingFuncName) {
+        actualCodingFunc = URI[_codingFuncName];
+      } else {
+        actualCodingFunc = function(string) {
+          return URI[_codingFuncName](URI[_innerCodingFuncName](string));
+        };
+      }
+
+      var segments = (string + '').split(_sep);
+
+      for (var i = 0, length = segments.length; i < length; i++) {
+        segments[i] = actualCodingFunc(segments[i]);
+      }
+
+      return segments.join(_sep);
+    };
+  };
+
+  // This takes place outside the above loop because we don't want, e.g., encodeUrnPath functions.
+  URI.decodePath = generateSegmentedPathFunction('/', 'decodePathSegment');
+  URI.decodeUrnPath = generateSegmentedPathFunction(':', 'decodeUrnPathSegment');
+  URI.recodePath = generateSegmentedPathFunction('/', 'encodePathSegment', 'decode');
+  URI.recodeUrnPath = generateSegmentedPathFunction(':', 'encodeUrnPathSegment', 'decode');
+
+  URI.encodeReserved = generateAccessor('reserved', 'encode');
+
+  URI.parse = function(string, parts) {
+    var pos;
+    if (!parts) {
+      parts = {
+        preventInvalidHostname: URI.preventInvalidHostname
+      };
+    }
+    // [protocol"://"[username[":"password]"@"]hostname[":"port]"/"?][path]["?"querystring]["#"fragment]
+
+    // extract fragment
+    pos = string.indexOf('#');
+    if (pos > -1) {
+      // escaping?
+      parts.fragment = string.substring(pos + 1) || null;
+      string = string.substring(0, pos);
+    }
+
+    // extract query
+    pos = string.indexOf('?');
+    if (pos > -1) {
+      // escaping?
+      parts.query = string.substring(pos + 1) || null;
+      string = string.substring(0, pos);
+    }
+
+    // extract protocol
+    if (string.substring(0, 2) === '//') {
+      // relative-scheme
+      parts.protocol = null;
+      string = string.substring(2);
+      // extract "user:pass@host:port"
+      string = URI.parseAuthority(string, parts);
+    } else {
+      pos = string.indexOf(':');
+      if (pos > -1) {
+        parts.protocol = string.substring(0, pos) || null;
+        if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) {
+          // : may be within the path
+          parts.protocol = undefined;
+        } else if (string.substring(pos + 1, pos + 3) === '//') {
+          string = string.substring(pos + 3);
+
+          // extract "user:pass@host:port"
+          string = URI.parseAuthority(string, parts);
+        } else {
+          string = string.substring(pos + 1);
+          parts.urn = true;
+        }
+      }
+    }
+
+    // what's left must be the path
+    parts.path = string;
+
+    // and we're done
+    return parts;
+  };
+  URI.parseHost = function(string, parts) {
+    if (!string) {
+      string = '';
+    }
+
+    // Copy chrome, IE, opera backslash-handling behavior.
+    // Back slashes before the query string get converted to forward slashes
+    // See: https://github.com/joyent/node/blob/386fd24f49b0e9d1a8a076592a404168faeecc34/lib/url.js#L115-L124
+    // See: https://code.google.com/p/chromium/issues/detail?id=25916
+    // https://github.com/medialize/URI.js/pull/233
+    string = string.replace(/\\/g, '/');
+
+    // extract host:port
+    var pos = string.indexOf('/');
+    var bracketPos;
+    var t;
+
+    if (pos === -1) {
+      pos = string.length;
+    }
+
+    if (string.charAt(0) === '[') {
+      // IPv6 host - http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6
+      // I claim most client software breaks on IPv6 anyways. To simplify things, URI only accepts
+      // IPv6+port in the format [2001:db8::1]:80 (for the time being)
+      bracketPos = string.indexOf(']');
+      parts.hostname = string.substring(1, bracketPos) || null;
+      parts.port = string.substring(bracketPos + 2, pos) || null;
+      if (parts.port === '/') {
+        parts.port = null;
+      }
+    } else {
+      var firstColon = string.indexOf(':');
+      var firstSlash = string.indexOf('/');
+      var nextColon = string.indexOf(':', firstColon + 1);
+      if (nextColon !== -1 && (firstSlash === -1 || nextColon < firstSlash)) {
+        // IPv6 host contains multiple colons - but no port
+        // this notation is actually not allowed by RFC 3986, but we're a liberal parser
+        parts.hostname = string.substring(0, pos) || null;
+        parts.port = null;
+      } else {
+        t = string.substring(0, pos).split(':');
+        parts.hostname = t[0] || null;
+        parts.port = t[1] || null;
+      }
+    }
+
+    if (parts.hostname && string.substring(pos).charAt(0) !== '/') {
+      pos++;
+      string = '/' + string;
+    }
+
+    if (parts.preventInvalidHostname) {
+      URI.ensureValidHostname(parts.hostname, parts.protocol);
+    }
+
+    if (parts.port) {
+      URI.ensureValidPort(parts.port);
+    }
+
+    return string.substring(pos) || '/';
+  };
+  URI.parseAuthority = function(string, parts) {
+    string = URI.parseUserinfo(string, parts);
+    return URI.parseHost(string, parts);
+  };
+  URI.parseUserinfo = function(string, parts) {
+    // extract username:password
+    var firstSlash = string.indexOf('/');
+    var pos = string.lastIndexOf('@', firstSlash > -1 ? firstSlash : string.length - 1);
+    var t;
+
+    // authority@ must come before /path
+    if (pos > -1 && (firstSlash === -1 || pos < firstSlash)) {
+      t = string.substring(0, pos).split(':');
+      parts.username = t[0] ? URI.decode(t[0]) : null;
+      t.shift();
+      parts.password = t[0] ? URI.decode(t.join(':')) : null;
+      string = string.substring(pos + 1);
+    } else {
+      parts.username = null;
+      parts.password = null;
+    }
+
+    return string;
+  };
+  URI.parseQuery = function(string, escapeQuerySpace) {
+    if (!string) {
+      return {};
+    }
+
+    // throw out the funky business - "?"[name"="value"&"]+
+    string = string.replace(/&+/g, '&').replace(/^\?*&*|&+$/g, '');
+
+    if (!string) {
+      return {};
+    }
+
+    var items = {};
+    var splits = string.split('&');
+    var length = splits.length;
+    var v, name, value;
+
+    for (var i = 0; i < length; i++) {
+      v = splits[i].split('=');
+      name = URI.decodeQuery(v.shift(), escapeQuerySpace);
+      // no "=" is null according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters
+      value = v.length ? URI.decodeQuery(v.join('='), escapeQuerySpace) : null;
+
+      if (hasOwn.call(items, name)) {
+        if (typeof items[name] === 'string' || items[name] === null) {
+          items[name] = [items[name]];
+        }
+
+        items[name].push(value);
+      } else {
+        items[name] = value;
+      }
+    }
+
+    return items;
+  };
+
+  URI.build = function(parts) {
+    var t = '';
+
+    if (parts.protocol) {
+      t += parts.protocol + ':';
+    }
+
+    if (!parts.urn && (t || parts.hostname)) {
+      t += '//';
+    }
+
+    t += (URI.buildAuthority(parts) || '');
+
+    if (typeof parts.path === 'string') {
+      if (parts.path.charAt(0) !== '/' && typeof parts.hostname === 'string') {
+        t += '/';
+      }
+
+      t += parts.path;
+    }
+
+    if (typeof parts.query === 'string' && parts.query) {
+      t += '?' + parts.query;
+    }
+
+    if (typeof parts.fragment === 'string' && parts.fragment) {
+      t += '#' + parts.fragment;
+    }
+    return t;
+  };
+  URI.buildHost = function(parts) {
+    var t = '';
+
+    if (!parts.hostname) {
+      return '';
+    } else if (URI.ip6_expression.test(parts.hostname)) {
+      t += '[' + parts.hostname + ']';
+    } else {
+      t += parts.hostname;
+    }
+
+    if (parts.port) {
+      t += ':' + parts.port;
+    }
+
+    return t;
+  };
+  URI.buildAuthority = function(parts) {
+    return URI.buildUserinfo(parts) + URI.buildHost(parts);
+  };
+  URI.buildUserinfo = function(parts) {
+    var t = '';
+
+    if (parts.username) {
+      t += URI.encode(parts.username);
+    }
+
+    if (parts.password) {
+      t += ':' + URI.encode(parts.password);
+    }
+
+    if (t) {
+      t += '@';
+    }
+
+    return t;
+  };
+  URI.buildQuery = function(data, duplicateQueryParameters, escapeQuerySpace) {
+    // according to http://tools.ietf.org/html/rfc3986 or http://labs.apache.org/webarch/uri/rfc/rfc3986.html
+    // being »-._~!$&'()*+,;=:@/?« %HEX and alnum are allowed
+    // the RFC explicitly states ?/foo being a valid use case, no mention of parameter syntax!
+    // URI.js treats the query string as being application/x-www-form-urlencoded
+    // see http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type
+
+    var t = '';
+    var unique, key, i, length;
+    for (key in data) {
+      if (hasOwn.call(data, key) && key) {
+        if (isArray(data[key])) {
+          unique = {};
+          for (i = 0, length = data[key].length; i < length; i++) {
+            if (data[key][i] !== undefined && unique[data[key][i] + ''] === undefined) {
+              t += '&' + URI.buildQueryParameter(key, data[key][i], escapeQuerySpace);
+              if (duplicateQueryParameters !== true) {
+                unique[data[key][i] + ''] = true;
+              }
+            }
+          }
+        } else if (data[key] !== undefined) {
+          t += '&' + URI.buildQueryParameter(key, data[key], escapeQuerySpace);
+        }
+      }
+    }
+
+    return t.substring(1);
+  };
+  URI.buildQueryParameter = function(name, value, escapeQuerySpace) {
+    // http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded
+    // don't append "=" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization
+    return URI.encodeQuery(name, escapeQuerySpace) + (value !== null ? '=' + URI.encodeQuery(value, escapeQuerySpace) : '');
+  };
+
+  URI.addQuery = function(data, name, value) {
+    if (typeof name === 'object') {
+      for (var key in name) {
+        if (hasOwn.call(name, key)) {
+          URI.addQuery(data, key, name[key]);
+        }
+      }
+    } else if (typeof name === 'string') {
+      if (data[name] === undefined) {
+        data[name] = value;
+        return;
+      } else if (typeof data[name] === 'string') {
+        data[name] = [data[name]];
+      }
+
+      if (!isArray(value)) {
+        value = [value];
+      }
+
+      data[name] = (data[name] || []).concat(value);
+    } else {
+      throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');
+    }
+  };
+
+  URI.setQuery = function(data, name, value) {
+    if (typeof name === 'object') {
+      for (var key in name) {
+        if (hasOwn.call(name, key)) {
+          URI.setQuery(data, key, name[key]);
+        }
+      }
+    } else if (typeof name === 'string') {
+      data[name] = value === undefined ? null : value;
+    } else {
+      throw new TypeError('URI.setQuery() accepts an object, string as the name parameter');
+    }
+  };
+
+  URI.removeQuery = function(data, name, value) {
+    var i, length, key;
+
+    if (isArray(name)) {
+      for (i = 0, length = name.length; i < length; i++) {
+        data[name[i]] = undefined;
+      }
+    } else if (getType(name) === 'RegExp') {
+      for (key in data) {
+        if (name.test(key)) {
+          data[key] = undefined;
+        }
+      }
+    } else if (typeof name === 'object') {
+      for (key in name) {
+        if (hasOwn.call(name, key)) {
+          URI.removeQuery(data, key, name[key]);
+        }
+      }
+    } else if (typeof name === 'string') {
+      if (value !== undefined) {
+        if (getType(value) === 'RegExp') {
+          if (!isArray(data[name]) && value.test(data[name])) {
+            data[name] = undefined;
+          } else {
+            data[name] = filterArrayValues(data[name], value);
+          }
+        } else if (data[name] === String(value) && (!isArray(value) || value.length === 1)) {
+          data[name] = undefined;
+        } else if (isArray(data[name])) {
+          data[name] = filterArrayValues(data[name], value);
+        }
+      } else {
+        data[name] = undefined;
+      }
+    } else {
+      throw new TypeError('URI.removeQuery() accepts an object, string, RegExp as the first parameter');
+    }
+  };
+  URI.hasQuery = function(data, name, value, withinArray) {
+    switch (getType(name)) {
+      case 'String':
+        // Nothing to do here
+        break;
+
+      case 'RegExp':
+        for (var key in data) {
+          if (hasOwn.call(data, key)) {
+            if (name.test(key) && (value === undefined || URI.hasQuery(data, key, value))) {
+              return true;
+            }
+          }
+        }
+
+        return false;
+
+      case 'Object':
+        for (var _key in name) {
+          if (hasOwn.call(name, _key)) {
+            if (!URI.hasQuery(data, _key, name[_key])) {
+              return false;
+            }
+          }
+        }
+
+        return true;
+
+      default:
+        throw new TypeError('URI.hasQuery() accepts a string, regular expression or object as the name parameter');
+    }
+
+    switch (getType(value)) {
+      case 'Undefined':
+        // true if exists (but may be empty)
+        return name in data; // data[name] !== undefined;
+
+      case 'Boolean':
+        // true if exists and non-empty
+        var _booly = Boolean(isArray(data[name]) ? data[name].length : data[name]);
+        return value === _booly;
+
+      case 'Function':
+        // allow complex comparison
+        return !!value(data[name], name, data);
+
+      case 'Array':
+        if (!isArray(data[name])) {
+          return false;
+        }
+
+        var op = withinArray ? arrayContains : arraysEqual;
+        return op(data[name], value);
+
+      case 'RegExp':
+        if (!isArray(data[name])) {
+          return Boolean(data[name] && data[name].match(value));
+        }
+
+        if (!withinArray) {
+          return false;
+        }
+
+        return arrayContains(data[name], value);
+
+      case 'Number':
+        value = String(value);
+        /* falls through */
+      case 'String':
+        if (!isArray(data[name])) {
+          return data[name] === value;
+        }
+
+        if (!withinArray) {
+          return false;
+        }
+
+        return arrayContains(data[name], value);
+
+      default:
+        throw new TypeError('URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter');
+    }
+  };
+
+
+  URI.joinPaths = function() {
+    var input = [];
+    var segments = [];
+    var nonEmptySegments = 0;
+
+    for (var i = 0; i < arguments.length; i++) {
+      var url = new URI(arguments[i]);
+      input.push(url);
+      var _segments = url.segment();
+      for (var s = 0; s < _segments.length; s++) {
+        if (typeof _segments[s] === 'string') {
+          segments.push(_segments[s]);
+        }
+
+        if (_segments[s]) {
+          nonEmptySegments++;
+        }
+      }
+    }
+
+    if (!segments.length || !nonEmptySegments) {
+      return new URI('');
+    }
+
+    var uri = new URI('').segment(segments);
+
+    if (input[0].path() === '' || input[0].path().slice(0, 1) === '/') {
+      uri.path('/' + uri.path());
+    }
+
+    return uri.normalize();
+  };
+
+  URI.commonPath = function(one, two) {
+    var length = Math.min(one.length, two.length);
+    var pos;
+
+    // find first non-matching character
+    for (pos = 0; pos < length; pos++) {
+      if (one.charAt(pos) !== two.charAt(pos)) {
+        pos--;
+        break;
+      }
+    }
+
+    if (pos < 1) {
+      return one.charAt(0) === two.charAt(0) && one.charAt(0) === '/' ? '/' : '';
+    }
+
+    // revert to last /
+    if (one.charAt(pos) !== '/' || two.charAt(pos) !== '/') {
+      pos = one.substring(0, pos).lastIndexOf('/');
+    }
+
+    return one.substring(0, pos + 1);
+  };
+
+  URI.withinString = function(string, callback, options) {
+    options || (options = {});
+    var _start = options.start || URI.findUri.start;
+    var _end = options.end || URI.findUri.end;
+    var _trim = options.trim || URI.findUri.trim;
+    var _parens = options.parens || URI.findUri.parens;
+    var _attributeOpen = /[a-z0-9-]=["']?$/i;
+
+    _start.lastIndex = 0;
+    while (true) {
+      var match = _start.exec(string);
+      if (!match) {
+        break;
+      }
+
+      var start = match.index;
+      if (options.ignoreHtml) {
+        // attribut(e=["']?$)
+        var attributeOpen = string.slice(Math.max(start - 3, 0), start);
+        if (attributeOpen && _attributeOpen.test(attributeOpen)) {
+          continue;
+        }
+      }
+
+      var end = start + string.slice(start).search(_end);
+      var slice = string.slice(start, end);
+      // make sure we include well balanced parens
+      var parensEnd = -1;
+      while (true) {
+        var parensMatch = _parens.exec(slice);
+        if (!parensMatch) {
+          break;
+        }
+
+        var parensMatchEnd = parensMatch.index + parensMatch[0].length;
+        parensEnd = Math.max(parensEnd, parensMatchEnd);
+      }
+
+      if (parensEnd > -1) {
+        slice = slice.slice(0, parensEnd) + slice.slice(parensEnd).replace(_trim, '');
+      } else {
+        slice = slice.replace(_trim, '');
+      }
+
+      if (slice.length <= match[0].length) {
+        // the extract only contains the starting marker of a URI,
+        // e.g. "www" or "http://"
+        continue;
+      }
+
+      if (options.ignore && options.ignore.test(slice)) {
+        continue;
+      }
+
+      end = start + slice.length;
+      var result = callback(slice, start, end, string);
+      if (result === undefined) {
+        _start.lastIndex = end;
+        continue;
+      }
+
+      result = String(result);
+      string = string.slice(0, start) + result + string.slice(end);
+      _start.lastIndex = start + result.length;
+    }
+
+    _start.lastIndex = 0;
+    return string;
+  };
+
+  URI.ensureValidHostname = function(v, protocol) {
+    // Theoretically URIs allow percent-encoding in Hostnames (according to RFC 3986)
+    // they are not part of DNS and therefore ignored by URI.js
+
+    var hasHostname = !!v; // not null and not an empty string
+    var hasProtocol = !!protocol;
+    var rejectEmptyHostname = false;
+
+    if (hasProtocol) {
+      rejectEmptyHostname = arrayContains(URI.hostProtocols, protocol);
+    }
+
+    if (rejectEmptyHostname && !hasHostname) {
+      throw new TypeError('Hostname cannot be empty, if protocol is ' + protocol);
+    } else if (v && v.match(URI.invalid_hostname_characters)) {
+      // test punycode
+      if (!punycode) {
+        throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');
+      }
+      if (punycode.toASCII(v).match(URI.invalid_hostname_characters)) {
+        throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-:_]');
+      }
+    }
+  };
+
+  URI.ensureValidPort = function (v) {
+    if (!v) {
+      return;
+    }
+
+    var port = Number(v);
+    if (isInteger(port) && (port > 0) && (port < 65536)) {
+      return;
+    }
+
+    throw new TypeError('Port "' + v + '" is not a valid port');
+  };
+
+  // noConflict
+  URI.noConflict = function(removeAll) {
+    if (removeAll) {
+      var unconflicted = {
+        URI: this.noConflict()
+      };
+
+      if (root.URITemplate && typeof root.URITemplate.noConflict === 'function') {
+        unconflicted.URITemplate = root.URITemplate.noConflict();
+      }
+
+      if (root.IPv6 && typeof root.IPv6.noConflict === 'function') {
+        unconflicted.IPv6 = root.IPv6.noConflict();
+      }
+
+      if (root.SecondLevelDomains && typeof root.SecondLevelDomains.noConflict === 'function') {
+        unconflicted.SecondLevelDomains = root.SecondLevelDomains.noConflict();
+      }
+
+      return unconflicted;
+    } else if (root.URI === this) {
+      root.URI = _URI;
+    }
+
+    return this;
+  };
+
+  p.build = function(deferBuild) {
+    if (deferBuild === true) {
+      this._deferred_build = true;
+    } else if (deferBuild === undefined || this._deferred_build) {
+      this._string = URI.build(this._parts);
+      this._deferred_build = false;
+    }
+
+    return this;
+  };
+
+  p.clone = function() {
+    return new URI(this);
+  };
+
+  p.valueOf = p.toString = function() {
+    return this.build(false)._string;
+  };
+
+
+  function generateSimpleAccessor(_part){
+    return function(v, build) {
+      if (v === undefined) {
+        return this._parts[_part] || '';
+      } else {
+        this._parts[_part] = v || null;
+        this.build(!build);
+        return this;
+      }
+    };
+  }
+
+  function generatePrefixAccessor(_part, _key){
+    return function(v, build) {
+      if (v === undefined) {
+        return this._parts[_part] || '';
+      } else {
+        if (v !== null) {
+          v = v + '';
+          if (v.charAt(0) === _key) {
+            v = v.substring(1);
+          }
+        }
+
+        this._parts[_part] = v;
+        this.build(!build);
+        return this;
+      }
+    };
+  }
+
+  p.protocol = generateSimpleAccessor('protocol');
+  p.username = generateSimpleAccessor('username');
+  p.password = generateSimpleAccessor('password');
+  p.hostname = generateSimpleAccessor('hostname');
+  p.port = generateSimpleAccessor('port');
+  p.query = generatePrefixAccessor('query', '?');
+  p.fragment = generatePrefixAccessor('fragment', '#');
+
+  p.search = function(v, build) {
+    var t = this.query(v, build);
+    return typeof t === 'string' && t.length ? ('?' + t) : t;
+  };
+  p.hash = function(v, build) {
+    var t = this.fragment(v, build);
+    return typeof t === 'string' && t.length ? ('#' + t) : t;
+  };
+
+  p.pathname = function(v, build) {
+    if (v === undefined || v === true) {
+      var res = this._parts.path || (this._parts.hostname ? '/' : '');
+      return v ? (this._parts.urn ? URI.decodeUrnPath : URI.decodePath)(res) : res;
+    } else {
+      if (this._parts.urn) {
+        this._parts.path = v ? URI.recodeUrnPath(v) : '';
+      } else {
+        this._parts.path = v ? URI.recodePath(v) : '/';
+      }
+      this.build(!build);
+      return this;
+    }
+  };
+  p.path = p.pathname;
+  p.href = function(href, build) {
+    var key;
+
+    if (href === undefined) {
+      return this.toString();
+    }
+
+    this._string = '';
+    this._parts = URI._parts();
+
+    var _URI = href instanceof URI;
+    var _object = typeof href === 'object' && (href.hostname || href.path || href.pathname);
+    if (href.nodeName) {
+      var attribute = URI.getDomAttribute(href);
+      href = href[attribute] || '';
+      _object = false;
+    }
+
+    // window.location is reported to be an object, but it's not the sort
+    // of object we're looking for:
+    // * location.protocol ends with a colon
+    // * location.query != object.search
+    // * location.hash != object.fragment
+    // simply serializing the unknown object should do the trick
+    // (for location, not for everything...)
+    if (!_URI && _object && href.pathname !== undefined) {
+      href = href.toString();
+    }
+
+    if (typeof href === 'string' || href instanceof String) {
+      this._parts = URI.parse(String(href), this._parts);
+    } else if (_URI || _object) {
+      var src = _URI ? href._parts : href;
+      for (key in src) {
+        if (key === 'query') { continue; }
+        if (hasOwn.call(this._parts, key)) {
+          this._parts[key] = src[key];
+        }
+      }
+      if (src.query) {
+        this.query(src.query, false);
+      }
+    } else {
+      throw new TypeError('invalid input');
+    }
+
+    this.build(!build);
+    return this;
+  };
+
+  // identification accessors
+  p.is = function(what) {
+    var ip = false;
+    var ip4 = false;
+    var ip6 = false;
+    var name = false;
+    var sld = false;
+    var idn = false;
+    var punycode = false;
+    var relative = !this._parts.urn;
+
+    if (this._parts.hostname) {
+      relative = false;
+      ip4 = URI.ip4_expression.test(this._parts.hostname);
+      ip6 = URI.ip6_expression.test(this._parts.hostname);
+      ip = ip4 || ip6;
+      name = !ip;
+      sld = name && SLD && SLD.has(this._parts.hostname);
+      idn = name && URI.idn_expression.test(this._parts.hostname);
+      punycode = name && URI.punycode_expression.test(this._parts.hostname);
+    }
+
+    switch (what.toLowerCase()) {
+      case 'relative':
+        return relative;
+
+      case 'absolute':
+        return !relative;
+
+      // hostname identification
+      case 'domain':
+      case 'name':
+        return name;
+
+      case 'sld':
+        return sld;
+
+      case 'ip':
+        return ip;
+
+      case 'ip4':
+      case 'ipv4':
+      case 'inet4':
+        return ip4;
+
+      case 'ip6':
+      case 'ipv6':
+      case 'inet6':
+        return ip6;
+
+      case 'idn':
+        return idn;
+
+      case 'url':
+        return !this._parts.urn;
+
+      case 'urn':
+        return !!this._parts.urn;
+
+      case 'punycode':
+        return punycode;
+    }
+
+    return null;
+  };
+
+  // component specific input validation
+  var _protocol = p.protocol;
+  var _port = p.port;
+  var _hostname = p.hostname;
+
+  p.protocol = function(v, build) {
+    if (v) {
+      // accept trailing ://
+      v = v.replace(/:(\/\/)?$/, '');
+
+      if (!v.match(URI.protocol_expression)) {
+        throw new TypeError('Protocol "' + v + '" contains characters other than [A-Z0-9.+-] or doesn\'t start with [A-Z]');
+      }
+    }
+
+    return _protocol.call(this, v, build);
+  };
+  p.scheme = p.protocol;
+  p.port = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v !== undefined) {
+      if (v === 0) {
+        v = null;
+      }
+
+      if (v) {
+        v += '';
+        if (v.charAt(0) === ':') {
+          v = v.substring(1);
+        }
+
+        URI.ensureValidPort(v);
+      }
+    }
+    return _port.call(this, v, build);
+  };
+  p.hostname = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v !== undefined) {
+      var x = { preventInvalidHostname: this._parts.preventInvalidHostname };
+      var res = URI.parseHost(v, x);
+      if (res !== '/') {
+        throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
+      }
+
+      v = x.hostname;
+      if (this._parts.preventInvalidHostname) {
+        URI.ensureValidHostname(v, this._parts.protocol);
+      }
+    }
+
+    return _hostname.call(this, v, build);
+  };
+
+  // compound accessors
+  p.origin = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v === undefined) {
+      var protocol = this.protocol();
+      var authority = this.authority();
+      if (!authority) {
+        return '';
+      }
+
+      return (protocol ? protocol + '://' : '') + this.authority();
+    } else {
+      var origin = URI(v);
+      this
+        .protocol(origin.protocol())
+        .authority(origin.authority())
+        .build(!build);
+      return this;
+    }
+  };
+  p.host = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v === undefined) {
+      return this._parts.hostname ? URI.buildHost(this._parts) : '';
+    } else {
+      var res = URI.parseHost(v, this._parts);
+      if (res !== '/') {
+        throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
+      }
+
+      this.build(!build);
+      return this;
+    }
+  };
+  p.authority = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v === undefined) {
+      return this._parts.hostname ? URI.buildAuthority(this._parts) : '';
+    } else {
+      var res = URI.parseAuthority(v, this._parts);
+      if (res !== '/') {
+        throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
+      }
+
+      this.build(!build);
+      return this;
+    }
+  };
+  p.userinfo = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v === undefined) {
+      var t = URI.buildUserinfo(this._parts);
+      return t ? t.substring(0, t.length -1) : t;
+    } else {
+      if (v[v.length-1] !== '@') {
+        v += '@';
+      }
+
+      URI.parseUserinfo(v, this._parts);
+      this.build(!build);
+      return this;
+    }
+  };
+  p.resource = function(v, build) {
+    var parts;
+
+    if (v === undefined) {
+      return this.path() + this.search() + this.hash();
+    }
+
+    parts = URI.parse(v);
+    this._parts.path = parts.path;
+    this._parts.query = parts.query;
+    this._parts.fragment = parts.fragment;
+    this.build(!build);
+    return this;
+  };
+
+  // fraction accessors
+  p.subdomain = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    // convenience, return "www" from "www.example.org"
+    if (v === undefined) {
+      if (!this._parts.hostname || this.is('IP')) {
+        return '';
+      }
+
+      // grab domain and add another segment
+      var end = this._parts.hostname.length - this.domain().length - 1;
+      return this._parts.hostname.substring(0, end) || '';
+    } else {
+      var e = this._parts.hostname.length - this.domain().length;
+      var sub = this._parts.hostname.substring(0, e);
+      var replace = new RegExp('^' + escapeRegEx(sub));
+
+      if (v && v.charAt(v.length - 1) !== '.') {
+        v += '.';
+      }
+
+      if (v.indexOf(':') !== -1) {
+        throw new TypeError('Domains cannot contain colons');
+      }
+
+      if (v) {
+        URI.ensureValidHostname(v, this._parts.protocol);
+      }
+
+      this._parts.hostname = this._parts.hostname.replace(replace, v);
+      this.build(!build);
+      return this;
+    }
+  };
+  p.domain = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (typeof v === 'boolean') {
+      build = v;
+      v = undefined;
+    }
+
+    // convenience, return "example.org" from "www.example.org"
+    if (v === undefined) {
+      if (!this._parts.hostname || this.is('IP')) {
+        return '';
+      }
+
+      // if hostname consists of 1 or 2 segments, it must be the domain
+      var t = this._parts.hostname.match(/\./g);
+      if (t && t.length < 2) {
+        return this._parts.hostname;
+      }
+
+      // grab tld and add another segment
+      var end = this._parts.hostname.length - this.tld(build).length - 1;
+      end = this._parts.hostname.lastIndexOf('.', end -1) + 1;
+      return this._parts.hostname.substring(end) || '';
+    } else {
+      if (!v) {
+        throw new TypeError('cannot set domain empty');
+      }
+
+      if (v.indexOf(':') !== -1) {
+        throw new TypeError('Domains cannot contain colons');
+      }
+
+      URI.ensureValidHostname(v, this._parts.protocol);
+
+      if (!this._parts.hostname || this.is('IP')) {
+        this._parts.hostname = v;
+      } else {
+        var replace = new RegExp(escapeRegEx(this.domain()) + '$');
+        this._parts.hostname = this._parts.hostname.replace(replace, v);
+      }
+
+      this.build(!build);
+      return this;
+    }
+  };
+  p.tld = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (typeof v === 'boolean') {
+      build = v;
+      v = undefined;
+    }
+
+    // return "org" from "www.example.org"
+    if (v === undefined) {
+      if (!this._parts.hostname || this.is('IP')) {
+        return '';
+      }
+
+      var pos = this._parts.hostname.lastIndexOf('.');
+      var tld = this._parts.hostname.substring(pos + 1);
+
+      if (build !== true && SLD && SLD.list[tld.toLowerCase()]) {
+        return SLD.get(this._parts.hostname) || tld;
+      }
+
+      return tld;
+    } else {
+      var replace;
+
+      if (!v) {
+        throw new TypeError('cannot set TLD empty');
+      } else if (v.match(/[^a-zA-Z0-9-]/)) {
+        if (SLD && SLD.is(v)) {
+          replace = new RegExp(escapeRegEx(this.tld()) + '$');
+          this._parts.hostname = this._parts.hostname.replace(replace, v);
+        } else {
+          throw new TypeError('TLD "' + v + '" contains characters other than [A-Z0-9]');
+        }
+      } else if (!this._parts.hostname || this.is('IP')) {
+        throw new ReferenceError('cannot set TLD on non-domain host');
+      } else {
+        replace = new RegExp(escapeRegEx(this.tld()) + '$');
+        this._parts.hostname = this._parts.hostname.replace(replace, v);
+      }
+
+      this.build(!build);
+      return this;
+    }
+  };
+  p.directory = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v === undefined || v === true) {
+      if (!this._parts.path && !this._parts.hostname) {
+        return '';
+      }
+
+      if (this._parts.path === '/') {
+        return '/';
+      }
+
+      var end = this._parts.path.length - this.filename().length - 1;
+      var res = this._parts.path.substring(0, end) || (this._parts.hostname ? '/' : '');
+
+      return v ? URI.decodePath(res) : res;
+
+    } else {
+      var e = this._parts.path.length - this.filename().length;
+      var directory = this._parts.path.substring(0, e);
+      var replace = new RegExp('^' + escapeRegEx(directory));
+
+      // fully qualifier directories begin with a slash
+      if (!this.is('relative')) {
+        if (!v) {
+          v = '/';
+        }
+
+        if (v.charAt(0) !== '/') {
+          v = '/' + v;
+        }
+      }
+
+      // directories always end with a slash
+      if (v && v.charAt(v.length - 1) !== '/') {
+        v += '/';
+      }
+
+      v = URI.recodePath(v);
+      this._parts.path = this._parts.path.replace(replace, v);
+      this.build(!build);
+      return this;
+    }
+  };
+  p.filename = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (typeof v !== 'string') {
+      if (!this._parts.path || this._parts.path === '/') {
+        return '';
+      }
+
+      var pos = this._parts.path.lastIndexOf('/');
+      var res = this._parts.path.substring(pos+1);
+
+      return v ? URI.decodePathSegment(res) : res;
+    } else {
+      var mutatedDirectory = false;
+
+      if (v.charAt(0) === '/') {
+        v = v.substring(1);
+      }
+
+      if (v.match(/\.?\//)) {
+        mutatedDirectory = true;
+      }
+
+      var replace = new RegExp(escapeRegEx(this.filename()) + '$');
+      v = URI.recodePath(v);
+      this._parts.path = this._parts.path.replace(replace, v);
+
+      if (mutatedDirectory) {
+        this.normalizePath(build);
+      } else {
+        this.build(!build);
+      }
+
+      return this;
+    }
+  };
+  p.suffix = function(v, build) {
+    if (this._parts.urn) {
+      return v === undefined ? '' : this;
+    }
+
+    if (v === undefined || v === true) {
+      if (!this._parts.path || this._parts.path === '/') {
+        return '';
+      }
+
+      var filename = this.filename();
+      var pos = filename.lastIndexOf('.');
+      var s, res;
+
+      if (pos === -1) {
+        return '';
+      }
+
+      // suffix may only contain alnum characters (yup, I made this up.)
+      s = filename.substring(pos+1);
+      res = (/^[a-z0-9%]+$/i).test(s) ? s : '';
+      return v ? URI.decodePathSegment(res) : res;
+    } else {
+      if (v.charAt(0) === '.') {
+        v = v.substring(1);
+      }
+
+      var suffix = this.suffix();
+      var replace;
+
+      if (!suffix) {
+        if (!v) {
+          return this;
+        }
+
+        this._parts.path += '.' + URI.recodePath(v);
+      } else if (!v) {
+        replace = new RegExp(escapeRegEx('.' + suffix) + '$');
+      } else {
+        replace = new RegExp(escapeRegEx(suffix) + '$');
+      }
+
+      if (replace) {
+        v = URI.recodePath(v);
+        this._parts.path = this._parts.path.replace(replace, v);
+      }
+
+      this.build(!build);
+      return this;
+    }
+  };
+  p.segment = function(segment, v, build) {
+    var separator = this._parts.urn ? ':' : '/';
+    var path = this.path();
+    var absolute = path.substring(0, 1) === '/';
+    var segments = path.split(separator);
+
+    if (segment !== undefined && typeof segment !== 'number') {
+      build = v;
+      v = segment;
+      segment = undefined;
+    }
+
+    if (segment !== undefined && typeof segment !== 'number') {
+      throw new Error('Bad segment "' + segment + '", must be 0-based integer');
+    }
+
+    if (absolute) {
+      segments.shift();
+    }
+
+    if (segment < 0) {
+      // allow negative indexes to address from the end
+      segment = Math.max(segments.length + segment, 0);
+    }
+
+    if (v === undefined) {
+      /*jshint laxbreak: true */
+      return segment === undefined
+        ? segments
+        : segments[segment];
+      /*jshint laxbreak: false */
+    } else if (segment === null || segments[segment] === undefined) {
+      if (isArray(v)) {
+        segments = [];
+        // collapse empty elements within array
+        for (var i=0, l=v.length; i < l; i++) {
+          if (!v[i].length && (!segments.length || !segments[segments.length -1].length)) {
+            continue;
+          }
+
+          if (segments.length && !segments[segments.length -1].length) {
+            segments.pop();
+          }
+
+          segments.push(trimSlashes(v[i]));
+        }
+      } else if (v || typeof v === 'string') {
+        v = trimSlashes(v);
+        if (segments[segments.length -1] === '') {
+          // empty trailing elements have to be overwritten
+          // to prevent results such as /foo//bar
+          segments[segments.length -1] = v;
+        } else {
+          segments.push(v);
+        }
+      }
+    } else {
+      if (v) {
+        segments[segment] = trimSlashes(v);
+      } else {
+        segments.splice(segment, 1);
+      }
+    }
+
+    if (absolute) {
+      segments.unshift('');
+    }
+
+    return this.path(segments.join(separator), build);
+  };
+  p.segmentCoded = function(segment, v, build) {
+    var segments, i, l;
+
+    if (typeof segment !== 'number') {
+      build = v;
+      v = segment;
+      segment = undefined;
+    }
+
+    if (v === undefined) {
+      segments = this.segment(segment, v, build);
+      if (!isArray(segments)) {
+        segments = segments !== undefined ? URI.decode(segments) : undefined;
+      } else {
+        for (i = 0, l = segments.length; i < l; i++) {
+          segments[i] = URI.decode(segments[i]);
+        }
+      }
+
+      return segments;
+    }
+
+    if (!isArray(v)) {
+      v = (typeof v === 'string' || v instanceof String) ? URI.encode(v) : v;
+    } else {
+      for (i = 0, l = v.length; i < l; i++) {
+        v[i] = URI.encode(v[i]);
+      }
+    }
+
+    return this.segment(segment, v, build);
+  };
+
+  // mutating query string
+  var q = p.query;
+  p.query = function(v, build) {
+    if (v === true) {
+      return URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
+    } else if (typeof v === 'function') {
+      var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
+      var result = v.call(this, data);
+      this._parts.query = URI.buildQuery(result || data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
+      this.build(!build);
+      return this;
+    } else if (v !== undefined && typeof v !== 'string') {
+      this._parts.query = URI.buildQuery(v, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
+      this.build(!build);
+      return this;
+    } else {
+      return q.call(this, v, build);
+    }
+  };
+  p.setQuery = function(name, value, build) {
+    var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
+
+    if (typeof name === 'string' || name instanceof String) {
+      data[name] = value !== undefined ? value : null;
+    } else if (typeof name === 'object') {
+      for (var key in name) {
+        if (hasOwn.call(name, key)) {
+          data[key] = name[key];
+        }
+      }
+    } else {
+      throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');
+    }
+
+    this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
+    if (typeof name !== 'string') {
+      build = value;
+    }
+
+    this.build(!build);
+    return this;
+  };
+  p.addQuery = function(name, value, build) {
+    var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
+    URI.addQuery(data, name, value === undefined ? null : value);
+    this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
+    if (typeof name !== 'string') {
+      build = value;
+    }
+
+    this.build(!build);
+    return this;
+  };
+  p.removeQuery = function(name, value, build) {
+    var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
+    URI.removeQuery(data, name, value);
+    this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
+    if (typeof name !== 'string') {
+      build = value;
+    }
+
+    this.build(!build);
+    return this;
+  };
+  p.hasQuery = function(name, value, withinArray) {
+    var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
+    return URI.hasQuery(data, name, value, withinArray);
+  };
+  p.setSearch = p.setQuery;
+  p.addSearch = p.addQuery;
+  p.removeSearch = p.removeQuery;
+  p.hasSearch = p.hasQuery;
+
+  // sanitizing URLs
+  p.normalize = function() {
+    if (this._parts.urn) {
+      return this
+        .normalizeProtocol(false)
+        .normalizePath(false)
+        .normalizeQuery(false)
+        .normalizeFragment(false)
+        .build();
+    }
+
+    return this
+      .normalizeProtocol(false)
+      .normalizeHostname(false)
+      .normalizePort(false)
+      .normalizePath(false)
+      .normalizeQuery(false)
+      .normalizeFragment(false)
+      .build();
+  };
+  p.normalizeProtocol = function(build) {
+    if (typeof this._parts.protocol === 'string') {
+      this._parts.protocol = this._parts.protocol.toLowerCase();
+      this.build(!build);
+    }
+
+    return this;
+  };
+  p.normalizeHostname = function(build) {
+    if (this._parts.hostname) {
+      if (this.is('IDN') && punycode) {
+        this._parts.hostname = punycode.toASCII(this._parts.hostname);
+      } else if (this.is('IPv6') && IPv6) {
+        this._parts.hostname = IPv6.best(this._parts.hostname);
+      }
+
+      this._parts.hostname = this._parts.hostname.toLowerCase();
+      this.build(!build);
+    }
+
+    return this;
+  };
+  p.normalizePort = function(build) {
+    // remove port of it's the protocol's default
+    if (typeof this._parts.protocol === 'string' && this._parts.port === URI.defaultPorts[this._parts.protocol]) {
+      this._parts.port = null;
+      this.build(!build);
+    }
+
+    return this;
+  };
+  p.normalizePath = function(build) {
+    var _path = this._parts.path;
+    if (!_path) {
+      return this;
+    }
+
+    if (this._parts.urn) {
+      this._parts.path = URI.recodeUrnPath(this._parts.path);
+      this.build(!build);
+      return this;
+    }
+
+    if (this._parts.path === '/') {
+      return this;
+    }
+
+    _path = URI.recodePath(_path);
+
+    var _was_relative;
+    var _leadingParents = '';
+    var _parent, _pos;
+
+    // handle relative paths
+    if (_path.charAt(0) !== '/') {
+      _was_relative = true;
+      _path = '/' + _path;
+    }
+
+    // handle relative files (as opposed to directories)
+    if (_path.slice(-3) === '/..' || _path.slice(-2) === '/.') {
+      _path += '/';
+    }
+
+    // resolve simples
+    _path = _path
+      .replace(/(\/(\.\/)+)|(\/\.$)/g, '/')
+      .replace(/\/{2,}/g, '/');
+
+    // remember leading parents
+    if (_was_relative) {
+      _leadingParents = _path.substring(1).match(/^(\.\.\/)+/) || '';
+      if (_leadingParents) {
+        _leadingParents = _leadingParents[0];
+      }
+    }
+
+    // resolve parents
+    while (true) {
+      _parent = _path.search(/\/\.\.(\/|$)/);
+      if (_parent === -1) {
+        // no more ../ to resolve
+        break;
+      } else if (_parent === 0) {
+        // top level cannot be relative, skip it
+        _path = _path.substring(3);
+        continue;
+      }
+
+      _pos = _path.substring(0, _parent).lastIndexOf('/');
+      if (_pos === -1) {
+        _pos = _parent;
+      }
+      _path = _path.substring(0, _pos) + _path.substring(_parent + 3);
+    }
+
+    // revert to relative
+    if (_was_relative && this.is('relative')) {
+      _path = _leadingParents + _path.substring(1);
+    }
+
+    this._parts.path = _path;
+    this.build(!build);
+    return this;
+  };
+  p.normalizePathname = p.normalizePath;
+  p.normalizeQuery = function(build) {
+    if (typeof this._parts.query === 'string') {
+      if (!this._parts.query.length) {
+        this._parts.query = null;
+      } else {
+        this.query(URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace));
+      }
+
+      this.build(!build);
+    }
+
+    return this;
+  };
+  p.normalizeFragment = function(build) {
+    if (!this._parts.fragment) {
+      this._parts.fragment = null;
+      this.build(!build);
+    }
+
+    return this;
+  };
+  p.normalizeSearch = p.normalizeQuery;
+  p.normalizeHash = p.normalizeFragment;
+
+  p.iso8859 = function() {
+    // expect unicode input, iso8859 output
+    var e = URI.encode;
+    var d = URI.decode;
+
+    URI.encode = escape;
+    URI.decode = decodeURIComponent;
+    try {
+      this.normalize();
+    } finally {
+      URI.encode = e;
+      URI.decode = d;
+    }
+    return this;
+  };
+
+  p.unicode = function() {
+    // expect iso8859 input, unicode output
+    var e = URI.encode;
+    var d = URI.decode;
+
+    URI.encode = strictEncodeURIComponent;
+    URI.decode = unescape;
+    try {
+      this.normalize();
+    } finally {
+      URI.encode = e;
+      URI.decode = d;
+    }
+    return this;
+  };
+
+  p.readable = function() {
+    var uri = this.clone();
+    // removing username, password, because they shouldn't be displayed according to RFC 3986
+    uri.username('').password('').normalize();
+    var t = '';
+    if (uri._parts.protocol) {
+      t += uri._parts.protocol + '://';
+    }
+
+    if (uri._parts.hostname) {
+      if (uri.is('punycode') && punycode) {
+        t += punycode.toUnicode(uri._parts.hostname);
+        if (uri._parts.port) {
+          t += ':' + uri._parts.port;
+        }
+      } else {
+        t += uri.host();
+      }
+    }
+
+    if (uri._parts.hostname && uri._parts.path && uri._parts.path.charAt(0) !== '/') {
+      t += '/';
+    }
+
+    t += uri.path(true);
+    if (uri._parts.query) {
+      var q = '';
+      for (var i = 0, qp = uri._parts.query.split('&'), l = qp.length; i < l; i++) {
+        var kv = (qp[i] || '').split('=');
+        q += '&' + URI.decodeQuery(kv[0], this._parts.escapeQuerySpace)
+          .replace(/&/g, '%26');
+
+        if (kv[1] !== undefined) {
+          q += '=' + URI.decodeQuery(kv[1], this._parts.escapeQuerySpace)
+            .replace(/&/g, '%26');
+        }
+      }
+      t += '?' + q.substring(1);
+    }
+
+    t += URI.decodeQuery(uri.hash(), true);
+    return t;
+  };
+
+  // resolving relative and absolute URLs
+  p.absoluteTo = function(base) {
+    var resolved = this.clone();
+    var properties = ['protocol', 'username', 'password', 'hostname', 'port'];
+    var basedir, i, p;
+
+    if (this._parts.urn) {
+      throw new Error('URNs do not have any generally defined hierarchical components');
+    }
+
+    if (!(base instanceof URI)) {
+      base = new URI(base);
+    }
+
+    if (resolved._parts.protocol) {
+      // Directly returns even if this._parts.hostname is empty.
+      return resolved;
+    } else {
+      resolved._parts.protocol = base._parts.protocol;
+    }
+
+    if (this._parts.hostname) {
+      return resolved;
+    }
+
+    for (i = 0; (p = properties[i]); i++) {
+      resolved._parts[p] = base._parts[p];
+    }
+
+    if (!resolved._parts.path) {
+      resolved._parts.path = base._parts.path;
+      if (!resolved._parts.query) {
+        resolved._parts.query = base._parts.query;
+      }
+    } else {
+      if (resolved._parts.path.substring(-2) === '..') {
+        resolved._parts.path += '/';
+      }
+
+      if (resolved.path().charAt(0) !== '/') {
+        basedir = base.directory();
+        basedir = basedir ? basedir : base.path().indexOf('/') === 0 ? '/' : '';
+        resolved._parts.path = (basedir ? (basedir + '/') : '') + resolved._parts.path;
+        resolved.normalizePath();
+      }
+    }
+
+    resolved.build();
+    return resolved;
+  };
+  p.relativeTo = function(base) {
+    var relative = this.clone().normalize();
+    var relativeParts, baseParts, common, relativePath, basePath;
+
+    if (relative._parts.urn) {
+      throw new Error('URNs do not have any generally defined hierarchical components');
+    }
+
+    base = new URI(base).normalize();
+    relativeParts = relative._parts;
+    baseParts = base._parts;
+    relativePath = relative.path();
+    basePath = base.path();
+
+    if (relativePath.charAt(0) !== '/') {
+      throw new Error('URI is already relative');
+    }
+
+    if (basePath.charAt(0) !== '/') {
+      throw new Error('Cannot calculate a URI relative to another relative URI');
+    }
+
+    if (relativeParts.protocol === baseParts.protocol) {
+      relativeParts.protocol = null;
+    }
+
+    if (relativeParts.username !== baseParts.username || relativeParts.password !== baseParts.password) {
+      return relative.build();
+    }
+
+    if (relativeParts.protocol !== null || relativeParts.username !== null || relativeParts.password !== null) {
+      return relative.build();
+    }
+
+    if (relativeParts.hostname === baseParts.hostname && relativeParts.port === baseParts.port) {
+      relativeParts.hostname = null;
+      relativeParts.port = null;
+    } else {
+      return relative.build();
+    }
+
+    if (relativePath === basePath) {
+      relativeParts.path = '';
+      return relative.build();
+    }
+
+    // determine common sub path
+    common = URI.commonPath(relativePath, basePath);
+
+    // If the paths have nothing in common, return a relative URL with the absolute path.
+    if (!common) {
+      return relative.build();
+    }
+
+    var parents = baseParts.path
+      .substring(common.length)
+      .replace(/[^\/]*$/, '')
+      .replace(/.*?\//g, '../');
+
+    relativeParts.path = (parents + relativeParts.path.substring(common.length)) || './';
+
+    return relative.build();
+  };
+
+  // comparing URIs
+  p.equals = function(uri) {
+    var one = this.clone();
+    var two = new URI(uri);
+    var one_map = {};
+    var two_map = {};
+    var checked = {};
+    var one_query, two_query, key;
+
+    one.normalize();
+    two.normalize();
+
+    // exact match
+    if (one.toString() === two.toString()) {
+      return true;
+    }
+
+    // extract query string
+    one_query = one.query();
+    two_query = two.query();
+    one.query('');
+    two.query('');
+
+    // definitely not equal if not even non-query parts match
+    if (one.toString() !== two.toString()) {
+      return false;
+    }
+
+    // query parameters have the same length, even if they're permuted
+    if (one_query.length !== two_query.length) {
+      return false;
+    }
+
+    one_map = URI.parseQuery(one_query, this._parts.escapeQuerySpace);
+    two_map = URI.parseQuery(two_query, this._parts.escapeQuerySpace);
+
+    for (key in one_map) {
+      if (hasOwn.call(one_map, key)) {
+        if (!isArray(one_map[key])) {
+          if (one_map[key] !== two_map[key]) {
+            return false;
+          }
+        } else if (!arraysEqual(one_map[key], two_map[key])) {
+          return false;
+        }
+
+        checked[key] = true;
+      }
+    }
+
+    for (key in two_map) {
+      if (hasOwn.call(two_map, key)) {
+        if (!checked[key]) {
+          // two contains a parameter not present in one
+          return false;
+        }
+      }
+    }
+
+    return true;
+  };
+
+  // state
+  p.preventInvalidHostname = function(v) {
+    this._parts.preventInvalidHostname = !!v;
+    return this;
+  };
+
+  p.duplicateQueryParameters = function(v) {
+    this._parts.duplicateQueryParameters = !!v;
+    return this;
+  };
+
+  p.escapeQuerySpace = function(v) {
+    this._parts.escapeQuerySpace = !!v;
+    return this;
+  };
+
+  return URI;
+}));
+
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIndexOf = __webpack_require__(84),
+    isArrayLike = __webpack_require__(18),
+    isString = __webpack_require__(85),
+    toInteger = __webpack_require__(47),
+    values = __webpack_require__(59);
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+function includes(collection, value, fromIndex, guard) {
+  collection = isArrayLike(collection) ? collection : values(collection);
+  fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+  var length = collection.length;
+  if (fromIndex < 0) {
+    fromIndex = nativeMax(length + fromIndex, 0);
+  }
+  return isString(collection)
+    ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+    : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+}
+
+module.exports = includes;
+
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports) {
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+  var type = typeof value;
+  length = length == null ? MAX_SAFE_INTEGER : length;
+
+  return !!length &&
+    (type == 'number' ||
+      (type != 'symbol' && reIsUint.test(value))) &&
+        (value > -1 && value % 1 == 0 && value < length);
+}
+
+module.exports = isIndex;
+
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports) {
+
+/**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+function identity(value) {
+  return value;
+}
+
+module.exports = identity;
+
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isSymbol = __webpack_require__(28);
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+function toKey(value) {
+  if (typeof value == 'string' || isSymbol(value)) {
+    return value;
+  }
+  var result = (value + '');
+  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = toKey;
+
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(338);
+
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(352);
+
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports) {
+
+module.exports = function(module) {
+    if (!module.webpackPolyfill) {
+        module.deprecate = function() {};
+        module.paths = [];
+        // module.parent = undefined by default
+        if (!module.children) module.children = [];
+        Object.defineProperty(module, "loaded", {
+            enumerable: true,
+            get: function() {
+                return module.l;
+            }
+        });
+        Object.defineProperty(module, "id", {
+            enumerable: true,
+            get: function() {
+                return module.i;
+            }
+        });
+        module.webpackPolyfill = 1;
+    }
+    return module;
+};
+
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetTag = __webpack_require__(15),
+    isObjectLike = __webpack_require__(11);
+
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+  return typeof value == 'symbol' ||
+    (isObjectLike(value) && baseGetTag(value) == symbolTag);
+}
+
+module.exports = isSymbol;
+
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var root = __webpack_require__(5);
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+module.exports = Symbol;
+
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports) {
+
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+  return value === other || (value !== value && other !== other);
+}
+
+module.exports = eq;
+
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseCreate = __webpack_require__(51),
+    isObject = __webpack_require__(9);
+
+/**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCtor(Ctor) {
+  return function() {
+    // Use a `switch` statement to work with class constructors. See
+    // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+    // for more details.
+    var args = arguments;
+    switch (args.length) {
+      case 0: return new Ctor;
+      case 1: return new Ctor(args[0]);
+      case 2: return new Ctor(args[0], args[1]);
+      case 3: return new Ctor(args[0], args[1], args[2]);
+      case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+      case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+      case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+      case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+    }
+    var thisBinding = baseCreate(Ctor.prototype),
+        result = Ctor.apply(thisBinding, args);
+
+    // Mimic the constructor's `return` behavior.
+    // See https://es5.github.io/#x13.2.2 for more details.
+    return isObject(result) ? result : thisBinding;
+  };
+}
+
+module.exports = createCtor;
+
+
+/***/ }),
+/* 32 */
+/***/ (function(module, exports) {
+
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+function replaceHolders(array, placeholder) {
+  var index = -1,
+      length = array.length,
+      resIndex = 0,
+      result = [];
+
+  while (++index < length) {
+    var value = array[index];
+    if (value === placeholder || value === PLACEHOLDER) {
+      array[index] = PLACEHOLDER;
+      result[resIndex++] = index;
+    }
+  }
+  return result;
+}
+
+module.exports = replaceHolders;
+
+
+/***/ }),
+/* 33 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var listCacheClear = __webpack_require__(389),
+    listCacheDelete = __webpack_require__(390),
+    listCacheGet = __webpack_require__(391),
+    listCacheHas = __webpack_require__(392),
+    listCacheSet = __webpack_require__(393);
+
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+  var index = -1,
+      length = entries == null ? 0 : entries.length;
+
+  this.clear();
+  while (++index < length) {
+    var entry = entries[index];
+    this.set(entry[0], entry[1]);
+  }
+}
+
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
+
+module.exports = ListCache;
+
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var eq = __webpack_require__(30);
+
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+  var length = array.length;
+  while (length--) {
+    if (eq(array[length][0], key)) {
+      return length;
+    }
+  }
+  return -1;
+}
+
+module.exports = assocIndexOf;
+
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getNative = __webpack_require__(16);
+
+/* Built-in method references that are verified to be native. */
+var nativeCreate = getNative(Object, 'create');
+
+module.exports = nativeCreate;
+
+
+/***/ }),
+/* 36 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isKeyable = __webpack_require__(407);
+
+/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+  var data = map.__data__;
+  return isKeyable(key)
+    ? data[typeof key == 'string' ? 'string' : 'hash']
+    : data.map;
+}
+
+module.exports = getMapData;
+
+
+/***/ }),
+/* 37 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isArray = __webpack_require__(6),
+    isKey = __webpack_require__(58),
+    stringToPath = __webpack_require__(430),
+    toString = __webpack_require__(108);
+
+/**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+function castPath(value, object) {
+  if (isArray(value)) {
+    return value;
+  }
+  return isKey(value, object) ? [value] : stringToPath(toString(value));
+}
+
+module.exports = castPath;
+
+
+/***/ }),
+/* 38 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Backbone.NativeView.js 0.3.3
+// ---------------
+
+//     (c) 2015 Adam Krebs, Jimmy Yuen Ho Wong
+//     Backbone.NativeView may be freely distributed under the MIT license.
+//     For all details and documentation:
+//     https://github.com/akre54/Backbone.NativeView
+
+(function (factory) {
+  if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(46), __webpack_require__(10)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+                __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+                (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  } else {}
+}(function (_, Backbone) {
+  // Cached regex to match an opening '<' of an HTML tag, possibly left-padded
+  // with whitespace.
+  var paddedLt = /^\s*</;
+
+  // Caches a local reference to `Element.prototype` for faster access.
+  var ElementProto = (typeof Element !== 'undefined' && Element.prototype) || {};
+
+  // Cross-browser event listener shims
+  var elementAddEventListener = ElementProto.addEventListener ? function(eventName, listener) {
+    return this.addEventListener(eventName, listener, false);
+  } : function(eventName, listener) {
+    return this.attachEvent('on' + eventName, listener);
+  }
+
+  var elementRemoveEventListener = ElementProto.removeEventListener ? function(eventName, listener) {
+    return this.removeEventListener(eventName, listener, false);
+  } : function(eventName, listener) {
+    return this.detachEvent('on' + eventName, listener);
+  }
+
+  var indexOf = function(array, item) {
+    for (var i = 0, len = array.length; i < len; i++) if (array[i] === item) return i;
+    return -1;
+  }
+
+  // Find the right `Element#matches` for IE>=9 and modern browsers.
+  var matchesSelector = ElementProto.matches ||
+      ElementProto.webkitMatchesSelector ||
+      ElementProto.mozMatchesSelector ||
+      ElementProto.msMatchesSelector ||
+      ElementProto.oMatchesSelector ||
+      // Make our own `Element#matches` for IE8
+      function(selector) {
+        // Use querySelectorAll to find all elements matching the selector,
+        // then check if the given element is included in that list.
+        // Executing the query on the parentNode reduces the resulting nodeList,
+        // (document doesn't have a parentNode).
+        var nodeList = (this.parentNode || document).querySelectorAll(selector) || [];
+        return ~indexOf(nodeList, this);
+      };
+
+  // Cache Backbone.View for later access in constructor
+  var BBView = Backbone.View;
+
+  // To extend an existing view to use native methods, extend the View prototype
+  // with the mixin: _.extend(MyView.prototype, Backbone.NativeViewMixin);
+  Backbone.NativeViewMixin = {
+
+    _domEvents: null,
+
+    constructor: function() {
+      this._domEvents = [];
+      return BBView.apply(this, arguments);
+    },
+
+    $: function(selector) {
+      return this.el.querySelectorAll(selector);
+    },
+
+    _removeElement: function() {
+      this.undelegateEvents();
+      if (this.el.parentNode) this.el.parentNode.removeChild(this.el);
+    },
+
+    // Apply the `element` to the view. `element` can be a CSS selector,
+    // a string of HTML, or an Element node. If passed a NodeList or CSS
+    // selector, uses just the first match.
+    _setElement: function(element) {
+      if (typeof element == 'string') {
+        if (paddedLt.test(element)) {
+          var el = document.createElement('div');
+          el.innerHTML = element;
+          this.el = el.firstChild;
+        } else {
+          this.el = document.querySelector(element);
+        }
+      } else if (element && !_.isElement(element) && element.length) {
+        this.el = element[0];
+      } else {
+        this.el = element;
+      }
+    },
+
+    // Set a hash of attributes to the view's `el`. We use the "prop" version
+    // if available, falling back to `setAttribute` for the catch-all.
+    _setAttributes: function(attrs) {
+      for (var attr in attrs) {
+        attr in this.el ? this.el[attr] = attrs[attr] : this.el.setAttribute(attr, attrs[attr]);
+      }
+    },
+
+    // Make a event delegation handler for the given `eventName` and `selector`
+    // and attach it to `this.el`.
+    // If selector is empty, the listener will be bound to `this.el`. If not, a
+    // new handler that will recursively traverse up the event target's DOM
+    // hierarchy looking for a node that matches the selector. If one is found,
+    // the event's `delegateTarget` property is set to it and the return the
+    // result of calling bound `listener` with the parameters given to the
+    // handler.
+    delegate: function(eventName, selector, listener) {
+      var root = this.el;
+
+      if (!root) {
+        return;
+      }
+
+      if (typeof selector === 'function') {
+        listener = selector;
+        selector = null;
+      }
+
+      // Given that `focus` and `blur` events do not bubble, do not delegate these events
+      if (['focus', 'blur'].indexOf(eventName) !== -1) {
+        var els = this.el.querySelectorAll(selector);
+        for (var i = 0, len = els.length; i < len; i++) {
+          var item = els[i];
+          elementAddEventListener.call(item, eventName, listener, false);
+          this._domEvents.push({el: item, eventName: eventName, handler: listener});
+        }
+        return listener;
+      }
+
+      var handler = selector ? function (e) {
+        var node = e.target || e.srcElement;
+        for (; node && node != root; node = node.parentNode) {
+          if (matchesSelector.call(node, selector)) {
+            e.delegateTarget = node;
+            listener(e);
+          }
+        }
+      } : listener;
+
+      elementAddEventListener.call(this.el, eventName, handler, false);
+      this._domEvents.push({el: this.el, eventName: eventName, handler: handler, listener: listener, selector: selector});
+      return handler;
+    },
+
+    // Remove a single delegated event. Either `eventName` or `selector` must
+    // be included, `selector` and `listener` are optional.
+    undelegate: function(eventName, selector, listener) {
+      if (typeof selector === 'function') {
+        listener = selector;
+        selector = null;
+      }
+
+      if (this.el) {
+        var handlers = this._domEvents.slice();
+        var i = handlers.length;
+        while (i--) {
+          var item = handlers[i];
+
+          var match = item.eventName === eventName &&
+              (listener ? item.listener === listener : true) &&
+              (selector ? item.selector === selector : true);
+
+          if (!match) continue;
+
+          elementRemoveEventListener.call(item.el, item.eventName, item.handler, false);
+          this._domEvents.splice(i, 1);
+        }
+      }
+      return this;
+    },
+
+    // Remove all events created with `delegate` from `el`
+    undelegateEvents: function() {
+      if (this.el) {
+        for (var i = 0, len = this._domEvents.length; i < len; i++) {
+          var item = this._domEvents[i];
+          elementRemoveEventListener.call(item.el, item.eventName, item.handler, false);
+        };
+        this._domEvents.length = 0;
+      }
+      return this;
+    }
+  };
+
+  Backbone.NativeView = Backbone.View.extend(Backbone.NativeViewMixin);
+
+  return Backbone.NativeView;
+}));
+
+
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports) {
+
+/* global FormData self Blob File */
+/* eslint-disable no-inner-declarations */
+
+if (typeof Blob === 'function' && (typeof FormData === 'undefined' || !FormData.prototype.keys)) {
+  const global = typeof window === 'object'
+    ? window
+    : typeof self === 'object' ? self : this
+
+  // keep a reference to native implementation
+  const _FormData = global.FormData
+
+  // To be monkey patched
+  const _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
+  const _fetch = global.Request && global.fetch
+  const _sendBeacon = global.navigator && global.navigator.sendBeacon
+
+  // Unable to patch Request constructor correctly
+  // const _Request = global.Request
+  // only way is to use ES6 class extend
+  // https://github.com/babel/babel/issues/1966
+
+  const stringTag = global.Symbol && Symbol.toStringTag
+
+  // Add missing stringTags to blob and files
+  if (stringTag) {
+    if (!Blob.prototype[stringTag]) {
+      Blob.prototype[stringTag] = 'Blob'
+    }
+
+    if ('File' in global && !File.prototype[stringTag]) {
+      File.prototype[stringTag] = 'File'
+    }
+  }
+
+  // Fix so you can construct your own File
+  try {
+    new File([], '') // eslint-disable-line
+  } catch (a) {
+    global.File = function File (b, d, c) {
+      const blob = new Blob(b, c)
+      const t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date()
+
+      Object.defineProperties(blob, {
+        name: {
+          value: d
+        },
+        lastModifiedDate: {
+          value: t
+        },
+        lastModified: {
+          value: +t
+        },
+        toString: {
+          value () {
+            return '[object File]'
+          }
+        }
+      })
+
+      if (stringTag) {
+        Object.defineProperty(blob, stringTag, {
+          value: 'File'
+        })
+      }
+
+      return blob
+    }
+  }
+
+  function normalizeValue ([value, filename]) {
+    if (value instanceof Blob) {
+      // Should always returns a new File instance
+      // console.assert(fd.get(x) !== fd.get(x))
+      value = new File([value], filename, {
+        type: value.type,
+        lastModified: value.lastModified
+      })
+    }
+
+    return value
+  }
+
+  function ensureArgs (args, expected) {
+    if (args.length < expected) {
+      throw new TypeError(`${expected} argument required, but only ${args.length} present.`)
+    }
+  }
+
+  function normalizeArgs (name, value, filename) {
+    return value instanceof Blob
+      // normalize name and filename if adding an attachment
+      ? [String(name), value, filename !== undefined
+        ? filename + '' // Cast filename to string if 3th arg isn't undefined
+        : typeof value.name === 'string' // if name prop exist
+          ? value.name // Use File.name
+          : 'blob'] // otherwise fallback to Blob
+
+      // If no attachment, just cast the args to strings
+      : [String(name), String(value)]
+  }
+
+  // normalize linefeeds for textareas
+  // https://html.spec.whatwg.org/multipage/form-elements.html#textarea-line-break-normalisation-transformation
+  function normalizeLinefeeds (value) {
+    return value.replace(/\r\n/g, '\n').replace(/\n/g, '\r\n')
+  }
+
+  function each (arr, cb) {
+    for (let i = 0; i < arr.length; i++) {
+      cb(arr[i])
+    }
+  }
+
+  /**
+   * @implements {Iterable}
+   */
+  class FormDataPolyfill {
+    /**
+     * FormData class
+     *
+     * @param {HTMLElement=} form
+     */
+    constructor (form) {
+      this._data = Object.create(null)
+
+      if (!form) return this
+
+      const self = this
+
+      each(form.elements, elm => {
+        if (!elm.name || elm.disabled || elm.type === 'submit' || elm.type === 'button') return
+
+        if (elm.type === 'file') {
+          const files = elm.files && elm.files.length
+            ? elm.files
+            : [new File([], '', { type: 'application/octet-stream' })] // #78
+
+          each(files, file => {
+            self.append(elm.name, file)
+          })
+        } else if (elm.type === 'select-multiple' || elm.type === 'select-one') {
+          each(elm.options, opt => {
+            !opt.disabled && opt.selected && self.append(elm.name, opt.value)
+          })
+        } else if (elm.type === 'checkbox' || elm.type === 'radio') {
+          if (elm.checked) self.append(elm.name, elm.value)
+        } else {
+          const value = elm.type === 'textarea' ? normalizeLinefeeds(elm.value) : elm.value
+          self.append(elm.name, value)
+        }
+      })
+    }
+
+    /**
+     * Append a field
+     *
+     * @param   {string}           name      field name
+     * @param   {string|Blob|File} value     string / blob / file
+     * @param   {string=}          filename  filename to use with blob
+     * @return  {undefined}
+     */
+    append (name, value, filename) {
+      ensureArgs(arguments, 2)
+      ;[name, value, filename] = normalizeArgs.apply(null, arguments)
+      const map = this._data
+
+      if (!map[name]) map[name] = []
+
+      map[name].push([value, filename])
+    }
+
+    /**
+     * Delete all fields values given name
+     *
+     * @param   {string}  name  Field name
+     * @return  {undefined}
+     */
+    delete (name) {
+      ensureArgs(arguments, 1)
+      delete this._data[String(name)]
+    }
+
+    /**
+     * Iterate over all fields as [name, value]
+     *
+     * @return {Iterator}
+     */
+    * entries () {
+      const map = this._data
+
+      for (let name in map) {
+        for (let value of map[name]) {
+          yield [name, normalizeValue(value)]
+        }
+      }
+    }
+
+    /**
+     * Iterate over all fields
+     *
+     * @param   {Function}  callback  Executed for each item with parameters (value, name, thisArg)
+     * @param   {Object=}   thisArg   `this` context for callback function
+     * @return  {undefined}
+     */
+    forEach (callback, thisArg) {
+      ensureArgs(arguments, 1)
+      for (let [name, value] of this) {
+        callback.call(thisArg, value, name, this)
+      }
+    }
+
+    /**
+     * Return first field value given name
+     * or null if non existen
+     *
+     * @param   {string}  name      Field name
+     * @return  {string|File|null}  value Fields value
+     */
+    get (name) {
+      ensureArgs(arguments, 1)
+      const map = this._data
+      name = String(name)
+      return map[name] ? normalizeValue(map[name][0]) : null
+    }
+
+    /**
+     * Return all fields values given name
+     *
+     * @param   {string}  name  Fields name
+     * @return  {Array}         [{String|File}]
+     */
+    getAll (name) {
+      ensureArgs(arguments, 1)
+      return (this._data[String(name)] || []).map(normalizeValue)
+    }
+
+    /**
+     * Check for field name existence
+     *
+     * @param   {string}   name  Field name
+     * @return  {boolean}
+     */
+    has (name) {
+      ensureArgs(arguments, 1)
+      return String(name) in this._data
+    }
+
+    /**
+     * Iterate over all fields name
+     *
+     * @return {Iterator}
+     */
+    * keys () {
+      for (let [name] of this) {
+        yield name
+      }
+    }
+
+    /**
+     * Overwrite all values given name
+     *
+     * @param   {string}    name      Filed name
+     * @param   {string}    value     Field value
+     * @param   {string=}   filename  Filename (optional)
+     * @return  {undefined}
+     */
+    set (name, value, filename) {
+      ensureArgs(arguments, 2)
+      const args = normalizeArgs.apply(null, arguments)
+      this._data[args[0]] = [[args[1], args[2]]]
+    }
+
+    /**
+     * Iterate over all fields
+     *
+     * @return {Iterator}
+     */
+    * values () {
+      for (let [, value] of this) {
+        yield value
+      }
+    }
+
+    /**
+     * Return a native (perhaps degraded) FormData with only a `append` method
+     * Can throw if it's not supported
+     *
+     * @return {FormData}
+     */
+    ['_asNative'] () {
+      const fd = new _FormData()
+
+      for (let [name, value] of this) {
+        fd.append(name, value)
+      }
+
+      return fd
+    }
+
+    /**
+     * [_blob description]
+     *
+     * @return {Blob} [description]
+     */
+    ['_blob'] () {
+      const boundary = '----formdata-polyfill-' + Math.random()
+      const chunks = []
+
+      for (let [name, value] of this) {
+        chunks.push(`--${boundary}\r\n`)
+
+        if (value instanceof Blob) {
+          chunks.push(
+            `Content-Disposition: form-data; name="${name}"; filename="${value.name}"\r\n`,
+            `Content-Type: ${value.type || 'application/octet-stream'}\r\n\r\n`,
+            value,
+            '\r\n'
+          )
+        } else {
+          chunks.push(
+            `Content-Disposition: form-data; name="${name}"\r\n\r\n${value}\r\n`
+          )
+        }
+      }
+
+      chunks.push(`--${boundary}--`)
+
+      return new Blob(chunks, {
+        type: 'multipart/form-data; boundary=' + boundary
+      })
+    }
+
+    /**
+     * The class itself is iterable
+     * alias for formdata.entries()
+     *
+     * @return  {Iterator}
+     */
+    [Symbol.iterator] () {
+      return this.entries()
+    }
+
+    /**
+     * Create the default string description.
+     *
+     * @return  {string} [object FormData]
+     */
+    toString () {
+      return '[object FormData]'
+    }
+  }
+
+  if (stringTag) {
+    /**
+     * Create the default string description.
+     * It is accessed internally by the Object.prototype.toString().
+     */
+    FormDataPolyfill.prototype[stringTag] = 'FormData'
+  }
+
+  // Patch xhr's send method to call _blob transparently
+  if (_send) {
+    const setRequestHeader = global.XMLHttpRequest.prototype.setRequestHeader
+
+    /**
+     * @param {string} name
+     * @param {string} value
+     * @returns {undefined}
+     * @see https://xhr.spec.whatwg.org/#dom-xmlhttprequest-setrequestheader
+     */
+    global.XMLHttpRequest.prototype.setRequestHeader = function (name, value) {
+      if (name.toLowerCase() === 'content-type') this._hasContentType = true
+      return setRequestHeader.call(this, name, value)
+    }
+
+    /**
+     * @param {ArrayBuffer|ArrayBufferView|Blob|Document|FormData|string=} data
+     * @return {undefined}
+     * @see https://xhr.spec.whatwg.org/#the-send()-method
+     */
+    global.XMLHttpRequest.prototype.send = function (data) {
+      // I would check if Content-Type isn't already set
+      // But xhr lacks getRequestHeaders functionallity
+      // https://github.com/jimmywarting/FormData/issues/44
+      if (data instanceof FormDataPolyfill) {
+        const blob = data['_blob']()
+        // Check if Content-Type is already set
+        // https://github.com/jimmywarting/FormData/issues/86
+        if (!this._hasContentType) this.setRequestHeader('Content-Type', blob.type)
+        _send.call(this, blob)
+      } else {
+        _send.call(this, data)
+      }
+    }
+  }
+
+  // Patch fetch's function to call _blob transparently
+  if (_fetch) {
+    const _fetch = global.fetch
+
+    global.fetch = function (input, init) {
+      if (init && init.body && init.body instanceof FormDataPolyfill) {
+        init.body = init.body['_blob']()
+      }
+
+      return _fetch.call(this, input, init)
+    }
+  }
+
+  // Patch navigator.sendBeacon to use native FormData
+  if (_sendBeacon) {
+    global.navigator.sendBeacon = function (url, data) {
+      if (data instanceof FormDataPolyfill) {
+        data = data['_asNative']()
+      }
+      return _sendBeacon.call(this, url, data)
+    }
+  }
+
+  global['FormData'] = FormDataPolyfill
+}
+
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetTag = __webpack_require__(15),
+    isObject = __webpack_require__(9);
+
+/** `Object#toString` result references. */
+var asyncTag = '[object AsyncFunction]',
+    funcTag = '[object Function]',
+    genTag = '[object GeneratorFunction]',
+    proxyTag = '[object Proxy]';
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+  if (!isObject(value)) {
+    return false;
+  }
+  // The use of `Object#toString` avoids issues with the `typeof` operator
+  // in Safari 9 which returns 'object' for typed arrays and other constructors.
+  var tag = baseGetTag(value);
+  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+}
+
+module.exports = isFunction;
+
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {
+
+/**
+ * filesize
+ *
+ * @copyright 2019 Jason Mulligan <jason.mulligan@avoidwork.com>
+ * @license BSD-3-Clause
+ * @version 4.2.1
+ */
+(function (global) {
+  var b = /^(b|B)$/,
+      symbol = {
+    iec: {
+      bits: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"],
+      bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
+    },
+    jedec: {
+      bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
+      bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
+    }
+  },
+      fullform = {
+    iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"],
+    jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
+  };
+  /**
+   * filesize
+   *
+   * @method filesize
+   * @param  {Mixed}   arg        String, Int or Float to transform
+   * @param  {Object}  descriptor [Optional] Flags
+   * @return {String}             Readable file size String
+   */
+
+  function filesize(arg) {
+    var descriptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+    var result = [],
+        val = 0,
+        e = void 0,
+        base = void 0,
+        bits = void 0,
+        ceil = void 0,
+        full = void 0,
+        fullforms = void 0,
+        locale = void 0,
+        localeOptions = void 0,
+        neg = void 0,
+        num = void 0,
+        output = void 0,
+        round = void 0,
+        unix = void 0,
+        separator = void 0,
+        spacer = void 0,
+        standard = void 0,
+        symbols = void 0;
+
+    if (isNaN(arg)) {
+      throw new TypeError("Invalid number");
+    }
+
+    bits = descriptor.bits === true;
+    unix = descriptor.unix === true;
+    base = descriptor.base || 2;
+    round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;
+    locale = descriptor.locale !== void 0 ? descriptor.locale : "";
+    localeOptions = descriptor.localeOptions || {};
+    separator = descriptor.separator !== void 0 ? descriptor.separator : "";
+    spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
+    symbols = descriptor.symbols || {};
+    standard = base === 2 ? descriptor.standard || "jedec" : "jedec";
+    output = descriptor.output || "string";
+    full = descriptor.fullform === true;
+    fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
+    e = descriptor.exponent !== void 0 ? descriptor.exponent : -1;
+    num = Number(arg);
+    neg = num < 0;
+    ceil = base > 2 ? 1000 : 1024; // Flipping a negative number to determine the size
+
+    if (neg) {
+      num = -num;
+    } // Determining the exponent
+
+
+    if (e === -1 || isNaN(e)) {
+      e = Math.floor(Math.log(num) / Math.log(ceil));
+
+      if (e < 0) {
+        e = 0;
+      }
+    } // Exceeding supported length, time to reduce & multiply
+
+
+    if (e > 8) {
+      e = 8;
+    }
+
+    if (output === "exponent") {
+      return e;
+    } // Zero is now a special case because bytes divide by 1
+
+
+    if (num === 0) {
+      result[0] = 0;
+      result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e];
+    } else {
+      val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));
+
+      if (bits) {
+        val = val * 8;
+
+        if (val >= ceil && e < 8) {
+          val = val / ceil;
+          e++;
+        }
+      }
+
+      result[0] = Number(val.toFixed(e > 0 ? round : 0));
+
+      if (result[0] === ceil && e < 8 && descriptor.exponent === void 0) {
+        result[0] = 1;
+        e++;
+      }
+
+      result[1] = base === 10 && e === 1 ? bits ? "kb" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];
+
+      if (unix) {
+        result[1] = standard === "jedec" ? result[1].charAt(0) : e > 0 ? result[1].replace(/B$/, "") : result[1];
+
+        if (b.test(result[1])) {
+          result[0] = Math.floor(result[0]);
+          result[1] = "";
+        }
+      }
+    } // Decorating a 'diff'
+
+
+    if (neg) {
+      result[0] = -result[0];
+    } // Applying custom symbol
+
+
+    result[1] = symbols[result[1]] || result[1];
+
+    if (locale === true) {
+      result[0] = result[0].toLocaleString();
+    } else if (locale.length > 0) {
+      result[0] = result[0].toLocaleString(locale, localeOptions);
+    } else if (separator.length > 0) {
+      result[0] = result[0].toString().replace(".", separator);
+    } // Returning Array, Object, or String (default)
+
+
+    if (output === "array") {
+      return result;
+    }
+
+    if (full) {
+      result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s");
+    }
+
+    if (output === "object") {
+      return {
+        value: result[0],
+        symbol: result[1]
+      };
+    }
+
+    return result.join(spacer);
+  } // Partial application for functional programming
+
+
+  filesize.partial = function (opt) {
+    return function (arg) {
+      return filesize(arg, opt);
+    };
+  }; // CommonJS, AMD, script tag
+
+
+  if (true) {
+    module.exports = filesize;
+  } else {}
+})(typeof window !== "undefined" ? window : global);
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
+
+/***/ }),
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/form_input.html -->\n<div class="form-group">\n    ';
+ if (o.type !== 'hidden') { ;
+__p += '\n        <label for="' +
+__e(o.id) +
+'">' +
+__e(o.label) +
+'</label>\n    ';
+ } ;
+__p += '\n    ';
+ if (o.type === 'password' && o.fixed_username) { ;
+__p += '\n        <!-- This is a hack to prevent Chrome from auto-filling the username in\n            any of the other input fields in the MUC configuration form. -->\n        <input class="hidden-username" type="text" autocomplete="username" value="' +
+__e(o.fixed_username) +
+'"></input>\n    ';
+ } ;
+__p += '\n    <input \n        class="form-control" name="' +
+__e(o.name) +
+'" type="' +
+__e(o.type) +
+'" id="' +
+__e(o.id) +
+'"\n        ';
+ if (o.autocomplete) { ;
+__p += ' autocomplete="' +
+__e(o.autocomplete) +
+'" ';
+ } ;
+__p += '\n        ';
+ if (o.placeholder) { ;
+__p += ' placeholder="' +
+__e(o.placeholder) +
+'" ';
+ } ;
+__p += '\n        ';
+ if (o.value) { ;
+__p += ' value="' +
+__e(o.value) +
+'" ';
+ } ;
+__p += '\n        ';
+ if (o.required) { ;
+__p += ' required="required" ';
+ } ;
+__p += ' />\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 43 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/form_username.html -->\n<div class="form-group">\n    ';
+ if (o.label) { ;
+__p += '\n    <label>\n        ' +
+__e(o.label) +
+'\n    </label>\n    ';
+ } ;
+__p += '\n    <div class="input-group">\n        <div class="input-group-prepend">\n            <input name="' +
+__e(o.name) +
+'" type="' +
+__e(o.type) +
+'"\n                ';
+ if (o.value) { ;
+__p += ' value="' +
+__e(o.value) +
+'" ';
+ } ;
+__p += '\n                ';
+ if (o.required) { ;
+__p += ' required="required" ';
+ } ;
+__p += ' />\n            <div class="input-group-text col" title="' +
+__e(o.domain) +
+'">' +
+__e(o.domain) +
+'</div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 44 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatbox.html -->\n<div class="flyout box-flyout">\n    <div class="chat-body">\n        <div class="chat-content ';
+ if (o.show_send_button) { ;
+__p += 'chat-content-sendbutton';
+ } ;
+__p += '" aria-live="polite"></div>\n        <div class="bottom-panel">\n            <div class="emoji-picker__container dropup"></div>\n            <div class="message-form-container">\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 45 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * @preserve jed.js https://github.com/SlexAxton/Jed
+ */
+/*
+-----------
+A gettext compatible i18n library for modern JavaScript Applications
+
+by Alex Sexton - AlexSexton [at] gmail - @SlexAxton
+
+MIT License
+
+A jQuery Foundation project - requires CLA to contribute -
+https://contribute.jquery.org/CLA/
+
+
+
+Jed offers the entire applicable GNU gettext spec'd set of
+functions, but also offers some nicer wrappers around them.
+The api for gettext was written for a language with no function
+overloading, so Jed allows a little more of that.
+
+Many thanks to Joshua I. Miller - unrtst@cpan.org - who wrote
+gettext.js back in 2008. I was able to vet a lot of my ideas
+against his. I also made sure Jed passed against his tests
+in order to offer easy upgrades -- jsgettext.berlios.de
+*/
+(function (root, undef) {
+
+  // Set up some underscore-style functions, if you already have
+  // underscore, feel free to delete this section, and use it
+  // directly, however, the amount of functions used doesn't
+  // warrant having underscore as a full dependency.
+  // Underscore 1.3.0 was used to port and is licensed
+  // under the MIT License by Jeremy Ashkenas.
+  var ArrayProto    = Array.prototype,
+      ObjProto      = Object.prototype,
+      slice         = ArrayProto.slice,
+      hasOwnProp    = ObjProto.hasOwnProperty,
+      nativeForEach = ArrayProto.forEach,
+      breaker       = {};
+
+  // We're not using the OOP style _ so we don't need the
+  // extra level of indirection. This still means that you
+  // sub out for real `_` though.
+  var _ = {
+    forEach : function( obj, iterator, context ) {
+      var i, l, key;
+      if ( obj === null ) {
+        return;
+      }
+
+      if ( nativeForEach && obj.forEach === nativeForEach ) {
+        obj.forEach( iterator, context );
+      }
+      else if ( obj.length === +obj.length ) {
+        for ( i = 0, l = obj.length; i < l; i++ ) {
+          if ( i in obj && iterator.call( context, obj[i], i, obj ) === breaker ) {
+            return;
+          }
+        }
+      }
+      else {
+        for ( key in obj) {
+          if ( hasOwnProp.call( obj, key ) ) {
+            if ( iterator.call (context, obj[key], key, obj ) === breaker ) {
+              return;
+            }
+          }
+        }
+      }
+    },
+    extend : function( obj ) {
+      this.forEach( slice.call( arguments, 1 ), function ( source ) {
+        for ( var prop in source ) {
+          obj[prop] = source[prop];
+        }
+      });
+      return obj;
+    }
+  };
+  // END Miniature underscore impl
+
+  // Jed is a constructor function
+  var Jed = function ( options ) {
+    // Some minimal defaults
+    this.defaults = {
+      "locale_data" : {
+        "messages" : {
+          "" : {
+            "domain"       : "messages",
+            "lang"         : "en",
+            "plural_forms" : "nplurals=2; plural=(n != 1);"
+          }
+          // There are no default keys, though
+        }
+      },
+      // The default domain if one is missing
+      "domain" : "messages",
+      // enable debug mode to log untranslated strings to the console
+      "debug" : false
+    };
+
+    // Mix in the sent options with the default options
+    this.options = _.extend( {}, this.defaults, options );
+    this.textdomain( this.options.domain );
+
+    if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) {
+      throw new Error('Text domain set to non-existent domain: `' + options.domain + '`');
+    }
+  };
+
+  // The gettext spec sets this character as the default
+  // delimiter for context lookups.
+  // e.g.: context\u0004key
+  // If your translation company uses something different,
+  // just change this at any time and it will use that instead.
+  Jed.context_delimiter = String.fromCharCode( 4 );
+
+  function getPluralFormFunc ( plural_form_string ) {
+    return Jed.PF.compile( plural_form_string || "nplurals=2; plural=(n != 1);");
+  }
+
+  function Chain( key, i18n ){
+    this._key = key;
+    this._i18n = i18n;
+  }
+
+  // Create a chainable api for adding args prettily
+  _.extend( Chain.prototype, {
+    onDomain : function ( domain ) {
+      this._domain = domain;
+      return this;
+    },
+    withContext : function ( context ) {
+      this._context = context;
+      return this;
+    },
+    ifPlural : function ( num, pkey ) {
+      this._val = num;
+      this._pkey = pkey;
+      return this;
+    },
+    fetch : function ( sArr ) {
+      if ( {}.toString.call( sArr ) != '[object Array]' ) {
+        sArr = [].slice.call(arguments, 0);
+      }
+      return ( sArr && sArr.length ? Jed.sprintf : function(x){ return x; } )(
+        this._i18n.dcnpgettext(this._domain, this._context, this._key, this._pkey, this._val),
+        sArr
+      );
+    }
+  });
+
+  // Add functions to the Jed prototype.
+  // These will be the functions on the object that's returned
+  // from creating a `new Jed()`
+  // These seem redundant, but they gzip pretty well.
+  _.extend( Jed.prototype, {
+    // The sexier api start point
+    translate : function ( key ) {
+      return new Chain( key, this );
+    },
+
+    textdomain : function ( domain ) {
+      if ( ! domain ) {
+        return this._textdomain;
+      }
+      this._textdomain = domain;
+    },
+
+    gettext : function ( key ) {
+      return this.dcnpgettext.call( this, undef, undef, key );
+    },
+
+    dgettext : function ( domain, key ) {
+     return this.dcnpgettext.call( this, domain, undef, key );
+    },
+
+    dcgettext : function ( domain , key /*, category */ ) {
+      // Ignores the category anyways
+      return this.dcnpgettext.call( this, domain, undef, key );
+    },
+
+    ngettext : function ( skey, pkey, val ) {
+      return this.dcnpgettext.call( this, undef, undef, skey, pkey, val );
+    },
+
+    dngettext : function ( domain, skey, pkey, val ) {
+      return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
+    },
+
+    dcngettext : function ( domain, skey, pkey, val/*, category */) {
+      return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
+    },
+
+    pgettext : function ( context, key ) {
+      return this.dcnpgettext.call( this, undef, context, key );
+    },
+
+    dpgettext : function ( domain, context, key ) {
+      return this.dcnpgettext.call( this, domain, context, key );
+    },
+
+    dcpgettext : function ( domain, context, key/*, category */) {
+      return this.dcnpgettext.call( this, domain, context, key );
+    },
+
+    npgettext : function ( context, skey, pkey, val ) {
+      return this.dcnpgettext.call( this, undef, context, skey, pkey, val );
+    },
+
+    dnpgettext : function ( domain, context, skey, pkey, val ) {
+      return this.dcnpgettext.call( this, domain, context, skey, pkey, val );
+    },
+
+    // The most fully qualified gettext function. It has every option.
+    // Since it has every option, we can use it from every other method.
+    // This is the bread and butter.
+    // Technically there should be one more argument in this function for 'Category',
+    // but since we never use it, we might as well not waste the bytes to define it.
+    dcnpgettext : function ( domain, context, singular_key, plural_key, val ) {
+      // Set some defaults
+
+      plural_key = plural_key || singular_key;
+
+      // Use the global domain default if one
+      // isn't explicitly passed in
+      domain = domain || this._textdomain;
+
+      var fallback;
+
+      // Handle special cases
+
+      // No options found
+      if ( ! this.options ) {
+        // There's likely something wrong, but we'll return the correct key for english
+        // We do this by instantiating a brand new Jed instance with the default set
+        // for everything that could be broken.
+        fallback = new Jed();
+        return fallback.dcnpgettext.call( fallback, undefined, undefined, singular_key, plural_key, val );
+      }
+
+      // No translation data provided
+      if ( ! this.options.locale_data ) {
+        throw new Error('No locale data provided.');
+      }
+
+      if ( ! this.options.locale_data[ domain ] ) {
+        throw new Error('Domain `' + domain + '` was not found.');
+      }
+
+      if ( ! this.options.locale_data[ domain ][ "" ] ) {
+        throw new Error('No locale meta information provided.');
+      }
+
+      // Make sure we have a truthy key. Otherwise we might start looking
+      // into the empty string key, which is the options for the locale
+      // data.
+      if ( ! singular_key ) {
+        throw new Error('No translation key found.');
+      }
+
+      var key  = context ? context + Jed.context_delimiter + singular_key : singular_key,
+          locale_data = this.options.locale_data,
+          dict = locale_data[ domain ],
+          defaultConf = (locale_data.messages || this.defaults.locale_data.messages)[""],
+          pluralForms = dict[""].plural_forms || dict[""]["Plural-Forms"] || dict[""]["plural-forms"] || defaultConf.plural_forms || defaultConf["Plural-Forms"] || defaultConf["plural-forms"],
+          val_list,
+          res;
+
+      var val_idx;
+      if (val === undefined) {
+        // No value passed in; assume singular key lookup.
+        val_idx = 0;
+
+      } else {
+        // Value has been passed in; use plural-forms calculations.
+
+        // Handle invalid numbers, but try casting strings for good measure
+        if ( typeof val != 'number' ) {
+          val = parseInt( val, 10 );
+
+          if ( isNaN( val ) ) {
+            throw new Error('The number that was passed in is not a number.');
+          }
+        }
+
+        val_idx = getPluralFormFunc(pluralForms)(val);
+      }
+
+      // Throw an error if a domain isn't found
+      if ( ! dict ) {
+        throw new Error('No domain named `' + domain + '` could be found.');
+      }
+
+      val_list = dict[ key ];
+
+      // If there is no match, then revert back to
+      // english style singular/plural with the keys passed in.
+      if ( ! val_list || val_idx > val_list.length ) {
+        if (this.options.missing_key_callback) {
+          this.options.missing_key_callback(key, domain);
+        }
+        res = [ singular_key, plural_key ];
+
+        // collect untranslated strings
+        if (this.options.debug===true) {
+          console.log(res[ getPluralFormFunc(pluralForms)( val ) ]);
+        }
+        return res[ getPluralFormFunc()( val ) ];
+      }
+
+      res = val_list[ val_idx ];
+
+      // This includes empty strings on purpose
+      if ( ! res  ) {
+        res = [ singular_key, plural_key ];
+        return res[ getPluralFormFunc()( val ) ];
+      }
+      return res;
+    }
+  });
+
+
+  // We add in sprintf capabilities for post translation value interolation
+  // This is not internally used, so you can remove it if you have this
+  // available somewhere else, or want to use a different system.
+
+  // We _slightly_ modify the normal sprintf behavior to more gracefully handle
+  // undefined values.
+
+  /**
+   sprintf() for JavaScript 0.7-beta1
+   http://www.diveintojavascript.com/projects/javascript-sprintf
+
+   Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+       * Redistributions of source code must retain the above copyright
+         notice, this list of conditions and the following disclaimer.
+       * Redistributions in binary form must reproduce the above copyright
+         notice, this list of conditions and the following disclaimer in the
+         documentation and/or other materials provided with the distribution.
+       * Neither the name of sprintf() for JavaScript nor the
+         names of its contributors may be used to endorse or promote products
+         derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+   DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
+   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+  var sprintf = (function() {
+    function get_type(variable) {
+      return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
+    }
+    function str_repeat(input, multiplier) {
+      for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}
+      return output.join('');
+    }
+
+    var str_format = function() {
+      if (!str_format.cache.hasOwnProperty(arguments[0])) {
+        str_format.cache[arguments[0]] = str_format.parse(arguments[0]);
+      }
+      return str_format.format.call(null, str_format.cache[arguments[0]], arguments);
+    };
+
+    str_format.format = function(parse_tree, argv) {
+      var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
+      for (i = 0; i < tree_length; i++) {
+        node_type = get_type(parse_tree[i]);
+        if (node_type === 'string') {
+          output.push(parse_tree[i]);
+        }
+        else if (node_type === 'array') {
+          match = parse_tree[i]; // convenience purposes only
+          if (match[2]) { // keyword argument
+            arg = argv[cursor];
+            for (k = 0; k < match[2].length; k++) {
+              if (!arg.hasOwnProperty(match[2][k])) {
+                throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
+              }
+              arg = arg[match[2][k]];
+            }
+          }
+          else if (match[1]) { // positional argument (explicit)
+            arg = argv[match[1]];
+          }
+          else { // positional argument (implicit)
+            arg = argv[cursor++];
+          }
+
+          if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {
+            throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));
+          }
+
+          // Jed EDIT
+          if ( typeof arg == 'undefined' || arg === null ) {
+            arg = '';
+          }
+          // Jed EDIT
+
+          switch (match[8]) {
+            case 'b': arg = arg.toString(2); break;
+            case 'c': arg = String.fromCharCode(arg); break;
+            case 'd': arg = parseInt(arg, 10); break;
+            case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;
+            case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;
+            case 'o': arg = arg.toString(8); break;
+            case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;
+            case 'u': arg = Math.abs(arg); break;
+            case 'x': arg = arg.toString(16); break;
+            case 'X': arg = arg.toString(16).toUpperCase(); break;
+          }
+          arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);
+          pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';
+          pad_length = match[6] - String(arg).length;
+          pad = match[6] ? str_repeat(pad_character, pad_length) : '';
+          output.push(match[5] ? arg + pad : pad + arg);
+        }
+      }
+      return output.join('');
+    };
+
+    str_format.cache = {};
+
+    str_format.parse = function(fmt) {
+      var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
+      while (_fmt) {
+        if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
+          parse_tree.push(match[0]);
+        }
+        else if ((match = /^\x25{2}/.exec(_fmt)) !== null) {
+          parse_tree.push('%');
+        }
+        else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {
+          if (match[2]) {
+            arg_names |= 1;
+            var field_list = [], replacement_field = match[2], field_match = [];
+            if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
+              field_list.push(field_match[1]);
+              while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
+                if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
+                  field_list.push(field_match[1]);
+                }
+                else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
+                  field_list.push(field_match[1]);
+                }
+                else {
+                  throw('[sprintf] huh?');
+                }
+              }
+            }
+            else {
+              throw('[sprintf] huh?');
+            }
+            match[2] = field_list;
+          }
+          else {
+            arg_names |= 2;
+          }
+          if (arg_names === 3) {
+            throw('[sprintf] mixing positional and named placeholders is not (yet) supported');
+          }
+          parse_tree.push(match);
+        }
+        else {
+          throw('[sprintf] huh?');
+        }
+        _fmt = _fmt.substring(match[0].length);
+      }
+      return parse_tree;
+    };
+
+    return str_format;
+  })();
+
+  var vsprintf = function(fmt, argv) {
+    argv.unshift(fmt);
+    return sprintf.apply(null, argv);
+  };
+
+  Jed.parse_plural = function ( plural_forms, n ) {
+    plural_forms = plural_forms.replace(/n/g, n);
+    return Jed.parse_expression(plural_forms);
+  };
+
+  Jed.sprintf = function ( fmt, args ) {
+    if ( {}.toString.call( args ) == '[object Array]' ) {
+      return vsprintf( fmt, [].slice.call(args) );
+    }
+    return sprintf.apply(this, [].slice.call(arguments) );
+  };
+
+  Jed.prototype.sprintf = function () {
+    return Jed.sprintf.apply(this, arguments);
+  };
+  // END sprintf Implementation
+
+  // Start the Plural forms section
+  // This is a full plural form expression parser. It is used to avoid
+  // running 'eval' or 'new Function' directly against the plural
+  // forms.
+  //
+  // This can be important if you get translations done through a 3rd
+  // party vendor. I encourage you to use this instead, however, I
+  // also will provide a 'precompiler' that you can use at build time
+  // to output valid/safe function representations of the plural form
+  // expressions. This means you can build this code out for the most
+  // part.
+  Jed.PF = {};
+
+  Jed.PF.parse = function ( p ) {
+    var plural_str = Jed.PF.extractPluralExpr( p );
+    return Jed.PF.parser.parse.call(Jed.PF.parser, plural_str);
+  };
+
+  Jed.PF.compile = function ( p ) {
+    // Handle trues and falses as 0 and 1
+    function imply( val ) {
+      return (val === true ? 1 : val ? val : 0);
+    }
+
+    var ast = Jed.PF.parse( p );
+    return function ( n ) {
+      return imply( Jed.PF.interpreter( ast )( n ) );
+    };
+  };
+
+  Jed.PF.interpreter = function ( ast ) {
+    return function ( n ) {
+      var res;
+      switch ( ast.type ) {
+        case 'GROUP':
+          return Jed.PF.interpreter( ast.expr )( n );
+        case 'TERNARY':
+          if ( Jed.PF.interpreter( ast.expr )( n ) ) {
+            return Jed.PF.interpreter( ast.truthy )( n );
+          }
+          return Jed.PF.interpreter( ast.falsey )( n );
+        case 'OR':
+          return Jed.PF.interpreter( ast.left )( n ) || Jed.PF.interpreter( ast.right )( n );
+        case 'AND':
+          return Jed.PF.interpreter( ast.left )( n ) && Jed.PF.interpreter( ast.right )( n );
+        case 'LT':
+          return Jed.PF.interpreter( ast.left )( n ) < Jed.PF.interpreter( ast.right )( n );
+        case 'GT':
+          return Jed.PF.interpreter( ast.left )( n ) > Jed.PF.interpreter( ast.right )( n );
+        case 'LTE':
+          return Jed.PF.interpreter( ast.left )( n ) <= Jed.PF.interpreter( ast.right )( n );
+        case 'GTE':
+          return Jed.PF.interpreter( ast.left )( n ) >= Jed.PF.interpreter( ast.right )( n );
+        case 'EQ':
+          return Jed.PF.interpreter( ast.left )( n ) == Jed.PF.interpreter( ast.right )( n );
+        case 'NEQ':
+          return Jed.PF.interpreter( ast.left )( n ) != Jed.PF.interpreter( ast.right )( n );
+        case 'MOD':
+          return Jed.PF.interpreter( ast.left )( n ) % Jed.PF.interpreter( ast.right )( n );
+        case 'VAR':
+          return n;
+        case 'NUM':
+          return ast.val;
+        default:
+          throw new Error("Invalid Token found.");
+      }
+    };
+  };
+
+  Jed.PF.extractPluralExpr = function ( p ) {
+    // trim first
+    p = p.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+
+    if (! /;\s*$/.test(p)) {
+      p = p.concat(';');
+    }
+
+    var nplurals_re = /nplurals\=(\d+);/,
+        plural_re = /plural\=(.*);/,
+        nplurals_matches = p.match( nplurals_re ),
+        res = {},
+        plural_matches;
+
+    // Find the nplurals number
+    if ( nplurals_matches.length > 1 ) {
+      res.nplurals = nplurals_matches[1];
+    }
+    else {
+      throw new Error('nplurals not found in plural_forms string: ' + p );
+    }
+
+    // remove that data to get to the formula
+    p = p.replace( nplurals_re, "" );
+    plural_matches = p.match( plural_re );
+
+    if (!( plural_matches && plural_matches.length > 1 ) ) {
+      throw new Error('`plural` expression not found: ' + p);
+    }
+    return plural_matches[ 1 ];
+  };
+
+  /* Jison generated parser */
+  Jed.PF.parser = (function(){
+
+var parser = {trace: function trace() { },
+yy: {},
+symbols_: {"error":2,"expressions":3,"e":4,"EOF":5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,"n":19,"NUMBER":20,"$accept":0,"$end":1},
+terminals_: {2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},
+productions_: [0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],
+performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
+
+var $0 = $$.length - 1;
+switch (yystate) {
+case 1: return { type : 'GROUP', expr: $$[$0-1] };
+break;
+case 2:this.$ = { type: 'TERNARY', expr: $$[$0-4], truthy : $$[$0-2], falsey: $$[$0] };
+break;
+case 3:this.$ = { type: "OR", left: $$[$0-2], right: $$[$0] };
+break;
+case 4:this.$ = { type: "AND", left: $$[$0-2], right: $$[$0] };
+break;
+case 5:this.$ = { type: 'LT', left: $$[$0-2], right: $$[$0] };
+break;
+case 6:this.$ = { type: 'LTE', left: $$[$0-2], right: $$[$0] };
+break;
+case 7:this.$ = { type: 'GT', left: $$[$0-2], right: $$[$0] };
+break;
+case 8:this.$ = { type: 'GTE', left: $$[$0-2], right: $$[$0] };
+break;
+case 9:this.$ = { type: 'NEQ', left: $$[$0-2], right: $$[$0] };
+break;
+case 10:this.$ = { type: 'EQ', left: $$[$0-2], right: $$[$0] };
+break;
+case 11:this.$ = { type: 'MOD', left: $$[$0-2], right: $$[$0] };
+break;
+case 12:this.$ = { type: 'GROUP', expr: $$[$0-1] };
+break;
+case 13:this.$ = { type: 'VAR' };
+break;
+case 14:this.$ = { type: 'NUM', val: Number(yytext) };
+break;
+}
+},
+table: [{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],
+defaultActions: {6:[2,1]},
+parseError: function parseError(str, hash) {
+    throw new Error(str);
+},
+parse: function parse(input) {
+    var self = this,
+        stack = [0],
+        vstack = [null], // semantic value stack
+        lstack = [], // location stack
+        table = this.table,
+        yytext = '',
+        yylineno = 0,
+        yyleng = 0,
+        recovering = 0,
+        TERROR = 2,
+        EOF = 1;
+
+    //this.reductionCount = this.shiftCount = 0;
+
+    this.lexer.setInput(input);
+    this.lexer.yy = this.yy;
+    this.yy.lexer = this.lexer;
+    if (typeof this.lexer.yylloc == 'undefined')
+        this.lexer.yylloc = {};
+    var yyloc = this.lexer.yylloc;
+    lstack.push(yyloc);
+
+    if (typeof this.yy.parseError === 'function')
+        this.parseError = this.yy.parseError;
+
+    function popStack (n) {
+        stack.length = stack.length - 2*n;
+        vstack.length = vstack.length - n;
+        lstack.length = lstack.length - n;
+    }
+
+    function lex() {
+        var token;
+        token = self.lexer.lex() || 1; // $end = 1
+        // if token isn't its numeric value, convert
+        if (typeof token !== 'number') {
+            token = self.symbols_[token] || token;
+        }
+        return token;
+    }
+
+    var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
+    while (true) {
+        // retreive state number from top of stack
+        state = stack[stack.length-1];
+
+        // use default actions if available
+        if (this.defaultActions[state]) {
+            action = this.defaultActions[state];
+        } else {
+            if (symbol == null)
+                symbol = lex();
+            // read action for current state and first input
+            action = table[state] && table[state][symbol];
+        }
+
+        // handle parse error
+        _handle_error:
+        if (typeof action === 'undefined' || !action.length || !action[0]) {
+
+            if (!recovering) {
+                // Report error
+                expected = [];
+                for (p in table[state]) if (this.terminals_[p] && p > 2) {
+                    expected.push("'"+this.terminals_[p]+"'");
+                }
+                var errStr = '';
+                if (this.lexer.showPosition) {
+                    errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
+                } else {
+                    errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
+                                  (symbol == 1 /*EOF*/ ? "end of input" :
+                                              ("'"+(this.terminals_[symbol] || symbol)+"'"));
+                }
+                this.parseError(errStr,
+                    {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
+            }
+
+            // just recovered from another error
+            if (recovering == 3) {
+                if (symbol == EOF) {
+                    throw new Error(errStr || 'Parsing halted.');
+                }
+
+                // discard current lookahead and grab another
+                yyleng = this.lexer.yyleng;
+                yytext = this.lexer.yytext;
+                yylineno = this.lexer.yylineno;
+                yyloc = this.lexer.yylloc;
+                symbol = lex();
+            }
+
+            // try to recover from error
+            while (1) {
+                // check for error recovery rule in this state
+                if ((TERROR.toString()) in table[state]) {
+                    break;
+                }
+                if (state == 0) {
+                    throw new Error(errStr || 'Parsing halted.');
+                }
+                popStack(1);
+                state = stack[stack.length-1];
+            }
+
+            preErrorSymbol = symbol; // save the lookahead token
+            symbol = TERROR;         // insert generic error symbol as new lookahead
+            state = stack[stack.length-1];
+            action = table[state] && table[state][TERROR];
+            recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
+        }
+
+        // this shouldn't happen, unless resolve defaults are off
+        if (action[0] instanceof Array && action.length > 1) {
+            throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
+        }
+
+        switch (action[0]) {
+
+            case 1: // shift
+                //this.shiftCount++;
+
+                stack.push(symbol);
+                vstack.push(this.lexer.yytext);
+                lstack.push(this.lexer.yylloc);
+                stack.push(action[1]); // push state
+                symbol = null;
+                if (!preErrorSymbol) { // normal execution/no error
+                    yyleng = this.lexer.yyleng;
+                    yytext = this.lexer.yytext;
+                    yylineno = this.lexer.yylineno;
+                    yyloc = this.lexer.yylloc;
+                    if (recovering > 0)
+                        recovering--;
+                } else { // error just occurred, resume old lookahead f/ before error
+                    symbol = preErrorSymbol;
+                    preErrorSymbol = null;
+                }
+                break;
+
+            case 2: // reduce
+                //this.reductionCount++;
+
+                len = this.productions_[action[1]][1];
+
+                // perform semantic action
+                yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
+                // default location, uses first token for firsts, last for lasts
+                yyval._$ = {
+                    first_line: lstack[lstack.length-(len||1)].first_line,
+                    last_line: lstack[lstack.length-1].last_line,
+                    first_column: lstack[lstack.length-(len||1)].first_column,
+                    last_column: lstack[lstack.length-1].last_column
+                };
+                r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
+
+                if (typeof r !== 'undefined') {
+                    return r;
+                }
+
+                // pop off stack
+                if (len) {
+                    stack = stack.slice(0,-1*len*2);
+                    vstack = vstack.slice(0, -1*len);
+                    lstack = lstack.slice(0, -1*len);
+                }
+
+                stack.push(this.productions_[action[1]][0]);    // push nonterminal (reduce)
+                vstack.push(yyval.$);
+                lstack.push(yyval._$);
+                // goto new state = table[STATE][NONTERMINAL]
+                newState = table[stack[stack.length-2]][stack[stack.length-1]];
+                stack.push(newState);
+                break;
+
+            case 3: // accept
+                return true;
+        }
+
+    }
+
+    return true;
+}};/* Jison generated lexer */
+var lexer = (function(){
+
+var lexer = ({EOF:1,
+parseError:function parseError(str, hash) {
+        if (this.yy.parseError) {
+            this.yy.parseError(str, hash);
+        } else {
+            throw new Error(str);
+        }
+    },
+setInput:function (input) {
+        this._input = input;
+        this._more = this._less = this.done = false;
+        this.yylineno = this.yyleng = 0;
+        this.yytext = this.matched = this.match = '';
+        this.conditionStack = ['INITIAL'];
+        this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
+        return this;
+    },
+input:function () {
+        var ch = this._input[0];
+        this.yytext+=ch;
+        this.yyleng++;
+        this.match+=ch;
+        this.matched+=ch;
+        var lines = ch.match(/\n/);
+        if (lines) this.yylineno++;
+        this._input = this._input.slice(1);
+        return ch;
+    },
+unput:function (ch) {
+        this._input = ch + this._input;
+        return this;
+    },
+more:function () {
+        this._more = true;
+        return this;
+    },
+pastInput:function () {
+        var past = this.matched.substr(0, this.matched.length - this.match.length);
+        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
+    },
+upcomingInput:function () {
+        var next = this.match;
+        if (next.length < 20) {
+            next += this._input.substr(0, 20-next.length);
+        }
+        return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
+    },
+showPosition:function () {
+        var pre = this.pastInput();
+        var c = new Array(pre.length + 1).join("-");
+        return pre + this.upcomingInput() + "\n" + c+"^";
+    },
+next:function () {
+        if (this.done) {
+            return this.EOF;
+        }
+        if (!this._input) this.done = true;
+
+        var token,
+            match,
+            col,
+            lines;
+        if (!this._more) {
+            this.yytext = '';
+            this.match = '';
+        }
+        var rules = this._currentRules();
+        for (var i=0;i < rules.length; i++) {
+            match = this._input.match(this.rules[rules[i]]);
+            if (match) {
+                lines = match[0].match(/\n.*/g);
+                if (lines) this.yylineno += lines.length;
+                this.yylloc = {first_line: this.yylloc.last_line,
+                               last_line: this.yylineno+1,
+                               first_column: this.yylloc.last_column,
+                               last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
+                this.yytext += match[0];
+                this.match += match[0];
+                this.matches = match;
+                this.yyleng = this.yytext.length;
+                this._more = false;
+                this._input = this._input.slice(match[0].length);
+                this.matched += match[0];
+                token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
+                if (token) return token;
+                else return;
+            }
+        }
+        if (this._input === "") {
+            return this.EOF;
+        } else {
+            this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
+                    {text: "", token: null, line: this.yylineno});
+        }
+    },
+lex:function lex() {
+        var r = this.next();
+        if (typeof r !== 'undefined') {
+            return r;
+        } else {
+            return this.lex();
+        }
+    },
+begin:function begin(condition) {
+        this.conditionStack.push(condition);
+    },
+popState:function popState() {
+        return this.conditionStack.pop();
+    },
+_currentRules:function _currentRules() {
+        return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
+    },
+topState:function () {
+        return this.conditionStack[this.conditionStack.length-2];
+    },
+pushState:function begin(condition) {
+        this.begin(condition);
+    }});
+lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
+
+var YYSTATE=YY_START;
+switch($avoiding_name_collisions) {
+case 0:/* skip whitespace */
+break;
+case 1:return 20
+break;
+case 2:return 19
+break;
+case 3:return 8
+break;
+case 4:return 9
+break;
+case 5:return 6
+break;
+case 6:return 7
+break;
+case 7:return 11
+break;
+case 8:return 13
+break;
+case 9:return 10
+break;
+case 10:return 12
+break;
+case 11:return 14
+break;
+case 12:return 15
+break;
+case 13:return 16
+break;
+case 14:return 17
+break;
+case 15:return 18
+break;
+case 16:return 5
+break;
+case 17:return 'INVALID'
+break;
+}
+};
+lexer.rules = [/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./];
+lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}};return lexer;})()
+parser.lexer = lexer;
+return parser;
+})();
+// End parser
+
+  // Handle node, amd, and global systems
+  if (true) {
+    if ( true && module.exports) {
+      exports = module.exports = Jed;
+    }
+    exports.Jed = Jed;
+  }
+  else {}
+
+})(this);
+
+
+/***/ }),
+/* 46 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (_) {
+  return _.noConflict();
+}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+
+/***/ }),
+/* 47 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var toFinite = __webpack_require__(334);
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+  var result = toFinite(value),
+      remainder = result % 1;
+
+  return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+module.exports = toInteger;
+
+
+/***/ }),
+/* 48 */
+/***/ (function(module, exports) {
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+  return typeof value == 'number' &&
+    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+module.exports = isLength;
+
+
+/***/ }),
+/* 49 */
+/***/ (function(module, exports) {
+
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+  switch (args.length) {
+    case 0: return func.call(thisArg);
+    case 1: return func.call(thisArg, args[0]);
+    case 2: return func.call(thisArg, args[0], args[1]);
+    case 3: return func.call(thisArg, args[0], args[1], args[2]);
+  }
+  return func.apply(thisArg, args);
+}
+
+module.exports = apply;
+
+
+/***/ }),
+/* 50 */
+/***/ (function(module, exports) {
+
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+  var index = -1,
+      length = array == null ? 0 : array.length,
+      result = Array(length);
+
+  while (++index < length) {
+    result[index] = iteratee(array[index], index, array);
+  }
+  return result;
+}
+
+module.exports = arrayMap;
+
+
+/***/ }),
+/* 51 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(9);
+
+/** Built-in value references. */
+var objectCreate = Object.create;
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+  function object() {}
+  return function(proto) {
+    if (!isObject(proto)) {
+      return {};
+    }
+    if (objectCreate) {
+      return objectCreate(proto);
+    }
+    object.prototype = proto;
+    var result = new object;
+    object.prototype = undefined;
+    return result;
+  };
+}());
+
+module.exports = baseCreate;
+
+
+/***/ }),
+/* 52 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseCreate = __webpack_require__(51),
+    baseLodash = __webpack_require__(53);
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+function LazyWrapper(value) {
+  this.__wrapped__ = value;
+  this.__actions__ = [];
+  this.__dir__ = 1;
+  this.__filtered__ = false;
+  this.__iteratees__ = [];
+  this.__takeCount__ = MAX_ARRAY_LENGTH;
+  this.__views__ = [];
+}
+
+// Ensure `LazyWrapper` is an instance of `baseLodash`.
+LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+LazyWrapper.prototype.constructor = LazyWrapper;
+
+module.exports = LazyWrapper;
+
+
+/***/ }),
+/* 53 */
+/***/ (function(module, exports) {
+
+/**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+function baseLodash() {
+  // No operation performed.
+}
+
+module.exports = baseLodash;
+
+
+/***/ }),
+/* 54 */
+/***/ (function(module, exports) {
+
+/**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+function getHolder(func) {
+  var object = func;
+  return object.placeholder;
+}
+
+module.exports = getHolder;
+
+
+/***/ }),
+/* 55 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getNative = __webpack_require__(16),
+    root = __webpack_require__(5);
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map');
+
+module.exports = Map;
+
+
+/***/ }),
+/* 56 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var mapCacheClear = __webpack_require__(399),
+    mapCacheDelete = __webpack_require__(406),
+    mapCacheGet = __webpack_require__(408),
+    mapCacheHas = __webpack_require__(409),
+    mapCacheSet = __webpack_require__(410);
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+  var index = -1,
+      length = entries == null ? 0 : entries.length;
+
+  this.clear();
+  while (++index < length) {
+    var entry = entries[index];
+    this.set(entry[0], entry[1]);
+  }
+}
+
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
+
+module.exports = MapCache;
+
+
+/***/ }),
+/* 57 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var castPath = __webpack_require__(37),
+    toKey = __webpack_require__(24);
+
+/**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path) {
+  path = castPath(path, object);
+
+  var index = 0,
+      length = path.length;
+
+  while (object != null && index < length) {
+    object = object[toKey(path[index++])];
+  }
+  return (index && index == length) ? object : undefined;
+}
+
+module.exports = baseGet;
+
+
+/***/ }),
+/* 58 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isArray = __webpack_require__(6),
+    isSymbol = __webpack_require__(28);
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+    reIsPlainProp = /^\w*$/;
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+  if (isArray(value)) {
+    return false;
+  }
+  var type = typeof value;
+  if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+      value == null || isSymbol(value)) {
+    return true;
+  }
+  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+    (object != null && value in Object(object));
+}
+
+module.exports = isKey;
+
+
+/***/ }),
+/* 59 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseValues = __webpack_require__(368),
+    keys = __webpack_require__(19);
+
+/**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ *   this.a = 1;
+ *   this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+function values(object) {
+  return object == null ? [] : baseValues(object, keys(object));
+}
+
+module.exports = values;
+
+
+/***/ }),
+/* 60 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseRest = __webpack_require__(80),
+    createWrap = __webpack_require__(369),
+    getHolder = __webpack_require__(54),
+    replaceHolders = __webpack_require__(32);
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ *   return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+var partial = baseRest(function(func, partials) {
+  var holders = replaceHolders(partials, getHolder(partial));
+  return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+});
+
+// Assign default placeholders.
+partial.placeholder = {};
+
+module.exports = partial;
+
+
+/***/ }),
+/* 61 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '';
+__p += '<!-- src/templates/chatboxes.html -->\n<div class="converse-chatboxes row no-gutters"></div>\n<div id="converse-modals" class="modals"></div>\n';
+return __p
+};
+
+/***/ }),
+/* 62 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/image.html -->\n<a href="' +
+__e(o.url) +
+'" target="_blank" rel="noopener"><img class="chat-image img-thumbnail" src="' +
+__e(o.url) +
+'"/></a>\n';
+return __p
+};
+
+/***/ }),
+/* 63 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/prompt.html -->\n<div class="modal" tabindex="-1" role="dialog">\n  <div class="modal-dialog" role="document">\n    <div class="modal-content">\n      <div class="modal-header ' +
+__e(o.level) +
+'">\n        <h5 class="modal-title">' +
+__e(o.title) +
+'</h5>\n        <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n          <span aria-hidden="true">×</span>\n        </button>\n      </div>\n      <div class="modal-body">\n          <form class="converse-form converse-form--modal confirm" action="#">\n            <div class="form-group">\n                ';
+o.messages.forEach(function (message) { ;
+__p += '\n                    <p>' +
+__e(message) +
+'</p>\n                ';
+ }) ;
+__p += '\n            </div>\n            ';
+ if (o.type === 'prompt') { ;
+__p += '\n              <div class="form-group">\n                  <input type="text" name="reason" class="form-control" placeholder="' +
+__e(o.placeholder) +
+'"/>\n              </div>\n            ';
+ } ;
+__p += '\n            <div class="form-group">\n                <button type="submit" class="btn btn-primary">' +
+__e(o.__('OK')) +
+'</button>\n                <input type="button" class="btn btn-secondary" data-dismiss="modal" value="' +
+__e(o.__('Cancel')) +
+'"/>\n            </div>\n        </form>\n      </div>\n    </div>\n  </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/chatbox_minimize.html -->\n<a class="chatbox-btn toggle-chatbox-button fa fa-minus" title="' +
+__e(o.info_minimize) +
+'"></a>\n';
+return __p
+};
+
+/***/ }),
+/* 65 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_invite.html -->\n<div class="suggestion-box room-invite">\n    <form>\n        ';
+ if (o.error_message) { ;
+__p += ' <div class="error error-feedback">' +
+__e(o.error_message) +
+'</div> ';
+ } ;
+__p += '\n        <div class="form-group">\n            <input class="form-control invited-contact suggestion-box__input"\n                   placeholder="' +
+__e(o.label_invitation) +
+'"\n                   type="text"/>\n            <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n        </div>\n    </form>\n    <ul class="suggestion-box__results suggestion-box__results--below" hidden=""></ul>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 66 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/rooms_results.html -->\n<li class="list-group-item active">' +
+__e( o.feedback_text ) +
+'</li>\n';
+return __p
+};
+
+/***/ }),
+/* 67 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+module.exports = freeGlobal;
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
+
+/***/ }),
+/* 68 */
+/***/ (function(module, exports) {
+
+/**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+  var index = -1,
+      length = array == null ? 0 : array.length;
+
+  while (++index < length) {
+    if (iteratee(array[index], index, array) === false) {
+      break;
+    }
+  }
+  return array;
+}
+
+module.exports = arrayEach;
+
+
+/***/ }),
+/* 69 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseTimes = __webpack_require__(343),
+    isArguments = __webpack_require__(70),
+    isArray = __webpack_require__(6),
+    isBuffer = __webpack_require__(71),
+    isIndex = __webpack_require__(22),
+    isTypedArray = __webpack_require__(72);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+  var isArr = isArray(value),
+      isArg = !isArr && isArguments(value),
+      isBuff = !isArr && !isArg && isBuffer(value),
+      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+      skipIndexes = isArr || isArg || isBuff || isType,
+      result = skipIndexes ? baseTimes(value.length, String) : [],
+      length = result.length;
+
+  for (var key in value) {
+    if ((inherited || hasOwnProperty.call(value, key)) &&
+        !(skipIndexes && (
+           // Safari 9 has enumerable `arguments.length` in strict mode.
+           key == 'length' ||
+           // Node.js 0.10 has enumerable non-index properties on buffers.
+           (isBuff && (key == 'offset' || key == 'parent')) ||
+           // PhantomJS 2 has enumerable non-index properties on typed arrays.
+           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+           // Skip index properties.
+           isIndex(key, length)
+        ))) {
+      result.push(key);
+    }
+  }
+  return result;
+}
+
+module.exports = arrayLikeKeys;
+
+
+/***/ }),
+/* 70 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsArguments = __webpack_require__(344),
+    isObjectLike = __webpack_require__(11);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ *  else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+    !propertyIsEnumerable.call(value, 'callee');
+};
+
+module.exports = isArguments;
+
+
+/***/ }),
+/* 71 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(5),
+    stubFalse = __webpack_require__(345);
+
+/** Detect free variable `exports`. */
+var freeExports =  true && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
+
+/**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+var isBuffer = nativeIsBuffer || stubFalse;
+
+module.exports = isBuffer;
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)(module)))
+
+/***/ }),
+/* 72 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsTypedArray = __webpack_require__(346),
+    baseUnary = __webpack_require__(347),
+    nodeUtil = __webpack_require__(348);
+
+/* Node.js helper references. */
+var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+module.exports = isTypedArray;
+
+
+/***/ }),
+/* 73 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isPrototype = __webpack_require__(74),
+    nativeKeys = __webpack_require__(349);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+  if (!isPrototype(object)) {
+    return nativeKeys(object);
+  }
+  var result = [];
+  for (var key in Object(object)) {
+    if (hasOwnProperty.call(object, key) && key != 'constructor') {
+      result.push(key);
+    }
+  }
+  return result;
+}
+
+module.exports = baseKeys;
+
+
+/***/ }),
+/* 74 */
+/***/ (function(module, exports) {
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+  var Ctor = value && value.constructor,
+      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+  return value === proto;
+}
+
+module.exports = isPrototype;
+
+
+/***/ }),
+/* 75 */
+/***/ (function(module, exports) {
+
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+  return function(arg) {
+    return func(transform(arg));
+  };
+}
+
+module.exports = overArg;
+
+
+/***/ }),
+/* 76 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseAssignValue = __webpack_require__(77),
+    eq = __webpack_require__(30);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignValue(object, key, value) {
+  var objValue = object[key];
+  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+      (value === undefined && !(key in object))) {
+    baseAssignValue(object, key, value);
+  }
+}
+
+module.exports = assignValue;
+
+
+/***/ }),
+/* 77 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var defineProperty = __webpack_require__(78);
+
+/**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function baseAssignValue(object, key, value) {
+  if (key == '__proto__' && defineProperty) {
+    defineProperty(object, key, {
+      'configurable': true,
+      'enumerable': true,
+      'value': value,
+      'writable': true
+    });
+  } else {
+    object[key] = value;
+  }
+}
+
+module.exports = baseAssignValue;
+
+
+/***/ }),
+/* 78 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getNative = __webpack_require__(16);
+
+var defineProperty = (function() {
+  try {
+    var func = getNative(Object, 'defineProperty');
+    func({}, '', {});
+    return func;
+  } catch (e) {}
+}());
+
+module.exports = defineProperty;
+
+
+/***/ }),
+/* 79 */
+/***/ (function(module, exports) {
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+  if (func != null) {
+    try {
+      return funcToString.call(func);
+    } catch (e) {}
+    try {
+      return (func + '');
+    } catch (e) {}
+  }
+  return '';
+}
+
+module.exports = toSource;
+
+
+/***/ }),
+/* 80 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var identity = __webpack_require__(23),
+    overRest = __webpack_require__(359),
+    setToString = __webpack_require__(81);
+
+/**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+function baseRest(func, start) {
+  return setToString(overRest(func, start, identity), func + '');
+}
+
+module.exports = baseRest;
+
+
+/***/ }),
+/* 81 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseSetToString = __webpack_require__(360),
+    shortOut = __webpack_require__(82);
+
+/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = shortOut(baseSetToString);
+
+module.exports = setToString;
+
+
+/***/ }),
+/* 82 */
+/***/ (function(module, exports) {
+
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 800,
+    HOT_SPAN = 16;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeNow = Date.now;
+
+/**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+function shortOut(func) {
+  var count = 0,
+      lastCalled = 0;
+
+  return function() {
+    var stamp = nativeNow(),
+        remaining = HOT_SPAN - (stamp - lastCalled);
+
+    lastCalled = stamp;
+    if (remaining > 0) {
+      if (++count >= HOT_COUNT) {
+        return arguments[0];
+      }
+    } else {
+      count = 0;
+    }
+    return func.apply(undefined, arguments);
+  };
+}
+
+module.exports = shortOut;
+
+
+/***/ }),
+/* 83 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayLikeKeys = __webpack_require__(69),
+    baseKeysIn = __webpack_require__(363),
+    isArrayLike = __webpack_require__(18);
+
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ *   this.a = 1;
+ *   this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+}
+
+module.exports = keysIn;
+
+
+/***/ }),
+/* 84 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseFindIndex = __webpack_require__(365),
+    baseIsNaN = __webpack_require__(366),
+    strictIndexOf = __webpack_require__(367);
+
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+  return value === value
+    ? strictIndexOf(array, value, fromIndex)
+    : baseFindIndex(array, baseIsNaN, fromIndex);
+}
+
+module.exports = baseIndexOf;
+
+
+/***/ }),
+/* 85 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetTag = __webpack_require__(15),
+    isArray = __webpack_require__(6),
+    isObjectLike = __webpack_require__(11);
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+  return typeof value == 'string' ||
+    (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+}
+
+module.exports = isString;
+
+
+/***/ }),
+/* 86 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var identity = __webpack_require__(23),
+    metaMap = __webpack_require__(87);
+
+/**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetData = !metaMap ? identity : function(func, data) {
+  metaMap.set(func, data);
+  return func;
+};
+
+module.exports = baseSetData;
+
+
+/***/ }),
+/* 87 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var WeakMap = __webpack_require__(88);
+
+/** Used to store function metadata. */
+var metaMap = WeakMap && new WeakMap;
+
+module.exports = metaMap;
+
+
+/***/ }),
+/* 88 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getNative = __webpack_require__(16),
+    root = __webpack_require__(5);
+
+/* Built-in method references that are verified to be native. */
+var WeakMap = getNative(root, 'WeakMap');
+
+module.exports = WeakMap;
+
+
+/***/ }),
+/* 89 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var composeArgs = __webpack_require__(90),
+    composeArgsRight = __webpack_require__(91),
+    countHolders = __webpack_require__(372),
+    createCtor = __webpack_require__(31),
+    createRecurry = __webpack_require__(92),
+    getHolder = __webpack_require__(54),
+    reorder = __webpack_require__(383),
+    replaceHolders = __webpack_require__(32),
+    root = __webpack_require__(5);
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+    WRAP_BIND_KEY_FLAG = 2,
+    WRAP_CURRY_FLAG = 8,
+    WRAP_CURRY_RIGHT_FLAG = 16,
+    WRAP_ARY_FLAG = 128,
+    WRAP_FLIP_FLAG = 512;
+
+/**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ *  the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ *  to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+  var isAry = bitmask & WRAP_ARY_FLAG,
+      isBind = bitmask & WRAP_BIND_FLAG,
+      isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+      isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+      isFlip = bitmask & WRAP_FLIP_FLAG,
+      Ctor = isBindKey ? undefined : createCtor(func);
+
+  function wrapper() {
+    var length = arguments.length,
+        args = Array(length),
+        index = length;
+
+    while (index--) {
+      args[index] = arguments[index];
+    }
+    if (isCurried) {
+      var placeholder = getHolder(wrapper),
+          holdersCount = countHolders(args, placeholder);
+    }
+    if (partials) {
+      args = composeArgs(args, partials, holders, isCurried);
+    }
+    if (partialsRight) {
+      args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+    }
+    length -= holdersCount;
+    if (isCurried && length < arity) {
+      var newHolders = replaceHolders(args, placeholder);
+      return createRecurry(
+        func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+        args, newHolders, argPos, ary, arity - length
+      );
+    }
+    var thisBinding = isBind ? thisArg : this,
+        fn = isBindKey ? thisBinding[func] : func;
+
+    length = args.length;
+    if (argPos) {
+      args = reorder(args, argPos);
+    } else if (isFlip && length > 1) {
+      args.reverse();
+    }
+    if (isAry && ary < length) {
+      args.length = ary;
+    }
+    if (this && this !== root && this instanceof wrapper) {
+      fn = Ctor || createCtor(fn);
+    }
+    return fn.apply(thisBinding, args);
+  }
+  return wrapper;
+}
+
+module.exports = createHybrid;
+
+
+/***/ }),
+/* 90 */
+/***/ (function(module, exports) {
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgs(args, partials, holders, isCurried) {
+  var argsIndex = -1,
+      argsLength = args.length,
+      holdersLength = holders.length,
+      leftIndex = -1,
+      leftLength = partials.length,
+      rangeLength = nativeMax(argsLength - holdersLength, 0),
+      result = Array(leftLength + rangeLength),
+      isUncurried = !isCurried;
+
+  while (++leftIndex < leftLength) {
+    result[leftIndex] = partials[leftIndex];
+  }
+  while (++argsIndex < holdersLength) {
+    if (isUncurried || argsIndex < argsLength) {
+      result[holders[argsIndex]] = args[argsIndex];
+    }
+  }
+  while (rangeLength--) {
+    result[leftIndex++] = args[argsIndex++];
+  }
+  return result;
+}
+
+module.exports = composeArgs;
+
+
+/***/ }),
+/* 91 */
+/***/ (function(module, exports) {
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgsRight(args, partials, holders, isCurried) {
+  var argsIndex = -1,
+      argsLength = args.length,
+      holdersIndex = -1,
+      holdersLength = holders.length,
+      rightIndex = -1,
+      rightLength = partials.length,
+      rangeLength = nativeMax(argsLength - holdersLength, 0),
+      result = Array(rangeLength + rightLength),
+      isUncurried = !isCurried;
+
+  while (++argsIndex < rangeLength) {
+    result[argsIndex] = args[argsIndex];
+  }
+  var offset = argsIndex;
+  while (++rightIndex < rightLength) {
+    result[offset + rightIndex] = partials[rightIndex];
+  }
+  while (++holdersIndex < holdersLength) {
+    if (isUncurried || argsIndex < argsLength) {
+      result[offset + holders[holdersIndex]] = args[argsIndex++];
+    }
+  }
+  return result;
+}
+
+module.exports = composeArgsRight;
+
+
+/***/ }),
+/* 92 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isLaziable = __webpack_require__(373),
+    setData = __webpack_require__(96),
+    setWrapToString = __webpack_require__(97);
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+    WRAP_BIND_KEY_FLAG = 2,
+    WRAP_CURRY_BOUND_FLAG = 4,
+    WRAP_CURRY_FLAG = 8,
+    WRAP_PARTIAL_FLAG = 32,
+    WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ *  the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+  var isCurry = bitmask & WRAP_CURRY_FLAG,
+      newHolders = isCurry ? holders : undefined,
+      newHoldersRight = isCurry ? undefined : holders,
+      newPartials = isCurry ? partials : undefined,
+      newPartialsRight = isCurry ? undefined : partials;
+
+  bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+  bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+  if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+    bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+  }
+  var newData = [
+    func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+    newHoldersRight, argPos, ary, arity
+  ];
+
+  var result = wrapFunc.apply(undefined, newData);
+  if (isLaziable(func)) {
+    setData(result, newData);
+  }
+  result.placeholder = placeholder;
+  return setWrapToString(result, func, bitmask);
+}
+
+module.exports = createRecurry;
+
+
+/***/ }),
+/* 93 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var metaMap = __webpack_require__(87),
+    noop = __webpack_require__(374);
+
+/**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+var getData = !metaMap ? noop : function(func) {
+  return metaMap.get(func);
+};
+
+module.exports = getData;
+
+
+/***/ }),
+/* 94 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseCreate = __webpack_require__(51),
+    baseLodash = __webpack_require__(53);
+
+/**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+function LodashWrapper(value, chainAll) {
+  this.__wrapped__ = value;
+  this.__actions__ = [];
+  this.__chain__ = !!chainAll;
+  this.__index__ = 0;
+  this.__values__ = undefined;
+}
+
+LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+LodashWrapper.prototype.constructor = LodashWrapper;
+
+module.exports = LodashWrapper;
+
+
+/***/ }),
+/* 95 */
+/***/ (function(module, exports) {
+
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+  var index = -1,
+      length = source.length;
+
+  array || (array = Array(length));
+  while (++index < length) {
+    array[index] = source[index];
+  }
+  return array;
+}
+
+module.exports = copyArray;
+
+
+/***/ }),
+/* 96 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseSetData = __webpack_require__(86),
+    shortOut = __webpack_require__(82);
+
+/**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var setData = shortOut(baseSetData);
+
+module.exports = setData;
+
+
+/***/ }),
+/* 97 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getWrapDetails = __webpack_require__(379),
+    insertWrapDetails = __webpack_require__(380),
+    setToString = __webpack_require__(81),
+    updateWrapDetails = __webpack_require__(381);
+
+/**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+function setWrapToString(wrapper, reference, bitmask) {
+  var source = (reference + '');
+  return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+}
+
+module.exports = setWrapToString;
+
+
+/***/ }),
+/* 98 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var ListCache = __webpack_require__(33),
+    stackClear = __webpack_require__(394),
+    stackDelete = __webpack_require__(395),
+    stackGet = __webpack_require__(396),
+    stackHas = __webpack_require__(397),
+    stackSet = __webpack_require__(398);
+
+/**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Stack(entries) {
+  var data = this.__data__ = new ListCache(entries);
+  this.size = data.size;
+}
+
+// Add methods to `Stack`.
+Stack.prototype.clear = stackClear;
+Stack.prototype['delete'] = stackDelete;
+Stack.prototype.get = stackGet;
+Stack.prototype.has = stackHas;
+Stack.prototype.set = stackSet;
+
+module.exports = Stack;
+
+
+/***/ }),
+/* 99 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsEqualDeep = __webpack_require__(411),
+    isObjectLike = __webpack_require__(11);
+
+/**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ *  1 - Unordered comparison
+ *  2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, bitmask, customizer, stack) {
+  if (value === other) {
+    return true;
+  }
+  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+    return value !== value && other !== other;
+  }
+  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+}
+
+module.exports = baseIsEqual;
+
+
+/***/ }),
+/* 100 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var SetCache = __webpack_require__(412),
+    arraySome = __webpack_require__(415),
+    cacheHas = __webpack_require__(416);
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+    COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+      arrLength = array.length,
+      othLength = other.length;
+
+  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+    return false;
+  }
+  // Assume cyclic values are equal.
+  var stacked = stack.get(array);
+  if (stacked && stack.get(other)) {
+    return stacked == other;
+  }
+  var index = -1,
+      result = true,
+      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+  stack.set(array, other);
+  stack.set(other, array);
+
+  // Ignore non-index properties.
+  while (++index < arrLength) {
+    var arrValue = array[index],
+        othValue = other[index];
+
+    if (customizer) {
+      var compared = isPartial
+        ? customizer(othValue, arrValue, index, other, array, stack)
+        : customizer(arrValue, othValue, index, array, other, stack);
+    }
+    if (compared !== undefined) {
+      if (compared) {
+        continue;
+      }
+      result = false;
+      break;
+    }
+    // Recursively compare arrays (susceptible to call stack limits).
+    if (seen) {
+      if (!arraySome(other, function(othValue, othIndex) {
+            if (!cacheHas(seen, othIndex) &&
+                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+              return seen.push(othIndex);
+            }
+          })) {
+        result = false;
+        break;
+      }
+    } else if (!(
+          arrValue === othValue ||
+            equalFunc(arrValue, othValue, bitmask, customizer, stack)
+        )) {
+      result = false;
+      break;
+    }
+  }
+  stack['delete'](array);
+  stack['delete'](other);
+  return result;
+}
+
+module.exports = equalArrays;
+
+
+/***/ }),
+/* 101 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayPush = __webpack_require__(102),
+    isArray = __webpack_require__(6);
+
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+  var result = keysFunc(object);
+  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+}
+
+module.exports = baseGetAllKeys;
+
+
+/***/ }),
+/* 102 */
+/***/ (function(module, exports) {
+
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+  var index = -1,
+      length = values.length,
+      offset = array.length;
+
+  while (++index < length) {
+    array[offset + index] = values[index];
+  }
+  return array;
+}
+
+module.exports = arrayPush;
+
+
+/***/ }),
+/* 103 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayFilter = __webpack_require__(423),
+    stubArray = __webpack_require__(104);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+  if (object == null) {
+    return [];
+  }
+  object = Object(object);
+  return arrayFilter(nativeGetSymbols(object), function(symbol) {
+    return propertyIsEnumerable.call(object, symbol);
+  });
+};
+
+module.exports = getSymbols;
+
+
+/***/ }),
+/* 104 */
+/***/ (function(module, exports) {
+
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+  return [];
+}
+
+module.exports = stubArray;
+
+
+/***/ }),
+/* 105 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var DataView = __webpack_require__(424),
+    Map = __webpack_require__(55),
+    Promise = __webpack_require__(425),
+    Set = __webpack_require__(426),
+    WeakMap = __webpack_require__(88),
+    baseGetTag = __webpack_require__(15),
+    toSource = __webpack_require__(79);
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+    objectTag = '[object Object]',
+    promiseTag = '[object Promise]',
+    setTag = '[object Set]',
+    weakMapTag = '[object WeakMap]';
+
+var dataViewTag = '[object DataView]';
+
+/** Used to detect maps, sets, and weakmaps. */
+var dataViewCtorString = toSource(DataView),
+    mapCtorString = toSource(Map),
+    promiseCtorString = toSource(Promise),
+    setCtorString = toSource(Set),
+    weakMapCtorString = toSource(WeakMap);
+
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+var getTag = baseGetTag;
+
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+    (Map && getTag(new Map) != mapTag) ||
+    (Promise && getTag(Promise.resolve()) != promiseTag) ||
+    (Set && getTag(new Set) != setTag) ||
+    (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+  getTag = function(value) {
+    var result = baseGetTag(value),
+        Ctor = result == objectTag ? value.constructor : undefined,
+        ctorString = Ctor ? toSource(Ctor) : '';
+
+    if (ctorString) {
+      switch (ctorString) {
+        case dataViewCtorString: return dataViewTag;
+        case mapCtorString: return mapTag;
+        case promiseCtorString: return promiseTag;
+        case setCtorString: return setTag;
+        case weakMapCtorString: return weakMapTag;
+      }
+    }
+    return result;
+  };
+}
+
+module.exports = getTag;
+
+
+/***/ }),
+/* 106 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(9);
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ *  equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+  return value === value && !isObject(value);
+}
+
+module.exports = isStrictComparable;
+
+
+/***/ }),
+/* 107 */
+/***/ (function(module, exports) {
+
+/**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function matchesStrictComparable(key, srcValue) {
+  return function(object) {
+    if (object == null) {
+      return false;
+    }
+    return object[key] === srcValue &&
+      (srcValue !== undefined || (key in Object(object)));
+  };
+}
+
+module.exports = matchesStrictComparable;
+
+
+/***/ }),
+/* 108 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseToString = __webpack_require__(433);
+
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+  return value == null ? '' : baseToString(value);
+}
+
+module.exports = toString;
+
+
+/***/ }),
+/* 109 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function baseProperty(key) {
+  return function(object) {
+    return object == null ? undefined : object[key];
+  };
+}
+
+module.exports = baseProperty;
+
+
+/***/ }),
+/* 110 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.0 by @mathias */
+;(function(root) {
+
+    /** Detect free variables */
+    var freeExports =  true && exports &&
+        !exports.nodeType && exports;
+    var freeModule =  true && module &&
+        !module.nodeType && module;
+    var freeGlobal = typeof global == 'object' && global;
+    if (
+        freeGlobal.global === freeGlobal ||
+        freeGlobal.window === freeGlobal ||
+        freeGlobal.self === freeGlobal
+    ) {
+        root = freeGlobal;
+    }
+
+    /**
+     * The `punycode` object.
+     * @name punycode
+     * @type Object
+     */
+    var punycode,
+
+    /** Highest positive signed 32-bit float value */
+    maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+
+    /** Bootstring parameters */
+    base = 36,
+    tMin = 1,
+    tMax = 26,
+    skew = 38,
+    damp = 700,
+    initialBias = 72,
+    initialN = 128, // 0x80
+    delimiter = '-', // '\x2D'
+
+    /** Regular expressions */
+    regexPunycode = /^xn--/,
+    regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
+    regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+
+    /** Error messages */
+    errors = {
+        'overflow': 'Overflow: input needs wider integers to process',
+        'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+        'invalid-input': 'Invalid input'
+    },
+
+    /** Convenience shortcuts */
+    baseMinusTMin = base - tMin,
+    floor = Math.floor,
+    stringFromCharCode = String.fromCharCode,
+
+    /** Temporary variable */
+    key;
+
+    /*--------------------------------------------------------------------------*/
+
+    /**
+     * A generic error utility function.
+     * @private
+     * @param {String} type The error type.
+     * @returns {Error} Throws a `RangeError` with the applicable error message.
+     */
+    function error(type) {
+        throw new RangeError(errors[type]);
+    }
+
+    /**
+     * A generic `Array#map` utility function.
+     * @private
+     * @param {Array} array The array to iterate over.
+     * @param {Function} callback The function that gets called for every array
+     * item.
+     * @returns {Array} A new array of values returned by the callback function.
+     */
+    function map(array, fn) {
+        var length = array.length;
+        var result = [];
+        while (length--) {
+            result[length] = fn(array[length]);
+        }
+        return result;
+    }
+
+    /**
+     * A simple `Array#map`-like wrapper to work with domain name strings or email
+     * addresses.
+     * @private
+     * @param {String} domain The domain name or email address.
+     * @param {Function} callback The function that gets called for every
+     * character.
+     * @returns {Array} A new string of characters returned by the callback
+     * function.
+     */
+    function mapDomain(string, fn) {
+        var parts = string.split('@');
+        var result = '';
+        if (parts.length > 1) {
+            // In email addresses, only the domain name should be punycoded. Leave
+            // the local part (i.e. everything up to `@`) intact.
+            result = parts[0] + '@';
+            string = parts[1];
+        }
+        // Avoid `split(regex)` for IE8 compatibility. See #17.
+        string = string.replace(regexSeparators, '\x2E');
+        var labels = string.split('.');
+        var encoded = map(labels, fn).join('.');
+        return result + encoded;
+    }
+
+    /**
+     * Creates an array containing the numeric code points of each Unicode
+     * character in the string. While JavaScript uses UCS-2 internally,
+     * this function will convert a pair of surrogate halves (each of which
+     * UCS-2 exposes as separate characters) into a single code point,
+     * matching UTF-16.
+     * @see `punycode.ucs2.encode`
+     * @see <https://mathiasbynens.be/notes/javascript-encoding>
+     * @memberOf punycode.ucs2
+     * @name decode
+     * @param {String} string The Unicode input string (UCS-2).
+     * @returns {Array} The new array of code points.
+     */
+    function ucs2decode(string) {
+        var output = [],
+            counter = 0,
+            length = string.length,
+            value,
+            extra;
+        while (counter < length) {
+            value = string.charCodeAt(counter++);
+            if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+                // high surrogate, and there is a next character
+                extra = string.charCodeAt(counter++);
+                if ((extra & 0xFC00) == 0xDC00) { // low surrogate
+                    output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+                } else {
+                    // unmatched surrogate; only append this code unit, in case the next
+                    // code unit is the high surrogate of a surrogate pair
+                    output.push(value);
+                    counter--;
+                }
+            } else {
+                output.push(value);
+            }
+        }
+        return output;
+    }
+
+    /**
+     * Creates a string based on an array of numeric code points.
+     * @see `punycode.ucs2.decode`
+     * @memberOf punycode.ucs2
+     * @name encode
+     * @param {Array} codePoints The array of numeric code points.
+     * @returns {String} The new Unicode string (UCS-2).
+     */
+    function ucs2encode(array) {
+        return map(array, function(value) {
+            var output = '';
+            if (value > 0xFFFF) {
+                value -= 0x10000;
+                output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
+                value = 0xDC00 | value & 0x3FF;
+            }
+            output += stringFromCharCode(value);
+            return output;
+        }).join('');
+    }
+
+    /**
+     * Converts a basic code point into a digit/integer.
+     * @see `digitToBasic()`
+     * @private
+     * @param {Number} codePoint The basic numeric code point value.
+     * @returns {Number} The numeric value of a basic code point (for use in
+     * representing integers) in the range `0` to `base - 1`, or `base` if
+     * the code point does not represent a value.
+     */
+    function basicToDigit(codePoint) {
+        if (codePoint - 48 < 10) {
+            return codePoint - 22;
+        }
+        if (codePoint - 65 < 26) {
+            return codePoint - 65;
+        }
+        if (codePoint - 97 < 26) {
+            return codePoint - 97;
+        }
+        return base;
+    }
+
+    /**
+     * Converts a digit/integer into a basic code point.
+     * @see `basicToDigit()`
+     * @private
+     * @param {Number} digit The numeric value of a basic code point.
+     * @returns {Number} The basic code point whose value (when used for
+     * representing integers) is `digit`, which needs to be in the range
+     * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+     * used; else, the lowercase form is used. The behavior is undefined
+     * if `flag` is non-zero and `digit` has no uppercase form.
+     */
+    function digitToBasic(digit, flag) {
+        //  0..25 map to ASCII a..z or A..Z
+        // 26..35 map to ASCII 0..9
+        return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+    }
+
+    /**
+     * Bias adaptation function as per section 3.4 of RFC 3492.
+     * https://tools.ietf.org/html/rfc3492#section-3.4
+     * @private
+     */
+    function adapt(delta, numPoints, firstTime) {
+        var k = 0;
+        delta = firstTime ? floor(delta / damp) : delta >> 1;
+        delta += floor(delta / numPoints);
+        for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+            delta = floor(delta / baseMinusTMin);
+        }
+        return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+    }
+
+    /**
+     * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+     * symbols.
+     * @memberOf punycode
+     * @param {String} input The Punycode string of ASCII-only symbols.
+     * @returns {String} The resulting string of Unicode symbols.
+     */
+    function decode(input) {
+        // Don't use UCS-2
+        var output = [],
+            inputLength = input.length,
+            out,
+            i = 0,
+            n = initialN,
+            bias = initialBias,
+            basic,
+            j,
+            index,
+            oldi,
+            w,
+            k,
+            digit,
+            t,
+            /** Cached calculation results */
+            baseMinusT;
+
+        // Handle the basic code points: let `basic` be the number of input code
+        // points before the last delimiter, or `0` if there is none, then copy
+        // the first basic code points to the output.
+
+        basic = input.lastIndexOf(delimiter);
+        if (basic < 0) {
+            basic = 0;
+        }
+
+        for (j = 0; j < basic; ++j) {
+            // if it's not a basic code point
+            if (input.charCodeAt(j) >= 0x80) {
+                error('not-basic');
+            }
+            output.push(input.charCodeAt(j));
+        }
+
+        // Main decoding loop: start just after the last delimiter if any basic code
+        // points were copied; start at the beginning otherwise.
+
+        for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+            // `index` is the index of the next character to be consumed.
+            // Decode a generalized variable-length integer into `delta`,
+            // which gets added to `i`. The overflow checking is easier
+            // if we increase `i` as we go, then subtract off its starting
+            // value at the end to obtain `delta`.
+            for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
+
+                if (index >= inputLength) {
+                    error('invalid-input');
+                }
+
+                digit = basicToDigit(input.charCodeAt(index++));
+
+                if (digit >= base || digit > floor((maxInt - i) / w)) {
+                    error('overflow');
+                }
+
+                i += digit * w;
+                t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+                if (digit < t) {
+                    break;
+                }
+
+                baseMinusT = base - t;
+                if (w > floor(maxInt / baseMinusT)) {
+                    error('overflow');
+                }
+
+                w *= baseMinusT;
+
+            }
+
+            out = output.length + 1;
+            bias = adapt(i - oldi, out, oldi == 0);
+
+            // `i` was supposed to wrap around from `out` to `0`,
+            // incrementing `n` each time, so we'll fix that now:
+            if (floor(i / out) > maxInt - n) {
+                error('overflow');
+            }
+
+            n += floor(i / out);
+            i %= out;
+
+            // Insert `n` at position `i` of the output
+            output.splice(i++, 0, n);
+
+        }
+
+        return ucs2encode(output);
+    }
+
+    /**
+     * Converts a string of Unicode symbols (e.g. a domain name label) to a
+     * Punycode string of ASCII-only symbols.
+     * @memberOf punycode
+     * @param {String} input The string of Unicode symbols.
+     * @returns {String} The resulting Punycode string of ASCII-only symbols.
+     */
+    function encode(input) {
+        var n,
+            delta,
+            handledCPCount,
+            basicLength,
+            bias,
+            j,
+            m,
+            q,
+            k,
+            t,
+            currentValue,
+            output = [],
+            /** `inputLength` will hold the number of code points in `input`. */
+            inputLength,
+            /** Cached calculation results */
+            handledCPCountPlusOne,
+            baseMinusT,
+            qMinusT;
+
+        // Convert the input in UCS-2 to Unicode
+        input = ucs2decode(input);
+
+        // Cache the length
+        inputLength = input.length;
+
+        // Initialize the state
+        n = initialN;
+        delta = 0;
+        bias = initialBias;
+
+        // Handle the basic code points
+        for (j = 0; j < inputLength; ++j) {
+            currentValue = input[j];
+            if (currentValue < 0x80) {
+                output.push(stringFromCharCode(currentValue));
+            }
+        }
+
+        handledCPCount = basicLength = output.length;
+
+        // `handledCPCount` is the number of code points that have been handled;
+        // `basicLength` is the number of basic code points.
+
+        // Finish the basic string - if it is not empty - with a delimiter
+        if (basicLength) {
+            output.push(delimiter);
+        }
+
+        // Main encoding loop:
+        while (handledCPCount < inputLength) {
+
+            // All non-basic code points < n have been handled already. Find the next
+            // larger one:
+            for (m = maxInt, j = 0; j < inputLength; ++j) {
+                currentValue = input[j];
+                if (currentValue >= n && currentValue < m) {
+                    m = currentValue;
+                }
+            }
+
+            // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+            // but guard against overflow
+            handledCPCountPlusOne = handledCPCount + 1;
+            if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+                error('overflow');
+            }
+
+            delta += (m - n) * handledCPCountPlusOne;
+            n = m;
+
+            for (j = 0; j < inputLength; ++j) {
+                currentValue = input[j];
+
+                if (currentValue < n && ++delta > maxInt) {
+                    error('overflow');
+                }
+
+                if (currentValue == n) {
+                    // Represent delta as a generalized variable-length integer
+                    for (q = delta, k = base; /* no condition */; k += base) {
+                        t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+                        if (q < t) {
+                            break;
+                        }
+                        qMinusT = q - t;
+                        baseMinusT = base - t;
+                        output.push(
+                            stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+                        );
+                        q = floor(qMinusT / baseMinusT);
+                    }
+
+                    output.push(stringFromCharCode(digitToBasic(q, 0)));
+                    bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+                    delta = 0;
+                    ++handledCPCount;
+                }
+            }
+
+            ++delta;
+            ++n;
+
+        }
+        return output.join('');
+    }
+
+    /**
+     * Converts a Punycode string representing a domain name or an email address
+     * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+     * it doesn't matter if you call it on a string that has already been
+     * converted to Unicode.
+     * @memberOf punycode
+     * @param {String} input The Punycoded domain name or email address to
+     * convert to Unicode.
+     * @returns {String} The Unicode representation of the given Punycode
+     * string.
+     */
+    function toUnicode(input) {
+        return mapDomain(input, function(string) {
+            return regexPunycode.test(string)
+                ? decode(string.slice(4).toLowerCase())
+                : string;
+        });
+    }
+
+    /**
+     * Converts a Unicode string representing a domain name or an email address to
+     * Punycode. Only the non-ASCII parts of the domain name will be converted,
+     * i.e. it doesn't matter if you call it with a domain that's already in
+     * ASCII.
+     * @memberOf punycode
+     * @param {String} input The domain name or email address to convert, as a
+     * Unicode string.
+     * @returns {String} The Punycode representation of the given domain name or
+     * email address.
+     */
+    function toASCII(input) {
+        return mapDomain(input, function(string) {
+            return regexNonASCII.test(string)
+                ? 'xn--' + encode(string)
+                : string;
+        });
+    }
+
+    /*--------------------------------------------------------------------------*/
+
+    /** Define the public API */
+    punycode = {
+        /**
+         * A string representing the current Punycode.js version number.
+         * @memberOf punycode
+         * @type String
+         */
+        'version': '1.3.2',
+        /**
+         * An object of methods to convert from JavaScript's internal character
+         * representation (UCS-2) to Unicode code points, and back.
+         * @see <https://mathiasbynens.be/notes/javascript-encoding>
+         * @memberOf punycode
+         * @type Object
+         */
+        'ucs2': {
+            'decode': ucs2decode,
+            'encode': ucs2encode
+        },
+        'decode': decode,
+        'encode': encode,
+        'toASCII': toASCII,
+        'toUnicode': toUnicode
+    };
+
+    /** Expose `punycode` */
+    // Some AMD build optimizers, like r.js, check for specific condition patterns
+    // like the following:
+    if (
+        true
+    ) {
+        !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
+            return punycode;
+        }).call(exports, __webpack_require__, exports, module),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+    } else {}
+
+}(this));
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)(module), __webpack_require__(14)))
+
+/***/ }),
+/* 111 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
+ * URI.js - Mutating URLs
+ * IPv6 Support
+ *
+ * Version: 1.19.1
+ *
+ * Author: Rodney Rehm
+ * Web: http://medialize.github.io/URI.js/
+ *
+ * Licensed under
+ *   MIT License http://www.opensource.org/licenses/mit-license
+ *
+ */
+
+(function (root, factory) {
+  'use strict';
+  // https://github.com/umdjs/umd/blob/master/returnExports.js
+  if ( true && module.exports) {
+    // Node
+    module.exports = factory();
+  } else if (true) {
+    // AMD. Register as an anonymous module.
+    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+                __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+                (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
+                __WEBPACK_AMD_DEFINE_FACTORY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  } else {}
+}(this, function (root) {
+  'use strict';
+
+  /*
+  var _in = "fe80:0000:0000:0000:0204:61ff:fe9d:f156";
+  var _out = IPv6.best(_in);
+  var _expected = "fe80::204:61ff:fe9d:f156";
+
+  console.log(_in, _out, _expected, _out === _expected);
+  */
+
+  // save current IPv6 variable, if any
+  var _IPv6 = root && root.IPv6;
+
+  function bestPresentation(address) {
+    // based on:
+    // Javascript to test an IPv6 address for proper format, and to
+    // present the "best text representation" according to IETF Draft RFC at
+    // http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04
+    // 8 Feb 2010 Rich Brown, Dartware, LLC
+    // Please feel free to use this code as long as you provide a link to
+    // http://www.intermapper.com
+    // http://intermapper.com/support/tools/IPV6-Validator.aspx
+    // http://download.dartware.com/thirdparty/ipv6validator.js
+
+    var _address = address.toLowerCase();
+    var segments = _address.split(':');
+    var length = segments.length;
+    var total = 8;
+
+    // trim colons (:: or ::a:b:c… or …a:b:c::)
+    if (segments[0] === '' && segments[1] === '' && segments[2] === '') {
+      // must have been ::
+      // remove first two items
+      segments.shift();
+      segments.shift();
+    } else if (segments[0] === '' && segments[1] === '') {
+      // must have been ::xxxx
+      // remove the first item
+      segments.shift();
+    } else if (segments[length - 1] === '' && segments[length - 2] === '') {
+      // must have been xxxx::
+      segments.pop();
+    }
+
+    length = segments.length;
+
+    // adjust total segments for IPv4 trailer
+    if (segments[length - 1].indexOf('.') !== -1) {
+      // found a "." which means IPv4
+      total = 7;
+    }
+
+    // fill empty segments them with "0000"
+    var pos;
+    for (pos = 0; pos < length; pos++) {
+      if (segments[pos] === '') {
+        break;
+      }
+    }
+
+    if (pos < total) {
+      segments.splice(pos, 1, '0000');
+      while (segments.length < total) {
+        segments.splice(pos, 0, '0000');
+      }
+    }
+
+    // strip leading zeros
+    var _segments;
+    for (var i = 0; i < total; i++) {
+      _segments = segments[i].split('');
+      for (var j = 0; j < 3 ; j++) {
+        if (_segments[0] === '0' && _segments.length > 1) {
+          _segments.splice(0,1);
+        } else {
+          break;
+        }
+      }
+
+      segments[i] = _segments.join('');
+    }
+
+    // find longest sequence of zeroes and coalesce them into one segment
+    var best = -1;
+    var _best = 0;
+    var _current = 0;
+    var current = -1;
+    var inzeroes = false;
+    // i; already declared
+
+    for (i = 0; i < total; i++) {
+      if (inzeroes) {
+        if (segments[i] === '0') {
+          _current += 1;
+        } else {
+          inzeroes = false;
+          if (_current > _best) {
+            best = current;
+            _best = _current;
+          }
+        }
+      } else {
+        if (segments[i] === '0') {
+          inzeroes = true;
+          current = i;
+          _current = 1;
+        }
+      }
+    }
+
+    if (_current > _best) {
+      best = current;
+      _best = _current;
+    }
+
+    if (_best > 1) {
+      segments.splice(best, _best, '');
+    }
+
+    length = segments.length;
+
+    // assemble remaining segments
+    var result = '';
+    if (segments[0] === '')  {
+      result = ':';
+    }
+
+    for (i = 0; i < length; i++) {
+      result += segments[i];
+      if (i === length - 1) {
+        break;
+      }
+
+      result += ':';
+    }
+
+    if (segments[length - 1] === '') {
+      result += ':';
+    }
+
+    return result;
+  }
+
+  function noConflict() {
+    /*jshint validthis: true */
+    if (root.IPv6 === this) {
+      root.IPv6 = _IPv6;
+    }
+
+    return this;
+  }
+
+  return {
+    best: bestPresentation,
+    noConflict: noConflict
+  };
+}));
+
+
+/***/ }),
+/* 112 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
+ * URI.js - Mutating URLs
+ * Second Level Domain (SLD) Support
+ *
+ * Version: 1.19.1
+ *
+ * Author: Rodney Rehm
+ * Web: http://medialize.github.io/URI.js/
+ *
+ * Licensed under
+ *   MIT License http://www.opensource.org/licenses/mit-license
+ *
+ */
+
+(function (root, factory) {
+  'use strict';
+  // https://github.com/umdjs/umd/blob/master/returnExports.js
+  if ( true && module.exports) {
+    // Node
+    module.exports = factory();
+  } else if (true) {
+    // AMD. Register as an anonymous module.
+    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+                __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+                (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
+                __WEBPACK_AMD_DEFINE_FACTORY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  } else {}
+}(this, function (root) {
+  'use strict';
+
+  // save current SecondLevelDomains variable, if any
+  var _SecondLevelDomains = root && root.SecondLevelDomains;
+
+  var SLD = {
+    // list of known Second Level Domains
+    // converted list of SLDs from https://github.com/gavingmiller/second-level-domains
+    // ----
+    // publicsuffix.org is more current and actually used by a couple of browsers internally.
+    // downside is it also contains domains like "dyndns.org" - which is fine for the security
+    // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js
+    // ----
+    list: {
+      'ac':' com gov mil net org ',
+      'ae':' ac co gov mil name net org pro sch ',
+      'af':' com edu gov net org ',
+      'al':' com edu gov mil net org ',
+      'ao':' co ed gv it og pb ',
+      'ar':' com edu gob gov int mil net org tur ',
+      'at':' ac co gv or ',
+      'au':' asn com csiro edu gov id net org ',
+      'ba':' co com edu gov mil net org rs unbi unmo unsa untz unze ',
+      'bb':' biz co com edu gov info net org store tv ',
+      'bh':' biz cc com edu gov info net org ',
+      'bn':' com edu gov net org ',
+      'bo':' com edu gob gov int mil net org tv ',
+      'br':' adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ',
+      'bs':' com edu gov net org ',
+      'bz':' du et om ov rg ',
+      'ca':' ab bc mb nb nf nl ns nt nu on pe qc sk yk ',
+      'ck':' biz co edu gen gov info net org ',
+      'cn':' ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ',
+      'co':' com edu gov mil net nom org ',
+      'cr':' ac c co ed fi go or sa ',
+      'cy':' ac biz com ekloges gov ltd name net org parliament press pro tm ',
+      'do':' art com edu gob gov mil net org sld web ',
+      'dz':' art asso com edu gov net org pol ',
+      'ec':' com edu fin gov info med mil net org pro ',
+      'eg':' com edu eun gov mil name net org sci ',
+      'er':' com edu gov ind mil net org rochest w ',
+      'es':' com edu gob nom org ',
+      'et':' biz com edu gov info name net org ',
+      'fj':' ac biz com info mil name net org pro ',
+      'fk':' ac co gov net nom org ',
+      'fr':' asso com f gouv nom prd presse tm ',
+      'gg':' co net org ',
+      'gh':' com edu gov mil org ',
+      'gn':' ac com gov net org ',
+      'gr':' com edu gov mil net org ',
+      'gt':' com edu gob ind mil net org ',
+      'gu':' com edu gov net org ',
+      'hk':' com edu gov idv net org ',
+      'hu':' 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ',
+      'id':' ac co go mil net or sch web ',
+      'il':' ac co gov idf k12 muni net org ',
+      'in':' ac co edu ernet firm gen gov i ind mil net nic org res ',
+      'iq':' com edu gov i mil net org ',
+      'ir':' ac co dnssec gov i id net org sch ',
+      'it':' edu gov ',
+      'je':' co net org ',
+      'jo':' com edu gov mil name net org sch ',
+      'jp':' ac ad co ed go gr lg ne or ',
+      'ke':' ac co go info me mobi ne or sc ',
+      'kh':' com edu gov mil net org per ',
+      'ki':' biz com de edu gov info mob net org tel ',
+      'km':' asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ',
+      'kn':' edu gov net org ',
+      'kr':' ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ',
+      'kw':' com edu gov net org ',
+      'ky':' com edu gov net org ',
+      'kz':' com edu gov mil net org ',
+      'lb':' com edu gov net org ',
+      'lk':' assn com edu gov grp hotel int ltd net ngo org sch soc web ',
+      'lr':' com edu gov net org ',
+      'lv':' asn com conf edu gov id mil net org ',
+      'ly':' com edu gov id med net org plc sch ',
+      'ma':' ac co gov m net org press ',
+      'mc':' asso tm ',
+      'me':' ac co edu gov its net org priv ',
+      'mg':' com edu gov mil nom org prd tm ',
+      'mk':' com edu gov inf name net org pro ',
+      'ml':' com edu gov net org presse ',
+      'mn':' edu gov org ',
+      'mo':' com edu gov net org ',
+      'mt':' com edu gov net org ',
+      'mv':' aero biz com coop edu gov info int mil museum name net org pro ',
+      'mw':' ac co com coop edu gov int museum net org ',
+      'mx':' com edu gob net org ',
+      'my':' com edu gov mil name net org sch ',
+      'nf':' arts com firm info net other per rec store web ',
+      'ng':' biz com edu gov mil mobi name net org sch ',
+      'ni':' ac co com edu gob mil net nom org ',
+      'np':' com edu gov mil net org ',
+      'nr':' biz com edu gov info net org ',
+      'om':' ac biz co com edu gov med mil museum net org pro sch ',
+      'pe':' com edu gob mil net nom org sld ',
+      'ph':' com edu gov i mil net ngo org ',
+      'pk':' biz com edu fam gob gok gon gop gos gov net org web ',
+      'pl':' art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ',
+      'pr':' ac biz com edu est gov info isla name net org pro prof ',
+      'ps':' com edu gov net org plo sec ',
+      'pw':' belau co ed go ne or ',
+      'ro':' arts com firm info nom nt org rec store tm www ',
+      'rs':' ac co edu gov in org ',
+      'sb':' com edu gov net org ',
+      'sc':' com edu gov net org ',
+      'sh':' co com edu gov net nom org ',
+      'sl':' com edu gov net org ',
+      'st':' co com consulado edu embaixada gov mil net org principe saotome store ',
+      'sv':' com edu gob org red ',
+      'sz':' ac co org ',
+      'tr':' av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ',
+      'tt':' aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ',
+      'tw':' club com ebiz edu game gov idv mil net org ',
+      'mu':' ac co com gov net or org ',
+      'mz':' ac co edu gov org ',
+      'na':' co com ',
+      'nz':' ac co cri geek gen govt health iwi maori mil net org parliament school ',
+      'pa':' abo ac com edu gob ing med net nom org sld ',
+      'pt':' com edu gov int net nome org publ ',
+      'py':' com edu gov mil net org ',
+      'qa':' com edu gov mil net org ',
+      're':' asso com nom ',
+      'ru':' ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ',
+      'rw':' ac co com edu gouv gov int mil net ',
+      'sa':' com edu gov med net org pub sch ',
+      'sd':' com edu gov info med net org tv ',
+      'se':' a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ',
+      'sg':' com edu gov idn net org per ',
+      'sn':' art com edu gouv org perso univ ',
+      'sy':' com edu gov mil net news org ',
+      'th':' ac co go in mi net or ',
+      'tj':' ac biz co com edu go gov info int mil name net nic org test web ',
+      'tn':' agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ',
+      'tz':' ac co go ne or ',
+      'ua':' biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ',
+      'ug':' ac co go ne or org sc ',
+      'uk':' ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ',
+      'us':' dni fed isa kids nsn ',
+      'uy':' com edu gub mil net org ',
+      've':' co com edu gob info mil net org web ',
+      'vi':' co com k12 net org ',
+      'vn':' ac biz com edu gov health info int name net org pro ',
+      'ye':' co com gov ltd me net org plc ',
+      'yu':' ac co edu gov org ',
+      'za':' ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ',
+      'zm':' ac co com edu gov net org sch ',
+      // https://en.wikipedia.org/wiki/CentralNic#Second-level_domains
+      'com': 'ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ',
+      'net': 'gb jp se uk ',
+      'org': 'ae',
+      'de': 'com '
+    },
+    // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost
+    // in both performance and memory footprint. No initialization required.
+    // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4
+    // Following methods use lastIndexOf() rather than array.split() in order
+    // to avoid any memory allocations.
+    has: function(domain) {
+      var tldOffset = domain.lastIndexOf('.');
+      if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
+        return false;
+      }
+      var sldOffset = domain.lastIndexOf('.', tldOffset-1);
+      if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
+        return false;
+      }
+      var sldList = SLD.list[domain.slice(tldOffset+1)];
+      if (!sldList) {
+        return false;
+      }
+      return sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') >= 0;
+    },
+    is: function(domain) {
+      var tldOffset = domain.lastIndexOf('.');
+      if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
+        return false;
+      }
+      var sldOffset = domain.lastIndexOf('.', tldOffset-1);
+      if (sldOffset >= 0) {
+        return false;
+      }
+      var sldList = SLD.list[domain.slice(tldOffset+1)];
+      if (!sldList) {
+        return false;
+      }
+      return sldList.indexOf(' ' + domain.slice(0, tldOffset) + ' ') >= 0;
+    },
+    get: function(domain) {
+      var tldOffset = domain.lastIndexOf('.');
+      if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
+        return null;
+      }
+      var sldOffset = domain.lastIndexOf('.', tldOffset-1);
+      if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
+        return null;
+      }
+      var sldList = SLD.list[domain.slice(tldOffset+1)];
+      if (!sldList) {
+        return null;
+      }
+      if (sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') < 0) {
+        return null;
+      }
+      return domain.slice(sldOffset+1);
+    },
+    noConflict: function(){
+      if (root.SecondLevelDomains === this) {
+        root.SecondLevelDomains = _SecondLevelDomains;
+      }
+      return this;
+    }
+  };
+
+  return SLD;
+}));
+
+
+/***/ }),
+/* 113 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
+var backbone = (backbone || {});
+backbone.nativeview = __webpack_require__(38);
+
+/*!
+ * Backbone.VDOMView
+ *
+ * MIT Licensed. Copyright (c) 2017, JC Brand <jc@opkode.com>
+ */
+(function (root, factory) {
+    if (true) {
+        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
+            __webpack_require__(450),
+            __webpack_require__(451),
+            __webpack_require__(452),
+            __webpack_require__(453),
+            __webpack_require__(454),
+            __webpack_require__(455),
+            __webpack_require__(456),
+            __webpack_require__(46),
+            __webpack_require__(10)
+        ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+                __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+                (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+    } else {}
+}(this, function (
+        snabbdom,
+        snabbdom_attributes,
+        snabbdom_class,
+        snabbdom_dataset,
+        snabbdom_props,
+        snabbdom_style,
+        tovnode,
+        _,
+        Backbone) {
+    "use strict";
+
+    let domParser = new DOMParser();
+    const patch = snabbdom.init([
+        snabbdom_attributes.default,
+        snabbdom_class.default,
+        snabbdom_dataset.default,
+        snabbdom_props.default,
+        snabbdom_style.default
+    ]);
+
+    const View = _.isUndefined(Backbone.NativeView) ? Backbone.View : Backbone.NativeView;
+
+    function parseHTMLToDOM (html_str) {
+        /* Parses a string with HTML and returns a DOM element.
+         *
+         * Forked from vdom_parser:
+         *      https://github.com/bitinn/vdom-parser
+         */
+        if (typeof html_str !== 'string') {
+            throw new Error('Invalid parameter type in parseHTMLToDOM');
+        }
+        if ( !('DOMParser' in window) ) {
+            throw new Error(
+                'DOMParser is not available, '+
+                'so parsing string to DOM node is not possible.');
+        }
+        if (!html_str) {
+            return document.createTextNode('');
+        }
+        domParser = domParser || new DOMParser();
+        const doc = domParser.parseFromString(html_str, 'text/html');
+
+        // most tags default to body
+        if (doc.body.firstChild) {
+            return doc.getElementsByTagName('body')[0].firstChild;
+
+        // some tags, like script and style, default to head
+        } else if (doc.head.firstChild && (doc.head.firstChild.tagName !== 'TITLE' || doc.title)) {
+            return doc.head.firstChild;
+
+        // special case for html comment, cdata, doctype
+        } else if (doc.firstChild && doc.firstChild.tagName !== 'HTML') {
+            return doc.firstChild;
+
+        // other element, such as whitespace, or html/body/head tag, fallback to empty text node
+        } else {
+            return document.createTextNode('');
+        }
+    }
+
+    Backbone.VDOMView = View.extend({
+
+        updateEventListeners (old_vnode, new_vnode) {
+            this.setElement(new_vnode.elm);
+        },
+
+        render () {
+            if (_.isFunction(this.beforeRender)) {
+                this.beforeRender();
+            }
+            const new_vnode = tovnode.toVNode(parseHTMLToDOM(this.toHTML()));
+            new_vnode.data.hook = _.extend({
+               create: this.updateEventListeners.bind(this),
+               update: this.updateEventListeners.bind(this)
+            });
+            const el = this.vnode ? this.vnode.elm : this.el;
+            if (el.outerHTML !== new_vnode.elm.outerHTML) {
+                this.vnode = patch(this.vnode || this.el, new_vnode);
+            }
+            if (_.isFunction(this.afterRender)) {
+                this.afterRender();
+            }
+            return this;
+        }
+    });
+    return Backbone.VDOMView;
+}));
+
+
+
+/***/ }),
+/* 114 */
+/***/ (function(module, exports, __webpack_require__) {
+
+!function(e,t){ true?module.exports=t():undefined}(this,function(){"use strict";return function(e,t,r){var n=t.prototype,o=n.format;r.en.ordinal=function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},n.format=function(e){var t=this,r=this.$locale(),n=this.$utils(),i=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|gggg|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"wo":return r.ordinal(t.week(),"W");case"k":case"kk":return n.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();default:return e}});return o.bind(this)(i)}}});
+
+
+/***/ }),
+/* 115 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseSlice = __webpack_require__(333),
+    toInteger = __webpack_require__(47);
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function drop(array, n, guard) {
+  var length = array == null ? 0 : array.length;
+  if (!length) {
+    return [];
+  }
+  n = (guard || n === undefined) ? 1 : toInteger(n);
+  return baseSlice(array, n < 0 ? 0 : n, length);
+}
+
+module.exports = drop;
+
+
+/***/ }),
+/* 116 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetTag = __webpack_require__(15),
+    isObjectLike = __webpack_require__(11);
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]';
+
+/**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+function isBoolean(value) {
+  return value === true || value === false ||
+    (isObjectLike(value) && baseGetTag(value) == boolTag);
+}
+
+module.exports = isBoolean;
+
+
+/***/ }),
+/* 117 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+function isNil(value) {
+  return value == null;
+}
+
+module.exports = isNil;
+
+
+/***/ }),
+/* 118 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayMap = __webpack_require__(50),
+    baseIteratee = __webpack_require__(386),
+    basePickBy = __webpack_require__(439),
+    getAllKeysIn = __webpack_require__(441);
+
+/**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+function pickBy(object, predicate) {
+  if (object == null) {
+    return {};
+  }
+  var props = arrayMap(getAllKeysIn(object), function(prop) {
+    return [prop];
+  });
+  predicate = baseIteratee(predicate);
+  return basePickBy(object, props, function(value, path) {
+    return predicate(value, path[0]);
+  });
+}
+
+module.exports = pickBy;
+
+
+/***/ }),
+/* 119 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseKeys = __webpack_require__(73),
+    getTag = __webpack_require__(105),
+    isArrayLike = __webpack_require__(18),
+    isString = __webpack_require__(85),
+    stringSize = __webpack_require__(444);
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+    setTag = '[object Set]';
+
+/**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+function size(collection) {
+  if (collection == null) {
+    return 0;
+  }
+  if (isArrayLike(collection)) {
+    return isString(collection) ? stringSize(collection) : collection.length;
+  }
+  var tag = getTag(collection);
+  if (tag == mapTag || tag == setTag) {
+    return collection.size;
+  }
+  return baseKeys(collection).length;
+}
+
+module.exports = size;
+
+
+/***/ }),
+/* 120 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/headless/templates/field.html -->\n<field var="' +
+__e(o.name) +
+'">\n';
+ if (o.value.constructor === Array) { ;
+__p += '\n    ';
+ o.value.forEach(function (arrayValue) { ;
+__p += '<value>' +
+__e(arrayValue) +
+'</value>';
+ }); ;
+__p += '\n';
+ } else { ;
+__p += '\n    <value>' +
+__e(o.value) +
+'</value>\n';
+ } ;
+__p += '</field>\n';
+return __p
+};
+
+/***/ }),
+/* 121 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/avatar.svg -->\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="' +
+__e(o.classes) +
+'" width="' +
+__e(o.width) +
+'" height="' +
+__e(o.height) +
+'">\n    <image width="' +
+__e(o.width) +
+'" height="' +
+__e(o.height) +
+'" preserveAspectRatio="xMidYMid meet" xlink:href="' +
+__e(o.image) +
+'"/>\n</svg>\n';
+return __p
+};
+
+/***/ }),
+/* 122 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '';
+__p += '<!-- src/templates/background_logo.html -->\n<div class="inner-content converse-brand row">\n    <div class="converse-brand__padding"></div>\n    <div class="converse-brand__heading">\n        <svg height="200px"\n            xmlns="http://www.w3.org/2000/svg"\n            xmlns:xlink="http://www.w3.org/1999/xlink"\n            viewBox="0 0 364 364"\n            version="1.1">\n            <title>Logo Converse</title>\n            <defs>\n                <linearGradient id="gradient" x1="92.14" y1="27.64" x2="267.65" y2="331.62" gradientUnits="userSpaceOnUse">\n                    <stop offset="0" stop-color="#fff1d1"/>\n                    <stop offset="0.05" stop-color="#fae8c1"/>\n                    <stop offset="0.15" stop-color="#f0d5a1"/>\n                    <stop offset="0.27" stop-color="#e7c687"/>\n                    <stop offset="0.4" stop-color="#e1bb72"/>\n                    <stop offset="0.54" stop-color="#dcb264"/>\n                    <stop offset="0.71" stop-color="#daad5c"/>\n                    <stop offset="1" stop-color="#d9ac59"/>\n                </linearGradient>\n                <filter id="shadow">\n                    <feGaussianBlur in="SourceAlpha" stdDeviation="2.3" result="blur1"/>\n                    <feOffset in="blur1" dx="3" dy="3" result="blur2"/>\n                    <feColorMatrix in="blur2" type="matrix" result="blur3"\n                        values="1 0 0 0 0.1\n                                0 1 0 0 0.1\n                                0 0 1 0 0.1\n                                0 0 0 1 0"/>\n                    <feMerge>\n                        <feMergeNode in="blur3"/>\n                        <feMergeNode in="SourceGraphic"/>\n                    </feMerge>\n                </filter>\n            </defs>\n            <g filter="url(#shadow)">\n                <path d="M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z" fill="#d9ac59"/>\n                <path d="M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z" fill="url(#gradient)"/>\n            </g>\n        </svg>\n        <span class="converse-brand__text">\n            <span>converse<span class="subdued">.js</span></span>\n            <p class="byline">messaging freedom</p>\n        </span>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 123 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/audio.html -->\n<audio controls src="' +
+__e(o.url) +
+'"></audio>\n<a target="_blank" rel="noopener" href="' +
+__e(o.url) +
+'">' +
+__e(o.label_download) +
+'</a>\n';
+return __p
+};
+
+/***/ }),
+/* 124 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/file.html -->\n<a target="_blank" rel="noopener" href="' +
+__e(o.url) +
+'">' +
+__e(o.label_download) +
+'</a>\n';
+return __p
+};
+
+/***/ }),
+/* 125 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/form_captcha.html -->\n';
+ if (o.label) { ;
+__p += '\n<label>\n    ' +
+__e(o.label) +
+'\n</label>\n';
+ } ;
+__p += '\n<img src="data:' +
+__e(o.type) +
+';base64,' +
+__e(o.data) +
+'">\n<input name="' +
+__e(o.name) +
+'" type="text" ';
+ if (o.required) { ;
+__p += ' required="required" ';
+ } ;
+__p += ' />\n\n\n';
+return __p
+};
+
+/***/ }),
+/* 126 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/form_checkbox.html -->\n<div class="form-group">\n    <input id="' +
+__e(o.id) +
+'" name="' +
+__e(o.name) +
+'" type="checkbox" ' +
+__e(o.checked) +
+' ';
+ if (o.required) { ;
+__p += ' required ';
+ } ;
+__p += ' />\n    <label class="form-check-label" for="' +
+__e(o.id) +
+'">' +
+__e(o.label) +
+'</label>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 127 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/form_select.html -->\n<div class="form-group">\n    <label for="' +
+__e(o.id) +
+'">' +
+__e(o.label) +
+'</label>\n    <select class="form-control" id="' +
+__e(o.id) +
+'" name="' +
+__e(o.name) +
+'" ';
+ if (o.multiple) { ;
+__p += ' multiple="multiple" ';
+ } ;
+__p += '>' +
+((__t = (o.options)) == null ? '' : __t) +
+'</select>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 128 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/form_textarea.html -->\n<label class="label-ta">' +
+__e(o.label) +
+'</label>\n<textarea name="' +
+__e(o.name) +
+'">' +
+__e(o.value) +
+'</textarea>\n';
+return __p
+};
+
+/***/ }),
+/* 129 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/form_url.html -->\n<label>\n    ' +
+__e(o.label) +
+'\n    <a class="form-url" target="_blank" rel="noopener" href="' +
+__e(o.value) +
+'">' +
+__e(o.value) +
+'</a>\n</label>\n';
+return __p
+};
+
+/***/ }),
+/* 130 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/select_option.html -->\n<option value="' +
+__e(o.value) +
+'" ';
+ if (o.selected) { ;
+__p += ' selected="selected" ';
+ } ;
+__p += ' >' +
+__e(o.label) +
+'</option>\n';
+return __p
+};
+
+/***/ }),
+/* 131 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/video.html -->\n<video controls preload="metadata" src="' +
+__e(o.url) +
+'" style="max-height: 50vh"></video>\n';
+return __p
+};
+
+/***/ }),
+/* 132 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/csn.html -->\n<div class="message chat-info chat-state-notification"\n     data-isodate="' +
+__e(o.isodate) +
+'"\n     data-csn="' +
+__e(o.from) +
+'">' +
+__e(o.message) +
+'</div>\n';
+return __p
+};
+
+/***/ }),
+/* 133 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/file_progress.html -->\n<div class="message chat-msg" data-isodate="' +
+__e(o.time) +
+'" data-msgid="' +
+__e(o.msgid) +
+'">\n    <canvas class="avatar chat-msg__avatar" height="36" width="36"></canvas>\n    <div class="chat-msg__content">\n        <span class="chat-msg__text">' +
+__e(o.__('Uploading file:')) +
+' <strong>' +
+__e(o.filename) +
+'</strong>, ' +
+__e(o.filesize) +
+'</span>\n        <progress value="' +
+__e(o.progress) +
+'"/>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 134 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/message.html -->\n<div class="message chat-msg ' +
+__e(o.type) +
+' ' +
+__e(o.extra_classes) +
+' ';
+ if (o.is_me_message) { ;
+__p += ' chat-msg--action ';
+ } ;
+__p += '"\n        data-isodate="' +
+__e(o.time) +
+'" data-msgid="' +
+__e(o.msgid) +
+'" data-from="' +
+__e(o.from) +
+'" data-encrypted="' +
+__e(o.is_encrypted) +
+'">\n    ';
+ if (o.type !== 'headline' && !o.is_me_message) { ;
+__p += '\n    <canvas class="avatar chat-msg__avatar" height="36" width="36"></canvas>\n    ';
+ } ;
+__p += '\n    <div class="chat-msg__content chat-msg__content--' +
+__e(o.sender) +
+' ' +
+__e(o.is_me_message ? 'chat-msg__content--action' : '') +
+'">\n        ';
+__p += '<span class="chat-msg__heading">\n            ';
+ if (o.is_me_message) { ;
+__p += '<time timestamp="' +
+__e(o.isodate) +
+'" class="chat-msg__time">' +
+__e(o.pretty_time) +
+'</time>';
+ } ;
+__p += '\n            <span class="chat-msg__author">';
+ if (o.is_me_message) { ;
+__p += '**';
+ }; ;
+__p +=
+__e(o.username) +
+'</span>\n            ';
+ if (!o.is_me_message) { ;
+__p += '\n                ';
+o.roles.forEach(function (role) { ;
+__p += ' <span class="badge badge-secondary">' +
+__e(role) +
+'</span> ';
+ }); ;
+__p += '\n                <time timestamp="' +
+__e(o.isodate) +
+'" class="chat-msg__time">' +
+__e(o.pretty_time) +
+'</time>\n            ';
+ } ;
+__p += '\n            ';
+ if (o.is_encrypted) { ;
+__p += '<span class="fa fa-lock"></span>';
+ } ;
+__p += '\n        </span>\n        <div class="chat-msg__body chat-msg__body--' +
+__e(o.type) +
+' ' +
+__e(o.received ? 'chat-msg__body--received' : '' ) +
+' ' +
+__e(o.is_delayed ? 'chat-msg__body--delayed' : '' ) +
+'">\n            <div class="chat-msg__message">\n                ';
+ if (o.is_retracted) { ;
+__p += '\n                    <div>' +
+__e(o.retraction_text) +
+'</div>\n                    ';
+ if (o.moderation_reason) { ;
+__p += '<q class="chat-msg--retracted__reason">' +
+__e(o.moderation_reason) +
+'</q>';
+ } ;
+__p += '\n                ';
+ } else { ;
+__p += '\n                    ';
+ if (o.is_spoiler) { ;
+__p += '\n                        <div class="chat-msg__spoiler-hint">\n                            <span class="spoiler-hint">' +
+__e(o.spoiler_hint) +
+'</span>\n                            <a class="badge badge-info spoiler-toggle" data-toggle-state="closed" href="#"><i class="fa fa-eye"></i>' +
+__e(o.label_show) +
+'</a>\n                        </div>\n                    ';
+ } ;
+__p += '\n\n                    ';
+ if (o.subject) { ;
+__p += '\n                        <div class="chat-msg__subject">' +
+__e( o.subject ) +
+'</div>\n                    ';
+ } ;
+ if (o.first_unread) { // BAO issue #119 (converse - #1999)
+__p += '<div class="message unread-separator date-separator"><hr class="separator"><span class="separator-text">' + __e(o.__('unread messages')) + '</span></div>\n';
+ };
+__p += '\n                    <div class="chat-msg__text\n                        ';
+ if (o.is_only_emojis) { ;
+__p += ' chat-msg__text--larger';
+ } ;
+__p += '\n                        ';
+ if (o.is_spoiler) { ;
+__p += ' spoiler collapsed';
+ } ;
+__p += '"><!-- message gets added here via renderMessage --></div>\n                    <div class="chat-msg__media"></div>\n                ';
+// BAO issue #9
+__p += '<div class="chat-msg__reactions"></div>\n';
+ } ;
+__p += '\n            </div>\n            ';
+ if (o.received && !o.is_me_message && !o.is_groupchat_message) { ;
+__p += ' <span class="fa fa-check chat-msg__receipt"></span> ';
+ } ;
+__p += '\n            ';
+ if (o.edited) { ;
+__p += ' <i title="' +
+__e(o.__('This message has been edited')) +
+'" class="fa fa-edit chat-msg__edit-modal"></i> ';
+ } ;
+__p += '\n            <div class="chat-msg__actions">\n                ';
+ if (o.editable) { ;
+__p += '\n                    <button class="chat-msg__action chat-msg__action-edit fa fa-pencil-alt" title="' +
+__e(o.__('Edit this message')) +
+'"></button>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.retractable) { ;
+__p += '\n                    <button class="chat-msg__action chat-msg__action-retract fa fa-trash-alt" title="' +
+__e(o.__('Retract this message')) +
+'"></button>\n                ';
+ } ;
+// BAO issue #9
+__p += '\n                    <button class="chat-msg__action chat-msg__action-react fa fa-smile" title="' +
+__e(o.__('React to this message')) +
+'"></button>\n                ';
+__p += '\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 135 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/message_versions_modal.html -->\n<div class="modal" id="message-versions-modal" tabindex="-1" role="dialog" aria-labelledby="message-versions-modal-label" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h4 class="modal-title" id="message-versions-modal-label">' +
+__e(o.__('Message versions')) +
+'</h4>\n                <button type="button" class="close" data-dismiss="modal" aria-label="' +
+__e(o.label_close) +
+'"><span aria-hidden="true">×</span></button>\n            </div>\n            <div class="modal-body">\n                <h4>Older versions</h4>\n                ';
+Object.keys(o.older_versions).forEach(function (k) { ;
+__p += ' <p class="older-msg"><time>' +
+__e(o.dayjs(k).format('MMM D, YYYY, HH:mm:ss')) +
+'</time>: ' +
+__e(o.older_versions[k]) +
+'</p> ';
+ }); ;
+__p += '\n                <hr/>\n                <h4>Current version</h4>\n                <p>' +
+__e(o.message) +
+'</p>\n            </div>\n            <div class="modal-footer">\n                <button type="button" class="btn btn-secondary" data-dismiss="modal">' +
+__e(o.__('Close')) +
+'</button>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 136 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/alert.html -->\n<div class="alert ' +
+__e(o.type) +
+'" role="alert"><p>' +
+__e(o.message) +
+'</p></div>\n';
+return __p
+};
+
+/***/ }),
+/* 137 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/alert_modal.html -->\n<div class="modal" tabindex="-1" role="dialog">\n  <div class="modal-dialog" role="document">\n    <div class="modal-content">\n      <div class="modal-header ' +
+__e(o.level) +
+'">\n        <h5 class="modal-title">' +
+__e(o.title) +
+'</h5>\n        <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n          <span aria-hidden="true">×</span>\n        </button>\n      </div>\n      <div class="modal-body">';
+o.messages.forEach(function (message) { ;
+__p += '\n          <p>' +
+__e(message) +
+'</p>\n      ';
+ }) ;
+__p += '\n      </div>\n    </div>\n  </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 138 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatbox_head.html -->\n<div class="chat-head chat-head-chatbox row no-gutters">\n    ';
+ if (!o._converse.singleton) { ;
+__p += '\n        <div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>\n    ';
+ } ;
+__p += '\n    <div class="chatbox-title">\n        <div class="row no-gutters">\n            ';
+ if (o.type !== o._converse.HEADLINES_TYPE) { ;
+__p += '\n                <canvas class="avatar" height="36" width="36"></canvas>\n            ';
+ } ;
+__p += '\n            <div class="col chat-title" title="' +
+__e(o.jid) +
+'">\n                ';
+ if (o.url) { ;
+__p += '\n                    <a href="' +
+__e(o.url) +
+'" target="_blank" rel="noopener" class="user">\n                ';
+ } ;
+__p += '\n                        ' +
+__e( o.display_name ) +
+'\n                ';
+ if (o.url) { ;
+__p += '\n                    </a>\n                ';
+ } ;
+__p += '\n                <p class="user-custom-message">' +
+__e( o.status ) +
+'</p>\n            </div>\n        </div>\n    </div>\n    <div class="chatbox-buttons row no-gutters">\n        <a class="chatbox-btn close-chatbox-button fa fa-times" title="' +
+__e(o.info_close) +
+'"></a>\n        <a class="chatbox-btn show-user-details-modal fa fa-id-card" title="' +
+__e(o.info_details) +
+'"></a>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 139 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatbox_message_form.html -->\n<div class="new-msgs-indicator hidden">â–¼ ' +
+__e( o.unread_msgs ) +
+' â–¼</div>\n<form class="setNicknameButtonForm hidden">\n    <input type="submit" class="btn btn-primary" name="join" value="Join"/>\n</form>\n<form class="sendXMPPMessage">\n    ';
+ if (o.show_toolbar) { ;
+__p += '\n        <ul class="chat-toolbar no-text-select"></ul>\n    ';
+ } ;
+__p += '\n    <input type="text" placeholder="' +
+((__t = (o.label_spoiler_hint)) == null ? '' : __t) +
+'" value="' +
+((__t = ( o.hint_value )) == null ? '' : __t) +
+'"\n           class="';
+ if (!o.composing_spoiler) { ;
+__p += ' hidden ';
+ } ;
+__p += ' spoiler-hint"/>\n\n    <div class="suggestion-box">\n        <ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>\n        <textarea\n            type="text"\n            class="chat-textarea suggestion-box__input\n                ';
+ if (o.show_send_button) { ;
+__p += ' chat-textarea-send-button ';
+ } ;
+__p += '\n                ';
+ if (o.composing_spoiler) { ;
+__p += ' spoiler ';
+ } ;
+__p += '"\n            placeholder="' +
+__e(o.label_message) +
+'">' +
+((__t = ( o.message_value )) == null ? '' : __t) +
+'</textarea>\n        <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n\n        ';
+ if (o.show_send_button) { ;
+__p += '\n            <button type="submit" class="pure-button send-button">' +
+__e( o.label_send ) +
+'</button>\n        ';
+ } ;
+__p += '\n    </div>\n</form>\n';
+return __p
+};
+
+/***/ }),
+/* 140 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/error_message.html -->\n<div class="message chat-info chat-error" data-isodate="' +
+__e(o.isodate) +
+'">' +
+__e(o.message) +
+'</div>\n';
+return __p
+};
+
+/***/ }),
+/* 141 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/help_message.html -->\n<div class="message chat-info ';
+ if (o.type !== 'info') { ;
+__p += ' chat-' +
+__e(o.type) +
+' ';
+ } ;
+__p += '" data-isodate="' +
+__e(o.isodate) +
+'">' +
+((__t = (o.message)) == null ? '' : __t) +
+'</div>\n';
+return __p
+};
+
+/***/ }),
+/* 142 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/new_day.html -->\n<div class="message date-separator" data-isodate="' +
+__e(o.isodate) +
+'">\n    <hr class="separator"/>\n    <time class="separator-text" datetime="' +
+__e(o.isodate) +
+'"><span>' +
+__e(o.datestring) +
+'</span></time>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 143 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/spoiler_button.html -->\n<li class="toggle-compose-spoiler fa ';
+ if (o.composing_spoiler)  { ;
+__p += ' fa-eye-slash ';
+ } ;
+__p += ' ';
+ if (!o.composing_spoiler)  { ;
+__p += ' fa-eye ';
+ } ;
+__p += '"\n    title="' +
+((__t = ( o.label_toggle_spoiler )) == null ? '' : __t) +
+'">\n</li>\n';
+return __p
+};
+
+/***/ }),
+/* 144 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/status_message.html -->\n<div class="message chat-info chat-status"\n     data-isodate="' +
+__e(o.isodate) +
+'"\n     data-status="' +
+__e(o.from) +
+'">' +
+__e(o.message) +
+'</div>\n';
+return __p
+};
+
+/***/ }),
+/* 145 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/toolbar.html -->\n';
+ if (o.show_call_button)  { ;
+__p += '\n<li class="toggle-call fa fa-phone" title="' +
+__e(o.label_start_call) +
+'"></li>\n';
+ } ;
+__p += '\n';
+ if (o.show_occupants_toggle)  { ;
+__p += '\n<li class="toggle-occupants float-right fa ';
+ if (o.hidden_occupants)  { ;
+__p += ' fa-angle-double-left ';
+ } else { ;
+__p += ' fa-angle-double-right ';
+ } ;
+__p += '"\n    title="' +
+__e(o.label_hide_occupants) +
+'"></li>\n';
+ } ;
+__p += '\n';
+ if (o.message_limit)  { ;
+__p += '\n<li class="message-limit font-weight-bold float-right" title="' +
+__e(o.label_message_limit) +
+'">' +
+__e(o.message_limit) +
+'</li>\n';
+ } ;
+__p += '\n';
+return __p
+};
+
+/***/ }),
+/* 146 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/toolbar_fileupload.html -->\n<li class="upload-file">\n    <a class="fa fa-paperclip" title="' +
+__e(o.tooltip_upload_file) +
+'"></a>\n    <input type="file" class="fileupload" multiple="" style="display:none"/>\n</li> \n';
+return __p
+};
+
+/***/ }),
+/* 147 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/user_details_modal.html -->\n<div class="modal" id="user-details-modal" tabindex="-1" role="dialog" aria-labelledby="user-details-modal-label" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="user-details-modal-label">' +
+__e(o.display_name) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="' +
+__e(o.__('Close')) +
+'"><span aria-hidden="true">×</span></button>\n            </div>\n            <div class="modal-body">\n                ';
+ if (o.image) { ;
+__p += '\n                <img alt="' +
+__e(o.__('The User\'s Profile Image')) +
+'"\n                    class="img-thumbnail avatar align-self-center mb-3"\n                    height="100" width="100" src="data:' +
+__e(o.image_type) +
+';base64,' +
+__e(o.image) +
+'"/>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.fullname) { ;
+__p += '\n                <p><label>' +
+__e(o.__('Full Name:')) +
+'</label> ' +
+__e(o.fullname) +
+'</p>\n                ';
+ } ;
+__p += '\n                <p><label>' +
+__e(o.__('XMPP Address:')) +
+'</label> <a href="xmpp:' +
+__e(o.jid) +
+'">' +
+__e(o.jid) +
+'</a></p>\n                ';
+ if (o.nickname) { ;
+__p += '\n                <p><label>' +
+__e(o.__('Nickname:')) +
+'</label> ' +
+__e(o.nickname) +
+'</p>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.url) { ;
+__p += '\n                <p><label>' +
+__e(o.__('URL:')) +
+'</label> <a target="_blank" rel="noopener" href="' +
+__e(o.url) +
+'">' +
+__e(o.url) +
+'</a></p>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.email) { ;
+__p += '\n                <p><label>' +
+__e(o.__('Email:')) +
+'</label> <a href="mailto:' +
+__e(o.email) +
+'">' +
+__e(o.email) +
+'</a></p>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.role) { ;
+__p += '\n                <p><label>' +
+__e(o.__('Role:')) +
+'</label> ' +
+__e(o.role) +
+'</p>\n                ';
+ } ;
+__p += '\n\n                ';
+ if (o._converse.pluggable.plugins['converse-omemo'].enabled(o._converse)) { ;
+__p += '\n                    <hr/>\n                    <ul class="list-group fingerprints">\n                        <li class="list-group-item active">' +
+__e(o.__('OMEMO Fingerprints')) +
+'</li>\n                        ';
+ if (!o.view.devicelist.devices) { ;
+__p += '\n                            <li class="list-group-item"><span class="spinner fa fa-spinner centered"/></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.view.devicelist.devices) { ;
+__p += '\n                            ';
+ o.view.devicelist.devices.each(function (device) { ;
+__p += '\n                                ';
+ if (device.get('bundle') && device.get('bundle').fingerprint) { ;
+__p += '\n                                <li class="list-group-item">\n                                    <form class="fingerprint-trust">\n                                    <div class="btn-group btn-group-toggle">\n                                        <label class="btn btn--small ';
+ if (device.get('trusted') !== -1) { ;
+__p += ' btn-primary active ';
+ } else { ;
+__p += '  btn-secondary ';
+ } ;
+__p += '">\n                                            <input type="radio" name="' +
+__e(device.get('id')) +
+'" value="1"\n                                                ';
+ if (device.get('trusted') !== -1) { ;
+__p += ' checked="checked" ';
+ } ;
+__p += '/>' +
+__e(o.__('Trusted')) +
+'\n                                        </label>\n                                        <label class="btn btn--small ';
+ if (device.get('trusted') === -1) { ;
+__p += ' btn-primary active ';
+ } else { ;
+__p += ' btn-secondary ';
+ } ;
+__p += '">\n                                            <input type="radio" name="' +
+__e(device.get('id')) +
+'" value="-1"\n                                                ';
+ if (device.get('trusted') === -1) { ;
+__p += ' checked="checked" ';
+ } ;
+__p += '/>' +
+__e(o.__('Untrusted')) +
+'\n                                        </label>\n                                    </div>\n                                    <span class="fingerprint">' +
+__e(o.utils.formatFingerprint(device.get('bundle').fingerprint)) +
+'</span>\n                                    </form>\n                                </li>\n                                ';
+ } ;
+__p += '\n                            ';
+ }); ;
+__p += '\n                        ';
+ } ;
+__p += '\n                    </ul>\n                ';
+ } ;
+__p += '\n            </div>\n            <div class="modal-footer">\n                <button type="button" class="btn btn-warning" data-dismiss="modal">' +
+__e(o.__('Close')) +
+'</button>\n                <button type="button" class="btn btn-info refresh-contact"><i class="fa fa-refresh"> </i>' +
+__e(o.__('Refresh')) +
+'</button>\n                ';
+ if (o.allow_contact_removal && o.is_roster_contact) { ;
+__p += '\n                    <button type="button" class="btn btn-danger remove-contact"><i class="far fa-trash-alt"> </i>' +
+__e(o.__('Remove as contact')) +
+'</button>\n                ';
+ } ;
+__p += '\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 148 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/headless/templates/vcard.html -->\n<vCard xmlns="vcard-temp">\n    <FN>' +
+__e(o.fn) +
+'</FN>\n    <NICKNAME>' +
+__e(o.nickname) +
+'</NICKNAME>\n    <URL>' +
+__e(o.url) +
+'</URL>\n    <ROLE>' +
+__e(o.role) +
+'</ROLE>\n    <EMAIL><INTERNET/><PREF/><USERID>' +
+__e(o.email) +
+'</USERID></EMAIL>\n    <PHOTO>\n      <TYPE>' +
+__e(o.image_type) +
+'</TYPE>\n      <BINVAL>' +
+__e(o.image) +
+'</BINVAL>\n    </PHOTO>\n</vCard>\n';
+return __p
+};
+
+/***/ }),
+/* 149 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/bookmarks_list.html -->\n<div class="list-container list-container--bookmarks ' +
+__e( !o.hidden && 'hidden' || '' ) +
+'">\n    <a href="#" class="list-toggle bookmarks-toggle controlbox-padded" title="' +
+__e(o.desc_bookmarks) +
+'">\n        <span class="fa ';
+ if (o.toggle_state === o._converse.OPENED) { ;
+__p += ' fa-caret-down ';
+ } else { ;
+__p += ' fa-caret-right ';
+ } ;
+__p += '">\n        </span> ' +
+__e(o.label_bookmarks) +
+'</a>\n\n    <div class="items-list bookmarks rooms-list ';
+ if (o.toggle_state !== o._converse.OPENED) { ;
+__p += ' hidden ';
+ } ;
+__p += '">\n    ';
+o.bookmarks.forEach(function (bm) { ;
+__p += '\n        <div class="list-item controlbox-padded room-item available-chatroom d-flex flex-row ';
+ if (o.is_bookmark_hidden(bm)) { ;
+__p += ' hidden ';
+ } ;
+__p += '" data-room-jid="' +
+__e(bm.get('jid')) +
+'">\n            <a class="list-item-link open-room w-100" data-room-jid="' +
+__e(bm.get('jid')) +
+'" title="' +
+__e(o.open_title) +
+'" href="#">' +
+__e(bm.getDisplayName()) +
+'</a>\n            <a class="list-item-action remove-bookmark fa fa-bookmark align-self-center ';
+ if (bm.get('bookmarked')) { ;
+__p += ' button-on ';
+ } ;
+__p += '"\n                data-room-jid="' +
+__e(bm.get('jid')) +
+'" data-bookmark-name="' +
+__e(bm.getDisplayName()) +
+'"\n                title="' +
+__e(o.info_remove_bookmark) +
+'" href="#"></a>\n        </div>\n    ';
+ }) ;
+__p += '\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 150 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/chatroom_bookmark_form.html -->\n<div class="chatroom-form-container muc-bookmark-form">\n    <form class="converse-form chatroom-form">\n        <legend>' +
+__e(o.heading) +
+'</legend>\n        <fieldset class="form-group">\n            <label for="converse_muc_bookmark_name">' +
+__e(o.label_name) +
+'</label>\n            <input class="form-control" type="text" value="' +
+__e(o.name) +
+'" name="name" required="required" id="converse_muc_bookmark_name"/>\n        </fieldset>\n        <fieldset class="form-group">\n            <label for="converse_muc_bookmark_nick">' +
+__e(o.label_nick) +
+'</label>\n            <input class="form-control" type="text" name="nick" value="' +
+__e(o.default_nick) +
+'" id="converse_muc_bookmark_nick"/>\n        </fieldset>\n        <fieldset class="form-group form-check">\n            <input class="form-check-input" id="converse_muc_bookmark_autojoin" type="checkbox" name="autojoin"/>\n            <label class="form-check-label" for="converse_muc_bookmark_autojoin">' +
+__e(o.label_autojoin) +
+'</label>\n        </fieldset>\n        <fieldset class="form-group">\n            <input class="btn btn-primary" type="submit" value="' +
+__e(o.label_submit) +
+'"/>\n            <input class="btn btn-secondary button-cancel" type="button" value="' +
+__e(o.label_cancel) +
+'"/>\n        </fieldset>\n    </form>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 151 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_bookmark_toggle.html -->\n<a class="chatbox-btn toggle-bookmark fa fa-bookmark\n   ';
+ if (o.bookmarked) {;
+__p += ' button-on ';
+ } ;
+__p += '" title="' +
+__e(o.info_toggle_bookmark) +
+'"></a>\n';
+return __p
+};
+
+/***/ }),
+/* 152 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '';
+__p += '<!-- src/templates/converse_brand_heading.html -->\n<span class="brand-heading-container">\n    <a class="brand-heading" href="https://conversejs.org" target="_blank" rel="noopener">\n        <svg class="converse-svg-logo"\n            xmlns:svg="http://www.w3.org/2000/svg"\n            xmlns="http://www.w3.org/2000/svg"\n            xmlns:xlink="http://www.w3.org/1999/xlink"\n            viewBox="0 0 364 364">\n            <title>Converse</title>\n            <g class="cls-1" id="g904">\n                <g data-name="Layer 2">\n                    <g data-name="Layer 7">\n                        <path\n                            class="cls-3"\n                            d="M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z" />\n                        <path\n                            class="cls-4"\n                            d="M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z" />\n                    </g>\n                </g>\n            </g>\n        </svg>\n        <span class="brand-name">\n            <span class="brand-name__text">converse<span class="subdued">.js</span></span>\n        </span>\n    </a>\n</span>\n';
+return __p
+};
+
+/***/ }),
+/* 153 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/controlbox.html -->\n<div class="flyout box-flyout">\n    <div class="chat-head controlbox-head">\n        ';
+ if (!o.sticky_controlbox) { ;
+__p += '\n            <a class="chatbox-btn close-chatbox-button fa fa-times"></a>\n        ';
+ } ;
+__p += '\n    </div>\n    <div class="controlbox-panes"></div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 154 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/controlbox_toggle.html -->\n<span class="toggle-feedback">' +
+__e(o.label_toggle) +
+'</span>\n';
+return __p
+};
+
+/***/ }),
+/* 155 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/login_panel.html -->\n<div id="converse-login-panel" class="controlbox-pane fade-in row no-gutters">\n    <form id="converse-login" class="converse-form" method="post">\n        <div class="conn-feedback fade-in ';
+ if (!o.conn_feedback_subject) { ;
+__p += ' hidden ';
+ } ;
+__p += ' ' +
+__e(o.conn_feedback_class) +
+'">\n            <p class="feedback-subject">' +
+__e( o.conn_feedback_subject ) +
+'</p>\n            <p class="feedback-message ';
+ if (!o.conn_feedback_message) { ;
+__p += ' hidden ';
+ } ;
+__p += '">' +
+__e(o.conn_feedback_message) +
+'</p>\n        </div>\n        ';
+ if (o._converse.CONNECTION_STATUS[o.connection_status] === 'CONNECTING') { ;
+__p += '\n            <span class="spinner fa fa-spinner centered"/>\n        ';
+ } else { ;
+__p += '\n            ';
+ if (o.authentication == o.LOGIN || o.authentication == o.EXTERNAL) { ;
+__p += '\n                <div class="form-group">\n                    <label for="converse-login-jid">' +
+__e(o.__("XMPP Address:")) +
+'</label>\n                    <input id="converse-login-jid" class="form-control" required="required" type="text" name="jid" placeholder="' +
+__e(o.placeholder_username) +
+'"/>\n                </div>\n                ';
+ if (o.authentication !== o.EXTERNAL) { ;
+__p += '\n                <div class="form-group">\n                    <label for="converse-login-password">' +
+__e(o.__("Password:")) +
+'</label>\n                    <input id="converse-login-password" class="form-control" required="required" type="password" name="password" placeholder="' +
+__e(o.__('password')) +
+'"/>\n                </div>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.show_trust_checkbox) { ;
+__p += '\n                    <div class="form-group form-check login-trusted">\n                        <input id="converse-login-trusted" type="checkbox" class="form-check-input" name="trusted" ';
+ if (o._converse.config.get('trusted')) { ;
+__p += ' checked="checked" ';
+ } ;
+__p += '/>\n                        <label for="converse-login-trusted" class="form-check-label login-trusted__desc">' +
+__e(o.__('This is a trusted device')) +
+'</label>\n                        <i class="fa fa-info-circle" data-toggle="popover"\n                           data-title="Trusted device?"\n                           data-content="' +
+__e(o.__('To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It\'s important that you explicitly log out, otherwise not all cached data might be deleted. Please note, when using an untrusted device, OMEMO encryption is NOT available.')) +
+'"></i>\n                    </div>\n                ';
+ } ;
+__p += '\n\n                <fieldset class="buttons">\n                    <input class="btn btn-primary" type="submit" value="' +
+__e(o.__('Log in')) +
+'"/>\n                </fieldset>\n            ';
+ } ;
+__p += '\n            ';
+ if (o.authentication == o.ANONYMOUS) { ;
+__p += '\n                <input class="btn btn-primary login-anon" type="submit" value="' +
+__e(o.__('Click here to log in anonymously')) +
+'"/>\n            ';
+ } ;
+__p += '\n            ';
+ if (o.authentication == o.PREBIND) { ;
+__p += '\n                <p>Disconnected.</p>\n            ';
+ } ;
+__p += '\n        ';
+ } ;
+__p += '\n    </form>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 156 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '';
+__p += '<!-- src/templates/dragresize.html -->\n<div class="dragresize dragresize-top"></div>\n<div class="dragresize dragresize-topleft"></div>\n<div class="dragresize dragresize-left"></div>\n';
+return __p
+};
+
+/***/ }),
+/* 157 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/emoji_button.html -->\n<li class="toggle-toolbar-menu toggle-smiley__container">\n    <a class="toggle-smiley far fa-smile"\n       title="' +
+__e(o.tooltip_insert_smiley) +
+'"\n       data-toggle="dropdown"\n       aria-haspopup="true"\n       aria-expanded="false"></a>\n</li>\n';
+return __p
+};
+
+/***/ }),
+/* 158 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/emojis.html -->\n<div class="emoji-picker dropdown-menu toolbar-menu">\n    <div class="emoji-picker__header">\n        <input class="form-control emoji-search" name="emoji-search" placeholder="' +
+__e(o.__('Search')) +
+'"/>\n        ';
+ if (!o.query) { ;
+__p += '\n        <ul>\n            ';
+ Object.keys(o.emoji_categories).forEach(function (category) { ;
+__p += '\n                ';
+ if (o.emoji_categories[category]) { ;
+__p += '\n                <li data-category="' +
+__e(category) +
+'" class="emoji-category ' +
+__e(o.current_category) +
+' ' +
+__e( category) +
+' ';
+ if (o.current_category === category) { ;
+__p += ' picked ';
+ } ;
+__p += '"\n                    title="' +
+__e( o.__(o._converse.emoji_category_labels[category]) ) +
+'">\n                    <a class="pick-category" href="#emoji-picker-' +
+__e(category) +
+'" data-category="' +
+__e(category) +
+'"> ' +
+((__t = ( o.transformCategory(o.emoji_categories[category]) )) == null ? '' : __t) +
+' </a>\n                </li>\n                ';
+ } ;
+__p += '\n            ';
+ }); ;
+__p += '\n        </ul>\n        ';
+ } ;
+__p += '\n    </div>\n    <div class="emoji-picker__lists">\n        ';
+ if (o.query) { ;
+__p += '\n            <a id="emoji-picker-search-results" class="emoji-category__heading">' +
+__e(o.__('Search results')) +
+'</a>\n            <ul class="emoji-picker">\n                ';
+ o.search_results.forEach(function (emoji) { ;
+__p += '\n                <li class="emoji insert-emoji ';
+ if (o.shouldBeHidden(emoji.sn)) { ;
+__p += ' hidden ';
+ }; ;
+__p += '"\n                    data-emoji="' +
+__e(emoji.sn) +
+'" title="' +
+__e(emoji.sn) +
+'">\n                        <a href="#" data-emoji="' +
+__e(emoji.sn) +
+'"> ' +
+((__t = ( o.transform(emoji.sn) )) == null ? '' : __t) +
+'  </a>\n                </li>\n                ';
+ }); ;
+__p += '\n            </ul>\n        ';
+ } else { ;
+__p += '\n            ';
+ Object.keys(o.emoji_categories).forEach(function (category) { ;
+__p += '\n                ';
+ if (o.emoji_categories[category]) { ;
+__p += '\n                    <a id="emoji-picker-' +
+__e(category) +
+'" class="emoji-category__heading" data-category="' +
+__e(category) +
+'">' +
+__e( o.__(o._converse.emoji_category_labels[category]) ) +
+' </a>\n                    <ul class="emoji-picker" data-category="' +
+__e(category) +
+'">\n                        ';
+ Object.values(o.emojis_by_category[category]).forEach(function (emoji) { ;
+__p += '\n                        <li class="emoji insert-emoji ';
+ if (o.shouldBeHidden(emoji.sn)) { ;
+__p += ' hidden ';
+ }; ;
+__p += '"\n                            data-emoji="' +
+__e(emoji.sn) +
+'" title="' +
+__e(emoji.sn) +
+'">\n                                <a href="#" data-emoji="' +
+__e(emoji.sn) +
+'"> ' +
+((__t = ( o.transform(emoji.sn) )) == null ? '' : __t) +
+'  </a>\n                        </li>\n                        ';
+ }); ;
+__p += '\n                    </ul>\n                ';
+ } ;
+__p += '\n            ';
+ }); ;
+__p += '\n        ';
+ } ;
+__p += '\n    </div>\n    <div class="emoji-skintone-picker">\n        <label>Skin tone</label>\n        <ul>\n            ';
+ o.skintones.forEach(function (skintone) { ;
+__p += '\n                <li data-skintone="' +
+__e(skintone) +
+'" class="emoji-skintone ';
+ if (o.current_skintone === skintone) { ;
+__p += ' picked ';
+ } ;
+__p += '">\n                    <a class="pick-skintone" href="#" data-skintone="' +
+__e(skintone) +
+'"> ' +
+((__t = ( o.transform(':'+skintone+':') )) == null ? '' : __t) +
+' </a>\n                </li>\n            ';
+ }); ;
+__p += '\n        </ul>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 159 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/inverse_brand_heading.html -->\n<div>\n    <div class="container brand-heading-container">\n        <h1 class="brand-heading brand-heading--inverse">\n            <svg class="converse-svg-logo"\n                xmlns:svg="http://www.w3.org/2000/svg"\n                xmlns="http://www.w3.org/2000/svg"\n                xmlns:xlink="http://www.w3.org/1999/xlink"\n                viewBox="0 0 364 364">\n                <title>Converse</title>\n                <g class="cls-1" id="g904">\n                    <g data-name="Layer 2">\n                        <g data-name="Layer 7">\n                            <path\n                                class="cls-3"\n                                d="M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z" />\n                            <path\n                                class="cls-4"\n                                d="M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z" />\n                        </g>\n                    </g>\n                </g>\n            </svg>\n            <span class="brand-name">\n                <span class="brand-name__text">converse<span class="subdued">.js</span></span>\n                <p class="byline">messaging freedom</p>\n            </span>\n        </h1>\n        <p class="brand-subtitle">' +
+__e(o.version_name) +
+'</p>\n        <p class="brand-subtitle"><a target="_blank" rel="nofollow" href="https://conversejs.org">Open Source</a> XMPP chat client brought to you by <a target="_blank" rel="nofollow" href="https://opkode.com">Opkode</a> </p>\n        <p class="brand-subtitle"><a target="_blank" rel="nofollow" href="https://hosted.weblate.org/projects/conversejs/#languages">Translate</a> it into your own language</p>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 160 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '';
+__p += '<!-- src/templates/chats_panel.html -->\n<a id="toggle-minimized-chats" href="#" class="row no-gutters"></a>\n<div class="flyout minimized-chats-flyout row no-gutters"></div>\n';
+return __p
+};
+
+/***/ }),
+/* 161 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/toggle_chats.html -->\n' +
+__e(o.num_minimized) +
+' ' +
+__e(o.Minimized) +
+'\n<span class="unread-message-count ';
+ if (!o.num_unread) { ;
+__p += ' unread-message-count-hidden ';
+ } ;
+__p += '" href="#">' +
+__e(o.num_unread) +
+'</span>\n';
+return __p
+};
+
+/***/ }),
+/* 162 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/trimmed_chat.html -->\n<div class="chat-head-' +
+__e(o.type) +
+' chat-head row no-gutters">\n    <a class="restore-chat w-100 align-self-center" title="' +
+__e(o.tooltip) +
+'">\n        ';
+ if (o.num_unread) { ;
+__p += '\n            <span class="message-count badge badge-light">' +
+__e(o.num_unread) +
+'</span>\n        ';
+ } ;
+__p += '\n        ' +
+__e(o.title) +
+'\n    </a>\n    <a class="chatbox-btn close-chatbox-button fa fa-times"></a>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 163 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/add_chatroom_modal.html -->\n<div class="modal" id="add-chatroom-modal" tabindex="-1" role="dialog" aria-labelledby="add-chatroom-modal-label" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title"\n                    id="add-chatroom-modal-label">' +
+__e(o.__('Enter a new Groupchat')) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n                    <span aria-hidden="true">×</span>\n                </button>\n            </div>\n            <div class="modal-body">\n                <form class="converse-form add-chatroom">\n                    <div class="form-group">\n                        <label for="chatroom">' +
+__e(o.label_room_address) +
+':</label>\n                        <input type="text" required="required" name="chatroom" class="form-control" placeholder="' +
+__e(o.chatroom_placeholder) +
+'"/>\n                    </div>\n                    ';
+ if (!o._converse.locked_muc_nickname) { ;
+__p += '\n                    <div class="form-group" >\n                        <label for="nickname">' +
+__e(o.__('Nickname')) +
+':</label>\n                        <input type="text" pattern=".*\\S+.*" title="' +
+__e(o.__('This field is required')) +
+'" required="required" name="nickname" value="' +
+__e(o.nick) +
+'" class="form-control"/>\n                    </div>\n                    ';
+ } ;
+__p += '\n                    <input type="submit" class="btn btn-primary" name="join" value="' +
+__e(o.__('Join')) +
+'"/>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 164 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatarea.html -->\n<div class="chat-area col">\n    <div class="chat-content ';
+ if (o.show_send_button) { ;
+__p += 'chat-content-sendbutton';
+ } ;
+__p += '" aria-live="polite">\n        ';
+ if (o.muc_show_logs_before_join) { ;
+__p += '\n            <div class="empty-history-feedback"><span>' +
+__e(o.__('No message history available.')) +
+'</span></div>\n        ';
+ } ;
+__p += '\n    </div>\n    <div class="bottom-panel"></div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 165 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '';
+__p += '<!-- src/templates/chatroom.html -->\n<div class="flyout box-flyout">\n    <div class="chat-head chat-head-chatroom row no-gutters"></div>\n    <div class="chat-body chatroom-body row no-gutters">\n        <div class="disconnect-container hidden"></div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 166 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_bottom_panel.html -->\n';
+ if (o.entered) { ;
+__p += '\n    ';
+ if (o.can_edit) { ;
+__p += '\n        <div class="emoji-picker__container dropup"></div>\n        <div class="message-form-container">\n    ';
+ } else { ;
+__p += '\n        <div class="muc-bottom-panel">' +
+__e(o.__("You're not allowed to send messages in this room")) +
+'</div>\n    ';
+ } ;
+__p += '\n';
+ } else { ;
+__p += '\n    <div class="muc-bottom-panel"></div>\n';
+ } ;
+__p += '\n';
+return __p
+};
+
+/***/ }),
+/* 167 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_destroyed.html -->\n<div class="alert alert-danger">\n    <h3 class="alert-heading disconnect-msg">' +
+__e(o.__('This groupchat no longer exists')) +
+'</h3>\n\n    <p class="destroyed-reason">' +
+__e(o.reason) +
+'</p>\n\n    ';
+ if (o.jid) { ;
+__p += '\n    <p class="moved-label">\n        ' +
+__e(o.__('The conversation has moved. Click below to enter.') ) +
+'\n    </p>\n    <p class="moved-link"><a class="switch-chat" href="#">' +
+__e(o.jid) +
+'</a></p>\n    ';
+ } ;
+__p += '\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 168 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_details_modal.html -->\n<div class="modal" id="room-details-modal" tabindex="-1" role="dialog" aria-labelledby="room-details-modal-label" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="room-details-modal-label">' +
+__e(o.display_name) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="' +
+__e(o.label_close) +
+'"><span aria-hidden="true">×</span></button>\n            </div>\n            <div class="modal-body">\n                <div class="room-info">\n                    <p class="room-info"><strong>' +
+__e(o.__('Name')) +
+'</strong>: ' +
+__e(o.name) +
+'</p>\n                    <p class="room-info"><strong>' +
+__e(o.__('Groupchat address (JID)')) +
+'</strong>: ' +
+__e(o.jid) +
+'</p>\n                    <p class="room-info"><strong>' +
+__e(o.__('Description')) +
+'</strong>: ' +
+__e(o.description) +
+'</p>\n                    ';
+ if (o.subject) { ;
+__p += '\n                    <p class="room-info"><strong>' +
+__e(o.__('Topic')) +
+'</strong>: ' +
+((__t = (o.topic)) == null ? '' : __t) +
+'</p> <!-- Sanitized in converse-muc-views. We want to render links. -->\n                        <p class="room-info"><strong>' +
+__e(o.__('Topic author')) +
+'</strong>: ' +
+__e(o._.get(o.subject, 'author')) +
+'</p>\n                    ';
+ } ;
+__p += '\n                    <p class="room-info"><strong>' +
+__e(o.__('Online users')) +
+'</strong>: ' +
+__e(o.num_occupants) +
+'</p>\n                    <p class="room-info"><strong>' +
+__e(o.__('Features')) +
+'</strong>:\n                        <div class="chatroom-features">\n                        <ul class="features-list">\n                        ';
+ if (o.features.passwordprotected) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-lock"></span>' +
+__e( o.__('Password protected') ) +
+' - <em>' +
+__e( o.__('This groupchat requires a password before entry') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.unsecured) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-unlock"></span>' +
+__e( o.__('No password required') ) +
+' - <em>' +
+__e( o.__('This groupchat does not require a password upon entry') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.hidden) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-eye-slash"></span>' +
+__e( o.__('Hidden') ) +
+' - <em>' +
+__e( o.__('This groupchat is not publicly searchable') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.public_room) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-eye"></span>' +
+__e( o.__('Public') ) +
+' - <em>' +
+__e( o.__('This groupchat is publicly searchable') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.membersonly) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-address-book"></span>' +
+__e( o.__('Members only') ) +
+' - <em>' +
+__e( o.__('This groupchat is restricted to members only') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.open) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-globe"></span>' +
+__e( o.__('Open') ) +
+' - <em>' +
+__e( o.__('Anyone can join this groupchat') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.persistent) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-save"></span>' +
+__e( o.__('Persistent') ) +
+' - <em>' +
+__e( o.__('This groupchat persists even if it\'s unoccupied') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.temporary) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-snowflake-o"></span>' +
+__e( o.__('Temporary') ) +
+' - <em>' +
+__e( o.__('This groupchat will disappear once the last person leaves') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.nonanonymous) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-id-card"></span>' +
+__e( o.__('Not anonymous') ) +
+' - <em>' +
+__e( o.__('All other groupchat participants can see your XMPP address') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.semianonymous) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-user-secret"></span>' +
+__e( o.__('Semi-anonymous') ) +
+' - <em>' +
+__e( o.__('Only moderators can see your XMPP address') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.moderated) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-gavel"></span>' +
+__e( o.__('Moderated') ) +
+' - <em>' +
+__e( o.__('Participants entering this groupchat need to request permission to write') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.unmoderated) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-info-circle"></span>' +
+__e( o.__('Not moderated') ) +
+' - <em>' +
+__e( o.__('Participants entering this groupchat can write right away') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        ';
+ if (o.features.mam_enabled) { ;
+__p += '\n                        <li class="feature" ><span class="fa fa-database"></span>' +
+__e( o.__('Message archiving') ) +
+' - <em>' +
+__e( o.__('Messages are archived on the server') ) +
+'</em></li>\n                        ';
+ } ;
+__p += '\n                        </ul>\n                        </div>\n                    </p>\n                </div>\n            </div>\n            <div class="modal-footer">\n                <button type="button" class="btn btn-warning" data-dismiss="modal">' +
+__e(o.__('Close')) +
+'</button>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 169 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_disconnect.html -->\n<div class="alert alert-danger">\n    <h3 class="alert-heading disconnect-msg">' +
+__e(o.disconnect_messages[0]) +
+'</h3>\n\n    ';
+ o._.forEach(o.disconnect_messages.slice(1), function (msg) { ;
+__p += '\n        <p class="disconnect-msg">' +
+__e(msg) +
+'</p>\n    ';
+ }); ;
+__p += '\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 170 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_features.html -->\n<p class="occupants-heading">' +
+__e(o.__('Features')) +
+'</p>\n<ul class="features-list">\n';
+ if (o.passwordprotected) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('This groupchat requires a password before entry') ) +
+'"><span class="fa fa-lock"></span>' +
+__e( o.__('Password protected') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.unsecured) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('This groupchat does not require a password upon entry') ) +
+'"><span class="fa fa-unlock"></span>' +
+__e( o.__('No password') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.hidden) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('This groupchat is not publicly searchable') ) +
+'"><span class="fa fa-eye-slash"></span>' +
+__e( o.__('Hidden') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.public_room) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('This groupchat is publicly searchable') ) +
+'"><span class="fa fa-eye"></span>' +
+__e( o.__('Public') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.membersonly) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('this groupchat is restricted to members only') ) +
+'"><span class="fa fa-address-book"></span>' +
+__e( o.__('Members only') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.open) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('Anyone can join this groupchat') ) +
+'"><span class="fa fa-globe"></span>' +
+__e( o.__('Open') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.persistent) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('This groupchat persists even if it\'s unoccupied') ) +
+'"><span class="fa fa-save"></span>' +
+__e( o.__('Persistent') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.temporary) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('This groupchat will disappear once the last person leaves') ) +
+'"><span class="fa fa-snowflake"></span>' +
+__e( o.__('Temporary') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.nonanonymous) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('All other groupchat participants can see your XMPP address') ) +
+'"><span class="fa fa-id-card"></span>' +
+__e( o.__('Not anonymous') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.semianonymous) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('Only moderators can see your XMPP address') ) +
+'"><span class="fa fa-user-secret"></span>' +
+__e( o.__('Semi-anonymous') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.moderated) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('Participants entering this groupchat need to request permission to write') ) +
+'"><span class="fa fa-gavel"></span>' +
+__e( o.__('Moderated') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.unmoderated) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('Participants entering this groupchat can write right away') ) +
+'"><span class="fa fa-info-circle"></span>' +
+__e( o.__('Not moderated') ) +
+'</li>\n';
+ } ;
+__p += '\n';
+ if (o.mam_enabled) { ;
+__p += '\n<li class="feature" title="' +
+__e( o.__('Messages are archived on the server') ) +
+'"><span class="fa fa-database"></span>' +
+__e( o.__('Message archiving') ) +
+'</li>\n';
+ } ;
+__p += '\n</ul>\n';
+return __p
+};
+
+/***/ }),
+/* 171 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_form.html -->\n<div class="chatroom-form-container muc-config-form">\n    <form class="converse-form chatroom-form" autocomplete="off">\n        <fieldset class="form-group">\n            <legend>' +
+__e(o.title) +
+'</legend>\n            ';
+ if (o.title !== o.instructions) { ;
+__p += '\n                <p class="form-help">' +
+__e(o.instructions) +
+'</p>\n            ';
+ } ;
+__p += '\n            <!-- Fields are generated internally, with xForm2webForm -->\n            ';
+ o.fields.forEach(function (field) { ;
+__p += ' ' +
+((__t = ( field )) == null ? '' : __t) +
+' ';
+ }) ;
+__p += '\n        </fieldset>\n        <fieldset>\n            <input type="submit" class="btn btn-primary" value="' +
+__e(o.__('Save')) +
+'"/>\n            <input type="button" class="btn btn-secondary .button-cancel" value="' +
+__e(o.__('Cancel')) +
+'"/>\n        </fieldset>\n    </form>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 172 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chatroom_head.html -->\n';
+ if (!o._converse.singleton) { ;
+__p += '\n    <div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>\n';
+ } ;
+__p += '\n<div class="chatbox-title">\n    <div class="chat-title" ';
+ if (o._converse.locked_muc_domain !== 'hidden') { ;
+__p += ' title="' +
+__e(o.jid) +
+'" ';
+ } ;
+__p += ' >\n        ' +
+__e( o.title ) +
+'\n    </div>\n    <!-- Sanitized in converse-muc-views. We want to render links. -->\n    <p class="chatroom-description">' +
+((__t = (o.description)) == null ? '' : __t) +
+'</p>\n</div>\n<div class="chatbox-buttons row no-gutters">\n    ';
+ if (!o._converse.singleton) { ;
+__p += '\n        <a class="chatbox-btn close-chatbox-button fa fa-sign-out-alt" title="' +
+__e(o.info_close) +
+'"></a>\n    ';
+ } ;
+__p += '\n    ';
+ if (o.isOwner) { ;
+__p += '\n        <a class="chatbox-btn configure-chatroom-button fa fa-wrench" title="' +
+__e(o.info_configure) +
+' "></a>\n    ';
+ } ;
+__p += '\n    <a class="chatbox-btn show-room-details-modal fa fa-info-circle" title="' +
+__e(o.info_details) +
+'"></a>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 173 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/chatroom_nickname_form.html -->\n<div class="chatroom-form-container muc-nickname-form">\n    <form class="converse-form chatroom-form converse-centered-form">\n        <fieldset class="form-group">\n            <label>' +
+__e(o.heading) +
+'</label>\n            <input type="text" required="required" name="nick" value="' +
+__e(o.nickname) +
+'"\n                   class="form-control ' +
+((__t = (o.error_class)) == null ? '' : __t) +
+'" placeholder="' +
+__e(o.label_nickname) +
+'"/>\n        </fieldset>\n        <fieldset class="form-group">\n            <input type="submit" class="btn btn-primary" name="join" value="' +
+__e(o.label_join) +
+'"/>\n        </fieldset>\n    </form>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 174 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/chatroom_password_form.html -->\n<div class="chatroom-form-container muc-password-form">\n    <form class="converse-form chatroom-form converse-centered-form">\n        <fieldset class="form-group">\n            <label>' +
+__e(o.heading) +
+'</label>\n            <p class="validation-message">' +
+__e(o.validation_message) +
+'</p>\n            <input class="hidden-username" type="text" autocomplete="username" value="' +
+__e(o.jid) +
+'"></input>\n            <input type="password" name="password" required="required"\n                   class="form-control ' +
+((__t = (o.error_class)) == null ? '' : __t) +
+'" placeholder="' +
+__e(o.label_password) +
+'"/>\n        </fieldset>\n        <fieldset class="form-group">\n            <input class="btn btn-primary" type="submit" value="' +
+__e(o.label_submit) +
+'"/>\n        </fieldset>\n    </form>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 175 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/chatroom_sidebar.html -->\n<!-- <div class="occupants"> -->\n<div class="occupants-header">\n    <i class="hide-occupants fa fa-times"></i>\n    <p class="occupants-heading">' +
+__e(o.label_occupants) +
+'</p>\n</div>\n<div class="dragresize dragresize-occupants-left"></div>\n<ul class="occupant-list"></ul>\n<div class="chatroom-features"></div>\n<!-- </div> -->\n';
+return __p
+};
+
+/***/ }),
+/* 176 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/list_chatrooms_modal.html -->\n<div class="modal" id="list-chatrooms-modal" tabindex="-1" role="dialog" aria-labelledby="list-chatrooms-modal-label" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title"\n                    id="list-chatrooms-modal-label">' +
+__e(o.heading_list_chatrooms) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n                    <span aria-hidden="true">×</span>\n                </button>\n            </div>\n            <div class="modal-body d-flex flex-column">\n                ';
+ if (o.show_form) { ;
+__p += '\n                <form class="converse-form list-chatrooms">\n                    <div class="form-group">\n                        <label for="chatroom">' +
+__e(o.label_server_address) +
+':</label>\n                        <input type="text" value="' +
+__e(o.muc_domain) +
+'" required="required" name="server" class="form-control" placeholder="' +
+__e(o.server_placeholder) +
+'"/>\n                    </div>\n                    <input type="submit" class="btn btn-primary" name="list" value="' +
+__e(o.label_query) +
+'"/>\n                </form>\n                ';
+ } ;
+__p += '\n                <ul class="available-chatrooms list-group"></ul>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 177 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/moderator_tools_modal.html -->\n<div class="modal" id="converse-modtools-modal" tabindex="-1" role="dialog" aria-labelledby="converse-modtools-modal-label" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="converse-modtools-modal-label">' +
+__e(o.__('Moderator Tools')) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n                    <span aria-hidden="true">×</span>\n                </button>\n            </div>\n            <div class="modal-body d-flex flex-column">\n                <ul class="nav nav-pills justify-content-center">\n                    <li role="presentation" class="nav-item">\n                        <a class="nav-link active" id="roles-tab" href="#roles-tabpanel" aria-controls="roles-tabpanel" role="tab" data-toggle="tab">Roles</a>\n                    </li>\n                    <li role="presentation" class="nav-item">\n                        <a class="nav-link" id="affiliations-tab" href="#affiliations-tabpanel" aria-controls="affiliations-tabpanel" role="tab" data-toggle="tab">Affiliations</a>\n                    </li>\n                </ul>\n\n                <div class="tab-content">\n                    <div class="tab-pane tab-pane--columns active" id="roles-tabpanel" role="tabpanel" aria-labelledby="roles-tab">\n                        <form class="converse-form query-role">\n                            <p class="helptext pb-3">\n' +
+__e(o.__("Roles are assigned to users to grant or deny them certain abilities in a multi-user chat. They're assigned either explicitly or implicitly as part of an affiliation. A role that's not due to an affiliation, is only valid for the duration of the user's session.")) +
+'\n                            </p>\n                            <div class="form-group">\n                                <label for="role">\n                                    <strong>' +
+__e(o.__('Role')) +
+':</strong>\n                                </label>\n                                <div class="row">\n                                    <div class="col">\n                                        <select class="custom-select select-role" name="role">\n                                            ';
+ o.roles.forEach(function (role) { ;
+__p += '\n                                                <option value="' +
+__e(role) +
+'" ';
+ if (role === o.role)  { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                                                    ';
+ if (role === 'moderator')  { ;
+__p += '\n                                                    title="' +
+__e(o.__("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations.")) +
+'"\n                                                    ';
+ } ;
+__p += '\n                                                    ';
+ if (role === 'participant')  { ;
+__p += '\n                                                    title="' +
+__e(o.__("The default role, implies that you can read and write messages.")) +
+'"\n                                                    ';
+ } ;
+__p += '\n                                                    ';
+ if (role === 'visitor')  { ;
+__p += '\n                                                    title="' +
+__e(o.__("Visitors aren't allowed to write messages in a moderated multi-user chat.")) +
+'"\n                                                    ';
+ } ;
+__p += '>' +
+__e(role) +
+'</option>\n                                            ';
+ }); ;
+__p += '\n                                        </select>\n                                    </div>\n                                    <div class="col">\n                                        <input type="submit" class="btn btn-primary" name="users_with_role" value="' +
+__e(o.__('Show users')) +
+'"/>\n                                    </div>\n                                </div>\n                                <div class="row">\n                                    <div class="col pt-2">\n                                        ';
+ if (o.role === 'moderator')  { ;
+__p += '\n                                        <p class="helptext pb-3">' +
+__e(o.__("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations.")) +
+'</p>\n                                        ';
+ } ;
+__p += '\n                                        ';
+ if (o.role === 'participant')  { ;
+__p += '\n                                        <p class="helptext pb-3">' +
+__e(o.__("The default role, implies that you can read and write messages.")) +
+'</p>\n                                        ';
+ } ;
+__p += '\n                                        ';
+ if (o.role === 'visitor')  { ;
+__p += '\n                                        <p class="helptext pb-3">' +
+__e(o.__("Visitors aren't allowed to write messages in a moderated multi-user chat.")) +
+'</p>\n                                        ';
+ } ;
+__p += '\n                                    </div>\n                                </div>\n                            </div>\n                        </form>\n                        <div class="scrollable-container">\n                        <ul class="list-group list-group--users">\n                            ';
+ if (o.loading_users_with_role)  { ;
+__p += '\n                                <li class="list-group-item"> <span class="spinner fa fa-spinner centered"/> </li>\n                            ';
+ } ;
+__p += '\n                            ';
+ if (o.users_with_role && o.users_with_role.length === 0) { ;
+__p += '\n                                <li class="list-group-item">' +
+__e(o.__('No users with that role found.')) +
+'</li>\n                            ';
+ } ;
+__p += '\n                            ';
+ (o.users_with_role || []).forEach(function (item) { ;
+__p += '\n                                <li class="list-group-item">\n                                    <ul class="list-group">\n                                        <li class="list-group-item active">\n                                            <div><strong>JID:</strong> ' +
+__e(item.jid) +
+'</div>\n                                        </li>\n                                        <li class="list-group-item">\n                                            <div><strong>Nickname:</strong> ' +
+__e(item.nick) +
+'</div>\n                                        </li>\n                                        <li class="list-group-item">\n                                            <div><strong>Role:</strong> ' +
+__e(item.role) +
+'<a href="#" data-form="role-form" class="toggle-form right fa fa-wrench"></a></div>\n                                            <form class="role-form hidden">\n                                                <div class="form-group">\n                                                    <input type="hidden" name="jid" value="' +
+__e(item.jid) +
+'"/>\n                                                    <input type="hidden" name="nick" value="' +
+__e(item.nick) +
+'"/>\n                                                    <div class="row">\n                                                        <div class="col">\n                                                            <label><strong>' +
+__e(o.__('New Role')) +
+':</strong></label>\n                                                            <select class="custom-select select-role" name="role">\n                                                                ';
+ o.allowed_roles.forEach(function (role) { ;
+__p += '\n                                                                    <option value="' +
+__e(role) +
+'" ';
+ if (role === item.role)  { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '>' +
+__e(role) +
+'</option>\n                                                                ';
+ }); ;
+__p += '\n                                                            </select>\n                                                        </div>\n                                                        <div class="col">\n                                                            <label><strong>' +
+__e(o.__('Reason')) +
+':</strong></label>\n                                                            <input class="form-control" type="text" name="reason"/>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class="form-group">\n                                                    <input type="submit" class="btn btn-primary" value="' +
+__e(o.__('Change role')) +
+'"/>\n                                                </div>\n                                            </form>\n                                        </li>\n                                    </ul>\n                                </li>\n                            ';
+ }); ;
+__p += '\n                        </ul>\n                        </div>\n                    </div>\n\n\n                    <div class="tab-pane tab-pane--columns" id="affiliations-tabpanel" role="tabpanel" aria-labelledby="affiliations-tab">\n                        <form class="converse-form query-affiliation">\n                            <p class="helptext pb-3">\n' +
+__e(o.__("An affiliation is a long-lived entitlement which typically implies a certain role and which grants privileges and responsibilities. For example admins and owners automatically have the moderator role.")) +
+'\n                            </p>\n                            <div class="form-group">\n                                <label for="affiliation">\n                                    <strong>' +
+__e(o.__('Affiliation')) +
+':</strong>\n                                </label>\n                                <div class="row">\n                                    <div class="col">\n                                        <select class="custom-select select-affiliation" name="affiliation">\n                                            ';
+ o.affiliations.forEach(function (aff) { ;
+__p += '\n                                                <option value="' +
+__e(aff) +
+'" ';
+ if (aff === o.affiliation)  { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                                                    ';
+ if (aff === 'owner')  { ;
+__p += '\n                                                    title="' +
+__e(o.__("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users.")) +
+'"\n                                                    ';
+ } ;
+__p += '\n                                                    ';
+ if (aff === 'admin')  { ;
+__p += '\n                                                    title="' +
+__e(o.__("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners.")) +
+'"\n                                                    ';
+ } ;
+__p += '\n                                                    ';
+ if (aff === 'outcast')  { ;
+__p += '\n                                                    title="' +
+__e(o.__("To ban a user, you give them the affiliation of \"outcast\".")) +
+'"\n                                                    ';
+ } ;
+__p += '>' +
+__e(aff) +
+'</option>\n                                            ';
+ }); ;
+__p += '\n                                        </select>\n                                    </div>\n                                    <div class="col">\n                                        <input type="submit" class="btn btn-primary" name="users_with_affiliation" value="' +
+__e(o.__('Show users')) +
+'"/>\n                                    </div>\n                                </div>\n                                <div class="row">\n                                    <div class="col pt-2">\n                                        ';
+ if (o.affiliation === 'owner')  { ;
+__p += '\n                                        <p class="helptext pb-3">' +
+__e(o.__("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users.")) +
+'</p>\n                                        ';
+ } ;
+__p += '\n                                        ';
+ if (o.affiliation === 'admin')  { ;
+__p += '\n                                        <p class="helptext pb-3">' +
+__e(o.__("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners.")) +
+'</p>\n                                        ';
+ } ;
+__p += '\n                                        ';
+ if (o.affiliation === 'outcast')  { ;
+__p += '\n                                        <p class="helptext pb-3">' +
+__e(o.__("To ban a user, you give them the affiliation of \"outcast\".")) +
+'</p>\n                                        ';
+ } ;
+__p += '\n                                    </div>\n                                </div>\n                            </div>\n                        </form>\n                        <div class="scrollable-container">\n                        <ul class="list-group list-group--users">\n                            ';
+ if (o.loading_users_with_affiliation)  { ;
+__p += '\n                                <li class="list-group-item"> <span class="spinner fa fa-spinner centered"/> </li>\n                            ';
+ } else { ;
+__p += '\n                                ';
+ if (o.users_with_affiliation && o.users_with_affiliation.length === 0) { ;
+__p += '\n                                    <li class="list-group-item">' +
+__e(o.__('No users with that affiliation found.')) +
+'</li>\n                                ';
+ } else if (o.users_with_affiliation instanceof Error) { ;
+__p += '\n                                    <li class="list-group-item">' +
+__e(o.users_with_affiliation.message) +
+'</li>\n                                ';
+ } else { ;
+__p += '\n                                    ';
+ (o.users_with_affiliation || []).forEach(function (item) { ;
+__p += '\n                                        <li class="list-group-item">\n                                            <ul class="list-group">\n                                                <li class="list-group-item active">\n                                                    <div><strong>JID:</strong> ' +
+__e(item.jid) +
+'</div>\n                                                </li>\n                                                <li class="list-group-item">\n                                                    <div><strong>Nickname:</strong> ' +
+__e(item.nick) +
+'</div>\n                                                </li>\n                                                <li class="list-group-item">\n                                                    <div><strong>Affiliation:</strong> ' +
+__e(item.affiliation) +
+' <a href="#" data-form="affiliation-form" class="toggle-form right fa fa-wrench"></a></div>\n                                                    <form class="affiliation-form hidden">\n                                                        <div class="form-group">\n                                                            <input type="hidden" name="jid" value="' +
+__e(item.jid) +
+'"/>\n                                                            <input type="hidden" name="nick" value="' +
+__e(item.nick) +
+'"/>\n                                                            <div class="row">\n                                                                <div class="col">\n                                                                    <label><strong>' +
+__e(o.__('New affiliation')) +
+':</strong></label>\n                                                                    <select class="custom-select select-affiliation" name="affiliation">\n                                                                        ';
+ o.allowed_affiliations.forEach(function (aff) { ;
+__p += '\n                                                                            <option value="' +
+__e(aff) +
+'" ';
+ if (aff === item.affiliation)  { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '>' +
+__e(aff) +
+'</option>\n                                                                        ';
+ }); ;
+__p += '\n                                                                    </select>\n                                                                </div>\n                                                                <div class="col">\n                                                                    <label><strong>' +
+__e(o.__('Reason')) +
+':</strong></label>\n                                                                    <input class="form-control" type="text" name="reason"/>\n                                                                </div>\n                                                            </div>\n                                                        </div>\n                                                        <div class="form-group">\n                                                            <input type="submit" class="btn btn-primary" name="change" value="' +
+__e(o.__('Change affiliation')) +
+'"/>\n                                                        </div>\n                                                    </form>\n                                                </li>\n                                            </ul>\n                                        </li>\n                                    ';
+ }); ;
+__p += '\n                                ';
+ } ;
+__p += '\n                            ';
+ } ;
+__p += '\n                        </ul>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 178 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/occupant.html -->\n<li class="occupant" id="' +
+__e( o.id ) +
+'"\n    ';
+ if (o.role === "moderator") { ;
+__p += '\n       title="' +
+__e( o.jid ) +
+' ' +
+__e( o.desc_moderator ) +
+' ' +
+__e( o.hint_occupant ) +
+'"\n    ';
+ } ;
+__p += '\n    ';
+ if (o.role === "participant") { ;
+__p += '\n       title="' +
+__e( o.jid ) +
+' ' +
+__e( o.desc_participant ) +
+' ' +
+__e( o.hint_occupant ) +
+'"\n    ';
+ } ;
+__p += '\n    ';
+ if (o.role === "visitor") { ;
+__p += '\n       title="' +
+__e( o.jid ) +
+' ' +
+__e( o.desc_visitor ) +
+' ' +
+__e( o.hint_occupant ) +
+'"\n    ';
+ } ;
+__p += '\n    ';
+ if (!o._.includes(["visitor", "participant", "moderator"], o.role)) { ;
+__p += '\n       title="' +
+__e( o.jid ) +
+' ' +
+__e( o.hint_occupant ) +
+'"\n    ';
+ } ;
+__p += '>\n    <div class="row no-gutters">\n        <div class="col-auto">\n            <div class="occupant-status occupant-' +
+__e(o.show) +
+' circle" title="' +
+__e(o.hint_show) +
+'"></div>\n        </div>\n        <div class="col occupant-nick-badge">\n            <span class="occupant-nick">' +
+__e(o.nick || o.jid) +
+'</span>\n            <span class="occupant-badges">\n                ';
+ if (o.affiliation === "owner") { ;
+__p += '\n                    <span class="badge badge-groupchat">' +
+__e(o.label_owner) +
+'</span>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.affiliation === "admin") { ;
+__p += '\n                    <span class="badge badge-info">' +
+__e(o.label_admin) +
+'</span>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.affiliation === "member") { ;
+__p += '\n                    <span class="badge badge-info">' +
+__e(o.label_member) +
+'</span>\n                ';
+ } ;
+__p += '\n\n                ';
+ if (o.role === "moderator") { ;
+__p += '\n                    <span class="badge badge-info">' +
+__e(o.label_moderator) +
+'</span>\n                ';
+ } ;
+__p += '\n                ';
+ if (o.role === "visitor") { ;
+__p += '\n                    <span class="badge badge-secondary">' +
+__e(o.label_visitor) +
+'</span>\n                ';
+ } ;
+__p += '\n            </span>\n        </div>\n    </div>\n</li>\n';
+return __p
+};
+
+/***/ }),
+/* 179 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/room_description.html -->\n<!-- FIXME: check markup in mockup -->\n<div class="room-info">\n<p class="room-info"><strong>' +
+__e(o.label_jid) +
+'</strong> ' +
+__e(o.jid) +
+'</p>\n<p class="room-info"><strong>' +
+__e(o.label_desc) +
+'</strong> ' +
+__e(o.desc) +
+'</p>\n<p class="room-info"><strong>' +
+__e(o.label_occ) +
+'</strong> ' +
+__e(o.occ) +
+'</p>\n<p class="room-info"><strong>' +
+__e(o.label_features) +
+'</strong>\n    <ul>\n        ';
+ if (o.passwordprotected) { ;
+__p += '\n        <li class="room-info locked">' +
+__e(o.label_requires_auth) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.hidden) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_hidden) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.membersonly) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_requires_invite) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.moderated) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_moderated) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.nonanonymous) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_non_anon) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.open) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_open_room) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.persistent) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_permanent_room) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.publicroom) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_public) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.semianonymous) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_semi_anon) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.temporary) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_temp_room) +
+'</li>\n        ';
+ } ;
+__p += '\n        ';
+ if (o.unmoderated) { ;
+__p += '\n        <li class="room-info">' +
+__e(o.label_unmoderated) +
+'</li>\n        ';
+ } ;
+__p += '\n    </ul>\n</p>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 180 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/room_item.html -->\n<li class="room-item list-group-item">\n  <div class="available-chatroom d-flex flex-row">\n    <a class="open-room available-room w-100"\n       data-room-jid="' +
+__e(o.jid) +
+'"\n       data-room-name="' +
+__e(o.name) +
+'"\n       title="' +
+__e(o.open_title) +
+'"\n       href="#">' +
+__e(o.name) +
+'</a>\n    <a class="right room-info icon-room-info"\n       data-room-jid="' +
+__e(o.jid) +
+'"\n       title="' +
+__e(o.info_title) +
+'" href="#"></a>\n  </div>\n</li>\n';
+return __p
+};
+
+/***/ }),
+/* 181 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/room_panel.html -->\n<!-- <div id="chatrooms"> -->\n<div class="d-flex controlbox-padded">\n    <span class="w-100 controlbox-heading controlbox-heading--groupchats">' +
+__e(o.heading_chatrooms) +
+'</span>\n    <a class="controlbox-heading__btn show-list-muc-modal fa fa-list-ul" title="' +
+__e(o.title_list_rooms) +
+'" data-toggle="modal" data-target="#list-chatrooms-modal"></a>\n    <a class="controlbox-heading__btn show-add-muc-modal fa fa-plus" title="' +
+__e(o.title_new_room) +
+'" data-toggle="modal" data-target="#add-chatrooms-modal"></a>\n</div>\n<div class="list-container list-container--openrooms"></div>\n<div class="list-container list-container--bookmarks"></div>\n<!-- </div> -->\n';
+return __p
+};
+
+/***/ }),
+/* 182 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/chat_status_modal.html -->\n<!-- Change status Modal -->\n<div class="modal" id="modal-status-change" tabindex="-1" role="dialog" aria-labelledby="changeStatusModalLabel" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="changeStatusModalLabel">' +
+__e(o.modal_title) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="' +
+__e(o.label_close) +
+'">\n                    <span aria-hidden="true">×</span>\n                </button>\n            </div>\n            <div class="modal-body">\n                <form class="converse-form set-xmpp-status" id="set-xmpp-status">\n                    <div class="form-group">\n                        <div class="custom-control custom-radio">\n                            <input ';
+ if (o.status === 'online') { ;
+__p += ' checked="checked" ';
+ } ;
+__p += '\n                                   type="radio" id="radio-online" value="online" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-online">\n                                <span class="fa fa-circle chat-status chat-status--online"></span>' +
+__e(o.label_online) +
+'</label>\n                        </div>\n                        <div class="custom-control custom-radio">\n                            <input ';
+ if (o.status === 'busy') { ;
+__p += ' checked="checked" ';
+ } ;
+__p += '\n                                   type="radio" id="radio-busy" value="dnd" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-busy">\n                                <span class="fa fa-minus-circle  chat-status chat-status--busy"></span>' +
+__e(o.label_busy) +
+'</label>\n                        </div>\n                        <div class="custom-control custom-radio">\n                            <input ';
+ if (o.status === 'away') { ;
+__p += ' checked="checked" ';
+ } ;
+__p += '\n                                   type="radio" id="radio-away" value="away" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-away">\n                                <span class="fa fa-circle chat-status chat-status--away"></span>' +
+__e(o.label_away) +
+'</label>\n                        </div>\n                        <div class="custom-control custom-radio">\n                            <input ';
+ if (o.status === 'xa') { ;
+__p += ' checked="checked" ';
+ } ;
+__p += '\n                                   type="radio" id="radio-xa" value="xa" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-xa">\n                                <span class="far fa-circle chat-status chat-status--xa"></span>' +
+__e(o.label_xa) +
+'</label>\n                        </div>\n                    </div>\n                    <div class="form-group">\n                        <div class="btn-group w-100">\n                            <input name="status_message" type="text" class="form-control" \n                                value="' +
+__e(o.status_message) +
+'" placeholder="' +
+__e(o.placeholder_status_message) +
+'"/>\n                            <span class="clear-input fa fa-times ';
+ if (!o.status_message) { ;
+__p += ' hidden ';
+ } ;
+__p += '"></span>\n                        </div>\n                    </div>\n                    <button type="submit" class="btn btn-primary">' +
+__e(o.label_save) +
+'</button>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 183 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape;
+__p += '<!-- src/templates/client_info_modal.html -->\n<!-- Change status Modal -->\n<div class="modal" id="modal-status-change" tabindex="-1" role="dialog" aria-labelledby="changeStatusModalLabel" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="changeStatusModalLabel">' +
+__e(o.modal_title) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="' +
+__e(o.label_close) +
+'">\n                    <span aria-hidden="true">×</span>\n                </button>\n            </div>\n            <div class="modal-body">\n                <div class="container brand-heading-container">\n                    <h6 class="brand-heading">Converse</h6>\n                    <p class="brand-subtitle">' +
+__e(o.version_name) +
+'</p>\n                    <p class="brand-subtitle">' +
+((__t = (o.first_subtitle)) == null ? '' : __t) +
+'</p>\n                    <p class="brand-subtitle">' +
+((__t = (o.second_subtitle)) == null ? '' : __t) +
+'</p>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 184 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/profile_modal.html -->\n<div class="modal" id="user-profile-modal" tabindex="-1" role="dialog" aria-labelledby="user-profile-modal-label" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="user-profile-modal-label">' +
+__e(o.heading_profile) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="' +
+__e(o.label_close) +
+'"><span aria-hidden="true">×</span></button>\n            </div>\n            <div class="modal-body">\n                ';
+ if (o._converse.pluggable.plugins['converse-omemo'].enabled(o._converse)) { ;
+__p += '\n                <ul class="nav nav-pills justify-content-center">\n                    <li role="presentation" class="nav-item">\n                        <a class="nav-link active" id="profile-tab" href="#profile-tabpanel" aria-controls="profile-tabpanel" role="tab" data-toggle="tab">Profile</a>\n                    </li>\n                    <li role="presentation" class="nav-item">\n                        <a class="nav-link" id="omemo-tab" href="#omemo-tabpanel" aria-controls="omemo-tabpanel" role="tab" data-toggle="tab">OMEMO</a>\n                    </li>\n                </ul>\n                ';
+ } ;
+__p += '\n                <div class="tab-content">\n                    <div class="tab-pane active" id="profile-tabpanel" role="tabpanel" aria-labelledby="profile-tab">\n                        <form class="converse-form converse-form--modal profile-form" action="#">\n                            <div class="row">\n                                <div class="col-auto">\n                                    <a class="change-avatar" href="#">\n                                        ';
+ if (o.image) { ;
+__p += '\n                                            <img alt="' +
+__e(o.alt_avatar) +
+'" class="img-thumbnail avatar align-self-center" height="100px" width="100px" src="data:' +
+__e(o.image_type) +
+';base64,' +
+__e(o.image) +
+'"/>\n                                        ';
+ } ;
+__p += '\n                                        ';
+ if (!o.image) { ;
+__p += '\n                                            <canvas class="avatar" height="100px" width="100px"></canvas>\n                                        ';
+ } ;
+__p += '\n                                    </a>\n                                    <input class="hidden" name="image" type="file"/>\n                                </div>\n                                <div class="col">\n                                    <div class="form-group">\n                                        <label class="col-form-label">' +
+__e(o.label_jid) +
+':</label>\n                                        <div>' +
+__e(o.jid) +
+'</div>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class="form-group">\n                                <label for="vcard-fullname" class="col-form-label">' +
+__e(o.label_fullname) +
+':</label>\n                                <input id="vcard-fullname" type="text" class="form-control" name="fn" value="' +
+__e(o.fullname) +
+'"/>\n                            </div>\n                            <div class="form-group">\n                                <label for="vcard-nickname" class="col-form-label">' +
+__e(o.label_nickname) +
+':</label>\n                                <input id="vcard-nickname" type="text" class="form-control" name="nickname" value="' +
+__e(o.nickname) +
+'"/>\n                            </div>\n                            <div class="form-group">\n                                <label for="vcard-url" class="col-form-label">' +
+__e(o.label_url) +
+':</label>\n                                <input id="vcard-url" type="url" class="form-control" name="url" value="' +
+__e(o.url) +
+'"/>\n                            </div>\n                            <div class="form-group">\n                                <label for="vcard-email" class="col-form-label">' +
+__e(o.label_email) +
+':</label>\n                                <input id="vcard-email" type="email" class="form-control" name="email" value="' +
+__e(o.email) +
+'"/>\n                            </div>\n                            <div class="form-group">\n                                <label for="vcard-role" class="col-form-label">' +
+__e(o.label_role) +
+':</label>\n                                <input id="vcard-role" type="text" class="form-control" name="role" value="' +
+__e(o.role) +
+'" aria-describedby="vcard-role-help"/>\n                                <small id="vcard-role-help" class="form-text text-muted">' +
+__e(o.label_role_help) +
+'</small>\n                            </div>\n                            <hr/>\n                            <div class="form-group">\n                                <button type="submit" class="save-form btn btn-primary">' +
+__e(o.__('Save and close')) +
+'</button>\n                            </div>\n                        </form>\n                    </div>\n                    ';
+ if (o._converse.pluggable.plugins['converse-omemo'].enabled(o._converse)) { ;
+__p += '\n                        <div class="tab-pane" id="omemo-tabpanel" role="tabpanel" aria-labelledby="omemo-tab">\n                            <form class="converse-form fingerprint-removal">\n                                <ul class="list-group fingerprints">\n                                    <li class="list-group-item active">' +
+__e(o.__("This device's OMEMO fingerprint")) +
+'</li>\n                                    <li class="list-group-item">\n                                    ';
+ if (o.view.current_device && o.view.current_device.get('bundle') && o.view.current_device.get('bundle').fingerprint) { ;
+__p += '\n                                        <span class="fingerprint">' +
+__e(o.utils.formatFingerprint(o.view.current_device.get('bundle').fingerprint)) +
+'</span>\n                                    ';
+ } else {;
+__p += '\n                                        <span class="spinner fa fa-spinner centered"/>\n                                    ';
+ } ;
+__p += '\n                                    </li>\n                                </ul>\n                                <div class="form-group">\n                                    <button type="button" class="generate-bundle btn btn-danger">' +
+__e(o.__('Generate new keys and fingerprint')) +
+'</button>\n                                </div>\n\n                                ';
+ if (o.view.other_devices.length) { ;
+__p += '\n                                    <ul class="list-group fingerprints">\n                                        <li class="list-group-item nopadding active">\n                                            <label>\n                                            <input type="checkbox" class="select-all" title="' +
+__e(o.__('Select all')) +
+'"\n                                                   aria-label="' +
+__e(o.__('Checkbox to select fingerprints of all other OMEMO devices')) +
+'"/>\n                                            ' +
+__e(o.__('Other OMEMO-enabled devices')) +
+'\n                                            </label>\n                                        </li>\n                                        ';
+ o.view.other_devices.forEach(function (device) { ;
+__p += '\n                                            ';
+ if (device.get('bundle') && device.get('bundle').fingerprint) { ;
+__p += '\n                                            <li class="fingerprint-removal-item list-group-item nopadding">\n                                                <label>\n                                                <input type="checkbox" value="' +
+__e(device.get('id')) +
+'"\n                                                       aria-label="' +
+__e(o.__('Checkbox for selecting the following fingerprint')) +
+'"/>\n                                                <span class="fingerprint">' +
+__e(o.utils.formatFingerprint(device.get('bundle').fingerprint)) +
+'</span>\n                                                </label>\n                                            </li>\n                                            ';
+ } else {;
+__p += '\n                                            <li class="fingerprint-removal-item list-group-item nopadding">\n                                                <label>\n                                                <input type="checkbox" value="' +
+__e(device.get('id')) +
+'"\n                                                       aria-label="' +
+__e(o.__('Checkbox for selecting the following fingerprint')) +
+'"/>\n                                                <span>' +
+__e(o.__('Device without a fingerprint')) +
+'</span>\n                                                </label>\n                                            </li>\n                                            ';
+ } ;
+__p += '\n                                        ';
+ }); ;
+__p += '\n                                    </ul>\n                                    <div class="form-group">\n                                        <button type="submit" class="save-form btn btn-primary">' +
+__e(o.__('Remove checked devices and close')) +
+'</button>\n                                    </div>\n                                ';
+ } ;
+__p += '\n                            </form>\n                        </div>\n                    ';
+ } ;
+__p += '\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 185 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/profile_view.html -->\n<div class="userinfo controlbox-padded">\n<div class="controlbox-section profile d-flex">\n    <a class="show-profile" href="#">\n        <canvas class="avatar align-self-center" height="40" width="40"></canvas>\n    </a>\n    <span class="username w-100 align-self-center">' +
+__e(o.fullname) +
+'</span>\n    ';
+ if (o._converse.show_client_info) { ;
+__p += '\n        <a class="controlbox-heading__btn show-client-info fa fa-info-circle align-self-center" title="' +
+__e(o.info_details) +
+'"></a>\n    ';
+ } ;
+__p += '\n    ';
+ if (o._converse.allow_logout) { ;
+__p += '\n        <a class="controlbox-heading__btn logout fa fa-sign-out-alt align-self-center" title="' +
+__e(o.title_log_out) +
+'"></a>\n    ';
+ } ;
+__p += '\n</div>\n<div class="d-flex xmpp-status">\n    <a class="change-status" title="' +
+__e(o.title_change_status) +
+'" data-toggle="modal" data-target="#changeStatusModal">\n        <span class="' +
+__e(o.chat_status) +
+' w-100 align-self-center" data-value="' +
+__e(o.chat_status) +
+'">\n            <span class="\n                ';
+ if (o.chat_status === 'online') { ;
+__p += ' fa fa-circle chat-status chat-status--online';
+ } ;
+__p += '\n                ';
+ if (o.chat_status === 'dnd') { ;
+__p += ' fa fa-minus-circle chat-status chat-status--busy ';
+ } ;
+__p += '\n                ';
+ if (o.chat_status === 'away') { ;
+__p += ' fa fa-circle chat-status chat-status--away';
+ } ;
+__p += '\n                ';
+ if (o.chat_status === 'xa') { ;
+__p += ' far fa-circle chat-status chat-status--xa ';
+ } ;
+__p += '\n                ';
+ if (o.chat_status === 'offline') { ;
+__p += ' fa fa-circle chat-status chat-status--offline';
+ } ;
+__p += '"></span> ' +
+__e(o.status_message) +
+'</span>\n    </a>\n</div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 186 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/toolbar_omemo.html -->\n<li class="toggle-omemo fa \n        ';
+ if (!o.omemo_supported) { ;
+__p += ' disabled ';
+ } ;
+__p += '\n        ';
+ if (o.omemo_active) { ;
+__p += ' fa-lock ';
+ } else { ;
+__p += ' fa-unlock ';
+ } ;
+__p += '"\n    title="' +
+__e(o.__('Messages are being sent in plaintext')) +
+'"></li>\n';
+return __p
+};
+
+/***/ }),
+/* 187 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/register_link.html -->\n<fieldset class="switch-form">\n    ';
+ if (!o._converse.auto_login && o._converse.CONNECTION_STATUS[o.connection_status] !== 'CONNECTING') { ;
+__p += '\n        <p>' +
+__e( o.__("Don't have a chat account?") ) +
+'</p>\n        <p><a class="register-account toggle-register-login" href="#converse/register">' +
+__e(o.__("Create an account")) +
+'</a></p>\n    ';
+ } ;
+__p += '\n</fieldset>\n';
+return __p
+};
+
+/***/ }),
+/* 188 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/register_panel.html -->\n<div>\n    <form id="converse-register" class="converse-form">\n        <legend class="col-form-label">' +
+__e(o.__("Create your account")) +
+'</legend>\n\n        <div class="form-group">\n            <label>' +
+__e(o.__("Please enter the XMPP provider to register with:")) +
+'</label>\n            <div class="form-errors hidden"></div>\n\n            ';
+ if (o.default_domain) { ;
+__p += '\n                ' +
+__e(o.default_domain) +
+'\n            </div>\n            ';
+ } else { ;
+__p += '\n                <input class="form-control" required="required" type="text" name="domain" placeholder="' +
+__e(o.domain_placeholder) +
+'"/>\n                <p class="form-text text-muted">' +
+__e(o.help_providers) +
+' <a href="' +
+__e(o.href_providers) +
+'" class="url" target="_blank" rel="noopener">' +
+__e(o.help_providers_link) +
+'</a>.</p>\n            </div>\n            <fieldset class="buttons">\n                <input class="btn btn-primary" type="submit" value="' +
+__e(o.label_register) +
+'"/>\n                <div class="switch-form">\n                    <p>' +
+__e( o.__("Already have a chat account?") ) +
+'</p>\n                    <p><a class="login-here toggle-register-login" href="#converse/login">' +
+__e(o.__("Log in here")) +
+'</a></p>\n                </div>\n            </fieldset>\n            ';
+ } ;
+__p += '\n        <!--</div>-->\n    </form>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 189 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/registration_form.html -->\n<legend class="col-form-label">' +
+__e(o.__("Account Registration:")) +
+' ' +
+__e(o.domain) +
+'</legend>\n<p class="title">' +
+__e(o.title) +
+'</p>\n<p class="form-help instructions">' +
+__e(o.instructions) +
+'</p>\n<div class="form-errors hidden"></div>\n\n<fieldset class="buttons">\n    <input type="submit" class="btn btn-primary" value="' +
+__e(o.__('Register')) +
+'"/>\n    ';
+ if (!o.registration_domain) { ;
+__p += '\n        <input type="button" class="btn btn-secondary button-cancel" value="' +
+__e(o.__('Choose a different provider')) +
+'"/>\n    ';
+ } ;
+__p += '\n    <div class="switch-form">\n        <p>' +
+__e( o.__("Already have a chat account?") ) +
+'</p>\n        <p><a class="login-here toggle-register-login" href="#converse/login">' +
+__e(o.__("Log in here")) +
+'</a></p>\n    </div>\n</fieldset>\n';
+return __p
+};
+
+/***/ }),
+/* 190 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/registration_request.html -->\n<span class="spinner login-submit fa fa-spinner"></span>\n<p class="info">' +
+__e(o.__("Hold tight, we're fetching the registration form…")) +
+'</p>\n';
+ if (o.cancel) { ;
+__p += '\n    <button class="btn btn-secondary button-cancel hor_centered">' +
+__e(o.__('Cancel')) +
+'</button>\n';
+ } ;
+__p += '\n';
+return __p
+};
+
+/***/ }),
+/* 191 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/rooms_list.html -->\n<div class="list-container list-container--openrooms ' +
+__e( !o.rooms.length && 'hidden' || '' ) +
+'">\n\n<a href="#" class="list-toggle open-rooms-toggle controlbox-padded" title="' +
+__e(o.desc_rooms) +
+'">\n<span class="fa ';
+ if (o.toggle_state === o._converse.OPENED) { ;
+__p += ' fa-caret-down ';
+ } else { ;
+__p += ' fa-caret-right ';
+ } ;
+__p += '"></span>' +
+__e(o.label_rooms) +
+'</a>\n\n<div class="items-list rooms-list open-rooms-list ' +
+__e( o.collapsed && 'collapsed' ) +
+'">\n    ';
+o.rooms.forEach(function (room) { ;
+__p += '\n        <div class="list-item controlbox-padded available-chatroom d-flex flex-row\n            ';
+ if (o.currently_open(room)) { ;
+__p += ' open ';
+ } ;
+__p += '\n            ';
+ if (room.get('num_unread_general')) { ;
+__p += ' unread-msgs ';
+ } ;
+__p += '"\n            data-room-jid="' +
+__e(room.get('jid')) +
+'">\n\n        ';
+ if (room.get('num_unread')) { ;
+__p += '\n            <span class="list-item-badge badge badge-room-color msgs-indicator">' +
+__e( room.get('num_unread') ) +
+'</span>\n        ';
+ } ;
+__p += '\n        <a class="list-item-link open-room available-room w-100"\n            data-room-jid="' +
+__e(room.get('jid')) +
+'"\n            title="' +
+__e(o.open_title) +
+'" href="#">' +
+__e(room.getDisplayName()) +
+'</a>\n\n        ';
+ if (o.allow_bookmarks) { ;
+__p += '\n        <a class="list-item-action fa ';
+ if (o.bookmarked) { ;
+__p += ' fa-bookmark remove-bookmark button-on ';
+ } else { ;
+__p += ' add-bookmark fa-bookmark ';
+ } ;
+__p += '"\n           data-room-jid="' +
+__e(room.get('jid')) +
+'"\n           data-bookmark-name="' +
+__e(room.getDisplayName()) +
+'"\n           title="';
+ if (o.bookmarked) { ;
+__p += ' ' +
+__e(o.info_remove_bookmark) +
+' ';
+ } else { ;
+__p += ' ' +
+__e(o.info_add_bookmark) +
+' ';
+ } ;
+__p += '"\n           href="#"></a>\n        ';
+ } ;
+__p += '\n\n        <a class="list-item-action room-info fa fa-info-circle"\n           data-room-jid="' +
+__e(room.get('jid')) +
+'"\n           title="' +
+__e(o.info_title) +
+'" href="#"></a>\n\n        <a class="list-item-action fa fa-sign-out-alt close-room"\n           data-room-jid="' +
+__e(room.get('jid')) +
+'"\n           data-room-name="' +
+__e(room.getDisplayName()) +
+'"\n           title="' +
+__e(o.info_leave_room) +
+'" href="#"></a>\n\n        </div>\n    ';
+ }) ;
+__p += '\n</div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 192 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/add_contact_modal.html -->\n<!-- Add contact Modal -->\n<div class="modal" id="add-contact-modal" tabindex="-1" role="dialog" aria-labelledby="addContactModalLabel" aria-hidden="true">\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="addContactModalLabel">' +
+__e(o.heading_new_contact) +
+'</h5>\n                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>\n            </div>\n            <form class="converse-form add-xmpp-contact">\n                <div class="modal-body">\n                    <div class="form-group add-xmpp-contact__jid">\n                        <label class="clearfix" for="jid">' +
+__e(o.label_xmpp_address) +
+':</label>\n                        <div class="suggestion-box suggestion-box__jid">\n                            <ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>\n                            <input type="text" name="jid"\n                                   ';
+ if (!o._converse.xhr_user_search_url) { ;
+__p += ' required="required" ';
+ } ;
+__p += '\n                                   value="' +
+__e(o.jid) +
+'"\n                                   class="form-control suggestion-box__input"\n                                   placeholder="' +
+__e(o.contact_placeholder) +
+'"/>\n                            <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n                        </div>\n                    </div>\n                    <div class="form-group add-xmpp-contact__name">\n                        <label class="clearfix" for="name">' +
+__e(o.label_nickname) +
+':</label>\n                        <div class="suggestion-box suggestion-box__name">\n                            <ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>\n                            <input type="text" name="name" value="' +
+__e(o.nickname) +
+'"\n                                   class="form-control suggestion-box__input"\n                                   placeholder="' +
+__e(o.nickname_placeholder) +
+'"/>\n                            <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n                        </div>\n                    </div>\n                    <div class="form-group">\n                        <div class="invalid-feedback">' +
+__e(o.error_message) +
+'</div>\n                    </div>\n                    <button type="submit" class="btn btn-primary">' +
+__e(o.label_add) +
+'</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n';
+return __p
+};
+
+/***/ }),
+/* 193 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/group_header.html -->\n<a href="#" class="list-toggle group-toggle controlbox-padded" title="' +
+__e(o.desc_group_toggle) +
+'">\n    <span class="fa ';
+ if (o.toggle_state === o._converse.OPENED) { ;
+__p += ' fa-caret-down ';
+ } else { ;
+__p += ' fa-caret-right ';
+ } ;
+__p += '">\n    </span> ' +
+__e(o.label_group) +
+'</a>\n<ul class="items-list roster-group-contacts ';
+ if (o.toggle_state === o._converse.CLOSED) { ;
+__p += ' collapsed ';
+ } ;
+__p += '"></ul>\n';
+return __p
+};
+
+/***/ }),
+/* 194 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/pending_contact.html -->\n';
+ if (o.allow_chat_pending_contacts)  { ;
+__p += '\n<a class="list-item-link open-chat w-100" href="#">\n';
+ } ;
+__p += '\n<span class="pending-contact-name" title="JID: ' +
+__e(o.jid) +
+'">' +
+__e(o.display_name) +
+'</span> \n';
+ if (o.allow_chat_pending_contacts)  { ;
+__p += '</a>';
+ } ;
+__p += '\n<a class="list-item-action remove-xmpp-contact far fa-trash-alt" title="' +
+__e(o.desc_remove) +
+'" href="#"></a>\n';
+return __p
+};
+
+/***/ }),
+/* 195 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/requesting_contact.html -->\n';
+ if (o.allow_chat_pending_contacts)  { ;
+__p += '\n<a class="open-chat w-100"href="#">\n';
+ } ;
+__p += '\n<span class="req-contact-name w-100" title="JID: ' +
+__e(o.jid) +
+'">' +
+__e(o.display_name) +
+'</span>\n';
+ if (o.allow_chat_pending_contacts)  { ;
+__p += '\n</a>\n';
+ } ;
+__p += '\n<a class="accept-xmpp-request list-item-action list-item-action--visible fa fa-check"\n   aria-label="' +
+__e(o.desc_accept) +
+'" title="' +
+__e(o.desc_accept) +
+'" href="#"></a>\n<a class="decline-xmpp-request list-item-action list-item-action--visible  fa fa-times"\n   aria-label="' +
+__e(o.desc_decline) +
+'" title="' +
+__e(o.desc_decline) +
+'" href="#"></a>\n';
+return __p
+};
+
+/***/ }),
+/* 196 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/roster.html -->\n<div class="d-flex controlbox-padded">\n    <span class="w-100 controlbox-heading controlbox-heading--contacts">' +
+__e(o.heading_contacts) +
+'</span>\n    <a class="controlbox-heading__btn sync-contacts fa fa-sync" title="' +
+__e(o.title_sync_contacts) +
+'"></a>\n    ';
+ if (o.allow_contact_requests) { ;
+__p += '\n        <a class="controlbox-heading__btn add-contact fa fa-user-plus"\n           title="' +
+__e(o.title_add_contact) +
+'"\n           data-toggle="modal"\n           data-target="#add-contact-modal"></a>\n    ';
+ } ;
+__p += '\n</div>\n\n<form class="roster-filter-form"></form>\n\n<div class="list-container roster-contacts"></div>\n';
+return __p
+};
+
+/***/ }),
+/* 197 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/roster_filter.html -->\n<form class="controlbox-padded roster-filter-form input-button-group ';
+ if (!o.visible) { ;
+__p += ' hidden ';
+ } ;
+__p += '">\n    <div class="form-inline flex-nowrap">\n        <div class="filter-by d-flex flex-nowrap">\n            <span class="fa fa-user ';
+ if (o.filter_type === 'contacts') { ;
+__p += ' selected ';
+ } ;
+__p += '" data-type="contacts" title="' +
+__e(o.title_contact_filter) +
+'"></span>\n            <span class="fa fa-users ';
+ if (o.filter_type === 'groups') { ;
+__p += ' selected ';
+ } ;
+__p += '" data-type="groups" title="' +
+__e(o.title_group_filter) +
+'"></span>\n            <span class="fa fa-circle ';
+ if (o.filter_type === 'state') { ;
+__p += ' selected ';
+ } ;
+__p += '" data-type="state" title="' +
+__e(o.title_status_filter) +
+'"></span>\n        </div>\n\n        <div class="btn-group">\n            <input ';
+ if (o.filter_text) { ;
+__p += ' value="' +
+__e(o.filter_text) +
+'" ';
+ } ;
+__p += '\n                class="roster-filter form-control ';
+ if (o.filter_type === 'state') { ;
+__p += ' hidden ';
+ } ;
+__p += '"\n                placeholder="' +
+__e(o.placeholder) +
+'"/>\n            <span class="clear-input fa fa-times ';
+ if (!o.filter_text || o.filter_type === 'state') { ;
+__p += ' hidden ';
+ } ;
+__p += '"></span>\n        </div>\n\n        <select class="form-control state-type ';
+ if (o.filter_type !== 'state') { ;
+__p += ' hidden ';
+ } ;
+__p += '">\n            <option value="">' +
+__e(o.label_any) +
+'</option>\n            <option ';
+ if (o.chat_state === 'unread_messages') { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                value="unread_messages">' +
+__e(o.label_unread_messages) +
+'</option>\n            <option ';
+ if (o.chat_state === 'online') { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                value="online">' +
+__e(o.label_online) +
+'</option>\n            <option ';
+ if (o.chat_state === 'chat') { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                value="chat">' +
+__e(o.label_chatty) +
+'</option>\n            <option ';
+ if (o.chat_state === 'dnd') { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                value="dnd">' +
+__e(o.label_busy) +
+'</option>\n            <option ';
+ if (o.chat_state === 'away') { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                value="away">' +
+__e(o.label_away) +
+'</option>\n            <option ';
+ if (o.chat_state === 'xa') { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                value="xa">' +
+__e(o.label_xa) +
+'</option>\n            <option ';
+ if (o.chat_state === 'offline') { ;
+__p += ' selected="selected" ';
+ } ;
+__p += '\n                value="offline">' +
+__e(o.label_offline) +
+'</option>\n        </select>\n    </div>\n</form>\n';
+return __p
+};
+
+/***/ }),
+/* 198 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var _ = {escape:__webpack_require__(1)};
+module.exports = function(o) {
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+__p += '<!-- src/templates/roster_item.html -->\n<a class="list-item-link cbox-list-item open-chat w-100 ';
+ if (o.num_unread) { ;
+__p += ' unread-msgs ';
+ } ;
+__p += '"\n   title="' +
+__e(o.desc_chat) +
+'" href="#">\n\n    <canvas class="avatar" height="30" width="30"></canvas>\n    <span class="' +
+__e(o.status_icon) +
+'" title="' +
+__e(o.desc_status) +
+'"></span>\n    ';
+ if (o.num_unread) { ;
+__p += ' <span class="msgs-indicator">' +
+__e( o.num_unread ) +
+'</span> ';
+ } ;
+__p += '\n    <span class="contact-name contact-name--' +
+__e(o.show) +
+' ';
+ if (o.num_unread) { ;
+__p += ' unread-msgs ';
+ } ;
+__p += '">' +
+__e(o.display_name) +
+'</span>\n</a>\n';
+ if (o.allow_contact_removal) { ;
+__p += '\n<a class="list-item-action remove-xmpp-contact far fa-trash-alt" title="' +
+__e(o.desc_remove) +
+'" href="#"></a>\n';
+ } ;
+__p += '\n';
+return __p
+};
+
+/***/ }),
+/* 199 */,
+/* 200 */,
+/* 201 */,
+/* 202 */,
+/* 203 */,
+/* 204 */,
+/* 205 */,
+/* 206 */,
+/* 207 */,
+/* 208 */,
+/* 209 */,
+/* 210 */,
+/* 211 */,
+/* 212 */,
+/* 213 */,
+/* 214 */,
+/* 215 */,
+/* 216 */,
+/* 217 */,
+/* 218 */,
+/* 219 */,
+/* 220 */,
+/* 221 */,
+/* 222 */,
+/* 223 */,
+/* 224 */,
+/* 225 */,
+/* 226 */,
+/* 227 */,
+/* 228 */,
+/* 229 */,
+/* 230 */,
+/* 231 */,
+/* 232 */,
+/* 233 */,
+/* 234 */,
+/* 235 */,
+/* 236 */,
+/* 237 */,
+/* 238 */,
+/* 239 */,
+/* 240 */,
+/* 241 */,
+/* 242 */,
+/* 243 */,
+/* 244 */,
+/* 245 */,
+/* 246 */,
+/* 247 */,
+/* 248 */,
+/* 249 */,
+/* 250 */,
+/* 251 */,
+/* 252 */,
+/* 253 */,
+/* 254 */,
+/* 255 */,
+/* 256 */,
+/* 257 */,
+/* 258 */,
+/* 259 */,
+/* 260 */,
+/* 261 */,
+/* 262 */,
+/* 263 */,
+/* 264 */,
+/* 265 */,
+/* 266 */,
+/* 267 */,
+/* 268 */,
+/* 269 */,
+/* 270 */,
+/* 271 */,
+/* 272 */,
+/* 273 */,
+/* 274 */,
+/* 275 */,
+/* 276 */,
+/* 277 */,
+/* 278 */,
+/* 279 */,
+/* 280 */,
+/* 281 */,
+/* 282 */,
+/* 283 */,
+/* 284 */,
+/* 285 */,
+/* 286 */,
+/* 287 */,
+/* 288 */,
+/* 289 */,
+/* 290 */,
+/* 291 */,
+/* 292 */,
+/* 293 */,
+/* 294 */,
+/* 295 */,
+/* 296 */,
+/* 297 */,
+/* 298 */,
+/* 299 */,
+/* 300 */,
+/* 301 */,
+/* 302 */,
+/* 303 */,
+/* 304 */,
+/* 305 */,
+/* 306 */,
+/* 307 */,
+/* 308 */,
+/* 309 */,
+/* 310 */,
+/* 311 */,
+/* 312 */,
+/* 313 */,
+/* 314 */,
+/* 315 */,
+/* 316 */,
+/* 317 */,
+/* 318 */,
+/* 319 */,
+/* 320 */,
+/* 321 */,
+/* 322 */,
+/* 323 */,
+/* 324 */,
+/* 325 */,
+/* 326 */,
+/* 327 */,
+/* 328 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+//
+// Webpack entry file
+//
+// The purpose of this file is to provide an initial temporary public API
+// (window.converse) for **before** the rest of converse.js is loaded so
+// that we can set the __webpack_public_path__ global variable.
+//
+// Once the rest converse.js has been loaded, window.converse will be replaced
+// with the full-fledged public API.
+const plugins = {};
+const converse = {
+  plugins: {
+    add(name, plugin) {
+      if (plugins[name] !== undefined) {
+        throw new TypeError("Error: plugin with name \"".concat(name, "\" has already been ") + 'registered!');
+      }
+
+      plugins[name] = plugin;
+    }
+
+  },
+
+  initialize() {
+    let settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+    converse.load(settings).initialize(settings);
+  },
+
+  /**
+   * Public API method which explicitly loads Converse and allows you the
+   * possibility to pass in configuration settings which need to be defined
+   * before loading. Currently this is only the [assets_path](https://conversejs.org/docs/html/configuration.html#assets_path)
+   * setting.
+   *
+   * If not called explicitly, this method will be called implicitly once
+   * {@link converse.initialize} is called.
+   *
+   * In most cases, you probably don't need to explicitly call this method,
+   * however, until converse.js has been loaded you won't have access to the
+   * utility methods and globals exposed via {@link converse.env}. So if you
+   * need to access `converse.env` outside of any plugins and before
+   * `converse.initialize` has been called, then you need to call
+   * `converse.load` first.
+   *
+   * @memberOf converse
+   * @method load
+   * @param {object} settings A map of configuration-settings that are needed at load time.
+   * @example
+   * converse.load({assets_path: '/path/to/assets/'});
+   */
+  load() {
+    let settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+    if (settings.assets_path) {
+      __webpack_require__.p = settings.assets_path; // eslint-disable-line no-undef
+    }
+
+    __webpack_require__(462);
+
+    Object.keys(plugins).forEach(name => converse.plugins.add(name, plugins[name]));
+    return converse;
+  }
+
+};
+window.converse = converse;
+/* harmony default export */ __webpack_exports__["default"] = (converse);
+
+/***/ }),
+/* 329 */
+/***/ (function(module, exports) {
+
+function CustomEvent(event, params) {
+  params = params || {
+    bubbles: false,
+    cancelable: false,
+    detail: undefined
+  };
+  var evt = document.createEvent('CustomEvent');
+  evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
+  return evt;
+}
+
+if (typeof window.CustomEvent !== "function") {
+  CustomEvent.prototype = window.Event.prototype;
+  window.CustomEvent = CustomEvent;
+}
+
+if (!String.prototype.includes) {
+  String.prototype.includes = function (search, start) {
+    'use strict';
+
+    if (typeof start !== 'number') {
+      start = 0;
+    }
+
+    if (start + search.length > this.length) {
+      return false;
+    } else {
+      return this.indexOf(search, start) !== -1; // eslint-disable-line lodash/prefer-includes
+    }
+  };
+}
+
+if (!String.prototype.endsWith) {
+  String.prototype.endsWith = function (searchString, position) {
+    var subjectString = this.toString();
+
+    if (position === undefined || position > subjectString.length) {
+      position = subjectString.length;
+    }
+
+    position -= searchString.length;
+    var lastIndex = subjectString.indexOf(searchString, position);
+    return lastIndex !== -1 && lastIndex === position;
+  };
+}
+
+if (!String.prototype.startsWith) {
+  String.prototype.startsWith = function (searchString, position) {
+    position = position || 0;
+    return this.substr(position, searchString.length) === searchString;
+  };
+}
+
+if (!String.prototype.splitOnce) {
+  String.prototype.splitOnce = function (delimiter) {
+    var components = this.split(delimiter);
+    return [components.shift(), components.join(delimiter)];
+  };
+}
+
+if (!String.prototype.trim) {
+  String.prototype.trim = function () {
+    return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+  };
+}
+
+/***/ }),
+/* 330 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
+  return Object;
+}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+
+/***/ }),
+/* 331 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var map = {
+    "./af/LC_MESSAGES/converse.po": [
+        463,
+        130
+    ],
+    "./ar/LC_MESSAGES/converse.po": [
+        464,
+        131
+    ],
+    "./bg/LC_MESSAGES/converse.po": [
+        465,
+        132
+    ],
+    "./ca/LC_MESSAGES/converse.po": [
+        466,
+        133
+    ],
+    "./cs/LC_MESSAGES/converse.po": [
+        467,
+        134
+    ],
+    "./de/LC_MESSAGES/converse.po": [
+        468,
+        135
+    ],
+    "./eo/LC_MESSAGES/converse.po": [
+        469,
+        136
+    ],
+    "./es/LC_MESSAGES/converse.po": [
+        470,
+        137
+    ],
+    "./eu/LC_MESSAGES/converse.po": [
+        471,
+        138
+    ],
+    "./fr/LC_MESSAGES/converse.po": [
+        472,
+        139
+    ],
+    "./gl/LC_MESSAGES/converse.po": [
+        473,
+        140
+    ],
+    "./he/LC_MESSAGES/converse.po": [
+        474,
+        141
+    ],
+    "./hi/LC_MESSAGES/converse.po": [
+        475,
+        142
+    ],
+    "./hu/LC_MESSAGES/converse.po": [
+        476,
+        143
+    ],
+    "./id/LC_MESSAGES/converse.po": [
+        477,
+        144
+    ],
+    "./it/LC_MESSAGES/converse.po": [
+        478,
+        145
+    ],
+    "./ja/LC_MESSAGES/converse.po": [
+        479,
+        146
+    ],
+    "./lt/LC_MESSAGES/converse.po": [
+        480,
+        147
+    ],
+    "./mr/LC_MESSAGES/converse.po": [
+        481,
+        148
+    ],
+    "./nb/LC_MESSAGES/converse.po": [
+        482,
+        149
+    ],
+    "./nl/LC_MESSAGES/converse.po": [
+        483,
+        150
+    ],
+    "./nl_BE/LC_MESSAGES/converse.po": [
+        484,
+        151
+    ],
+    "./oc/LC_MESSAGES/converse.po": [
+        485,
+        152
+    ],
+    "./pl/LC_MESSAGES/converse.po": [
+        486,
+        153
+    ],
+    "./pt/LC_MESSAGES/converse.po": [
+        487,
+        154
+    ],
+    "./pt_BR/LC_MESSAGES/converse.po": [
+        488,
+        155
+    ],
+    "./ro/LC_MESSAGES/converse.po": [
+        489,
+        156
+    ],
+    "./ru/LC_MESSAGES/converse.po": [
+        490,
+        157
+    ],
+    "./tr/LC_MESSAGES/converse.po": [
+        491,
+        158
+    ],
+    "./uk/LC_MESSAGES/converse.po": [
+        492,
+        159
+    ],
+    "./vi/LC_MESSAGES/converse.po": [
+        493,
+        160
+    ],
+    "./zh_CN/LC_MESSAGES/converse.po": [
+        494,
+        161
+    ],
+    "./zh_TW/LC_MESSAGES/converse.po": [
+        495,
+        162
+    ]
+};
+function webpackAsyncContext(req) {
+    if(!__webpack_require__.o(map, req)) {
+        return Promise.resolve().then(function() {
+            var e = new Error("Cannot find module '" + req + "'");
+            e.code = 'MODULE_NOT_FOUND';
+            throw e;
+        });
+    }
+
+    var ids = map[req], id = ids[0];
+    return __webpack_require__.e(ids[1]).then(function() {
+        return __webpack_require__.t(id, 3);
+    });
+}
+webpackAsyncContext.keys = function webpackAsyncContextKeys() {
+    return Object.keys(map);
+};
+webpackAsyncContext.id = 331;
+module.exports = webpackAsyncContext;
+
+/***/ }),
+/* 332 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var map = {
+    "./af": [
+        199,
+        0
+    ],
+    "./af.js": [
+        199,
+        0
+    ],
+    "./ar": [
+        206,
+        1
+    ],
+    "./ar-dz": [
+        200,
+        2
+    ],
+    "./ar-dz.js": [
+        200,
+        2
+    ],
+    "./ar-kw": [
+        201,
+        3
+    ],
+    "./ar-kw.js": [
+        201,
+        3
+    ],
+    "./ar-ly": [
+        202,
+        4
+    ],
+    "./ar-ly.js": [
+        202,
+        4
+    ],
+    "./ar-ma": [
+        203,
+        5
+    ],
+    "./ar-ma.js": [
+        203,
+        5
+    ],
+    "./ar-sa": [
+        204,
+        6
+    ],
+    "./ar-sa.js": [
+        204,
+        6
+    ],
+    "./ar-tn": [
+        205,
+        7
+    ],
+    "./ar-tn.js": [
+        205,
+        7
+    ],
+    "./ar.js": [
+        206,
+        1
+    ],
+    "./az": [
+        207,
+        8
+    ],
+    "./az.js": [
+        207,
+        8
+    ],
+    "./be": [
+        208,
+        9
+    ],
+    "./be.js": [
+        208,
+        9
+    ],
+    "./bg": [
+        209,
+        10
+    ],
+    "./bg.js": [
+        209,
+        10
+    ],
+    "./bm": [
+        210,
+        11
+    ],
+    "./bm.js": [
+        210,
+        11
+    ],
+    "./bn": [
+        211,
+        12
+    ],
+    "./bn.js": [
+        211,
+        12
+    ],
+    "./bo": [
+        212,
+        13
+    ],
+    "./bo.js": [
+        212,
+        13
+    ],
+    "./br": [
+        213,
+        14
+    ],
+    "./br.js": [
+        213,
+        14
+    ],
+    "./bs": [
+        214,
+        15
+    ],
+    "./bs.js": [
+        214,
+        15
+    ],
+    "./ca": [
+        215,
+        16
+    ],
+    "./ca.js": [
+        215,
+        16
+    ],
+    "./cs": [
+        216,
+        17
+    ],
+    "./cs.js": [
+        216,
+        17
+    ],
+    "./cv": [
+        217,
+        18
+    ],
+    "./cv.js": [
+        217,
+        18
+    ],
+    "./cy": [
+        218,
+        19
+    ],
+    "./cy.js": [
+        218,
+        19
+    ],
+    "./da": [
+        219,
+        20
+    ],
+    "./da.js": [
+        219,
+        20
+    ],
+    "./de": [
+        222,
+        21
+    ],
+    "./de-at": [
+        220,
+        22
+    ],
+    "./de-at.js": [
+        220,
+        22
+    ],
+    "./de-ch": [
+        221,
+        23
+    ],
+    "./de-ch.js": [
+        221,
+        23
+    ],
+    "./de.js": [
+        222,
+        21
+    ],
+    "./dv": [
+        223,
+        24
+    ],
+    "./dv.js": [
+        223,
+        24
+    ],
+    "./el": [
+        224,
+        25
+    ],
+    "./el.js": [
+        224,
+        25
+    ],
+    "./en": [
+        232,
+        26
+    ],
+    "./en-SG": [
+        225,
+        27
+    ],
+    "./en-SG.js": [
+        225,
+        27
+    ],
+    "./en-au": [
+        226,
+        28
+    ],
+    "./en-au.js": [
+        226,
+        28
+    ],
+    "./en-ca": [
+        227,
+        29
+    ],
+    "./en-ca.js": [
+        227,
+        29
+    ],
+    "./en-gb": [
+        228,
+        30
+    ],
+    "./en-gb.js": [
+        228,
+        30
+    ],
+    "./en-ie": [
+        229,
+        31
+    ],
+    "./en-ie.js": [
+        229,
+        31
+    ],
+    "./en-il": [
+        230,
+        32
+    ],
+    "./en-il.js": [
+        230,
+        32
+    ],
+    "./en-nz": [
+        231,
+        33
+    ],
+    "./en-nz.js": [
+        231,
+        33
+    ],
+    "./en.js": [
+        232,
+        26
+    ],
+    "./eo": [
+        233,
+        34
+    ],
+    "./eo.js": [
+        233,
+        34
+    ],
+    "./es": [
+        236,
+        35
+    ],
+    "./es-do": [
+        234,
+        36
+    ],
+    "./es-do.js": [
+        234,
+        36
+    ],
+    "./es-us": [
+        235,
+        37
+    ],
+    "./es-us.js": [
+        235,
+        37
+    ],
+    "./es.js": [
+        236,
+        35
+    ],
+    "./et": [
+        237,
+        38
+    ],
+    "./et.js": [
+        237,
+        38
+    ],
+    "./eu": [
+        238,
+        39
+    ],
+    "./eu.js": [
+        238,
+        39
+    ],
+    "./fa": [
+        239,
+        40
+    ],
+    "./fa.js": [
+        239,
+        40
+    ],
+    "./fi": [
+        240,
+        41
+    ],
+    "./fi.js": [
+        240,
+        41
+    ],
+    "./fo": [
+        241,
+        42
+    ],
+    "./fo.js": [
+        241,
+        42
+    ],
+    "./fr": [
+        244,
+        43
+    ],
+    "./fr-ca": [
+        242,
+        44
+    ],
+    "./fr-ca.js": [
+        242,
+        44
+    ],
+    "./fr-ch": [
+        243,
+        45
+    ],
+    "./fr-ch.js": [
+        243,
+        45
+    ],
+    "./fr.js": [
+        244,
+        43
+    ],
+    "./fy": [
+        245,
+        46
+    ],
+    "./fy.js": [
+        245,
+        46
+    ],
+    "./ga": [
+        246,
+        47
+    ],
+    "./ga.js": [
+        246,
+        47
+    ],
+    "./gd": [
+        247,
+        48
+    ],
+    "./gd.js": [
+        247,
+        48
+    ],
+    "./gl": [
+        248,
+        49
+    ],
+    "./gl.js": [
+        248,
+        49
+    ],
+    "./gom-latn": [
+        249,
+        50
+    ],
+    "./gom-latn.js": [
+        249,
+        50
+    ],
+    "./gu": [
+        250,
+        51
+    ],
+    "./gu.js": [
+        250,
+        51
+    ],
+    "./he": [
+        251,
+        52
+    ],
+    "./he.js": [
+        251,
+        52
+    ],
+    "./hi": [
+        252,
+        53
+    ],
+    "./hi.js": [
+        252,
+        53
+    ],
+    "./hr": [
+        253,
+        54
+    ],
+    "./hr.js": [
+        253,
+        54
+    ],
+    "./hu": [
+        254,
+        55
+    ],
+    "./hu.js": [
+        254,
+        55
+    ],
+    "./hy-am": [
+        255,
+        56
+    ],
+    "./hy-am.js": [
+        255,
+        56
+    ],
+    "./id": [
+        256,
+        57
+    ],
+    "./id.js": [
+        256,
+        57
+    ],
+    "./is": [
+        257,
+        58
+    ],
+    "./is.js": [
+        257,
+        58
+    ],
+    "./it": [
+        259,
+        59
+    ],
+    "./it-ch": [
+        258,
+        60
+    ],
+    "./it-ch.js": [
+        258,
+        60
+    ],
+    "./it.js": [
+        259,
+        59
+    ],
+    "./ja": [
+        260,
+        61
+    ],
+    "./ja.js": [
+        260,
+        61
+    ],
+    "./jv": [
+        261,
+        62
+    ],
+    "./jv.js": [
+        261,
+        62
+    ],
+    "./ka": [
+        262,
+        63
+    ],
+    "./ka.js": [
+        262,
+        63
+    ],
+    "./kk": [
+        263,
+        64
+    ],
+    "./kk.js": [
+        263,
+        64
+    ],
+    "./km": [
+        264,
+        65
+    ],
+    "./km.js": [
+        264,
+        65
+    ],
+    "./kn": [
+        265,
+        66
+    ],
+    "./kn.js": [
+        265,
+        66
+    ],
+    "./ko": [
+        266,
+        67
+    ],
+    "./ko.js": [
+        266,
+        67
+    ],
+    "./ku": [
+        267,
+        68
+    ],
+    "./ku.js": [
+        267,
+        68
+    ],
+    "./ky": [
+        268,
+        69
+    ],
+    "./ky.js": [
+        268,
+        69
+    ],
+    "./lb": [
+        269,
+        70
+    ],
+    "./lb.js": [
+        269,
+        70
+    ],
+    "./lo": [
+        270,
+        71
+    ],
+    "./lo.js": [
+        270,
+        71
+    ],
+    "./lt": [
+        271,
+        72
+    ],
+    "./lt.js": [
+        271,
+        72
+    ],
+    "./lv": [
+        272,
+        73
+    ],
+    "./lv.js": [
+        272,
+        73
+    ],
+    "./me": [
+        273,
+        74
+    ],
+    "./me.js": [
+        273,
+        74
+    ],
+    "./mi": [
+        274,
+        75
+    ],
+    "./mi.js": [
+        274,
+        75
+    ],
+    "./mk": [
+        275,
+        76
+    ],
+    "./mk.js": [
+        275,
+        76
+    ],
+    "./ml": [
+        276,
+        77
+    ],
+    "./ml.js": [
+        276,
+        77
+    ],
+    "./mn": [
+        277,
+        78
+    ],
+    "./mn.js": [
+        277,
+        78
+    ],
+    "./mr": [
+        278,
+        79
+    ],
+    "./mr.js": [
+        278,
+        79
+    ],
+    "./ms": [
+        280,
+        80
+    ],
+    "./ms-my": [
+        279,
+        81
+    ],
+    "./ms-my.js": [
+        279,
+        81
+    ],
+    "./ms.js": [
+        280,
+        80
+    ],
+    "./mt": [
+        281,
+        82
+    ],
+    "./mt.js": [
+        281,
+        82
+    ],
+    "./my": [
+        282,
+        83
+    ],
+    "./my.js": [
+        282,
+        83
+    ],
+    "./nb": [
+        283,
+        84
+    ],
+    "./nb.js": [
+        283,
+        84
+    ],
+    "./ne": [
+        284,
+        85
+    ],
+    "./ne.js": [
+        284,
+        85
+    ],
+    "./nl": [
+        286,
+        86
+    ],
+    "./nl-be": [
+        285,
+        87
+    ],
+    "./nl-be.js": [
+        285,
+        87
+    ],
+    "./nl.js": [
+        286,
+        86
+    ],
+    "./nn": [
+        287,
+        88
+    ],
+    "./nn.js": [
+        287,
+        88
+    ],
+    "./oc-lnc": [
+        288,
+        89
+    ],
+    "./oc-lnc.js": [
+        288,
+        89
+    ],
+    "./pa-in": [
+        289,
+        90
+    ],
+    "./pa-in.js": [
+        289,
+        90
+    ],
+    "./pl": [
+        290,
+        91
+    ],
+    "./pl.js": [
+        290,
+        91
+    ],
+    "./pt": [
+        292,
+        92
+    ],
+    "./pt-br": [
+        291,
+        93
+    ],
+    "./pt-br.js": [
+        291,
+        93
+    ],
+    "./pt.js": [
+        292,
+        92
+    ],
+    "./ro": [
+        293,
+        94
+    ],
+    "./ro.js": [
+        293,
+        94
+    ],
+    "./ru": [
+        294,
+        95
+    ],
+    "./ru.js": [
+        294,
+        95
+    ],
+    "./sd": [
+        295,
+        96
+    ],
+    "./sd.js": [
+        295,
+        96
+    ],
+    "./se": [
+        296,
+        97
+    ],
+    "./se.js": [
+        296,
+        97
+    ],
+    "./si": [
+        297,
+        98
+    ],
+    "./si.js": [
+        297,
+        98
+    ],
+    "./sk": [
+        298,
+        99
+    ],
+    "./sk.js": [
+        298,
+        99
+    ],
+    "./sl": [
+        299,
+        100
+    ],
+    "./sl.js": [
+        299,
+        100
+    ],
+    "./sq": [
+        300,
+        101
+    ],
+    "./sq.js": [
+        300,
+        101
+    ],
+    "./sr": [
+        302,
+        102
+    ],
+    "./sr-cyrl": [
+        301,
+        103
+    ],
+    "./sr-cyrl.js": [
+        301,
+        103
+    ],
+    "./sr.js": [
+        302,
+        102
+    ],
+    "./ss": [
+        303,
+        104
+    ],
+    "./ss.js": [
+        303,
+        104
+    ],
+    "./sv": [
+        304,
+        105
+    ],
+    "./sv.js": [
+        304,
+        105
+    ],
+    "./sw": [
+        305,
+        106
+    ],
+    "./sw.js": [
+        305,
+        106
+    ],
+    "./ta": [
+        306,
+        107
+    ],
+    "./ta.js": [
+        306,
+        107
+    ],
+    "./te": [
+        307,
+        108
+    ],
+    "./te.js": [
+        307,
+        108
+    ],
+    "./tet": [
+        308,
+        109
+    ],
+    "./tet.js": [
+        308,
+        109
+    ],
+    "./tg": [
+        309,
+        110
+    ],
+    "./tg.js": [
+        309,
+        110
+    ],
+    "./th": [
+        310,
+        111
+    ],
+    "./th.js": [
+        310,
+        111
+    ],
+    "./tl-ph": [
+        311,
+        112
+    ],
+    "./tl-ph.js": [
+        311,
+        112
+    ],
+    "./tlh": [
+        312,
+        113
+    ],
+    "./tlh.js": [
+        312,
+        113
+    ],
+    "./tr": [
+        313,
+        114
+    ],
+    "./tr.js": [
+        313,
+        114
+    ],
+    "./tzl": [
+        314,
+        115
+    ],
+    "./tzl.js": [
+        314,
+        115
+    ],
+    "./tzm": [
+        316,
+        116
+    ],
+    "./tzm-latn": [
+        315,
+        117
+    ],
+    "./tzm-latn.js": [
+        315,
+        117
+    ],
+    "./tzm.js": [
+        316,
+        116
+    ],
+    "./ug-cn": [
+        317,
+        118
+    ],
+    "./ug-cn.js": [
+        317,
+        118
+    ],
+    "./uk": [
+        318,
+        119
+    ],
+    "./uk.js": [
+        318,
+        119
+    ],
+    "./ur": [
+        319,
+        120
+    ],
+    "./ur.js": [
+        319,
+        120
+    ],
+    "./uz": [
+        321,
+        121
+    ],
+    "./uz-latn": [
+        320,
+        122
+    ],
+    "./uz-latn.js": [
+        320,
+        122
+    ],
+    "./uz.js": [
+        321,
+        121
+    ],
+    "./vi": [
+        322,
+        123
+    ],
+    "./vi.js": [
+        322,
+        123
+    ],
+    "./x-pseudo": [
+        323,
+        124
+    ],
+    "./x-pseudo.js": [
+        323,
+        124
+    ],
+    "./yo": [
+        324,
+        125
+    ],
+    "./yo.js": [
+        324,
+        125
+    ],
+    "./zh-cn": [
+        325,
+        126
+    ],
+    "./zh-cn.js": [
+        325,
+        126
+    ],
+    "./zh-hk": [
+        326,
+        127
+    ],
+    "./zh-hk.js": [
+        326,
+        127
+    ],
+    "./zh-tw": [
+        327,
+        128
+    ],
+    "./zh-tw.js": [
+        327,
+        128
+    ]
+};
+function webpackAsyncContext(req) {
+    if(!__webpack_require__.o(map, req)) {
+        return Promise.resolve().then(function() {
+            var e = new Error("Cannot find module '" + req + "'");
+            e.code = 'MODULE_NOT_FOUND';
+            throw e;
+        });
+    }
+
+    var ids = map[req], id = ids[0];
+    return __webpack_require__.e(ids[1]).then(function() {
+        return __webpack_require__.t(id, 7);
+    });
+}
+webpackAsyncContext.keys = function webpackAsyncContextKeys() {
+    return Object.keys(map);
+};
+webpackAsyncContext.id = 332;
+module.exports = webpackAsyncContext;
+
+/***/ }),
+/* 333 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseSlice(array, start, end) {
+  var index = -1,
+      length = array.length;
+
+  if (start < 0) {
+    start = -start > length ? 0 : (length + start);
+  }
+  end = end > length ? length : end;
+  if (end < 0) {
+    end += length;
+  }
+  length = start > end ? 0 : ((end - start) >>> 0);
+  start >>>= 0;
+
+  var result = Array(length);
+  while (++index < length) {
+    result[index] = array[index + start];
+  }
+  return result;
+}
+
+module.exports = baseSlice;
+
+
+/***/ }),
+/* 334 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var toNumber = __webpack_require__(335);
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+    MAX_INTEGER = 1.7976931348623157e+308;
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+  if (!value) {
+    return value === 0 ? value : 0;
+  }
+  value = toNumber(value);
+  if (value === INFINITY || value === -INFINITY) {
+    var sign = (value < 0 ? -1 : 1);
+    return sign * MAX_INTEGER;
+  }
+  return value === value ? value : 0;
+}
+
+module.exports = toFinite;
+
+
+/***/ }),
+/* 335 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(9),
+    isSymbol = __webpack_require__(28);
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+  if (typeof value == 'number') {
+    return value;
+  }
+  if (isSymbol(value)) {
+    return NAN;
+  }
+  if (isObject(value)) {
+    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+    value = isObject(other) ? (other + '') : other;
+  }
+  if (typeof value != 'string') {
+    return value === 0 ? value : +value;
+  }
+  value = value.replace(reTrim, '');
+  var isBinary = reIsBinary.test(value);
+  return (isBinary || reIsOctal.test(value))
+    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+    : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = toNumber;
+
+
+/***/ }),
+/* 336 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Symbol = __webpack_require__(29);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+function getRawTag(value) {
+  var isOwn = hasOwnProperty.call(value, symToStringTag),
+      tag = value[symToStringTag];
+
+  try {
+    value[symToStringTag] = undefined;
+    var unmasked = true;
+  } catch (e) {}
+
+  var result = nativeObjectToString.call(value);
+  if (unmasked) {
+    if (isOwn) {
+      value[symToStringTag] = tag;
+    } else {
+      delete value[symToStringTag];
+    }
+  }
+  return result;
+}
+
+module.exports = getRawTag;
+
+
+/***/ }),
+/* 337 */
+/***/ (function(module, exports) {
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+  return nativeObjectToString.call(value);
+}
+
+module.exports = objectToString;
+
+
+/***/ }),
+/* 338 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayEach = __webpack_require__(68),
+    baseEach = __webpack_require__(339),
+    castFunction = __webpack_require__(351),
+    isArray = __webpack_require__(6);
+
+/**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ *   console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ *   console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forEach(collection, iteratee) {
+  var func = isArray(collection) ? arrayEach : baseEach;
+  return func(collection, castFunction(iteratee));
+}
+
+module.exports = forEach;
+
+
+/***/ }),
+/* 339 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseForOwn = __webpack_require__(340),
+    createBaseEach = __webpack_require__(350);
+
+/**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEach = createBaseEach(baseForOwn);
+
+module.exports = baseEach;
+
+
+/***/ }),
+/* 340 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseFor = __webpack_require__(341),
+    keys = __webpack_require__(19);
+
+/**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+  return object && baseFor(object, iteratee, keys);
+}
+
+module.exports = baseForOwn;
+
+
+/***/ }),
+/* 341 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var createBaseFor = __webpack_require__(342);
+
+/**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseFor = createBaseFor();
+
+module.exports = baseFor;
+
+
+/***/ }),
+/* 342 */
+/***/ (function(module, exports) {
+
+/**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseFor(fromRight) {
+  return function(object, iteratee, keysFunc) {
+    var index = -1,
+        iterable = Object(object),
+        props = keysFunc(object),
+        length = props.length;
+
+    while (length--) {
+      var key = props[fromRight ? length : ++index];
+      if (iteratee(iterable[key], key, iterable) === false) {
+        break;
+      }
+    }
+    return object;
+  };
+}
+
+module.exports = createBaseFor;
+
+
+/***/ }),
+/* 343 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+  var index = -1,
+      result = Array(n);
+
+  while (++index < n) {
+    result[index] = iteratee(index);
+  }
+  return result;
+}
+
+module.exports = baseTimes;
+
+
+/***/ }),
+/* 344 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetTag = __webpack_require__(15),
+    isObjectLike = __webpack_require__(11);
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+  return isObjectLike(value) && baseGetTag(value) == argsTag;
+}
+
+module.exports = baseIsArguments;
+
+
+/***/ }),
+/* 345 */
+/***/ (function(module, exports) {
+
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
+  return false;
+}
+
+module.exports = stubFalse;
+
+
+/***/ }),
+/* 346 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetTag = __webpack_require__(15),
+    isLength = __webpack_require__(48),
+    isObjectLike = __webpack_require__(11);
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+    arrayTag = '[object Array]',
+    boolTag = '[object Boolean]',
+    dateTag = '[object Date]',
+    errorTag = '[object Error]',
+    funcTag = '[object Function]',
+    mapTag = '[object Map]',
+    numberTag = '[object Number]',
+    objectTag = '[object Object]',
+    regexpTag = '[object RegExp]',
+    setTag = '[object Set]',
+    stringTag = '[object String]',
+    weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+    dataViewTag = '[object DataView]',
+    float32Tag = '[object Float32Array]',
+    float64Tag = '[object Float64Array]',
+    int8Tag = '[object Int8Array]',
+    int16Tag = '[object Int16Array]',
+    int32Tag = '[object Int32Array]',
+    uint8Tag = '[object Uint8Array]',
+    uint8ClampedTag = '[object Uint8ClampedArray]',
+    uint16Tag = '[object Uint16Array]',
+    uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+typedArrayTags[setTag] = typedArrayTags[stringTag] =
+typedArrayTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+function baseIsTypedArray(value) {
+  return isObjectLike(value) &&
+    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+}
+
+module.exports = baseIsTypedArray;
+
+
+/***/ }),
+/* 347 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+function baseUnary(func) {
+  return function(value) {
+    return func(value);
+  };
+}
+
+module.exports = baseUnary;
+
+
+/***/ }),
+/* 348 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(67);
+
+/** Detect free variable `exports`. */
+var freeExports =  true && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports && freeGlobal.process;
+
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+  try {
+    // Use `util.types` for Node.js 10+.
+    var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+    if (types) {
+      return types;
+    }
+
+    // Legacy `process.binding('util')` for Node.js < 10.
+    return freeProcess && freeProcess.binding && freeProcess.binding('util');
+  } catch (e) {}
+}());
+
+module.exports = nodeUtil;
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(27)(module)))
+
+/***/ }),
+/* 349 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var overArg = __webpack_require__(75);
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object);
+
+module.exports = nativeKeys;
+
+
+/***/ }),
+/* 350 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isArrayLike = __webpack_require__(18);
+
+/**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseEach(eachFunc, fromRight) {
+  return function(collection, iteratee) {
+    if (collection == null) {
+      return collection;
+    }
+    if (!isArrayLike(collection)) {
+      return eachFunc(collection, iteratee);
+    }
+    var length = collection.length,
+        index = fromRight ? length : -1,
+        iterable = Object(collection);
+
+    while ((fromRight ? index-- : ++index < length)) {
+      if (iteratee(iterable[index], index, iterable) === false) {
+        break;
+      }
+    }
+    return collection;
+  };
+}
+
+module.exports = createBaseEach;
+
+
+/***/ }),
+/* 351 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var identity = __webpack_require__(23);
+
+/**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+function castFunction(value) {
+  return typeof value == 'function' ? value : identity;
+}
+
+module.exports = castFunction;
+
+
+/***/ }),
+/* 352 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var copyObject = __webpack_require__(353),
+    createAssigner = __webpack_require__(358),
+    keysIn = __webpack_require__(83);
+
+/**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ *   this.a = 1;
+ * }
+ *
+ * function Bar() {
+ *   this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+var assignIn = createAssigner(function(object, source) {
+  copyObject(source, keysIn(source), object);
+});
+
+module.exports = assignIn;
+
+
+/***/ }),
+/* 353 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var assignValue = __webpack_require__(76),
+    baseAssignValue = __webpack_require__(77);
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+function copyObject(source, props, object, customizer) {
+  var isNew = !object;
+  object || (object = {});
+
+  var index = -1,
+      length = props.length;
+
+  while (++index < length) {
+    var key = props[index];
+
+    var newValue = customizer
+      ? customizer(object[key], source[key], key, object, source)
+      : undefined;
+
+    if (newValue === undefined) {
+      newValue = source[key];
+    }
+    if (isNew) {
+      baseAssignValue(object, key, newValue);
+    } else {
+      assignValue(object, key, newValue);
+    }
+  }
+  return object;
+}
+
+module.exports = copyObject;
+
+
+/***/ }),
+/* 354 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isFunction = __webpack_require__(40),
+    isMasked = __webpack_require__(355),
+    isObject = __webpack_require__(9),
+    toSource = __webpack_require__(79);
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+    objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ *  else `false`.
+ */
+function baseIsNative(value) {
+  if (!isObject(value) || isMasked(value)) {
+    return false;
+  }
+  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+  return pattern.test(toSource(value));
+}
+
+module.exports = baseIsNative;
+
+
+/***/ }),
+/* 355 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var coreJsData = __webpack_require__(356);
+
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+  return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
+
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+  return !!maskSrcKey && (maskSrcKey in func);
+}
+
+module.exports = isMasked;
+
+
+/***/ }),
+/* 356 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var root = __webpack_require__(5);
+
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
+
+module.exports = coreJsData;
+
+
+/***/ }),
+/* 357 */
+/***/ (function(module, exports) {
+
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+  return object == null ? undefined : object[key];
+}
+
+module.exports = getValue;
+
+
+/***/ }),
+/* 358 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseRest = __webpack_require__(80),
+    isIterateeCall = __webpack_require__(362);
+
+/**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+function createAssigner(assigner) {
+  return baseRest(function(object, sources) {
+    var index = -1,
+        length = sources.length,
+        customizer = length > 1 ? sources[length - 1] : undefined,
+        guard = length > 2 ? sources[2] : undefined;
+
+    customizer = (assigner.length > 3 && typeof customizer == 'function')
+      ? (length--, customizer)
+      : undefined;
+
+    if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+      customizer = length < 3 ? undefined : customizer;
+      length = 1;
+    }
+    object = Object(object);
+    while (++index < length) {
+      var source = sources[index];
+      if (source) {
+        assigner(object, source, index, customizer);
+      }
+    }
+    return object;
+  });
+}
+
+module.exports = createAssigner;
+
+
+/***/ }),
+/* 359 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var apply = __webpack_require__(49);
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+function overRest(func, start, transform) {
+  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+  return function() {
+    var args = arguments,
+        index = -1,
+        length = nativeMax(args.length - start, 0),
+        array = Array(length);
+
+    while (++index < length) {
+      array[index] = args[start + index];
+    }
+    index = -1;
+    var otherArgs = Array(start + 1);
+    while (++index < start) {
+      otherArgs[index] = args[index];
+    }
+    otherArgs[start] = transform(array);
+    return apply(func, this, otherArgs);
+  };
+}
+
+module.exports = overRest;
+
+
+/***/ }),
+/* 360 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var constant = __webpack_require__(361),
+    defineProperty = __webpack_require__(78),
+    identity = __webpack_require__(23);
+
+/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetToString = !defineProperty ? identity : function(func, string) {
+  return defineProperty(func, 'toString', {
+    'configurable': true,
+    'enumerable': false,
+    'value': constant(string),
+    'writable': true
+  });
+};
+
+module.exports = baseSetToString;
+
+
+/***/ }),
+/* 361 */
+/***/ (function(module, exports) {
+
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+function constant(value) {
+  return function() {
+    return value;
+  };
+}
+
+module.exports = constant;
+
+
+/***/ }),
+/* 362 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var eq = __webpack_require__(30),
+    isArrayLike = __webpack_require__(18),
+    isIndex = __webpack_require__(22),
+    isObject = __webpack_require__(9);
+
+/**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ *  else `false`.
+ */
+function isIterateeCall(value, index, object) {
+  if (!isObject(object)) {
+    return false;
+  }
+  var type = typeof index;
+  if (type == 'number'
+        ? (isArrayLike(object) && isIndex(index, object.length))
+        : (type == 'string' && index in object)
+      ) {
+    return eq(object[index], value);
+  }
+  return false;
+}
+
+module.exports = isIterateeCall;
+
+
+/***/ }),
+/* 363 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(9),
+    isPrototype = __webpack_require__(74),
+    nativeKeysIn = __webpack_require__(364);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeysIn(object) {
+  if (!isObject(object)) {
+    return nativeKeysIn(object);
+  }
+  var isProto = isPrototype(object),
+      result = [];
+
+  for (var key in object) {
+    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+      result.push(key);
+    }
+  }
+  return result;
+}
+
+module.exports = baseKeysIn;
+
+
+/***/ }),
+/* 364 */
+/***/ (function(module, exports) {
+
+/**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function nativeKeysIn(object) {
+  var result = [];
+  if (object != null) {
+    for (var key in Object(object)) {
+      result.push(key);
+    }
+  }
+  return result;
+}
+
+module.exports = nativeKeysIn;
+
+
+/***/ }),
+/* 365 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+  var length = array.length,
+      index = fromIndex + (fromRight ? 1 : -1);
+
+  while ((fromRight ? index-- : ++index < length)) {
+    if (predicate(array[index], index, array)) {
+      return index;
+    }
+  }
+  return -1;
+}
+
+module.exports = baseFindIndex;
+
+
+/***/ }),
+/* 366 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+  return value !== value;
+}
+
+module.exports = baseIsNaN;
+
+
+/***/ }),
+/* 367 */
+/***/ (function(module, exports) {
+
+/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictIndexOf(array, value, fromIndex) {
+  var index = fromIndex - 1,
+      length = array.length;
+
+  while (++index < length) {
+    if (array[index] === value) {
+      return index;
+    }
+  }
+  return -1;
+}
+
+module.exports = strictIndexOf;
+
+
+/***/ }),
+/* 368 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayMap = __webpack_require__(50);
+
+/**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+function baseValues(object, props) {
+  return arrayMap(props, function(key) {
+    return object[key];
+  });
+}
+
+module.exports = baseValues;
+
+
+/***/ }),
+/* 369 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseSetData = __webpack_require__(86),
+    createBind = __webpack_require__(370),
+    createCurry = __webpack_require__(371),
+    createHybrid = __webpack_require__(89),
+    createPartial = __webpack_require__(384),
+    getData = __webpack_require__(93),
+    mergeData = __webpack_require__(385),
+    setData = __webpack_require__(96),
+    setWrapToString = __webpack_require__(97),
+    toInteger = __webpack_require__(47);
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+    WRAP_BIND_KEY_FLAG = 2,
+    WRAP_CURRY_FLAG = 8,
+    WRAP_CURRY_RIGHT_FLAG = 16,
+    WRAP_PARTIAL_FLAG = 32,
+    WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ *    1 - `_.bind`
+ *    2 - `_.bindKey`
+ *    4 - `_.curry` or `_.curryRight` of a bound function
+ *    8 - `_.curry`
+ *   16 - `_.curryRight`
+ *   32 - `_.partial`
+ *   64 - `_.partialRight`
+ *  128 - `_.rearg`
+ *  256 - `_.ary`
+ *  512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+  var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+  if (!isBindKey && typeof func != 'function') {
+    throw new TypeError(FUNC_ERROR_TEXT);
+  }
+  var length = partials ? partials.length : 0;
+  if (!length) {
+    bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+    partials = holders = undefined;
+  }
+  ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+  arity = arity === undefined ? arity : toInteger(arity);
+  length -= holders ? holders.length : 0;
+
+  if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+    var partialsRight = partials,
+        holdersRight = holders;
+
+    partials = holders = undefined;
+  }
+  var data = isBindKey ? undefined : getData(func);
+
+  var newData = [
+    func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+    argPos, ary, arity
+  ];
+
+  if (data) {
+    mergeData(newData, data);
+  }
+  func = newData[0];
+  bitmask = newData[1];
+  thisArg = newData[2];
+  partials = newData[3];
+  holders = newData[4];
+  arity = newData[9] = newData[9] === undefined
+    ? (isBindKey ? 0 : func.length)
+    : nativeMax(newData[9] - length, 0);
+
+  if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+    bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+  }
+  if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+    var result = createBind(func, bitmask, thisArg);
+  } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+    result = createCurry(func, bitmask, arity);
+  } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+    result = createPartial(func, bitmask, thisArg, partials);
+  } else {
+    result = createHybrid.apply(undefined, newData);
+  }
+  var setter = data ? baseSetData : setData;
+  return setWrapToString(setter(result, newData), func, bitmask);
+}
+
+module.exports = createWrap;
+
+
+/***/ }),
+/* 370 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var createCtor = __webpack_require__(31),
+    root = __webpack_require__(5);
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createBind(func, bitmask, thisArg) {
+  var isBind = bitmask & WRAP_BIND_FLAG,
+      Ctor = createCtor(func);
+
+  function wrapper() {
+    var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+    return fn.apply(isBind ? thisArg : this, arguments);
+  }
+  return wrapper;
+}
+
+module.exports = createBind;
+
+
+/***/ }),
+/* 371 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var apply = __webpack_require__(49),
+    createCtor = __webpack_require__(31),
+    createHybrid = __webpack_require__(89),
+    createRecurry = __webpack_require__(92),
+    getHolder = __webpack_require__(54),
+    replaceHolders = __webpack_require__(32),
+    root = __webpack_require__(5);
+
+/**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCurry(func, bitmask, arity) {
+  var Ctor = createCtor(func);
+
+  function wrapper() {
+    var length = arguments.length,
+        args = Array(length),
+        index = length,
+        placeholder = getHolder(wrapper);
+
+    while (index--) {
+      args[index] = arguments[index];
+    }
+    var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+      ? []
+      : replaceHolders(args, placeholder);
+
+    length -= holders.length;
+    if (length < arity) {
+      return createRecurry(
+        func, bitmask, createHybrid, wrapper.placeholder, undefined,
+        args, holders, undefined, undefined, arity - length);
+    }
+    var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+    return apply(fn, this, args);
+  }
+  return wrapper;
+}
+
+module.exports = createCurry;
+
+
+/***/ }),
+/* 372 */
+/***/ (function(module, exports) {
+
+/**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+function countHolders(array, placeholder) {
+  var length = array.length,
+      result = 0;
+
+  while (length--) {
+    if (array[length] === placeholder) {
+      ++result;
+    }
+  }
+  return result;
+}
+
+module.exports = countHolders;
+
+
+/***/ }),
+/* 373 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var LazyWrapper = __webpack_require__(52),
+    getData = __webpack_require__(93),
+    getFuncName = __webpack_require__(375),
+    lodash = __webpack_require__(377);
+
+/**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ *  else `false`.
+ */
+function isLaziable(func) {
+  var funcName = getFuncName(func),
+      other = lodash[funcName];
+
+  if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+    return false;
+  }
+  if (func === other) {
+    return true;
+  }
+  var data = getData(other);
+  return !!data && func === data[0];
+}
+
+module.exports = isLaziable;
+
+
+/***/ }),
+/* 374 */
+/***/ (function(module, exports) {
+
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+  // No operation performed.
+}
+
+module.exports = noop;
+
+
+/***/ }),
+/* 375 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var realNames = __webpack_require__(376);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+function getFuncName(func) {
+  var result = (func.name + ''),
+      array = realNames[result],
+      length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+  while (length--) {
+    var data = array[length],
+        otherFunc = data.func;
+    if (otherFunc == null || otherFunc == func) {
+      return data.name;
+    }
+  }
+  return result;
+}
+
+module.exports = getFuncName;
+
+
+/***/ }),
+/* 376 */
+/***/ (function(module, exports) {
+
+/** Used to lookup unminified function names. */
+var realNames = {};
+
+module.exports = realNames;
+
+
+/***/ }),
+/* 377 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var LazyWrapper = __webpack_require__(52),
+    LodashWrapper = __webpack_require__(94),
+    baseLodash = __webpack_require__(53),
+    isArray = __webpack_require__(6),
+    isObjectLike = __webpack_require__(11),
+    wrapperClone = __webpack_require__(378);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ *   return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+function lodash(value) {
+  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+    if (value instanceof LodashWrapper) {
+      return value;
+    }
+    if (hasOwnProperty.call(value, '__wrapped__')) {
+      return wrapperClone(value);
+    }
+  }
+  return new LodashWrapper(value);
+}
+
+// Ensure wrappers are instances of `baseLodash`.
+lodash.prototype = baseLodash.prototype;
+lodash.prototype.constructor = lodash;
+
+module.exports = lodash;
+
+
+/***/ }),
+/* 378 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var LazyWrapper = __webpack_require__(52),
+    LodashWrapper = __webpack_require__(94),
+    copyArray = __webpack_require__(95);
+
+/**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+function wrapperClone(wrapper) {
+  if (wrapper instanceof LazyWrapper) {
+    return wrapper.clone();
+  }
+  var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+  result.__actions__ = copyArray(wrapper.__actions__);
+  result.__index__  = wrapper.__index__;
+  result.__values__ = wrapper.__values__;
+  return result;
+}
+
+module.exports = wrapperClone;
+
+
+/***/ }),
+/* 379 */
+/***/ (function(module, exports) {
+
+/** Used to match wrap detail comments. */
+var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+    reSplitDetails = /,? & /;
+
+/**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+function getWrapDetails(source) {
+  var match = source.match(reWrapDetails);
+  return match ? match[1].split(reSplitDetails) : [];
+}
+
+module.exports = getWrapDetails;
+
+
+/***/ }),
+/* 380 */
+/***/ (function(module, exports) {
+
+/** Used to match wrap detail comments. */
+var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
+
+/**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+function insertWrapDetails(source, details) {
+  var length = details.length;
+  if (!length) {
+    return source;
+  }
+  var lastIndex = length - 1;
+  details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+  details = details.join(length > 2 ? ', ' : ' ');
+  return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+}
+
+module.exports = insertWrapDetails;
+
+
+/***/ }),
+/* 381 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayEach = __webpack_require__(68),
+    arrayIncludes = __webpack_require__(382);
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+    WRAP_BIND_KEY_FLAG = 2,
+    WRAP_CURRY_FLAG = 8,
+    WRAP_CURRY_RIGHT_FLAG = 16,
+    WRAP_PARTIAL_FLAG = 32,
+    WRAP_PARTIAL_RIGHT_FLAG = 64,
+    WRAP_ARY_FLAG = 128,
+    WRAP_REARG_FLAG = 256,
+    WRAP_FLIP_FLAG = 512;
+
+/** Used to associate wrap methods with their bit flags. */
+var wrapFlags = [
+  ['ary', WRAP_ARY_FLAG],
+  ['bind', WRAP_BIND_FLAG],
+  ['bindKey', WRAP_BIND_KEY_FLAG],
+  ['curry', WRAP_CURRY_FLAG],
+  ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+  ['flip', WRAP_FLIP_FLAG],
+  ['partial', WRAP_PARTIAL_FLAG],
+  ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+  ['rearg', WRAP_REARG_FLAG]
+];
+
+/**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+function updateWrapDetails(details, bitmask) {
+  arrayEach(wrapFlags, function(pair) {
+    var value = '_.' + pair[0];
+    if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+      details.push(value);
+    }
+  });
+  return details.sort();
+}
+
+module.exports = updateWrapDetails;
+
+
+/***/ }),
+/* 382 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIndexOf = __webpack_require__(84);
+
+/**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludes(array, value) {
+  var length = array == null ? 0 : array.length;
+  return !!length && baseIndexOf(array, value, 0) > -1;
+}
+
+module.exports = arrayIncludes;
+
+
+/***/ }),
+/* 383 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var copyArray = __webpack_require__(95),
+    isIndex = __webpack_require__(22);
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+function reorder(array, indexes) {
+  var arrLength = array.length,
+      length = nativeMin(indexes.length, arrLength),
+      oldArray = copyArray(array);
+
+  while (length--) {
+    var index = indexes[length];
+    array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+  }
+  return array;
+}
+
+module.exports = reorder;
+
+
+/***/ }),
+/* 384 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var apply = __webpack_require__(49),
+    createCtor = __webpack_require__(31),
+    root = __webpack_require__(5);
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ *  the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createPartial(func, bitmask, thisArg, partials) {
+  var isBind = bitmask & WRAP_BIND_FLAG,
+      Ctor = createCtor(func);
+
+  function wrapper() {
+    var argsIndex = -1,
+        argsLength = arguments.length,
+        leftIndex = -1,
+        leftLength = partials.length,
+        args = Array(leftLength + argsLength),
+        fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+    while (++leftIndex < leftLength) {
+      args[leftIndex] = partials[leftIndex];
+    }
+    while (argsLength--) {
+      args[leftIndex++] = arguments[++argsIndex];
+    }
+    return apply(fn, isBind ? thisArg : this, args);
+  }
+  return wrapper;
+}
+
+module.exports = createPartial;
+
+
+/***/ }),
+/* 385 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var composeArgs = __webpack_require__(90),
+    composeArgsRight = __webpack_require__(91),
+    replaceHolders = __webpack_require__(32);
+
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+    WRAP_BIND_KEY_FLAG = 2,
+    WRAP_CURRY_BOUND_FLAG = 4,
+    WRAP_CURRY_FLAG = 8,
+    WRAP_ARY_FLAG = 128,
+    WRAP_REARG_FLAG = 256;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+function mergeData(data, source) {
+  var bitmask = data[1],
+      srcBitmask = source[1],
+      newBitmask = bitmask | srcBitmask,
+      isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+  var isCombo =
+    ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+    ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+    ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+  // Exit early if metadata can't be merged.
+  if (!(isCommon || isCombo)) {
+    return data;
+  }
+  // Use source `thisArg` if available.
+  if (srcBitmask & WRAP_BIND_FLAG) {
+    data[2] = source[2];
+    // Set when currying a bound function.
+    newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+  }
+  // Compose partial arguments.
+  var value = source[3];
+  if (value) {
+    var partials = data[3];
+    data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+    data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+  }
+  // Compose partial right arguments.
+  value = source[5];
+  if (value) {
+    partials = data[5];
+    data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+    data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+  }
+  // Use source `argPos` if available.
+  value = source[7];
+  if (value) {
+    data[7] = value;
+  }
+  // Use source `ary` if it's smaller.
+  if (srcBitmask & WRAP_ARY_FLAG) {
+    data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+  }
+  // Use source `arity` if one is not provided.
+  if (data[9] == null) {
+    data[9] = source[9];
+  }
+  // Use source `func` and merge bitmasks.
+  data[0] = source[0];
+  data[1] = newBitmask;
+
+  return data;
+}
+
+module.exports = mergeData;
+
+
+/***/ }),
+/* 386 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseMatches = __webpack_require__(387),
+    baseMatchesProperty = __webpack_require__(428),
+    identity = __webpack_require__(23),
+    isArray = __webpack_require__(6),
+    property = __webpack_require__(437);
+
+/**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+function baseIteratee(value) {
+  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+  if (typeof value == 'function') {
+    return value;
+  }
+  if (value == null) {
+    return identity;
+  }
+  if (typeof value == 'object') {
+    return isArray(value)
+      ? baseMatchesProperty(value[0], value[1])
+      : baseMatches(value);
+  }
+  return property(value);
+}
+
+module.exports = baseIteratee;
+
+
+/***/ }),
+/* 387 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsMatch = __webpack_require__(388),
+    getMatchData = __webpack_require__(427),
+    matchesStrictComparable = __webpack_require__(107);
+
+/**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatches(source) {
+  var matchData = getMatchData(source);
+  if (matchData.length == 1 && matchData[0][2]) {
+    return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+  }
+  return function(object) {
+    return object === source || baseIsMatch(object, source, matchData);
+  };
+}
+
+module.exports = baseMatches;
+
+
+/***/ }),
+/* 388 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Stack = __webpack_require__(98),
+    baseIsEqual = __webpack_require__(99);
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+    COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, source, matchData, customizer) {
+  var index = matchData.length,
+      length = index,
+      noCustomizer = !customizer;
+
+  if (object == null) {
+    return !length;
+  }
+  object = Object(object);
+  while (index--) {
+    var data = matchData[index];
+    if ((noCustomizer && data[2])
+          ? data[1] !== object[data[0]]
+          : !(data[0] in object)
+        ) {
+      return false;
+    }
+  }
+  while (++index < length) {
+    data = matchData[index];
+    var key = data[0],
+        objValue = object[key],
+        srcValue = data[1];
+
+    if (noCustomizer && data[2]) {
+      if (objValue === undefined && !(key in object)) {
+        return false;
+      }
+    } else {
+      var stack = new Stack;
+      if (customizer) {
+        var result = customizer(objValue, srcValue, key, object, source, stack);
+      }
+      if (!(result === undefined
+            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+            : result
+          )) {
+        return false;
+      }
+    }
+  }
+  return true;
+}
+
+module.exports = baseIsMatch;
+
+
+/***/ }),
+/* 389 */
+/***/ (function(module, exports) {
+
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+  this.__data__ = [];
+  this.size = 0;
+}
+
+module.exports = listCacheClear;
+
+
+/***/ }),
+/* 390 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var assocIndexOf = __webpack_require__(34);
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+  var data = this.__data__,
+      index = assocIndexOf(data, key);
+
+  if (index < 0) {
+    return false;
+  }
+  var lastIndex = data.length - 1;
+  if (index == lastIndex) {
+    data.pop();
+  } else {
+    splice.call(data, index, 1);
+  }
+  --this.size;
+  return true;
+}
+
+module.exports = listCacheDelete;
+
+
+/***/ }),
+/* 391 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var assocIndexOf = __webpack_require__(34);
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+  var data = this.__data__,
+      index = assocIndexOf(data, key);
+
+  return index < 0 ? undefined : data[index][1];
+}
+
+module.exports = listCacheGet;
+
+
+/***/ }),
+/* 392 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var assocIndexOf = __webpack_require__(34);
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+  return assocIndexOf(this.__data__, key) > -1;
+}
+
+module.exports = listCacheHas;
+
+
+/***/ }),
+/* 393 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var assocIndexOf = __webpack_require__(34);
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+  var data = this.__data__,
+      index = assocIndexOf(data, key);
+
+  if (index < 0) {
+    ++this.size;
+    data.push([key, value]);
+  } else {
+    data[index][1] = value;
+  }
+  return this;
+}
+
+module.exports = listCacheSet;
+
+
+/***/ }),
+/* 394 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var ListCache = __webpack_require__(33);
+
+/**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+function stackClear() {
+  this.__data__ = new ListCache;
+  this.size = 0;
+}
+
+module.exports = stackClear;
+
+
+/***/ }),
+/* 395 */
+/***/ (function(module, exports) {
+
+/**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function stackDelete(key) {
+  var data = this.__data__,
+      result = data['delete'](key);
+
+  this.size = data.size;
+  return result;
+}
+
+module.exports = stackDelete;
+
+
+/***/ }),
+/* 396 */
+/***/ (function(module, exports) {
+
+/**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function stackGet(key) {
+  return this.__data__.get(key);
+}
+
+module.exports = stackGet;
+
+
+/***/ }),
+/* 397 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function stackHas(key) {
+  return this.__data__.has(key);
+}
+
+module.exports = stackHas;
+
+
+/***/ }),
+/* 398 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var ListCache = __webpack_require__(33),
+    Map = __webpack_require__(55),
+    MapCache = __webpack_require__(56);
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+function stackSet(key, value) {
+  var data = this.__data__;
+  if (data instanceof ListCache) {
+    var pairs = data.__data__;
+    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+      pairs.push([key, value]);
+      this.size = ++data.size;
+      return this;
+    }
+    data = this.__data__ = new MapCache(pairs);
+  }
+  data.set(key, value);
+  this.size = data.size;
+  return this;
+}
+
+module.exports = stackSet;
+
+
+/***/ }),
+/* 399 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Hash = __webpack_require__(400),
+    ListCache = __webpack_require__(33),
+    Map = __webpack_require__(55);
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+  this.size = 0;
+  this.__data__ = {
+    'hash': new Hash,
+    'map': new (Map || ListCache),
+    'string': new Hash
+  };
+}
+
+module.exports = mapCacheClear;
+
+
+/***/ }),
+/* 400 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var hashClear = __webpack_require__(401),
+    hashDelete = __webpack_require__(402),
+    hashGet = __webpack_require__(403),
+    hashHas = __webpack_require__(404),
+    hashSet = __webpack_require__(405);
+
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+  var index = -1,
+      length = entries == null ? 0 : entries.length;
+
+  this.clear();
+  while (++index < length) {
+    var entry = entries[index];
+    this.set(entry[0], entry[1]);
+  }
+}
+
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
+
+module.exports = Hash;
+
+
+/***/ }),
+/* 401 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var nativeCreate = __webpack_require__(35);
+
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+  this.__data__ = nativeCreate ? nativeCreate(null) : {};
+  this.size = 0;
+}
+
+module.exports = hashClear;
+
+
+/***/ }),
+/* 402 */
+/***/ (function(module, exports) {
+
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+  var result = this.has(key) && delete this.__data__[key];
+  this.size -= result ? 1 : 0;
+  return result;
+}
+
+module.exports = hashDelete;
+
+
+/***/ }),
+/* 403 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var nativeCreate = __webpack_require__(35);
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+  var data = this.__data__;
+  if (nativeCreate) {
+    var result = data[key];
+    return result === HASH_UNDEFINED ? undefined : result;
+  }
+  return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
+
+module.exports = hashGet;
+
+
+/***/ }),
+/* 404 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var nativeCreate = __webpack_require__(35);
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+  var data = this.__data__;
+  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+}
+
+module.exports = hashHas;
+
+
+/***/ }),
+/* 405 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var nativeCreate = __webpack_require__(35);
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+  var data = this.__data__;
+  this.size += this.has(key) ? 0 : 1;
+  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+  return this;
+}
+
+module.exports = hashSet;
+
+
+/***/ }),
+/* 406 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getMapData = __webpack_require__(36);
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+  var result = getMapData(this, key)['delete'](key);
+  this.size -= result ? 1 : 0;
+  return result;
+}
+
+module.exports = mapCacheDelete;
+
+
+/***/ }),
+/* 407 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+  var type = typeof value;
+  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+    ? (value !== '__proto__')
+    : (value === null);
+}
+
+module.exports = isKeyable;
+
+
+/***/ }),
+/* 408 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getMapData = __webpack_require__(36);
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+  return getMapData(this, key).get(key);
+}
+
+module.exports = mapCacheGet;
+
+
+/***/ }),
+/* 409 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getMapData = __webpack_require__(36);
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+  return getMapData(this, key).has(key);
+}
+
+module.exports = mapCacheHas;
+
+
+/***/ }),
+/* 410 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getMapData = __webpack_require__(36);
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+  var data = getMapData(this, key),
+      size = data.size;
+
+  data.set(key, value);
+  this.size += data.size == size ? 0 : 1;
+  return this;
+}
+
+module.exports = mapCacheSet;
+
+
+/***/ }),
+/* 411 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Stack = __webpack_require__(98),
+    equalArrays = __webpack_require__(100),
+    equalByTag = __webpack_require__(417),
+    equalObjects = __webpack_require__(421),
+    getTag = __webpack_require__(105),
+    isArray = __webpack_require__(6),
+    isBuffer = __webpack_require__(71),
+    isTypedArray = __webpack_require__(72);
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+    arrayTag = '[object Array]',
+    objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+  var objIsArr = isArray(object),
+      othIsArr = isArray(other),
+      objTag = objIsArr ? arrayTag : getTag(object),
+      othTag = othIsArr ? arrayTag : getTag(other);
+
+  objTag = objTag == argsTag ? objectTag : objTag;
+  othTag = othTag == argsTag ? objectTag : othTag;
+
+  var objIsObj = objTag == objectTag,
+      othIsObj = othTag == objectTag,
+      isSameTag = objTag == othTag;
+
+  if (isSameTag && isBuffer(object)) {
+    if (!isBuffer(other)) {
+      return false;
+    }
+    objIsArr = true;
+    objIsObj = false;
+  }
+  if (isSameTag && !objIsObj) {
+    stack || (stack = new Stack);
+    return (objIsArr || isTypedArray(object))
+      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+  }
+  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+    if (objIsWrapped || othIsWrapped) {
+      var objUnwrapped = objIsWrapped ? object.value() : object,
+          othUnwrapped = othIsWrapped ? other.value() : other;
+
+      stack || (stack = new Stack);
+      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+    }
+  }
+  if (!isSameTag) {
+    return false;
+  }
+  stack || (stack = new Stack);
+  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+}
+
+module.exports = baseIsEqualDeep;
+
+
+/***/ }),
+/* 412 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var MapCache = __webpack_require__(56),
+    setCacheAdd = __webpack_require__(413),
+    setCacheHas = __webpack_require__(414);
+
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+  var index = -1,
+      length = values == null ? 0 : values.length;
+
+  this.__data__ = new MapCache;
+  while (++index < length) {
+    this.add(values[index]);
+  }
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+SetCache.prototype.has = setCacheHas;
+
+module.exports = SetCache;
+
+
+/***/ }),
+/* 413 */
+/***/ (function(module, exports) {
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+  this.__data__.set(value, HASH_UNDEFINED);
+  return this;
+}
+
+module.exports = setCacheAdd;
+
+
+/***/ }),
+/* 414 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+function setCacheHas(value) {
+  return this.__data__.has(value);
+}
+
+module.exports = setCacheHas;
+
+
+/***/ }),
+/* 415 */
+/***/ (function(module, exports) {
+
+/**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ *  else `false`.
+ */
+function arraySome(array, predicate) {
+  var index = -1,
+      length = array == null ? 0 : array.length;
+
+  while (++index < length) {
+    if (predicate(array[index], index, array)) {
+      return true;
+    }
+  }
+  return false;
+}
+
+module.exports = arraySome;
+
+
+/***/ }),
+/* 416 */
+/***/ (function(module, exports) {
+
+/**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+  return cache.has(key);
+}
+
+module.exports = cacheHas;
+
+
+/***/ }),
+/* 417 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Symbol = __webpack_require__(29),
+    Uint8Array = __webpack_require__(418),
+    eq = __webpack_require__(30),
+    equalArrays = __webpack_require__(100),
+    mapToArray = __webpack_require__(419),
+    setToArray = __webpack_require__(420);
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+    COMPARE_UNORDERED_FLAG = 2;
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+    dateTag = '[object Date]',
+    errorTag = '[object Error]',
+    mapTag = '[object Map]',
+    numberTag = '[object Number]',
+    regexpTag = '[object RegExp]',
+    setTag = '[object Set]',
+    stringTag = '[object String]',
+    symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+    dataViewTag = '[object DataView]';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+  switch (tag) {
+    case dataViewTag:
+      if ((object.byteLength != other.byteLength) ||
+          (object.byteOffset != other.byteOffset)) {
+        return false;
+      }
+      object = object.buffer;
+      other = other.buffer;
+
+    case arrayBufferTag:
+      if ((object.byteLength != other.byteLength) ||
+          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+        return false;
+      }
+      return true;
+
+    case boolTag:
+    case dateTag:
+    case numberTag:
+      // Coerce booleans to `1` or `0` and dates to milliseconds.
+      // Invalid dates are coerced to `NaN`.
+      return eq(+object, +other);
+
+    case errorTag:
+      return object.name == other.name && object.message == other.message;
+
+    case regexpTag:
+    case stringTag:
+      // Coerce regexes to strings and treat strings, primitives and objects,
+      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+      // for more details.
+      return object == (other + '');
+
+    case mapTag:
+      var convert = mapToArray;
+
+    case setTag:
+      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+      convert || (convert = setToArray);
+
+      if (object.size != other.size && !isPartial) {
+        return false;
+      }
+      // Assume cyclic values are equal.
+      var stacked = stack.get(object);
+      if (stacked) {
+        return stacked == other;
+      }
+      bitmask |= COMPARE_UNORDERED_FLAG;
+
+      // Recursively compare objects (susceptible to call stack limits).
+      stack.set(object, other);
+      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+      stack['delete'](object);
+      return result;
+
+    case symbolTag:
+      if (symbolValueOf) {
+        return symbolValueOf.call(object) == symbolValueOf.call(other);
+      }
+  }
+  return false;
+}
+
+module.exports = equalByTag;
+
+
+/***/ }),
+/* 418 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var root = __webpack_require__(5);
+
+/** Built-in value references. */
+var Uint8Array = root.Uint8Array;
+
+module.exports = Uint8Array;
+
+
+/***/ }),
+/* 419 */
+/***/ (function(module, exports) {
+
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+  var index = -1,
+      result = Array(map.size);
+
+  map.forEach(function(value, key) {
+    result[++index] = [key, value];
+  });
+  return result;
+}
+
+module.exports = mapToArray;
+
+
+/***/ }),
+/* 420 */
+/***/ (function(module, exports) {
+
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+  var index = -1,
+      result = Array(set.size);
+
+  set.forEach(function(value) {
+    result[++index] = value;
+  });
+  return result;
+}
+
+module.exports = setToArray;
+
+
+/***/ }),
+/* 421 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getAllKeys = __webpack_require__(422);
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+      objProps = getAllKeys(object),
+      objLength = objProps.length,
+      othProps = getAllKeys(other),
+      othLength = othProps.length;
+
+  if (objLength != othLength && !isPartial) {
+    return false;
+  }
+  var index = objLength;
+  while (index--) {
+    var key = objProps[index];
+    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+      return false;
+    }
+  }
+  // Assume cyclic values are equal.
+  var stacked = stack.get(object);
+  if (stacked && stack.get(other)) {
+    return stacked == other;
+  }
+  var result = true;
+  stack.set(object, other);
+  stack.set(other, object);
+
+  var skipCtor = isPartial;
+  while (++index < objLength) {
+    key = objProps[index];
+    var objValue = object[key],
+        othValue = other[key];
+
+    if (customizer) {
+      var compared = isPartial
+        ? customizer(othValue, objValue, key, other, object, stack)
+        : customizer(objValue, othValue, key, object, other, stack);
+    }
+    // Recursively compare objects (susceptible to call stack limits).
+    if (!(compared === undefined
+          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+          : compared
+        )) {
+      result = false;
+      break;
+    }
+    skipCtor || (skipCtor = key == 'constructor');
+  }
+  if (result && !skipCtor) {
+    var objCtor = object.constructor,
+        othCtor = other.constructor;
+
+    // Non `Object` object instances with different constructors are not equal.
+    if (objCtor != othCtor &&
+        ('constructor' in object && 'constructor' in other) &&
+        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+          typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+      result = false;
+    }
+  }
+  stack['delete'](object);
+  stack['delete'](other);
+  return result;
+}
+
+module.exports = equalObjects;
+
+
+/***/ }),
+/* 422 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetAllKeys = __webpack_require__(101),
+    getSymbols = __webpack_require__(103),
+    keys = __webpack_require__(19);
+
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+  return baseGetAllKeys(object, keys, getSymbols);
+}
+
+module.exports = getAllKeys;
+
+
+/***/ }),
+/* 423 */
+/***/ (function(module, exports) {
+
+/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+  var index = -1,
+      length = array == null ? 0 : array.length,
+      resIndex = 0,
+      result = [];
+
+  while (++index < length) {
+    var value = array[index];
+    if (predicate(value, index, array)) {
+      result[resIndex++] = value;
+    }
+  }
+  return result;
+}
+
+module.exports = arrayFilter;
+
+
+/***/ }),
+/* 424 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getNative = __webpack_require__(16),
+    root = __webpack_require__(5);
+
+/* Built-in method references that are verified to be native. */
+var DataView = getNative(root, 'DataView');
+
+module.exports = DataView;
+
+
+/***/ }),
+/* 425 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getNative = __webpack_require__(16),
+    root = __webpack_require__(5);
+
+/* Built-in method references that are verified to be native. */
+var Promise = getNative(root, 'Promise');
+
+module.exports = Promise;
+
+
+/***/ }),
+/* 426 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getNative = __webpack_require__(16),
+    root = __webpack_require__(5);
+
+/* Built-in method references that are verified to be native. */
+var Set = getNative(root, 'Set');
+
+module.exports = Set;
+
+
+/***/ }),
+/* 427 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isStrictComparable = __webpack_require__(106),
+    keys = __webpack_require__(19);
+
+/**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+  var result = keys(object),
+      length = result.length;
+
+  while (length--) {
+    var key = result[length],
+        value = object[key];
+
+    result[length] = [key, value, isStrictComparable(value)];
+  }
+  return result;
+}
+
+module.exports = getMatchData;
+
+
+/***/ }),
+/* 428 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseIsEqual = __webpack_require__(99),
+    get = __webpack_require__(429),
+    hasIn = __webpack_require__(434),
+    isKey = __webpack_require__(58),
+    isStrictComparable = __webpack_require__(106),
+    matchesStrictComparable = __webpack_require__(107),
+    toKey = __webpack_require__(24);
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+    COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatchesProperty(path, srcValue) {
+  if (isKey(path) && isStrictComparable(srcValue)) {
+    return matchesStrictComparable(toKey(path), srcValue);
+  }
+  return function(object) {
+    var objValue = get(object, path);
+    return (objValue === undefined && objValue === srcValue)
+      ? hasIn(object, path)
+      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+  };
+}
+
+module.exports = baseMatchesProperty;
+
+
+/***/ }),
+/* 429 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGet = __webpack_require__(57);
+
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+  var result = object == null ? undefined : baseGet(object, path);
+  return result === undefined ? defaultValue : result;
+}
+
+module.exports = get;
+
+
+/***/ }),
+/* 430 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var memoizeCapped = __webpack_require__(431);
+
+/** Used to match property names within property paths. */
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = memoizeCapped(function(string) {
+  var result = [];
+  if (string.charCodeAt(0) === 46 /* . */) {
+    result.push('');
+  }
+  string.replace(rePropName, function(match, number, quote, subString) {
+    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+  });
+  return result;
+});
+
+module.exports = stringToPath;
+
+
+/***/ }),
+/* 431 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var memoize = __webpack_require__(432);
+
+/** Used as the maximum memoize cache size. */
+var MAX_MEMOIZE_SIZE = 500;
+
+/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+function memoizeCapped(func) {
+  var result = memoize(func, function(key) {
+    if (cache.size === MAX_MEMOIZE_SIZE) {
+      cache.clear();
+    }
+    return key;
+  });
+
+  var cache = result.cache;
+  return result;
+}
+
+module.exports = memoizeCapped;
+
+
+/***/ }),
+/* 432 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var MapCache = __webpack_require__(56);
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+function memoize(func, resolver) {
+  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+    throw new TypeError(FUNC_ERROR_TEXT);
+  }
+  var memoized = function() {
+    var args = arguments,
+        key = resolver ? resolver.apply(this, args) : args[0],
+        cache = memoized.cache;
+
+    if (cache.has(key)) {
+      return cache.get(key);
+    }
+    var result = func.apply(this, args);
+    memoized.cache = cache.set(key, result) || cache;
+    return result;
+  };
+  memoized.cache = new (memoize.Cache || MapCache);
+  return memoized;
+}
+
+// Expose `MapCache`.
+memoize.Cache = MapCache;
+
+module.exports = memoize;
+
+
+/***/ }),
+/* 433 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var Symbol = __webpack_require__(29),
+    arrayMap = __webpack_require__(50),
+    isArray = __webpack_require__(6),
+    isSymbol = __webpack_require__(28);
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+    symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+  // Exit early for strings to avoid a performance hit in some environments.
+  if (typeof value == 'string') {
+    return value;
+  }
+  if (isArray(value)) {
+    // Recursively convert values (susceptible to call stack limits).
+    return arrayMap(value, baseToString) + '';
+  }
+  if (isSymbol(value)) {
+    return symbolToString ? symbolToString.call(value) : '';
+  }
+  var result = (value + '');
+  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = baseToString;
+
+
+/***/ }),
+/* 434 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseHasIn = __webpack_require__(435),
+    hasPath = __webpack_require__(436);
+
+/**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+function hasIn(object, path) {
+  return object != null && hasPath(object, path, baseHasIn);
+}
+
+module.exports = hasIn;
+
+
+/***/ }),
+/* 435 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHasIn(object, key) {
+  return object != null && key in Object(object);
+}
+
+module.exports = baseHasIn;
+
+
+/***/ }),
+/* 436 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var castPath = __webpack_require__(37),
+    isArguments = __webpack_require__(70),
+    isArray = __webpack_require__(6),
+    isIndex = __webpack_require__(22),
+    isLength = __webpack_require__(48),
+    toKey = __webpack_require__(24);
+
+/**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+function hasPath(object, path, hasFunc) {
+  path = castPath(path, object);
+
+  var index = -1,
+      length = path.length,
+      result = false;
+
+  while (++index < length) {
+    var key = toKey(path[index]);
+    if (!(result = object != null && hasFunc(object, key))) {
+      break;
+    }
+    object = object[key];
+  }
+  if (result || ++index != length) {
+    return result;
+  }
+  length = object == null ? 0 : object.length;
+  return !!length && isLength(length) && isIndex(key, length) &&
+    (isArray(object) || isArguments(object));
+}
+
+module.exports = hasPath;
+
+
+/***/ }),
+/* 437 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseProperty = __webpack_require__(109),
+    basePropertyDeep = __webpack_require__(438),
+    isKey = __webpack_require__(58),
+    toKey = __webpack_require__(24);
+
+/**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ *   { 'a': { 'b': 2 } },
+ *   { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+function property(path) {
+  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+}
+
+module.exports = property;
+
+
+/***/ }),
+/* 438 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGet = __webpack_require__(57);
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyDeep(path) {
+  return function(object) {
+    return baseGet(object, path);
+  };
+}
+
+module.exports = basePropertyDeep;
+
+
+/***/ }),
+/* 439 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGet = __webpack_require__(57),
+    baseSet = __webpack_require__(440),
+    castPath = __webpack_require__(37);
+
+/**
+ * The base implementation of  `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+function basePickBy(object, paths, predicate) {
+  var index = -1,
+      length = paths.length,
+      result = {};
+
+  while (++index < length) {
+    var path = paths[index],
+        value = baseGet(object, path);
+
+    if (predicate(value, path)) {
+      baseSet(result, castPath(path, object), value);
+    }
+  }
+  return result;
+}
+
+module.exports = basePickBy;
+
+
+/***/ }),
+/* 440 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var assignValue = __webpack_require__(76),
+    castPath = __webpack_require__(37),
+    isIndex = __webpack_require__(22),
+    isObject = __webpack_require__(9),
+    toKey = __webpack_require__(24);
+
+/**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseSet(object, path, value, customizer) {
+  if (!isObject(object)) {
+    return object;
+  }
+  path = castPath(path, object);
+
+  var index = -1,
+      length = path.length,
+      lastIndex = length - 1,
+      nested = object;
+
+  while (nested != null && ++index < length) {
+    var key = toKey(path[index]),
+        newValue = value;
+
+    if (index != lastIndex) {
+      var objValue = nested[key];
+      newValue = customizer ? customizer(objValue, key, nested) : undefined;
+      if (newValue === undefined) {
+        newValue = isObject(objValue)
+          ? objValue
+          : (isIndex(path[index + 1]) ? [] : {});
+      }
+    }
+    assignValue(nested, key, newValue);
+    nested = nested[key];
+  }
+  return object;
+}
+
+module.exports = baseSet;
+
+
+/***/ }),
+/* 441 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseGetAllKeys = __webpack_require__(101),
+    getSymbolsIn = __webpack_require__(442),
+    keysIn = __webpack_require__(83);
+
+/**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeysIn(object) {
+  return baseGetAllKeys(object, keysIn, getSymbolsIn);
+}
+
+module.exports = getAllKeysIn;
+
+
+/***/ }),
+/* 442 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var arrayPush = __webpack_require__(102),
+    getPrototype = __webpack_require__(443),
+    getSymbols = __webpack_require__(103),
+    stubArray = __webpack_require__(104);
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+  var result = [];
+  while (object) {
+    arrayPush(result, getSymbols(object));
+    object = getPrototype(object);
+  }
+  return result;
+};
+
+module.exports = getSymbolsIn;
+
+
+/***/ }),
+/* 443 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var overArg = __webpack_require__(75);
+
+/** Built-in value references. */
+var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+module.exports = getPrototype;
+
+
+/***/ }),
+/* 444 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var asciiSize = __webpack_require__(445),
+    hasUnicode = __webpack_require__(446),
+    unicodeSize = __webpack_require__(447);
+
+/**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+function stringSize(string) {
+  return hasUnicode(string)
+    ? unicodeSize(string)
+    : asciiSize(string);
+}
+
+module.exports = stringSize;
+
+
+/***/ }),
+/* 445 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var baseProperty = __webpack_require__(109);
+
+/**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+var asciiSize = baseProperty('length');
+
+module.exports = asciiSize;
+
+
+/***/ }),
+/* 446 */
+/***/ (function(module, exports) {
+
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+    rsComboMarksRange = '\\u0300-\\u036f',
+    reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+    rsComboSymbolsRange = '\\u20d0-\\u20ff',
+    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+    rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsZWJ = '\\u200d';
+
+/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
+
+/**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+function hasUnicode(string) {
+  return reHasUnicode.test(string);
+}
+
+module.exports = hasUnicode;
+
+
+/***/ }),
+/* 447 */
+/***/ (function(module, exports) {
+
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+    rsComboMarksRange = '\\u0300-\\u036f',
+    reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+    rsComboSymbolsRange = '\\u20d0-\\u20ff',
+    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+    rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange + ']',
+    rsCombo = '[' + rsComboRange + ']',
+    rsFitz = '\\ud83c[\\udffb-\\udfff]',
+    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+    rsNonAstral = '[^' + rsAstralRange + ']',
+    rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+    rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+    rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+    rsOptVar = '[' + rsVarRange + ']?',
+    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+    rsSeq = rsOptVar + reOptMod + rsOptJoin,
+    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+/**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+function unicodeSize(string) {
+  var result = reUnicode.lastIndex = 0;
+  while (reUnicode.test(string)) {
+    ++result;
+  }
+  return result;
+}
+
+module.exports = unicodeSize;
+
+
+/***/ }),
+/* 448 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var basePropertyOf = __webpack_require__(449);
+
+/** Used to map characters to HTML entities. */
+var htmlEscapes = {
+  '&': '&amp;',
+  '<': '&lt;',
+  '>': '&gt;',
+  '"': '&quot;',
+  "'": '&#39;'
+};
+
+/**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+module.exports = escapeHtmlChar;
+
+
+/***/ }),
+/* 449 */
+/***/ (function(module, exports) {
+
+/**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyOf(object) {
+  return function(key) {
+    return object == null ? undefined : object[key];
+  };
+}
+
+module.exports = basePropertyOf;
+
+
+/***/ }),
+/* 450 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var vnode_1 = require("./vnode");
+var is = require("./is");
+function addNS(data, children, sel) {
+    data.ns = 'http://www.w3.org/2000/svg';
+    if (sel !== 'foreignObject' && children !== undefined) {
+        for (var i = 0; i < children.length; ++i) {
+            var childData = children[i].data;
+            if (childData !== undefined) {
+                addNS(childData, children[i].children, children[i].sel);
+            }
+        }
+    }
+}
+function h(sel, b, c) {
+    var data = {}, children, text, i;
+    if (c !== undefined) {
+        data = b;
+        if (is.array(c)) {
+            children = c;
+        }
+        else if (is.primitive(c)) {
+            text = c;
+        }
+        else if (c && c.sel) {
+            children = [c];
+        }
+    }
+    else if (b !== undefined) {
+        if (is.array(b)) {
+            children = b;
+        }
+        else if (is.primitive(b)) {
+            text = b;
+        }
+        else if (b && b.sel) {
+            children = [b];
+        }
+        else {
+            data = b;
+        }
+    }
+    if (is.array(children)) {
+        for (i = 0; i < children.length; ++i) {
+            if (is.primitive(children[i]))
+                children[i] = vnode_1.vnode(undefined, undefined, undefined, children[i]);
+        }
+    }
+    if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' &&
+        (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) {
+        addNS(data, children, sel);
+    }
+    return vnode_1.vnode(sel, data, children, text, undefined);
+}
+exports.h = h;
+;
+exports.default = h;
+
+},{"./is":3,"./vnode":6}],2:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function createElement(tagName) {
+    return document.createElement(tagName);
+}
+function createElementNS(namespaceURI, qualifiedName) {
+    return document.createElementNS(namespaceURI, qualifiedName);
+}
+function createTextNode(text) {
+    return document.createTextNode(text);
+}
+function createComment(text) {
+    return document.createComment(text);
+}
+function insertBefore(parentNode, newNode, referenceNode) {
+    parentNode.insertBefore(newNode, referenceNode);
+}
+function removeChild(node, child) {
+    node.removeChild(child);
+}
+function appendChild(node, child) {
+    node.appendChild(child);
+}
+function parentNode(node) {
+    return node.parentNode;
+}
+function nextSibling(node) {
+    return node.nextSibling;
+}
+function tagName(elm) {
+    return elm.tagName;
+}
+function setTextContent(node, text) {
+    node.textContent = text;
+}
+function getTextContent(node) {
+    return node.textContent;
+}
+function isElement(node) {
+    return node.nodeType === 1;
+}
+function isText(node) {
+    return node.nodeType === 3;
+}
+function isComment(node) {
+    return node.nodeType === 8;
+}
+exports.htmlDomApi = {
+    createElement: createElement,
+    createElementNS: createElementNS,
+    createTextNode: createTextNode,
+    createComment: createComment,
+    insertBefore: insertBefore,
+    removeChild: removeChild,
+    appendChild: appendChild,
+    parentNode: parentNode,
+    nextSibling: nextSibling,
+    tagName: tagName,
+    setTextContent: setTextContent,
+    getTextContent: getTextContent,
+    isElement: isElement,
+    isText: isText,
+    isComment: isComment,
+};
+exports.default = exports.htmlDomApi;
+
+},{}],3:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.array = Array.isArray;
+function primitive(s) {
+    return typeof s === 'string' || typeof s === 'number';
+}
+exports.primitive = primitive;
+
+},{}],4:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var vnode_1 = require("./vnode");
+var is = require("./is");
+var htmldomapi_1 = require("./htmldomapi");
+function isUndef(s) { return s === undefined; }
+function isDef(s) { return s !== undefined; }
+var emptyNode = vnode_1.default('', {}, [], undefined, undefined);
+function sameVnode(vnode1, vnode2) {
+    return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
+}
+function isVnode(vnode) {
+    return vnode.sel !== undefined;
+}
+function createKeyToOldIdx(children, beginIdx, endIdx) {
+    var i, map = {}, key, ch;
+    for (i = beginIdx; i <= endIdx; ++i) {
+        ch = children[i];
+        if (ch != null) {
+            key = ch.key;
+            if (key !== undefined)
+                map[key] = i;
+        }
+    }
+    return map;
+}
+var hooks = ['create', 'update', 'remove', 'destroy', 'pre', 'post'];
+var h_1 = require("./h");
+exports.h = h_1.h;
+var thunk_1 = require("./thunk");
+exports.thunk = thunk_1.thunk;
+function init(modules, domApi) {
+    var i, j, cbs = {};
+    var api = domApi !== undefined ? domApi : htmldomapi_1.default;
+    for (i = 0; i < hooks.length; ++i) {
+        cbs[hooks[i]] = [];
+        for (j = 0; j < modules.length; ++j) {
+            var hook = modules[j][hooks[i]];
+            if (hook !== undefined) {
+                cbs[hooks[i]].push(hook);
+            }
+        }
+    }
+    function emptyNodeAt(elm) {
+        var id = elm.id ? '#' + elm.id : '';
+        var c = elm.className ? '.' + elm.className.split(' ').join('.') : '';
+        return vnode_1.default(api.tagName(elm).toLowerCase() + id + c, {}, [], undefined, elm);
+    }
+    function createRmCb(childElm, listeners) {
+        return function rmCb() {
+            if (--listeners === 0) {
+                var parent_1 = api.parentNode(childElm);
+                api.removeChild(parent_1, childElm);
+            }
+        };
+    }
+    function createElm(vnode, insertedVnodeQueue) {
+        var i, data = vnode.data;
+        if (data !== undefined) {
+            if (isDef(i = data.hook) && isDef(i = i.init)) {
+                i(vnode);
+                data = vnode.data;
+            }
+        }
+        var children = vnode.children, sel = vnode.sel;
+        if (sel === '!') {
+            if (isUndef(vnode.text)) {
+                vnode.text = '';
+            }
+            vnode.elm = api.createComment(vnode.text);
+        }
+        else if (sel !== undefined) {
+            // Parse selector
+            var hashIdx = sel.indexOf('#');
+            var dotIdx = sel.indexOf('.', hashIdx);
+            var hash = hashIdx > 0 ? hashIdx : sel.length;
+            var dot = dotIdx > 0 ? dotIdx : sel.length;
+            var tag = hashIdx !== -1 || dotIdx !== -1 ? sel.slice(0, Math.min(hash, dot)) : sel;
+            var elm = vnode.elm = isDef(data) && isDef(i = data.ns) ? api.createElementNS(i, tag)
+                : api.createElement(tag);
+            if (hash < dot)
+                elm.setAttribute('id', sel.slice(hash + 1, dot));
+            if (dotIdx > 0)
+                elm.setAttribute('class', sel.slice(dot + 1).replace(/\./g, ' '));
+            for (i = 0; i < cbs.create.length; ++i)
+                cbs.create[i](emptyNode, vnode);
+            if (is.array(children)) {
+                for (i = 0; i < children.length; ++i) {
+                    var ch = children[i];
+                    if (ch != null) {
+                        api.appendChild(elm, createElm(ch, insertedVnodeQueue));
+                    }
+                }
+            }
+            else if (is.primitive(vnode.text)) {
+                api.appendChild(elm, api.createTextNode(vnode.text));
+            }
+            i = vnode.data.hook; // Reuse variable
+            if (isDef(i)) {
+                if (i.create)
+                    i.create(emptyNode, vnode);
+                if (i.insert)
+                    insertedVnodeQueue.push(vnode);
+            }
+        }
+        else {
+            vnode.elm = api.createTextNode(vnode.text);
+        }
+        return vnode.elm;
+    }
+    function addVnodes(parentElm, before, vnodes, startIdx, endIdx, insertedVnodeQueue) {
+        for (; startIdx <= endIdx; ++startIdx) {
+            var ch = vnodes[startIdx];
+            if (ch != null) {
+                api.insertBefore(parentElm, createElm(ch, insertedVnodeQueue), before);
+            }
+        }
+    }
+    function invokeDestroyHook(vnode) {
+        var i, j, data = vnode.data;
+        if (data !== undefined) {
+            if (isDef(i = data.hook) && isDef(i = i.destroy))
+                i(vnode);
+            for (i = 0; i < cbs.destroy.length; ++i)
+                cbs.destroy[i](vnode);
+            if (vnode.children !== undefined) {
+                for (j = 0; j < vnode.children.length; ++j) {
+                    i = vnode.children[j];
+                    if (i != null && typeof i !== "string") {
+                        invokeDestroyHook(i);
+                    }
+                }
+            }
+        }
+    }
+    function removeVnodes(parentElm, vnodes, startIdx, endIdx) {
+        for (; startIdx <= endIdx; ++startIdx) {
+            var i_1 = void 0, listeners = void 0, rm = void 0, ch = vnodes[startIdx];
+            if (ch != null) {
+                if (isDef(ch.sel)) {
+                    invokeDestroyHook(ch);
+                    listeners = cbs.remove.length + 1;
+                    rm = createRmCb(ch.elm, listeners);
+                    for (i_1 = 0; i_1 < cbs.remove.length; ++i_1)
+                        cbs.remove[i_1](ch, rm);
+                    if (isDef(i_1 = ch.data) && isDef(i_1 = i_1.hook) && isDef(i_1 = i_1.remove)) {
+                        i_1(ch, rm);
+                    }
+                    else {
+                        rm();
+                    }
+                }
+                else {
+                    api.removeChild(parentElm, ch.elm);
+                }
+            }
+        }
+    }
+    function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue) {
+        var oldStartIdx = 0, newStartIdx = 0;
+        var oldEndIdx = oldCh.length - 1;
+        var oldStartVnode = oldCh[0];
+        var oldEndVnode = oldCh[oldEndIdx];
+        var newEndIdx = newCh.length - 1;
+        var newStartVnode = newCh[0];
+        var newEndVnode = newCh[newEndIdx];
+        var oldKeyToIdx;
+        var idxInOld;
+        var elmToMove;
+        var before;
+        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
+            if (oldStartVnode == null) {
+                oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left
+            }
+            else if (oldEndVnode == null) {
+                oldEndVnode = oldCh[--oldEndIdx];
+            }
+            else if (newStartVnode == null) {
+                newStartVnode = newCh[++newStartIdx];
+            }
+            else if (newEndVnode == null) {
+                newEndVnode = newCh[--newEndIdx];
+            }
+            else if (sameVnode(oldStartVnode, newStartVnode)) {
+                patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
+                oldStartVnode = oldCh[++oldStartIdx];
+                newStartVnode = newCh[++newStartIdx];
+            }
+            else if (sameVnode(oldEndVnode, newEndVnode)) {
+                patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
+                oldEndVnode = oldCh[--oldEndIdx];
+                newEndVnode = newCh[--newEndIdx];
+            }
+            else if (sameVnode(oldStartVnode, newEndVnode)) {
+                patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
+                api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));
+                oldStartVnode = oldCh[++oldStartIdx];
+                newEndVnode = newCh[--newEndIdx];
+            }
+            else if (sameVnode(oldEndVnode, newStartVnode)) {
+                patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
+                api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
+                oldEndVnode = oldCh[--oldEndIdx];
+                newStartVnode = newCh[++newStartIdx];
+            }
+            else {
+                if (oldKeyToIdx === undefined) {
+                    oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
+                }
+                idxInOld = oldKeyToIdx[newStartVnode.key];
+                if (isUndef(idxInOld)) {
+                    api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);
+                    newStartVnode = newCh[++newStartIdx];
+                }
+                else {
+                    elmToMove = oldCh[idxInOld];
+                    if (elmToMove.sel !== newStartVnode.sel) {
+                        api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);
+                    }
+                    else {
+                        patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);
+                        oldCh[idxInOld] = undefined;
+                        api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);
+                    }
+                    newStartVnode = newCh[++newStartIdx];
+                }
+            }
+        }
+        if (oldStartIdx > oldEndIdx) {
+            before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;
+            addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
+        }
+        else if (newStartIdx > newEndIdx) {
+            removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
+        }
+    }
+    function patchVnode(oldVnode, vnode, insertedVnodeQueue) {
+        var i, hook;
+        if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) {
+            i(oldVnode, vnode);
+        }
+        var elm = vnode.elm = oldVnode.elm;
+        var oldCh = oldVnode.children;
+        var ch = vnode.children;
+        if (oldVnode === vnode)
+            return;
+        if (vnode.data !== undefined) {
+            for (i = 0; i < cbs.update.length; ++i)
+                cbs.update[i](oldVnode, vnode);
+            i = vnode.data.hook;
+            if (isDef(i) && isDef(i = i.update))
+                i(oldVnode, vnode);
+        }
+        if (isUndef(vnode.text)) {
+            if (isDef(oldCh) && isDef(ch)) {
+                if (oldCh !== ch)
+                    updateChildren(elm, oldCh, ch, insertedVnodeQueue);
+            }
+            else if (isDef(ch)) {
+                if (isDef(oldVnode.text))
+                    api.setTextContent(elm, '');
+                addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
+            }
+            else if (isDef(oldCh)) {
+                removeVnodes(elm, oldCh, 0, oldCh.length - 1);
+            }
+            else if (isDef(oldVnode.text)) {
+                api.setTextContent(elm, '');
+            }
+        }
+        else if (oldVnode.text !== vnode.text) {
+            api.setTextContent(elm, vnode.text);
+        }
+        if (isDef(hook) && isDef(i = hook.postpatch)) {
+            i(oldVnode, vnode);
+        }
+    }
+    return function patch(oldVnode, vnode) {
+        var i, elm, parent;
+        var insertedVnodeQueue = [];
+        for (i = 0; i < cbs.pre.length; ++i)
+            cbs.pre[i]();
+        if (!isVnode(oldVnode)) {
+            oldVnode = emptyNodeAt(oldVnode);
+        }
+        if (sameVnode(oldVnode, vnode)) {
+            patchVnode(oldVnode, vnode, insertedVnodeQueue);
+        }
+        else {
+            elm = oldVnode.elm;
+            parent = api.parentNode(elm);
+            createElm(vnode, insertedVnodeQueue);
+            if (parent !== null) {
+                api.insertBefore(parent, vnode.elm, api.nextSibling(elm));
+                removeVnodes(parent, [oldVnode], 0, 0);
+            }
+        }
+        for (i = 0; i < insertedVnodeQueue.length; ++i) {
+            insertedVnodeQueue[i].data.hook.insert(insertedVnodeQueue[i]);
+        }
+        for (i = 0; i < cbs.post.length; ++i)
+            cbs.post[i]();
+        return vnode;
+    };
+}
+exports.init = init;
+
+},{"./h":1,"./htmldomapi":2,"./is":3,"./thunk":5,"./vnode":6}],5:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var h_1 = require("./h");
+function copyToThunk(vnode, thunk) {
+    thunk.elm = vnode.elm;
+    vnode.data.fn = thunk.data.fn;
+    vnode.data.args = thunk.data.args;
+    thunk.data = vnode.data;
+    thunk.children = vnode.children;
+    thunk.text = vnode.text;
+    thunk.elm = vnode.elm;
+}
+function init(thunk) {
+    var cur = thunk.data;
+    var vnode = cur.fn.apply(undefined, cur.args);
+    copyToThunk(vnode, thunk);
+}
+function prepatch(oldVnode, thunk) {
+    var i, old = oldVnode.data, cur = thunk.data;
+    var oldArgs = old.args, args = cur.args;
+    if (old.fn !== cur.fn || oldArgs.length !== args.length) {
+        copyToThunk(cur.fn.apply(undefined, args), thunk);
+        return;
+    }
+    for (i = 0; i < args.length; ++i) {
+        if (oldArgs[i] !== args[i]) {
+            copyToThunk(cur.fn.apply(undefined, args), thunk);
+            return;
+        }
+    }
+    copyToThunk(oldVnode, thunk);
+}
+exports.thunk = function thunk(sel, key, fn, args) {
+    if (args === undefined) {
+        args = fn;
+        fn = key;
+        key = undefined;
+    }
+    return h_1.h(sel, {
+        key: key,
+        hook: { init: init, prepatch: prepatch },
+        fn: fn,
+        args: args
+    });
+};
+exports.default = exports.thunk;
+
+},{"./h":1}],6:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function vnode(sel, data, children, text, elm) {
+    var key = data === undefined ? undefined : data.key;
+    return { sel: sel, data: data, children: children,
+        text: text, elm: elm, key: key };
+}
+exports.vnode = vnode;
+exports.default = vnode;
+
+},{}]},{},[4])(4)
+});
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiaC5qcyIsImh0bWxkb21hcGkuanMiLCJpcy5qcyIsInNuYWJiZG9tLmpzIiwidGh1bmsuanMiLCJ2bm9kZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDMURBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNqRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNQQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNsVEE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUM5Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgdm5vZGVfMSA9IHJlcXVpcmUoXCIuL3Zub2RlXCIpO1xudmFyIGlzID0gcmVxdWlyZShcIi4vaXNcIik7XG5mdW5jdGlvbiBhZGROUyhkYXRhLCBjaGlsZHJlbiwgc2VsKSB7XG4gICAgZGF0YS5ucyA9ICdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc7XG4gICAgaWYgKHNlbCAhPT0gJ2ZvcmVpZ25PYmplY3QnICYmIGNoaWxkcmVuICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgdmFyIGNoaWxkRGF0YSA9IGNoaWxkcmVuW2ldLmRhdGE7XG4gICAgICAgICAgICBpZiAoY2hpbGREYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBhZGROUyhjaGlsZERhdGEsIGNoaWxkcmVuW2ldLmNoaWxkcmVuLCBjaGlsZHJlbltpXS5zZWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuZnVuY3Rpb24gaChzZWwsIGIsIGMpIHtcbiAgICB2YXIgZGF0YSA9IHt9LCBjaGlsZHJlbiwgdGV4dCwgaTtcbiAgICBpZiAoYyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGRhdGEgPSBiO1xuICAgICAgICBpZiAoaXMuYXJyYXkoYykpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gYztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUoYykpIHtcbiAgICAgICAgICAgIHRleHQgPSBjO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGMgJiYgYy5zZWwpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gW2NdO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKGIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoaXMuYXJyYXkoYikpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gYjtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUoYikpIHtcbiAgICAgICAgICAgIHRleHQgPSBiO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGIgJiYgYi5zZWwpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gW2JdO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZGF0YSA9IGI7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKGlzLmFycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY2hpbGRyZW4ubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGlmIChpcy5wcmltaXRpdmUoY2hpbGRyZW5baV0pKVxuICAgICAgICAgICAgICAgIGNoaWxkcmVuW2ldID0gdm5vZGVfMS52bm9kZSh1bmRlZmluZWQsIHVuZGVmaW5lZCwgdW5kZWZpbmVkLCBjaGlsZHJlbltpXSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKHNlbFswXSA9PT0gJ3MnICYmIHNlbFsxXSA9PT0gJ3YnICYmIHNlbFsyXSA9PT0gJ2cnICYmXG4gICAgICAgIChzZWwubGVuZ3RoID09PSAzIHx8IHNlbFszXSA9PT0gJy4nIHx8IHNlbFszXSA9PT0gJyMnKSkge1xuICAgICAgICBhZGROUyhkYXRhLCBjaGlsZHJlbiwgc2VsKTtcbiAgICB9XG4gICAgcmV0dXJuIHZub2RlXzEudm5vZGUoc2VsLCBkYXRhLCBjaGlsZHJlbiwgdGV4dCwgdW5kZWZpbmVkKTtcbn1cbmV4cG9ydHMuaCA9IGg7XG47XG5leHBvcnRzLmRlZmF1bHQgPSBoO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbmZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnQodGFnTmFtZSkge1xuICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHRhZ05hbWUpO1xufVxuZnVuY3Rpb24gY3JlYXRlRWxlbWVudE5TKG5hbWVzcGFjZVVSSSwgcXVhbGlmaWVkTmFtZSkge1xuICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMobmFtZXNwYWNlVVJJLCBxdWFsaWZpZWROYW1lKTtcbn1cbmZ1bmN0aW9uIGNyZWF0ZVRleHROb2RlKHRleHQpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUodGV4dCk7XG59XG5mdW5jdGlvbiBjcmVhdGVDb21tZW50KHRleHQpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlQ29tbWVudCh0ZXh0KTtcbn1cbmZ1bmN0aW9uIGluc2VydEJlZm9yZShwYXJlbnROb2RlLCBuZXdOb2RlLCByZWZlcmVuY2VOb2RlKSB7XG4gICAgcGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUobmV3Tm9kZSwgcmVmZXJlbmNlTm9kZSk7XG59XG5mdW5jdGlvbiByZW1vdmVDaGlsZChub2RlLCBjaGlsZCkge1xuICAgIG5vZGUucmVtb3ZlQ2hpbGQoY2hpbGQpO1xufVxuZnVuY3Rpb24gYXBwZW5kQ2hpbGQobm9kZSwgY2hpbGQpIHtcbiAgICBub2RlLmFwcGVuZENoaWxkKGNoaWxkKTtcbn1cbmZ1bmN0aW9uIHBhcmVudE5vZGUobm9kZSkge1xuICAgIHJldHVybiBub2RlLnBhcmVudE5vZGU7XG59XG5mdW5jdGlvbiBuZXh0U2libGluZyhub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubmV4dFNpYmxpbmc7XG59XG5mdW5jdGlvbiB0YWdOYW1lKGVsbSkge1xuICAgIHJldHVybiBlbG0udGFnTmFtZTtcbn1cbmZ1bmN0aW9uIHNldFRleHRDb250ZW50KG5vZGUsIHRleHQpIHtcbiAgICBub2RlLnRleHRDb250ZW50ID0gdGV4dDtcbn1cbmZ1bmN0aW9uIGdldFRleHRDb250ZW50KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS50ZXh0Q29udGVudDtcbn1cbmZ1bmN0aW9uIGlzRWxlbWVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubm9kZVR5cGUgPT09IDE7XG59XG5mdW5jdGlvbiBpc1RleHQobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5vZGVUeXBlID09PSAzO1xufVxuZnVuY3Rpb24gaXNDb21tZW50KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5ub2RlVHlwZSA9PT0gODtcbn1cbmV4cG9ydHMuaHRtbERvbUFwaSA9IHtcbiAgICBjcmVhdGVFbGVtZW50OiBjcmVhdGVFbGVtZW50LFxuICAgIGNyZWF0ZUVsZW1lbnROUzogY3JlYXRlRWxlbWVudE5TLFxuICAgIGNyZWF0ZVRleHROb2RlOiBjcmVhdGVUZXh0Tm9kZSxcbiAgICBjcmVhdGVDb21tZW50OiBjcmVhdGVDb21tZW50LFxuICAgIGluc2VydEJlZm9yZTogaW5zZXJ0QmVmb3JlLFxuICAgIHJlbW92ZUNoaWxkOiByZW1vdmVDaGlsZCxcbiAgICBhcHBlbmRDaGlsZDogYXBwZW5kQ2hpbGQsXG4gICAgcGFyZW50Tm9kZTogcGFyZW50Tm9kZSxcbiAgICBuZXh0U2libGluZzogbmV4dFNpYmxpbmcsXG4gICAgdGFnTmFtZTogdGFnTmFtZSxcbiAgICBzZXRUZXh0Q29udGVudDogc2V0VGV4dENvbnRlbnQsXG4gICAgZ2V0VGV4dENvbnRlbnQ6IGdldFRleHRDb250ZW50LFxuICAgIGlzRWxlbWVudDogaXNFbGVtZW50LFxuICAgIGlzVGV4dDogaXNUZXh0LFxuICAgIGlzQ29tbWVudDogaXNDb21tZW50LFxufTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuaHRtbERvbUFwaTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWh0bWxkb21hcGkuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5leHBvcnRzLmFycmF5ID0gQXJyYXkuaXNBcnJheTtcbmZ1bmN0aW9uIHByaW1pdGl2ZShzKSB7XG4gICAgcmV0dXJuIHR5cGVvZiBzID09PSAnc3RyaW5nJyB8fCB0eXBlb2YgcyA9PT0gJ251bWJlcic7XG59XG5leHBvcnRzLnByaW1pdGl2ZSA9IHByaW1pdGl2ZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlzLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIHZub2RlXzEgPSByZXF1aXJlKFwiLi92bm9kZVwiKTtcbnZhciBpcyA9IHJlcXVpcmUoXCIuL2lzXCIpO1xudmFyIGh0bWxkb21hcGlfMSA9IHJlcXVpcmUoXCIuL2h0bWxkb21hcGlcIik7XG5mdW5jdGlvbiBpc1VuZGVmKHMpIHsgcmV0dXJuIHMgPT09IHVuZGVmaW5lZDsgfVxuZnVuY3Rpb24gaXNEZWYocykgeyByZXR1cm4gcyAhPT0gdW5kZWZpbmVkOyB9XG52YXIgZW1wdHlOb2RlID0gdm5vZGVfMS5kZWZhdWx0KCcnLCB7fSwgW10sIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTtcbmZ1bmN0aW9uIHNhbWVWbm9kZSh2bm9kZTEsIHZub2RlMikge1xuICAgIHJldHVybiB2bm9kZTEua2V5ID09PSB2bm9kZTIua2V5ICYmIHZub2RlMS5zZWwgPT09IHZub2RlMi5zZWw7XG59XG5mdW5jdGlvbiBpc1Zub2RlKHZub2RlKSB7XG4gICAgcmV0dXJuIHZub2RlLnNlbCAhPT0gdW5kZWZpbmVkO1xufVxuZnVuY3Rpb24gY3JlYXRlS2V5VG9PbGRJZHgoY2hpbGRyZW4sIGJlZ2luSWR4LCBlbmRJZHgpIHtcbiAgICB2YXIgaSwgbWFwID0ge30sIGtleSwgY2g7XG4gICAgZm9yIChpID0gYmVnaW5JZHg7IGkgPD0gZW5kSWR4OyArK2kpIHtcbiAgICAgICAgY2ggPSBjaGlsZHJlbltpXTtcbiAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgIGtleSA9IGNoLmtleTtcbiAgICAgICAgICAgIGlmIChrZXkgIT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICBtYXBba2V5XSA9IGk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG1hcDtcbn1cbnZhciBob29rcyA9IFsnY3JlYXRlJywgJ3VwZGF0ZScsICdyZW1vdmUnLCAnZGVzdHJveScsICdwcmUnLCAncG9zdCddO1xudmFyIGhfMSA9IHJlcXVpcmUoXCIuL2hcIik7XG5leHBvcnRzLmggPSBoXzEuaDtcbnZhciB0aHVua18xID0gcmVxdWlyZShcIi4vdGh1bmtcIik7XG5leHBvcnRzLnRodW5rID0gdGh1bmtfMS50aHVuaztcbmZ1bmN0aW9uIGluaXQobW9kdWxlcywgZG9tQXBpKSB7XG4gICAgdmFyIGksIGosIGNicyA9IHt9O1xuICAgIHZhciBhcGkgPSBkb21BcGkgIT09IHVuZGVmaW5lZCA/IGRvbUFwaSA6IGh0bWxkb21hcGlfMS5kZWZhdWx0O1xuICAgIGZvciAoaSA9IDA7IGkgPCBob29rcy5sZW5ndGg7ICsraSkge1xuICAgICAgICBjYnNbaG9va3NbaV1dID0gW107XG4gICAgICAgIGZvciAoaiA9IDA7IGogPCBtb2R1bGVzLmxlbmd0aDsgKytqKSB7XG4gICAgICAgICAgICB2YXIgaG9vayA9IG1vZHVsZXNbal1baG9va3NbaV1dO1xuICAgICAgICAgICAgaWYgKGhvb2sgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGNic1tob29rc1tpXV0ucHVzaChob29rKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBlbXB0eU5vZGVBdChlbG0pIHtcbiAgICAgICAgdmFyIGlkID0gZWxtLmlkID8gJyMnICsgZWxtLmlkIDogJyc7XG4gICAgICAgIHZhciBjID0gZWxtLmNsYXNzTmFtZSA/ICcuJyArIGVsbS5jbGFzc05hbWUuc3BsaXQoJyAnKS5qb2luKCcuJykgOiAnJztcbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdChhcGkudGFnTmFtZShlbG0pLnRvTG93ZXJDYXNlKCkgKyBpZCArIGMsIHt9LCBbXSwgdW5kZWZpbmVkLCBlbG0pO1xuICAgIH1cbiAgICBmdW5jdGlvbiBjcmVhdGVSbUNiKGNoaWxkRWxtLCBsaXN0ZW5lcnMpIHtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIHJtQ2IoKSB7XG4gICAgICAgICAgICBpZiAoLS1saXN0ZW5lcnMgPT09IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFyZW50XzEgPSBhcGkucGFyZW50Tm9kZShjaGlsZEVsbSk7XG4gICAgICAgICAgICAgICAgYXBpLnJlbW92ZUNoaWxkKHBhcmVudF8xLCBjaGlsZEVsbSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNyZWF0ZUVsbSh2bm9kZSwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKSB7XG4gICAgICAgIHZhciBpLCBkYXRhID0gdm5vZGUuZGF0YTtcbiAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmKGkgPSBkYXRhLmhvb2spICYmIGlzRGVmKGkgPSBpLmluaXQpKSB7XG4gICAgICAgICAgICAgICAgaSh2bm9kZSk7XG4gICAgICAgICAgICAgICAgZGF0YSA9IHZub2RlLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNoaWxkcmVuID0gdm5vZGUuY2hpbGRyZW4sIHNlbCA9IHZub2RlLnNlbDtcbiAgICAgICAgaWYgKHNlbCA9PT0gJyEnKSB7XG4gICAgICAgICAgICBpZiAoaXNVbmRlZih2bm9kZS50ZXh0KSkge1xuICAgICAgICAgICAgICAgIHZub2RlLnRleHQgPSAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZub2RlLmVsbSA9IGFwaS5jcmVhdGVDb21tZW50KHZub2RlLnRleHQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHNlbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAvLyBQYXJzZSBzZWxlY3RvclxuICAgICAgICAgICAgdmFyIGhhc2hJZHggPSBzZWwuaW5kZXhPZignIycpO1xuICAgICAgICAgICAgdmFyIGRvdElkeCA9IHNlbC5pbmRleE9mKCcuJywgaGFzaElkeCk7XG4gICAgICAgICAgICB2YXIgaGFzaCA9IGhhc2hJZHggPiAwID8gaGFzaElkeCA6IHNlbC5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgZG90ID0gZG90SWR4ID4gMCA/IGRvdElkeCA6IHNlbC5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgdGFnID0gaGFzaElkeCAhPT0gLTEgfHwgZG90SWR4ICE9PSAtMSA/IHNlbC5zbGljZSgwLCBNYXRoLm1pbihoYXNoLCBkb3QpKSA6IHNlbDtcbiAgICAgICAgICAgIHZhciBlbG0gPSB2bm9kZS5lbG0gPSBpc0RlZihkYXRhKSAmJiBpc0RlZihpID0gZGF0YS5ucykgPyBhcGkuY3JlYXRlRWxlbWVudE5TKGksIHRhZylcbiAgICAgICAgICAgICAgICA6IGFwaS5jcmVhdGVFbGVtZW50KHRhZyk7XG4gICAgICAgICAgICBpZiAoaGFzaCA8IGRvdClcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdpZCcsIHNlbC5zbGljZShoYXNoICsgMSwgZG90KSk7XG4gICAgICAgICAgICBpZiAoZG90SWR4ID4gMClcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdjbGFzcycsIHNlbC5zbGljZShkb3QgKyAxKS5yZXBsYWNlKC9cXC4vZywgJyAnKSk7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY2JzLmNyZWF0ZS5sZW5ndGg7ICsraSlcbiAgICAgICAgICAgICAgICBjYnMuY3JlYXRlW2ldKGVtcHR5Tm9kZSwgdm5vZGUpO1xuICAgICAgICAgICAgaWYgKGlzLmFycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY2ggPSBjaGlsZHJlbltpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwaS5hcHBlbmRDaGlsZChlbG0sIGNyZWF0ZUVsbShjaCwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUodm5vZGUudGV4dCkpIHtcbiAgICAgICAgICAgICAgICBhcGkuYXBwZW5kQ2hpbGQoZWxtLCBhcGkuY3JlYXRlVGV4dE5vZGUodm5vZGUudGV4dCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaSA9IHZub2RlLmRhdGEuaG9vazsgLy8gUmV1c2UgdmFyaWFibGVcbiAgICAgICAgICAgIGlmIChpc0RlZihpKSkge1xuICAgICAgICAgICAgICAgIGlmIChpLmNyZWF0ZSlcbiAgICAgICAgICAgICAgICAgICAgaS5jcmVhdGUoZW1wdHlOb2RlLCB2bm9kZSk7XG4gICAgICAgICAgICAgICAgaWYgKGkuaW5zZXJ0KVxuICAgICAgICAgICAgICAgICAgICBpbnNlcnRlZFZub2RlUXVldWUucHVzaCh2bm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB2bm9kZS5lbG0gPSBhcGkuY3JlYXRlVGV4dE5vZGUodm5vZGUudGV4dCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZub2RlLmVsbTtcbiAgICB9XG4gICAgZnVuY3Rpb24gYWRkVm5vZGVzKHBhcmVudEVsbSwgYmVmb3JlLCB2bm9kZXMsIHN0YXJ0SWR4LCBlbmRJZHgsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICBmb3IgKDsgc3RhcnRJZHggPD0gZW5kSWR4OyArK3N0YXJ0SWR4KSB7XG4gICAgICAgICAgICB2YXIgY2ggPSB2bm9kZXNbc3RhcnRJZHhdO1xuICAgICAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBhcGkuaW5zZXJ0QmVmb3JlKHBhcmVudEVsbSwgY3JlYXRlRWxtKGNoLCBpbnNlcnRlZFZub2RlUXVldWUpLCBiZWZvcmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGludm9rZURlc3Ryb3lIb29rKHZub2RlKSB7XG4gICAgICAgIHZhciBpLCBqLCBkYXRhID0gdm5vZGUuZGF0YTtcbiAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmKGkgPSBkYXRhLmhvb2spICYmIGlzRGVmKGkgPSBpLmRlc3Ryb3kpKVxuICAgICAgICAgICAgICAgIGkodm5vZGUpO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNicy5kZXN0cm95Lmxlbmd0aDsgKytpKVxuICAgICAgICAgICAgICAgIGNicy5kZXN0cm95W2ldKHZub2RlKTtcbiAgICAgICAgICAgIGlmICh2bm9kZS5jaGlsZHJlbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHZub2RlLmNoaWxkcmVuLmxlbmd0aDsgKytqKSB7XG4gICAgICAgICAgICAgICAgICAgIGkgPSB2bm9kZS5jaGlsZHJlbltqXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gbnVsbCAmJiB0eXBlb2YgaSAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW52b2tlRGVzdHJveUhvb2soaSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlVm5vZGVzKHBhcmVudEVsbSwgdm5vZGVzLCBzdGFydElkeCwgZW5kSWR4KSB7XG4gICAgICAgIGZvciAoOyBzdGFydElkeCA8PSBlbmRJZHg7ICsrc3RhcnRJZHgpIHtcbiAgICAgICAgICAgIHZhciBpXzEgPSB2b2lkIDAsIGxpc3RlbmVycyA9IHZvaWQgMCwgcm0gPSB2b2lkIDAsIGNoID0gdm5vZGVzW3N0YXJ0SWR4XTtcbiAgICAgICAgICAgIGlmIChjaCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzRGVmKGNoLnNlbCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaW52b2tlRGVzdHJveUhvb2soY2gpO1xuICAgICAgICAgICAgICAgICAgICBsaXN0ZW5lcnMgPSBjYnMucmVtb3ZlLmxlbmd0aCArIDE7XG4gICAgICAgICAgICAgICAgICAgIHJtID0gY3JlYXRlUm1DYihjaC5lbG0sIGxpc3RlbmVycyk7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaV8xID0gMDsgaV8xIDwgY2JzLnJlbW92ZS5sZW5ndGg7ICsraV8xKVxuICAgICAgICAgICAgICAgICAgICAgICAgY2JzLnJlbW92ZVtpXzFdKGNoLCBybSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0RlZihpXzEgPSBjaC5kYXRhKSAmJiBpc0RlZihpXzEgPSBpXzEuaG9vaykgJiYgaXNEZWYoaV8xID0gaV8xLnJlbW92ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlfMShjaCwgcm0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcm0oKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYXBpLnJlbW92ZUNoaWxkKHBhcmVudEVsbSwgY2guZWxtKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gdXBkYXRlQ2hpbGRyZW4ocGFyZW50RWxtLCBvbGRDaCwgbmV3Q2gsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICB2YXIgb2xkU3RhcnRJZHggPSAwLCBuZXdTdGFydElkeCA9IDA7XG4gICAgICAgIHZhciBvbGRFbmRJZHggPSBvbGRDaC5sZW5ndGggLSAxO1xuICAgICAgICB2YXIgb2xkU3RhcnRWbm9kZSA9IG9sZENoWzBdO1xuICAgICAgICB2YXIgb2xkRW5kVm5vZGUgPSBvbGRDaFtvbGRFbmRJZHhdO1xuICAgICAgICB2YXIgbmV3RW5kSWR4ID0gbmV3Q2gubGVuZ3RoIC0gMTtcbiAgICAgICAgdmFyIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFswXTtcbiAgICAgICAgdmFyIG5ld0VuZFZub2RlID0gbmV3Q2hbbmV3RW5kSWR4XTtcbiAgICAgICAgdmFyIG9sZEtleVRvSWR4O1xuICAgICAgICB2YXIgaWR4SW5PbGQ7XG4gICAgICAgIHZhciBlbG1Ub01vdmU7XG4gICAgICAgIHZhciBiZWZvcmU7XG4gICAgICAgIHdoaWxlIChvbGRTdGFydElkeCA8PSBvbGRFbmRJZHggJiYgbmV3U3RhcnRJZHggPD0gbmV3RW5kSWR4KSB7XG4gICAgICAgICAgICBpZiAob2xkU3RhcnRWbm9kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgb2xkU3RhcnRWbm9kZSA9IG9sZENoWysrb2xkU3RhcnRJZHhdOyAvLyBWbm9kZSBtaWdodCBoYXZlIGJlZW4gbW92ZWQgbGVmdFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAob2xkRW5kVm5vZGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAobmV3U3RhcnRWbm9kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgbmV3U3RhcnRWbm9kZSA9IG5ld0NoWysrbmV3U3RhcnRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAobmV3RW5kVm5vZGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZFN0YXJ0Vm5vZGUsIG5ld1N0YXJ0Vm5vZGUpKSB7XG4gICAgICAgICAgICAgICAgcGF0Y2hWbm9kZShvbGRTdGFydFZub2RlLCBuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgIG9sZFN0YXJ0Vm5vZGUgPSBvbGRDaFsrK29sZFN0YXJ0SWR4XTtcbiAgICAgICAgICAgICAgICBuZXdTdGFydFZub2RlID0gbmV3Q2hbKytuZXdTdGFydElkeF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzYW1lVm5vZGUob2xkRW5kVm5vZGUsIG5ld0VuZFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkRW5kVm5vZGUsIG5ld0VuZFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZFN0YXJ0Vm5vZGUsIG5ld0VuZFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkU3RhcnRWbm9kZSwgbmV3RW5kVm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIG9sZFN0YXJ0Vm5vZGUuZWxtLCBhcGkubmV4dFNpYmxpbmcob2xkRW5kVm5vZGUuZWxtKSk7XG4gICAgICAgICAgICAgICAgb2xkU3RhcnRWbm9kZSA9IG9sZENoWysrb2xkU3RhcnRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZEVuZFZub2RlLCBuZXdTdGFydFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkRW5kVm5vZGUsIG5ld1N0YXJ0Vm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIG9sZEVuZFZub2RlLmVsbSwgb2xkU3RhcnRWbm9kZS5lbG0pO1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFsrK25ld1N0YXJ0SWR4XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChvbGRLZXlUb0lkeCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIG9sZEtleVRvSWR4ID0gY3JlYXRlS2V5VG9PbGRJZHgob2xkQ2gsIG9sZFN0YXJ0SWR4LCBvbGRFbmRJZHgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZHhJbk9sZCA9IG9sZEtleVRvSWR4W25ld1N0YXJ0Vm5vZGUua2V5XTtcbiAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZihpZHhJbk9sZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIGNyZWF0ZUVsbShuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpLCBvbGRTdGFydFZub2RlLmVsbSk7XG4gICAgICAgICAgICAgICAgICAgIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFsrK25ld1N0YXJ0SWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVsbVRvTW92ZSA9IG9sZENoW2lkeEluT2xkXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVsbVRvTW92ZS5zZWwgIT09IG5ld1N0YXJ0Vm5vZGUuc2VsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcGkuaW5zZXJ0QmVmb3JlKHBhcmVudEVsbSwgY3JlYXRlRWxtKG5ld1N0YXJ0Vm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSksIG9sZFN0YXJ0Vm5vZGUuZWxtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUoZWxtVG9Nb3ZlLCBuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb2xkQ2hbaWR4SW5PbGRdID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIGVsbVRvTW92ZS5lbG0sIG9sZFN0YXJ0Vm5vZGUuZWxtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBuZXdTdGFydFZub2RlID0gbmV3Q2hbKytuZXdTdGFydElkeF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChvbGRTdGFydElkeCA+IG9sZEVuZElkeCkge1xuICAgICAgICAgICAgYmVmb3JlID0gbmV3Q2hbbmV3RW5kSWR4ICsgMV0gPT0gbnVsbCA/IG51bGwgOiBuZXdDaFtuZXdFbmRJZHggKyAxXS5lbG07XG4gICAgICAgICAgICBhZGRWbm9kZXMocGFyZW50RWxtLCBiZWZvcmUsIG5ld0NoLCBuZXdTdGFydElkeCwgbmV3RW5kSWR4LCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG5ld1N0YXJ0SWR4ID4gbmV3RW5kSWR4KSB7XG4gICAgICAgICAgICByZW1vdmVWbm9kZXMocGFyZW50RWxtLCBvbGRDaCwgb2xkU3RhcnRJZHgsIG9sZEVuZElkeCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcGF0Y2hWbm9kZShvbGRWbm9kZSwgdm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICB2YXIgaSwgaG9vaztcbiAgICAgICAgaWYgKGlzRGVmKGkgPSB2bm9kZS5kYXRhKSAmJiBpc0RlZihob29rID0gaS5ob29rKSAmJiBpc0RlZihpID0gaG9vay5wcmVwYXRjaCkpIHtcbiAgICAgICAgICAgIGkob2xkVm5vZGUsIHZub2RlKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgZWxtID0gdm5vZGUuZWxtID0gb2xkVm5vZGUuZWxtO1xuICAgICAgICB2YXIgb2xkQ2ggPSBvbGRWbm9kZS5jaGlsZHJlbjtcbiAgICAgICAgdmFyIGNoID0gdm5vZGUuY2hpbGRyZW47XG4gICAgICAgIGlmIChvbGRWbm9kZSA9PT0gdm5vZGUpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGlmICh2bm9kZS5kYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjYnMudXBkYXRlLmxlbmd0aDsgKytpKVxuICAgICAgICAgICAgICAgIGNicy51cGRhdGVbaV0ob2xkVm5vZGUsIHZub2RlKTtcbiAgICAgICAgICAgIGkgPSB2bm9kZS5kYXRhLmhvb2s7XG4gICAgICAgICAgICBpZiAoaXNEZWYoaSkgJiYgaXNEZWYoaSA9IGkudXBkYXRlKSlcbiAgICAgICAgICAgICAgICBpKG9sZFZub2RlLCB2bm9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlzVW5kZWYodm5vZGUudGV4dCkpIHtcbiAgICAgICAgICAgIGlmIChpc0RlZihvbGRDaCkgJiYgaXNEZWYoY2gpKSB7XG4gICAgICAgICAgICAgICAgaWYgKG9sZENoICE9PSBjaClcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlQ2hpbGRyZW4oZWxtLCBvbGRDaCwgY2gsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpc0RlZihjaCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNEZWYob2xkVm5vZGUudGV4dCkpXG4gICAgICAgICAgICAgICAgICAgIGFwaS5zZXRUZXh0Q29udGVudChlbG0sICcnKTtcbiAgICAgICAgICAgICAgICBhZGRWbm9kZXMoZWxtLCBudWxsLCBjaCwgMCwgY2gubGVuZ3RoIC0gMSwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRGVmKG9sZENoKSkge1xuICAgICAgICAgICAgICAgIHJlbW92ZVZub2RlcyhlbG0sIG9sZENoLCAwLCBvbGRDaC5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRGVmKG9sZFZub2RlLnRleHQpKSB7XG4gICAgICAgICAgICAgICAgYXBpLnNldFRleHRDb250ZW50KGVsbSwgJycpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG9sZFZub2RlLnRleHQgIT09IHZub2RlLnRleHQpIHtcbiAgICAgICAgICAgIGFwaS5zZXRUZXh0Q29udGVudChlbG0sIHZub2RlLnRleHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc0RlZihob29rKSAmJiBpc0RlZihpID0gaG9vay5wb3N0cGF0Y2gpKSB7XG4gICAgICAgICAgICBpKG9sZFZub2RlLCB2bm9kZSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZ1bmN0aW9uIHBhdGNoKG9sZFZub2RlLCB2bm9kZSkge1xuICAgICAgICB2YXIgaSwgZWxtLCBwYXJlbnQ7XG4gICAgICAgIHZhciBpbnNlcnRlZFZub2RlUXVldWUgPSBbXTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNicy5wcmUubGVuZ3RoOyArK2kpXG4gICAgICAgICAgICBjYnMucHJlW2ldKCk7XG4gICAgICAgIGlmICghaXNWbm9kZShvbGRWbm9kZSkpIHtcbiAgICAgICAgICAgIG9sZFZub2RlID0gZW1wdHlOb2RlQXQob2xkVm5vZGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzYW1lVm5vZGUob2xkVm5vZGUsIHZub2RlKSkge1xuICAgICAgICAgICAgcGF0Y2hWbm9kZShvbGRWbm9kZSwgdm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBlbG0gPSBvbGRWbm9kZS5lbG07XG4gICAgICAgICAgICBwYXJlbnQgPSBhcGkucGFyZW50Tm9kZShlbG0pO1xuICAgICAgICAgICAgY3JlYXRlRWxtKHZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGFwaS5pbnNlcnRCZWZvcmUocGFyZW50LCB2bm9kZS5lbG0sIGFwaS5uZXh0U2libGluZyhlbG0pKTtcbiAgICAgICAgICAgICAgICByZW1vdmVWbm9kZXMocGFyZW50LCBbb2xkVm5vZGVdLCAwLCAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgaW5zZXJ0ZWRWbm9kZVF1ZXVlLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBpbnNlcnRlZFZub2RlUXVldWVbaV0uZGF0YS5ob29rLmluc2VydChpbnNlcnRlZFZub2RlUXVldWVbaV0pO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBjYnMucG9zdC5sZW5ndGg7ICsraSlcbiAgICAgICAgICAgIGNicy5wb3N0W2ldKCk7XG4gICAgICAgIHJldHVybiB2bm9kZTtcbiAgICB9O1xufVxuZXhwb3J0cy5pbml0ID0gaW5pdDtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNuYWJiZG9tLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIGhfMSA9IHJlcXVpcmUoXCIuL2hcIik7XG5mdW5jdGlvbiBjb3B5VG9UaHVuayh2bm9kZSwgdGh1bmspIHtcbiAgICB0aHVuay5lbG0gPSB2bm9kZS5lbG07XG4gICAgdm5vZGUuZGF0YS5mbiA9IHRodW5rLmRhdGEuZm47XG4gICAgdm5vZGUuZGF0YS5hcmdzID0gdGh1bmsuZGF0YS5hcmdzO1xuICAgIHRodW5rLmRhdGEgPSB2bm9kZS5kYXRhO1xuICAgIHRodW5rLmNoaWxkcmVuID0gdm5vZGUuY2hpbGRyZW47XG4gICAgdGh1bmsudGV4dCA9IHZub2RlLnRleHQ7XG4gICAgdGh1bmsuZWxtID0gdm5vZGUuZWxtO1xufVxuZnVuY3Rpb24gaW5pdCh0aHVuaykge1xuICAgIHZhciBjdXIgPSB0aHVuay5kYXRhO1xuICAgIHZhciB2bm9kZSA9IGN1ci5mbi5hcHBseSh1bmRlZmluZWQsIGN1ci5hcmdzKTtcbiAgICBjb3B5VG9UaHVuayh2bm9kZSwgdGh1bmspO1xufVxuZnVuY3Rpb24gcHJlcGF0Y2gob2xkVm5vZGUsIHRodW5rKSB7XG4gICAgdmFyIGksIG9sZCA9IG9sZFZub2RlLmRhdGEsIGN1ciA9IHRodW5rLmRhdGE7XG4gICAgdmFyIG9sZEFyZ3MgPSBvbGQuYXJncywgYXJncyA9IGN1ci5hcmdzO1xuICAgIGlmIChvbGQuZm4gIT09IGN1ci5mbiB8fCBvbGRBcmdzLmxlbmd0aCAhPT0gYXJncy5sZW5ndGgpIHtcbiAgICAgICAgY29weVRvVGh1bmsoY3VyLmZuLmFwcGx5KHVuZGVmaW5lZCwgYXJncyksIHRodW5rKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBmb3IgKGkgPSAwOyBpIDwgYXJncy5sZW5ndGg7ICsraSkge1xuICAgICAgICBpZiAob2xkQXJnc1tpXSAhPT0gYXJnc1tpXSkge1xuICAgICAgICAgICAgY29weVRvVGh1bmsoY3VyLmZuLmFwcGx5KHVuZGVmaW5lZCwgYXJncyksIHRodW5rKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgIH1cbiAgICBjb3B5VG9UaHVuayhvbGRWbm9kZSwgdGh1bmspO1xufVxuZXhwb3J0cy50aHVuayA9IGZ1bmN0aW9uIHRodW5rKHNlbCwga2V5LCBmbiwgYXJncykge1xuICAgIGlmIChhcmdzID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgYXJncyA9IGZuO1xuICAgICAgICBmbiA9IGtleTtcbiAgICAgICAga2V5ID0gdW5kZWZpbmVkO1xuICAgIH1cbiAgICByZXR1cm4gaF8xLmgoc2VsLCB7XG4gICAgICAgIGtleToga2V5LFxuICAgICAgICBob29rOiB7IGluaXQ6IGluaXQsIHByZXBhdGNoOiBwcmVwYXRjaCB9LFxuICAgICAgICBmbjogZm4sXG4gICAgICAgIGFyZ3M6IGFyZ3NcbiAgICB9KTtcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLnRodW5rO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGh1bmsuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB2bm9kZShzZWwsIGRhdGEsIGNoaWxkcmVuLCB0ZXh0LCBlbG0pIHtcbiAgICB2YXIga2V5ID0gZGF0YSA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogZGF0YS5rZXk7XG4gICAgcmV0dXJuIHsgc2VsOiBzZWwsIGRhdGE6IGRhdGEsIGNoaWxkcmVuOiBjaGlsZHJlbixcbiAgICAgICAgdGV4dDogdGV4dCwgZWxtOiBlbG0sIGtleToga2V5IH07XG59XG5leHBvcnRzLnZub2RlID0gdm5vZGU7XG5leHBvcnRzLmRlZmF1bHQgPSB2bm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXZub2RlLmpzLm1hcCJdfQ==
+
+
+/***/ }),
+/* 451 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var booleanAttrs = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "compact", "controls", "declare",
+    "default", "defaultchecked", "defaultmuted", "defaultselected", "defer", "disabled", "draggable",
+    "enabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "itemscope", "loop", "multiple",
+    "muted", "nohref", "noresize", "noshade", "novalidate", "nowrap", "open", "pauseonexit", "readonly",
+    "required", "reversed", "scoped", "seamless", "selected", "sortable", "spellcheck", "translate",
+    "truespeed", "typemustmatch", "visible"];
+var xlinkNS = 'http://www.w3.org/1999/xlink';
+var xmlNS = 'http://www.w3.org/XML/1998/namespace';
+var colonChar = 58;
+var xChar = 120;
+var booleanAttrsDict = Object.create(null);
+for (var i = 0, len = booleanAttrs.length; i < len; i++) {
+    booleanAttrsDict[booleanAttrs[i]] = true;
+}
+function updateAttrs(oldVnode, vnode) {
+    var key, elm = vnode.elm, oldAttrs = oldVnode.data.attrs, attrs = vnode.data.attrs;
+    if (!oldAttrs && !attrs)
+        return;
+    if (oldAttrs === attrs)
+        return;
+    oldAttrs = oldAttrs || {};
+    attrs = attrs || {};
+    // update modified attributes, add new attributes
+    for (key in attrs) {
+        var cur = attrs[key];
+        var old = oldAttrs[key];
+        if (old !== cur) {
+            if (booleanAttrsDict[key]) {
+                if (cur) {
+                    elm.setAttribute(key, "");
+                }
+                else {
+                    elm.removeAttribute(key);
+                }
+            }
+            else {
+                if (key.charCodeAt(0) !== xChar) {
+                    elm.setAttribute(key, cur);
+                }
+                else if (key.charCodeAt(3) === colonChar) {
+                    // Assume xml namespace
+                    elm.setAttributeNS(xmlNS, key, cur);
+                }
+                else if (key.charCodeAt(5) === colonChar) {
+                    // Assume xlink namespace
+                    elm.setAttributeNS(xlinkNS, key, cur);
+                }
+                else {
+                    elm.setAttribute(key, cur);
+                }
+            }
+        }
+    }
+    // remove removed attributes
+    // use `in` operator since the previous `for` iteration uses it (.i.e. add even attributes with undefined value)
+    // the other option is to remove all attributes with value == undefined
+    for (key in oldAttrs) {
+        if (!(key in attrs)) {
+            elm.removeAttribute(key);
+        }
+    }
+}
+exports.attributesModule = { create: updateAttrs, update: updateAttrs };
+exports.default = exports.attributesModule;
+
+},{}]},{},[1])(1)
+});
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9hdHRyaWJ1dGVzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FDQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgYm9vbGVhbkF0dHJzID0gW1wiYWxsb3dmdWxsc2NyZWVuXCIsIFwiYXN5bmNcIiwgXCJhdXRvZm9jdXNcIiwgXCJhdXRvcGxheVwiLCBcImNoZWNrZWRcIiwgXCJjb21wYWN0XCIsIFwiY29udHJvbHNcIiwgXCJkZWNsYXJlXCIsXG4gICAgXCJkZWZhdWx0XCIsIFwiZGVmYXVsdGNoZWNrZWRcIiwgXCJkZWZhdWx0bXV0ZWRcIiwgXCJkZWZhdWx0c2VsZWN0ZWRcIiwgXCJkZWZlclwiLCBcImRpc2FibGVkXCIsIFwiZHJhZ2dhYmxlXCIsXG4gICAgXCJlbmFibGVkXCIsIFwiZm9ybW5vdmFsaWRhdGVcIiwgXCJoaWRkZW5cIiwgXCJpbmRldGVybWluYXRlXCIsIFwiaW5lcnRcIiwgXCJpc21hcFwiLCBcIml0ZW1zY29wZVwiLCBcImxvb3BcIiwgXCJtdWx0aXBsZVwiLFxuICAgIFwibXV0ZWRcIiwgXCJub2hyZWZcIiwgXCJub3Jlc2l6ZVwiLCBcIm5vc2hhZGVcIiwgXCJub3ZhbGlkYXRlXCIsIFwibm93cmFwXCIsIFwib3BlblwiLCBcInBhdXNlb25leGl0XCIsIFwicmVhZG9ubHlcIixcbiAgICBcInJlcXVpcmVkXCIsIFwicmV2ZXJzZWRcIiwgXCJzY29wZWRcIiwgXCJzZWFtbGVzc1wiLCBcInNlbGVjdGVkXCIsIFwic29ydGFibGVcIiwgXCJzcGVsbGNoZWNrXCIsIFwidHJhbnNsYXRlXCIsXG4gICAgXCJ0cnVlc3BlZWRcIiwgXCJ0eXBlbXVzdG1hdGNoXCIsIFwidmlzaWJsZVwiXTtcbnZhciB4bGlua05TID0gJ2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnO1xudmFyIHhtbE5TID0gJ2h0dHA6Ly93d3cudzMub3JnL1hNTC8xOTk4L25hbWVzcGFjZSc7XG52YXIgY29sb25DaGFyID0gNTg7XG52YXIgeENoYXIgPSAxMjA7XG52YXIgYm9vbGVhbkF0dHJzRGljdCA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG5mb3IgKHZhciBpID0gMCwgbGVuID0gYm9vbGVhbkF0dHJzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgYm9vbGVhbkF0dHJzRGljdFtib29sZWFuQXR0cnNbaV1dID0gdHJ1ZTtcbn1cbmZ1bmN0aW9uIHVwZGF0ZUF0dHJzKG9sZFZub2RlLCB2bm9kZSkge1xuICAgIHZhciBrZXksIGVsbSA9IHZub2RlLmVsbSwgb2xkQXR0cnMgPSBvbGRWbm9kZS5kYXRhLmF0dHJzLCBhdHRycyA9IHZub2RlLmRhdGEuYXR0cnM7XG4gICAgaWYgKCFvbGRBdHRycyAmJiAhYXR0cnMpXG4gICAgICAgIHJldHVybjtcbiAgICBpZiAob2xkQXR0cnMgPT09IGF0dHJzKVxuICAgICAgICByZXR1cm47XG4gICAgb2xkQXR0cnMgPSBvbGRBdHRycyB8fCB7fTtcbiAgICBhdHRycyA9IGF0dHJzIHx8IHt9O1xuICAgIC8vIHVwZGF0ZSBtb2RpZmllZCBhdHRyaWJ1dGVzLCBhZGQgbmV3IGF0dHJpYnV0ZXNcbiAgICBmb3IgKGtleSBpbiBhdHRycykge1xuICAgICAgICB2YXIgY3VyID0gYXR0cnNba2V5XTtcbiAgICAgICAgdmFyIG9sZCA9IG9sZEF0dHJzW2tleV07XG4gICAgICAgIGlmIChvbGQgIT09IGN1cikge1xuICAgICAgICAgICAgaWYgKGJvb2xlYW5BdHRyc0RpY3Rba2V5XSkge1xuICAgICAgICAgICAgICAgIGlmIChjdXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIFwiXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnJlbW92ZUF0dHJpYnV0ZShrZXkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChrZXkuY2hhckNvZGVBdCgwKSAhPT0geENoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGtleS5jaGFyQ29kZUF0KDMpID09PSBjb2xvbkNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQXNzdW1lIHhtbCBuYW1lc3BhY2VcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZU5TKHhtbE5TLCBrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGtleS5jaGFyQ29kZUF0KDUpID09PSBjb2xvbkNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQXNzdW1lIHhsaW5rIG5hbWVzcGFjZVxuICAgICAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlTlMoeGxpbmtOUywga2V5LCBjdXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIC8vIHJlbW92ZSByZW1vdmVkIGF0dHJpYnV0ZXNcbiAgICAvLyB1c2UgYGluYCBvcGVyYXRvciBzaW5jZSB0aGUgcHJldmlvdXMgYGZvcmAgaXRlcmF0aW9uIHVzZXMgaXQgKC5pLmUuIGFkZCBldmVuIGF0dHJpYnV0ZXMgd2l0aCB1bmRlZmluZWQgdmFsdWUpXG4gICAgLy8gdGhlIG90aGVyIG9wdGlvbiBpcyB0byByZW1vdmUgYWxsIGF0dHJpYnV0ZXMgd2l0aCB2YWx1ZSA9PSB1bmRlZmluZWRcbiAgICBmb3IgKGtleSBpbiBvbGRBdHRycykge1xuICAgICAgICBpZiAoIShrZXkgaW4gYXR0cnMpKSB7XG4gICAgICAgICAgICBlbG0ucmVtb3ZlQXR0cmlidXRlKGtleSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5leHBvcnRzLmF0dHJpYnV0ZXNNb2R1bGUgPSB7IGNyZWF0ZTogdXBkYXRlQXR0cnMsIHVwZGF0ZTogdXBkYXRlQXR0cnMgfTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuYXR0cmlidXRlc01vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWF0dHJpYnV0ZXMuanMubWFwIl19
+
+
+/***/ }),
+/* 452 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function updateClass(oldVnode, vnode) {
+    var cur, name, elm = vnode.elm, oldClass = oldVnode.data.class, klass = vnode.data.class;
+    if (!oldClass && !klass)
+        return;
+    if (oldClass === klass)
+        return;
+    oldClass = oldClass || {};
+    klass = klass || {};
+    for (name in oldClass) {
+        if (!klass[name]) {
+            elm.classList.remove(name);
+        }
+    }
+    for (name in klass) {
+        cur = klass[name];
+        if (cur !== oldClass[name]) {
+            elm.classList[cur ? 'add' : 'remove'](name);
+        }
+    }
+}
+exports.classModule = { create: updateClass, update: updateClass };
+exports.default = exports.classModule;
+
+},{}]},{},[1])(1)
+});
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9jbGFzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gZSh0LG4scil7ZnVuY3Rpb24gcyhvLHUpe2lmKCFuW29dKXtpZighdFtvXSl7dmFyIGE9dHlwZW9mIHJlcXVpcmU9PVwiZnVuY3Rpb25cIiYmcmVxdWlyZTtpZighdSYmYSlyZXR1cm4gYShvLCEwKTtpZihpKXJldHVybiBpKG8sITApO3ZhciBmPW5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIrbytcIidcIik7dGhyb3cgZi5jb2RlPVwiTU9EVUxFX05PVF9GT1VORFwiLGZ9dmFyIGw9bltvXT17ZXhwb3J0czp7fX07dFtvXVswXS5jYWxsKGwuZXhwb3J0cyxmdW5jdGlvbihlKXt2YXIgbj10W29dWzFdW2VdO3JldHVybiBzKG4/bjplKX0sbCxsLmV4cG9ydHMsZSx0LG4scil9cmV0dXJuIG5bb10uZXhwb3J0c312YXIgaT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXMocltvXSk7cmV0dXJuIHN9KSIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xuZnVuY3Rpb24gdXBkYXRlQ2xhc3Mob2xkVm5vZGUsIHZub2RlKSB7XG4gICAgdmFyIGN1ciwgbmFtZSwgZWxtID0gdm5vZGUuZWxtLCBvbGRDbGFzcyA9IG9sZFZub2RlLmRhdGEuY2xhc3MsIGtsYXNzID0gdm5vZGUuZGF0YS5jbGFzcztcbiAgICBpZiAoIW9sZENsYXNzICYmICFrbGFzcylcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGRDbGFzcyA9PT0ga2xhc3MpXG4gICAgICAgIHJldHVybjtcbiAgICBvbGRDbGFzcyA9IG9sZENsYXNzIHx8IHt9O1xuICAgIGtsYXNzID0ga2xhc3MgfHwge307XG4gICAgZm9yIChuYW1lIGluIG9sZENsYXNzKSB7XG4gICAgICAgIGlmICgha2xhc3NbbmFtZV0pIHtcbiAgICAgICAgICAgIGVsbS5jbGFzc0xpc3QucmVtb3ZlKG5hbWUpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZvciAobmFtZSBpbiBrbGFzcykge1xuICAgICAgICBjdXIgPSBrbGFzc1tuYW1lXTtcbiAgICAgICAgaWYgKGN1ciAhPT0gb2xkQ2xhc3NbbmFtZV0pIHtcbiAgICAgICAgICAgIGVsbS5jbGFzc0xpc3RbY3VyID8gJ2FkZCcgOiAncmVtb3ZlJ10obmFtZSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5leHBvcnRzLmNsYXNzTW9kdWxlID0geyBjcmVhdGU6IHVwZGF0ZUNsYXNzLCB1cGRhdGU6IHVwZGF0ZUNsYXNzIH07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLmNsYXNzTW9kdWxlO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2xhc3MuanMubWFwIl19
+
+
+/***/ }),
+/* 453 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var CAPS_REGEX = /[A-Z]/g;
+function updateDataset(oldVnode, vnode) {
+    var elm = vnode.elm, oldDataset = oldVnode.data.dataset, dataset = vnode.data.dataset, key;
+    if (!oldDataset && !dataset)
+        return;
+    if (oldDataset === dataset)
+        return;
+    oldDataset = oldDataset || {};
+    dataset = dataset || {};
+    var d = elm.dataset;
+    for (key in oldDataset) {
+        if (!dataset[key]) {
+            if (d) {
+                if (key in d) {
+                    delete d[key];
+                }
+            }
+            else {
+                elm.removeAttribute('data-' + key.replace(CAPS_REGEX, '-$&').toLowerCase());
+            }
+        }
+    }
+    for (key in dataset) {
+        if (oldDataset[key] !== dataset[key]) {
+            if (d) {
+                d[key] = dataset[key];
+            }
+            else {
+                elm.setAttribute('data-' + key.replace(CAPS_REGEX, '-$&').toLowerCase(), dataset[key]);
+            }
+        }
+    }
+}
+exports.datasetModule = { create: updateDataset, update: updateDataset };
+exports.default = exports.datasetModule;
+
+},{}]},{},[1])(1)
+});
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJtb2R1bGVzL2RhdGFzZXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUNBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gZSh0LG4scil7ZnVuY3Rpb24gcyhvLHUpe2lmKCFuW29dKXtpZighdFtvXSl7dmFyIGE9dHlwZW9mIHJlcXVpcmU9PVwiZnVuY3Rpb25cIiYmcmVxdWlyZTtpZighdSYmYSlyZXR1cm4gYShvLCEwKTtpZihpKXJldHVybiBpKG8sITApO3ZhciBmPW5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIrbytcIidcIik7dGhyb3cgZi5jb2RlPVwiTU9EVUxFX05PVF9GT1VORFwiLGZ9dmFyIGw9bltvXT17ZXhwb3J0czp7fX07dFtvXVswXS5jYWxsKGwuZXhwb3J0cyxmdW5jdGlvbihlKXt2YXIgbj10W29dWzFdW2VdO3JldHVybiBzKG4/bjplKX0sbCxsLmV4cG9ydHMsZSx0LG4scil9cmV0dXJuIG5bb10uZXhwb3J0c312YXIgaT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXMocltvXSk7cmV0dXJuIHN9KSIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIENBUFNfUkVHRVggPSAvW0EtWl0vZztcbmZ1bmN0aW9uIHVwZGF0ZURhdGFzZXQob2xkVm5vZGUsIHZub2RlKSB7XG4gICAgdmFyIGVsbSA9IHZub2RlLmVsbSwgb2xkRGF0YXNldCA9IG9sZFZub2RlLmRhdGEuZGF0YXNldCwgZGF0YXNldCA9IHZub2RlLmRhdGEuZGF0YXNldCwga2V5O1xuICAgIGlmICghb2xkRGF0YXNldCAmJiAhZGF0YXNldClcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGREYXRhc2V0ID09PSBkYXRhc2V0KVxuICAgICAgICByZXR1cm47XG4gICAgb2xkRGF0YXNldCA9IG9sZERhdGFzZXQgfHwge307XG4gICAgZGF0YXNldCA9IGRhdGFzZXQgfHwge307XG4gICAgdmFyIGQgPSBlbG0uZGF0YXNldDtcbiAgICBmb3IgKGtleSBpbiBvbGREYXRhc2V0KSB7XG4gICAgICAgIGlmICghZGF0YXNldFtrZXldKSB7XG4gICAgICAgICAgICBpZiAoZCkge1xuICAgICAgICAgICAgICAgIGlmIChrZXkgaW4gZCkge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgZFtrZXldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGVsbS5yZW1vdmVBdHRyaWJ1dGUoJ2RhdGEtJyArIGtleS5yZXBsYWNlKENBUFNfUkVHRVgsICctJCYnKS50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmb3IgKGtleSBpbiBkYXRhc2V0KSB7XG4gICAgICAgIGlmIChvbGREYXRhc2V0W2tleV0gIT09IGRhdGFzZXRba2V5XSkge1xuICAgICAgICAgICAgaWYgKGQpIHtcbiAgICAgICAgICAgICAgICBkW2tleV0gPSBkYXRhc2V0W2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdkYXRhLScgKyBrZXkucmVwbGFjZShDQVBTX1JFR0VYLCAnLSQmJykudG9Mb3dlckNhc2UoKSwgZGF0YXNldFtrZXldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbmV4cG9ydHMuZGF0YXNldE1vZHVsZSA9IHsgY3JlYXRlOiB1cGRhdGVEYXRhc2V0LCB1cGRhdGU6IHVwZGF0ZURhdGFzZXQgfTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuZGF0YXNldE1vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRhdGFzZXQuanMubWFwIl19
+
+
+/***/ }),
+/* 454 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function updateProps(oldVnode, vnode) {
+    var key, cur, old, elm = vnode.elm, oldProps = oldVnode.data.props, props = vnode.data.props;
+    if (!oldProps && !props)
+        return;
+    if (oldProps === props)
+        return;
+    oldProps = oldProps || {};
+    props = props || {};
+    for (key in oldProps) {
+        if (!props[key]) {
+            delete elm[key];
+        }
+    }
+    for (key in props) {
+        cur = props[key];
+        old = oldProps[key];
+        if (old !== cur && (key !== 'value' || elm[key] !== cur)) {
+            elm[key] = cur;
+        }
+    }
+}
+exports.propsModule = { create: updateProps, update: updateProps };
+exports.default = exports.propsModule;
+
+},{}]},{},[1])(1)
+});
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9wcm9wcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB1cGRhdGVQcm9wcyhvbGRWbm9kZSwgdm5vZGUpIHtcbiAgICB2YXIga2V5LCBjdXIsIG9sZCwgZWxtID0gdm5vZGUuZWxtLCBvbGRQcm9wcyA9IG9sZFZub2RlLmRhdGEucHJvcHMsIHByb3BzID0gdm5vZGUuZGF0YS5wcm9wcztcbiAgICBpZiAoIW9sZFByb3BzICYmICFwcm9wcylcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGRQcm9wcyA9PT0gcHJvcHMpXG4gICAgICAgIHJldHVybjtcbiAgICBvbGRQcm9wcyA9IG9sZFByb3BzIHx8IHt9O1xuICAgIHByb3BzID0gcHJvcHMgfHwge307XG4gICAgZm9yIChrZXkgaW4gb2xkUHJvcHMpIHtcbiAgICAgICAgaWYgKCFwcm9wc1trZXldKSB7XG4gICAgICAgICAgICBkZWxldGUgZWxtW2tleV07XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChrZXkgaW4gcHJvcHMpIHtcbiAgICAgICAgY3VyID0gcHJvcHNba2V5XTtcbiAgICAgICAgb2xkID0gb2xkUHJvcHNba2V5XTtcbiAgICAgICAgaWYgKG9sZCAhPT0gY3VyICYmIChrZXkgIT09ICd2YWx1ZScgfHwgZWxtW2tleV0gIT09IGN1cikpIHtcbiAgICAgICAgICAgIGVsbVtrZXldID0gY3VyO1xuICAgICAgICB9XG4gICAgfVxufVxuZXhwb3J0cy5wcm9wc01vZHVsZSA9IHsgY3JlYXRlOiB1cGRhdGVQcm9wcywgdXBkYXRlOiB1cGRhdGVQcm9wcyB9O1xuZXhwb3J0cy5kZWZhdWx0ID0gZXhwb3J0cy5wcm9wc01vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByb3BzLmpzLm1hcCJdfQ==
+
+
+/***/ }),
+/* 455 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var raf = (typeof window !== 'undefined' && window.requestAnimationFrame) || setTimeout;
+var nextFrame = function (fn) { raf(function () { raf(fn); }); };
+function setNextFrame(obj, prop, val) {
+    nextFrame(function () { obj[prop] = val; });
+}
+function updateStyle(oldVnode, vnode) {
+    var cur, name, elm = vnode.elm, oldStyle = oldVnode.data.style, style = vnode.data.style;
+    if (!oldStyle && !style)
+        return;
+    if (oldStyle === style)
+        return;
+    oldStyle = oldStyle || {};
+    style = style || {};
+    var oldHasDel = 'delayed' in oldStyle;
+    for (name in oldStyle) {
+        if (!style[name]) {
+            if (name[0] === '-' && name[1] === '-') {
+                elm.style.removeProperty(name);
+            }
+            else {
+                elm.style[name] = '';
+            }
+        }
+    }
+    for (name in style) {
+        cur = style[name];
+        if (name === 'delayed' && style.delayed) {
+            for (var name2 in style.delayed) {
+                cur = style.delayed[name2];
+                if (!oldHasDel || cur !== oldStyle.delayed[name2]) {
+                    setNextFrame(elm.style, name2, cur);
+                }
+            }
+        }
+        else if (name !== 'remove' && cur !== oldStyle[name]) {
+            if (name[0] === '-' && name[1] === '-') {
+                elm.style.setProperty(name, cur);
+            }
+            else {
+                elm.style[name] = cur;
+            }
+        }
+    }
+}
+function applyDestroyStyle(vnode) {
+    var style, name, elm = vnode.elm, s = vnode.data.style;
+    if (!s || !(style = s.destroy))
+        return;
+    for (name in style) {
+        elm.style[name] = style[name];
+    }
+}
+function applyRemoveStyle(vnode, rm) {
+    var s = vnode.data.style;
+    if (!s || !s.remove) {
+        rm();
+        return;
+    }
+    var name, elm = vnode.elm, i = 0, compStyle, style = s.remove, amount = 0, applied = [];
+    for (name in style) {
+        applied.push(name);
+        elm.style[name] = style[name];
+    }
+    compStyle = getComputedStyle(elm);
+    var props = compStyle['transition-property'].split(', ');
+    for (; i < props.length; ++i) {
+        if (applied.indexOf(props[i]) !== -1)
+            amount++;
+    }
+    elm.addEventListener('transitionend', function (ev) {
+        if (ev.target === elm)
+            --amount;
+        if (amount === 0)
+            rm();
+    });
+}
+exports.styleModule = {
+    create: updateStyle,
+    update: updateStyle,
+    destroy: applyDestroyStyle,
+    remove: applyRemoveStyle
+};
+exports.default = exports.styleModule;
+
+},{}]},{},[1])(1)
+});
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9zdHlsZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgcmFmID0gKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnICYmIHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUpIHx8IHNldFRpbWVvdXQ7XG52YXIgbmV4dEZyYW1lID0gZnVuY3Rpb24gKGZuKSB7IHJhZihmdW5jdGlvbiAoKSB7IHJhZihmbik7IH0pOyB9O1xuZnVuY3Rpb24gc2V0TmV4dEZyYW1lKG9iaiwgcHJvcCwgdmFsKSB7XG4gICAgbmV4dEZyYW1lKGZ1bmN0aW9uICgpIHsgb2JqW3Byb3BdID0gdmFsOyB9KTtcbn1cbmZ1bmN0aW9uIHVwZGF0ZVN0eWxlKG9sZFZub2RlLCB2bm9kZSkge1xuICAgIHZhciBjdXIsIG5hbWUsIGVsbSA9IHZub2RlLmVsbSwgb2xkU3R5bGUgPSBvbGRWbm9kZS5kYXRhLnN0eWxlLCBzdHlsZSA9IHZub2RlLmRhdGEuc3R5bGU7XG4gICAgaWYgKCFvbGRTdHlsZSAmJiAhc3R5bGUpXG4gICAgICAgIHJldHVybjtcbiAgICBpZiAob2xkU3R5bGUgPT09IHN0eWxlKVxuICAgICAgICByZXR1cm47XG4gICAgb2xkU3R5bGUgPSBvbGRTdHlsZSB8fCB7fTtcbiAgICBzdHlsZSA9IHN0eWxlIHx8IHt9O1xuICAgIHZhciBvbGRIYXNEZWwgPSAnZGVsYXllZCcgaW4gb2xkU3R5bGU7XG4gICAgZm9yIChuYW1lIGluIG9sZFN0eWxlKSB7XG4gICAgICAgIGlmICghc3R5bGVbbmFtZV0pIHtcbiAgICAgICAgICAgIGlmIChuYW1lWzBdID09PSAnLScgJiYgbmFtZVsxXSA9PT0gJy0nKSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlLnJlbW92ZVByb3BlcnR5KG5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGN1ciA9IHN0eWxlW25hbWVdO1xuICAgICAgICBpZiAobmFtZSA9PT0gJ2RlbGF5ZWQnICYmIHN0eWxlLmRlbGF5ZWQpIHtcbiAgICAgICAgICAgIGZvciAodmFyIG5hbWUyIGluIHN0eWxlLmRlbGF5ZWQpIHtcbiAgICAgICAgICAgICAgICBjdXIgPSBzdHlsZS5kZWxheWVkW25hbWUyXTtcbiAgICAgICAgICAgICAgICBpZiAoIW9sZEhhc0RlbCB8fCBjdXIgIT09IG9sZFN0eWxlLmRlbGF5ZWRbbmFtZTJdKSB7XG4gICAgICAgICAgICAgICAgICAgIHNldE5leHRGcmFtZShlbG0uc3R5bGUsIG5hbWUyLCBjdXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChuYW1lICE9PSAncmVtb3ZlJyAmJiBjdXIgIT09IG9sZFN0eWxlW25hbWVdKSB7XG4gICAgICAgICAgICBpZiAobmFtZVswXSA9PT0gJy0nICYmIG5hbWVbMV0gPT09ICctJykge1xuICAgICAgICAgICAgICAgIGVsbS5zdHlsZS5zZXRQcm9wZXJ0eShuYW1lLCBjdXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gY3VyO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuZnVuY3Rpb24gYXBwbHlEZXN0cm95U3R5bGUodm5vZGUpIHtcbiAgICB2YXIgc3R5bGUsIG5hbWUsIGVsbSA9IHZub2RlLmVsbSwgcyA9IHZub2RlLmRhdGEuc3R5bGU7XG4gICAgaWYgKCFzIHx8ICEoc3R5bGUgPSBzLmRlc3Ryb3kpKVxuICAgICAgICByZXR1cm47XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGVsbS5zdHlsZVtuYW1lXSA9IHN0eWxlW25hbWVdO1xuICAgIH1cbn1cbmZ1bmN0aW9uIGFwcGx5UmVtb3ZlU3R5bGUodm5vZGUsIHJtKSB7XG4gICAgdmFyIHMgPSB2bm9kZS5kYXRhLnN0eWxlO1xuICAgIGlmICghcyB8fCAhcy5yZW1vdmUpIHtcbiAgICAgICAgcm0oKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICB2YXIgbmFtZSwgZWxtID0gdm5vZGUuZWxtLCBpID0gMCwgY29tcFN0eWxlLCBzdHlsZSA9IHMucmVtb3ZlLCBhbW91bnQgPSAwLCBhcHBsaWVkID0gW107XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGFwcGxpZWQucHVzaChuYW1lKTtcbiAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gc3R5bGVbbmFtZV07XG4gICAgfVxuICAgIGNvbXBTdHlsZSA9IGdldENvbXB1dGVkU3R5bGUoZWxtKTtcbiAgICB2YXIgcHJvcHMgPSBjb21wU3R5bGVbJ3RyYW5zaXRpb24tcHJvcGVydHknXS5zcGxpdCgnLCAnKTtcbiAgICBmb3IgKDsgaSA8IHByb3BzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgIGlmIChhcHBsaWVkLmluZGV4T2YocHJvcHNbaV0pICE9PSAtMSlcbiAgICAgICAgICAgIGFtb3VudCsrO1xuICAgIH1cbiAgICBlbG0uYWRkRXZlbnRMaXN0ZW5lcigndHJhbnNpdGlvbmVuZCcsIGZ1bmN0aW9uIChldikge1xuICAgICAgICBpZiAoZXYudGFyZ2V0ID09PSBlbG0pXG4gICAgICAgICAgICAtLWFtb3VudDtcbiAgICAgICAgaWYgKGFtb3VudCA9PT0gMClcbiAgICAgICAgICAgIHJtKCk7XG4gICAgfSk7XG59XG5leHBvcnRzLnN0eWxlTW9kdWxlID0ge1xuICAgIGNyZWF0ZTogdXBkYXRlU3R5bGUsXG4gICAgdXBkYXRlOiB1cGRhdGVTdHlsZSxcbiAgICBkZXN0cm95OiBhcHBseURlc3Ryb3lTdHlsZSxcbiAgICByZW1vdmU6IGFwcGx5UmVtb3ZlU3R5bGVcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLnN0eWxlTW9kdWxlO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGUuanMubWFwIl19
+
+
+/***/ }),
+/* 456 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function createElement(tagName) {
+    return document.createElement(tagName);
+}
+function createElementNS(namespaceURI, qualifiedName) {
+    return document.createElementNS(namespaceURI, qualifiedName);
+}
+function createTextNode(text) {
+    return document.createTextNode(text);
+}
+function createComment(text) {
+    return document.createComment(text);
+}
+function insertBefore(parentNode, newNode, referenceNode) {
+    parentNode.insertBefore(newNode, referenceNode);
+}
+function removeChild(node, child) {
+    node.removeChild(child);
+}
+function appendChild(node, child) {
+    node.appendChild(child);
+}
+function parentNode(node) {
+    return node.parentNode;
+}
+function nextSibling(node) {
+    return node.nextSibling;
+}
+function tagName(elm) {
+    return elm.tagName;
+}
+function setTextContent(node, text) {
+    node.textContent = text;
+}
+function getTextContent(node) {
+    return node.textContent;
+}
+function isElement(node) {
+    return node.nodeType === 1;
+}
+function isText(node) {
+    return node.nodeType === 3;
+}
+function isComment(node) {
+    return node.nodeType === 8;
+}
+exports.htmlDomApi = {
+    createElement: createElement,
+    createElementNS: createElementNS,
+    createTextNode: createTextNode,
+    createComment: createComment,
+    insertBefore: insertBefore,
+    removeChild: removeChild,
+    appendChild: appendChild,
+    parentNode: parentNode,
+    nextSibling: nextSibling,
+    tagName: tagName,
+    setTextContent: setTextContent,
+    getTextContent: getTextContent,
+    isElement: isElement,
+    isText: isText,
+    isComment: isComment,
+};
+exports.default = exports.htmlDomApi;
+
+},{}],2:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var vnode_1 = require("./vnode");
+var htmldomapi_1 = require("./htmldomapi");
+function toVNode(node, domApi) {
+    var api = domApi !== undefined ? domApi : htmldomapi_1.default;
+    var text;
+    if (api.isElement(node)) {
+        var id = node.id ? '#' + node.id : '';
+        var cn = node.getAttribute('class');
+        var c = cn ? '.' + cn.split(' ').join('.') : '';
+        var sel = api.tagName(node).toLowerCase() + id + c;
+        var attrs = {};
+        var children = [];
+        var name_1;
+        var i = void 0, n = void 0;
+        var elmAttrs = node.attributes;
+        var elmChildren = node.childNodes;
+        for (i = 0, n = elmAttrs.length; i < n; i++) {
+            name_1 = elmAttrs[i].nodeName;
+            if (name_1 !== 'id' && name_1 !== 'class') {
+                attrs[name_1] = elmAttrs[i].nodeValue;
+            }
+        }
+        for (i = 0, n = elmChildren.length; i < n; i++) {
+            children.push(toVNode(elmChildren[i]));
+        }
+        return vnode_1.default(sel, { attrs: attrs }, children, undefined, node);
+    }
+    else if (api.isText(node)) {
+        text = api.getTextContent(node);
+        return vnode_1.default(undefined, undefined, undefined, text, node);
+    }
+    else if (api.isComment(node)) {
+        text = api.getTextContent(node);
+        return vnode_1.default('!', {}, [], text, node);
+    }
+    else {
+        return vnode_1.default('', {}, [], undefined, undefined);
+    }
+}
+exports.toVNode = toVNode;
+exports.default = toVNode;
+
+},{"./htmldomapi":1,"./vnode":3}],3:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function vnode(sel, data, children, text, elm) {
+    var key = data === undefined ? undefined : data.key;
+    return { sel: sel, data: data, children: children,
+        text: text, elm: elm, key: key };
+}
+exports.vnode = vnode;
+exports.default = vnode;
+
+},{}]},{},[2])(2)
+});
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiaHRtbGRvbWFwaS5qcyIsInRvdm5vZGUuanMiLCJ2bm9kZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNqRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUMzQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiBjcmVhdGVFbGVtZW50KHRhZ05hbWUpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCh0YWdOYW1lKTtcbn1cbmZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnROUyhuYW1lc3BhY2VVUkksIHF1YWxpZmllZE5hbWUpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKG5hbWVzcGFjZVVSSSwgcXVhbGlmaWVkTmFtZSk7XG59XG5mdW5jdGlvbiBjcmVhdGVUZXh0Tm9kZSh0ZXh0KSB7XG4gICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHRleHQpO1xufVxuZnVuY3Rpb24gY3JlYXRlQ29tbWVudCh0ZXh0KSB7XG4gICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZUNvbW1lbnQodGV4dCk7XG59XG5mdW5jdGlvbiBpbnNlcnRCZWZvcmUocGFyZW50Tm9kZSwgbmV3Tm9kZSwgcmVmZXJlbmNlTm9kZSkge1xuICAgIHBhcmVudE5vZGUuaW5zZXJ0QmVmb3JlKG5ld05vZGUsIHJlZmVyZW5jZU5vZGUpO1xufVxuZnVuY3Rpb24gcmVtb3ZlQ2hpbGQobm9kZSwgY2hpbGQpIHtcbiAgICBub2RlLnJlbW92ZUNoaWxkKGNoaWxkKTtcbn1cbmZ1bmN0aW9uIGFwcGVuZENoaWxkKG5vZGUsIGNoaWxkKSB7XG4gICAgbm9kZS5hcHBlbmRDaGlsZChjaGlsZCk7XG59XG5mdW5jdGlvbiBwYXJlbnROb2RlKG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5wYXJlbnROb2RlO1xufVxuZnVuY3Rpb24gbmV4dFNpYmxpbmcobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5leHRTaWJsaW5nO1xufVxuZnVuY3Rpb24gdGFnTmFtZShlbG0pIHtcbiAgICByZXR1cm4gZWxtLnRhZ05hbWU7XG59XG5mdW5jdGlvbiBzZXRUZXh0Q29udGVudChub2RlLCB0ZXh0KSB7XG4gICAgbm9kZS50ZXh0Q29udGVudCA9IHRleHQ7XG59XG5mdW5jdGlvbiBnZXRUZXh0Q29udGVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUudGV4dENvbnRlbnQ7XG59XG5mdW5jdGlvbiBpc0VsZW1lbnQobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5vZGVUeXBlID09PSAxO1xufVxuZnVuY3Rpb24gaXNUZXh0KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5ub2RlVHlwZSA9PT0gMztcbn1cbmZ1bmN0aW9uIGlzQ29tbWVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubm9kZVR5cGUgPT09IDg7XG59XG5leHBvcnRzLmh0bWxEb21BcGkgPSB7XG4gICAgY3JlYXRlRWxlbWVudDogY3JlYXRlRWxlbWVudCxcbiAgICBjcmVhdGVFbGVtZW50TlM6IGNyZWF0ZUVsZW1lbnROUyxcbiAgICBjcmVhdGVUZXh0Tm9kZTogY3JlYXRlVGV4dE5vZGUsXG4gICAgY3JlYXRlQ29tbWVudDogY3JlYXRlQ29tbWVudCxcbiAgICBpbnNlcnRCZWZvcmU6IGluc2VydEJlZm9yZSxcbiAgICByZW1vdmVDaGlsZDogcmVtb3ZlQ2hpbGQsXG4gICAgYXBwZW5kQ2hpbGQ6IGFwcGVuZENoaWxkLFxuICAgIHBhcmVudE5vZGU6IHBhcmVudE5vZGUsXG4gICAgbmV4dFNpYmxpbmc6IG5leHRTaWJsaW5nLFxuICAgIHRhZ05hbWU6IHRhZ05hbWUsXG4gICAgc2V0VGV4dENvbnRlbnQ6IHNldFRleHRDb250ZW50LFxuICAgIGdldFRleHRDb250ZW50OiBnZXRUZXh0Q29udGVudCxcbiAgICBpc0VsZW1lbnQ6IGlzRWxlbWVudCxcbiAgICBpc1RleHQ6IGlzVGV4dCxcbiAgICBpc0NvbW1lbnQ6IGlzQ29tbWVudCxcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLmh0bWxEb21BcGk7XG4vLyMgc291cmNlTWFwcGluZ1VSTD1odG1sZG9tYXBpLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIHZub2RlXzEgPSByZXF1aXJlKFwiLi92bm9kZVwiKTtcbnZhciBodG1sZG9tYXBpXzEgPSByZXF1aXJlKFwiLi9odG1sZG9tYXBpXCIpO1xuZnVuY3Rpb24gdG9WTm9kZShub2RlLCBkb21BcGkpIHtcbiAgICB2YXIgYXBpID0gZG9tQXBpICE9PSB1bmRlZmluZWQgPyBkb21BcGkgOiBodG1sZG9tYXBpXzEuZGVmYXVsdDtcbiAgICB2YXIgdGV4dDtcbiAgICBpZiAoYXBpLmlzRWxlbWVudChub2RlKSkge1xuICAgICAgICB2YXIgaWQgPSBub2RlLmlkID8gJyMnICsgbm9kZS5pZCA6ICcnO1xuICAgICAgICB2YXIgY24gPSBub2RlLmdldEF0dHJpYnV0ZSgnY2xhc3MnKTtcbiAgICAgICAgdmFyIGMgPSBjbiA/ICcuJyArIGNuLnNwbGl0KCcgJykuam9pbignLicpIDogJyc7XG4gICAgICAgIHZhciBzZWwgPSBhcGkudGFnTmFtZShub2RlKS50b0xvd2VyQ2FzZSgpICsgaWQgKyBjO1xuICAgICAgICB2YXIgYXR0cnMgPSB7fTtcbiAgICAgICAgdmFyIGNoaWxkcmVuID0gW107XG4gICAgICAgIHZhciBuYW1lXzE7XG4gICAgICAgIHZhciBpID0gdm9pZCAwLCBuID0gdm9pZCAwO1xuICAgICAgICB2YXIgZWxtQXR0cnMgPSBub2RlLmF0dHJpYnV0ZXM7XG4gICAgICAgIHZhciBlbG1DaGlsZHJlbiA9IG5vZGUuY2hpbGROb2RlcztcbiAgICAgICAgZm9yIChpID0gMCwgbiA9IGVsbUF0dHJzLmxlbmd0aDsgaSA8IG47IGkrKykge1xuICAgICAgICAgICAgbmFtZV8xID0gZWxtQXR0cnNbaV0ubm9kZU5hbWU7XG4gICAgICAgICAgICBpZiAobmFtZV8xICE9PSAnaWQnICYmIG5hbWVfMSAhPT0gJ2NsYXNzJykge1xuICAgICAgICAgICAgICAgIGF0dHJzW25hbWVfMV0gPSBlbG1BdHRyc1tpXS5ub2RlVmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChpID0gMCwgbiA9IGVsbUNoaWxkcmVuLmxlbmd0aDsgaSA8IG47IGkrKykge1xuICAgICAgICAgICAgY2hpbGRyZW4ucHVzaCh0b1ZOb2RlKGVsbUNoaWxkcmVuW2ldKSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdChzZWwsIHsgYXR0cnM6IGF0dHJzIH0sIGNoaWxkcmVuLCB1bmRlZmluZWQsIG5vZGUpO1xuICAgIH1cbiAgICBlbHNlIGlmIChhcGkuaXNUZXh0KG5vZGUpKSB7XG4gICAgICAgIHRleHQgPSBhcGkuZ2V0VGV4dENvbnRlbnQobm9kZSk7XG4gICAgICAgIHJldHVybiB2bm9kZV8xLmRlZmF1bHQodW5kZWZpbmVkLCB1bmRlZmluZWQsIHVuZGVmaW5lZCwgdGV4dCwgbm9kZSk7XG4gICAgfVxuICAgIGVsc2UgaWYgKGFwaS5pc0NvbW1lbnQobm9kZSkpIHtcbiAgICAgICAgdGV4dCA9IGFwaS5nZXRUZXh0Q29udGVudChub2RlKTtcbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdCgnIScsIHt9LCBbXSwgdGV4dCwgbm9kZSk7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXR1cm4gdm5vZGVfMS5kZWZhdWx0KCcnLCB7fSwgW10sIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTtcbiAgICB9XG59XG5leHBvcnRzLnRvVk5vZGUgPSB0b1ZOb2RlO1xuZXhwb3J0cy5kZWZhdWx0ID0gdG9WTm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRvdm5vZGUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB2bm9kZShzZWwsIGRhdGEsIGNoaWxkcmVuLCB0ZXh0LCBlbG0pIHtcbiAgICB2YXIga2V5ID0gZGF0YSA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogZGF0YS5rZXk7XG4gICAgcmV0dXJuIHsgc2VsOiBzZWwsIGRhdGE6IGRhdGEsIGNoaWxkcmVuOiBjaGlsZHJlbixcbiAgICAgICAgdGV4dDogdGV4dCwgZWxtOiBlbG0sIGtleToga2V5IH07XG59XG5leHBvcnRzLnZub2RlID0gdm5vZGU7XG5leHBvcnRzLmRlZmF1bHQgPSB2bm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXZub2RlLmpzLm1hcCJdfQ==
+
+
+/***/ }),
+/* 457 */
+/***/ (function(module, exports, __webpack_require__) {
+
+
+var content = __webpack_require__(458);
+
+if(typeof content === 'string') content = [[module.i, content, '']];
+
+var transform;
+var insertInto;
+
+
+
+var options = {"hmr":true}
+
+options.transform = transform
+options.insertInto = undefined;
+
+var update = __webpack_require__(460)(content, options);
+
+if(content.locals) module.exports = content.locals;
+
+if(false) {}
+
+/***/ }),
+/* 458 */
+/***/ (function(module, exports, __webpack_require__) {
+
+exports = module.exports = __webpack_require__(459)(true);
+// Module
+exports.push([module.i, "", "",{"version":3,"sources":[],"names":[],"mappings":"","file":"converse.scss"}]);
+
+
+/***/ }),
+/* 459 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/*
+  MIT License http://www.opensource.org/licenses/mit-license.php
+  Author Tobias Koppers @sokra
+*/
+// css base code, injected by the css-loader
+// eslint-disable-next-line func-names
+module.exports = function (useSourceMap) {
+  var list = []; // return the list of modules as css string
+
+  list.toString = function toString() {
+    return this.map(function (item) {
+      var content = cssWithMappingToString(item, useSourceMap);
+
+      if (item[2]) {
+        return "@media ".concat(item[2], "{").concat(content, "}");
+      }
+
+      return content;
+    }).join('');
+  }; // import a list of modules into the list
+  // eslint-disable-next-line func-names
+
+
+  list.i = function (modules, mediaQuery) {
+    if (typeof modules === 'string') {
+      // eslint-disable-next-line no-param-reassign
+      modules = [[null, modules, '']];
+    }
+
+    var alreadyImportedModules = {};
+
+    for (var i = 0; i < this.length; i++) {
+      // eslint-disable-next-line prefer-destructuring
+      var id = this[i][0];
+
+      if (id != null) {
+        alreadyImportedModules[id] = true;
+      }
+    }
+
+    for (var _i = 0; _i < modules.length; _i++) {
+      var item = modules[_i]; // skip already imported module
+      // this implementation is not 100% perfect for weird media query combinations
+      // when a module is imported multiple times with different media queries.
+      // I hope this will never occur (Hey this way we have smaller bundles)
+
+      if (item[0] == null || !alreadyImportedModules[item[0]]) {
+        if (mediaQuery && !item[2]) {
+          item[2] = mediaQuery;
+        } else if (mediaQuery) {
+          item[2] = "(".concat(item[2], ") and (").concat(mediaQuery, ")");
+        }
+
+        list.push(item);
+      }
+    }
+  };
+
+  return list;
+};
+
+function cssWithMappingToString(item, useSourceMap) {
+  var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
+
+  var cssMapping = item[3];
+
+  if (!cssMapping) {
+    return content;
+  }
+
+  if (useSourceMap && typeof btoa === 'function') {
+    var sourceMapping = toComment(cssMapping);
+    var sourceURLs = cssMapping.sources.map(function (source) {
+      return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */");
+    });
+    return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
+  }
+
+  return [content].join('\n');
+} // Adapted from convert-source-map (MIT)
+
+
+function toComment(sourceMap) {
+  // eslint-disable-next-line no-undef
+  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
+  var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
+  return "/*# ".concat(data, " */");
+}
+
+/***/ }),
+/* 460 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/*
+    MIT License http://www.opensource.org/licenses/mit-license.php
+    Author Tobias Koppers @sokra
+*/
+
+var stylesInDom = {};
+
+var memoize = function (fn) {
+    var memo;
+
+    return function () {
+        if (typeof memo === "undefined") memo = fn.apply(this, arguments);
+        return memo;
+    };
+};
+
+var isOldIE = memoize(function () {
+    // Test for IE <= 9 as proposed by Browserhacks
+    // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
+    // Tests for existence of standard globals is to allow style-loader
+    // to operate correctly into non-standard environments
+    // @see https://github.com/webpack-contrib/style-loader/issues/177
+    return window && document && document.all && !window.atob;
+});
+
+var getTarget = function (target, parent) {
+  if (parent){
+    return parent.querySelector(target);
+  }
+  return document.querySelector(target);
+};
+
+var getElement = (function (fn) {
+    var memo = {};
+
+    return function(target, parent) {
+                // If passing function in options, then use it for resolve "head" element.
+                // Useful for Shadow Root style i.e
+                // {
+                //   insertInto: function () { return document.querySelector("#foo").shadowRoot }
+                // }
+                if (typeof target === 'function') {
+                        return target();
+                }
+                if (typeof memo[target] === "undefined") {
+            var styleTarget = getTarget.call(this, target, parent);
+            // Special case to return head of iframe instead of iframe itself
+            if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
+                try {
+                    // This will throw an exception if access to iframe is blocked
+                    // due to cross-origin restrictions
+                    styleTarget = styleTarget.contentDocument.head;
+                } catch(e) {
+                    styleTarget = null;
+                }
+            }
+            memo[target] = styleTarget;
+        }
+        return memo[target]
+    };
+})();
+
+var singleton = null;
+var singletonCounter = 0;
+var stylesInsertedAtTop = [];
+
+var fixUrls = __webpack_require__(461);
+
+module.exports = function(list, options) {
+    if (typeof DEBUG !== "undefined" && DEBUG) {
+        if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
+    }
+
+    options = options || {};
+
+    options.attrs = typeof options.attrs === "object" ? options.attrs : {};
+
+    // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
+    // tags it will allow on a page
+    if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
+
+    // By default, add <style> tags to the <head> element
+        if (!options.insertInto) options.insertInto = "head";
+
+    // By default, add <style> tags to the bottom of the target
+    if (!options.insertAt) options.insertAt = "bottom";
+
+    var styles = listToStyles(list, options);
+
+    addStylesToDom(styles, options);
+
+    return function update (newList) {
+        var mayRemove = [];
+
+        for (var i = 0; i < styles.length; i++) {
+            var item = styles[i];
+            var domStyle = stylesInDom[item.id];
+
+            domStyle.refs--;
+            mayRemove.push(domStyle);
+        }
+
+        if(newList) {
+            var newStyles = listToStyles(newList, options);
+            addStylesToDom(newStyles, options);
+        }
+
+        for (var i = 0; i < mayRemove.length; i++) {
+            var domStyle = mayRemove[i];
+
+            if(domStyle.refs === 0) {
+                for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
+
+                delete stylesInDom[domStyle.id];
+            }
+        }
+    };
+};
+
+function addStylesToDom (styles, options) {
+    for (var i = 0; i < styles.length; i++) {
+        var item = styles[i];
+        var domStyle = stylesInDom[item.id];
+
+        if(domStyle) {
+            domStyle.refs++;
+
+            for(var j = 0; j < domStyle.parts.length; j++) {
+                domStyle.parts[j](item.parts[j]);
+            }
+
+            for(; j < item.parts.length; j++) {
+                domStyle.parts.push(addStyle(item.parts[j], options));
+            }
+        } else {
+            var parts = [];
+
+            for(var j = 0; j < item.parts.length; j++) {
+                parts.push(addStyle(item.parts[j], options));
+            }
+
+            stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
+        }
+    }
+}
+
+function listToStyles (list, options) {
+    var styles = [];
+    var newStyles = {};
+
+    for (var i = 0; i < list.length; i++) {
+        var item = list[i];
+        var id = options.base ? item[0] + options.base : item[0];
+        var css = item[1];
+        var media = item[2];
+        var sourceMap = item[3];
+        var part = {css: css, media: media, sourceMap: sourceMap};
+
+        if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
+        else newStyles[id].parts.push(part);
+    }
+
+    return styles;
+}
+
+function insertStyleElement (options, style) {
+    var target = getElement(options.insertInto)
+
+    if (!target) {
+        throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
+    }
+
+    var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
+
+    if (options.insertAt === "top") {
+        if (!lastStyleElementInsertedAtTop) {
+            target.insertBefore(style, target.firstChild);
+        } else if (lastStyleElementInsertedAtTop.nextSibling) {
+            target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
+        } else {
+            target.appendChild(style);
+        }
+        stylesInsertedAtTop.push(style);
+    } else if (options.insertAt === "bottom") {
+        target.appendChild(style);
+    } else if (typeof options.insertAt === "object" && options.insertAt.before) {
+        var nextSibling = getElement(options.insertAt.before, target);
+        target.insertBefore(style, nextSibling);
+    } else {
+        throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
+    }
+}
+
+function removeStyleElement (style) {
+    if (style.parentNode === null) return false;
+    style.parentNode.removeChild(style);
+
+    var idx = stylesInsertedAtTop.indexOf(style);
+    if(idx >= 0) {
+        stylesInsertedAtTop.splice(idx, 1);
+    }
+}
+
+function createStyleElement (options) {
+    var style = document.createElement("style");
+
+    if(options.attrs.type === undefined) {
+        options.attrs.type = "text/css";
+    }
+
+    if(options.attrs.nonce === undefined) {
+        var nonce = getNonce();
+        if (nonce) {
+            options.attrs.nonce = nonce;
+        }
+    }
+
+    addAttrs(style, options.attrs);
+    insertStyleElement(options, style);
+
+    return style;
+}
+
+function createLinkElement (options) {
+    var link = document.createElement("link");
+
+    if(options.attrs.type === undefined) {
+        options.attrs.type = "text/css";
+    }
+    options.attrs.rel = "stylesheet";
+
+    addAttrs(link, options.attrs);
+    insertStyleElement(options, link);
+
+    return link;
+}
+
+function addAttrs (el, attrs) {
+    Object.keys(attrs).forEach(function (key) {
+        el.setAttribute(key, attrs[key]);
+    });
+}
+
+function getNonce() {
+    if (false) {}
+
+    return __webpack_require__.nc;
+}
+
+function addStyle (obj, options) {
+    var style, update, remove, result;
+
+    // If a transform function was defined, run it on the css
+    if (options.transform && obj.css) {
+        result = typeof options.transform === 'function'
+         ? options.transform(obj.css)
+         : options.transform.default(obj.css);
+
+        if (result) {
+            // If transform returns a value, use that instead of the original css.
+            // This allows running runtime transformations on the css.
+            obj.css = result;
+        } else {
+            // If the transform function returns a falsy value, don't add this css.
+            // This allows conditional loading of css
+            return function() {
+                // noop
+            };
+        }
+    }
+
+    if (options.singleton) {
+        var styleIndex = singletonCounter++;
+
+        style = singleton || (singleton = createStyleElement(options));
+
+        update = applyToSingletonTag.bind(null, style, styleIndex, false);
+        remove = applyToSingletonTag.bind(null, style, styleIndex, true);
+
+    } else if (
+        obj.sourceMap &&
+        typeof URL === "function" &&
+        typeof URL.createObjectURL === "function" &&
+        typeof URL.revokeObjectURL === "function" &&
+        typeof Blob === "function" &&
+        typeof btoa === "function"
+    ) {
+        style = createLinkElement(options);
+        update = updateLink.bind(null, style, options);
+        remove = function () {
+            removeStyleElement(style);
+
+            if(style.href) URL.revokeObjectURL(style.href);
+        };
+    } else {
+        style = createStyleElement(options);
+        update = applyToTag.bind(null, style);
+        remove = function () {
+            removeStyleElement(style);
+        };
+    }
+
+    update(obj);
+
+    return function updateStyle (newObj) {
+        if (newObj) {
+            if (
+                newObj.css === obj.css &&
+                newObj.media === obj.media &&
+                newObj.sourceMap === obj.sourceMap
+            ) {
+                return;
+            }
+
+            update(obj = newObj);
+        } else {
+            remove();
+        }
+    };
+}
+
+var replaceText = (function () {
+    var textStore = [];
+
+    return function (index, replacement) {
+        textStore[index] = replacement;
+
+        return textStore.filter(Boolean).join('\n');
+    };
+})();
+
+function applyToSingletonTag (style, index, remove, obj) {
+    var css = remove ? "" : obj.css;
+
+    if (style.styleSheet) {
+        style.styleSheet.cssText = replaceText(index, css);
+    } else {
+        var cssNode = document.createTextNode(css);
+        var childNodes = style.childNodes;
+
+        if (childNodes[index]) style.removeChild(childNodes[index]);
+
+        if (childNodes.length) {
+            style.insertBefore(cssNode, childNodes[index]);
+        } else {
+            style.appendChild(cssNode);
+        }
+    }
+}
+
+function applyToTag (style, obj) {
+    var css = obj.css;
+    var media = obj.media;
+
+    if(media) {
+        style.setAttribute("media", media)
+    }
+
+    if(style.styleSheet) {
+        style.styleSheet.cssText = css;
+    } else {
+        while(style.firstChild) {
+            style.removeChild(style.firstChild);
+        }
+
+        style.appendChild(document.createTextNode(css));
+    }
+}
+
+function updateLink (link, options, obj) {
+    var css = obj.css;
+    var sourceMap = obj.sourceMap;
+
+    /*
+        If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
+        and there is no publicPath defined then lets turn convertToAbsoluteUrls
+        on by default.  Otherwise default to the convertToAbsoluteUrls option
+        directly
+    */
+    var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
+
+    if (options.convertToAbsoluteUrls || autoFixUrls) {
+        css = fixUrls(css);
+    }
+
+    if (sourceMap) {
+        // http://stackoverflow.com/a/26603875
+        css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
+    }
+
+    var blob = new Blob([css], { type: "text/css" });
+
+    var oldSrc = link.href;
+
+    link.href = URL.createObjectURL(blob);
+
+    if(oldSrc) URL.revokeObjectURL(oldSrc);
+}
+
+
+/***/ }),
+/* 461 */
+/***/ (function(module, exports) {
+
+
+/**
+ * When source maps are enabled, `style-loader` uses a link element with a data-uri to
+ * embed the css on the page. This breaks all relative urls because now they are relative to a
+ * bundle instead of the current page.
+ *
+ * One solution is to only use full urls, but that may be impossible.
+ *
+ * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
+ *
+ * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
+ *
+ */
+
+module.exports = function (css) {
+  // get current location
+  var location = typeof window !== "undefined" && window.location;
+
+  if (!location) {
+    throw new Error("fixUrls requires window.location");
+  }
+
+    // blank or null?
+    if (!css || typeof css !== "string") {
+      return css;
+  }
+
+  var baseUrl = location.protocol + "//" + location.host;
+  var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
+
+    // convert each url(...)
+    /*
+    This regular expression is just a way to recursively match brackets within
+    a string.
+
+     /url\s*\(  = Match on the word "url" with any whitespace after it and then a parens
+       (  = Start a capturing group
+         (?:  = Start a non-capturing group
+             [^)(]  = Match anything that isn't a parentheses
+             |  = OR
+             \(  = Match a start parentheses
+                 (?:  = Start another non-capturing groups
+                     [^)(]+  = Match anything that isn't a parentheses
+                     |  = OR
+                     \(  = Match a start parentheses
+                         [^)(]*  = Match anything that isn't a parentheses
+                     \)  = Match a end parentheses
+                 )  = End Group
+              *\) = Match anything and then a close parens
+          )  = Close non-capturing group
+          *  = Match anything
+       )  = Close capturing group
+     \)  = Match a close parens
+
+     /gi  = Get all matches, not the first.  Be case insensitive.
+     */
+    var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
+        // strip quotes (if they exist)
+        var unquotedOrigUrl = origUrl
+            .trim()
+            .replace(/^"(.*)"$/, function(o, $1){ return $1; })
+            .replace(/^'(.*)'$/, function(o, $1){ return $1; });
+
+        // already a full url? no change
+        if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
+          return fullMatch;
+        }
+
+        // convert the url to a full url
+        var newUrl;
+
+        if (unquotedOrigUrl.indexOf("//") === 0) {
+            //TODO: should we add protocol?
+            newUrl = unquotedOrigUrl;
+        } else if (unquotedOrigUrl.indexOf("/") === 0) {
+            // path should be relative to the base url
+            newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
+        } else {
+            // path should be relative to current directory
+            newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
+        }
+
+        // send back the fixed url(...)
+        return "url(" + JSON.stringify(newUrl) + ")";
+    });
+
+    // send back the fixed css
+    return fixedCss;
+};
+
+
+/***/ }),
+/* 462 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+
+// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
+var lodash = __webpack_require__(0);
+
+// CONCATENATED MODULE: ./node_modules/strophe.js/src/md5.js
+/*
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+/*
+ * Everything that isn't used by Strophe has been stripped here!
+ */
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+const safe_add = function (x, y) {
+    const lsw = (x & 0xFFFF) + (y & 0xFFFF);
+    const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+    return (msw << 16) | (lsw & 0xFFFF);
+};
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+const bit_rol = function (num, cnt) {
+    return (num << cnt) | (num >>> (32 - cnt));
+};
+
+/*
+ * Convert a string to an array of little-endian words
+ */
+const str2binl = function (str) {
+    if (typeof str !== "string") {
+        throw new Error("str2binl was passed a non-string");
+    }
+    const bin = [];
+    for(let i = 0; i < str.length * 8; i += 8)
+    {
+        bin[i>>5] |= (str.charCodeAt(i / 8) & 255) << (i%32);
+    }
+    return bin;
+};
+
+/*
+ * Convert an array of little-endian words to a string
+ */
+const binl2str = function (bin) {
+    let str = "";
+    for(let i = 0; i < bin.length * 32; i += 8)
+    {
+        str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & 255);
+    }
+    return str;
+};
+
+/*
+ * Convert an array of little-endian words to a hex string.
+ */
+const binl2hex = function (binarray) {
+    const hex_tab = "0123456789abcdef";
+    let str = "";
+    for(let i = 0; i < binarray.length * 4; i++)
+    {
+        str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
+            hex_tab.charAt((binarray[i>>2] >> ((i%4)*8  )) & 0xF);
+    }
+    return str;
+};
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+const md5_cmn = function (q, a, b, x, s, t) {
+    return safe_add(bit_rol(safe_add(safe_add(a, q),safe_add(x, t)), s),b);
+};
+
+const md5_ff = function (a, b, c, d, x, s, t) {
+    return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+};
+
+const md5_gg = function (a, b, c, d, x, s, t) {
+    return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+};
+
+const md5_hh = function (a, b, c, d, x, s, t) {
+    return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+};
+
+const md5_ii = function (a, b, c, d, x, s, t) {
+    return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+};
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length
+ */
+const core_md5 = function (x, len) {
+    /* append padding */
+    x[len >> 5] |= 0x80 << ((len) % 32);
+    x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+    let a =  1732584193;
+    let b = -271733879;
+    let c = -1732584194;
+    let d =  271733878;
+
+    let olda, oldb, oldc, oldd;
+    for (let i = 0; i < x.length; i += 16)
+    {
+        olda = a;
+        oldb = b;
+        oldc = c;
+        oldd = d;
+
+        a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
+        d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
+        c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
+        b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
+        a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
+        d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
+        c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
+        b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
+        a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
+        d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
+        c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
+        b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
+        a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
+        d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
+        c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
+        b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);
+
+        a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
+        d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
+        c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
+        b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
+        a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
+        d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
+        c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
+        b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
+        a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
+        d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
+        c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
+        b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
+        a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
+        d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
+        c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
+        b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
+
+        a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
+        d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
+        c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
+        b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
+        a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
+        d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
+        c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
+        b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
+        a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
+        d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
+        c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
+        b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
+        a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
+        d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
+        c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
+        b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
+
+        a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
+        d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
+        c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
+        b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
+        a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
+        d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
+        c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
+        b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
+        a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
+        d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
+        c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
+        b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
+        a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
+        d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
+        c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
+        b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+
+        a = safe_add(a, olda);
+        b = safe_add(b, oldb);
+        c = safe_add(c, oldc);
+        d = safe_add(d, oldd);
+    }
+    return [a, b, c, d];
+};
+
+/*
+ * These are the functions you'll usually want to call.
+ * They take string arguments and return either hex or base-64 encoded
+ * strings.
+ */
+const MD5 = {
+    hexdigest: function (s) {
+        return binl2hex(core_md5(str2binl(s), s.length * 8));
+    },
+    hash: function (s) {
+        return binl2str(core_md5(str2binl(s), s.length * 8));
+    }
+};
+
+
+// CONCATENATED MODULE: ./node_modules/strophe.js/src/sha1.js
+/*
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
+ * in FIPS PUB 180-1
+ * Version 2.1a Copyright Paul Johnston 2000 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for details.
+ */
+/* global define */
+
+/* Some functions and variables have been stripped for use with Strophe */
+
+/*
+ * Calculate the SHA-1 of an array of big-endian words, and a bit length
+ */
+function core_sha1(x, len) {
+    /* append padding */
+    x[len >> 5] |= 0x80 << (24 - len % 32);
+    x[((len + 64 >> 9) << 4) + 15] = len;
+
+    var w = new Array(80);
+    var a =  1732584193;
+    var b = -271733879;
+    var c = -1732584194;
+    var d =  271733878;
+    var e = -1009589776;
+
+    var i, j, t, olda, oldb, oldc, oldd, olde;
+    for (i = 0; i < x.length; i += 16) {
+        olda = a;
+        oldb = b;
+        oldc = c;
+        oldd = d;
+        olde = e;
+
+        for (j = 0; j < 80; j++) {
+            if (j < 16) {
+                w[j] = x[i + j];
+            } else {
+                w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
+            }
+
+            t = sha1_safe_add(sha1_safe_add(rol(a, 5), sha1_ft(j, b, c, d)),
+                         sha1_safe_add(sha1_safe_add(e, w[j]), sha1_kt(j)));
+            e = d;
+            d = c;
+            c = rol(b, 30);
+            b = a;
+            a = t;
+        }
+
+        a = sha1_safe_add(a, olda);
+        b = sha1_safe_add(b, oldb);
+        c = sha1_safe_add(c, oldc);
+        d = sha1_safe_add(d, oldd);
+        e = sha1_safe_add(e, olde);
+    }
+    return [a, b, c, d, e];
+}
+
+/*
+ * Perform the appropriate triplet combination function for the current
+ * iteration
+ */
+function sha1_ft (t, b, c, d) {
+    if (t < 20) { return (b & c) | ((~b) & d); }
+    if (t < 40) { return b ^ c ^ d; }
+    if (t < 60) { return (b & c) | (b & d) | (c & d); }
+    return b ^ c ^ d;
+}
+
+/*
+ * Determine the appropriate additive constant for the current iteration
+ */
+function sha1_kt(t) {
+    return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 : (t < 60) ? -1894007588 : -899497514;
+}
+
+/*
+ * Calculate the HMAC-SHA1 of a key and some data
+ */
+function core_hmac_sha1(key, data) {
+    var bkey = str2binb(key);
+    if (bkey.length > 16) {
+        bkey = core_sha1(bkey, key.length * 8);
+    }
+
+    var ipad = new Array(16), opad = new Array(16);
+    for (var i = 0; i < 16; i++) {
+        ipad[i] = bkey[i] ^ 0x36363636;
+        opad[i] = bkey[i] ^ 0x5C5C5C5C;
+    }
+
+    var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * 8);
+    return core_sha1(opad.concat(hash), 512 + 160);
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function sha1_safe_add(x, y) {
+    var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+    var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+    return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol(num, cnt) {
+    return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+ * Convert an 8-bit or 16-bit string to an array of big-endian words
+ * In 8-bit function, characters >255 have their hi-byte silently ignored.
+ */
+function str2binb(str) {
+    var bin = [];
+    var mask = 255;
+    for (var i = 0; i < str.length * 8; i += 8) {
+        bin[i>>5] |= (str.charCodeAt(i / 8) & mask) << (24 - i%32);
+    }
+    return bin;
+}
+
+/*
+ * Convert an array of big-endian words to a base-64 string
+ */
+function binb2b64 (binarray) {
+    var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+    var str = "";
+    var triplet, j;
+    for (var i = 0; i < binarray.length * 4; i += 3) {
+        triplet = (((binarray[i   >> 2] >> 8 * (3 -  i   %4)) & 0xFF) << 16) |
+                  (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) |
+                  ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
+
+        for (j = 0; j < 4; j++) {
+            if (i * 8 + j * 6 > binarray.length * 32) { str += "="; }
+            else { str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); }
+        }
+    }
+    return str;
+}
+
+/*
+ * Convert an array of big-endian words to a string
+ */
+function binb2str(bin) {
+    var str = "";
+    var mask = 255;
+    for (var i = 0; i < bin.length * 32; i += 8) {
+        str += String.fromCharCode((bin[i>>5] >>> (24 - i%32)) & mask);
+    }
+    return str;
+}
+
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+const SHA1 = {
+    b64_hmac_sha1:  function (key, data){ return binb2b64(core_hmac_sha1(key, data)); },
+    b64_sha1:       function (s) { return binb2b64(core_sha1(str2binb(s),s.length * 8)); },
+    binb2str:       binb2str,
+    core_hmac_sha1: core_hmac_sha1,
+    str_hmac_sha1:  function (key, data){ return binb2str(core_hmac_sha1(key, data)); },
+    str_sha1:       function (s) { return binb2str(core_sha1(str2binb(s),s.length * 8)); },
+};
+
+
+// CONCATENATED MODULE: ./node_modules/strophe.js/src/utils.js
+const utils = {
+
+    utf16to8: function (str) {
+        var i, c;
+        var out = "";
+        var len = str.length;
+        for (i = 0; i < len; i++) {
+            c = str.charCodeAt(i);
+            if ((c >= 0x0000) && (c <= 0x007F)) {
+                out += str.charAt(i);
+            } else if (c > 0x07FF) {
+                out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
+                out += String.fromCharCode(0x80 | ((c >>  6) & 0x3F));
+                out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
+            } else {
+                out += String.fromCharCode(0xC0 | ((c >>  6) & 0x1F));
+                out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
+            }
+        }
+        return out;
+    },
+
+    addCookies: function (cookies) {
+        /* Parameters:
+         *  (Object) cookies - either a map of cookie names
+         *    to string values or to maps of cookie values.
+         *
+         * For example:
+         * { "myCookie": "1234" }
+         *
+         * or:
+         * { "myCookie": {
+         *      "value": "1234",
+         *      "domain": ".example.org",
+         *      "path": "/",
+         *      "expires": expirationDate
+         *      }
+         *  }
+         *
+         *  These values get passed to Strophe.Connection via
+         *   options.cookies
+         */
+        cookies = cookies || {};
+        for (const cookieName in cookies) {
+            if (Object.prototype.hasOwnProperty.call(cookies, cookieName)) {
+                let expires = '';
+                let domain = '';
+                let path = '';
+                const cookieObj = cookies[cookieName];
+                const isObj = typeof cookieObj === "object";
+                const cookieValue = escape(unescape(isObj ? cookieObj.value : cookieObj));
+                if (isObj) {
+                    expires = cookieObj.expires ? ";expires="+cookieObj.expires : '';
+                    domain = cookieObj.domain ? ";domain="+cookieObj.domain : '';
+                    path = cookieObj.path ? ";path="+cookieObj.path : '';
+                }
+                document.cookie =
+                    cookieName+'='+cookieValue + expires + domain + path;
+            }
+        }
+    }
+};
+
+
+
+// CONCATENATED MODULE: ./node_modules/strophe.js/src/core.js
+/*
+    This program is distributed under the terms of the MIT license.
+    Please see the LICENSE file for details.
+
+    Copyright 2006-2018, OGG, LLC
+*/
+/*global define, document, sessionStorage, setTimeout, clearTimeout, ActiveXObject, DOMParser, btoa, atob, module */
+
+
+
+
+
+/** Function: $build
+ *  Create a Strophe.Builder.
+ *  This is an alias for 'new Strophe.Builder(name, attrs)'.
+ *
+ *  Parameters:
+ *    (String) name - The root element name.
+ *    (Object) attrs - The attributes for the root element in object notation.
+ *
+ *  Returns:
+ *    A new Strophe.Builder object.
+ */
+function $build(name, attrs) {
+    return new Strophe.Builder(name, attrs);
+}
+
+/** Function: $msg
+ *  Create a Strophe.Builder with a <message/> element as the root.
+ *
+ *  Parameters:
+ *    (Object) attrs - The <message/> element attributes in object notation.
+ *
+ *  Returns:
+ *    A new Strophe.Builder object.
+ */
+function $msg(attrs) {
+    return new Strophe.Builder("message", attrs);
+}
+
+/** Function: $iq
+ *  Create a Strophe.Builder with an <iq/> element as the root.
+ *
+ *  Parameters:
+ *    (Object) attrs - The <iq/> element attributes in object notation.
+ *
+ *  Returns:
+ *    A new Strophe.Builder object.
+ */
+function $iq(attrs) {
+    return new Strophe.Builder("iq", attrs);
+}
+
+/** Function: $pres
+ *  Create a Strophe.Builder with a <presence/> element as the root.
+ *
+ *  Parameters:
+ *    (Object) attrs - The <presence/> element attributes in object notation.
+ *
+ *  Returns:
+ *    A new Strophe.Builder object.
+ */
+function $pres(attrs) {
+    return new Strophe.Builder("presence", attrs);
+}
+
+/** Class: Strophe
+ *  An object container for all Strophe library functions.
+ *
+ *  This class is just a container for all the objects and constants
+ *  used in the library.  It is not meant to be instantiated, but to
+ *  provide a namespace for library objects, constants, and functions.
+ */
+const Strophe = {
+    /** Constant: VERSION */
+    VERSION: "@VERSION@",
+
+    /** Constants: XMPP Namespace Constants
+     *  Common namespace constants from the XMPP RFCs and XEPs.
+     *
+     *  NS.HTTPBIND - HTTP BIND namespace from XEP 124.
+     *  NS.BOSH - BOSH namespace from XEP 206.
+     *  NS.CLIENT - Main XMPP client namespace.
+     *  NS.AUTH - Legacy authentication namespace.
+     *  NS.ROSTER - Roster operations namespace.
+     *  NS.PROFILE - Profile namespace.
+     *  NS.DISCO_INFO - Service discovery info namespace from XEP 30.
+     *  NS.DISCO_ITEMS - Service discovery items namespace from XEP 30.
+     *  NS.MUC - Multi-User Chat namespace from XEP 45.
+     *  NS.SASL - XMPP SASL namespace from RFC 3920.
+     *  NS.STREAM - XMPP Streams namespace from RFC 3920.
+     *  NS.BIND - XMPP Binding namespace from RFC 3920 and RFC 6120.
+     *  NS.SESSION - XMPP Session namespace from RFC 3920.
+     *  NS.XHTML_IM - XHTML-IM namespace from XEP 71.
+     *  NS.XHTML - XHTML body namespace from XEP 71.
+     */
+    NS: {
+        HTTPBIND: "http://jabber.org/protocol/httpbind",
+        BOSH: "urn:xmpp:xbosh",
+        CLIENT: "jabber:client",
+        AUTH: "jabber:iq:auth",
+        ROSTER: "jabber:iq:roster",
+        PROFILE: "jabber:iq:profile",
+        DISCO_INFO: "http://jabber.org/protocol/disco#info",
+        DISCO_ITEMS: "http://jabber.org/protocol/disco#items",
+        MUC: "http://jabber.org/protocol/muc",
+        SASL: "urn:ietf:params:xml:ns:xmpp-sasl",
+        STREAM: "http://etherx.jabber.org/streams",
+        FRAMING: "urn:ietf:params:xml:ns:xmpp-framing",
+        BIND: "urn:ietf:params:xml:ns:xmpp-bind",
+        SESSION: "urn:ietf:params:xml:ns:xmpp-session",
+        VERSION: "jabber:iq:version",
+        STANZAS: "urn:ietf:params:xml:ns:xmpp-stanzas",
+        XHTML_IM: "http://jabber.org/protocol/xhtml-im",
+        XHTML: "http://www.w3.org/1999/xhtml"
+    },
+
+    /** Constants: XHTML_IM Namespace
+     *  contains allowed tags, tag attributes, and css properties.
+     *  Used in the createHtml function to filter incoming html into the allowed XHTML-IM subset.
+     *  See http://xmpp.org/extensions/xep-0071.html#profile-summary for the list of recommended
+     *  allowed tags and their attributes.
+     */
+    XHTML: {
+        tags: ['a','blockquote','br','cite','em','img','li','ol','p','span','strong','ul','body'],
+        attributes: {
+            'a':          ['href'],
+            'blockquote': ['style'],
+            'br':         [],
+            'cite':       ['style'],
+            'em':         [],
+            'img':        ['src', 'alt', 'style', 'height', 'width'],
+            'li':         ['style'],
+            'ol':         ['style'],
+            'p':          ['style'],
+            'span':       ['style'],
+            'strong':     [],
+            'ul':         ['style'],
+            'body':       []
+        },
+        css: ['background-color','color','font-family','font-size','font-style','font-weight','margin-left','margin-right','text-align','text-decoration'],
+        /** Function: XHTML.validTag
+         *
+         * Utility method to determine whether a tag is allowed
+         * in the XHTML_IM namespace.
+         *
+         * XHTML tag names are case sensitive and must be lower case.
+         */
+        validTag: function(tag) {
+            for (let i=0; i<Strophe.XHTML.tags.length; i++) {
+                if (tag === Strophe.XHTML.tags[i]) {
+                    return true;
+                }
+            }
+            return false;
+        },
+        /** Function: XHTML.validAttribute
+         *
+         * Utility method to determine whether an attribute is allowed
+         * as recommended per XEP-0071
+         *
+         * XHTML attribute names are case sensitive and must be lower case.
+         */
+        validAttribute: function(tag, attribute) {
+            if (typeof Strophe.XHTML.attributes[tag] !== 'undefined' && Strophe.XHTML.attributes[tag].length > 0) {
+                for (let i=0; i<Strophe.XHTML.attributes[tag].length; i++) {
+                    if (attribute === Strophe.XHTML.attributes[tag][i]) {
+                        return true;
+                    }
+                }
+            }
+        return false;
+        },
+        validCSS: function(style) {
+            for (let i=0; i<Strophe.XHTML.css.length; i++) {
+                if (style === Strophe.XHTML.css[i]) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    },
+
+    /** Constants: Connection Status Constants
+     *  Connection status constants for use by the connection handler
+     *  callback.
+     *
+     *  Status.ERROR - An error has occurred
+     *  Status.CONNECTING - The connection is currently being made
+     *  Status.CONNFAIL - The connection attempt failed
+     *  Status.AUTHENTICATING - The connection is authenticating
+     *  Status.AUTHFAIL - The authentication attempt failed
+     *  Status.CONNECTED - The connection has succeeded
+     *  Status.DISCONNECTED - The connection has been terminated
+     *  Status.DISCONNECTING - The connection is currently being terminated
+     *  Status.ATTACHED - The connection has been attached
+     *  Status.REDIRECT - The connection has been redirected
+     *  Status.CONNTIMEOUT - The connection has timed out
+     */
+    Status: {
+        ERROR: 0,
+        CONNECTING: 1,
+        CONNFAIL: 2,
+        AUTHENTICATING: 3,
+        AUTHFAIL: 4,
+        CONNECTED: 5,
+        DISCONNECTED: 6,
+        DISCONNECTING: 7,
+        ATTACHED: 8,
+        REDIRECT: 9,
+        CONNTIMEOUT: 10,
+        BINDREQUIRED: 11
+    },
+
+    ErrorCondition: {
+        BAD_FORMAT: "bad-format",
+        CONFLICT: "conflict",
+        MISSING_JID_NODE: "x-strophe-bad-non-anon-jid",
+        NO_AUTH_MECH: "no-auth-mech",
+        UNKNOWN_REASON: "unknown",
+    },
+
+    /** Constants: Log Level Constants
+     *  Logging level indicators.
+     *
+     *  LogLevel.DEBUG - Debug output
+     *  LogLevel.INFO - Informational output
+     *  LogLevel.WARN - Warnings
+     *  LogLevel.ERROR - Errors
+     *  LogLevel.FATAL - Fatal errors
+     */
+    LogLevel: {
+        DEBUG: 0,
+        INFO: 1,
+        WARN: 2,
+        ERROR: 3,
+        FATAL: 4
+    },
+
+    /** PrivateConstants: DOM Element Type Constants
+     *  DOM element types.
+     *
+     *  ElementType.NORMAL - Normal element.
+     *  ElementType.TEXT - Text data element.
+     *  ElementType.FRAGMENT - XHTML fragment element.
+     */
+    ElementType: {
+        NORMAL: 1,
+        TEXT: 3,
+        CDATA: 4,
+        FRAGMENT: 11
+    },
+
+    /** PrivateConstants: Timeout Values
+     *  Timeout values for error states.  These values are in seconds.
+     *  These should not be changed unless you know exactly what you are
+     *  doing.
+     *
+     *  TIMEOUT - Timeout multiplier. A waiting request will be considered
+     *      failed after Math.floor(TIMEOUT * wait) seconds have elapsed.
+     *      This defaults to 1.1, and with default wait, 66 seconds.
+     *  SECONDARY_TIMEOUT - Secondary timeout multiplier. In cases where
+     *      Strophe can detect early failure, it will consider the request
+     *      failed if it doesn't return after
+     *      Math.floor(SECONDARY_TIMEOUT * wait) seconds have elapsed.
+     *      This defaults to 0.1, and with default wait, 6 seconds.
+     */
+    TIMEOUT: 1.1,
+    SECONDARY_TIMEOUT: 0.1,
+
+    /** Function: addNamespace
+     *  This function is used to extend the current namespaces in
+     *  Strophe.NS.  It takes a key and a value with the key being the
+     *  name of the new namespace, with its actual value.
+     *  For example:
+     *  Strophe.addNamespace('PUBSUB', "http://jabber.org/protocol/pubsub");
+     *
+     *  Parameters:
+     *    (String) name - The name under which the namespace will be
+     *      referenced under Strophe.NS
+     *    (String) value - The actual namespace.
+     */
+    addNamespace: function (name, value) {
+        Strophe.NS[name] = value;
+    },
+
+    /** Function: forEachChild
+     *  Map a function over some or all child elements of a given element.
+     *
+     *  This is a small convenience function for mapping a function over
+     *  some or all of the children of an element.  If elemName is null, all
+     *  children will be passed to the function, otherwise only children
+     *  whose tag names match elemName will be passed.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The element to operate on.
+     *    (String) elemName - The child element tag name filter.
+     *    (Function) func - The function to apply to each child.  This
+     *      function should take a single argument, a DOM element.
+     */
+    forEachChild: function (elem, elemName, func) {
+        for (let i=0; i<elem.childNodes.length; i++) {
+            const childNode = elem.childNodes[i];
+            if (childNode.nodeType === Strophe.ElementType.NORMAL &&
+                (!elemName || this.isTagEqual(childNode, elemName))) {
+                func(childNode);
+            }
+        }
+    },
+
+    /** Function: isTagEqual
+     *  Compare an element's tag name with a string.
+     *
+     *  This function is case sensitive.
+     *
+     *  Parameters:
+     *    (XMLElement) el - A DOM element.
+     *    (String) name - The element name.
+     *
+     *  Returns:
+     *    true if the element's tag name matches _el_, and false
+     *    otherwise.
+     */
+    isTagEqual: function (el, name) {
+        return el.tagName === name;
+    },
+
+    /** PrivateVariable: _xmlGenerator
+     *  _Private_ variable that caches a DOM document to
+     *  generate elements.
+     */
+    _xmlGenerator: null,
+
+    /** PrivateFunction: _makeGenerator
+     *  _Private_ function that creates a dummy XML DOM document to serve as
+     *  an element and text node generator.
+     */
+    _makeGenerator: function () {
+        let doc;
+        // IE9 does implement createDocument(); however, using it will cause the browser to leak memory on page unload.
+        // Here, we test for presence of createDocument() plus IE's proprietary documentMode attribute, which would be
+        // less than 10 in the case of IE9 and below.
+        if (document.implementation.createDocument === undefined ||
+                    document.implementation.createDocument && document.documentMode && document.documentMode < 10) {
+            doc = this._getIEXmlDom();
+            doc.appendChild(doc.createElement('strophe'));
+        } else {
+            doc = document.implementation
+                .createDocument('jabber:client', 'strophe', null);
+        }
+        return doc;
+    },
+
+    /** Function: xmlGenerator
+     *  Get the DOM document to generate elements.
+     *
+     *  Returns:
+     *    The currently used DOM document.
+     */
+    xmlGenerator: function () {
+        if (!Strophe._xmlGenerator) {
+            Strophe._xmlGenerator = Strophe._makeGenerator();
+        }
+        return Strophe._xmlGenerator;
+    },
+
+    /** PrivateFunction: _getIEXmlDom
+     *  Gets IE xml doc object
+     *
+     *  Returns:
+     *    A Microsoft XML DOM Object
+     *  See Also:
+     *    http://msdn.microsoft.com/en-us/library/ms757837%28VS.85%29.aspx
+     */
+    _getIEXmlDom : function() {
+        let doc = null;
+        const docStrings = [
+            "Msxml2.DOMDocument.6.0",
+            "Msxml2.DOMDocument.5.0",
+            "Msxml2.DOMDocument.4.0",
+            "MSXML2.DOMDocument.3.0",
+            "MSXML2.DOMDocument",
+            "MSXML.DOMDocument",
+            "Microsoft.XMLDOM"
+        ];
+
+        for (let d=0; d<docStrings.length; d++) {
+            if (doc === null) {
+                try {
+                    doc = new ActiveXObject(docStrings[d]);
+                } catch (e) {
+                    doc = null;
+                }
+            } else {
+                break;
+            }
+        }
+        return doc;
+    },
+
+    /** Function: xmlElement
+     *  Create an XML DOM element.
+     *
+     *  This function creates an XML DOM element correctly across all
+     *  implementations. Note that these are not HTML DOM elements, which
+     *  aren't appropriate for XMPP stanzas.
+     *
+     *  Parameters:
+     *    (String) name - The name for the element.
+     *    (Array|Object) attrs - An optional array or object containing
+     *      key/value pairs to use as element attributes. The object should
+     *      be in the format {'key': 'value'} or {key: 'value'}. The array
+     *      should have the format [['key1', 'value1'], ['key2', 'value2']].
+     *    (String) text - The text child data for the element.
+     *
+     *  Returns:
+     *    A new XML DOM element.
+     */
+    xmlElement: function (name) {
+        if (!name) { return null; }
+
+        const node = Strophe.xmlGenerator().createElement(name);
+        // FIXME: this should throw errors if args are the wrong type or
+        // there are more than two optional args
+        for (let a=1; a<arguments.length; a++) {
+            const arg = arguments[a];
+            if (!arg) { continue; }
+            if (typeof(arg) === "string" ||
+                typeof(arg) === "number") {
+                node.appendChild(Strophe.xmlTextNode(arg));
+            } else if (typeof(arg) === "object" &&
+                       typeof(arg.sort) === "function") {
+                for (let i=0; i<arg.length; i++) {
+                    const attr = arg[i];
+                    if (typeof(attr) === "object" &&
+                        typeof(attr.sort) === "function" &&
+                        attr[1] !== undefined &&
+                        attr[1] !== null) {
+                        node.setAttribute(attr[0], attr[1]);
+                    }
+                }
+            } else if (typeof(arg) === "object") {
+                for (const k in arg) {
+                    if (Object.prototype.hasOwnProperty.call(arg, k) && arg[k] !== undefined && arg[k] !== null) {
+                        node.setAttribute(k, arg[k]);
+                    }
+                }
+            }
+        }
+        return node;
+    },
+
+    /*  Function: xmlescape
+     *  Excapes invalid xml characters.
+     *
+     *  Parameters:
+     *     (String) text - text to escape.
+     *
+     *  Returns:
+     *      Escaped text.
+     */
+    xmlescape: function(text) {
+        text = text.replace(/\&/g, "&amp;");
+        text = text.replace(/</g,  "&lt;");
+        text = text.replace(/>/g,  "&gt;");
+        text = text.replace(/'/g,  "&apos;");
+        text = text.replace(/"/g,  "&quot;");
+        return text;
+    },
+
+    /*  Function: xmlunescape
+    *  Unexcapes invalid xml characters.
+    *
+    *  Parameters:
+    *     (String) text - text to unescape.
+    *
+    *  Returns:
+    *      Unescaped text.
+    */
+    xmlunescape: function(text) {
+        text = text.replace(/\&amp;/g, "&");
+        text = text.replace(/&lt;/g,  "<");
+        text = text.replace(/&gt;/g,  ">");
+        text = text.replace(/&apos;/g,  "'");
+        text = text.replace(/&quot;/g,  "\"");
+        return text;
+    },
+
+    /** Function: xmlTextNode
+     *  Creates an XML DOM text node.
+     *
+     *  Provides a cross implementation version of document.createTextNode.
+     *
+     *  Parameters:
+     *    (String) text - The content of the text node.
+     *
+     *  Returns:
+     *    A new XML DOM text node.
+     */
+    xmlTextNode: function (text) {
+        return Strophe.xmlGenerator().createTextNode(text);
+    },
+
+    /** Function: xmlHtmlNode
+     *  Creates an XML DOM html node.
+     *
+     *  Parameters:
+     *    (String) html - The content of the html node.
+     *
+     *  Returns:
+     *    A new XML DOM text node.
+     */
+    xmlHtmlNode: function (html) {
+        let node;
+        //ensure text is escaped
+        if (DOMParser) {
+            const parser = new DOMParser();
+            node = parser.parseFromString(html, "text/xml");
+        } else {
+            node = new ActiveXObject("Microsoft.XMLDOM");
+            node.async="false";
+            node.loadXML(html);
+        }
+        return node;
+    },
+
+    /** Function: getText
+     *  Get the concatenation of all text children of an element.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - A DOM element.
+     *
+     *  Returns:
+     *    A String with the concatenated text of all text element children.
+     */
+    getText: function (elem) {
+        if (!elem) { return null; }
+
+        let str = "";
+        if (elem.childNodes.length === 0 && elem.nodeType === Strophe.ElementType.TEXT) {
+            str += elem.nodeValue;
+        }
+        for (let i=0; i<elem.childNodes.length; i++) {
+            if (elem.childNodes[i].nodeType === Strophe.ElementType.TEXT) {
+                str += elem.childNodes[i].nodeValue;
+            }
+        }
+        return Strophe.xmlescape(str);
+    },
+
+    /** Function: copyElement
+     *  Copy an XML DOM element.
+     *
+     *  This function copies a DOM element and all its descendants and returns
+     *  the new copy.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - A DOM element.
+     *
+     *  Returns:
+     *    A new, copied DOM element tree.
+     */
+    copyElement: function (elem) {
+        let el;
+        if (elem.nodeType === Strophe.ElementType.NORMAL) {
+            el = Strophe.xmlElement(elem.tagName);
+
+            for (let i=0; i<elem.attributes.length; i++) {
+                el.setAttribute(elem.attributes[i].nodeName,
+                                elem.attributes[i].value);
+            }
+
+            for (let i=0; i<elem.childNodes.length; i++) {
+                el.appendChild(Strophe.copyElement(elem.childNodes[i]));
+            }
+        } else if (elem.nodeType === Strophe.ElementType.TEXT) {
+            el = Strophe.xmlGenerator().createTextNode(elem.nodeValue);
+        }
+        return el;
+    },
+
+
+    /** Function: createHtml
+     *  Copy an HTML DOM element into an XML DOM.
+     *
+     *  This function copies a DOM element and all its descendants and returns
+     *  the new copy.
+     *
+     *  Parameters:
+     *    (HTMLElement) elem - A DOM element.
+     *
+     *  Returns:
+     *    A new, copied DOM element tree.
+     */
+    createHtml: function (elem) {
+        let el;
+        if (elem.nodeType === Strophe.ElementType.NORMAL) {
+            const tag = elem.nodeName.toLowerCase(); // XHTML tags must be lower case.
+            if (Strophe.XHTML.validTag(tag)) {
+                try {
+                    el = Strophe.xmlElement(tag);
+                    for (let i=0; i < Strophe.XHTML.attributes[tag].length; i++) {
+                        const attribute = Strophe.XHTML.attributes[tag][i];
+                        let value = elem.getAttribute(attribute);
+                        if (typeof value === 'undefined' || value === null || value === '' || value === false || value === 0) {
+                            continue;
+                        }
+                        if (attribute === 'style' && typeof value === 'object' && typeof value.cssText !== 'undefined') {
+                            value = value.cssText; // we're dealing with IE, need to get CSS out
+                        }
+                        // filter out invalid css styles
+                        if (attribute === 'style') {
+                            const css = [];
+                            const cssAttrs = value.split(';');
+                            for (let j=0; j < cssAttrs.length; j++) {
+                                const attr = cssAttrs[j].split(':');
+                                const cssName = attr[0].replace(/^\s*/, "").replace(/\s*$/, "").toLowerCase();
+                                if(Strophe.XHTML.validCSS(cssName)) {
+                                    const cssValue = attr[1].replace(/^\s*/, "").replace(/\s*$/, "");
+                                    css.push(cssName + ': ' + cssValue);
+                                }
+                            }
+                            if (css.length > 0) {
+                                value = css.join('; ');
+                                el.setAttribute(attribute, value);
+                            }
+                        } else {
+                            el.setAttribute(attribute, value);
+                        }
+                    }
+                    for (let i=0; i < elem.childNodes.length; i++) {
+                        el.appendChild(Strophe.createHtml(elem.childNodes[i]));
+                    }
+                } catch(e) { // invalid elements
+                    el = Strophe.xmlTextNode('');
+                }
+            } else {
+                el = Strophe.xmlGenerator().createDocumentFragment();
+                for (let i=0; i < elem.childNodes.length; i++) {
+                    el.appendChild(Strophe.createHtml(elem.childNodes[i]));
+                }
+            }
+        } else if (elem.nodeType === Strophe.ElementType.FRAGMENT) {
+            el = Strophe.xmlGenerator().createDocumentFragment();
+            for (let i=0; i < elem.childNodes.length; i++) {
+                el.appendChild(Strophe.createHtml(elem.childNodes[i]));
+            }
+        } else if (elem.nodeType === Strophe.ElementType.TEXT) {
+            el = Strophe.xmlTextNode(elem.nodeValue);
+        }
+        return el;
+    },
+
+    /** Function: escapeNode
+     *  Escape the node part (also called local part) of a JID.
+     *
+     *  Parameters:
+     *    (String) node - A node (or local part).
+     *
+     *  Returns:
+     *    An escaped node (or local part).
+     */
+    escapeNode: function (node) {
+        if (typeof node !== "string") { return node; }
+        return node.replace(/^\s+|\s+$/g, '')
+            .replace(/\\/g,  "\\5c")
+            .replace(/ /g,   "\\20")
+            .replace(/\"/g,  "\\22")
+            .replace(/\&/g,  "\\26")
+            .replace(/\'/g,  "\\27")
+            .replace(/\//g,  "\\2f")
+            .replace(/:/g,   "\\3a")
+            .replace(/</g,   "\\3c")
+            .replace(/>/g,   "\\3e")
+            .replace(/@/g,   "\\40");
+    },
+
+    /** Function: unescapeNode
+     *  Unescape a node part (also called local part) of a JID.
+     *
+     *  Parameters:
+     *    (String) node - A node (or local part).
+     *
+     *  Returns:
+     *    An unescaped node (or local part).
+     */
+    unescapeNode: function (node) {
+        if (typeof node !== "string") { return node; }
+        return node.replace(/\\20/g, " ")
+            .replace(/\\22/g, '"')
+            .replace(/\\26/g, "&")
+            .replace(/\\27/g, "'")
+            .replace(/\\2f/g, "/")
+            .replace(/\\3a/g, ":")
+            .replace(/\\3c/g, "<")
+            .replace(/\\3e/g, ">")
+            .replace(/\\40/g, "@")
+            .replace(/\\5c/g, "\\");
+    },
+
+    /** Function: getNodeFromJid
+     *  Get the node portion of a JID String.
+     *
+     *  Parameters:
+     *    (String) jid - A JID.
+     *
+     *  Returns:
+     *    A String containing the node.
+     */
+    getNodeFromJid: function (jid) {
+        if (jid.indexOf("@") < 0) { return null; }
+        return jid.split("@")[0];
+    },
+
+    /** Function: getDomainFromJid
+     *  Get the domain portion of a JID String.
+     *
+     *  Parameters:
+     *    (String) jid - A JID.
+     *
+     *  Returns:
+     *    A String containing the domain.
+     */
+    getDomainFromJid: function (jid) {
+        const bare = Strophe.getBareJidFromJid(jid);
+        if (bare.indexOf("@") < 0) {
+            return bare;
+        } else {
+            const parts = bare.split("@");
+            parts.splice(0, 1);
+            return parts.join('@');
+        }
+    },
+
+    /** Function: getResourceFromJid
+     *  Get the resource portion of a JID String.
+     *
+     *  Parameters:
+     *    (String) jid - A JID.
+     *
+     *  Returns:
+     *    A String containing the resource.
+     */
+    getResourceFromJid: function (jid) {
+        if (!jid) { return null; }
+        const s = jid.split("/");
+        if (s.length < 2) { return null; }
+        s.splice(0, 1);
+        return s.join('/');
+    },
+
+    /** Function: getBareJidFromJid
+     *  Get the bare JID from a JID String.
+     *
+     *  Parameters:
+     *    (String) jid - A JID.
+     *
+     *  Returns:
+     *    A String containing the bare JID.
+     */
+    getBareJidFromJid: function (jid) {
+        return jid ? jid.split("/")[0] : null;
+    },
+
+    /** PrivateFunction: _handleError
+     *  _Private_ function that properly logs an error to the console
+     */
+    _handleError: function (e) {
+        if (typeof e.stack !== "undefined") {
+            Strophe.fatal(e.stack);
+        }
+        if (e.sourceURL) {
+            Strophe.fatal("error: " + this.handler + " " + e.sourceURL + ":" +
+                          e.line + " - " + e.name + ": " + e.message);
+        } else if (e.fileName) {
+            Strophe.fatal("error: " + this.handler + " " +
+                          e.fileName + ":" + e.lineNumber + " - " +
+                          e.name + ": " + e.message);
+        } else {
+            Strophe.fatal("error: " + e.message);
+        }
+    },
+
+    /** Function: log
+     *  User overrideable logging function.
+     *
+     *  This function is called whenever the Strophe library calls any
+     *  of the logging functions.  The default implementation of this
+     *  function logs only fatal errors.  If client code wishes to handle the logging
+     *  messages, it should override this with
+     *  > Strophe.log = function (level, msg) {
+     *  >   (user code here)
+     *  > };
+     *
+     *  Please note that data sent and received over the wire is logged
+     *  via Strophe.Connection.rawInput() and Strophe.Connection.rawOutput().
+     *
+     *  The different levels and their meanings are
+     *
+     *    DEBUG - Messages useful for debugging purposes.
+     *    INFO - Informational messages.  This is mostly information like
+     *      'disconnect was called' or 'SASL auth succeeded'.
+     *    WARN - Warnings about potential problems.  This is mostly used
+     *      to report transient connection errors like request timeouts.
+     *    ERROR - Some error occurred.
+     *    FATAL - A non-recoverable fatal error occurred.
+     *
+     *  Parameters:
+     *    (Integer) level - The log level of the log message.  This will
+     *      be one of the values in Strophe.LogLevel.
+     *    (String) msg - The log message.
+     */
+    log: function (level, msg) {
+        if (level === this.LogLevel.FATAL &&
+            typeof window.console === 'object' &&
+            typeof window.console.error === 'function') {
+            window.console.error(msg);
+        }
+    },
+
+    /** Function: debug
+     *  Log a message at the Strophe.LogLevel.DEBUG level.
+     *
+     *  Parameters:
+     *    (String) msg - The log message.
+     */
+    debug: function(msg) {
+        this.log(this.LogLevel.DEBUG, msg);
+    },
+
+    /** Function: info
+     *  Log a message at the Strophe.LogLevel.INFO level.
+     *
+     *  Parameters:
+     *    (String) msg - The log message.
+     */
+    info: function (msg) {
+        this.log(this.LogLevel.INFO, msg);
+    },
+
+    /** Function: warn
+     *  Log a message at the Strophe.LogLevel.WARN level.
+     *
+     *  Parameters:
+     *    (String) msg - The log message.
+     */
+    warn: function (msg) {
+        this.log(this.LogLevel.WARN, msg);
+    },
+
+    /** Function: error
+     *  Log a message at the Strophe.LogLevel.ERROR level.
+     *
+     *  Parameters:
+     *    (String) msg - The log message.
+     */
+    error: function (msg) {
+        this.log(this.LogLevel.ERROR, msg);
+    },
+
+    /** Function: fatal
+     *  Log a message at the Strophe.LogLevel.FATAL level.
+     *
+     *  Parameters:
+     *    (String) msg - The log message.
+     */
+    fatal: function (msg) {
+        this.log(this.LogLevel.FATAL, msg);
+    },
+
+    /** Function: serialize
+     *  Render a DOM element and all descendants to a String.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - A DOM element.
+     *
+     *  Returns:
+     *    The serialized element tree as a String.
+     */
+    serialize: function (elem) {
+        if (!elem) { return null; }
+        if (typeof(elem.tree) === "function") {
+            elem = elem.tree();
+        }
+        const names = [...Array(elem.attributes.length).keys()].map(i => elem.attributes[i].nodeName);
+        names.sort();
+        let result = names.reduce(
+            (a, n) => `${a} ${n}="${Strophe.xmlescape(elem.attributes.getNamedItem(n).value)}"`,
+            `<${elem.nodeName}`
+        );
+
+        if (elem.childNodes.length > 0) {
+            result += ">";
+            for (let i=0; i < elem.childNodes.length; i++) {
+                const child = elem.childNodes[i];
+                switch (child.nodeType) {
+                    case Strophe.ElementType.NORMAL:
+                        // normal element, so recurse
+                        result += Strophe.serialize(child);
+                        break;
+                    case Strophe.ElementType.TEXT:
+                        // text element to escape values
+                        result += Strophe.xmlescape(child.nodeValue);
+                        break;
+                    case Strophe.ElementType.CDATA:
+                        // cdata section so don't escape values
+                        result += "<![CDATA["+child.nodeValue+"]]>";
+                }
+            }
+            result += "</" + elem.nodeName + ">";
+        } else {
+            result += "/>";
+        }
+        return result;
+    },
+
+    /** PrivateVariable: _requestId
+     *  _Private_ variable that keeps track of the request ids for
+     *  connections.
+     */
+    _requestId: 0,
+
+    /** PrivateVariable: Strophe.connectionPlugins
+     *  _Private_ variable Used to store plugin names that need
+     *  initialization on Strophe.Connection construction.
+     */
+    _connectionPlugins: {},
+
+    /** Function: addConnectionPlugin
+     *  Extends the Strophe.Connection object with the given plugin.
+     *
+     *  Parameters:
+     *    (String) name - The name of the extension.
+     *    (Object) ptype - The plugin's prototype.
+     */
+    addConnectionPlugin: function (name, ptype) {
+        Strophe._connectionPlugins[name] = ptype;
+    }
+};
+
+/** Class: Strophe.Builder
+ *  XML DOM builder.
+ *
+ *  This object provides an interface similar to JQuery but for building
+ *  DOM elements easily and rapidly.  All the functions except for toString()
+ *  and tree() return the object, so calls can be chained.  Here's an
+ *  example using the $iq() builder helper.
+ *  > $iq({to: 'you', from: 'me', type: 'get', id: '1'})
+ *  >     .c('query', {xmlns: 'strophe:example'})
+ *  >     .c('example')
+ *  >     .toString()
+ *
+ *  The above generates this XML fragment
+ *  > <iq to='you' from='me' type='get' id='1'>
+ *  >   <query xmlns='strophe:example'>
+ *  >     <example/>
+ *  >   </query>
+ *  > </iq>
+ *  The corresponding DOM manipulations to get a similar fragment would be
+ *  a lot more tedious and probably involve several helper variables.
+ *
+ *  Since adding children makes new operations operate on the child, up()
+ *  is provided to traverse up the tree.  To add two children, do
+ *  > builder.c('child1', ...).up().c('child2', ...)
+ *  The next operation on the Builder will be relative to the second child.
+ */
+
+/** Constructor: Strophe.Builder
+ *  Create a Strophe.Builder object.
+ *
+ *  The attributes should be passed in object notation.  For example
+ *  > let b = new Builder('message', {to: 'you', from: 'me'});
+ *  or
+ *  > let b = new Builder('messsage', {'xml:lang': 'en'});
+ *
+ *  Parameters:
+ *    (String) name - The name of the root element.
+ *    (Object) attrs - The attributes for the root element in object notation.
+ *
+ *  Returns:
+ *    A new Strophe.Builder.
+ */
+Strophe.Builder = function (name, attrs) {
+    // Set correct namespace for jabber:client elements
+    if (name === "presence" || name === "message" || name === "iq") {
+        if (attrs && !attrs.xmlns) {
+            attrs.xmlns = Strophe.NS.CLIENT;
+        } else if (!attrs) {
+            attrs = {xmlns: Strophe.NS.CLIENT};
+        }
+    }
+    // Holds the tree being built.
+    this.nodeTree = Strophe.xmlElement(name, attrs);
+    // Points to the current operation node.
+    this.node = this.nodeTree;
+};
+
+Strophe.Builder.prototype = {
+    /** Function: tree
+     *  Return the DOM tree.
+     *
+     *  This function returns the current DOM tree as an element object.  This
+     *  is suitable for passing to functions like Strophe.Connection.send().
+     *
+     *  Returns:
+     *    The DOM tree as a element object.
+     */
+    tree: function () {
+        return this.nodeTree;
+    },
+
+    /** Function: toString
+     *  Serialize the DOM tree to a String.
+     *
+     *  This function returns a string serialization of the current DOM
+     *  tree.  It is often used internally to pass data to a
+     *  Strophe.Request object.
+     *
+     *  Returns:
+     *    The serialized DOM tree in a String.
+     */
+    toString: function () {
+        return Strophe.serialize(this.nodeTree);
+    },
+
+    /** Function: up
+     *  Make the current parent element the new current element.
+     *
+     *  This function is often used after c() to traverse back up the tree.
+     *  For example, to add two children to the same element
+     *  > builder.c('child1', {}).up().c('child2', {});
+     *
+     *  Returns:
+     *    The Stophe.Builder object.
+     */
+    up: function () {
+        this.node = this.node.parentNode;
+        return this;
+    },
+
+    /** Function: root
+     *  Make the root element the new current element.
+     *
+     *  When at a deeply nested element in the tree, this function can be used
+     *  to jump back to the root of the tree, instead of having to repeatedly
+     *  call up().
+     *
+     *  Returns:
+     *    The Stophe.Builder object.
+     */
+    root: function () {
+        this.node = this.nodeTree;
+        return this;
+    },
+
+    /** Function: attrs
+     *  Add or modify attributes of the current element.
+     *
+     *  The attributes should be passed in object notation.  This function
+     *  does not move the current element pointer.
+     *
+     *  Parameters:
+     *    (Object) moreattrs - The attributes to add/modify in object notation.
+     *
+     *  Returns:
+     *    The Strophe.Builder object.
+     */
+    attrs: function (moreattrs) {
+        for (const k in moreattrs) {
+            if (Object.prototype.hasOwnProperty.call(moreattrs, k)) {
+                if (moreattrs[k] === undefined) {
+                    this.node.removeAttribute(k);
+                } else {
+                    this.node.setAttribute(k, moreattrs[k]);
+                }
+            }
+        }
+        return this;
+    },
+
+    /** Function: c
+     *  Add a child to the current element and make it the new current
+     *  element.
+     *
+     *  This function moves the current element pointer to the child,
+     *  unless text is provided.  If you need to add another child, it
+     *  is necessary to use up() to go back to the parent in the tree.
+     *
+     *  Parameters:
+     *    (String) name - The name of the child.
+     *    (Object) attrs - The attributes of the child in object notation.
+     *    (String) text - The text to add to the child.
+     *
+     *  Returns:
+     *    The Strophe.Builder object.
+     */
+    c: function (name, attrs, text) {
+        const child = Strophe.xmlElement(name, attrs, text);
+        this.node.appendChild(child);
+        if (typeof text !== "string" && typeof text !=="number") {
+            this.node = child;
+        }
+        return this;
+    },
+
+    /** Function: cnode
+     *  Add a child to the current element and make it the new current
+     *  element.
+     *
+     *  This function is the same as c() except that instead of using a
+     *  name and an attributes object to create the child it uses an
+     *  existing DOM element object.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - A DOM element.
+     *
+     *  Returns:
+     *    The Strophe.Builder object.
+     */
+    cnode: function (elem) {
+        let impNode;
+        const xmlGen = Strophe.xmlGenerator();
+        try {
+            impNode = (xmlGen.importNode !== undefined);
+        } catch (e) {
+            impNode = false;
+        }
+        const newElem = impNode ? xmlGen.importNode(elem, true) : Strophe.copyElement(elem);
+        this.node.appendChild(newElem);
+        this.node = newElem;
+        return this;
+    },
+
+    /** Function: t
+     *  Add a child text element.
+     *
+     *  This *does not* make the child the new current element since there
+     *  are no children of text elements.
+     *
+     *  Parameters:
+     *    (String) text - The text data to append to the current element.
+     *
+     *  Returns:
+     *    The Strophe.Builder object.
+     */
+    t: function (text) {
+        const child = Strophe.xmlTextNode(text);
+        this.node.appendChild(child);
+        return this;
+    },
+
+    /** Function: h
+     *  Replace current element contents with the HTML passed in.
+     *
+     *  This *does not* make the child the new current element
+     *
+     *  Parameters:
+     *    (String) html - The html to insert as contents of current element.
+     *
+     *  Returns:
+     *    The Strophe.Builder object.
+     */
+    h: function (html) {
+        const fragment = document.createElement('body');
+        // force the browser to try and fix any invalid HTML tags
+        fragment.innerHTML = html;
+        // copy cleaned html into an xml dom
+        const xhtml = Strophe.createHtml(fragment);
+        while (xhtml.childNodes.length > 0) {
+            this.node.appendChild(xhtml.childNodes[0]);
+        }
+        return this;
+    }
+};
+
+/** PrivateClass: Strophe.Handler
+ *  _Private_ helper class for managing stanza handlers.
+ *
+ *  A Strophe.Handler encapsulates a user provided callback function to be
+ *  executed when matching stanzas are received by the connection.
+ *  Handlers can be either one-off or persistant depending on their
+ *  return value. Returning true will cause a Handler to remain active, and
+ *  returning false will remove the Handler.
+ *
+ *  Users will not use Strophe.Handler objects directly, but instead they
+ *  will use Strophe.Connection.addHandler() and
+ *  Strophe.Connection.deleteHandler().
+ */
+
+/** PrivateConstructor: Strophe.Handler
+ *  Create and initialize a new Strophe.Handler.
+ *
+ *  Parameters:
+ *    (Function) handler - A function to be executed when the handler is run.
+ *    (String) ns - The namespace to match.
+ *    (String) name - The element name to match.
+ *    (String) type - The element type to match.
+ *    (String) id - The element id attribute to match.
+ *    (String) from - The element from attribute to match.
+ *    (Object) options - Handler options
+ *
+ *  Returns:
+ *    A new Strophe.Handler object.
+ */
+Strophe.Handler = function (handler, ns, name, type, id, from, options) {
+    this.handler = handler;
+    this.ns = ns;
+    this.name = name;
+    this.type = type;
+    this.id = id;
+    this.options = options || {'matchBareFromJid': false, 'ignoreNamespaceFragment': false};
+    // BBB: Maintain backward compatibility with old `matchBare` option
+    if (this.options.matchBare) {
+        Strophe.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.');
+        this.options.matchBareFromJid = this.options.matchBare;
+        delete this.options.matchBare;
+    }
+    if (this.options.matchBareFromJid) {
+        this.from = from ? Strophe.getBareJidFromJid(from) : null;
+    } else {
+        this.from = from;
+    }
+    // whether the handler is a user handler or a system handler
+    this.user = true;
+};
+
+Strophe.Handler.prototype = {
+    /** PrivateFunction: getNamespace
+     *  Returns the XML namespace attribute on an element.
+     *  If `ignoreNamespaceFragment` was passed in for this handler, then the
+     *  URL fragment will be stripped.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The XML element with the namespace.
+     *
+     *  Returns:
+     *    The namespace, with optionally the fragment stripped.
+     */
+    getNamespace: function (elem) {
+        let elNamespace = elem.getAttribute("xmlns");
+        if (elNamespace && this.options.ignoreNamespaceFragment) {
+            elNamespace = elNamespace.split('#')[0];
+        }
+        return elNamespace;
+    },
+
+    /** PrivateFunction: namespaceMatch
+     *  Tests if a stanza matches the namespace set for this Strophe.Handler.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The XML element to test.
+     *
+     *  Returns:
+     *    true if the stanza matches and false otherwise.
+     */
+    namespaceMatch: function (elem) {
+        let nsMatch = false;
+        if (!this.ns) {
+            return true;
+        } else {
+            Strophe.forEachChild(elem, null, (elem) => {
+                if (this.getNamespace(elem) === this.ns) {
+                    nsMatch = true;
+                }
+            });
+            return nsMatch || this.getNamespace(elem) === this.ns;
+        }
+    },
+
+    /** PrivateFunction: isMatch
+     *  Tests if a stanza matches the Strophe.Handler.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The XML element to test.
+     *
+     *  Returns:
+     *    true if the stanza matches and false otherwise.
+     */
+    isMatch: function (elem) {
+        let from = elem.getAttribute('from');
+        if (this.options.matchBareFromJid) {
+            from = Strophe.getBareJidFromJid(from);
+        }
+        const elem_type = elem.getAttribute("type");
+        if (this.namespaceMatch(elem) &&
+            (!this.name || Strophe.isTagEqual(elem, this.name)) &&
+            (!this.type || (Array.isArray(this.type) ? this.type.indexOf(elem_type) !== -1 : elem_type === this.type)) &&
+            (!this.id || elem.getAttribute("id") === this.id) &&
+            (!this.from || from === this.from)) {
+                return true;
+        }
+        return false;
+    },
+
+    /** PrivateFunction: run
+     *  Run the callback on a matching stanza.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The DOM element that triggered the
+     *      Strophe.Handler.
+     *
+     *  Returns:
+     *    A boolean indicating if the handler should remain active.
+     */
+    run: function (elem) {
+        let result = null;
+        try {
+            result = this.handler(elem);
+        } catch (e) {
+            Strophe._handleError(e);
+            throw e;
+        }
+        return result;
+    },
+
+    /** PrivateFunction: toString
+     *  Get a String representation of the Strophe.Handler object.
+     *
+     *  Returns:
+     *    A String.
+     */
+    toString: function () {
+        return "{Handler: " + this.handler + "(" + this.name + "," +
+            this.id + "," + this.ns + ")}";
+    }
+};
+
+/** PrivateClass: Strophe.TimedHandler
+ *  _Private_ helper class for managing timed handlers.
+ *
+ *  A Strophe.TimedHandler encapsulates a user provided callback that
+ *  should be called after a certain period of time or at regular
+ *  intervals.  The return value of the callback determines whether the
+ *  Strophe.TimedHandler will continue to fire.
+ *
+ *  Users will not use Strophe.TimedHandler objects directly, but instead
+ *  they will use Strophe.Connection.addTimedHandler() and
+ *  Strophe.Connection.deleteTimedHandler().
+ */
+
+/** PrivateConstructor: Strophe.TimedHandler
+ *  Create and initialize a new Strophe.TimedHandler object.
+ *
+ *  Parameters:
+ *    (Integer) period - The number of milliseconds to wait before the
+ *      handler is called.
+ *    (Function) handler - The callback to run when the handler fires.  This
+ *      function should take no arguments.
+ *
+ *  Returns:
+ *    A new Strophe.TimedHandler object.
+ */
+Strophe.TimedHandler = function (period, handler) {
+    this.period = period;
+    this.handler = handler;
+    this.lastCalled = new Date().getTime();
+    this.user = true;
+};
+
+Strophe.TimedHandler.prototype = {
+    /** PrivateFunction: run
+     *  Run the callback for the Strophe.TimedHandler.
+     *
+     *  Returns:
+     *    true if the Strophe.TimedHandler should be called again, and false
+     *      otherwise.
+     */
+    run: function () {
+        this.lastCalled = new Date().getTime();
+        return this.handler();
+    },
+
+    /** PrivateFunction: reset
+     *  Reset the last called time for the Strophe.TimedHandler.
+     */
+    reset: function () {
+        this.lastCalled = new Date().getTime();
+    },
+
+    /** PrivateFunction: toString
+     *  Get a string representation of the Strophe.TimedHandler object.
+     *
+     *  Returns:
+     *    The string representation.
+     */
+    toString: function () {
+        return "{TimedHandler: " + this.handler + "(" + this.period +")}";
+    }
+};
+
+/** Class: Strophe.Connection
+ *  XMPP Connection manager.
+ *
+ *  This class is the main part of Strophe.  It manages a BOSH or websocket
+ *  connection to an XMPP server and dispatches events to the user callbacks
+ *  as data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, SASL SCRAM-SHA1
+ *  and legacy authentication.
+ *
+ *  After creating a Strophe.Connection object, the user will typically
+ *  call connect() with a user supplied callback to handle connection level
+ *  events like authentication failure, disconnection, or connection
+ *  complete.
+ *
+ *  The user will also have several event handlers defined by using
+ *  addHandler() and addTimedHandler().  These will allow the user code to
+ *  respond to interesting stanzas or do something periodically with the
+ *  connection. These handlers will be active once authentication is
+ *  finished.
+ *
+ *  To send data to the connection, use send().
+ */
+
+/** Constructor: Strophe.Connection
+ *  Create and initialize a Strophe.Connection object.
+ *
+ *  The transport-protocol for this connection will be chosen automatically
+ *  based on the given service parameter. URLs starting with "ws://" or
+ *  "wss://" will use WebSockets, URLs starting with "http://", "https://"
+ *  or without a protocol will use BOSH.
+ *
+ *  To make Strophe connect to the current host you can leave out the protocol
+ *  and host part and just pass the path, e.g.
+ *
+ *  > let conn = new Strophe.Connection("/http-bind/");
+ *
+ *  Options common to both Websocket and BOSH:
+ *  ------------------------------------------
+ *
+ *  cookies:
+ *
+ *  The *cookies* option allows you to pass in cookies to be added to the
+ *  document. These cookies will then be included in the BOSH XMLHttpRequest
+ *  or in the websocket connection.
+ *
+ *  The passed in value must be a map of cookie names and string values.
+ *
+ *  > { "myCookie": {
+ *  >     "value": "1234",
+ *  >     "domain": ".example.org",
+ *  >     "path": "/",
+ *  >     "expires": expirationDate
+ *  >     }
+ *  > }
+ *
+ *  Note that cookies can't be set in this way for other domains (i.e. cross-domain).
+ *  Those cookies need to be set under those domains, for example they can be
+ *  set server-side by making a XHR call to that domain to ask it to set any
+ *  necessary cookies.
+ *
+ *  mechanisms:
+ *
+ *  The *mechanisms* option allows you to specify the SASL mechanisms that this
+ *  instance of Strophe.Connection (and therefore your XMPP client) will
+ *  support.
+ *
+ *  The value must be an array of objects with Strophe.SASLMechanism
+ *  prototypes.
+ *
+ *  If nothing is specified, then the following mechanisms (and their
+ *  priorities) are registered:
+ *
+ *      SCRAM-SHA1 - 70
+ *      DIGEST-MD5 - 60
+ *      PLAIN - 50
+ *      OAUTH-BEARER - 40
+ *      OAUTH-2 - 30
+ *      ANONYMOUS - 20
+ *      EXTERNAL - 10
+ *
+ *  explicitResourceBinding:
+ *
+ *  If `explicitResourceBinding` is set to a truthy value, then the XMPP client
+ *  needs to explicitly call `Strophe.Connection.prototype.bind` once the XMPP
+ *  server has advertised the "urn:ietf:params:xml:ns:xmpp-bind" feature.
+ *
+ *  Making this step explicit allows client authors to first finish other
+ *  stream related tasks, such as setting up an XEP-0198 Stream Management
+ *  session, before binding the JID resource for this session.
+ *
+ *  WebSocket options:
+ *  ------------------
+ *
+ *  If you want to connect to the current host with a WebSocket connection you
+ *  can tell Strophe to use WebSockets through a "protocol" attribute in the
+ *  optional options parameter. Valid values are "ws" for WebSocket and "wss"
+ *  for Secure WebSocket.
+ *  So to connect to "wss://CURRENT_HOSTNAME/xmpp-websocket" you would call
+ *
+ *  > let conn = new Strophe.Connection("/xmpp-websocket/", {protocol: "wss"});
+ *
+ *  Note that relative URLs _NOT_ starting with a "/" will also include the path
+ *  of the current site.
+ *
+ *  Also because downgrading security is not permitted by browsers, when using
+ *  relative URLs both BOSH and WebSocket connections will use their secure
+ *  variants if the current connection to the site is also secure (https).
+ *
+ *  BOSH options:
+ *  -------------
+ *
+ *  By adding "sync" to the options, you can control if requests will
+ *  be made synchronously or not. The default behaviour is asynchronous.
+ *  If you want to make requests synchronous, make "sync" evaluate to true.
+ *  > let conn = new Strophe.Connection("/http-bind/", {sync: true});
+ *
+ *  You can also toggle this on an already established connection.
+ *  > conn.options.sync = true;
+ *
+ *  The *customHeaders* option can be used to provide custom HTTP headers to be
+ *  included in the XMLHttpRequests made.
+ *
+ *  The *keepalive* option can be used to instruct Strophe to maintain the
+ *  current BOSH session across interruptions such as webpage reloads.
+ *
+ *  It will do this by caching the sessions tokens in sessionStorage, and when
+ *  "restore" is called it will check whether there are cached tokens with
+ *  which it can resume an existing session.
+ *
+ *  The *withCredentials* option should receive a Boolean value and is used to
+ *  indicate wether cookies should be included in ajax requests (by default
+ *  they're not).
+ *  Set this value to true if you are connecting to a BOSH service
+ *  and for some reason need to send cookies to it.
+ *  In order for this to work cross-domain, the server must also enable
+ *  credentials by setting the Access-Control-Allow-Credentials response header
+ *  to "true". For most usecases however this setting should be false (which
+ *  is the default).
+ *  Additionally, when using Access-Control-Allow-Credentials, the
+ *  Access-Control-Allow-Origin header can't be set to the wildcard "*", but
+ *  instead must be restricted to actual domains.
+ *
+ *  The *contentType* option can be set to change the default Content-Type
+ *  of "text/xml; charset=utf-8", which can be useful to reduce the amount of
+ *  CORS preflight requests that are sent to the server.
+ *
+ *  Parameters:
+ *    (String) service - The BOSH or WebSocket service URL.
+ *    (Object) options - A hash of configuration options
+ *
+ *  Returns:
+ *    A new Strophe.Connection object.
+ */
+Strophe.Connection = function (service, options) {
+    // The service URL
+    this.service = service;
+    // Configuration options
+    this.options = options || {};
+    const proto = this.options.protocol || "";
+
+    // Select protocal based on service or options
+    if (service.indexOf("ws:") === 0 || service.indexOf("wss:") === 0 ||
+            proto.indexOf("ws") === 0) {
+        this._proto = new Strophe.Websocket(this);
+    } else {
+        this._proto = new Strophe.Bosh(this);
+    }
+
+    /* The connected JID. */
+    this.jid = "";
+    /* the JIDs domain */
+    this.domain = null;
+    /* stream:features */
+    this.features = null;
+
+    // SASL
+    this._sasl_data = {};
+    this.do_session = false;
+    this.do_bind = false;
+
+    // handler lists
+    this.timedHandlers = [];
+    this.handlers = [];
+    this.removeTimeds = [];
+    this.removeHandlers = [];
+    this.addTimeds = [];
+    this.addHandlers = [];
+    this.protocolErrorHandlers = {
+        'HTTP': {},
+        'websocket': {}
+    };
+
+    this._idleTimeout = null;
+    this._disconnectTimeout = null;
+
+    this.authenticated = false;
+    this.connected = false;
+    this.disconnecting = false;
+    this.do_authentication = true;
+    this.paused = false;
+    this.restored = false;
+
+    this._data = [];
+    this._uniqueId = 0;
+
+    this._sasl_success_handler = null;
+    this._sasl_failure_handler = null;
+    this._sasl_challenge_handler = null;
+
+    // Max retries before disconnecting
+    this.maxRetries = 5;
+
+    // Call onIdle callback every 1/10th of a second
+    this._idleTimeout = setTimeout(() => this._onIdle(), 100);
+
+    utils.addCookies(this.options.cookies);
+    this.registerSASLMechanisms(this.options.mechanisms);
+
+    // initialize plugins
+    for (const k in Strophe._connectionPlugins) {
+        if (Object.prototype.hasOwnProperty.call(Strophe._connectionPlugins, k)) {
+            const F = function () {};
+            F.prototype = Strophe._connectionPlugins[k];
+            this[k] = new F();
+            this[k].init(this);
+        }
+    }
+};
+
+Strophe.Connection.prototype = {
+    /** Function: reset
+     *  Reset the connection.
+     *
+     *  This function should be called after a connection is disconnected
+     *  before that connection is reused.
+     */
+    reset: function () {
+        this._proto._reset();
+
+        // SASL
+        this.do_session = false;
+        this.do_bind = false;
+
+        // handler lists
+        this.timedHandlers = [];
+        this.handlers = [];
+        this.removeTimeds = [];
+        this.removeHandlers = [];
+        this.addTimeds = [];
+        this.addHandlers = [];
+
+        this.authenticated = false;
+        this.connected = false;
+        this.disconnecting = false;
+        this.restored = false;
+
+        this._data = [];
+        this._requests = [];
+        this._uniqueId = 0;
+    },
+
+    /** Function: pause
+     *  Pause the request manager.
+     *
+     *  This will prevent Strophe from sending any more requests to the
+     *  server.  This is very useful for temporarily pausing
+     *  BOSH-Connections while a lot of send() calls are happening quickly.
+     *  This causes Strophe to send the data in a single request, saving
+     *  many request trips.
+     */
+    pause: function () {
+        this.paused = true;
+    },
+
+    /** Function: resume
+     *  Resume the request manager.
+     *
+     *  This resumes after pause() has been called.
+     */
+    resume: function () {
+        this.paused = false;
+    },
+
+    /** Function: getUniqueId
+     *  Generate a unique ID for use in <iq/> elements.
+     *
+     *  All <iq/> stanzas are required to have unique id attributes.  This
+     *  function makes creating these easy.  Each connection instance has
+     *  a counter which starts from zero, and the value of this counter
+     *  plus a colon followed by the suffix becomes the unique id. If no
+     *  suffix is supplied, the counter is used as the unique id.
+     *
+     *  Suffixes are used to make debugging easier when reading the stream
+     *  data, and their use is recommended.  The counter resets to 0 for
+     *  every new connection for the same reason.  For connections to the
+     *  same server that authenticate the same way, all the ids should be
+     *  the same, which makes it easy to see changes.  This is useful for
+     *  automated testing as well.
+     *
+     *  Parameters:
+     *    (String) suffix - A optional suffix to append to the id.
+     *
+     *  Returns:
+     *    A unique string to be used for the id attribute.
+     */
+    getUniqueId: function (suffix) {
+        const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+            const r = Math.random() * 16 | 0,
+                  v = c === 'x' ? r : r & 0x3 | 0x8;
+            return v.toString(16);
+        });
+        if (typeof(suffix) === "string" || typeof(suffix) === "number") {
+            return uuid + ":" + suffix;
+        } else {
+            return uuid + "";
+        }
+    },
+
+    /** Function: addProtocolErrorHandler
+     *  Register a handler function for when a protocol (websocker or HTTP)
+     *  error occurs.
+     *
+     *  NOTE: Currently only HTTP errors for BOSH requests are handled.
+     *  Patches that handle websocket errors would be very welcome.
+     *
+     *  Parameters:
+     *    (String) protocol - 'HTTP' or 'websocket'
+     *    (Integer) status_code - Error status code (e.g 500, 400 or 404)
+     *    (Function) callback - Function that will fire on Http error
+     *
+     *  Example:
+     *  function onError(err_code){
+     *    //do stuff
+     *  }
+     *
+     *  let conn = Strophe.connect('http://example.com/http-bind');
+     *  conn.addProtocolErrorHandler('HTTP', 500, onError);
+     *  // Triggers HTTP 500 error and onError handler will be called
+     *  conn.connect('user_jid@incorrect_jabber_host', 'secret', onConnect);
+     */
+    addProtocolErrorHandler: function (protocol, status_code, callback){
+        this.protocolErrorHandlers[protocol][status_code] = callback;
+    },
+
+
+    /** Function: connect
+     *  Starts the connection process.
+     *
+     *  As the connection process proceeds, the user supplied callback will
+     *  be triggered multiple times with status updates.  The callback
+     *  should take two arguments - the status code and the error condition.
+     *
+     *  The status code will be one of the values in the Strophe.Status
+     *  constants.  The error condition will be one of the conditions
+     *  defined in RFC 3920 or the condition 'strophe-parsererror'.
+     *
+     *  The Parameters _wait_, _hold_ and _route_ are optional and only relevant
+     *  for BOSH connections. Please see XEP 124 for a more detailed explanation
+     *  of the optional parameters.
+     *
+     *  Parameters:
+     *    (String) jid - The user's JID.  This may be a bare JID,
+     *      or a full JID.  If a node is not supplied, SASL OAUTHBEARER or
+     *      SASL ANONYMOUS authentication will be attempted (OAUTHBEARER will
+     *      process the provided password value as an access token).
+     *    (String) pass - The user's password.
+     *    (Function) callback - The connect callback function.
+     *    (Integer) wait - The optional HTTPBIND wait value.  This is the
+     *      time the server will wait before returning an empty result for
+     *      a request.  The default setting of 60 seconds is recommended.
+     *    (Integer) hold - The optional HTTPBIND hold value.  This is the
+     *      number of connections the server will hold at one time.  This
+     *      should almost always be set to 1 (the default).
+     *    (String) route - The optional route value.
+     *    (String) authcid - The optional alternative authentication identity
+     *      (username) if intending to impersonate another user.
+     *      When using the SASL-EXTERNAL authentication mechanism, for example
+     *      with client certificates, then the authcid value is used to
+     *      determine whether an authorization JID (authzid) should be sent to
+     *      the server. The authzid should not be sent to the server if the
+     *      authzid and authcid are the same. So to prevent it from being sent
+     *      (for example when the JID is already contained in the client
+     *      certificate), set authcid to that same JID. See XEP-178 for more
+     *      details.
+     */
+    connect: function (jid, pass, callback, wait, hold, route, authcid) {
+        this.jid = jid;
+        /** Variable: authzid
+         *  Authorization identity.
+         */
+        this.authzid = Strophe.getBareJidFromJid(this.jid);
+
+        /** Variable: authcid
+         *  Authentication identity (User name).
+         */
+        this.authcid = authcid || Strophe.getNodeFromJid(this.jid);
+
+        /** Variable: pass
+         *  Authentication identity (User password).
+         */
+        this.pass = pass;
+
+        /** Variable: servtype
+         *  Digest MD5 compatibility.
+         */
+        this.servtype = "xmpp";
+
+        this.connect_callback = callback;
+        this.disconnecting = false;
+        this.connected = false;
+        this.authenticated = false;
+        this.restored = false;
+
+        // parse jid for domain
+        this.domain = Strophe.getDomainFromJid(this.jid);
+
+        this._changeConnectStatus(Strophe.Status.CONNECTING, null);
+
+        this._proto._connect(wait, hold, route);
+    },
+
+    /** Function: attach
+     *  Attach to an already created and authenticated BOSH session.
+     *
+     *  This function is provided to allow Strophe to attach to BOSH
+     *  sessions which have been created externally, perhaps by a Web
+     *  application.  This is often used to support auto-login type features
+     *  without putting user credentials into the page.
+     *
+     *  Parameters:
+     *    (String) jid - The full JID that is bound by the session.
+     *    (String) sid - The SID of the BOSH session.
+     *    (String) rid - The current RID of the BOSH session.  This RID
+     *      will be used by the next request.
+     *    (Function) callback The connect callback function.
+     *    (Integer) wait - The optional HTTPBIND wait value.  This is the
+     *      time the server will wait before returning an empty result for
+     *      a request.  The default setting of 60 seconds is recommended.
+     *      Other settings will require tweaks to the Strophe.TIMEOUT value.
+     *    (Integer) hold - The optional HTTPBIND hold value.  This is the
+     *      number of connections the server will hold at one time.  This
+     *      should almost always be set to 1 (the default).
+     *    (Integer) wind - The optional HTTBIND window value.  This is the
+     *      allowed range of request ids that are valid.  The default is 5.
+     */
+    attach: function (jid, sid, rid, callback, wait, hold, wind) {
+        if (this._proto instanceof Strophe.Bosh) {
+            this._proto._attach(jid, sid, rid, callback, wait, hold, wind);
+        } else {
+            const error = new Error('The "attach" method can only be used with a BOSH connection.');
+            error.name = 'StropheSessionError';
+            throw error;
+        }
+    },
+
+    /** Function: restore
+     *  Attempt to restore a cached BOSH session.
+     *
+     *  This function is only useful in conjunction with providing the
+     *  "keepalive":true option when instantiating a new Strophe.Connection.
+     *
+     *  When "keepalive" is set to true, Strophe will cache the BOSH tokens
+     *  RID (Request ID) and SID (Session ID) and then when this function is
+     *  called, it will attempt to restore the session from those cached
+     *  tokens.
+     *
+     *  This function must therefore be called instead of connect or attach.
+     *
+     *  For an example on how to use it, please see examples/restore.js
+     *
+     *  Parameters:
+     *    (String) jid - The user's JID.  This may be a bare JID or a full JID.
+     *    (Function) callback - The connect callback function.
+     *    (Integer) wait - The optional HTTPBIND wait value.  This is the
+     *      time the server will wait before returning an empty result for
+     *      a request.  The default setting of 60 seconds is recommended.
+     *    (Integer) hold - The optional HTTPBIND hold value.  This is the
+     *      number of connections the server will hold at one time.  This
+     *      should almost always be set to 1 (the default).
+     *    (Integer) wind - The optional HTTBIND window value.  This is the
+     *      allowed range of request ids that are valid.  The default is 5.
+     */
+    restore: function (jid, callback, wait, hold, wind) {
+        if (this._sessionCachingSupported()) {
+            this._proto._restore(jid, callback, wait, hold, wind);
+        } else {
+            const error = new Error('The "restore" method can only be used with a BOSH connection.');
+            error.name = 'StropheSessionError';
+            throw error;
+        }
+    },
+
+    /** PrivateFunction: _sessionCachingSupported
+     * Checks whether sessionStorage and JSON are supported and whether we're
+     * using BOSH.
+     */
+    _sessionCachingSupported: function () {
+        if (this._proto instanceof Strophe.Bosh) {
+            if (!JSON) { return false; }
+            try {
+                sessionStorage.setItem('_strophe_', '_strophe_');
+                sessionStorage.removeItem('_strophe_');
+            } catch (e) {
+                return false;
+            }
+            return true;
+        }
+        return false;
+    },
+
+    /** Function: xmlInput
+     *  User overrideable function that receives XML data coming into the
+     *  connection.
+     *
+     *  The default function does nothing.  User code can override this with
+     *  > Strophe.Connection.xmlInput = function (elem) {
+     *  >   (user code)
+     *  > };
+     *
+     *  Due to limitations of current Browsers' XML-Parsers the opening and closing
+     *  <stream> tag for WebSocket-Connoctions will be passed as selfclosing here.
+     *
+     *  BOSH-Connections will have all stanzas wrapped in a <body> tag. See
+     *  <Strophe.Bosh.strip> if you want to strip this tag.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The XML data received by the connection.
+     */
+    xmlInput: function (elem) {
+        return;
+    },
+
+    /** Function: xmlOutput
+     *  User overrideable function that receives XML data sent to the
+     *  connection.
+     *
+     *  The default function does nothing.  User code can override this with
+     *  > Strophe.Connection.xmlOutput = function (elem) {
+     *  >   (user code)
+     *  > };
+     *
+     *  Due to limitations of current Browsers' XML-Parsers the opening and closing
+     *  <stream> tag for WebSocket-Connoctions will be passed as selfclosing here.
+     *
+     *  BOSH-Connections will have all stanzas wrapped in a <body> tag. See
+     *  <Strophe.Bosh.strip> if you want to strip this tag.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The XMLdata sent by the connection.
+     */
+    xmlOutput: function (elem) {
+        return;
+    },
+
+    /** Function: rawInput
+     *  User overrideable function that receives raw data coming into the
+     *  connection.
+     *
+     *  The default function does nothing.  User code can override this with
+     *  > Strophe.Connection.rawInput = function (data) {
+     *  >   (user code)
+     *  > };
+     *
+     *  Parameters:
+     *    (String) data - The data received by the connection.
+     */
+    rawInput: function (data) {
+        return;
+    },
+
+    /** Function: rawOutput
+     *  User overrideable function that receives raw data sent to the
+     *  connection.
+     *
+     *  The default function does nothing.  User code can override this with
+     *  > Strophe.Connection.rawOutput = function (data) {
+     *  >   (user code)
+     *  > };
+     *
+     *  Parameters:
+     *    (String) data - The data sent by the connection.
+     */
+    rawOutput: function (data) {
+        return;
+    },
+
+    /** Function: nextValidRid
+     *  User overrideable function that receives the new valid rid.
+     *
+     *  The default function does nothing. User code can override this with
+     *  > Strophe.Connection.nextValidRid = function (rid) {
+     *  >    (user code)
+     *  > };
+     *
+     *  Parameters:
+     *    (Number) rid - The next valid rid
+     */
+    nextValidRid: function (rid) {
+        return;
+    },
+
+    /** Function: send
+     *  Send a stanza.
+     *
+     *  This function is called to push data onto the send queue to
+     *  go out over the wire.  Whenever a request is sent to the BOSH
+     *  server, all pending data is sent and the queue is flushed.
+     *
+     *  Parameters:
+     *    (XMLElement |
+     *     [XMLElement] |
+     *     Strophe.Builder) elem - The stanza to send.
+     */
+    send: function (elem) {
+        if (elem === null) { return ; }
+        if (typeof(elem.sort) === "function") {
+            for (let i=0; i < elem.length; i++) {
+                this._queueData(elem[i]);
+            }
+        } else if (typeof(elem.tree) === "function") {
+            this._queueData(elem.tree());
+        } else {
+            this._queueData(elem);
+        }
+        this._proto._send();
+    },
+
+    /** Function: flush
+     *  Immediately send any pending outgoing data.
+     *
+     *  Normally send() queues outgoing data until the next idle period
+     *  (100ms), which optimizes network use in the common cases when
+     *  several send()s are called in succession. flush() can be used to
+     *  immediately send all pending data.
+     */
+    flush: function () {
+        // cancel the pending idle period and run the idle function
+        // immediately
+        clearTimeout(this._idleTimeout);
+        this._onIdle();
+    },
+
+    /** Function: sendPresence
+     *  Helper function to send presence stanzas. The main benefit is for
+     *  sending presence stanzas for which you expect a responding presence
+     *  stanza with the same id (for example when leaving a chat room).
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The stanza to send.
+     *    (Function) callback - The callback function for a successful request.
+     *    (Function) errback - The callback function for a failed or timed
+     *      out request.  On timeout, the stanza will be null.
+     *    (Integer) timeout - The time specified in milliseconds for a
+     *      timeout to occur.
+     *
+     *  Returns:
+     *    The id used to send the presence.
+     */
+    sendPresence: function(elem, callback, errback, timeout) {
+        let timeoutHandler = null;
+        if (typeof(elem.tree) === "function") {
+            elem = elem.tree();
+        }
+        let id = elem.getAttribute('id');
+        if (!id) { // inject id if not found
+            id = this.getUniqueId("sendPresence");
+            elem.setAttribute("id", id);
+        }
+
+        if (typeof callback === "function" || typeof errback === "function") {
+            const handler = this.addHandler(stanza => {
+                // remove timeout handler if there is one
+                if (timeoutHandler) {
+                    this.deleteTimedHandler(timeoutHandler);
+                }
+                if (stanza.getAttribute('type') === 'error') {
+                    if (errback) {
+                        errback(stanza);
+                    }
+                } else if (callback) {
+                    callback(stanza);
+                }
+            }, null, 'presence', null, id);
+
+            // if timeout specified, set up a timeout handler.
+            if (timeout) {
+                timeoutHandler = this.addTimedHandler(timeout, () => {
+                    // get rid of normal handler
+                    this.deleteHandler(handler);
+                    // call errback on timeout with null stanza
+                    if (errback) {
+                        errback(null);
+                    }
+                    return false;
+                });
+            }
+        }
+        this.send(elem);
+        return id;
+    },
+
+    /** Function: sendIQ
+     *  Helper function to send IQ stanzas.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The stanza to send.
+     *    (Function) callback - The callback function for a successful request.
+     *    (Function) errback - The callback function for a failed or timed
+     *      out request.  On timeout, the stanza will be null.
+     *    (Integer) timeout - The time specified in milliseconds for a
+     *      timeout to occur.
+     *
+     *  Returns:
+     *    The id used to send the IQ.
+    */
+    sendIQ: function(elem, callback, errback, timeout) {
+        let timeoutHandler = null;
+        if (typeof(elem.tree) === "function") {
+            elem = elem.tree();
+        }
+        let id = elem.getAttribute('id');
+        if (!id) { // inject id if not found
+            id = this.getUniqueId("sendIQ");
+            elem.setAttribute("id", id);
+        }
+
+        if (typeof callback === "function" || typeof errback === "function") {
+            const handler = this.addHandler(stanza => {
+                // remove timeout handler if there is one
+                if (timeoutHandler) {
+                    this.deleteTimedHandler(timeoutHandler);
+                }
+                const iqtype = stanza.getAttribute('type');
+                if (iqtype === 'result') {
+                    if (callback) {
+                        callback(stanza);
+                    }
+                } else if (iqtype === 'error') {
+                    if (errback) {
+                        errback(stanza);
+                    }
+                } else {
+                    const error = new Error(`Got bad IQ type of ${iqtype}`);
+                    error.name = "StropheError";
+                    throw(error);
+                }
+            }, null, 'iq', ['error', 'result'], id);
+
+            // if timeout specified, set up a timeout handler.
+            if (timeout) {
+                timeoutHandler = this.addTimedHandler(timeout, () => {
+                    // get rid of normal handler
+                    this.deleteHandler(handler);
+                    // call errback on timeout with null stanza
+                    if (errback) {
+                        errback(null);
+                    }
+                    return false;
+                });
+            }
+        }
+        this.send(elem);
+        return id;
+    },
+
+    /** PrivateFunction: _queueData
+     *  Queue outgoing data for later sending.  Also ensures that the data
+     *  is a DOMElement.
+     */
+    _queueData: function (element) {
+        if (element === null ||
+                !element.tagName ||
+                !element.childNodes) {
+            const error = new Error("Cannot queue non-DOMElement.");
+            error.name = "StropheError";
+            throw(error);
+        }
+        this._data.push(element);
+    },
+
+    /** PrivateFunction: _sendRestart
+     *  Send an xmpp:restart stanza.
+     */
+    _sendRestart: function () {
+        this._data.push("restart");
+        this._proto._sendRestart();
+        this._idleTimeout = setTimeout(() => this._onIdle(), 100);
+    },
+
+    /** Function: addTimedHandler
+     *  Add a timed handler to the connection.
+     *
+     *  This function adds a timed handler.  The provided handler will
+     *  be called every period milliseconds until it returns false,
+     *  the connection is terminated, or the handler is removed.  Handlers
+     *  that wish to continue being invoked should return true.
+     *
+     *  Because of method binding it is necessary to save the result of
+     *  this function if you wish to remove a handler with
+     *  deleteTimedHandler().
+     *
+     *  Note that user handlers are not active until authentication is
+     *  successful.
+     *
+     *  Parameters:
+     *    (Integer) period - The period of the handler.
+     *    (Function) handler - The callback function.
+     *
+     *  Returns:
+     *    A reference to the handler that can be used to remove it.
+     */
+    addTimedHandler: function (period, handler) {
+        const thand = new Strophe.TimedHandler(period, handler);
+        this.addTimeds.push(thand);
+        return thand;
+    },
+
+    /** Function: deleteTimedHandler
+     *  Delete a timed handler for a connection.
+     *
+     *  This function removes a timed handler from the connection.  The
+     *  handRef parameter is *not* the function passed to addTimedHandler(),
+     *  but is the reference returned from addTimedHandler().
+     *
+     *  Parameters:
+     *    (Strophe.TimedHandler) handRef - The handler reference.
+     */
+    deleteTimedHandler: function (handRef) {
+        // this must be done in the Idle loop so that we don't change
+        // the handlers during iteration
+        this.removeTimeds.push(handRef);
+    },
+
+    /** Function: addHandler
+     *  Add a stanza handler for the connection.
+     *
+     *  This function adds a stanza handler to the connection.  The
+     *  handler callback will be called for any stanza that matches
+     *  the parameters.  Note that if multiple parameters are supplied,
+     *  they must all match for the handler to be invoked.
+     *
+     *  The handler will receive the stanza that triggered it as its argument.
+     *  *The handler should return true if it is to be invoked again;
+     *  returning false will remove the handler after it returns.*
+     *
+     *  As a convenience, the ns parameters applies to the top level element
+     *  and also any of its immediate children.  This is primarily to make
+     *  matching /iq/query elements easy.
+     *
+     *  Options
+     *  ~~~~~~~
+     *  With the options argument, you can specify boolean flags that affect how
+     *  matches are being done.
+     *
+     *  Currently two flags exist:
+     *
+     *  - matchBareFromJid:
+     *      When set to true, the from parameter and the
+     *      from attribute on the stanza will be matched as bare JIDs instead
+     *      of full JIDs. To use this, pass {matchBareFromJid: true} as the
+     *      value of options. The default value for matchBareFromJid is false.
+     *
+     *  - ignoreNamespaceFragment:
+     *      When set to true, a fragment specified on the stanza's namespace
+     *      URL will be ignored when it's matched with the one configured for
+     *      the handler.
+     *
+     *      This means that if you register like this:
+     *      >   connection.addHandler(
+     *      >       handler,
+     *      >       'http://jabber.org/protocol/muc',
+     *      >       null, null, null, null,
+     *      >       {'ignoreNamespaceFragment': true}
+     *      >   );
+     *
+     *      Then a stanza with XML namespace of
+     *      'http://jabber.org/protocol/muc#user' will also be matched. If
+     *      'ignoreNamespaceFragment' is false, then only stanzas with
+     *      'http://jabber.org/protocol/muc' will be matched.
+     *
+     *  Deleting the handler
+     *  ~~~~~~~~~~~~~~~~~~~~
+     *  The return value should be saved if you wish to remove the handler
+     *  with deleteHandler().
+     *
+     *  Parameters:
+     *    (Function) handler - The user callback.
+     *    (String) ns - The namespace to match.
+     *    (String) name - The stanza name to match.
+     *    (String|Array) type - The stanza type (or types if an array) to match.
+     *    (String) id - The stanza id attribute to match.
+     *    (String) from - The stanza from attribute to match.
+     *    (String) options - The handler options
+     *
+     *  Returns:
+     *    A reference to the handler that can be used to remove it.
+     */
+    addHandler: function (handler, ns, name, type, id, from, options) {
+        const hand = new Strophe.Handler(handler, ns, name, type, id, from, options);
+        this.addHandlers.push(hand);
+        return hand;
+    },
+
+    /** Function: deleteHandler
+     *  Delete a stanza handler for a connection.
+     *
+     *  This function removes a stanza handler from the connection.  The
+     *  handRef parameter is *not* the function passed to addHandler(),
+     *  but is the reference returned from addHandler().
+     *
+     *  Parameters:
+     *    (Strophe.Handler) handRef - The handler reference.
+     */
+    deleteHandler: function (handRef) {
+        // this must be done in the Idle loop so that we don't change
+        // the handlers during iteration
+        this.removeHandlers.push(handRef);
+        // If a handler is being deleted while it is being added,
+        // prevent it from getting added
+        const i = this.addHandlers.indexOf(handRef);
+        if (i >= 0) {
+            this.addHandlers.splice(i, 1);
+        }
+    },
+
+    /** Function: registerSASLMechanisms
+     *
+     * Register the SASL mechanisms which will be supported by this instance of
+     * Strophe.Connection (i.e. which this XMPP client will support).
+     *
+     *  Parameters:
+     *    (Array) mechanisms - Array of objects with Strophe.SASLMechanism prototypes
+     *
+     */
+    registerSASLMechanisms: function (mechanisms) {
+        this.mechanisms = {};
+        mechanisms = mechanisms || [
+            Strophe.SASLAnonymous,
+            Strophe.SASLExternal,
+            Strophe.SASLMD5,
+            Strophe.SASLOAuthBearer,
+            Strophe.SASLXOAuth2,
+            Strophe.SASLPlain,
+            Strophe.SASLSHA1
+        ];
+        mechanisms.forEach(this.registerSASLMechanism.bind(this));
+    },
+
+    /** Function: registerSASLMechanism
+     *
+     * Register a single SASL mechanism, to be supported by this client.
+     *
+     *  Parameters:
+     *    (Object) mechanism - Object with a Strophe.SASLMechanism prototype
+     *
+     */
+    registerSASLMechanism: function (mechanism) {
+        this.mechanisms[mechanism.prototype.name] = mechanism;
+    },
+
+    /** Function: disconnect
+     *  Start the graceful disconnection process.
+     *
+     *  This function starts the disconnection process.  This process starts
+     *  by sending unavailable presence and sending BOSH body of type
+     *  terminate.  A timeout handler makes sure that disconnection happens
+     *  even if the BOSH server does not respond.
+     *  If the Connection object isn't connected, at least tries to abort all pending requests
+     *  so the connection object won't generate successful requests (which were already opened).
+     *
+     *  The user supplied connection callback will be notified of the
+     *  progress as this process happens.
+     *
+     *  Parameters:
+     *    (String) reason - The reason the disconnect is occuring.
+     */
+    disconnect: function (reason) {
+        this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason);
+        Strophe.warn("Disconnect was called because: " + reason);
+        if (this.connected) {
+            let pres = false;
+            this.disconnecting = true;
+            if (this.authenticated) {
+                pres = $pres({
+                    'xmlns': Strophe.NS.CLIENT,
+                    'type': 'unavailable'
+                });
+            }
+            // setup timeout handler
+            this._disconnectTimeout = this._addSysTimedHandler(
+                3000, this._onDisconnectTimeout.bind(this));
+            this._proto._disconnect(pres);
+        } else {
+            Strophe.warn("Disconnect was called before Strophe connected to the server");
+            this._proto._abortAllRequests();
+            this._doDisconnect();
+        }
+    },
+
+    /** PrivateFunction: _changeConnectStatus
+     *  _Private_ helper function that makes sure plugins and the user's
+     *  callback are notified of connection status changes.
+     *
+     *  Parameters:
+     *    (Integer) status - the new connection status, one of the values
+     *      in Strophe.Status
+     *    (String) condition - the error condition or null
+     *    (XMLElement) elem - The triggering stanza.
+     */
+    _changeConnectStatus: function (status, condition, elem) {
+        // notify all plugins listening for status changes
+        for (const k in Strophe._connectionPlugins) {
+            if (Object.prototype.hasOwnProperty.call(Strophe._connectionPlugins, k)) {
+                const plugin = this[k];
+                if (plugin.statusChanged) {
+                    try {
+                        plugin.statusChanged(status, condition);
+                    } catch (err) {
+                        Strophe.error(`${k} plugin caused an exception changing status: ${err}`);
+                    }
+                }
+            }
+        }
+        // notify the user's callback
+        if (this.connect_callback) {
+            try {
+                this.connect_callback(status, condition, elem);
+            } catch (e) {
+                Strophe._handleError(e);
+                Strophe.error(`User connection callback caused an exception: ${e}`);
+            }
+        }
+    },
+
+    /** PrivateFunction: _doDisconnect
+     *  _Private_ function to disconnect.
+     *
+     *  This is the last piece of the disconnection logic.  This resets the
+     *  connection and alerts the user's connection callback.
+     */
+    _doDisconnect: function (condition) {
+        if (typeof this._idleTimeout === "number") {
+            clearTimeout(this._idleTimeout);
+        }
+
+        // Cancel Disconnect Timeout
+        if (this._disconnectTimeout !== null) {
+            this.deleteTimedHandler(this._disconnectTimeout);
+            this._disconnectTimeout = null;
+        }
+
+        Strophe.debug("_doDisconnect was called");
+        this._proto._doDisconnect();
+
+        this.authenticated = false;
+        this.disconnecting = false;
+        this.restored = false;
+
+        // delete handlers
+        this.handlers = [];
+        this.timedHandlers = [];
+        this.removeTimeds = [];
+        this.removeHandlers = [];
+        this.addTimeds = [];
+        this.addHandlers = [];
+
+        // tell the parent we disconnected
+        this._changeConnectStatus(Strophe.Status.DISCONNECTED, condition);
+        this.connected = false;
+    },
+
+    /** PrivateFunction: _dataRecv
+     *  _Private_ handler to processes incoming data from the the connection.
+     *
+     *  Except for _connect_cb handling the initial connection request,
+     *  this function handles the incoming data for all requests.  This
+     *  function also fires stanza handlers that match each incoming
+     *  stanza.
+     *
+     *  Parameters:
+     *    (Strophe.Request) req - The request that has data ready.
+     *    (string) req - The stanza a raw string (optiona).
+     */
+    _dataRecv: function (req, raw) {
+        Strophe.debug("_dataRecv called");
+        const elem = this._proto._reqToData(req);
+        if (elem === null) { return; }
+
+        if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
+            if (elem.nodeName === this._proto.strip && elem.childNodes.length) {
+                this.xmlInput(elem.childNodes[0]);
+            } else {
+                this.xmlInput(elem);
+            }
+        }
+        if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
+            if (raw) {
+                this.rawInput(raw);
+            } else {
+                this.rawInput(Strophe.serialize(elem));
+            }
+        }
+
+        // remove handlers scheduled for deletion
+        while (this.removeHandlers.length > 0) {
+            const hand = this.removeHandlers.pop();
+            const i = this.handlers.indexOf(hand);
+            if (i >= 0) {
+                this.handlers.splice(i, 1);
+            }
+        }
+
+        // add handlers scheduled for addition
+        while (this.addHandlers.length > 0) {
+            this.handlers.push(this.addHandlers.pop());
+        }
+
+        // handle graceful disconnect
+        if (this.disconnecting && this._proto._emptyQueue()) {
+            this._doDisconnect();
+            return;
+        }
+
+        const type = elem.getAttribute("type");
+        if (type !== null && type === "terminate") {
+            // Don't process stanzas that come in after disconnect
+            if (this.disconnecting) {
+                return;
+            }
+            // an error occurred
+            let cond = elem.getAttribute("condition");
+            const conflict = elem.getElementsByTagName("conflict");
+            if (cond !== null) {
+                if (cond === "remote-stream-error" && conflict.length > 0) {
+                    cond = "conflict";
+                }
+                this._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
+            } else {
+                this._changeConnectStatus(
+                    Strophe.Status.CONNFAIL,
+                    Strophe.ErrorCondition.UNKOWN_REASON
+                );
+            }
+            this._doDisconnect(cond);
+            return;
+        }
+
+        // send each incoming stanza through the handler chain
+        Strophe.forEachChild(elem, null, child => {
+            // process handlers
+            const newList = this.handlers;
+            this.handlers = [];
+            for (let i=0; i < newList.length; i++) {
+                const hand = newList[i];
+                // encapsulate 'handler.run' not to lose the whole handler list if
+                // one of the handlers throws an exception
+                try {
+                    if (hand.isMatch(child) &&
+                        (this.authenticated || !hand.user)) {
+                        if (hand.run(child)) {
+                            this.handlers.push(hand);
+                        }
+                    } else {
+                        this.handlers.push(hand);
+                    }
+                } catch(e) {
+                    // if the handler throws an exception, we consider it as false
+                    Strophe.warn('Removing Strophe handlers due to uncaught exception: '+e.message);
+                }
+            }
+        });
+    },
+
+
+    /** Attribute: mechanisms
+     *  SASL Mechanisms available for Connection.
+     */
+    mechanisms: {},
+
+    /** PrivateFunction: _connect_cb
+     *  _Private_ handler for initial connection request.
+     *
+     *  This handler is used to process the initial connection request
+     *  response from the BOSH server. It is used to set up authentication
+     *  handlers and start the authentication process.
+     *
+     *  SASL authentication will be attempted if available, otherwise
+     *  the code will fall back to legacy authentication.
+     *
+     *  Parameters:
+     *    (Strophe.Request) req - The current request.
+     *    (Function) _callback - low level (xmpp) connect callback function.
+     *      Useful for plugins with their own xmpp connect callback (when they
+     *      want to do something special).
+     */
+    _connect_cb: function (req, _callback, raw) {
+        Strophe.debug("_connect_cb was called");
+        this.connected = true;
+
+        let bodyWrap;
+        try {
+            bodyWrap = this._proto._reqToData(req);
+        } catch (e) {
+            if (e.name !== Strophe.ErrorCondition.BAD_FORMAT) { throw e; }
+            this._changeConnectStatus(
+                Strophe.Status.CONNFAIL,
+                Strophe.ErrorCondition.BAD_FORMAT
+            );
+            this._doDisconnect(Strophe.ErrorCondition.BAD_FORMAT);
+        }
+        if (!bodyWrap) { return; }
+
+        if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
+            if (bodyWrap.nodeName === this._proto.strip && bodyWrap.childNodes.length) {
+                this.xmlInput(bodyWrap.childNodes[0]);
+            } else {
+                this.xmlInput(bodyWrap);
+            }
+        }
+        if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
+            if (raw) {
+                this.rawInput(raw);
+            } else {
+                this.rawInput(Strophe.serialize(bodyWrap));
+            }
+        }
+
+        const conncheck = this._proto._connect_cb(bodyWrap);
+        if (conncheck === Strophe.Status.CONNFAIL) {
+            return;
+        }
+
+        // Check for the stream:features tag
+        let hasFeatures;
+        if (bodyWrap.getElementsByTagNameNS) {
+            hasFeatures = bodyWrap.getElementsByTagNameNS(Strophe.NS.STREAM, "features").length > 0;
+        } else {
+            hasFeatures = bodyWrap.getElementsByTagName("stream:features").length > 0 ||
+                            bodyWrap.getElementsByTagName("features").length > 0;
+        }
+        if (!hasFeatures) {
+            this._proto._no_auth_received(_callback);
+            return;
+        }
+
+        const matched = [];
+        const mechanisms = bodyWrap.getElementsByTagName("mechanism");
+        if (mechanisms.length > 0) {
+            for (let i=0; i < mechanisms.length; i++) {
+                const mech = Strophe.getText(mechanisms[i]);
+                if (this.mechanisms[mech]) matched.push(this.mechanisms[mech]);
+            }
+        }
+        if (matched.length === 0) {
+            if (bodyWrap.getElementsByTagName("auth").length === 0) {
+                // There are no matching SASL mechanisms and also no legacy
+                // auth available.
+                this._proto._no_auth_received(_callback);
+                return;
+            }
+        }
+        if (this.do_authentication !== false) {
+            this.authenticate(matched);
+        }
+    },
+
+    /** Function: sortMechanismsByPriority
+     *
+     *  Sorts an array of objects with prototype SASLMechanism according to
+     *  their priorities.
+     *
+     *  Parameters:
+     *    (Array) mechanisms - Array of SASL mechanisms.
+     *
+     */
+    sortMechanismsByPriority: function (mechanisms) {
+        // Sorting mechanisms according to priority.
+        for (let i=0; i < mechanisms.length - 1; ++i) {
+            let higher = i;
+            for (let j=i + 1; j < mechanisms.length; ++j) {
+                if (mechanisms[j].prototype.priority > mechanisms[higher].prototype.priority) {
+                    higher = j;
+                }
+            }
+            if (higher !== i) {
+                const swap = mechanisms[i];
+                mechanisms[i] = mechanisms[higher];
+                mechanisms[higher] = swap;
+            }
+        }
+        return mechanisms;
+    },
+
+    /** Function: authenticate
+     * Set up authentication
+     *
+     *  Continues the initial connection request by setting up authentication
+     *  handlers and starting the authentication process.
+     *
+     *  SASL authentication will be attempted if available, otherwise
+     *  the code will fall back to legacy authentication.
+     *
+     *  Parameters:
+     *    (Array) matched - Array of SASL mechanisms supported.
+     *
+     */
+    authenticate: function (matched) {
+        if (!this._attemptSASLAuth(matched)) {
+            this._attemptLegacyAuth();
+        }
+    },
+
+    /** PrivateFunction: _attemptSASLAuth
+     *
+     *  Iterate through an array of SASL mechanisms and attempt authentication
+     *  with the highest priority (enabled) mechanism.
+     *
+     *  Parameters:
+     *    (Array) mechanisms - Array of SASL mechanisms.
+     *
+     *  Returns:
+     *    (Boolean) mechanism_found - true or false, depending on whether a
+     *          valid SASL mechanism was found with which authentication could be
+     *          started.
+     */
+    _attemptSASLAuth: function (mechanisms) {
+        mechanisms = this.sortMechanismsByPriority(mechanisms || []);
+        let mechanism_found = false;
+        for (let i=0; i < mechanisms.length; ++i) {
+            if (!mechanisms[i].prototype.test(this)) {
+                continue;
+            }
+            this._sasl_success_handler = this._addSysHandler(
+                this._sasl_success_cb.bind(this), null,
+                "success", null, null);
+            this._sasl_failure_handler = this._addSysHandler(
+                this._sasl_failure_cb.bind(this), null,
+                "failure", null, null);
+            this._sasl_challenge_handler = this._addSysHandler(
+                this._sasl_challenge_cb.bind(this), null,
+                "challenge", null, null);
+
+            this._sasl_mechanism = new mechanisms[i]();
+            this._sasl_mechanism.onStart(this);
+
+            const request_auth_exchange = $build("auth", {
+                'xmlns': Strophe.NS.SASL,
+                'mechanism': this._sasl_mechanism.name
+            });
+            if (this._sasl_mechanism.isClientFirst) {
+                const response = this._sasl_mechanism.onChallenge(this, null);
+                request_auth_exchange.t(btoa(response));
+            }
+            this.send(request_auth_exchange.tree());
+            mechanism_found = true;
+            break;
+        }
+        return mechanism_found;
+    },
+
+    /** PrivateFunction: _sasl_challenge_cb
+     *  _Private_ handler for the SASL challenge
+     *
+     */
+    _sasl_challenge_cb: function(elem) {
+      const challenge = atob(Strophe.getText(elem));
+      const response = this._sasl_mechanism.onChallenge(this, challenge);
+      const stanza = $build('response', {'xmlns': Strophe.NS.SASL});
+      if (response !== "") {
+        stanza.t(btoa(response));
+      }
+      this.send(stanza.tree());
+      return true;
+    },
+
+    /** PrivateFunction: _attemptLegacyAuth
+     *
+     *  Attempt legacy (i.e. non-SASL) authentication.
+     */
+    _attemptLegacyAuth: function () {
+        if (Strophe.getNodeFromJid(this.jid) === null) {
+            // we don't have a node, which is required for non-anonymous
+            // client connections
+            this._changeConnectStatus(
+                Strophe.Status.CONNFAIL,
+                Strophe.ErrorCondition.MISSING_JID_NODE
+            );
+            this.disconnect(Strophe.ErrorCondition.MISSING_JID_NODE);
+        } else {
+            // Fall back to legacy authentication
+            this._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
+            this._addSysHandler(
+                this._onLegacyAuthIQResult.bind(this),
+                null, null, null, "_auth_1"
+            );
+            this.send($iq({
+                    'type': "get",
+                    'to': this.domain,
+                    'id': "_auth_1"
+                }).c("query", {xmlns: Strophe.NS.AUTH})
+                .c("username", {}).t(Strophe.getNodeFromJid(this.jid))
+                .tree());
+        }
+    },
+
+    /** PrivateFunction: _onLegacyAuthIQResult
+     *  _Private_ handler for legacy authentication.
+     *
+     *  This handler is called in response to the initial <iq type='get'/>
+     *  for legacy authentication.  It builds an authentication <iq/> and
+     *  sends it, creating a handler (calling back to _auth2_cb()) to
+     *  handle the result
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The stanza that triggered the callback.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+    _onLegacyAuthIQResult: function (elem) {
+        // build plaintext auth iq
+        const iq = $iq({type: "set", id: "_auth_2"})
+            .c('query', {xmlns: Strophe.NS.AUTH})
+            .c('username', {}).t(Strophe.getNodeFromJid(this.jid))
+            .up()
+            .c('password').t(this.pass);
+
+        if (!Strophe.getResourceFromJid(this.jid)) {
+            // since the user has not supplied a resource, we pick
+            // a default one here.  unlike other auth methods, the server
+            // cannot do this for us.
+            this.jid = Strophe.getBareJidFromJid(this.jid) + '/strophe';
+        }
+        iq.up().c('resource', {}).t(Strophe.getResourceFromJid(this.jid));
+
+        this._addSysHandler(this._auth2_cb.bind(this), null, null, null, "_auth_2");
+        this.send(iq.tree());
+        return false;
+    },
+
+    /** PrivateFunction: _sasl_success_cb
+     *  _Private_ handler for succesful SASL authentication.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The matching stanza.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+    _sasl_success_cb: function (elem) {
+        if (this._sasl_data["server-signature"]) {
+            let serverSignature;
+            const success = atob(Strophe.getText(elem));
+            const attribMatch = /([a-z]+)=([^,]+)(,|$)/;
+            const matches = success.match(attribMatch);
+            if (matches[1] === "v") {
+                serverSignature = matches[2];
+            }
+            if (serverSignature !== this._sasl_data["server-signature"]) {
+                // remove old handlers
+                this.deleteHandler(this._sasl_failure_handler);
+                this._sasl_failure_handler = null;
+                if (this._sasl_challenge_handler) {
+                    this.deleteHandler(this._sasl_challenge_handler);
+                    this._sasl_challenge_handler = null;
+                }
+                this._sasl_data = {};
+                return this._sasl_failure_cb(null);
+            }
+        }
+        Strophe.info("SASL authentication succeeded.");
+
+        if (this._sasl_mechanism) {
+            this._sasl_mechanism.onSuccess();
+        }
+        // remove old handlers
+        this.deleteHandler(this._sasl_failure_handler);
+        this._sasl_failure_handler = null;
+        if (this._sasl_challenge_handler) {
+            this.deleteHandler(this._sasl_challenge_handler);
+            this._sasl_challenge_handler = null;
+        }
+        const streamfeature_handlers = [];
+        const wrapper = (handlers, elem) => {
+            while (handlers.length) {
+                this.deleteHandler(handlers.pop());
+            }
+            this._onStreamFeaturesAfterSASL(elem);
+            return false;
+        };
+        streamfeature_handlers.push(
+            this._addSysHandler(elem => wrapper(streamfeature_handlers, elem),
+            null, "stream:features", null, null)
+        );
+
+        streamfeature_handlers.push(
+            this._addSysHandler(elem => wrapper(streamfeature_handlers, elem),
+            Strophe.NS.STREAM, "features", null, null)
+        );
+
+        // we must send an xmpp:restart now
+        this._sendRestart();
+        return false;
+    },
+
+    /** PrivateFunction: _onStreamFeaturesAfterSASL
+     *  Parameters:
+     *    (XMLElement) elem - The matching stanza.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+     _onStreamFeaturesAfterSASL: function (elem) {
+        // save stream:features for future usage
+        this.features = elem;
+        for (let i=0; i < elem.childNodes.length; i++) {
+            const child = elem.childNodes[i];
+            if (child.nodeName === 'bind') {
+                this.do_bind = true;
+            }
+            if (child.nodeName === 'session') {
+                this.do_session = true;
+            }
+        }
+
+        if (!this.do_bind) {
+            this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
+            return false;
+        } else if (!this.options.explicitResourceBinding) {
+            this.bind();
+        } else {
+            this._changeConnectStatus(Strophe.Status.BINDREQUIRED, null);
+        }
+        return false;
+    },
+
+    /** Function: bind
+     *
+     *  Sends an IQ to the XMPP server to bind a JID resource for this session.
+     *
+     *  https://tools.ietf.org/html/rfc6120#section-7.5
+     *
+     *  If `explicitResourceBinding` was set to a truthy value in the options
+     *  passed to the Strophe.Connection constructor, then this function needs
+     *  to be called explicitly by the client author.
+     *
+     *  Otherwise it'll be called automatically as soon as the XMPP server
+     *  advertises the "urn:ietf:params:xml:ns:xmpp-bind" stream feature.
+     */
+    bind: function () {
+        if (!this.do_bind) {
+            Strophe.log(
+                 Strophe.LogLevel.INFO,
+                `Strophe.Connection.prototype.bind called but "do_bind" is false`
+            );
+            return;
+        }
+        this._addSysHandler(
+            this._onResourceBindResultIQ.bind(this),
+            null, null, null, "_bind_auth_2");
+
+        const resource = Strophe.getResourceFromJid(this.jid);
+        if (resource) {
+            this.send($iq({type: "set", id: "_bind_auth_2"})
+                      .c('bind', {xmlns: Strophe.NS.BIND})
+                      .c('resource', {}).t(resource).tree());
+        } else {
+            this.send($iq({type: "set", id: "_bind_auth_2"})
+                      .c('bind', {xmlns: Strophe.NS.BIND})
+                      .tree());
+        }
+    },
+
+    /** PrivateFunction: _onResourceBindIQ
+     *  _Private_ handler for binding result and session start.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The matching stanza.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+    _onResourceBindResultIQ: function (elem) {
+        if (elem.getAttribute("type") === "error") {
+            Strophe.warn("Resource binding failed.");
+            const conflict = elem.getElementsByTagName("conflict");
+            let condition;
+            if (conflict.length > 0) {
+                condition = Strophe.ErrorCondition.CONFLICT;
+            }
+            this._changeConnectStatus(Strophe.Status.AUTHFAIL, condition, elem);
+            return false;
+        }
+        // TODO - need to grab errors
+        const bind = elem.getElementsByTagName("bind");
+        if (bind.length > 0) {
+            const jidNode = bind[0].getElementsByTagName("jid");
+            if (jidNode.length > 0) {
+                this.jid = Strophe.getText(jidNode[0]);
+                if (this.do_session) {
+                    this._establishSession();
+                } else {
+                    this.authenticated = true;
+                    this._changeConnectStatus(Strophe.Status.CONNECTED, null);
+                }
+            }
+        } else {
+            Strophe.warn("Resource binding failed.");
+            this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
+            return false;
+        }
+    },
+
+    /** PrivateFunction: _establishSession
+     *  Send IQ request to establish a session with the XMPP server.
+     *
+     *  See https://xmpp.org/rfcs/rfc3921.html#session
+     *
+     *  Note: The protocol for session establishment has been determined as
+     *  unnecessary and removed in RFC-6121.
+     */
+    _establishSession: function () {
+        if (!this.do_session) {
+            throw new Error(`Strophe.Connection.prototype._establishSession `+
+                `called but apparently ${Strophe.NS.SESSION} wasn't advertised by the server`);
+        }
+        this._addSysHandler(
+            this._onSessionResultIQ.bind(this),
+            null, null, null, "_session_auth_2");
+
+        this.send(
+            $iq({type: "set", id: "_session_auth_2"})
+                .c('session', {xmlns: Strophe.NS.SESSION})
+                .tree());
+    },
+
+    /** PrivateFunction: _onSessionResultIQ
+     *  _Private_ handler for the server's IQ response to a client's session
+     *  request.
+     *
+     *  This sets Connection.authenticated to true on success, which
+     *  starts the processing of user handlers.
+     *
+     *  See https://xmpp.org/rfcs/rfc3921.html#session
+     *
+     *  Note: The protocol for session establishment has been determined as
+     *  unnecessary and removed in RFC-6121.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The matching stanza.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+    _onSessionResultIQ: function (elem) {
+        if (elem.getAttribute("type") === "result") {
+            this.authenticated = true;
+            this._changeConnectStatus(Strophe.Status.CONNECTED, null);
+        } else if (elem.getAttribute("type") === "error") {
+            Strophe.warn("Session creation failed.");
+            this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
+            return false;
+        }
+        return false;
+    },
+
+    /** PrivateFunction: _sasl_failure_cb
+     *  _Private_ handler for SASL authentication failure.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The matching stanza.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+    _sasl_failure_cb: function (elem) {
+        // delete unneeded handlers
+        if (this._sasl_success_handler) {
+            this.deleteHandler(this._sasl_success_handler);
+            this._sasl_success_handler = null;
+        }
+        if (this._sasl_challenge_handler) {
+            this.deleteHandler(this._sasl_challenge_handler);
+            this._sasl_challenge_handler = null;
+        }
+
+        if(this._sasl_mechanism)
+          this._sasl_mechanism.onFailure();
+        this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
+        return false;
+    },
+
+    /** PrivateFunction: _auth2_cb
+     *  _Private_ handler to finish legacy authentication.
+     *
+     *  This handler is called when the result from the jabber:iq:auth
+     *  <iq/> stanza is returned.
+     *
+     *  Parameters:
+     *    (XMLElement) elem - The stanza that triggered the callback.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+    _auth2_cb: function (elem) {
+        if (elem.getAttribute("type") === "result") {
+            this.authenticated = true;
+            this._changeConnectStatus(Strophe.Status.CONNECTED, null);
+        } else if (elem.getAttribute("type") === "error") {
+            this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
+            this.disconnect('authentication failed');
+        }
+        return false;
+    },
+
+    /** PrivateFunction: _addSysTimedHandler
+     *  _Private_ function to add a system level timed handler.
+     *
+     *  This function is used to add a Strophe.TimedHandler for the
+     *  library code.  System timed handlers are allowed to run before
+     *  authentication is complete.
+     *
+     *  Parameters:
+     *    (Integer) period - The period of the handler.
+     *    (Function) handler - The callback function.
+     */
+    _addSysTimedHandler: function (period, handler) {
+        const thand = new Strophe.TimedHandler(period, handler);
+        thand.user = false;
+        this.addTimeds.push(thand);
+        return thand;
+    },
+
+    /** PrivateFunction: _addSysHandler
+     *  _Private_ function to add a system level stanza handler.
+     *
+     *  This function is used to add a Strophe.Handler for the
+     *  library code.  System stanza handlers are allowed to run before
+     *  authentication is complete.
+     *
+     *  Parameters:
+     *    (Function) handler - The callback function.
+     *    (String) ns - The namespace to match.
+     *    (String) name - The stanza name to match.
+     *    (String) type - The stanza type attribute to match.
+     *    (String) id - The stanza id attribute to match.
+     */
+    _addSysHandler: function (handler, ns, name, type, id) {
+        const hand = new Strophe.Handler(handler, ns, name, type, id);
+        hand.user = false;
+        this.addHandlers.push(hand);
+        return hand;
+    },
+
+    /** PrivateFunction: _onDisconnectTimeout
+     *  _Private_ timeout handler for handling non-graceful disconnection.
+     *
+     *  If the graceful disconnect process does not complete within the
+     *  time allotted, this handler finishes the disconnect anyway.
+     *
+     *  Returns:
+     *    false to remove the handler.
+     */
+    _onDisconnectTimeout: function () {
+        Strophe.debug("_onDisconnectTimeout was called");
+        this._changeConnectStatus(Strophe.Status.CONNTIMEOUT, null);
+        this._proto._onDisconnectTimeout();
+        // actually disconnect
+        this._doDisconnect();
+        return false;
+    },
+
+    /** PrivateFunction: _onIdle
+     *  _Private_ handler to process events during idle cycle.
+     *
+     *  This handler is called every 100ms to fire timed handlers that
+     *  are ready and keep poll requests going.
+     */
+    _onIdle: function () {
+        // add timed handlers scheduled for addition
+        // NOTE: we add before remove in the case a timed handler is
+        // added and then deleted before the next _onIdle() call.
+        while (this.addTimeds.length > 0) {
+            this.timedHandlers.push(this.addTimeds.pop());
+        }
+
+        // remove timed handlers that have been scheduled for deletion
+        while (this.removeTimeds.length > 0) {
+            const thand = this.removeTimeds.pop();
+            const i = this.timedHandlers.indexOf(thand);
+            if (i >= 0) {
+                this.timedHandlers.splice(i, 1);
+            }
+        }
+
+        // call ready timed handlers
+        const now = new Date().getTime();
+        const newList = [];
+        for (let i=0; i < this.timedHandlers.length; i++) {
+            const thand = this.timedHandlers[i];
+            if (this.authenticated || !thand.user) {
+                const since = thand.lastCalled + thand.period;
+                if (since - now <= 0) {
+                    if (thand.run()) {
+                        newList.push(thand);
+                    }
+                } else {
+                    newList.push(thand);
+                }
+            }
+        }
+        this.timedHandlers = newList;
+        clearTimeout(this._idleTimeout);
+        this._proto._onIdle();
+
+        // reactivate the timer only if connected
+        if (this.connected) {
+            this._idleTimeout = setTimeout(() => this._onIdle(), 100);
+        }
+    }
+};
+
+/** Class: Strophe.SASLMechanism
+ *
+ *  encapsulates SASL authentication mechanisms.
+ *
+ *  User code may override the priority for each mechanism or disable it completely.
+ *  See <priority> for information about changing priority and <test> for informatian on
+ *  how to disable a mechanism.
+ *
+ *  By default, all mechanisms are enabled and the priorities are
+ *
+ *      OAUTHBEARER - 60
+ *      SCRAM-SHA1 - 50
+ *      DIGEST-MD5 - 40
+ *      PLAIN - 30
+ *      ANONYMOUS - 20
+ *      EXTERNAL - 10
+ *
+ *  See: Strophe.Connection.addSupportedSASLMechanisms
+ */
+
+/**
+ * PrivateConstructor: Strophe.SASLMechanism
+ * SASL auth mechanism abstraction.
+ *
+ *  Parameters:
+ *    (String) name - SASL Mechanism name.
+ *    (Boolean) isClientFirst - If client should send response first without challenge.
+ *    (Number) priority - Priority.
+ *
+ *  Returns:
+ *    A new Strophe.SASLMechanism object.
+ */
+Strophe.SASLMechanism = function(name, isClientFirst, priority) {
+  /** PrivateVariable: name
+   *  Mechanism name.
+   */
+  this.name = name;
+  /** PrivateVariable: isClientFirst
+   *  If client sends response without initial server challenge.
+   */
+  this.isClientFirst = isClientFirst;
+  /** Variable: priority
+   *  Determines which <SASLMechanism> is chosen for authentication (Higher is better).
+   *  Users may override this to prioritize mechanisms differently.
+   *
+   *  In the default configuration the priorities are
+   *
+   *  SCRAM-SHA1 - 40
+   *  DIGEST-MD5 - 30
+   *  Plain - 20
+   *
+   *  Example: (This will cause Strophe to choose the mechanism that the server sent first)
+   *
+   *  > Strophe.SASLMD5.priority = Strophe.SASLSHA1.priority;
+   *
+   *  See <SASL mechanisms> for a list of available mechanisms.
+   *
+   */
+  this.priority = priority;
+};
+
+Strophe.SASLMechanism.prototype = {
+    /**
+     *  Function: test
+     *  Checks if mechanism able to run.
+     *  To disable a mechanism, make this return false;
+     *
+     *  To disable plain authentication run
+     *  > Strophe.SASLPlain.test = function() {
+     *  >   return false;
+     *  > }
+     *
+     *  See <SASL mechanisms> for a list of available mechanisms.
+     *
+     *  Parameters:
+     *    (Strophe.Connection) connection - Target Connection.
+     *
+     *  Returns:
+     *    (Boolean) If mechanism was able to run.
+     */
+    test: function(connection) {
+        return true;
+    },
+
+    /** PrivateFunction: onStart
+     *  Called before starting mechanism on some connection.
+     *
+     *  Parameters:
+     *    (Strophe.Connection) connection - Target Connection.
+     */
+    onStart: function(connection) {
+        this._connection = connection;
+    },
+
+    /** PrivateFunction: onChallenge
+     *  Called by protocol implementation on incoming challenge. If client is
+     *  first (isClientFirst === true) challenge will be null on the first call.
+     *
+     *  Parameters:
+     *    (Strophe.Connection) connection - Target Connection.
+     *    (String) challenge - current challenge to handle.
+     *
+     *  Returns:
+     *    (String) Mechanism response.
+     */
+    onChallenge: function (connection, challenge) {
+        throw new Error("You should implement challenge handling!");
+    },
+
+    /** PrivateFunction: onFailure
+     *  Protocol informs mechanism implementation about SASL failure.
+     */
+    onFailure: function() {
+        this._connection = null;
+    },
+
+    /** PrivateFunction: onSuccess
+     *  Protocol informs mechanism implementation about SASL success.
+     */
+    onSuccess: function() {
+        this._connection = null;
+    }
+};
+
+/** Constants: SASL mechanisms
+ *  Available authentication mechanisms
+ *
+ *  Strophe.SASLAnonymous - SASL ANONYMOUS authentication.
+ *  Strophe.SASLPlain - SASL PLAIN authentication.
+ *  Strophe.SASLMD5 - SASL DIGEST-MD5 authentication
+ *  Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication
+ *  Strophe.SASLOAuthBearer - SASL OAuth Bearer authentication
+ *  Strophe.SASLExternal - SASL EXTERNAL authentication
+ *  Strophe.SASLXOAuth2 - SASL X-OAuth2 authentication
+ */
+
+// Building SASL callbacks
+
+/** PrivateConstructor: SASLAnonymous
+ *  SASL ANONYMOUS authentication.
+ */
+Strophe.SASLAnonymous = function() {};
+Strophe.SASLAnonymous.prototype = new Strophe.SASLMechanism("ANONYMOUS", false, 20);
+
+Strophe.SASLAnonymous.prototype.test = function(connection) {
+    return connection.authcid === null;
+};
+
+
+/** PrivateConstructor: SASLPlain
+ *  SASL PLAIN authentication.
+ */
+Strophe.SASLPlain = function() {};
+Strophe.SASLPlain.prototype = new Strophe.SASLMechanism("PLAIN", true, 50);
+
+Strophe.SASLPlain.prototype.test = function(connection) {
+    return connection.authcid !== null;
+};
+
+Strophe.SASLPlain.prototype.onChallenge = function(connection) {
+    let auth_str = connection.authzid;
+    auth_str = auth_str + "\u0000";
+    auth_str = auth_str + connection.authcid;
+    auth_str = auth_str + "\u0000";
+    auth_str = auth_str + connection.pass;
+    return utils.utf16to8(auth_str);
+};
+
+
+/** PrivateConstructor: SASLSHA1
+ *  SASL SCRAM SHA 1 authentication.
+ */
+Strophe.SASLSHA1 = function() {};
+Strophe.SASLSHA1.prototype = new Strophe.SASLMechanism("SCRAM-SHA-1", true, 70);
+
+Strophe.SASLSHA1.prototype.test = function(connection) {
+    return connection.authcid !== null;
+};
+
+Strophe.SASLSHA1.prototype.onChallenge = function(connection, challenge, test_cnonce) {
+    const cnonce = test_cnonce || MD5.hexdigest("" + (Math.random() * 1234567890));
+    let auth_str = "n=" + utils.utf16to8(connection.authcid);
+    auth_str += ",r=";
+    auth_str += cnonce;
+    connection._sasl_data.cnonce = cnonce;
+    connection._sasl_data["client-first-message-bare"] = auth_str;
+    auth_str = "n,," + auth_str;
+
+    this.onChallenge = (connection, challenge) => {
+        let nonce, salt, iter, Hi, U, U_old, i, k;
+        let responseText = "c=biws,";
+        let authMessage = `${connection._sasl_data["client-first-message-bare"]},${challenge},`;
+        const cnonce = connection._sasl_data.cnonce;
+        const attribMatch = /([a-z]+)=([^,]+)(,|$)/;
+
+        while (challenge.match(attribMatch)) {
+            const matches = challenge.match(attribMatch);
+            challenge = challenge.replace(matches[0], "");
+            switch (matches[1]) {
+            case "r":
+                nonce = matches[2];
+                break;
+            case "s":
+                salt = matches[2];
+                break;
+            case "i":
+                iter = matches[2];
+                break;
+            }
+        }
+
+        if (nonce.substr(0, cnonce.length) !== cnonce) {
+            connection._sasl_data = {};
+            return connection._sasl_failure_cb();
+        }
+
+        responseText += "r=" + nonce;
+        authMessage += responseText;
+
+        salt = atob(salt);
+        salt += "\x00\x00\x00\x01";
+
+        const pass = utils.utf16to8(connection.pass);
+        Hi = U_old = SHA1.core_hmac_sha1(pass, salt);
+        for (i=1; i<iter; i++) {
+            U = SHA1.core_hmac_sha1(pass, SHA1.binb2str(U_old));
+            for (k = 0; k < 5; k++) {
+                Hi[k] ^= U[k];
+            }
+            U_old = U;
+        }
+        Hi = SHA1.binb2str(Hi);
+
+        const clientKey = SHA1.core_hmac_sha1(Hi, "Client Key");
+        const serverKey = SHA1.str_hmac_sha1(Hi, "Server Key");
+        const clientSignature = SHA1.core_hmac_sha1(SHA1.str_sha1(SHA1.binb2str(clientKey)), authMessage);
+        connection._sasl_data["server-signature"] = SHA1.b64_hmac_sha1(serverKey, authMessage);
+
+        for (k = 0; k < 5; k++) {
+            clientKey[k] ^= clientSignature[k];
+        }
+        responseText += ",p=" + btoa(SHA1.binb2str(clientKey));
+        return responseText;
+    }
+    return auth_str;
+};
+
+
+/** PrivateConstructor: SASLMD5
+ *  SASL DIGEST MD5 authentication.
+ */
+Strophe.SASLMD5 = function() {};
+Strophe.SASLMD5.prototype = new Strophe.SASLMechanism("DIGEST-MD5", false, 60);
+
+Strophe.SASLMD5.prototype.test = function(connection) {
+    return connection.authcid !== null;
+};
+
+/** PrivateFunction: _quote
+ *  _Private_ utility function to backslash escape and quote strings.
+ *
+ *  Parameters:
+ *    (String) str - The string to be quoted.
+ *
+ *  Returns:
+ *    quoted string
+ */
+Strophe.SASLMD5.prototype._quote = function (str) {
+    return '"' + str.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"';
+    //" end string workaround for emacs
+};
+
+Strophe.SASLMD5.prototype.onChallenge = function(connection, challenge, test_cnonce) {
+    const attribMatch = /([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/;
+    const cnonce = test_cnonce || MD5.hexdigest("" + (Math.random() * 1234567890));
+    let realm = "";
+    let host = null;
+    let nonce = "";
+    let qop = "";
+
+    while (challenge.match(attribMatch)) {
+        const matches = challenge.match(attribMatch);
+        challenge = challenge.replace(matches[0], "");
+        matches[2] = matches[2].replace(/^"(.+)"$/, "$1");
+        switch (matches[1]) {
+        case "realm":
+           realm = matches[2];
+           break;
+        case "nonce":
+           nonce = matches[2];
+           break;
+        case "qop":
+           qop = matches[2];
+           break;
+        case "host":
+           host = matches[2];
+           break;
+        }
+    }
+    let digest_uri = connection.servtype + "/" + connection.domain;
+    if (host !== null) {
+        digest_uri = digest_uri + "/" + host;
+    }
+
+    const cred = utils.utf16to8(connection.authcid + ":" + realm + ":" + this._connection.pass);
+    const A1 = MD5.hash(cred) + ":" + nonce + ":" + cnonce;
+    const A2 = 'AUTHENTICATE:' + digest_uri;
+
+    let responseText = "";
+    responseText += 'charset=utf-8,';
+    responseText += 'username=' + this._quote(utils.utf16to8(connection.authcid)) + ',';
+    responseText += 'realm=' + this._quote(realm) + ',';
+    responseText += 'nonce=' + this._quote(nonce) + ',';
+    responseText += 'nc=00000001,';
+    responseText += 'cnonce=' + this._quote(cnonce) + ',';
+    responseText += 'digest-uri=' + this._quote(digest_uri) + ',';
+    responseText += 'response=' + MD5.hexdigest(MD5.hexdigest(A1) + ":" +
+                                                nonce + ":00000001:" +
+                                                cnonce + ":auth:" +
+                                                MD5.hexdigest(A2)) + ",";
+    responseText += 'qop=auth';
+    this.onChallenge = () => "";
+    return responseText;
+};
+
+
+/** PrivateConstructor: SASLOAuthBearer
+ *  SASL OAuth Bearer authentication.
+ */
+Strophe.SASLOAuthBearer = function() {};
+Strophe.SASLOAuthBearer.prototype = new Strophe.SASLMechanism("OAUTHBEARER", true, 40);
+
+Strophe.SASLOAuthBearer.prototype.test = function(connection) {
+    return connection.pass !== null;
+};
+
+Strophe.SASLOAuthBearer.prototype.onChallenge = function(connection) {
+    let auth_str = 'n,';
+    if (connection.authcid !== null) {
+        auth_str = auth_str + 'a=' + connection.authzid;
+    }
+    auth_str = auth_str + ',';
+    auth_str = auth_str + "\u0001";
+    auth_str = auth_str + 'auth=Bearer ';
+    auth_str = auth_str + connection.pass;
+    auth_str = auth_str + "\u0001";
+    auth_str = auth_str + "\u0001";
+    return utils.utf16to8(auth_str);
+};
+
+
+/** PrivateConstructor: SASLExternal
+ *  SASL EXTERNAL authentication.
+ *
+ *  The EXTERNAL mechanism allows a client to request the server to use
+ *  credentials established by means external to the mechanism to
+ *  authenticate the client. The external means may be, for instance,
+ *  TLS services.
+ */
+Strophe.SASLExternal = function() {};
+Strophe.SASLExternal.prototype = new Strophe.SASLMechanism("EXTERNAL", true, 10);
+
+Strophe.SASLExternal.prototype.onChallenge = function(connection) {
+    /** According to XEP-178, an authzid SHOULD NOT be presented when the
+     * authcid contained or implied in the client certificate is the JID (i.e.
+     * authzid) with which the user wants to log in as.
+     *
+     * To NOT send the authzid, the user should therefore set the authcid equal
+     * to the JID when instantiating a new Strophe.Connection object.
+     */
+    return connection.authcid === connection.authzid ? '' : connection.authzid;
+};
+
+
+/** PrivateConstructor: SASLXOAuth2
+ *  SASL X-OAuth2 authentication.
+ */
+Strophe.SASLXOAuth2 = function () { };
+Strophe.SASLXOAuth2.prototype = new Strophe.SASLMechanism("X-OAUTH2", true, 30);
+
+Strophe.SASLXOAuth2.prototype.test = function (connection) {
+    return connection.pass !== null;
+};
+
+Strophe.SASLXOAuth2.prototype.onChallenge = function (connection) {
+    let auth_str = '\u0000';
+    if (connection.authcid !== null) {
+        auth_str = auth_str + connection.authzid;
+    }
+    auth_str = auth_str + "\u0000";
+    auth_str = auth_str + connection.pass;
+    return utils.utf16to8(auth_str);
+};
+
+
+
+/* harmony default export */ var core = ({
+    'Strophe':         Strophe,
+    '$build':          $build,
+    '$iq':             $iq,
+    '$msg':            $msg,
+    '$pres':           $pres,
+    'SHA1':            SHA1,
+    'MD5':             MD5,
+    'b64_hmac_sha1':   SHA1.b64_hmac_sha1,
+    'b64_sha1':        SHA1.b64_sha1,
+    'str_hmac_sha1':   SHA1.str_hmac_sha1,
+    'str_sha1':        SHA1.str_sha1
+});
+
+// CONCATENATED MODULE: ./node_modules/strophe.js/src/websocket.js
+/*
+    This program is distributed under the terms of the MIT license.
+    Please see the LICENSE file for details.
+
+    Copyright 2006-2008, OGG, LLC
+*/
+
+/* global window, clearTimeout, WebSocket, DOMParser */
+
+
+
+const websocket_Strophe = core.Strophe;
+const websocket_$build = core.$build;
+
+
+/** Class: Strophe.WebSocket
+ *  _Private_ helper class that handles WebSocket Connections
+ *
+ *  The Strophe.WebSocket class is used internally by Strophe.Connection
+ *  to encapsulate WebSocket sessions. It is not meant to be used from user's code.
+ */
+
+/** File: websocket.js
+ *  A JavaScript library to enable XMPP over Websocket in Strophejs.
+ *
+ *  This file implements XMPP over WebSockets for Strophejs.
+ *  If a Connection is established with a Websocket url (ws://...)
+ *  Strophe will use WebSockets.
+ *  For more information on XMPP-over-WebSocket see RFC 7395:
+ *  http://tools.ietf.org/html/rfc7395
+ *
+ *  WebSocket support implemented by Andreas Guth (andreas.guth@rwth-aachen.de)
+ */
+
+/** PrivateConstructor: Strophe.Websocket
+ *  Create and initialize a Strophe.WebSocket object.
+ *  Currently only sets the connection Object.
+ *
+ *  Parameters:
+ *    (Strophe.Connection) connection - The Strophe.Connection that will use WebSockets.
+ *
+ *  Returns:
+ *    A new Strophe.WebSocket object.
+ */
+websocket_Strophe.Websocket = function(connection) {
+    this._conn = connection;
+    this.strip = "wrapper";
+
+    const service = connection.service;
+    if (service.indexOf("ws:") !== 0 && service.indexOf("wss:") !== 0) {
+        // If the service is not an absolute URL, assume it is a path and put the absolute
+        // URL together from options, current URL and the path.
+        let new_service = "";
+        if (connection.options.protocol === "ws" && window.location.protocol !== "https:") {
+            new_service += "ws";
+        } else {
+            new_service += "wss";
+        }
+
+        new_service += "://" + window.location.host;
+        if (service.indexOf("/") !== 0) {
+            new_service += window.location.pathname + service;
+        } else {
+            new_service += service;
+        }
+        connection.service = new_service;
+    }
+};
+
+websocket_Strophe.Websocket.prototype = {
+    /** PrivateFunction: _buildStream
+     *  _Private_ helper function to generate the <stream> start tag for WebSockets
+     *
+     *  Returns:
+     *    A Strophe.Builder with a <stream> element.
+     */
+    _buildStream: function () {
+        return websocket_$build("open", {
+            "xmlns": websocket_Strophe.NS.FRAMING,
+            "to": this._conn.domain,
+            "version": '1.0'
+        });
+    },
+
+    /** PrivateFunction: _check_streamerror
+     * _Private_ checks a message for stream:error
+     *
+     *  Parameters:
+     *    (Strophe.Request) bodyWrap - The received stanza.
+     *    connectstatus - The ConnectStatus that will be set on error.
+     *  Returns:
+     *     true if there was a streamerror, false otherwise.
+     */
+    _check_streamerror: function (bodyWrap, connectstatus) {
+        let errors;
+        if (bodyWrap.getElementsByTagNameNS) {
+            errors = bodyWrap.getElementsByTagNameNS(websocket_Strophe.NS.STREAM, "error");
+        } else {
+            errors = bodyWrap.getElementsByTagName("stream:error");
+        }
+        if (errors.length === 0) {
+            return false;
+        }
+        const error = errors[0];
+
+        let condition = "";
+        let text = "";
+
+        const ns = "urn:ietf:params:xml:ns:xmpp-streams";
+        for (let i=0; i<error.childNodes.length; i++) {
+            const e = error.childNodes[i];
+            if (e.getAttribute("xmlns") !== ns) {
+                break;
+            } if (e.nodeName === "text") {
+                text = e.textContent;
+            } else {
+                condition = e.nodeName;
+            }
+        }
+
+        let errorString = "WebSocket stream error: ";
+        if (condition) {
+            errorString += condition;
+        } else {
+            errorString += "unknown";
+        }
+        if (text) {
+            errorString += " - " + text;
+        }
+        websocket_Strophe.error(errorString);
+
+        // close the connection on stream_error
+        this._conn._changeConnectStatus(connectstatus, condition);
+        this._conn._doDisconnect();
+        return true;
+    },
+
+    /** PrivateFunction: _reset
+     *  Reset the connection.
+     *
+     *  This function is called by the reset function of the Strophe Connection.
+     *  Is not needed by WebSockets.
+     */
+    _reset: function () {
+        return;
+    },
+
+    /** PrivateFunction: _connect
+     *  _Private_ function called by Strophe.Connection.connect
+     *
+     *  Creates a WebSocket for a connection and assigns Callbacks to it.
+     *  Does nothing if there already is a WebSocket.
+     */
+    _connect: function () {
+        // Ensure that there is no open WebSocket from a previous Connection.
+        this._closeSocket();
+
+        // Create the new WobSocket
+        this.socket = new WebSocket(this._conn.service, "xmpp");
+        this.socket.onopen = this._onOpen.bind(this);
+        this.socket.onerror = this._onError.bind(this);
+        this.socket.onclose = this._onClose.bind(this);
+        this.socket.onmessage = this._connect_cb_wrapper.bind(this);
+    },
+
+    /** PrivateFunction: _connect_cb
+     *  _Private_ function called by Strophe.Connection._connect_cb
+     *
+     * checks for stream:error
+     *
+     *  Parameters:
+     *    (Strophe.Request) bodyWrap - The received stanza.
+     */
+    _connect_cb: function(bodyWrap) {
+        const error = this._check_streamerror(bodyWrap, websocket_Strophe.Status.CONNFAIL);
+        if (error) {
+            return websocket_Strophe.Status.CONNFAIL;
+        }
+    },
+
+    /** PrivateFunction: _handleStreamStart
+     * _Private_ function that checks the opening <open /> tag for errors.
+     *
+     * Disconnects if there is an error and returns false, true otherwise.
+     *
+     *  Parameters:
+     *    (Node) message - Stanza containing the <open /> tag.
+     */
+    _handleStreamStart: function(message) {
+        let error = false;
+
+        // Check for errors in the <open /> tag
+        const ns = message.getAttribute("xmlns");
+        if (typeof ns !== "string") {
+            error = "Missing xmlns in <open />";
+        } else if (ns !== websocket_Strophe.NS.FRAMING) {
+            error = "Wrong xmlns in <open />: " + ns;
+        }
+
+        const ver = message.getAttribute("version");
+        if (typeof ver !== "string") {
+            error = "Missing version in <open />";
+        } else if (ver !== "1.0") {
+            error = "Wrong version in <open />: " + ver;
+        }
+
+        if (error) {
+            this._conn._changeConnectStatus(websocket_Strophe.Status.CONNFAIL, error);
+            this._conn._doDisconnect();
+            return false;
+        }
+        return true;
+    },
+
+    /** PrivateFunction: _connect_cb_wrapper
+     * _Private_ function that handles the first connection messages.
+     *
+     * On receiving an opening stream tag this callback replaces itself with the real
+     * message handler. On receiving a stream error the connection is terminated.
+     */
+    _connect_cb_wrapper: function(message) {
+        if (message.data.indexOf("<open ") === 0 || message.data.indexOf("<?xml") === 0) {
+            // Strip the XML Declaration, if there is one
+            const data = message.data.replace(/^(<\?.*?\?>\s*)*/, "");
+            if (data === '') return;
+
+            const streamStart = new DOMParser().parseFromString(data, "text/xml").documentElement;
+            this._conn.xmlInput(streamStart);
+            this._conn.rawInput(message.data);
+
+            //_handleStreamSteart will check for XML errors and disconnect on error
+            if (this._handleStreamStart(streamStart)) {
+                //_connect_cb will check for stream:error and disconnect on error
+                this._connect_cb(streamStart);
+            }
+        } else if (message.data.indexOf("<close ") === 0) { // <close xmlns="urn:ietf:params:xml:ns:xmpp-framing />
+            // Parse the raw string to an XML element
+            const parsedMessage = new DOMParser().parseFromString(message.data, "text/xml").documentElement;
+            // Report this input to the raw and xml handlers
+            this._conn.xmlInput(parsedMessage);
+            this._conn.rawInput(message.data);
+            const see_uri = parsedMessage.getAttribute("see-other-uri");
+            if (see_uri) {
+                const service = this._conn.service;
+                // Valid scenarios: WSS->WSS, WS->ANY
+                const isSecureRedirect = (service.indexOf("wss:") >= 0 && see_uri.indexOf("wss:") >= 0) || (service.indexOf("ws:") >= 0);
+                if (isSecureRedirect) {
+                    this._conn._changeConnectStatus(
+                        websocket_Strophe.Status.REDIRECT,
+                        "Received see-other-uri, resetting connection"
+                    );
+                    this._conn.reset();
+                    this._conn.service = see_uri;
+                    this._connect();
+                }
+            } else {
+                this._conn._changeConnectStatus(
+                    websocket_Strophe.Status.CONNFAIL,
+                    "Received closing stream"
+                );
+                this._conn._doDisconnect();
+            }
+        } else {
+            const string = this._streamWrap(message.data);
+            const elem = new DOMParser().parseFromString(string, "text/xml").documentElement;
+            this.socket.onmessage = this._onMessage.bind(this);
+            this._conn._connect_cb(elem, null, message.data);
+        }
+    },
+
+    /** PrivateFunction: _disconnect
+     *  _Private_ function called by Strophe.Connection.disconnect
+     *
+     *  Disconnects and sends a last stanza if one is given
+     *
+     *  Parameters:
+     *    (Request) pres - This stanza will be sent before disconnecting.
+     */
+    _disconnect: function (pres) {
+        if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
+            if (pres) {
+                this._conn.send(pres);
+            }
+            const close = websocket_$build("close", { "xmlns": websocket_Strophe.NS.FRAMING });
+            this._conn.xmlOutput(close.tree());
+            const closeString = websocket_Strophe.serialize(close);
+            this._conn.rawOutput(closeString);
+            try {
+                this.socket.send(closeString);
+            } catch (e) {
+                websocket_Strophe.warn("Couldn't send <close /> tag.");
+            }
+        }
+        this._conn._doDisconnect();
+    },
+
+    /** PrivateFunction: _doDisconnect
+     *  _Private_ function to disconnect.
+     *
+     *  Just closes the Socket for WebSockets
+     */
+    _doDisconnect: function () {
+        websocket_Strophe.debug("WebSockets _doDisconnect was called");
+        this._closeSocket();
+    },
+
+    /** PrivateFunction _streamWrap
+     *  _Private_ helper function to wrap a stanza in a <stream> tag.
+     *  This is used so Strophe can process stanzas from WebSockets like BOSH
+     */
+    _streamWrap: function (stanza) {
+        return "<wrapper>" + stanza + '</wrapper>';
+    },
+
+
+    /** PrivateFunction: _closeSocket
+     *  _Private_ function to close the WebSocket.
+     *
+     *  Closes the socket if it is still open and deletes it
+     */
+    _closeSocket: function () {
+        if (this.socket) {
+            try {
+                this.socket.onclose = null;
+                this.socket.onerror = null;
+                this.socket.onmessage = null;
+                this.socket.close();
+            } catch (e) {
+                websocket_Strophe.debug(e.message);
+            }
+        }
+        this.socket = null;
+    },
+
+    /** PrivateFunction: _emptyQueue
+     * _Private_ function to check if the message queue is empty.
+     *
+     *  Returns:
+     *    True, because WebSocket messages are send immediately after queueing.
+     */
+    _emptyQueue: function () {
+        return true;
+    },
+
+    /** PrivateFunction: _onClose
+     * _Private_ function to handle websockets closing.
+     *
+     * Nothing to do here for WebSockets
+     */
+    _onClose: function(e) {
+        if (this._conn.connected && !this._conn.disconnecting) {
+            websocket_Strophe.error("Websocket closed unexpectedly");
+            this._conn._doDisconnect();
+        } else if (e && e.code === 1006 && !this._conn.connected && this.socket) {
+            // in case the onError callback was not called (Safari 10 does not
+            // call onerror when the initial connection fails) we need to
+            // dispatch a CONNFAIL status update to be consistent with the
+            // behavior on other browsers.
+            websocket_Strophe.error("Websocket closed unexcectedly");
+            this._conn._changeConnectStatus(
+                websocket_Strophe.Status.CONNFAIL,
+                "The WebSocket connection could not be established or was disconnected."
+            );
+            this._conn._doDisconnect();
+        } else {
+            websocket_Strophe.debug("Websocket closed");
+        }
+    },
+
+    /** PrivateFunction: _no_auth_received
+     *
+     * Called on stream start/restart when no stream:features
+     * has been received.
+     */
+    _no_auth_received: function (callback) {
+        websocket_Strophe.error("Server did not offer a supported authentication mechanism");
+        this._conn._changeConnectStatus(
+            websocket_Strophe.Status.CONNFAIL,
+            websocket_Strophe.ErrorCondition.NO_AUTH_MECH
+        );
+        if (callback) {
+            callback.call(this._conn);
+        }
+        this._conn._doDisconnect();
+    },
+
+    /** PrivateFunction: _onDisconnectTimeout
+     *  _Private_ timeout handler for handling non-graceful disconnection.
+     *
+     *  This does nothing for WebSockets
+     */
+    _onDisconnectTimeout: function () {},
+
+    /** PrivateFunction: _abortAllRequests
+     *  _Private_ helper function that makes sure all pending requests are aborted.
+     */
+    _abortAllRequests: function () {},
+
+    /** PrivateFunction: _onError
+     * _Private_ function to handle websockets errors.
+     *
+     * Parameters:
+     * (Object) error - The websocket error.
+     */
+    _onError: function(error) {
+        websocket_Strophe.error("Websocket error " + error);
+        this._conn._changeConnectStatus(
+            websocket_Strophe.Status.CONNFAIL,
+            "The WebSocket connection could not be established or was disconnected."
+        );
+        this._disconnect();
+    },
+
+    /** PrivateFunction: _onIdle
+     *  _Private_ function called by Strophe.Connection._onIdle
+     *
+     *  sends all queued stanzas
+     */
+    _onIdle: function () {
+        const data = this._conn._data;
+        if (data.length > 0 && !this._conn.paused) {
+            for (let i=0; i<data.length; i++) {
+                if (data[i] !== null) {
+                    let stanza;
+                    if (data[i] === "restart") {
+                        stanza = this._buildStream().tree();
+                    } else {
+                        stanza = data[i];
+                    }
+                    const rawStanza = websocket_Strophe.serialize(stanza);
+                    this._conn.xmlOutput(stanza);
+                    this._conn.rawOutput(rawStanza);
+                    this.socket.send(rawStanza);
+                }
+            }
+            this._conn._data = [];
+        }
+    },
+
+    /** PrivateFunction: _onMessage
+     * _Private_ function to handle websockets messages.
+     *
+     * This function parses each of the messages as if they are full documents.
+     * [TODO : We may actually want to use a SAX Push parser].
+     *
+     * Since all XMPP traffic starts with
+     *  <stream:stream version='1.0'
+     *                 xml:lang='en'
+     *                 xmlns='jabber:client'
+     *                 xmlns:stream='http://etherx.jabber.org/streams'
+     *                 id='3697395463'
+     *                 from='SERVER'>
+     *
+     * The first stanza will always fail to be parsed.
+     *
+     * Additionally, the seconds stanza will always be <stream:features> with
+     * the stream NS defined in the previous stanza, so we need to 'force'
+     * the inclusion of the NS in this stanza.
+     *
+     * Parameters:
+     * (string) message - The websocket message.
+     */
+    _onMessage: function(message) {
+        let elem;
+        // check for closing stream
+        const close = '<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';
+        if (message.data === close) {
+            this._conn.rawInput(close);
+            this._conn.xmlInput(message);
+            if (!this._conn.disconnecting) {
+                this._conn._doDisconnect();
+            }
+            return;
+        } else if (message.data.search("<open ") === 0) {
+            // This handles stream restarts
+            elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement;
+            if (!this._handleStreamStart(elem)) {
+                return;
+            }
+        } else {
+            const data = this._streamWrap(message.data);
+            elem = new DOMParser().parseFromString(data, "text/xml").documentElement;
+        }
+
+        if (this._check_streamerror(elem, websocket_Strophe.Status.ERROR)) {
+            return;
+        }
+
+        //handle unavailable presence stanza before disconnecting
+        if (this._conn.disconnecting &&
+                elem.firstChild.nodeName === "presence" &&
+                elem.firstChild.getAttribute("type") === "unavailable") {
+            this._conn.xmlInput(elem);
+            this._conn.rawInput(websocket_Strophe.serialize(elem));
+            // if we are already disconnecting we will ignore the unavailable stanza and
+            // wait for the </stream:stream> tag before we close the connection
+            return;
+        }
+        this._conn._dataRecv(elem, message.data);
+    },
+
+    /** PrivateFunction: _onOpen
+     * _Private_ function to handle websockets connection setup.
+     *
+     * The opening stream tag is sent here.
+     */
+    _onOpen: function() {
+        websocket_Strophe.debug("Websocket open");
+        const start = this._buildStream();
+        this._conn.xmlOutput(start.tree());
+
+        const startString = websocket_Strophe.serialize(start);
+        this._conn.rawOutput(startString);
+        this.socket.send(startString);
+    },
+
+    /** PrivateFunction: _reqToData
+     * _Private_ function to get a stanza out of a request.
+     *
+     * WebSockets don't use requests, so the passed argument is just returned.
+     *
+     *  Parameters:
+     *    (Object) stanza - The stanza.
+     *
+     *  Returns:
+     *    The stanza that was passed.
+     */
+    _reqToData: function (stanza) {
+        return stanza;
+    },
+
+    /** PrivateFunction: _send
+     *  _Private_ part of the Connection.send function for WebSocket
+     *
+     * Just flushes the messages that are in the queue
+     */
+    _send: function () {
+        this._conn.flush();
+    },
+
+    /** PrivateFunction: _sendRestart
+     *
+     *  Send an xmpp:restart stanza.
+     */
+    _sendRestart: function () {
+        clearTimeout(this._conn._idleTimeout);
+        this._conn._onIdle.bind(this._conn)();
+    }
+};
+
+// EXTERNAL MODULE: ./src/headless/polyfill.js
+var polyfill = __webpack_require__(329);
+
+// EXTERNAL MODULE: ./node_modules/backbone/backbone.js
+var backbone = __webpack_require__(10);
+var backbone_default = /*#__PURE__*/__webpack_require__.n(backbone);
+
+// EXTERNAL MODULE: ./node_modules/localforage/dist/localforage.js
+var localforage = __webpack_require__(17);
+
+// CONCATENATED MODULE: ./node_modules/localforage/src/utils/executeCallback.js
+function executeCallback(promise, callback) {
+    if (callback) {
+        promise.then(
+            function(result) {
+                callback(null, result);
+            },
+            function(error) {
+                callback(error);
+            }
+        );
+    }
+}
+
+/* harmony default export */ var utils_executeCallback = (executeCallback);
+
+// CONCATENATED MODULE: ./node_modules/localforage/src/utils/getCallback.js
+function getCallback() {
+    if (
+        arguments.length &&
+        typeof arguments[arguments.length - 1] === 'function'
+    ) {
+        return arguments[arguments.length - 1];
+    }
+}
+
+// CONCATENATED MODULE: ./node_modules/localforage/src/utils/normalizeKey.js
+function normalizeKey(key) {
+    // Cast the key to a string, as that's all we can set as a key.
+    if (typeof key !== 'string') {
+        console.warn(`${key} used as a key, but it is not a string.`);
+        key = String(key);
+    }
+
+    return key;
+}
+
+// CONCATENATED MODULE: ./node_modules/localforage/src/utils/createBlob.js
+// Abstracts constructing a Blob object, so it also works in older
+// browsers that don't support the native Blob constructor. (i.e.
+// old QtWebKit versions, at least).
+// Abstracts constructing a Blob object, so it also works in older
+// browsers that don't support the native Blob constructor. (i.e.
+// old QtWebKit versions, at least).
+function createBlob(parts, properties) {
+    /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */
+    parts = parts || [];
+    properties = properties || {};
+    try {
+        return new Blob(parts, properties);
+    } catch (e) {
+        if (e.name !== 'TypeError') {
+            throw e;
+        }
+        var Builder =
+            typeof BlobBuilder !== 'undefined'
+                ? BlobBuilder
+                : typeof MSBlobBuilder !== 'undefined'
+                  ? MSBlobBuilder
+                  : typeof MozBlobBuilder !== 'undefined'
+                    ? MozBlobBuilder
+                    : WebKitBlobBuilder;
+        var builder = new Builder();
+        for (var i = 0; i < parts.length; i += 1) {
+            builder.append(parts[i]);
+        }
+        return builder.getBlob(properties.type);
+    }
+}
+
+/* harmony default export */ var utils_createBlob = (createBlob);
+
+// CONCATENATED MODULE: ./node_modules/localforage/src/utils/serializer.js
+/* eslint-disable no-bitwise */
+
+
+// Sadly, the best way to save binary data in WebSQL/localStorage is serializing
+// it to Base64, so this is how we store it to prevent very strange errors with less
+// verbose ways of binary <-> string data storage.
+var BASE_CHARS =
+    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+var BLOB_TYPE_PREFIX = '~~local_forage_type~';
+var BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;
+
+var SERIALIZED_MARKER = '__lfsc__:';
+var SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;
+
+// OMG the serializations!
+var TYPE_ARRAYBUFFER = 'arbf';
+var TYPE_BLOB = 'blob';
+var TYPE_INT8ARRAY = 'si08';
+var TYPE_UINT8ARRAY = 'ui08';
+var TYPE_UINT8CLAMPEDARRAY = 'uic8';
+var TYPE_INT16ARRAY = 'si16';
+var TYPE_INT32ARRAY = 'si32';
+var TYPE_UINT16ARRAY = 'ur16';
+var TYPE_UINT32ARRAY = 'ui32';
+var TYPE_FLOAT32ARRAY = 'fl32';
+var TYPE_FLOAT64ARRAY = 'fl64';
+var TYPE_SERIALIZED_MARKER_LENGTH =
+    SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;
+
+var serializer_toString = Object.prototype.toString;
+
+function stringToBuffer(serializedString) {
+    // Fill the string into a ArrayBuffer.
+    var bufferLength = serializedString.length * 0.75;
+    var len = serializedString.length;
+    var i;
+    var p = 0;
+    var encoded1, encoded2, encoded3, encoded4;
+
+    if (serializedString[serializedString.length - 1] === '=') {
+        bufferLength--;
+        if (serializedString[serializedString.length - 2] === '=') {
+            bufferLength--;
+        }
+    }
+
+    var buffer = new ArrayBuffer(bufferLength);
+    var bytes = new Uint8Array(buffer);
+
+    for (i = 0; i < len; i += 4) {
+        encoded1 = BASE_CHARS.indexOf(serializedString[i]);
+        encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);
+        encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);
+        encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);
+
+        /*jslint bitwise: true */
+        bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+        bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+        bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+    }
+    return buffer;
+}
+
+// Converts a buffer to a string to store, serialized, in the backend
+// storage library.
+function bufferToString(buffer) {
+    // base64-arraybuffer
+    var bytes = new Uint8Array(buffer);
+    var base64String = '';
+    var i;
+
+    for (i = 0; i < bytes.length; i += 3) {
+        /*jslint bitwise: true */
+        base64String += BASE_CHARS[bytes[i] >> 2];
+        base64String += BASE_CHARS[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
+        base64String +=
+            BASE_CHARS[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
+        base64String += BASE_CHARS[bytes[i + 2] & 63];
+    }
+
+    if (bytes.length % 3 === 2) {
+        base64String = base64String.substring(0, base64String.length - 1) + '=';
+    } else if (bytes.length % 3 === 1) {
+        base64String =
+            base64String.substring(0, base64String.length - 2) + '==';
+    }
+
+    return base64String;
+}
+
+// Serialize a value, afterwards executing a callback (which usually
+// instructs the `setItem()` callback/promise to be executed). This is how
+// we store binary data with localStorage.
+function serialize(value, callback) {
+    var valueType = '';
+    if (value) {
+        valueType = serializer_toString.call(value);
+    }
+
+    // Cannot use `value instanceof ArrayBuffer` or such here, as these
+    // checks fail when running the tests using casper.js...
+    //
+    // TODO: See why those tests fail and use a better solution.
+    if (
+        value &&
+        (valueType === '[object ArrayBuffer]' ||
+            (value.buffer &&
+                serializer_toString.call(value.buffer) === '[object ArrayBuffer]'))
+    ) {
+        // Convert binary arrays to a string and prefix the string with
+        // a special marker.
+        var buffer;
+        var marker = SERIALIZED_MARKER;
+
+        if (value instanceof ArrayBuffer) {
+            buffer = value;
+            marker += TYPE_ARRAYBUFFER;
+        } else {
+            buffer = value.buffer;
+
+            if (valueType === '[object Int8Array]') {
+                marker += TYPE_INT8ARRAY;
+            } else if (valueType === '[object Uint8Array]') {
+                marker += TYPE_UINT8ARRAY;
+            } else if (valueType === '[object Uint8ClampedArray]') {
+                marker += TYPE_UINT8CLAMPEDARRAY;
+            } else if (valueType === '[object Int16Array]') {
+                marker += TYPE_INT16ARRAY;
+            } else if (valueType === '[object Uint16Array]') {
+                marker += TYPE_UINT16ARRAY;
+            } else if (valueType === '[object Int32Array]') {
+                marker += TYPE_INT32ARRAY;
+            } else if (valueType === '[object Uint32Array]') {
+                marker += TYPE_UINT32ARRAY;
+            } else if (valueType === '[object Float32Array]') {
+                marker += TYPE_FLOAT32ARRAY;
+            } else if (valueType === '[object Float64Array]') {
+                marker += TYPE_FLOAT64ARRAY;
+            } else {
+                callback(new Error('Failed to get type for BinaryArray'));
+            }
+        }
+
+        callback(marker + bufferToString(buffer));
+    } else if (valueType === '[object Blob]') {
+        // Conver the blob to a binaryArray and then to a string.
+        var fileReader = new FileReader();
+
+        fileReader.onload = function() {
+            // Backwards-compatible prefix for the blob type.
+            var str =
+                BLOB_TYPE_PREFIX +
+                value.type +
+                '~' +
+                bufferToString(this.result);
+
+            callback(SERIALIZED_MARKER + TYPE_BLOB + str);
+        };
+
+        fileReader.readAsArrayBuffer(value);
+    } else {
+        try {
+            callback(JSON.stringify(value));
+        } catch (e) {
+            console.error("Couldn't convert value into a JSON string: ", value);
+
+            callback(null, e);
+        }
+    }
+}
+
+// Deserialize data we've inserted into a value column/field. We place
+// special markers into our strings to mark them as encoded; this isn't
+// as nice as a meta field, but it's the only sane thing we can do whilst
+// keeping localStorage support intact.
+//
+// Oftentimes this will just deserialize JSON content, but if we have a
+// special marker (SERIALIZED_MARKER, defined above), we will extract
+// some kind of arraybuffer/binary data/typed array out of the string.
+function deserialize(value) {
+    // If we haven't marked this string as being specially serialized (i.e.
+    // something other than serialized JSON), we can just return it and be
+    // done with it.
+    if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {
+        return JSON.parse(value);
+    }
+
+    // The following code deals with deserializing some kind of Blob or
+    // TypedArray. First we separate out the type of data we're dealing
+    // with from the data itself.
+    var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);
+    var type = value.substring(
+        SERIALIZED_MARKER_LENGTH,
+        TYPE_SERIALIZED_MARKER_LENGTH
+    );
+
+    var blobType;
+    // Backwards-compatible blob type serialization strategy.
+    // DBs created with older versions of localForage will simply not have the blob type.
+    if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {
+        var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);
+        blobType = matcher[1];
+        serializedString = serializedString.substring(matcher[0].length);
+    }
+    var buffer = stringToBuffer(serializedString);
+
+    // Return the right type based on the code/type set during
+    // serialization.
+    switch (type) {
+        case TYPE_ARRAYBUFFER:
+            return buffer;
+        case TYPE_BLOB:
+            return utils_createBlob([buffer], { type: blobType });
+        case TYPE_INT8ARRAY:
+            return new Int8Array(buffer);
+        case TYPE_UINT8ARRAY:
+            return new Uint8Array(buffer);
+        case TYPE_UINT8CLAMPEDARRAY:
+            return new Uint8ClampedArray(buffer);
+        case TYPE_INT16ARRAY:
+            return new Int16Array(buffer);
+        case TYPE_UINT16ARRAY:
+            return new Uint16Array(buffer);
+        case TYPE_INT32ARRAY:
+            return new Int32Array(buffer);
+        case TYPE_UINT32ARRAY:
+            return new Uint32Array(buffer);
+        case TYPE_FLOAT32ARRAY:
+            return new Float32Array(buffer);
+        case TYPE_FLOAT64ARRAY:
+            return new Float64Array(buffer);
+        default:
+            throw new Error('Unkown type: ' + type);
+    }
+}
+
+var localforageSerializer = {
+    serialize: serialize,
+    deserialize: deserialize,
+    stringToBuffer: stringToBuffer,
+    bufferToString: bufferToString
+};
+
+/* harmony default export */ var serializer = (localforageSerializer);
+
+// CONCATENATED MODULE: ./node_modules/backbone.browserStorage/src/drivers/sessionStorage.js
+// Copyright 2014 Mozilla
+// Copyright 2015 Thodoris Greasidis
+// Copyright 2018 JC Brand
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+
+
+
+
+const sessionStorage_serialize = serializer["serialize"];
+const sessionStorage_deserialize = serializer["deserialize"];
+
+
+function isSessionStorageValid () {
+    // If the app is running inside a Google Chrome packaged webapp, or some
+    // other context where sessionStorage isn't available, we don't use
+    // sessionStorage. This feature detection is preferred over the old
+    // `if (window.chrome && window.chrome.runtime)` code.
+    // See: https://github.com/mozilla/localForage/issues/68
+    try {
+        // If sessionStorage isn't available, we get outta here!
+        // This should be inside a try catch
+        if (sessionStorage && ('setItem' in sessionStorage)) {
+            return true;
+        }
+    } catch (e) {
+        console.log(e);
+    }
+    return false;
+}
+
+function _getKeyPrefix(options, defaultConfig) {
+    var keyPrefix = options.name + '/';
+
+    if (options.storeName !== defaultConfig.storeName) {
+        keyPrefix += options.storeName + '/';
+    }
+    return keyPrefix;
+}
+
+const dbInfo = {
+    'serializer': {
+        'serialize': sessionStorage_serialize,
+        'deserialize': sessionStorage_deserialize
+    }
+};
+
+function _initStorage(options) {
+    dbInfo.keyPrefix = _getKeyPrefix(options, this._defaultConfig);
+    if (options) {
+        for (var i in options) { // eslint-disable-line guard-for-in
+            dbInfo[i] = options[i];
+        }
+    }
+}
+
+// Remove all keys from the datastore, effectively destroying all data in
+// the app's key/value store!
+function clear(callback) {
+    var promise = this.ready().then(function() {
+        const keyPrefix = dbInfo.keyPrefix;
+
+        for (let i = sessionStorage.length - 1; i >= 0; i--) {
+            const key = sessionStorage.key(i);
+
+            if (key.indexOf(keyPrefix) === 0) {
+                sessionStorage.removeItem(key);
+            }
+        }
+    });
+
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+// Retrieve an item from the store. Unlike the original async_storage
+// library in Gaia, we don't modify return values at all. If a key's value
+// is `undefined`, we pass that value to the callback function.
+function getItem(key, callback) {
+    key = normalizeKey(key);
+
+    const promise = this.ready().then(function() {
+        let result = sessionStorage.getItem(dbInfo.keyPrefix + key);
+        // If a result was found, parse it from the serialized
+        // string into a JS object. If result isn't truthy, the key
+        // is likely undefined and we'll pass it straight to the
+        // callback.
+        if (result) {
+            result = dbInfo.serializer.deserialize(result);
+        }
+        return result;
+    });
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+// Iterate over all items in the store.
+function iterate(iterator, callback) {
+    var self = this;
+
+    var promise = self.ready().then(function() {
+        var keyPrefix = dbInfo.keyPrefix;
+        var keyPrefixLength = keyPrefix.length;
+        var length = sessionStorage.length;
+
+        // We use a dedicated iterator instead of the `i` variable below
+        // so other keys we fetch in sessionStorage aren't counted in
+        // the `iterationNumber` argument passed to the `iterate()`
+        // callback.
+        //
+        // See: github.com/mozilla/localForage/pull/435#discussion_r38061530
+        var iterationNumber = 1;
+
+        for (var i = 0; i < length; i++) {
+            var key = sessionStorage.key(i);
+            if (key.indexOf(keyPrefix) !== 0) {
+                continue;
+            }
+            var value = sessionStorage.getItem(key);
+
+            // If a result was found, parse it from the serialized
+            // string into a JS object. If result isn't truthy, the
+            // key is likely undefined and we'll pass it straight
+            // to the iterator.
+            if (value) {
+                value = dbInfo.serializer.deserialize(value);
+            }
+
+            value = iterator(
+                value,
+                key.substring(keyPrefixLength),
+                iterationNumber++
+            );
+
+            if (value !== void 0) { // eslint-disable-line no-void
+                return value;
+            }
+        }
+    });
+
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+// Same as sessionStorage's key() method, except takes a callback.
+function sessionStorage_key(n, callback) {
+    var self = this;
+    var promise = self.ready().then(function() {
+        var result;
+        try {
+            result = sessionStorage.key(n);
+        } catch (error) {
+            result = null;
+        }
+
+        // Remove the prefix from the key, if a key is found.
+        if (result) {
+            result = result.substring(dbInfo.keyPrefix.length);
+        }
+
+        return result;
+    });
+
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+function sessionStorage_keys(callback) {
+    var self = this;
+    var promise = self.ready().then(function() {
+        var length = sessionStorage.length;
+        var keys = [];
+
+        for (var i = 0; i < length; i++) {
+            var itemKey = sessionStorage.key(i);
+            if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {
+                keys.push(itemKey.substring(dbInfo.keyPrefix.length));
+            }
+        }
+        return keys;
+    });
+
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+// Supply the number of keys in the datastore to the callback function.
+function sessionStorage_length(callback) {
+    var self = this;
+    var promise = self.keys().then(function(keys) {
+        return keys.length;
+    });
+
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+// Remove an item from the store, nice and simple.
+function removeItem(key, callback) {
+    key = normalizeKey(key);
+    const promise = this.ready().then(function() {
+        sessionStorage.removeItem(dbInfo.keyPrefix + key);
+    });
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+// Set a key's value and run an optional callback once the value is set.
+// Unlike Gaia's implementation, the callback function is passed the value,
+// in case you want to operate on that value only after you're sure it
+// saved, or something like that.
+function setItem(key, value, callback) {
+    key = normalizeKey(key);
+
+    const promise = this.ready().then(function() {
+        // Convert undefined values to null.
+        // https://github.com/mozilla/localForage/pull/42
+        if (value === undefined) {
+            value = null;
+        }
+
+        // Save the original value to pass to the callback.
+        var originalValue = value;
+
+        return new Promise(function(resolve, reject) {
+            dbInfo.serializer.serialize(value, function(value, error) {
+                if (error) {
+                    reject(error);
+                } else {
+                    try {
+                        sessionStorage.setItem(dbInfo.keyPrefix + key, value);
+                        resolve(originalValue);
+                    } catch (e) {
+                        // sessionStorage capacity exceeded.
+                        // TODO: Make this a specific error/event.
+                        if (
+                            e.name === 'QuotaExceededError' ||
+                            e.name === 'NS_ERROR_DOM_QUOTA_REACHED'
+                        ) {
+                            reject(e);
+                        }
+                        reject(e);
+                    }
+                }
+            });
+        });
+    });
+
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+function dropInstance(options, callback) {
+    callback = getCallback.apply(this, arguments);
+
+    options = (typeof options !== 'function' && options) || {};
+    if (!options.name) {
+        var currentConfig = this.config();
+        options.name = options.name || currentConfig.name;
+        options.storeName = options.storeName || currentConfig.storeName;
+    }
+
+    var self = this;
+    var promise;
+    if (!options.name) {
+        promise = Promise.reject(new Error('Invalid arguments'));
+    } else {
+        promise = new Promise(function(resolve) {
+            if (!options.storeName) {
+                resolve(`${options.name}/`);
+            } else {
+                resolve(_getKeyPrefix(options, self._defaultConfig));
+            }
+        }).then(function(keyPrefix) {
+            for (var i = sessionStorage.length - 1; i >= 0; i--) {
+                var key = sessionStorage.key(i);
+
+                if (key.indexOf(keyPrefix) === 0) {
+                    sessionStorage.removeItem(key);
+                }
+            }
+        });
+    }
+
+    utils_executeCallback(promise, callback);
+    return promise;
+}
+
+const sessionStorageWrapper = {
+    _driver: 'sessionStorageWrapper',
+    _initStorage: _initStorage,
+    _support: isSessionStorageValid(),
+    iterate: iterate,
+    getItem: getItem,
+    setItem: setItem,
+    removeItem: removeItem,
+    clear: clear,
+    length: sessionStorage_length,
+    key: sessionStorage_key,
+    keys: sessionStorage_keys,
+    dropInstance: dropInstance
+};
+
+/* harmony default export */ var drivers_sessionStorage = (sessionStorageWrapper);
+
+// CONCATENATED MODULE: ./node_modules/backbone.browserStorage/src/backbone.browserStorage.js
+/**
+ * Backbone IndexedDB, localStorage and sessionStorage adapter
+ * Version 0.0.5
+ *
+ * https://github.com/conversejs/Backbone.browserStorage
+ */
+
+
+
+
+
+function S4() {
+    // Generate four random hex digits.
+    return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
+}
+
+function guid() {
+    // Generate a pseudo-GUID by concatenating random hexadecimal.
+    return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
+}
+
+
+class backbone_browserStorage_BrowserStorage {
+
+    constructor (name, type) {
+        if (type === 'local' && !window.localStorage ) {
+            throw new Error("Backbone.browserStorage: Environment does not support localStorage.");
+        } else if (type === 'session' && !window.sessionStorage ) {
+            throw new Error("Backbone.browserStorage: Environment does not support sessionStorage.");
+        }
+        if (Object(lodash["isString"])(type)) {
+            this.storeInitialized = this.initStore(type);
+        } else {
+            this.store = type;
+            this.storeInitialized = Promise.resolve();
+        }
+        this.name = name;
+    }
+
+    async initStore (type) {
+        if (type === 'session') {
+            localforage["setDriver"](drivers_sessionStorage._driver);
+        } else if (type === 'local') {
+            await localforage["config"]({'driver': localforage["LOCALSTORAGE"]});
+        } else if (type !== 'indexed') {
+            throw new Error("Backbone.browserStorage: No storage type was specified");
+        }
+        this.store = localforage;
+    }
+
+    async clear () {
+        await this.store.removeItem(this.name).catch(e => console.error(e));
+        const re = new RegExp(`^${this.name}-`);
+        const keys = await this.store.keys();
+        const removed_keys = keys.filter(k => re.test(k));
+        await Promise.all(removed_keys.map(k => this.store.removeItem(k).catch(e => console.error(e))));
+    }
+
+    sync (name) {
+        const that = this;
+
+        async function localSync (method, model, options) {
+            let resp, errorMessage, promise, new_attributes;
+
+            // We get the collection (and if necessary the model attribute.
+            // Waiting for storeInitialized will cause another iteration of
+            // the event loop, after which the collection reference will
+            // be removed from the model.
+            const collection = model.collection;
+            if (['patch', 'update'].includes(method)) {
+                new_attributes = Object(lodash["cloneDeep"])(model.attributes);
+            }
+            await that.storeInitialized;
+            try {
+                const original_attributes = model.attributes;
+                switch (method) {
+                    case "read":
+                        if (model.id !== undefined) {
+                            resp = await that.find(model);
+                        } else {
+                            resp = await that.findAll();
+                        }
+                        break;
+                    case "create":
+                        resp = await that.create(model, options);
+                        break;
+                    case 'patch':
+                    case "update":
+                        if (options.wait) {
+                            // When `wait` is set to true, Backbone waits until
+                            // confirmation of storage before setting the values on
+                            // the model.
+                            // However, the new attributes needs to be sent, so it
+                            // sets them manually on the model and then removes
+                            // them after calling `sync`.
+                            // Because our `sync` method is asynchronous and we
+                            // wait for `storeInitialized`, the attributes are
+                            // already restored once we get here, so we need to do
+                            // the attributes dance again.
+                            model.attributes = new_attributes;
+                        }
+                        promise = that.update(model, options);
+                        if (options.wait) {
+                            model.attributes = original_attributes;
+                        }
+                        resp = await promise;
+                        break;
+                    case "delete":
+                        resp = await that.destroy(model, collection);
+                        break;
+                }
+            } catch (error) {
+                if (error.code === 22 && that.getStorageSize() === 0) {
+                    errorMessage = "Private browsing is unsupported";
+                } else {
+                    errorMessage = error.message;
+                }
+            }
+
+            if (resp) {
+                if (options && options.success) {
+                    // When storing, we don't pass back the response (which is
+                    // the set attributes returned from localforage because
+                    // Backbone sets them again on the model and due to the async
+                    // nature of localforage it can cause stale attributes to be
+                    // set on a model after it's been updated in the meantime.
+                    const data = (method === "read") ? resp : null;
+                    options.success(data, options);
+                }
+            } else {
+                errorMessage = errorMessage ? errorMessage : "Record Not Found";
+                if (options && options.error) {
+                    options.error(errorMessage);
+                }
+            }
+        }
+        localSync.__name__ = 'localSync';
+        return localSync;
+    }
+
+    removeCollectionReference (model, collection) {
+        if (!collection) {
+            return;
+        }
+        const ids = collection
+            .filter(m => (m.id !== model.id))
+            .map(m => this.getItemName(m.id));
+
+        return this.store.setItem(this.name, ids);
+    }
+
+    addCollectionReference (model, collection) {
+        if (!collection) {
+            return;
+        }
+        const ids = collection.map(m => this.getItemName(m.id));
+        const new_id = this.getItemName(model.id);
+        if (!ids.includes(new_id)) {
+            ids.push(new_id);
+        }
+        return this.store.setItem(this.name, ids);
+    }
+
+    async save (model, options={}) {
+        const key = this.getItemName(model.id);
+        const data = await this.store.setItem(key, model.toJSON());
+        await this.addCollectionReference(model, model.collection);
+        return data;
+    }
+
+    create (model, options) {
+        /* Add a model, giving it a (hopefully)-unique GUID, if it doesn't already
+         * have an id of it's own.
+         */
+        if (!model.id) {
+            model.id = guid();
+            model.set(model.idAttribute, model.id, options);
+        }
+        return this.save(model);
+    }
+
+    update (model, options) {
+        return this.save(model, options);
+    }
+
+    find (model) {
+        return this.store.getItem(this.getItemName(model.id));
+    }
+
+    async findAll () {
+        /* Return the array of all models currently in storage.
+         */
+        const data = await this.store.getItem(this.name);
+        if (data && data.length) {
+            return Promise.all(data.map(item => this.store.getItem(item)));
+        }
+        return [];
+    }
+
+    async destroy (model, collection) {
+        await this.store.removeItem(this.getItemName(model.id));
+        await this.removeCollectionReference(model, collection);
+        return model;
+    }
+
+    getStorageSize () {
+        return this.store.length;
+    }
+
+    getItemName (id) {
+        return this.name+"-"+id;
+    }
+}
+
+backbone_browserStorage_BrowserStorage.sessionStorageInitialized = localforage["defineDriver"](drivers_sessionStorage);
+backbone_browserStorage_BrowserStorage.localForage = localforage;
+
+backbone_browserStorage_BrowserStorage.patch = function (Backbone) {
+    Backbone.BrowserStorage = backbone_browserStorage_BrowserStorage;
+    Backbone.ajaxSync = Backbone.sync;
+
+    Backbone.getSyncMethod = function (model) {
+        const store = Object(lodash["result"])(model, 'browserStorage') || Object(lodash["result"])(model.collection, 'browserStorage');
+        return store ? store.sync() : Backbone.ajaxSync;
+    };
+
+    Backbone.sync = function (method, model, options) {
+        return Backbone.getSyncMethod(model).apply(this, [method, model, options]);
+    };
+}
+/* harmony default export */ var backbone_browserStorage = (backbone_browserStorage_BrowserStorage);
+
+// EXTERNAL MODULE: ./src/headless/lodash.noconflict.js
+var lodash_noconflict = __webpack_require__(2);
+var lodash_noconflict_default = /*#__PURE__*/__webpack_require__.n(lodash_noconflict);
+
+// EXTERNAL MODULE: ./node_modules/dayjs/plugin/advancedFormat.js
+var advancedFormat = __webpack_require__(114);
+var advancedFormat_default = /*#__PURE__*/__webpack_require__.n(advancedFormat);
+
+// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js
+var dayjs_min = __webpack_require__(7);
+var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
+
+// EXTERNAL MODULE: ./node_modules/jed/jed.js
+var jed = __webpack_require__(45);
+var jed_default = /*#__PURE__*/__webpack_require__.n(jed);
+
+// CONCATENATED MODULE: ./src/headless/i18n.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// This is the internationalization module.
+//
+// Copyright (c) 2013-2017, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+
+
+function detectLocale(library_check) {
+  /* Determine which locale is supported by the user's system as well
+   * as by the relevant library (e.g. converse.js or dayjs).
+   * @param { Function } library_check - Returns a boolean indicating whether
+   *   the locale is supported.
+   */
+  var locale, i;
+
+  if (window.navigator.userLanguage) {
+    locale = isLocaleAvailable(window.navigator.userLanguage, library_check);
+  }
+
+  if (window.navigator.languages && !locale) {
+    for (i = 0; i < window.navigator.languages.length && !locale; i++) {
+      locale = isLocaleAvailable(window.navigator.languages[i], library_check);
+    }
+  }
+
+  if (window.navigator.browserLanguage && !locale) {
+    locale = isLocaleAvailable(window.navigator.browserLanguage, library_check);
+  }
+
+  if (window.navigator.language && !locale) {
+    locale = isLocaleAvailable(window.navigator.language, library_check);
+  }
+
+  if (window.navigator.systemLanguage && !locale) {
+    locale = isLocaleAvailable(window.navigator.systemLanguage, library_check);
+  }
+
+  return locale || 'en';
+}
+
+function isConverseLocale(locale, supported_locales) {
+  return typeof locale === 'string' && supported_locales.includes(locale);
+}
+
+function getLocale(preferred_locale, isSupportedByLibrary) {
+  if (typeof preferred_locale === 'string') {
+    if (preferred_locale === 'en' || isSupportedByLibrary(preferred_locale)) {
+      return preferred_locale;
+    }
+  }
+
+  return detectLocale(isSupportedByLibrary) || 'en';
+}
+/* Check whether the locale or sub locale (e.g. en-US, en) is supported.
+ * @param { String } locale - The locale to check for
+ * @param { Function } available - Returns a boolean indicating whether the locale is supported
+ */
+
+
+function isLocaleAvailable(locale, available) {
+  if (available(locale)) {
+    return locale;
+  } else {
+    var sublocale = locale.split("-")[0];
+
+    if (sublocale !== locale && available(sublocale)) {
+      return sublocale;
+    }
+  }
+}
+
+let jed_instance;
+/**
+ * @namespace i18n
+ */
+
+/* harmony default export */ var i18n = ({
+  getLocale(preferred_locale, available_locales) {
+    return getLocale(preferred_locale, preferred => isConverseLocale(preferred, available_locales));
+  },
+
+  translate(str) {
+    if (!jed_instance) {
+      return jed_default.a.sprintf.apply(jed_default.a, arguments);
+    }
+
+    const t = jed_instance.translate(str);
+
+    if (arguments.length > 1) {
+      return t.fetch.apply(t, [].slice.call(arguments, 1));
+    } else {
+      return t.fetch();
+    }
+  },
+
+  /**
+   * Fetch the translations for the given local at the given URL.
+   * @private
+   * @method i18n#fetchTranslations
+   * @param { _converse }
+   */
+  async fetchTranslations(_converse) {
+    const locale = _converse.locale;
+
+    if (!isConverseLocale(locale, _converse.locales) || locale === 'en') {
+      return;
+    }
+
+    const {
+      default: data
+    } = await __webpack_require__(331)("./".concat(locale, "/LC_MESSAGES/converse.po"));
+    await __webpack_require__(332)("./".concat(locale.toLowerCase().replace('_', '-')));
+    dayjs_min_default.a.locale(getLocale(_converse.locale, l => dayjs_min_default.a.locale(l)));
+    jed_instance = new jed_default.a(data);
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/log.js
+
+const LEVELS = {
+  'debug': 0,
+  'info': 1,
+  'warn': 2,
+  'error': 3,
+  'fatal': 4
+};
+const logger = Object.assign({
+  'debug': Object(lodash["get"])(console, 'log') ? console.log.bind(console) : function noop() {},
+  'error': Object(lodash["get"])(console, 'log') ? console.log.bind(console) : function noop() {},
+  'info': Object(lodash["get"])(console, 'log') ? console.log.bind(console) : function noop() {},
+  'warn': Object(lodash["get"])(console, 'log') ? console.log.bind(console) : function noop() {}
+}, console);
+/**
+ * The log namespace
+ * @namespace log
+ */
+
+const log = {
+  /**
+   * The the log-level, which determines how verbose the logging is.
+   * @method log#setLogLevel
+   * @param { integer } level - The loglevel which allows for filtering of log messages
+   */
+  setLogLevel(level) {
+    if (!['debug', 'info', 'warn', 'error', 'fatal'].includes(level)) {
+      throw new Error("Invalid loglevel: ".concat(level));
+    }
+
+    this.loglevel = level;
+  },
+
+  /**
+   * Logs messages to the browser's developer console.
+   * Available loglevels are 0 for 'debug', 1 for 'info', 2 for 'warn',
+   * 3 for 'error' and 4 for 'fatal'.
+   * When using the 'error' or 'warn' loglevels, a full stacktrace will be
+   * logged as well.
+   * @method log#log
+   * @param { string } message - The message to be logged
+   * @param { integer } level - The loglevel which allows for filtering of log messages
+   */
+  log(message, level) {
+    let style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
+
+    if (LEVELS[level] < LEVELS[this.loglevel]) {
+      return;
+    }
+
+    if (level === 'error' || level === 'fatal') {
+      style = style || 'color: maroon';
+    } else if (level === 'debug') {
+      style = style || 'color: green';
+    }
+
+    if (message instanceof Error) {
+      message = message.stack;
+    } else if (Object(lodash["isElement"])(message)) {
+      message = message.outerHTML;
+    }
+
+    const prefix = style ? '%c' : '';
+
+    if (level === 'error') {
+      logger.error("".concat(prefix, " ERROR: ").concat(message), style);
+    } else if (level === 'warn') {
+      logger.warn("".concat(prefix, " ").concat(new Date().toISOString(), " WARNING: ").concat(message), style);
+    } else if (level === 'fatal') {
+      logger.error("".concat(prefix, " FATAL: ").concat(message), style);
+    } else if (level === 'debug') {
+      logger.debug("".concat(prefix, " ").concat(new Date().toISOString(), " DEBUG: ").concat(message), style);
+    } else {
+      logger.info("".concat(prefix, " ").concat(new Date().toISOString(), " INFO: ").concat(message), style);
+    }
+  },
+
+  debug(message, style) {
+    this.log(message, 'debug', style);
+  },
+
+  error(message, style) {
+    this.log(message, 'error', style);
+  },
+
+  info(message, style) {
+    this.log(message, 'info', style);
+  },
+
+  warn(message, style) {
+    this.log(message, 'warn', style);
+  },
+
+  fatal(message, style) {
+    this.log(message, 'fatal', style);
+  }
+
+};
+/* harmony default export */ var headless_log = (log);
+// EXTERNAL MODULE: ./node_modules/lodash/drop.js
+var drop = __webpack_require__(115);
+var drop_default = /*#__PURE__*/__webpack_require__.n(drop);
+
+// EXTERNAL MODULE: ./node_modules/lodash/each.js
+var each = __webpack_require__(25);
+var each_default = /*#__PURE__*/__webpack_require__.n(each);
+
+// EXTERNAL MODULE: ./node_modules/lodash/extend.js
+var extend = __webpack_require__(26);
+var extend_default = /*#__PURE__*/__webpack_require__.n(extend);
+
+// EXTERNAL MODULE: ./node_modules/lodash/includes.js
+var includes = __webpack_require__(21);
+var includes_default = /*#__PURE__*/__webpack_require__.n(includes);
+
+// EXTERNAL MODULE: ./node_modules/lodash/isBoolean.js
+var isBoolean = __webpack_require__(116);
+var isBoolean_default = /*#__PURE__*/__webpack_require__.n(isBoolean);
+
+// EXTERNAL MODULE: ./node_modules/lodash/isFunction.js
+var isFunction = __webpack_require__(40);
+var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction);
+
+// EXTERNAL MODULE: ./node_modules/lodash/isNil.js
+var isNil = __webpack_require__(117);
+var isNil_default = /*#__PURE__*/__webpack_require__.n(isNil);
+
+// EXTERNAL MODULE: ./node_modules/lodash/keys.js
+var lodash_keys = __webpack_require__(19);
+var keys_default = /*#__PURE__*/__webpack_require__.n(lodash_keys);
+
+// EXTERNAL MODULE: ./node_modules/lodash/partial.js
+var partial = __webpack_require__(60);
+var partial_default = /*#__PURE__*/__webpack_require__.n(partial);
+
+// EXTERNAL MODULE: ./node_modules/lodash/pickBy.js
+var pickBy = __webpack_require__(118);
+var pickBy_default = /*#__PURE__*/__webpack_require__.n(pickBy);
+
+// EXTERNAL MODULE: ./node_modules/lodash/size.js
+var size = __webpack_require__(119);
+var size_default = /*#__PURE__*/__webpack_require__.n(size);
+
+// EXTERNAL MODULE: ./node_modules/lodash/values.js
+var lodash_values = __webpack_require__(59);
+var values_default = /*#__PURE__*/__webpack_require__.n(lodash_values);
+
+// CONCATENATED MODULE: ./node_modules/pluggable.js/src/pluggable.js
+/*
+       ____  __                        __    __         _
+      / __ \/ /_  __ ___   ___  ____ _/ /_  / /__      (_)____
+     / /_/ / / / / / __ \/ __ \/ __/ / __ \/ / _ \    / / ___/
+    / ____/ / /_/ / /_/ / /_/ / /_/ / /_/ / /  __/   / (__  )
+   /_/   /_/\__,_/\__, /\__, /\__/_/_.___/_/\___(_)_/ /____/
+                 /____//____/                    /___/
+ */
+
+// Pluggable.js lets you to make your Javascript code pluggable while still
+// keeping sensitive objects and data private through closures.
+
+/*global console */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// The `PluginSocket` class contains the plugin architecture, and gets
+// created whenever `pluggable.enable(obj);` is called on the object
+// that you want to make pluggable.
+// You can also see it as the thing into which the plugins are plugged.
+// It takes two parameters, first, the object being made pluggable, and
+// then the name by which the pluggable object may be referenced on the
+// __super__ object (inside overrides).
+function PluginSocket (plugged, name) {
+    this.name = name;
+    this.plugged = plugged;
+    if (typeof this.plugged.__super__ === 'undefined') {
+        this.plugged.__super__ = {};
+    } else if (typeof this.plugged.__super__ === 'string') {
+        this.plugged.__super__ = { '__string__': this.plugged.__super__ };
+    }
+    this.plugged.__super__[name] = this.plugged;
+    this.plugins = {};
+    this.initialized_plugins = [];
+}
+
+// Now we add methods to the PluginSocket by adding them to its
+// prototype.
+extend_default()(PluginSocket.prototype, {
+
+    // `wrappedOverride` creates a partially applied wrapper function
+    // that makes sure to set the proper super method when the
+    // overriding method is called. This is done to enable
+    // chaining of plugin methods, all the way up to the
+    // original method.
+    wrappedOverride: function (key, value, super_method, default_super) {
+        if (typeof super_method === "function") {
+            if (typeof this.__super__ === "undefined") {
+                /* We're not on the context of the plugged object.
+                 * This can happen when the overridden method is called via
+                 * an event handler or when it's a constructor.
+                 *
+                 * In this case, we simply tack on the  __super__ obj.
+                 */
+                this.__super__ = default_super;
+            }
+            this.__super__[key] = super_method.bind(this);
+        }
+        return value.apply(this, drop_default()(arguments, 4));
+    },
+
+    // `_overrideAttribute` overrides an attribute on the original object
+    // (the thing being plugged into).
+    //
+    // If the attribute being overridden is a function, then the original
+    // function will still be available via the `__super__` attribute.
+    //
+    // If the same function is being overridden multiple times, then
+    // the original function will be available at the end of a chain of
+    // functions, starting from the most recent override, all the way
+    // back to the original function, each being referenced by the
+    // previous' __super__ attribute.
+    //
+    // For example:
+    //
+    // `plugin2.MyFunc.__super__.myFunc => plugin1.MyFunc.__super__.myFunc => original.myFunc`
+    _overrideAttribute: function (key, plugin) {
+        let value = plugin.overrides[key];
+        if (typeof value === "function") {
+            let default_super = {};
+            default_super[this.name] = this.plugged;
+
+            let wrapped_function = partial_default()(
+                this.wrappedOverride, key, value, this.plugged[key],  default_super
+            );
+            this.plugged[key] = wrapped_function;
+        } else {
+            this.plugged[key] = value;
+        }
+    },
+
+    _extendObject: function (obj, attributes) {
+        if (!obj.prototype.__super__) {
+            obj.prototype.__super__ = {};
+            obj.prototype.__super__[this.name] = this.plugged;
+        }
+        let that = this;
+        each_default()(attributes, function (value, key) {
+            if (key === 'events') {
+                obj.prototype[key] = extend_default()(value, obj.prototype[key]);
+            } else if (typeof value === 'function') {
+                // We create a partially applied wrapper function, that
+                // makes sure to set the proper super method when the
+                // overriding method is called. This is done to enable
+                // chaining of plugin methods, all the way up to the
+                // original method.
+                let default_super = {};
+                default_super[that.name] = that.plugged;
+
+                let wrapped_function = partial_default()(
+                    that.wrappedOverride, key, value, obj.prototype[key], default_super
+                );
+                obj.prototype[key] = wrapped_function;
+            } else {
+                obj.prototype[key] = value;
+            }
+        });
+    },
+
+    // Plugins can specify dependencies (by means of the
+    // `dependencies` list attribute) which refers to dependencies
+    // which will be initialized first, before the plugin itself gets initialized.
+    //
+    // If `strict_plugin_dependencies` is set to `false` (on the object being
+    // made pluggable), then no error will be thrown if any of these plugins aren't
+    // available.
+    loadPluginDependencies: function (plugin) {
+        each_default()(plugin.dependencies, (name) => {
+            let dep = this.plugins[name];
+            if (dep) {
+                if (includes_default()(dep.dependencies, plugin.__name__)) {
+                    /* FIXME: circular dependency checking is only one level deep. */
+                    throw "Found a circular dependency between the plugins \""+
+                        plugin.__name__+"\" and \""+name+"\"";
+                }
+                this.initializePlugin(dep);
+            } else {
+                this.throwUndefinedDependencyError(
+                    "Could not find dependency \""+name+"\" "+
+                    "for the plugin \""+plugin.__name__+"\". "+
+                    "If it's needed, make sure it's loaded by require.js");
+            }
+        });
+    },
+
+    throwUndefinedDependencyError: function (msg) {
+        if (this.plugged.strict_plugin_dependencies) {
+            throw msg;
+        } else {
+            if (console.warn) {
+                console.warn(msg);
+            } else {
+                console.log(msg);
+            }
+        }
+    },
+
+    // `applyOverrides` is called by initializePlugin. It applies any
+    // and all overrides of methods or Backbone views and models that
+    // are defined on any of the plugins.
+    applyOverrides: function (plugin) {
+        each_default()(Object.keys(plugin.overrides || {}), (key) => {
+            let override = plugin.overrides[key];
+            if (typeof override === "object") {
+                if (typeof this.plugged[key] === 'undefined') {
+                    this.throwUndefinedDependencyError(
+                        `Plugin "${plugin.__name__}" tried to override "${key}" but it's not found.`);
+                } else {
+                    this._extendObject(this.plugged[key], override);
+                }
+            } else {
+                this._overrideAttribute(key, plugin);
+            }
+        });
+    },
+
+    // `initializePlugin` applies the overrides (if any) defined on all
+    // the registered plugins and then calls the initialize method of the plugin
+    initializePlugin: function (plugin) {
+        if (!includes_default()(keys_default()(this.allowed_plugins), plugin.__name__)) {
+            /* Don't initialize disallowed plugins. */
+            return;
+        }
+        if (includes_default()(this.initialized_plugins, plugin.__name__)) {
+            /* Don't initialize plugins twice, otherwise we get
+            * infinite recursion in overridden methods.
+            */
+            return;
+        }
+        if (isBoolean_default()(plugin.enabled) && plugin.enabled ||
+            isFunction_default()(plugin.enabled) && plugin.enabled(this.plugged) ||
+            isNil_default()(plugin.enabled)) {
+
+            extend_default()(plugin, this.properties);
+            if (plugin.dependencies) {
+                this.loadPluginDependencies(plugin);
+            }
+            this.applyOverrides(plugin);
+            if (typeof plugin.initialize === "function") {
+                plugin.initialize.bind(plugin)(this);
+            }
+            this.initialized_plugins.push(plugin.__name__);
+        }
+    },
+
+    // `registerPlugin` registers (or inserts, if you'd like) a plugin,
+    // by adding it to the `plugins` map on the PluginSocket instance.
+    registerPlugin: function (name, plugin) {
+        if (name in this.plugins) {
+            throw new Error('Error: Plugin name '+name+' is already taken');
+        }
+        plugin.__name__ = name;
+        this.plugins[name] = plugin;
+    },
+
+    // `initializePlugins` should get called once all plugins have been
+    // registered. It will then iterate through all the plugins, calling
+    // `initializePlugin` for each.
+    // The passed in  properties variable is an object with attributes and methods
+    // which will be attached to the plugins.
+    initializePlugins: function (properties={}, whitelist=[], blacklist=[]) {
+        if (!size_default()(this.plugins)) {
+            return;
+        }
+        this.properties = properties;
+        this.allowed_plugins  = pickBy_default()(this.plugins,
+            function (plugin, key) {
+                return (!whitelist.length || (whitelist.length && includes_default()(whitelist, key))) &&
+                    !includes_default()(blacklist, key);
+            }
+        );
+        each_default()(values_default()(this.allowed_plugins), this.initializePlugin.bind(this));
+    }
+});
+
+function enable (object, name, attrname) {
+    // Call the `enable` method to make an object pluggable
+    //
+    // It takes three parameters:
+    // - `object`: The object that gets made pluggable.
+    // - `name`: The string name by which the now pluggable object
+    //     may be referenced on the __super__ obj (in overrides).
+    //     The default value is "plugged".
+    // - `attrname`: The string name of the attribute on the now
+    //     pluggable object, which refers to the PluginSocket instance
+    //     that gets created.
+    if (typeof attrname === "undefined") {
+        attrname = "pluginSocket";
+    }
+    if (typeof name === 'undefined') {
+        name = 'plugged';
+    }
+    let ref = {};
+    ref[attrname] = new PluginSocket(object, name);
+    return extend_default()(object, ref);
+}
+
+
+/* harmony default export */ var pluggable = ({
+    enable
+});
+
+// EXTERNAL MODULE: ./node_modules/sizzle/dist/sizzle.js
+var sizzle = __webpack_require__(3);
+var sizzle_default = /*#__PURE__*/__webpack_require__.n(sizzle);
+
+// CONCATENATED MODULE: ./src/headless/utils/core.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// This is the utilities module.
+//
+// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+
+
+
+
+const core_Strophe = core.Strophe;
+/**
+ * The utils object
+ * @namespace u
+ */
+
+const u = {};
+
+u.isTagEqual = function (stanza, name) {
+  if (stanza.nodeTree) {
+    return u.isTagEqual(stanza.nodeTree, name);
+  } else if (!(stanza instanceof Element)) {
+    throw Error("isTagEqual called with value which isn't " + "an element or Strophe.Builder instance");
+  } else {
+    return core_Strophe.isTagEqual(stanza, name);
+  }
+};
+
+const parser = new DOMParser();
+const parserErrorNS = parser.parseFromString('invalid', 'text/xml').getElementsByTagName("parsererror")[0].namespaceURI;
+
+u.toStanza = function (string) {
+  const node = parser.parseFromString(string, "text/xml");
+
+  if (node.getElementsByTagNameNS(parserErrorNS, 'parsererror').length) {
+    throw new Error("Parser Error: ".concat(string));
+  }
+
+  return node.firstElementChild;
+};
+
+u.isMAMMessage = function (stanza) {
+  return sizzle_default()("message > result[xmlns=\"".concat(core_Strophe.NS.MAM, "\"]"), stanza).length > 0;
+};
+
+u.isCarbonMessage = function (stanza) {
+  const xmlns = core_Strophe.NS.CARBONS;
+  return sizzle_default()("message > received[xmlns=\"".concat(xmlns, "\"]"), stanza).length > 0 || sizzle_default()("message > sent[xmlns=\"".concat(xmlns, "\"]"), stanza).length > 0;
+};
+
+u.getLongestSubstring = function (string, candidates) {
+  function reducer(accumulator, current_value) {
+    if (string.startsWith(current_value)) {
+      if (current_value.length > accumulator.length) {
+        return current_value;
+      } else {
+        return accumulator;
+      }
+    } else {
+      return accumulator;
+    }
+  }
+
+  return candidates.reduce(reducer, '');
+};
+
+u.prefixMentions = function (message) {
+  /* Given a message object, return its text with @ chars
+   * inserted before the mentioned nicknames.
+   */
+  let text = message.get('message');
+  (message.get('references') || []).sort((a, b) => b.begin - a.begin).forEach(ref => {
+    text = "".concat(text.slice(0, ref.begin), "@").concat(text.slice(ref.begin));
+  });
+  return text;
+};
+
+u.isValidJID = function (jid) {
+  if (lodash_noconflict_default.a.isString(jid)) {
+    return lodash_noconflict_default.a.compact(jid.split('@')).length === 2 && !jid.startsWith('@') && !jid.endsWith('@');
+  }
+
+  return false;
+};
+
+u.isValidMUCJID = function (jid) {
+  return !jid.startsWith('@') && !jid.endsWith('@');
+};
+
+u.isSameBareJID = function (jid1, jid2) {
+  if (!lodash_noconflict_default.a.isString(jid1) || !lodash_noconflict_default.a.isString(jid2)) {
+    return false;
+  }
+
+  return core_Strophe.getBareJidFromJid(jid1).toLowerCase() === core_Strophe.getBareJidFromJid(jid2).toLowerCase();
+};
+
+u.isSameDomain = function (jid1, jid2) {
+  if (!lodash_noconflict_default.a.isString(jid1) || !lodash_noconflict_default.a.isString(jid2)) {
+    return false;
+  }
+
+  return core_Strophe.getDomainFromJid(jid1).toLowerCase() === core_Strophe.getDomainFromJid(jid2).toLowerCase();
+};
+
+u.isNewMessage = function (message) {
+  /* Given a stanza, determine whether it's a new
+   * message, i.e. not a MAM archived one.
+   */
+  if (message instanceof Element) {
+    return !(sizzle_default()("result[xmlns=\"".concat(core_Strophe.NS.MAM, "\"]"), message).length && sizzle_default()("delay[xmlns=\"".concat(core_Strophe.NS.DELAY, "\"]"), message).length);
+  } else if (message instanceof backbone_default.a.Model) {
+    message = message.attributes;
+  }
+
+  return !(message['is_delayed'] && message['is_archived']);
+};
+
+u.isEmptyMessage = function (attrs) {
+  if (attrs instanceof backbone_default.a.Model) {
+    attrs = attrs.attributes;
+  }
+
+  return !attrs['oob_url'] && !attrs['file'] && !(attrs['is_encrypted'] && attrs['plaintext']) && !attrs['message'];
+};
+
+u.isOnlyChatStateNotification = function (msg) {
+  if (msg instanceof Element) {
+    // See XEP-0085 Chat State Notification
+    return msg.querySelector('body') === null && (msg.querySelector('active') !== null || msg.querySelector('composing') !== null || msg.querySelector('inactive') !== null || msg.querySelector('paused') !== null || msg.querySelector('gone') !== null);
+  }
+
+  if (msg instanceof backbone_default.a.Model) {
+    msg = msg.attributes;
+  }
+
+  return msg['chat_state'] && u.isEmptyMessage(msg);
+};
+
+u.isOnlyMessageDeliveryReceipt = function (msg) {
+  if (msg instanceof Element) {
+    // See XEP-0184 Message Delivery Receipts
+    return msg.querySelector('body') === null && msg.querySelector('received') !== null;
+  }
+
+  if (msg instanceof backbone_default.a.Model) {
+    msg = msg.attributes;
+  }
+
+  return msg['received'] && u.isEmptyMessage(msg);
+};
+
+u.isChatRoom = function (model) {
+  return model && model.get('type') === 'chatroom';
+};
+
+u.isHeadlineMessage = function (_converse, message) {
+  const from_jid = message.getAttribute('from');
+
+  if (message.getAttribute('type') === 'headline') {
+    return true;
+  }
+
+  const chatbox = _converse.chatboxes.get(core_Strophe.getBareJidFromJid(from_jid));
+
+  if (u.isChatRoom(chatbox)) {
+    return false;
+  }
+
+  if (message.getAttribute('type') !== 'error' && from_jid && !lodash_noconflict_default.a.includes(from_jid, '@')) {
+    // Some servers (I'm looking at you Prosody) don't set the message
+    // type to "headline" when sending server messages. For now we
+    // check if an @ signal is included, and if not, we assume it's
+    // a headline message.
+    return true;
+  }
+
+  return false;
+};
+
+u.isErrorObject = function (o) {
+  return o instanceof Error;
+};
+
+u.isErrorStanza = function (stanza) {
+  if (!lodash_noconflict_default.a.isElement(stanza)) {
+    return false;
+  }
+
+  return stanza.getAttribute('type') === 'error';
+};
+
+u.isForbiddenError = function (stanza) {
+  if (!lodash_noconflict_default.a.isElement(stanza)) {
+    return false;
+  }
+
+  return sizzle_default()("error[type=\"auth\"] forbidden[xmlns=\"".concat(core_Strophe.NS.STANZAS, "\"]"), stanza).length > 0;
+};
+
+u.isServiceUnavailableError = function (stanza) {
+  if (!lodash_noconflict_default.a.isElement(stanza)) {
+    return false;
+  }
+
+  return sizzle_default()("error[type=\"cancel\"] service-unavailable[xmlns=\"".concat(core_Strophe.NS.STANZAS, "\"]"), stanza).length > 0;
+};
+
+u.merge = function merge(first, second) {
+  /* Merge the second object into the first one.
+   */
+  for (var k in second) {
+    if (lodash_noconflict_default.a.isObject(first[k])) {
+      merge(first[k], second[k]);
+    } else {
+      first[k] = second[k];
+    }
+  }
+};
+
+u.applyUserSettings = function applyUserSettings(context, settings, user_settings) {
+  /* Configuration settings might be nested objects. We only want to
+   * add settings which are whitelisted.
+   */
+  for (var k in settings) {
+    if (user_settings[k] === undefined) {
+      continue;
+    }
+
+    if (lodash_noconflict_default.a.isObject(settings[k]) && !Array.isArray(settings[k])) {
+      applyUserSettings(context[k], settings[k], user_settings[k]);
+    } else {
+      context[k] = user_settings[k];
+    }
+  }
+};
+/**
+ * Converts an HTML string into a DOM Node.
+ * Expects that the HTML string has only one top-level element,
+ * i.e. not multiple ones.
+ * @private
+ * @method u#stringToNode
+ * @param { String } s - The HTML string
+ */
+
+
+u.stringToNode = function (s) {
+  var div = document.createElement('div');
+  div.innerHTML = s;
+  return div.firstElementChild;
+};
+
+u.getOuterWidth = function (el) {
+  let include_margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+  let width = el.offsetWidth;
+
+  if (!include_margin) {
+    return width;
+  }
+
+  const style = window.getComputedStyle(el);
+  width += parseInt(style.marginLeft ? style.marginLeft : 0, 10) + parseInt(style.marginRight ? style.marginRight : 0, 10);
+  return width;
+};
+/**
+ * Converts an HTML string into a DOM element.
+ * Expects that the HTML string has only one top-level element,
+ * i.e. not multiple ones.
+ * @private
+ * @method u#stringToElement
+ * @param { String } s - The HTML string
+ */
+
+
+u.stringToElement = function (s) {
+  var div = document.createElement('div');
+  div.innerHTML = s;
+  return div.firstElementChild;
+};
+/**
+ * Checks whether the DOM element matches the given selector.
+ * @private
+ * @method u#matchesSelector
+ * @param { DOMElement } el - The DOM element
+ * @param { String } selector - The selector
+ */
+
+
+u.matchesSelector = function (el, selector) {
+  const match = el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector;
+  return match ? match.call(el, selector) : false;
+};
+/**
+ * Returns a list of children of the DOM element that match the selector.
+ * @private
+ * @method u#queryChildren
+ * @param { DOMElement } el - the DOM element
+ * @param { String } selector - the selector they should be matched against
+ */
+
+
+u.queryChildren = function (el, selector) {
+  return Array.from(el.childNodes).filter(el => u.matchesSelector(el, selector));
+};
+
+u.contains = function (attr, query) {
+  return function (item) {
+    if (typeof attr === 'object') {
+      var value = false;
+
+      lodash_noconflict_default.a.forEach(attr, function (a) {
+        value = value || lodash_noconflict_default.a.includes(item.get(a).toLowerCase(), query.toLowerCase());
+      });
+
+      return value;
+    } else if (typeof attr === 'string') {
+      return lodash_noconflict_default.a.includes(item.get(attr).toLowerCase(), query.toLowerCase());
+    } else {
+      throw new TypeError('contains: wrong attribute type. Must be string or array.');
+    }
+  };
+};
+
+u.isOfType = function (type, item) {
+  return item.get('type') == type;
+};
+
+u.isInstance = function (type, item) {
+  return item instanceof type;
+};
+
+u.getAttribute = function (key, item) {
+  return item.get(key);
+};
+
+u.contains.not = function (attr, query) {
+  return function (item) {
+    return !u.contains(attr, query)(item);
+  };
+};
+
+u.rootContains = function (root, el) {
+  // The document element does not have the contains method in IE.
+  if (root === document && !root.contains) {
+    return document.head.contains(el) || document.body.contains(el);
+  }
+
+  return root.contains ? root.contains(el) : window.HTMLElement.prototype.contains.call(root, el);
+};
+
+u.createFragmentFromText = function (markup) {
+  /* Returns a DocumentFragment containing DOM nodes based on the
+   * passed-in markup text.
+   */
+  // http://stackoverflow.com/questions/9334645/create-node-from-markup-string
+  var frag = document.createDocumentFragment(),
+      tmp = document.createElement('body'),
+      child;
+  tmp.innerHTML = markup; // Append elements in a loop to a DocumentFragment, so that the
+  // browser does not re-render the document for each node.
+
+  while (child = tmp.firstChild) {
+    // eslint-disable-line no-cond-assign
+    frag.appendChild(child);
+  }
+
+  return frag;
+};
+
+u.isPersistableModel = function (model) {
+  return model.collection && model.collection.browserStorage;
+};
+
+u.getResolveablePromise = function () {
+  /* Returns a promise object on which `resolve` or `reject` can be
+   * called.
+   */
+  const wrapper = {
+    isResolved: false,
+    isPending: true,
+    isRejected: false
+  };
+  const promise = new Promise((resolve, reject) => {
+    wrapper.resolve = resolve;
+    wrapper.reject = reject;
+  });
+
+  lodash_noconflict_default.a.assign(promise, wrapper);
+
+  promise.then(function (v) {
+    promise.isResolved = true;
+    promise.isPending = false;
+    promise.isRejected = false;
+    return v;
+  }, function (e) {
+    promise.isResolved = false;
+    promise.isPending = false;
+    promise.isRejected = true;
+    throw e;
+  });
+  return promise;
+};
+
+u.interpolate = function (string, o) {
+  return string.replace(/{{{([^{}]*)}}}/g, (a, b) => {
+    var r = o[b];
+    return typeof r === 'string' || typeof r === 'number' ? r : a;
+  });
+};
+/**
+ * Call the callback once all the events have been triggered
+ * @private
+ * @method u#onMultipleEvents
+ * @param { Array } events: An array of objects, with keys `object` and
+ *   `event`, representing the event name and the object it's triggered upon.
+ * @param { Function } callback: The function to call once all events have
+ *    been triggered.
+ */
+
+
+u.onMultipleEvents = function () {
+  let events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+  let callback = arguments.length > 1 ? arguments[1] : undefined;
+  let triggered = [];
+
+  function handler(result) {
+    triggered.push(result);
+
+    if (events.length === triggered.length) {
+      callback(triggered);
+      triggered = [];
+    }
+  }
+
+  events.forEach(e => e.object.on(e.event, handler));
+};
+
+u.safeSave = function (model, attributes, options) {
+  if (u.isPersistableModel(model)) {
+    model.save(attributes, options);
+  } else {
+    model.set(attributes, options);
+  }
+};
+
+u.siblingIndex = function (el) {
+  /* eslint-disable no-cond-assign */
+  for (var i = 0; el = el.previousElementSibling; i++);
+
+  return i;
+};
+/**
+ * Returns the current word being written in the input element
+ * @method u#getCurrentWord
+ * @param {HTMLElement} input - The HTMLElement in which text is being entered
+ * @param {integer} [index] - An optional rightmost boundary index. If given, the text
+ *  value of the input element will only be considered up until this index.
+ * @param {string} [delineator] - An optional string delineator to
+ *  differentiate between words.
+ * @private
+ */
+
+
+u.getCurrentWord = function (input, index, delineator) {
+  if (!index) {
+    index = input.selectionEnd || undefined;
+  }
+
+  let [word] = input.value.slice(0, index).split(' ').slice(-1);
+
+  if (delineator) {
+    [word] = word.split(delineator).slice(-1);
+  }
+
+  return word;
+};
+
+u.replaceCurrentWord = function (input, new_value) {
+  const caret = input.selectionEnd || undefined,
+        current_word = lodash_noconflict_default.a.last(input.value.slice(0, caret).split(' ')),
+        value = input.value;
+
+  input.value = value.slice(0, caret - current_word.length) + "".concat(new_value, " ") + value.slice(caret);
+  input.selectionEnd = caret - current_word.length + new_value.length + 1;
+};
+
+u.triggerEvent = function (el, name) {
+  let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "Event";
+  let bubbles = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
+  let cancelable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
+  const evt = document.createEvent(type);
+  evt.initEvent(name, bubbles, cancelable);
+  el.dispatchEvent(evt);
+};
+
+u.geoUriToHttp = function (text, geouri_replacement) {
+  const regex = /geo:([\-0-9.]+),([\-0-9.]+)(?:,([\-0-9.]+))?(?:\?(.*))?/g;
+  return text.replace(regex, geouri_replacement);
+};
+
+u.httpToGeoUri = function (text, _converse) {
+  const replacement = 'geo:$1,$2';
+  return text.replace(_converse.geouri_regex, replacement);
+};
+
+u.getSelectValues = function (select) {
+  const result = [];
+  const options = select && select.options;
+
+  for (var i = 0, iLen = options.length; i < iLen; i++) {
+    const opt = options[i];
+
+    if (opt.selected) {
+      result.push(opt.value || opt.text);
+    }
+  }
+
+  return result;
+};
+
+u.formatFingerprint = function (fp) {
+  fp = fp.replace(/^05/, '');
+
+  for (let i = 1; i < 8; i++) {
+    const idx = i * 8 + i - 1;
+    fp = fp.slice(0, idx) + ' ' + fp.slice(idx);
+  }
+
+  return fp;
+};
+
+u.appendArrayBuffer = function (buffer1, buffer2) {
+  const tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);
+  tmp.set(new Uint8Array(buffer1), 0);
+  tmp.set(new Uint8Array(buffer2), buffer1.byteLength);
+  return tmp.buffer;
+};
+
+u.arrayBufferToHex = function (ab) {
+  // https://stackoverflow.com/questions/40031688/javascript-arraybuffer-to-hex#40031979
+  return Array.prototype.map.call(new Uint8Array(ab), x => ('00' + x.toString(16)).slice(-2)).join('');
+};
+
+u.arrayBufferToString = function (ab) {
+  return new TextDecoder("utf-8").decode(ab);
+};
+
+u.stringToArrayBuffer = function (string) {
+  const bytes = new TextEncoder("utf-8").encode(string);
+  return bytes.buffer;
+};
+
+u.arrayBufferToBase64 = function (ab) {
+  return btoa(new Uint8Array(ab).reduce((data, byte) => data + String.fromCharCode(byte), ''));
+};
+
+u.base64ToArrayBuffer = function (b64) {
+  const binary_string = window.atob(b64),
+        len = binary_string.length,
+        bytes = new Uint8Array(len);
+
+  for (let i = 0; i < len; i++) {
+    bytes[i] = binary_string.charCodeAt(i);
+  }
+
+  return bytes.buffer;
+};
+
+u.getRandomInt = function (max) {
+  return Math.floor(Math.random() * Math.floor(max));
+};
+
+u.placeCaretAtEnd = function (textarea) {
+  if (textarea !== document.activeElement) {
+    textarea.focus();
+  } // Double the length because Opera is inconsistent about whether a carriage return is one character or two.
+
+
+  const len = textarea.value.length * 2; // Timeout seems to be required for Blink
+
+  setTimeout(() => textarea.setSelectionRange(len, len), 1); // Scroll to the bottom, in case we're in a tall textarea
+  // (Necessary for Firefox and Chrome)
+
+  this.scrollTop = 999999;
+};
+
+u.getUniqueId = function (suffix) {
+  const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+    const r = Math.random() * 16 | 0,
+          v = c === 'x' ? r : r & 0x3 | 0x8;
+    return v.toString(16);
+  }); // We prefix the ID with letters so that it's also a valid ID for DOM elements.
+
+  if (typeof suffix === "string" || typeof suffix === "number") {
+    return "id" + uuid + ":" + suffix;
+  } else {
+    return "id" + uuid;
+  }
+};
+/**
+ * Clears the specified timeout and interval.
+ * @method u#clearTimers
+ * @param {number} timeout - Id if the timeout to clear.
+ * @param {number} interval - Id of the interval to clear.
+ * @private
+ * @copyright Simen Bekkhus 2016
+ * @license MIT
+ */
+
+
+function clearTimers(timeout, interval) {
+  clearTimeout(timeout);
+  clearInterval(interval);
+}
+/**
+ * Creates a {@link Promise} that resolves if the passed in function returns a truthy value.
+ * Rejects if it throws or does not return truthy within the given max_wait.
+ * @method u#waitUntil
+ * @param {Function} func - The function called every check_delay,
+ *  and the result of which is the resolved value of the promise.
+ * @param {number} [max_wait=300] - The time to wait before rejecting the promise.
+ * @param {number} [check_delay=3] - The time to wait before each invocation of {func}.
+ * @returns {Promise} A promise resolved with the value of func,
+ *  or rejected with the exception thrown by it or it times out.
+ * @copyright Simen Bekkhus 2016
+ * @license MIT
+ */
+
+
+u.waitUntil = function (func) {
+  let max_wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
+  let check_delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
+
+  // Run the function once without setting up any listeners in case it's already true
+  try {
+    const result = func();
+
+    if (result) {
+      return Promise.resolve(result);
+    }
+  } catch (e) {
+    return Promise.reject(e);
+  }
+
+  const promise = u.getResolveablePromise();
+
+  function checker() {
+    try {
+      const result = func();
+
+      if (result) {
+        clearTimers(max_wait_timeout, interval);
+        promise.resolve(result);
+      }
+    } catch (e) {
+      clearTimers(max_wait_timeout, interval);
+      promise.reject(e);
+    }
+  }
+
+  const interval = setInterval(checker, check_delay);
+  const max_wait_timeout = setTimeout(() => {
+    clearTimers(max_wait_timeout, interval);
+    const err_msg = 'Wait until promise timed out';
+    headless_log.error(err_msg);
+    promise.reject(new Error(err_msg));
+  }, max_wait);
+  return promise;
+};
+
+/* harmony default export */ var utils_core = (u);
+// CONCATENATED MODULE: ./src/headless/utils/stanza.js
+
+
+
+
+
+
+const stanza_Strophe = core.Strophe;
+/**
+ * The stanza utils object. Contains utility functions related to stanza
+ * processing.
+ * @namespace stanza_utils
+ */
+
+const stanza_utils = {
+  isReceipt(stanza) {
+    return sizzle_default()("received[xmlns=\"".concat(stanza_Strophe.NS.RECEIPTS, "\"]"), stanza).length > 0;
+  },
+
+  isChatMarker(stanza) {
+    return sizzle_default()("received[xmlns=\"".concat(stanza_Strophe.NS.MARKERS, "\"],\n             displayed[xmlns=\"").concat(stanza_Strophe.NS.MARKERS, "\"],\n             acknowledged[xmlns=\"").concat(stanza_Strophe.NS.MARKERS, "\"]"), stanza).length > 0;
+  },
+
+  /**
+   * Determines whether the passed in stanza represents a XEP-0313 MAM stanza
+   * @private
+   * @method stanza_utils#isArchived
+   * @param { XMLElement } stanza - The message stanza
+   * @returns { Boolean }
+   */
+  isArchived(original_stanza) {
+    return !!sizzle_default()("result[xmlns=\"".concat(stanza_Strophe.NS.MAM, "\"]"), original_stanza).pop();
+  },
+
+  /**
+   * Extract the XEP-0359 stanza IDs from the passed in stanza
+   * and return a map containing them.
+   * @private
+   * @method stanza_utils#getStanzaIDs
+   * @param { XMLElement } stanza - The message stanza
+   * @returns { Object }
+   */
+  getStanzaIDs(stanza, original_stanza) {
+    const attrs = {};
+    const stanza_ids = sizzle_default()("stanza-id[xmlns=\"".concat(stanza_Strophe.NS.SID, "\"]"), stanza);
+
+    if (stanza_ids.length) {
+      stanza_ids.forEach(s => attrs["stanza_id ".concat(s.getAttribute('by'))] = s.getAttribute('id'));
+    }
+
+    const result = sizzle_default()("message > result[xmlns=\"".concat(stanza_Strophe.NS.MAM, "\"]"), original_stanza).pop();
+
+    if (result) {
+      const by_jid = original_stanza.getAttribute('from');
+      attrs["stanza_id ".concat(by_jid)] = result.getAttribute('id');
+    }
+
+    const origin_id = sizzle_default()("origin-id[xmlns=\"".concat(stanza_Strophe.NS.SID, "\"]"), stanza).pop();
+
+    if (origin_id) {
+      attrs['origin_id'] = origin_id.getAttribute('id');
+    } // We prefer to use one of the XEP-0359 unique and stable stanza IDs
+    // as the Model id, to avoid duplicates.
+
+
+    attrs['id'] = attrs['origin_id'] || attrs["stanza_id ".concat(attrs.from)] || utils_core.getUniqueId();
+    return attrs;
+  },
+
+  /** @method stanza_utils#getModerationAttributes
+   * @param { XMLElement } stanza - The message stanza
+   * @param { XMLElement } original_stanza - The original stanza, that contains the
+   *  message stanza, if it was contained, otherwise it's the message stanza itself.
+   * @param { _converse.ChatRoom } room - The MUC in which the moderation stanza is received.
+   * @returns { Object }
+   */
+  getModerationAttributes(stanza, original_stanza, room) {
+    const fastening = sizzle_default()("apply-to[xmlns=\"".concat(stanza_Strophe.NS.FASTEN, "\"]"), stanza).pop();
+
+    if (fastening) {
+      const applies_to_id = fastening.getAttribute('id');
+      const moderated = sizzle_default()("moderated[xmlns=\"".concat(stanza_Strophe.NS.MODERATE, "\"]"), fastening).pop();
+
+      if (moderated) {
+        const retracted = sizzle_default()("retract[xmlns=\"".concat(stanza_Strophe.NS.RETRACT, "\"]"), moderated).pop();
+
+        if (retracted) {
+          const from = stanza.getAttribute('from');
+
+          if (from !== room.get('jid')) {
+            headless_log.warn("getModerationAttributes: ignore moderation stanza that's not from the MUC!");
+            headless_log.error(original_stanza);
+            return {};
+          }
+
+          return {
+            'edtiable': false,
+            'moderated': 'retracted',
+            'moderated_by': moderated.getAttribute('by'),
+            'moderated_id': applies_to_id,
+            'moderation_reason': Object(lodash["get"])(moderated.querySelector('reason'), 'textContent')
+          };
+        }
+      }
+    } else {
+      const tombstone = sizzle_default()("> moderated[xmlns=\"".concat(stanza_Strophe.NS.MODERATE, "\"]"), stanza).pop();
+
+      if (tombstone) {
+        const retracted = sizzle_default()("retracted[xmlns=\"".concat(stanza_Strophe.NS.RETRACT, "\"]"), tombstone).pop();
+
+        if (retracted) {
+          return {
+            'edtiable': false,
+            'is_tombstone': true,
+            'moderated_by': tombstone.getAttribute('by'),
+            'retracted': tombstone.getAttribute('stamp'),
+            'moderation_reason': Object(lodash["get"])(tombstone.querySelector('reason'), 'textContent')
+          };
+        }
+      }
+    }
+
+    return {};
+  },
+
+  /**
+   * @method stanza_utils#getRetractionAttributes
+   * @param { XMLElement } stanza - The message stanza
+   * @param { XMLElement } original_stanza - The original stanza, that contains the
+   *  message stanza, if it was contained, otherwise it's the message stanza itself.
+   * @returns { Object }
+   */
+  getRetractionAttributes(stanza, original_stanza) {
+    const fastening = sizzle_default()("> apply-to[xmlns=\"".concat(stanza_Strophe.NS.FASTEN, "\"]"), stanza).pop();
+
+    if (fastening) {
+      const applies_to_id = fastening.getAttribute('id');
+      const retracted = sizzle_default()("> retract[xmlns=\"".concat(stanza_Strophe.NS.RETRACT, "\"]"), fastening).pop();
+
+      if (retracted) {
+        const delay = sizzle_default()("delay[xmlns=\"".concat(stanza_Strophe.NS.DELAY, "\"]"), original_stanza).pop();
+        const time = delay ? dayjs_min_default()(delay.getAttribute('stamp')).toISOString() : new Date().toISOString();
+        return {
+          'editable': false,
+          'retracted': time,
+          'retracted_id': applies_to_id
+        };
+      }
+    } else {
+      const tombstone = sizzle_default()("> retracted[xmlns=\"".concat(stanza_Strophe.NS.RETRACT, "\"]"), stanza).pop();
+
+      if (tombstone) {
+        return {
+          'editable': false,
+          'is_tombstone': true,
+          'retracted': tombstone.getAttribute('stamp')
+        };
+      }
+    }
+
+    return {};
+  },
+
+  getReferences(stanza) {
+    const text = Object(lodash["propertyOf"])(stanza.querySelector('body'))('textContent');
+    return sizzle_default()("reference[xmlns=\"".concat(stanza_Strophe.NS.REFERENCE, "\"]"), stanza).map(ref => {
+      const begin = ref.getAttribute('begin');
+      const end = ref.getAttribute('end');
+      return {
+        'begin': begin,
+        'end': end,
+        'type': ref.getAttribute('type'),
+        'value': text.slice(begin, end),
+        'uri': ref.getAttribute('uri')
+      };
+    });
+  },
+
+  getSenderAttributes(stanza, chatbox, _converse) {
+    if (utils_core.isChatRoom(chatbox)) {
+      const from = stanza.getAttribute('from');
+      const nick = stanza_Strophe.unescapeNode(stanza_Strophe.getResourceFromJid(from));
+      return {
+        'from': from,
+        'nick': nick,
+        'sender': nick === chatbox.get('nick') ? 'me' : 'them',
+        'received': new Date().toISOString()
+      };
+    } else {
+      const from = stanza_Strophe.getBareJidFromJid(stanza.getAttribute('from'));
+
+      if (from === _converse.bare_jid) {
+        return {
+          from,
+          'sender': 'me',
+          'fullname': _converse.xmppstatus.get('fullname')
+        };
+      } else {
+        return {
+          from,
+          'sender': 'them',
+          'fullname': chatbox.get('fullname')
+        };
+      }
+    }
+  },
+
+  getSpoilerAttributes(stanza) {
+    const spoiler = sizzle_default()("spoiler[xmlns=\"".concat(stanza_Strophe.NS.SPOILER, "\"]"), stanza).pop();
+    return {
+      'is_spoiler': !!spoiler,
+      'spoiler_hint': Object(lodash["get"])(spoiler, 'textContent')
+    };
+  },
+
+  // BAO issue #9
+  getReactionAttributes(stanza) {
+    const reaction = sizzle_default()("reactions[xmlns=\"".concat(stanza_Strophe.NS.REACTION, "\"]"), stanza).pop();
+
+    if (reaction) {
+      return {
+        'reaction_id': reaction.getAttribute('id'),
+        'reaction_emoji': Object(lodash["get"])(reaction.querySelector('reaction'), 'textContent')
+      };
+    }
+
+    return {};
+  },
+
+  getOutOfBandAttributes(stanza) {
+    const xform = sizzle_default()("x[xmlns=\"".concat(stanza_Strophe.NS.OUTOFBAND, "\"]"), stanza).pop();
+
+    if (xform) {
+      return {
+        'oob_url': Object(lodash["get"])(xform.querySelector('url'), 'textContent'),
+        'oob_desc': Object(lodash["get"])(xform.querySelector('desc'), 'textContent')
+      };
+    }
+
+    return {};
+  },
+
+  getCorrectionAttributes(stanza, original_stanza) {
+    const el = sizzle_default()("replace[xmlns=\"".concat(stanza_Strophe.NS.MESSAGE_CORRECT, "\"]"), stanza).pop();
+
+    if (el) {
+      const replaced_id = el.getAttribute('id');
+      const msgid = replaced_id;
+
+      if (replaced_id) {
+        const delay = sizzle_default()("delay[xmlns=\"".concat(stanza_Strophe.NS.DELAY, "\"]"), original_stanza).pop();
+        const time = delay ? dayjs_min_default()(delay.getAttribute('stamp')).toISOString() : new Date().toISOString();
+        return {
+          msgid,
+          replaced_id,
+          'edited': time
+        };
+      }
+    }
+
+    return {};
+  },
+
+  getErrorMessage(stanza, is_muc, _converse) {
+    const {
+      __
+    } = _converse;
+
+    if (is_muc) {
+      if (sizzle_default()("forbidden[xmlns=\"".concat(stanza_Strophe.NS.STANZAS, "\"]"), stanza).length) {
+        return __("Your message was not delivered because you're not allowed to send messages in this groupchat.");
+      } else if (sizzle_default()("not-acceptable[xmlns=\"".concat(stanza_Strophe.NS.STANZAS, "\"]"), stanza).length) {
+        return __("Your message was not delivered because you're not present in the groupchat.");
+      }
+    }
+
+    const error = stanza.querySelector('error');
+    return Object(lodash["propertyOf"])(error.querySelector('text'))('textContent') || __('Sorry, an error occurred:') + ' ' + error.innerHTML;
+  },
+
+  /**
+   * Given a message stanza, return the text contained in its body.
+   * @private
+   * @method stanza_utils#getMessageBody
+   * @param { XMLElement } stanza
+   * @param { Boolean } is_muc
+   * @param { _converse } _converse
+   */
+  getMessageBody(stanza, is_muc, _converse) {
+    const type = stanza.getAttribute('type');
+
+    if (type === 'error') {
+      return stanza_utils.getErrorMessage(stanza, is_muc, _converse);
+    } else {
+      const body = stanza.querySelector('body');
+
+      if (body) {
+        return body.textContent.trim();
+      }
+    }
+  },
+
+  getChatState(stanza) {
+    return stanza.getElementsByTagName('composing').length && 'composing' || stanza.getElementsByTagName('paused').length && 'paused' || stanza.getElementsByTagName('inactive').length && 'inactive' || stanza.getElementsByTagName('active').length && 'active' || stanza.getElementsByTagName('gone').length && 'gone';
+  },
+
+  /**
+   * Parses a passed in message stanza and returns an object of attributes.
+   * @private
+   * @method stanza_utils#getMessageAttributesFromStanza
+   * @param { XMLElement } stanza - The message stanza
+   * @param { XMLElement } original_stanza - The original stanza, that contains the
+   *  message stanza, if it was contained, otherwise it's the message stanza itself.
+   * @param { _converse.ChatBox|_converse.ChatRoom } chatbox
+   * @param { _converse } _converse
+   * @returns { Object }
+   */
+  getMessageAttributesFromStanza(stanza, original_stanza, chatbox, _converse) {
+    const is_muc = utils_core.isChatRoom(chatbox);
+    let attrs = Object.assign(stanza_utils.getStanzaIDs(stanza, original_stanza), stanza_utils.getRetractionAttributes(stanza, original_stanza), is_muc ? stanza_utils.getModerationAttributes(stanza, original_stanza, chatbox) : {});
+    const text = stanza_utils.getMessageBody(stanza, is_muc, _converse) || undefined;
+    const delay = sizzle_default()("delay[xmlns=\"".concat(stanza_Strophe.NS.DELAY, "\"]"), original_stanza).pop();
+    attrs = Object.assign({
+      'chat_state': stanza_utils.getChatState(stanza),
+      'is_archived': stanza_utils.isArchived(original_stanza),
+      'is_delayed': !!delay,
+      'is_only_emojis': text ? utils_core.isOnlyEmojis(text) : false,
+      'message': text,
+      'msgid': stanza.getAttribute('id') || original_stanza.getAttribute('id'),
+      'references': stanza_utils.getReferences(stanza),
+      'subject': Object(lodash["propertyOf"])(stanza.querySelector('subject'))('textContent'),
+      'thread': Object(lodash["propertyOf"])(stanza.querySelector('thread'))('textContent'),
+      'time': delay ? dayjs_min_default()(delay.getAttribute('stamp')).toISOString() : new Date().toISOString(),
+      'type': stanza.getAttribute('type')   // BAO issue #9
+    }, attrs, stanza_utils.getSenderAttributes(stanza, chatbox, _converse), stanza_utils.getOutOfBandAttributes(stanza), stanza_utils.getSpoilerAttributes(stanza), stanza_utils.getReactionAttributes(stanza), stanza_utils.getCorrectionAttributes(stanza, original_stanza));
+    return attrs;
+  }
+
+};
+/* harmony default export */ var utils_stanza = (stanza_utils);
+// CONCATENATED MODULE: ./src/headless/converse-core.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-core
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const converse_core_Strophe = core.Strophe;
+const converse_core_$build = core.$build;
+const converse_core_$iq = core.$iq;
+const converse_core_$msg = core.$msg;
+const converse_core_$pres = core.$pres;
+Backbone = backbone_default.a.noConflict();
+backbone_browserStorage.patch(Backbone);
+dayjs_min_default.a.extend(advancedFormat_default.a); // Add Strophe Namespaces
+
+converse_core_Strophe.addNamespace('CARBONS', 'urn:xmpp:carbons:2');
+converse_core_Strophe.addNamespace('CHATSTATES', 'http://jabber.org/protocol/chatstates');
+converse_core_Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
+converse_core_Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
+converse_core_Strophe.addNamespace('FASTEN', 'urn:xmpp:fasten:0');
+converse_core_Strophe.addNamespace('FORWARD', 'urn:xmpp:forward:0');
+converse_core_Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
+converse_core_Strophe.addNamespace('HTTPUPLOAD', 'urn:xmpp:http:upload:0');
+converse_core_Strophe.addNamespace('IDLE', 'urn:xmpp:idle:1');
+converse_core_Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
+converse_core_Strophe.addNamespace('MODERATE', 'urn:xmpp:message-moderate:0');
+converse_core_Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
+converse_core_Strophe.addNamespace('OMEMO', 'eu.siacs.conversations.axolotl');
+converse_core_Strophe.addNamespace('OUTOFBAND', 'jabber:x:oob');
+converse_core_Strophe.addNamespace('REACTION', 'urn:xmpp:reactions:0'); // BAO
+converse_core_Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
+converse_core_Strophe.addNamespace('REGISTER', 'jabber:iq:register');
+converse_core_Strophe.addNamespace('RETRACT', 'urn:xmpp:message-retract:0');
+converse_core_Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
+converse_core_Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm');
+converse_core_Strophe.addNamespace('SID', 'urn:xmpp:sid:0');
+converse_core_Strophe.addNamespace('SPOILER', 'urn:xmpp:spoiler:0');
+converse_core_Strophe.addNamespace('STANZAS', 'urn:ietf:params:xml:ns:xmpp-stanzas');
+converse_core_Strophe.addNamespace('VCARD', 'vcard-temp');
+converse_core_Strophe.addNamespace('VCARDUPDATE', 'vcard-temp:x:update');
+converse_core_Strophe.addNamespace('XFORM', 'jabber:x:data'); // Use Mustache style syntax for variable interpolation
+
+/* Configuration of Lodash templates (this config is distinct to the
+ * config of requirejs-tpl in main.js). This one is for normal inline templates.
+ */
+
+lodash_noconflict_default.a.templateSettings = {
+  'escape': /\{\{\{([\s\S]+?)\}\}\}/g,
+  'evaluate': /\{\[([\s\S]+?)\]\}/g,
+  'interpolate': /\{\{([\s\S]+?)\}\}/g,
+  'imports': {
+    '_': lodash_noconflict_default.a
+  }
+}; // Setting wait to 59 instead of 60 to avoid timing conflicts with the
+// webserver, which is often also set to 60 and might therefore sometimes
+// return a 504 error page instead of passing through to the BOSH proxy.
+
+const BOSH_WAIT = 59; // Core plugins are whitelisted automatically
+// These are just the @converse/headless plugins, for the full converse,
+// the other plugins are whitelisted in src/converse.js
+
+const CORE_PLUGINS = ['converse-bookmarks', 'converse-bosh', 'converse-caps', 'converse-chatboxes', 'converse-chat', 'converse-disco', 'converse-emoji', 'converse-mam', 'converse-muc', 'converse-headlines', 'converse-ping', 'converse-pubsub', 'converse-roster', 'converse-rsm', 'converse-smacks', 'converse-status', 'converse-vcard'];
+/**
+ * A private, closured object containing the private api (via {@link _converse.api})
+ * as well as private methods and internal data-structures.
+ * @global
+ * @namespace _converse
+ */
+// Strictly speaking _converse is not a global, but we need to set it as
+// such to get JSDoc to create the correct document site strucure.
+
+const converse_core_converse = {
+  'templates': {},
+  'promises': {}
+};
+converse_core_converse.VERSION_NAME = "v6.0.0";
+Object.assign(converse_core_converse, Backbone.Events);
+converse_core_converse.Collection = Backbone.Collection.extend({
+  async clearSession() {
+    let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+    await Promise.all(Array.from(this.models).map(m => {
+      return new Promise(resolve => {
+        m.destroy(Object.assign(options, {
+          'success': resolve,
+          'error': (m, e) => {
+            headless_log.error(e);
+            resolve();
+          }
+        }));
+      });
+    }));
+    await this.browserStorage.clear();
+    this.reset();
+  }
+
+});
+/**
+ * Custom error for indicating timeouts
+ * @namespace _converse
+ */
+
+class TimeoutError extends Error {}
+
+converse_core_converse.TimeoutError = TimeoutError;
+
+class IllegalMessage extends Error {}
+
+converse_core_converse.IllegalMessage = IllegalMessage; // Make converse pluggable
+
+pluggable.enable(converse_core_converse, '_converse', 'pluggable'); // Module-level constants
+
+converse_core_converse.STATUS_WEIGHTS = {
+  'offline': 6,
+  'unavailable': 5,
+  'xa': 4,
+  'away': 3,
+  'dnd': 2,
+  'chat': 1,
+  // We currently don't differentiate between "chat" and "online"
+  'online': 1
+};
+converse_core_converse.PRETTY_CHAT_STATUS = {
+  'offline': 'Offline',
+  'unavailable': 'Unavailable',
+  'xa': 'Extended Away',
+  'away': 'Away',
+  'dnd': 'Do not disturb',
+  'chat': 'Chattty',
+  'online': 'Online'
+};
+converse_core_converse.ANONYMOUS = 'anonymous';
+converse_core_converse.CLOSED = 'closed';
+converse_core_converse.EXTERNAL = 'external';
+converse_core_converse.LOGIN = 'login';
+converse_core_converse.LOGOUT = 'logout';
+converse_core_converse.OPENED = 'opened';
+converse_core_converse.PREBIND = 'prebind';
+converse_core_converse.STANZA_TIMEOUT = 10000;
+converse_core_converse.CONNECTION_STATUS = {
+  0: 'ERROR',
+  1: 'CONNECTING',
+  2: 'CONNFAIL',
+  3: 'AUTHENTICATING',
+  4: 'AUTHFAIL',
+  5: 'CONNECTED',
+  6: 'DISCONNECTED',
+  7: 'DISCONNECTING',
+  8: 'ATTACHED',
+  9: 'REDIRECT',
+  10: 'RECONNECTING'
+};
+converse_core_converse.SUCCESS = 'success';
+converse_core_converse.FAILURE = 'failure'; // Generated from css/images/user.svg
+
+converse_core_converse.DEFAULT_IMAGE_TYPE = 'image/svg+xml';
+converse_core_converse.DEFAULT_IMAGE = "PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+CiA8cmVjdCB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgZmlsbD0iIzU1NSIvPgogPGNpcmNsZSBjeD0iNjQiIGN5PSI0MSIgcj0iMjQiIGZpbGw9IiNmZmYiLz4KIDxwYXRoIGQ9Im0yOC41IDExMiB2LTEyIGMwLTEyIDEwLTI0IDI0LTI0IGgyMyBjMTQgMCAyNCAxMiAyNCAyNCB2MTIiIGZpbGw9IiNmZmYiLz4KPC9zdmc+Cg==";
+converse_core_converse.TIMEOUTS = {
+  // Set as module attr so that we can override in tests.
+  PAUSED: 10000,
+  INACTIVE: 90000
+}; // XEP-0085 Chat states
+// https://xmpp.org/extensions/xep-0085.html
+
+converse_core_converse.INACTIVE = 'inactive';
+converse_core_converse.ACTIVE = 'active';
+converse_core_converse.COMPOSING = 'composing';
+converse_core_converse.PAUSED = 'paused';
+converse_core_converse.GONE = 'gone'; // Chat types
+
+converse_core_converse.PRIVATE_CHAT_TYPE = 'chatbox';
+converse_core_converse.CHATROOMS_TYPE = 'chatroom';
+converse_core_converse.HEADLINES_TYPE = 'headline';
+converse_core_converse.CONTROLBOX_TYPE = 'controlbox';
+converse_core_converse.default_connection_options = {
+  'explicitResourceBinding': true
+}; // Default configuration values
+// ----------------------------
+
+converse_core_converse.default_settings = {
+  allow_non_roster_messaging: false,
+  authentication: 'login',
+  // Available values are "login", "prebind", "anonymous" and "external".
+  auto_away: 0,
+  // Seconds after which user status is set to 'away'
+  auto_login: false,
+  // Currently only used in connection with anonymous login
+  auto_reconnect: true,
+  auto_xa: 0,
+  // Seconds after which user status is set to 'xa'
+  blacklisted_plugins: [],
+  connection_options: {},
+  credentials_url: null,
+  // URL from where login credentials can be fetched
+  csi_waiting_time: 0,
+  // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
+  loglevel: 'info',
+  default_state: 'online',
+  discover_connection_methods: false,
+  geouri_regex: /https\:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g,
+  geouri_replacement: 'https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2',
+  idle_presence_timeout: 300,
+  // Seconds after which an idle presence is sent
+  jid: undefined,
+  keepalive: true,
+  locales: ['af', 'ar', 'bg', 'ca', 'cs', 'de', 'eo', 'es', 'eu', 'en', 'fr', 'gl', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'nb', 'nl', 'mr', 'oc', 'pl', 'pt', 'pt_BR', 'ro', 'ru', 'tr', 'uk', 'vi', 'zh_CN', 'zh_TW'],
+  message_carbons: true,
+  nickname: undefined,
+  password: undefined,
+  persistent_store: 'localStorage',
+  priority: 0,
+  rid: undefined,
+  root: window.document,
+  sid: undefined,
+  singleton: false,
+  strict_plugin_dependencies: false,
+  trusted: true,
+  view_mode: 'overlayed',
+  // Choices are 'overlayed', 'fullscreen', 'mobile'
+  websocket_url: undefined,
+  whitelisted_plugins: []
+};
+/**
+ * Translate the given string based on the current locale.
+ * Handles all MUC presence stanzas.
+ * @method __
+ * @private
+ * @memberOf _converse
+ * @param { String } str - The string to translate
+ */
+
+converse_core_converse.__ = function (str) {
+  if (i18n === undefined) {
+    return str;
+  }
+
+  return i18n.translate.apply(i18n, arguments);
+};
+/**
+ * A no-op method which is used to signal to gettext that the passed in string
+ * should be included in the pot translation file.
+ *
+ * In contrast to the double-underscore method, the triple underscore method
+ * doesn't actually translate the strings.
+ *
+ * One reason for this method might be because we're using strings we cannot
+ * send to the translation function because they require variable interpolation
+ * and we don't yet have the variables at scan time.
+ *
+ * @method ___
+ * @private
+ * @memberOf _converse
+ * @param { String } str
+ */
+
+
+converse_core_converse.___ = function (str) {
+  return str;
+};
+
+const converse_core_ = converse_core_converse.__;
+const PROMISES = ['afterResourceBinding', 'connectionInitialized', 'initialized', 'pluginsInitialized', 'statusInitialized'];
+
+function replacePromise(name) {
+  const existing_promise = converse_core_converse.promises[name];
+
+  if (!existing_promise) {
+    throw new Error("Tried to replace non-existing promise: ".concat(name));
+  }
+
+  if (existing_promise.replace) {
+    const promise = utils_core.getResolveablePromise();
+    promise.replace = existing_promise.replace;
+    converse_core_converse.promises[name] = promise;
+  } else {
+    headless_log.debug("Not replacing promise \"".concat(name, "\""));
+  }
+}
+
+converse_core_converse.isTestEnv = function () {
+  return converse_core_Strophe.Connection.name === 'MockConnection';
+};
+
+converse_core_converse.haveResumed = function () {
+  if (converse_core_converse.api.connection.isType('bosh')) {
+    return converse_core_converse.connfeedback.get('connection_status') === converse_core_Strophe.Status.ATTACHED;
+  } else {
+    // XXX: Not binding means that the session was resumed.
+    // This seems very fragile. Perhaps a better way is possible.
+    return !converse_core_converse.connection.do_bind;
+  }
+};
+
+converse_core_converse.isUniView = function () {
+  /* We distinguish between UniView and MultiView instances.
+   *
+   * UniView means that only one chat is visible, even though there might be multiple ongoing chats.
+   * MultiView means that multiple chats may be visible simultaneously.
+   */
+  return lodash_noconflict_default.a.includes(['mobile', 'fullscreen', 'embedded'], converse_core_converse.view_mode);
+};
+
+async function initSessionStorage() {
+  await backbone_browserStorage.sessionStorageInitialized;
+  converse_core_converse.storage = {
+    'session': backbone_browserStorage.localForage.createInstance({
+      'name': converse_core_converse.isTestEnv() ? 'converse-test-session' : 'converse-session',
+      'description': 'sessionStorage instance',
+      'driver': ['sessionStorageWrapper']
+    })
+  };
+}
+
+function initPersistentStorage() {
+  if (converse_core_converse.config.get('storage') !== 'persistent') {
+    return;
+  }
+
+  const config = {
+    'name': converse_core_converse.isTestEnv() ? 'converse-test-persistent' : 'converse-persistent',
+    'storeName': converse_core_converse.bare_jid
+  };
+
+  if (converse_core_converse.persistent_store === 'localStorage') {
+    config['description'] = 'localStorage instance';
+    config['driver'] = [backbone_browserStorage.localForage.LOCALSTORAGE];
+  } else if (converse_core_converse.persistent_store === 'IndexedDB') {
+    config['description'] = 'indexedDB instance';
+    config['driver'] = [backbone_browserStorage.localForage.INDEXEDDB];
+  }
+
+  converse_core_converse.storage['persistent'] = backbone_browserStorage.localForage.createInstance(config);
+}
+
+converse_core_converse.createStore = function (id, storage) {
+  const s = converse_core_converse.storage[storage ? storage : converse_core_converse.config.get('storage')];
+  return new Backbone.BrowserStorage(id, s);
+};
+
+converse_core_converse.router = new Backbone.Router();
+
+function initPlugins() {
+  // If initialize gets called a second time (e.g. during tests), then we
+  // need to re-apply all plugins (for a new converse instance), and we
+  // therefore need to clear this array that prevents plugins from being
+  // initialized twice.
+  // If initialize is called for the first time, then this array is empty
+  // in any case.
+  converse_core_converse.pluggable.initialized_plugins = [];
+  const whitelist = CORE_PLUGINS.concat(converse_core_converse.whitelisted_plugins);
+
+  if (converse_core_converse.singleton) {
+    ['converse-bookmarks', 'converse-controlbox', 'converse-headline', 'converse-register'].forEach(name => converse_core_converse.blacklisted_plugins.push(name));
+  }
+
+  converse_core_converse.pluggable.initializePlugins({
+    '_converse': converse_core_converse
+  }, whitelist, converse_core_converse.blacklisted_plugins);
+  /**
+   * Triggered once all plugins have been initialized. This is a useful event if you want to
+   * register event handlers but would like your own handlers to be overridable by
+   * plugins. In that case, you need to first wait until all plugins have been
+   * initialized, so that their overrides are active. One example where this is used
+   * is in [converse-notifications.js](https://github.com/jcbrand/converse.js/blob/master/src/converse-notification.js)`.
+   *
+   * Also available as an [ES2015 Promise](http://es6-features.org/#PromiseUsage)
+   * which can be listened to with `_converse.api.waitUntil`.
+   *
+   * @event _converse#pluginsInitialized
+   * @memberOf _converse
+   * @example _converse.api.listen.on('pluginsInitialized', () => { ... });
+   * @example _converse.api.waitUntil('pluginsInitialized').then(() => { ... });
+   */
+
+
+  converse_core_converse.api.trigger('pluginsInitialized');
+}
+
+function initClientConfig() {
+  /* The client config refers to configuration of the client which is
+   * independent of any particular user.
+   * What this means is that config values need to persist across
+   * user sessions.
+   */
+  const id = 'converse.client-config';
+  converse_core_converse.config = new Backbone.Model({
+    'id': id,
+    'trusted': converse_core_converse.trusted && true || false,
+    'storage': converse_core_converse.trusted ? 'persistent' : 'session'
+  });
+  converse_core_converse.config.browserStorage = converse_core_converse.createStore(id, "session");
+
+  converse_core_converse.config.fetch();
+  /**
+   * Triggered once the XMPP-client configuration has been initialized.
+   * The client configuration is independent of any particular and its values
+   * persist across user sessions.
+   *
+   * @event _converse#clientConfigInitialized
+   * @example
+   * _converse.api.listen.on('clientConfigInitialized', () => { ... });
+   */
+
+
+  converse_core_converse.api.trigger('clientConfigInitialized');
+}
+
+async function tearDown() {
+  await converse_core_converse.api.trigger('beforeTearDown', {
+    'synchronous': true
+  });
+  window.removeEventListener('click', converse_core_converse.onUserActivity);
+  window.removeEventListener('focus', converse_core_converse.onUserActivity);
+  window.removeEventListener('keypress', converse_core_converse.onUserActivity);
+  window.removeEventListener('mousemove', converse_core_converse.onUserActivity);
+  window.removeEventListener(converse_core_converse.unloadevent, converse_core_converse.onUserActivity);
+  window.clearInterval(converse_core_converse.everySecondTrigger);
+
+  converse_core_converse.api.trigger('afterTearDown');
+
+  return converse_core_converse;
+}
+
+async function attemptNonPreboundSession(credentials, automatic) {
+  if (converse_core_converse.authentication === converse_core_converse.LOGIN) {
+    // XXX: If EITHER ``keepalive`` or ``auto_login`` is ``true`` and
+    // ``authentication`` is set to ``login``, then Converse will try to log the user in,
+    // since we don't have a way to distinguish between wether we're
+    // restoring a previous session (``keepalive``) or whether we're
+    // automatically setting up a new session (``auto_login``).
+    // So we can't do the check (!automatic || _converse.auto_login) here.
+    if (credentials) {
+      connect(credentials);
+    } else if (converse_core_converse.credentials_url) {
+      // We give credentials_url preference, because
+      // _converse.connection.pass might be an expired token.
+      connect((await getLoginCredentials()));
+    } else if (converse_core_converse.jid && (converse_core_converse.password || converse_core_converse.connection.pass)) {
+      connect();
+    } else if (!converse_core_converse.isTestEnv() && window.PasswordCredential) {
+      connect((await getLoginCredentialsFromBrowser()));
+    } else {
+      headless_log.warn("attemptNonPreboundSession: Could not find any credentials to log in with");
+    }
+  } else if ([converse_core_converse.ANONYMOUS, converse_core_converse.EXTERNAL].includes(converse_core_converse.authentication) && (!automatic || converse_core_converse.auto_login)) {
+    connect();
+  }
+}
+
+function connect(credentials) {
+  if ([converse_core_converse.ANONYMOUS, converse_core_converse.EXTERNAL].includes(converse_core_converse.authentication)) {
+    if (!converse_core_converse.jid) {
+      throw new Error("Config Error: when using anonymous login " + "you need to provide the server's domain via the 'jid' option. " + "Either when calling converse.initialize, or when calling " + "_converse.api.user.login.");
+    }
+
+    if (!converse_core_converse.connection.reconnecting) {
+      converse_core_converse.connection.reset();
+    }
+
+    converse_core_converse.connection.connect(converse_core_converse.jid.toLowerCase(), null, converse_core_converse.onConnectStatusChanged, BOSH_WAIT);
+  } else if (converse_core_converse.authentication === converse_core_converse.LOGIN) {
+    const password = credentials ? credentials.password : lodash_noconflict_default.a.get(converse_core_converse.connection, 'pass') || converse_core_converse.password;
+
+    if (!password) {
+      if (converse_core_converse.auto_login) {
+        throw new Error("autoLogin: If you use auto_login and " + "authentication='login' then you also need to provide a password.");
+      }
+
+      converse_core_converse.setDisconnectionCause(converse_core_Strophe.Status.AUTHFAIL, undefined, true);
+
+      converse_core_converse.api.connection.disconnect();
+
+      return;
+    }
+
+    if (!converse_core_converse.connection.reconnecting) {
+      converse_core_converse.connection.reset();
+    }
+
+    converse_core_converse.connection.connect(converse_core_converse.jid, password, converse_core_converse.onConnectStatusChanged, BOSH_WAIT);
+  }
+}
+
+async function reconnect() {
+  headless_log.debug('RECONNECTING: the connection has dropped, attempting to reconnect.');
+
+  converse_core_converse.setConnectionStatus(converse_core_Strophe.Status.RECONNECTING, converse_core_('The connection has dropped, attempting to reconnect.'));
+  /**
+   * Triggered when the connection has dropped, but Converse will attempt
+   * to reconnect again.
+   *
+   * @event _converse#will-reconnect
+   */
+
+
+  converse_core_converse.api.trigger('will-reconnect');
+
+  converse_core_converse.connection.reconnecting = true;
+  await tearDown();
+  return converse_core_converse.api.user.login();
+}
+
+const debouncedReconnect = lodash_noconflict_default.a.debounce(reconnect, 2000);
+
+converse_core_converse.shouldClearCache = () => !converse_core_converse.config.get('trusted') || converse_core_converse.isTestEnv();
+
+function clearSession() {
+  if (converse_core_converse.session !== undefined) {
+    converse_core_converse.session.destroy();
+
+    delete converse_core_converse.session;
+  }
+  /**
+   * Triggered once the user session has been cleared,
+   * for example when the user has logged out or when Converse has
+   * disconnected for some other reason.
+   * @event _converse#clearSession
+   */
+
+
+  converse_core_converse.api.trigger('clearSession');
+}
+
+async function onDomainDiscovered(response) {
+  const text = await response.text();
+  const xrd = new window.DOMParser().parseFromString(text, "text/xml").firstElementChild;
+
+  if (xrd.nodeName != "XRD" || xrd.namespaceURI != "http://docs.oasis-open.org/ns/xri/xrd-1.0") {
+    return headless_log.warn("Could not discover XEP-0156 connection methods");
+  }
+
+  const bosh_links = sizzle_default()("Link[rel=\"urn:xmpp:alt-connections:xbosh\"]", xrd);
+  const ws_links = sizzle_default()("Link[rel=\"urn:xmpp:alt-connections:websocket\"]", xrd);
+  const bosh_methods = bosh_links.map(el => el.getAttribute('href'));
+  const ws_methods = ws_links.map(el => el.getAttribute('href')); // TODO: support multiple endpoints
+
+  converse_core_converse.websocket_url = ws_methods.pop();
+  converse_core_converse.bosh_service_url = bosh_methods.pop();
+
+  if (bosh_methods.length === 0 && ws_methods.length === 0) {
+    headless_log.warn("onDomainDiscovered: neither BOSH nor WebSocket connection methods have been specified with XEP-0156.");
+  }
+}
+/* Use XEP-0156 to check whether this host advertises websocket or BOSH connection methods.
+ */
+
+
+async function discoverConnectionMethods(domain) {
+  const options = {
+    'mode': 'cors',
+    'headers': {
+      'Accept': 'application/xrd+xml, text/xml'
+    }
+  };
+  const url = "https://".concat(domain, "/.well-known/host-meta");
+  let response;
+
+  try {
+    response = await fetch(url, options);
+  } catch (e) {
+    headless_log.error("Failed to discover alternative connection methods at ".concat(url));
+    headless_log.error(e);
+    return;
+  }
+
+  if (response.status >= 200 && response.status < 400) {
+    await onDomainDiscovered(response);
+  } else {
+    headless_log.warn("Could not discover XEP-0156 connection methods");
+  }
+}
+
+converse_core_converse.initConnection = async function (domain) {
+  if (converse_core_converse.discover_connection_methods) {
+    await discoverConnectionMethods(domain);
+  }
+
+  if (!converse_core_converse.bosh_service_url) {
+    if (converse_core_converse.authentication === converse_core_converse.PREBIND) {
+      throw new Error("authentication is set to 'prebind' but we don't have a BOSH connection");
+    }
+
+    if (!converse_core_converse.websocket_url) {
+      throw new Error("initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.");
+    }
+  }
+
+  if (('WebSocket' in window || 'MozWebSocket' in window) && converse_core_converse.websocket_url) {
+    converse_core_converse.connection = new converse_core_Strophe.Connection(converse_core_converse.websocket_url, Object.assign(converse_core_converse.default_connection_options, converse_core_converse.connection_options));
+  } else if (converse_core_converse.bosh_service_url) {
+    converse_core_converse.connection = new converse_core_Strophe.Connection(converse_core_converse.bosh_service_url, Object.assign(converse_core_converse.default_connection_options, converse_core_converse.connection_options, {
+      'keepalive': converse_core_converse.keepalive
+    }));
+  } else {
+    throw new Error("initConnection: this browser does not support " + "websockets and bosh_service_url wasn't specified.");
+  }
+
+  setUpXMLLogging();
+  /**
+   * Triggered once the `Strophe.Connection` constructor has been initialized, which
+   * will be responsible for managing the connection to the XMPP server.
+   *
+   * @event _converse#connectionInitialized
+   */
+
+  converse_core_converse.api.trigger('connectionInitialized');
+};
+
+async function initSession(jid) {
+  const bare_jid = converse_core_Strophe.getBareJidFromJid(jid).toLowerCase();
+  const id = "converse.session-".concat(bare_jid);
+
+  if (!converse_core_converse.session || converse_core_converse.session.get('id') !== id) {
+    converse_core_converse.session = new Backbone.Model({
+      id
+    });
+    converse_core_converse.session.browserStorage = converse_core_converse.createStore(id, "session");
+    await new Promise(r => converse_core_converse.session.fetch({
+      'success': r,
+      'error': r
+    }));
+
+    if (converse_core_converse.session.get('active')) {
+      converse_core_converse.session.clear();
+
+      converse_core_converse.session.save({
+        id
+      });
+    }
+
+    saveJIDtoSession(jid);
+    initPersistentStorage();
+    /**
+     * Triggered once the user's session has been initialized. The session is a
+     * cache which stores information about the user's current session.
+     * @event _converse#userSessionInitialized
+     * @memberOf _converse
+     */
+
+    converse_core_converse.api.trigger('userSessionInitialized');
+  } else {
+    saveJIDtoSession(jid);
+  }
+}
+
+function saveJIDtoSession(jid) {
+  jid = converse_core_converse.session.get('jid') || jid;
+
+  if (converse_core_converse.authentication !== converse_core_converse.ANONYMOUS && !converse_core_Strophe.getResourceFromJid(jid)) {
+    jid = jid.toLowerCase() + converse_core_converse.generateResource();
+  }
+
+  converse_core_converse.jid = jid;
+  converse_core_converse.bare_jid = converse_core_Strophe.getBareJidFromJid(jid);
+  converse_core_converse.resource = converse_core_Strophe.getResourceFromJid(jid);
+  converse_core_converse.domain = converse_core_Strophe.getDomainFromJid(jid);
+
+  converse_core_converse.session.save({
+    'jid': jid,
+    'bare_jid': converse_core_converse.bare_jid,
+    'resource': converse_core_converse.resource,
+    'domain': converse_core_converse.domain,
+    'active': true
+  }); // Set JID on the connection object so that when we call `connection.bind`
+  // the new resource is found by Strophe.js and sent to the XMPP server.
+
+
+  converse_core_converse.connection.jid = jid;
+}
+/**
+ * Stores the passed in JID for the current user, potentially creating a
+ * resource if the JID is bare.
+ *
+ * Given that we can only create an XMPP connection if we know the domain of
+ * the server connect to and we only know this once we know the JID, we also
+ * call {@link _converse.initConnection } (if necessary) to make sure that the
+ * connection is set up.
+ *
+ * @method _converse#setUserJID
+ * @emits _converse#setUserJID
+ * @params { String } jid
+ */
+
+
+converse_core_converse.setUserJID = async function (jid) {
+  if (!converse_core_converse.connection || !utils_core.isSameDomain(converse_core_converse.connection.jid, jid)) {
+    const domain = converse_core_Strophe.getDomainFromJid(jid);
+    await converse_core_converse.initConnection(domain);
+  }
+
+  await initSession(jid);
+  /**
+   * Triggered whenever the user's JID has been updated
+   * @event _converse#setUserJID
+   */
+
+  converse_core_converse.api.trigger('setUserJID');
+
+  return jid;
+};
+
+function enableCarbons() {
+  /* Ask the XMPP server to enable Message Carbons
+   * See XEP-0280 https://xmpp.org/extensions/xep-0280.html#enabling
+   */
+  if (!converse_core_converse.message_carbons || !converse_core_converse.session || converse_core_converse.session.get('carbons_enabled')) {
+    return;
+  }
+
+  const carbons_iq = new converse_core_Strophe.Builder('iq', {
+    'from': converse_core_converse.connection.jid,
+    'id': 'enablecarbons',
+    'type': 'set'
+  }).c('enable', {
+    xmlns: converse_core_Strophe.NS.CARBONS
+  });
+
+  converse_core_converse.connection.addHandler(iq => {
+    if (iq.querySelectorAll('error').length > 0) {
+      headless_log.warn('An error occurred while trying to enable message carbons.');
+    } else {
+      converse_core_converse.session.save({
+        'carbons_enabled': true
+      });
+
+      headless_log.debug('Message carbons have been enabled.');
+    }
+  }, null, "iq", null, "enablecarbons");
+
+  converse_core_converse.connection.send(carbons_iq);
+}
+
+async function converse_core_onConnected(reconnecting) {
+  /* Called as soon as a new connection has been established, either
+   * by logging in or by attaching to an existing BOSH session.
+   */
+  delete converse_core_converse.connection.reconnecting;
+
+  converse_core_converse.connection.flush(); // Solves problem of returned PubSub BOSH response not received by browser
+
+
+  await converse_core_converse.setUserJID(converse_core_converse.connection.jid);
+  /**
+   * Synchronous event triggered after we've sent an IQ to bind the
+   * user's JID resource for this session.
+   * @event _converse#afterResourceBinding
+   */
+
+  await converse_core_converse.api.trigger('afterResourceBinding', reconnecting, {
+    'synchronous': true
+  });
+  enableCarbons();
+
+  if (reconnecting) {
+    /**
+     * After the connection has dropped and converse.js has reconnected.
+     * Any Strophe stanza handlers (as registered via `converse.listen.stanza`) will
+     * have to be registered anew.
+     * @event _converse#reconnected
+     * @example _converse.api.listen.on('reconnected', () => { ... });
+     */
+    converse_core_converse.api.trigger('reconnected');
+  } else {
+    /**
+     * Triggered once converse.js has been initialized.
+     * See also {@link _converse#event:pluginsInitialized}.
+     * @event _converse#initialized
+     */
+    converse_core_converse.api.trigger('initialized');
+    /**
+     * Triggered after the connection has been established and Converse
+     * has got all its ducks in a row.
+     * @event _converse#initialized
+     */
+
+
+    converse_core_converse.api.trigger('connected');
+  }
+}
+
+function setUpXMLLogging() {
+  const lmap = {};
+  lmap[converse_core_Strophe.LogLevel.DEBUG] = 'debug';
+  lmap[converse_core_Strophe.LogLevel.INFO] = 'info';
+  lmap[converse_core_Strophe.LogLevel.WARN] = 'warn';
+  lmap[converse_core_Strophe.LogLevel.ERROR] = 'error';
+  lmap[converse_core_Strophe.LogLevel.FATAL] = 'fatal';
+
+  converse_core_Strophe.log = (level, msg) => headless_log.log(msg, lmap[level]);
+
+  converse_core_Strophe.error = msg => headless_log.error(msg);
+
+  converse_core_converse.connection.xmlInput = body => headless_log.debug(body.outerHTML, 'color: darkgoldenrod');
+
+  converse_core_converse.connection.xmlOutput = body => headless_log.debug(body.outerHTML, 'color: darkcyan');
+}
+
+async function finishInitialization() {
+  await initSessionStorage();
+  initClientConfig();
+  initPlugins();
+  converse_core_registerGlobalEventHandlers();
+
+  if (!Backbone.History.started) {
+    Backbone.history.start();
+  }
+
+  if (converse_core_converse.idle_presence_timeout > 0) {
+    converse_core_converse.api.listen.on('addClientFeatures', () => {
+      converse_core_converse.api.disco.own.features.add(converse_core_Strophe.NS.IDLE);
+    });
+  }
+
+  if (converse_core_converse.auto_login || converse_core_converse.keepalive && lodash_noconflict_default.a.invoke(converse_core_converse.pluggable.plugins['converse-bosh'], 'enabled')) {
+    await converse_core_converse.api.user.login(null, null, true);
+  }
+}
+/**
+ * Properly tear down the session so that it's possible to manually connect again.
+ * @method finishDisconnection
+ * @emits _converse#disconnected
+ * @private
+ */
+
+
+function finishDisconnection() {
+  headless_log.debug('DISCONNECTED');
+  delete converse_core_converse.connection.reconnecting;
+
+  converse_core_converse.connection.reset();
+
+  tearDown();
+  clearSession();
+  delete converse_core_converse.connection;
+  /**
+   * Triggered after converse.js has disconnected from the XMPP server.
+   * @event _converse#disconnected
+   * @memberOf _converse
+   * @example _converse.api.listen.on('disconnected', () => { ... });
+   */
+
+  converse_core_converse.api.trigger('disconnected');
+}
+
+function fetchLoginCredentials() {
+  let wait = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
+  return new Promise(lodash_noconflict_default.a.debounce((resolve, reject) => {
+    const xhr = new XMLHttpRequest();
+    xhr.open('GET', converse_core_converse.credentials_url, true);
+    xhr.setRequestHeader('Accept', 'application/json, text/javascript');
+
+    xhr.onload = () => {
+      if (xhr.status >= 200 && xhr.status < 400) {
+        const data = JSON.parse(xhr.responseText);
+
+        converse_core_converse.setUserJID(data.jid).then(() => {
+          resolve({
+            jid: data.jid,
+            password: data.password
+          });
+        });
+      } else {
+        reject(new Error("".concat(xhr.status, ": ").concat(xhr.responseText)));
+      }
+    };
+
+    xhr.onerror = reject;
+    xhr.send();
+  }, wait));
+}
+
+async function getLoginCredentials() {
+  let credentials;
+  let wait = 0;
+
+  while (!credentials) {
+    try {
+      credentials = await fetchLoginCredentials(wait); // eslint-disable-line no-await-in-loop
+    } catch (e) {
+      headless_log.error('Could not fetch login credentials');
+      headless_log.error(e);
+    } // If unsuccessful, we wait 2 seconds between subsequent attempts to
+    // fetch the credentials.
+
+
+    wait = 2000;
+  }
+
+  return credentials;
+}
+
+async function getLoginCredentialsFromBrowser() {
+  const creds = await navigator.credentials.get({
+    'password': true
+  });
+
+  if (creds && creds.type == 'password' && utils_core.isValidJID(creds.id)) {
+    await converse_core_converse.setUserJID(creds.id);
+    return {
+      'jid': creds.id,
+      'password': creds.password
+    };
+  }
+}
+
+converse_core_converse.saveWindowState = function (ev) {
+  // XXX: eventually we should be able to just use
+  // document.visibilityState (when we drop support for older
+  // browsers).
+  let state;
+  const event_map = {
+    'focus': "visible",
+    'focusin': "visible",
+    'pageshow': "visible",
+    'blur': "hidden",
+    'focusout': "hidden",
+    'pagehide': "hidden"
+  };
+  ev = ev || document.createEvent('Events');
+
+  if (ev.type in event_map) {
+    state = event_map[ev.type];
+  } else {
+    state = document.hidden ? "hidden" : "visible";
+  }
+
+  converse_core_converse.windowState = state;
+  /**
+      * Triggered when window state has changed.
+      * Used to determine when a user left the page and when came back.
+      * @event _converse#windowStateChanged
+      * @type { object }
+      * @property{ string } state - Either "hidden" or "visible"
+      * @example _converse.api.listen.on('windowStateChanged', obj => { ... });
+      */
+
+  converse_core_converse.api.trigger('windowStateChanged', {
+    state
+  });
+};
+
+function converse_core_registerGlobalEventHandlers() {
+  document.addEventListener("visibilitychange", converse_core_converse.saveWindowState);
+
+  converse_core_converse.saveWindowState({
+    'type': document.hidden ? "blur" : "focus"
+  }); // Set initial state
+
+  /**
+   * Called once Converse has registered its global event handlers
+   * (for events such as window resize or unload).
+   * Plugins can listen to this event as cue to register their own
+   * global event handlers.
+   * @event _converse#registeredGlobalEventHandlers
+   * @example _converse.api.listen.on('registeredGlobalEventHandlers', () => { ... });
+   */
+
+
+  converse_core_converse.api.trigger('registeredGlobalEventHandlers');
+}
+
+function converse_core_unregisterGlobalEventHandlers() {
+  document.removeEventListener("visibilitychange", converse_core_converse.saveWindowState);
+
+  converse_core_converse.api.trigger('unregisteredGlobalEventHandlers');
+}
+
+function cleanup() {
+  // Make sure everything is reset in case this is a subsequent call to
+  // convesre.initialize (happens during tests).
+  Backbone.history.stop();
+  converse_core_unregisterGlobalEventHandlers();
+  delete converse_core_converse.controlboxtoggle;
+
+  if (converse_core_converse.chatboxviews) {
+    delete converse_core_converse.chatboxviews;
+  }
+
+  if (converse_core_converse.connection) {
+    converse_core_converse.connection.reset();
+  }
+
+  converse_core_converse.stopListening();
+
+  converse_core_converse.off();
+}
+
+converse_core_converse.initialize = async function (settings, callback) {
+  cleanup();
+  settings = settings !== undefined ? settings : {};
+  PROMISES.forEach(name => converse_core_converse.api.promises.add(name));
+
+  if ('onpagehide' in window) {
+    // Pagehide gets thrown in more cases than unload. Specifically it
+    // gets thrown when the page is cached and not just
+    // closed/destroyed. It's the only viable event on mobile Safari.
+    // https://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/
+    converse_core_converse.unloadevent = 'pagehide';
+  } else if ('onbeforeunload' in window) {
+    converse_core_converse.unloadevent = 'beforeunload';
+  } else if ('onunload' in window) {
+    converse_core_converse.unloadevent = 'unload';
+  }
+
+  lodash_noconflict_default.a.assignIn(this, this.default_settings); // Allow only whitelisted configuration attributes to be overwritten
+
+
+  lodash_noconflict_default.a.assignIn(this, lodash_noconflict_default.a.pick(settings, Object.keys(this.default_settings)));
+
+  this.settings = {};
+
+  lodash_noconflict_default.a.assignIn(this.settings, lodash_noconflict_default.a.pick(settings, Object.keys(this.default_settings)));
+
+  headless_log.setLogLevel(converse_core_converse.loglevel);
+  converse_core_converse.log = headless_log.log;
+
+  if (this.authentication === converse_core_converse.ANONYMOUS) {
+    if (this.auto_login && !this.jid) {
+      throw new Error("Config Error: you need to provide the server's " + "domain via the 'jid' option when using anonymous " + "authentication with auto_login.");
+    }
+  }
+
+  converse_core_converse.router.route(/^converse\?loglevel=(debug|info|warn|error|fatal)$/, 'loglevel', l => headless_log.setLogLevel(l));
+  /* Localisation */
+
+
+  if (i18n === undefined || converse_core_converse.isTestEnv()) {
+    converse_core_converse.locale = 'en';
+  } else {
+    try {
+      converse_core_converse.locale = i18n.getLocale(settings.i18n, converse_core_converse.locales);
+      await i18n.fetchTranslations(converse_core_converse);
+    } catch (e) {
+      headless_log.fatal(e.message);
+    }
+  } // Module-level variables
+  // ----------------------
+
+
+  this.callback = callback || function noop() {};
+  /* When reloading the page:
+   * For new sessions, we need to send out a presence stanza to notify
+   * the server/network that we're online.
+   * When re-attaching to an existing session we don't need to again send out a presence stanza,
+   * because it's as if "we never left" (see onConnectStatusChanged).
+   * https://github.com/jcbrand/converse.js/issues/521
+   */
+
+
+  this.send_initial_presence = true;
+  this.user_settings = settings; // Save the user settings so that they can be used by plugins
+  // Module-level functions
+  // ----------------------
+
+  this.generateResource = () => "/converse.js-".concat(Math.floor(Math.random() * 139749528).toString());
+
+  this.setConnectionStatus = function (connection_status, message) {
+    converse_core_converse.connfeedback.set({
+      'connection_status': connection_status,
+      'message': message
+    });
+  };
+  /**
+   * Gets called once strophe's status reaches Strophe.Status.DISCONNECTED.
+   * Will either start a teardown process for converse.js or attempt
+   * to reconnect.
+   * @method onDisconnected
+   * @private
+   * @memberOf _converse
+   */
+
+
+  this.onDisconnected = function () {
+    const reason = converse_core_converse.disconnection_reason;
+
+    if (converse_core_converse.disconnection_cause === converse_core_Strophe.Status.AUTHFAIL) {
+      if (converse_core_converse.auto_reconnect && (converse_core_converse.credentials_url || converse_core_converse.authentication === converse_core_converse.ANONYMOUS)) {
+        /**
+         * If `credentials_url` is set, we reconnect, because we might
+         * be receiving expirable tokens from the credentials_url.
+         *
+         * If `authentication` is anonymous, we reconnect because we
+         * might have tried to attach with stale BOSH session tokens
+         * or with a cached JID and password
+         */
+        return converse_core_converse.api.connection.reconnect();
+      } else {
+        return finishDisconnection();
+      }
+    } else if (converse_core_converse.disconnection_cause === converse_core_converse.LOGOUT || reason !== undefined && reason === lodash_noconflict_default.a.get(converse_core_Strophe, 'ErrorCondition.NO_AUTH_MECH') || reason === "host-unknown" || reason === "remote-connection-failed" || !converse_core_converse.auto_reconnect) {
+      return finishDisconnection();
+    }
+
+    converse_core_converse.api.connection.reconnect();
+  };
+
+  this.setDisconnectionCause = function (cause, reason, override) {
+    /* Used to keep track of why we got disconnected, so that we can
+     * decide on what the next appropriate action is (in onDisconnected)
+     */
+    if (cause === undefined) {
+      delete converse_core_converse.disconnection_cause;
+      delete converse_core_converse.disconnection_reason;
+    } else if (converse_core_converse.disconnection_cause === undefined || override) {
+      converse_core_converse.disconnection_cause = cause;
+      converse_core_converse.disconnection_reason = reason;
+    }
+  };
+  /**
+   * Callback method called by Strophe as the Strophe.Connection goes
+   * through various states while establishing or tearing down a
+   * connection.
+   * @method _converse#onConnectStatusChanged
+   * @private
+   * @memberOf _converse
+   */
+
+
+  this.onConnectStatusChanged = function (status, message) {
+    headless_log.debug("Status changed to: ".concat(converse_core_converse.CONNECTION_STATUS[status]));
+
+    if (status === converse_core_Strophe.Status.CONNECTED || status === converse_core_Strophe.Status.ATTACHED) {
+      converse_core_converse.setConnectionStatus(status); // By default we always want to send out an initial presence stanza.
+
+
+      converse_core_converse.send_initial_presence = true;
+
+      converse_core_converse.setDisconnectionCause();
+
+      if (converse_core_converse.connection.reconnecting) {
+        headless_log.debug(status === converse_core_Strophe.Status.CONNECTED ? 'Reconnected' : 'Reattached');
+        converse_core_onConnected(true);
+      } else {
+        headless_log.debug(status === converse_core_Strophe.Status.CONNECTED ? 'Connected' : 'Attached');
+
+        if (converse_core_converse.connection.restored) {
+          // No need to send an initial presence stanza when
+          // we're restoring an existing session.
+          converse_core_converse.send_initial_presence = false;
+        }
+
+        converse_core_onConnected();
+      }
+    } else if (status === converse_core_Strophe.Status.DISCONNECTED) {
+      converse_core_converse.setDisconnectionCause(status, message);
+
+      converse_core_converse.onDisconnected();
+    } else if (status === converse_core_Strophe.Status.BINDREQUIRED) {
+      converse_core_converse.bindResource();
+    } else if (status === converse_core_Strophe.Status.ERROR) {
+      converse_core_converse.setConnectionStatus(status, converse_core_('An error occurred while connecting to the chat server.'));
+    } else if (status === converse_core_Strophe.Status.CONNECTING) {
+      converse_core_converse.setConnectionStatus(status);
+    } else if (status === converse_core_Strophe.Status.AUTHENTICATING) {
+      converse_core_converse.setConnectionStatus(status);
+    } else if (status === converse_core_Strophe.Status.AUTHFAIL) {
+      if (!message) {
+        message = converse_core_('Your Jabber ID and/or password is incorrect. Please try again.');
+      }
+
+      converse_core_converse.setConnectionStatus(status, message);
+
+      converse_core_converse.setDisconnectionCause(status, message, true);
+
+      converse_core_converse.onDisconnected();
+    } else if (status === converse_core_Strophe.Status.CONNFAIL) {
+      let feedback = message;
+
+      if (message === "host-unknown" || message == "remote-connection-failed") {
+        feedback = converse_core_("Sorry, we could not connect to the XMPP host with domain: %1$s", "\"".concat(converse_core_Strophe.getDomainFromJid(converse_core_converse.connection.jid), "\""));
+      } else if (message !== undefined && message === lodash_noconflict_default.a.get(converse_core_Strophe, 'ErrorCondition.NO_AUTH_MECH')) {
+        feedback = converse_core_("The XMPP server did not offer a supported authentication mechanism");
+      }
+
+      converse_core_converse.setConnectionStatus(status, feedback);
+
+      converse_core_converse.setDisconnectionCause(status, message);
+    } else if (status === converse_core_Strophe.Status.DISCONNECTING) {
+      converse_core_converse.setDisconnectionCause(status, message);
+    }
+  };
+
+  this.bindResource = async function () {
+    /**
+     * Synchronous event triggered before we send an IQ to bind the user's
+     * JID resource for this session.
+     * @event _converse#beforeResourceBinding
+     */
+    await converse_core_converse.api.trigger('beforeResourceBinding', {
+      'synchronous': true
+    });
+
+    converse_core_converse.connection.bind();
+  };
+
+  this.ConnectionFeedback = Backbone.Model.extend({
+    defaults: {
+      'connection_status': converse_core_Strophe.Status.DISCONNECTED,
+      'message': ''
+    },
+
+    initialize() {
+      this.on('change', () => converse_core_converse.api.trigger('connfeedback', converse_core_converse.connfeedback));
+    }
+
+  });
+  this.connfeedback = new this.ConnectionFeedback(); // Initialization
+  // --------------
+
+  await finishInitialization();
+
+  if (converse_core_converse.isTestEnv()) {
+    return converse_core_converse;
+  }
+};
+/**
+ * ### The private API
+ *
+ * The private API methods are only accessible via the closured {@link _converse}
+ * object, which is only available to plugins.
+ *
+ * These methods are kept private (i.e. not global) because they may return
+ * sensitive data which should be kept off-limits to other 3rd-party scripts
+ * that might be running in the page.
+ *
+ * @namespace _converse.api
+ * @memberOf _converse
+ */
+
+
+converse_core_converse.api = {
+  /**
+   * This grouping collects API functions related to the XMPP connection.
+   *
+   * @namespace _converse.api.connection
+   * @memberOf _converse.api
+   */
+  connection: {
+    /**
+     * @method _converse.api.connection.connected
+     * @memberOf _converse.api.connection
+     * @returns {boolean} Whether there is an established connection or not.
+     */
+    connected() {
+      return lodash_noconflict_default.a.get(converse_core_converse, 'connection', {}).connected && true;
+    },
+
+    /**
+     * Terminates the connection.
+     *
+     * @method _converse.api.connection.disconnectkjjjkk
+     * @memberOf _converse.api.connection
+     */
+    disconnect() {
+      if (converse_core_converse.connection) {
+        converse_core_converse.connection.disconnect();
+      }
+    },
+
+    /**
+     * Can be called once the XMPP connection has dropped and we want
+     * to attempt reconnection.
+     * Only needs to be called once, if reconnect fails Converse will
+     * attempt to reconnect every two seconds, alternating between BOSH and
+     * Websocket if URLs for both were provided.
+     * @method reconnect
+     * @memberOf _converse.api.connection
+     */
+    async reconnect() {
+      const conn_status = converse_core_converse.connfeedback.get('connection_status');
+
+      if (converse_core_converse.authentication === converse_core_converse.ANONYMOUS) {
+        await tearDown();
+        clearSession();
+      }
+
+      if (conn_status === converse_core_Strophe.Status.CONNFAIL) {
+        // When reconnecting with a new transport, we call setUserJID
+        // so that a new resource is generated, to avoid multiple
+        // server-side sessions with the same resource.
+        //
+        // We also call `_proto._doDisconnect` so that connection event handlers
+        // for the old transport are removed.
+        if (converse_core_converse.api.connection.isType('websocket') && converse_core_converse.bosh_service_url) {
+          await converse_core_converse.setUserJID(converse_core_converse.bare_jid);
+
+          converse_core_converse.connection._proto._doDisconnect();
+
+          converse_core_converse.connection._proto = new converse_core_Strophe.Bosh(converse_core_converse.connection);
+          converse_core_converse.connection.service = converse_core_converse.bosh_service_url;
+        } else if (converse_core_converse.api.connection.isType('bosh') && converse_core_converse.websocket_url) {
+          if (converse_core_converse.authentication === converse_core_converse.ANONYMOUS) {
+            // When reconnecting anonymously, we need to connect with only
+            // the domain, not the full JID that we had in our previous
+            // (now failed) session.
+            await converse_core_converse.setUserJID(converse_core_converse.settings.jid);
+          } else {
+            await converse_core_converse.setUserJID(converse_core_converse.bare_jid);
+          }
+
+          converse_core_converse.connection._proto._doDisconnect();
+
+          converse_core_converse.connection._proto = new converse_core_Strophe.Websocket(converse_core_converse.connection);
+          converse_core_converse.connection.service = converse_core_converse.websocket_url;
+        }
+      }
+
+      if (conn_status === converse_core_Strophe.Status.AUTHFAIL && converse_core_converse.authentication === converse_core_converse.ANONYMOUS) {
+        // When reconnecting anonymously, we need to connect with only
+        // the domain, not the full JID that we had in our previous
+        // (now failed) session.
+        await converse_core_converse.setUserJID(converse_core_converse.settings.jid);
+      }
+
+      if (converse_core_converse.connection.reconnecting) {
+        debouncedReconnect();
+      } else {
+        return reconnect();
+      }
+    },
+
+    /**
+     * Utility method to determine the type of connection we have
+     * @method isType
+     * @memberOf _converse.api.connection
+     * @returns {boolean}
+     */
+    isType(type) {
+      if (type.toLowerCase() === 'websocket') {
+        return converse_core_converse.connection._proto instanceof converse_core_Strophe.Websocket;
+      } else if (type.toLowerCase() === 'bosh') {
+        return converse_core_converse.connection._proto instanceof converse_core_Strophe.Bosh;
+      }
+    }
+
+  },
+
+  /**
+   * Lets you trigger events, which can be listened to via
+   * {@link _converse.api.listen.on} or {@link _converse.api.listen.once}
+   * (see [_converse.api.listen](http://localhost:8000/docs/html/api/-_converse.api.listen.html)).
+   *
+   * Some events also double as promises and can be waited on via {@link _converse.api.waitUntil}.
+   *
+   * @method _converse.api.trigger
+   * @param {string} name - The event name
+   * @param {...any} [argument] - Argument to be passed to the event handler
+   * @param {object} [options]
+   * @param {boolean} [options.synchronous] - Whether the event is synchronous or not.
+   *  When a synchronous event is fired, a promise will be returned
+   *  by {@link _converse.api.trigger} which resolves once all the
+   *  event handlers' promises have been resolved.
+   */
+  async trigger(name) {
+    const args = Array.from(arguments);
+    const options = args.pop();
+
+    if (options && options.synchronous) {
+      const events = converse_core_converse._events[name] || [];
+      await Promise.all(events.map(e => e.callback.apply(e.ctx, args.splice(1))));
+    } else {
+      converse_core_converse.trigger.apply(converse_core_converse, arguments);
+    }
+
+    const promise = converse_core_converse.promises[name];
+
+    if (promise !== undefined) {
+      promise.resolve();
+    }
+  },
+
+  /**
+   * This grouping collects API functions related to the current logged in user.
+   *
+   * @namespace _converse.api.user
+   * @memberOf _converse.api
+   */
+  user: {
+    /**
+     * @method _converse.api.user.jid
+     * @returns {string} The current user's full JID (Jabber ID)
+     * @example _converse.api.user.jid())
+     */
+    jid() {
+      return converse_core_converse.connection.jid;
+    },
+
+    /**
+     * Logs the user in.
+     *
+     * If called without any parameters, Converse will try
+     * to log the user in by calling the `prebind_url` or `credentials_url` depending
+     * on whether prebinding is used or not.
+     *
+     * @method _converse.api.user.login
+     * @param {string} [jid]
+     * @param {string} [password]
+     * @param {boolean} [automatic=false] - An internally used flag that indicates whether
+     *  this method was called automatically once the connection has been
+     *  initialized. It's used together with the `auto_login` configuration flag
+     *  to determine whether Converse should try to log the user in if it
+     *  fails to restore a previous auth'd session.
+     */
+    async login(jid, password) {
+      let automatic = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+      if (jid || converse_core_converse.jid) {
+        jid = await converse_core_converse.setUserJID(jid || converse_core_converse.jid);
+      } // See whether there is a BOSH session to re-attach to
+
+
+      const bosh_plugin = converse_core_converse.pluggable.plugins['converse-bosh'];
+
+      if (bosh_plugin && bosh_plugin.enabled()) {
+        if (await converse_core_converse.restoreBOSHSession()) {
+          return;
+        } else if (converse_core_converse.authentication === converse_core_converse.PREBIND && (!automatic || converse_core_converse.auto_login)) {
+          return converse_core_converse.startNewPreboundBOSHSession();
+        }
+      }
+
+      password = password || converse_core_converse.password;
+      const credentials = jid && password ? {
+        jid,
+        password
+      } : null;
+      attemptNonPreboundSession(credentials, automatic);
+    },
+
+    /**
+     * Logs the user out of the current XMPP session.
+     * @method _converse.api.user.logout
+     * @example _converse.api.user.logout();
+     */
+    logout() {
+      const promise = utils_core.getResolveablePromise();
+
+      const complete = () => {
+        // Recreate all the promises
+        Object.keys(converse_core_converse.promises).forEach(replacePromise);
+        delete converse_core_converse.jid;
+        /**
+         * Triggered once the user has logged out.
+         * @event _converse#logout
+         */
+
+        converse_core_converse.api.trigger('logout');
+
+        promise.resolve();
+      };
+
+      converse_core_converse.setDisconnectionCause(converse_core_converse.LOGOUT, undefined, true);
+
+      if (converse_core_converse.connection !== undefined) {
+        converse_core_converse.api.listen.once('disconnected', () => complete());
+
+        converse_core_converse.connection.disconnect();
+      } else {
+        complete();
+      }
+
+      return promise;
+    }
+
+  },
+
+  /**
+   * This grouping allows access to the
+   * [configuration settings](/docs/html/configuration.html#configuration-settings)
+   * of Converse.
+   *
+   * @namespace _converse.api.settings
+   * @memberOf _converse.api
+   */
+  settings: {
+    /**
+     * Allows new configuration settings to be specified, or new default values for
+     * existing configuration settings to be specified.
+     *
+     * @method _converse.api.settings.update
+     * @param {object} settings The configuration settings
+     * @example
+     * _converse.api.settings.update({
+     *    'enable_foo': true
+     * });
+     *
+     * // The user can then override the default value of the configuration setting when
+     * // calling `converse.initialize`.
+     * converse.initialize({
+     *     'enable_foo': false
+     * });
+     */
+    update(settings) {
+      utils_core.merge(converse_core_converse.default_settings, settings);
+      utils_core.merge(converse_core_converse, settings);
+      utils_core.applyUserSettings(converse_core_converse, settings, converse_core_converse.user_settings);
+    },
+
+    /**
+     * @method _converse.api.settings.get
+     * @returns {*} Value of the particular configuration setting.
+     * @example _converse.api.settings.get("play_sounds");
+     */
+    get(key) {
+      if (lodash_noconflict_default.a.includes(Object.keys(converse_core_converse.default_settings), key)) {
+        return converse_core_converse[key];
+      }
+    },
+
+    /**
+     * Set one or many configuration settings.
+     *
+     * Note, this is not an alternative to calling {@link converse.initialize}, which still needs
+     * to be called. Generally, you'd use this method after Converse is already
+     * running and you want to change the configuration on-the-fly.
+     *
+     * @method _converse.api.settings.set
+     * @param {Object} [settings] An object containing configuration settings.
+     * @param {string} [key] Alternatively to passing in an object, you can pass in a key and a value.
+     * @param {string} [value]
+     * @example _converse.api.settings.set("play_sounds", true);
+     * @example
+     * _converse.api.settings.set({
+     *     "play_sounds", true,
+     *     "hide_offline_users" true
+     * });
+     */
+    set(key, val) {
+      const o = {};
+
+      if (lodash_noconflict_default.a.isObject(key)) {
+        lodash_noconflict_default.a.assignIn(converse_core_converse, lodash_noconflict_default.a.pick(key, Object.keys(converse_core_converse.default_settings)));
+      } else if (lodash_noconflict_default.a.isString('string')) {
+        o[key] = val;
+
+        lodash_noconflict_default.a.assignIn(converse_core_converse, lodash_noconflict_default.a.pick(o, Object.keys(converse_core_converse.default_settings)));
+      }
+    }
+
+  },
+
+  /**
+   * Converse and its plugins trigger various events which you can listen to via the
+   * {@link _converse.api.listen} namespace.
+   *
+   * Some of these events are also available as [ES2015 Promises](http://es6-features.org/#PromiseUsage)
+   * although not all of them could logically act as promises, since some events
+   * might be fired multpile times whereas promises are to be resolved (or
+   * rejected) only once.
+   *
+   * Events which are also promises include:
+   *
+   * * [cachedRoster](/docs/html/events.html#cachedroster)
+   * * [chatBoxesFetched](/docs/html/events.html#chatBoxesFetched)
+   * * [pluginsInitialized](/docs/html/events.html#pluginsInitialized)
+   * * [roster](/docs/html/events.html#roster)
+   * * [rosterContactsFetched](/docs/html/events.html#rosterContactsFetched)
+   * * [rosterGroupsFetched](/docs/html/events.html#rosterGroupsFetched)
+   * * [rosterInitialized](/docs/html/events.html#rosterInitialized)
+   * * [statusInitialized](/docs/html/events.html#statusInitialized)
+   * * [roomsPanelRendered](/docs/html/events.html#roomsPanelRendered)
+   *
+   * The various plugins might also provide promises, and they do this by using the
+   * `promises.add` api method.
+   *
+   * @namespace _converse.api.promises
+   * @memberOf _converse.api
+   */
+  promises: {
+    /**
+     * By calling `promises.add`, a new [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
+     * is made available for other code or plugins to depend on via the
+     * {@link _converse.api.waitUntil} method.
+     *
+     * Generally, it's the responsibility of the plugin which adds the promise to
+     * also resolve it.
+     *
+     * This is done by calling {@link _converse.api.trigger}, which not only resolves the
+     * promise, but also emits an event with the same name (which can be listened to
+     * via {@link _converse.api.listen}).
+     *
+     * @method _converse.api.promises.add
+     * @param {string|array} [name|names] The name or an array of names for the promise(s) to be added
+     * @param {boolean} [replace=true] Whether this promise should be replaced with a new one when the user logs out.
+     * @example _converse.api.promises.add('foo-completed');
+     */
+    add(promises) {
+      let replace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
+      promises = Array.isArray(promises) ? promises : [promises];
+      promises.forEach(name => {
+        const promise = utils_core.getResolveablePromise();
+        promise.replace = replace;
+        converse_core_converse.promises[name] = promise;
+      });
+    }
+
+  },
+
+  /**
+   * Converse emits events to which you can subscribe to.
+   *
+   * The `listen` namespace exposes methods for creating event listeners
+   * (aka handlers) for these events.
+   *
+   * @namespace _converse.api.listen
+   * @memberOf _converse
+   */
+  listen: {
+    /**
+     * Lets you listen to an event exactly once.
+     *
+     * @method _converse.api.listen.once
+     * @param {string} name The event's name
+     * @param {function} callback The callback method to be called when the event is emitted.
+     * @param {object} [context] The value of the `this` parameter for the callback.
+     * @example _converse.api.listen.once('message', function (messageXML) { ... });
+     */
+    once: converse_core_converse.once.bind(converse_core_converse),
+
+    /**
+     * Lets you subscribe to an event.
+     *
+     * Every time the event fires, the callback method specified by `callback` will be called.
+     *
+     * @method _converse.api.listen.on
+     * @param {string} name The event's name
+     * @param {function} callback The callback method to be called when the event is emitted.
+     * @param {object} [context] The value of the `this` parameter for the callback.
+     * @example _converse.api.listen.on('message', function (messageXML) { ... });
+     */
+    on: converse_core_converse.on.bind(converse_core_converse),
+
+    /**
+     * To stop listening to an event, you can use the `not` method.
+     *
+     * Every time the event fires, the callback method specified by `callback` will be called.
+     *
+     * @method _converse.api.listen.not
+     * @param {string} name The event's name
+     * @param {function} callback The callback method that is to no longer be called when the event fires
+     * @example _converse.api.listen.not('message', function (messageXML);
+     */
+    not: converse_core_converse.off.bind(converse_core_converse),
+
+    /**
+     * Subscribe to an incoming stanza
+     * Every a matched stanza is received, the callback method specified by
+     * `callback` will be called.
+     * @method _converse.api.listen.stanza
+     * @param {string} name The stanza's name
+     * @param {object} options Matching options (e.g. 'ns' for namespace, 'type' for stanza type, also 'id' and 'from');
+     * @param {function} handler The callback method to be called when the stanza appears
+     */
+    stanza(name, options, handler) {
+      if (lodash_noconflict_default.a.isFunction(options)) {
+        handler = options;
+        options = {};
+      } else {
+        options = options || {};
+      }
+
+      converse_core_converse.connection.addHandler(handler, options.ns, name, options.type, options.id, options.from, options);
+    }
+
+  },
+
+  /**
+   * Wait until a promise is resolved or until the passed in function returns
+   * a truthy value.
+   * @method _converse.api.waitUntil
+   * @param {string|function} condition - The name of the promise to wait for,
+   * or a function which should eventually return a truthy value.
+   * @returns {Promise}
+   */
+  waitUntil(condition) {
+    if (lodash_noconflict_default.a.isFunction(condition)) {
+      return utils_core.waitUntil(condition);
+    } else {
+      const promise = converse_core_converse.promises[condition];
+
+      if (promise === undefined) {
+        return null;
+      }
+
+      return promise;
+    }
+  },
+
+  /**
+   * Allows you to send XML stanzas.
+   * @method _converse.api.send
+   * @example
+   * const msg = converse.env.$msg({
+   *     'from': 'juliet@example.com/balcony',
+   *     'to': 'romeo@example.net',
+   *     'type':'chat'
+   * });
+   * _converse.api.send(msg);
+   */
+  send(stanza) {
+    if (!converse_core_converse.api.connection.connected()) {
+      headless_log.warn("Not sending stanza because we're not connected!");
+      headless_log.warn(converse_core_Strophe.serialize(stanza));
+      return;
+    }
+
+    if (lodash_noconflict_default.a.isString(stanza)) {
+      stanza = utils_core.toStanza(stanza);
+    }
+
+    if (stanza.tagName === 'iq') {
+      return converse_core_converse.api.sendIQ(stanza);
+    } else {
+      converse_core_converse.connection.send(stanza);
+
+      converse_core_converse.api.trigger('send', stanza);
+    }
+  },
+
+  /**
+   * Send an IQ stanza and receive a promise
+   * @method _converse.api.sendIQ
+   * @param { XMLElement } stanza
+   * @param { Integer } timeout
+   * @param { Boolean } reject - Whether an error IQ should cause the promise
+   *  to be rejected. If `false`, the promise will resolve instead of being rejected.
+   * @returns {Promise} A promise which resolves when we receive a `result` stanza
+   * or is rejected when we receive an `error` stanza.
+   */
+  sendIQ(stanza, timeout) {
+    let reject = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
+    timeout = timeout || converse_core_converse.STANZA_TIMEOUT;
+    let promise;
+
+    if (reject) {
+      promise = new Promise((resolve, reject) => converse_core_converse.connection.sendIQ(stanza, resolve, reject, timeout));
+    } else {
+      promise = new Promise(resolve => converse_core_converse.connection.sendIQ(stanza, resolve, resolve, timeout));
+    }
+
+    converse_core_converse.api.trigger('send', stanza);
+
+    return promise;
+  }
+
+};
+window.converse = window.converse || {};
+/**
+ * ### The Public API
+ *
+ * This namespace contains public API methods which are are
+ * accessible on the global `converse` object.
+ * They are public, because any JavaScript in the
+ * page can call them. Public methods therefore don’t expose any sensitive
+ * or closured data. To do that, you’ll need to create a plugin, which has
+ * access to the private API method.
+ *
+ * @global
+ * @namespace converse
+ */
+
+Object.assign(window.converse, {
+  keycodes: {
+    TAB: 9,
+    ENTER: 13,
+    SHIFT: 16,
+    CTRL: 17,
+    ALT: 18,
+    ESCAPE: 27,
+    LEFT_ARROW: 37,
+    UP_ARROW: 38,
+    RIGHT_ARROW: 39,
+    DOWN_ARROW: 40,
+    FORWARD_SLASH: 47,
+    AT: 50,
+    META: 91,
+    META_RIGHT: 93
+  },
+
+  /**
+   * Public API method which initializes Converse.
+   * This method must always be called when using Converse.
+   * @memberOf converse
+   * @method initialize
+   * @param {object} config A map of [configuration-settings](https://conversejs.org/docs/html/configuration.html#configuration-settings).
+   * @example
+   * converse.initialize({
+   *     auto_list_rooms: false,
+   *     auto_subscribe: false,
+   *     bosh_service_url: 'https://bind.example.com',
+   *     hide_muc_server: false,
+   *     i18n: 'en',
+   *     play_sounds: true,
+   *     show_controlbox_by_default: true,
+   *     debug: false,
+   *     roster_groups: true
+   * });
+   */
+  initialize(settings, callback) {
+    return converse_core_converse.initialize(settings, callback);
+  },
+
+  /**
+   * Exposes methods for adding and removing plugins. You'll need to write a plugin
+   * if you want to have access to the private API methods defined further down below.
+   *
+   * For more information on plugins, read the documentation on [writing a plugin](/docs/html/plugin_development.html).
+   * @namespace plugins
+   * @memberOf converse
+   */
+  plugins: {
+    /**
+     * Registers a new plugin.
+     * @method converse.plugins.add
+     * @param {string} name The name of the plugin
+     * @param {object} plugin The plugin object
+     * @example
+     *  const plugin = {
+     *      initialize: function () {
+     *          // Gets called as soon as the plugin has been loaded.
+     *
+     *          // Inside this method, you have access to the private
+     *          // API via `_covnerse.api`.
+     *
+     *          // The private _converse object contains the core logic
+     *          // and data-structures of Converse.
+     *      }
+     *  }
+     *  converse.plugins.add('myplugin', plugin);
+     */
+    add(name, plugin) {
+      plugin.__name__ = name;
+
+      if (converse_core_converse.pluggable.plugins[name] !== undefined) {
+        throw new TypeError("Error: plugin with name \"".concat(name, "\" has already been ") + 'registered!');
+      } else {
+        converse_core_converse.pluggable.plugins[name] = plugin;
+      }
+    }
+
+  },
+
+  /**
+   * Utility methods and globals from bundled 3rd party libraries.
+   * @memberOf converse
+   *
+   * @property {function} converse.env.$build    - Creates a Strophe.Builder, for creating stanza objects.
+   * @property {function} converse.env.$iq       - Creates a Strophe.Builder with an <iq/> element as the root.
+   * @property {function} converse.env.$msg      - Creates a Strophe.Builder with an <message/> element as the root.
+   * @property {function} converse.env.$pres     - Creates a Strophe.Builder with an <presence/> element as the root.
+   * @property {object} converse.env.Backbone    - The [Backbone](http://backbonejs.org) object used by Converse to create models and views.
+   * @property {function} converse.env.Promise   - The Promise implementation used by Converse.
+   * @property {function} converse.env.Strophe   - The [Strophe](http://strophe.im/strophejs) XMPP library used by Converse.
+   * @property {object} converse.env._           - The instance of [lodash](http://lodash.com) used by Converse.
+   * @property {function} converse.env.f         - And instance of Lodash with its methods wrapped to produce immutable auto-curried iteratee-first data-last methods.
+   * @property {object} converse.env.dayjs       - [DayJS](https://github.com/iamkun/dayjs) date manipulation library.
+   * @property {function} converse.env.sizzle    - [Sizzle](https://sizzlejs.com) CSS selector engine.
+   * @property {object} converse.env.utils       - Module containing common utility methods used by Converse.
+   */
+  'env': {
+    $build: converse_core_$build,
+    $iq: converse_core_$iq,
+    $msg: converse_core_$msg,
+    $pres: converse_core_$pres,
+    Backbone,
+    BrowserStorage: backbone_browserStorage,
+    Promise,
+    Strophe: converse_core_Strophe,
+    _: lodash_noconflict_default.a,
+    dayjs: dayjs_min_default.a,
+    log: headless_log,
+    sizzle: sizzle_default.a,
+    stanza_utils: utils_stanza,
+    u: utils_core,
+    'utils': utils_core
+  }
+});
+/**
+ * Once Converse.js has loaded, it'll dispatch a custom event with the name `converse-loaded`.
+ * You can listen for this event in order to be informed as soon as converse.js has been
+ * loaded and parsed, which would mean it's safe to call `converse.initialize`.
+ * @event converse-loaded
+ * @example window.addEventListener('converse-loaded', () => converse.initialize());
+ */
+
+window.dispatchEvent(new CustomEvent('converse-loaded'));
+/* harmony default export */ var converse_core = (converse);
+// EXTERNAL MODULE: ./node_modules/filesize/lib/filesize.js
+var filesize = __webpack_require__(41);
+var filesize_default = /*#__PURE__*/__webpack_require__.n(filesize);
+
+// CONCATENATED MODULE: ./src/headless/converse-chat.js
+
+
+
+
+
+const {
+  $msg: converse_chat_$msg,
+  Backbone: converse_chat_Backbone,
+  Strophe: converse_chat_Strophe,
+  sizzle: converse_chat_sizzle,
+  utils: converse_chat_utils
+} = converse_core.env;
+const converse_chat_u = converse_core.env.utils;
+converse_core.plugins.add('converse-chat', {
+  /* Optional dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin. They are called "optional" because they might not be
+   * available, in which case any overrides applicable to them will be
+   * ignored.
+   *
+   * It's possible however to make optional dependencies non-optional.
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chatboxes", "converse-disco"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse; // Configuration values for this plugin
+    // ====================================
+    // Refer to docs/source/configuration.rst for explanations of these
+    // configuration settings.
+
+    _converse.api.settings.update({
+      'auto_join_private_chats': [],
+      'clear_messages_on_reconnection': false,
+      'filter_by_resource': false,
+      'allow_message_corrections': 'all',
+      'send_chat_state_notifications': true
+    });
+
+    const ModelWithContact = converse_chat_Backbone.Model.extend({
+      initialize() {
+        this.rosterContactAdded = converse_chat_u.getResolveablePromise();
+      },
+
+      async setRosterContact(jid) {
+        const contact = await _converse.api.contacts.get(jid);
+
+        if (contact) {
+          this.contact = contact;
+          this.set('nickname', contact.get('nickname'));
+          this.rosterContactAdded.resolve();
+        }
+      }
+
+    });
+    /**
+     * Represents a non-MUC message. These can be either `chat` messages or
+     * `headline` messages.
+     * @class
+     * @namespace _converse.Message
+     * @memberOf _converse
+     * @example const msg = new _converse.Message({'message': 'hello world!'});
+     */
+
+    _converse.Message = ModelWithContact.extend({
+      defaults() {
+        return {
+          'msgid': converse_chat_u.getUniqueId(),
+          'time': new Date().toISOString(),
+          'is_ephemeral': false
+        };
+      },
+
+      async initialize() {
+        this.initialized = converse_chat_u.getResolveablePromise();
+
+        if (this.get('type') === 'chat') {
+          ModelWithContact.prototype.initialize.apply(this, arguments);
+          this.setRosterContact(converse_chat_Strophe.getBareJidFromJid(this.get('from')));
+        }
+
+        if (this.get('file')) {
+          this.on('change:put', this.uploadFile, this);
+        }
+
+        this.setTimerForEphemeralMessage();
+        /**
+         * Triggered once a {@link _converse.Message} has been created and initialized.
+         * @event _converse#messageInitialized
+         * @type { _converse.Message}
+         * @example _converse.api.listen.on('messageInitialized', model => { ... });
+         */
+
+        await _converse.api.trigger('messageInitialized', this, {
+          'Synchronous': true
+        });
+        this.initialized.resolve();
+      },
+
+      /**
+       * Sets an auto-destruct timer for this message, if it's is_ephemeral.
+       * @private
+       * @method _converse.Message#setTimerForEphemeralMessage
+       * @returns { Boolean } - Indicates whether the message is
+       *   ephemeral or not, and therefore whether the timer was set or not.
+       */
+      setTimerForEphemeralMessage() {
+        const setTimer = () => {
+          this.ephemeral_timer = window.setTimeout(this.safeDestroy.bind(this), 10000);
+        };
+
+        if (this.isEphemeral()) {
+          setTimer();
+          return true;
+        } else {
+          this.on('change:is_ephemeral', () => this.isEphemeral() ? setTimer() : clearTimeout(this.ephemeral_timer));
+          return false;
+        }
+      },
+
+      safeDestroy() {
+        try {
+          this.destroy();
+        } catch (e) {
+          headless_log.error(e);
+        }
+      },
+
+      isOnlyChatStateNotification() {
+        return converse_chat_u.isOnlyChatStateNotification(this);
+      },
+
+      isEphemeral() {
+        return this.get('is_ephemeral') || converse_chat_u.isOnlyChatStateNotification(this);
+      },
+
+      getDisplayName() {
+        if (this.get('type') === 'groupchat') {
+          return this.get('nick');
+        } else if (this.contact) {
+          return this.contact.getDisplayName();
+        } else if (this.vcard) {
+          return this.vcard.getDisplayName();
+        } else {
+          return this.get('from');
+        }
+      },
+
+      getMessageText() {
+        if (this.get('is_encrypted')) {
+          return this.get('plaintext') || (_converse.loglevel === 'debug' ? __('Unencryptable OMEMO message') : null);
+        }
+
+        return this.get('message');
+      },
+
+      isMeCommand() {
+        const text = this.getMessageText();
+
+        if (!text) {
+          return false;
+        }
+
+        return text.startsWith('/me ');
+      },
+
+      sendSlotRequestStanza() {
+        /* Send out an IQ stanza to request a file upload slot.
+         *
+         * https://xmpp.org/extensions/xep-0363.html#request
+         */
+        if (!this.file) {
+          return Promise.reject(new Error("file is undefined"));
+        }
+
+        const iq = converse_core.env.$iq({
+          'from': _converse.jid,
+          'to': this.get('slot_request_url'),
+          'type': 'get'
+        }).c('request', {
+          'xmlns': converse_chat_Strophe.NS.HTTPUPLOAD,
+          'filename': this.file.name,
+          'size': this.file.size,
+          'content-type': this.file.type
+        });
+        return _converse.api.sendIQ(iq);
+      },
+
+      async getRequestSlotURL() {
+        let stanza;
+
+        try {
+          stanza = await this.sendSlotRequestStanza();
+        } catch (e) {
+          headless_log.error(e);
+          return this.save({
+            'type': 'error',
+            'message': __("Sorry, could not determine upload URL."),
+            'is_ephemeral': true
+          });
+        }
+
+        const slot = stanza.querySelector('slot');
+
+        if (slot) {
+          this.save({
+            'get': slot.querySelector('get').getAttribute('url'),
+            'put': slot.querySelector('put').getAttribute('url')
+          });
+        } else {
+          return this.save({
+            'type': 'error',
+            'message': __("Sorry, could not determine file upload URL."),
+            'is_ephemeral': true
+          });
+        }
+      },
+
+      uploadFile() {
+        const xhr = new XMLHttpRequest();
+
+        xhr.onreadystatechange = () => {
+          if (xhr.readyState === XMLHttpRequest.DONE) {
+            headless_log.info("Status: " + xhr.status);
+
+            if (xhr.status === 200 || xhr.status === 201) {
+              this.save({
+                'upload': _converse.SUCCESS,
+                'oob_url': this.get('get'),
+                'message': this.get('get')
+              });
+            } else {
+              xhr.onerror();
+            }
+          }
+        };
+
+        xhr.upload.addEventListener("progress", evt => {
+          if (evt.lengthComputable) {
+            this.set('progress', evt.loaded / evt.total);
+          }
+        }, false);
+
+        xhr.onerror = () => {
+          let message;
+
+          if (xhr.responseText) {
+            message = __('Sorry, could not succesfully upload your file. Your server’s response: "%1$s"', xhr.responseText);
+          } else {
+            message = __('Sorry, could not succesfully upload your file.');
+          }
+
+          this.save({
+            'type': 'error',
+            'upload': _converse.FAILURE,
+            'message': message,
+            'is_ephemeral': true
+          });
+        };
+
+        xhr.open('PUT', this.get('put'), true);
+        xhr.setRequestHeader("Content-type", this.file.type);
+        xhr.send(this.file);
+      }
+
+    });
+    _converse.Messages = _converse.Collection.extend({
+      model: _converse.Message,
+      comparator: 'time'
+    });
+    /**
+     * Represents an open/ongoing chat conversation.
+     *
+     * @class
+     * @namespace _converse.ChatBox
+     * @memberOf _converse
+     */
+
+    _converse.ChatBox = ModelWithContact.extend({
+      messagesCollection: _converse.Messages,
+
+      defaults() {
+        return {
+          'bookmarked': false,
+          'chat_state': undefined,
+          'hidden': ['mobile', 'fullscreen'].includes(_converse.view_mode),
+          'message_type': 'chat',
+          'nickname': undefined,
+          'num_unread': 0,
+          'time_sent': new Date(0).toISOString(),
+          'time_opened': this.get('time_opened') || new Date().getTime(),
+          'type': _converse.PRIVATE_CHAT_TYPE,
+          'url': ''
+        };
+      },
+
+      async initialize() {
+        this.initialized = converse_chat_u.getResolveablePromise();
+        ModelWithContact.prototype.initialize.apply(this, arguments);
+        const jid = this.get('jid');
+
+        if (!jid) {
+          // XXX: The `validate` method will prevent this model
+          // from being persisted if there's no jid, but that gets
+          // called after model instantiation, so we have to deal
+          // with invalid models here also.
+          // This happens when the controlbox is in browser storage,
+          // but we're in embedded mode.
+          return;
+        }
+
+        this.set({
+          'box_id': "box-".concat(btoa(jid))
+        });
+
+        if (this.get('type') === _converse.PRIVATE_CHAT_TYPE) {
+          this.presence = _converse.presences.findWhere({
+            'jid': jid
+          }) || _converse.presences.create({
+            'jid': jid
+          });
+          await this.setRosterContact(jid);
+        }
+
+        this.on('change:chat_state', this.sendChatState, this);
+        this.initMessages();
+        await this.fetchMessages();
+        /**
+         * Triggered once a {@link _converse.ChatBox} has been created and initialized.
+         * @event _converse#chatBoxInitialized
+         * @type { _converse.ChatBox}
+         * @example _converse.api.listen.on('chatBoxInitialized', model => { ... });
+         */
+
+        await _converse.api.trigger('chatBoxInitialized', this, {
+          'Synchronous': true
+        });
+        this.initialized.resolve();
+      },
+
+      getMessagesCacheKey() {
+        return "converse.messages-".concat(this.get('jid'), "-").concat(_converse.bare_jid);
+      },
+
+      initMessages() {
+        this.messages = new this.messagesCollection();
+        this.messages.chatbox = this;
+        this.messages.browserStorage = _converse.createStore(this.getMessagesCacheKey());
+        this.listenTo(this.messages, 'change:upload', message => {
+          if (message.get('upload') === _converse.SUCCESS) {
+            _converse.api.send(this.createMessageStanza(message));
+          }
+        });
+      },
+
+      afterMessagesFetched() {
+        /**
+         * Triggered whenever a `_converse.ChatBox` instance has fetched its messages from
+         * `sessionStorage` but **NOT** from the server.
+         * @event _converse#afterMessagesFetched
+         * @type {_converse.ChatBox | _converse.ChatRoom}
+         * @example _converse.api.listen.on('afterMessagesFetched', view => { ... });
+         */
+        _converse.api.trigger('afterMessagesFetched', this);
+      },
+
+      fetchMessages() {
+        if (this.messages.fetched) {
+          headless_log.info("Not re-fetching messages for ".concat(this.get('jid')));
+          return;
+        }
+
+        this.messages.fetched = converse_chat_u.getResolveablePromise();
+        const resolve = this.messages.fetched.resolve;
+        this.messages.fetch({
+          'add': true,
+          'success': () => {
+            this.afterMessagesFetched();
+            resolve();
+          },
+          'error': () => {
+            this.afterMessagesFetched();
+            resolve();
+          }
+        });
+        return this.messages.fetched;
+      },
+
+      async onMessage(stanza, original_stanza, from_jid) {
+        const message = await this.getDuplicateMessage(stanza);
+
+        if (message) {
+          this.updateMessage(message, original_stanza);
+        } else if (!this.handleReceipt(stanza, from_jid, original_stanza) && !this.handleChatMarker(stanza, from_jid)) {
+          const attrs = await this.getMessageAttributesFromStanza(stanza, original_stanza);
+          this.handleReaction(stanza, original_stanza, attrs);   // BAO issue #9
+
+          if (this.handleRetraction(attrs)) {
+            return;
+          }
+
+          this.setEditable(attrs, attrs.time, stanza);
+
+          if (attrs['chat_state'] || attrs['retracted'] || // Retraction received *before* the message
+          !converse_chat_u.isEmptyMessage(attrs)) {
+            const msg = this.handleCorrection(attrs) || this.messages.create(attrs);
+            this.incrementUnreadMsgCounter(msg);
+          }
+        }
+      },
+
+      async clearMessages() {
+        try {
+          await this.messages.clearSession();
+        } catch (e) {
+          this.messages.trigger('reset');
+          headless_log.error(e);
+        } finally {
+          delete this.messages.fetched;
+        }
+      },
+
+      async close() {
+        try {
+          await new Promise((success, reject) => {
+            return this.destroy({
+              success,
+              'error': (m, e) => reject(e)
+            });
+          });
+        } catch (e) {
+          headless_log.error(e);
+        } finally {
+          if (_converse.clear_messages_on_reconnection) {
+            await this.clearMessages();
+          }
+        }
+      },
+
+      announceReconnection() {
+        /**
+         * Triggered whenever a `_converse.ChatBox` instance has reconnected after an outage
+         * @event _converse#onChatReconnected
+         * @type {_converse.ChatBox | _converse.ChatRoom}
+         * @example _converse.api.listen.on('onChatReconnected', chatbox => { ... });
+         */
+        _converse.api.trigger('chatReconnected', this);
+      },
+
+      async onReconnection() {
+        if (_converse.clear_messages_on_reconnection) {
+          await this.clearMessages();
+        }
+
+        this.announceReconnection();
+      },
+
+      validate(attrs) {
+        if (!attrs.jid) {
+          return 'Ignored ChatBox without JID';
+        }
+
+        const room_jids = _converse.auto_join_rooms.map(s => Object(lodash["isObject"])(s) ? s.jid : s);
+
+        const auto_join = _converse.auto_join_private_chats.concat(room_jids);
+
+        if (_converse.singleton && !auto_join.includes(attrs.jid) && !_converse.auto_join_on_invite) {
+          const msg = "".concat(attrs.jid, " is not allowed because singleton is true and it's not being auto_joined");
+          headless_log.warn(msg);
+          return msg;
+        }
+      },
+
+      getDisplayName() {
+        if (this.contact) {
+          return this.contact.getDisplayName();
+        } else if (this.vcard) {
+          return this.vcard.getDisplayName();
+        } else {
+          return this.get('jid');
+        }
+      },
+
+      createMessageFromError(error) {
+        if (error instanceof _converse.TimeoutError) {
+          const msg = this.messages.create({
+            'type': 'error',
+            'message': error.message,
+            'retry': true
+          });
+          msg.error = error;
+        }
+      },
+
+      getOldestMessage() {
+        for (let i = 0; i < this.messages.length; i++) {
+          const message = this.messages.at(i);
+
+          if (message.get('type') === this.get('message_type')) {
+            return message;
+          }
+        }
+      },
+
+      getMostRecentMessage() {
+        for (let i = this.messages.length - 1; i >= 0; i--) {
+          const message = this.messages.at(i);
+
+          if (message.get('type') === this.get('message_type')) {
+            return message;
+          }
+        }
+      },
+
+      getUpdatedMessageAttributes(message, stanza) {
+        // eslint-disable-line no-unused-vars
+        return {
+          'is_archived': utils_stanza.isArchived(stanza)
+        };
+      },
+
+      updateMessage(message, stanza) {
+        // Overridden in converse-muc and converse-mam
+        const attrs = this.getUpdatedMessageAttributes(message, stanza);
+
+        if (attrs) {
+          message.save(attrs);
+        }
+      },
+
+      /**
+       * Mutator for setting the chat state of this chat session.
+       * Handles clearing of any chat state notification timeouts and
+       * setting new ones if necessary.
+       * Timeouts are set when the  state being set is COMPOSING or PAUSED.
+       * After the timeout, COMPOSING will become PAUSED and PAUSED will become INACTIVE.
+       * See XEP-0085 Chat State Notifications.
+       * @private
+       * @method _converse.ChatBox#setChatState
+       * @param { string } state - The chat state (consts ACTIVE, COMPOSING, PAUSED, INACTIVE, GONE)
+       */
+      setChatState(state, options) {
+        if (this.chat_state_timeout !== undefined) {
+          window.clearTimeout(this.chat_state_timeout);
+          delete this.chat_state_timeout;
+        }
+
+        if (state === _converse.COMPOSING) {
+          this.chat_state_timeout = window.setTimeout(this.setChatState.bind(this), _converse.TIMEOUTS.PAUSED, _converse.PAUSED);
+        } else if (state === _converse.PAUSED) {
+          this.chat_state_timeout = window.setTimeout(this.setChatState.bind(this), _converse.TIMEOUTS.INACTIVE, _converse.INACTIVE);
+        }
+
+        this.set('chat_state', state, options);
+        return this;
+      },
+
+      /**
+       * @private
+       * @method _converse.ChatBox#shouldShowErrorMessage
+       * @returns {boolean}
+       */
+      shouldShowErrorMessage(stanza) {
+        const id = stanza.getAttribute('id');
+
+        if (id) {
+          const msgs = this.messages.where({
+            'msgid': id
+          });
+          const referenced_msgs = msgs.filter(m => m.get('type') !== 'error');
+
+          if (!referenced_msgs.length && stanza.querySelector('body') === null) {
+            // If the error refers to a message not included in our store,
+            // and it doesn't have a <body> tag, we assume that this was a
+            // CSI message (which we don't store).
+            // See https://github.com/conversejs/converse.js/issues/1317
+            return;
+          }
+
+          const dupes = msgs.filter(m => m.get('type') === 'error');
+
+          if (dupes.length) {
+            return;
+          }
+        } // Gets overridden in ChatRoom
+
+
+        return true;
+      },
+
+      isSameUser(jid1, jid2) {
+        return converse_chat_u.isSameBareJID(jid1, jid2);
+      },
+
+      /**
+       * Looks whether we already have a retraction for this
+       * incoming message. If so, it's considered "dangling" because it
+       * probably hasn't been applied to anything yet, given that the
+       * relevant message is only coming in now.
+       * @private
+       * @method _converse.ChatBox#findDanglingRetraction
+       * @param { object } attrs - Attributes representing a received
+       *  message, as returned by {@link stanza_utils.getMessageAttributesFromStanza}
+       * @returns { _converse.Message }
+       */
+      findDanglingRetraction(attrs) {
+        if (!attrs.origin_id || !this.messages.length) {
+          return null;
+        } // Only look for dangling retractions if there are newer
+        // messages than this one, since retractions come after.
+
+
+        if (this.messages.last().get('time') > attrs.time) {
+          // Search from latest backwards
+          const messages = Array.from(this.messages.models);
+          messages.reverse();
+          return messages.find((_ref) => {
+            let {
+              attributes
+            } = _ref;
+            return attributes.retracted_id === attrs.origin_id && attributes.from === attrs.from && !attributes.moderated_by;
+          });
+        }
+      },
+
+      // BAO issue #9
+
+      handleReaction(stanza, original_stanza, attrs) {
+        const message = this.messages.findWhere({
+            'origin_id': attrs.reaction_id
+        });
+        if (message) this.updateReactions(message, attrs.from, attrs.reaction_emoji);
+      },
+
+      // BAO issue #9
+
+      updateReactions(message, from, reaction_emoji) {
+        let reactions = message.get('reactions');
+        if (!reactions) reactions = {};
+        if (!reactions[reaction_emoji]) reactions[reaction_emoji] = [];
+        if (!reactions[reaction_emoji].includes(from)) reactions[reaction_emoji].push(from);
+
+        message.set('reactions', undefined);    // force change event
+        message.save('reactions', reactions);
+      },
+
+      /**
+       * Handles message retraction based on the passed in attributes.
+       * @private
+       * @method _converse.ChatBox#handleRetraction
+       * @param { object } attrs - Attributes representing a received
+       *  message, as returned by {@link stanza_utils.getMessageAttributesFromStanza}
+       * @returns { Boolean } Returns `true` or `false` depending on
+       *  whether a message was retracted or not.
+       */
+      handleRetraction(attrs) {
+        const RETRACTION_ATTRIBUTES = ['retracted', 'retracted_id', 'editable'];
+
+        if (attrs.retracted) {
+          if (attrs.is_tombstone) {
+            return false;
+          }
+
+          const message = this.messages.findWhere({
+            'origin_id': attrs.retracted_id,
+            'from': attrs.from
+          });
+
+          if (!message) {
+            attrs['dangling_retraction'] = true;
+            this.messages.create(attrs);
+            return true;
+          }
+
+          message.save(Object(lodash["pick"])(attrs, RETRACTION_ATTRIBUTES));
+          return true;
+        } else {
+          // Check if we have dangling retraction
+          const message = this.findDanglingRetraction(attrs);
+
+          if (message) {
+            const retraction_attrs = Object(lodash["pick"])(message.attributes, RETRACTION_ATTRIBUTES);
+            const new_attrs = Object.assign({
+              'dangling_retraction': false
+            }, attrs, retraction_attrs);
+            delete new_attrs['id']; // Delete id, otherwise a new cache entry gets created
+
+            message.save(new_attrs);
+            return true;
+          }
+        }
+
+        return false;
+      },
+
+      /**
+       * Determines whether the passed in message attributes represent a
+       * message which corrects a previously received message, or an
+       * older message which has already been corrected.
+       * In both cases, update the corrected message accordingly.
+       * @private
+       * @method _converse.ChatBox#handleCorrection
+       * @param { object } attrs - Attributes representing a received
+       *  message, as returned by {@link stanza_utils.getMessageAttributesFromStanza}
+       * @returns { _converse.Message|undefined } Returns the corrected
+       *  message or `undefined` if not applicable.
+       */
+      handleCorrection(attrs) {
+        if (!attrs.replaced_id || !attrs.from) {
+          return;
+        }
+
+        const message = this.messages.findWhere({
+          'msgid': attrs.replaced_id,
+          'from': attrs.from
+        });
+
+        if (!message) {
+          return;
+        }
+
+        const older_versions = message.get('older_versions') || {};
+
+        if (attrs.time < message.get('time') && message.get('edited')) {
+          // This is an older message which has been corrected afterwards
+          older_versions[attrs.time] = attrs['message'];
+          message.save({
+            'older_versions': older_versions
+          });
+        } else {
+          // This is a correction of an earlier message we already received
+          older_versions[message.get('time')] = message.get('message');
+          attrs = Object.assign(attrs, {
+            'older_versions': older_versions
+          });
+          delete attrs['id']; // Delete id, otherwise a new cache entry gets created
+
+          message.save(attrs);
+        }
+
+        return message;
+      },
+
+      async getDuplicateMessage(stanza) {
+        return this.findDuplicateFromOriginID(stanza) || (await this.findDuplicateFromStanzaID(stanza)) || this.findDuplicateFromMessage(stanza);
+      },
+
+      findDuplicateFromOriginID(stanza) {
+        const origin_id = converse_chat_sizzle("origin-id[xmlns=\"".concat(converse_chat_Strophe.NS.SID, "\"]"), stanza).pop();
+
+        if (!origin_id) {
+          return null;
+        }
+
+        return this.messages.findWhere({
+          'origin_id': origin_id.getAttribute('id'),
+          'from': stanza.getAttribute('from')
+        });
+      },
+
+      async findDuplicateFromStanzaID(stanza) {
+        const stanza_id = converse_chat_sizzle("stanza-id[xmlns=\"".concat(converse_chat_Strophe.NS.SID, "\"]"), stanza).pop();
+
+        if (!stanza_id) {
+          return false;
+        }
+
+        const by_jid = stanza_id.getAttribute('by');
+
+        if (!(await _converse.api.disco.supports(converse_chat_Strophe.NS.SID, by_jid))) {
+          return false;
+        }
+
+        const query = {};
+        query["stanza_id ".concat(by_jid)] = stanza_id.getAttribute('id');
+        return this.messages.findWhere(query);
+      },
+
+      findDuplicateFromMessage(stanza) {
+        const text = utils_stanza.getMessageBody(stanza) || undefined;
+
+        if (!text) {
+          return false;
+        }
+
+        const id = stanza.getAttribute('id');
+
+        if (!id) {
+          return false;
+        }
+
+        return this.messages.findWhere({
+          'message': text,
+          'from': stanza.getAttribute('from'),
+          'msgid': id
+        });
+      },
+
+      /**
+       * Sends a message stanza to retract a message in this chat
+       * @private
+       * @method _converse.ChatBox#sendRetractionMessage
+       * @param { _converse.Message } message - The message which we're retracting.
+       */
+      sendRetractionMessage(message) {
+        const origin_id = message.get('origin_id');
+
+        if (!origin_id) {
+          throw new Error("Can't retract message without a XEP-0359 Origin ID");
+        }
+
+        const msg = converse_chat_$msg({
+          'id': converse_chat_u.getUniqueId(),
+          'to': this.get('jid'),
+          'type': "chat"
+        }).c('store', {
+          xmlns: converse_chat_Strophe.NS.HINTS
+        }).up().c("apply-to", {
+          'id': origin_id,
+          'xmlns': converse_chat_Strophe.NS.FASTEN
+        }).c('retract', {
+          xmlns: converse_chat_Strophe.NS.RETRACT
+        });
+        return _converse.connection.send(msg);
+      },
+
+      sendMarker(to_jid, id, type, msg_type) {
+        const stanza = converse_chat_$msg({
+          'from': _converse.connection.jid,
+          'id': converse_chat_u.getUniqueId(),
+          'to': to_jid,
+          'type': msg_type ? msg_type : 'chat'
+        }).c(type, {
+          'xmlns': converse_chat_Strophe.NS.MARKERS,
+          'id': id
+        });
+
+        _converse.api.send(stanza);
+      },
+
+      handleChatMarker(stanza, from_jid) {
+        const to_bare_jid = converse_chat_Strophe.getBareJidFromJid(stanza.getAttribute('to'));
+        const from_bare_jid = converse_chat_Strophe.getBareJidFromJid(from_jid);
+
+        if (to_bare_jid !== _converse.bare_jid) {
+          return false;
+        }
+
+        const markers = converse_chat_sizzle("[xmlns=\"".concat(converse_chat_Strophe.NS.MARKERS, "\"]"), stanza);
+
+        if (markers.length === 0) {
+          return false;
+        } else if (markers.length > 1) {
+          headless_log.error('handleChatMarker: Ignoring incoming stanza with multiple message markers');
+          headless_log.error(stanza);
+          return false;
+        } else {
+          const marker = markers.pop();
+
+          if (marker.nodeName === 'markable') {
+            if (this.contact && !converse_chat_u.isMAMMessage(stanza) && !converse_chat_u.isCarbonMessage(stanza)) {
+              this.sendMarker(from_bare_jid, stanza.getAttribute('id'), 'received', stanza.getAttribute('type'));
+            }
+
+            return false;
+          } else {
+            const msgid = marker && marker.getAttribute('id'),
+                  message = msgid && this.messages.findWhere({
+              msgid
+            }),
+                  field_name = "marker_".concat(marker.nodeName);
+
+            if (message && !message.get(field_name)) {
+              message.save({
+                field_name: new Date().toISOString()
+              });
+            }
+
+            return true;
+          }
+        }
+      },
+
+      sendReceiptStanza(to_jid, id) {
+        const receipt_stanza = converse_chat_$msg({
+          'from': _converse.connection.jid,
+          'id': converse_chat_u.getUniqueId(),
+          'to': to_jid,
+          'type': 'chat'
+        }).c('received', {
+          'xmlns': converse_chat_Strophe.NS.RECEIPTS,
+          'id': id
+        }).up().c('store', {
+          'xmlns': converse_chat_Strophe.NS.HINTS
+        }).up();
+
+        _converse.api.send(receipt_stanza);
+      },
+
+      handleReceipt(stanza, from_jid, original_stanza) {
+        const is_me = converse_chat_Strophe.getBareJidFromJid(from_jid) === _converse.bare_jid;
+
+        const requests_receipt = converse_chat_sizzle("request[xmlns=\"".concat(converse_chat_Strophe.NS.RECEIPTS, "\"]"), stanza).pop() !== undefined;
+
+        if (requests_receipt && !is_me && !converse_chat_u.isCarbonMessage(stanza) && !converse_chat_u.isMAMMessage(original_stanza)) {
+          this.sendReceiptStanza(from_jid, stanza.getAttribute('id'));
+        }
+
+        const to_bare_jid = converse_chat_Strophe.getBareJidFromJid(stanza.getAttribute('to'));
+
+        if (to_bare_jid === _converse.bare_jid) {
+          const receipt = converse_chat_sizzle("received[xmlns=\"".concat(converse_chat_Strophe.NS.RECEIPTS, "\"]"), stanza).pop();
+
+          if (receipt) {
+            const msgid = receipt && receipt.getAttribute('id'),
+                  message = msgid && this.messages.findWhere({
+              msgid
+            });
+
+            if (message && !message.get('received')) {
+              message.save({
+                'received': new Date().toISOString()
+              });
+            }
+
+            return true;
+          }
+        }
+
+        return false;
+      },
+
+      /**
+       * Given a {@link _converse.Message} return the XML stanza that represents it.
+       * @private
+       * @method _converse.ChatBox#createMessageStanza
+       * @param { _converse.Message } message - The message object
+       */
+      createMessageStanza(message) {
+        const stanza = converse_chat_$msg({
+          'from': _converse.connection.jid,
+          'to': this.get('jid'),
+          'type': this.get('message_type'),
+          'id': message.get('edited') && converse_chat_u.getUniqueId() || message.get('msgid')
+        }).c('body').t(message.get('message')).up().c(_converse.ACTIVE, {
+          'xmlns': converse_chat_Strophe.NS.CHATSTATES
+        }).root();
+
+        if (message.get('type') === 'chat') {
+          stanza.c('request', {
+            'xmlns': converse_chat_Strophe.NS.RECEIPTS
+          }).root();
+        }
+
+        if (message.get('is_spoiler')) {
+          if (message.get('spoiler_hint')) {
+            stanza.c('spoiler', {
+              'xmlns': converse_chat_Strophe.NS.SPOILER
+            }, message.get('spoiler_hint')).root();
+          } else {
+            stanza.c('spoiler', {
+              'xmlns': converse_chat_Strophe.NS.SPOILER
+            }).root();
+          }
+        }
+
+        if (message.get('reaction_emoji'))  {     // BAO issue #9
+            stanza.c("reactions", {
+                'xmlns': converse_chat_Strophe.NS.REACTION,
+                'id': message.get('reaction_id')
+            }).c('reaction').t(message.get('reaction_emoji')).root();
+        }
+
+        (message.get('references') || []).forEach(reference => {
+          const attrs = {
+            'xmlns': converse_chat_Strophe.NS.REFERENCE,
+            'begin': reference.begin,
+            'end': reference.end,
+            'type': reference.type
+          };
+
+          if (reference.uri) {
+            attrs.uri = reference.uri;
+          }
+
+          stanza.c('reference', attrs).root();
+        });
+
+        if (message.get('oob_url')) {
+          stanza.c('x', {
+            'xmlns': converse_chat_Strophe.NS.OUTOFBAND
+          }).c('url').t(message.get('oob_url')).root();
+        }
+
+        if (message.get('edited')) {
+          stanza.c('replace', {
+            'xmlns': converse_chat_Strophe.NS.MESSAGE_CORRECT,
+            'id': message.get('msgid')
+          }).root();
+        }
+
+        if (message.get('origin_id')) {
+          stanza.c('origin-id', {
+            'xmlns': converse_chat_Strophe.NS.SID,
+            'id': message.get('origin_id')
+          }).root();
+        }
+
+        return stanza;
+      },
+
+      getOutgoingMessageAttributes(text, spoiler_hint) {
+        const is_spoiler = this.get('composing_spoiler');
+        const origin_id = converse_chat_u.getUniqueId();
+        return {
+          'id': origin_id,
+          'jid': this.get('jid'),
+          'nickname': this.get('nickname'),
+          'msgid': origin_id,
+          'origin_id': origin_id,
+          'fullname': _converse.xmppstatus.get('fullname'),
+          'from': _converse.bare_jid,
+          'is_only_emojis': text ? converse_chat_u.isOnlyEmojis(text) : false,
+          'sender': 'me',
+          'time': new Date().toISOString(),
+          'message': text ? converse_chat_u.httpToGeoUri(converse_chat_u.shortnameToUnicode(text), _converse) : undefined,
+          'is_spoiler': is_spoiler,
+          'spoiler_hint': is_spoiler ? spoiler_hint : undefined,
+          'type': this.get('message_type')
+        };
+      },
+
+      /**
+       * Responsible for setting the editable attribute of messages.
+       * If _converse.allow_message_corrections is "last", then only the last
+       * message sent from me will be editable. If set to "all" all messages
+       * will be editable. Otherwise no messages will be editable.
+       * @method _converse.ChatBox#setEditable
+       * @memberOf _converse.ChatBox
+       * @param { Object } attrs An object containing message attributes.
+       * @param { String } send_time - time when the message was sent
+       */
+      setEditable(attrs, send_time, stanza) {
+        if (stanza && converse_chat_u.isHeadlineMessage(_converse, stanza)) {
+          return;
+        }
+
+        if (converse_chat_u.isEmptyMessage(attrs) || attrs.sender !== 'me') {
+          return;
+        }
+
+        if (_converse.allow_message_corrections === 'all') {
+          attrs.editable = !(attrs.file || attrs.retracted || 'oob_url' in attrs);
+        } else if (_converse.allow_message_corrections === 'last' && send_time > this.get('time_sent')) {
+          this.set({
+            'time_sent': send_time
+          });
+          const msg = this.messages.findWhere({
+            'editable': true
+          });
+
+          if (msg) {
+            msg.save({
+              'editable': false
+            });
+          }
+
+          attrs.editable = !(attrs.file || attrs.retracted || 'oob_url' in attrs);
+        }
+      },
+
+      /**
+       * Responsible for sending off a text message inside an ongoing chat conversation.
+       * @method _converse.ChatBox#sendMessage
+       * @memberOf _converse.ChatBox
+       * @param { String } text - The chat message text
+       * @param { String } spoiler_hint - An optional hint, if the message being sent is a spoiler
+       * @returns { _converse.Message }
+       * @example
+       * const chat = _converse.api.chats.get('buddy1@example.com');
+       * chat.sendMessage('hello world');
+       */
+      sendMessage(text, spoiler_hint) {
+        const attrs = this.getOutgoingMessageAttributes(text, spoiler_hint);
+        let message = this.messages.findWhere('correcting');
+
+        if (message) {
+          const older_versions = message.get('older_versions') || {};
+          older_versions[message.get('time')] = message.get('message');
+          message.save({
+            'correcting': false,
+            'edited': new Date().toISOString(),
+            'message': attrs.message,
+            'older_versions': older_versions,
+            'references': attrs.references,
+            'is_only_emojis': attrs.is_only_emojis,
+            'origin_id': converse_chat_u.getUniqueId(),
+            'received': undefined
+          });
+        } else {
+          this.setEditable(attrs, new Date().toISOString());
+          message = this.messages.create(attrs);
+        }
+
+        _converse.api.send(this.createMessageStanza(message));
+
+        return message;
+      },
+
+      /**
+       * Sends a message with the current XEP-0085 chat state of the user
+       * as taken from the `chat_state` attribute of the {@link _converse.ChatBox}.
+       * @private
+       * @method _converse.ChatBox#sendChatState
+       */
+      sendChatState() {
+        if (_converse.send_chat_state_notifications && this.get('chat_state')) {
+          const allowed = _converse.send_chat_state_notifications;
+
+          if (Array.isArray(allowed) && !allowed.includes(this.get('chat_state'))) {
+            return;
+          }
+
+          _converse.api.send(converse_chat_$msg({
+            'id': converse_chat_u.getUniqueId(),
+            'to': this.get('jid'),
+            'type': 'chat'
+          }).c(this.get('chat_state'), {
+            'xmlns': converse_chat_Strophe.NS.CHATSTATES
+          }).up().c('no-store', {
+            'xmlns': converse_chat_Strophe.NS.HINTS
+          }).up().c('no-permanent-store', {
+            'xmlns': converse_chat_Strophe.NS.HINTS
+          }));
+        }
+      },
+
+      async sendFiles(files) {
+        const result = await _converse.api.disco.features.get(converse_chat_Strophe.NS.HTTPUPLOAD, _converse.domain);
+        const item = result.pop();
+
+        if (!item) {
+          this.messages.create({
+            'message': __("Sorry, looks like file upload is not supported by your server."),
+            'type': 'error',
+            'is_ephemeral': true
+          });
+          return;
+        }
+
+        const data = item.dataforms.where({
+          'FORM_TYPE': {
+            'value': converse_chat_Strophe.NS.HTTPUPLOAD,
+            'type': "hidden"
+          }
+        }).pop(),
+              max_file_size = window.parseInt(Object(lodash["get"])(data, 'attributes.max-file-size.value')),
+              slot_request_url = Object(lodash["get"])(item, 'id');
+
+        if (!slot_request_url) {
+          this.messages.create({
+            'message': __("Sorry, looks like file upload is not supported by your server."),
+            'type': 'error',
+            'is_ephemeral': true
+          });
+          return;
+        }
+
+        Array.from(files).forEach(file => {
+          if (!window.isNaN(max_file_size) && window.parseInt(file.size) > max_file_size) {
+            return this.messages.create({
+              'message': __('The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.', file.name, filesize_default()(max_file_size)),
+              'type': 'error',
+              'is_ephemeral': true
+            });
+          } else {
+            const attrs = Object.assign(this.getOutgoingMessageAttributes(), {
+              'file': true,
+              'progress': 0,
+              'slot_request_url': slot_request_url
+            });
+            this.setEditable(attrs, new Date().toISOString());
+            const message = this.messages.create(attrs, {
+              'silent': true
+            });
+            message.file = file;
+            this.messages.trigger('add', message);
+            message.getRequestSlotURL();
+          }
+        });
+      },
+
+      /**
+       * Parses a passed in message stanza and returns an object of attributes.
+       * @private
+       * @method _converse.ChatBox#getMessageAttributesFromStanza
+       * @param { XMLElement } stanza - The message stanza
+       * @param { XMLElement } original_stanza - The original stanza, that contains the
+       *  message stanza, if it was contained, otherwise it's the message stanza itself.
+       * @returns { Object }
+       */
+      getMessageAttributesFromStanza(stanza, original_stanza) {
+        // XXX: Eventually we want to get rid of this pass-through
+        // method but currently we still need it because converse-omemo
+        // overrides it.
+        return utils_stanza.getMessageAttributesFromStanza(stanza, original_stanza, this, _converse);
+      },
+
+      maybeShow() {
+        // Returns the chatbox
+        return this.trigger("show");
+      },
+
+      /**
+       * Indicates whether the chat is hidden and therefore
+       * whether a newly received message will be visible
+       * to the user or not.
+       * @returns {boolean}
+       */
+      isHidden() {
+        return this.get('hidden') || this.get('minimized') || this.isScrolledUp() || _converse.windowState === 'hidden';
+      },
+
+      /**
+       * Given a newly received {@link _converse.Message} instance,
+       * update the unread counter if necessary.
+       * @private
+       * @param {_converse.Message} message
+       */
+      incrementUnreadMsgCounter(message) {  // BAO issue #119 (converse #1999)
+        if (!message || !message.get('message')) {
+          return;
+        }
+
+        if (converse_chat_utils.isNewMessage(message)) {
+          if (this.isHidden()) {
+              let first_unread = this.get('first_unread');  // BAO
+
+              if (this.get('num_unread') == 0) {    // BAO
+
+                  if (first_unread)
+                  {
+                      const msg = this.messages.where({'msgid': first_unread});
+                      if (msg.length > 0) msg[0].set("first_unread", false);
+                  }
+
+                  message.set("first_unread", true);
+                  first_unread = message.get('msgid');
+              }
+
+              this.save({
+                'first_unread': first_unread,
+                'num_unread': this.get('num_unread') + 1
+              });
+              _converse.incrementMsgCounter();
+          } else {
+              this.sendDisplayedMarker(message);
+          }
+        }
+      },
+
+      sendDisplayedMarker(msg) {
+        if (msg) {
+            const from_jid = converse_chat_Strophe.getBareJidFromJid(msg.get('from'));
+            this.sendMarker(from_jid, msg.get('msgid'), 'displayed', msg.get('type'));
+        }
+      },
+
+      clearUnreadMsgCounter() {
+        if (this.get('num_unread') > 0) {
+            this.sendDisplayedMarker(this.messages.last());
+        }
+        converse_chat_u.safeSave(this, {
+          'num_unread': 0
+        });
+      },
+
+      isScrolledUp() {
+        return this.get('scrolled', true);
+      }
+
+    });
+
+    function rejectMessage(stanza, text) {
+      // Reject an incoming message by replying with an error message of type "cancel".
+      _converse.api.send(converse_chat_$msg({
+        'to': stanza.getAttribute('from'),
+        'type': 'error',
+        'id': stanza.getAttribute('id')
+      }).c('error', {
+        'type': 'cancel'
+      }).c('not-allowed', {
+        xmlns: "urn:ietf:params:xml:ns:xmpp-stanzas"
+      }).up().c('text', {
+        xmlns: "urn:ietf:params:xml:ns:xmpp-stanzas"
+      }).t(text));
+
+      headless_log.warn("Rejecting message stanza with the following reason: ".concat(text));
+      headless_log.warn(stanza);
+    }
+
+    async function handleErrorMessage(stanza) {
+      const from_jid = converse_chat_Strophe.getBareJidFromJid(stanza.getAttribute('from'));
+
+      if (converse_chat_utils.isSameBareJID(from_jid, _converse.bare_jid)) {
+        return;
+      }
+
+      const chatbox = await _converse.api.chatboxes.get(from_jid);
+
+      if (!chatbox) {
+        return;
+      }
+
+      const should_show = await chatbox.shouldShowErrorMessage(stanza);
+
+      if (!should_show) {
+        return;
+      }
+
+      const attrs = await chatbox.getMessageAttributesFromStanza(stanza, stanza);
+      await chatbox.messages.create(attrs);
+    }
+    /**
+     * Handler method for all incoming single-user chat "message" stanzas.
+     * @private
+     * @method _converse#handleMessageStanza
+     * @param { XMLElement } stanza - The incoming message stanza
+     */
+
+
+    _converse.handleMessageStanza = async function (stanza) {
+      const original_stanza = stanza;
+      let to_jid = stanza.getAttribute('to');
+      const to_resource = converse_chat_Strophe.getResourceFromJid(to_jid);
+
+      if (_converse.filter_by_resource && to_resource && to_resource !== _converse.resource) {
+        return headless_log.info("onMessage: Ignoring incoming message intended for a different resource: ".concat(to_jid));
+      } else if (converse_chat_utils.isHeadlineMessage(_converse, stanza)) {
+        // XXX: Prosody sends headline messages with the
+        // wrong type ('chat'), so we need to filter them out here.
+        return headless_log.info("onMessage: Ignoring incoming headline message from JID: ".concat(stanza.getAttribute('from')));
+      }
+
+      const bare_forward = converse_chat_sizzle("message > forwarded[xmlns=\"".concat(converse_chat_Strophe.NS.FORWARD, "\"]"), stanza).length;
+
+      if (bare_forward) {
+        return rejectMessage(stanza, 'Forwarded messages not part of an encapsulating protocol are not supported');
+      }
+
+      let from_jid = stanza.getAttribute('from') || _converse.bare_jid;
+
+      if (converse_chat_u.isCarbonMessage(stanza)) {
+        if (from_jid === _converse.bare_jid) {
+          const selector = "[xmlns=\"".concat(converse_chat_Strophe.NS.CARBONS, "\"] > forwarded[xmlns=\"").concat(converse_chat_Strophe.NS.FORWARD, "\"] > message");
+          stanza = converse_chat_sizzle(selector, stanza).pop();
+          to_jid = stanza.getAttribute('to');
+          from_jid = stanza.getAttribute('from');
+        } else {
+          // Prevent message forging via carbons: https://xmpp.org/extensions/xep-0280.html#security
+          return rejectMessage(stanza, 'Rejecting carbon from invalid JID');
+        }
+      }
+
+      if (converse_chat_u.isMAMMessage(stanza)) {
+        if (from_jid === _converse.bare_jid) {
+          const selector = "[xmlns=\"".concat(converse_chat_Strophe.NS.MAM, "\"] > forwarded[xmlns=\"").concat(converse_chat_Strophe.NS.FORWARD, "\"] > message");
+          stanza = converse_chat_sizzle(selector, stanza).pop();
+          to_jid = stanza.getAttribute('to');
+          from_jid = stanza.getAttribute('from');
+        } else {
+          return headless_log.warn("onMessage: Ignoring alleged MAM message from ".concat(stanza.getAttribute('from')));
+        }
+      }
+
+      const from_bare_jid = converse_chat_Strophe.getBareJidFromJid(from_jid);
+      const is_me = from_bare_jid === _converse.bare_jid;
+
+      if (is_me && to_jid === null) {
+        return headless_log.error("Don't know how to handle message stanza without 'to' attribute. ".concat(stanza.outerHTML));
+      }
+
+      const contact_jid = is_me ? converse_chat_Strophe.getBareJidFromJid(to_jid) : from_bare_jid;
+      const contact = await _converse.api.contacts.get(contact_jid);
+
+      if (contact === undefined && !_converse.allow_non_roster_messaging) {
+        headless_log.error("Blocking messaging with a JID not in our roster because allow_non_roster_messaging is false.");
+        return headless_log.error(stanza);
+      } // Get chat box, but only create when the message has something to show to the user
+
+
+      const has_body = converse_chat_sizzle("body, encrypted[xmlns=\"".concat(converse_chat_Strophe.NS.OMEMO, "\"]"), stanza).length > 0;
+      const roster_nick = Object(lodash["get"])(contact, 'attributes.nickname');
+      const chatbox = await _converse.api.chats.get(contact_jid, {
+        'nickname': roster_nick
+      }, has_body);
+      chatbox && (await chatbox.onMessage(stanza, original_stanza, from_jid));
+      /**
+       * Triggered when a message stanza is been received and processed.
+       * @event _converse#message
+       * @type { object }
+       * @property { _converse.ChatBox | _converse.ChatRoom } chatbox
+       * @property { XMLElement } stanza
+       * @example _converse.api.listen.on('message', obj => { ... });
+       */
+
+      _converse.api.trigger('message', {
+        'stanza': original_stanza,
+        'chatbox': chatbox
+      });
+    };
+
+    function registerMessageHandlers() {
+      _converse.connection.addHandler(stanza => {
+        if (converse_chat_sizzle("message > result[xmlns=\"".concat(converse_chat_Strophe.NS.MAM, "\"]"), stanza).pop()) {
+          // MAM messages are handled in converse-mam.
+          // We shouldn't get MAM messages here because
+          // they shouldn't have a `type` attribute.
+          headless_log.warn("Received a MAM message with type \"chat\".");
+          return true;
+        }
+
+        _converse.handleMessageStanza(stanza);
+
+        return true;
+      }, null, 'message', 'chat');
+
+      _converse.connection.addHandler(stanza => {
+        // Message receipts are usually without the `type` attribute. See #1353
+        if (stanza.getAttribute('type') !== null) {
+          // TODO: currently Strophe has no way to register a handler
+          // for stanzas without a `type` attribute.
+          // We could update it to accept null to mean no attribute,
+          // but that would be a backward-incompatible change
+          return true; // Gets handled above.
+        }
+
+        _converse.handleMessageStanza(stanza);
+
+        return true;
+      }, converse_chat_Strophe.NS.RECEIPTS, 'message');
+
+      _converse.connection.addHandler(stanza => {
+        handleErrorMessage(stanza);
+        return true;
+      }, null, 'message', 'error');
+    }
+
+    function autoJoinChats() {
+      // Automatically join private chats, based on the
+      // "auto_join_private_chats" configuration setting.
+      _converse.auto_join_private_chats.forEach(jid => {
+        if (_converse.chatboxes.where({
+          'jid': jid
+        }).length) {
+          return;
+        }
+
+        if (Object(lodash["isString"])(jid)) {
+          _converse.api.chats.open(jid);
+        } else {
+          headless_log.error('Invalid jid criteria specified for "auto_join_private_chats"');
+        }
+      });
+      /**
+       * Triggered once any private chats have been automatically joined as
+       * specified by the `auto_join_private_chats` setting.
+       * See: https://conversejs.org/docs/html/configuration.html#auto-join-private-chats
+       * @event _converse#privateChatsAutoJoined
+       * @example _converse.api.listen.on('privateChatsAutoJoined', () => { ... });
+       * @example _converse.api.waitUntil('privateChatsAutoJoined').then(() => { ... });
+       */
+
+
+      _converse.api.trigger('privateChatsAutoJoined');
+    }
+    /************************ BEGIN Route Handlers ************************/
+
+
+    function openChat(jid) {
+      if (!converse_chat_utils.isValidJID(jid)) {
+        return headless_log.warn("Invalid JID \"".concat(jid, "\" provided in URL fragment"));
+      }
+
+      _converse.api.chats.open(jid);
+    }
+
+    _converse.router.route('converse/chat?jid=:jid', openChat);
+    /************************ END Route Handlers ************************/
+
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('chatBoxesFetched', autoJoinChats);
+
+    _converse.api.listen.on('presencesInitialized', registerMessageHandlers);
+
+    _converse.api.listen.on('clearSession', () => {
+      if (_converse.shouldClearCache()) {
+        _converse.chatboxes.filter(c => c.messages && c.messages.clearSession({
+          'silent': true
+        }));
+      }
+    });
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The "chats" namespace (used for one-on-one chats)
+       *
+       * @namespace _converse.api.chats
+       * @memberOf _converse.api
+       */
+      chats: {
+        /**
+         * @method _converse.api.chats.create
+         * @param {string|string[]} jid|jids An jid or array of jids
+         * @param {object} [attrs] An object containing configuration attributes.
+         */
+        async create(jids, attrs) {
+          if (Object(lodash["isString"])(jids)) {
+            if (attrs && !Object(lodash["get"])(attrs, 'fullname')) {
+              const contact = await _converse.api.contacts.get(jids);
+              attrs.fullname = Object(lodash["get"])(contact, 'attributes.fullname');
+            }
+
+            const chatbox = _converse.api.chats.get(jids, attrs, true);
+
+            if (!chatbox) {
+              headless_log.error("Could not open chatbox for JID: " + jids);
+              return;
+            }
+
+            return chatbox;
+          }
+
+          if (Array.isArray(jids)) {
+            return Promise.all(jids.forEach(async jid => {
+              const contact = await _converse.api.contacts.get(jids);
+              attrs.fullname = Object(lodash["get"])(contact, 'attributes.fullname');
+              return _converse.api.chats.get(jid, attrs, true).maybeShow();
+            }));
+          }
+
+          headless_log.error("chats.create: You need to provide at least one JID");
+          return null;
+        },
+
+        /**
+         * Opens a new one-on-one chat.
+         *
+         * @method _converse.api.chats.open
+         * @param {String|string[]} name - e.g. 'buddy@example.com' or ['buddy1@example.com', 'buddy2@example.com']
+         * @param {Object} [attrs] - Attributes to be set on the _converse.ChatBox model.
+         * @param {Boolean} [attrs.minimized] - Should the chat be created in minimized state.
+         * @param {Boolean} [force=false] - By default, a minimized
+         *   chat won't be maximized (in `overlayed` view mode) and in
+         *   `fullscreen` view mode a newly opened chat won't replace
+         *   another chat already in the foreground.
+         *   Set `force` to `true` if you want to force the chat to be
+         *   maximized or shown.
+         * @returns {Promise} Promise which resolves with the
+         *   _converse.ChatBox representing the chat.
+         *
+         * @example
+         * // To open a single chat, provide the JID of the contact you're chatting with in that chat:
+         * converse.plugins.add('myplugin', {
+         *     initialize: function() {
+         *         const _converse = this._converse;
+         *         // Note, buddy@example.org must be in your contacts roster!
+         *         _converse.api.chats.open('buddy@example.com').then(chat => {
+         *             // Now you can do something with the chat model
+         *         });
+         *     }
+         * });
+         *
+         * @example
+         * // To open an array of chats, provide an array of JIDs:
+         * converse.plugins.add('myplugin', {
+         *     initialize: function () {
+         *         const _converse = this._converse;
+         *         // Note, these users must first be in your contacts roster!
+         *         _converse.api.chats.open(['buddy1@example.com', 'buddy2@example.com']).then(chats => {
+         *             // Now you can do something with the chat models
+         *         });
+         *     }
+         * });
+         */
+        async open(jids, attrs, force) {
+          if (Object(lodash["isString"])(jids)) {
+            const chat = await _converse.api.chats.get(jids, attrs, true);
+
+            if (chat) {
+              return chat.maybeShow(force);
+            }
+
+            return chat;
+          } else if (Array.isArray(jids)) {
+            return Promise.all(jids.map(j => _converse.api.chats.get(j, attrs, true).then(c => c && c.maybeShow(force))).filter(c => c));
+          }
+
+          const err_msg = "chats.open: You need to provide at least one JID";
+          headless_log.error(err_msg);
+          throw new Error(err_msg);
+        },
+
+        /**
+         * Retrieves a chat or all chats.
+         *
+         * @method _converse.api.chats.get
+         * @param {String|string[]} jids - e.g. 'buddy@example.com' or ['buddy1@example.com', 'buddy2@example.com']
+         * @param {Object} [attrs] - Attributes to be set on the _converse.ChatBox model.
+         * @param {Boolean} [create=false] - Whether the chat should be created if it's not found.
+         * @returns { Promise<_converse.ChatBox> }
+         *
+         * @example
+         * // To return a single chat, provide the JID of the contact you're chatting with in that chat:
+         * const model = await _converse.api.chats.get('buddy@example.com');
+         *
+         * @example
+         * // To return an array of chats, provide an array of JIDs:
+         * const models = await _converse.api.chats.get(['buddy1@example.com', 'buddy2@example.com']);
+         *
+         * @example
+         * // To return all open chats, call the method without any parameters::
+         * const models = await _converse.api.chats.get();
+         *
+         */
+        async get(jids) {
+          let attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+          let create = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+          async function _get(jid) {
+            let model = await _converse.api.chatboxes.get(jid);
+
+            if (!model && create) {
+              model = await _converse.api.chatboxes.create(jid, attrs, _converse.ChatBox);
+            } else {
+              model = model && model.get('type') === _converse.PRIVATE_CHAT_TYPE ? model : null;
+
+              if (model && Object.keys(attrs).length) {
+                model.save(attrs);
+              }
+            }
+
+            return model;
+          }
+
+          if (jids === undefined) {
+            const chats = await _converse.api.chatboxes.get();
+            return chats.filter(c => c.get('type') === _converse.PRIVATE_CHAT_TYPE);
+          } else if (Object(lodash["isString"])(jids)) {
+            return _get(jids);
+          }
+
+          return Promise.all(jids.map(jid => _get(jid)));
+        }
+
+      }
+    });
+    /************************ END API ************************/
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-disco.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-disco
+ * @description
+ * Converse plugin which add support for XEP-0030: Service Discovery
+ */
+
+
+
+
+const {
+  Backbone: converse_disco_Backbone,
+  Strophe: converse_disco_Strophe,
+  $iq: converse_disco_$iq,
+  utils: converse_disco_utils
+} = converse_core.env;
+converse_core.plugins.add('converse-disco', {
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this; // Promises exposed by this plugin
+
+    _converse.api.promises.add('discoInitialized');
+
+    _converse.api.promises.add('streamFeaturesAdded');
+    /**
+     * @class
+     * @namespace _converse.DiscoEntity
+     * @memberOf _converse
+     */
+
+
+    _converse.DiscoEntity = converse_disco_Backbone.Model.extend({
+      /* A Disco Entity is a JID addressable entity that can be queried
+       * for features.
+       *
+       * See XEP-0030: https://xmpp.org/extensions/xep-0030.html
+       */
+      idAttribute: 'jid',
+
+      initialize(attrs, options) {
+        this.waitUntilFeaturesDiscovered = converse_disco_utils.getResolveablePromise();
+        this.dataforms = new _converse.Collection();
+        let id = "converse.dataforms-".concat(this.get('jid'));
+        this.dataforms.browserStorage = _converse.createStore(id, 'session');
+        this.features = new _converse.Collection();
+        id = "converse.features-".concat(this.get('jid'));
+        this.features.browserStorage = _converse.createStore(id, 'session');
+        this.listenTo(this.features, 'add', this.onFeatureAdded);
+        this.fields = new _converse.Collection();
+        id = "converse.fields-".concat(this.get('jid'));
+        this.fields.browserStorage = _converse.createStore(id, 'session');
+        this.listenTo(this.fields, 'add', this.onFieldAdded);
+        this.identities = new _converse.Collection();
+        id = "converse.identities-".concat(this.get('jid'));
+        this.identities.browserStorage = _converse.createStore(id, 'session');
+        this.fetchFeatures(options);
+        this.items = new _converse.DiscoEntities();
+        id = "converse.disco-items-".concat(this.get('jid'));
+        this.items.browserStorage = _converse.createStore(id, 'session');
+        this.items.fetch();
+      },
+
+      /**
+       * Returns a Promise which resolves with a map indicating
+       * whether a given identity is provided by this entity.
+       * @private
+       * @method _converse.DiscoEntity#getIdentity
+       * @param { String } category - The identity category
+       * @param { String } type - The identity type
+       */
+      async getIdentity(category, type) {
+        await this.waitUntilFeaturesDiscovered;
+        return this.identities.findWhere({
+          'category': category,
+          'type': type
+        });
+      },
+
+      /**
+       * Returns a Promise which resolves with a map indicating
+       * whether a given feature is supported.
+       * @private
+       * @method _converse.DiscoEntity#hasFeature
+       * @param { String } feature - The feature that might be supported.
+       */
+      async hasFeature(feature) {
+        await this.waitUntilFeaturesDiscovered;
+
+        if (this.features.findWhere({
+          'var': feature
+        })) {
+          return this;
+        }
+      },
+
+      onFeatureAdded(feature) {
+        feature.entity = this;
+        /**
+         * Triggered when Converse has learned of a service provided by the XMPP server.
+         * See XEP-0030.
+         * @event _converse#serviceDiscovered
+         * @type { Backbone.Model }
+         * @example _converse.api.listen.on('featuresDiscovered', feature => { ... });
+         */
+
+        _converse.api.trigger('serviceDiscovered', feature);
+      },
+
+      onFieldAdded(field) {
+        field.entity = this;
+        /**
+         * Triggered when Converse has learned of a disco extension field.
+         * See XEP-0030.
+         * @event _converse#discoExtensionFieldDiscovered
+         * @example _converse.api.listen.on('discoExtensionFieldDiscovered', () => { ... });
+         */
+
+        _converse.api.trigger('discoExtensionFieldDiscovered', field);
+      },
+
+      async fetchFeatures(options) {
+        if (options.ignore_cache) {
+          this.queryInfo();
+        } else {
+          const store_id = this.features.browserStorage.name;
+          const result = await this.features.browserStorage.store.getItem(store_id);
+
+          if (result && result.length === 0 || result === null) {
+            this.queryInfo();
+          } else {
+            this.features.fetch({
+              add: true,
+              success: () => {
+                this.waitUntilFeaturesDiscovered.resolve(this);
+                this.trigger('featuresDiscovered');
+              }
+            });
+            this.identities.fetch({
+              add: true
+            });
+          }
+        }
+      },
+
+      async queryInfo() {
+        let stanza;
+
+        try {
+          stanza = await _converse.api.disco.info(this.get('jid'), null);
+        } catch (iq) {
+          headless_log.error(iq);
+          this.waitUntilFeaturesDiscovered.resolve(this);
+          return;
+        }
+
+        this.onInfo(stanza);
+      },
+
+      onDiscoItems(stanza) {
+        sizzle_default()("query[xmlns=\"".concat(converse_disco_Strophe.NS.DISCO_ITEMS, "\"] item"), stanza).forEach(item => {
+          if (item.getAttribute("node")) {
+            // XXX: Ignore nodes for now.
+            // See: https://xmpp.org/extensions/xep-0030.html#items-nodes
+            return;
+          }
+
+          const jid = item.getAttribute('jid');
+
+          if (this.items.get(jid) === undefined) {
+            const entity = _converse.disco_entities.get(jid);
+
+            if (entity) {
+              this.items.add(entity);
+            } else {
+              this.items.create({
+                'jid': jid
+              });
+            }
+          }
+        });
+      },
+
+      async queryForItems() {
+        if (Object(lodash["isEmpty"])(this.identities.where({
+          'category': 'server'
+        }))) {
+          // Don't fetch features and items if this is not a
+          // server or a conference component.
+          return;
+        }
+
+        const stanza = await _converse.api.disco.items(this.get('jid'));
+        this.onDiscoItems(stanza);
+      },
+
+      onInfo(stanza) {
+        Array.from(stanza.querySelectorAll('identity')).forEach(identity => {
+          this.identities.create({
+            'category': identity.getAttribute('category'),
+            'type': identity.getAttribute('type'),
+            'name': identity.getAttribute('name')
+          });
+        });
+        sizzle_default()("x[type=\"result\"][xmlns=\"".concat(converse_disco_Strophe.NS.XFORM, "\"]"), stanza).forEach(form => {
+          const data = {};
+          sizzle_default()('field', form).forEach(field => {
+            data[field.getAttribute('var')] = {
+              'value': Object(lodash["get"])(field.querySelector('value'), 'textContent'),
+              'type': field.getAttribute('type')
+            };
+          });
+          this.dataforms.create(data);
+        });
+
+        if (stanza.querySelector("feature[var=\"".concat(converse_disco_Strophe.NS.DISCO_ITEMS, "\"]"))) {
+          this.queryForItems();
+        }
+
+        Array.from(stanza.querySelectorAll('feature')).forEach(feature => {
+          this.features.create({
+            'var': feature.getAttribute('var'),
+            'from': stanza.getAttribute('from')
+          });
+        }); // XEP-0128 Service Discovery Extensions
+
+        sizzle_default()('x[type="result"][xmlns="jabber:x:data"] field', stanza).forEach(field => {
+          this.fields.create({
+            'var': field.getAttribute('var'),
+            'value': Object(lodash["get"])(field.querySelector('value'), 'textContent'),
+            'from': stanza.getAttribute('from')
+          });
+        });
+        this.waitUntilFeaturesDiscovered.resolve(this);
+        this.trigger('featuresDiscovered');
+      }
+
+    });
+    _converse.DiscoEntities = _converse.Collection.extend({
+      model: _converse.DiscoEntity,
+
+      fetchEntities() {
+        return new Promise((resolve, reject) => {
+          this.fetch({
+            add: true,
+            success: resolve,
+
+            error(m, e) {
+              headless_log.error(e);
+              reject(new Error("Could not fetch disco entities"));
+            }
+
+          });
+        });
+      }
+
+    });
+
+    function addClientFeatures() {
+      // See https://xmpp.org/registrar/disco-categories.html
+      _converse.api.disco.own.identities.add('client', 'web', 'Converse');
+
+      _converse.api.disco.own.features.add(converse_disco_Strophe.NS.CHATSTATES);
+
+      _converse.api.disco.own.features.add(converse_disco_Strophe.NS.DISCO_INFO);
+
+      _converse.api.disco.own.features.add(converse_disco_Strophe.NS.ROSTERX); // Limited support
+
+
+      if (_converse.message_carbons) {
+        _converse.api.disco.own.features.add(converse_disco_Strophe.NS.CARBONS);
+      }
+      /**
+       * Triggered in converse-disco once the core disco features of
+       * Converse have been added.
+       * @event _converse#addClientFeatures
+       * @example _converse.api.listen.on('addClientFeatures', () => { ... });
+       */
+
+
+      _converse.api.trigger('addClientFeatures');
+
+      return this;
+    }
+
+    function initStreamFeatures() {
+      // Initialize the stream_features collection, and if we're
+      // re-attaching to a pre-existing BOSH session, we restore the
+      // features from cache.
+      // Otherwise the features will be created once we've received them
+      // from the server (see populateStreamFeatures).
+      if (!_converse.stream_features) {
+        const bare_jid = converse_disco_Strophe.getBareJidFromJid(_converse.jid);
+        const id = "converse.stream-features-".concat(bare_jid);
+
+        _converse.api.promises.add('streamFeaturesAdded');
+
+        _converse.stream_features = new _converse.Collection();
+        _converse.stream_features.browserStorage = _converse.createStore(id, "session");
+      }
+    }
+
+    function populateStreamFeatures() {
+      // Strophe.js sets the <stream:features> element on the
+      // Strophe.Connection instance (_converse.connection).
+      //
+      // Once this is done, we populate the _converse.stream_features collection
+      // and trigger streamFeaturesAdded.
+      initStreamFeatures();
+      Array.from(_converse.connection.features.childNodes).forEach(feature => {
+        _converse.stream_features.create({
+          'name': feature.nodeName,
+          'xmlns': feature.getAttribute('xmlns')
+        });
+      });
+      notifyStreamFeaturesAdded();
+    }
+
+    function notifyStreamFeaturesAdded() {
+      /**
+       * Triggered as soon as the stream features are known.
+       * If you want to check whether a stream feature is supported before proceeding,
+       * then you'll first want to wait for this event.
+       * @event _converse#streamFeaturesAdded
+       * @example _converse.api.listen.on('streamFeaturesAdded', () => { ... });
+       */
+      _converse.api.trigger('streamFeaturesAdded');
+    }
+
+    const plugin = this;
+    plugin._identities = [];
+    plugin._features = [];
+
+    function onDiscoInfoRequest(stanza) {
+      const node = stanza.getElementsByTagName('query')[0].getAttribute('node');
+      const attrs = {
+        xmlns: converse_disco_Strophe.NS.DISCO_INFO
+      };
+
+      if (node) {
+        attrs.node = node;
+      }
+
+      const iqresult = converse_disco_$iq({
+        'type': 'result',
+        'id': stanza.getAttribute('id')
+      });
+      const from = stanza.getAttribute('from');
+
+      if (from !== null) {
+        iqresult.attrs({
+          'to': from
+        });
+      }
+
+      iqresult.c('query', attrs);
+
+      plugin._identities.forEach(identity => {
+        const attrs = {
+          'category': identity.category,
+          'type': identity.type
+        };
+
+        if (identity.name) {
+          attrs.name = identity.name;
+        }
+
+        if (identity.lang) {
+          attrs['xml:lang'] = identity.lang;
+        }
+
+        iqresult.c('identity', attrs).up();
+      });
+
+      plugin._features.forEach(feature => iqresult.c('feature', {
+        'var': feature
+      }).up());
+
+      _converse.api.send(iqresult.tree());
+
+      return true;
+    }
+
+    async function initializeDisco() {
+      addClientFeatures();
+
+      _converse.connection.addHandler(onDiscoInfoRequest, converse_disco_Strophe.NS.DISCO_INFO, 'iq', 'get', null, null);
+
+      _converse.disco_entities = new _converse.DiscoEntities();
+      const id = "converse.disco-entities-".concat(_converse.bare_jid);
+      _converse.disco_entities.browserStorage = _converse.createStore(id, 'session');
+      const collection = await _converse.disco_entities.fetchEntities();
+
+      if (collection.length === 0 || !collection.get(_converse.domain)) {
+        // If we don't have an entity for our own XMPP server,
+        // create one.
+        _converse.disco_entities.create({
+          'jid': _converse.domain
+        });
+      }
+      /**
+       * Triggered once the `converse-disco` plugin has been initialized and the
+       * `_converse.disco_entities` collection will be available and populated with at
+       * least the service discovery features of the user's own server.
+       * @event _converse#discoInitialized
+       * @example _converse.api.listen.on('discoInitialized', () => { ... });
+       */
+
+
+      _converse.api.trigger('discoInitialized');
+    }
+    /******************** Event Handlers ********************/
+
+
+    _converse.api.listen.on('userSessionInitialized', async () => {
+      initStreamFeatures();
+
+      if (_converse.connfeedback.get('connection_status') === converse_disco_Strophe.Status.ATTACHED) {
+        // When re-attaching to a BOSH session, we fetch the stream features from the cache.
+        await new Promise((success, error) => _converse.stream_features.fetch({
+          success,
+          error
+        }));
+        notifyStreamFeaturesAdded();
+      }
+    });
+
+    _converse.api.listen.on('beforeResourceBinding', populateStreamFeatures);
+
+    _converse.api.listen.on('reconnected', initializeDisco);
+
+    _converse.api.listen.on('connected', initializeDisco);
+
+    _converse.api.listen.on('beforeTearDown', async () => {
+      _converse.api.promises.add('streamFeaturesAdded');
+
+      if (_converse.stream_features) {
+        await _converse.stream_features.clearSession();
+        delete _converse.stream_features;
+      }
+    });
+
+    _converse.api.listen.on('clearSession', () => {
+      if (_converse.shouldClearCache() && _converse.disco_entities) {
+        Array.from(_converse.disco_entities.models).forEach(e => e.features.clearSession());
+        Array.from(_converse.disco_entities.models).forEach(e => e.identities.clearSession());
+        Array.from(_converse.disco_entities.models).forEach(e => e.dataforms.clearSession());
+        Array.from(_converse.disco_entities.models).forEach(e => e.fields.clearSession());
+
+        _converse.disco_entities.clearSession();
+
+        delete _converse.disco_entities;
+      }
+    });
+    /************************ API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The XEP-0030 service discovery API
+       *
+       * This API lets you discover information about entities on the
+       * XMPP network.
+       *
+       * @namespace _converse.api.disco
+       * @memberOf _converse.api
+       */
+      disco: {
+        /**
+         * @namespace _converse.api.disco.stream
+         * @memberOf _converse.api.disco
+         */
+        stream: {
+          /**
+           * @method _converse.api.disco.stream.getFeature
+           * @param {String} name The feature name
+           * @param {String} xmlns The XML namespace
+           * @example _converse.api.disco.stream.getFeature('ver', 'urn:xmpp:features:rosterver')
+           */
+          async getFeature(name, xmlns) {
+            await _converse.api.waitUntil('streamFeaturesAdded');
+
+            if (!name || !xmlns) {
+              throw new Error("name and xmlns need to be provided when calling disco.stream.getFeature");
+            }
+
+            if (_converse.stream_features === undefined && !_converse.api.connection.connected()) {
+              // Happens during tests when disco lookups happen asynchronously after teardown.
+              const msg = "Tried to get feature ".concat(name, " ").concat(xmlns, " but _converse.stream_features has been torn down");
+              headless_log.warn(msg);
+              return;
+            }
+
+            return _converse.stream_features.findWhere({
+              'name': name,
+              'xmlns': xmlns
+            });
+          }
+
+        },
+
+        /**
+         * @namespace _converse.api.disco.own
+         * @memberOf _converse.api.disco
+         */
+        own: {
+          /**
+           * @namespace _converse.api.disco.own.identities
+           * @memberOf _converse.api.disco.own
+           */
+          identities: {
+            /**
+             * Lets you add new identities for this client (i.e. instance of Converse)
+             * @method _converse.api.disco.own.identities.add
+             *
+             * @param {String} category - server, client, gateway, directory, etc.
+             * @param {String} type - phone, pc, web, etc.
+             * @param {String} name - "Converse"
+             * @param {String} lang - en, el, de, etc.
+             *
+             * @example _converse.api.disco.own.identities.clear();
+             */
+            add(category, type, name, lang) {
+              for (var i = 0; i < plugin._identities.length; i++) {
+                if (plugin._identities[i].category == category && plugin._identities[i].type == type && plugin._identities[i].name == name && plugin._identities[i].lang == lang) {
+                  return false;
+                }
+              }
+
+              plugin._identities.push({
+                category: category,
+                type: type,
+                name: name,
+                lang: lang
+              });
+            },
+
+            /**
+             * Clears all previously registered identities.
+             * @method _converse.api.disco.own.identities.clear
+             * @example _converse.api.disco.own.identities.clear();
+             */
+            clear() {
+              plugin._identities = [];
+            },
+
+            /**
+             * Returns all of the identities registered for this client
+             * (i.e. instance of Converse).
+             * @method _converse.api.disco.identities.get
+             * @example const identities = _converse.api.disco.own.identities.get();
+             */
+            get() {
+              return plugin._identities;
+            }
+
+          },
+
+          /**
+           * @namespace _converse.api.disco.own.features
+           * @memberOf _converse.api.disco.own
+           */
+          features: {
+            /**
+             * Lets you register new disco features for this client (i.e. instance of Converse)
+             * @method _converse.api.disco.own.features.add
+             * @param {String} name - e.g. http://jabber.org/protocol/caps
+             * @example _converse.api.disco.own.features.add("http://jabber.org/protocol/caps");
+             */
+            add(name) {
+              for (var i = 0; i < plugin._features.length; i++) {
+                if (plugin._features[i] == name) {
+                  return false;
+                }
+              }
+
+              plugin._features.push(name);
+            },
+
+            /**
+             * Clears all previously registered features.
+             * @method _converse.api.disco.own.features.clear
+             * @example _converse.api.disco.own.features.clear();
+             */
+            clear() {
+              plugin._features = [];
+            },
+
+            /**
+             * Returns all of the features registered for this client (i.e. instance of Converse).
+             * @method _converse.api.disco.own.features.get
+             * @example const features = _converse.api.disco.own.features.get();
+             */
+            get() {
+              return plugin._features;
+            }
+
+          }
+        },
+
+        /**
+         * Query for information about an XMPP entity
+         *
+         * @method _converse.api.disco.info
+         * @param {string} jid The Jabber ID of the entity to query
+         * @param {string} [node] A specific node identifier associated with the JID
+         * @returns {promise} Promise which resolves once we have a result from the server.
+         */
+        info(jid, node) {
+          const attrs = {
+            xmlns: converse_disco_Strophe.NS.DISCO_INFO
+          };
+
+          if (node) {
+            attrs.node = node;
+          }
+
+          const info = converse_disco_$iq({
+            'from': _converse.connection.jid,
+            'to': jid,
+            'type': 'get'
+          }).c('query', attrs);
+          return _converse.api.sendIQ(info);
+        },
+
+        /**
+         * Query for items associated with an XMPP entity
+         *
+         * @method _converse.api.disco.items
+         * @param {string} jid The Jabber ID of the entity to query for items
+         * @param {string} [node] A specific node identifier associated with the JID
+         * @returns {promise} Promise which resolves once we have a result from the server.
+         */
+        items(jid, node) {
+          const attrs = {
+            'xmlns': converse_disco_Strophe.NS.DISCO_ITEMS
+          };
+
+          if (node) {
+            attrs.node = node;
+          }
+
+          return _converse.api.sendIQ(converse_disco_$iq({
+            'from': _converse.connection.jid,
+            'to': jid,
+            'type': 'get'
+          }).c('query', attrs));
+        },
+
+        /**
+         * Namespace for methods associated with disco entities
+         *
+         * @namespace _converse.api.disco.entities
+         * @memberOf _converse.api.disco
+         */
+        entities: {
+          /**
+           * Get the corresponding `DiscoEntity` instance.
+           *
+           * @method _converse.api.disco.entities.get
+           * @param {string} jid The Jabber ID of the entity
+           * @param {boolean} [create] Whether the entity should be created if it doesn't exist.
+           * @example _converse.api.disco.entities.get(jid);
+           */
+          async get(jid) {
+            let create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+            await _converse.api.waitUntil('discoInitialized');
+
+            if (!jid) {
+              return _converse.disco_entities;
+            }
+
+            if (_converse.disco_entities === undefined && !_converse.api.connection.connected()) {
+              // Happens during tests when disco lookups happen asynchronously after teardown.
+              const msg = "Tried to look up entity ".concat(jid, " but _converse.disco_entities has been torn down");
+              headless_log.warn(msg);
+              return;
+            }
+
+            const entity = _converse.disco_entities.get(jid);
+
+            if (entity || !create) {
+              return entity;
+            }
+
+            return _converse.api.disco.entities.create(jid);
+          },
+
+          /**
+           * Create a new disco entity. It's identity and features
+           * will automatically be fetched from cache or from the
+           * XMPP server.
+           *
+           * Fetching from cache can be disabled by passing in
+           * `ignore_cache: true` in the options parameter.
+           *
+           * @method _converse.api.disco.entities.create
+           * @param {string} jid The Jabber ID of the entity
+           * @param {object} [options] Additional options
+           * @param {boolean} [options.ignore_cache]
+           *     If true, fetch all features from the XMPP server instead of restoring them from cache
+           * @example _converse.api.disco.entities.create(jid, {'ignore_cache': true});
+           */
+          create(jid, options) {
+            return _converse.disco_entities.create({
+              'jid': jid
+            }, options);
+          }
+
+        },
+
+        /**
+         * @namespace _converse.api.disco.features
+         * @memberOf _converse.api.disco
+         */
+        features: {
+          /**
+           * Return a given feature of a disco entity
+           *
+           * @method _converse.api.disco.features.get
+           * @param {string} feature The feature that might be
+           *     supported. In the XML stanza, this is the `var`
+           *     attribute of the `<feature>` element. For
+           *     example: `http://jabber.org/protocol/muc`
+           * @param {string} jid The JID of the entity
+           *     (and its associated items) which should be queried
+           * @returns {promise} A promise which resolves with a list containing
+           *     _converse.Entity instances representing the entity
+           *     itself or those items associated with the entity if
+           *     they support the given feature.
+           * @example
+           * _converse.api.disco.features.get(Strophe.NS.MAM, _converse.bare_jid);
+           */
+          async get(feature, jid) {
+            if (!jid) {
+              throw new TypeError('You need to provide an entity JID');
+            }
+
+            await _converse.api.waitUntil('discoInitialized');
+            let entity = await _converse.api.disco.entities.get(jid, true);
+
+            if (_converse.disco_entities === undefined && !_converse.api.connection.connected()) {
+              // Happens during tests when disco lookups happen asynchronously after teardown.
+              const msg = "Tried to get feature ".concat(feature, " for ").concat(jid, " but _converse.disco_entities has been torn down");
+              headless_log.warn(msg);
+              return;
+            }
+
+            entity = await entity.waitUntilFeaturesDiscovered;
+            const promises = [...entity.items.map(i => i.hasFeature(feature)), entity.hasFeature(feature)];
+            const result = await Promise.all(promises);
+            return result.filter(lodash["isObject"]);
+          }
+
+        },
+
+        /**
+         * Used to determine whether an entity supports a given feature.
+         *
+         * @method _converse.api.disco.supports
+         * @param {string} feature The feature that might be
+         *     supported. In the XML stanza, this is the `var`
+         *     attribute of the `<feature>` element. For
+         *     example: `http://jabber.org/protocol/muc`
+         * @param {string} jid The JID of the entity
+         *     (and its associated items) which should be queried
+         * @returns {promise} A promise which resolves with `true` or `false`.
+         * @example
+         * if (await _converse.api.disco.supports(Strophe.NS.MAM, _converse.bare_jid)) {
+         *     // The feature is supported
+         * } else {
+         *     // The feature is not supported
+         * }
+         */
+        async supports(feature, jid) {
+          const features = await _converse.api.disco.features.get(feature, jid);
+          return features.length > 0;
+        },
+
+        /**
+         * Refresh the features (and fields and identities) associated with a
+         * disco entity by refetching them from the server
+         *
+         * @method _converse.api.disco.refreshFeatures
+         * @param {string} jid The JID of the entity whose features are refreshed.
+         * @returns {promise} A promise which resolves once the features have been refreshed
+         * @example
+         * await _converse.api.disco.refreshFeatures('room@conference.example.org');
+         */
+        async refreshFeatures(jid) {
+          if (!jid) {
+            throw new TypeError('api.disco.refreshFeatures: You need to provide an entity JID');
+          }
+
+          await _converse.api.waitUntil('discoInitialized');
+          let entity = await _converse.api.disco.entities.get(jid);
+
+          if (entity) {
+            entity.features.reset();
+            entity.fields.reset();
+            entity.identities.reset();
+
+            if (!entity.waitUntilFeaturesDiscovered.isPending) {
+              entity.waitUntilFeaturesDiscovered = converse_disco_utils.getResolveablePromise();
+            }
+
+            entity.queryInfo();
+          } else {
+            // Create it if it doesn't exist
+            entity = await _converse.api.disco.entities.create(jid, {
+              'ignore_cache': true
+            });
+          }
+
+          return entity.waitUntilFeaturesDiscovered;
+        },
+
+        /**
+         * Return all the features associated with a disco entity
+         *
+         * @method _converse.api.disco.getFeatures
+         * @param {string} jid The JID of the entity whose features are returned.
+         * @returns {promise} A promise which resolves with the returned features
+         * @example
+         * const features = await _converse.api.disco.getFeatures('room@conference.example.org');
+         */
+        async getFeatures(jid) {
+          if (!jid) {
+            throw new TypeError('api.disco.getFeatures: You need to provide an entity JID');
+          }
+
+          await _converse.api.waitUntil('discoInitialized');
+          let entity = await _converse.api.disco.entities.get(jid, true);
+          entity = await entity.waitUntilFeaturesDiscovered;
+          return entity.features;
+        },
+
+        /**
+         * Return all the service discovery extensions fields
+         * associated with an entity.
+         *
+         * See [XEP-0129: Service Discovery Extensions](https://xmpp.org/extensions/xep-0128.html)
+         *
+         * @method _converse.api.disco.getFields
+         * @param {string} jid The JID of the entity whose fields are returned.
+         * @example
+         * const fields = await _converse.api.disco.getFields('room@conference.example.org');
+         */
+        async getFields(jid) {
+          if (!jid) {
+            throw new TypeError('api.disco.getFields: You need to provide an entity JID');
+          }
+
+          await _converse.api.waitUntil('discoInitialized');
+          let entity = await _converse.api.disco.entities.get(jid, true);
+          entity = await entity.waitUntilFeaturesDiscovered;
+          return entity.fields;
+        },
+
+        /**
+         * Get the identity (with the given category and type) for a given disco entity.
+         *
+         * For example, when determining support for PEP (personal eventing protocol), you
+         * want to know whether the user's own JID has an identity with
+         * `category='pubsub'` and `type='pep'` as explained in this section of
+         * XEP-0163: https://xmpp.org/extensions/xep-0163.html#support
+         *
+         * @method _converse.api.disco.getIdentity
+         * @param {string} The identity category.
+         *     In the XML stanza, this is the `category`
+         *     attribute of the `<identity>` element.
+         *     For example: 'pubsub'
+         * @param {string} type The identity type.
+         *     In the XML stanza, this is the `type`
+         *     attribute of the `<identity>` element.
+         *     For example: 'pep'
+         * @param {string} jid The JID of the entity which might have the identity
+         * @returns {promise} A promise which resolves with a map indicating
+         *     whether an identity with a given type is provided by the entity.
+         * @example
+         * _converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid).then(
+         *     function (identity) {
+         *         if (identity) {
+         *             // The entity DOES have this identity
+         *         } else {
+         *             // The entity DOES NOT have this identity
+         *         }
+         *     }
+         * ).catch(e => log.error(e));
+         */
+        async getIdentity(category, type, jid) {
+          const e = await _converse.api.disco.entities.get(jid, true);
+
+          if (e === undefined && !_converse.api.connection.connected()) {
+            // Happens during tests when disco lookups happen asynchronously after teardown.
+            const msg = "Tried to look up category ".concat(category, " for ").concat(jid, " but _converse.disco_entities has been torn down");
+            headless_log.warn(msg);
+            return;
+          }
+
+          return e.getIdentity(category, type);
+        }
+
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./node_modules/twemoji/dist/twemoji.esm.js
+/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */
+var twemoji=function(){"use strict";var twemoji={base:"https://twemoji.maxcdn.com/v/12.1.4/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){if(this.parentNode){this.parentNode.replaceChild(createText(this.alt,false),this)}},parse:parse,replace:replace,test:test},escaper={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},re=/(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69])(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5\udeeb\udeec\udef4-\udefa\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd71\udd73-\udd76\udd7a-\udda2\udda5-\uddaa\uddae-\uddb4\uddb7\uddba\uddbc-\uddca\uddd0\uddde-\uddff\ude70-\ude73\ude78-\ude7a\ude80-\ude82\ude90-\ude95]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,UFE0Fg=/\uFE0F/g,U200D=String.fromCharCode(8205),rescaper=/[&<>'"]/g,shouldntBeParsed=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,fromCharCode=String.fromCharCode;return twemoji;function createText(text,clean){return document.createTextNode(clean?text.replace(UFE0Fg,""):text)}function escapeHTML(s){return s.replace(rescaper,replacer)}function defaultImageSrcGenerator(icon,options){return"".concat(options.base,options.size,"/",icon,options.ext)}function grabAllTextNodes(node,allText){var childNodes=node.childNodes,length=childNodes.length,subnode,nodeType;while(length--){subnode=childNodes[length];nodeType=subnode.nodeType;if(nodeType===3){allText.push(subnode)}else if(nodeType===1&&!("ownerSVGElement"in subnode)&&!shouldntBeParsed.test(subnode.nodeName.toLowerCase())){grabAllTextNodes(subnode,allText)}}return allText}function grabTheRightIcon(rawText){return toCodePoint(rawText.indexOf(U200D)<0?rawText.replace(UFE0Fg,""):rawText)}function parseNode(node,options){var allText=grabAllTextNodes(node,[]),length=allText.length,attrib,attrname,modified,fragment,subnode,text,match,i,index,img,rawText,iconId,src;while(length--){modified=false;fragment=document.createDocumentFragment();subnode=allText[length];text=subnode.nodeValue;i=0;while(match=re.exec(text)){index=match.index;if(index!==i){fragment.appendChild(createText(text.slice(i,index),true))}rawText=match[0];iconId=grabTheRightIcon(rawText);i=index+rawText.length;src=options.callback(iconId,options);if(iconId&&src){img=new Image;img.onerror=options.onerror;img.setAttribute("draggable","false");attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf("on")!==0&&!img.hasAttribute(attrname)){img.setAttribute(attrname,attrib[attrname])}}img.className=options.className;img.alt=rawText;img.src=src;modified=true;fragment.appendChild(img)}if(!img)fragment.appendChild(createText(rawText,false));img=null}if(modified){if(i<text.length){fragment.appendChild(createText(text.slice(i),true))}subnode.parentNode.replaceChild(fragment,subnode)}}return node}function parseString(str,options){return replace(str,function(rawText){var ret=rawText,iconId=grabTheRightIcon(rawText),src=options.callback(iconId,options),attrib,attrname;if(iconId&&src){ret="<img ".concat('class="',options.className,'" ','draggable="false" ','alt="',rawText,'"',' src="',src,'"');attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf("on")!==0&&ret.indexOf(" "+attrname+"=")===-1){ret=ret.concat(" ",attrname,'="',escapeHTML(attrib[attrname]),'"')}}ret=ret.concat("/>")}return ret})}function replacer(m){return escaper[m]}function returnNull(){return null}function toSizeSquaredAsset(value){return typeof value==="number"?value+"x"+value:value}function fromCodePoint(codepoint){var code=typeof codepoint==="string"?parseInt(codepoint,16):codepoint;if(code<65536){return fromCharCode(code)}code-=65536;return fromCharCode(55296+(code>>10),56320+(code&1023))}function parse(what,how){if(!how||typeof how==="function"){how={callback:how}}return(typeof what==="string"?parseString:parseNode)(what,{callback:how.callback||defaultImageSrcGenerator,attributes:typeof how.attributes==="function"?how.attributes:returnNull,base:typeof how.base==="string"?how.base:twemoji.base,ext:how.ext||twemoji.ext,size:how.folder||toSizeSquaredAsset(how.size||twemoji.size),className:how.className||twemoji.className,onerror:how.onerror||twemoji.onerror})}function replace(text,callback){return String(text).replace(re,callback)}function test(text){re.lastIndex=0;var result=re.test(text);re.lastIndex=0;return result}function toCodePoint(unicodeSurrogates,sep){var r=[],c=0,p=0,i=0;while(i<unicodeSurrogates.length){c=unicodeSurrogates.charCodeAt(i++);if(p){r.push((65536+(p-55296<<10)+(c-56320)).toString(16));p=0}else if(55296<=c&&c<=56319){p=c}else{r.push(c.toString(16))}}return r.join(sep||"-")}}();
+/* harmony default export */ var twemoji_esm = (twemoji);
+// CONCATENATED MODULE: ./src/headless/converse-emoji.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2012-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-emoji
+ */
+
+
+
+const {
+  Backbone: converse_emoji_Backbone
+} = converse_core.env;
+const converse_emoji_u = converse_core.env.utils;
+const ASCII_LIST = {
+  '*\\0/*': '1f646',
+  '*\\O/*': '1f646',
+  '-___-': '1f611',
+  ':\'-)': '1f602',
+  '\':-)': '1f605',
+  '\':-D': '1f605',
+  '>:-)': '1f606',
+  '\':-(': '1f613',
+  '>:-(': '1f620',
+  ':\'-(': '1f622',
+  'O:-)': '1f607',
+  '0:-3': '1f607',
+  '0:-)': '1f607',
+  '0;^)': '1f607',
+  'O;-)': '1f607',
+  '0;-)': '1f607',
+  'O:-3': '1f607',
+  '-__-': '1f611',
+  ':-Þ': '1f61b',
+  '</3': '1f494',
+  ':\')': '1f602',
+  ':-D': '1f603',
+  '\':)': '1f605',
+  '\'=)': '1f605',
+  '\':D': '1f605',
+  '\'=D': '1f605',
+  '>:)': '1f606',
+  '>;)': '1f606',
+  '>=)': '1f606',
+  ';-)': '1f609',
+  '*-)': '1f609',
+  ';-]': '1f609',
+  ';^)': '1f609',
+  '\':(': '1f613',
+  '\'=(': '1f613',
+  ':-*': '1f618',
+  ':^*': '1f618',
+  '>:P': '1f61c',
+  'X-P': '1f61c',
+  '>:[': '1f61e',
+  ':-(': '1f61e',
+  ':-[': '1f61e',
+  '>:(': '1f620',
+  ':\'(': '1f622',
+  ';-(': '1f622',
+  '>.<': '1f623',
+  '#-)': '1f635',
+  '%-)': '1f635',
+  'X-)': '1f635',
+  '\\0/': '1f646',
+  '\\O/': '1f646',
+  '0:3': '1f607',
+  '0:)': '1f607',
+  'O:)': '1f607',
+  'O=)': '1f607',
+  'O:3': '1f607',
+  'B-)': '1f60e',
+  '8-)': '1f60e',
+  'B-D': '1f60e',
+  '8-D': '1f60e',
+  '-_-': '1f611',
+  '>:\\': '1f615',
+  '>:/': '1f615',
+  ':-/': '1f615',
+  ':-.': '1f615',
+  ':-P': '1f61b',
+  ':Þ': '1f61b',
+  ':-b': '1f61b',
+  ':-O': '1f62e',
+  'O_O': '1f62e',
+  '>:O': '1f62e',
+  ':-X': '1f636',
+  ':-#': '1f636',
+  ':-)': '1f642',
+  '(y)': '1f44d',
+  '<3': '2764',
+  ':D': '1f603',
+  '=D': '1f603',
+  ';)': '1f609',
+  '*)': '1f609',
+  ';]': '1f609',
+  ';D': '1f609',
+  ':*': '1f618',
+  '=*': '1f618',
+  ':(': '1f61e',
+  ':[': '1f61e',
+  '=(': '1f61e',
+  ':@': '1f620',
+  ';(': '1f622',
+  'D:': '1f628',
+  ':$': '1f633',
+  '=$': '1f633',
+  '#)': '1f635',
+  '%)': '1f635',
+  'X)': '1f635',
+  'B)': '1f60e',
+  '8)': '1f60e',
+  ':/': '1f615',
+  ':\\': '1f615',
+  '=/': '1f615',
+  '=\\': '1f615',
+  ':L': '1f615',
+  '=L': '1f615',
+  ':P': '1f61b',
+  '=P': '1f61b',
+  ':b': '1f61b',
+  ':O': '1f62e',
+  ':X': '1f636',
+  ':#': '1f636',
+  '=X': '1f636',
+  '=#': '1f636',
+  ':)': '1f642',
+  '=]': '1f642',
+  '=)': '1f642',
+  ':]': '1f642'
+};
+const ASCII_REGEX = '(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:\'\\-\\)|\'\\:\\-\\)|\'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|\'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:\'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-Þ|\\:\\-Þ|\\<\\/3|<\\/3|\\:\'\\)|\\:\\-D|\'\\:\\)|\'\\=\\)|\'\\:D|\'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|\'\\:\\(|\'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:\'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:Þ|\\:Þ|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])';
+const ASCII_REPLACE_REGEX = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)" + ASCII_REGEX + "(?=\\s|$|[!,.?]))", "gi");
+
+function convert(unicode) {
+  // Converts unicode code points and code pairs
+  // to their respective characters
+  if (unicode.indexOf("-") > -1) {
+    const parts = [],
+          s = unicode.split('-');
+
+    for (let i = 0; i < s.length; i++) {
+      let part = parseInt(s[i], 16);
+
+      if (part >= 0x10000 && part <= 0x10FFFF) {
+        const hi = Math.floor((part - 0x10000) / 0x400) + 0xD800;
+        const lo = (part - 0x10000) % 0x400 + 0xDC00;
+        part = String.fromCharCode(hi) + String.fromCharCode(lo);
+      } else {
+        part = String.fromCharCode(part);
+      }
+
+      parts.push(part);
+    }
+
+    return parts.join('');
+  }
+
+  return twemoji_esm.convert.fromCodePoint(unicode);
+}
+
+converse_core.plugins.add('converse-emoji', {
+  async initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      ___
+    } = _converse;
+
+    _converse.api.settings.update({
+      'emoji_image_path': twemoji_esm.base,
+      'emoji_categories': {
+        "recent": ":clock1:",       // BAO issue #47
+        "smileys": ":grinning:",
+        "people": ":thumbsup:",
+        "activity": ":soccer:",
+        "travel": ":motorcycle:",
+        "objects": ":bomb:",
+        "nature": ":rainbow:",
+        "food": ":hotdog:",
+        "symbols": ":musical_note:",
+        "flags": ":flag_ac:",
+        "custom": null
+      },
+      // We use the triple-underscore method which doesn't actually
+      // translate but does signify to gettext that these strings should
+      // go into the POT file. The translation then happens in the
+      // template. We do this so that users can pass in their own
+      // strings via converse.initialize, which is before __ is
+      // available.
+      'emoji_category_labels': {
+        "recent": ___("Recent"),     // BAO issue #47
+        "smileys": ___("Smileys and emotions"),
+        "people": ___("People"),
+        "activity": ___("Activities"),
+        "travel": ___("Travel"),
+        "objects": ___("Objects"),
+        "nature": ___("Animals and nature"),
+        "food": ___("Food and drink"),
+        "symbols": ___("Symbols"),
+        "flags": ___("Flags"),
+        "custom": ___("Stickers")
+      }
+    });
+
+    _converse.api.promises.add('emojisInitialized', false);
+
+    twemoji_esm.base = _converse.emoji_image_path;
+    /**
+     * Model for storing data related to the Emoji picker widget
+     * @class
+     * @namespace _converse.EmojiPicker
+     * @memberOf _converse
+     */
+
+    _converse.EmojiPicker = converse_emoji_Backbone.Model.extend({
+      defaults: {
+        'current_category': 'smileys',
+        'current_skintone': '',
+        'scroll_position': 0
+      }
+    });
+    _converse.emojis = {};
+
+    function getTonedEmojis() {
+      if (!_converse.toned_emojis) {
+        _converse.toned_emojis = lodash_noconflict_default.a.uniq(Object.values(_converse.emojis.json.people).filter(person => person.sn.includes('_tone')).map(person => person.sn.replace(/_tone[1-5]/, '')));
+      }
+
+      return _converse.toned_emojis;
+    }
+    /************************ BEGIN Utils ************************/
+    // Closured cache
+
+
+    const emojis_by_attribute = {};
+    Object.assign(converse_emoji_u, {
+      /**
+       * Replaces emoji shortnames in the passed-in string with unicode or image-based emojis
+       * (based on the value of `use_system_emojis`).
+       * @method u.addEmoji
+       * @param {string} text = The text
+       * @returns {string} The text with shortnames replaced with emoji
+       *  unicodes or images.
+       */
+      addEmoji(text) {
+        return converse_emoji_u.getEmojiRenderer()(text);
+      },
+
+      /**
+       * Based on the value of `use_system_emojis` will return either
+       * a function that converts emoji shortnames into unicode glyphs
+       * (see {@link u.shortnameToUnicode} or one that converts them into images.
+       * unicode emojis
+       * @method u.getEmojiRenderer
+       * @returns {function}
+       */
+      getEmojiRenderer() {
+        const how = {
+          'attributes': icon => {
+            const codepoint = twemoji_esm.convert.toCodePoint(icon);
+            return {
+              'title': "".concat(converse_emoji_u.getEmojisByAtrribute('cp')[codepoint]['sn'], " ").concat(icon)
+            };
+          }
+        };
+        const transform = converse_emoji_u.shortnamesToEmojis;
+        return _converse.use_system_emojis ? transform : text => twemoji_esm.parse(transform(text), how);
+      },
+
+      /**
+       * Returns an emoji represented by the passed in shortname.
+       * Scans the passed in text for shortnames and replaces them with
+       * emoji unicode glyphs or alternatively if it's a custom emoji
+       * without unicode representation then markup for an HTML image tag
+       * is returned.
+       *
+       * The shortname needs to be defined in `emojis.json`
+       * and needs to have either a `cp` attribute for the codepoint, or
+       * an `url` attribute which points to the source for the image.
+       *
+       * @method u.shortnamesToEmojis
+       * @param {string} str - String containg the shortname(s)
+       */
+      shortnamesToEmojis(str) {
+        let unicode_only = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+        str = str.replace(_converse.emojis.shortnames_regex, shortname => {
+          if (typeof shortname === 'undefined' || shortname === '' || !_converse.emoji_shortnames.includes(shortname)) {
+            // if the shortname doesnt exist just return the entire match
+            return shortname;
+          }
+
+          const codepoint = _converse.emojis_map[shortname].cp;
+
+          if (codepoint) {
+            return convert(codepoint.toUpperCase());
+          } else if (unicode_only) {
+            return shortname;
+          } else {
+            return "<img class=\"emoji\" draggable=\"false\" alt=\"".concat(shortname, "\" src=\"").concat(_converse.emojis_map[shortname].url, "\"/>");
+          }
+        }); // Also replace ASCII smileys
+
+        str = str.replace(ASCII_REPLACE_REGEX, (entire, m1, m2, m3) => {
+          if (typeof m3 === 'undefined' || m3 === '' || !(converse_emoji_u.unescapeHTML(m3) in ASCII_LIST)) {
+            // if the ascii doesnt exist just return the entire match
+            return entire;
+          }
+
+          m3 = converse_emoji_u.unescapeHTML(m3);
+          const unicode = ASCII_LIST[m3].toUpperCase();
+          return m2 + convert(unicode);
+        });
+        return str;
+      },
+
+      /**
+       * Returns unicode represented by the passed in shortname.
+       * @method u.shortnameToUnicode
+       * @param {string} str - String containg the shortname(s)
+       */
+      shortnameToUnicode(str) {
+        return this.shortnamesToEmojis(str, true);
+      },
+
+      /**
+       * Determines whether the passed in string is just a single emoji shortname;
+       * @method u.isOnlyEmojis
+       * @param {string} shortname - A string which migh be just an emoji shortname
+       * @returns {boolean}
+       */
+      isOnlyEmojis(text) {
+        const words = text.trim().split(/\s+/);
+
+        if (words.length === 0 || words.length > 3) {
+          return false;
+        }
+
+        const rejects = words.filter(text => {
+          const result = twemoji_esm.parse(converse_emoji_u.shortnameToUnicode(text));
+          const match = result.match(/<img class="emoji" draggable="false" alt=".*?" src=".*?\.png"\/>/);
+          return !match || match.length !== 1;
+        });
+        return rejects.length === 0;
+      },
+
+      /**
+       * @method u.getEmojisByAtrribute
+       * @param {string} attr - The attribute according to which the
+       *  returned map should be keyed.
+       * @returns {object} - Map of emojis with the passed in attribute values
+       *  as keys and a list of emojis for a particular category as values.
+       */
+      getEmojisByAtrribute(attr) {
+        if (emojis_by_attribute[attr]) {
+          return emojis_by_attribute[attr];
+        }
+
+        if (attr === 'category') {
+          return _converse.emojis.json;
+        }
+
+        const all_variants = _converse.emojis_list.map(e => e[attr]).filter((c, i, arr) => arr.indexOf(c) == i);
+
+        emojis_by_attribute[attr] = {};
+        all_variants.forEach(v => emojis_by_attribute[attr][v] = lodash_noconflict_default.a.find(_converse.emojis_list, i => i[attr] === v));
+        return emojis_by_attribute[attr];
+      }
+
+    });
+    /************************ END Utils ************************/
+
+    const {
+      default: json
+    } = await __webpack_require__.e(/* import() | emojis */ 129).then(__webpack_require__.t.bind(null, 496, 3));
+    _converse.emojis.json = json;
+    _converse.emojis.categories = Object.keys(_converse.emojis.json);
+    _converse.emojis_map = _converse.emojis.categories.reduce((result, cat) => Object.assign(result, _converse.emojis.json[cat]), {});
+    _converse.emojis_list = Object.values(_converse.emojis_map);
+
+    _converse.emojis_list.sort((a, b) => a.sn < b.sn ? -1 : a.sn > b.sn ? 1 : 0);
+
+    _converse.emoji_shortnames = _converse.emojis_list.map(m => m.sn);
+
+    const getShortNames = () => _converse.emoji_shortnames.map(s => s.replace(/[+]/g, "\\$&")).join('|');
+
+    _converse.emojis.shortnames_regex = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(" + getShortNames() + ")", "gi");
+    _converse.emojis.toned = getTonedEmojis();
+    /**
+     * Triggered once the JSON file representing emoji data has been
+     * fetched and its save to start calling emoji utility methods.
+     * @event _converse#emojisInitialized
+     */
+
+    _converse.api.trigger('emojisInitialized');
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('clearSession', () => {
+      if (_converse.emojipicker) {
+        _converse.emojipicker.destroy();
+
+        delete _converse.emojipicker;
+      }
+    });
+    /************************ END Event Handlers ************************/
+
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/utils/muc.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// This is the utilities module.
+//
+// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+
+
+const {
+  Strophe: muc_Strophe,
+  sizzle: muc_sizzle
+} = converse_core.env;
+/**
+ * The MUC utils object. Contains utility functions related to multi-user chat.
+ * @namespace stanza_utils
+ */
+
+const muc_utils = {
+  /**
+   * Given two lists of objects with 'jid', 'affiliation' and
+   * 'reason' properties, return a new list containing
+   * those objects that are new, changed or removed
+   * (depending on the 'remove_absentees' boolean).
+   *
+   * The affiliations for new and changed members stay the
+   * same, for removed members, the affiliation is set to 'none'.
+   *
+   * The 'reason' property is not taken into account when
+   * comparing whether affiliations have been changed.
+   * @private
+   * @method muc_utils#computeAffiliationsDelta
+   * @param { boolean } exclude_existing - Indicates whether JIDs from
+   *      the new list which are also in the old list
+   *      (regardless of affiliation) should be excluded
+   *      from the delta. One reason to do this
+   *      would be when you want to add a JID only if it
+   *      doesn't have *any* existing affiliation at all.
+   * @param { boolean } remove_absentees - Indicates whether JIDs
+   *      from the old list which are not in the new list
+   *      should be considered removed and therefore be
+   *      included in the delta with affiliation set
+   *      to 'none'.
+   * @param { array } new_list - Array containing the new affiliations
+   * @param { array } old_list - Array containing the old affiliations
+   * @returns { array }
+   */
+  computeAffiliationsDelta(exclude_existing, remove_absentees, new_list, old_list) {
+    const new_jids = new_list.map(o => o.jid);
+    const old_jids = old_list.map(o => o.jid); // Get the new affiliations
+
+    let delta = Object(lodash["difference"])(new_jids, old_jids).map(jid => new_list[Object(lodash["indexOf"])(new_jids, jid)]);
+
+    if (!exclude_existing) {
+      // Get the changed affiliations
+      delta = delta.concat(new_list.filter(item => {
+        const idx = Object(lodash["indexOf"])(old_jids, item.jid);
+        return idx >= 0 ? item.affiliation !== old_list[idx].affiliation : false;
+      }));
+    }
+
+    if (remove_absentees) {
+      // Get the removed affiliations
+      delta = delta.concat(Object(lodash["difference"])(old_jids, new_jids).map(jid => ({
+        'jid': jid,
+        'affiliation': 'none'
+      })));
+    }
+
+    return delta;
+  },
+
+  /**
+   * Given an IQ stanza with a member list, create an array of objects containing
+   * known member data (e.g. jid, nick, role, affiliation).
+   * @private
+   * @method muc_utils#parseMemberListIQ
+   * @returns { MemberListItem[] }
+   */
+  parseMemberListIQ(iq) {
+    return muc_sizzle("query[xmlns=\"".concat(muc_Strophe.NS.MUC_ADMIN, "\"] item"), iq).map(item => {
+      /**
+       * @typedef {Object} MemberListItem
+       * Either the JID or the nickname (or both) will be available.
+       * @property {string} affiliation
+       * @property {string} [role]
+       * @property {string} [jid]
+       * @property {string} [nick]
+       */
+      const data = {
+        'affiliation': item.getAttribute('affiliation')
+      };
+      const jid = item.getAttribute('jid');
+
+      if (utils_core.isValidJID(jid)) {
+        data['jid'] = jid;
+      } else {
+        // XXX: Prosody sends nick for the jid attribute value
+        // Perhaps for anonymous room?
+        data['nick'] = jid;
+      }
+
+      const nick = item.getAttribute('nick');
+
+      if (nick) {
+        data['nick'] = nick;
+      }
+
+      const role = item.getAttribute('role');
+
+      if (role) {
+        data['role'] = nick;
+      }
+
+      return data;
+    });
+  }
+
+};
+/* harmony default export */ var utils_muc = (muc_utils);
+// EXTERNAL MODULE: ./src/headless/templates/field.html
+var templates_field = __webpack_require__(120);
+var field_default = /*#__PURE__*/__webpack_require__.n(templates_field);
+
+// CONCATENATED MODULE: ./src/headless/utils/form.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// This is the utilities module.
+//
+// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+
+
+
+/**
+ * Takes an HTML DOM and turns it into an XForm field.
+ * @private
+ * @method u#webForm2xForm
+ * @param { DOMElement } field - the field to convert
+ */
+
+utils_core.webForm2xForm = function (field) {
+  let value;
+
+  if (field.getAttribute('type') === 'checkbox') {
+    value = field.checked && 1 || 0;
+  } else if (field.tagName == "TEXTAREA") {
+    value = lodash_noconflict_default.a.filter(field.value.split('\n'), lodash_noconflict_default.a.trim);
+  } else if (field.tagName == "SELECT") {
+    value = utils_core.getSelectValues(field);
+  } else {
+    value = field.value;
+  }
+
+  return utils_core.stringToNode(field_default()({
+    'name': field.getAttribute('name'),
+    'value': value
+  }));
+};
+
+/* harmony default export */ var utils_form = (utils_core);
+// CONCATENATED MODULE: ./src/headless/converse-muc.js
+/**
+ * @module converse-muc
+ * @copyright The Converse.js developers
+ * @license Mozilla Public License (MPLv2)
+ * @description Implements the non-view logic for XEP-0045 Multi-User Chat
+ */
+
+
+
+
+
+
+
+
+
+const MUC_ROLE_WEIGHTS = {
+  'moderator': 1,
+  'participant': 2,
+  'visitor': 3,
+  'none': 2
+};
+const {
+  Strophe: converse_muc_Strophe,
+  Backbone: converse_muc_Backbone,
+  $iq: converse_muc_$iq,
+  $build: converse_muc_$build,
+  $msg: converse_muc_$msg,
+  $pres: converse_muc_$pres,
+  sizzle: converse_muc_sizzle
+} = converse_core.env; // Add Strophe Namespaces
+
+converse_muc_Strophe.addNamespace('MUC_ADMIN', converse_muc_Strophe.NS.MUC + "#admin");
+converse_muc_Strophe.addNamespace('MUC_OWNER', converse_muc_Strophe.NS.MUC + "#owner");
+converse_muc_Strophe.addNamespace('MUC_REGISTER', "jabber:iq:register");
+converse_muc_Strophe.addNamespace('MUC_ROOMCONF', converse_muc_Strophe.NS.MUC + "#roomconfig");
+converse_muc_Strophe.addNamespace('MUC_USER', converse_muc_Strophe.NS.MUC + "#user");
+converse_core.MUC_NICK_CHANGED_CODE = "303";
+converse_core.ROOM_FEATURES = ['passwordprotected', 'unsecured', 'hidden', 'publicroom', 'membersonly', 'open', 'persistent', 'temporary', 'nonanonymous', 'semianonymous', 'moderated', 'unmoderated', 'mam_enabled']; // No longer used in code, but useful as reference.
+//
+// const ROOM_FEATURES_MAP = {
+//     'passwordprotected': 'unsecured',
+//     'unsecured': 'passwordprotected',
+//     'hidden': 'publicroom',
+//     'publicroom': 'hidden',
+//     'membersonly': 'open',
+//     'open': 'membersonly',
+//     'persistent': 'temporary',
+//     'temporary': 'persistent',
+//     'nonanonymous': 'semianonymous',
+//     'semianonymous': 'nonanonymous',
+//     'moderated': 'unmoderated',
+//     'unmoderated': 'moderated'
+// };
+
+converse_core.ROOMSTATUS = {
+  CONNECTED: 0,
+  CONNECTING: 1,
+  NICKNAME_REQUIRED: 2,
+  PASSWORD_REQUIRED: 3,
+  DISCONNECTED: 4,
+  ENTERED: 5,
+  DESTROYED: 6
+};
+converse_core.plugins.add('converse-muc', {
+  /* Optional dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin. They are called "optional" because they might not be
+   * available, in which case any overrides applicable to them will be
+   * ignored.
+   *
+   * It's possible however to make optional dependencies non-optional.
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chatboxes", "converse-chat", "converse-disco", "converse-controlbox"],
+  overrides: {
+    ChatBoxes: {
+      model(attrs, options) {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (attrs && attrs.type == _converse.CHATROOMS_TYPE) {
+          return new _converse.ChatRoom(attrs, options);
+        } else {
+          return this.__super__.model.apply(this, arguments);
+        }
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __,
+      ___
+    } = _converse; // Configuration values for this plugin
+    // ====================================
+    // Refer to docs/source/configuration.rst for explanations of these
+    // configuration settings.
+
+    _converse.api.settings.update({
+      'allow_muc': true,
+      'allow_muc_invitations': true,
+      'auto_join_on_invite': false,
+      'auto_join_rooms': [],
+      'auto_register_muc_nickname': false,
+      'locked_muc_domain': false,
+      'muc_domain': undefined,
+      'muc_fetch_members': true,
+      'muc_history_max_stanzas': undefined,
+      'muc_instant_rooms': true,
+      'muc_nickname_from_jid': false,
+      'muc_show_logs_before_join': false
+    });
+
+    _converse.api.promises.add(['roomsAutoJoined']);
+
+    if (_converse.locked_muc_domain && !Object(lodash["isString"])(_converse.muc_domain)) {
+      throw new Error("Config Error: it makes no sense to set locked_muc_domain " + "to true when muc_domain is not set");
+    }
+    /* https://xmpp.org/extensions/xep-0045.html
+     * ----------------------------------------
+     * 100 message      Entering a groupchat         Inform user that any occupant is allowed to see the user's full JID
+     * 101 message (out of band)                     Affiliation change  Inform user that his or her affiliation changed while not in the groupchat
+     * 102 message      Configuration change         Inform occupants that groupchat now shows unavailable members
+     * 103 message      Configuration change         Inform occupants that groupchat now does not show unavailable members
+     * 104 message      Configuration change         Inform occupants that a non-privacy-related groupchat configuration change has occurred
+     * 110 presence     Any groupchat presence       Inform user that presence refers to one of its own groupchat occupants
+     * 170 message or initial presence               Configuration change    Inform occupants that groupchat logging is now enabled
+     * 171 message      Configuration change         Inform occupants that groupchat logging is now disabled
+     * 172 message      Configuration change         Inform occupants that the groupchat is now non-anonymous
+     * 173 message      Configuration change         Inform occupants that the groupchat is now semi-anonymous
+     * 174 message      Configuration change         Inform occupants that the groupchat is now fully-anonymous
+     * 201 presence     Entering a groupchat         Inform user that a new groupchat has been created
+     * 210 presence     Entering a groupchat         Inform user that the service has assigned or modified the occupant's roomnick
+     * 301 presence     Removal from groupchat       Inform user that he or she has been banned from the groupchat
+     * 303 presence     Exiting a groupchat          Inform all occupants of new groupchat nickname
+     * 307 presence     Removal from groupchat       Inform user that he or she has been kicked from the groupchat
+     * 321 presence     Removal from groupchat       Inform user that he or she is being removed from the groupchat because of an affiliation change
+     * 322 presence     Removal from groupchat       Inform user that he or she is being removed from the groupchat because the groupchat has been changed to members-only and the user is not a member
+     * 332 presence     Removal from groupchat       Inform user that he or she is being removed from the groupchat because of a system shutdown
+     */
+
+
+    _converse.muc = {
+      info_messages: {
+        100: __('This groupchat is not anonymous'),
+        102: __('This groupchat now shows unavailable members'),
+        103: __('This groupchat does not show unavailable members'),
+        104: __('The groupchat configuration has changed'),
+        170: __('Groupchat logging is now enabled'),
+        171: __('Groupchat logging is now disabled'),
+        172: __('This groupchat is now no longer anonymous'),
+        173: __('This groupchat is now semi-anonymous'),
+        174: __('This groupchat is now fully-anonymous'),
+        201: __('A new groupchat has been created')
+      },
+      new_nickname_messages: {
+        // XXX: Note the triple underscore function and not double underscore.
+        210: ___('Your nickname has been automatically set to %1$s'),
+        303: ___('Your nickname has been changed to %1$s')
+      },
+      disconnect_messages: {
+        301: __('You have been banned from this groupchat'),
+        307: __('You have been kicked from this groupchat'),
+        321: __("You have been removed from this groupchat because of an affiliation change"),
+        322: __("You have been removed from this groupchat because the groupchat has changed to members-only and you're not a member"),
+        332: __("You have been removed from this groupchat because the service hosting it is being shut down")
+      },
+      action_info_messages: {
+        // XXX: Note the triple underscore function and not double underscore.
+        301: ___("%1$s has been banned"),
+        303: ___("%1$s's nickname has changed"),
+        307: ___("%1$s has been kicked out"),
+        321: ___("%1$s has been removed because of an affiliation change"),
+        322: ___("%1$s has been removed for not being a member")
+      }
+    };
+
+    async function openRoom(jid) {
+      if (!utils_form.isValidMUCJID(jid)) {
+        return headless_log.warn("invalid jid \"".concat(jid, "\" provided in url fragment"));
+      }
+
+      await _converse.api.waitUntil('roomsAutoJoined');
+
+      if (_converse.allow_bookmarks) {
+        await _converse.api.waitUntil('bookmarksInitialized');
+      }
+
+      _converse.api.rooms.open(jid);
+    }
+
+    _converse.router.route('converse/room?jid=:jid', openRoom);
+
+    _converse.getDefaultMUCNickname = function () {
+      // XXX: if anything changes here, update the docs for the
+      // locked_muc_nickname setting.
+      if (!_converse.xmppstatus) {
+        throw new Error("Can't call _converse.getDefaultMUCNickname before the statusInitialized has been fired.");
+      }
+
+      const nick = _converse.xmppstatus.getNickname();
+
+      if (nick) {
+        return nick;
+      } else if (_converse.muc_nickname_from_jid) {
+        return converse_muc_Strophe.unescapeNode(converse_muc_Strophe.getNodeFromJid(_converse.bare_jid));
+      }
+    };
+
+    async function openChatRoom(jid, settings) {
+      /* Opens a groupchat, making sure that certain attributes
+       * are correct, for example that the "type" is set to
+       * "chatroom".
+       */
+      settings.type = _converse.CHATROOMS_TYPE;
+      settings.id = jid;
+      const chatbox = await _converse.api.rooms.get(jid, settings, true);
+      chatbox.maybeShow(true);
+      return chatbox;
+    }
+    /**
+     * Represents a MUC message
+     * @class
+     * @namespace _converse.ChatRoomMessage
+     * @memberOf _converse
+     */
+
+
+    _converse.ChatRoomMessage = _converse.Message.extend({
+      initialize() {
+        if (this.get('file')) {
+          this.on('change:put', this.uploadFile, this);
+        }
+
+        if (!this.setTimerForEphemeralMessage()) {
+          this.setOccupant();
+        }
+        /**
+         * Triggered once a {@link _converse.ChatRoomMessageInitialized} has been created and initialized.
+         * @event _converse#chatRoomMessageInitialized
+         * @type { _converse.ChatRoomMessages}
+         * @example _converse.api.listen.on('chatRoomMessageInitialized', model => { ... });
+         */
+
+
+        _converse.api.trigger('chatRoomMessageInitialized', this);
+      },
+
+      onOccupantRemoved() {
+        this.stopListening(this.occupant);
+        delete this.occupant;
+        const chatbox = Object(lodash["get"])(this, 'collection.chatbox');
+
+        if (!chatbox) {
+          return headless_log.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));
+        }
+
+        this.listenTo(chatbox.occupants, 'add', this.onOccupantAdded);
+      },
+
+      onOccupantAdded(occupant) {
+        if (occupant.get('nick') === converse_muc_Strophe.getResourceFromJid(this.get('from'))) {
+          this.occupant = occupant;
+          this.listenTo(this.occupant, 'destroy', this.onOccupantRemoved);
+          const chatbox = Object(lodash["get"])(this, 'collection.chatbox');
+
+          if (!chatbox) {
+            return headless_log.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));
+          }
+
+          this.stopListening(chatbox.occupants, 'add', this.onOccupantAdded);
+        }
+      },
+
+      setOccupant() {
+        if (this.get('type') !== 'groupchat') {
+          return;
+        }
+
+        const chatbox = Object(lodash["get"])(this, 'collection.chatbox');
+
+        if (!chatbox) {
+          return headless_log.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));
+        }
+
+        const nick = converse_muc_Strophe.getResourceFromJid(this.get('from'));
+        this.occupant = chatbox.occupants.findWhere({
+          'nick': nick
+        });
+
+        if (this.occupant) {
+          this.listenTo(this.occupant, 'destroy', this.onOccupantRemoved);
+        } else {
+          this.listenTo(chatbox.occupants, 'add', this.onOccupantAdded);
+        }
+      }
+
+    });
+    const MUCSession = converse_muc_Backbone.Model.extend({
+      defaults() {
+        return {
+          'connection_status': converse_core.ROOMSTATUS.DISCONNECTED
+        };
+      }
+
+    });
+    /**
+     * Collection which stores MUC messages
+     * @class
+     * @namespace _converse.ChatRoomMessages
+     * @memberOf _converse
+     */
+
+    _converse.ChatRoomMessages = _converse.Collection.extend({
+      model: _converse.ChatRoomMessage,
+      comparator: 'time'
+    });
+    /**
+     * Represents an open/ongoing groupchat conversation.
+     * @class
+     * @namespace _converse.ChatRoom
+     * @memberOf _converse
+     */
+
+    _converse.ChatRoom = _converse.ChatBox.extend({
+      messagesCollection: _converse.ChatRoomMessages,
+
+      defaults() {
+        return {
+          // For group chats, we distinguish between generally unread
+          // messages and those ones that specifically mention the
+          // user.
+          //
+          // To keep things simple, we reuse `num_unread` from
+          // _converse.ChatBox to indicate unread messages which
+          // mention the user and `num_unread_general` to indicate
+          // generally unread messages (which *includes* mentions!).
+          'num_unread_general': 0,
+          'bookmarked': false,
+          'chat_state': undefined,
+          'description': '',
+          'hidden': ['mobile', 'fullscreen'].includes(_converse.view_mode),
+          'message_type': 'groupchat',
+          'name': '',
+          'num_unread': 0,
+          'roomconfig': {},
+          'time_sent': new Date(0).toISOString(),
+          'time_opened': this.get('time_opened') || new Date().getTime(),
+          'type': _converse.CHATROOMS_TYPE
+        };
+      },
+
+      async initialize() {
+        this.initialized = utils_form.getResolveablePromise();
+        this.set('box_id', "box-".concat(btoa(this.get('jid'))));
+        this.initMessages();
+        this.initOccupants();
+        this.initFeatures(); // sendChatState depends on this.features
+
+        this.registerHandlers();
+        this.on('change:chat_state', this.sendChatState, this);
+        await this.restoreSession();
+        this.session.on('change:connection_status', this.onConnectionStatusChanged, this);
+        const restored = await this.restoreFromCache();
+
+        if (!restored) {
+          this.join();
+        }
+        /**
+         * Triggered once a {@link _converse.ChatRoom} has been created and initialized.
+         * @event _converse#chatRoomInitialized
+         * @type { _converse.ChatRoom }
+         * @example _converse.api.listen.on('chatRoomInitialized', model => { ... });
+         */
+
+
+        await _converse.api.trigger('chatRoomInitialized', this, {
+          'Synchronous': true
+        });
+        this.initialized.resolve();
+      },
+
+      /**
+       * Checks whether we're still joined and if so, restores the MUC state from cache.
+       * @private
+       * @method _converse.ChatRoom#restoreFromCache
+       * @returns { Boolean } Returns `true` if we're still joined, otherwise returns `false`.
+       */
+      async restoreFromCache() {
+        if (this.session.get('connection_status') === converse_core.ROOMSTATUS.ENTERED && (await this.isJoined())) {
+          // We've restored the room from cache and we're still joined.
+          await new Promise(resolve => this.features.fetch({
+            'success': resolve,
+            'error': resolve
+          }));
+          await this.fetchOccupants();
+          await this.fetchMessages();
+          return true;
+        } else {
+          await this.clearCache();
+          return false;
+        }
+      },
+
+      /**
+       * Join the MUC
+       * @private
+       * @method _converse.ChatRoom#join
+       * @param { String } nick - The user's nickname
+       * @param { String } [password] - Optional password, if required by the groupchat.
+       */
+      async join(nick, password) {
+        if (this.session.get('connection_status') === converse_core.ROOMSTATUS.ENTERED) {
+          // We have restored a groupchat from session storage,
+          // so we don't send out a presence stanza again.
+          return this;
+        }
+
+        await this.refreshRoomFeatures();
+        nick = await this.getAndPersistNickname(nick);
+
+        if (!nick) {
+          utils_form.safeSave(this.session, {
+            'connection_status': converse_core.ROOMSTATUS.NICKNAME_REQUIRED
+          });
+
+          if (_converse.muc_show_logs_before_join) {
+            await this.fetchMessages();
+          }
+
+          return this;
+        }
+
+        const stanza = converse_muc_$pres({
+          'from': _converse.connection.jid,
+          'to': this.getRoomJIDAndNick()
+        }).c("x", {
+          'xmlns': converse_muc_Strophe.NS.MUC
+        }).c("history", {
+          'maxstanzas': this.features.get('mam_enabled') ? 0 : _converse.muc_history_max_stanzas
+        }).up();
+
+        if (password) {
+          stanza.cnode(converse_muc_Strophe.xmlElement("password", [], password));
+        }
+
+        this.session.save('connection_status', converse_core.ROOMSTATUS.CONNECTING);
+
+        _converse.api.send(stanza);
+
+        return this;
+      },
+
+      async clearCache() {
+        this.session.save('connection_status', converse_core.ROOMSTATUS.DISCONNECTED);
+
+        if (this.occupants.length) {
+          // Remove non-members when reconnecting
+          this.occupants.filter(o => !o.isMember()).forEach(o => o.destroy());
+        } else {
+          // Looks like we haven't restored occupants from cache, so we clear it.
+          this.occupants.clearSession();
+        }
+
+        if (_converse.clear_messages_on_reconnection) {
+          await this.clearMessages();
+        }
+      },
+
+      /**
+       * Clear stale cache and re-join a MUC we've been in before.
+       * @private
+       * @method _converse.ChatRoom#rejoin
+       */
+      rejoin() {
+        this.clearCache();
+        return this.join();
+      },
+
+      async onConnectionStatusChanged() {
+        if (this.session.get('connection_status') === converse_core.ROOMSTATUS.ENTERED) {
+          if (_converse.muc_fetch_members) {
+            await this.occupants.fetchMembers();
+          }
+
+          await this.fetchMessages();
+          /**
+           * Triggered when the user has entered a new MUC
+           * @event _converse#enteredNewRoom
+           * @type { _converse.ChatRoom}
+           * @example _converse.api.listen.on('enteredNewRoom', model => { ... });
+           */
+
+          _converse.api.trigger('enteredNewRoom', this);
+
+          if (_converse.auto_register_muc_nickname && (await _converse.api.disco.supports(converse_muc_Strophe.NS.MUC_REGISTER, this.get('jid')))) {
+            this.registerNickname();
+          }
+        }
+      },
+
+      async onReconnection() {
+        this.registerHandlers();
+        await this.rejoin();
+        this.announceReconnection();
+      },
+
+      restoreSession() {
+        const id = "muc.session-".concat(_converse.bare_jid, "-").concat(this.get('jid'));
+        this.session = new MUCSession({
+          id
+        });
+        this.session.browserStorage = _converse.createStore(id, "session");
+        return new Promise(r => this.session.fetch({
+          'success': r,
+          'error': r
+        }));
+      },
+
+      initFeatures() {
+        const id = "converse.muc-features-".concat(_converse.bare_jid, "-").concat(this.get('jid'));
+        this.features = new converse_muc_Backbone.Model(Object.assign({
+          id
+        }, Object(lodash["zipObject"])(converse_core.ROOM_FEATURES, converse_core.ROOM_FEATURES.map(() => false))));
+        this.features.browserStorage = _converse.createStore(id, "session");
+      },
+
+      initOccupants() {
+        this.occupants = new _converse.ChatRoomOccupants();
+        const id = "converse.occupants-".concat(_converse.bare_jid).concat(this.get('jid'));
+        this.occupants.browserStorage = _converse.createStore(id, 'session');
+        this.occupants.chatroom = this;
+      },
+
+      fetchOccupants() {
+        this.occupants.fetched = new Promise(resolve => {
+          this.occupants.fetch({
+            'add': true,
+            'silent': true,
+            'success': resolve,
+            'error': resolve
+          });
+        });
+        return this.occupants.fetched;
+      },
+
+      handleAffiliationChangedMessage(stanza) {
+        const item = converse_muc_sizzle("x[xmlns=\"".concat(converse_muc_Strophe.NS.MUC_USER, "\"] item"), stanza).pop();
+
+        if (item) {
+          const from = stanza.getAttribute("from");
+          const type = stanza.getAttribute("type");
+          const affiliation = item.getAttribute('affiliation');
+          const jid = item.getAttribute('jid');
+          const data = {
+            from,
+            type,
+            affiliation,
+            'nick': converse_muc_Strophe.getNodeFromJid(jid),
+            'states': [],
+            'show': type == 'unavailable' ? 'offline' : 'online',
+            'role': item.getAttribute('role'),
+            'jid': converse_muc_Strophe.getBareJidFromJid(jid),
+            'resource': converse_muc_Strophe.getResourceFromJid(jid)
+          };
+          const occupant = this.occupants.findOccupant({
+            'jid': data.jid
+          });
+
+          if (occupant) {
+            occupant.save(data);
+          } else {
+            this.occupants.create(data);
+          }
+        }
+      },
+
+      registerHandlers() {
+        // Register presence and message handlers for this groupchat
+        const room_jid = this.get('jid');
+        this.removeHandlers();
+        this.presence_handler = _converse.connection.addHandler(stanza => this.onPresence(stanza) || true, null, 'presence', null, null, room_jid, {
+          'ignoreNamespaceFragment': true,
+          'matchBareFromJid': true
+        });
+        this.message_handler = _converse.connection.addHandler(stanza => {
+          if (converse_muc_sizzle("message > result[xmlns=\"".concat(converse_muc_Strophe.NS.MAM, "\"]"), stanza).pop()) {
+            // MAM messages are handled in converse-mam.
+            // We shouldn't get MAM messages here because
+            // they shouldn't have a `type` attribute.
+            headless_log.warn("received a mam message with type \"chat\".");
+            return true;
+          }
+
+          this.onMessage(stanza);
+          return true;
+        }, null, 'message', 'groupchat', null, room_jid, {
+          'matchBareFromJid': true
+        });
+        this.affiliation_message_handler = _converse.connection.addHandler(stanza => this.handleAffiliationChangedMessage(stanza) || true, converse_muc_Strophe.NS.MUC_USER, 'message', null, null, room_jid);
+      },
+
+      removeHandlers() {
+        // Remove the presence and message handlers that were
+        // registered for this groupchat.
+        if (this.message_handler) {
+          _converse.connection && _converse.connection.deleteHandler(this.message_handler);
+          delete this.message_handler;
+        }
+
+        if (this.presence_handler) {
+          _converse.connection && _converse.connection.deleteHandler(this.presence_handler);
+          delete this.presence_handler;
+        }
+
+        if (this.affiliation_message_handler) {
+          _converse.connection && _converse.connection.deleteHandler(this.affiliation_message_handler);
+          delete this.affiliation_message_handler;
+        }
+
+        return this;
+      },
+
+      getDisplayName() {
+        const name = this.get('name');
+
+        if (name) {
+          return name;
+        } else if (_converse.locked_muc_domain === 'hidden') {
+          return converse_muc_Strophe.getNodeFromJid(this.get('jid'));
+        } else {
+          return this.get('jid');
+        }
+      },
+
+      /**
+       * Sends a message stanza to the XMPP server and expects a reflection
+       * or error message within a specific timeout period.
+       * @private
+       * @method _converse.ChatRoom#sendTimedMessage
+       * @param { _converse.Message|XMLElement } message
+       * @returns { Promise<XMLElement>|Promise<_converse.TimeoutError> } Returns a promise
+       *  which resolves with the reflected message stanza or rejects
+       *  with an error stanza or with a {@link _converse.TimeoutError}.
+       */
+      sendTimedMessage(el) {
+        if (typeof el.tree === "function") {
+          el = el.tree();
+        }
+
+        let id = el.getAttribute('id');
+
+        if (!id) {
+          // inject id if not found
+          id = this.getUniqueId("sendIQ");
+          el.setAttribute("id", id);
+        }
+
+        const promise = utils_form.getResolveablePromise();
+
+        const timeoutHandler = _converse.connection.addTimedHandler(_converse.STANZA_TIMEOUT, () => {
+          _converse.connection.deleteHandler(handler);
+
+          promise.reject(new _converse.TimeoutError("Timeout Error: No response from server"));
+          return false;
+        });
+
+        const handler = _converse.connection.addHandler(stanza => {
+          timeoutHandler && _converse.connection.deleteTimedHandler(timeoutHandler);
+
+          if (stanza.getAttribute('type') === 'groupchat') {
+            promise.resolve(stanza);
+          } else {
+            promise.reject(stanza);
+          }
+        }, null, 'message', ['error', 'groupchat'], id);
+
+        _converse.api.send(el);
+
+        return promise;
+      },
+
+      /**
+       * Sends a message stanza to retract a message in this groupchat.
+       * @private
+       * @method _converse.ChatRoom#sendRetractionMessage
+       * @param { _converse.Message } message - The message which we're retracting.
+       */
+      sendRetractionMessage(message) {
+        const origin_id = message.get('origin_id');
+
+        if (!origin_id) {
+          throw new Error("Can't retract message without a XEP-0359 Origin ID");
+        }
+
+        const msg = converse_muc_$msg({
+          'id': utils_form.getUniqueId(),
+          'to': this.get('jid'),
+          'type': "groupchat"
+        }).c('store', {
+          xmlns: converse_muc_Strophe.NS.HINTS
+        }).up().c("apply-to", {
+          'id': origin_id,
+          'xmlns': converse_muc_Strophe.NS.FASTEN
+        }).c('retract', {
+          xmlns: converse_muc_Strophe.NS.RETRACT
+        });
+        return this.sendTimedMessage(msg);
+      },
+
+      /**
+       * Sends an IQ stanza to the XMPP server to retract a message in this groupchat.
+       * @private
+       * @method _converse.ChatRoom#sendRetractionIQ
+       * @param { _converse.Message } message - The message which we're retracting.
+       * @param { string } [reason] - The reason for retracting the message.
+       */
+      sendRetractionIQ(message, reason) {
+        const iq = converse_muc_$iq({
+          'to': this.get('jid'),
+          'type': "set"
+        }).c("apply-to", {
+          'id': message.get("stanza_id ".concat(this.get('jid'))),
+          'xmlns': converse_muc_Strophe.NS.FASTEN
+        }).c('moderate', {
+          xmlns: converse_muc_Strophe.NS.MODERATE
+        }).c('retract', {
+          xmlns: converse_muc_Strophe.NS.RETRACT
+        }).up().c('reason').t(reason);
+        return _converse.api.sendIQ(iq, null, false);
+      },
+
+      /**
+       * Sends an IQ stanza to the XMPP server to destroy this groupchat. Not
+       * to be confused with the {@link _converse.ChatRoom#destroy}
+       * method, which simply removes the room from the local browser storage cache.
+       * @private
+       * @method _converse.ChatRoom#sendDestroyIQ
+       * @param { string } [reason] - The reason for destroying the groupchat.
+       * @param { string } [new_jid] - The JID of the new groupchat which replaces this one.
+       */
+      sendDestroyIQ(reason, new_jid) {
+        const destroy = converse_muc_$build("destroy");
+
+        if (new_jid) {
+          destroy.attrs({
+            'jid': new_jid
+          });
+        }
+
+        const iq = converse_muc_$iq({
+          'to': this.get('jid'),
+          'type': "set"
+        }).c("query", {
+          'xmlns': converse_muc_Strophe.NS.MUC_OWNER
+        }).cnode(destroy.node);
+
+        if (reason && reason.length > 0) {
+          iq.c("reason", reason);
+        }
+
+        return _converse.api.sendIQ(iq);
+      },
+
+      /**
+       * Leave the groupchat.
+       * @private
+       * @method _converse.ChatRoom#leave
+       * @param { string } [exit_msg] - Message to indicate your reason for leaving
+       */
+      async leave(exit_msg) {
+        this.features.destroy();
+        this.occupants.clearSession();
+
+        if (_converse.disco_entities) {
+          const disco_entity = _converse.disco_entities.get(this.get('jid'));
+
+          if (disco_entity) {
+            await new Promise((success, error) => disco_entity.destroy({
+              success,
+              error
+            }));
+          }
+        }
+
+        if (_converse.api.connection.connected()) {
+          this.sendUnavailablePresence(exit_msg);
+        }
+
+        utils_form.safeSave(this.session, {
+          'connection_status': converse_core.ROOMSTATUS.DISCONNECTED
+        });
+        this.removeHandlers();
+      },
+
+      async close() {
+        // Delete the session model
+        await new Promise(resolve => this.session.destroy({
+          'success': resolve,
+          'error': (m, e) => {
+            headless_log.error(e);
+            resolve();
+          }
+        })); // Delete the features model
+
+        await new Promise(resolve => this.features.destroy({
+          'success': resolve,
+          'error': (m, e) => {
+            headless_log.error(e);
+            resolve();
+          }
+        }));
+        return _converse.ChatBox.prototype.close.call(this);
+      },
+
+      canRetractMessages() {
+        const self = this.getOwnOccupant();
+        return self && self.isModerator() && _converse.api.disco.supports(converse_muc_Strophe.NS.MODERATE, this.get('jid'));
+      },
+
+      sendUnavailablePresence(exit_msg) {
+        const presence = converse_muc_$pres({
+          type: "unavailable",
+          from: _converse.connection.jid,
+          to: this.getRoomJIDAndNick()
+        });
+
+        if (exit_msg !== null) {
+          presence.c("status", exit_msg);
+        }
+
+        _converse.connection.sendPresence(presence);
+      },
+
+      getReferenceForMention(mention, index) {
+        const longest_match = utils_form.getLongestSubstring(mention, this.occupants.map(o => o.getDisplayName()));
+
+        if (!longest_match) {
+          return null;
+        }
+
+        if ((mention[longest_match.length] || '').match(/[A-Za-zäëïöüâêîôûáéíóúàèìòùÄËÏÖÜÂÊÎÔÛÁÉÍÓÚÀÈÌÒÙ0-9]/i)) {
+          // avoid false positives, i.e. mentions that have
+          // further alphabetical characters than our longest
+          // match.
+          return null;
+        }
+
+        const occupant = this.occupants.findOccupant({
+          'nick': longest_match
+        }) || this.occupants.findOccupant({
+          'jid': longest_match
+        });
+
+        if (!occupant) {
+          return null;
+        }
+
+        const obj = {
+          'begin': index,
+          'end': index + longest_match.length,
+          'value': longest_match,
+          'type': 'mention'
+        };
+
+        if (occupant.get('jid')) {
+          obj.uri = encodeURI("xmpp:".concat(occupant.get('jid')));
+        } else {
+          obj.uri = encodeURI("xmpp:".concat(this.get('jid'), "/").concat(occupant.get('nick')));
+        }
+
+        return obj;
+      },
+
+      extractReference(text, index) {
+        for (let i = index; i < text.length; i++) {
+          if (text[i] === '@' && (i === 0 || text[i - 1] === ' ')) {
+            const match = text.slice(i + 1),
+                  ref = this.getReferenceForMention(match, i);
+
+            if (ref) {
+              return [text.slice(0, i) + match, ref, i];
+            }
+          }
+        }
+
+        return;
+      },
+
+      parseTextForReferences(text) {
+        const refs = [];
+        let index = 0;
+
+        while (index < (text || '').length) {
+          const result = this.extractReference(text, index);
+
+          if (result) {
+            text = result[0]; // @ gets filtered out
+
+            refs.push(result[1]);
+            index = result[2];
+          } else {
+            break;
+          }
+        }
+
+        return [text, refs];
+      },
+
+      getOutgoingMessageAttributes(text, spoiler_hint) {
+        const is_spoiler = this.get('composing_spoiler');
+        var references;
+        [text, references] = this.parseTextForReferences(text);
+        const origin_id = utils_form.getUniqueId();
+        return {
+          'id': origin_id,
+          'msgid': origin_id,
+          'origin_id': origin_id,
+          'from': "".concat(this.get('jid'), "/").concat(this.get('nick')),
+          'fullname': this.get('nick'),
+          'is_only_emojis': text ? utils_form.isOnlyEmojis(text) : false,
+          'is_spoiler': is_spoiler,
+          'message': text ? utils_form.httpToGeoUri(utils_form.shortnameToUnicode(text), _converse) : undefined,
+          'nick': this.get('nick'),
+          'references': references,
+          'sender': 'me',
+          'spoiler_hint': is_spoiler ? spoiler_hint : undefined,
+          'type': 'groupchat'
+        };
+      },
+
+      /**
+       * Utility method to construct the JID for the current user
+       * as occupant of the groupchat.
+       *
+       * @returns {string} - The groupchat JID with the user's nickname added at the end.
+       * @example groupchat@conference.example.org/nickname
+       */
+      getRoomJIDAndNick() {
+        const nick = this.get('nick');
+        const jid = converse_muc_Strophe.getBareJidFromJid(this.get('jid'));
+        return jid + (nick !== null ? "/".concat(nick) : "");
+      },
+
+      /**
+       * Sends a message with the current XEP-0085 chat state of the user
+       * as taken from the `chat_state` attribute of the {@link _converse.ChatRoom}.
+       * @private
+       * @method _converse.ChatRoom#sendChatState
+       */
+      sendChatState() {
+        if (!_converse.send_chat_state_notifications || !this.get('chat_state') || this.session.get('connection_status') !== converse_core.ROOMSTATUS.ENTERED || this.features.get('moderated') && this.getOwnRole() === 'visitor') {
+          return;
+        }
+
+        const allowed = _converse.send_chat_state_notifications;
+
+        if (Array.isArray(allowed) && !allowed.includes(this.get('chat_state'))) {
+          return;
+        }
+
+        const chat_state = this.get('chat_state');
+
+        if (chat_state === _converse.GONE) {
+          // <gone/> is not applicable within MUC context
+          return;
+        }
+
+        _converse.api.send(converse_muc_$msg({
+          'to': this.get('jid'),
+          'type': 'groupchat'
+        }).c(chat_state, {
+          'xmlns': converse_muc_Strophe.NS.CHATSTATES
+        }).up().c('no-store', {
+          'xmlns': converse_muc_Strophe.NS.HINTS
+        }).up().c('no-permanent-store', {
+          'xmlns': converse_muc_Strophe.NS.HINTS
+        }));
+      },
+
+      /**
+       * Send a direct invitation as per XEP-0249
+       * @private
+       * @method _converse.ChatRoom#directInvite
+       * @param { String } recipient - JID of the person being invited
+       * @param { String } [reason] - Reason for the invitation
+       */
+      directInvite(recipient, reason) {
+        if (this.features.get('membersonly')) {
+          // When inviting to a members-only groupchat, we first add
+          // the person to the member list by giving them an
+          // affiliation of 'member' otherwise they won't be able to join.
+          this.updateMemberLists([{
+            'jid': recipient,
+            'affiliation': 'member',
+            'reason': reason
+          }]);
+        }
+
+        const attrs = {
+          'xmlns': 'jabber:x:conference',
+          'jid': this.get('jid')
+        };
+
+        if (reason !== null) {
+          attrs.reason = reason;
+        }
+
+        if (this.get('password')) {
+          attrs.password = this.get('password');
+        }
+
+        const invitation = converse_muc_$msg({
+          'from': _converse.connection.jid,
+          'to': recipient,
+          'id': utils_form.getUniqueId()
+        }).c('x', attrs);
+
+        _converse.api.send(invitation);
+        /**
+         * After the user has sent out a direct invitation (as per XEP-0249),
+         * to a roster contact, asking them to join a room.
+         * @event _converse#chatBoxMaximized
+         * @type { object }
+         * @property { _converse.ChatRoom } room
+         * @property { string } recipient - The JID of the person being invited
+         * @property { string } reason - The original reason for the invitation
+         * @example _converse.api.listen.on('chatBoxMaximized', view => { ... });
+         */
+
+
+        _converse.api.trigger('roomInviteSent', {
+          'room': this,
+          'recipient': recipient,
+          'reason': reason
+        });
+      },
+
+      async refreshRoomFeatures() {
+        await _converse.api.disco.refreshFeatures(this.get('jid'));
+        return this.getRoomFeatures();
+      },
+
+      async getRoomFeatures() {
+        let identity;
+
+        try {
+          identity = await _converse.api.disco.getIdentity('conference', 'text', this.get('jid'));
+        } catch (e) {
+          // Getting the identity probably failed because this room doesn't exist yet.
+          return headless_log.error(e);
+        }
+
+        const fields = await _converse.api.disco.getFields(this.get('jid'));
+        this.save({
+          'name': identity && identity.get('name'),
+          'description': Object(lodash["get"])(fields.findWhere({
+            'var': "muc#roominfo_description"
+          }), 'attributes.value')
+        });
+        const features = await _converse.api.disco.getFeatures(this.get('jid'));
+        const attrs = Object.assign(Object(lodash["zipObject"])(converse_core.ROOM_FEATURES, converse_core.ROOM_FEATURES.map(() => false)), {
+          'fetched': new Date().toISOString()
+        });
+        features.each(feature => {
+          const fieldname = feature.get('var');
+
+          if (!fieldname.startsWith('muc_')) {
+            if (fieldname === converse_muc_Strophe.NS.MAM) {
+              attrs.mam_enabled = true;
+            }
+
+            return;
+          }
+
+          attrs[fieldname.replace('muc_', '')] = true;
+        });
+        attrs.description = Object(lodash["get"])(fields.findWhere({
+          'var': "muc#roominfo_description"
+        }), 'attributes.value');
+        this.features.save(attrs);
+      },
+
+      /**
+       * Send IQ stanzas to the server to set an affiliation for
+       * the provided JIDs.
+       * See: https://xmpp.org/extensions/xep-0045.html#modifymember
+       *
+       * Prosody doesn't accept multiple JIDs' affiliations
+       * being set in one IQ stanza, so as a workaround we send
+       * a separate stanza for each JID.
+       * Related ticket: https://issues.prosody.im/345
+       *
+       * @private
+       * @method _converse.ChatRoom#setAffiliation
+       * @param { string } affiliation - The affiliation
+       * @param { object } members - A map of jids, affiliations and
+       *      optionally reasons. Only those entries with the
+       *      same affiliation as being currently set will be considered.
+       * @returns { Promise } A promise which resolves and fails depending on the XMPP server response.
+       */
+      setAffiliation(affiliation, members) {
+        members = members.filter(m => m.affiliation === undefined || m.affiliation === affiliation);
+        return Promise.all(members.map(m => this.sendAffiliationIQ(affiliation, m)));
+      },
+
+      /**
+       * Submit the groupchat configuration form by sending an IQ
+       * stanza to the server.
+       * @private
+       * @method _converse.ChatRoom#saveConfiguration
+       * @param { HTMLElement } form - The configuration form DOM element.
+       *      If no form is provided, the default configuration
+       *      values will be used.
+       * @returns { Promise<XMLElement> }
+       * Returns a promise which resolves once the XMPP server
+       * has return a response IQ.
+       */
+      saveConfiguration(form) {
+        const inputs = form ? converse_muc_sizzle(':input:not([type=button]):not([type=submit])', form) : [];
+        const configArray = inputs.map(utils_form.webForm2xForm);
+        return this.sendConfiguration(configArray);
+      },
+
+      /**
+       * Given a <field> element, return a copy with a <value> child if
+       * we can find a value for it in this rooms config.
+       * @private
+       * @method _converse.ChatRoom#addFieldValue
+       * @returns { Element }
+       */
+      addFieldValue(field) {
+        const type = field.getAttribute('type');
+
+        if (type === 'fixed') {
+          return field;
+        }
+
+        const fieldname = field.getAttribute('var').replace('muc#roomconfig_', '');
+        const config = this.get('roomconfig');
+
+        if (fieldname in config) {
+          let values;
+
+          switch (type) {
+            case 'boolean':
+              values = [config[fieldname] ? 1 : 0];
+              break;
+
+            case 'list-multi':
+              values = config[fieldname];
+              break;
+
+            default:
+              values = [config[fieldname]];
+          }
+
+          field.innerHTML = values.map(v => converse_muc_$build('value').t(v)).join('');
+        }
+
+        return field;
+      },
+
+      /**
+       * Automatically configure the groupchat based on this model's
+       * 'roomconfig' data.
+       * @private
+       * @method _converse.ChatRoom#autoConfigureChatRoom
+       * @returns { Promise<XMLElement> }
+       * Returns a promise which resolves once a response IQ has
+       * been received.
+       */
+      async autoConfigureChatRoom() {
+        const stanza = await this.fetchRoomConfiguration();
+        const fields = converse_muc_sizzle('field', stanza);
+        const configArray = fields.map(f => this.addFieldValue(f));
+
+        if (configArray.length) {
+          return this.sendConfiguration(configArray);
+        }
+      },
+
+      /**
+       * Send an IQ stanza to fetch the groupchat configuration data.
+       * Returns a promise which resolves once the response IQ
+       * has been received.
+       * @private
+       * @method _converse.ChatRoom#fetchRoomConfiguration
+       * @returns { Promise<XMLElement> }
+       */
+      fetchRoomConfiguration() {
+        return _converse.api.sendIQ(converse_muc_$iq({
+          'to': this.get('jid'),
+          'type': "get"
+        }).c("query", {
+          xmlns: converse_muc_Strophe.NS.MUC_OWNER
+        }));
+      },
+
+      /**
+       * Sends an IQ stanza with the groupchat configuration.
+       * @private
+       * @method _converse.ChatRoom#sendConfiguration
+       * @param { Array } config - The groupchat configuration
+       * @returns { Promise<XMLElement> } - A promise which resolves with
+       * the `result` stanza received from the XMPP server.
+       */
+      sendConfiguration() {
+        let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+        const iq = converse_muc_$iq({
+          to: this.get('jid'),
+          type: "set"
+        }).c("query", {
+          xmlns: converse_muc_Strophe.NS.MUC_OWNER
+        }).c("x", {
+          xmlns: converse_muc_Strophe.NS.XFORM,
+          type: "submit"
+        });
+        config.forEach(node => iq.cnode(node).up());
+        return _converse.api.sendIQ(iq);
+      },
+
+      /**
+       * Returns the `role` which the current user has in this MUC
+       * @private
+       * @method _converse.ChatRoom#getOwnRole
+       * @returns { ('none'|'visitor'|'participant'|'moderator') }
+       */
+      getOwnRole() {
+        return Object(lodash["get"])(this.getOwnOccupant(), 'attributes.role');
+      },
+
+      /**
+       * Returns the `affiliation` which the current user has in this MUC
+       * @private
+       * @method _converse.ChatRoom#getOwnAffiliation
+       * @returns { ('none'|'outcast'|'member'|'admin'|'owner') }
+       */
+      getOwnAffiliation() {
+        return Object(lodash["get"])(this.getOwnOccupant(), 'attributes.affiliation');
+      },
+
+      /**
+       * Get the {@link _converse.ChatRoomOccupant} instance which
+       * represents the current user.
+       * @private
+       * @method _converse.ChatRoom#getOwnOccupant
+       * @returns { _converse.ChatRoomOccupant }
+       */
+      getOwnOccupant() {
+        return this.occupants.findWhere({
+          'jid': _converse.bare_jid
+        });
+      },
+
+      /**
+       * Send an IQ stanza specifying an affiliation change.
+       * @private
+       * @method _converse.ChatRoom#
+       * @param { String } affiliation: affiliation
+       *     (could also be stored on the member object).
+       * @param { Object } member: Map containing the member's jid and
+       *     optionally a reason and affiliation.
+       */
+      sendAffiliationIQ(affiliation, member) {
+        const iq = converse_muc_$iq({
+          to: this.get('jid'),
+          type: "set"
+        }).c("query", {
+          xmlns: converse_muc_Strophe.NS.MUC_ADMIN
+        }).c("item", {
+          'affiliation': member.affiliation || affiliation,
+          'nick': member.nick,
+          'jid': member.jid
+        });
+
+        if (member.reason !== undefined) {
+          iq.c("reason", member.reason);
+        }
+
+        return _converse.api.sendIQ(iq);
+      },
+
+      /**
+       * Send IQ stanzas to the server to modify affiliations for users in this groupchat.
+       *
+       * See: https://xmpp.org/extensions/xep-0045.html#modifymember
+       * @private
+       * @method _converse.ChatRoom#setAffiliations
+       * @param { Object[] } members
+       * @param { string } members[].jid - The JID of the user whose affiliation will change
+       * @param { Array } members[].affiliation - The new affiliation for this user
+       * @param { string } [members[].reason] - An optional reason for the affiliation change
+       * @returns { Promise }
+       */
+      setAffiliations(members) {
+        const affiliations = Object(lodash["uniq"])(members.map(m => m.affiliation));
+        return Promise.all(affiliations.map(a => this.setAffiliation(a, members)));
+      },
+
+      /**
+       * Send an IQ stanza to modify an occupant's role
+       * @private
+       * @method _converse.ChatRoom#setRole
+       * @param { _converse.ChatRoomOccupant } occupant
+       * @param { String } role
+       * @param { String } reason
+       * @param { function } onSuccess - callback for a succesful response
+       * @param { function } onError - callback for an error response
+       */
+      setRole(occupant, role, reason, onSuccess, onError) {
+        const item = converse_muc_$build("item", {
+          'nick': occupant.get('nick'),
+          role
+        });
+        const iq = converse_muc_$iq({
+          'to': this.get('jid'),
+          'type': 'set'
+        }).c("query", {
+          xmlns: converse_muc_Strophe.NS.MUC_ADMIN
+        }).cnode(item.node);
+
+        if (reason !== null) {
+          iq.c("reason", reason);
+        }
+
+        return _converse.api.sendIQ(iq).then(onSuccess).catch(onError);
+      },
+
+      /**
+       * @private
+       * @method _converse.ChatRoom#getOccupant
+       * @param { String } nick_or_jid - The nickname or JID of the occupant to be returned
+       * @returns { _converse.ChatRoomOccupant }
+       */
+      getOccupant(nick_or_jid) {
+        return utils_form.isValidJID(nick_or_jid) && this.occupants.findWhere({
+          'jid': nick_or_jid
+        }) || this.occupants.findWhere({
+          'nick': nick_or_jid
+        });
+      },
+
+      /**
+       * Sends an IQ stanza to the server, asking it for the relevant affiliation list .
+       * Returns an array of {@link MemberListItem} objects, representing occupants
+       * that have the given affiliation.
+       * See: https://xmpp.org/extensions/xep-0045.html#modifymember
+       * @private
+       * @method _converse.ChatRoom#getAffiliationList
+       * @param { ("admin"|"owner"|"member") } affiliation
+       * @returns { Promise<MemberListItem[]> }
+       */
+      async getAffiliationList(affiliation) {
+        const iq = converse_muc_$iq({
+          to: this.get('jid'),
+          type: "get"
+        }).c("query", {
+          xmlns: converse_muc_Strophe.NS.MUC_ADMIN
+        }).c("item", {
+          'affiliation': affiliation
+        });
+        const result = await _converse.api.sendIQ(iq, null, false);
+
+        if (result === null) {
+          const err_msg = "Error: timeout while fetching ".concat(affiliation, " list for MUC ").concat(this.get('jid'));
+          const err = new Error(err_msg);
+          headless_log.warn(err_msg);
+          headless_log.warn(result);
+          return err;
+        }
+
+        if (utils_form.isErrorStanza(result)) {
+          const err_msg = "Error: not allowed to fetch ".concat(affiliation, " list for MUC ").concat(this.get('jid'));
+          const err = new Error(err_msg);
+          headless_log.warn(err_msg);
+          headless_log.warn(result);
+          return err;
+        }
+
+        return utils_muc.parseMemberListIQ(result).filter(p => p);
+      },
+
+      /**
+       * Fetch the lists of users with the given affiliations.
+       * Then compute the delta between those users and
+       * the passed in members, and if it exists, send the delta
+       * to the XMPP server to update the member list.
+       * @private
+       * @method _converse.ChatRoom#updateMemberLists
+       * @param { object } members - Map of member jids and affiliations.
+       * @returns { Promise }
+       *  A promise which is resolved once the list has been
+       *  updated or once it's been established there's no need
+       *  to update the list.
+       */
+      async updateMemberLists(members) {
+        const all_affiliations = ['member', 'admin', 'owner'];
+        const aff_lists = await Promise.all(all_affiliations.map(a => this.getAffiliationList(a)));
+        const old_members = aff_lists.reduce((acc, val) => utils_form.isErrorObject(val) ? acc : [...val, ...acc], []);
+        await this.setAffiliations(utils_muc.computeAffiliationsDelta(true, false, members, old_members));
+
+        if (_converse.muc_fetch_members) {
+          return this.occupants.fetchMembers();
+        }
+      },
+
+      /**
+       * Given a nick name, save it to the model state, otherwise, look
+       * for a server-side reserved nickname or default configured
+       * nickname and if found, persist that to the model state.
+       * @private
+       * @method _converse.ChatRoom#getAndPersistNickname
+       * @returns { Promise<string> } A promise which resolves with the nickname
+       */
+      async getAndPersistNickname(nick) {
+        nick = nick || this.get('nick') || (await this.getReservedNick()) || _converse.getDefaultMUCNickname();
+
+        if (nick) {
+          this.save({
+            nick
+          }, {
+            'silent': true
+          });
+        }
+
+        return nick;
+      },
+
+      /**
+       * Use service-discovery to ask the XMPP server whether
+       * this user has a reserved nickname for this groupchat.
+       * If so, we'll use that, otherwise we render the nickname form.
+       * @private
+       * @method _converse.ChatRoom#getReservedNick
+       * @returns { Promise<string> } A promise which resolves with the reserved nick or null
+       */
+      async getReservedNick() {
+        const stanza = converse_muc_$iq({
+          'to': this.get('jid'),
+          'from': _converse.connection.jid,
+          'type': "get"
+        }).c("query", {
+          'xmlns': converse_muc_Strophe.NS.DISCO_INFO,
+          'node': 'x-roomuser-item'
+        });
+        const result = await _converse.api.sendIQ(stanza, null, false);
+
+        if (utils_form.isErrorObject(result)) {
+          throw result;
+        }
+
+        const identity_el = result.querySelector('query[node="x-roomuser-item"] identity');
+        return identity_el ? identity_el.getAttribute('name') : null;
+      },
+
+      async registerNickname() {
+        // See https://xmpp.org/extensions/xep-0045.html#register
+        const nick = this.get('nick');
+        const jid = this.get('jid');
+        let iq, err_msg;
+
+        try {
+          iq = await _converse.api.sendIQ(converse_muc_$iq({
+            'to': jid,
+            'from': _converse.connection.jid,
+            'type': 'get'
+          }).c('query', {
+            'xmlns': converse_muc_Strophe.NS.MUC_REGISTER
+          }));
+        } catch (e) {
+          if (converse_muc_sizzle("not-allowed[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), e).length) {
+            err_msg = __("You're not allowed to register yourself in this groupchat.");
+          } else if (converse_muc_sizzle("registration-required[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), e).length) {
+            err_msg = __("You're not allowed to register in this groupchat because it's members-only.");
+          }
+
+          headless_log.error(e);
+          return err_msg;
+        }
+
+        const required_fields = converse_muc_sizzle('field required', iq).map(f => f.parentElement);
+
+        if (required_fields.length > 1 && required_fields[0].getAttribute('var') !== 'muc#register_roomnick') {
+          return headless_log.error("Can't register the user register in the groupchat ".concat(jid, " due to the required fields"));
+        }
+
+        try {
+          await _converse.api.sendIQ(converse_muc_$iq({
+            'to': jid,
+            'from': _converse.connection.jid,
+            'type': 'set'
+          }).c('query', {
+            'xmlns': converse_muc_Strophe.NS.MUC_REGISTER
+          }).c('x', {
+            'xmlns': converse_muc_Strophe.NS.XFORM,
+            'type': 'submit'
+          }).c('field', {
+            'var': 'FORM_TYPE'
+          }).c('value').t('http://jabber.org/protocol/muc#register').up().up().c('field', {
+            'var': 'muc#register_roomnick'
+          }).c('value').t(nick));
+        } catch (e) {
+          if (converse_muc_sizzle("service-unavailable[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), e).length) {
+            err_msg = __("Can't register your nickname in this groupchat, it doesn't support registration.");
+          } else if (converse_muc_sizzle("bad-request[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), e).length) {
+            err_msg = __("Can't register your nickname in this groupchat, invalid data form supplied.");
+          }
+
+          headless_log.error(err_msg);
+          headless_log.error(e);
+          return err_msg;
+        }
+      },
+
+      /**
+       * Given a presence stanza, update the occupant model based on its contents.
+       * @private
+       * @method _converse.ChatRoom#updateOccupantsOnPresence
+       * @param { XMLElement } pres - The presence stanza
+       */
+      updateOccupantsOnPresence(pres) {
+        const data = this.parsePresence(pres);
+
+        if (data.type === 'error' || !data.jid && !data.nick) {
+          return true;
+        }
+
+        const occupant = this.occupants.findOccupant(data);
+
+        if (data.type === 'unavailable' && occupant) {
+          if (!data.states.includes(converse_core.MUC_NICK_CHANGED_CODE) && !occupant.isMember()) {
+            // We only destroy the occupant if this is not a nickname change operation.
+            // and if they're not on the member lists.
+            // Before destroying we set the new data, so
+            // that we can show the disconnection message.
+            occupant.set(data);
+            occupant.destroy();
+            return;
+          }
+        }
+
+        const jid = data.jid || '';
+        const attributes = Object.assign(data, {
+          'jid': converse_muc_Strophe.getBareJidFromJid(jid) || Object(lodash["get"])(occupant, 'attributes.jid'),
+          'resource': converse_muc_Strophe.getResourceFromJid(jid) || Object(lodash["get"])(occupant, 'attributes.resource')
+        });
+
+        if (occupant) {
+          occupant.save(attributes);
+        } else {
+          this.occupants.create(attributes);
+        }
+      },
+
+      parsePresence(pres) {
+        const from = pres.getAttribute("from"),
+              type = pres.getAttribute("type"),
+              data = {
+          'from': from,
+          'nick': converse_muc_Strophe.getResourceFromJid(from),
+          'type': type,
+          'states': [],
+          'show': type !== 'unavailable' ? 'online' : 'offline'
+        };
+        pres.childNodes.forEach(child => {
+          switch (child.nodeName) {
+            case "status":
+              data.status = child.textContent || null;
+              break;
+
+            case "show":
+              data.show = child.textContent || 'online';
+              break;
+
+            case "x":
+              if (child.getAttribute("xmlns") === converse_muc_Strophe.NS.MUC_USER) {
+                child.childNodes.forEach(item => {
+                  switch (item.nodeName) {
+                    case "item":
+                      data.affiliation = item.getAttribute("affiliation");
+                      data.role = item.getAttribute("role");
+                      data.jid = item.getAttribute("jid");
+                      data.nick = item.getAttribute("nick") || data.nick;
+                      break;
+
+                    case "status":
+                      if (item.getAttribute("code")) {
+                        data.states.push(item.getAttribute("code"));
+                      }
+
+                  }
+                });
+              } else if (child.getAttribute("xmlns") === converse_muc_Strophe.NS.VCARDUPDATE) {
+                data.image_hash = Object(lodash["get"])(child.querySelector('photo'), 'textContent');
+              }
+
+          }
+        });
+        return data;
+      },
+
+      fetchFeaturesIfConfigurationChanged(stanza) {
+        // 104: configuration change
+        // 170: logging enabled
+        // 171: logging disabled
+        // 172: room no longer anonymous
+        // 173: room now semi-anonymous
+        // 174: room now fully anonymous
+        const codes = ['104', '170', '171', '172', '173', '174'];
+
+        if (converse_muc_sizzle('status', stanza).filter(e => codes.includes(e.getAttribute('status'))).length) {
+          this.refreshRoomFeatures();
+        }
+      },
+
+      /**
+       * Given two JIDs, which can be either user JIDs or MUC occupant JIDs,
+       * determine whether they belong to the same user.
+       * @private
+       * @method _converse.ChatRoom#isSameUser
+       * @param { String } jid1
+       * @param { String } jid2
+       * @returns { Boolean }
+       */
+      isSameUser(jid1, jid2) {
+        const bare_jid1 = converse_muc_Strophe.getBareJidFromJid(jid1);
+        const bare_jid2 = converse_muc_Strophe.getBareJidFromJid(jid2);
+        const resource1 = converse_muc_Strophe.getResourceFromJid(jid1);
+        const resource2 = converse_muc_Strophe.getResourceFromJid(jid2);
+
+        if (utils_form.isSameBareJID(jid1, jid2)) {
+          if (bare_jid1 === this.get('jid')) {
+            // MUC JIDs
+            return resource1 === resource2;
+          } else {
+            return true;
+          }
+        } else {
+          const occupant1 = bare_jid1 === this.get('jid') ? this.occupants.findOccupant({
+            'nick': resource1
+          }) : this.occupants.findOccupant({
+            'jid': bare_jid1
+          });
+          const occupant2 = bare_jid2 === this.get('jid') ? this.occupants.findOccupant({
+            'nick': resource2
+          }) : this.occupants.findOccupant({
+            'jid': bare_jid2
+          });
+          return occupant1 === occupant2;
+        }
+      },
+
+      /**
+       * Handle a subject change and return `true` if so.
+       * @private
+       * @method _converse.ChatRoom#subjectChangeHandled
+       * @param { object } attrs - The message attributes
+       */
+      subjectChangeHandled(attrs) {
+        if (attrs.subject && !attrs.thread && !attrs.message) {
+          // https://xmpp.org/extensions/xep-0045.html#subject-mod
+          // -----------------------------------------------------
+          // The subject is changed by sending a message of type "groupchat" to the <room@service>,
+          // where the <message/> MUST contain a <subject/> element that specifies the new subject but
+          // MUST NOT contain a <body/> element (or a <thread/> element).
+          utils_form.safeSave(this, {
+            'subject': {
+              'author': attrs.nick,
+              'text': attrs.subject || ''
+            }
+          });
+          return true;
+        }
+
+        return false;
+      },
+
+      /**
+       * Set the subject for this {@link _converse.ChatRoom}
+       * @private
+       * @method _converse.ChatRoom#setSubject
+       * @param { String } value
+       */
+      setSubject() {
+        let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+
+        _converse.api.send(converse_muc_$msg({
+          to: this.get('jid'),
+          from: _converse.connection.jid,
+          type: "groupchat"
+        }).c("subject", {
+          xmlns: "jabber:client"
+        }).t(value).tree());
+      },
+
+      /**
+       * Is this a chat state notification that can be ignored,
+       * because it's old or because it's from us.
+       * @private
+       * @method _converse.ChatRoom#ignorableCSN
+       * @param { Object } attrs - The message attributes
+       */
+      ignorableCSN(attrs) {
+        const is_csn = utils_form.isOnlyChatStateNotification(attrs);
+        return is_csn && (attrs.is_delayed || this.isOwnMessage(attrs));
+      },
+
+      /**
+       * Determines whether the message is from ourselves by checking
+       * the `from` attribute. Doesn't check the `type` attribute.
+       * @private
+       * @method _converse.ChatRoom#isOwnMessage
+       * @param { Object|XMLElement|_converse.Message } msg
+       * @returns { boolean }
+       */
+      isOwnMessage(msg) {
+        let from;
+
+        if (Object(lodash["isElement"])(msg)) {
+          from = msg.getAttribute('from');
+        } else if (msg instanceof _converse.Message) {
+          from = msg.get('from');
+        } else {
+          from = msg.from;
+        }
+
+        return converse_muc_Strophe.getResourceFromJid(from) == this.get('nick');
+      },
+
+      getUpdatedMessageAttributes(message, stanza) {
+        // Overridden in converse-muc and converse-mam
+        const attrs = _converse.ChatBox.prototype.getUpdatedMessageAttributes.call(this, message, stanza);
+
+        if (this.isOwnMessage(message)) {
+          const stanza_id = converse_muc_sizzle("stanza-id[xmlns=\"".concat(converse_muc_Strophe.NS.SID, "\"]"), stanza).pop();
+          const by_jid = stanza_id ? stanza_id.getAttribute('by') : undefined;
+
+          if (by_jid) {
+            const key = "stanza_id ".concat(by_jid);
+            attrs[key] = stanza_id.getAttribute('id');
+          }
+
+          if (!message.get('received')) {
+            attrs.received = new Date().toISOString();
+          }
+        }
+
+        return attrs;
+      },
+
+      /**
+       * Send a MUC-0410 MUC Self-Ping stanza to room to determine
+       * whether we're still joined.
+       * @async
+       * @private
+       * @method _converse.ChatRoom#isJoined
+       * @returns {Promise<boolean>}
+       */
+      async isJoined() {
+        const ping = converse_muc_$iq({
+          'to': "".concat(this.get('jid'), "/").concat(this.get('nick')),
+          'type': "get"
+        }).c("ping", {
+          'xmlns': converse_muc_Strophe.NS.PING
+        });
+
+        try {
+          await _converse.api.sendIQ(ping);
+        } catch (e) {
+          if (e === null) {
+            headless_log.error("Timeout error while checking whether we're joined to MUC: ".concat(this.get('jid')));
+          } else {
+            headless_log.error("Apparently we're no longer connected to MUC: ".concat(this.get('jid')));
+            headless_log.error(e);
+          }
+
+          return false;
+        }
+
+        return true;
+      },
+
+      /**
+       * Check whether we're still joined and re-join if not
+       * @async
+       * @private
+       * @method _converse.ChatRoom#rejoinIfNecessary
+       */
+      async rejoinIfNecessary() {
+        if (!(await this.isJoined())) {
+          this.rejoin();
+          return true;
+        }
+      },
+
+      /**
+       * @private
+       * @method _converse.ChatRoom#shouldShowErrorMessage
+       * @returns {Promise<boolean>}
+       */
+      async shouldShowErrorMessage(stanza) {
+        if (converse_muc_sizzle("not-acceptable[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), stanza).length) {
+          if (await this.rejoinIfNecessary()) {
+            return false;
+          }
+        }
+
+        return _converse.ChatBox.prototype.shouldShowErrorMessage.call(this, stanza);
+      },
+
+      /**
+       * Looks whether we already have a moderation message for this
+       * incoming message. If so, it's considered "dangling" because
+       * it probably hasn't been applied to anything yet, given that
+       * the relevant message is only coming in now.
+       * @private
+       * @method _converse.ChatRoom#findDanglingModeration
+       * @param { object } attrs - Attributes representing a received
+       *  message, as returned by {@link stanza_utils.getMessageAttributesFromStanza}
+       * @returns { _converse.ChatRoomMessage }
+       */
+      findDanglingModeration(attrs) {
+        if (!this.messages.length) {
+          return null;
+        } // Only look for dangling moderation if there are newer
+        // messages than this one, since moderation come after.
+
+
+        if (this.messages.last().get('time') > attrs.time) {
+          // Search from latest backwards
+          const messages = Array.from(this.messages.models);
+          const stanza_id = attrs["stanza_id ".concat(this.get('jid'))];
+
+          if (!stanza_id) {
+            return null;
+          }
+
+          messages.reverse();
+          return messages.find((_ref) => {
+            let {
+              attributes
+            } = _ref;
+            return attributes.moderation === 'retraction' && attributes.moderated_id === stanza_id && attributes.moderated_by;
+          });
+        }
+      },
+
+      /**
+       * Handles message moderation based on the passed in attributes.
+       * @private
+       * @method _converse.ChatRoom#handleModeration
+       * @param { object } attrs - Attributes representing a received
+       *  message, as returned by {@link stanza_utils.getMessageAttributesFromStanza}
+       * @returns { Boolean } Returns `true` or `false` depending on
+       *  whether a message was moderated or not.
+       */
+      handleModeration(attrs) {
+        const MODERATION_ATTRIBUTES = ['editable', 'moderated', 'moderated_by', 'moderated_id', 'moderation_reason'];
+
+        if (attrs.moderated === 'retracted') {
+          const query = {};
+          const key = "stanza_id ".concat(this.get('jid'));
+          query[key] = attrs.moderated_id;
+          const message = this.messages.findWhere(query);
+
+          if (!message) {
+            attrs['dangling_moderation'] = true;
+            this.messages.create(attrs);
+            return true;
+          }
+
+          message.save(Object(lodash["pick"])(attrs, MODERATION_ATTRIBUTES));
+          return true;
+        } else {
+          // Check if we have dangling moderation message
+          const message = this.findDanglingModeration(attrs);
+
+          if (message) {
+            const moderation_attrs = Object(lodash["pick"])(message.attributes, MODERATION_ATTRIBUTES);
+            const new_attrs = Object.assign({
+              'dangling_moderation': false
+            }, attrs, moderation_attrs);
+            delete new_attrs['id']; // Delete id, otherwise a new cache entry gets created
+
+            message.save(new_attrs);
+            return true;
+          }
+        }
+
+        return false;
+      },
+
+      createMessageObject(attrs) {
+        return new Promise((success, reject) => {
+          this.messages.create(attrs, {
+            success,
+            'error': (m, e) => reject(e)
+          });
+        });
+      },
+
+      /**
+       * Handler for all MUC messages sent to this groupchat.
+       * @private
+       * @method _converse.ChatRoom#onMessage
+       * @param { XMLElement } stanza - The message stanza.
+       */
+      async onMessage(stanza) {
+        if (converse_muc_sizzle("message > forwarded[xmlns=\"".concat(converse_muc_Strophe.NS.FORWARD, "\"]"), stanza).length) {
+          return headless_log.warn('onMessage: Ignoring unencapsulated forwarded groupchat message');
+        }
+
+        if (utils_form.isCarbonMessage(stanza)) {
+          return headless_log.warn('onMessage: Ignoring XEP-0280 "groupchat" message carbon, ' + 'according to the XEP groupchat messages SHOULD NOT be carbon copied');
+        }
+
+        const original_stanza = stanza;
+
+        if (utils_form.isMAMMessage(stanza)) {
+          if (original_stanza.getAttribute('from') === this.get('jid')) {
+            const selector = "[xmlns=\"".concat(converse_muc_Strophe.NS.MAM, "\"] > forwarded[xmlns=\"").concat(converse_muc_Strophe.NS.FORWARD, "\"] > message");
+            stanza = converse_muc_sizzle(selector, stanza).pop();
+          } else {
+            return headless_log.warn("onMessage: Ignoring alleged MAM groupchat message from ".concat(stanza.getAttribute('from')));
+          }
+        }
+
+        this.createInfoMessages(stanza);
+        this.fetchFeaturesIfConfigurationChanged(stanza);
+        const message = await this.getDuplicateMessage(original_stanza);
+
+        if (message) {
+          this.updateMessage(message, original_stanza);
+        }
+
+        const attrs = await this.getMessageAttributesFromStanza(stanza, original_stanza);
+        this.handleReaction(stanza, original_stanza, attrs);   // BAO issue #9
+
+        if (message || utils_stanza.isReceipt(stanza) || utils_stanza.isChatMarker(stanza)) {
+          return _converse.api.trigger('message', {
+            'stanza': original_stanza
+          });
+        }
+
+        if (this.handleRetraction(attrs) || this.handleModeration(attrs) || this.subjectChangeHandled(attrs) || this.ignorableCSN(attrs)) {
+          return _converse.api.trigger('message', {
+            'stanza': original_stanza
+          });
+        }
+
+        this.setEditable(attrs, attrs.time);
+
+        if (attrs.nick && (attrs.is_tombstone || utils_form.isNewMessage(attrs) || !utils_form.isEmptyMessage(attrs))) {
+          const msg = this.handleCorrection(attrs) || (await this.createMessageObject(attrs));
+          this.incrementUnreadMsgCounter(msg);
+        }
+
+        _converse.api.trigger('message', {
+          'stanza': original_stanza,
+          'chatbox': this
+        });
+      },
+
+      handleModifyError(pres) {
+        const text = Object(lodash["get"])(pres.querySelector('error text'), 'textContent');
+
+        if (text) {
+          if (this.session.get('connection_status') === converse_core.ROOMSTATUS.CONNECTING) {
+            this.setDisconnectionMessage(text);
+          } else {
+            const attrs = {
+              'type': 'error',
+              'message': text,
+              'is_ephemeral': true
+            };
+            this.messages.create(attrs);
+          }
+        }
+      },
+
+      handleDisconnection(stanza) {
+        const is_self = stanza.querySelector("status[code='110']") !== null;
+        const x = converse_muc_sizzle("x[xmlns=\"".concat(converse_muc_Strophe.NS.MUC_USER, "\"]"), stanza).pop();
+
+        if (!x) {
+          return;
+        }
+
+        const codes = converse_muc_sizzle('status', x).map(s => s.getAttribute('code'));
+        const disconnection_codes = Object(lodash["intersection"])(codes, Object.keys(_converse.muc.disconnect_messages));
+        const disconnected = is_self && disconnection_codes.length > 0;
+
+        if (!disconnected) {
+          return;
+        } // By using querySelector we assume here there is
+        // one <item> per <x xmlns='http://jabber.org/protocol/muc#user'>
+        // element. This appears to be a safe assumption, since
+        // each <x/> element pertains to a single user.
+
+
+        const item = x.querySelector('item');
+        const reason = item ? Object(lodash["get"])(item.querySelector('reason'), 'textContent') : undefined;
+        const actor = item ? Object(lodash["invoke"])(item.querySelector('actor'), 'getAttribute', 'nick') : undefined;
+        const message = _converse.muc.disconnect_messages[disconnection_codes[0]];
+        this.setDisconnectionMessage(message, reason, actor);
+      },
+
+      /**
+       * Create info messages based on a received presence stanza
+       * @private
+       * @method _converse.ChatRoom#createInfoMessages
+       * @param { XMLElement } stanza: The presence stanza received
+       */
+      createInfoMessages(stanza) {
+        const is_self = stanza.querySelector("status[code='110']") !== null;
+        const x = converse_muc_sizzle("x[xmlns=\"".concat(converse_muc_Strophe.NS.MUC_USER, "\"]"), stanza).pop();
+
+        if (!x) {
+          return;
+        }
+
+        const codes = converse_muc_sizzle('status', x).map(s => s.getAttribute('code'));
+        codes.forEach(code => {
+          let message;
+
+          if (code === '110' || code === '100' && !is_self) {
+            return;
+          } else if (code in _converse.muc.info_messages) {
+            message = _converse.muc.info_messages[code];
+          } else if (!is_self && code in _converse.muc.action_info_messages) {
+            const nick = converse_muc_Strophe.getResourceFromJid(stanza.getAttribute('from'));
+            message = __(_converse.muc.action_info_messages[code], nick);
+            const item = x.querySelector('item');
+            const reason = item ? Object(lodash["get"])(item.querySelector('reason'), 'textContent') : undefined;
+            const actor = item ? Object(lodash["invoke"])(item.querySelector('actor'), 'getAttribute', 'nick') : undefined;
+
+            if (actor) {
+              message += '\n' + __('This action was done by %1$s.', actor);
+            }
+
+            if (reason) {
+              message += '\n' + __('The reason given is: "%1$s".', reason);
+            }
+          } else if (is_self && code in _converse.muc.new_nickname_messages) {
+            let nick;
+
+            if (is_self && code === "210") {
+              nick = converse_muc_Strophe.getResourceFromJid(stanza.getAttribute('from'));
+            } else if (is_self && code === "303") {
+              nick = stanza.querySelector('x item').getAttribute('nick');
+            }
+
+            this.save('nick', nick);
+            message = __(_converse.muc.new_nickname_messages[code], nick);
+          }
+
+          if (message) {
+            if (code === "201" && this.messages.findWhere({
+              'type': 'info',
+              message
+            })) {
+              return;
+            } else if (code in _converse.muc.info_messages && this.messages.length && this.messages.pop().get('message') === message) {
+              // XXX: very naive duplication checking
+              return;
+            }
+
+            if (_converse.api.settings.get("muc_show_room_info")) { // BAO issue #121 (converse #1998)
+                this.messages.create({
+                  'type': 'info',
+                  message
+                });
+            }
+          }
+        });
+      },
+
+      setDisconnectionMessage(message, reason, actor) {
+        this.save({
+          'disconnection_message': message,
+          'disconnection_reason': reason,
+          'disconnection_actor': actor
+        });
+        this.session.save({
+          'connection_status': converse_core.ROOMSTATUS.DISCONNECTED
+        });
+      },
+
+      onNicknameClash(presence) {
+        if (_converse.muc_nickname_from_jid) {
+          const nick = presence.getAttribute('from').split('/')[1];
+
+          if (nick === _converse.getDefaultMUCNickname()) {
+            this.join(nick + '-2');
+          } else {
+            const del = nick.lastIndexOf("-");
+            const num = nick.substring(del + 1, nick.length);
+            this.join(nick.substring(0, del + 1) + String(Number(num) + 1));
+          }
+        } else {
+          this.save({
+            'nickname_validation_message': __("The nickname you chose is reserved or " + "currently in use, please choose a different one.")
+          });
+          this.session.save({
+            'connection_status': converse_core.ROOMSTATUS.NICKNAME_REQUIRED
+          });
+        }
+      },
+
+      /**
+       * Parses a <presence> stanza with type "error" and sets the proper
+       * `connection_status` value for this {@link _converse.ChatRoom} as
+       * well as any additional output that can be shown to the user.
+       * @private
+       * @param { XMLElement } stanza - The presence stanza
+       */
+      onErrorPresence(stanza) {
+        const error = stanza.querySelector('error');
+        const error_type = error.getAttribute('type');
+        const reason = Object(lodash["get"])(converse_muc_sizzle("text[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), error).pop(), 'textContent');
+
+        if (error_type === 'modify') {
+          this.handleModifyError(stanza);
+        } else if (error_type === 'auth') {
+          if (converse_muc_sizzle("not-authorized[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), error).length) {
+            this.save({
+              'password_validation_message': reason || __("Password incorrect")
+            });
+            this.session.save({
+              'connection_status': converse_core.ROOMSTATUS.PASSWORD_REQUIRED
+            });
+          }
+
+          if (error.querySelector('registration-required')) {
+            const message = __('You are not on the member list of this groupchat.');
+
+            this.setDisconnectionMessage(message, reason);
+          } else if (error.querySelector('forbidden')) {
+            const message = __('You have been banned from this groupchat.');
+
+            this.setDisconnectionMessage(message, reason);
+          }
+        } else if (error_type === 'cancel') {
+          if (error.querySelector('not-allowed')) {
+            const message = __('You are not allowed to create new groupchats.');
+
+            this.setDisconnectionMessage(message, reason);
+          } else if (error.querySelector('not-acceptable')) {
+            const message = __("Your nickname doesn't conform to this groupchat's policies.");
+
+            this.setDisconnectionMessage(message, reason);
+          } else if (converse_muc_sizzle("gone[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), error).length) {
+            const moved_jid = Object(lodash["get"])(converse_muc_sizzle("gone[xmlns=\"".concat(converse_muc_Strophe.NS.STANZAS, "\"]"), error).pop(), 'textContent').replace(/^xmpp:/, '').replace(/\?join$/, '');
+            this.save({
+              moved_jid,
+              'destroyed_reason': reason
+            });
+            this.session.save({
+              'connection_status': converse_core.ROOMSTATUS.DESTROYED
+            });
+          } else if (error.querySelector('conflict')) {
+            this.onNicknameClash(stanza);
+          } else if (error.querySelector('item-not-found')) {
+            const message = __("This groupchat does not (yet) exist.");
+
+            this.setDisconnectionMessage(message, reason);
+          } else if (error.querySelector('service-unavailable')) {
+            const message = __("This groupchat has reached its maximum number of participants.");
+
+            this.setDisconnectionMessage(message, reason);
+          } else if (error.querySelector('remote-server-not-found')) {
+            const message = __("Remote server not found");
+
+            const feedback = reason ? __('The explanation given is: "%1$s".', reason) : undefined;
+            this.setDisconnectionMessage(message, feedback);
+          }
+        }
+      },
+
+      /**
+       * Handles all MUC presence stanzas.
+       * @private
+       * @method _converse.ChatRoom#onPresence
+       * @param { XMLElement } stanza
+       */
+      onPresence(stanza) {
+        if (stanza.getAttribute('type') === 'error') {
+          return this.onErrorPresence(stanza);
+        }
+
+        this.createInfoMessages(stanza);
+
+        if (stanza.querySelector("status[code='110']")) {
+          this.onOwnPresence(stanza);
+
+          if (this.getOwnRole() !== 'none' && this.session.get('connection_status') === converse_core.ROOMSTATUS.CONNECTING) {
+            this.session.save('connection_status', converse_core.ROOMSTATUS.CONNECTED);
+          }
+        } else {
+          this.updateOccupantsOnPresence(stanza);
+        }
+      },
+
+      /**
+       * Handles a received presence relating to the current user.
+       *
+       * For locked groupchats (which are by definition "new"), the
+       * groupchat will either be auto-configured or created instantly
+       * (with default config) or a configuration groupchat will be
+       * rendered.
+       *
+       * If the groupchat is not locked, then the groupchat will be
+       * auto-configured only if applicable and if the current
+       * user is the groupchat's owner.
+       * @private
+       * @method _converse.ChatRoom#onOwnPresence
+       * @param { XMLElement } pres - The stanza
+       */
+      onOwnPresence(stanza) {
+        if (stanza.getAttribute('type') !== 'unavailable') {
+          this.session.save('connection_status', converse_core.ROOMSTATUS.ENTERED);
+        }
+
+        this.updateOccupantsOnPresence(stanza);
+
+        if (stanza.getAttribute('type') === 'unavailable') {
+          this.handleDisconnection(stanza);
+        } else {
+          const locked_room = stanza.querySelector("status[code='201']");
+
+          if (locked_room) {
+            if (this.get('auto_configure')) {
+              this.autoConfigureChatRoom().then(() => this.refreshRoomFeatures());
+            } else if (_converse.muc_instant_rooms) {
+              // Accept default configuration
+              this.saveConfiguration().then(() => this.refreshRoomFeatures());
+            } else {
+              /**
+               * Triggered when a new room has been created which first needs to be configured
+               * and when `auto_configure` is set to `false`.
+               * Used by `_converse.ChatRoomView` in order to know when to render the
+               * configuration form for a new room.
+               * @event _converse.ChatRoom#configurationNeeded
+               * @example _converse.api.listen.on('configurationNeeded', () => { ... });
+               */
+              this.trigger('configurationNeeded');
+              return; // We haven't yet entered the groupchat, so bail here.
+            }
+          } else if (!this.features.get('fetched')) {
+            // The features for this groupchat weren't fetched.
+            // That must mean it's a new groupchat without locking
+            // (in which case Prosody doesn't send a 201 status),
+            // otherwise the features would have been fetched in
+            // the "initialize" method already.
+            if (this.getOwnAffiliation() === 'owner' && this.get('auto_configure')) {
+              this.autoConfigureChatRoom().then(() => this.refreshRoomFeatures());
+            } else {
+              this.getRoomFeatures();
+            }
+          }
+        }
+
+        this.session.save({
+          'connection_status': converse_core.ROOMSTATUS.ENTERED
+        });
+      },
+
+      /**
+       * Returns a boolean to indicate whether the current user
+       * was mentioned in a message.
+       * @private
+       * @method _converse.ChatRoom#isUserMentioned
+       * @param { String } - The text message
+       */
+      isUserMentioned(message) {
+        const nick = this.get('nick');
+
+        if (message.get('references').length) {
+          const mentions = message.get('references').filter(ref => ref.type === 'mention').map(ref => ref.value);
+          return mentions.includes(nick);
+        } else {
+          return new RegExp("\\b".concat(nick, "\\b")).test(message.get('message'));
+        }
+      },
+
+      /* Given a newly received message, update the unread counter if necessary.
+       * @private
+       * @method _converse.ChatRoom#incrementUnreadMsgCounter
+       * @param { XMLElement } - The <messsage> stanza
+       */
+      incrementUnreadMsgCounter(message) { // BAO issue #119 (converse #1999)
+        if (!message) {
+          return;
+        }
+
+        const body = message.get('message');
+
+        if (!body) {
+          return;
+        }
+
+        if (utils_form.isNewMessage(message)) {
+            if (this.isHidden()) {
+              let first_unread = this.get('first_unread');  // BAO
+
+              if (this.get('num_unread_general') == 0) {    // BAO
+                  if (first_unread)
+                  {
+                      const msg = this.messages.where({'msgid': first_unread});
+                      if (msg.length > 0) msg[0].set("first_unread", false);
+                  }
+                  message.set("first_unread", true);
+                  first_unread = message.get('msgid');
+              }
+
+              const settings = {
+                'first_unread': first_unread,   // BAO
+                'num_unread_general': this.get('num_unread_general') + 1
+              };
+
+              if (this.isUserMentioned(message)) {
+                settings.num_unread = this.get('num_unread') + 1;
+                _converse.incrementMsgCounter();
+              }
+
+              this.save(settings);
+          } else {
+              this.sendDisplayedMarker(message);
+          }
+        }
+      },
+
+      clearUnreadMsgCounter() {
+        if (this.get('num_unread_general') > 0 || this.get('num_unread') > 0) {
+            this.sendDisplayedMarker(this.messages.last());
+        }
+        utils_form.safeSave(this, {
+          'num_unread': 0,
+          'num_unread_general': 0
+        });
+      }
+
+    });
+    /**
+     * Represents an participant in a MUC
+     * @class
+     * @namespace _converse.ChatRoomOccupant
+     * @memberOf _converse
+     */
+
+    _converse.ChatRoomOccupant = converse_muc_Backbone.Model.extend({
+      defaults: {
+        'show': 'offline',
+        'states': []
+      },
+
+      initialize(attributes) {
+        this.set(Object.assign({
+          'id': utils_form.getUniqueId()
+        }, attributes));
+        this.on('change:image_hash', this.onAvatarChanged, this);
+      },
+
+      onAvatarChanged() {
+        const hash = this.get('image_hash');
+        const vcards = [];
+
+        if (this.get('jid')) {
+          vcards.push(_converse.vcards.findWhere({
+            'jid': this.get('jid')
+          }));
+        }
+
+        vcards.push(_converse.vcards.findWhere({
+          'jid': this.get('from')
+        }));
+        vcards.filter(v => v).forEach(vcard => {
+          if (hash && vcard.get('image_hash') !== hash) {
+            _converse.api.vcard.update(vcard, true);
+          }
+        });
+      },
+
+      getDisplayName() {
+        return this.get('nick') || this.get('jid');
+      },
+
+      isMember() {
+        return ['admin', 'owner', 'member'].includes(this.get('affiliation'));
+      },
+
+      isModerator() {
+        return ['admin', 'owner'].includes(this.get('affiliation')) || this.get('role') === 'moderator';
+      },
+
+      isSelf() {
+        return this.get('states').includes('110');
+      }
+
+    });
+    _converse.ChatRoomOccupants = _converse.Collection.extend({
+      model: _converse.ChatRoomOccupant,
+
+      comparator(occupant1, occupant2) {
+        const role1 = occupant1.get('role') || 'none';
+        const role2 = occupant2.get('role') || 'none';
+
+        if (MUC_ROLE_WEIGHTS[role1] === MUC_ROLE_WEIGHTS[role2]) {
+          const nick1 = occupant1.getDisplayName().toLowerCase();
+          const nick2 = occupant2.getDisplayName().toLowerCase();
+          return nick1 < nick2 ? -1 : nick1 > nick2 ? 1 : 0;
+        } else {
+          return MUC_ROLE_WEIGHTS[role1] < MUC_ROLE_WEIGHTS[role2] ? -1 : 1;
+        }
+      },
+
+      async fetchMembers() {
+        const all_affiliations = ['member', 'admin', 'owner'];
+        const aff_lists = await Promise.all(all_affiliations.map(a => this.chatroom.getAffiliationList(a)));
+        const new_members = aff_lists.reduce((acc, val) => utils_form.isErrorObject(val) ? acc : [...val, ...acc], []);
+        const known_affiliations = all_affiliations.filter(a => !utils_form.isErrorObject(aff_lists[all_affiliations.indexOf(a)]));
+        const new_jids = new_members.map(m => m.jid).filter(m => m !== undefined);
+        const new_nicks = new_members.map(m => !m.jid && m.nick || undefined).filter(m => m !== undefined);
+        const removed_members = this.filter(m => {
+          return known_affiliations.includes(m.get('affiliation')) && !new_nicks.includes(m.get('nick')) && !new_jids.includes(m.get('jid'));
+        });
+        removed_members.forEach(occupant => {
+          if (occupant.get('jid') === _converse.bare_jid) {
+            return;
+          }
+
+          if (occupant.get('show') === 'offline') {
+            occupant.destroy();
+          } else {
+            occupant.save('affiliation', null);
+          }
+        });
+        new_members.forEach(attrs => {
+          const occupant = attrs.jid ? this.findOccupant({
+            'jid': attrs.jid
+          }) : this.findOccupant({
+            'nick': attrs.nick
+          });
+
+          if (occupant) {
+            occupant.save(attrs);
+          } else {
+            this.create(attrs);
+          }
+        });
+        /**
+         * Triggered once the member lists for this MUC have been fetched and processed.
+         * @event _converse#membersFetched
+         * @example _converse.api.listen.on('membersFetched', () => { ... });
+         */
+
+        _converse.api.trigger('membersFetched');
+      },
+
+      findOccupant(data) {
+        /* Try to find an existing occupant based on the passed in
+         * data object.
+         *
+         * If we have a JID, we use that as lookup variable,
+         * otherwise we use the nick. We don't always have both,
+         * but should have at least one or the other.
+         */
+        const jid = converse_muc_Strophe.getBareJidFromJid(data.jid);
+
+        if (jid !== null) {
+          return this.findWhere({
+            'jid': jid
+          });
+        } else {
+          return this.findWhere({
+            'nick': data.nick
+          });
+        }
+      }
+
+    });
+    _converse.RoomsPanelModel = converse_muc_Backbone.Model.extend({
+      defaults: function defaults() {
+        return {
+          'muc_domain': _converse.muc_domain,
+          'nick': _converse.getDefaultMUCNickname()
+        };
+      },
+
+      setDomain(jid) {
+        if (!_converse.locked_muc_domain) {
+          this.save('muc_domain', converse_muc_Strophe.getDomainFromJid(jid));
+        }
+      }
+
+    });
+    /**
+     * A direct MUC invitation to join a groupchat has been received
+     * See XEP-0249: Direct MUC invitations.
+     * @private
+     * @method _converse.ChatRoom#onDirectMUCInvitation
+     * @param { XMLElement } message - The message stanza containing the invitation.
+     */
+
+    _converse.onDirectMUCInvitation = async function (message) {
+      const x_el = converse_muc_sizzle('x[xmlns="jabber:x:conference"]', message).pop(),
+            from = converse_muc_Strophe.getBareJidFromJid(message.getAttribute('from')),
+            room_jid = x_el.getAttribute('jid'),
+            reason = x_el.getAttribute('reason');
+
+      let contact = _converse.roster.get(from),
+          result;
+
+      if (_converse.auto_join_on_invite) {
+        result = true;
+      } else {
+        // Invite request might come from someone not your roster list
+        contact = contact ? contact.getDisplayName() : converse_muc_Strophe.getNodeFromJid(from);
+
+        if (!reason) {
+          result = confirm(__("%1$s has invited you to join a groupchat: %2$s", contact, room_jid));
+        } else {
+          result = confirm(__('%1$s has invited you to join a groupchat: %2$s, and left the following reason: "%3$s"', contact, room_jid, reason));
+        }
+      }
+
+      if (result === true) {
+        const chatroom = await openChatRoom(room_jid, {
+          'password': x_el.getAttribute('password')
+        });
+
+        if (chatroom.session.get('connection_status') === converse_core.ROOMSTATUS.DISCONNECTED) {
+          _converse.chatboxes.get(room_jid).rejoin();
+        }
+      }
+    };
+
+    if (_converse.allow_muc_invitations) {
+      const registerDirectInvitationHandler = function registerDirectInvitationHandler() {
+        _converse.connection.addHandler(message => {
+          _converse.onDirectMUCInvitation(message);
+
+          return true;
+        }, 'jabber:x:conference', 'message');
+      };
+
+      _converse.api.listen.on('connected', registerDirectInvitationHandler);
+
+      _converse.api.listen.on('reconnected', registerDirectInvitationHandler);
+    }
+
+    const createChatRoom = function createChatRoom(jid, attrs) {
+      if (jid.startsWith('xmpp:') && jid.endsWith('?join')) {
+        jid = jid.replace(/^xmpp:/, '').replace(/\?join$/, '');
+      }
+
+      return _converse.api.rooms.get(jid, attrs, true);
+    };
+    /**
+     * Automatically join groupchats, based on the
+     * "auto_join_rooms" configuration setting, which is an array
+     * of strings (groupchat JIDs) or objects (with groupchat JID and other
+     * settings).
+     */
+
+
+    function autoJoinRooms() {
+      _converse.auto_join_rooms.forEach(groupchat => {
+        if (Object(lodash["isString"])(groupchat)) {
+          if (_converse.chatboxes.where({
+            'jid': groupchat
+          }).length) {
+            return;
+          }
+
+          _converse.api.rooms.open(groupchat);
+        } else if (Object(lodash["isObject"])(groupchat)) {
+          _converse.api.rooms.open(groupchat.jid, Object(lodash["clone"])(groupchat));
+        } else {
+          headless_log.error('Invalid groupchat criteria specified for "auto_join_rooms"');
+        }
+      });
+      /**
+       * Triggered once any rooms that have been configured to be automatically joined,
+       * specified via the _`auto_join_rooms` setting, have been entered.
+       * @event _converse#roomsAutoJoined
+       * @example _converse.api.listen.on('roomsAutoJoined', () => { ... });
+       * @example _converse.api.waitUntil('roomsAutoJoined').then(() => { ... });
+       */
+
+
+      _converse.api.trigger('roomsAutoJoined');
+    }
+
+    async function onWindowStateChanged(data) {
+      if (data.state === 'visible' && _converse.api.connection.connected()) {
+        const rooms = await _converse.api.rooms.get();
+        rooms.forEach(room => room.rejoinIfNecessary());
+      }
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('beforeTearDown', () => {
+      const groupchats = _converse.chatboxes.where({
+        'type': _converse.CHATROOMS_TYPE
+      });
+
+      groupchats.forEach(muc => utils_form.safeSave(muc.session, {
+        'connection_status': converse_core.ROOMSTATUS.DISCONNECTED
+      }));
+    });
+
+    _converse.api.listen.on('windowStateChanged', onWindowStateChanged);
+
+    _converse.api.listen.on('addClientFeatures', () => {
+      if (_converse.allow_muc) {
+        _converse.api.disco.own.features.add(converse_muc_Strophe.NS.MUC);
+      }
+
+      if (_converse.allow_muc_invitations) {
+        _converse.api.disco.own.features.add('jabber:x:conference'); // Invites
+
+      }
+    });
+
+    _converse.api.listen.on('chatBoxesFetched', autoJoinRooms);
+
+    function disconnectChatRooms() {
+      /* When disconnecting, mark all groupchats as
+       * disconnected, so that they will be properly entered again
+       * when fetched from session storage.
+       */
+      return _converse.chatboxes.filter(m => m.get('type') === _converse.CHATROOMS_TYPE).forEach(m => m.session.save({
+        'connection_status': converse_core.ROOMSTATUS.DISCONNECTED
+      }));
+    }
+
+    _converse.api.listen.on('disconnected', disconnectChatRooms);
+
+    _converse.api.listen.on('statusInitialized', () => {
+      window.addEventListener(_converse.unloadevent, () => {
+        const using_websocket = _converse.api.connection.isType('websocket');
+
+        if (using_websocket && (!_converse.enable_smacks || !_converse.session.get('smacks_stream_id'))) {
+          // For non-SMACKS websocket connections, or non-resumeable
+          // connections, we disconnect all chatrooms when the page unloads.
+          // See issue #1111
+          disconnectChatRooms();
+        }
+      });
+    });
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    converse_core.env.muc_utils = utils_muc; // We extend the default converse.js API to add methods specific to MUC groupchats.
+
+    Object.assign(_converse.api, {
+      /**
+       * The "rooms" namespace groups methods relevant to chatrooms
+       * (aka groupchats).
+       *
+       * @namespace _converse.api.rooms
+       * @memberOf _converse.api
+       */
+      rooms: {
+        /**
+         * Creates a new MUC chatroom (aka groupchat)
+         *
+         * Similar to {@link _converse.api.rooms.open}, but creates
+         * the chatroom in the background (i.e. doesn't cause a view to open).
+         *
+         * @method _converse.api.rooms.create
+         * @param {(string[]|string)} jid|jids The JID or array of
+         *     JIDs of the chatroom(s) to create
+         * @param {object} [attrs] attrs The room attributes
+         * @returns {Promise} Promise which resolves with the Backbone.Model representing the chat.
+         */
+        create(jids) {
+          let attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+          attrs = Object(lodash["isString"])(attrs) ? {
+            'nick': attrs
+          } : attrs || {};
+
+          if (!attrs.nick && _converse.muc_nickname_from_jid) {
+            attrs.nick = converse_muc_Strophe.getNodeFromJid(_converse.bare_jid);
+          }
+
+          if (jids === undefined) {
+            throw new TypeError('rooms.create: You need to provide at least one JID');
+          } else if (Object(lodash["isString"])(jids)) {
+            return createChatRoom(jids, attrs);
+          }
+
+          return jids.map(jid => createChatRoom(jid, attrs));
+        },
+
+        /**
+         * Opens a MUC chatroom (aka groupchat)
+         *
+         * Similar to {@link _converse.api.chats.open}, but for groupchats.
+         *
+         * @method _converse.api.rooms.open
+         * @param {string} jid The room JID or JIDs (if not specified, all
+         *     currently open rooms will be returned).
+         * @param {string} attrs A map  containing any extra room attributes.
+         * @param {string} [attrs.nick] The current user's nickname for the MUC
+         * @param {boolean} [attrs.auto_configure] A boolean, indicating
+         *     whether the room should be configured automatically or not.
+         *     If set to `true`, then it makes sense to pass in configuration settings.
+         * @param {object} [attrs.roomconfig] A map of configuration settings to be used when the room gets
+         *     configured automatically. Currently it doesn't make sense to specify
+         *     `roomconfig` values if `auto_configure` is set to `false`.
+         *     For a list of configuration values that can be passed in, refer to these values
+         *     in the [XEP-0045 MUC specification](https://xmpp.org/extensions/xep-0045.html#registrar-formtype-owner).
+         *     The values should be named without the `muc#roomconfig_` prefix.
+         * @param {boolean} [attrs.minimized] A boolean, indicating whether the room should be opened minimized or not.
+         * @param {boolean} [attrs.bring_to_foreground] A boolean indicating whether the room should be
+         *     brought to the foreground and therefore replace the currently shown chat.
+         *     If there is no chat currently open, then this option is ineffective.
+         * @param {Boolean} [force=false] - By default, a minimized
+         *   room won't be maximized (in `overlayed` view mode) and in
+         *   `fullscreen` view mode a newly opened room won't replace
+         *   another chat already in the foreground.
+         *   Set `force` to `true` if you want to force the room to be
+         *   maximized or shown.
+         * @returns {Promise} Promise which resolves with the Backbone.Model representing the chat.
+         *
+         * @example
+         * this._converse.api.rooms.open('group@muc.example.com')
+         *
+         * @example
+         * // To return an array of rooms, provide an array of room JIDs:
+         * _converse.api.rooms.open(['group1@muc.example.com', 'group2@muc.example.com'])
+         *
+         * @example
+         * // To setup a custom nickname when joining the room, provide the optional nick argument:
+         * _converse.api.rooms.open('group@muc.example.com', {'nick': 'mycustomnick'})
+         *
+         * @example
+         * // For example, opening a room with a specific default configuration:
+         * _converse.api.rooms.open(
+         *     'myroom@conference.example.org',
+         *     { 'nick': 'coolguy69',
+         *       'auto_configure': true,
+         *       'roomconfig': {
+         *           'changesubject': false,
+         *           'membersonly': true,
+         *           'persistentroom': true,
+         *           'publicroom': true,
+         *           'roomdesc': 'Comfy room for hanging out',
+         *           'whois': 'anyone'
+         *       }
+         *     }
+         * );
+         */
+        async open(jids, attrs) {
+          let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+          await _converse.api.waitUntil('chatBoxesFetched');
+
+          if (jids === undefined) {
+            const err_msg = 'rooms.open: You need to provide at least one JID';
+            headless_log.error(err_msg);
+            throw new TypeError(err_msg);
+          } else if (Object(lodash["isString"])(jids)) {
+            const room = await _converse.api.rooms.create(jids, attrs);
+            room && room.maybeShow(force);
+            return room;
+          } else {
+            const rooms = await Promise.all(jids.map(jid => _converse.api.rooms.create(jid, attrs)));
+            rooms.forEach(r => r.maybeShow(force));
+            return rooms;
+          }
+        },
+
+        /**
+         * Fetches the object representing a MUC chatroom (aka groupchat)
+         *
+         * @method _converse.api.rooms.get
+         * @param {string} [jid] The room JID (if not specified, all rooms will be returned).
+         * @param {object} attrs A map containing any extra room attributes For example, if you want
+         *     to specify the nickname, use `{'nick': 'bloodninja'}`. Previously (before
+         *     version 1.0.7, the second parameter only accepted the nickname (as a string
+         *     value). This is currently still accepted, but then you can't pass in any
+         *     other room attributes. If the nickname is not specified then the node part of
+         *     the user's JID will be used.
+         * @param {boolean} create A boolean indicating whether the room should be created
+         *     if not found (default: `false`)
+         * @returns { Promise<_converse.ChatRoom> }
+         * @example
+         * _converse.api.waitUntil('roomsAutoJoined').then(() => {
+         *     const create_if_not_found = true;
+         *     _converse.api.rooms.get(
+         *         'group@muc.example.com',
+         *         {'nick': 'dread-pirate-roberts'},
+         *         create_if_not_found
+         *     )
+         * });
+         */
+        async get(jids) {
+          let attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+          let create = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+          async function _get(jid) {
+            let model = await _converse.api.chatboxes.get(jid);
+
+            if (!model && create) {
+              model = await _converse.api.chatboxes.create(jid, attrs, _converse.ChatRoom);
+            } else {
+              model = model && model.get('type') === _converse.CHATROOMS_TYPE ? model : null;
+
+              if (model && Object.keys(attrs).length) {
+                model.save(attrs);
+              }
+            }
+
+            return model;
+          }
+
+          if (jids === undefined) {
+            const chats = await _converse.api.chatboxes.get();
+            return chats.filter(c => c.get('type') === _converse.CHATROOMS_TYPE);
+          } else if (Object(lodash["isString"])(jids)) {
+            return _get(jids);
+          }
+
+          return Promise.all(jids.map(jid => _get(jid)));
+        }
+
+      }
+    });
+    /************************ END API ************************/
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-bookmarks.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-bookmarks
+ * @description
+ * Converse.js plugin which adds views for bookmarks specified in XEP-0048.
+ */
+
+
+
+
+const {
+  Backbone: converse_bookmarks_Backbone,
+  Strophe: converse_bookmarks_Strophe,
+  $iq: converse_bookmarks_$iq,
+  sizzle: converse_bookmarks_sizzle
+} = converse_core.env;
+const converse_bookmarks_u = converse_core.env.utils;
+converse_core.plugins.add('converse-bookmarks', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chatboxes", "converse-muc"],
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // New functions which don't exist yet can also be added.
+    ChatRoom: {
+      getDisplayName() {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (this.get('bookmarked') && _converse.bookmarks) {
+          const bookmark = _converse.bookmarks.findWhere({
+            'jid': this.get('jid')
+          });
+
+          if (bookmark) {
+            return bookmark.get('name');
+          }
+        }
+
+        return this.__super__.getDisplayName.apply(this, arguments);
+      },
+
+      getAndPersistNickname(nick) {
+        const {
+          _converse
+        } = this.__super__;
+        nick = nick || _converse.getNicknameFromBookmark(this.get('jid'));
+        return this.__super__.getAndPersistNickname.call(this, nick);
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse; // Configuration values for this plugin
+    // ====================================
+    // Refer to docs/source/configuration.rst for explanations of these
+    // configuration settings.
+
+    _converse.api.settings.update({
+      allow_bookmarks: true,
+      allow_public_bookmarks: false
+    });
+
+    _converse.api.promises.add('bookmarksInitialized');
+    /**
+      * Check if the user has a bookmark with a saved nickanme
+      * for this groupchat and return it.
+      * @private
+      * @method _converse#getNicknameFromBookmark
+      */
+
+
+    _converse.getNicknameFromBookmark = function (jid) {
+      if (!_converse.bookmarks || !_converse.allow_bookmarks) {
+        return null;
+      }
+
+      const bookmark = _converse.bookmarks.findWhere({
+        'jid': jid
+      });
+
+      if (bookmark) {
+        return bookmark.get('nick');
+      }
+    };
+
+    _converse.Bookmark = converse_bookmarks_Backbone.Model.extend({
+      getDisplayName() {
+        return converse_bookmarks_Strophe.xmlunescape(this.get('name'));
+      }
+
+    });
+    _converse.Bookmarks = _converse.Collection.extend({
+      model: _converse.Bookmark,
+      comparator: item => item.get('name').toLowerCase(),
+
+      initialize() {
+        this.on('add', bm => this.openBookmarkedRoom(bm).then(bm => this.markRoomAsBookmarked(bm)).catch(e => headless_log.fatal(e)));
+        this.on('remove', this.markRoomAsUnbookmarked, this);
+        this.on('remove', this.sendBookmarkStanza, this);
+        const cache_key = "converse.room-bookmarks".concat(_converse.bare_jid);
+        this.fetched_flag = cache_key + 'fetched';
+        this.browserStorage = _converse.createStore(cache_key);
+      },
+
+      async openBookmarkedRoom(bookmark) {
+        if (_converse.muc_respect_autojoin && bookmark.get('autojoin')) {
+          const groupchat = await _converse.api.rooms.create(bookmark.get('jid'), bookmark.get('nick'));
+          groupchat.maybeShow();
+        }
+
+        return bookmark;
+      },
+
+      fetchBookmarks() {
+        const deferred = converse_bookmarks_u.getResolveablePromise();
+
+        if (window.sessionStorage.getItem(this.fetched_flag)) {
+          this.fetch({
+            'success': () => deferred.resolve(),
+            'error': () => deferred.resolve()
+          });
+        } else {
+          this.fetchBookmarksFromServer(deferred);
+        }
+
+        return deferred;
+      },
+
+      createBookmark(options) {
+        this.create(options);
+        this.sendBookmarkStanza().catch(iq => this.onBookmarkError(iq, options));
+      },
+
+      sendBookmarkStanza() {
+        const stanza = converse_bookmarks_$iq({
+          'type': 'set',
+          'from': _converse.connection.jid
+        }).c('pubsub', {
+          'xmlns': converse_bookmarks_Strophe.NS.PUBSUB
+        }).c('publish', {
+          'node': 'storage:bookmarks'
+        }).c('item', {
+          'id': 'current'
+        }).c('storage', {
+          'xmlns': 'storage:bookmarks'
+        });
+        this.forEach(model => {
+          stanza.c('conference', {
+            'name': model.get('name'),
+            'autojoin': model.get('autojoin'),
+            'jid': model.get('jid')
+          }).c('nick').t(model.get('nick')).up().up();
+        });
+        stanza.up().up().up();
+        stanza.c('publish-options').c('x', {
+          'xmlns': converse_bookmarks_Strophe.NS.XFORM,
+          'type': 'submit'
+        }).c('field', {
+          'var': 'FORM_TYPE',
+          'type': 'hidden'
+        }).c('value').t('http://jabber.org/protocol/pubsub#publish-options').up().up().c('field', {
+          'var': 'pubsub#persist_items'
+        }).c('value').t('true').up().up().c('field', {
+          'var': 'pubsub#access_model'
+        }).c('value').t('whitelist');
+        return _converse.api.sendIQ(stanza);
+      },
+
+      onBookmarkError(iq, options) {
+        headless_log.error("Error while trying to add bookmark");
+        headless_log.error(iq);
+
+        _converse.api.alert('error', __('Error'), [__("Sorry, something went wrong while trying to save your bookmark.")]);
+
+        this.findWhere({
+          'jid': options.jid
+        }).destroy();
+      },
+
+      fetchBookmarksFromServer(deferred) {
+        const stanza = converse_bookmarks_$iq({
+          'from': _converse.connection.jid,
+          'type': 'get'
+        }).c('pubsub', {
+          'xmlns': converse_bookmarks_Strophe.NS.PUBSUB
+        }).c('items', {
+          'node': 'storage:bookmarks'
+        });
+
+        _converse.api.sendIQ(stanza).then(iq => this.onBookmarksReceived(deferred, iq)).catch(iq => this.onBookmarksReceivedError(deferred, iq));
+      },
+
+      markRoomAsBookmarked(bookmark) {
+        const groupchat = _converse.chatboxes.get(bookmark.get('jid'));
+
+        if (groupchat !== undefined) {
+          groupchat.save('bookmarked', true);
+        }
+      },
+
+      markRoomAsUnbookmarked(bookmark) {
+        const groupchat = _converse.chatboxes.get(bookmark.get('jid'));
+
+        if (groupchat !== undefined) {
+          groupchat.save('bookmarked', false);
+        }
+      },
+
+      createBookmarksFromStanza(stanza) {
+        const bookmarks = converse_bookmarks_sizzle("items[node=\"storage:bookmarks\"] item storage[xmlns=\"storage:bookmarks\"] conference", stanza);
+        bookmarks.forEach(bookmark => {
+          const jid = bookmark.getAttribute('jid');
+          this.create({
+            'jid': jid,
+            'name': bookmark.getAttribute('name') || jid,
+            'autojoin': bookmark.getAttribute('autojoin') === 'true',
+            'nick': Object(lodash["get"])(bookmark.querySelector('nick'), 'textContent')
+          });
+        });
+      },
+
+      onBookmarksReceived(deferred, iq) {
+        this.createBookmarksFromStanza(iq);
+        window.sessionStorage.setItem(this.fetched_flag, true);
+
+        if (deferred !== undefined) {
+          return deferred.resolve();
+        }
+      },
+
+      onBookmarksReceivedError(deferred, iq) {
+        if (iq === null) {
+          headless_log.error('Error: timeout while fetching bookmarks');
+
+          _converse.api.alert('error', __('Timeout Error'), [__("The server did not return your bookmarks within the allowed time. " + "You can reload the page to request them again.")]);
+        } else {
+          headless_log.error('Error while fetching bookmarks');
+          headless_log.error(iq);
+        }
+
+        if (deferred) {
+          if (iq.querySelector('error[type="cancel"] item-not-found')) {
+            // Not an exception, the user simply doesn't have any bookmarks.
+            window.sessionStorage.setItem(this.fetched_flag, true);
+            return deferred.resolve();
+          } else {
+            return deferred.reject(new Error("Could not fetch bookmarks"));
+          }
+        }
+      },
+
+      getUnopenedBookmarks() {
+        return this.filter(b => !_converse.chatboxes.get(b.get('jid')));
+      }
+
+    });
+    _converse.BookmarksList = converse_bookmarks_Backbone.Model.extend({
+      defaults: {
+        "toggle-state": _converse.OPENED
+      }
+    });
+
+    _converse.checkBookmarksSupport = async function () {
+      const identity = await _converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid);
+
+      if (_converse.allow_public_bookmarks) {
+        return !!identity;
+      } else {
+        return _converse.api.disco.supports(converse_bookmarks_Strophe.NS.PUBSUB + '#publish-options', _converse.bare_jid);
+      }
+    };
+
+    const initBookmarks = async function initBookmarks() {
+      if (!_converse.allow_bookmarks) {
+        return;
+      }
+
+      if (await _converse.checkBookmarksSupport()) {
+        _converse.bookmarks = new _converse.Bookmarks();
+        await _converse.bookmarks.fetchBookmarks();
+        /**
+         * Triggered once the _converse.Bookmarks collection
+         * has been created and cached bookmarks have been fetched.
+         * @event _converse#bookmarksInitialized
+         * @example _converse.api.listen.on('bookmarksInitialized', () => { ... });
+         */
+
+        _converse.api.trigger('bookmarksInitialized');
+      }
+    };
+
+    _converse.api.listen.on('clearSession', () => {
+      if (_converse.bookmarks !== undefined) {
+        _converse.bookmarks.clearSession({
+          'silent': true
+        });
+
+        window.sessionStorage.removeItem(_converse.bookmarks.fetched_flag);
+        delete _converse.bookmarks;
+      }
+    });
+
+    _converse.api.listen.on('reconnected', initBookmarks);
+
+    _converse.api.listen.on('connected', async () => {
+      // Add a handler for bookmarks pushed from other connected clients
+      _converse.connection.addHandler(message => {
+        if (converse_bookmarks_sizzle('event[xmlns="' + converse_bookmarks_Strophe.NS.PUBSUB + '#event"] items[node="storage:bookmarks"]', message).length) {
+          _converse.api.waitUntil('bookmarksInitialized').then(() => _converse.bookmarks.createBookmarksFromStanza(message)).catch(e => headless_log.fatal(e));
+        }
+      }, null, 'message', 'headline', null, _converse.bare_jid);
+
+      await Promise.all([_converse.api.waitUntil('chatBoxesFetched')]);
+      initBookmarks();
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./node_modules/strophe.js/src/bosh.js
+/*
+    This program is distributed under the terms of the MIT license.
+    Please see the LICENSE file for details.
+
+    Copyright 2006-2008, OGG, LLC
+*/
+
+/* global window, setTimeout, clearTimeout, XMLHttpRequest, ActiveXObject */
+
+
+
+const bosh_Strophe = core.Strophe;
+const bosh_$build = core.$build;
+
+
+/** PrivateClass: Strophe.Request
+ *  _Private_ helper class that provides a cross implementation abstraction
+ *  for a BOSH related XMLHttpRequest.
+ *
+ *  The Strophe.Request class is used internally to encapsulate BOSH request
+ *  information.  It is not meant to be used from user's code.
+ */
+
+/** PrivateConstructor: Strophe.Request
+ *  Create and initialize a new Strophe.Request object.
+ *
+ *  Parameters:
+ *    (XMLElement) elem - The XML data to be sent in the request.
+ *    (Function) func - The function that will be called when the
+ *      XMLHttpRequest readyState changes.
+ *    (Integer) rid - The BOSH rid attribute associated with this request.
+ *    (Integer) sends - The number of times this same request has been sent.
+ */
+bosh_Strophe.Request = function (elem, func, rid, sends) {
+    this.id = ++bosh_Strophe._requestId;
+    this.xmlData = elem;
+    this.data = bosh_Strophe.serialize(elem);
+    // save original function in case we need to make a new request
+    // from this one.
+    this.origFunc = func;
+    this.func = func;
+    this.rid = rid;
+    this.date = NaN;
+    this.sends = sends || 0;
+    this.abort = false;
+    this.dead = null;
+
+    this.age = function () {
+        if (!this.date) { return 0; }
+        const now = new Date();
+        return (now - this.date) / 1000;
+    };
+    this.timeDead = function () {
+        if (!this.dead) { return 0; }
+        const now = new Date();
+        return (now - this.dead) / 1000;
+    };
+    this.xhr = this._newXHR();
+};
+
+bosh_Strophe.Request.prototype = {
+    /** PrivateFunction: getResponse
+     *  Get a response from the underlying XMLHttpRequest.
+     *
+     *  This function attempts to get a response from the request and checks
+     *  for errors.
+     *
+     *  Throws:
+     *    "parsererror" - A parser error occured.
+     *    "bad-format" - The entity has sent XML that cannot be processed.
+     *
+     *  Returns:
+     *    The DOM element tree of the response.
+     */
+    getResponse: function () {
+        let node = null;
+        if (this.xhr.responseXML && this.xhr.responseXML.documentElement) {
+            node = this.xhr.responseXML.documentElement;
+            if (node.tagName === "parsererror") {
+                bosh_Strophe.error("invalid response received");
+                bosh_Strophe.error("responseText: " + this.xhr.responseText);
+                bosh_Strophe.error("responseXML: " +
+                              bosh_Strophe.serialize(this.xhr.responseXML));
+                throw new Error("parsererror");
+            }
+        } else if (this.xhr.responseText) {
+            // In React Native, we may get responseText but no responseXML.  We can try to parse it manually.
+            bosh_Strophe.debug("Got responseText but no responseXML; attempting to parse it with DOMParser...");
+            node = new DOMParser().parseFromString(this.xhr.responseText, 'application/xml').documentElement;
+            if (!node) {
+                throw new Error('Parsing produced null node');
+            } else if (node.querySelector('parsererror')) {
+                bosh_Strophe.error("invalid response received: " + node.querySelector('parsererror').textContent);
+                bosh_Strophe.error("responseText: " + this.xhr.responseText);
+                const error = new Error();
+                error.name = bosh_Strophe.ErrorCondition.BAD_FORMAT;
+                throw error;
+            }
+        }
+        return node;
+    },
+
+    /** PrivateFunction: _newXHR
+     *  _Private_ helper function to create XMLHttpRequests.
+     *
+     *  This function creates XMLHttpRequests across all implementations.
+     *
+     *  Returns:
+     *    A new XMLHttpRequest.
+     */
+    _newXHR: function () {
+        let xhr = null;
+        if (window.XMLHttpRequest) {
+            xhr = new XMLHttpRequest();
+            if (xhr.overrideMimeType) {
+                xhr.overrideMimeType("text/xml; charset=utf-8");
+            }
+        } else if (window.ActiveXObject) {
+            xhr = new ActiveXObject("Microsoft.XMLHTTP");
+        }
+        // use Function.bind() to prepend ourselves as an argument
+        xhr.onreadystatechange = this.func.bind(null, this);
+        return xhr;
+    }
+};
+
+/** Class: Strophe.Bosh
+ *  _Private_ helper class that handles BOSH Connections
+ *
+ *  The Strophe.Bosh class is used internally by Strophe.Connection
+ *  to encapsulate BOSH sessions. It is not meant to be used from user's code.
+ */
+
+/** File: bosh.js
+ *  A JavaScript library to enable BOSH in Strophejs.
+ *
+ *  this library uses Bidirectional-streams Over Synchronous HTTP (BOSH)
+ *  to emulate a persistent, stateful, two-way connection to an XMPP server.
+ *  More information on BOSH can be found in XEP 124.
+ */
+
+/** PrivateConstructor: Strophe.Bosh
+ *  Create and initialize a Strophe.Bosh object.
+ *
+ *  Parameters:
+ *    (Strophe.Connection) connection - The Strophe.Connection that will use BOSH.
+ *
+ *  Returns:
+ *    A new Strophe.Bosh object.
+ */
+bosh_Strophe.Bosh = function(connection) {
+    this._conn = connection;
+    /* request id for body tags */
+    this.rid = Math.floor(Math.random() * 4294967295);
+    /* The current session ID. */
+    this.sid = null;
+
+    // default BOSH values
+    this.hold = 1;
+    this.wait = 60;
+    this.window = 5;
+    this.errors = 0;
+    this.inactivity = null;
+
+    this.lastResponseHeaders = null;
+    this._requests = [];
+};
+
+bosh_Strophe.Bosh.prototype = {
+    /** Variable: strip
+     *
+     *  BOSH-Connections will have all stanzas wrapped in a <body> tag when
+     *  passed to <Strophe.Connection.xmlInput> or <Strophe.Connection.xmlOutput>.
+     *  To strip this tag, User code can set <Strophe.Bosh.strip> to "body":
+     *
+     *  > Strophe.Bosh.prototype.strip = "body";
+     *
+     *  This will enable stripping of the body tag in both
+     *  <Strophe.Connection.xmlInput> and <Strophe.Connection.xmlOutput>.
+     */
+    strip: null,
+
+    /** PrivateFunction: _buildBody
+     *  _Private_ helper function to generate the <body/> wrapper for BOSH.
+     *
+     *  Returns:
+     *    A Strophe.Builder with a <body/> element.
+     */
+    _buildBody: function () {
+        const bodyWrap = bosh_$build('body', {
+            'rid': this.rid++,
+            'xmlns': bosh_Strophe.NS.HTTPBIND
+        });
+        if (this.sid !== null) {
+            bodyWrap.attrs({'sid': this.sid});
+        }
+        if (this._conn.options.keepalive && this._conn._sessionCachingSupported()) {
+            this._cacheSession();
+        }
+        return bodyWrap;
+    },
+
+    /** PrivateFunction: _reset
+     *  Reset the connection.
+     *
+     *  This function is called by the reset function of the Strophe Connection
+     */
+    _reset: function () {
+        this.rid = Math.floor(Math.random() * 4294967295);
+        this.sid = null;
+        this.errors = 0;
+        if (this._conn._sessionCachingSupported()) {
+            window.sessionStorage.removeItem('strophe-bosh-session');
+        }
+
+        this._conn.nextValidRid(this.rid);
+    },
+
+    /** PrivateFunction: _connect
+     *  _Private_ function that initializes the BOSH connection.
+     *
+     *  Creates and sends the Request that initializes the BOSH connection.
+     */
+    _connect: function (wait, hold, route) {
+        this.wait = wait || this.wait;
+        this.hold = hold || this.hold;
+        this.errors = 0;
+
+        const body = this._buildBody().attrs({
+            "to": this._conn.domain,
+            "xml:lang": "en",
+            "wait": this.wait,
+            "hold": this.hold,
+            "content": "text/xml; charset=utf-8",
+            "ver": "1.6",
+            "xmpp:version": "1.0",
+            "xmlns:xmpp": bosh_Strophe.NS.BOSH
+        });
+        if (route){
+            body.attrs({'route': route});
+        }
+
+        const _connect_cb = this._conn._connect_cb;
+        this._requests.push(
+            new bosh_Strophe.Request(
+                body.tree(),
+                this._onRequestStateChange.bind(this, _connect_cb.bind(this._conn)),
+                body.tree().getAttribute("rid")
+            )
+        );
+        this._throttledRequestHandler();
+    },
+
+    /** PrivateFunction: _attach
+     *  Attach to an already created and authenticated BOSH session.
+     *
+     *  This function is provided to allow Strophe to attach to BOSH
+     *  sessions which have been created externally, perhaps by a Web
+     *  application.  This is often used to support auto-login type features
+     *  without putting user credentials into the page.
+     *
+     *  Parameters:
+     *    (String) jid - The full JID that is bound by the session.
+     *    (String) sid - The SID of the BOSH session.
+     *    (String) rid - The current RID of the BOSH session.  This RID
+     *      will be used by the next request.
+     *    (Function) callback The connect callback function.
+     *    (Integer) wait - The optional HTTPBIND wait value.  This is the
+     *      time the server will wait before returning an empty result for
+     *      a request.  The default setting of 60 seconds is recommended.
+     *      Other settings will require tweaks to the Strophe.TIMEOUT value.
+     *    (Integer) hold - The optional HTTPBIND hold value.  This is the
+     *      number of connections the server will hold at one time.  This
+     *      should almost always be set to 1 (the default).
+     *    (Integer) wind - The optional HTTBIND window value.  This is the
+     *      allowed range of request ids that are valid.  The default is 5.
+     */
+    _attach: function (jid, sid, rid, callback, wait, hold, wind) {
+        this._conn.jid = jid;
+        this.sid = sid;
+        this.rid = rid;
+
+        this._conn.connect_callback = callback;
+        this._conn.domain = bosh_Strophe.getDomainFromJid(this._conn.jid);
+        this._conn.authenticated = true;
+        this._conn.connected = true;
+
+        this.wait = wait || this.wait;
+        this.hold = hold || this.hold;
+        this.window = wind || this.window;
+
+        this._conn._changeConnectStatus(bosh_Strophe.Status.ATTACHED, null);
+    },
+
+    /** PrivateFunction: _restore
+     *  Attempt to restore a cached BOSH session
+     *
+     *  Parameters:
+     *    (String) jid - The full JID that is bound by the session.
+     *      This parameter is optional but recommended, specifically in cases
+     *      where prebinded BOSH sessions are used where it's important to know
+     *      that the right session is being restored.
+     *    (Function) callback The connect callback function.
+     *    (Integer) wait - The optional HTTPBIND wait value.  This is the
+     *      time the server will wait before returning an empty result for
+     *      a request.  The default setting of 60 seconds is recommended.
+     *      Other settings will require tweaks to the Strophe.TIMEOUT value.
+     *    (Integer) hold - The optional HTTPBIND hold value.  This is the
+     *      number of connections the server will hold at one time.  This
+     *      should almost always be set to 1 (the default).
+     *    (Integer) wind - The optional HTTBIND window value.  This is the
+     *      allowed range of request ids that are valid.  The default is 5.
+     */
+    _restore: function (jid, callback, wait, hold, wind) {
+        const session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session'));
+        if (typeof session !== "undefined" &&
+                   session !== null &&
+                   session.rid &&
+                   session.sid &&
+                   session.jid &&
+                   (    typeof jid === "undefined" ||
+                        jid === null ||
+                        bosh_Strophe.getBareJidFromJid(session.jid) === bosh_Strophe.getBareJidFromJid(jid) ||
+                        // If authcid is null, then it's an anonymous login, so
+                        // we compare only the domains:
+                        ((bosh_Strophe.getNodeFromJid(jid) === null) && (bosh_Strophe.getDomainFromJid(session.jid) === jid))
+                    )
+        ) {
+            this._conn.restored = true;
+            this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind);
+        } else {
+            const error = new Error("_restore: no restoreable session.");
+            error.name = "StropheSessionError";
+            throw error;
+        }
+    },
+
+    /** PrivateFunction: _cacheSession
+     *  _Private_ handler for the beforeunload event.
+     *
+     *  This handler is used to process the Bosh-part of the initial request.
+     *  Parameters:
+     *    (Strophe.Request) bodyWrap - The received stanza.
+     */
+    _cacheSession: function () {
+        if (this._conn.authenticated) {
+            if (this._conn.jid && this.rid && this.sid) {
+                window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({
+                    'jid': this._conn.jid,
+                    'rid': this.rid,
+                    'sid': this.sid
+                }));
+            }
+        } else {
+            window.sessionStorage.removeItem('strophe-bosh-session');
+        }
+    },
+
+    /** PrivateFunction: _connect_cb
+     *  _Private_ handler for initial connection request.
+     *
+     *  This handler is used to process the Bosh-part of the initial request.
+     *  Parameters:
+     *    (Strophe.Request) bodyWrap - The received stanza.
+     */
+    _connect_cb: function (bodyWrap) {
+        const typ = bodyWrap.getAttribute("type");
+        if (typ !== null && typ === "terminate") {
+            // an error occurred
+            let cond = bodyWrap.getAttribute("condition");
+            bosh_Strophe.error("BOSH-Connection failed: " + cond);
+            const conflict = bodyWrap.getElementsByTagName("conflict");
+            if (cond !== null) {
+                if (cond === "remote-stream-error" && conflict.length > 0) {
+                    cond = "conflict";
+                }
+                this._conn._changeConnectStatus(bosh_Strophe.Status.CONNFAIL, cond);
+            } else {
+                this._conn._changeConnectStatus(bosh_Strophe.Status.CONNFAIL, "unknown");
+            }
+            this._conn._doDisconnect(cond);
+            return bosh_Strophe.Status.CONNFAIL;
+        }
+
+        // check to make sure we don't overwrite these if _connect_cb is
+        // called multiple times in the case of missing stream:features
+        if (!this.sid) {
+            this.sid = bodyWrap.getAttribute("sid");
+        }
+        const wind = bodyWrap.getAttribute('requests');
+        if (wind) { this.window = parseInt(wind, 10); }
+        const hold = bodyWrap.getAttribute('hold');
+        if (hold) { this.hold = parseInt(hold, 10); }
+        const wait = bodyWrap.getAttribute('wait');
+        if (wait) { this.wait = parseInt(wait, 10); }
+        const inactivity = bodyWrap.getAttribute('inactivity');
+        if (inactivity) { this.inactivity = parseInt(inactivity, 10); }
+    },
+
+    /** PrivateFunction: _disconnect
+     *  _Private_ part of Connection.disconnect for Bosh
+     *
+     *  Parameters:
+     *    (Request) pres - This stanza will be sent before disconnecting.
+     */
+    _disconnect: function (pres) {
+        this._sendTerminate(pres);
+    },
+
+    /** PrivateFunction: _doDisconnect
+     *  _Private_ function to disconnect.
+     *
+     *  Resets the SID and RID.
+     */
+    _doDisconnect: function () {
+        this.sid = null;
+        this.rid = Math.floor(Math.random() * 4294967295);
+        if (this._conn._sessionCachingSupported()) {
+            window.sessionStorage.removeItem('strophe-bosh-session');
+        }
+
+        this._conn.nextValidRid(this.rid);
+    },
+
+    /** PrivateFunction: _emptyQueue
+     * _Private_ function to check if the Request queue is empty.
+     *
+     *  Returns:
+     *    True, if there are no Requests queued, False otherwise.
+     */
+    _emptyQueue: function () {
+        return this._requests.length === 0;
+    },
+
+    /** PrivateFunction: _callProtocolErrorHandlers
+     *  _Private_ function to call error handlers registered for HTTP errors.
+     *
+     *  Parameters:
+     *    (Strophe.Request) req - The request that is changing readyState.
+     */
+    _callProtocolErrorHandlers: function (req) {
+        const reqStatus = this._getRequestStatus(req);
+        const err_callback = this._conn.protocolErrorHandlers.HTTP[reqStatus];
+        if (err_callback) {
+            err_callback.call(this, reqStatus);
+        }
+    },
+
+    /** PrivateFunction: _hitError
+     *  _Private_ function to handle the error count.
+     *
+     *  Requests are resent automatically until their error count reaches
+     *  5.  Each time an error is encountered, this function is called to
+     *  increment the count and disconnect if the count is too high.
+     *
+     *  Parameters:
+     *    (Integer) reqStatus - The request status.
+     */
+    _hitError: function (reqStatus) {
+        this.errors++;
+        bosh_Strophe.warn("request errored, status: " + reqStatus +
+                     ", number of errors: " + this.errors);
+        if (this.errors > 4) {
+            this._conn._onDisconnectTimeout();
+        }
+    },
+
+    /** PrivateFunction: _no_auth_received
+     *
+     * Called on stream start/restart when no stream:features
+     * has been received and sends a blank poll request.
+     */
+    _no_auth_received: function (callback) {
+        bosh_Strophe.warn("Server did not yet offer a supported authentication "+
+                     "mechanism. Sending a blank poll request.");
+        if (callback) {
+            callback = callback.bind(this._conn);
+        } else {
+            callback = this._conn._connect_cb.bind(this._conn);
+        }
+        const body = this._buildBody();
+        this._requests.push(
+            new bosh_Strophe.Request(
+                body.tree(),
+                this._onRequestStateChange.bind(this, callback),
+                body.tree().getAttribute("rid")
+            )
+        );
+        this._throttledRequestHandler();
+    },
+
+    /** PrivateFunction: _onDisconnectTimeout
+     *  _Private_ timeout handler for handling non-graceful disconnection.
+     *
+     *  Cancels all remaining Requests and clears the queue.
+     */
+    _onDisconnectTimeout: function () {
+        this._abortAllRequests();
+    },
+
+    /** PrivateFunction: _abortAllRequests
+     *  _Private_ helper function that makes sure all pending requests are aborted.
+     */
+    _abortAllRequests: function _abortAllRequests() {
+        while (this._requests.length > 0) {
+            const req = this._requests.pop();
+            req.abort = true;
+            req.xhr.abort();
+            req.xhr.onreadystatechange = function () {};
+        }
+    },
+
+    /** PrivateFunction: _onIdle
+     *  _Private_ handler called by Strophe.Connection._onIdle
+     *
+     *  Sends all queued Requests or polls with empty Request if there are none.
+     */
+    _onIdle: function () {
+        const data = this._conn._data;
+        // if no requests are in progress, poll
+        if (this._conn.authenticated && this._requests.length === 0 &&
+            data.length === 0 && !this._conn.disconnecting) {
+            bosh_Strophe.debug("no requests during idle cycle, sending blank request");
+            data.push(null);
+        }
+
+        if (this._conn.paused) {
+            return;
+        }
+
+        if (this._requests.length < 2 && data.length > 0) {
+            const body = this._buildBody();
+            for (let i=0; i<data.length; i++) {
+                if (data[i] !== null) {
+                    if (data[i] === "restart") {
+                        body.attrs({
+                            "to": this._conn.domain,
+                            "xml:lang": "en",
+                            "xmpp:restart": "true",
+                            "xmlns:xmpp": bosh_Strophe.NS.BOSH
+                        });
+                    } else {
+                        body.cnode(data[i]).up();
+                    }
+                }
+            }
+            delete this._conn._data;
+            this._conn._data = [];
+            this._requests.push(
+                new bosh_Strophe.Request(
+                    body.tree(),
+                    this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)),
+                    body.tree().getAttribute("rid")
+                )
+            );
+            this._throttledRequestHandler();
+        }
+
+        if (this._requests.length > 0) {
+            const time_elapsed = this._requests[0].age();
+            if (this._requests[0].dead !== null) {
+                if (this._requests[0].timeDead() >
+                    Math.floor(bosh_Strophe.SECONDARY_TIMEOUT * this.wait)) {
+                    this._throttledRequestHandler();
+                }
+            }
+            if (time_elapsed > Math.floor(bosh_Strophe.TIMEOUT * this.wait)) {
+                bosh_Strophe.warn("Request " +
+                             this._requests[0].id +
+                             " timed out, over " + Math.floor(bosh_Strophe.TIMEOUT * this.wait) +
+                             " seconds since last activity");
+                this._throttledRequestHandler();
+            }
+        }
+    },
+
+    /** PrivateFunction: _getRequestStatus
+     *
+     *  Returns the HTTP status code from a Strophe.Request
+     *
+     *  Parameters:
+     *    (Strophe.Request) req - The Strophe.Request instance.
+     *    (Integer) def - The default value that should be returned if no
+     *          status value was found.
+     */
+    _getRequestStatus: function (req, def) {
+        let reqStatus;
+        if (req.xhr.readyState === 4) {
+            try {
+                reqStatus = req.xhr.status;
+            } catch (e) {
+                // ignore errors from undefined status attribute. Works
+                // around a browser bug
+                bosh_Strophe.error(
+                    "Caught an error while retrieving a request's status, " +
+                    "reqStatus: " + reqStatus);
+            }
+        }
+        if (typeof(reqStatus) === "undefined") {
+            reqStatus = typeof def === 'number' ? def : 0;
+        }
+        return reqStatus;
+    },
+
+    /** PrivateFunction: _onRequestStateChange
+     *  _Private_ handler for Strophe.Request state changes.
+     *
+     *  This function is called when the XMLHttpRequest readyState changes.
+     *  It contains a lot of error handling logic for the many ways that
+     *  requests can fail, and calls the request callback when requests
+     *  succeed.
+     *
+     *  Parameters:
+     *    (Function) func - The handler for the request.
+     *    (Strophe.Request) req - The request that is changing readyState.
+     */
+    _onRequestStateChange: function (func, req) {
+        bosh_Strophe.debug("request id "+req.id+"."+req.sends+
+                      " state changed to "+req.xhr.readyState);
+        if (req.abort) {
+            req.abort = false;
+            return;
+        }
+        if (req.xhr.readyState !== 4) {
+            // The request is not yet complete
+            return;
+        }
+        const reqStatus = this._getRequestStatus(req);
+        this.lastResponseHeaders = req.xhr.getAllResponseHeaders();
+        if (this.disconnecting && reqStatus >= 400) {
+            this._hitError(reqStatus);
+            this._callProtocolErrorHandlers(req);
+            return;
+        }
+
+        const valid_request = reqStatus > 0 && reqStatus < 500;
+        const too_many_retries = req.sends > this._conn.maxRetries;
+        if (valid_request || too_many_retries) {
+            // remove from internal queue
+            this._removeRequest(req);
+            bosh_Strophe.debug("request id "+req.id+" should now be removed");
+        }
+
+        if (reqStatus === 200) {
+            // request succeeded
+            const reqIs0 = (this._requests[0] === req);
+            const reqIs1 = (this._requests[1] === req);
+            // if request 1 finished, or request 0 finished and request
+            // 1 is over Strophe.SECONDARY_TIMEOUT seconds old, we need to
+            // restart the other - both will be in the first spot, as the
+            // completed request has been removed from the queue already
+            if (reqIs1 ||
+                (reqIs0 && this._requests.length > 0 &&
+                    this._requests[0].age() > Math.floor(bosh_Strophe.SECONDARY_TIMEOUT * this.wait))) {
+                this._restartRequest(0);
+            }
+            this._conn.nextValidRid(Number(req.rid) + 1);
+            bosh_Strophe.debug("request id "+req.id+"."+req.sends+" got 200");
+            func(req); // call handler
+            this.errors = 0;
+        } else if (reqStatus === 0 ||
+                   (reqStatus >= 400 && reqStatus < 600) ||
+                   reqStatus >= 12000) {
+            // request failed
+            bosh_Strophe.error("request id "+req.id+"."+req.sends+" error "+reqStatus+" happened");
+            this._hitError(reqStatus);
+            this._callProtocolErrorHandlers(req);
+            if (reqStatus >= 400 && reqStatus < 500) {
+                this._conn._changeConnectStatus(bosh_Strophe.Status.DISCONNECTING, null);
+                this._conn._doDisconnect();
+            }
+        } else {
+            bosh_Strophe.error("request id "+req.id+"."+req.sends+" error "+reqStatus+" happened");
+        }
+
+        if (!valid_request && !too_many_retries) {
+            this._throttledRequestHandler();
+        } else if (too_many_retries && !this._conn.connected) {
+            this._conn._changeConnectStatus(bosh_Strophe.Status.CONNFAIL, "giving-up");
+        }
+    },
+
+    /** PrivateFunction: _processRequest
+     *  _Private_ function to process a request in the queue.
+     *
+     *  This function takes requests off the queue and sends them and
+     *  restarts dead requests.
+     *
+     *  Parameters:
+     *    (Integer) i - The index of the request in the queue.
+     */
+    _processRequest: function (i) {
+        let req = this._requests[i];
+        const reqStatus = this._getRequestStatus(req, -1);
+
+        // make sure we limit the number of retries
+        if (req.sends > this._conn.maxRetries) {
+            this._conn._onDisconnectTimeout();
+            return;
+        }
+        const time_elapsed = req.age();
+        const primary_timeout = (!isNaN(time_elapsed) && time_elapsed > Math.floor(bosh_Strophe.TIMEOUT * this.wait));
+        const secondary_timeout = (req.dead !== null && req.timeDead() > Math.floor(bosh_Strophe.SECONDARY_TIMEOUT * this.wait));
+        const server_error = (req.xhr.readyState === 4 && (reqStatus < 1 || reqStatus >= 500));
+
+        if (primary_timeout || secondary_timeout || server_error) {
+            if (secondary_timeout) {
+                bosh_Strophe.error(`Request ${this._requests[i].id} timed out (secondary), restarting`);
+            }
+            req.abort = true;
+            req.xhr.abort();
+            // setting to null fails on IE6, so set to empty function
+            req.xhr.onreadystatechange = function () {};
+            this._requests[i] = new bosh_Strophe.Request(req.xmlData, req.origFunc, req.rid, req.sends);
+            req = this._requests[i];
+        }
+
+        if (req.xhr.readyState === 0) {
+            bosh_Strophe.debug("request id "+req.id+"."+req.sends+" posting");
+
+            try {
+                const content_type = this._conn.options.contentType || "text/xml; charset=utf-8";
+                req.xhr.open("POST", this._conn.service, this._conn.options.sync ? false : true);
+                if (typeof req.xhr.setRequestHeader !== 'undefined') {
+                    // IE9 doesn't have setRequestHeader
+                    req.xhr.setRequestHeader("Content-Type", content_type);
+                }
+                if (this._conn.options.withCredentials) {
+                    req.xhr.withCredentials = true;
+                }
+            } catch (e2) {
+                bosh_Strophe.error("XHR open failed: " + e2.toString());
+                if (!this._conn.connected) {
+                    this._conn._changeConnectStatus(bosh_Strophe.Status.CONNFAIL, "bad-service");
+                }
+                this._conn.disconnect();
+                return;
+            }
+
+            // Fires the XHR request -- may be invoked immediately
+            // or on a gradually expanding retry window for reconnects
+            const sendFunc = () => {
+                req.date = new Date();
+                if (this._conn.options.customHeaders){
+                    const headers = this._conn.options.customHeaders;
+                    for (const header in headers) {
+                        if (Object.prototype.hasOwnProperty.call(headers, header)) {
+                            req.xhr.setRequestHeader(header, headers[header]);
+                        }
+                    }
+                }
+                req.xhr.send(req.data);
+            };
+
+            // Implement progressive backoff for reconnects --
+            // First retry (send === 1) should also be instantaneous
+            if (req.sends > 1) {
+                // Using a cube of the retry number creates a nicely
+                // expanding retry window
+                const backoff = Math.min(Math.floor(bosh_Strophe.TIMEOUT * this.wait),
+                                       Math.pow(req.sends, 3)) * 1000;
+                setTimeout(function() {
+                    // XXX: setTimeout should be called only with function expressions (23974bc1)
+                    sendFunc();
+                }, backoff);
+            } else {
+                sendFunc();
+            }
+
+            req.sends++;
+
+            if (this._conn.xmlOutput !== bosh_Strophe.Connection.prototype.xmlOutput) {
+                if (req.xmlData.nodeName === this.strip && req.xmlData.childNodes.length) {
+                    this._conn.xmlOutput(req.xmlData.childNodes[0]);
+                } else {
+                    this._conn.xmlOutput(req.xmlData);
+                }
+            }
+            if (this._conn.rawOutput !== bosh_Strophe.Connection.prototype.rawOutput) {
+                this._conn.rawOutput(req.data);
+            }
+        } else {
+            bosh_Strophe.debug("_processRequest: " +
+                          (i === 0 ? "first" : "second") +
+                          " request has readyState of " +
+                          req.xhr.readyState);
+        }
+    },
+
+    /** PrivateFunction: _removeRequest
+     *  _Private_ function to remove a request from the queue.
+     *
+     *  Parameters:
+     *    (Strophe.Request) req - The request to remove.
+     */
+    _removeRequest: function (req) {
+        bosh_Strophe.debug("removing request");
+        for (let i=this._requests.length - 1; i>=0; i--) {
+            if (req === this._requests[i]) {
+                this._requests.splice(i, 1);
+            }
+        }
+        // IE6 fails on setting to null, so set to empty function
+        req.xhr.onreadystatechange = function () {};
+        this._throttledRequestHandler();
+    },
+
+    /** PrivateFunction: _restartRequest
+     *  _Private_ function to restart a request that is presumed dead.
+     *
+     *  Parameters:
+     *    (Integer) i - The index of the request in the queue.
+     */
+    _restartRequest: function (i) {
+        const req = this._requests[i];
+        if (req.dead === null) {
+            req.dead = new Date();
+        }
+        this._processRequest(i);
+    },
+
+    /** PrivateFunction: _reqToData
+     * _Private_ function to get a stanza out of a request.
+     *
+     * Tries to extract a stanza out of a Request Object.
+     * When this fails the current connection will be disconnected.
+     *
+     *  Parameters:
+     *    (Object) req - The Request.
+     *
+     *  Returns:
+     *    The stanza that was passed.
+     */
+    _reqToData: function (req) {
+        try {
+            return req.getResponse();
+        } catch (e) {
+            if (e.message !== "parsererror") { throw e; }
+            this._conn.disconnect("strophe-parsererror");
+        }
+    },
+
+    /** PrivateFunction: _sendTerminate
+     *  _Private_ function to send initial disconnect sequence.
+     *
+     *  This is the first step in a graceful disconnect.  It sends
+     *  the BOSH server a terminate body and includes an unavailable
+     *  presence if authentication has completed.
+     */
+    _sendTerminate: function (pres) {
+        bosh_Strophe.debug("_sendTerminate was called");
+        const body = this._buildBody().attrs({type: "terminate"});
+        if (pres) {
+            body.cnode(pres.tree());
+        }
+        const req = new bosh_Strophe.Request(
+            body.tree(),
+            this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)),
+            body.tree().getAttribute("rid")
+        );
+        this._requests.push(req);
+        this._throttledRequestHandler();
+    },
+
+    /** PrivateFunction: _send
+     *  _Private_ part of the Connection.send function for BOSH
+     *
+     * Just triggers the RequestHandler to send the messages that are in the queue
+     */
+    _send: function () {
+        clearTimeout(this._conn._idleTimeout);
+        this._throttledRequestHandler();
+        this._conn._idleTimeout = setTimeout(() => this._conn._onIdle(), 100);
+    },
+
+    /** PrivateFunction: _sendRestart
+     *
+     *  Send an xmpp:restart stanza.
+     */
+    _sendRestart: function () {
+        this._throttledRequestHandler();
+        clearTimeout(this._conn._idleTimeout);
+    },
+
+    /** PrivateFunction: _throttledRequestHandler
+     *  _Private_ function to throttle requests to the connection window.
+     *
+     *  This function makes sure we don't send requests so fast that the
+     *  request ids overflow the connection window in the case that one
+     *  request died.
+     */
+    _throttledRequestHandler: function () {
+        if (!this._requests) {
+            bosh_Strophe.debug("_throttledRequestHandler called with " +
+                          "undefined requests");
+        } else {
+            bosh_Strophe.debug("_throttledRequestHandler called with " +
+                          this._requests.length + " requests");
+        }
+
+        if (!this._requests || this._requests.length === 0) {
+            return;
+        }
+
+        if (this._requests.length > 0) {
+            this._processRequest(0);
+        }
+
+        if (this._requests.length > 1 &&
+            Math.abs(this._requests[0].rid -
+                     this._requests[1].rid) < this.window) {
+            this._processRequest(1);
+        }
+    }
+};
+
+// CONCATENATED MODULE: ./src/headless/converse-bosh.js
+// Converse.js
+// http://conversejs.org
+//
+// Copyright (c) The Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-bosh
+ * @description
+ * Converse.js plugin which add support for XEP-0206: XMPP Over BOSH
+ */
+
+
+
+const {
+  Backbone: converse_bosh_Backbone,
+  Strophe: converse_bosh_Strophe
+} = converse_core.env;
+const BOSH_SESSION_ID = 'converse.bosh-session';
+converse_core.plugins.add('converse-bosh', {
+  enabled() {
+    return true;
+  },
+
+  initialize() {
+    const {
+      _converse
+    } = this;
+
+    _converse.api.settings.update({
+      bosh_service_url: undefined,
+      prebind_url: null
+    });
+
+    async function initBOSHSession() {
+      const id = BOSH_SESSION_ID;
+
+      if (!_converse.bosh_session) {
+        _converse.bosh_session = new converse_bosh_Backbone.Model({
+          id
+        });
+        _converse.bosh_session.browserStorage = _converse.createStore(id, "session");
+        await new Promise(resolve => _converse.bosh_session.fetch({
+          'success': resolve,
+          'error': resolve
+        }));
+      }
+
+      if (_converse.jid) {
+        if (_converse.bosh_session.get('jid') !== _converse.jid) {
+          const jid = await _converse.setUserJID(_converse.jid);
+
+          _converse.bosh_session.clear({
+            'silent': true
+          });
+
+          _converse.bosh_session.save({
+            jid
+          });
+        }
+      } else {
+        // Keepalive
+        const jid = _converse.bosh_session.get('jid');
+
+        jid && (await _converse.setUserJID(jid));
+      }
+
+      return _converse.bosh_session;
+    }
+
+    _converse.startNewPreboundBOSHSession = function () {
+      if (!_converse.prebind_url) {
+        throw new Error("startNewPreboundBOSHSession: If you use prebind then you MUST supply a prebind_url");
+      }
+
+      const xhr = new XMLHttpRequest();
+      xhr.open('GET', _converse.prebind_url, true);
+      xhr.setRequestHeader('Accept', 'application/json, text/javascript');
+
+      xhr.onload = async function () {
+        if (xhr.status >= 200 && xhr.status < 400) {
+          const data = JSON.parse(xhr.responseText);
+          const jid = await _converse.setUserJID(data.jid);
+
+          _converse.connection.attach(jid, data.sid, data.rid, _converse.onConnectStatusChanged);
+        } else {
+          xhr.onerror();
+        }
+      };
+
+      xhr.onerror = function () {
+        delete _converse.connection;
+        /**
+         * Triggered when fetching prebind tokens failed
+         * @event _converse#noResumeableBOSHSession
+         * @type { _converse }
+         * @example _converse.api.listen.on('noResumeableBOSHSession', _converse => { ... });
+         */
+
+        _converse.api.trigger('noResumeableBOSHSession', _converse);
+      };
+
+      xhr.send();
+    };
+
+    _converse.restoreBOSHSession = async function () {
+      const jid = (await initBOSHSession()).get('jid');
+
+      if (jid && _converse.connection._proto instanceof converse_bosh_Strophe.Bosh) {
+        try {
+          _converse.connection.restore(jid, _converse.onConnectStatusChanged);
+
+          return true;
+        } catch (e) {
+          headless_log.warn("Could not restore session for jid: " + jid + " Error message: " + e.message);
+          return false;
+        }
+      }
+
+      return false;
+    };
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('clearSession', () => {
+      if (_converse.bosh_session === undefined) {
+        // Remove manually, even if we don't have the corresponding
+        // model, to avoid trying to reconnect to a stale BOSH session
+        const id = BOSH_SESSION_ID;
+        sessionStorage.removeItem(id);
+        sessionStorage.removeItem("".concat(id, "-").concat(id));
+      } else {
+        _converse.bosh_session.destroy();
+
+        delete _converse.bosh_session;
+      }
+    });
+
+    _converse.api.listen.on('setUserJID', () => {
+      if (_converse.bosh_session !== undefined) {
+        _converse.bosh_session.save({
+          'jid': _converse.jid
+        });
+      }
+    });
+
+    _converse.api.listen.on('addClientFeatures', () => _converse.api.disco.own.features.add(converse_bosh_Strophe.NS.BOSH));
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * This namespace lets you access the BOSH tokens
+       *
+       * @namespace _converse.api.tokens
+       * @memberOf _converse.api
+       */
+      tokens: {
+        /**
+         * @method _converse.api.tokens.get
+         * @param {string} [id] The type of token to return ('rid' or 'sid').
+         * @returns 'string' A token, either the RID or SID token depending on what's asked for.
+         * @example _converse.api.tokens.get('rid');
+         */
+        get(id) {
+          if (_converse.connection === undefined) {
+            return null;
+          }
+
+          if (id.toLowerCase() === 'rid') {
+            return _converse.connection.rid || _converse.connection._proto.rid;
+          } else if (id.toLowerCase() === 'sid') {
+            return _converse.connection.sid || _converse.connection._proto.sid;
+          }
+        }
+
+      }
+    });
+    /************************ end api ************************/
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-caps.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-caps
+ */
+
+
+const {
+  Strophe: converse_caps_Strophe,
+  $build: converse_caps_$build,
+  _
+} = converse_core.env;
+converse_caps_Strophe.addNamespace('CAPS', "http://jabber.org/protocol/caps");
+
+function propertySort(array, property) {
+  return array.sort((a, b) => {
+    return a[property] > b[property] ? -1 : 1;
+  });
+}
+
+function generateVerificationString(_converse) {
+  const identities = _converse.api.disco.own.identities.get();
+
+  const features = _converse.api.disco.own.features.get();
+
+  if (identities.length > 1) {
+    propertySort(identities, "category");
+    propertySort(identities, "type");
+    propertySort(identities, "lang");
+  }
+
+  let S = _.reduce(identities, (result, id) => "".concat(result).concat(id.category, "/").concat(id.type, "/").concat(_.get(id, 'lang', ''), "/").concat(id.name, "<"), "");
+
+  features.sort();
+  S = _.reduce(features, (result, feature) => "".concat(result).concat(feature, "<"), S);
+  return SHA1.b64_sha1(S);
+}
+
+function createCapsNode(_converse) {
+  return converse_caps_$build("c", {
+    'xmlns': converse_caps_Strophe.NS.CAPS,
+    'hash': "sha-1",
+    'node': "https://conversejs.org",
+    'ver': generateVerificationString(_converse)
+  }).nodeTree;
+}
+
+converse_core.plugins.add('converse-caps', {
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    XMPPStatus: {
+      constructPresence() {
+        const presence = this.__super__.constructPresence.apply(this, arguments);
+
+        presence.root().cnode(createCapsNode(this.__super__._converse));
+        return presence;
+      }
+
+    }
+  }
+});
+// CONCATENATED MODULE: ./src/headless/converse-chatboxes.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2012-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-chatboxes
+ */
+
+
+
+
+const {
+  Strophe: converse_chatboxes_Strophe
+} = converse_core.env;
+converse_chatboxes_Strophe.addNamespace('MESSAGE_CORRECT', 'urn:xmpp:message-correct:0');
+converse_chatboxes_Strophe.addNamespace('RECEIPTS', 'urn:xmpp:receipts');
+converse_chatboxes_Strophe.addNamespace('REFERENCE', 'urn:xmpp:reference:0');
+converse_chatboxes_Strophe.addNamespace('MARKERS', 'urn:xmpp:chat-markers:0');
+converse_core.plugins.add('converse-chatboxes', {
+  dependencies: ["converse-emoji", "converse-roster", "converse-vcard"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+
+    _converse.api.promises.add(['chatBoxesFetched', 'chatBoxesInitialized', 'privateChatsAutoJoined']);
+
+    let msg_counter = 0;
+
+    _converse.incrementMsgCounter = function () {
+      msg_counter += 1;
+      const title = document.title;
+
+      if (!title) {
+        return;
+      }
+
+      if (title.search(/^Messages \(\d+\) /) === -1) {
+        document.title = "Messages (".concat(msg_counter, ") ").concat(title);
+      } else {
+        document.title = title.replace(/^Messages \(\d+\) /, "Messages (".concat(msg_counter, ")"));
+      }
+    };
+
+    _converse.clearMsgCounter = function () {
+      msg_counter = 0;
+      const title = document.title;
+
+      if (!title) {
+        return;
+      }
+
+      if (title.search(/^Messages \(\d+\) /) !== -1) {
+        document.title = title.replace(/^Messages \(\d+\) /, "");
+      }
+    };
+
+    _converse.ChatBoxes = _converse.Collection.extend({
+      comparator: 'time_opened',
+
+      model(attrs, options) {
+        return new _converse.ChatBox(attrs, options);
+      },
+
+      onChatBoxesFetched(collection) {
+        /* Show chat boxes upon receiving them from storage */
+        collection.filter(c => !c.isValid()).forEach(c => c.destroy());
+        collection.forEach(c => c.maybeShow());
+        /**
+         * Triggered when a message stanza is been received and processed.
+         * @event _converse#chatBoxesFetched
+         * @type { object }
+         * @property { _converse.ChatBox | _converse.ChatRoom } chatbox
+         * @property { XMLElement } stanza
+         * @example _converse.api.listen.on('message', obj => { ... });
+         * @example _converse.api.waitUntil('chatBoxesFetched').then(() => { ... });
+         */
+
+        _converse.api.trigger('chatBoxesFetched');
+      },
+
+      onConnected(reconnecting) {
+        if (reconnecting) {
+          return;
+        }
+
+        this.browserStorage = _converse.createStore("converse.chatboxes-".concat(_converse.bare_jid));
+        this.fetch({
+          'add': true,
+          'success': c => this.onChatBoxesFetched(c)
+        });
+      }
+
+    });
+
+    async function createChatBox(jid, attrs, model) {
+      jid = converse_chatboxes_Strophe.getBareJidFromJid(jid.toLowerCase());
+      Object.assign(attrs, {
+        'jid': jid,
+        'id': jid
+      });
+      let chatbox;
+
+      try {
+        chatbox = new model(attrs, {
+          'collection': _converse.chatboxes
+        });
+      } catch (e) {
+        headless_log.error(e);
+        return null;
+      }
+
+      await chatbox.initialized;
+
+      if (!chatbox.isValid()) {
+        chatbox.destroy();
+        return null;
+      }
+
+      _converse.chatboxes.add(chatbox);
+
+      await chatbox.messages.fetched;
+      return chatbox;
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('addClientFeatures', () => {
+      _converse.api.disco.own.features.add(converse_chatboxes_Strophe.NS.MESSAGE_CORRECT);
+
+      _converse.api.disco.own.features.add(converse_chatboxes_Strophe.NS.HTTPUPLOAD);
+
+      _converse.api.disco.own.features.add(converse_chatboxes_Strophe.NS.OUTOFBAND);
+    });
+
+    _converse.api.listen.on('pluginsInitialized', () => {
+      _converse.chatboxes = new _converse.ChatBoxes();
+      /**
+       * Triggered once the _converse.ChatBoxes collection has been initialized.
+       * @event _converse#chatBoxesInitialized
+       * @example _converse.api.listen.on('chatBoxesInitialized', () => { ... });
+       * @example _converse.api.waitUntil('chatBoxesInitialized').then(() => { ... });
+       */
+
+      _converse.api.trigger('chatBoxesInitialized');
+    });
+
+    _converse.api.listen.on('presencesInitialized', reconnecting => _converse.chatboxes.onConnected(reconnecting));
+
+    _converse.api.listen.on('reconnected', () => _converse.chatboxes.forEach(m => m.onReconnection()));
+
+    _converse.api.listen.on('windowStateChanged', d => d.state === 'visible' && _converse.clearMsgCounter());
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The "chatboxes" namespace.
+       *
+       * @namespace _converse.api.chatboxes
+       * @memberOf _converse.api
+       */
+      chatboxes: {
+        /**
+         * @method _converse.api.chats.create
+         * @param { String|String[] } jids - A JID or array of JIDs
+         * @param { Object } [attrs] An object containing configuration attributes
+         * @param { Backbone.Model } model - The type of chatbox that should be created
+         */
+        async create() {
+          let jids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+          let attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+          let model = arguments.length > 2 ? arguments[2] : undefined;
+          await _converse.api.waitUntil('chatBoxesFetched');
+
+          if (Object(lodash["isString"])(jids)) {
+            return createChatBox(jids, attrs, model);
+          } else {
+            return Promise.all(jids.map(jid => createChatBox(jid, attrs, model)));
+          }
+        },
+
+        /**
+         * @method _converse.api.chats.get
+         * @param { String|String[] } jids - A JID or array of JIDs
+         */
+        async get(jids) {
+          await _converse.api.waitUntil('chatBoxesFetched');
+
+          if (jids === undefined) {
+            return _converse.chatboxes.models;
+          } else if (Object(lodash["isString"])(jids)) {
+            return _converse.chatboxes.get(jids.toLowerCase());
+          } else {
+            jids = jids.map(j => j.toLowerCase());
+            return _converse.chatboxes.models.filter(m => jids.includes(m.get('jid')));
+          }
+        }
+
+      }
+    });
+    /************************ END API ************************/
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-rsm.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+// Some code taken from the Strophe RSM plugin, licensed under the MIT License
+// Copyright 2006-2017 Strophe (https://github.com/strophe/strophejs)
+//
+
+/**
+ * @module converse-rsm
+ * @description
+ * XEP-0059 Result Set Management
+ */
+
+const {
+  Strophe: converse_rsm_Strophe,
+  $build: converse_rsm_$build
+} = converse_core.env;
+converse_rsm_Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm');
+converse_core.plugins.add('converse-rsm', {
+  initialize() {
+    const {
+      _converse
+    } = this;
+    const RSM_ATTRIBUTES = ['max', 'first', 'last', 'after', 'before', 'index', 'count'];
+    _converse.RSM_ATTRIBUTES = RSM_ATTRIBUTES;
+
+    class RSM {
+      constructor(options) {
+        if (typeof options.xml != 'undefined') {
+          this.fromXMLElement(options.xml);
+        } else {
+          for (let ii = 0; ii < RSM_ATTRIBUTES.length; ii++) {
+            const attrib = RSM_ATTRIBUTES[ii];
+            this[attrib] = options[attrib];
+          }
+        }
+      }
+
+      toXML() {
+        let xml = converse_rsm_$build('set', {
+          xmlns: converse_rsm_Strophe.NS.RSM
+        });
+
+        for (let ii = 0; ii < RSM_ATTRIBUTES.length; ii++) {
+          const attrib = RSM_ATTRIBUTES[ii];
+
+          if (typeof this[attrib] != 'undefined') {
+            xml = xml.c(attrib).t(this[attrib].toString()).up();
+          }
+        }
+
+        return xml.tree();
+      }
+
+      next(max, before) {
+        return new RSM({
+          max: max,
+          after: this.last,
+          before
+        });
+      }
+
+      previous(max, after) {
+        return new RSM({
+          max: max,
+          before: this.first,
+          after
+        });
+      }
+
+      fromXMLElement(xmlElement) {
+        for (var ii = 0; ii < RSM_ATTRIBUTES.length; ii++) {
+          const attrib = RSM_ATTRIBUTES[ii];
+          const elem = xmlElement.getElementsByTagName(attrib)[0];
+
+          if (typeof elem != 'undefined' && elem !== null) {
+            this[attrib] = converse_rsm_Strophe.getText(elem);
+
+            if (attrib == 'first') {
+              this.index = elem.getAttribute('index');
+            }
+          }
+        }
+      }
+
+    }
+
+    _converse.RSM = RSM;
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-mam.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-mam
+ * @description
+ * XEP-0313 Message Archive Management
+ */
+
+
+
+
+
+
+const {
+  Strophe: converse_mam_Strophe,
+  $iq: converse_mam_$iq,
+  dayjs
+} = converse_core.env;
+const converse_mam_u = converse_core.env.utils; // XEP-0313 Message Archive Management
+
+const MAM_ATTRIBUTES = ['with', 'start', 'end'];
+converse_core.plugins.add('converse-mam', {
+  dependencies: ['converse-rsm', 'converse-disco', 'converse-muc'],
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    ChatBox: {
+      async getDuplicateMessage(stanza) {
+        const message = await this.__super__.getDuplicateMessage.apply(this, arguments);
+
+        if (!message) {
+          return this.findDuplicateFromArchiveID(stanza);
+        }
+
+        return message;
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by Converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+
+    _converse.api.settings.update({
+      archived_messages_page_size: '50',
+      message_archiving: undefined,
+      // Supported values are 'always', 'never', 'roster' (https://xmpp.org/extensions/xep-0313.html#prefs)
+      message_archiving_timeout: 20000 // Time (in milliseconds) to wait before aborting MAM request
+
+    });
+
+    const MAMEnabledChat = {
+      /**
+       * Fetches messages that might have been archived *after*
+       * the last archived message in our local cache.
+       * @private
+       */
+      fetchNewestMessages() {
+        if (this.disable_mam) {
+          return;
+        }
+
+        const most_recent_msg = this.getMostRecentMessage();
+
+        if (most_recent_msg) {
+          const stanza_id = most_recent_msg.get("stanza_id ".concat(this.get('jid')));
+
+          if (stanza_id) {
+            this.fetchArchivedMessages({
+              'after': stanza_id
+            }, 'forwards');
+          } else {
+            this.fetchArchivedMessages({
+              'start': most_recent_msg.get('time')
+            }, 'forwards');
+          }
+        } else {
+          this.fetchArchivedMessages({
+            'before': ''
+          });
+        }
+      },
+
+      /**
+       * Fetch XEP-0313 archived messages based on the passed in criteria.
+       * @private
+       * @param { Object } options
+       * @param { integer } [options.max] - The maxinum number of items to return.
+       *  Defaults to "archived_messages_page_size"
+       * @param { string } [options.after] - The XEP-0359 stanza ID of a message
+       *  after which messages should be returned. Implies forward paging.
+       * @param { string } [options.before] - The XEP-0359 stanza ID of a message
+       *  before which messages should be returned. Implies backward paging.
+       * @param { string } [options.end] - A date string in ISO-8601 format,
+       *  before which messages should be returned. Implies backward paging.
+       * @param { string } [options.start] - A date string in ISO-8601 format,
+       *  after which messages should be returned. Implies forward paging.
+       * @param { string } [options.with] - The JID of the entity with
+       *  which messages were exchanged.
+       * @param { boolean } [options.groupchat] - True if archive in groupchat.
+       * @param { boolean } [page] - Whether this function should recursively
+       *  page through the entire result set if a limited number of results
+       *  were returned.
+       */
+      async fetchArchivedMessages() {
+        let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+        let page = arguments.length > 1 ? arguments[1] : undefined;
+
+        if (this.disable_mam) {
+          return;
+        }
+
+        const is_groupchat = this.get('type') === _converse.CHATROOMS_TYPE;
+
+        const mam_jid = is_groupchat ? this.get('jid') : _converse.bare_jid;
+
+        if (!(await _converse.api.disco.supports(converse_mam_Strophe.NS.MAM, mam_jid))) {
+          return;
+        }
+
+        const message_handler = is_groupchat ? this.onMessage.bind(this) : _converse.handleMessageStanza.bind(_converse.chatboxes);
+        const query = Object.assign({
+          'groupchat': is_groupchat,
+          'max': _converse.archived_messages_page_size,
+          'with': this.get('jid')
+        }, options);
+        const result = await _converse.api.archive.query(query);
+        /* eslint-disable no-await-in-loop */
+
+        for (const message of result.messages) {
+          try {
+            await message_handler(message);
+          } catch (e) {
+            headless_log.error(e);
+          }
+        }
+
+        if (result.error) {
+          result.error.retry = () => this.fetchArchivedMessages(options, page);
+
+          this.createMessageFromError(result.error);
+        }
+
+        if (page && result.rsm) {
+          if (page === 'forwards') {
+            options = result.rsm.next(_converse.archived_messages_page_size, options.before);
+          } else if (page === 'backwards') {
+            options = result.rsm.previous(_converse.archived_messages_page_size, options.after);
+          }
+
+          return this.fetchArchivedMessages(options, page);
+        } else {// TODO: Add a special kind of message which will
+          // render as a link to fetch further messages, either
+          // to fetch older messages or to fill in a gap.
+        }
+      },
+
+      async findDuplicateFromArchiveID(stanza) {
+        const result = sizzle_default()("result[xmlns=\"".concat(converse_mam_Strophe.NS.MAM, "\"]"), stanza).pop();
+
+        if (!result) {
+          return null;
+        }
+
+        const by_jid = stanza.getAttribute('from') || this.get('jid');
+        const supported = await _converse.api.disco.supports(converse_mam_Strophe.NS.MAM, by_jid);
+
+        if (!supported) {
+          return null;
+        }
+
+        const query = {};
+        query["stanza_id ".concat(by_jid)] = result.getAttribute('id');
+        return this.messages.findWhere(query);
+      }
+
+    };
+    Object.assign(_converse.ChatBox.prototype, MAMEnabledChat);
+    Object.assign(_converse.ChatRoom.prototype, {});
+
+    _converse.onMAMError = function (iq) {
+      if (iq && iq.querySelectorAll('feature-not-implemented').length) {
+        headless_log.warn("Message Archive Management (XEP-0313) not supported by this server");
+      } else {
+        headless_log.error("An error occured while trying to set archiving preferences.");
+        headless_log.error(iq);
+      }
+    };
+
+    _converse.onMAMPreferences = function (iq, feature) {
+      /* Handle returned IQ stanza containing Message Archive
+       * Management (XEP-0313) preferences.
+       *
+       * XXX: For now we only handle the global default preference.
+       * The XEP also provides for per-JID preferences, which is
+       * currently not supported in converse.js.
+       *
+       * Per JID preferences will be set in chat boxes, so it'll
+       * probbaly be handled elsewhere in any case.
+       */
+      const preference = sizzle_default()("prefs[xmlns=\"".concat(converse_mam_Strophe.NS.MAM, "\"]"), iq).pop();
+      const default_pref = preference.getAttribute('default');
+
+      if (default_pref !== _converse.message_archiving) {
+        const stanza = converse_mam_$iq({
+          'type': 'set'
+        }).c('prefs', {
+          'xmlns': converse_mam_Strophe.NS.MAM,
+          'default': _converse.message_archiving
+        });
+        Array.from(preference.children).forEach(child => stanza.cnode(child).up()); // XXX: Strictly speaking, the server should respond with the updated prefs
+        // (see example 18: https://xmpp.org/extensions/xep-0313.html#config)
+        // but Prosody doesn't do this, so we don't rely on it.
+
+        _converse.api.sendIQ(stanza).then(() => feature.save({
+          'preferences': {
+            'default': _converse.message_archiving
+          }
+        })).catch(_converse.onMAMError);
+      } else {
+        feature.save({
+          'preferences': {
+            'default': _converse.message_archiving
+          }
+        });
+      }
+    };
+
+    function getMAMPrefsFromFeature(feature) {
+      const prefs = feature.get('preferences') || {};
+
+      if (feature.get('var') !== converse_mam_Strophe.NS.MAM || _converse.message_archiving === undefined) {
+        return;
+      }
+
+      if (prefs['default'] !== _converse.message_archiving) {
+        _converse.api.sendIQ(converse_mam_$iq({
+          'type': 'get'
+        }).c('prefs', {
+          'xmlns': converse_mam_Strophe.NS.MAM
+        })).then(iq => _converse.onMAMPreferences(iq, feature)).catch(_converse.onMAMError);
+      }
+    }
+
+    function preMUCJoinMAMFetch(room) {
+      if (!_converse.muc_show_logs_before_join || !room.features.get('mam_enabled') || room.session.get('connection_status') !== converse_core.ROOMSTATUS.ENTERED || room.get('prejoin_mam_fetched')) {
+        return;
+      }
+
+      room.fetchNewestMessages();
+      room.save({
+        'prejoin_mam_fetched': true
+      });
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('addClientFeatures', () => _converse.api.disco.own.features.add(converse_mam_Strophe.NS.MAM));
+
+    _converse.api.listen.on('serviceDiscovered', getMAMPrefsFromFeature);
+
+    _converse.api.listen.on('chatRoomViewInitialized', view => {
+      if (_converse.muc_show_logs_before_join) {
+        // If we want to show MAM logs before entering the MUC, we need
+        // to be informed once it's clear that this MUC supports MAM.
+        view.model.features.on('change:mam_enabled', preMUCJoinMAMFetch(view.model));
+      }
+    });
+
+    _converse.api.listen.on('enteredNewRoom', room => room.features.get('mam_enabled') && room.fetchNewestMessages());
+
+    _converse.api.listen.on('chatReconnected', chat => {
+      // XXX: For MUCs, we listen to enteredNewRoom instead
+      if (chat.get('type') === _converse.PRIVATE_CHAT_TYPE) {
+        chat.fetchNewestMessages();
+      }
+    });
+
+    _converse.api.listen.on('afterMessagesFetched', chat => {
+      // XXX: We don't want to query MAM every time this is triggered
+      // since it's not necessary when the chat is restored from cache.
+      // (given that BOSH or SMACKS will ensure that you get messages
+      // sent during the reload).
+      // With MUCs we can listen for `enteredNewRoom`.
+      if (chat.get('type') === _converse.PRIVATE_CHAT_TYPE && !_converse.connection.restored) {
+        chat.fetchNewestMessages();
+      }
+    });
+    /************************ END Event Handlers **************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The [XEP-0313](https://xmpp.org/extensions/xep-0313.html) Message Archive Management API
+       *
+       * Enables you to query an XMPP server for archived messages.
+       *
+       * See also the [message-archiving](/docs/html/configuration.html#message-archiving)
+       * option in the configuration settings section, which you'll
+       * usually want to use in conjunction with this API.
+       *
+       * @namespace _converse.api.archive
+       * @memberOf _converse.api
+       */
+      'archive': {
+        /**
+         * Query for archived messages.
+         *
+         * The options parameter can also be an instance of
+         * _converse.RSM to enable easy querying between results pages.
+         *
+         * @method _converse.api.archive.query
+         * @param {(Object|_converse.RSM)} options Query parameters, either
+         *      MAM-specific or also for Result Set Management.
+         *      Can be either an object or an instance of _converse.RSM.
+         *      Valid query parameters are:
+         * * `with`
+         * * `start`
+         * * `end`
+         * * `first`
+         * * `last`
+         * * `after`
+         * * `before`
+         * * `index`
+         * * `count`
+         * * `groupchat`
+         * @throws {Error} An error is thrown if the XMPP server responds with an error.
+         * @returns { (Promise<Object> | _converse.TimeoutError) } A promise which resolves
+         * to an object which will have keys `messages` and `rsm` which contains a _converse.RSM
+         * object on which "next" or "previous" can be called before passing it in again
+         * to this method, to get the next or previous page in the result set.
+         *
+         * @example
+         * // Requesting all archived messages
+         * // ================================
+         * //
+         * // The simplest query that can be made is to simply not pass in any parameters.
+         * // Such a query will return all archived messages for the current user.
+         *
+         * let result;
+         * try {
+         *     result = await _converse.api.archive.query();
+         * } catch (e) {
+         *     // The query was not successful, perhaps inform the user?
+         *     // The IQ stanza returned by the XMPP server is passed in, so that you
+         *     // may inspect it and determine what the problem was.
+         * }
+         * // Do something with the messages, like showing them in your webpage.
+         * result.messages.forEach(m => this.showMessage(m));
+         *
+         * @example
+         * // Requesting all archived messages for a particular contact or room
+         * // =================================================================
+         * //
+         * // To query for messages sent between the current user and another user or room,
+         * // the query options need to contain the the JID (Jabber ID) of the user or
+         * // room under the  `with` key.
+         *
+         * // For a particular user
+         * let result;
+         * try {
+         *    result = await _converse.api.archive.query({'with': 'john@doe.net'});
+         * } catch (e) {
+         *     // The query was not successful
+         * }
+         *
+         * // For a particular room
+         * let result;
+         * try {
+         *    result = await _converse.api.archive.query({'with': 'discuss@conference.doglovers.net', 'groupchat': true});
+         * } catch (e) {
+         *     // The query was not successful
+         * }
+         *
+         * @example
+         * // Requesting all archived messages before or after a certain date
+         * // ===============================================================
+         * //
+         * // The `start` and `end` parameters are used to query for messages
+         * // within a certain timeframe. The passed in date values may either be ISO8601
+         * // formatted date strings, or JavaScript Date objects.
+         *
+         *  const options = {
+         *      'with': 'john@doe.net',
+         *      'start': '2010-06-07T00:00:00Z',
+         *      'end': '2010-07-07T13:23:54Z'
+         *  };
+         * let result;
+         * try {
+         *    result = await _converse.api.archive.query(options);
+         * } catch (e) {
+         *     // The query was not successful
+         * }
+         *
+         * @example
+         * // Limiting the amount of messages returned
+         * // ========================================
+         * //
+         * // The amount of returned messages may be limited with the `max` parameter.
+         * // By default, the messages are returned from oldest to newest.
+         *
+         * // Return maximum 10 archived messages
+         * let result;
+         * try {
+         *     result = await _converse.api.archive.query({'with': 'john@doe.net', 'max':10});
+         * } catch (e) {
+         *     // The query was not successful
+         * }
+         *
+         * @example
+         * // Paging forwards through a set of archived messages
+         * // ==================================================
+         * //
+         * // When limiting the amount of messages returned per query, you might want to
+         * // repeatedly make a further query to fetch the next batch of messages.
+         * //
+         * // To simplify this usecase for you, the callback method receives not only an array
+         * // with the returned archived messages, but also a special _converse.RSM (*Result Set Management*)
+         * // object which contains the query parameters you passed in, as well
+         * // as two utility methods `next`, and `previous`.
+         * //
+         * // When you call one of these utility methods on the returned RSM object, and then
+         * // pass the result into a new query, you'll receive the next or previous batch of
+         * // archived messages. Please note, when calling these methods, pass in an integer
+         * // to limit your results.
+         *
+         * let result;
+         * try {
+         *     result = await _converse.api.archive.query({'with': 'john@doe.net', 'max':10});
+         * } catch (e) {
+         *     // The query was not successful
+         * }
+         * // Do something with the messages, like showing them in your webpage.
+         * result.messages.forEach(m => this.showMessage(m));
+         *
+         * while (result.rsm) {
+         *     try {
+         *         result = await _converse.api.archive.query(rsm.next(10));
+         *     } catch (e) {
+         *         // The query was not successful
+         *     }
+         *     // Do something with the messages, like showing them in your webpage.
+         *     result.messages.forEach(m => this.showMessage(m));
+         * }
+         *
+         * @example
+         * // Paging backwards through a set of archived messages
+         * // ===================================================
+         * //
+         * // To page backwards through the archive, you need to know the UID of the message
+         * // which you'd like to page backwards from and then pass that as value for the
+         * // `before` parameter. If you simply want to page backwards from the most recent
+         * // message, pass in the `before` parameter with an empty string value `''`.
+         *
+         * let result;
+         * try {
+         *     result = await _converse.api.archive.query({'before': '', 'max':5});
+         * } catch (e) {
+         *     // The query was not successful
+         * }
+         * // Do something with the messages, like showing them in your webpage.
+         * result.messages.forEach(m => this.showMessage(m));
+         *
+         * // Now we query again, to get the previous batch.
+         * try {
+         *      result = await _converse.api.archive.query(rsm.previous(5););
+         * } catch (e) {
+         *     // The query was not successful
+         * }
+         * // Do something with the messages, like showing them in your webpage.
+         * result.messages.forEach(m => this.showMessage(m));
+         *
+         */
+        async query(options) {
+          if (!_converse.api.connection.connected()) {
+            throw new Error('Can\'t call `api.archive.query` before having established an XMPP session');
+          }
+
+          const attrs = {
+            'type': 'set'
+          };
+
+          if (options && options.groupchat) {
+            if (!options['with']) {
+              throw new Error('You need to specify a "with" value containing ' + 'the chat room JID, when querying groupchat messages.');
+            }
+
+            attrs.to = options['with'];
+          }
+
+          const jid = attrs.to || _converse.bare_jid;
+          const supported = await _converse.api.disco.supports(converse_mam_Strophe.NS.MAM, jid);
+
+          if (!supported) {
+            headless_log.warn("Did not fetch MAM archive for ".concat(jid, " because it doesn't support ").concat(converse_mam_Strophe.NS.MAM));
+            return {
+              'messages': []
+            };
+          }
+
+          const queryid = converse_mam_u.getUniqueId();
+          const stanza = converse_mam_$iq(attrs).c('query', {
+            'xmlns': converse_mam_Strophe.NS.MAM,
+            'queryid': queryid
+          });
+
+          if (options) {
+            stanza.c('x', {
+              'xmlns': converse_mam_Strophe.NS.XFORM,
+              'type': 'submit'
+            }).c('field', {
+              'var': 'FORM_TYPE',
+              'type': 'hidden'
+            }).c('value').t(converse_mam_Strophe.NS.MAM).up().up();
+
+            if (options['with'] && !options.groupchat) {
+              stanza.c('field', {
+                'var': 'with'
+              }).c('value').t(options['with']).up().up();
+            }
+
+            ['start', 'end'].forEach(t => {
+              if (options[t]) {
+                const date = dayjs(options[t]);
+
+                if (date.isValid()) {
+                  stanza.c('field', {
+                    'var': t
+                  }).c('value').t(date.toISOString()).up().up();
+                } else {
+                  throw new TypeError("archive.query: invalid date provided for: ".concat(t));
+                }
+              }
+            });
+            stanza.up();
+
+            if (options instanceof _converse.RSM) {
+              stanza.cnode(options.toXML());
+            } else if (Object(lodash["intersection"])(_converse.RSM_ATTRIBUTES, Object.keys(options)).length) {
+              stanza.cnode(new _converse.RSM(options).toXML());
+            }
+          }
+
+          const messages = [];
+
+          const message_handler = _converse.connection.addHandler(stanza => {
+            const result = sizzle_default()("message > result[xmlns=\"".concat(converse_mam_Strophe.NS.MAM, "\"]"), stanza).pop();
+
+            if (result === undefined || result.getAttribute('queryid') !== queryid) {
+              return true;
+            }
+
+            const from = stanza.getAttribute('from') || _converse.bare_jid;
+
+            if (options.groupchat) {
+              if (from !== options['with']) {
+                headless_log.warn("Ignoring alleged groupchat MAM message from ".concat(stanza.getAttribute('from')));
+                return true;
+              }
+            } else if (from !== _converse.bare_jid) {
+              headless_log.warn("Ignoring alleged MAM message from ".concat(stanza.getAttribute('from')));
+              return true;
+            }
+
+            messages.push(stanza);
+            return true;
+          }, converse_mam_Strophe.NS.MAM);
+
+          let error;
+          const iq_result = await _converse.api.sendIQ(stanza, _converse.message_archiving_timeout, false);
+
+          if (iq_result === null) {
+            const err_msg = "Timeout while trying to fetch archived messages.";
+            headless_log.error(err_msg);
+            error = new _converse.TimeoutError(err_msg);
+            return {
+              messages,
+              error
+            };
+          } else if (converse_mam_u.isErrorStanza(iq_result)) {
+            headless_log.error("Error stanza received while trying to fetch archived messages");
+            headless_log.error(iq_result);
+            return {
+              messages
+            };
+          }
+
+          _converse.connection.deleteHandler(message_handler);
+
+          let rsm;
+          const fin = iq_result && sizzle_default()("fin[xmlns=\"".concat(converse_mam_Strophe.NS.MAM, "\"]"), iq_result).pop();
+
+          if (fin && [null, 'false'].includes(fin.getAttribute('complete'))) {
+            const set = sizzle_default()("set[xmlns=\"".concat(converse_mam_Strophe.NS.RSM, "\"]"), fin).pop();
+
+            if (set) {
+              rsm = new _converse.RSM({
+                'xml': set
+              });
+              Object.assign(rsm, Object.assign(Object(lodash["pick"])(options, [...MAM_ATTRIBUTES, ..._converse.RSM_ATTRIBUTES]), rsm));
+            }
+          }
+
+          return {
+            messages,
+            rsm,
+            error
+          };
+        }
+
+      }
+    });
+    /************************ END API ************************/
+  }
+
+});
+// EXTERNAL MODULE: ./node_modules/backbone.nativeview/backbone.nativeview.js
+var backbone_nativeview = __webpack_require__(38);
+
+// CONCATENATED MODULE: ./node_modules/backbone.overview/backbone.overview.js
+/*!
+ * Backbone.Overview
+ *
+ * Copyright (c) JC Brand <jc@opkode.com>
+ * Licensed under the Mozilla Public License (MPL)
+ */
+
+
+
+const View = Backbone.NativeView === undefined ? Backbone.View : Backbone.NativeView;
+
+
+const Overview = Backbone.Overview = function (options) {
+   /* An Overview is a View that contains and keeps track of sub-views.
+   * Kind of like what a Collection is to a Model.
+   */
+   this.views = {};
+   this.keys = () => Object.keys(this.views);
+   this.getAll = () => this.views;
+   this.get = id => this.views[id];
+
+   /* Exclusive get. Returns all instances except the given id. */
+   this.xget = id => {
+      return this.keys()
+         .filter(k => (k !== id))
+         .reduce((acc, k) => {
+            acc[k] = this.views[k]
+            return acc;
+         }, {});
+   }
+
+   this.add = (id, view) => {
+      this.views[id] = view;
+      return view;
+   };
+
+   this.remove = id => {
+      if (typeof id === "undefined") {
+            new View().remove.apply(this);
+      }
+      const view = this.views[id];
+      if (view) {
+            delete this.views[id];
+            view.remove();
+            return view;
+      }
+   };
+
+   this.removeAll = () => {
+      this.keys().forEach(id => this.remove(id));
+      return this;
+   }
+
+   View.apply(this, Array.prototype.slice.apply(arguments));
+};
+
+
+const methods = {
+   chain: lodash["chain"], includes: lodash["includes"], difference: lodash["difference"], drop: lodash["drop"],
+   every: lodash["every"], filter: lodash["filter"], find: lodash["find"],
+   first: lodash["first"], forEach: lodash["forEach"], head: lodash["head"],
+   indexOf: lodash["indexOf"], initial: lodash["initial"], invoke: lodash["invoke"], isEmpty: lodash["isEmpty"],
+   last: lodash["last"], lastIndexOf: lodash["lastIndexOf"], map: lodash["map"], max: lodash["max"], min: lodash["min"], reduce: lodash["reduce"],
+   reduceRight: lodash["reduceRight"], reject: lodash["reject"], rest: lodash["rest"], sample: lodash["sample"],
+   shuffle: lodash["shuffle"], size: lodash["size"], some: lodash["some"], sortBy: lodash["sortBy"], tail: lodash["tail"], take: lodash["take"],
+   toArray: lodash["toArray"], without: lodash["without"]
+}
+Object.keys(methods).forEach(name => {
+   Overview.prototype[name] = function() {
+      const args = Array.prototype.slice.call(arguments);
+      args.unshift(this.views);
+      return methods[name].apply(this, args);
+   };
+});
+
+Object(lodash["extend"])(Overview.prototype, View.prototype);
+Overview.extend = View.extend;
+
+
+const OrderedListView = Backbone.OrderedListView = Backbone.Overview.extend({
+   /* An OrderedListView is a special type of Overview which adds some
+    * methods and conventions for rendering an ordered list of elements.
+    */
+   // The `listItems` attribute denotes the path (from this View) to the
+   // list of items.
+   listItems: 'model',
+   // The `sortEvent` attribute specifies the event which should cause the
+   // ordered list to be sorted.
+   sortEvent: 'change',
+   // If false, we debounce sorting and inserting the new item
+   // (for improved performance when a large amount of items get added all at once)
+   // Otherwise we immediately sort the items and insert the new item.
+   sortImmediatelyOnAdd: false,
+   // The `listSelector` is the selector used to query for the DOM list
+   // element which contains the ordered items.
+   listSelector: '.ordered-items',
+   // The `itemView` is constructor which should be called to create a
+   // View for a new item.
+   ItemView: undefined,
+   // The `subviewIndex` is the attribute of the list element model which
+   // acts as the index of the subview in the overview.
+   // An overview is a "Collection" of views, and they can be retrieved
+   // via an index. By default this is the 'id' attribute, but it could be
+   // set to something else.
+   subviewIndex: 'id',
+
+   initialize () {
+      this.sortEventually = Object(lodash["debounce"])(() => this.sortAndPositionAllItems(), 100);
+      this.items = Object(lodash["get"])(this, this.listItems);
+      this.items.on('remove', this.removeView, this);
+      this.items.on('reset', this.removeAll, this);
+
+      this.items.on('add', (a, b) => {
+         if (this.sortImmediatelyOnAdd) {
+            this.sortAndPositionAllItems();
+         } else {
+            this.sortEventually();
+         }
+      });
+
+      if (this.sortEvent) {
+         this.items.on(this.sortEvent, this.sortEventually, this);
+      }
+   },
+
+   createItemView (item) {
+      let item_view = this.get(item.get(this.subviewIndex));
+      if (!item_view) {
+            item_view = new this.ItemView({model: item});
+            this.add(item.get(this.subviewIndex), item_view);
+      } else {
+            item_view.model = item;
+            item_view.initialize();
+      }
+      item_view.render();
+      return item_view;
+   },
+
+   removeView (item) {
+      this.remove(item.get(this.subviewIndex));
+   },
+
+   sortAndPositionAllItems () {
+      if (!this.items.length) {
+            return;
+      }
+      this.items.sort();
+
+      const list_el = this.el.querySelector(this.listSelector);
+      const div = document.createElement('div');
+      list_el.parentNode.replaceChild(div, list_el);
+      this.items.forEach(item => {
+            let view = this.get(item.get(this.subviewIndex));
+            if (!view) {
+               view = this.createItemView(item)
+            }
+            list_el.insertAdjacentElement('beforeend', view.el);
+      });
+      div.parentNode.replaceChild(list_el, div);
+   }
+});
+
+
+
+// EXTERNAL MODULE: ./src/templates/avatar.svg
+var avatar = __webpack_require__(121);
+var avatar_default = /*#__PURE__*/__webpack_require__.n(avatar);
+
+// EXTERNAL MODULE: ./src/templates/background_logo.html
+var background_logo = __webpack_require__(122);
+var background_logo_default = /*#__PURE__*/__webpack_require__.n(background_logo);
+
+// EXTERNAL MODULE: ./src/templates/chatboxes.html
+var chatboxes = __webpack_require__(61);
+var chatboxes_default = /*#__PURE__*/__webpack_require__.n(chatboxes);
+
+// CONCATENATED MODULE: ./src/converse-chatboxviews.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2012-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-chatboxviews
+ */
+
+
+
+
+
+
+
+const {
+  Backbone: converse_chatboxviews_Backbone,
+  _: converse_chatboxviews_,
+  utils: converse_chatboxviews_utils
+} = converse_core.env;
+const converse_chatboxviews_u = converse_chatboxviews_utils;
+const AvatarMixin = {
+  renderAvatar(el) {
+    el = el || this.el;
+    const avatar_el = el.querySelector('canvas.avatar, svg.avatar');
+
+    if (avatar_el === null) {
+      return;
+    }
+
+    if (this.model.vcard) {
+      const data = {
+        'classes': avatar_el.getAttribute('class'),
+        'width': avatar_el.getAttribute('width'),
+        'height': avatar_el.getAttribute('height')
+      };
+      const image_type = this.model.vcard.get('image_type');
+      const image = this.model.vcard.get('image');
+      data['image'] = "data:" + image_type + ";base64," + image;
+      avatar_el.outerHTML = avatar_default()(data);
+    }
+  }
+
+};
+converse_core.plugins.add('converse-chatboxviews', {
+  dependencies: ["converse-chatboxes", "converse-vcard"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+
+    _converse.api.promises.add(['chatBoxViewsInitialized']); // Configuration values for this plugin
+    // ====================================
+    // Refer to docs/source/configuration.rst for explanations of these
+    // configuration settings.
+
+
+    _converse.api.settings.update({
+      'animate': true,
+      'theme': 'default'
+    });
+
+    _converse.ViewWithAvatar = converse_chatboxviews_Backbone.NativeView.extend(AvatarMixin);
+    _converse.VDOMViewWithAvatar = converse_chatboxviews_Backbone.VDOMView.extend(AvatarMixin);
+    _converse.ChatBoxViews = Overview.extend({
+      _ensureElement() {
+        /* Override method from backbone.js
+         * If the #conversejs element doesn't exist, create it.
+         */
+        if (!this.el) {
+          let el = _converse.root.querySelector('#conversejs');
+
+          if (el === null) {
+            el = document.createElement('div');
+            el.setAttribute('id', 'conversejs');
+            converse_chatboxviews_u.addClass("theme-".concat(_converse.theme), el);
+
+            const body = _converse.root.querySelector('body');
+
+            if (body) {
+              body.appendChild(el);
+            } else {
+              // Perhaps inside a web component?
+              _converse.root.appendChild(el);
+            }
+          }
+
+          el.innerHTML = '';
+          this.setElement(el, false);
+        } else {
+          this.setElement(converse_chatboxviews_.result(this, 'el'), false);
+        }
+      },
+
+      initialize() {
+        this.listenTo(this.model, "destroy", this.removeChat);
+        const bg = document.getElementById('conversejs-bg');
+
+        if (bg && !bg.innerHTML.trim()) {
+          bg.innerHTML = background_logo_default()();
+        }
+
+        const body = document.querySelector('body');
+        body.classList.add("converse-".concat(_converse.view_mode));
+        this.el.classList.add("converse-".concat(_converse.view_mode));
+
+        if (_converse.singleton) {
+          this.el.classList.add("converse-singleton");
+        }
+
+        this.render();
+      },
+
+      render() {
+        try {
+          this.el.innerHTML = chatboxes_default()();
+        } catch (e) {
+          this._ensureElement();
+
+          this.el.innerHTML = chatboxes_default()();
+        }
+
+        this.row_el = this.el.querySelector('.row');
+      },
+
+      insertRowColumn(el) {
+        /* Add a new DOM element (likely a chat box) into the
+         * the row managed by this overview.
+         */
+        this.row_el.insertAdjacentElement('afterBegin', el);
+      },
+
+      removeChat(item) {
+        this.remove(item.get('id'));
+      },
+
+      closeAllChatBoxes() {
+        return Promise.all(this.map(v => v.close({
+          'name': 'closeAllChatBoxes'
+        })));
+      }
+
+    });
+    /************************ BEGIN Event Handlers ************************/
+
+    _converse.api.listen.on('chatBoxesInitialized', () => {
+      _converse.chatboxviews = new _converse.ChatBoxViews({
+        'model': _converse.chatboxes
+      });
+      /**
+       * Triggered once the _converse.ChatBoxViews view-colleciton has been initialized
+       * @event _converse#chatBoxViewsInitialized
+       * @example _converse.api.listen.on('chatBoxViewsInitialized', () => { ... });
+       */
+
+      _converse.api.trigger('chatBoxViewsInitialized');
+    });
+
+    _converse.api.listen.on('clearSession', () => _converse.chatboxviews.closeAllChatBoxes());
+
+    function calculateViewportHeightUnit() {
+      const vh = window.innerHeight * 0.01;
+      document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
+    }
+
+    _converse.api.listen.on('chatBoxViewsInitialized', () => calculateViewportHeightUnit());
+
+    window.addEventListener('resize', () => calculateViewportHeightUnit());
+    /************************ END Event Handlers ************************/
+  }
+
+});
+// EXTERNAL MODULE: ./node_modules/urijs/src/URI.js
+var URI = __webpack_require__(20);
+var URI_default = /*#__PURE__*/__webpack_require__.n(URI);
+
+// EXTERNAL MODULE: ./src/templates/audio.html
+var audio = __webpack_require__(123);
+var audio_default = /*#__PURE__*/__webpack_require__.n(audio);
+
+// EXTERNAL MODULE: ./src/templates/file.html
+var templates_file = __webpack_require__(124);
+var file_default = /*#__PURE__*/__webpack_require__.n(templates_file);
+
+// EXTERNAL MODULE: ./src/templates/form_captcha.html
+var form_captcha = __webpack_require__(125);
+var form_captcha_default = /*#__PURE__*/__webpack_require__.n(form_captcha);
+
+// EXTERNAL MODULE: ./src/templates/form_checkbox.html
+var form_checkbox = __webpack_require__(126);
+var form_checkbox_default = /*#__PURE__*/__webpack_require__.n(form_checkbox);
+
+// EXTERNAL MODULE: ./src/templates/form_input.html
+var form_input = __webpack_require__(42);
+var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input);
+
+// EXTERNAL MODULE: ./src/templates/form_select.html
+var form_select = __webpack_require__(127);
+var form_select_default = /*#__PURE__*/__webpack_require__.n(form_select);
+
+// EXTERNAL MODULE: ./src/templates/form_textarea.html
+var form_textarea = __webpack_require__(128);
+var form_textarea_default = /*#__PURE__*/__webpack_require__.n(form_textarea);
+
+// EXTERNAL MODULE: ./src/templates/form_url.html
+var form_url = __webpack_require__(129);
+var form_url_default = /*#__PURE__*/__webpack_require__.n(form_url);
+
+// EXTERNAL MODULE: ./src/templates/form_username.html
+var form_username = __webpack_require__(43);
+var form_username_default = /*#__PURE__*/__webpack_require__.n(form_username);
+
+// EXTERNAL MODULE: ./src/templates/image.html
+var templates_image = __webpack_require__(62);
+var image_default = /*#__PURE__*/__webpack_require__.n(templates_image);
+
+// EXTERNAL MODULE: ./src/templates/select_option.html
+var select_option = __webpack_require__(130);
+var select_option_default = /*#__PURE__*/__webpack_require__.n(select_option);
+
+// EXTERNAL MODULE: ./src/templates/video.html
+var video = __webpack_require__(131);
+var video_default = /*#__PURE__*/__webpack_require__.n(video);
+
+// CONCATENATED MODULE: ./src/utils/html.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// This is a form utilities module.
+//
+// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const URL_REGEX = /\b(https?\:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b\/?/g;
+
+function getAutoCompleteProperty(name, options) {
+  return {
+    'muc#roomconfig_lang': 'language',
+    'muc#roomconfig_roomsecret': options.new_password ? 'new-password' : 'current-password'
+  }[name];
+}
+
+const XFORM_TYPE_MAP = {
+  'text-private': 'password',
+  'text-single': 'text',
+  'fixed': 'label',
+  'boolean': 'checkbox',
+  'hidden': 'hidden',
+  'jid-multi': 'textarea',
+  'list-single': 'dropdown',
+  'list-multi': 'dropdown'
+};
+
+function slideOutWrapup(el) {
+  /* Wrapup function for slideOut. */
+  el.removeAttribute('data-slider-marker');
+  el.classList.remove('collapsed');
+  el.style.overflow = "";
+  el.style.height = "";
+}
+
+function isImage(url) {
+  return new Promise((resolve, reject) => {
+    var img = new Image();
+    var timer = window.setTimeout(function () {
+      reject(new Error("Could not determine whether it's an image"));
+      img = null;
+    }, 3000);
+
+    img.onerror = img.onabort = function () {
+      clearTimeout(timer);
+      reject(new Error("Could not determine whether it's an image"));
+    };
+
+    img.onload = function () {
+      clearTimeout(timer);
+      resolve(img);
+    };
+
+    img.src = url;
+  });
+}
+
+function getURI(url) {
+  try {
+    return url instanceof URI_default.a ? url : new URI_default.a(url);
+  } catch (error) {
+    headless_log.debug(error);
+    return null;
+  }
+}
+
+function checkTLS(uri) {
+  return window.location.protocol === 'http:' || window.location.protocol === 'https:' && uri.protocol().toLowerCase() === "https";
+}
+
+function checkFileTypes(types, url) {
+  const uri = getURI(url);
+
+  if (uri === null || !checkTLS(uri)) {
+    return false;
+  }
+
+  const filename = uri.filename().toLowerCase();
+  return !!types.filter(ext => filename.endsWith(ext)).length;
+}
+
+utils_core.isAudioURL = url => checkFileTypes(['.ogg', '.mp3', '.m4a'], url);
+
+utils_core.isImageURL = url => checkFileTypes(['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.svg'], url);
+
+utils_core.isVideoURL = url => checkFileTypes(['.mp4', '.webm'], url);
+
+function getFileName(uri) {
+  try {
+    return decodeURI(uri.filename());
+  } catch (error) {
+    headless_log.debug(error);
+    return uri.filename();
+  }
+}
+
+function renderAudioURL(_converse, uri) {
+  const {
+    __
+  } = _converse;
+  return audio_default()({
+    'url': uri.toString(),
+    'label_download': __('Download audio file "%1$s"', getFileName(uri))
+  });
+}
+
+function renderImageURL(_converse, uri) {
+  if (!_converse.show_images_inline) {
+    return utils_core.convertToHyperlink(uri);
+  }
+
+  const {
+    __
+  } = _converse;
+  return image_default()({
+    'url': uri.toString(),
+    'label_download': __('Download image "%1$s"', getFileName(uri))
+  });
+}
+
+function renderFileURL(_converse, uri) {
+  const {
+    __
+  } = _converse;
+  return file_default()({
+    'url': uri.toString(),
+    'label_download': __('Download file "%1$s"', getFileName(uri))
+  });
+}
+/**
+ * Returns the markup for a URL that points to a downloadable asset
+ * (such as a video, image or audio file).
+ * @method u#getOOBURLMarkup
+ * @param { String } url
+ * @returns { String }
+ */
+
+
+utils_core.getOOBURLMarkup = function (_converse, url) {
+  const uri = getURI(url);
+
+  if (uri === null) {
+    return url;
+  }
+
+  if (utils_core.isVideoURL(uri)) {
+    return video_default()({
+      url
+    });
+  } else if (utils_core.isAudioURL(uri)) {
+    return renderAudioURL(_converse, uri);
+  } else if (utils_core.isImageURL(uri)) {
+    return renderImageURL(_converse, uri);
+  } else {
+    return renderFileURL(_converse, uri);
+  }
+};
+/**
+ * Applies some resistance to `value` around the `default_value`.
+ * If value is close enough to `default_value`, then it is returned, otherwise
+ * `value` is returned.
+ * @method u#applyDragResistance
+ * @param { Integer } value
+ * @param { Integer } default_value
+ * @returns { Integer }
+ */
+
+
+utils_core.applyDragResistance = function (value, default_value) {
+  if (value === undefined) {
+    return undefined;
+  } else if (default_value === undefined) {
+    return value;
+  }
+
+  const resistance = 10;
+
+  if (value !== default_value && Math.abs(value - default_value) < resistance) {
+    return default_value;
+  }
+
+  return value;
+};
+/**
+ * Returns a Promise which resolves once all images have been loaded.
+ * @method u#renderImageURLs
+ * @param { _converse }
+ * @param { HTMLElement }
+ * @returns { Promise }
+ */
+
+
+utils_core.renderImageURLs = function (_converse, el) {
+  if (!_converse.show_images_inline) {
+    return Promise.resolve();
+  }
+
+  const list = el.textContent.match(URL_REGEX) || [];
+  return Promise.all(list.map(url => new Promise(resolve => {
+    if (utils_core.isImageURL(url)) {
+      return isImage(url).then(img => {
+        const i = new Image();
+        i.src = img.src;
+        i.addEventListener('load', resolve); // We also resolve (instead of reject) for non-images,
+        // otherwise the Promise.all resolves prematurely.
+
+        i.addEventListener('error', resolve);
+        const {
+          __
+        } = _converse;
+        sizzle_default()("a[href=\"".concat(url, "\"]"), el).forEach(a => a.outerHTML = image_default()({
+          url,
+          'label_download': __('Download')
+        }));
+      }).catch(resolve);
+    } else {
+      return resolve();
+    }
+  })));
+};
+
+utils_core.renderNewLines = function (text) {
+  return text.replace(/\n\n+/g, '<br/><br/>').replace(/\n/g, '<br/>');
+};
+
+utils_core.calculateElementHeight = function (el) {
+  /* Return the height of the passed in DOM element,
+   * based on the heights of its children.
+   */
+  return lodash_noconflict_default.a.reduce(el.children, (result, child) => result + child.offsetHeight, 0);
+};
+
+utils_core.getNextElement = function (el) {
+  let selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
+  let next_el = el.nextElementSibling;
+
+  while (next_el !== null && !sizzle_default.a.matchesSelector(next_el, selector)) {
+    next_el = next_el.nextElementSibling;
+  }
+
+  return next_el;
+};
+
+utils_core.getPreviousElement = function (el) {
+  let selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
+  let prev_el = el.previousElementSibling;
+
+  while (prev_el !== null && !sizzle_default.a.matchesSelector(prev_el, selector)) {
+    prev_el = prev_el.previousElementSibling;
+  }
+
+  return prev_el;
+};
+
+utils_core.getFirstChildElement = function (el) {
+  let selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
+  let first_el = el.firstElementChild;
+
+  while (first_el !== null && !sizzle_default.a.matchesSelector(first_el, selector)) {
+    first_el = first_el.nextElementSibling;
+  }
+
+  return first_el;
+};
+
+utils_core.getLastChildElement = function (el) {
+  let selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '*';
+  let last_el = el.lastElementChild;
+
+  while (last_el !== null && !sizzle_default.a.matchesSelector(last_el, selector)) {
+    last_el = last_el.previousElementSibling;
+  }
+
+  return last_el;
+};
+
+utils_core.hasClass = function (className, el) {
+  return el instanceof Element && el.classList.contains(className);
+};
+/**
+ * Add a class to an element.
+ * @method u#addClass
+ * @param {string} className
+ * @param {Element} el
+ */
+
+
+utils_core.addClass = function (className, el) {
+  el instanceof Element && el.classList.add(className);
+  return el;
+};
+/**
+ * Remove a class from an element.
+ * @method u#removeClass
+ * @param {string} className
+ * @param {Element} el
+ */
+
+
+utils_core.removeClass = function (className, el) {
+  el instanceof Element && el.classList.remove(className);
+  return el;
+};
+
+utils_core.removeElement = function (el) {
+  el instanceof Element && el.parentNode && el.parentNode.removeChild(el);
+  return el;
+};
+
+utils_core.showElement = lodash_noconflict_default.a.flow(lodash_noconflict_default.a.partial(utils_core.removeClass, 'collapsed'), lodash_noconflict_default.a.partial(utils_core.removeClass, 'hidden'));
+
+utils_core.hideElement = function (el) {
+  el instanceof Element && el.classList.add('hidden');
+  return el;
+};
+
+utils_core.ancestor = function (el, selector) {
+  let parent = el;
+
+  while (parent !== null && !sizzle_default.a.matchesSelector(parent, selector)) {
+    parent = parent.parentElement;
+  }
+
+  return parent;
+};
+/**
+ * Return the element's siblings until one matches the selector.
+ * @private
+ * @method u#nextUntil
+ * @param { HTMLElement } el
+ * @param { String } selector
+ */
+
+
+utils_core.nextUntil = function (el, selector) {
+  const matches = [];
+  let sibling_el = el.nextElementSibling;
+
+  while (sibling_el !== null && !sibling_el.matches(selector)) {
+    matches.push(sibling_el);
+    sibling_el = sibling_el.nextElementSibling;
+  }
+
+  return matches;
+};
+/**
+ * Helper method that replace HTML-escaped symbols with equivalent characters
+ * (e.g. transform occurrences of '&amp;' to '&')
+ * @private
+ * @method u#unescapeHTML
+ * @param { String } string - a String containing the HTML-escaped symbols.
+ */
+
+
+utils_core.unescapeHTML = function (string) {
+  var div = document.createElement('div');
+  div.innerHTML = string;
+  return div.innerText;
+};
+
+utils_core.escapeHTML = function (string) {
+  return string.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
+};
+
+// BAO issue #132
+utils_core.addMentionsMarkup = function (text, references, chatbox) {
+  if (chatbox.get('message_type') !== 'groupchat') {
+    return text;
+  }
+
+  const nick = chatbox.get('nick');
+  references.sort((a, b) => b.begin - a.begin).forEach(ref => {
+    const prefix = text.slice(0, ref.begin);
+    const offset = ((prefix.match(/&lt;/g) || []).length + (prefix.match(/&gt;/g) || []).length) * 3;
+    const begin = parseInt(ref.begin) + parseInt(offset);
+    const end = parseInt(ref.end) + parseInt(offset);
+    const mention = text.slice(begin, end);
+    chatbox;
+
+    if (mention === nick) {
+      text = text.slice(0, begin) + "<span class=\"mention mention--self badge badge-info\">".concat(mention, "</span>") + text.slice(end);
+    } else {
+      text = text.slice(0, begin) + "<span class=\"mention\">".concat(mention, "</span>") + text.slice(end);
+    }
+  });
+  return text;
+};
+
+utils_core.convertToHyperlink = function (url) {
+  const uri = getURI(url);
+
+  if (uri === null) {
+    return url;
+  }
+
+  url = uri.normalize()._string;
+  const pretty_url = uri._parts.urn ? url : uri.readable();
+
+  if (!uri._parts.protocol && !url.startsWith('http://') && !url.startsWith('https://')) {
+    url = 'http://' + url;
+  }
+
+  if (uri._parts.protocol === 'xmpp' && uri._parts.query === 'join') {
+    return "<a target=\"_blank\" rel=\"noopener\" class=\"open-chatroom\" href=\"".concat(url, "\">").concat(utils_core.escapeHTML(pretty_url), "</a>");
+  }
+
+  return "<a target=\"_blank\" rel=\"noopener\" href=\"".concat(url, "\">").concat(utils_core.escapeHTML(pretty_url), "</a>");
+};
+
+utils_core.addHyperlinks = function (text) {
+  const parse_options = {
+    'start': /\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi
+  };
+  return URI_default.a.withinString(text, url => utils_core.convertToHyperlink(url), parse_options);
+};
+
+utils_core.slideInAllElements = function (elements) {
+  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
+  return Promise.all(lodash_noconflict_default.a.map(elements, lodash_noconflict_default.a.partial(utils_core.slideIn, lodash_noconflict_default.a, duration)));
+};
+
+utils_core.slideToggleElement = function (el, duration) {
+  if (lodash_noconflict_default.a.includes(el.classList, 'collapsed') || lodash_noconflict_default.a.includes(el.classList, 'hidden')) {
+    return utils_core.slideOut(el, duration);
+  } else {
+    return utils_core.slideIn(el, duration);
+  }
+};
+/**
+ * Shows/expands an element by sliding it out of itself
+ * @private
+ * @method u#slideOut
+ * @param { HTMLElement } el - The HTML string
+ * @param { Number } duration - The duration amount in milliseconds
+ */
+
+
+utils_core.slideOut = function (el) {
+  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
+  return new Promise((resolve, reject) => {
+    if (!el) {
+      const err = "An element needs to be passed in to slideOut";
+      headless_log.warn(err);
+      reject(new Error(err));
+      return;
+    }
+
+    const marker = el.getAttribute('data-slider-marker');
+
+    if (marker) {
+      el.removeAttribute('data-slider-marker');
+      window.cancelAnimationFrame(marker);
+    }
+
+    const end_height = utils_core.calculateElementHeight(el);
+
+    if (window.converse_disable_effects) {
+      // Effects are disabled (for tests)
+      el.style.height = end_height + 'px';
+      slideOutWrapup(el);
+      resolve();
+      return;
+    }
+
+    if (!utils_core.hasClass('collapsed', el) && !utils_core.hasClass('hidden', el)) {
+      resolve();
+      return;
+    }
+
+    const steps = duration / 17; // We assume 17ms per animation which is ~60FPS
+
+    let height = 0;
+
+    function draw() {
+      height += end_height / steps;
+
+      if (height < end_height) {
+        el.style.height = height + 'px';
+        el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
+      } else {
+        // We recalculate the height to work around an apparent
+        // browser bug where browsers don't know the correct
+        // offsetHeight beforehand.
+        el.removeAttribute('data-slider-marker');
+        el.style.height = utils_core.calculateElementHeight(el) + 'px';
+        el.style.overflow = "";
+        el.style.height = "";
+        resolve();
+      }
+    }
+
+    el.style.height = '0';
+    el.style.overflow = 'hidden';
+    el.classList.remove('hidden');
+    el.classList.remove('collapsed');
+    el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
+  });
+};
+
+utils_core.slideIn = function (el) {
+  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
+
+  /* Hides/collapses an element by sliding it into itself. */
+  return new Promise((resolve, reject) => {
+    if (!el) {
+      const err = "An element needs to be passed in to slideIn";
+      headless_log.warn(err);
+      return reject(new Error(err));
+    } else if (lodash_noconflict_default.a.includes(el.classList, 'collapsed')) {
+      return resolve(el);
+    } else if (window.converse_disable_effects) {
+      // Effects are disabled (for tests)
+      el.classList.add('collapsed');
+      el.style.height = "";
+      return resolve(el);
+    }
+
+    const marker = el.getAttribute('data-slider-marker');
+
+    if (marker) {
+      el.removeAttribute('data-slider-marker');
+      window.cancelAnimationFrame(marker);
+    }
+
+    const original_height = el.offsetHeight,
+          steps = duration / 17; // We assume 17ms per animation which is ~60FPS
+
+    let height = original_height;
+    el.style.overflow = 'hidden';
+
+    function draw() {
+      height -= original_height / steps;
+
+      if (height > 0) {
+        el.style.height = height + 'px';
+        el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
+      } else {
+        el.removeAttribute('data-slider-marker');
+        el.classList.add('collapsed');
+        el.style.height = "";
+        resolve(el);
+      }
+    }
+
+    el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
+  });
+};
+
+function afterAnimationEnds(el, callback) {
+  el.classList.remove('visible');
+
+  if (lodash_noconflict_default.a.isFunction(callback)) {
+    callback();
+  }
+}
+
+utils_core.isInDOM = function (el) {
+  return document.querySelector('body').contains(el);
+};
+
+utils_core.isVisible = function (el) {
+  if (el === null) {
+    return false;
+  }
+
+  if (utils_core.hasClass('hidden', el)) {
+    return false;
+  } // XXX: Taken from jQuery's "visible" implementation
+
+
+  return el.offsetWidth > 0 || el.offsetHeight > 0 || el.getClientRects().length > 0;
+};
+
+utils_core.fadeIn = function (el, callback) {
+  if (!el) {
+    headless_log.warn("An element needs to be passed in to fadeIn");
+  }
+
+  if (window.converse_disable_effects) {
+    el.classList.remove('hidden');
+    return afterAnimationEnds(el, callback);
+  }
+
+  if (lodash_noconflict_default.a.includes(el.classList, 'hidden')) {
+    el.classList.add('visible');
+    el.classList.remove('hidden');
+    el.addEventListener("webkitAnimationEnd", lodash_noconflict_default.a.partial(afterAnimationEnds, el, callback));
+    el.addEventListener("animationend", lodash_noconflict_default.a.partial(afterAnimationEnds, el, callback));
+    el.addEventListener("oanimationend", lodash_noconflict_default.a.partial(afterAnimationEnds, el, callback));
+  } else {
+    afterAnimationEnds(el, callback);
+  }
+};
+/**
+ * Takes a field in XMPP XForm (XEP-004: Data Forms) format
+ * and turns it into an HTML field.
+ * Returns either text or a DOM element (which is not ideal, but fine for now).
+ * @private
+ * @method u#xForm2webForm
+ * @param { XMLElement } field - the field to convert
+ */
+
+
+utils_core.xForm2webForm = function (field, stanza, options) {
+  if (field.getAttribute('type') === 'list-single' || field.getAttribute('type') === 'list-multi') {
+    const values = lodash_noconflict_default.a.map(utils_core.queryChildren(field, 'value'), lodash_noconflict_default.a.partial(lodash_noconflict_default.a.get, lodash_noconflict_default.a, 'textContent'));
+
+    const options = lodash_noconflict_default.a.map(utils_core.queryChildren(field, 'option'), function (option) {
+      const value = lodash_noconflict_default.a.get(option.querySelector('value'), 'textContent');
+
+      return select_option_default()({
+        'value': value,
+        'label': option.getAttribute('label'),
+        'selected': lodash_noconflict_default.a.includes(values, value),
+        'required': !!field.querySelector('required')
+      });
+    });
+
+    return form_select_default()({
+      'id': utils_core.getUniqueId(),
+      'name': field.getAttribute('var'),
+      'label': field.getAttribute('label'),
+      'options': options.join(''),
+      'multiple': field.getAttribute('type') === 'list-multi',
+      'required': !!field.querySelector('required')
+    });
+  } else if (field.getAttribute('type') === 'fixed') {
+    const text = lodash_noconflict_default.a.get(field.querySelector('value'), 'textContent');
+
+    return '<p class="form-help">' + text + '</p>';
+  } else if (field.getAttribute('type') === 'jid-multi') {
+    return form_textarea_default()({
+      'name': field.getAttribute('var'),
+      'label': field.getAttribute('label') || '',
+      'value': lodash_noconflict_default.a.get(field.querySelector('value'), 'textContent'),
+      'required': !!field.querySelector('required')
+    });
+  } else if (field.getAttribute('type') === 'boolean') {
+    return form_checkbox_default()({
+      'id': utils_core.getUniqueId(),
+      'name': field.getAttribute('var'),
+      'label': field.getAttribute('label') || '',
+      'checked': lodash_noconflict_default.a.get(field.querySelector('value'), 'textContent') === "1" && 'checked="1"' || '',
+      'required': !!field.querySelector('required')
+    });
+  } else if (field.getAttribute('var') === 'url') {
+    return form_url_default()({
+      'label': field.getAttribute('label') || '',
+      'value': lodash_noconflict_default.a.get(field.querySelector('value'), 'textContent')
+    });
+  } else if (field.getAttribute('var') === 'username') {
+    return form_username_default()({
+      'domain': ' @' + options.domain,
+      'name': field.getAttribute('var'),
+      'type': XFORM_TYPE_MAP[field.getAttribute('type')],
+      'label': field.getAttribute('label') || '',
+      'value': lodash_noconflict_default.a.get(field.querySelector('value'), 'textContent'),
+      'required': !!field.querySelector('required')
+    });
+  } else if (field.getAttribute('var') === 'ocr') {
+    // Captcha
+    const uri = field.querySelector('uri');
+    const el = sizzle_default()('data[cid="' + uri.textContent.replace(/^cid:/, '') + '"]', stanza)[0];
+    return form_captcha_default()({
+      'label': field.getAttribute('label'),
+      'name': field.getAttribute('var'),
+      'data': lodash_noconflict_default.a.get(el, 'textContent'),
+      'type': uri.getAttribute('type'),
+      'required': !!field.querySelector('required')
+    });
+  } else {
+    const name = field.getAttribute('var');
+    return form_input_default()({
+      'id': utils_core.getUniqueId(),
+      'label': field.getAttribute('label') || '',
+      'name': name,
+      'fixed_username': options.fixed_username,
+      'autocomplete': getAutoCompleteProperty(name, options),
+      'placeholder': null,
+      'required': !!field.querySelector('required'),
+      'type': XFORM_TYPE_MAP[field.getAttribute('type')],
+      'value': lodash_noconflict_default.a.get(field.querySelector('value'), 'textContent')
+    });
+  }
+};
+
+/* harmony default export */ var utils_html = (utils_core);
+// EXTERNAL MODULE: ./src/templates/csn.html
+var csn = __webpack_require__(132);
+var csn_default = /*#__PURE__*/__webpack_require__.n(csn);
+
+// EXTERNAL MODULE: ./src/templates/file_progress.html
+var file_progress = __webpack_require__(133);
+var file_progress_default = /*#__PURE__*/__webpack_require__.n(file_progress);
+
+// EXTERNAL MODULE: ./src/templates/info.html
+var info = __webpack_require__(4);
+var info_default = /*#__PURE__*/__webpack_require__.n(info);
+
+// EXTERNAL MODULE: ./src/templates/message.html
+var templates_message = __webpack_require__(134);
+var message_default = /*#__PURE__*/__webpack_require__.n(templates_message);
+
+// EXTERNAL MODULE: ./src/templates/message_versions_modal.html
+var message_versions_modal = __webpack_require__(135);
+var message_versions_modal_default = /*#__PURE__*/__webpack_require__.n(message_versions_modal);
+
+// EXTERNAL MODULE: ./src/templates/spinner.html
+var templates_spinner = __webpack_require__(8);
+var spinner_default = /*#__PURE__*/__webpack_require__.n(templates_spinner);
+
+// EXTERNAL MODULE: ./node_modules/xss/dist/xss.js
+var xss = __webpack_require__(13);
+var xss_default = /*#__PURE__*/__webpack_require__.n(xss);
+
+// CONCATENATED MODULE: ./src/converse-message-view.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-message-view
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const {
+  Strophe: converse_message_view_Strophe,
+  dayjs: converse_message_view_dayjs
+} = converse_core.env;
+const converse_message_view_u = converse_core.env.utils;
+converse_core.plugins.add('converse-message-view', {
+  dependencies: ["converse-modal", "converse-chatboxviews"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse;
+
+    function onTagFoundDuringXSSFilter(tag, html, options) {
+      /* This function gets called by the XSS library whenever it finds
+       * what it thinks is a new HTML tag.
+       *
+       * It thinks that something like <https://example.com> is an HTML
+       * tag and then escapes the <> chars.
+       *
+       * We want to avoid this, because it prevents these URLs from being
+       * shown properly (whithout the trailing &gt;).
+       *
+       * The URI lib correctly trims a trailing >, but not a trailing &gt;
+       */
+      if (options.isClosing) {
+        // Closing tags don't match our use-case
+        return;
+      }
+
+      const uri = new URI_default.a(tag);
+      const protocol = uri.protocol().toLowerCase();
+
+      if (!["https", "http", "xmpp", "ftp"].includes(protocol)) {
+        // Not a URL, the tag will get filtered as usual
+        return;
+      }
+
+      if (uri.equals(tag) && "<".concat(tag, ">") === html.toLocaleLowerCase()) {
+        // We have something like <https://example.com>, and don't want
+        // to filter it.
+        return html;
+      }
+    }
+
+    _converse.api.settings.update({
+      'show_images_inline': true,
+      'allow_message_retraction': 'all'
+    });
+
+    _converse.MessageVersionsModal = _converse.BootstrapModal.extend({
+      toHTML() {
+        return message_versions_modal_default()(Object.assign(this.model.toJSON(), {
+          '__': __,
+          'dayjs': converse_message_view_dayjs
+        }));
+      }
+
+    });
+    /**
+     * @class
+     * @namespace _converse.MessageView
+     * @memberOf _converse
+     */
+
+    _converse.MessageView = _converse.ViewWithAvatar.extend({
+      events: {
+        'click .chat-msg__edit-modal': 'showMessageVersionsModal',
+        'click .retry': 'onRetryClicked'
+      },
+
+      initialize() {
+        this.debouncedRender = Object(lodash["debounce"])(() => {
+          // If the model gets destroyed in the meantime,
+          // it no longer has a collection
+          if (this.model.collection) {
+            this.render();
+          }
+        }, 50);
+
+        if (this.model.rosterContactAdded) {
+          this.model.rosterContactAdded.then(() => {
+            this.listenTo(this.model.contact, 'change:nickname', this.debouncedRender);
+            this.debouncedRender();
+          });
+        }
+
+        if (this.model.occupant) {
+          this.listenTo(this.model.occupant, 'change:role', this.debouncedRender);
+          this.listenTo(this.model.occupant, 'change:affiliation', this.debouncedRender);
+          this.debouncedRender();
+        }
+
+        this.listenTo(this.model, 'change', this.onChanged);
+        this.listenTo(this.model, 'destroy', this.fadeOut);
+        this.listenTo(this.model, 'vcard:change', this.debouncedRender);
+      },
+
+      async render() {
+        if (this.model.get('reaction_id')) { // BAO issue #9
+          return this.el;
+        }
+        const is_followup = converse_message_view_u.hasClass('chat-msg--followup', this.el);
+
+        if (this.model.isOnlyChatStateNotification()) {
+          this.renderChatStateNotification();
+        } else if (this.model.get('file') && !this.model.get('oob_url')) {
+          if (!this.model.file) {
+            headless_log.error("Attempted to render a file upload message with no file data");
+            return this.el;
+          }
+
+          this.renderFileUploadProgresBar();
+        } else if (this.model.get('type') === 'error') {
+          this.renderErrorMessage();
+        } else if (this.model.get('type') === 'info') {
+          this.renderInfoMessage();
+        } else {
+          await this.renderChatMessage();
+        }
+
+        is_followup && converse_message_view_u.addClass('chat-msg--followup', this.el);
+        return this.el;
+      },
+
+      async onChanged(item) {
+        // Jot down whether it was edited because the `changed`
+        // attr gets removed when this.render() gets called further down.
+        const edited = item.changed.edited;
+
+        if (this.model.changed.progress) {
+          return this.renderFileUploadProgresBar();
+        }
+
+        const isValidChange = prop => Object.prototype.hasOwnProperty.call(this.model.changed, prop);
+
+        // BAO issue #119 (converse #1999)
+        // BAO issue #9
+        const props = ['moderated', 'retracted', 'correcting', 'message', 'type', 'upload', 'received', 'editable', 'first_unread', 'reactions'];
+
+        if (props.filter(isValidChange).length) {
+          await this.debouncedRender();
+        }
+
+        if (edited) {
+          this.onMessageEdited();
+        }
+      },
+
+      fadeOut() {
+        if (_converse.animate) {
+          setTimeout(() => this.remove(), 600);
+          converse_message_view_u.addClass('fade-out', this.el);
+        } else {
+          this.remove();
+        }
+      },
+
+      async onRetryClicked() {
+        this.showSpinner();
+        await this.model.error.retry();
+        this.model.destroy();
+      },
+
+      showSpinner() {
+        this.el.innerHTML = spinner_default()();
+      },
+
+      onMessageEdited() {
+        if (this.model.get('is_archived')) {
+          return;
+        }
+
+        this.el.addEventListener('animationend', () => converse_message_view_u.removeClass('onload', this.el), {
+          'once': true
+        });
+        converse_message_view_u.addClass('onload', this.el);
+      },
+
+      replaceElement(msg) {
+        if (this.el.parentElement) {
+          this.el.parentElement.replaceChild(msg, this.el);
+        }
+
+        this.setElement(msg);
+        return this.el;
+      },
+
+      transformOOBURL(url) {
+        return converse_message_view_u.getOOBURLMarkup(_converse, url);
+      },
+
+      // BAO issue #9
+
+      transformReactions(reactions) {
+        let div = '<div>';
+
+        Object.getOwnPropertyNames(reactions).forEach(function(reaction) {
+            const count = reactions[reaction].length;
+            const emoji = converse_core.env.utils.shortnamesToEmojis(reaction);
+            div = div + '<span class="chat-msg__reaction">' + emoji + '&nbsp' + count + '</span>';
+        });
+        div = div + '</div>';
+        return div;
+      },
+
+      async transformBodyText(text) {
+        /**
+         * Synchronous event which provides a hook for transforming a chat message's body text
+         * before the default transformations have been applied.
+         * @event _converse#beforeMessageBodyTransformed
+         * @param { _converse.MessageView } view - The view representing the message
+         * @param { string } text - The message text
+         * @example _converse.api.listen.on('beforeMessageBodyTransformed', (view, text) => { ... });
+         */
+        await _converse.api.trigger('beforeMessageBodyTransformed', this, text, {
+          'Synchronous': true
+        });
+        text = this.model.isMeCommand() ? text.substring(4) : text;
+        text = xss_default.a.filterXSS(text, {
+          'whiteList': {},
+          'onTag': onTagFoundDuringXSSFilter
+        });
+        text = converse_message_view_u.geoUriToHttp(text, _converse.geouri_replacement);
+        text = converse_message_view_u.addMentionsMarkup(text, this.model.get('references'), this.model.collection.chatbox);
+        text = converse_message_view_u.addHyperlinks(text);
+        text = converse_message_view_u.renderNewLines(text);
+        text = converse_message_view_u.addEmoji(text);
+        /**
+         * Synchronous event which provides a hook for transforming a chat message's body text
+         * after the default transformations have been applied.
+         * @event _converse#afterMessageBodyTransformed
+         * @param { _converse.MessageView } view - The view representing the message
+         * @param { string } text - The message text
+         * @example _converse.api.listen.on('afterMessageBodyTransformed', (view, text) => { ... });
+         */
+
+        await _converse.api.trigger('afterMessageBodyTransformed', this, text, {
+          'Synchronous': true
+        });
+        return text;
+      },
+
+      async renderChatMessage() {
+        await _converse.api.waitUntil('emojisInitialized');
+        const time = converse_message_view_dayjs(this.model.get('time'));
+        const role = this.model.vcard ? this.model.vcard.get('role') : null;
+        const roles = role ? role.split(',') : [];
+        const is_retracted = this.model.get('retracted') || this.model.get('moderated') === 'retracted';
+        const is_groupchat = this.model.get('type') === 'groupchat';
+        const is_own_message = this.model.get('sender') === 'me';
+        const chatbox = this.model.collection.chatbox;
+        const may_retract_own_message = is_own_message && ['all', 'own'].includes(_converse.allow_message_retraction);
+        const may_moderate_message = !is_own_message && is_groupchat && ['all', 'moderator'].includes(_converse.allow_message_retraction) && (await chatbox.canRetractMessages());
+        const retractable = !is_retracted && (may_moderate_message || may_retract_own_message);
+        const msg = converse_message_view_u.stringToElement(message_default()(Object.assign(this.model.toJSON(), {
+          __,
+          is_retracted,
+          retractable,
+          'extra_classes': this.getExtraMessageClasses(),
+          'is_groupchat_message': is_groupchat,
+          'is_me_message': this.model.isMeCommand(),
+          'label_show': __('Show more'),
+          'occupant': this.model.occupant,
+          'pretty_time': time.format(_converse.time_format),
+          'retraction_text': is_retracted ? this.getRetractionText() : null,
+          'first_unread': this.model.get('first_unread'),   // BAO issue #119 (converse #1999)
+          'roles': roles,
+          'time': time.toISOString(),
+          'username': this.model.getDisplayName()
+        })));
+        const url = this.model.get('oob_url');
+
+        if (url) {
+          msg.querySelector('.chat-msg__media').innerHTML = this.transformOOBURL(url);
+        }
+
+        const reactions = this.model.get('reactions');      // BAO issue #9
+        const reactions_div = msg.querySelector('.chat-msg__reactions');
+
+        if (reactions && reactions_div) { // BAO issue #9
+          reactions_div.innerHTML = this.transformReactions(reactions);
+        }
+
+        if (!is_retracted) {
+          const text = this.model.getMessageText();
+          const msg_content = msg.querySelector('.chat-msg__text');
+
+          if (text && text !== url) {
+            msg_content.innerHTML = await this.transformBodyText(text);
+            await converse_message_view_u.renderImageURLs(_converse, msg_content);
+          }
+        }
+
+        if (this.model.get('type') !== 'headline') {
+          this.renderAvatar(msg);
+        }
+
+        this.replaceElement(msg);
+
+        if (this.model.collection) {
+          // If the model gets destroyed in the meantime, it no
+          // longer has a collection.
+          this.model.collection.trigger('rendered', this);
+        }
+      },
+
+      renderInfoMessage() {
+        const msg = converse_message_view_u.stringToElement(info_default()(Object.assign(this.model.toJSON(), {
+          'extra_classes': 'chat-info',
+          'isodate': converse_message_view_dayjs(this.model.get('time')).toISOString()
+        })));
+        return this.replaceElement(msg);
+      },
+
+      getRetractionText() {
+        if (this.model.get('type') === 'groupchat' && this.model.get('moderated_by')) {
+          const retracted_by_mod = this.model.get('moderated_by');
+          const chatbox = this.model.collection.chatbox;
+
+          if (!this.model.mod) {
+            this.model.mod = chatbox.occupants.findOccupant({
+              'jid': retracted_by_mod
+            }) || chatbox.occupants.findOccupant({
+              'nick': converse_message_view_Strophe.getResourceFromJid(retracted_by_mod)
+            });
+          }
+
+          const modname = this.model.mod ? this.model.mod.getDisplayName() : 'A moderator';
+          return __('%1$s has removed this message', modname);
+        } else {
+          return __('%1$s has removed this message', this.model.getDisplayName());
+        }
+      },
+
+      renderErrorMessage() {
+        const msg = converse_message_view_u.stringToElement(info_default()(Object.assign(this.model.toJSON(), {
+          'extra_classes': 'chat-error',
+          'isodate': converse_message_view_dayjs(this.model.get('time')).toISOString()
+        })));
+        return this.replaceElement(msg);
+      },
+
+      renderChatStateNotification() {
+        let text;
+        const from = this.model.get('from');
+        const name = this.model.getDisplayName();
+
+        if (this.model.get('chat_state') === _converse.COMPOSING) {
+          if (this.model.get('sender') === 'me') {
+            text = __('Typing from another device');
+          } else {
+            text = __('%1$s is typing', name);
+          }
+        } else if (this.model.get('chat_state') === _converse.PAUSED) {
+          if (this.model.get('sender') === 'me') {
+            text = __('Stopped typing on the other device');
+          } else {
+            text = __('%1$s has stopped typing', name);
+          }
+        } else if (this.model.get('chat_state') === _converse.GONE) {
+          text = __('%1$s has gone away', name);
+        } else {
+          return;
+        }
+
+        const isodate = new Date().toISOString();
+        this.replaceElement(converse_message_view_u.stringToElement(csn_default()({
+          'message': text,
+          'from': from,
+          'isodate': isodate
+        })));
+      },
+
+      renderFileUploadProgresBar() {
+        const msg = converse_message_view_u.stringToElement(file_progress_default()(Object.assign(this.model.toJSON(), {
+          '__': __,
+          'filename': this.model.file.name,
+          'filesize': filesize_default()(this.model.file.size)
+        })));
+        this.replaceElement(msg);
+        this.renderAvatar();
+      },
+
+      showMessageVersionsModal(ev) {
+        ev.preventDefault();
+
+        if (this.model.message_versions_modal === undefined) {
+          this.model.message_versions_modal = new _converse.MessageVersionsModal({
+            'model': this.model
+          });
+        }
+
+        this.model.message_versions_modal.show(ev);
+      },
+
+      getExtraMessageClasses() {
+        const is_retracted = this.model.get('retracted') || this.model.get('moderated') === 'retracted';
+        const extra_classes = [...(this.model.get('is_delayed') ? ['delayed'] : []), ...(is_retracted ? ['chat-msg--retracted'] : [])];
+
+        if (this.model.get('type') === 'groupchat') {
+          if (this.model.occupant) {
+            extra_classes.push(this.model.occupant.get('role'));
+            extra_classes.push(this.model.occupant.get('affiliation'));
+          }
+
+          if (this.model.get('sender') === 'them' && this.model.collection.chatbox.isUserMentioned(this.model)) {
+            // Add special class to mark groupchat messages
+            // in which we are mentioned.
+            extra_classes.push('mentioned');
+          }
+        }
+
+        if (this.model.get('correcting')) {
+          extra_classes.push('correcting');
+        }
+
+        return extra_classes.filter(c => c).join(" ");
+      }
+
+    });
+  }
+
+});
+// EXTERNAL MODULE: ./node_modules/backbone.vdomview/backbone.vdomview.js
+var backbone_vdomview = __webpack_require__(113);
+
+// EXTERNAL MODULE: ./node_modules/bootstrap.native/dist/bootstrap-native.js
+var bootstrap_native = __webpack_require__(12);
+var bootstrap_native_default = /*#__PURE__*/__webpack_require__.n(bootstrap_native);
+
+// EXTERNAL MODULE: ./src/templates/alert.html
+var templates_alert = __webpack_require__(136);
+var alert_default = /*#__PURE__*/__webpack_require__.n(templates_alert);
+
+// EXTERNAL MODULE: ./src/templates/alert_modal.html
+var alert_modal = __webpack_require__(137);
+var alert_modal_default = /*#__PURE__*/__webpack_require__.n(alert_modal);
+
+// EXTERNAL MODULE: ./src/templates/prompt.html
+var templates_prompt = __webpack_require__(63);
+var prompt_default = /*#__PURE__*/__webpack_require__.n(templates_prompt);
+
+// CONCATENATED MODULE: ./src/converse-modal.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-modal
+ */
+
+
+
+
+
+
+
+const {
+  Backbone: converse_modal_Backbone,
+  sizzle: converse_modal_sizzle
+} = converse_core.env;
+const converse_modal_u = converse_core.env.utils;
+converse_core.plugins.add('converse-modal', {
+  initialize() {
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse;
+    _converse.BootstrapModal = converse_modal_Backbone.VDOMView.extend({
+      events: {
+        'click  .nav-item .nav-link': 'switchTab'
+      },
+
+      initialize() {
+        this.render().insertIntoDOM();
+        this.modal = new bootstrap_native_default.a.Modal(this.el, {
+          backdrop: 'static',
+          keyboard: true
+        });
+        this.el.addEventListener('hide.bs.modal', () => converse_modal_u.removeClass('selected', this.trigger_el), false);
+      },
+
+      insertIntoDOM() {
+        const container_el = _converse.chatboxviews.el.querySelector("#converse-modals");
+
+        container_el.insertAdjacentElement('beforeEnd', this.el);
+      },
+
+      switchTab(ev) {
+        ev.stopPropagation();
+        ev.preventDefault();
+        converse_modal_sizzle('.nav-link.active', this.el).forEach(el => {
+          converse_modal_u.removeClass('active', this.el.querySelector(el.getAttribute('href')));
+          converse_modal_u.removeClass('active', el);
+        });
+        converse_modal_u.addClass('active', ev.target);
+        converse_modal_u.addClass('active', this.el.querySelector(ev.target.getAttribute('href')));
+      },
+
+      alert(message) {
+        let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'primary';
+        const body = this.el.querySelector('.modal-body');
+        body.insertAdjacentHTML('afterBegin', alert_default()({
+          'type': "alert-".concat(type),
+          'message': message
+        }));
+        const el = body.firstElementChild;
+        setTimeout(() => {
+          converse_modal_u.addClass('fade-out', el);
+          setTimeout(() => converse_modal_u.removeElement(el), 600);
+        }, 5000);
+      },
+
+      show(ev) {
+        if (ev) {
+          ev.preventDefault();
+          this.trigger_el = ev.target;
+          this.trigger_el.classList.add('selected');
+        }
+
+        this.modal.show();
+      }
+
+    });
+    _converse.Confirm = _converse.BootstrapModal.extend({
+      events: {
+        'submit .confirm': 'onConfimation'
+      },
+
+      initialize() {
+        this.confirmation = converse_modal_u.getResolveablePromise();
+
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change', this.render);
+        this.el.addEventListener('closed.bs.modal', () => this.confirmation.reject(), false);
+      },
+
+      toHTML() {
+        return prompt_default()(Object.assign({
+          __
+        }, this.model.toJSON()));
+      },
+
+      afterRender() {
+        if (!this.close_handler_registered) {
+          this.el.addEventListener('closed.bs.modal', () => {
+            if (!this.confirmation.isResolved) {
+              this.confirmation.reject();
+            }
+          }, false);
+          this.close_handler_registered = true;
+        }
+      },
+
+      onConfimation(ev) {
+        ev.preventDefault();
+        this.confirmation.resolve(true);
+        this.modal.hide();
+      }
+
+    });
+    _converse.Prompt = _converse.Confirm.extend({
+      toHTML() {
+        return prompt_default()(Object.assign({
+          __
+        }, this.model.toJSON()));
+      },
+
+      onConfimation(ev) {
+        ev.preventDefault();
+        const form_data = new FormData(ev.target);
+        this.confirmation.resolve(form_data.get('reason'));
+        this.modal.hide();
+      }
+
+    });
+    _converse.Alert = _converse.BootstrapModal.extend({
+      initialize() {
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change', this.render);
+      },
+
+      toHTML() {
+        return alert_modal_default()(Object.assign({
+          __
+        }, this.model.toJSON()));
+      }
+
+    });
+    /************************ BEGIN Event Listeners ************************/
+
+    _converse.api.listen.on('disconnect', () => {
+      const container = document.querySelector("#converse-modals");
+
+      if (container) {
+        container.innerHTML = '';
+      }
+    });
+    /************************ BEGIN API ************************/
+    // We extend the default converse.js API to add methods specific to MUC chat rooms.
+
+
+    let alert, prompt, confirm;
+    Object.assign(_converse.api, {
+      /**
+       * Show a confirm modal to the user.
+       * @method _converse.api.confirm
+       * @param { String } title - The header text for the confirmation dialog
+       * @param { (String[]|String) } messages - The text to show to the user
+       * @returns { Promise } A promise which resolves with true or false
+       */
+      async confirm(title) {
+        let messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+
+        if (Object(lodash["isString"])(messages)) {
+          messages = [messages];
+        }
+
+        if (confirm === undefined) {
+          const model = new converse_modal_Backbone.Model({
+            'title': title,
+            'messages': messages,
+            'type': 'confirm'
+          });
+          confirm = new _converse.Confirm({
+            model
+          });
+        } else {
+          confirm.confirmation = converse_modal_u.getResolveablePromise();
+          confirm.model.set({
+            'title': title,
+            'messages': messages,
+            'type': 'confirm'
+          });
+        }
+
+        confirm.show();
+
+        try {
+          return await confirm.confirmation;
+        } catch (e) {
+          return false;
+        }
+      },
+
+      /**
+       * Show a prompt modal to the user.
+       * @method _converse.api.prompt
+       * @param { String } title - The header text for the prompt
+       * @param { (String[]|String) } messages - The prompt text to show to the user
+       * @param { String } placeholder - The placeholder text for the prompt input
+       * @returns { Promise } A promise which resolves with the text provided by the
+       *  user or `false` if the user canceled the prompt.
+       */
+      async prompt(title) {
+        let messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+        let placeholder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
+
+        if (Object(lodash["isString"])(messages)) {
+          messages = [messages];
+        }
+
+        if (prompt === undefined) {
+          const model = new converse_modal_Backbone.Model({
+            'title': title,
+            'messages': messages,
+            'placeholder': placeholder,
+            'type': 'prompt'
+          });
+          prompt = new _converse.Prompt({
+            model
+          });
+        } else {
+          prompt.confirmation = converse_modal_u.getResolveablePromise();
+          prompt.model.set({
+            'title': title,
+            'messages': messages,
+            'type': 'prompt'
+          });
+        }
+
+        prompt.show();
+
+        try {
+          return await prompt.confirmation;
+        } catch (e) {
+          return false;
+        }
+      },
+
+      /**
+       * Show an alert modal to the user.
+       * @method _converse.api.alert
+       * @param { ('info'|'warn'|'error') } type - The type of alert.
+       * @param { String } title - The header text for the alert.
+       * @param { (String[]|String) } messages - The alert text to show to the user.
+       */
+      alert(type, title, messages) {
+        if (Object(lodash["isString"])(messages)) {
+          messages = [messages];
+        }
+
+        let level;
+
+        if (type === 'error') {
+          level = 'alert-danger';
+        } else if (type === 'info') {
+          level = 'alert-info';
+        } else if (type === 'warn') {
+          level = 'alert-warning';
+        }
+
+        if (alert === undefined) {
+          const model = new converse_modal_Backbone.Model({
+            'title': title,
+            'messages': messages,
+            'level': level,
+            'type': 'alert'
+          });
+          alert = new _converse.Alert({
+            model
+          });
+        } else {
+          alert.model.set({
+            'title': title,
+            'messages': messages,
+            'level': level
+          });
+        }
+
+        alert.show();
+      }
+
+    });
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/chatbox.html
+var templates_chatbox = __webpack_require__(44);
+var chatbox_default = /*#__PURE__*/__webpack_require__.n(templates_chatbox);
+
+// EXTERNAL MODULE: ./src/templates/chatbox_head.html
+var chatbox_head = __webpack_require__(138);
+var chatbox_head_default = /*#__PURE__*/__webpack_require__.n(chatbox_head);
+
+// EXTERNAL MODULE: ./src/templates/chatbox_message_form.html
+var chatbox_message_form = __webpack_require__(139);
+var chatbox_message_form_default = /*#__PURE__*/__webpack_require__.n(chatbox_message_form);
+
+// EXTERNAL MODULE: ./src/templates/error_message.html
+var error_message = __webpack_require__(140);
+var error_message_default = /*#__PURE__*/__webpack_require__.n(error_message);
+
+// EXTERNAL MODULE: ./src/templates/help_message.html
+var help_message = __webpack_require__(141);
+var help_message_default = /*#__PURE__*/__webpack_require__.n(help_message);
+
+// EXTERNAL MODULE: ./src/templates/new_day.html
+var new_day = __webpack_require__(142);
+var new_day_default = /*#__PURE__*/__webpack_require__.n(new_day);
+
+// EXTERNAL MODULE: ./src/templates/spoiler_button.html
+var spoiler_button = __webpack_require__(143);
+var spoiler_button_default = /*#__PURE__*/__webpack_require__.n(spoiler_button);
+
+// EXTERNAL MODULE: ./src/templates/status_message.html
+var templates_status_message = __webpack_require__(144);
+var status_message_default = /*#__PURE__*/__webpack_require__.n(templates_status_message);
+
+// EXTERNAL MODULE: ./src/templates/toolbar.html
+var toolbar = __webpack_require__(145);
+var toolbar_default = /*#__PURE__*/__webpack_require__.n(toolbar);
+
+// EXTERNAL MODULE: ./src/templates/toolbar_fileupload.html
+var toolbar_fileupload = __webpack_require__(146);
+var toolbar_fileupload_default = /*#__PURE__*/__webpack_require__.n(toolbar_fileupload);
+
+// EXTERNAL MODULE: ./src/templates/user_details_modal.html
+var user_details_modal = __webpack_require__(147);
+var user_details_modal_default = /*#__PURE__*/__webpack_require__.n(user_details_modal);
+
+// CONCATENATED MODULE: ./src/converse-chatview.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-chatview
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const {
+  Backbone: converse_chatview_Backbone,
+  Strophe: converse_chatview_Strophe,
+  sizzle: converse_chatview_sizzle,
+  dayjs: converse_chatview_dayjs
+} = converse_core.env;
+const converse_chatview_u = converse_core.env.utils;
+converse_core.plugins.add('converse-chatview', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chatboxviews", "converse-chat", "converse-disco", "converse-message-view", "converse-modal"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      'auto_focus': true,
+      'message_limit': 0,
+      'show_send_button': false,
+      'show_retraction_warning': true,
+      'show_toolbar': true,
+      'time_format': 'HH:mm',
+      'visible_toolbar_buttons': {
+        'call': false,
+        'clear': true,
+        'spoiler': true
+      }
+    });
+
+    _converse.ChatBoxHeading = _converse.ViewWithAvatar.extend({
+      initialize() {
+        this.listenTo(this.model, 'change:status', this.onStatusMessageChanged);
+        this.debouncedRender = Object(lodash["debounce"])(this.render, 50);
+        this.listenTo(this.model, 'vcard:change', this.debouncedRender);
+
+        if (this.model.contact) {
+          this.listenTo(this.model.contact, 'destroy', this.debouncedRender);
+        }
+
+        if (this.model.rosterContactAdded) {
+          this.model.rosterContactAdded.then(() => {
+            this.listenTo(this.model.contact, 'change:nickname', this.debouncedRender);
+            this.debouncedRender();
+          });
+        }
+      },
+
+      render() {
+        const vcard = Object(lodash["get"])(this.model, 'vcard');
+        const vcard_json = vcard ? vcard.toJSON() : {};
+        this.el.innerHTML = chatbox_head_default()(Object.assign(vcard_json, this.model.toJSON(), {
+          '_converse': _converse,
+          'info_close': __('Close this chat box'),
+          'display_name': this.model.getDisplayName()
+        }));
+        this.renderAvatar();
+        return this;
+      },
+
+      onStatusMessageChanged(item) {
+        this.debouncedRender();
+        /**
+         * When a contact's custom status message has changed.
+         * @event _converse#contactStatusMessageChanged
+         * @type {object}
+         * @property { object } contact - The chat buddy
+         * @property { string } message - The message text
+         * @example _converse.api.listen.on('contactStatusMessageChanged', obj => { ... });
+         */
+
+        _converse.api.trigger('contactStatusMessageChanged', {
+          'contact': item.attributes,
+          'message': item.get('status')
+        });
+      }
+
+    });
+    _converse.UserDetailsModal = _converse.BootstrapModal.extend({
+      events: {
+        'click button.remove-contact': 'removeContact',
+        'click button.refresh-contact': 'refreshContact',
+        'click .fingerprint-trust .btn input': 'toggleDeviceTrust'
+      },
+
+      initialize() {
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        this.model.rosterContactAdded.then(() => this.registerContactEventHandlers());
+        this.listenTo(this.model, 'change', this.render);
+        this.registerContactEventHandlers();
+        /**
+         * Triggered once the _converse.UserDetailsModal has been initialized
+         * @event _converse#userDetailsModalInitialized
+         * @type { _converse.ChatBox }
+         * @example _converse.api.listen.on('userDetailsModalInitialized', chatbox => { ... });
+         */
+
+        _converse.api.trigger('userDetailsModalInitialized', this.model);
+      },
+
+      toHTML() {
+        const vcard = Object(lodash["get"])(this.model, 'vcard'),
+              vcard_json = vcard ? vcard.toJSON() : {};
+        return user_details_modal_default()(Object.assign(this.model.toJSON(), vcard_json, {
+          '__': __,
+          'view': this,
+          '_converse': _converse,
+          'allow_contact_removal': _converse.allow_contact_removal,
+          'display_name': this.model.getDisplayName(),
+          'is_roster_contact': this.model.contact !== undefined,
+          'utils': converse_chatview_u
+        }));
+      },
+
+      registerContactEventHandlers() {
+        if (this.model.contact !== undefined) {
+          this.listenTo(this.model.contact, 'change', this.render);
+          this.listenTo(this.model.contact.vcard, 'change', this.render);
+          this.model.contact.on('destroy', () => {
+            delete this.model.contact;
+            this.render();
+          });
+        }
+      },
+
+      async refreshContact(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const refresh_icon = this.el.querySelector('.fa-refresh');
+        converse_chatview_u.addClass('fa-spin', refresh_icon);
+
+        try {
+          await _converse.api.vcard.update(this.model.contact.vcard, true);
+        } catch (e) {
+          headless_log.fatal(e);
+          this.alert(__('Sorry, something went wrong while trying to refresh'), 'danger');
+        }
+
+        converse_chatview_u.removeClass('fa-spin', refresh_icon);
+      },
+
+      removeContact(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        if (!_converse.allow_contact_removal) {
+          return;
+        }
+
+        const result = confirm(__("Are you sure you want to remove this contact?"));
+
+        if (result === true) {
+          this.modal.hide();
+          this.model.contact.removeFromRoster(() => this.model.contact.destroy(), err => {
+            headless_log.error(err);
+
+            _converse.api.alert('error', __('Error'), [__('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.contact.getDisplayName())]);
+          });
+        }
+      }
+
+    });
+    /**
+     * The View of an open/ongoing chat conversation.
+     * @class
+     * @namespace _converse.ChatBoxView
+     * @memberOf _converse
+     */
+
+    _converse.ChatBoxView = Overview.extend({
+      length: 200,
+      className: 'chatbox hidden',
+      is_chatroom: false,
+      // Leaky abstraction from MUC
+      events: {
+        'change input.fileupload': 'onFileSelection',
+        'click .chat-msg__action-edit': 'onMessageEditButtonClicked',
+        'click .chat-msg__action-retract': 'onMessageRetractButtonClicked',
+        'click .chat-msg__action-react': 'onMessageReactButtonClicked',         // BAO issue #9
+        'click .chatbox-navback': 'showControlBox',
+        'click .close-chatbox-button': 'close',
+        'click .new-msgs-indicator': 'viewUnreadMessages',
+        'click .send-button': 'onFormSubmitted',
+        'click .show-user-details-modal': 'showUserDetailsModal',
+        'click .spoiler-toggle': 'toggleSpoilerMessage',
+        'click .toggle-call': 'toggleCall',
+        'click .toggle-clear': 'clearMessages',
+        'click .toggle-compose-spoiler': 'toggleComposeSpoilerMessage',
+        'click .upload-file': 'toggleFileUpload',
+        'input .chat-textarea': 'inputChanged',
+        'keydown .chat-textarea': 'onKeyDown',
+        'keyup .chat-textarea': 'onKeyUp',
+        'paste .chat-textarea': 'onPaste',
+        'dragover .chat-textarea': 'onDragOver',
+        'drop .chat-textarea': 'onDrop'
+      },
+
+      async initialize() {
+        this.initDebounced();
+        this.listenTo(this.model.messages, 'add', this.onMessageAdded);
+        this.listenTo(this.model.messages, 'rendered', this.scrollDown);
+        this.model.messages.on('reset', () => {
+          this.content.innerHTML = '';
+          this.removeAll();
+        });
+        this.listenTo(this.model, 'show', this.show);
+        this.listenTo(this.model, 'destroy', this.remove);
+        this.listenTo(this.model.presence, 'change:show', this.onPresenceChanged);
+        this.render();
+        await this.updateAfterMessagesFetched();
+        /**
+         * Triggered once the {@link _converse.ChatBoxView} has been initialized
+         * @event _converse#chatBoxViewInitialized
+         * @type { _converse.HeadlinesBoxView }
+         * @example _converse.api.listen.on('chatBoxViewInitialized', view => { ... });
+         */
+
+        _converse.api.trigger('chatBoxViewInitialized', this);
+      },
+
+      initDebounced() {
+        this.scrollDown = Object(lodash["debounce"])(this._scrollDown, 50);
+        this.markScrolled = Object(lodash["debounce"])(this._markScrolled, 100);
+      },
+
+      render() {
+        this.el.innerHTML = chatbox_default()(Object.assign(this.model.toJSON(), {
+          'unread_msgs': __('You have unread messages')
+        }));
+        this.content = this.el.querySelector('.chat-content');
+        this.renderMessageForm();
+        this.insertHeading();
+        return this;
+      },
+
+      renderToolbar() {
+        if (!_converse.show_toolbar) {
+          return this;
+        }
+
+        const options = Object.assign(this.model.toJSON(), this.getToolbarOptions());
+        this.el.querySelector('.chat-toolbar').innerHTML = toolbar_default()(options);
+        this.addSpoilerButton(options);
+        this.addFileUploadButton();
+        /**
+         * Triggered once the _converse.ChatBoxView's toolbar has been rendered
+         * @event _converse#renderToolbar
+         * @type { _converse.ChatBoxView }
+         * @example _converse.api.listen.on('renderToolbar', view => { ... });
+         */
+
+        _converse.api.trigger('renderToolbar', this);
+
+        return this;
+      },
+
+      renderMessageForm() {
+        const form_container = this.el.querySelector('.message-form-container');
+        form_container.innerHTML = chatbox_message_form_default()(Object.assign(this.model.toJSON(), {
+          'message_limit': _converse.message_limit,
+          'hint_value': Object(lodash["get"])(this.el.querySelector('.spoiler-hint'), 'value'),
+          'label_message': this.model.get('composing_spoiler') ? __('Hidden message') : __('Message'),
+          'label_send': __('Send'),
+          'label_spoiler_hint': __('Optional hint'),
+          'message_value': Object(lodash["get"])(this.el.querySelector('.chat-textarea'), 'value'),
+          'show_send_button': _converse.show_send_button,
+          'show_toolbar': _converse.show_toolbar,
+          'unread_msgs': __('You have unread messages')
+        }));
+        const textarea = this.el.querySelector('.chat-textarea');
+        textarea.addEventListener('focus', ev => this.emitFocused(ev));
+        textarea.addEventListener('blur', ev => this.emitBlurred(ev));
+        this.renderToolbar();
+      },
+
+      showControlBox() {
+        // Used in mobile view, to navigate back to the controlbox
+        const view = _converse.chatboxviews.get('controlbox');
+
+        view.show();
+        this.hide();
+      },
+
+      showUserDetailsModal(ev) {
+        ev.preventDefault();
+
+        if (this.user_details_modal === undefined) {
+          this.user_details_modal = new _converse.UserDetailsModal({
+            model: this.model
+          });
+        }
+
+        this.user_details_modal.show(ev);
+      },
+
+      toggleFileUpload() {
+        this.el.querySelector('input.fileupload').click();
+      },
+
+      onFileSelection(evt) {
+        this.model.sendFiles(evt.target.files);
+      },
+
+      onDragOver(evt) {
+        evt.preventDefault();
+      },
+
+      onDrop(evt) {
+        if (evt.dataTransfer.files.length == 0) {
+          // There are no files to be dropped, so this isn’t a file
+          // transfer operation.
+          return;
+        }
+
+        evt.preventDefault();
+        this.model.sendFiles(evt.dataTransfer.files);
+      },
+
+      async addFileUploadButton() {
+        if (await _converse.api.disco.supports(converse_chatview_Strophe.NS.HTTPUPLOAD, _converse.domain)) {
+          if (this.el.querySelector('.chat-toolbar .upload-file')) {
+            return;
+          }
+
+          this.el.querySelector('.chat-toolbar').insertAdjacentHTML('beforeend', toolbar_fileupload_default()({
+            'tooltip_upload_file': __('Choose a file to send')
+          }));
+        }
+      },
+
+      /**
+       * Asynchronously adds a button for writing spoiler
+       * messages, based on whether the contact's clients support it.
+       * @private
+       * @method _converse.ChatBoxView#addSpoilerButton
+       */
+      async addSpoilerButton(options) {
+        if (!options.show_spoiler_button || this.model.get('type') === _converse.CHATROOMS_TYPE) {
+          return;
+        }
+
+        const contact_jid = this.model.get('jid');
+
+        if (this.model.presence.resources.length === 0) {
+          return;
+        }
+
+        const results = await Promise.all(this.model.presence.resources.map(r => _converse.api.disco.supports(converse_chatview_Strophe.NS.SPOILER, "".concat(contact_jid, "/").concat(r.get('name')))));
+        const all_resources_support_spolers = results.reduce((acc, val) => acc && val, true);
+
+        if (all_resources_support_spolers) {
+          const html = spoiler_button_default()(this.model.toJSON());
+          this.el.querySelector('.chat-toolbar').insertAdjacentHTML('afterBegin', html);
+        }
+      },
+
+      insertHeading() {
+        this.heading = new _converse.ChatBoxHeading({
+          'model': this.model
+        });
+        this.heading.render();
+        this.heading.chatview = this;
+        const flyout = this.el.querySelector('.flyout');
+        flyout.insertBefore(this.heading.el, flyout.querySelector('.chat-body'));
+        return this;
+      },
+
+      getToolbarOptions() {
+        let label_toggle_spoiler;
+
+        if (this.model.get('composing_spoiler')) {
+          label_toggle_spoiler = __("Click to write as a normal (non-spoiler) message");
+        } else {
+          label_toggle_spoiler = __("Click to write your message as a spoiler");
+        }
+
+        return {
+          'label_clear': __('Clear all messages'),
+          'label_message_limit': __('Message characters remaining'),
+          'label_toggle_spoiler': label_toggle_spoiler,
+          'message_limit': _converse.message_limit,
+          'show_call_button': _converse.visible_toolbar_buttons.call,
+          'show_spoiler_button': _converse.visible_toolbar_buttons.spoiler,
+          'tooltip_start_call': __('Start a call')
+        };
+      },
+
+      async updateAfterMessagesFetched() {
+        await this.model.messages.fetched;
+        await Promise.all(this.model.messages.map(m => this.onMessageAdded(m)));
+        this.insertIntoDOM();
+        this.scrollDown();
+        this.content.addEventListener('scroll', () => this.markScrolled());
+        /**
+         * Triggered whenever a `_converse.ChatBox` instance has fetched its messages from
+         * `sessionStorage` but **NOT** from the server.
+         * @event _converse#afterMessagesFetched
+         * @type {_converse.ChatBoxView | _converse.ChatRoomView}
+         * @example _converse.api.listen.on('afterMessagesFetched', view => { ... });
+         */
+
+        _converse.api.trigger('afterMessagesFetched', this);
+      },
+
+      insertIntoDOM() {
+        _converse.chatboxviews.insertRowColumn(this.el);
+        /**
+         * Triggered once the _converse.ChatBoxView has been inserted into the DOM
+         * @event _converse#chatBoxInsertedIntoDOM
+         * @type { _converse.ChatBoxView | _converse.HeadlinesBoxView }
+         * @example _converse.api.listen.on('chatBoxInsertedIntoDOM', view => { ... });
+         */
+
+
+        _converse.api.trigger('chatBoxInsertedIntoDOM', this);
+
+        return this;
+      },
+
+      showChatEvent(message) {
+        const isodate = new Date().toISOString();
+        this.content.insertAdjacentHTML('beforeend', info_default()({
+          'extra_classes': 'chat-event',
+          'message': message,
+          'isodate': isodate
+        }));
+        this.insertDayIndicator(this.content.lastElementChild);
+        this.scrollDown();
+        return isodate;
+      },
+
+      showErrorMessage(message) {
+        this.content.insertAdjacentHTML('beforeend', error_message_default()({
+          'message': message,
+          'isodate': new Date().toISOString()
+        }));
+        this.scrollDown();
+      },
+
+      addSpinner() {
+        let append = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+        if (this.el.querySelector('.spinner') === null) {
+          if (append) {
+            this.content.insertAdjacentHTML('beforeend', spinner_default()());
+            this.scrollDown();
+          } else {
+            this.content.insertAdjacentHTML('afterbegin', spinner_default()());
+          }
+        }
+      },
+
+      clearSpinner() {
+        this.content.querySelectorAll('.spinner').forEach(converse_chatview_u.removeElement);
+      },
+
+      /**
+       * Inserts an indicator into the chat area, showing the
+       * day as given by the passed in date.
+       * The indicator is only inserted if necessary.
+       * @private
+       * @method _converse.ChatBoxView#insertDayIndicator
+       * @param { HTMLElement } next_msg_el - The message element before
+       *      which the day indicator element must be inserted.
+       *      This element must have a "data-isodate" attribute
+       *      which specifies its creation date.
+       */
+      insertDayIndicator(next_msg_el) {
+        const prev_msg_el = converse_chatview_u.getPreviousElement(next_msg_el, ".message:not(.chat-state-notification)");
+        const prev_msg_date = prev_msg_el === null ? null : prev_msg_el.getAttribute('data-isodate');
+        const next_msg_date = next_msg_el.getAttribute('data-isodate');
+
+        if (prev_msg_date === null && next_msg_date === null) {
+          return;
+        }
+
+        if (prev_msg_date === null || converse_chatview_dayjs(next_msg_date).isAfter(prev_msg_date, 'day')) {
+          const day_date = converse_chatview_dayjs(next_msg_date).startOf('day');
+          next_msg_el.insertAdjacentHTML('beforeBegin', new_day_default()({
+            'isodate': day_date.toISOString(),
+            'datestring': day_date.format("dddd MMM Do YYYY")
+          }));
+        }
+      },
+
+      /**
+       * Return the ISO8601 format date of the latest message.
+       * @private
+       * @method _converse.ChatBoxView#getLastMessageDate
+       * @param { Date } cutoff - Moment Date cutoff date. The last
+       *      message received cutoff this date will be returned.
+       * @returns { Date }
+       */
+      getLastMessageDate(cutoff) {
+        const first_msg = converse_chatview_u.getFirstChildElement(this.content, '.message:not(.chat-state-notification)');
+        const oldest_date = first_msg ? first_msg.getAttribute('data-isodate') : null;
+
+        if (oldest_date !== null && converse_chatview_dayjs(oldest_date).isAfter(cutoff)) {
+          return null;
+        }
+
+        const last_msg = converse_chatview_u.getLastChildElement(this.content, '.message:not(.chat-state-notification)');
+        const most_recent_date = last_msg ? last_msg.getAttribute('data-isodate') : null;
+
+        if (most_recent_date === null) {
+          return null;
+        }
+
+        if (converse_chatview_dayjs(most_recent_date).isBefore(cutoff)) {
+          return converse_chatview_dayjs(most_recent_date).toDate();
+        }
+        /* XXX: We avoid .chat-state-notification messages, since they are
+         * temporary and get removed once a new element is
+         * inserted into the chat area, so we don't query for
+         * them here, otherwise we get a null reference later
+         * upon element insertion.
+         */
+
+
+        const sel = '.message:not(.chat-state-notification)';
+        const msg_dates = converse_chatview_sizzle(sel, this.content).map(e => e.getAttribute('data-isodate'));
+        const cutoff_iso = cutoff.toISOString();
+        msg_dates.push(cutoff_iso);
+        msg_dates.sort();
+        const idx = msg_dates.lastIndexOf(cutoff_iso);
+
+        if (idx === 0) {
+          return null;
+        } else {
+          return converse_chatview_dayjs(msg_dates[idx - 1]).toDate();
+        }
+      },
+
+      setScrollPosition(message_el) {
+        /* Given a newly inserted message, determine whether we
+         * should keep the scrollbar in place (so as to not scroll
+         * up when using infinite scroll).
+         */
+        if (this.model.get('scrolled')) {
+          const next_msg_el = converse_chatview_u.getNextElement(message_el, ".chat-msg");
+
+          if (next_msg_el) {
+            // The currently received message is not new, there
+            // are newer messages after it. So let's see if we
+            // should maintain our current scroll position.
+            if (this.content.scrollTop === 0 || this.model.get('top_visible_message')) {
+              const top_visible_message = this.model.get('top_visible_message') || next_msg_el;
+              this.model.set('top_visible_message', top_visible_message);
+              this.content.scrollTop = top_visible_message.offsetTop - 30;
+            }
+          }
+        } else {
+          this.scrollDown();
+        }
+      },
+
+      showHelpMessages(msgs) {
+        let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'info';
+        let spinner = arguments.length > 2 ? arguments[2] : undefined;
+        msgs.forEach(msg => {
+          this.content.insertAdjacentHTML('beforeend', help_message_default()({
+            'isodate': new Date().toISOString(),
+            'type': type,
+            'message': xss_default.a.filterXSS(msg, {
+              'whiteList': {
+                'strong': []
+              }
+            })
+          }));
+        });
+
+        if (spinner === true) {
+          this.addSpinner();
+        } else if (spinner === false) {
+          this.clearSpinner();
+        }
+
+        return this.scrollDown();
+      },
+
+      shouldShowOnTextMessage() {
+        return !converse_chatview_u.isVisible(this.el);
+      },
+
+      /**
+       * Given a view representing a message, insert it into the
+       * content area of the chat box.
+       * @private
+       * @method _converse.ChatBoxView#insertMessage
+       * @param { Backbone.View } message - The message Backbone.View
+       */
+      insertMessage(view) {
+        if (view.model.get('type') === 'error') {
+          const previous_msg_el = this.content.querySelector("[data-msgid=\"".concat(view.model.get('msgid'), "\"]"));
+
+          if (previous_msg_el) {
+            previous_msg_el.insertAdjacentElement('afterend', view.el);
+            return this.trigger('messageInserted', view.el);
+          }
+        }
+
+        const current_msg_date = converse_chatview_dayjs(view.model.get('time')).toDate() || new Date();
+        const previous_msg_date = this.getLastMessageDate(current_msg_date);
+
+        if (previous_msg_date === null) {
+          this.content.insertAdjacentElement('afterbegin', view.el);
+        } else {
+          const previous_msg_el = converse_chatview_sizzle("[data-isodate=\"".concat(previous_msg_date.toISOString(), "\"]:last"), this.content).pop();
+
+          if (view.model.get('type') === 'error' && converse_chatview_u.hasClass('chat-error', previous_msg_el) && previous_msg_el.textContent === view.model.get('message')) {
+            // We don't show a duplicate error message
+            return;
+          }
+
+          previous_msg_el.insertAdjacentElement('afterend', view.el);
+          this.markFollowups(view.el);
+        }
+
+        return this.trigger('messageInserted', view.el);
+      },
+
+      /**
+       * Given a message element, determine wether it should be
+       * marked as a followup message to the previous element.
+       *
+       * Also determine whether the element following it is a
+       * followup message or not.
+       *
+       * Followup messages are subsequent ones written by the same
+       * author with no other conversation elements in between and
+       * which were posted within 10 minutes of one another.
+       * @private
+       * @method _converse.ChatBoxView#markFollowups
+       * @param { HTMLElement } el - The message element
+       */
+      markFollowups(el) {
+        const from = el.getAttribute('data-from');
+        const previous_el = el.previousElementSibling;
+        const date = converse_chatview_dayjs(el.getAttribute('data-isodate'));
+        const next_el = el.nextElementSibling;
+
+        if (!converse_chatview_u.hasClass('chat-msg--action', el) && !converse_chatview_u.hasClass('chat-msg--action', previous_el) && !converse_chatview_u.hasClass('chat-info', el) && !converse_chatview_u.hasClass('chat-info', previous_el) && previous_el.getAttribute('data-from') === from && date.isBefore(converse_chatview_dayjs(previous_el.getAttribute('data-isodate')).add(10, 'minutes')) && el.getAttribute('data-encrypted') === previous_el.getAttribute('data-encrypted')) {
+          converse_chatview_u.addClass('chat-msg--followup', el);
+        }
+
+        if (!next_el) {
+          return;
+        }
+
+        if (!converse_chatview_u.hasClass('chat-msg--action', el) && converse_chatview_u.hasClass('chat-info', el) && next_el.getAttribute('data-from') === from && converse_chatview_dayjs(next_el.getAttribute('data-isodate')).isBefore(date.add(10, 'minutes')) && el.getAttribute('data-encrypted') === next_el.getAttribute('data-encrypted')) {
+          converse_chatview_u.addClass('chat-msg--followup', next_el);
+        } else {
+          converse_chatview_u.removeClass('chat-msg--followup', next_el);
+        }
+      },
+
+      /**
+       * Inserts a chat message into the content area of the chat box.
+       * Will also insert a new day indicator if the message is on a different day.
+       * @private
+       * @method _converse.ChatBoxView#showMessage
+       * @param { _converse.Message } message - The message object
+       */
+      async showMessage(message) {
+        await message.initialized;
+        const view = this.add(message.get('id'), new _converse.MessageView({
+          'model': message
+        }));
+        await view.render(); // Clear chat state notifications
+
+        converse_chatview_sizzle(".chat-state-notification[data-csn=\"".concat(message.get('from'), "\"]"), this.content).forEach(converse_chatview_u.removeElement);
+        this.insertMessage(view);
+        this.insertDayIndicator(view.el);
+        this.setScrollPosition(view.el);
+
+        if (converse_chatview_u.isNewMessage(message)) {
+          if (message.get('sender') === 'me') {
+            // We remove the "scrolled" flag so that the chat area
+            // gets scrolled down. We always want to scroll down
+            // when the user writes a message as opposed to when a
+            // message is received.
+            this.model.set('scrolled', false);
+          } else if (this.model.get('scrolled', true) && !converse_chatview_u.isOnlyChatStateNotification(message)) {
+            this.showNewMessagesIndicator();
+          }
+        }
+
+        if (this.shouldShowOnTextMessage()) {
+          this.show();
+        } else {
+          this.scrollDown();
+        }
+
+        if (message.get('correcting')) {
+          this.insertIntoTextArea(message.get('message'), true, true);
+        }
+      },
+
+      /**
+       * Handler that gets called when a new message object is created.
+       * @private
+       * @method _converse.ChatBoxView#onMessageAdded
+       * @param { object } message - The message Backbone object that was added.
+       */
+      async onMessageAdded(message) {
+        const id = message.get('id');
+
+        if (id && this.get(id)) {
+          // We already have a view for this message
+          return;
+        }
+
+        if (!message.get('dangling_retraction')) {
+          await this.showMessage(message);
+        }
+        /**
+         * Triggered once a message has been added to a chatbox.
+         * @event _converse#messageAdded
+         * @type {object}
+         * @property { _converse.Message } message - The message instance
+         * @property { _converse.ChatBox | _converse.ChatRoom } chatbox - The chat model
+         * @example _converse.api.listen.on('messageAdded', data => { ... });
+         */
+
+
+        _converse.api.trigger('messageAdded', {
+          'message': message,
+          'chatbox': this.model
+        });
+      },
+
+      parseMessageForCommands(text) {
+        const match = text.replace(/^\s*/, "").match(/^\/(.*)\s*$/);
+
+        if (match) {
+          if (match[1] === "clear") {
+            this.clearMessages();
+            return true;
+          } else if (match[1] === "close") {
+            this.close();
+            return true;
+          } else if (match[1] === "help") {
+            const msgs = ["<strong>/clear</strong>: ".concat(__('Remove messages')), "<strong>/close</strong>: ".concat(__('Close this chat')), "<strong>/me</strong>: ".concat(__('Write in the third person')), "<strong>/help</strong>: ".concat(__('Show this menu'))];
+            this.showHelpMessages(msgs);
+            return true;
+          }
+        }
+      },
+
+      async onFormSubmitted(ev) {
+        ev.preventDefault();
+        const textarea = this.el.querySelector('.chat-textarea');
+        const message_text = textarea.value.trim();
+
+        if (_converse.message_limit && message_text.length > _converse.message_limit || !message_text.replace(/\s/g, '').length) {
+          return;
+        }
+
+        if (!_converse.connection.authenticated) {
+          this.showHelpMessages(['Sorry, the connection has been lost, and your message could not be sent'], 'error');
+
+          _converse.api.connection.reconnect();
+
+          return;
+        }
+
+        let spoiler_hint,
+            hint_el = {};
+
+        if (this.model.get('composing_spoiler')) {
+          hint_el = this.el.querySelector('form.sendXMPPMessage input.spoiler-hint');
+          spoiler_hint = hint_el.value;
+        }
+
+        converse_chatview_u.addClass('disabled', textarea);
+        textarea.setAttribute('disabled', 'disabled');
+        const is_command = this.parseMessageForCommands(message_text);
+        const message = is_command ? null : await this.model.sendMessage(message_text, spoiler_hint);
+
+        if (is_command || message) {
+          hint_el.value = '';
+          textarea.value = '';
+          converse_chatview_u.removeClass('correcting', textarea);
+          textarea.style.height = 'auto'; // Fixes weirdness
+        }
+
+        if (message) {
+          /**
+           * Triggered whenever a message is sent by the user
+           * @event _converse#messageSend
+           * @type { _converse.Message }
+           * @example _converse.api.listen.on('messageSend', message => { ... });
+           */
+          _converse.api.trigger('messageSend', message);
+        }
+
+        textarea.removeAttribute('disabled');
+        converse_chatview_u.removeClass('disabled', textarea);
+        textarea.focus(); // Suppress events, otherwise superfluous CSN gets set
+        // immediately after the message, causing rate-limiting issues.
+
+        this.model.setChatState(_converse.ACTIVE, {
+          'silent': true
+        });
+      },
+
+      updateCharCounter(chars) {
+        if (_converse.message_limit) {
+          const message_limit = this.el.querySelector('.message-limit');
+          const counter = _converse.message_limit - chars.length;
+          message_limit.textContent = counter;
+
+          if (counter < 1) {
+            converse_chatview_u.addClass('error', message_limit);
+          } else {
+            converse_chatview_u.removeClass('error', message_limit);
+          }
+        }
+      },
+
+      onPaste(ev) {
+        if (ev.clipboardData.files.length !== 0) {
+          ev.preventDefault(); // Workaround for quirk in at least Firefox 60.7 ESR:
+          // It seems that pasted files disappear from the event payload after
+          // the event has finished, which apparently happens during async
+          // processing in sendFiles(). So we copy the array here.
+
+          this.model.sendFiles(Array.from(ev.clipboardData.files));
+          return;
+        }
+
+        this.updateCharCounter(ev.clipboardData.getData('text/plain'));
+      },
+
+      /**
+       * Event handler for when a depressed key goes up
+       * @private
+       * @method _converse.ChatBoxView#onKeyUp
+       */
+      onKeyUp(ev) {
+        this.updateCharCounter(ev.target.value);
+      },
+
+      /**
+       * Event handler for when a key is pressed down in a chat box textarea.
+       * @private
+       * @method _converse.ChatBoxView#onKeyDown
+       * @param { Event } ev
+       */
+      onKeyDown(ev) {
+        if (ev.ctrlKey) {
+          // When ctrl is pressed, no chars are entered into the textarea.
+          return;
+        }
+
+        if (!ev.shiftKey && !ev.altKey && !ev.metaKey) {
+          if (ev.keyCode === converse_core.keycodes.FORWARD_SLASH) {
+            // Forward slash is used to run commands. Nothing to do here.
+            return;
+          } else if (ev.keyCode === converse_core.keycodes.ESCAPE) {
+            return this.onEscapePressed(ev);
+          } else if (ev.keyCode === converse_core.keycodes.ENTER) {
+            return this.onEnterPressed(ev);
+          } else if (ev.keyCode === converse_core.keycodes.UP_ARROW && !ev.target.selectionEnd) {
+            const textarea = this.el.querySelector('.chat-textarea');
+
+            if (!textarea.value || converse_chatview_u.hasClass('correcting', textarea)) {
+              return this.editEarlierMessage();
+            }
+          } else if (ev.keyCode === converse_core.keycodes.DOWN_ARROW && ev.target.selectionEnd === ev.target.value.length && converse_chatview_u.hasClass('correcting', this.el.querySelector('.chat-textarea'))) {
+            return this.editLaterMessage();
+          }
+        }
+
+        if ([converse_core.keycodes.SHIFT, converse_core.keycodes.META, converse_core.keycodes.META_RIGHT, converse_core.keycodes.ESCAPE, converse_core.keycodes.ALT].includes(ev.keyCode)) {
+          return;
+        }
+
+        if (this.model.get('chat_state') !== _converse.COMPOSING) {
+          // Set chat state to composing if keyCode is not a forward-slash
+          // (which would imply an internal command and not a message).
+          this.model.setChatState(_converse.COMPOSING);
+        }
+      },
+
+      getOwnMessages() {
+        return this.model.messages.filter({
+          'sender': 'me'
+        });
+      },
+
+      onEnterPressed(ev) {
+        return this.onFormSubmitted(ev);
+      },
+
+      onEscapePressed(ev) {
+        ev.preventDefault();
+        const idx = this.model.messages.findLastIndex('correcting');
+        const message = idx >= 0 ? this.model.messages.at(idx) : null;
+
+        if (message) {
+          message.save('correcting', false);
+        }
+
+        this.insertIntoTextArea('', true, false);
+      },
+
+      // BAO issue #9
+
+      handleEmojiSelected(value, replace, position) {
+        const reaction = this.model.get('reaction');
+
+        if (reaction) {
+            const msgid = reaction.msgid;
+            const time = reaction.time;
+            this.model.set('reaction', undefined);
+            const message = this.model.messages.findWhere({msgid, time});
+
+            if (message)
+            {
+                if (message.get('type') == 'chat')
+                {
+                    this.model.updateReactions(message, this.model.get('from'), value);
+                }
+                const origin_id = message.get('origin_id');
+                let text = window.getSelection().toString();
+                if (!text || text == "") text = message.get('message');
+                const pos = text.indexOf("\n");
+                text = pos == -1 ? text : text.substring(0, pos);
+                const body = '/me ' + value + ' ' + text;
+
+                const attrs = this.model.getOutgoingMessageAttributes(body);
+                attrs.reaction_id = origin_id;
+                attrs.reaction_emoji = value;
+                this.model.setEditable(attrs, new Date().toISOString());
+                const new_message = this.model.messages.create(attrs);
+                _converse.api.send(this.model.createMessageStanza(new_message));
+           }
+
+        } else {
+            this.insertIntoTextArea(value, replace, false, position);
+        }
+      },
+
+      onMessageReactButtonClicked(ev) { // BAO issue #9
+        ev.preventDefault();
+
+        const msg_el = converse_chatview_u.ancestor(ev.target, '.message');
+        const msgid = msg_el.getAttribute('data-msgid');
+        const time = msg_el.getAttribute('data-isodate');
+
+        this.model.set('reaction', {msgid: msgid, time: time});
+        this.toggleEmojiMenu(ev);
+      },
+
+      /**
+       * Retract one of your messages in this chat
+       * @private
+       * @method _converse.ChatBoxView#retractOwnMessage
+       * @param { _converse.Message } message - The message which we're retracting.
+       */
+      retractOwnMessage(message) {
+        this.model.sendRetractionMessage(message);
+        message.save({
+          'retracted': new Date().toISOString(),
+          'retracted_id': message.get('origin_id'),
+          'is_ephemeral': true
+        });
+      },
+
+      async onMessageRetractButtonClicked(ev) {
+        ev.preventDefault();
+        const msg_el = converse_chatview_u.ancestor(ev.target, '.message');
+        const msgid = msg_el.getAttribute('data-msgid');
+        const time = msg_el.getAttribute('data-isodate');
+        const message = this.model.messages.findWhere({
+          msgid,
+          time
+        });
+
+        if (message.get('sender') !== 'me') {
+          return headless_log.error("onMessageEditButtonClicked called for someone else's message!");
+        }
+
+        const retraction_warning = __("Be aware that other XMPP/Jabber clients (and servers) may " + "not yet support retractions and that this message may not " + "be removed everywhere.");
+
+        const messages = [__('Are you sure you want to retract this message?')];
+
+        if (_converse.show_retraction_warning) {
+          messages[1] = retraction_warning;
+        }
+
+        const result = await _converse.api.confirm(__('Confirm'), messages);
+
+        if (result) {
+          this.retractOwnMessage(message);
+        }
+      },
+
+      onMessageEditButtonClicked(ev) {
+        ev.preventDefault();
+        const idx = this.model.messages.findLastIndex('correcting'),
+              currently_correcting = idx >= 0 ? this.model.messages.at(idx) : null,
+              message_el = converse_chatview_u.ancestor(ev.target, '.chat-msg'),
+              message = this.model.messages.findWhere({
+          'msgid': message_el.getAttribute('data-msgid')
+        });
+        const textarea = this.el.querySelector('.chat-textarea');
+
+        if (textarea.value && (currently_correcting === null || currently_correcting.get('message') !== textarea.value)) {
+          if (!confirm(__("You have an unsent message which will be lost if you continue. Are you sure?"))) {
+            return;
+          }
+        }
+
+        if (currently_correcting !== message) {
+          if (currently_correcting !== null) {
+            currently_correcting.save('correcting', false);
+          }
+
+          message.save('correcting', true);
+          this.insertIntoTextArea(converse_chatview_u.prefixMentions(message), true, true);
+        } else {
+          message.save('correcting', false);
+          this.insertIntoTextArea('', true, false);
+        }
+      },
+
+      editLaterMessage() {
+        let message;
+        let idx = this.model.messages.findLastIndex('correcting');
+
+        if (idx >= 0) {
+          this.model.messages.at(idx).save('correcting', false);
+
+          while (idx < this.model.messages.length - 1) {
+            idx += 1;
+            const candidate = this.model.messages.at(idx);
+
+            if (candidate.get('editable')) {
+              message = candidate;
+              break;
+            }
+          }
+        }
+        // BAO issue #113
+        if (message) {
+          this.insertIntoTextArea(converse_chatview_u.prefixMentions(message), true, true);
+          message.save('correcting', true);
+        } else {
+          this.insertIntoTextArea('', true, false);
+        }
+      },
+
+      editEarlierMessage() {
+        let message;
+        let idx = this.model.messages.findLastIndex('correcting');
+
+        if (idx >= 0) {
+          this.model.messages.at(idx).save('correcting', false);
+
+          while (idx > 0) {
+            idx -= 1;
+            const candidate = this.model.messages.at(idx);
+
+            if (candidate.get('editable')) {
+              message = candidate;
+              break;
+            }
+          }
+        }
+
+        message = message || this.getOwnMessages().reverse().find(m => m.get('editable'));
+        // BAO issue #113
+        if (message) {
+          this.insertIntoTextArea(converse_chatview_u.prefixMentions(message), true, true);
+          message.save('correcting', true);
+        }
+      },
+
+      inputChanged(ev) {
+        const height = ev.target.scrollHeight + 'px';
+
+        if (ev.target.style.height != height) {
+          ev.target.style.height = 'auto';
+          ev.target.style.height = height;
+        }
+      },
+
+      async clearMessages(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const result = confirm(__("Are you sure you want to clear the messages from this conversation?"));
+
+        if (result === true) {
+          await this.model.clearMessages();
+        }
+
+        return this;
+      },
+
+      /**
+       * Insert a particular string value into the textarea of this chat box.
+       * @private
+       * @method _converse.ChatBoxView#insertIntoTextArea
+       * @param {string} value - The value to be inserted.
+       * @param {(boolean|string)} [replace] - Whether an existing value
+       *  should be replaced. If set to `true`, the entire textarea will
+       *  be replaced with the new value. If set to a string, then only
+       *  that string will be replaced *if* a position is also specified.
+       * @param {integer} [position] - The end index of the string to be
+       * replaced with the new value.
+       */
+      insertIntoTextArea(value) {
+        let replace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+        let correcting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+        let position = arguments.length > 3 ? arguments[3] : undefined;
+        const textarea = this.el.querySelector('.chat-textarea');
+
+        if (correcting) {
+          converse_chatview_u.addClass('correcting', textarea);
+        } else {
+          converse_chatview_u.removeClass('correcting', textarea);
+        }
+
+        if (replace) {
+          if (position && typeof replace == 'string') {
+            textarea.value = textarea.value.replace(new RegExp(replace, 'g'), (match, offset) => offset == position - replace.length ? value + ' ' : match);
+          } else {
+            textarea.value = value;
+          }
+        } else {
+          let existing = textarea.value;
+
+          if (existing && existing[existing.length - 1] !== ' ') {
+            existing = existing + ' ';
+          }
+
+          textarea.value = existing + value + ' ';
+        }
+
+        this.updateCharCounter(textarea.value);
+        converse_chatview_u.placeCaretAtEnd(textarea);
+      },
+
+      toggleCall(ev) {
+        ev.stopPropagation();
+        /**
+         * When a call button (i.e. with class .toggle-call) on a chatbox has been clicked.
+         * @event _converse#callButtonClicked
+         * @type { object }
+         * @property { Strophe.Connection } _converse.connection - The XMPP Connection object
+         * @property { _converse.ChatBox | _converse.ChatRoom } _converse.connection - The XMPP Connection object
+         * @example _converse.api.listen.on('callButtonClicked', (connection, model) => { ... });
+         */
+
+        _converse.api.trigger('callButtonClicked', {
+          connection: _converse.connection,
+          model: this.model
+        });
+      },
+
+      toggleComposeSpoilerMessage() {
+        this.model.set('composing_spoiler', !this.model.get('composing_spoiler'));
+        this.renderMessageForm();
+        this.focus();
+      },
+
+      toggleSpoilerMessage(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const toggle_el = ev.target,
+              icon_el = toggle_el.firstElementChild;
+        converse_chatview_u.slideToggleElement(toggle_el.parentElement.parentElement.querySelector('.spoiler'));
+
+        if (toggle_el.getAttribute("data-toggle-state") == "closed") {
+          toggle_el.textContent = 'Show less';
+          icon_el.classList.remove("fa-eye");
+          icon_el.classList.add("fa-eye-slash");
+          toggle_el.insertAdjacentElement('afterBegin', icon_el);
+          toggle_el.setAttribute("data-toggle-state", "open");
+        } else {
+          toggle_el.textContent = 'Show more';
+          icon_el.classList.remove("fa-eye-slash");
+          icon_el.classList.add("fa-eye");
+          toggle_el.insertAdjacentElement('afterBegin', icon_el);
+          toggle_el.setAttribute("data-toggle-state", "closed");
+        }
+      },
+
+      onPresenceChanged(item) {
+        const show = item.get('show'),
+              fullname = this.model.getDisplayName();
+        let text;
+
+        if (converse_chatview_u.isVisible(this.el)) {
+          if (show === 'offline') {
+            text = __('%1$s has gone offline', fullname);
+          } else if (show === 'away') {
+            text = __('%1$s has gone away', fullname);
+          } else if (show === 'dnd') {
+            text = __('%1$s is busy', fullname);
+          } else if (show === 'online') {
+            text = __('%1$s is online', fullname);
+          }
+
+          if (text) {
+            this.content.insertAdjacentHTML('beforeend', status_message_default()({
+              'message': text,
+              'isodate': new Date().toISOString()
+            }));
+            this.scrollDown();
+          }
+        }
+      },
+
+      async close(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        if (converse_chatview_Backbone.history.getFragment() === "converse/chat?jid=" + this.model.get('jid')) {
+          _converse.router.navigate('');
+        }
+
+        if (_converse.api.connection.connected()) {
+          // Immediately sending the chat state, because the
+          // model is going to be destroyed afterwards.
+          this.model.setChatState(_converse.INACTIVE);
+          this.model.sendChatState();
+        }
+
+        await this.model.close();
+        this.remove();
+        /**
+         * Triggered once a chatbox has been closed.
+         * @event _converse#chatBoxClosed
+         * @type { _converse.ChatBoxView | _converse.ChatRoomView }
+         * @example _converse.api.listen.on('chatBoxClosed', view => { ... });
+         */
+
+        _converse.api.trigger('chatBoxClosed', this);
+
+        return this;
+      },
+
+      emitBlurred(ev) {
+        if (this.el.contains(document.activeElement)) {
+          // Something else in this chatbox is still focused
+          return;
+        }
+        /**
+         * Triggered when the focus has been removed from a particular chat.
+         * @event _converse#chatBoxBlurred
+         * @type { _converse.ChatBoxView | _converse.ChatRoomView }
+         * @example _converse.api.listen.on('chatBoxBlurred', (view, event) => { ... });
+         */
+
+
+        _converse.api.trigger('chatBoxBlurred', this, ev);
+      },
+
+      emitFocused(ev) {
+        /**
+         * Triggered when the focus has been moved to a particular chat.
+         * @event _converse#chatBoxFocused
+         * @type { _converse.ChatBoxView | _converse.ChatRoomView }
+         * @example _converse.api.listen.on('chatBoxFocused', (view, event) => { ... });
+         */
+        _converse.api.trigger('chatBoxFocused', this, ev);
+      },
+
+      focus() {
+        const textarea_el = this.el.getElementsByClassName('chat-textarea')[0];
+
+        if (textarea_el && document.activeElement !== textarea_el) {
+          textarea_el.focus();
+        }
+
+        return this;
+      },
+
+      maybeFocus() {
+        _converse.auto_focus && this.focus();
+      },
+
+      hide() {
+        this.el.classList.add('hidden');
+        return this;
+      },
+
+      afterShown() {
+        this.model.clearUnreadMsgCounter();
+        this.model.setChatState(_converse.ACTIVE);
+        this.scrollDown();
+        this.maybeFocus();
+      },
+
+      show() {
+        if (converse_chatview_u.isVisible(this.el)) {
+          this.maybeFocus();
+          return;
+        }
+        /**
+         * Triggered just before a {@link _converse.ChatBoxView} or {@link _converse.ChatRoomView}
+         * will be shown.
+         * @event _converse#beforeShowingChatView
+         * @type {object}
+         * @property { _converse.ChatBoxView | _converse.ChatRoomView } view
+         */
+
+
+        _converse.api.trigger('beforeShowingChatView', this);
+
+        if (_converse.animate) {
+          converse_chatview_u.fadeIn(this.el, () => this.afterShown());
+        } else {
+          converse_chatview_u.showElement(this.el);
+          this.afterShown();
+        }
+      },
+
+      showNewMessagesIndicator() {
+        converse_chatview_u.showElement(this.el.querySelector('.new-msgs-indicator'));
+      },
+
+      hideNewMessagesIndicator() {
+        const new_msgs_indicator = this.el.querySelector('.new-msgs-indicator');
+
+        if (new_msgs_indicator !== null) {
+          new_msgs_indicator.classList.add('hidden');
+        }
+      },
+
+      /**
+       * Called when the chat content is scrolled up or down.
+       * We want to record when the user has scrolled away from
+       * the bottom, so that we don't automatically scroll away
+       * from what the user is reading when new messages are received.
+       *
+       * Don't call this method directly, instead, call `markScrolled`,
+       * which debounces this method by 100ms.
+       * @private
+       */
+      _markScrolled: function _markScrolled() {
+        let scrolled = true;
+        const is_at_bottom = this.content.scrollTop + this.content.clientHeight >= this.content.scrollHeight - 62; // sigh...
+
+        if (is_at_bottom) {
+          scrolled = false;
+          this.onScrolledDown();
+        }
+
+        converse_chatview_u.safeSave(this.model, {
+          'scrolled': scrolled,
+          'top_visible_message': null
+        });
+      },
+
+      viewUnreadMessages() {
+        this.model.save({
+          'scrolled': false,
+          'top_visible_message': null
+        });
+        this.scrollDown();
+      },
+
+      _scrollDown() {
+        /* Inner method that gets debounced */
+        if (this.content === undefined) {
+          return;
+        }
+        // BAO issue #405
+        if (converse_chatview_u.isVisible(this.content) && !this.model.get('scrolled')) {
+            if ((this.content.scrollTop === 0 || this.content.scrollTop < this.content.scrollHeight/2)) {
+                converse_chatview_u.removeClass('smooth-scroll', this.content);
+            } else if (_converse.api.settings.get('animate')) {
+                converse_chatview_u.addClass('smooth-scroll', this.content);
+            }
+            this.content.scrollTop = this.content.scrollHeight;
+        }
+      },
+
+      onScrolledDown() {
+        this.hideNewMessagesIndicator();
+
+        if (_converse.windowState !== 'hidden') {
+          this.model.clearUnreadMsgCounter();
+        }
+        /**
+         * Triggered once the chat's message area has been scrolled down to the bottom.
+         * @event _converse#chatBoxScrolledDown
+         * @type {object}
+         * @property { _converse.ChatBox | _converse.ChatRoom } chatbox - The chat model
+         * @example _converse.api.listen.on('chatBoxScrolledDown', obj => { ... });
+         */
+
+
+        _converse.api.trigger('chatBoxScrolledDown', {
+          'chatbox': this.model
+        }); // TODO: clean up
+
+      },
+
+      onWindowStateChanged(state) {
+        if (state === 'visible') {
+          if (!this.model.isHidden()) {
+            // this.model.setChatState(_converse.ACTIVE);
+            if (this.model.get('num_unread', 0)) {
+              this.model.clearUnreadMsgCounter();
+            }
+          }
+        } else if (state === 'hidden') {
+          this.model.setChatState(_converse.INACTIVE, {
+            'silent': true
+          });
+          this.model.sendChatState();
+        }
+      }
+
+    });
+
+    _converse.api.listen.on('chatBoxViewsInitialized', () => {
+      const views = _converse.chatboxviews;
+
+      _converse.chatboxes.on('add', async item => {
+        if (!views.get(item.get('id')) && item.get('type') === _converse.PRIVATE_CHAT_TYPE) {
+          await item.initialized;
+          views.add(item.get('id'), new _converse.ChatBoxView({
+            model: item
+          }));
+        }
+      });
+    });
+    /************************ BEGIN Event Handlers ************************/
+
+
+    function onWindowStateChanged(data) {
+      if (_converse.chatboxviews) {
+        _converse.chatboxviews.forEach(view => {
+          if (view.model.get('id') !== 'controlbox') {
+            view.onWindowStateChanged(data.state);
+          }
+        });
+      }
+    }
+
+    _converse.api.listen.on('windowStateChanged', onWindowStateChanged);
+
+    _converse.api.listen.on('connected', () => _converse.api.disco.own.features.add(converse_chatview_Strophe.NS.SPOILER));
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The "chatview" namespace groups methods pertaining to views
+       * for one-on-one chats.
+       *
+       * @namespace _converse.api.chatviews
+       * @memberOf _converse.api
+       */
+      chatviews: {
+        /**
+         * Get the view of an already open chat.
+         * @method _converse.api.chatviews.get
+         * @param { Array.string | string } jids
+         * @returns {ChatBoxView} A [Backbone.View](http://backbonejs.org/#View) instance.
+         *     The chat should already be open, otherwise `undefined` will be returned.
+         * @example
+         * // To return a single view, provide the JID of the contact:
+         * _converse.api.chatviews.get('buddy@example.com')
+         * @example
+         * // To return an array of views, provide an array of JIDs:
+         * _converse.api.chatviews.get(['buddy1@example.com', 'buddy2@example.com'])
+         */
+        get(jids) {
+          if (jids === undefined) {
+            return Object.values(_converse.chatboxviews.getAll());
+          }
+
+          if (Object(lodash["isString"])(jids)) {
+            return _converse.chatboxviews.get(jids);
+          }
+
+          return jids.map(jid => _converse.chatboxviews.get(jid));
+        }
+
+      }
+    });
+    /************************ END API ************************/
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-headlines.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-headlines
+ */
+
+
+
+const {
+  utils: converse_headlines_utils
+} = converse_core.env;
+converse_core.plugins.add('converse-headlines', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chat"],
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // New functions which don't exist yet can also be added.
+    ChatBoxes: {
+      model(attrs, options) {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (attrs.type == _converse.HEADLINES_TYPE) {
+          return new _converse.HeadlinesBox(attrs, options);
+        } else {
+          return this.__super__.model.apply(this, arguments);
+        }
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    _converse.HeadlinesBox = _converse.ChatBox.extend({
+      defaults() {
+        return {
+          'bookmarked': false,
+          'hidden': ['mobile', 'fullscreen'].includes(_converse.view_mode),
+          'message_type': 'headline',
+          'num_unread': 0,
+          'time_opened': this.get('time_opened') || new Date().getTime(),
+          'type': _converse.HEADLINES_TYPE
+        };
+      },
+
+      initialize() {
+        this.initMessages();
+        this.set({
+          'box_id': "box-".concat(btoa(this.get('jid')))
+        });
+      }
+
+    });
+
+    async function onHeadlineMessage(message) {
+      // Handler method for all incoming messages of type "headline".
+      if (converse_headlines_utils.isHeadlineMessage(_converse, message)) {
+        const from_jid = message.getAttribute('from');
+
+        if (from_jid.includes('@') && !_converse.roster.get(from_jid) && !_converse.allow_non_roster_messaging) {
+          return;
+        }
+
+        if (message.querySelector('body') === null) {
+          // Avoid creating a chat box if we have nothing to show inside it.
+          return;
+        }
+
+        const chatbox = _converse.chatboxes.create({
+          'id': from_jid,
+          'jid': from_jid,
+          'type': _converse.HEADLINES_TYPE,
+          'from': from_jid
+        });
+
+        const attrs = await chatbox.getMessageAttributesFromStanza(message, message);
+        await chatbox.messages.create(attrs);
+
+        _converse.api.trigger('message', {
+          'chatbox': chatbox,
+          'stanza': message
+        });
+      }
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    function registerHeadlineHandler() {
+      _converse.connection.addHandler(message => {
+        onHeadlineMessage(message);
+        return true;
+      }, null, 'message');
+    }
+
+    _converse.api.listen.on('connected', registerHeadlineHandler);
+
+    _converse.api.listen.on('reconnected', registerHeadlineHandler);
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The "headlines" namespace, which is used for headline-channels
+       * which are read-only channels containing messages of type
+       * "headline".
+       *
+       * @namespace _converse.api.headlines
+       * @memberOf _converse.api
+       */
+      headlines: {
+        /**
+         * Retrieves a headline-channel or all headline-channels.
+         *
+         * @method _converse.api.headlines.get
+         * @param {String|String[]} jids - e.g. 'buddy@example.com' or ['buddy1@example.com', 'buddy2@example.com']
+         * @param {Object} [attrs] - Attributes to be set on the _converse.ChatBox model.
+         * @param {Boolean} [create=false] - Whether the chat should be created if it's not found.
+         * @returns { Promise<_converse.HeadlinesBox> }
+         */
+        async get(jids) {
+          let attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+          let create = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+          async function _get(jid) {
+            let model = await _converse.api.chatboxes.get(jid);
+
+            if (!model && create) {
+              model = await _converse.api.chatboxes.create(jid, attrs, _converse.HeadlinesBox);
+            } else {
+              model = model && model.get('type') === _converse.HEADLINES_TYPE ? model : null;
+
+              if (model && Object.keys(attrs).length) {
+                model.save(attrs);
+              }
+            }
+
+            return model;
+          }
+
+          if (jids === undefined) {
+            const chats = await _converse.api.chatboxes.get();
+            return chats.filter(c => c.get('type') === _converse.HEADLINES_TYPE);
+          } else if (Object(lodash["isString"])(jids)) {
+            return _get(jids);
+          }
+
+          return Promise.all(jids.map(jid => _get(jid)));
+        }
+
+      }
+    });
+    /************************ END API ************************/
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-ping.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-ping
+ * @description
+ * Converse.js plugin which add support for application-level pings
+ * as specified in XEP-0199 XMPP Ping.
+ */
+
+
+const {
+  Strophe: converse_ping_Strophe,
+  $iq: converse_ping_$iq
+} = converse_core.env;
+const converse_ping_u = converse_core.env.utils;
+converse_ping_Strophe.addNamespace('PING', "urn:xmpp:ping");
+converse_core.plugins.add('converse-ping', {
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    let lastStanzaDate;
+
+    _converse.api.settings.update({
+      ping_interval: 60 //in seconds
+
+    });
+
+    function pong(ping) {
+      lastStanzaDate = new Date();
+      const from = ping.getAttribute('from');
+      const id = ping.getAttribute('id');
+      const iq = converse_ping_$iq({
+        type: 'result',
+        to: from,
+        id: id
+      });
+
+      _converse.connection.sendIQ(iq);
+
+      return true;
+    }
+
+    function registerPongHandler() {
+      if (_converse.connection.disco !== undefined) {
+        _converse.api.disco.own.features.add(converse_ping_Strophe.NS.PING);
+      }
+
+      return _converse.connection.addHandler(pong, converse_ping_Strophe.NS.PING, "iq", "get");
+    }
+
+    function registerPingHandler() {
+      _converse.connection.addHandler(() => {
+        if (_converse.ping_interval > 0) {
+          // Handler on each stanza, saves the received date
+          // in order to ping only when needed.
+          lastStanzaDate = new Date();
+          return true;
+        }
+      });
+    }
+
+    setTimeout(() => {
+      if (_converse.ping_interval > 0) {
+        const now = new Date();
+
+        if (!lastStanzaDate) {
+          lastStanzaDate = now;
+        }
+
+        if ((now - lastStanzaDate) / 1000 > _converse.ping_interval) {
+          return _converse.api.ping();
+        }
+
+        return true;
+      }
+    }, 1000);
+    /************************ BEGIN Event Handlers ************************/
+
+    const onConnected = function onConnected() {
+      // Wrapper so that we can spy on registerPingHandler in tests
+      registerPongHandler();
+      registerPingHandler();
+    };
+
+    _converse.api.listen.on('connected', onConnected);
+
+    _converse.api.listen.on('reconnected', onConnected);
+
+    function onWindowStateChanged(data) {
+      if (data.state === 'visible' && _converse.api.connection.connected()) {
+        _converse.api.ping(null, 5000);
+      }
+    }
+
+    _converse.api.listen.on('windowStateChanged', onWindowStateChanged);
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * Pings the service represented by the passed in JID by sending an IQ stanza.
+       * @private
+       * @method _converse.api.ping
+       * @param { String } [jid] - The JID of the service to ping
+       * @param { Integer } [timeout] - The amount of time in
+       *  milliseconds to wait for a response. The default is 10000;
+       */
+      async ping(jid, timeout) {
+        // XXX: We could first check here if the server advertised that it supports PING.
+        // However, some servers don't advertise while still responding to pings
+        //
+        // const feature = _converse.disco_entities[_converse.domain].features.findWhere({'var': Strophe.NS.PING});
+        lastStanzaDate = new Date();
+        jid = jid || converse_ping_Strophe.getDomainFromJid(_converse.bare_jid);
+
+        if (_converse.connection) {
+          const iq = converse_ping_$iq({
+            'type': 'get',
+            'to': jid,
+            'id': converse_ping_u.getUniqueId('ping')
+          }).c('ping', {
+            'xmlns': converse_ping_Strophe.NS.PING
+          });
+          const result = await _converse.api.sendIQ(iq, timeout || 10000, false);
+
+          if (result === null) {
+            headless_log.warn("Timeout while pinging ".concat(jid));
+
+            if (jid === converse_ping_Strophe.getDomainFromJid(_converse.bare_jid)) {
+              _converse.api.connection.reconnect();
+            }
+          } else if (converse_ping_u.isErrorStanza(result)) {
+            headless_log.error("Error while pinging ".concat(jid));
+            headless_log.error(result);
+          }
+
+          return true;
+        }
+
+        return false;
+      }
+
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-pubsub.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-pubsub
+ */
+
+
+
+const {
+  Strophe: converse_pubsub_Strophe,
+  $iq: converse_pubsub_$iq
+} = converse_core.env;
+converse_pubsub_Strophe.addNamespace('PUBSUB_ERROR', converse_pubsub_Strophe.NS.PUBSUB + "#errors");
+converse_core.plugins.add('converse-pubsub', {
+  dependencies: ["converse-disco"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    /************************ BEGIN API ************************/
+    // We extend the default converse.js API to add methods specific to MUC groupchats.
+
+    Object.assign(_converse.api, {
+      /**
+       * The "pubsub" namespace groups methods relevant to PubSub
+       *
+       * @namespace _converse.api.pubsub
+       * @memberOf _converse.api
+       */
+      'pubsub': {
+        /**
+         * Publshes an item to a PubSub node
+         *
+         * @method _converse.api.pubsub.publish
+         * @param {string} jid The JID of the pubsub service where the node resides.
+         * @param {string} node The node being published to
+         * @param {Strophe.Builder} item The Strophe.Builder representation of the XML element being published
+         * @param {object} options An object representing the publisher options
+         *      (see https://xmpp.org/extensions/xep-0060.html#publisher-publish-options)
+         * @param {boolean} strict_options Indicates whether the publisher
+         *      options are a strict requirement or not. If they're NOT
+         *      strict, then Converse will publish to the node even if
+         *      the publish options precondication cannot be met.
+         */
+        async 'publish'(jid, node, item, options) {
+          let strict_options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
+          const stanza = converse_pubsub_$iq({
+            'from': _converse.bare_jid,
+            'type': 'set',
+            'to': jid
+          }).c('pubsub', {
+            'xmlns': converse_pubsub_Strophe.NS.PUBSUB
+          }).c('publish', {
+            'node': node
+          }).cnode(item.tree()).up().up();
+
+          if (options) {
+            jid = jid || _converse.bare_jid;
+
+            if (await _converse.api.disco.supports(converse_pubsub_Strophe.NS.PUBSUB + '#publish-options', jid)) {
+              stanza.c('publish-options').c('x', {
+                'xmlns': converse_pubsub_Strophe.NS.XFORM,
+                'type': 'submit'
+              }).c('field', {
+                'var': 'FORM_TYPE',
+                'type': 'hidden'
+              }).c('value').t("".concat(converse_pubsub_Strophe.NS.PUBSUB, "#publish-options")).up().up();
+              Object.keys(options).forEach(k => stanza.c('field', {
+                'var': k
+              }).c('value').t(options[k]).up().up());
+            } else {
+              headless_log.warn("_converse.api.publish: ".concat(jid, " does not support #publish-options, ") + "so we didn't set them even though they were provided.");
+            }
+          }
+
+          try {
+            _converse.api.sendIQ(stanza);
+          } catch (iq) {
+            if (iq instanceof Element && strict_options && iq.querySelector("precondition-not-met[xmlns=\"".concat(converse_pubsub_Strophe.NS.PUBSUB_ERROR, "\"]"))) {
+              // The publish-options precondition couldn't be
+              // met. We re-publish but without publish-options.
+              const el = stanza.nodeTree;
+              el.querySelector('publish-options').outerHTML = '';
+              headless_log.warn("PubSub: Republishing without publish options. ".concat(el.outerHTML));
+
+              _converse.api.sendIQ(el);
+            } else {
+              throw iq;
+            }
+          }
+        }
+
+      }
+    });
+    /************************ END API ************************/
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-status.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-status
+ */
+
+
+const {
+  Backbone: converse_status_Backbone,
+  Strophe: converse_status_Strophe,
+  $build: converse_status_$build,
+  $pres: converse_status_$pres
+} = converse_core.env;
+converse_core.plugins.add('converse-status', {
+  initialize() {
+    const {
+      _converse
+    } = this;
+    _converse.XMPPStatus = converse_status_Backbone.Model.extend({
+      defaults() {
+        return {
+          "status": _converse.default_state
+        };
+      },
+
+      initialize() {
+        this.on('change', item => {
+          if (!Object(lodash["isObject"])(item.changed)) {
+            return;
+          }
+
+          if ('status' in item.changed || 'status_message' in item.changed) {
+            this.sendPresence(this.get('status'), this.get('status_message'));
+          }
+        });
+      },
+
+      getNickname() {
+        return _converse.nickname;
+      },
+
+      getFullname() {
+        // Gets overridden in converse-vcard
+        return '';
+      },
+
+      constructPresence(type, status_message) {
+        let presence;
+        type = Object(lodash["isString"])(type) ? type : this.get('status') || _converse.default_state;
+        status_message = Object(lodash["isString"])(status_message) ? status_message : this.get('status_message'); // Most of these presence types are actually not explicitly sent,
+        // but I add all of them here for reference and future proofing.
+
+        if (type === 'unavailable' || type === 'probe' || type === 'error' || type === 'unsubscribe' || type === 'unsubscribed' || type === 'subscribe' || type === 'subscribed') {
+          presence = converse_status_$pres({
+            'type': type
+          });
+        } else if (type === 'offline') {
+          presence = converse_status_$pres({
+            'type': 'unavailable'
+          });
+        } else if (type === 'online') {
+          presence = converse_status_$pres();
+        } else {
+          presence = converse_status_$pres().c('show').t(type).up();
+        }
+
+        if (status_message) {
+          presence.c('status').t(status_message).up();
+        }
+
+        presence.c('priority').t(Object(lodash["isNaN"])(Number(_converse.priority)) ? 0 : _converse.priority).up();
+
+        if (_converse.idle) {
+          const idle_since = new Date();
+          idle_since.setSeconds(idle_since.getSeconds() - _converse.idle_seconds);
+          presence.c('idle', {
+            xmlns: converse_status_Strophe.NS.IDLE,
+            since: idle_since.toISOString()
+          });
+        }
+
+        return presence;
+      },
+
+      sendPresence(type, status_message) {
+        _converse.api.send(this.constructPresence(type, status_message));
+      }
+
+    });
+    /**
+     * Send out a Client State Indication (XEP-0352)
+     * @private
+     * @method sendCSI
+     * @memberOf _converse
+     * @param { String } stat - The user's chat status
+     */
+
+    _converse.sendCSI = function (stat) {
+      _converse.api.send(converse_status_$build(stat, {
+        xmlns: converse_status_Strophe.NS.CSI
+      }));
+
+      _converse.inactive = stat === _converse.INACTIVE ? true : false;
+    };
+
+    _converse.onUserActivity = function () {
+      /* Resets counters and flags relating to CSI and auto_away/auto_xa */
+      if (_converse.idle_seconds > 0) {
+        _converse.idle_seconds = 0;
+      }
+
+      if (!Object(lodash["get"])(_converse.connection, 'authenticated')) {
+        // We can't send out any stanzas when there's no authenticated connection.
+        // This can happen when the connection reconnects.
+        return;
+      }
+
+      if (_converse.inactive) {
+        _converse.sendCSI(_converse.ACTIVE);
+      }
+
+      if (_converse.idle) {
+        _converse.idle = false;
+
+        _converse.xmppstatus.sendPresence();
+      }
+
+      if (_converse.auto_changed_status === true) {
+        _converse.auto_changed_status = false; // XXX: we should really remember the original state here, and
+        // then set it back to that...
+
+        _converse.xmppstatus.set('status', _converse.default_state);
+      }
+    };
+
+    _converse.onEverySecond = function () {
+      /* An interval handler running every second.
+       * Used for CSI and the auto_away and auto_xa features.
+       */
+      if (!Object(lodash["get"])(_converse.connection, 'authenticated')) {
+        // We can't send out any stanzas when there's no authenticated connection.
+        // This can happen when the connection reconnects.
+        return;
+      }
+
+      const stat = _converse.xmppstatus.get('status');
+
+      _converse.idle_seconds++;
+
+      if (_converse.csi_waiting_time > 0 && _converse.idle_seconds > _converse.csi_waiting_time && !_converse.inactive) {
+        _converse.sendCSI(_converse.INACTIVE);
+      }
+
+      if (_converse.idle_presence_timeout > 0 && _converse.idle_seconds > _converse.idle_presence_timeout && !_converse.idle) {
+        _converse.idle = true;
+
+        _converse.xmppstatus.sendPresence();
+      }
+
+      if (_converse.auto_away > 0 && _converse.idle_seconds > _converse.auto_away && stat !== 'away' && stat !== 'xa' && stat !== 'dnd') {
+        _converse.auto_changed_status = true;
+
+        _converse.xmppstatus.set('status', 'away');
+      } else if (_converse.auto_xa > 0 && _converse.idle_seconds > _converse.auto_xa && stat !== 'xa' && stat !== 'dnd') {
+        _converse.auto_changed_status = true;
+
+        _converse.xmppstatus.set('status', 'xa');
+      }
+    };
+
+    _converse.registerIntervalHandler = function () {
+      /* Set an interval of one second and register a handler for it.
+       * Required for the auto_away, auto_xa and csi_waiting_time features.
+       */
+      if (_converse.auto_away < 1 && _converse.auto_xa < 1 && _converse.csi_waiting_time < 1 && _converse.idle_presence_timeout < 1) {
+        // Waiting time of less then one second means features aren't used.
+        return;
+      }
+
+      _converse.idle_seconds = 0;
+      _converse.auto_changed_status = false; // Was the user's status changed by Converse?
+
+      window.addEventListener('click', _converse.onUserActivity);
+      window.addEventListener('focus', _converse.onUserActivity);
+      window.addEventListener('keypress', _converse.onUserActivity);
+      window.addEventListener('mousemove', _converse.onUserActivity);
+      const options = {
+        'once': true,
+        'passive': true
+      };
+      window.addEventListener(_converse.unloadevent, _converse.onUserActivity, options);
+      window.addEventListener(_converse.unloadevent, () => {
+        if (_converse.session) {
+          _converse.session.save('active', false);
+        }
+      });
+      _converse.everySecondTrigger = window.setInterval(_converse.onEverySecond, 1000);
+    };
+
+    _converse.api.listen.on('presencesInitialized', reconnecting => {
+      if (!reconnecting) {
+        _converse.registerIntervalHandler();
+      }
+    });
+
+    function onStatusInitialized(reconnecting) {
+      /**
+       * Triggered when the user's own chat status has been initialized.
+       * @event _converse#statusInitialized
+       * @example _converse.api.listen.on('statusInitialized', status => { ... });
+       * @example _converse.api.waitUntil('statusInitialized').then(() => { ... });
+       */
+      _converse.api.trigger('statusInitialized', reconnecting);
+    }
+
+    function initStatus(reconnecting) {
+      // If there's no xmppstatus obj, then we were never connected to
+      // begin with, so we set reconnecting to false.
+      reconnecting = _converse.xmppstatus === undefined ? false : reconnecting;
+
+      if (reconnecting) {
+        onStatusInitialized(reconnecting);
+      } else {
+        const id = "converse.xmppstatus-".concat(_converse.bare_jid);
+        _converse.xmppstatus = new _converse.XMPPStatus({
+          'id': id
+        });
+        _converse.xmppstatus.browserStorage = _converse.createStore(id, "session");
+
+        _converse.xmppstatus.fetch({
+          'success': () => onStatusInitialized(reconnecting),
+          'error': () => onStatusInitialized(reconnecting),
+          'silent': true
+        });
+      }
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('clearSession', () => {
+      if (_converse.shouldClearCache() && _converse.xmppstatus) {
+        _converse.xmppstatus.destroy();
+
+        delete _converse.xmppstatus;
+      }
+    });
+
+    _converse.api.listen.on('connected', () => initStatus(false));
+
+    _converse.api.listen.on('reconnected', () => initStatus(true));
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api.user, {
+      /**
+       * Set and get the user's chat status, also called their *availability*.
+       *
+       * @namespace _converse.api.user.status
+       * @memberOf _converse.api.user
+       */
+      status: {
+        /** Return the current user's availability status.
+         *
+         * @method _converse.api.user.status.get
+         * @example _converse.api.user.status.get();
+         */
+        get() {
+          return _converse.xmppstatus.get('status');
+        },
+
+        /**
+         * The user's status can be set to one of the following values:
+         *
+         * @method _converse.api.user.status.set
+         * @param {string} value The user's chat status (e.g. 'away', 'dnd', 'offline', 'online', 'unavailable' or 'xa')
+         * @param {string} [message] A custom status message
+         *
+         * @example this._converse.api.user.status.set('dnd');
+         * @example this._converse.api.user.status.set('dnd', 'In a meeting');
+         */
+        set(value, message) {
+          const data = {
+            'status': value
+          };
+
+          if (!Object.keys(_converse.STATUS_WEIGHTS).includes(value)) {
+            throw new Error('Invalid availability value. See https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.2.2.1');
+          }
+
+          if (Object(lodash["isString"])(message)) {
+            data.status_message = message;
+          }
+
+          _converse.xmppstatus.sendPresence(value);
+
+          _converse.xmppstatus.save(data);
+        },
+
+        /**
+         * Set and retrieve the user's custom status message.
+         *
+         * @namespace _converse.api.user.status.message
+         * @memberOf _converse.api.user.status
+         */
+        message: {
+          /**
+           * @method _converse.api.user.status.message.get
+           * @returns {string} The status message
+           * @example const message = _converse.api.user.status.message.get()
+           */
+          get() {
+            return _converse.xmppstatus.get('status_message');
+          },
+
+          /**
+           * @method _converse.api.user.status.message.set
+           * @param {string} status The status message
+           * @example _converse.api.user.status.message.set('In a meeting');
+           */
+          set(status) {
+            _converse.xmppstatus.save({
+              status_message: status
+            });
+          }
+
+        }
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-roster.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-roster
+ */
+
+
+
+
+const {
+  Backbone: converse_roster_Backbone,
+  Strophe: converse_roster_Strophe,
+  $iq: converse_roster_$iq,
+  $pres: converse_roster_$pres,
+  dayjs: converse_roster_dayjs,
+  sizzle: converse_roster_sizzle
+} = converse_core.env;
+const converse_roster_u = converse_core.env.utils;
+converse_core.plugins.add('converse-roster', {
+  dependencies: ['converse-status'],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      'allow_contact_requests': true,
+      'auto_subscribe': false,
+      'synchronize_availability': true
+    });
+
+    _converse.api.promises.add(['cachedRoster', 'roster', 'rosterContactsFetched', 'rosterGroupsFetched', 'rosterInitialized']);
+
+    _converse.HEADER_CURRENT_CONTACTS = __('My contacts');
+    _converse.HEADER_PENDING_CONTACTS = __('Pending contacts');
+    _converse.HEADER_REQUESTING_CONTACTS = __('Contact requests');
+    _converse.HEADER_UNGROUPED = __('Ungrouped');
+    _converse.HEADER_UNREAD = __('New messages');
+    const HEADER_WEIGHTS = {};
+    HEADER_WEIGHTS[_converse.HEADER_UNREAD] = 0;
+    HEADER_WEIGHTS[_converse.HEADER_REQUESTING_CONTACTS] = 1;
+    HEADER_WEIGHTS[_converse.HEADER_CURRENT_CONTACTS] = 2;
+    HEADER_WEIGHTS[_converse.HEADER_UNGROUPED] = 3;
+    HEADER_WEIGHTS[_converse.HEADER_PENDING_CONTACTS] = 4;
+
+    _converse.registerPresenceHandler = function () {
+      _converse.unregisterPresenceHandler();
+
+      _converse.presence_ref = _converse.connection.addHandler(presence => {
+        _converse.roster.presenceHandler(presence);
+
+        return true;
+      }, null, 'presence', null);
+    };
+    /**
+     * Reject or cancel another user's subscription to our presence updates.
+     * @method rejectPresenceSubscription
+     * @private
+     * @memberOf _converse
+     * @param { String } jid - The Jabber ID of the user whose subscription is being canceled
+     * @param { String } message - An optional message to the user
+     */
+
+
+    _converse.rejectPresenceSubscription = function (jid, message) {
+      const pres = converse_roster_$pres({
+        to: jid,
+        type: "unsubscribed"
+      });
+
+      if (message && message !== "") {
+        pres.c("status").t(message);
+      }
+
+      _converse.api.send(pres);
+    };
+
+    _converse.sendInitialPresence = function () {
+      if (_converse.send_initial_presence) {
+        _converse.xmppstatus.sendPresence();
+      }
+    };
+    /**
+     * Fetch all the roster groups, and then the roster contacts.
+     * Emit an event after fetching is done in each case.
+     * @private
+     * @method _converse.populateRoster
+     * @param { Bool } ignore_cache - If set to to true, the local cache
+     *      will be ignored it's guaranteed that the XMPP server
+     *      will be queried for the roster.
+     */
+
+
+    _converse.populateRoster = async function () {
+      let ignore_cache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+      if (ignore_cache) {
+        _converse.send_initial_presence = true;
+      }
+
+      try {
+        await _converse.rostergroups.fetchRosterGroups();
+        /**
+         * Triggered once roster groups have been fetched. Used by the
+         * `converse-rosterview.js` plugin to know when it can start alphabetically
+         * position roster groups.
+         * @event _converse#rosterGroupsFetched
+         * @example _converse.api.listen.on('rosterGroupsFetched', () => { ... });
+         * @example _converse.api.waitUntil('rosterGroupsFetched').then(() => { ... });
+         */
+
+        _converse.api.trigger('rosterGroupsFetched');
+
+        await _converse.roster.fetchRosterContacts();
+
+        _converse.api.trigger('rosterContactsFetched');
+      } catch (reason) {
+        headless_log.error(reason);
+      } finally {
+        _converse.sendInitialPresence();
+      }
+    };
+
+    const Resource = converse_roster_Backbone.Model.extend({
+      'idAttribute': 'name'
+    });
+
+    const Resources = _converse.Collection.extend({
+      'model': Resource
+    });
+
+    _converse.Presence = converse_roster_Backbone.Model.extend({
+      defaults: {
+        'show': 'offline'
+      },
+
+      initialize() {
+        this.resources = new Resources();
+        const id = "converse.identities-".concat(this.get('jid'));
+        this.resources.browserStorage = _converse.createStore(id, "session");
+        this.listenTo(this.resources, 'update', this.onResourcesChanged);
+        this.listenTo(this.resources, 'change', this.onResourcesChanged);
+      },
+
+      onResourcesChanged() {
+        const hpr = this.getHighestPriorityResource();
+        const show = Object(lodash["get"])(hpr, 'attributes.show', 'offline');
+
+        if (this.get('show') !== show) {
+          this.save({
+            'show': show
+          });
+        }
+      },
+
+      /**
+       * Return the resource with the highest priority.
+       * If multiple resources have the same priority, take the latest one.
+       * @private
+       */
+      getHighestPriorityResource() {
+        return this.resources.sortBy(r => "".concat(r.get('priority'), "-").concat(r.get('timestamp'))).reverse()[0];
+      },
+
+      /**
+       * Adds a new resource and it's associated attributes as taken
+       * from the passed in presence stanza.
+       * Also updates the presence if the resource has higher priority (and is newer).
+       * @private
+       * @param { XMLElement } presence: The presence stanza
+       */
+      addResource(presence) {
+        const jid = presence.getAttribute('from'),
+              name = converse_roster_Strophe.getResourceFromJid(jid),
+              delay = converse_roster_sizzle("delay[xmlns=\"".concat(converse_roster_Strophe.NS.DELAY, "\"]"), presence).pop(),
+              priority = Object(lodash["propertyOf"])(presence.querySelector('priority'))('textContent') || 0,
+              resource = this.resources.get(name),
+              settings = {
+          'name': name,
+          'priority': Object(lodash["isNaN"])(parseInt(priority, 10)) ? 0 : parseInt(priority, 10),
+          'show': Object(lodash["propertyOf"])(presence.querySelector('show'))('textContent') || 'online',
+          'timestamp': delay ? converse_roster_dayjs(delay.getAttribute('stamp')).toISOString() : new Date().toISOString()
+        };
+
+        if (resource) {
+          resource.save(settings);
+        } else {
+          this.resources.create(settings);
+        }
+      },
+
+      /**
+       * Remove the passed in resource from the resources map.
+       * Also redetermines the presence given that there's one less
+       * resource.
+       * @private
+       * @param { string } name: The resource name
+       */
+      removeResource(name) {
+        const resource = this.resources.get(name);
+
+        if (resource) {
+          resource.destroy();
+        }
+      }
+
+    });
+    _converse.Presences = _converse.Collection.extend({
+      model: _converse.Presence
+    });
+    /**
+     * @class
+     * @namespace _converse.RosterContact
+     * @memberOf _converse
+     */
+
+    _converse.RosterContact = converse_roster_Backbone.Model.extend({
+      defaults: {
+        'chat_state': undefined,
+        'image': _converse.DEFAULT_IMAGE,
+        'image_type': _converse.DEFAULT_IMAGE_TYPE,
+        'num_unread': 0,
+        'status': undefined
+      },
+
+      async initialize(attributes) {
+        this.initialized = converse_roster_u.getResolveablePromise();
+        this.setPresence();
+        const {
+          jid
+        } = attributes;
+        const bare_jid = converse_roster_Strophe.getBareJidFromJid(jid).toLowerCase();
+        attributes.jid = bare_jid;
+        this.set(Object.assign({
+          'groups': [],
+          'id': bare_jid,
+          'jid': bare_jid,
+          'user_id': converse_roster_Strophe.getNodeFromJid(jid)
+        }, attributes));
+        /**
+         * When a contact's presence status has changed.
+         * The presence status is either `online`, `offline`, `dnd`, `away` or `xa`.
+         * @event _converse#contactPresenceChanged
+         * @type { _converse.RosterContact }
+         * @example _converse.api.listen.on('contactPresenceChanged', contact => { ... });
+         */
+
+        this.listenTo(this.presence, 'change:show', () => _converse.api.trigger('contactPresenceChanged', this));
+        this.listenTo(this.presence, 'change:show', () => this.trigger('presenceChanged'));
+        /**
+         * Synchronous event which provides a hook for further initializing a RosterContact
+         * @event _converse#rosterContactInitialized
+         * @param { _converse.RosterContact } contact
+         */
+
+        await _converse.api.trigger('rosterContactInitialized', this, {
+          'Synchronous': true
+        });
+        this.initialized.resolve();
+      },
+
+      setPresence() {
+        const jid = this.get('jid');
+        this.presence = _converse.presences.findWhere({
+          'jid': jid
+        }) || _converse.presences.create({
+          'jid': jid
+        });
+      },
+
+      getDisplayName() {
+        // Gets overridden in converse-vcard where the fullname is may be returned
+        if (this.get('nickname')) {
+          return this.get('nickname');
+        } else {
+          return this.get('jid');
+        }
+      },
+
+      getFullname() {
+        // Gets overridden in converse-vcard where the fullname may be returned
+        return this.get('jid');
+      },
+
+      /**
+       * Send a presence subscription request to this roster contact
+       * @private
+       * @method _converse.RosterContacts#subscribe
+       * @param { String } message - An optional message to explain the
+       *      reason for the subscription request.
+       */
+      subscribe(message) {
+        const pres = converse_roster_$pres({
+          to: this.get('jid'),
+          type: "subscribe"
+        });
+
+        if (message && message !== "") {
+          pres.c("status").t(message).up();
+        }
+
+        const nick = _converse.xmppstatus.getNickname() || _converse.xmppstatus.getFullname();
+
+        if (nick) {
+          pres.c('nick', {
+            'xmlns': converse_roster_Strophe.NS.NICK
+          }).t(nick).up();
+        }
+
+        _converse.api.send(pres);
+
+        this.save('ask', "subscribe"); // ask === 'subscribe' Means we have asked to subscribe to them.
+
+        return this;
+      },
+
+      /**
+       * Upon receiving the presence stanza of type "subscribed",
+       * the user SHOULD acknowledge receipt of that subscription
+       * state notification by sending a presence stanza of type
+       * "subscribe" to the contact
+       * @private
+       * @method _converse.RosterContacts#ackSubscribe
+       */
+      ackSubscribe() {
+        _converse.api.send(converse_roster_$pres({
+          'type': 'subscribe',
+          'to': this.get('jid')
+        }));
+      },
+
+      /**
+       * Upon receiving the presence stanza of type "unsubscribed",
+       * the user SHOULD acknowledge receipt of that subscription state
+       * notification by sending a presence stanza of type "unsubscribe"
+       * this step lets the user's server know that it MUST no longer
+       * send notification of the subscription state change to the user.
+       * @private
+       * @method _converse.RosterContacts#ackUnsubscribe
+       * @param { String } jid - The Jabber ID of the user who is unsubscribing
+       */
+      ackUnsubscribe() {
+        _converse.api.send(converse_roster_$pres({
+          'type': 'unsubscribe',
+          'to': this.get('jid')
+        }));
+
+        this.removeFromRoster();
+        this.destroy();
+      },
+
+      /**
+       * Unauthorize this contact's presence subscription
+       * @private
+       * @method _converse.RosterContacts#unauthorize
+       * @param { String } message - Optional message to send to the person being unauthorized
+       */
+      unauthorize(message) {
+        _converse.rejectPresenceSubscription(this.get('jid'), message);
+
+        return this;
+      },
+
+      /**
+       * Authorize presence subscription
+       * @private
+       * @method _converse.RosterContacts#authorize
+       * @param { String } message - Optional message to send to the person being authorized
+       */
+      authorize(message) {
+        const pres = converse_roster_$pres({
+          'to': this.get('jid'),
+          'type': "subscribed"
+        });
+
+        if (message && message !== "") {
+          pres.c("status").t(message);
+        }
+
+        _converse.api.send(pres);
+
+        return this;
+      },
+
+      /**
+       * Instruct the XMPP server to remove this contact from our roster
+       * @private
+       * @method _converse.RosterContacts#
+       * @returns { Promise }
+       */
+      removeFromRoster() {
+        const iq = converse_roster_$iq({
+          type: 'set'
+        }).c('query', {
+          xmlns: converse_roster_Strophe.NS.ROSTER
+        }).c('item', {
+          jid: this.get('jid'),
+          subscription: "remove"
+        });
+        return _converse.api.sendIQ(iq);
+      }
+
+    });
+    /**
+     * @class
+     * @namespace _converse.RosterContacts
+     * @memberOf _converse
+     */
+
+    _converse.RosterContacts = _converse.Collection.extend({
+      model: _converse.RosterContact,
+
+      comparator(contact1, contact2) {
+        // Groups are sorted alphabetically, ignoring case.
+        // However, Ungrouped, Requesting Contacts and Pending Contacts
+        // appear last and in that order.
+        const status1 = contact1.presence.get('show') || 'offline';
+        const status2 = contact2.presence.get('show') || 'offline';
+
+        if (_converse.STATUS_WEIGHTS[status1] === _converse.STATUS_WEIGHTS[status2]) {
+          const name1 = contact1.getDisplayName().toLowerCase();
+          const name2 = contact2.getDisplayName().toLowerCase();
+          return name1 < name2 ? -1 : name1 > name2 ? 1 : 0;
+        } else {
+          return _converse.STATUS_WEIGHTS[status1] < _converse.STATUS_WEIGHTS[status2] ? -1 : 1;
+        }
+      },
+
+      onConnected() {
+        // Called as soon as the connection has been established
+        // (either after initial login, or after reconnection).
+        // Use the opportunity to register stanza handlers.
+        this.registerRosterHandler();
+        this.registerRosterXHandler();
+      },
+
+      registerRosterHandler() {
+        // Register a handler for roster IQ "set" stanzas, which update
+        // roster contacts.
+        _converse.connection.addHandler(iq => {
+          _converse.roster.onRosterPush(iq);
+
+          return true;
+        }, converse_roster_Strophe.NS.ROSTER, 'iq', "set");
+      },
+
+      registerRosterXHandler() {
+        // Register a handler for RosterX message stanzas, which are
+        // used to suggest roster contacts to a user.
+        let t = 0;
+
+        _converse.connection.addHandler(function (msg) {
+          window.setTimeout(function () {
+            _converse.connection.flush();
+
+            _converse.roster.subscribeToSuggestedItems.bind(_converse.roster)(msg);
+          }, t);
+          t += msg.querySelectorAll('item').length * 250;
+          return true;
+        }, converse_roster_Strophe.NS.ROSTERX, 'message', null);
+      },
+
+      /**
+       * Fetches the roster contacts, first by trying the browser cache,
+       * and if that's empty, then by querying the XMPP server.
+       * @private
+       * @returns {promise} Promise which resolves once the contacts have been fetched.
+       */
+      async fetchRosterContacts() {
+        const result = await new Promise((resolve, reject) => {
+          this.fetch({
+            'add': true,
+            'silent': true,
+            'success': resolve,
+            'error': (c, e) => reject(e)
+          });
+        });
+
+        if (converse_roster_u.isErrorObject(result)) {
+          headless_log.error(result); // Force a full roster refresh
+
+          _converse.session.set('roster_cached', false);
+
+          this.data.save('version', undefined);
+        }
+
+        if (_converse.session.get('roster_cached')) {
+          /**
+           * The contacts roster has been retrieved from the local cache (`sessionStorage`).
+           * @event _converse#cachedRoster
+           * @type { _converse.RosterContacts }
+           * @example _converse.api.listen.on('cachedRoster', (items) => { ... });
+           * @example _converse.api.waitUntil('cachedRoster').then(items => { ... });
+           */
+          _converse.api.trigger('cachedRoster', result);
+        } else {
+          _converse.send_initial_presence = true;
+          return _converse.roster.fetchFromServer();
+        }
+      },
+
+      subscribeToSuggestedItems(msg) {
+        Array.from(msg.querySelectorAll('item')).forEach(item => {
+          if (item.getAttribute('action') === 'add') {
+            _converse.roster.addAndSubscribe(item.getAttribute('jid'), _converse.xmppstatus.getNickname() || _converse.xmppstatus.getFullname());
+          }
+        });
+        return true;
+      },
+
+      isSelf(jid) {
+        return converse_roster_u.isSameBareJID(jid, _converse.connection.jid);
+      },
+
+      /**
+       * Add a roster contact and then once we have confirmation from
+       * the XMPP server we subscribe to that contact's presence updates.
+       * @private
+       * @method _converse.RosterContacts#addAndSubscribe
+       * @param { String } jid - The Jabber ID of the user being added and subscribed to.
+       * @param { String } name - The name of that user
+       * @param { Array.String } groups - Any roster groups the user might belong to
+       * @param { String } message - An optional message to explain the reason for the subscription request.
+       * @param { Object } attributes - Any additional attributes to be stored on the user's model.
+       */
+      addAndSubscribe(jid, name, groups, message, attributes) {
+        const handler = contact => {
+          if (contact instanceof _converse.RosterContact) {
+            contact.subscribe(message);
+          }
+        };
+
+        this.addContactToRoster(jid, name, groups, attributes).then(handler, handler);
+      },
+
+      /**
+       * Send an IQ stanza to the XMPP server to add a new roster contact.
+       * @private
+       * @method _converse.RosterContacts#sendContactAddIQ
+       * @param { String } jid - The Jabber ID of the user being added
+       * @param { String } name - The name of that user
+       * @param { Array.String } groups - Any roster groups the user might belong to
+       * @param { Function } callback - A function to call once the IQ is returned
+       * @param { Function } errback - A function to call if an error occurred
+       */
+      sendContactAddIQ(jid, name, groups) {
+        name = Object(lodash["isEmpty"])(name) ? null : name;
+        const iq = converse_roster_$iq({
+          'type': 'set'
+        }).c('query', {
+          'xmlns': converse_roster_Strophe.NS.ROSTER
+        }).c('item', {
+          jid,
+          name
+        });
+        groups.forEach(g => iq.c('group').t(g).up());
+        return _converse.api.sendIQ(iq);
+      },
+
+      /**
+       * Adds a RosterContact instance to _converse.roster and
+       * registers the contact on the XMPP server.
+       * Returns a promise which is resolved once the XMPP server has responded.
+       * @private
+       * @method _converse.RosterContacts#addContactToRoster
+       * @param { String } jid - The Jabber ID of the user being added and subscribed to.
+       * @param { String } name - The name of that user
+       * @param { Array.String } groups - Any roster groups the user might belong to
+       * @param { Object } attributes - Any additional attributes to be stored on the user's model.
+       */
+      async addContactToRoster(jid, name, groups, attributes) {
+        groups = groups || [];
+
+        try {
+          await this.sendContactAddIQ(jid, name, groups);
+        } catch (e) {
+          headless_log.error(e);
+          alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name || jid));
+          return e;
+        }
+
+        return this.create(Object.assign({
+          'ask': undefined,
+          'nickname': name,
+          groups,
+          jid,
+          'requesting': false,
+          'subscription': 'none'
+        }, attributes), {
+          'sort': false
+        });
+      },
+
+      subscribeBack(bare_jid, presence) {
+        const contact = this.get(bare_jid);
+
+        if (contact instanceof _converse.RosterContact) {
+          contact.authorize().subscribe();
+        } else {
+          // Can happen when a subscription is retried or roster was deleted
+          const handler = contact => {
+            if (contact instanceof _converse.RosterContact) {
+              contact.authorize().subscribe();
+            }
+          };
+
+          const nickname = Object(lodash["get"])(converse_roster_sizzle("nick[xmlns=\"".concat(converse_roster_Strophe.NS.NICK, "\"]"), presence).pop(), 'textContent', null);
+          this.addContactToRoster(bare_jid, nickname, [], {
+            'subscription': 'from'
+          }).then(handler, handler);
+        }
+      },
+
+      getNumOnlineContacts() {
+        const ignored = ['offline', 'unavailable'];
+        return Object(lodash["sum"])(this.models.filter(m => !ignored.includes(m.presence.get('show'))));
+      },
+
+      /**
+       * Handle roster updates from the XMPP server.
+       * See: https://xmpp.org/rfcs/rfc6121.html#roster-syntax-actions-push
+       * @private
+       * @method _converse.RosterContacts#onRosterPush
+       * @param { XMLElement } IQ - The IQ stanza received from the XMPP server.
+       */
+      onRosterPush(iq) {
+        const id = iq.getAttribute('id');
+        const from = iq.getAttribute('from');
+
+        if (from && from !== _converse.bare_jid) {
+          // https://tools.ietf.org/html/rfc6121#page-15
+          //
+          // A receiving client MUST ignore the stanza unless it has no 'from'
+          // attribute (i.e., implicitly from the bare JID of the user's
+          // account) or it has a 'from' attribute whose value matches the
+          // user's bare JID <user@domainpart>.
+          headless_log.warn("Ignoring roster illegitimate roster push message from ".concat(iq.getAttribute('from')));
+          return;
+        }
+
+        _converse.api.send(converse_roster_$iq({
+          type: 'result',
+          id,
+          from: _converse.connection.jid
+        }));
+
+        const query = converse_roster_sizzle("query[xmlns=\"".concat(converse_roster_Strophe.NS.ROSTER, "\"]"), iq).pop();
+        this.data.save('version', query.getAttribute('ver'));
+        const items = converse_roster_sizzle("item", query);
+
+        if (items.length > 1) {
+          headless_log.error(iq);
+          throw new Error('Roster push query may not contain more than one "item" element.');
+        }
+
+        if (items.length === 0) {
+          headless_log.warn(iq);
+          headless_log.warn('Received a roster push stanza without an "item" element.');
+          return;
+        }
+
+        this.updateContact(items.pop());
+        /**
+         * When the roster receives a push event from server (i.e. new entry in your contacts roster).
+         * @event _converse#rosterPush
+         * @type { XMLElement }
+         * @example _converse.api.listen.on('rosterPush', iq => { ... });
+         */
+
+        _converse.api.trigger('rosterPush', iq);
+
+        return;
+      },
+
+      rosterVersioningSupported() {
+        return _converse.api.disco.stream.getFeature('ver', 'urn:xmpp:features:rosterver') && this.data.get('version');
+      },
+
+      /**
+       * Fetch the roster from the XMPP server
+       * @private
+       * @emits _converse#roster
+       * @returns {promise}
+       */
+      async fetchFromServer() {
+        const stanza = converse_roster_$iq({
+          'type': 'get',
+          'id': converse_roster_u.getUniqueId('roster')
+        }).c('query', {
+          xmlns: converse_roster_Strophe.NS.ROSTER
+        });
+
+        if (this.rosterVersioningSupported()) {
+          stanza.attrs({
+            'ver': this.data.get('version')
+          });
+        }
+
+        const iq = await _converse.api.sendIQ(stanza, null, false);
+
+        if (iq.getAttribute('type') !== 'error') {
+          const query = converse_roster_sizzle("query[xmlns=\"".concat(converse_roster_Strophe.NS.ROSTER, "\"]"), iq).pop();
+
+          if (query) {
+            const items = converse_roster_sizzle("item", query);
+            items.forEach(item => this.updateContact(item));
+            this.data.save('version', query.getAttribute('ver'));
+          }
+        } else if (!converse_roster_u.isServiceUnavailableError(iq)) {
+          // Some unknown error happened, so we will try to fetch again if the page reloads.
+          headless_log.error(iq);
+          headless_log.error("Error while trying to fetch roster from the server");
+          return;
+        }
+
+        _converse.session.save('roster_cached', true);
+        /**
+         * When the roster has been received from the XMPP server.
+         * See also the `cachedRoster` event further up, which gets called instead of
+         * `roster` if its already in `sessionStorage`.
+         * @event _converse#roster
+         * @type { XMLElement }
+         * @example _converse.api.listen.on('roster', iq => { ... });
+         * @example _converse.api.waitUntil('roster').then(iq => { ... });
+         */
+
+
+        _converse.api.trigger('roster', iq);
+      },
+
+      /* Update or create RosterContact models based on the given `item` XML
+       * node received in the resulting IQ stanza from the server.
+       * @private
+       * @param { XMLElement } item
+       */
+      updateContact(item) {
+        const jid = item.getAttribute('jid');
+
+        if (this.isSelf(jid)) {
+          return;
+        }
+
+        const contact = this.get(jid);
+        const subscription = item.getAttribute("subscription");
+        const ask = item.getAttribute("ask");
+        const groups = Array.from(item.getElementsByTagName('group')).map(e => e.textContent);
+
+        if (!contact) {
+          if (subscription === "none" && ask === null || subscription === "remove") {
+            return; // We're lazy when adding contacts.
+          }
+
+          this.create({
+            'ask': ask,
+            'nickname': item.getAttribute("name"),
+            'groups': groups,
+            'jid': jid,
+            'subscription': subscription
+          }, {
+            sort: false
+          });
+        } else {
+          if (subscription === "remove") {
+            return contact.destroy();
+          } // We only find out about requesting contacts via the
+          // presence handler, so if we receive a contact
+          // here, we know they aren't requesting anymore.
+          // see docs/DEVELOPER.rst
+
+
+          contact.save({
+            'subscription': subscription,
+            'ask': ask,
+            'nickname': item.getAttribute("name"),
+            'requesting': null,
+            'groups': groups
+          });
+        }
+      },
+
+      createRequestingContact(presence) {
+        const bare_jid = converse_roster_Strophe.getBareJidFromJid(presence.getAttribute('from')),
+              nickname = Object(lodash["get"])(converse_roster_sizzle("nick[xmlns=\"".concat(converse_roster_Strophe.NS.NICK, "\"]"), presence).pop(), 'textContent', null);
+        const user_data = {
+          'jid': bare_jid,
+          'subscription': 'none',
+          'ask': null,
+          'requesting': true,
+          'nickname': nickname
+        };
+        /**
+         * Triggered when someone has requested to subscribe to your presence (i.e. to be your contact).
+         * @event _converse#contactRequest
+         * @type { _converse.RosterContact }
+         * @example _converse.api.listen.on('contactRequest', contact => { ... });
+         */
+
+        _converse.api.trigger('contactRequest', this.create(user_data));
+      },
+
+      handleIncomingSubscription(presence) {
+        const jid = presence.getAttribute('from'),
+              bare_jid = converse_roster_Strophe.getBareJidFromJid(jid),
+              contact = this.get(bare_jid);
+
+        if (!_converse.allow_contact_requests) {
+          _converse.rejectPresenceSubscription(jid, __("This client does not allow presence subscriptions"));
+        }
+
+        if (_converse.auto_subscribe) {
+          if (!contact || contact.get('subscription') !== 'to') {
+            this.subscribeBack(bare_jid, presence);
+          } else {
+            contact.authorize();
+          }
+        } else {
+          if (contact) {
+            if (contact.get('subscription') !== 'none') {
+              contact.authorize();
+            } else if (contact.get('ask') === "subscribe") {
+              contact.authorize();
+            }
+          } else {
+            this.createRequestingContact(presence);
+          }
+        }
+      },
+
+      handleOwnPresence(presence) {
+        const jid = presence.getAttribute('from'),
+              resource = converse_roster_Strophe.getResourceFromJid(jid),
+              presence_type = presence.getAttribute('type');
+
+        if (_converse.connection.jid !== jid && presence_type !== 'unavailable' && (_converse.synchronize_availability === true || _converse.synchronize_availability === resource)) {
+          // Another resource has changed its status and
+          // synchronize_availability option set to update,
+          // we'll update ours as well.
+          const show = Object(lodash["propertyOf"])(presence.querySelector('show'))('textContent') || 'online';
+
+          _converse.xmppstatus.save({
+            'status': show
+          }, {
+            'silent': true
+          });
+
+          const status_message = Object(lodash["propertyOf"])(presence.querySelector('status'))('textContent');
+
+          if (status_message) {
+            _converse.xmppstatus.save({
+              'status_message': status_message
+            });
+          }
+        }
+
+        if (_converse.jid === jid && presence_type === 'unavailable') {
+          // XXX: We've received an "unavailable" presence from our
+          // own resource. Apparently this happens due to a
+          // Prosody bug, whereby we send an IQ stanza to remove
+          // a roster contact, and Prosody then sends
+          // "unavailable" globally, instead of directed to the
+          // particular user that's removed.
+          //
+          // Here is the bug report: https://prosody.im/issues/1121
+          //
+          // I'm not sure whether this might legitimately happen
+          // in other cases.
+          //
+          // As a workaround for now we simply send our presence again,
+          // otherwise we're treated as offline.
+          _converse.xmppstatus.sendPresence();
+        }
+      },
+
+      presenceHandler(presence) {
+        const presence_type = presence.getAttribute('type');
+
+        if (presence_type === 'error') {
+          return true;
+        }
+
+        const jid = presence.getAttribute('from'),
+              bare_jid = converse_roster_Strophe.getBareJidFromJid(jid);
+
+        if (this.isSelf(bare_jid)) {
+          return this.handleOwnPresence(presence);
+        } else if (converse_roster_sizzle("query[xmlns=\"".concat(converse_roster_Strophe.NS.MUC, "\"]"), presence).length) {
+          return; // Ignore MUC
+        }
+
+        const status_message = Object(lodash["propertyOf"])(presence.querySelector('status'))('textContent'),
+              contact = this.get(bare_jid);
+
+        if (contact && status_message !== contact.get('status')) {
+          contact.save({
+            'status': status_message
+          });
+        }
+
+        if (presence_type === 'subscribed' && contact) {
+          contact.ackSubscribe();
+        } else if (presence_type === 'unsubscribed' && contact) {
+          contact.ackUnsubscribe();
+        } else if (presence_type === 'unsubscribe') {
+          return;
+        } else if (presence_type === 'subscribe') {
+          this.handleIncomingSubscription(presence);
+        } else if (presence_type === 'unavailable' && contact) {
+          const resource = converse_roster_Strophe.getResourceFromJid(jid);
+          contact.presence.removeResource(resource);
+        } else if (contact) {
+          // presence_type is undefined
+          contact.presence.addResource(presence);
+        }
+      }
+
+    });
+    _converse.RosterGroup = converse_roster_Backbone.Model.extend({
+      initialize(attributes) {
+        this.set(Object.assign({
+          description: __('Click to hide these contacts'),
+          state: _converse.OPENED
+        }, attributes)); // Collection of contacts belonging to this group.
+
+        this.contacts = new _converse.RosterContacts();
+      }
+
+    });
+    /**
+     * @class
+     * @namespace _converse.RosterGroups
+     * @memberOf _converse
+     */
+
+    _converse.RosterGroups = _converse.Collection.extend({
+      model: _converse.RosterGroup,
+
+      comparator(a, b) {
+        a = a.get('name');
+        b = b.get('name');
+        const WEIGHTS = HEADER_WEIGHTS;
+        const special_groups = Object.keys(HEADER_WEIGHTS);
+        const a_is_special = special_groups.includes(a);
+        const b_is_special = special_groups.includes(b);
+
+        if (!a_is_special && !b_is_special) {
+          return a.toLowerCase() < b.toLowerCase() ? -1 : a.toLowerCase() > b.toLowerCase() ? 1 : 0;
+        } else if (a_is_special && b_is_special) {
+          return WEIGHTS[a] < WEIGHTS[b] ? -1 : WEIGHTS[a] > WEIGHTS[b] ? 1 : 0;
+        } else if (!a_is_special && b_is_special) {
+          const a_header = _converse.HEADER_CURRENT_CONTACTS;
+          return WEIGHTS[a_header] < WEIGHTS[b] ? -1 : WEIGHTS[a_header] > WEIGHTS[b] ? 1 : 0;
+        } else if (a_is_special && !b_is_special) {
+          const b_header = _converse.HEADER_CURRENT_CONTACTS;
+          return WEIGHTS[a] < WEIGHTS[b_header] ? -1 : WEIGHTS[a] > WEIGHTS[b_header] ? 1 : 0;
+        }
+      },
+
+      /**
+       * Fetches all the roster groups from sessionStorage.
+       * @private
+       * @method _converse.RosterGroups#fetchRosterGroups
+       * @returns { Promise } - A promise which resolves once the groups have been fetched.
+       */
+      fetchRosterGroups() {
+        return new Promise(success => {
+          this.fetch({
+            success,
+            // We need to first have all groups before
+            // we can start positioning them, so we set
+            // 'silent' to true.
+            silent: true
+          });
+        });
+      }
+
+    });
+
+    _converse.unregisterPresenceHandler = function () {
+      if (_converse.presence_ref !== undefined) {
+        _converse.connection.deleteHandler(_converse.presence_ref);
+
+        delete _converse.presence_ref;
+      }
+    };
+    /******************** Event Handlers ********************/
+
+
+    function updateUnreadCounter(chatbox) {
+      const contact = _converse.roster && _converse.roster.findWhere({
+        'jid': chatbox.get('jid')
+      });
+
+      if (contact !== undefined) {
+        contact.save({
+          'num_unread': chatbox.get('num_unread')
+        });
+      }
+    }
+
+    _converse.api.listen.on('chatBoxesInitialized', () => {
+      _converse.chatboxes.on('change:num_unread', updateUnreadCounter);
+
+      _converse.chatboxes.on('add', chatbox => {
+        if (chatbox.get('type') === _converse.PRIVATE_CHAT_TYPE) {
+          chatbox.setRosterContact(chatbox.get('jid'));
+        }
+      });
+    });
+
+    _converse.api.listen.on('beforeTearDown', () => _converse.unregisterPresenceHandler());
+
+    _converse.api.waitUntil('rosterContactsFetched').then(() => {
+      _converse.roster.on('add', contact => {
+        /* When a new contact is added, check if we already have a
+         * chatbox open for it, and if so attach it to the chatbox.
+         */
+        const chatbox = _converse.chatboxes.findWhere({
+          'jid': contact.get('jid')
+        });
+
+        if (chatbox) {
+          chatbox.setRosterContact(contact.get('jid'));
+        }
+      });
+    });
+
+    function clearPresences() {
+      if (_converse.presences) {
+        _converse.presences.forEach(p => {
+          p.resources.reject(r => r === undefined).forEach(r => r.destroy({
+            'silent': true
+          }));
+        });
+
+        _converse.presences.clearSession();
+      }
+    }
+
+    _converse.api.listen.on('streamResumptionFailed', () => _converse.session.set('roster_cached', false));
+
+    _converse.api.listen.on('clearSession', () => {
+      clearPresences();
+
+      if (_converse.shouldClearCache()) {
+        if (_converse.roster) {
+          Object(lodash["invoke"])(_converse, 'roster.data.destroy');
+
+          _converse.roster.clearSession();
+
+          delete _converse.roster;
+        }
+
+        if (_converse.rostergroups) {
+          _converse.rostergroups.clearSession();
+
+          delete _converse.rostergroups;
+        }
+      }
+    });
+
+    _converse.api.listen.on('statusInitialized', reconnecting => {
+      if (reconnecting) {
+        // When reconnecting and not resuming a previous session,
+        // we clear all cached presence data, since it might be stale
+        // and we'll receive new presence updates
+        !_converse.haveResumed() && clearPresences();
+      } else {
+        _converse.presences = new _converse.Presences();
+        const id = "converse.presences-".concat(_converse.bare_jid);
+        _converse.presences.browserStorage = _converse.createStore(id, "session"); // We might be continuing an existing session, so we fetch
+        // cached presence data.
+
+        _converse.presences.fetch();
+      }
+      /**
+       * Triggered once the _converse.Presences collection has been
+       * initialized and its cached data fetched.
+       * Returns a boolean indicating whether this event has fired due to
+       * Converse having reconnected.
+       * @event _converse#presencesInitialized
+       * @type { bool }
+       * @example _converse.api.listen.on('presencesInitialized', reconnecting => { ... });
+       */
+
+
+      _converse.api.trigger('presencesInitialized', reconnecting);
+    });
+
+    async function initRoster() {
+      // Initialize the Bakcbone collections that represent the contats
+      // roster and the roster groups.
+      await _converse.api.waitUntil('VCardsInitialized');
+      _converse.roster = new _converse.RosterContacts();
+      let id = "converse.contacts-".concat(_converse.bare_jid);
+      _converse.roster.browserStorage = _converse.createStore(id);
+      _converse.roster.data = new converse_roster_Backbone.Model();
+      id = "converse-roster-model-".concat(_converse.bare_jid);
+      _converse.roster.data.id = id;
+      _converse.roster.data.browserStorage = _converse.createStore(id);
+
+      _converse.roster.data.fetch();
+
+      id = "converse.roster.groups".concat(_converse.bare_jid);
+      _converse.rostergroups = new _converse.RosterGroups();
+      _converse.rostergroups.browserStorage = _converse.createStore(id);
+      /**
+       * Triggered once the `_converse.RosterContacts` and `_converse.RosterGroups` have
+       * been created, but not yet populated with data.
+       * This event is useful when you want to create views for these collections.
+       * @event _converse#chatBoxMaximized
+       * @example _converse.api.listen.on('rosterInitialized', () => { ... });
+       * @example _converse.api.waitUntil('rosterInitialized').then(() => { ... });
+       */
+
+      _converse.api.trigger('rosterInitialized');
+    }
+
+    _converse.api.listen.on('presencesInitialized', async reconnecting => {
+      if (reconnecting) {
+        /**
+         * Similar to `rosterInitialized`, but instead pertaining to reconnection.
+         * This event indicates that the roster and its groups are now again
+         * available after Converse.js has reconnected.
+         * @event _converse#rosterReadyAfterReconnection
+         * @example _converse.api.listen.on('rosterReadyAfterReconnection', () => { ... });
+         */
+        _converse.api.trigger('rosterReadyAfterReconnection');
+      } else {
+        await initRoster();
+      }
+
+      _converse.roster.onConnected();
+
+      _converse.registerPresenceHandler();
+
+      _converse.populateRoster(!_converse.connection.restored);
+    });
+    /************************ API ************************/
+    // API methods only available to plugins
+
+
+    Object.assign(_converse.api, {
+      /**
+       * @namespace _converse.api.contacts
+       * @memberOf _converse.api
+       */
+      contacts: {
+        /**
+         * This method is used to retrieve roster contacts.
+         *
+         * @method _converse.api.contacts.get
+         * @params {(string[]|string)} jid|jids The JID or JIDs of
+         *      the contacts to be returned.
+         * @returns {promise} Promise which resolves with the
+         *  _converse.RosterContact (or an array of them) representing the contact.
+         *
+         * @example
+         * // Fetch a single contact
+         * _converse.api.listen.on('rosterContactsFetched', function () {
+         *     const contact = await _converse.api.contacts.get('buddy@example.com')
+         *     // ...
+         * });
+         *
+         * @example
+         * // To get multiple contacts, pass in an array of JIDs:
+         * _converse.api.listen.on('rosterContactsFetched', function () {
+         *     const contacts = await _converse.api.contacts.get(
+         *         ['buddy1@example.com', 'buddy2@example.com']
+         *     )
+         *     // ...
+         * });
+         *
+         * @example
+         * // To return all contacts, simply call ``get`` without any parameters:
+         * _converse.api.listen.on('rosterContactsFetched', function () {
+         *     const contacts = await _converse.api.contacts.get();
+         *     // ...
+         * });
+         */
+        async get(jids) {
+          await _converse.api.waitUntil('rosterContactsFetched');
+
+          const _getter = jid => _converse.roster.get(converse_roster_Strophe.getBareJidFromJid(jid));
+
+          if (jids === undefined) {
+            jids = _converse.roster.pluck('jid');
+          } else if (Object(lodash["isString"])(jids)) {
+            return _getter(jids);
+          }
+
+          return jids.map(_getter);
+        },
+
+        /**
+         * Add a contact.
+         *
+         * @method _converse.api.contacts.add
+         * @param {string} jid The JID of the contact to be added
+         * @param {string} [name] A custom name to show the user by
+         *     in the roster.
+         * @example
+         *     _converse.api.contacts.add('buddy@example.com')
+         * @example
+         *     _converse.api.contacts.add('buddy@example.com', 'Buddy')
+         */
+        async add(jid, name) {
+          await _converse.api.waitUntil('rosterContactsFetched');
+
+          if (!Object(lodash["isString"])(jid) || !jid.includes('@')) {
+            throw new TypeError('contacts.add: invalid jid');
+          }
+
+          _converse.roster.addAndSubscribe(jid, Object(lodash["isEmpty"])(name) ? jid : name);
+        }
+
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/converse-smacks.js
+// Converse.js
+// http://conversejs.org
+//
+// Copyright (c) The Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-smacks
+ * @description
+ * Converse.js plugin which adds support for XEP-0198: Stream Management
+ */
+
+
+const {
+  Strophe: converse_smacks_Strophe
+} = converse_core.env;
+const converse_smacks_u = converse_core.env.utils;
+converse_smacks_Strophe.addNamespace('SM', 'urn:xmpp:sm:3');
+converse_core.plugins.add('converse-smacks', {
+  initialize() {
+    const {
+      _converse
+    } = this; // Configuration values for this plugin
+    // ====================================
+    // Refer to docs/source/configuration.rst for explanations of these
+    // configuration settings.
+
+    _converse.api.settings.update({
+      'enable_smacks': true,
+      'smacks_max_unacked_stanzas': 5
+    });
+
+    function isStreamManagementSupported() {
+      if (_converse.api.connection.isType('bosh') && !_converse.isTestEnv()) {
+        return false;
+      }
+
+      return _converse.api.disco.stream.getFeature('sm', converse_smacks_Strophe.NS.SM);
+    }
+
+    function handleAck(el) {
+      if (!_converse.session.get('smacks_enabled')) {
+        return true;
+      }
+
+      const handled = parseInt(el.getAttribute('h'), 10);
+
+      const last_known_handled = _converse.session.get('num_stanzas_handled_by_server');
+
+      const delta = handled - last_known_handled;
+
+      if (delta < 0) {
+        const err_msg = "New reported stanza count lower than previous. " + "New: ".concat(handled, " - Previous: ").concat(last_known_handled);
+        headless_log.error(err_msg);
+      }
+
+      const unacked_stanzas = _converse.session.get('unacked_stanzas');
+
+      if (delta > unacked_stanzas.length) {
+        const err_msg = "Higher reported acknowledge count than unacknowledged stanzas. " + "Reported Acknowledged Count: ".concat(delta, " -") + "Unacknowledged Stanza Count: ".concat(unacked_stanzas.length, " -") + "New: ".concat(handled, " - Previous: ").concat(last_known_handled);
+        headless_log.error(err_msg);
+      }
+
+      _converse.session.save({
+        'num_stanzas_handled_by_server': handled,
+        'num_stanzas_since_last_ack': 0,
+        'unacked_stanzas': unacked_stanzas.slice(delta)
+      });
+
+      return true;
+    }
+
+    function sendAck() {
+      if (_converse.session.get('smacks_enabled')) {
+        const h = _converse.session.get('num_stanzas_handled');
+
+        const stanza = converse_smacks_u.toStanza("<a xmlns=\"".concat(converse_smacks_Strophe.NS.SM, "\" h=\"").concat(h, "\"/>"));
+
+        _converse.api.send(stanza);
+      }
+
+      return true;
+    }
+
+    function stanzaHandler(el) {
+      if (_converse.session.get('smacks_enabled')) {
+        if (converse_smacks_u.isTagEqual(el, 'iq') || converse_smacks_u.isTagEqual(el, 'presence') || converse_smacks_u.isTagEqual(el, 'message')) {
+          const h = _converse.session.get('num_stanzas_handled');
+
+          _converse.session.save('num_stanzas_handled', h + 1);
+        }
+      }
+
+      return true;
+    }
+
+    function initSessionData() {
+      _converse.session.save({
+        'smacks_enabled': _converse.session.get('smacks_enabled') || false,
+        'num_stanzas_handled': _converse.session.get('num_stanzas_handled') || 0,
+        'num_stanzas_handled_by_server': _converse.session.get('num_stanzas_handled_by_server') || 0,
+        'num_stanzas_since_last_ack': _converse.session.get('num_stanzas_since_last_ack') || 0,
+        'unacked_stanzas': _converse.session.get('unacked_stanzas') || []
+      });
+    }
+
+    function resetSessionData() {
+      _converse.session && _converse.session.save({
+        'smacks_enabled': false,
+        'num_stanzas_handled': 0,
+        'num_stanzas_handled_by_server': 0,
+        'num_stanzas_since_last_ack': 0,
+        'unacked_stanzas': []
+      });
+    }
+
+    function saveSessionData(el) {
+      const data = {
+        'smacks_enabled': true
+      };
+
+      if (['1', 'true'].includes(el.getAttribute('resume'))) {
+        data['smacks_stream_id'] = el.getAttribute('id');
+      }
+
+      _converse.session.save(data);
+
+      return true;
+    }
+
+    function onFailedStanza(el) {
+      if (el.querySelector('item-not-found')) {
+        // Stream resumption must happen before resource binding but
+        // enabling a new stream must happen after resource binding.
+        // Since resumption failed, we simply continue.
+        //
+        // After resource binding, sendEnableStanza will be called
+        // based on the afterResourceBinding event.
+        headless_log.warn('Could not resume previous SMACKS session, session id not found. ' + 'A new session will be established.');
+      } else {
+        headless_log.error('Failed to enable stream management');
+        headless_log.error(el.outerHTML);
+      }
+
+      resetSessionData();
+      /**
+       * Triggered when the XEP-0198 stream could not be resumed.
+       * @event _converse#streamResumptionFailed
+       */
+
+      _converse.api.trigger('streamResumptionFailed');
+
+      return true;
+    }
+
+    function resendUnackedStanzas() {
+      const stanzas = _converse.session.get('unacked_stanzas'); // We clear the unacked_stanzas array because it'll get populated
+      // again in `onStanzaSent`
+
+
+      _converse.session.save('unacked_stanzas', []); // XXX: Currently we're resending *all* unacked stanzas, including
+      // IQ[type="get"] stanzas that longer have handlers (because the
+      // page reloaded or we reconnected, causing removal of handlers).
+      //
+      // *Side-note:* Is it necessary to clear handlers upon reconnection?
+      //
+      // I've considered not resending those stanzas, but then keeping
+      // track of what's been sent and ack'd and their order gets
+      // prohibitively complex.
+      //
+      // It's unclear how much of a problem this poses.
+      //
+      // Two possible solutions are running @converse/headless as a
+      // service worker or handling IQ[type="result"] stanzas
+      // differently, more like push stanzas, so that they don't need
+      // explicit handlers.
+
+
+      stanzas.forEach(s => _converse.api.send(s));
+    }
+
+    function onResumedStanza(el) {
+      saveSessionData(el);
+      handleAck(el);
+      resendUnackedStanzas();
+      _converse.connection.do_bind = false; // No need to bind our resource anymore
+
+      _converse.connection.authenticated = true;
+      _converse.connection.restored = true;
+
+      _converse.connection._changeConnectStatus(converse_smacks_Strophe.Status.CONNECTED, null);
+    }
+
+    async function sendResumeStanza() {
+      const promise = converse_smacks_u.getResolveablePromise();
+
+      _converse.connection._addSysHandler(el => promise.resolve(onResumedStanza(el)), converse_smacks_Strophe.NS.SM, 'resumed');
+
+      _converse.connection._addSysHandler(el => promise.resolve(onFailedStanza(el)), converse_smacks_Strophe.NS.SM, 'failed');
+
+      const previous_id = _converse.session.get('smacks_stream_id');
+
+      const h = _converse.session.get('num_stanzas_handled');
+
+      const stanza = converse_smacks_u.toStanza("<resume xmlns=\"".concat(converse_smacks_Strophe.NS.SM, "\" h=\"").concat(h, "\" previd=\"").concat(previous_id, "\"/>"));
+
+      _converse.api.send(stanza);
+
+      _converse.connection.flush();
+
+      await promise;
+    }
+
+    async function sendEnableStanza() {
+      if (!_converse.enable_smacks || _converse.session.get('smacks_enabled')) {
+        return;
+      }
+
+      if (await isStreamManagementSupported()) {
+        const promise = converse_smacks_u.getResolveablePromise();
+
+        _converse.connection._addSysHandler(el => promise.resolve(saveSessionData(el)), converse_smacks_Strophe.NS.SM, 'enabled');
+
+        _converse.connection._addSysHandler(el => promise.resolve(onFailedStanza(el)), converse_smacks_Strophe.NS.SM, 'failed');
+
+        const resume = _converse.api.connection.isType('websocket') || _converse.isTestEnv();
+
+        const stanza = converse_smacks_u.toStanza("<enable xmlns=\"".concat(converse_smacks_Strophe.NS.SM, "\" resume=\"").concat(resume, "\"/>"));
+
+        _converse.api.send(stanza);
+
+        _converse.connection.flush();
+
+        await promise;
+      }
+    }
+
+    async function enableStreamManagement() {
+      if (!_converse.enable_smacks) {
+        return;
+      }
+
+      if (!(await isStreamManagementSupported())) {
+        return;
+      }
+
+      _converse.connection.addHandler(stanzaHandler);
+
+      _converse.connection.addHandler(sendAck, converse_smacks_Strophe.NS.SM, 'r');
+
+      _converse.connection.addHandler(handleAck, converse_smacks_Strophe.NS.SM, 'a');
+
+      if (_converse.session.get('smacks_stream_id')) {
+        await sendResumeStanza();
+      } else {
+        resetSessionData();
+      }
+    }
+
+    function onStanzaSent(stanza) {
+      if (!_converse.session) {
+        headless_log.warn('No _converse.session!');
+        return;
+      }
+
+      if (!_converse.session.get('smacks_enabled')) {
+        return;
+      }
+
+      if (converse_smacks_u.isTagEqual(stanza, 'iq') || converse_smacks_u.isTagEqual(stanza, 'presence') || converse_smacks_u.isTagEqual(stanza, 'message')) {
+        const stanza_string = converse_smacks_Strophe.serialize(stanza);
+
+        _converse.session.save('unacked_stanzas', (_converse.session.get('unacked_stanzas') || []).concat([stanza_string]));
+
+        const max_unacked = _converse.smacks_max_unacked_stanzas;
+
+        if (max_unacked > 0) {
+          const num = _converse.session.get('num_stanzas_since_last_ack') + 1;
+
+          if (num % max_unacked === 0) {
+            // Request confirmation of sent stanzas
+            _converse.api.send(converse_smacks_u.toStanza("<r xmlns=\"".concat(converse_smacks_Strophe.NS.SM, "\"/>")));
+          }
+
+          _converse.session.save({
+            'num_stanzas_since_last_ack': num
+          });
+        }
+      }
+    }
+
+    _converse.api.listen.on('userSessionInitialized', initSessionData);
+
+    _converse.api.listen.on('beforeResourceBinding', enableStreamManagement);
+
+    _converse.api.listen.on('afterResourceBinding', sendEnableStanza);
+
+    _converse.api.listen.on('send', onStanzaSent);
+  }
+
+});
+// EXTERNAL MODULE: ./src/headless/templates/vcard.html
+var templates_vcard = __webpack_require__(148);
+var vcard_default = /*#__PURE__*/__webpack_require__.n(templates_vcard);
+
+// CONCATENATED MODULE: ./src/headless/converse-vcard.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-vcard
+ */
+
+
+
+
+
+const {
+  Backbone: converse_vcard_Backbone,
+  Strophe: converse_vcard_Strophe,
+  $iq: converse_vcard_$iq,
+  dayjs: converse_vcard_dayjs
+} = converse_core.env;
+const converse_vcard_u = converse_core.env.utils;
+converse_core.plugins.add('converse-vcard', {
+  dependencies: ["converse-status", "converse-roster"],
+  overrides: {
+    XMPPStatus: {
+      getNickname() {
+        const {
+          _converse
+        } = this.__super__;
+
+        const nick = this.__super__.getNickname.apply(this);
+
+        if (!nick && _converse.xmppstatus.vcard) {
+          return _converse.xmppstatus.vcard.get('nickname');
+        } else {
+          return nick;
+        }
+      },
+
+      getFullname() {
+        const {
+          _converse
+        } = this.__super__;
+
+        const fullname = this.__super__.getFullname.apply(this);
+
+        if (!fullname && _converse.xmppstatus.vcard) {
+          return _converse.xmppstatus.vcard.get('fullname');
+        } else {
+          return fullname;
+        }
+      }
+
+    },
+    RosterContact: {
+      getDisplayName() {
+        if (!this.get('nickname') && this.vcard) {
+          return this.vcard.getDisplayName();
+        } else {
+          return this.__super__.getDisplayName.apply(this);
+        }
+      },
+
+      getFullname() {
+        if (this.vcard) {
+          return this.vcard.get('fullname');
+        } else {
+          return this.__super__.getFullname.apply(this);
+        }
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+
+    _converse.api.promises.add('VCardsInitialized');
+
+    _converse.VCard = converse_vcard_Backbone.Model.extend({
+      defaults: {
+        'image': _converse.DEFAULT_IMAGE,
+        'image_type': _converse.DEFAULT_IMAGE_TYPE
+      },
+
+      set(key, val, options) {
+        // Override Backbone.Model.prototype.set to make sure that the
+        // default `image` and `image_type` values are maintained.
+        let attrs;
+
+        if (typeof key === 'object') {
+          attrs = key;
+          options = val;
+        } else {
+          (attrs = {})[key] = val;
+        }
+
+        if (Object(lodash["has"])(attrs, 'image') && !attrs['image']) {
+          attrs['image'] = _converse.DEFAULT_IMAGE;
+          attrs['image_type'] = _converse.DEFAULT_IMAGE_TYPE;
+          return converse_vcard_Backbone.Model.prototype.set.call(this, attrs, options);
+        } else {
+          return converse_vcard_Backbone.Model.prototype.set.apply(this, arguments);
+        }
+      },
+
+      getDisplayName() {
+        return this.get('nickname') || this.get('fullname') || this.get('jid');
+      }
+
+    });
+    _converse.VCards = _converse.Collection.extend({
+      model: _converse.VCard,
+
+      initialize() {
+        this.on('add', vcard => {
+          _converse.api.vcard.update(vcard);
+        });
+      }
+
+    });
+
+    async function onVCardData(jid, iq) {
+      const vcard = iq.querySelector('vCard');
+      let result = {};
+
+      if (vcard !== null) {
+        result = {
+          'stanza': iq,
+          'fullname': Object(lodash["get"])(vcard.querySelector('FN'), 'textContent'),
+          'nickname': Object(lodash["get"])(vcard.querySelector('NICKNAME'), 'textContent'),
+          'image': Object(lodash["get"])(vcard.querySelector('PHOTO BINVAL'), 'textContent'),
+          'image_type': Object(lodash["get"])(vcard.querySelector('PHOTO TYPE'), 'textContent'),
+          'url': Object(lodash["get"])(vcard.querySelector('URL'), 'textContent'),
+          'role': Object(lodash["get"])(vcard.querySelector('ROLE'), 'textContent'),
+          'email': Object(lodash["get"])(vcard.querySelector('EMAIL USERID'), 'textContent'),
+          'vcard_updated': new Date().toISOString(),
+          'vcard_error': undefined
+        };
+      }
+
+      if (result.image) {
+        const buffer = converse_vcard_u.base64ToArrayBuffer(result['image']);
+        const ab = await crypto.subtle.digest('SHA-1', buffer);
+        result['image_hash'] = converse_vcard_u.arrayBufferToHex(ab);
+      }
+
+      return result;
+    }
+
+    function createStanza(type, jid, vcard_el) {
+      const iq = converse_vcard_$iq(jid ? {
+        'type': type,
+        'to': jid
+      } : {
+        'type': type
+      });
+
+      if (!vcard_el) {
+        iq.c("vCard", {
+          'xmlns': converse_vcard_Strophe.NS.VCARD
+        });
+      } else {
+        iq.cnode(vcard_el);
+      }
+
+      return iq;
+    }
+
+    async function getVCard(_converse, jid) {
+      const to = converse_vcard_Strophe.getBareJidFromJid(jid) === _converse.bare_jid ? null : jid;
+      let iq;
+
+      try {
+        iq = await _converse.api.sendIQ(createStanza("get", to));
+      } catch (iq) {
+        return {
+          'stanza': iq,
+          'jid': jid,
+          'vcard_error': new Date().toISOString()
+        };
+      }
+
+      return onVCardData(jid, iq);
+    }
+
+    async function setVCardOnModel(model) {
+      let jid;
+
+      if (model instanceof _converse.Message) {
+        if (model.get('type') === 'error') {
+          return;
+        }
+
+        jid = model.get('from');
+      } else {
+        jid = model.get('jid');
+      }
+
+      await _converse.api.waitUntil('VCardsInitialized');
+      model.vcard = _converse.vcards.findWhere({
+        'jid': jid
+      });
+
+      if (!model.vcard) {
+        model.vcard = _converse.vcards.create({
+          'jid': jid
+        });
+      }
+
+      model.vcard.on('change', () => model.trigger('vcard:change'));
+    }
+
+    function getVCardForChatroomOccupant(message) {
+      const chatbox = Object(lodash["get"])(message, 'collection.chatbox');
+      const nick = converse_vcard_Strophe.getResourceFromJid(message.get('from'));
+
+      if (chatbox && chatbox.get('nick') === nick) {
+        return _converse.xmppstatus.vcard;
+      } else {
+        const jid = message.occupant && message.occupant.get('jid') || message.get('from');
+
+        if (jid) {
+          return _converse.vcards.findWhere({
+            jid
+          }) || _converse.vcards.create({
+            jid
+          });
+        } else {
+          headless_log.error("Could not assign VCard for message because no JID found! msgid: ".concat(message.get('msgid')));
+          return;
+        }
+      }
+    }
+
+    async function setVCardOnMUCMessage(message) {
+      await _converse.api.waitUntil('VCardsInitialized');
+
+      if (['error', 'info'].includes(message.get('type'))) {
+        return;
+      } else {
+        message.vcard = getVCardForChatroomOccupant(message);
+      }
+    }
+
+    _converse.initVCardCollection = async function () {
+      _converse.vcards = new _converse.VCards();
+      _converse.vcards.browserStorage = _converse.createStore("".concat(_converse.bare_jid, "-converse.vcards"));
+      await new Promise(resolve => {
+        _converse.vcards.fetch({
+          'success': resolve,
+          'error': resolve
+        }, {
+          'silent': true
+        });
+      });
+      const vcards = _converse.vcards;
+
+      if (_converse.session) {
+        const jid = _converse.session.get('bare_jid');
+
+        _converse.xmppstatus.vcard = vcards.findWhere({
+          'jid': jid
+        }) || vcards.create({
+          'jid': jid
+        });
+      }
+      /**
+       * Triggered as soon as the `_converse.vcards` collection has been initialized and populated from cache.
+       * @event _converse#VCardsInitialized
+       */
+
+
+      _converse.api.trigger('VCardsInitialized');
+    };
+
+    function clearVCardsSession() {
+      if (_converse.shouldClearCache()) {
+        _converse.api.promises.add('VCardsInitialized');
+
+        if (_converse.vcards) {
+          _converse.vcards.clearSession();
+
+          delete _converse.vcards;
+        }
+      }
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('chatBoxInitialized', m => setVCardOnModel(m));
+
+    _converse.api.listen.on('chatRoomInitialized', m => setVCardOnModel(m));
+
+    _converse.api.listen.on('chatRoomMessageInitialized', m => setVCardOnMUCMessage(m));
+
+    _converse.api.listen.on('addClientFeatures', () => _converse.api.disco.own.features.add(converse_vcard_Strophe.NS.VCARD));
+
+    _converse.api.listen.on('clearSession', () => clearVCardsSession());
+
+    _converse.api.listen.on('messageInitialized', m => setVCardOnModel(m));
+
+    _converse.api.listen.on('rosterContactInitialized', m => setVCardOnModel(m));
+
+    _converse.api.listen.on('statusInitialized', _converse.initVCardCollection);
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The XEP-0054 VCard API
+       *
+       * This API lets you access and update user VCards
+       *
+       * @namespace _converse.api.vcard
+       * @memberOf _converse.api
+       */
+      'vcard': {
+        /**
+         * Enables setting new values for a VCard.
+         *
+         * @method _converse.api.vcard.set
+         * @param {string} jid The JID for which the VCard should be set
+         * @param {object} data A map of VCard keys and values
+         * @example
+         * _converse.api.vcard.set({
+         *     'jid': _converse.bare_jid,
+         *     'fn': 'John Doe',
+         *     'nickname': 'jdoe'
+         * }).then(() => {
+         *     // Succes
+         * }).catch(() => {
+         *     // Failure
+         * }).
+         */
+        set(jid, data) {
+          if (!jid) {
+            throw Error("No jid provided for the VCard data");
+          }
+
+          const vcard_el = converse_vcard_Strophe.xmlHtmlNode(vcard_default()(data)).firstElementChild;
+          return _converse.api.sendIQ(createStanza("set", jid, vcard_el));
+        },
+
+        /**
+         * @method _converse.api.vcard.get
+         * @param {Backbone.Model|string} model Either a `Backbone.Model` instance, or a string JID.
+         *     If a `Backbone.Model` instance is passed in, then it must have either a `jid`
+         *     attribute or a `muc_jid` attribute.
+         * @param {boolean} [force] A boolean indicating whether the vcard should be
+         *     fetched even if it's been fetched before.
+         * @returns {promise} A Promise which resolves with the VCard data for a particular JID or for
+         *     a `Backbone.Model` instance which represents an entity with a JID (such as a roster contact,
+         *     chat or chatroom occupant).
+         *
+         * @example
+         * _converse.api.waitUntil('rosterContactsFetched').then(() => {
+         *     _converse.api.vcard.get('someone@example.org').then(
+         *         (vcard) => {
+         *             // Do something with the vcard...
+         *         }
+         *     );
+         * });
+         */
+        get(model, force) {
+          if (Object(lodash["isString"])(model)) {
+            return getVCard(_converse, model);
+          } else if (force || !model.get('vcard_updated') || !converse_vcard_dayjs(model.get('vcard_error')).isSame(new Date(), "day")) {
+            const jid = model.get('jid');
+
+            if (!jid) {
+              throw new Error("No JID to get vcard for!");
+            }
+
+            return getVCard(_converse, jid);
+          } else {
+            return Promise.resolve({});
+          }
+        },
+
+        /**
+         * Fetches the VCard associated with a particular `Backbone.Model` instance
+         * (by using its `jid` or `muc_jid` attribute) and then updates the model with the
+         * returned VCard data.
+         *
+         * @method _converse.api.vcard.update
+         * @param {Backbone.Model} model A `Backbone.Model` instance
+         * @param {boolean} [force] A boolean indicating whether the vcard should be
+         *     fetched again even if it's been fetched before.
+         * @returns {promise} A promise which resolves once the update has completed.
+         * @example
+         * _converse.api.waitUntil('rosterContactsFetched').then(async () => {
+         *     const chatbox = await _converse.chatboxes.getChatBox('someone@example.org');
+         *     _converse.api.vcard.update(chatbox);
+         * });
+         */
+        async update(model, force) {
+          const data = await this.get(model, force);
+          delete data['stanza'];
+          model.save(data);
+        }
+
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/headless/headless.js
+/* START: Removable components
+ * --------------------
+ * Any of the following components may be removed if they're not needed.
+ */
+ // XEP-0199 XMPP Ping
+
+ // XEP-0206 BOSH
+
+ // XEP-0115 Entity Capabilities
+
+ // Backbone Collection and Models for chat boxes
+
+ // Support for one-on-one chats
+
+ // XEP-0030 Service discovery
+
+ // XEP-0313 Message Archive Management
+
+ // XEP-0045 Multi-user chat
+
+ // Support for headline messages
+
+ // XEP-0199 XMPP Ping
+
+ // XEP-0060 Pubsub
+
+ // Contacts Roster
+
+ // XEP-0059 Result Set management
+
+ // XEP-0198 Stream Management
+
+ // XEP-0199 XMPP Ping
+
+ // XEP-0054 VCard-temp
+
+/* END: Removable components */
+
+
+/* harmony default export */ var headless = (converse_core);
+// CONCATENATED MODULE: ./src/converse-autocomplete.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-autocomplete
+ * @description
+ * Converse.js plugin which started as a fork of Lea Verou's Awesomplete
+ * https://leaverou.github.io/awesomplete/
+ */
+
+const {
+  _: converse_autocomplete_,
+  Backbone: converse_autocomplete_Backbone
+} = converse_core.env,
+      converse_autocomplete_u = converse_core.env.utils;
+converse_core.plugins.add("converse-autocomplete", {
+  initialize() {
+    const {
+      _converse
+    } = this;
+
+    _converse.FILTER_CONTAINS = function (text, input) {
+      return RegExp(helpers.regExpEscape(input.trim()), "i").test(text);
+    };
+
+    _converse.FILTER_STARTSWITH = function (text, input) {
+      return RegExp("^" + helpers.regExpEscape(input.trim()), "i").test(text);
+    };
+
+    const SORT_BYLENGTH = function SORT_BYLENGTH(a, b) {
+      if (a.length !== b.length) {
+        return a.length - b.length;
+      }
+
+      return a < b ? -1 : 1;
+    };
+
+    const ITEM = (text, input) => {
+      input = input.trim();
+      const element = document.createElement("li");
+      element.setAttribute("aria-selected", "false");
+      const regex = new RegExp("(" + input + ")", "ig");
+      const parts = input ? text.split(regex) : [text];
+      parts.forEach(txt => {
+        if (input && txt.match(regex)) {
+          const match = document.createElement("mark");
+          match.textContent = txt;
+          element.appendChild(match);
+        } else {
+          element.appendChild(document.createTextNode(txt));
+        }
+      });
+      return element;
+    };
+
+    class Suggestion extends String {
+      constructor(data) {
+        super();
+        const o = Array.isArray(data) ? {
+          label: data[0],
+          value: data[1]
+        } : typeof data === "object" && "label" in data && "value" in data ? data : {
+          label: data,
+          value: data
+        };
+        this.label = o.label || o.value;
+        this.value = o.value;
+      }
+
+      get lenth() {
+        return this.label.length;
+      }
+
+      toString() {
+        return "" + this.label;
+      }
+
+      valueOf() {
+        return this.toString();
+      }
+
+    }
+
+    class AutoComplete {
+      constructor(el) {
+        let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+        this.is_opened = false;
+
+        if (converse_autocomplete_u.hasClass('.suggestion-box', el)) {
+          this.container = el;
+        } else {
+          this.container = el.querySelector('.suggestion-box');
+        }
+
+        this.input = this.container.querySelector('.suggestion-box__input');
+        this.input.setAttribute("aria-autocomplete", "list");
+        this.ul = this.container.querySelector('.suggestion-box__results');
+        this.status = this.container.querySelector('.suggestion-box__additions');
+
+        converse_autocomplete_.assignIn(this, {
+          'match_current_word': false,
+          // Match only the current word, otherwise all input is matched
+          'ac_triggers': [],
+          // Array of keys (`ev.key`) values that will trigger auto-complete
+          'include_triggers': [],
+          // Array of trigger keys which should be included in the returned value
+          'min_chars': 2,
+          'max_items': 10,
+          'auto_evaluate': true,
+          // Should evaluation happen automatically without any particular key as trigger?
+          'auto_first': false,
+          // Should the first element be automatically selected?
+          'data': converse_autocomplete_.identity,
+          'filter': _converse.FILTER_CONTAINS,
+          'sort': config.sort === false ? false : SORT_BYLENGTH,
+          'item': ITEM
+        }, config);
+
+        this.index = -1;
+        this.bindEvents();
+
+        if (this.input.hasAttribute("list")) {
+          this.list = "#" + this.input.getAttribute("list");
+          this.input.removeAttribute("list");
+        } else {
+          this.list = this.input.getAttribute("data-list") || config.list || [];
+        }
+      }
+
+      bindEvents() {
+        // Bind events
+        const input = {
+          "blur": () => this.close({
+            'reason': 'blur'
+          })
+        };
+
+        if (this.auto_evaluate) {
+          input["input"] = () => this.evaluate();
+        }
+
+        this._events = {
+          'input': input,
+          'form': {
+            "submit": () => this.close({
+              'reason': 'submit'
+            })
+          },
+          'ul': {
+            "mousedown": ev => this.onMouseDown(ev),
+            "mouseover": ev => this.onMouseOver(ev)
+          }
+        };
+        helpers.bind(this.input, this._events.input);
+        helpers.bind(this.input.form, this._events.form);
+        helpers.bind(this.ul, this._events.ul);
+      }
+
+      set list(list) {
+        if (Array.isArray(list) || typeof list === "function") {
+          this._list = list;
+        } else if (typeof list === "string" && converse_autocomplete_.includes(list, ",")) {
+          this._list = list.split(/\s*,\s*/);
+        } else {
+          // Element or CSS selector
+          list = helpers.getElement(list);
+
+          if (list && list.children) {
+            const items = [];
+            Array.prototype.slice.apply(list.children).forEach(function (el) {
+              if (!el.disabled) {
+                const text = el.textContent.trim(),
+                      value = el.value || text,
+                      label = el.label || text;
+
+                if (value !== "") {
+                  items.push({
+                    label: label,
+                    value: value
+                  });
+                }
+              }
+            });
+            this._list = items;
+          }
+        }
+
+        if (document.activeElement === this.input) {
+          this.evaluate();
+        }
+      }
+
+      get selected() {
+        return this.index > -1;
+      }
+
+      get opened() {
+        return this.is_opened;
+      }
+
+      close(o) {
+        if (!this.opened) {
+          return;
+        }
+
+        this.ul.setAttribute("hidden", "");
+        this.is_opened = false;
+        this.index = -1;
+        this.trigger("suggestion-box-close", o || {});
+      }
+
+      insertValue(suggestion) {
+        if (this.match_current_word) {
+          converse_autocomplete_u.replaceCurrentWord(this.input, suggestion.value);
+        } else {
+          this.input.value = suggestion.value;
+        }
+      }
+
+      open() {
+        this.ul.removeAttribute("hidden");
+        this.is_opened = true;
+
+        if (this.auto_first && this.index === -1) {
+          this.goto(0);
+        }
+
+        this.trigger("suggestion-box-open");
+      }
+
+      destroy() {
+        //remove events from the input and its form
+        helpers.unbind(this.input, this._events.input);
+        helpers.unbind(this.input.form, this._events.form);
+        this.input.removeAttribute("aria-autocomplete");
+      }
+
+      next() {
+        const count = this.ul.children.length;
+        this.goto(this.index < count - 1 ? this.index + 1 : count ? 0 : -1);
+      }
+
+      previous() {
+        const count = this.ul.children.length,
+              pos = this.index - 1;
+        this.goto(this.selected && pos !== -1 ? pos : count - 1);
+      }
+
+      goto(i) {
+        // Should not be used directly, highlights specific item without any checks!
+        const list = this.ul.children;
+
+        if (this.selected) {
+          list[this.index].setAttribute("aria-selected", "false");
+        }
+
+        this.index = i;
+
+        if (i > -1 && list.length > 0) {
+          list[i].setAttribute("aria-selected", "true");
+          list[i].focus();
+          this.status.textContent = list[i].textContent; // scroll to highlighted element in case parent's height is fixed
+
+          this.ul.scrollTop = list[i].offsetTop - this.ul.clientHeight + list[i].clientHeight;
+          this.trigger("suggestion-box-highlight", {
+            'text': this.suggestions[this.index]
+          });
+        }
+      }
+
+      select(selected) {
+        if (selected) {
+          this.index = converse_autocomplete_u.siblingIndex(selected);
+        } else {
+          selected = this.ul.children[this.index];
+        }
+
+        if (selected) {
+          const suggestion = this.suggestions[this.index];
+          this.insertValue(suggestion);
+          this.close({
+            'reason': 'select'
+          });
+          this.auto_completing = false;
+          this.trigger("suggestion-box-selectcomplete", {
+            'text': suggestion
+          });
+        }
+      }
+
+      onMouseOver(ev) {
+        const li = converse_autocomplete_u.ancestor(ev.target, 'li');
+
+        if (li) {
+          this.goto(Array.prototype.slice.call(this.ul.children).indexOf(li));
+        }
+      }
+
+      onMouseDown(ev) {
+        if (ev.button !== 0) {
+          return; // Only select on left click
+        }
+
+        const li = converse_autocomplete_u.ancestor(ev.target, 'li');
+
+        if (li) {
+          ev.preventDefault();
+          this.select(li, ev.target);
+        }
+      }
+
+      onKeyDown(ev) {
+        if (this.opened) {
+          if (converse_autocomplete_.includes([converse_core.keycodes.ENTER, converse_core.keycodes.TAB], ev.keyCode) && this.selected) {
+            ev.preventDefault();
+            ev.stopPropagation();
+            this.select();
+            return true;
+          } else if (ev.keyCode === converse_core.keycodes.ESCAPE) {
+            this.close({
+              'reason': 'esc'
+            });
+            return true;
+          } else if (converse_autocomplete_.includes([converse_core.keycodes.UP_ARROW, converse_core.keycodes.DOWN_ARROW], ev.keyCode)) {
+            ev.preventDefault();
+            ev.stopPropagation();
+            this[ev.keyCode === converse_core.keycodes.UP_ARROW ? "previous" : "next"]();
+            return true;
+          }
+        }
+
+        if (converse_autocomplete_.includes([converse_core.keycodes.SHIFT, converse_core.keycodes.META, converse_core.keycodes.META_RIGHT, converse_core.keycodes.ESCAPE, converse_core.keycodes.ALT], ev.keyCode)) {
+          return;
+        }
+
+        if (this.ac_triggers.includes(ev.key)) {
+          if (ev.key === "Tab") {
+            ev.preventDefault();
+          }
+
+          this.auto_completing = true;
+        } else if (ev.key === "Backspace") {
+          const word = converse_autocomplete_u.getCurrentWord(ev.target, ev.target.selectionEnd - 1);
+
+          if (this.ac_triggers.includes(word[0])) {
+            this.auto_completing = true;
+          }
+        }
+      }
+
+      evaluate(ev) {
+        const selecting = this.selected && ev && (ev.keyCode === converse_core.keycodes.UP_ARROW || ev.keyCode === converse_core.keycodes.DOWN_ARROW);
+
+        if (!this.auto_evaluate && !this.auto_completing || selecting) {
+          return;
+        }
+
+        const list = typeof this._list === "function" ? this._list() : this._list;
+
+        if (list.length === 0) {
+          return;
+        }
+
+        let value = this.match_current_word ? converse_autocomplete_u.getCurrentWord(this.input) : this.input.value;
+        const contains_trigger = this.ac_triggers.includes(value[0]);
+
+        if (contains_trigger) {
+          this.auto_completing = true;
+
+          if (!this.include_triggers.includes(ev.key)) {
+            value = value.slice('1');
+          }
+        }
+
+        if ((contains_trigger || value.length) && value.length >= this.min_chars) {
+          this.index = -1; // Populate list with options that match
+
+          this.ul.innerHTML = "";
+          this.suggestions = list.map(item => new Suggestion(this.data(item, value))).filter(item => this.filter(item, value));
+
+          if (this.sort !== false) {
+            this.suggestions = this.suggestions.sort(this.sort);
+          }
+
+          this.suggestions = this.suggestions.slice(0, this.max_items);
+          this.suggestions.forEach(text => this.ul.appendChild(this.item(text, value)));
+
+          if (this.ul.children.length === 0) {
+            this.close({
+              'reason': 'nomatches'
+            });
+          } else {
+            this.open();
+          }
+        } else {
+          this.close({
+            'reason': 'nomatches'
+          });
+
+          if (!contains_trigger) {
+            this.auto_completing = false;
+          }
+        }
+      }
+
+    } // Make it an event emitter
+
+
+    Object.assign(AutoComplete.prototype, converse_autocomplete_Backbone.Events);
+    const helpers = {
+      getElement(expr, el) {
+        return typeof expr === "string" ? (el || document).querySelector(expr) : expr || null;
+      },
+
+      bind(element, o) {
+        if (element) {
+          for (var event in o) {
+            if (!Object.prototype.hasOwnProperty.call(o, event)) {
+              continue;
+            }
+
+            const callback = o[event];
+            event.split(/\s+/).forEach(event => element.addEventListener(event, callback));
+          }
+        }
+      },
+
+      unbind(element, o) {
+        if (element) {
+          for (var event in o) {
+            if (!Object.prototype.hasOwnProperty.call(o, event)) {
+              continue;
+            }
+
+            const callback = o[event];
+            event.split(/\s+/).forEach(event => element.removeEventListener(event, callback));
+          }
+        }
+      },
+
+      regExpEscape(s) {
+        return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&");
+      }
+
+    };
+    _converse.AutoComplete = AutoComplete;
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/bookmarks_list.html
+var bookmarks_list = __webpack_require__(149);
+var bookmarks_list_default = /*#__PURE__*/__webpack_require__.n(bookmarks_list);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_bookmark_form.html
+var chatroom_bookmark_form = __webpack_require__(150);
+var chatroom_bookmark_form_default = /*#__PURE__*/__webpack_require__.n(chatroom_bookmark_form);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_bookmark_toggle.html
+var chatroom_bookmark_toggle = __webpack_require__(151);
+var chatroom_bookmark_toggle_default = /*#__PURE__*/__webpack_require__.n(chatroom_bookmark_toggle);
+
+// CONCATENATED MODULE: ./src/converse-bookmark-views.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-bookmark-views
+ * @description
+ * Converse.js plugin which adds views for XEP-0048 bookmarks
+ */
+
+
+
+
+
+
+const {
+  Backbone: converse_bookmark_views_Backbone,
+  Strophe: converse_bookmark_views_Strophe,
+  _: converse_bookmark_views_
+} = converse_core.env;
+const converse_bookmark_views_u = converse_core.env.utils;
+converse_core.plugins.add('converse-bookmark-views', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chatboxes", "converse-muc", "converse-muc-views"],
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    ChatRoomView: {
+      events: {
+        'click .toggle-bookmark': 'toggleBookmark'
+      },
+
+      async renderHeading() {
+        this.__super__.renderHeading.apply(this, arguments);
+
+        const {
+          _converse
+        } = this.__super__;
+
+        if (_converse.allow_bookmarks) {
+          const supported = await _converse.checkBookmarksSupport();
+
+          if (supported) {
+            this.renderBookmarkToggle();
+          }
+        }
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse; // Configuration values for this plugin
+    // ====================================
+    // Refer to docs/source/configuration.rst for explanations of these
+    // configuration settings.
+
+    _converse.api.settings.update({
+      hide_open_bookmarks: true,
+      muc_respect_autojoin: true
+    });
+
+    Object.assign(_converse, {
+      removeBookmarkViaEvent(ev) {
+        /* Remove a bookmark as determined by the passed in
+         * event.
+         */
+        ev.preventDefault();
+        const name = ev.target.getAttribute('data-bookmark-name');
+        const jid = ev.target.getAttribute('data-room-jid');
+
+        if (confirm(__("Are you sure you want to remove the bookmark \"%1$s\"?", name))) {
+          converse_bookmark_views_.invokeMap(_converse.bookmarks.where({
+            'jid': jid
+          }), converse_bookmark_views_Backbone.Model.prototype.destroy);
+        }
+      },
+
+      addBookmarkViaEvent(ev) {
+        /* Add a bookmark as determined by the passed in
+         * event.
+         */
+        ev.preventDefault();
+        const jid = ev.target.getAttribute('data-room-jid');
+
+        _converse.api.rooms.open(jid, {
+          'bring_to_foreground': true
+        });
+
+        _converse.chatboxviews.get(jid).renderBookmarkForm();
+      }
+
+    });
+    const bookmarkableChatRoomView = {
+      renderBookmarkToggle() {
+        if (this.el.querySelector('.chat-head .toggle-bookmark')) {
+          return;
+        }
+
+        const {
+          _converse
+        } = this.__super__,
+              {
+          __
+        } = _converse;
+        const bookmark_button = chatroom_bookmark_toggle_default()(converse_bookmark_views_.assignIn(this.model.toJSON(), {
+          'info_toggle_bookmark': this.model.get('bookmarked') ? __('Unbookmark this groupchat') : __('Bookmark this groupchat'),
+          'bookmarked': this.model.get('bookmarked')
+        }));
+        const buttons_row = this.el.querySelector('.chatbox-buttons');
+        const close_button = buttons_row.querySelector('.close-chatbox-button');
+
+        if (close_button) {
+          close_button.insertAdjacentHTML('afterend', bookmark_button);
+        } else {
+          buttons_row.insertAdjacentHTML('beforeEnd', bookmark_button);
+        }
+      },
+
+      setBookmarkState() {
+        /* Set whether the groupchat is bookmarked or not.
+         */
+        if (_converse.bookmarks !== undefined) {
+          const models = _converse.bookmarks.where({
+            'jid': this.model.get('jid')
+          });
+
+          if (!models.length) {
+            this.model.save('bookmarked', false);
+          } else {
+            this.model.save('bookmarked', true);
+          }
+        }
+      },
+
+      renderBookmarkForm() {
+        this.hideChatRoomContents();
+
+        if (!this.bookmark_form) {
+          this.bookmark_form = new _converse.MUCBookmarkForm({
+            'model': this.model,
+            'chatroomview': this
+          });
+          const container_el = this.el.querySelector('.chatroom-body');
+          container_el.insertAdjacentElement('beforeend', this.bookmark_form.el);
+        }
+
+        converse_bookmark_views_u.showElement(this.bookmark_form.el);
+      },
+
+      toggleBookmark(ev) {
+        if (ev) {
+          ev.preventDefault();
+          ev.stopPropagation();
+        }
+
+        const models = _converse.bookmarks.where({
+          'jid': this.model.get('jid')
+        });
+
+        if (!models.length) {
+          this.renderBookmarkForm();
+        } else {
+          models.forEach(model => model.destroy());
+        }
+      }
+
+    };
+    Object.assign(_converse.ChatRoomView.prototype, bookmarkableChatRoomView);
+    _converse.MUCBookmarkForm = converse_bookmark_views_Backbone.VDOMView.extend({
+      className: 'muc-bookmark-form',
+      events: {
+        'submit form': 'onBookmarkFormSubmitted',
+        'click .button-cancel': 'closeBookmarkForm'
+      },
+
+      initialize(attrs) {
+        this.chatroomview = attrs.chatroomview;
+        this.render();
+      },
+
+      toHTML() {
+        return chatroom_bookmark_form_default()({
+          'default_nick': this.model.get('nick'),
+          'heading': __('Bookmark this groupchat'),
+          'label_autojoin': __('Would you like this groupchat to be automatically joined upon startup?'),
+          'label_cancel': __('Cancel'),
+          'label_name': __('The name for this bookmark:'),
+          'label_nick': __('What should your nickname for this groupchat be?'),
+          'label_submit': __('Save'),
+          'name': this.model.get('name')
+        });
+      },
+
+      onBookmarkFormSubmitted(ev) {
+        ev.preventDefault();
+
+        _converse.bookmarks.createBookmark({
+          'jid': this.model.get('jid'),
+          'autojoin': converse_bookmark_views_.get(ev.target.querySelector('input[name="autojoin"]'), 'checked') || false,
+          'name': converse_bookmark_views_.get(ev.target.querySelector('input[name=name]'), 'value'),
+          'nick': converse_bookmark_views_.get(ev.target.querySelector('input[name=nick]'), 'value')
+        });
+
+        this.closeBookmarkForm(ev);
+      },
+
+      closeBookmarkForm(ev) {
+        ev.preventDefault();
+        this.chatroomview.closeForm();
+      }
+
+    });
+    _converse.BookmarksView = converse_bookmark_views_Backbone.VDOMView.extend({
+      tagName: 'div',
+      className: 'bookmarks-list list-container rooms-list-container',
+      events: {
+        'click .add-bookmark': 'addBookmark',
+        'click .bookmarks-toggle': 'toggleBookmarksList',
+        'click .remove-bookmark': 'removeBookmark',
+        'click .open-room': 'openRoom'
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'add', this.render);
+        this.listenTo(this.model, 'remove', this.render);
+        this.listenTo(_converse.chatboxes, 'add', this.render);
+        this.listenTo(_converse.chatboxes, 'remove', this.render);
+        const id = "converse.room-bookmarks".concat(_converse.bare_jid, "-list-model");
+        this.list_model = new _converse.BookmarksList({
+          id
+        });
+        this.list_model.browserStorage = _converse.createStore(id);
+
+        const render = () => {
+          this.render();
+          this.insertIntoControlBox();
+        };
+
+        this.list_model.fetch({
+          'success': render,
+          'error': render
+        });
+      },
+
+      toHTML() {
+        return bookmarks_list_default()({
+          '_converse': _converse,
+          'bookmarks': this.model,
+          'desc_bookmarks': __('Click to toggle the bookmarks list'),
+          'info_leave_room': __('Leave this groupchat'),
+          'info_remove': __('Remove this bookmark'),
+          'info_remove_bookmark': __('Unbookmark this groupchat'),
+          'info_title': __('Show more information on this groupchat'),
+          'label_bookmarks': __('Bookmarks'),
+          'open_title': __('Click to open this groupchat'),
+          'toggle_state': this.list_model.get('toggle-state'),
+          'is_bookmark_hidden': b => {
+            return !!(_converse.hide_open_bookmarks && _converse.chatboxes.get(b.get('jid')));
+          },
+          'hidden': this.model.getUnopenedBookmarks().length && true
+        });
+      },
+
+      insertIntoControlBox() {
+        const controlboxview = _converse.chatboxviews.get('controlbox');
+
+        if (controlboxview !== undefined && !converse_bookmark_views_u.rootContains(_converse.root, this.el)) {
+          const el = controlboxview.el.querySelector('.list-container--bookmarks');
+          el && el.parentNode.replaceChild(this.el, el);
+        }
+      },
+
+      openRoom(ev) {
+        ev.preventDefault();
+        const name = ev.target.textContent;
+        const jid = ev.target.getAttribute('data-room-jid');
+        const data = {
+          'name': name || converse_bookmark_views_Strophe.unescapeNode(converse_bookmark_views_Strophe.getNodeFromJid(jid)) || jid
+        };
+
+        _converse.api.rooms.open(jid, data, true);
+      },
+
+      removeBookmark: _converse.removeBookmarkViaEvent,
+      addBookmark: _converse.addBookmarkViaEvent,
+
+      toggleBookmarksList(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const icon_el = ev.target.matches('.fa') ? ev.target : ev.target.querySelector('.fa');
+
+        if (converse_bookmark_views_u.hasClass('fa-caret-down', icon_el)) {
+          converse_bookmark_views_u.slideIn(this.el.querySelector('.bookmarks'));
+          this.list_model.save({
+            'toggle-state': _converse.CLOSED
+          });
+          icon_el.classList.remove("fa-caret-down");
+          icon_el.classList.add("fa-caret-right");
+        } else {
+          icon_el.classList.remove("fa-caret-right");
+          icon_el.classList.add("fa-caret-down");
+          converse_bookmark_views_u.slideOut(this.el.querySelector('.bookmarks'));
+          this.list_model.save({
+            'toggle-state': _converse.OPENED
+          });
+        }
+      }
+
+    });
+    /************************ BEGIN Event Handlers ************************/
+
+    const initBookmarkViews = async function initBookmarkViews() {
+      await _converse.api.waitUntil('roomsPanelRendered');
+      _converse.bookmarksview = new _converse.BookmarksView({
+        'model': _converse.bookmarks
+      });
+      /**
+       * Triggered once the _converse.Bookmarks collection and _converse.BookmarksView view
+       * has been created and cached bookmarks have been fetched.
+       * @event _converse#bookmarkViewsInitialized
+       * @example _converse.api.listen.on('bookmarkViewsInitialized', () => { ... });
+       */
+
+      _converse.api.trigger('bookmarkViewsInitialized');
+    };
+
+    _converse.api.listen.on('bookmarksInitialized', initBookmarkViews);
+
+    _converse.api.listen.on('chatRoomViewInitialized', view => view.setBookmarkState());
+    /************************ END Event Handlers ************************/
+
+  }
+
+});
+// EXTERNAL MODULE: ./node_modules/formdata-polyfill/FormData.js
+var formdata_polyfill_FormData = __webpack_require__(39);
+
+// EXTERNAL MODULE: ./src/templates/converse_brand_heading.html
+var converse_brand_heading = __webpack_require__(152);
+var converse_brand_heading_default = /*#__PURE__*/__webpack_require__.n(converse_brand_heading);
+
+// EXTERNAL MODULE: ./src/templates/controlbox.html
+var controlbox = __webpack_require__(153);
+var controlbox_default = /*#__PURE__*/__webpack_require__.n(controlbox);
+
+// EXTERNAL MODULE: ./src/templates/controlbox_toggle.html
+var controlbox_toggle = __webpack_require__(154);
+var controlbox_toggle_default = /*#__PURE__*/__webpack_require__.n(controlbox_toggle);
+
+// EXTERNAL MODULE: ./src/templates/login_panel.html
+var login_panel = __webpack_require__(155);
+var login_panel_default = /*#__PURE__*/__webpack_require__.n(login_panel);
+
+// CONCATENATED MODULE: ./src/converse-controlbox.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-controlbox
+ */
+
+
+
+
+
+
+
+
+
+
+const {
+  Strophe: converse_controlbox_Strophe,
+  Backbone: converse_controlbox_Backbone,
+  dayjs: converse_controlbox_dayjs
+} = converse_core.env;
+const converse_controlbox_u = converse_core.env.utils;
+const CONNECTION_STATUS_CSS_CLASS = {
+  'Error': 'error',
+  'Connecting': 'info',
+  'Connection failure': 'error',
+  'Authenticating': 'info',
+  'Authentication failure': 'error',
+  'Connected': 'info',
+  'Disconnected': 'error',
+  'Disconnecting': 'warn',
+  'Attached': 'info',
+  'Redirect': 'info',
+  'Reconnecting': 'warn'
+};
+const PRETTY_CONNECTION_STATUS = {
+  0: 'Error',
+  1: 'Connecting',
+  2: 'Connection failure',
+  3: 'Authenticating',
+  4: 'Authentication failure',
+  5: 'Connected',
+  6: 'Disconnected',
+  7: 'Disconnecting',
+  8: 'Attached',
+  9: 'Redirect',
+  10: 'Reconnecting'
+};
+const REPORTABLE_STATUSES = [0, // ERROR'
+1, // CONNECTING
+2, // CONNFAIL
+3, // AUTHENTICATING
+4, // AUTHFAIL
+7, // DISCONNECTING
+10 // RECONNECTING
+];
+converse_core.plugins.add('converse-controlbox', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-modal", "converse-chatboxes", "converse-chat", "converse-rosterview", "converse-chatview"],
+
+  enabled(_converse) {
+    return !_converse.singleton;
+  },
+
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // New functions which don't exist yet can also be added.
+    ChatBoxes: {
+      model(attrs, options) {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (attrs && attrs.id == 'controlbox') {
+          return new _converse.ControlBox(attrs, options);
+        } else {
+          return this.__super__.model.apply(this, arguments);
+        }
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      allow_logout: true,
+      default_domain: undefined,
+      locked_domain: undefined,
+      show_controlbox_by_default: false,
+      sticky_controlbox: false
+    });
+
+    _converse.api.promises.add('controlBoxInitialized');
+
+    _converse.ControlBox = _converse.ChatBox.extend({
+      defaults() {
+        return {
+          'bookmarked': false,
+          'box_id': 'controlbox',
+          'chat_state': undefined,
+          'closed': !_converse.show_controlbox_by_default,
+          'num_unread': 0,
+          'time_opened': this.get('time_opened') || new Date().getTime(),
+          'type': _converse.CONTROLBOX_TYPE,
+          'url': ''
+        };
+      },
+
+      initialize() {
+        if (this.get('id') === 'controlbox') {
+          this.set({
+            'time_opened': converse_controlbox_dayjs(0).valueOf()
+          });
+        } else {
+          _converse.ChatBox.prototype.initialize.apply(this, arguments);
+        }
+      },
+
+      validate(attrs) {
+        if (attrs.type === _converse.CONTROLBOX_TYPE) {
+          if (_converse.view_mode === 'embedded' && _converse.singleton) {
+            return 'Controlbox not relevant in embedded view mode';
+          }
+
+          return;
+        }
+
+        return _converse.ChatBox.prototype.validate.call(this, attrs);
+      },
+
+      maybeShow(force) {
+        if (!force && this.get('id') === 'controlbox') {
+          // Must return the chatbox
+          return this;
+        }
+
+        return _converse.ChatBox.prototype.maybeShow.call(this, force);
+      },
+
+      onReconnection: function onReconnection() {}
+    });
+
+    function addControlBox() {
+      const m = new _converse.ControlBox({
+        'id': 'controlbox'
+      });
+      return _converse.chatboxes.add(m);
+    }
+
+    _converse.ControlBoxView = _converse.ChatBoxView.extend({
+      tagName: 'div',
+      className: 'chatbox',
+      id: 'controlbox',
+      events: {
+        'click a.close-chatbox-button': 'close'
+      },
+
+      initialize() {
+        if (_converse.controlboxtoggle === undefined) {
+          _converse.controlboxtoggle = new _converse.ControlBoxToggle();
+        }
+
+        _converse.controlboxtoggle.el.insertAdjacentElement('afterend', this.el);
+
+        this.listenTo(this.model, 'change:connected', this.onConnected);
+        this.listenTo(this.model, 'destroy', this.hide);
+        this.listenTo(this.model, 'hide', this.hide);
+        this.listenTo(this.model, 'show', this.show);
+        this.listenTo(this.model, 'change:closed', this.ensureClosedState);
+        this.render();
+        /**
+         * Triggered when the _converse.ControlBoxView has been initialized and therefore
+         * exists. The controlbox contains the login and register forms when the user is
+         * logged out and a list of the user's contacts and group chats when logged in.
+         * @event _converse#controlBoxInitialized
+         * @type { _converse.ControlBoxView }
+         * @example _converse.api.listen.on('controlBoxInitialized', view => { ... });
+         */
+
+        _converse.api.trigger('controlBoxInitialized', this);
+      },
+
+      render() {
+        if (this.model.get('connected')) {
+          if (this.model.get('closed') === undefined) {
+            this.model.set('closed', !_converse.show_controlbox_by_default);
+          }
+        }
+
+        this.el.innerHTML = controlbox_default()(Object.assign(this.model.toJSON()));
+
+        if (!this.model.get('closed')) {
+          this.show();
+        } else {
+          this.hide();
+        }
+
+        const connection = Object(lodash["get"])(_converse, 'connection', {});
+
+        if (!connection.connected || !connection.authenticated || connection.disconnecting) {
+          this.renderLoginPanel();
+        } else if (this.model.get('connected')) {
+          this.renderControlBoxPane();
+        }
+
+        return this;
+      },
+
+      onConnected() {
+        if (this.model.get('connected')) {
+          this.render();
+        }
+      },
+
+      createBrandHeadingHTML() {
+        return converse_brand_heading_default()({
+          'sticky_controlbox': _converse.sticky_controlbox
+        });
+      },
+
+      insertBrandHeading() {
+        const heading_el = this.el.querySelector('.brand-heading-container');
+
+        if (heading_el === null) {
+          const el = this.el.querySelector('.controlbox-head');
+          el.insertAdjacentHTML('beforeend', this.createBrandHeadingHTML());
+        } else {
+          heading_el.outerHTML = this.createBrandHeadingHTML();
+        }
+      },
+
+      renderLoginPanel() {
+        this.el.classList.add("logged-out");
+
+        if (this.loginpanel) {
+          this.loginpanel.render();
+        } else {
+          this.loginpanel = new _converse.LoginPanel({
+            'model': new _converse.LoginPanelModel()
+          });
+          const panes = this.el.querySelector('.controlbox-panes');
+          panes.innerHTML = '';
+          panes.appendChild(this.loginpanel.render().el);
+          this.insertBrandHeading();
+        }
+
+        this.loginpanel.initPopovers();
+        return this;
+      },
+
+      /**
+       * Renders the "Contacts" panel of the controlbox.
+       * This will only be called after the user has already been logged in.
+       * @private
+       * @method _converse.ControlBoxView.renderControlBoxPane
+       */
+      renderControlBoxPane() {
+        if (this.loginpanel) {
+          this.loginpanel.remove();
+          delete this.loginpanel;
+        }
+
+        if (this.controlbox_pane && converse_controlbox_u.isVisible(this.controlbox_pane.el)) {
+          return;
+        }
+
+        this.el.classList.remove("logged-out");
+        this.controlbox_pane = new _converse.ControlBoxPane();
+        this.el.querySelector('.controlbox-panes').insertAdjacentElement('afterBegin', this.controlbox_pane.el);
+      },
+
+      async close(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        if (Object(lodash["get"])(ev, 'name') === 'closeAllChatBoxes' && (_converse.disconnection_cause !== _converse.LOGOUT || _converse.show_controlbox_by_default)) {
+          return;
+        }
+
+        if (_converse.sticky_controlbox) {
+          return;
+        }
+
+        const connection = Object(lodash["get"])(_converse, 'connection', {});
+
+        if (connection.connected && !connection.disconnecting) {
+          await new Promise((resolve, reject) => {
+            return this.model.save({
+              'closed': true
+            }, {
+              'success': resolve,
+              'error': reject
+            });
+          });
+        } else {
+          this.model.trigger('hide');
+        }
+
+        _converse.api.trigger('controlBoxClosed', this);
+
+        return this;
+      },
+
+      ensureClosedState() {
+        if (this.model.get('closed')) {
+          this.hide();
+        } else {
+          this.show();
+        }
+      },
+
+      hide(callback) {
+        if (_converse.sticky_controlbox) {
+          return;
+        }
+
+        converse_controlbox_u.addClass('hidden', this.el);
+
+        _converse.api.trigger('chatBoxClosed', this);
+
+        if (!_converse.api.connection.connected()) {
+          _converse.controlboxtoggle.render();
+        }
+
+        _converse.controlboxtoggle.show(callback);
+
+        return this;
+      },
+
+      onControlBoxToggleHidden() {
+        this.model.set('closed', false);
+        this.el.classList.remove('hidden');
+        /**
+         * Triggered once the controlbox has been opened
+         * @event _converse#controlBoxOpened
+         * @type {_converse.ControlBox}
+         */
+
+        _converse.api.trigger('controlBoxOpened', this);
+      },
+
+      show() {
+        _converse.controlboxtoggle.hide(this.onControlBoxToggleHidden.bind(this));
+
+        return this;
+      },
+
+      showHelpMessages() {
+        return;
+      }
+
+    });
+    _converse.LoginPanelModel = converse_controlbox_Backbone.Model.extend({
+      defaults: {
+        // Passed-by-reference. Fine in this case because there's
+        // only one such model.
+        'errors': []
+      }
+    });
+    _converse.LoginPanel = converse_controlbox_Backbone.VDOMView.extend({
+      tagName: 'div',
+      id: "converse-login-panel",
+      className: 'controlbox-pane fade-in',
+      events: {
+        'submit form#converse-login': 'authenticate',
+        'change input': 'validate'
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'change', this.render);
+        this.listenTo(_converse.connfeedback, 'change', this.render);
+        this.render();
+      },
+
+      toHTML() {
+        const connection_status = _converse.connfeedback.get('connection_status');
+
+        let feedback_class, pretty_status;
+
+        if (REPORTABLE_STATUSES.includes(connection_status)) {
+          pretty_status = PRETTY_CONNECTION_STATUS[connection_status];
+          feedback_class = CONNECTION_STATUS_CSS_CLASS[pretty_status];
+        }
+
+        return login_panel_default()(Object.assign(this.model.toJSON(), {
+          '__': __,
+          '_converse': _converse,
+          'ANONYMOUS': _converse.ANONYMOUS,
+          'EXTERNAL': _converse.EXTERNAL,
+          'LOGIN': _converse.LOGIN,
+          'PREBIND': _converse.PREBIND,
+          'auto_login': _converse.auto_login,
+          'authentication': _converse.authentication,
+          'connection_status': connection_status,
+          'conn_feedback_class': feedback_class,
+          'conn_feedback_subject': pretty_status,
+          'conn_feedback_message': _converse.connfeedback.get('message'),
+          'placeholder_username': (_converse.locked_domain || _converse.default_domain) && __('Username') || __('user@domain'),
+          'show_trust_checkbox': _converse.trusted !== 'on' && _converse.trusted !== 'off'
+        }));
+      },
+
+      initPopovers() {
+        Array.from(this.el.querySelectorAll('[data-title]')).forEach(el => {
+          new bootstrap_native_default.a.Popover(el, {
+            'trigger': _converse.view_mode === 'mobile' && 'click' || 'hover',
+            'dismissible': _converse.view_mode === 'mobile' && true || false,
+            'container': this.el.parentElement.parentElement.parentElement
+          });
+        });
+      },
+
+      validate() {
+        const form = this.el.querySelector('form');
+        const jid_element = form.querySelector('input[name=jid]');
+
+        if (jid_element.value && !_converse.locked_domain && !_converse.default_domain && !converse_controlbox_u.isValidJID(jid_element.value)) {
+          jid_element.setCustomValidity(__('Please enter a valid XMPP address'));
+          return false;
+        }
+
+        jid_element.setCustomValidity('');
+        return true;
+      },
+
+      authenticate(ev) {
+        /* Authenticate the user based on a form submission event.
+         */
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        if (_converse.authentication === _converse.ANONYMOUS) {
+          return this.connect(_converse.jid, null);
+        }
+
+        if (!this.validate()) {
+          return;
+        }
+
+        const form_data = new FormData(ev.target);
+
+        if (_converse.trusted === 'on' || _converse.trusted === 'off') {
+          _converse.config.save({
+            'trusted': _converse.trusted === 'on',
+            'storage': _converse.trusted === 'on' ? 'persistent' : 'session'
+          });
+        } else {
+          _converse.config.save({
+            'trusted': form_data.get('trusted') && true || false,
+            'storage': form_data.get('trusted') ? 'persistent' : 'session'
+          });
+        }
+
+        let jid = form_data.get('jid');
+
+        if (_converse.locked_domain) {
+          const last_part = '@' + _converse.locked_domain;
+
+          if (jid.endsWith(last_part)) {
+            jid = jid.substr(0, jid.length - last_part.length);
+          }
+
+          jid = converse_controlbox_Strophe.escapeNode(jid) + last_part;
+        } else if (_converse.default_domain && !jid.includes('@')) {
+          jid = jid + '@' + _converse.default_domain;
+        }
+
+        this.connect(jid, form_data.get('password'));
+      },
+
+      connect(jid, password) {
+        if (["converse/login", "converse/register"].includes(converse_controlbox_Backbone.history.getFragment())) {
+          _converse.router.navigate('', {
+            'replace': true
+          });
+        }
+
+        _converse.connection && _converse.connection.reset();
+
+        _converse.api.user.login(jid, password);
+      }
+
+    });
+    _converse.ControlBoxPane = converse_controlbox_Backbone.NativeView.extend({
+      tagName: 'div',
+      className: 'controlbox-pane',
+
+      initialize() {
+        /**
+         * Triggered once the {@link _converse.ControlBoxPane} has been initialized
+         * @event _converse#controlBoxPaneInitialized
+         * @type { _converse.ControlBoxPane }
+         * @example _converse.api.listen.on('controlBoxPaneInitialized', view => { ... });
+         */
+        _converse.api.trigger('controlBoxPaneInitialized', this);
+      }
+
+    });
+    _converse.ControlBoxToggle = converse_controlbox_Backbone.NativeView.extend({
+      tagName: 'a',
+      className: 'toggle-controlbox hidden',
+      id: 'toggle-controlbox',
+      events: {
+        'click': 'onClick'
+      },
+      attributes: {
+        'href': "#"
+      },
+
+      initialize() {
+        _converse.chatboxviews.insertRowColumn(this.render().el);
+
+        _converse.api.waitUntil('initialized').then(this.render.bind(this)).catch(e => headless_log.fatal(e));
+      },
+
+      render() {
+        // We let the render method of ControlBoxView decide whether
+        // the ControlBox or the Toggle must be shown. This prevents
+        // artifacts (i.e. on page load the toggle is shown only to then
+        // seconds later be hidden in favor of the controlbox).
+        this.el.innerHTML = controlbox_toggle_default()({
+          'label_toggle': _converse.api.connection.connected() ? __('Chat Contacts') : __('Toggle chat')
+        });
+        return this;
+      },
+
+      hide(callback) {
+        converse_controlbox_u.hideElement(this.el);
+        callback();
+      },
+
+      show(callback) {
+        converse_controlbox_u.fadeIn(this.el, callback);
+      },
+
+      showControlBox() {
+        let controlbox = _converse.chatboxes.get('controlbox');
+
+        if (!controlbox) {
+          controlbox = addControlBox();
+        }
+
+        if (_converse.api.connection.connected()) {
+          controlbox.save({
+            'closed': false
+          });
+        } else {
+          controlbox.trigger('show');
+        }
+      },
+
+      onClick(e) {
+        e.preventDefault();
+
+        if (converse_controlbox_u.isVisible(_converse.root.querySelector("#controlbox"))) {
+          const controlbox = _converse.chatboxes.get('controlbox');
+
+          if (_converse.api.connection.connected) {
+            controlbox.save({
+              closed: true
+            });
+          } else {
+            controlbox.trigger('hide');
+          }
+        } else {
+          this.showControlBox();
+        }
+      }
+
+    });
+    /******************** Event Handlers ********************/
+
+    _converse.api.listen.on('chatBoxViewsInitialized', () => {
+      _converse.chatboxes.on('add', item => {
+        if (item.get('type') === _converse.CONTROLBOX_TYPE) {
+          const views = _converse.chatboxviews;
+          const view = views.get(item.get('id'));
+
+          if (view) {
+            view.model = item;
+            view.initialize();
+          } else {
+            views.add(item.get('id'), new _converse.ControlBoxView({
+              model: item
+            }));
+          }
+        }
+      });
+    });
+
+    _converse.api.listen.on('clearSession', () => {
+      const chatboxviews = Object(lodash["get"])(_converse, 'chatboxviews', null);
+      const view = chatboxviews && chatboxviews.get('controlbox');
+
+      if (view) {
+        converse_controlbox_u.safeSave(view.model, {
+          'connected': false
+        });
+
+        if (Object(lodash["get"])(view, 'controlbox_pane')) {
+          view.controlbox_pane.remove();
+          delete view.controlbox_pane;
+        }
+      }
+    });
+
+    _converse.api.waitUntil('chatBoxViewsInitialized').then(addControlBox).catch(e => headless_log.fatal(e));
+
+    _converse.api.listen.on('chatBoxesFetched', () => {
+      const controlbox = _converse.chatboxes.get('controlbox') || addControlBox();
+      controlbox.save({
+        'connected': true
+      });
+    });
+
+    const disconnect = function disconnect() {
+      /* Upon disconnection, set connected to `false`, so that if
+       * we reconnect, "onConnected" will be called,
+       * to fetch the roster again and to send out a presence stanza.
+       */
+      const view = _converse.chatboxviews.get('controlbox');
+
+      view.model.set({
+        'connected': false
+      });
+      return view;
+    };
+
+    _converse.api.listen.on('disconnected', () => disconnect().renderLoginPanel());
+
+    _converse.api.listen.on('will-reconnect', disconnect);
+    /************************ API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The "controlbox" namespace groups methods pertaining to the
+       * controlbox view
+       *
+       * @namespace _converse.api.controlbox
+       * @memberOf _converse.api
+       */
+      controlbox: {
+        /**
+         * Opens the controlbox
+         * @method _converse.api.controlbox.open
+         * @returns { Promise<_converse.ControlBox> }
+         */
+        async open() {
+          await _converse.api.waitUntil('chatBoxesFetched');
+
+          const model = (await _converse.api.chatboxes.get('controlbox')) || _converse.api.chatboxes.create('controlbox', {}, _converse.Controlbox);
+
+          model.trigger('show');
+          return model;
+        },
+
+        /**
+         * Returns the controlbox view.
+         * @method _converse.api.controlbox.get
+         * @returns { Backbone.View } View representing the controlbox
+         * @example const view = _converse.api.controlbox.get();
+         */
+        get() {
+          return _converse.chatboxviews.get('controlbox');
+        }
+
+      }
+    });
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/dragresize.html
+var dragresize = __webpack_require__(156);
+var dragresize_default = /*#__PURE__*/__webpack_require__.n(dragresize);
+
+// CONCATENATED MODULE: ./src/converse-dragresize.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2012-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-dragresize
+ */
+
+
+
+
+
+const converse_dragresize_u = converse_core.env.utils;
+
+function renderDragResizeHandles(_converse, view) {
+  const flyout = view.el.querySelector('.box-flyout');
+  const div = document.createElement('div');
+  div.innerHTML = dragresize_default()();
+  flyout.insertBefore(div, flyout.firstChild);
+}
+
+converse_core.plugins.add('converse-dragresize', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chatview", "converse-headlines-view", "converse-muc-views"],
+
+  enabled(_converse) {
+    return _converse.view_mode == 'overlayed';
+  },
+
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    ChatBox: {
+      initialize() {
+        const result = this.__super__.initialize.apply(this, arguments);
+
+        const height = this.get('height'),
+              width = this.get('width');
+        const save = this.get('id') === 'controlbox' ? a => this.set(a) : a => this.save(a);
+        save({
+          'height': converse_dragresize_u.applyDragResistance(height, this.get('default_height')),
+          'width': converse_dragresize_u.applyDragResistance(width, this.get('default_width'))
+        });
+        return result;
+      }
+
+    },
+    ChatBoxView: {
+      events: {
+        'mousedown .dragresize-top': 'onStartVerticalResize',
+        'mousedown .dragresize-left': 'onStartHorizontalResize',
+        'mousedown .dragresize-topleft': 'onStartDiagonalResize'
+      },
+
+      render() {
+        const result = this.__super__.render.apply(this, arguments);
+
+        renderDragResizeHandles(this.__super__._converse, this);
+        this.setWidth();
+        return result;
+      }
+
+    },
+    HeadlinesBoxView: {
+      events: {
+        'mousedown .dragresize-top': 'onStartVerticalResize',
+        'mousedown .dragresize-left': 'onStartHorizontalResize',
+        'mousedown .dragresize-topleft': 'onStartDiagonalResize'
+      },
+
+      render() {
+        const result = this.__super__.render.apply(this, arguments);
+
+        renderDragResizeHandles(this.__super__._converse, this);
+        this.setWidth();
+        return result;
+      }
+
+    },
+    ControlBoxView: {
+      events: {
+        'mousedown .dragresize-top': 'onStartVerticalResize',
+        'mousedown .dragresize-left': 'onStartHorizontalResize',
+        'mousedown .dragresize-topleft': 'onStartDiagonalResize'
+      },
+
+      render() {
+        const result = this.__super__.render.apply(this, arguments);
+
+        renderDragResizeHandles(this.__super__._converse, this);
+        this.setWidth();
+        return result;
+      },
+
+      renderLoginPanel() {
+        const result = this.__super__.renderLoginPanel.apply(this, arguments);
+
+        this.initDragResize().setDimensions();
+        return result;
+      },
+
+      renderControlBoxPane() {
+        const result = this.__super__.renderControlBoxPane.apply(this, arguments);
+
+        this.initDragResize().setDimensions();
+        return result;
+      }
+
+    },
+    ChatRoomView: {
+      events: {
+        'mousedown .dragresize-top': 'onStartVerticalResize',
+        'mousedown .dragresize-left': 'onStartHorizontalResize',
+        'mousedown .dragresize-topleft': 'onStartDiagonalResize'
+      },
+
+      render() {
+        const result = this.__super__.render.apply(this, arguments);
+
+        renderDragResizeHandles(this.__super__._converse, this);
+        this.setWidth();
+        return result;
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+
+    _converse.api.settings.update({
+      'allow_dragresize': true
+    });
+
+    const dragResizable = {
+      initDragResize() {
+        const view = this;
+        const debouncedSetDimensions = Object(lodash["debounce"])(() => view.setDimensions());
+        window.addEventListener('resize', view.debouncedSetDimensions);
+        this.listenTo(this.model, 'destroy', () => window.removeEventListener('resize', debouncedSetDimensions)); // Determine and store the default box size.
+        // We need this information for the drag-resizing feature.
+
+        const flyout = this.el.querySelector('.box-flyout');
+        const style = window.getComputedStyle(flyout);
+
+        if (this.model.get('height') === undefined) {
+          const height = parseInt(style.height.replace(/px$/, ''), 10);
+          const width = parseInt(style.width.replace(/px$/, ''), 10);
+          this.model.set('height', height);
+          this.model.set('default_height', height);
+          this.model.set('width', width);
+          this.model.set('default_width', width);
+        }
+
+        const min_width = style['min-width'];
+        const min_height = style['min-height'];
+        this.model.set('min_width', min_width.endsWith('px') ? Number(min_width.replace(/px$/, '')) : 0);
+        this.model.set('min_height', min_height.endsWith('px') ? Number(min_height.replace(/px$/, '')) : 0); // Initialize last known mouse position
+
+        this.prev_pageY = 0;
+        this.prev_pageX = 0;
+
+        if (Object(lodash["get"])(_converse.connection, 'connected')) {
+          this.height = this.model.get('height');
+          this.width = this.model.get('width');
+        }
+
+        return this;
+      },
+
+      resizeChatBox(ev) {
+        let diff;
+
+        if (_converse.resizing.direction.indexOf('top') === 0) {
+          diff = ev.pageY - this.prev_pageY;
+
+          if (diff) {
+            this.height = this.height - diff > (this.model.get('min_height') || 0) ? this.height - diff : this.model.get('min_height');
+            this.prev_pageY = ev.pageY;
+            this.setChatBoxHeight(this.height);
+          }
+        }
+
+        if (_converse.resizing.direction.includes('left')) {
+          diff = this.prev_pageX - ev.pageX;
+
+          if (diff) {
+            this.width = this.width + diff > (this.model.get('min_width') || 0) ? this.width + diff : this.model.get('min_width');
+            this.prev_pageX = ev.pageX;
+            this.setChatBoxWidth(this.width);
+          }
+        }
+      },
+
+      setWidth() {
+        // If a custom width is applied (due to drag-resizing),
+        // then we need to set the width of the .chatbox element as well.
+        if (this.model.get('width')) {
+          this.el.style.width = this.model.get('width');
+        }
+      },
+
+      setDimensions() {
+        // Make sure the chat box has the right height and width.
+        this.adjustToViewport();
+        this.setChatBoxHeight(this.model.get('height'));
+        this.setChatBoxWidth(this.model.get('width'));
+      },
+
+      setChatBoxHeight(height) {
+        if (height) {
+          height = converse_dragresize_u.applyDragResistance(height, this.model.get('default_height')) + 'px';
+        } else {
+          height = "";
+        }
+
+        const flyout_el = this.el.querySelector('.box-flyout');
+
+        if (flyout_el !== null) {
+          flyout_el.style.height = height;
+        }
+      },
+
+      setChatBoxWidth(width) {
+        if (width) {
+          width = converse_dragresize_u.applyDragResistance(width, this.model.get('default_width')) + 'px';
+        } else {
+          width = "";
+        }
+
+        this.el.style.width = width;
+        const flyout_el = this.el.querySelector('.box-flyout');
+
+        if (flyout_el !== null) {
+          flyout_el.style.width = width;
+        }
+      },
+
+      adjustToViewport() {
+        /* Event handler called when viewport gets resized. We remove
+         * custom width/height from chat boxes.
+         */
+        const viewport_width = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
+        const viewport_height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
+
+        if (viewport_width <= 480) {
+          this.model.set('height', undefined);
+          this.model.set('width', undefined);
+        } else if (viewport_width <= this.model.get('width')) {
+          this.model.set('width', undefined);
+        } else if (viewport_height <= this.model.get('height')) {
+          this.model.set('height', undefined);
+        }
+      },
+
+      onStartVerticalResize(ev) {
+        let trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
+
+        if (!_converse.allow_dragresize) {
+          return true;
+        } // Record element attributes for mouseMove().
+
+
+        const flyout = this.el.querySelector('.box-flyout'),
+              style = window.getComputedStyle(flyout);
+        this.height = parseInt(style.height.replace(/px$/, ''), 10);
+        _converse.resizing = {
+          'chatbox': this,
+          'direction': 'top'
+        };
+        this.prev_pageY = ev.pageY;
+
+        if (trigger) {
+          /**
+           * Triggered once the user starts to vertically resize a {@link _converse.ChatBoxView}
+           * @event _converse#startVerticalResize
+           * @example _converse.api.listen.on('startVerticalResize', (view) => { ... });
+           */
+          _converse.api.trigger('startVerticalResize', this);
+        }
+      },
+
+      onStartHorizontalResize(ev) {
+        let trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
+
+        if (!_converse.allow_dragresize) {
+          return true;
+        }
+
+        const flyout = this.el.querySelector('.box-flyout'),
+              style = window.getComputedStyle(flyout);
+        this.width = parseInt(style.width.replace(/px$/, ''), 10);
+        _converse.resizing = {
+          'chatbox': this,
+          'direction': 'left'
+        };
+        this.prev_pageX = ev.pageX;
+
+        if (trigger) {
+          /**
+           * Triggered once the user starts to horizontally resize a {@link _converse.ChatBoxView}
+           * @event _converse#startHorizontalResize
+           * @example _converse.api.listen.on('startHorizontalResize', (view) => { ... });
+           */
+          _converse.api.trigger('startHorizontalResize', this);
+        }
+      },
+
+      onStartDiagonalResize(ev) {
+        this.onStartHorizontalResize(ev, false);
+        this.onStartVerticalResize(ev, false);
+        _converse.resizing.direction = 'topleft';
+        /**
+         * Triggered once the user starts to diagonally resize a {@link _converse.ChatBoxView}
+         * @event _converse#startDiagonalResize
+         * @example _converse.api.listen.on('startDiagonalResize', (view) => { ... });
+         */
+
+        _converse.api.trigger('startDiagonalResize', this);
+      }
+
+    };
+    Object.assign(_converse.ChatBoxView.prototype, dragResizable);
+
+    converse_dragresize_u.applyDragResistance = function (value, default_value) {
+      /* This method applies some resistance around the
+      * default_value. If value is close enough to
+      * default_value, then default_value is returned instead.
+      */
+      if (value === undefined) {
+        return undefined;
+      } else if (default_value === undefined) {
+        return value;
+      }
+
+      const resistance = 10;
+
+      if (value !== default_value && Math.abs(value - default_value) < resistance) {
+        return default_value;
+      }
+
+      return value;
+    };
+
+    function onMouseMove(ev) {
+      if (!_converse.resizing || !_converse.allow_dragresize) {
+        return true;
+      }
+
+      ev.preventDefault();
+
+      _converse.resizing.chatbox.resizeChatBox(ev);
+    }
+
+    function onMouseUp(ev) {
+      if (!_converse.resizing || !_converse.allow_dragresize) {
+        return true;
+      }
+
+      ev.preventDefault();
+      const height = converse_dragresize_u.applyDragResistance(_converse.resizing.chatbox.height, _converse.resizing.chatbox.model.get('default_height'));
+      const width = converse_dragresize_u.applyDragResistance(_converse.resizing.chatbox.width, _converse.resizing.chatbox.model.get('default_width'));
+
+      if (_converse.api.connection.connected()) {
+        _converse.resizing.chatbox.model.save({
+          'height': height
+        });
+
+        _converse.resizing.chatbox.model.save({
+          'width': width
+        });
+      } else {
+        _converse.resizing.chatbox.model.set({
+          'height': height
+        });
+
+        _converse.resizing.chatbox.model.set({
+          'width': width
+        });
+      }
+
+      _converse.resizing = null;
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    function registerGlobalEventHandlers() {
+      document.addEventListener('mousemove', onMouseMove);
+      document.addEventListener('mouseup', onMouseUp);
+    }
+
+    function unregisterGlobalEventHandlers() {
+      document.removeEventListener('mousemove', onMouseMove);
+      document.removeEventListener('mouseup', onMouseUp);
+    }
+
+    _converse.api.listen.on('registeredGlobalEventHandlers', registerGlobalEventHandlers);
+
+    _converse.api.listen.on('unregisteredGlobalEventHandlers', unregisterGlobalEventHandlers);
+
+    _converse.api.listen.on('beforeShowingChatView', view => view.initDragResize().setDimensions());
+    /************************ END Event Handlers ************************/
+
+  }
+
+});
+// CONCATENATED MODULE: ./src/dom-navigator.js
+/**
+ * @module dom-navigator
+ * @description A class for navigating the DOM with the keyboard
+ * This module started as a fork of Rubens Mariuzzo's dom-navigator.
+ * @copyright Rubens Mariuzzo, JC Brand
+ */
+
+/**
+ * Indicates if a given element is fully visible in the viewport.
+ * @param { Element } el The element to check.
+ * @return { Boolean } True if the given element is fully visible in the viewport, otherwise false.
+ */
+
+function inViewport(el) {
+  const rect = el.getBoundingClientRect();
+  return rect.top >= 0 && rect.left >= 0 && rect.bottom <= window.innerHeight && rect.right <= window.innerWidth;
+}
+/**
+ * Return the absolute offset top of an element.
+ * @param el { Element } The element.
+ * @return { Number } The offset top.
+ */
+
+
+function absoluteOffsetTop(el) {
+  let offsetTop = 0;
+
+  do {
+    if (!isNaN(el.offsetTop)) {
+      offsetTop += el.offsetTop;
+    }
+  } while (el = el.offsetParent);
+
+  return offsetTop;
+}
+/**
+ * Return the absolute offset left of an element.
+ * @param el { Element } The element.
+ * @return { Number } The offset left.
+ */
+
+
+function absoluteOffsetLeft(el) {
+  let offsetLeft = 0;
+
+  do {
+    if (!isNaN(el.offsetLeft)) {
+      offsetLeft += el.offsetLeft;
+    }
+  } while (el = el.offsetParent);
+
+  return offsetLeft;
+}
+/**
+ * Adds the ability to navigate the DOM with the arrow keys
+ * @class
+ * @namespace DOMNavigator
+ */
+
+
+class dom_navigator_DOMNavigator {
+  /**
+   * Directions.
+   * @returns {{left: string, up: string, right: string, down: string}}
+   * @constructor
+   */
+  static get DIRECTION() {
+    return {
+      down: 'down',
+      end: 'end',
+      home: 'home',
+      left: 'left',
+      right: 'right',
+      up: 'up'
+    };
+  }
+  /**
+   * The default options for the DOM navigator.
+   * @returns {{
+   *     down: number
+   *     getSelector: null,
+   *     jump_to_picked: null,
+   *     jump_to_picked_direction: null,
+   *     jump_to_picked_selector: string,
+   *     left: number,
+   *     onSelected: null,
+   *     right: number,
+   *     selected: string,
+   *     up: number,
+   * }}
+   */
+
+
+  static get DEFAULTS() {
+    return {
+      home: ["".concat(converse.keycodes.SHIFT, "+").concat(converse.keycodes.UP_ARROW)],
+      end: ["".concat(converse.keycodes.SHIFT, "+").concat(converse.keycodes.DOWN_ARROW)],
+      up: [converse.keycodes.UP_ARROW],
+      down: [converse.keycodes.DOWN_ARROW],
+      left: [converse.keycodes.LEFT_ARROW, "".concat(converse.keycodes.SHIFT, "+").concat(converse.keycodes.TAB)],
+      right: [converse.keycodes.RIGHT_ARROW, converse.keycodes.TAB],
+      getSelector: null,
+      jump_to_picked: null,
+      jump_to_picked_direction: null,
+      jump_to_picked_selector: 'picked',
+      onSelected: null,
+      selected: 'selected',
+      selector: 'li'
+    };
+  }
+
+  static getClosestElement(els, getDistance) {
+    const next = els.reduce((prev, curr) => {
+      const current_distance = getDistance(curr);
+
+      if (current_distance < prev.distance) {
+        return {
+          distance: current_distance,
+          element: curr
+        };
+      }
+
+      return prev;
+    }, {
+      distance: Infinity
+    });
+    return next.element;
+  }
+  /**
+   * Create a new DOM Navigator.
+   * @param { Element } container The container of the element to navigate.
+   * @param { Object } options The options to configure the DOM navigator.
+   * @param { Function } options.getSelector
+   * @param { Number } [options.down] - The keycode for navigating down
+   * @param { Number } [options.left] - The keycode for navigating left
+   * @param { Number } [options.right] - The keycode for navigating right
+   * @param { Number } [options.up] - The keycode for navigating up
+   * @param { String } [options.selected] - The class that should be added to the currently selected DOM element.
+   * @param { String } [options.jump_to_picked] - A selector, which if
+   * matched by the next element being navigated to, based on the direction
+   * given by `jump_to_picked_direction`, will cause navigation
+   * to jump to the element that matches the `jump_to_picked_selector`.
+   * For example, this is useful when navigating to tabs. You want to
+   * immediately navigate to the currently active tab instead of just
+   * navigating to the first tab.
+   * @param { String } [options.jump_to_picked_selector=picked] - The selector
+   * indicating the currently picked element to jump to.
+   * @param { String } [options.jump_to_picked_direction] - The direction for
+   * which jumping to the picked element should be enabled.
+   * @param { Function } [options.onSelected] - The callback function which
+   * should be called when en element gets selected.
+   * @constructor
+   */
+
+
+  constructor(container, options) {
+    this.doc = window.document;
+    this.container = container;
+    this.scroll_container = options.scroll_container || container;
+    this.options = Object.assign({}, dom_navigator_DOMNavigator.DEFAULTS, options);
+    this.init();
+  }
+  /**
+   * Initialize the navigator.
+   * @method DOMNavigator#init
+   */
+
+
+  init() {
+    this.selected = null;
+    this.keydownHandler = null;
+    this.elements = {}; // Create hotkeys map.
+
+    this.keys = {};
+    this.options.down.forEach(key => this.keys[key] = dom_navigator_DOMNavigator.DIRECTION.down);
+    this.options.end.forEach(key => this.keys[key] = dom_navigator_DOMNavigator.DIRECTION.end);
+    this.options.home.forEach(key => this.keys[key] = dom_navigator_DOMNavigator.DIRECTION.home);
+    this.options.left.forEach(key => this.keys[key] = dom_navigator_DOMNavigator.DIRECTION.left);
+    this.options.right.forEach(key => this.keys[key] = dom_navigator_DOMNavigator.DIRECTION.right);
+    this.options.up.forEach(key => this.keys[key] = dom_navigator_DOMNavigator.DIRECTION.up);
+  }
+  /**
+   * Enable this navigator.
+   * @method DOMNavigator#enable
+   */
+
+
+  enable() {
+    this.getElements();
+
+    this.keydownHandler = event => this.handleKeydown(event);
+
+    this.doc.addEventListener('keydown', this.keydownHandler);
+    this.enabled = true;
+  }
+  /**
+   * Disable this navigator.
+   * @method DOMNavigator#disable
+   */
+
+
+  disable() {
+    if (this.keydownHandler) {
+      this.doc.removeEventListener('keydown', this.keydownHandler);
+    }
+
+    this.unselect();
+    this.elements = {};
+    this.enabled = false;
+  }
+  /**
+   * Destroy this navigator removing any event registered and any other data.
+   * @method DOMNavigator#destroy
+   */
+
+
+  destroy() {
+    this.disable();
+
+    if (this.container.domNavigator) {
+      delete this.container.domNavigator;
+    }
+  }
+  /**
+   * @method DOMNavigator#getNextElement
+   * @param {'down'|'right'|'left'|'up'} direction
+   * @returns { HTMLElement }
+   */
+
+
+  getNextElement(direction) {
+    let el;
+
+    if (direction === dom_navigator_DOMNavigator.DIRECTION.home) {
+      el = this.getElements(direction)[0];
+    } else if (direction === dom_navigator_DOMNavigator.DIRECTION.end) {
+      el = Array.from(this.getElements(direction)).pop();
+    } else if (this.selected) {
+      if (direction === dom_navigator_DOMNavigator.DIRECTION.right) {
+        const els = this.getElements(direction);
+        el = els.slice(els.indexOf(this.selected))[1];
+      } else if (direction == dom_navigator_DOMNavigator.DIRECTION.left) {
+        const els = this.getElements(direction);
+        el = els.slice(0, els.indexOf(this.selected)).pop() || this.selected;
+      } else if (direction == dom_navigator_DOMNavigator.DIRECTION.down) {
+        const left = this.selected.offsetLeft;
+        const top = this.selected.offsetTop + this.selected.offsetHeight;
+        const els = this.elementsAfter(0, top);
+
+        const getDistance = el => Math.abs(el.offsetLeft - left) + Math.abs(el.offsetTop - top);
+
+        el = dom_navigator_DOMNavigator.getClosestElement(els, getDistance);
+      } else if (direction == dom_navigator_DOMNavigator.DIRECTION.up) {
+        const left = this.selected.offsetLeft;
+        const top = this.selected.offsetTop - 1;
+        const els = this.elementsBefore(Infinity, top);
+
+        const getDistance = el => Math.abs(left - el.offsetLeft) + Math.abs(top - el.offsetTop);
+
+        el = dom_navigator_DOMNavigator.getClosestElement(els, getDistance);
+      } else {
+        throw new Error("getNextElement: invalid direction value");
+      }
+    } else {
+      if (direction === dom_navigator_DOMNavigator.DIRECTION.right || direction === dom_navigator_DOMNavigator.DIRECTION.down) {
+        // If nothing is selected, we pretend that the first element is
+        // selected, so we return the next.
+        el = this.getElements(direction)[1];
+      } else {
+        el = this.getElements(direction)[0];
+      }
+    }
+
+    if (this.options.jump_to_picked && el && el.matches(this.options.jump_to_picked) && direction === this.options.jump_to_picked_direction) {
+      el = this.container.querySelector(this.options.jump_to_picked_selector) || el;
+    }
+
+    return el;
+  }
+  /**
+   * Select the given element.
+   * @method DOMNavigator#select
+   * @param { Element } el The DOM element to select.
+   * @param { string } [direction] The direction.
+   */
+
+
+  select(el, direction) {
+    if (!el || el === this.selected) {
+      return;
+    }
+
+    this.unselect();
+    direction && this.scrollTo(el, direction);
+
+    if (el.matches('input')) {
+      el.focus();
+    } else {
+      utils_html.addClass(this.options.selected, el);
+    }
+
+    this.selected = el;
+    this.options.onSelected && this.options.onSelected(el);
+  }
+  /**
+   * Remove the current selection
+   * @method DOMNavigator#unselect
+   */
+
+
+  unselect() {
+    if (this.selected) {
+      utils_html.removeClass(this.options.selected, this.selected);
+      delete this.selected;
+    }
+  }
+  /**
+   * Scroll the container to an element.
+   * @method DOMNavigator#scrollTo
+   * @param { HTMLElement } el The destination element.
+   * @param { String } direction The direction of the current navigation.
+   * @return void.
+   */
+
+
+  scrollTo(el, direction) {
+    if (!this.inScrollContainerViewport(el)) {
+      const container = this.scroll_container;
+
+      if (!container.contains(el)) {
+        return;
+      }
+
+      switch (direction) {
+        case dom_navigator_DOMNavigator.DIRECTION.left:
+          container.scrollLeft = el.offsetLeft - container.offsetLeft;
+          container.scrollTop = el.offsetTop - container.offsetTop;
+          break;
+
+        case dom_navigator_DOMNavigator.DIRECTION.up:
+          container.scrollTop = el.offsetTop - container.offsetTop;
+          break;
+
+        case dom_navigator_DOMNavigator.DIRECTION.right:
+          container.scrollLeft = el.offsetLeft - container.offsetLeft - (container.offsetWidth - el.offsetWidth);
+          container.scrollTop = el.offsetTop - container.offsetTop - (container.offsetHeight - el.offsetHeight);
+          break;
+
+        case dom_navigator_DOMNavigator.DIRECTION.down:
+          container.scrollTop = el.offsetTop - container.offsetTop - (container.offsetHeight - el.offsetHeight);
+          break;
+      }
+    } else if (!inViewport(el)) {
+      switch (direction) {
+        case dom_navigator_DOMNavigator.DIRECTION.left:
+          document.body.scrollLeft = absoluteOffsetLeft(el) - document.body.offsetLeft;
+          break;
+
+        case dom_navigator_DOMNavigator.DIRECTION.up:
+          document.body.scrollTop = absoluteOffsetTop(el) - document.body.offsetTop;
+          break;
+
+        case dom_navigator_DOMNavigator.DIRECTION.right:
+          document.body.scrollLeft = absoluteOffsetLeft(el) - document.body.offsetLeft - (document.documentElement.clientWidth - el.offsetWidth);
+          break;
+
+        case dom_navigator_DOMNavigator.DIRECTION.down:
+          document.body.scrollTop = absoluteOffsetTop(el) - document.body.offsetTop - (document.documentElement.clientHeight - el.offsetHeight);
+          break;
+      }
+    }
+  }
+  /**
+   * Indicate if an element is in the container viewport.
+   * @method DOMNavigator#inScrollContainerViewport
+   * @param { HTMLElement } el The element to check.
+   * @return { Boolean } true if the given element is in the container viewport, otherwise false.
+   */
+
+
+  inScrollContainerViewport(el) {
+    const container = this.scroll_container; // Check on left side.
+
+    if (el.offsetLeft - container.scrollLeft < container.offsetLeft) {
+      return false;
+    } // Check on top side.
+
+
+    if (el.offsetTop - container.scrollTop < container.offsetTop) {
+      return false;
+    } // Check on right side.
+
+
+    if (el.offsetLeft + el.offsetWidth - container.scrollLeft > container.offsetLeft + container.offsetWidth) {
+      return false;
+    } // Check on down side.
+
+
+    if (el.offsetTop + el.offsetHeight - container.scrollTop > container.offsetTop + container.offsetHeight) {
+      return false;
+    }
+
+    return true;
+  }
+  /**
+   * Find and store the navigable elements
+   * @method DOMNavigator#getElements
+   */
+
+
+  getElements(direction) {
+    const selector = this.options.getSelector ? this.options.getSelector(direction) : this.options.selector;
+
+    if (!this.elements[selector]) {
+      this.elements[selector] = Array.from(this.container.querySelectorAll(selector));
+    }
+
+    return this.elements[selector];
+  }
+  /**
+   * Return an array of navigable elements after an offset.
+   * @method DOMNavigator#elementsAfter
+   * @param { number } left The left offset.
+   * @param { number } top The top offset.
+   * @return { Array } An array of elements.
+   */
+
+
+  elementsAfter(left, top) {
+    return this.getElements(dom_navigator_DOMNavigator.DIRECTION.down).filter(el => el.offsetLeft >= left && el.offsetTop >= top);
+  }
+  /**
+   * Return an array of navigable elements before an offset.
+   * @method DOMNavigator#elementsBefore
+   * @param { number } left The left offset.
+   * @param { number } top The top offset.
+   * @return { Array } An array of elements.
+   */
+
+
+  elementsBefore(left, top) {
+    return this.getElements(dom_navigator_DOMNavigator.DIRECTION.up).filter(el => el.offsetLeft <= left && el.offsetTop <= top);
+  }
+  /**
+   * Handle the key down event.
+   * @method DOMNavigator#handleKeydown
+   * @param { Event } event The event object.
+   */
+
+
+  handleKeydown(ev) {
+    const keys = converse.keycodes;
+    const direction = ev.shiftKey ? this.keys["".concat(keys.SHIFT, "+").concat(ev.which)] : this.keys[ev.which];
+
+    if (direction) {
+      ev.preventDefault();
+      ev.stopPropagation();
+      const next = this.getNextElement(direction, ev);
+      this.select(next, direction);
+    }
+  }
+
+}
+
+/* harmony default export */ var dom_navigator = (dom_navigator_DOMNavigator);
+// EXTERNAL MODULE: ./src/templates/emoji_button.html
+var emoji_button = __webpack_require__(157);
+var emoji_button_default = /*#__PURE__*/__webpack_require__.n(emoji_button);
+
+// EXTERNAL MODULE: ./src/templates/emojis.html
+var emojis = __webpack_require__(158);
+var emojis_default = /*#__PURE__*/__webpack_require__.n(emojis);
+
+// CONCATENATED MODULE: ./src/converse-emoji-views.js
+/**
+ * @module converse-emoji-views
+ * @copyright 2013-2019, the Converse.js developers
+ * @license Mozilla Public License (MPLv2)
+ */
+
+
+
+
+
+
+const {
+  Backbone: converse_emoji_views_Backbone,
+  sizzle: converse_emoji_views_sizzle
+} = converse.env;
+const converse_emoji_views_u = converse.env.utils;
+converse.plugins.add('converse-emoji-views', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-emoji", "converse-chatview", "converse-muc-views"],
+  overrides: {
+    ChatBoxView: {
+      events: {
+        'click .toggle-smiley': 'toggleEmojiMenu'
+      },
+
+      onEnterPressed() {
+        if (this.emoji_dropdown && converse_emoji_views_u.isVisible(this.emoji_dropdown.el.querySelector('.emoji-picker'))) {
+          this.emoji_dropdown.toggle();
+        }
+
+        this.__super__.onEnterPressed.apply(this, arguments);
+      },
+
+      onKeyDown(ev) {
+        if (ev.keyCode === converse.keycodes.TAB) {
+          const value = converse_emoji_views_u.getCurrentWord(ev.target, null, /(:.*?:)/g);
+
+          if (value.startsWith(':')) {
+            ev.preventDefault();
+            ev.stopPropagation();
+            return this.autocompleteInPicker(ev.target, value);
+          }
+        }
+
+        return this.__super__.onKeyDown.call(this, ev);
+      }
+
+    },
+    ChatRoomView: {
+      events: {
+        'click .toggle-smiley': 'toggleEmojiMenu'
+      }
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      'use_system_emojis': true,
+      'visible_toolbar_buttons': {
+        'emoji': true
+      }
+    });
+
+    const emoji_aware_chat_view = {
+      async autocompleteInPicker(input, value) {
+        await this.createEmojiDropdown();
+        this.emoji_picker_view.model.set({
+          'autocompleting': value,
+          'position': input.selectionStart
+        }, {
+          'silent': true
+        });
+        this.emoji_picker_view.filter(value, true);
+        this.emoji_dropdown.toggle();
+      },
+
+      async createEmojiPicker() {   // BAO issue #47
+        if (this.emoji_picker_view) {
+          this.insertEmojiPicker();
+          return;
+        }
+
+        if (!_converse.emojipicker) {
+          _converse.emojis.json.recent = {}; // BAO issue #47
+          const id = "converse.emoji-".concat(_converse.bare_jid);
+          _converse.emojipicker = new _converse.EmojiPicker({
+            'id': id
+          });
+          _converse.emojipicker.browserStorage = _converse.createStore(id);
+          await _converse.emojipicker.fetch();                                              // BAO issue #47
+          const recent = _converse.emojipicker.get('recent');
+          if (recent) _converse.emojis.json.recent = _converse.emojipicker.get('recent');   // BAO issue #47
+        }
+
+        this.emoji_picker_view = new _converse.EmojiPickerView({
+          'model': _converse.emojipicker
+        });
+        this.emoji_picker_view.chatview = this;
+        this.insertEmojiPicker();
+      },
+
+      async createEmojiDropdown() {
+        if (!this.emoji_dropdown) {
+          await _converse.api.waitUntil('emojisInitialized');
+          const el = this.el.querySelector('.emoji-picker');
+          this.emoji_dropdown = new bootstrap_native_default.a.Dropdown(el, true);
+          this.emoji_dropdown.el = el;
+        }
+      },
+
+      async toggleEmojiMenu(ev) {
+        ev.stopPropagation();
+        await this.emoji_picker_view.render();  // BAO issue #9
+        await this.createEmojiDropdown();
+        this.emoji_dropdown.toggle();
+        this.emoji_picker_view.setScrollPosition();
+      },
+
+      insertEmojiPicker() {
+        const el = this.el.querySelector('.emoji-picker__container');
+        el.innerHTML = '';
+        el.appendChild(this.emoji_picker_view.el);
+      }
+
+    };
+    Object.assign(_converse.ChatBoxView.prototype, emoji_aware_chat_view);
+    _converse.EmojiPickerView = converse_emoji_views_Backbone.VDOMView.extend({
+      className: 'emoji-picker',
+      events: {
+        'click .emoji-picker__header li.emoji-category .pick-category': 'chooseCategory',
+        'click .emoji-skintone-picker li.emoji-skintone': 'chooseSkinTone',
+        'click .insert-emoji': 'insertEmoji',
+        'focus .emoji-search': 'disableArrowNavigation',
+        'keydown .emoji-search': 'onKeyDown'
+      },
+
+      async initialize() {
+        this.onGlobalKeyDown = ev => this._onGlobalKeyDown(ev);
+
+        const body = document.querySelector('body');
+        body.addEventListener('keydown', this.onGlobalKeyDown);
+        this.search_results = [];
+        this.debouncedFilter = Object(lodash["debounce"])(input => this.filter(input.value), 150);
+        this.listenTo(this.model, 'change:query', this.render);
+        this.listenTo(this.model, 'change:current_skintone', this.render);
+        this.listenTo(this.model, 'change:current_category', () => {
+          this.render();
+          const category = this.model.get('current_category');
+          const el = this.el.querySelector(".emoji-category[data-category=\"".concat(category, "\"]"));
+          this.navigator.select(el);
+          !this.navigator.enabled && this.navigator.enable();
+        });
+        await _converse.api.waitUntil('emojisInitialized');
+        this.render();
+      },
+
+      toHTML() {
+        return emojis_default()(Object.assign(this.model.toJSON(), {
+          '__': __,
+          '_converse': _converse,
+          'emoji_categories': _converse.emoji_categories,
+          'emojis_by_category': _converse.emojis.json,
+          'shouldBeHidden': shortname => this.shouldBeHidden(shortname),
+          'skintones': ['tone1', 'tone2', 'tone3', 'tone4', 'tone5'],
+          'toned_emojis': _converse.emojis.toned,
+          'transform': converse_emoji_views_u.getEmojiRenderer(),
+          'transformCategory': shortname => converse_emoji_views_u.getEmojiRenderer()(this.getTonedShortname(shortname)),
+          'search_results': this.search_results
+        }));
+      },
+
+      remove() {
+        const body = document.querySelector('body');
+        body.removeEventListener('keydown', this.onGlobalKeyDown);
+        converse_emoji_views_Backbone.VDOMView.prototype.remove.call(this);
+      },
+
+      afterRender() {
+        this.initIntersectionObserver();
+        const textarea = this.el.querySelector('.emoji-search');
+        textarea.addEventListener('focus', ev => this.chatview.emitFocused(ev));
+        textarea.addEventListener('blur', ev => this.chatview.emitBlurred(ev));
+        this.initArrowNavigation();
+      },
+
+      initArrowNavigation() {
+        if (!this.navigator) {
+          const default_selector = 'li:not(.hidden):not(.emoji-skintone), .emoji-search';
+          const options = {
+            'jump_to_picked': '.emoji-category',
+            'jump_to_picked_selector': '.emoji-category.picked',
+            'jump_to_picked_direction': dom_navigator.DIRECTION.down,
+            'picked_selector': '.picked',
+            'scroll_container': this.el.querySelector('.emoji-picker__lists'),
+            'getSelector': direction => {
+              if (direction === dom_navigator.DIRECTION.down) {
+                const c = this.navigator.selected && this.navigator.selected.getAttribute('data-category');
+                return c ? "ul[data-category=\"".concat(c, "\"] li:not(.hidden):not(.emoji-skintone), .emoji-search") : default_selector;
+              } else {
+                return default_selector;
+              }
+            },
+            'onSelected': el => {
+              el.matches('.insert-emoji') && this.setCategoryForElement(el.parentElement);
+              el.matches('.insert-emoji, .emoji-category') && el.firstElementChild.focus();
+              el.matches('.emoji-search') && el.focus();
+            }
+          };
+          this.navigator = new dom_navigator(this.el, options);
+          this.listenTo(this.chatview.model, 'destroy', () => this.navigator.destroy());
+        }
+      },
+
+      enableArrowNavigation(ev) {
+        if (ev) {
+          ev.preventDefault();
+          ev.stopPropagation();
+        }
+
+        this.disableArrowNavigation();
+        this.navigator.enable();
+        this.navigator.handleKeydown(ev);
+      },
+
+      disableArrowNavigation() {
+        this.navigator.disable();
+      },
+
+      filter(value, set_property) {
+        const old_query = this.model.get('query');
+
+        if (!value) {
+          this.search_results = [];
+        } else if (old_query && value.includes(old_query)) {
+          this.search_results = this.search_results.filter(e => _converse.FILTER_CONTAINS(e.sn, value));
+        } else {
+          this.search_results = _converse.emojis_list.filter(e => _converse.FILTER_CONTAINS(e.sn, value));
+        }
+
+        this.model.set({
+          'query': value
+        });
+
+        if (set_property) {
+          // XXX: Ideally we would set `query` on the model and
+          // then let the view re-render, instead of doing it
+          // manually here. Snabbdom supports setting properties,
+          // Backbone.VDOMView doesn't.
+          const input = this.el.querySelector('.emoji-search');
+          input.value = value;
+        }
+      },
+
+      setCategoryForElement(el) {
+        const category = el.getAttribute('data-category');
+        const old_category = this.model.get('current_category');
+
+        if (old_category !== category) {
+          // XXX: Manually set the classes, it's quicker than using the VDOM
+          this.model.set({
+            'current_category': category
+          }, {
+            'silent': true
+          });
+          const category_els = converse_emoji_views_sizzle('.emoji-picker__header .emoji-category', this.el);
+          category_els.forEach(el => converse_emoji_views_u.removeClass('picked', el));
+          const new_el = category_els.filter(el => el.getAttribute('data-category') === category).pop();
+          new_el && converse_emoji_views_u.addClass('picked', new_el);
+        }
+      },
+
+      setCategoryOnVisibilityChange(ev) {
+        const selected = this.navigator.selected;
+        const intersection_with_selected = ev.filter(i => i.target.contains(selected)).pop();
+        let current; // Choose the intersection that contains the currently selected
+        // element, or otherwise the one with the largest ratio.
+
+        if (intersection_with_selected) {
+          current = intersection_with_selected;
+        } else {
+          current = ev.reduce((p, c) => c.intersectionRatio >= Object(lodash["get"])(p, 'intersectionRatio', 0) ? c : p, null);
+        }
+
+        current && current.isIntersecting && this.setCategoryForElement(current.target);
+      },
+
+      initIntersectionObserver() {
+        if (!window.IntersectionObserver) {
+          return;
+        }
+
+        if (this.observer) {
+          this.observer.disconnect();
+        } else {
+          const options = {
+            root: this.el.querySelector('.emoji-picker__lists'),
+            threshold: [0.1]
+          };
+
+          const handler = ev => this.setCategoryOnVisibilityChange(ev);
+
+          this.observer = new IntersectionObserver(handler, options);
+        }
+
+        converse_emoji_views_sizzle('.emoji-picker', this.el).forEach(a => this.observer.observe(a));
+      },
+
+      insertIntoTextArea(value) {
+        const replace = this.model.get('autocompleting');
+        const position = this.model.get('position');
+        this.model.set({
+          'autocompleting': null,
+          'position': null
+        });
+        this.chatview.handleEmojiSelected(value, replace, position);  // BAO issue #9
+
+        if (this.chatview.emoji_dropdown) {
+          this.chatview.emoji_dropdown.toggle();
+        }
+
+        this.filter('', true);
+        this.disableArrowNavigation();
+        this.saveEmoji(value);        // BAO issue #47
+      },
+
+      onEnterPressed(ev) {
+        ev.preventDefault();
+        ev.stopPropagation();
+
+        if (_converse.emoji_shortnames.includes(ev.target.value)) {
+          this.insertIntoTextArea(ev.target.value);
+        } else if (this.search_results.length === 1) {
+          this.insertIntoTextArea(this.search_results[0].sn);
+        } else if (this.navigator.selected && this.navigator.selected.matches('.insert-emoji')) {
+          this.insertIntoTextArea(this.navigator.selected.getAttribute('data-emoji'));
+        } else if (this.navigator.selected && this.navigator.selected.matches('.emoji-category')) {
+          this.chooseCategory({
+            'target': this.navigator.selected
+          });
+        }
+      },
+
+      _onGlobalKeyDown(ev) {
+        if (!this.navigator) {
+          return;
+        }
+
+        if (ev.keyCode === converse.keycodes.ENTER && this.navigator.selected && converse_emoji_views_u.isVisible(this.el)) {
+          this.onEnterPressed(ev);
+        } else if (ev.keyCode === converse.keycodes.DOWN_ARROW && !this.navigator.enabled && converse_emoji_views_u.isVisible(this.el)) {
+          this.enableArrowNavigation(ev);
+        }
+      },
+
+      onKeyDown(ev) {
+        if (ev.keyCode === converse.keycodes.RIGHT_ARROW) {
+          ev.preventDefault();
+          ev.stopPropagation();
+          ev.target.blur();
+          const first_el = this.el.querySelector('.pick-category');
+          this.navigator.select(first_el, 'right');
+        } else if (ev.keyCode === converse.keycodes.TAB) {
+          if (ev.target.value) {
+            ev.preventDefault();
+            const match = Object(lodash["find"])(_converse.emoji_shortnames, sn => _converse.FILTER_CONTAINS(sn, ev.target.value));
+            match && this.filter(match, true);
+          } else if (!this.navigator.enabled) {
+            this.enableArrowNavigation(ev);
+          }
+        } else if (ev.keyCode === converse.keycodes.DOWN_ARROW && !this.navigator.enabled) {
+          this.enableArrowNavigation(ev);
+        } else if (ev.keyCode === converse.keycodes.ENTER) {
+          this.onEnterPressed(ev);
+        } else if (ev.keyCode !== converse.keycodes.ENTER && ev.keyCode !== converse.keycodes.DOWN_ARROW) {
+          this.debouncedFilter(ev.target);
+        }
+      },
+
+      shouldBeHidden(shortname) {
+        // Helper method for the template which decides whether an
+        // emoji should be hidden, based on which skin tone is
+        // currently being applied.
+        const current_skintone = this.model.get('current_skintone');
+
+        if (shortname.includes('_tone')) {
+          if (!current_skintone || !shortname.includes(current_skintone)) {
+            return true;
+          }
+        } else {
+          if (current_skintone && _converse.emojis.toned.includes(shortname)) {
+            return true;
+          }
+        }
+
+        const query = this.model.get('query');
+
+        if (query && !_converse.FILTER_CONTAINS(shortname, query)) {
+          return true;
+        }
+
+        return false;
+      },
+
+      getTonedShortname(shortname) {
+        if (_converse.emojis.toned.includes(shortname) && this.model.get('current_skintone')) {
+          return "".concat(shortname.slice(0, shortname.length - 1), "_").concat(this.model.get('current_skintone'), ":");
+        }
+
+        return shortname;
+      },
+
+      chooseSkinTone(ev) {
+        ev.preventDefault();
+        ev.stopPropagation();
+        const target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
+        const skintone = target.getAttribute("data-skintone").trim();
+
+        if (this.model.get('current_skintone') === skintone) {
+          this.model.save({
+            'current_skintone': ''
+          });
+        } else {
+          this.model.save({
+            'current_skintone': skintone
+          });
+        }
+      },
+
+      chooseCategory(ev) {
+        ev.preventDefault && ev.preventDefault();
+        ev.stopPropagation && ev.stopPropagation();
+        const input = this.el.querySelector('.emoji-search');
+        input.value = '';
+        const el = ev.target.matches('li') ? ev.target : converse_emoji_views_u.ancestor(ev.target, 'li');
+        this.setCategoryForElement(el);
+        this.navigator.select(el);
+        this.setScrollPosition();
+      },
+
+      setScrollPosition() {
+        const category = this.model.get('current_category');
+        const el = this.el.querySelector('.emoji-picker__lists');
+        const heading = this.el.querySelector("#emoji-picker-".concat(category));
+
+        if (heading) {
+          // +4 due to 2px padding on list elements
+          el.scrollTop = heading.offsetTop - heading.offsetHeight * 3 + 4;
+        }
+      },
+      // BAO issue #47
+
+      saveEmoji(value) {
+        const emoji = _converse.emojis_list.filter(e => _converse.FILTER_CONTAINS(e.sn, value));
+        const item = emoji[0];
+
+        if (item.c != 'recent')
+        {
+            item.c = 'recent';
+            _converse.emojis.json.recent[value] = item;
+            _converse.emojipicker.save('recent', _converse.emojis.json.recent);
+            this.render();
+        }
+      },
+
+      insertEmoji(ev) {
+        ev.preventDefault();
+        ev.stopPropagation();
+        const target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
+        const replace = this.model.get('autocompleting');
+        const position = this.model.get('position');
+        this.model.set({
+          'autocompleting': null,
+          'position': null
+        });
+        this.chatview.handleEmojiSelected(target.getAttribute('data-emoji'), replace, position);  // BAO issue #9
+        this.chatview.emoji_dropdown.toggle();
+        this.filter('', true);
+        this.saveEmoji(target.getAttribute('data-emoji'));  // BAO issue #47
+      }
+
+    });
+    /************************ BEGIN Event Handlers ************************/
+
+    _converse.api.listen.on('chatBoxClosed', view => view.emoji_picker_view && view.emoji_picker_view.remove());
+
+    _converse.api.listen.on('renderToolbar', view => {
+      if (_converse.visible_toolbar_buttons.emoji) {
+        const html = emoji_button_default()({
+          'tooltip_insert_smiley': __('Insert emojis')
+        });
+        view.el.querySelector('.chat-toolbar').insertAdjacentHTML('afterBegin', html);
+        view.createEmojiPicker();
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/converse-singleton.js
+/**
+ * @module converse-singleton
+ * @copyright JC Brand
+ * @license Mozilla Public License (MPLv2)
+ * @description A plugin which restricts Converse to only one chat.
+ */
+
+converse_core.plugins.add('converse-singleton', {
+  enabled(_converse) {
+    return _converse.singleton;
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    this._converse.api.settings.update({
+      'allow_logout': false,
+      // No point in logging out when we have auto_login as true.
+      'allow_muc_invitations': false,
+      // Doesn't make sense to allow because only
+      // roster contacts can be invited
+      'hide_muc_server': true
+    });
+
+    const {
+      _converse
+    } = this;
+
+    if (!Array.isArray(_converse.auto_join_rooms) && !Array.isArray(_converse.auto_join_private_chats)) {
+      throw new Error("converse-singleton: auto_join_rooms must be an Array");
+    }
+
+    if (_converse.auto_join_rooms.length > 1 || _converse.auto_join_private_chats.length > 1) {
+      throw new Error("It doesn't make sense to have singleton set to true and " + "auto_join_rooms or auto_join_private_chats set to more then one, " + "since only one chat room may be open at any time.");
+    }
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/inverse_brand_heading.html
+var inverse_brand_heading = __webpack_require__(159);
+var inverse_brand_heading_default = /*#__PURE__*/__webpack_require__.n(inverse_brand_heading);
+
+// CONCATENATED MODULE: ./src/converse-fullscreen.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) JC Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-fullscreen
+ */
+
+
+
+
+
+
+converse_core.plugins.add('converse-fullscreen', {
+  enabled(_converse) {
+    return _converse.isUniView();
+  },
+
+  overrides: {
+    // overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // new functions which don't exist yet can also be added.
+    ControlBoxView: {
+      createBrandHeadingHTML() {
+        const {
+          _converse
+        } = this.__super__;
+        return inverse_brand_heading_default()({
+          'version_name': _converse.VERSION_NAME
+        });
+      },
+
+      insertBrandHeading() {
+        const {
+          _converse
+        } = this.__super__;
+
+        const el = _converse.root.getElementById('converse-login-panel');
+
+        el.parentNode.insertAdjacentHTML('afterbegin', this.createBrandHeadingHTML());
+      }
+
+    }
+  },
+
+  initialize() {
+    this._converse.api.settings.update({
+      chatview_avatar_height: 50,
+      chatview_avatar_width: 50,
+      hide_open_bookmarks: true,
+      show_controlbox_by_default: true,
+      sticky_controlbox: true
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/converse-mam-views.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2012-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-mam-views
+ * @description
+ * Views for XEP-0313 Message Archive Management
+ */
+
+
+converse_core.plugins.add('converse-mam-views', {
+  dependencies: ['converse-mam', 'converse-chatview', 'converse-muc-views'],
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // New functions which don't exist yet can also be added.
+    ChatBoxView: {
+      render() {
+        const result = this.__super__.render.apply(this, arguments);
+
+        if (!this.disable_mam) {
+          this.content.addEventListener('scroll', Object(lodash["debounce"])(this.onScroll.bind(this), 100));
+        }
+
+        return result;
+      },
+
+      async onScroll() {
+        if (this.content.scrollTop === 0 && this.model.messages.length) {
+          const oldest_message = this.model.getOldestMessage();
+
+          if (oldest_message) {
+            const by_jid = this.model.get('jid');
+            const stanza_id = oldest_message && oldest_message.get("stanza_id ".concat(by_jid));
+            this.addSpinner();
+
+            if (stanza_id) {
+              await this.model.fetchArchivedMessages({
+                'before': stanza_id
+              });
+            } else {
+              await this.model.fetchArchivedMessages({
+                'end': oldest_message.get('time')
+              });
+            }
+
+            this.clearSpinner();
+          }
+        }
+      }
+
+    },
+    ChatRoomView: {
+      renderChatArea() {
+        const result = this.__super__.renderChatArea.apply(this, arguments);
+
+        if (!this.disable_mam) {
+          this.content.addEventListener('scroll', Object(lodash["debounce"])(this.onScroll.bind(this), 100));
+        }
+
+        return result;
+      }
+
+    }
+  }
+});
+// EXTERNAL MODULE: ./src/templates/chatbox_minimize.html
+var chatbox_minimize = __webpack_require__(64);
+var chatbox_minimize_default = /*#__PURE__*/__webpack_require__.n(chatbox_minimize);
+
+// EXTERNAL MODULE: ./src/templates/chats_panel.html
+var chats_panel = __webpack_require__(160);
+var chats_panel_default = /*#__PURE__*/__webpack_require__.n(chats_panel);
+
+// EXTERNAL MODULE: ./src/templates/toggle_chats.html
+var toggle_chats = __webpack_require__(161);
+var toggle_chats_default = /*#__PURE__*/__webpack_require__.n(toggle_chats);
+
+// EXTERNAL MODULE: ./src/templates/trimmed_chat.html
+var trimmed_chat = __webpack_require__(162);
+var trimmed_chat_default = /*#__PURE__*/__webpack_require__.n(trimmed_chat);
+
+// CONCATENATED MODULE: ./src/converse-minimize.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-minimize
+ */
+
+
+
+
+
+
+
+const {
+  _: converse_minimize_,
+  Backbone: converse_minimize_Backbone,
+  dayjs: converse_minimize_dayjs
+} = converse_core.env;
+const converse_minimize_u = converse_core.env.utils;
+converse_core.plugins.add('converse-minimize', {
+  /* Optional dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin. They are called "optional" because they might not be
+   * available, in which case any overrides applicable to them will be
+   * ignored.
+   *
+   * It's possible however to make optional dependencies non-optional.
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-chatview", "converse-controlbox", "converse-muc-views", "converse-headlines-view", "converse-dragresize"],
+
+  enabled(_converse) {
+    return _converse.view_mode === 'overlayed';
+  },
+
+  overrides: {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // New functions which don't exist yet can also be added.
+    ChatBox: {
+      initialize() {
+        this.__super__.initialize.apply(this, arguments);
+
+        this.on('show', this.maximize, this);
+
+        if (this.get('id') === 'controlbox') {
+          return;
+        }
+
+        this.save({
+          'minimized': this.get('minimized') || false,
+          'time_minimized': this.get('time_minimized') || converse_minimize_dayjs()
+        });
+      },
+
+      maybeShow(force) {
+        if (!force && this.get('minimized')) {
+          // Must return the chatbox
+          return this;
+        }
+
+        return this.__super__.maybeShow.apply(this, arguments);
+      }
+
+    },
+    ChatBoxView: {
+      events: {
+        'click .toggle-chatbox-button': 'minimize'
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'change:minimized', this.onMinimizedChanged);
+        return this.__super__.initialize.apply(this, arguments);
+      },
+
+      show() {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (_converse.view_mode === 'overlayed' && this.model.get('minimized')) {
+          this.model.minimize();
+          return this;
+        } else {
+          return this.__super__.show.apply(this, arguments);
+        }
+      },
+
+      isNewMessageHidden() {
+        return this.model.get('minimized') || this.__super__.isNewMessageHidden.apply(this, arguments);
+      },
+
+      shouldShowOnTextMessage() {
+        return !this.model.get('minimized') && this.__super__.shouldShowOnTextMessage.apply(this, arguments);
+      },
+
+      setChatBoxHeight(height) {
+        if (!this.model.get('minimized')) {
+          return this.__super__.setChatBoxHeight.call(this, height);
+        }
+      },
+
+      setChatBoxWidth(width) {
+        if (!this.model.get('minimized')) {
+          return this.__super__.setChatBoxWidth.call(this, width);
+        }
+      }
+
+    },
+    ChatBoxHeading: {
+      render() {
+        const {
+          _converse
+        } = this.__super__;
+        const {
+          __
+        } = _converse;
+
+        this.__super__.render.apply(this, arguments);
+
+        const new_html = chatbox_minimize_default()({
+          'info_minimize': __('Minimize this chat box')
+        });
+        const el = this.el.querySelector('.toggle-chatbox-button');
+
+        if (el) {
+          el.outerHTML = new_html;
+        } else {
+          const button = this.el.querySelector('.close-chatbox-button');
+          button.insertAdjacentHTML('afterEnd', new_html);
+        }
+      }
+
+    },
+    ChatRoomView: {
+      events: {
+        'click .toggle-chatbox-button': 'minimize'
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'change:minimized', this.onMinimizedChanged);
+
+        const result = this.__super__.initialize.apply(this, arguments);
+
+        if (this.model.get('minimized')) {
+          this.hide();
+        }
+
+        return result;
+      },
+
+      generateHeadingHTML() {
+        const {
+          _converse
+        } = this.__super__,
+              {
+          __
+        } = _converse;
+
+        const html = this.__super__.generateHeadingHTML.apply(this, arguments);
+
+        const div = document.createElement('div');
+        div.innerHTML = html;
+        const buttons_row = div.querySelector('.chatbox-buttons');
+        const button = buttons_row.querySelector('.close-chatbox-button');
+        const minimize_el = chatbox_minimize_default()({
+          'info_minimize': __('Minimize this chat box')
+        });
+
+        if (button) {
+          button.insertAdjacentHTML('afterend', minimize_el);
+        } else {
+          buttons_row.insertAdjacentHTML('beforeEnd', minimize_el);
+        }
+
+        return div.innerHTML;
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by Converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      'no_trimming': false
+    });
+
+    const minimizableChatBox = {
+      maximize() {
+        converse_minimize_u.safeSave(this, {
+          'minimized': false,
+          'time_opened': new Date().getTime()
+        });
+      },
+
+      minimize() {
+        converse_minimize_u.safeSave(this, {
+          'minimized': true,
+          'time_minimized': new Date().toISOString()
+        });
+      }
+
+    };
+    Object.assign(_converse.ChatBox.prototype, minimizableChatBox);
+    const minimizableChatBoxView = {
+      /**
+       * Handler which gets called when a {@link _converse#ChatBox} has it's
+       * `minimized` property set to false.
+       *
+       * Will trigger {@link _converse#chatBoxMaximized}
+       * @private
+       * @returns {_converse.ChatBoxView|_converse.ChatRoomView}
+       */
+      onMaximized() {
+        const {
+          _converse
+        } = this.__super__;
+        this.insertIntoDOM();
+
+        if (!this.model.isScrolledUp()) {
+          this.model.clearUnreadMsgCounter();
+        }
+
+        this.model.setChatState(_converse.ACTIVE);
+        this.show();
+        /**
+         * Triggered when a previously minimized chat gets maximized
+         * @event _converse#chatBoxMaximized
+         * @type { _converse.ChatBoxView }
+         * @example _converse.api.listen.on('chatBoxMaximized', view => { ... });
+         */
+
+        _converse.api.trigger('chatBoxMaximized', this);
+
+        return this;
+      },
+
+      /**
+       * Handler which gets called when a {@link _converse#ChatBox} has it's
+       * `minimized` property set to true.
+       *
+       * Will trigger {@link _converse#chatBoxMinimized}
+       * @private
+       * @returns {_converse.ChatBoxView|_converse.ChatRoomView}
+       */
+      onMinimized(ev) {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        } // save the scroll position to restore it on maximize
+
+
+        if (this.model.collection && this.model.collection.browserStorage) {
+          this.model.save({
+            'scroll': this.content.scrollTop
+          });
+        } else {
+          this.model.set({
+            'scroll': this.content.scrollTop
+          });
+        }
+
+        this.model.setChatState(_converse.INACTIVE);
+        this.hide();
+        /**
+         * Triggered when a previously maximized chat gets Minimized
+         * @event _converse#chatBoxMinimized
+         * @type { _converse.ChatBoxView }
+         * @example _converse.api.listen.on('chatBoxMinimized', view => { ... });
+         */
+
+        _converse.api.trigger('chatBoxMinimized', this);
+
+        return this;
+      },
+
+      /**
+       * Minimizes a chat box.
+       * @returns {_converse.ChatBoxView|_converse.ChatRoomView}
+       */
+      minimize() {
+        this.model.minimize();
+        return this;
+      },
+
+      onMinimizedChanged(item) {
+        if (item.get('minimized')) {
+          this.onMinimized();
+        } else {
+          this.onMaximized();
+        }
+      }
+
+    };
+    Object.assign(_converse.ChatBoxView.prototype, minimizableChatBoxView);
+    const chatTrimmer = {
+      getChatBoxWidth(view) {
+        if (view.model.get('id') === 'controlbox') {
+          const controlbox = this.get('controlbox'); // We return the width of the controlbox or its toggle,
+          // depending on which is visible.
+
+          if (!controlbox || !converse_minimize_u.isVisible(controlbox.el)) {
+            return converse_minimize_u.getOuterWidth(_converse.controlboxtoggle.el, true);
+          } else {
+            return converse_minimize_u.getOuterWidth(controlbox.el, true);
+          }
+        } else if (!view.model.get('minimized') && converse_minimize_u.isVisible(view.el)) {
+          return converse_minimize_u.getOuterWidth(view.el, true);
+        }
+
+        return 0;
+      },
+
+      getShownChats() {
+        return this.filter(view => // The controlbox can take a while to close,
+        // so we need to check its state. That's why we checked
+        // the 'closed' state.
+        !view.model.get('minimized') && !view.model.get('closed') && converse_minimize_u.isVisible(view.el));
+      },
+
+      getMinimizedWidth() {
+        const minimized_el = converse_minimize_.get(_converse.minimized_chats, 'el');
+
+        return converse_minimize_.includes(this.model.pluck('minimized'), true) ? converse_minimize_u.getOuterWidth(minimized_el, true) : 0;
+      },
+
+      getBoxesWidth(newchat) {
+        const new_id = newchat ? newchat.model.get('id') : null;
+        const newchat_width = newchat ? converse_minimize_u.getOuterWidth(newchat.el, true) : 0;
+        return Object.values(this.xget(new_id)).reduce((memo, view) => memo + this.getChatBoxWidth(view), newchat_width);
+      },
+
+      /**
+       * This method is called when a newly created chat box will be shown.
+       * It checks whether there is enough space on the page to show
+       * another chat box. Otherwise it minimizes the oldest chat box
+       * to create space.
+       * @private
+       * @method _converse.ChatBoxViews#trimChats
+       * @param { _converse.ChatBoxView|_converse.ChatRoomView|_converse.ControlBoxView|_converse.HeadlinesBoxView } [newchat]
+       */
+      async trimChats(newchat) {
+        if (_converse.no_trimming || !_converse.api.connection.connected() || _converse.view_mode !== 'overlayed') {
+          return;
+        }
+
+        const shown_chats = this.getShownChats();
+
+        if (shown_chats.length <= 1) {
+          return;
+        }
+
+        const body_width = converse_minimize_u.getOuterWidth(document.querySelector('body'), true);
+
+        if (this.getChatBoxWidth(shown_chats[0]) === body_width) {
+          // If the chats shown are the same width as the body,
+          // then we're in responsive mode and the chats are
+          // fullscreen. In this case we don't trim.
+          return;
+        }
+
+        await _converse.api.waitUntil('minimizedChatsInitialized');
+
+        const minimized_el = converse_minimize_.get(_converse.minimized_chats, 'el');
+
+        if (minimized_el) {
+          while (this.getMinimizedWidth() + this.getBoxesWidth(newchat) > body_width) {
+            const new_id = newchat ? newchat.model.get('id') : null;
+            const oldest_chat = this.getOldestMaximizedChat([new_id]);
+
+            if (oldest_chat) {
+              // We hide the chat immediately, because waiting
+              // for the event to fire (and letting the
+              // ChatBoxView hide it then) causes race
+              // conditions.
+              const view = this.get(oldest_chat.get('id'));
+
+              if (view) {
+                view.hide();
+              }
+
+              oldest_chat.minimize();
+            } else {
+              break;
+            }
+          }
+        }
+      },
+
+      getOldestMaximizedChat(exclude_ids) {
+        // Get oldest view (if its id is not excluded)
+        exclude_ids.push('controlbox');
+        let i = 0;
+        let model = this.model.sort().at(i);
+
+        while (converse_minimize_.includes(exclude_ids, model.get('id')) || model.get('minimized') === true) {
+          i++;
+          model = this.model.at(i);
+
+          if (!model) {
+            return null;
+          }
+        }
+
+        return model;
+      }
+
+    };
+    Object.assign(_converse.ChatBoxViews.prototype, chatTrimmer);
+
+    _converse.api.promises.add('minimizedChatsInitialized');
+
+    _converse.MinimizedChatBoxView = converse_minimize_Backbone.NativeView.extend({
+      tagName: 'div',
+      events: {
+        'click .close-chatbox-button': 'close',
+        'click .restore-chat': 'restore'
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'change:num_unread', this.render);
+        this.listenTo(this.model, 'change:name', this.render);
+        this.listenTo(this.model, 'change:fullname', this.render);
+        this.listenTo(this.model, 'change:jid', this.render);
+        this.listenTo(this.model, 'destroy', this.remove);
+        /**
+         * Triggered once a {@link _converse.MinimizedChatBoxView } has been initialized
+         * @event _converse#minimizedChatViewInitialized
+         * @type { _converse.MinimizedChatBoxView }
+         * @example _converse.api.listen.on('minimizedChatViewInitialized', view => { ... });
+         */
+
+        _converse.api.trigger('minimizedChatViewInitialized', this);
+      },
+
+      render() {
+        const data = Object.assign(this.model.toJSON(), {
+          'tooltip': __('Click to restore this chat'),
+          'title': this.model.getDisplayName()
+        });
+        this.el.innerHTML = trimmed_chat_default()(data);
+        return this.el;
+      },
+
+      close(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        this.remove();
+
+        const view = _converse.chatboxviews.get(this.model.get('id'));
+
+        if (view) {
+          // This will call model.destroy(), removing it from the
+          // collection and will also emit 'chatBoxClosed'
+          view.close();
+        } else {
+          this.model.destroy();
+
+          _converse.api.trigger('chatBoxClosed', this);
+        }
+
+        return this;
+      },
+
+      restore: converse_minimize_.debounce(function (ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        this.model.off('change:num_unread', null, this);
+        this.remove();
+        this.model.maximize();
+      }, 200, {
+        'leading': true
+      })
+    });
+    _converse.MinimizedChats = Overview.extend({
+      tagName: 'div',
+      id: "minimized-chats",
+      className: 'hidden',
+      events: {
+        "click #toggle-minimized-chats": "toggle"
+      },
+
+      initialize() {
+        this.render();
+        this.initToggle();
+        this.addMultipleChats(this.model.where({
+          'minimized': true
+        }));
+        this.listenTo(this.model, "add", this.onChanged);
+        this.listenTo(this.model, "destroy", this.removeChat);
+        this.listenTo(this.model, "change:minimized", this.onChanged);
+        this.listenTo(this.model, 'change:num_unread', this.updateUnreadMessagesCounter);
+      },
+
+      render() {
+        if (!this.el.parentElement) {
+          this.el.innerHTML = chats_panel_default()();
+
+          _converse.chatboxviews.insertRowColumn(this.el);
+        }
+
+        if (this.keys().length === 0) {
+          this.el.classList.add('hidden');
+        } else if (this.keys().length > 0 && !converse_minimize_u.isVisible(this.el)) {
+          this.el.classList.remove('hidden');
+        }
+
+        return this.el;
+      },
+
+      initToggle() {
+        const id = "converse.minchatstoggle-".concat(_converse.bare_jid);
+        this.toggleview = new _converse.MinimizedChatsToggleView({
+          'model': new _converse.MinimizedChatsToggle({
+            'id': id
+          })
+        });
+        this.toggleview.model.browserStorage = _converse.createStore(id);
+        this.toggleview.model.fetch();
+      },
+
+      toggle(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        this.toggleview.model.save({
+          'collapsed': !this.toggleview.model.get('collapsed')
+        });
+        converse_minimize_u.slideToggleElement(this.el.querySelector('.minimized-chats-flyout'), 200);
+      },
+
+      onChanged(item) {
+        if (item.get('id') === 'controlbox') {
+          // The ControlBox has it's own minimize toggle
+          return;
+        }
+
+        if (item.get('minimized')) {
+          this.addChat(item);
+        } else if (this.get(item.get('id'))) {
+          this.removeChat(item);
+        }
+      },
+
+      addChatView(item) {
+        const existing = this.get(item.get('id'));
+
+        if (existing && existing.el.parentNode) {
+          return;
+        }
+
+        const view = new _converse.MinimizedChatBoxView({
+          model: item
+        });
+        this.el.querySelector('.minimized-chats-flyout').insertAdjacentElement('beforeEnd', view.render());
+        this.add(item.get('id'), view);
+      },
+
+      addMultipleChats(items) {
+        items.forEach(item => this.addChatView(item));
+        this.toggleview.model.set({
+          'num_minimized': this.keys().length
+        });
+        this.render();
+      },
+
+      addChat(item) {
+        this.addChatView(item);
+        this.toggleview.model.set({
+          'num_minimized': this.keys().length
+        });
+        this.render();
+      },
+
+      removeChat(item) {
+        this.remove(item.get('id'));
+        this.toggleview.model.set({
+          'num_minimized': this.keys().length
+        });
+        this.render();
+      },
+
+      updateUnreadMessagesCounter() {
+        this.toggleview.model.save({
+          'num_unread': converse_minimize_.sum(this.model.pluck('num_unread'))
+        });
+        this.render();
+      }
+
+    });
+    _converse.MinimizedChatsToggle = converse_minimize_Backbone.Model.extend({
+      defaults: {
+        'collapsed': false,
+        'num_minimized': 0,
+        'num_unread': 0
+      }
+    });
+    _converse.MinimizedChatsToggleView = converse_minimize_Backbone.NativeView.extend({
+      _setElement() {
+        this.el = _converse.root.querySelector('#toggle-minimized-chats');
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'change:num_minimized', this.render);
+        this.listenTo(this.model, 'change:num_unread', this.render);
+        this.flyout = this.el.parentElement.querySelector('.minimized-chats-flyout');
+      },
+
+      render() {
+        this.el.innerHTML = toggle_chats_default()(Object.assign(this.model.toJSON(), {
+          'Minimized': __('Minimized')
+        }));
+
+        if (this.model.get('collapsed')) {
+          converse_minimize_u.hideElement(this.flyout);
+        } else {
+          converse_minimize_u.showElement(this.flyout);
+        }
+
+        return this.el;
+      }
+
+    });
+
+    function initMinimizedChats() {
+      _converse.minimized_chats = new _converse.MinimizedChats({
+        model: _converse.chatboxes
+      });
+      /**
+       * Triggered once the _converse.MinimizedChats instance has been initialized
+       * @event _converse#minimizedChatsInitialized
+       * @example _converse.api.listen.on('minimizedChatsInitialized', () => { ... });
+       */
+
+      _converse.api.trigger('minimizedChatsInitialized');
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('chatBoxViewsInitialized', () => initMinimizedChats());
+
+    _converse.api.listen.on('chatBoxInsertedIntoDOM', view => _converse.chatboxviews.trimChats(view));
+
+    _converse.api.listen.on('controlBoxOpened', view => _converse.chatboxviews.trimChats(view));
+
+    const debouncedTrimChats = converse_minimize_.debounce(() => _converse.chatboxviews.trimChats(), 250);
+
+    _converse.api.listen.on('registeredGlobalEventHandlers', () => window.addEventListener("resize", debouncedTrimChats));
+
+    _converse.api.listen.on('unregisteredGlobalEventHandlers', () => window.removeEventListener("resize", debouncedTrimChats));
+    /************************ END Event Handlers ************************/
+
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/add_chatroom_modal.html
+var add_chatroom_modal = __webpack_require__(163);
+var add_chatroom_modal_default = /*#__PURE__*/__webpack_require__.n(add_chatroom_modal);
+
+// EXTERNAL MODULE: ./src/templates/chatarea.html
+var chatarea = __webpack_require__(164);
+var chatarea_default = /*#__PURE__*/__webpack_require__.n(chatarea);
+
+// EXTERNAL MODULE: ./src/templates/chatroom.html
+var templates_chatroom = __webpack_require__(165);
+var chatroom_default = /*#__PURE__*/__webpack_require__.n(templates_chatroom);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_bottom_panel.html
+var chatroom_bottom_panel = __webpack_require__(166);
+var chatroom_bottom_panel_default = /*#__PURE__*/__webpack_require__.n(chatroom_bottom_panel);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_destroyed.html
+var chatroom_destroyed = __webpack_require__(167);
+var chatroom_destroyed_default = /*#__PURE__*/__webpack_require__.n(chatroom_destroyed);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_details_modal.html
+var chatroom_details_modal = __webpack_require__(168);
+var chatroom_details_modal_default = /*#__PURE__*/__webpack_require__.n(chatroom_details_modal);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_disconnect.html
+var chatroom_disconnect = __webpack_require__(169);
+var chatroom_disconnect_default = /*#__PURE__*/__webpack_require__.n(chatroom_disconnect);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_features.html
+var chatroom_features = __webpack_require__(170);
+var chatroom_features_default = /*#__PURE__*/__webpack_require__.n(chatroom_features);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_form.html
+var chatroom_form = __webpack_require__(171);
+var chatroom_form_default = /*#__PURE__*/__webpack_require__.n(chatroom_form);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_head.html
+var chatroom_head = __webpack_require__(172);
+var chatroom_head_default = /*#__PURE__*/__webpack_require__.n(chatroom_head);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_invite.html
+var chatroom_invite = __webpack_require__(65);
+var chatroom_invite_default = /*#__PURE__*/__webpack_require__.n(chatroom_invite);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_nickname_form.html
+var chatroom_nickname_form = __webpack_require__(173);
+var chatroom_nickname_form_default = /*#__PURE__*/__webpack_require__.n(chatroom_nickname_form);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_password_form.html
+var chatroom_password_form = __webpack_require__(174);
+var chatroom_password_form_default = /*#__PURE__*/__webpack_require__.n(chatroom_password_form);
+
+// EXTERNAL MODULE: ./src/templates/chatroom_sidebar.html
+var chatroom_sidebar = __webpack_require__(175);
+var chatroom_sidebar_default = /*#__PURE__*/__webpack_require__.n(chatroom_sidebar);
+
+// EXTERNAL MODULE: ./src/templates/list_chatrooms_modal.html
+var list_chatrooms_modal = __webpack_require__(176);
+var list_chatrooms_modal_default = /*#__PURE__*/__webpack_require__.n(list_chatrooms_modal);
+
+// EXTERNAL MODULE: ./src/templates/moderator_tools_modal.html
+var moderator_tools_modal = __webpack_require__(177);
+var moderator_tools_modal_default = /*#__PURE__*/__webpack_require__.n(moderator_tools_modal);
+
+// EXTERNAL MODULE: ./src/templates/occupant.html
+var templates_occupant = __webpack_require__(178);
+var occupant_default = /*#__PURE__*/__webpack_require__.n(templates_occupant);
+
+// EXTERNAL MODULE: ./src/templates/room_description.html
+var room_description = __webpack_require__(179);
+var room_description_default = /*#__PURE__*/__webpack_require__.n(room_description);
+
+// EXTERNAL MODULE: ./src/templates/room_item.html
+var room_item = __webpack_require__(180);
+var room_item_default = /*#__PURE__*/__webpack_require__.n(room_item);
+
+// EXTERNAL MODULE: ./src/templates/room_panel.html
+var room_panel = __webpack_require__(181);
+var room_panel_default = /*#__PURE__*/__webpack_require__.n(room_panel);
+
+// EXTERNAL MODULE: ./src/templates/rooms_results.html
+var rooms_results = __webpack_require__(66);
+var rooms_results_default = /*#__PURE__*/__webpack_require__.n(rooms_results);
+
+// CONCATENATED MODULE: ./src/converse-muc-views.js
+/**
+ * @module converse-muc-views
+ * @copyright 2013-2019, the Converse.js developers
+ * @description XEP-0045 Multi-User Chat Views
+ * @license Mozilla Public License (MPLv2)
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const {
+  Backbone: converse_muc_views_Backbone,
+  Strophe: converse_muc_views_Strophe,
+  sizzle: converse_muc_views_sizzle,
+  _: converse_muc_views_,
+  $iq: converse_muc_views_$iq,
+  $pres: converse_muc_views_$pres
+} = converse_core.env;
+const converse_muc_views_u = converse_core.env.utils;
+const ROLES = ['moderator', 'participant', 'visitor'];
+const AFFILIATIONS = ['admin', 'member', 'outcast', 'owner'];
+const OWNER_COMMANDS = ['owner'];
+const ADMIN_COMMANDS = ['admin', 'ban', 'deop', 'destroy', 'member', 'op', 'revoke'];
+const MODERATOR_COMMANDS = ['kick', 'mute', 'voice', 'modtools'];
+const VISITOR_COMMANDS = ['nick'];
+const COMMAND_TO_ROLE = {
+  'deop': 'participant',
+  'kick': 'none',
+  'mute': 'visitor',
+  'op': 'moderator',
+  'voice': 'participant'
+};
+const COMMAND_TO_AFFILIATION = {
+  'admin': 'admin',
+  'ban': 'outcast',
+  'member': 'member',
+  'owner': 'owner',
+  'revoke': 'none'
+};
+converse_core.plugins.add('converse-muc-views', {
+  /* Dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin. They are "optional" because they might not be
+   * available, in which case any overrides applicable to them will be
+   * ignored.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   *
+   * It's possible to make these dependencies "non-optional".
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found.
+   */
+  dependencies: ["converse-autocomplete", "converse-modal", "converse-controlbox", "converse-chatview"],
+  overrides: {
+    ControlBoxView: {
+      renderControlBoxPane() {
+        const {
+          _converse
+        } = this.__super__;
+
+        this.__super__.renderControlBoxPane.apply(this, arguments);
+
+        if (_converse.allow_muc) {
+          this.renderRoomsPanel();
+        }
+      }
+
+    }
+  },
+
+  initialize() {
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse;
+
+    _converse.api.promises.add(['roomsPanelRendered']); // Configuration values for this plugin
+    // ====================================
+    // Refer to docs/source/configuration.rst for explanations of these
+    // configuration settings.
+
+
+    _converse.api.settings.update({
+      'auto_list_rooms': false,
+      'cache_muc_messages': true,
+      'locked_muc_nickname': false,
+      'show_retraction_warning': true,
+      'muc_disable_slash_commands': false,
+      'muc_show_room_info': false,               // BAO issue #121 (converse #1998)
+      'muc_show_join_leave': true,
+      'muc_show_join_leave_status': true,
+      'muc_mention_autocomplete_min_chars': 0,
+      'muc_mention_autocomplete_filter': 'contains',
+      'muc_mention_autocomplete_show_avatar': true,
+      'roomconfig_whitelist': [],
+      'visible_toolbar_buttons': {
+        'toggle_occupants': true
+      }
+    });
+
+    const viewWithRoomsPanel = {
+      renderRoomsPanel() {
+        if (this.roomspanel && converse_muc_views_u.isInDOM(this.roomspanel.el)) {
+          return this.roomspanel;
+        }
+
+        const id = "converse.roomspanel".concat(_converse.bare_jid);
+        this.roomspanel = new _converse.RoomsPanel({
+          'model': new (_converse.RoomsPanelModel.extend({
+            id,
+            'browserStorage': _converse.createStore(id)
+          }))()
+        });
+        this.roomspanel.model.fetch();
+        this.el.querySelector('.controlbox-pane').insertAdjacentElement('beforeEnd', this.roomspanel.render().el);
+        /**
+         * Triggered once the section of the _converse.ControlBoxView
+         * which shows gropuchats has been rendered.
+         * @event _converse#roomsPanelRendered
+         * @example _converse.api.listen.on('roomsPanelRendered', () => { ... });
+         */
+
+        _converse.api.trigger('roomsPanelRendered');
+
+        return this.roomspanel;
+      },
+
+      getRoomsPanel() {
+        if (this.roomspanel && converse_muc_views_u.isInDOM(this.roomspanel.el)) {
+          return this.roomspanel;
+        } else {
+          return this.renderRoomsPanel();
+        }
+      }
+
+    };
+
+    if (_converse.ControlBoxView) {
+      Object.assign(_converse.ControlBoxView.prototype, viewWithRoomsPanel);
+    }
+    /* Insert groupchat info (based on returned #disco IQ stanza)
+     * @function insertRoomInfo
+     * @param { HTMLElement } el - The HTML DOM element that contains the info.
+     * @param { XMLElement } stanza - The IQ stanza containing the groupchat info.
+     */
+
+
+    function insertRoomInfo(el, stanza) {
+      // All MUC features found here: https://xmpp.org/registrar/disco-features.html
+      el.querySelector('span.spinner').remove();
+      el.querySelector('a.room-info').classList.add('selected');
+      el.insertAdjacentHTML('beforeEnd', room_description_default()({
+        'jid': stanza.getAttribute('from'),
+        'desc': converse_muc_views_.get(converse_muc_views_.head(converse_muc_views_sizzle('field[var="muc#roominfo_description"] value', stanza)), 'textContent'),
+        'occ': converse_muc_views_.get(converse_muc_views_.head(converse_muc_views_sizzle('field[var="muc#roominfo_occupants"] value', stanza)), 'textContent'),
+        'hidden': converse_muc_views_sizzle('feature[var="muc_hidden"]', stanza).length,
+        'membersonly': converse_muc_views_sizzle('feature[var="muc_membersonly"]', stanza).length,
+        'moderated': converse_muc_views_sizzle('feature[var="muc_moderated"]', stanza).length,
+        'nonanonymous': converse_muc_views_sizzle('feature[var="muc_nonanonymous"]', stanza).length,
+        'open': converse_muc_views_sizzle('feature[var="muc_open"]', stanza).length,
+        'passwordprotected': converse_muc_views_sizzle('feature[var="muc_passwordprotected"]', stanza).length,
+        'persistent': converse_muc_views_sizzle('feature[var="muc_persistent"]', stanza).length,
+        'publicroom': converse_muc_views_sizzle('feature[var="muc_publicroom"]', stanza).length,
+        'semianonymous': converse_muc_views_sizzle('feature[var="muc_semianonymous"]', stanza).length,
+        'temporary': converse_muc_views_sizzle('feature[var="muc_temporary"]', stanza).length,
+        'unmoderated': converse_muc_views_sizzle('feature[var="muc_unmoderated"]', stanza).length,
+        'label_desc': __('Description:'),
+        'label_jid': __('Groupchat Address (JID):'),
+        'label_occ': __('Participants:'),
+        'label_features': __('Features:'),
+        'label_requires_auth': __('Requires authentication'),
+        'label_hidden': __('Hidden'),
+        'label_requires_invite': __('Requires an invitation'),
+        'label_moderated': __('Moderated'),
+        'label_non_anon': __('Non-anonymous'),
+        'label_open_room': __('Open'),
+        'label_permanent_room': __('Permanent'),
+        'label_public': __('Public'),
+        'label_semi_anon': __('Semi-anonymous'),
+        'label_temp_room': __('Temporary'),
+        'label_unmoderated': __('Unmoderated')
+      }));
+    }
+    /**
+     * Show/hide extra information about a groupchat in a listing.
+     * @function toggleRoomInfo
+     * @param { Event }
+     */
+
+
+    function toggleRoomInfo(ev) {
+      const parent_el = converse_muc_views_u.ancestor(ev.target, '.room-item');
+      const div_el = parent_el.querySelector('div.room-info');
+
+      if (div_el) {
+        converse_muc_views_u.slideIn(div_el).then(converse_muc_views_u.removeElement);
+        parent_el.querySelector('a.room-info').classList.remove('selected');
+      } else {
+        parent_el.insertAdjacentHTML('beforeend', spinner_default()());
+
+        _converse.api.disco.info(ev.target.getAttribute('data-room-jid'), null).then(stanza => insertRoomInfo(parent_el, stanza)).catch(e => headless_log.error(e));
+      }
+    }
+
+    _converse.ModeratorToolsModal = _converse.BootstrapModal.extend({
+      events: {
+        'submit .affiliation-form': 'assignAffiliation',
+        'submit .role-form': 'assignRole',
+        'submit .query-affiliation': 'queryAffiliation',
+        'submit .query-role': 'queryRole',
+        'click  .nav-item .nav-link': 'switchTab',
+        'click .toggle-form': 'toggleForm'
+      },
+
+      initialize(attrs) {
+        this.chatroomview = attrs.chatroomview;
+
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change:role', () => {
+          this.users_with_role = this.getUsersWithRole();
+          this.render();
+        });
+        this.listenTo(this.model, 'change:affiliation', async () => {
+          this.loading_users_with_affiliation = true;
+          this.users_with_affiliation = null;
+          this.render();
+          const affiliation = this.model.get('affiliation');
+
+          if (!_converse.muc_fetch_members || affiliation === 'outcast') {
+            this.users_with_affiliation = await this.chatroomview.model.getAffiliationList(affiliation);
+          } else {
+            this.users_with_affiliation = this.getUsersWithAffiliation();
+          }
+
+          this.loading_users_with_affiliation = false;
+          this.render();
+        });
+      },
+
+      toHTML() {
+        const allowed_commands = this.chatroomview.getAllowedCommands();
+        const allowed_affiliations = allowed_commands.map(c => COMMAND_TO_AFFILIATION[c]).filter(c => c);
+
+        const allowed_roles = converse_muc_views_.uniq(allowed_commands.map(c => COMMAND_TO_ROLE[c]).filter(c => c));
+
+        allowed_affiliations.sort();
+        allowed_roles.sort();
+        return moderator_tools_modal_default()(Object.assign(this.model.toJSON(), {
+          '__': __,
+          'affiliations': [...AFFILIATIONS, 'none'],
+          'allowed_affiliations': allowed_affiliations,
+          'allowed_roles': allowed_roles,
+          'loading_users_with_affiliation': this.loading_users_with_affiliation,
+          'roles': ROLES,
+          'users_with_affiliation': this.users_with_affiliation,
+          'users_with_role': this.users_with_role
+        }));
+      },
+
+      toggleForm(ev) {
+        ev.stopPropagation();
+        ev.preventDefault();
+        const form_class = ev.target.getAttribute('data-form');
+        const form = converse_muc_views_u.ancestor(ev.target, '.list-group-item').querySelector(".".concat(form_class));
+
+        if (converse_muc_views_u.hasClass('hidden', form)) {
+          converse_muc_views_u.removeClass('hidden', form);
+        } else {
+          converse_muc_views_u.addClass('hidden', form);
+        }
+      },
+
+      getUsersWithAffiliation() {
+        return this.chatroomview.model.occupants.where({
+          'affiliation': this.model.get('affiliation')
+        }).map(item => {
+          return {
+            'jid': item.get('jid'),
+            'nick': item.get('nick'),
+            'affiliation': item.get('affiliation')
+          };
+        });
+      },
+
+      getUsersWithRole() {
+        return this.chatroomview.model.occupants.where({
+          'role': this.model.get('role')
+        }).map(item => {
+          return {
+            'jid': item.get('jid'),
+            'nick': item.get('nick'),
+            'role': item.get('role')
+          };
+        });
+      },
+
+      queryRole(ev) {
+        ev.stopPropagation();
+        ev.preventDefault();
+        const data = new FormData(ev.target);
+        const role = data.get('role');
+        this.model.set({
+          'role': null
+        }, {
+          'silent': true
+        });
+        this.model.set({
+          'role': role
+        });
+      },
+
+      queryAffiliation(ev) {
+        ev.stopPropagation();
+        ev.preventDefault();
+        const data = new FormData(ev.target);
+        const affiliation = data.get('affiliation');
+        this.model.set({
+          'affiliation': null
+        }, {
+          'silent': true
+        });
+        this.model.set({
+          'affiliation': affiliation
+        });
+      },
+
+      assignAffiliation(ev) {
+        ev.stopPropagation();
+        ev.preventDefault();
+        const data = new FormData(ev.target);
+        const affiliation = data.get('affiliation');
+        const attrs = {
+          'jid': data.get('jid'),
+          'reason': data.get('reason')
+        };
+        const current_affiliation = this.model.get('affiliation');
+        this.chatroomview.model.setAffiliation(affiliation, [attrs]).then(async () => {
+          this.alert(__('Affiliation changed'), 'primary');
+          await this.chatroomview.model.occupants.fetchMembers();
+          this.model.set({
+            'affiliation': null
+          }, {
+            'silent': true
+          });
+          this.model.set({
+            'affiliation': current_affiliation
+          });
+        }).catch(err => {
+          this.alert(__('Sorry, something went wrong while trying to set the affiliation'), 'danger');
+          headless_log.error(err);
+        });
+      },
+
+      assignRole(ev) {
+        ev.stopPropagation();
+        ev.preventDefault();
+        const data = new FormData(ev.target);
+        const occupant = this.chatroomview.model.getOccupant(data.get('jid') || data.get('nick'));
+        const role = data.get('role');
+        const reason = data.get('reason');
+        const current_role = this.model.get('role');
+        this.chatroomview.model.setRole(occupant, role, reason, () => {
+          this.alert(__('Role changed'), 'primary');
+          this.model.set({
+            'role': null
+          }, {
+            'silent': true
+          });
+          this.model.set({
+            'role': current_role
+          });
+        }, e => {
+          if (converse_muc_views_sizzle("not-allowed[xmlns=\"".concat(converse_muc_views_Strophe.NS.STANZAS, "\"]"), e).length) {
+            this.alert(__('You\'re not allowed to make that change'), 'danger');
+          } else {
+            this.alert(__('Sorry, something went wrong while trying to set the role'), 'danger');
+
+            if (converse_muc_views_u.isErrorObject(e)) {
+              headless_log.error(e);
+            }
+          }
+        });
+      }
+
+    });
+    _converse.ListChatRoomsModal = _converse.BootstrapModal.extend({
+      events: {
+        'submit form': 'showRooms',
+        'click a.room-info': 'toggleRoomInfo',
+        'change input[name=nick]': 'setNick',
+        'change input[name=server]': 'setDomainFromEvent',
+        'click .open-room': 'openRoom'
+      },
+
+      initialize() {
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        if (_converse.muc_domain && !this.model.get('muc_domain')) {
+          this.model.save('muc_domain', _converse.muc_domain);
+        }
+
+        this.listenTo(this.model, 'change:muc_domain', this.onDomainChange);
+      },
+
+      toHTML() {
+        const muc_domain = this.model.get('muc_domain') || _converse.muc_domain;
+
+        return list_chatrooms_modal_default()(Object.assign(this.model.toJSON(), {
+          'heading_list_chatrooms': __('Query for Groupchats'),
+          'label_server_address': __('Server address'),
+          'label_query': __('Show groupchats'),
+          'show_form': !_converse.locked_muc_domain,
+          'server_placeholder': muc_domain ? muc_domain : __('conference.example.org')
+        }));
+      },
+
+      afterRender() {
+        if (_converse.locked_muc_domain) {
+          this.updateRoomsList();
+        } else {
+          this.el.addEventListener('shown.bs.modal', () => this.el.querySelector('input[name="server"]').focus(), false);
+        }
+      },
+
+      openRoom(ev) {
+        ev.preventDefault();
+        const jid = ev.target.getAttribute('data-room-jid');
+        const name = ev.target.getAttribute('data-room-name');
+        this.modal.hide();
+
+        _converse.api.rooms.open(jid, {
+          'name': name
+        });
+      },
+
+      toggleRoomInfo(ev) {
+        ev.preventDefault();
+        toggleRoomInfo(ev);
+      },
+
+      onDomainChange() {
+        if (_converse.auto_list_rooms) {
+          this.updateRoomsList();
+        }
+      },
+
+      roomStanzaItemToHTMLElement(groupchat) {
+        const name = converse_muc_views_Strophe.unescapeNode(groupchat.getAttribute('name') || groupchat.getAttribute('jid'));
+        const div = document.createElement('div');
+        div.innerHTML = room_item_default()({
+          'name': converse_muc_views_Strophe.xmlunescape(name),
+          'jid': groupchat.getAttribute('jid'),
+          'open_title': __('Click to open this groupchat'),
+          'info_title': __('Show more information on this groupchat')
+        });
+        return div.firstElementChild;
+      },
+
+      removeSpinner() {
+        converse_muc_views_sizzle('.spinner', this.el).forEach(converse_muc_views_u.removeElement);
+      },
+
+      informNoRoomsFound() {
+        const chatrooms_el = this.el.querySelector('.available-chatrooms');
+        chatrooms_el.innerHTML = rooms_results_default()({
+          'feedback_text': __('No groupchats found')
+        });
+        const input_el = this.el.querySelector('input[name="server"]');
+        input_el.classList.remove('hidden');
+        this.removeSpinner();
+      },
+
+      onRoomsFound(iq) {
+        /* Handle the IQ stanza returned from the server, containing
+         * all its public groupchats.
+         */
+        const available_chatrooms = this.el.querySelector('.available-chatrooms');
+        const rooms = converse_muc_views_sizzle('query item', iq);
+
+        if (rooms.length) {
+          available_chatrooms.innerHTML = rooms_results_default()({
+            'feedback_text': __('Groupchats found:')
+          });
+          const fragment = document.createDocumentFragment();
+          rooms.map(this.roomStanzaItemToHTMLElement).filter(r => r).forEach(child => fragment.appendChild(child));
+          available_chatrooms.appendChild(fragment);
+          this.removeSpinner();
+        } else {
+          this.informNoRoomsFound();
+        }
+
+        return true;
+      },
+
+      updateRoomsList() {
+        /* Send an IQ stanza to the server asking for all groupchats
+         */
+        const iq = converse_muc_views_$iq({
+          'to': this.model.get('muc_domain'),
+          'from': _converse.connection.jid,
+          'type': "get"
+        }).c("query", {
+          xmlns: converse_muc_views_Strophe.NS.DISCO_ITEMS
+        });
+
+        _converse.api.sendIQ(iq).then(iq => this.onRoomsFound(iq)).catch(() => this.informNoRoomsFound());
+      },
+
+      showRooms(ev) {
+        ev.preventDefault();
+        const data = new FormData(ev.target);
+        this.model.setDomain(data.get('server'));
+        this.updateRoomsList();
+      },
+
+      setDomainFromEvent(ev) {
+        this.model.setDomain(ev.target.value);
+      },
+
+      setNick(ev) {
+        this.model.save({
+          nick: ev.target.value
+        });
+      }
+
+    });
+    _converse.AddChatRoomModal = _converse.BootstrapModal.extend({
+      events: {
+        'submit form.add-chatroom': 'openChatRoom'
+      },
+
+      initialize() {
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change:muc_domain', this.render);
+      },
+
+      toHTML() {
+        let placeholder = '';
+
+        if (!_converse.locked_muc_domain) {
+          const muc_domain = this.model.get('muc_domain') || _converse.muc_domain;
+
+          placeholder = muc_domain ? "name@".concat(muc_domain) : __('name@conference.example.org');
+        }
+
+        return add_chatroom_modal_default()(Object.assign(this.model.toJSON(), {
+          '__': _converse.__,
+          '_converse': _converse,
+          'label_room_address': _converse.muc_domain ? __('Groupchat name') : __('Groupchat address'),
+          'chatroom_placeholder': placeholder
+        }));
+      },
+
+      afterRender() {
+        this.el.addEventListener('shown.bs.modal', () => {
+          this.el.querySelector('input[name="chatroom"]').focus();
+        }, false);
+      },
+
+      parseRoomDataFromEvent(form) {
+        const data = new FormData(form);
+        const jid = data.get('chatroom');
+        let nick;
+
+        if (_converse.locked_muc_nickname) {
+          nick = _converse.getDefaultMUCNickname();
+
+          if (!nick) {
+            throw new Error("Using locked_muc_nickname but no nickname found!");
+          }
+        } else {
+          nick = data.get('nickname').trim();
+        }
+
+        return {
+          'jid': jid,
+          'nick': nick
+        };
+      },
+
+      openChatRoom(ev) {
+        ev.preventDefault();
+        const data = this.parseRoomDataFromEvent(ev.target);
+
+        if (data.nick === "") {
+          // Make sure defaults apply if no nick is provided.
+          data.nick = undefined;
+        }
+
+        let jid;
+
+        if (_converse.locked_muc_domain || _converse.muc_domain && !converse_muc_views_u.isValidJID(data.jid)) {
+          jid = "".concat(converse_muc_views_Strophe.escapeNode(data.jid), "@").concat(_converse.muc_domain);
+        } else {
+          jid = data.jid;
+          this.model.setDomain(jid);
+        }
+
+        _converse.api.rooms.open(jid, Object.assign(data, {
+          jid
+        }));
+
+        this.modal.hide();
+        ev.target.reset();
+      }
+
+    });
+    _converse.RoomDetailsModal = _converse.BootstrapModal.extend({
+      initialize() {
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change', this.render);
+        this.listenTo(this.model.occupants, 'add', this.render);
+        this.listenTo(this.model.occupants, 'change', this.render);
+      },
+
+      toHTML() {
+        return chatroom_details_modal_default()(Object.assign(this.model.toJSON(), {
+          '_': converse_muc_views_,
+          '__': __,
+          'display_name': __('Groupchat info for %1$s', this.model.getDisplayName()),
+          'features': this.model.features.toJSON(),
+          'num_occupants': this.model.occupants.length,
+          'topic': converse_muc_views_u.addHyperlinks(xss_default.a.filterXSS(converse_muc_views_.get(this.model.get('subject'), 'text'), {
+            'whiteList': {}
+          }))
+        }));
+      }
+
+    });
+    /**
+     * Backbone.NativeView which renders a groupchat, based upon
+     * { @link _converse.ChatBoxView } for normal one-on-one chat boxes.
+     * @class
+     * @namespace _converse.ChatRoomView
+     * @memberOf _converse
+     */
+
+    _converse.ChatRoomView = _converse.ChatBoxView.extend({
+      length: 300,
+      tagName: 'div',
+      className: 'chatbox chatroom hidden',
+      is_chatroom: true,
+      events: {
+        'change input.fileupload': 'onFileSelection',
+        'click .chat-msg__action-edit': 'onMessageEditButtonClicked',
+        'click .chat-msg__action-react': 'onMessageReactButtonClicked',         // BAO issue #9
+        'click .chat-msg__action-retract': 'onMessageRetractButtonClicked',
+        'click .chatbox-navback': 'showControlBox',
+        'click .close-chatbox-button': 'close',
+        'click .configure-chatroom-button': 'getAndRenderConfigurationForm',
+        'click .hide-occupants': 'hideOccupants',
+        'click .new-msgs-indicator': 'viewUnreadMessages',
+        // Arrow functions don't work here because you can't bind a different `this` param to them.
+        'click .occupant-nick': function clickOccupantNick(ev) {
+          this.insertIntoTextArea(ev.target.textContent);
+        },
+        'click .send-button': 'onFormSubmitted',
+        'click .show-room-details-modal': 'showRoomDetailsModal',
+        'click .toggle-call': 'toggleCall',
+        'click .toggle-occupants': 'toggleOccupants',
+        'click .upload-file': 'toggleFileUpload',
+        'dragover .chat-textarea': 'onDragOver',
+        'drop .chat-textarea': 'onDrop',
+        'input .chat-textarea': 'inputChanged',
+        'keydown .chat-textarea': 'onKeyDown',
+        'keyup .chat-textarea': 'onKeyUp',
+        'mousedown .dragresize-occupants-left': 'onStartResizeOccupants',
+        'paste .chat-textarea': 'onPaste',
+        'submit .muc-nickname-form': 'submitNickname'
+      },
+
+      async initialize() {
+        this.initDebounced();
+        this.listenTo(this.model.messages, 'add', this.onMessageAdded);
+        this.listenTo(this.model.messages, 'rendered', this.scrollDown);
+        this.model.messages.on('reset', () => {
+          this.content.innerHTML = '';
+          this.removeAll();
+        });
+        this.listenTo(this.model, 'change', this.renderHeading);
+        this.listenTo(this.model.session, 'change:connection_status', this.onConnectionStatusChanged);
+        this.listenTo(this.model, 'change:hidden_occupants', this.updateOccupantsToggle);
+        this.listenTo(this.model, 'change:subject', this.setChatRoomSubject);
+        this.listenTo(this.model, 'configurationNeeded', this.getAndRenderConfigurationForm);
+        this.listenTo(this.model, 'destroy', this.hide);
+        this.listenTo(this.model, 'show', this.show);
+        this.listenTo(this.model.features, 'change:moderated', this.renderBottomPanel);
+        this.listenTo(this.model.occupants, 'add', this.onOccupantAdded);
+        this.listenTo(this.model.occupants, 'remove', this.onOccupantRemoved);
+        this.listenTo(this.model.occupants, 'change:show', this.showJoinOrLeaveNotification);
+        this.listenTo(this.model.occupants, 'change:role', this.onOccupantRoleChanged);
+        this.listenTo(this.model.occupants, 'change:affiliation', this.onOccupantAffiliationChanged); // Bind so that we can pass it to addEventListener and removeEventListener
+
+        this.onMouseMove = this.onMouseMove.bind(this);
+        this.onMouseUp = this.onMouseUp.bind(this);
+        this.render();
+        this.createOccupantsView();
+        await this.updateAfterMessagesFetched();
+        this.onConnectionStatusChanged();
+        /**
+         * Triggered once a { @link _converse.ChatRoomView } has been opened
+         * @event _converse#chatRoomViewInitialized
+         * @type { _converse.ChatRoomView }
+         * @example _converse.api.listen.on('chatRoomViewInitialized', view => { ... });
+         */
+
+        _converse.api.trigger('chatRoomViewInitialized', this);
+      },
+
+      render() {
+        this.el.setAttribute('id', this.model.get('box_id'));
+        this.el.innerHTML = chatroom_default()();
+        this.renderHeading();
+        this.renderChatArea();
+        this.renderBottomPanel();
+
+        if (!_converse.muc_show_logs_before_join) {
+          this.model.session.get('connection_status') !== converse_core.ROOMSTATUS.ENTERED && this.showSpinner();
+        }
+
+        if (!this.model.get('hidden')) {
+          this.show();
+        }
+
+        return this;
+      },
+
+      renderHeading() {
+        let item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+
+        /* Render the heading UI of the groupchat. */
+        const changed = converse_muc_views_.get(item, 'changed', {});
+
+        const keys = ['affiliation', 'bookmarked', 'jid', 'name', 'description', 'subject'];
+
+        if (item === null || converse_muc_views_.intersection(Object.keys(changed), keys).length) {
+          this.el.querySelector('.chat-head-chatroom').innerHTML = this.generateHeadingHTML();
+        }
+      },
+
+      renderBottomPanel() {
+        const container = this.el.querySelector('.bottom-panel');
+        const entered = this.model.session.get('connection_status') === converse_core.ROOMSTATUS.ENTERED;
+        const can_edit = entered && !(this.model.features.get('moderated') && this.model.getOwnRole() === 'visitor');
+        container.innerHTML = chatroom_bottom_panel_default()({
+          __,
+          can_edit,
+          entered
+        });
+
+        if (entered && can_edit) {
+          this.renderMessageForm();
+          this.initMentionAutoComplete();
+        }
+      },
+
+      renderChatArea() {
+        // Render the UI container in which groupchat messages will appear.
+        if (this.el.querySelector('.chat-area') === null) {
+          const container_el = this.el.querySelector('.chatroom-body');
+          container_el.insertAdjacentHTML('beforeend', chatarea_default()({
+            __,
+            'muc_show_logs_before_join': _converse.muc_show_logs_before_join,
+            'show_send_button': _converse.show_send_button
+          }));
+          this.content = this.el.querySelector('.chat-content');
+        }
+
+        return this;
+      },
+
+      createOccupantsView() {
+        this.model.occupants.chatroomview = this;
+        this.occupants_view = new _converse.ChatRoomOccupantsView({
+          'model': this.model.occupants
+        });
+        const container_el = this.el.querySelector('.chatroom-body');
+        const occupants_width = this.model.get('occupants_width');
+
+        if (this.occupants_view && occupants_width !== undefined) {
+          this.occupants_view.el.style.flex = "0 0 " + occupants_width + "px";
+        }
+
+        container_el.insertAdjacentElement('beforeend', this.occupants_view.el);
+      },
+
+      onStartResizeOccupants(ev) {
+        this.resizing = true;
+        this.el.addEventListener('mousemove', this.onMouseMove);
+        this.el.addEventListener('mouseup', this.onMouseUp);
+        const style = window.getComputedStyle(this.occupants_view.el);
+        this.width = parseInt(style.width.replace(/px$/, ''), 10);
+        this.prev_pageX = ev.pageX;
+      },
+
+      onMouseMove(ev) {
+        if (this.resizing) {
+          ev.preventDefault();
+          const delta = this.prev_pageX - ev.pageX;
+          this.resizeOccupantsView(delta, ev.pageX);
+          this.prev_pageX = ev.pageX;
+        }
+      },
+
+      onMouseUp(ev) {
+        if (this.resizing) {
+          ev.preventDefault();
+          this.resizing = false;
+          this.el.removeEventListener('mousemove', this.onMouseMove);
+          this.el.removeEventListener('mouseup', this.onMouseUp);
+          const element_position = this.occupants_view.el.getBoundingClientRect();
+          const occupants_width = this.calculateOccupantsWidth(element_position, 0);
+          const attrs = {
+            occupants_width
+          };
+          _converse.connection.connected ? this.model.save(attrs) : this.model.set(attrs);
+        }
+      },
+
+      resizeOccupantsView(delta, current_mouse_position) {
+        const element_position = this.occupants_view.el.getBoundingClientRect();
+
+        if (this.is_minimum) {
+          this.is_minimum = element_position.left < current_mouse_position;
+        } else if (this.is_maximum) {
+          this.is_maximum = element_position.left > current_mouse_position;
+        } else {
+          const occupants_width = this.calculateOccupantsWidth(element_position, delta);
+          this.occupants_view.el.style.flex = "0 0 " + occupants_width + "px";
+        }
+      },
+
+      calculateOccupantsWidth(element_position, delta) {
+        let occupants_width = element_position.width + delta;
+        const room_width = this.el.clientWidth; // keeping display in boundaries
+
+        if (occupants_width < room_width * 0.20) {
+          // set pixel to 20% width
+          occupants_width = room_width * 0.20;
+          this.is_minimum = true;
+        } else if (occupants_width > room_width * 0.75) {
+          // set pixel to 75% width
+          occupants_width = room_width * 0.75;
+          this.is_maximum = true;
+        } else if (room_width - occupants_width < 250) {
+          // resize occupants if chat-area becomes smaller than 250px (min-width property set in css)
+          occupants_width = room_width - 250;
+          this.is_maximum = true;
+        } else {
+          this.is_maximum = false;
+          this.is_minimum = false;
+        }
+
+        return occupants_width;
+      },
+
+      getAutoCompleteList() {
+        return this.model.occupants.filter('nick').map(o => ({
+          'label': o.get('nick'),
+          'value': "@".concat(o.get('nick'))
+        }));
+      },
+
+      getAutoCompleteListItem(text, input) {
+        input = input.trim();
+        const element = document.createElement("li");
+        element.setAttribute("aria-selected", "false");
+
+        if (_converse.muc_mention_autocomplete_show_avatar) {
+          const img = document.createElement("img");
+          let dataUri = "data:" + _converse.DEFAULT_IMAGE_TYPE + ";base64," + _converse.DEFAULT_IMAGE;
+
+          if (_converse.vcards) {
+            const vcard = _converse.vcards.findWhere({
+              'nickname': text
+            });
+
+            if (vcard) dataUri = "data:" + vcard.get('image_type') + ";base64," + vcard.get('image');
+          }
+
+          img.setAttribute("src", dataUri);
+          img.setAttribute("width", "22");
+          img.setAttribute("class", "avatar avatar-autocomplete");
+          element.appendChild(img);
+        }
+
+        const regex = new RegExp("(" + input + ")", "ig");
+        const parts = input ? text.split(regex) : [text];
+        parts.forEach(txt => {
+          if (input && txt.match(regex)) {
+            const match = document.createElement("mark");
+            match.textContent = txt;
+            element.appendChild(match);
+          } else {
+            element.appendChild(document.createTextNode(txt));
+          }
+        });
+        return element;
+      },
+
+      initMentionAutoComplete() {
+        this.mention_auto_complete = new _converse.AutoComplete(this.el, {
+          'auto_first': true,
+          'auto_evaluate': false,
+          'min_chars': _converse.muc_mention_autocomplete_min_chars,
+          'match_current_word': true,
+          'list': () => this.getAutoCompleteList(),
+          'filter': _converse.muc_mention_autocomplete_filter == 'contains' ? _converse.FILTER_CONTAINS : _converse.FILTER_STARTSWITH,
+          'ac_triggers': ["Tab", "@"],
+          'include_triggers': [],
+          'item': this.getAutoCompleteListItem
+        });
+        this.mention_auto_complete.on('suggestion-box-selectcomplete', () => this.auto_completing = false);
+      },
+
+      /**
+       * Get the nickname value from the form and then join the groupchat with it.
+       * @private
+       * @method _converse.ChatRoomView#submitNickname
+       * @param { Event }
+       */
+      submitNickname(ev) {
+        ev.preventDefault();
+        const nick = ev.target.nick.value.trim();
+        nick && this.model.join(nick);
+      },
+
+      onKeyDown(ev) {
+        if (this.mention_auto_complete.onKeyDown(ev)) {
+          return;
+        }
+
+        return _converse.ChatBoxView.prototype.onKeyDown.call(this, ev);
+      },
+
+      onKeyUp(ev) {
+        this.mention_auto_complete.evaluate(ev);
+        return _converse.ChatBoxView.prototype.onKeyUp.call(this, ev);
+      },
+
+      async onMessageRetractButtonClicked(ev) {
+        ev.preventDefault();
+        const msg_el = converse_muc_views_u.ancestor(ev.target, '.message');
+        const msgid = msg_el.getAttribute('data-msgid');
+        const time = msg_el.getAttribute('data-isodate');
+        const message = this.model.messages.findWhere({
+          msgid,
+          time
+        });
+
+        const retraction_warning = __("Be aware that other XMPP/Jabber clients (and servers) may " + "not yet support retractions and that this message may not " + "be removed everywhere.");
+
+        if (message.get('sender') === 'me') {
+          const messages = [__('Are you sure you want to retract this message?')];
+
+          if (_converse.show_retraction_warning) {
+            messages[1] = retraction_warning;
+          }
+
+          const result = await _converse.api.confirm(__('Confirm'), messages);
+
+          if (result) {
+            this.retractOwnMessage(message);
+          }
+        } else {
+          let messages = [__('You are about to retract this message.'), __('You may optionally include a message, explaining the reason for the retraction.')];
+
+          if (_converse.show_retraction_warning) {
+            messages = [messages[0], retraction_warning, messages[1]];
+          }
+
+          const reason = await _converse.api.prompt(__('Message Retraction'), messages, __('Optional reason'));
+
+          if (reason !== false) {
+            this.retractOtherMessage(message, reason);
+          }
+        }
+      },
+
+      /**
+       * Retract one of your messages in this groupchat.
+       * @private
+       * @method _converse.ChatRoomView#retractOwnMessage
+       * @param { _converse.Message } message - The message which we're retracting.
+       */
+      retractOwnMessage(message) {
+        this.model.sendRetractionMessage(message).catch(e => {
+          message.save({
+            'retracted': undefined,
+            'retracted_id': undefined
+          });
+
+          const errmsg = __('Sorry, something went wrong while trying to retract your message.');
+
+          if (converse_muc_views_u.isErrorStanza(e)) {
+            this.showErrorMessage(errmsg);
+          } else {
+            this.showErrorMessage(errmsg);
+            this.showErrorMessage(e.message);
+          }
+
+          headless_log.error(e);
+        });
+        message.save({
+          'retracted': new Date().toISOString(),
+          'retracted_id': message.get('origin_id')
+        });
+      },
+
+      /**
+       * Retract someone else's message in this groupchat.
+       * @private
+       * @method _converse.ChatRoomView#retractOtherMessage
+       * @param { _converse.Message } message - The message which we're retracting.
+       * @param { string } [reason] - The reason for retracting the message.
+       */
+      async retractOtherMessage(message, reason) {
+        const result = await this.model.sendRetractionIQ(message, reason);
+
+        if (result === null) {
+          const err_msg = __("A timeout occurred while trying to retract the message");
+
+          _converse.api.alert('error', __('Error'), err_msg);
+
+          _converse.log(err_msg, converse_muc_views_Strophe.LogLevel.WARN);
+        } else if (converse_muc_views_u.isErrorStanza(result)) {
+          const err_msg = __("Sorry, you're not allowed to retract this message.");
+
+          _converse.api.alert('error', __('Error'), err_msg);
+
+          _converse.log(err_msg, converse_muc_views_Strophe.LogLevel.WARN);
+
+          _converse.log(result, converse_muc_views_Strophe.LogLevel.WARN);
+        } else {
+          message.save({
+            'moderated': 'retracted',
+            'moderated_by': _converse.bare_jid,
+            'moderated_id': message.get('msgid'),
+            'moderation_reason': reason
+          });
+        }
+      },
+
+      showModeratorToolsModal(affiliation) {
+        if (!this.verifyRoles(['moderator'])) {
+          return;
+        }
+
+        if (converse_muc_views_.isUndefined(this.model.modtools_modal)) {
+          const model = new converse_muc_views_Backbone.Model({
+            'affiliation': affiliation
+          });
+          this.modtools_modal = new _converse.ModeratorToolsModal({
+            'model': model,
+            'chatroomview': this
+          });
+        } else {
+          this.modtools_modal.set('affiliation', affiliation);
+        }
+
+        this.modtools_modal.show();
+      },
+
+      showRoomDetailsModal(ev) {
+        ev.preventDefault();
+
+        if (this.model.room_details_modal === undefined) {
+          this.model.room_details_modal = new _converse.RoomDetailsModal({
+            'model': this.model
+          });
+        }
+
+        this.model.room_details_modal.show(ev);
+      },
+
+      showChatStateNotification(message) {
+        if (message.get('sender') === 'me') {
+          return;
+        }
+
+        return _converse.ChatBoxView.prototype.showChatStateNotification.apply(this, arguments);
+      },
+
+      onOccupantAffiliationChanged(occupant) {
+        if (occupant.get('jid') === _converse.bare_jid) {
+          this.renderHeading();
+        }
+
+        this.informOfOccupantsAffiliationChange(occupant);
+      },
+
+      informOfOccupantsAffiliationChange(occupant) {
+        const previous_affiliation = occupant._previousAttributes.affiliation;
+        const current_affiliation = occupant.get('affiliation');
+
+        if (previous_affiliation === 'admin') {
+          this.showChatEvent(__("%1$s is no longer an admin of this groupchat", occupant.get('nick')));
+        } else if (previous_affiliation === 'owner') {
+          this.showChatEvent(__("%1$s is no longer an owner of this groupchat", occupant.get('nick')));
+        } else if (previous_affiliation === 'outcast') {
+          this.showChatEvent(__("%1$s is no longer banned from this groupchat", occupant.get('nick')));
+        }
+
+        if (current_affiliation === 'none' && previous_affiliation === 'member') {
+          this.showChatEvent(__("%1$s is no longer a member of this groupchat", occupant.get('nick')));
+        }
+
+        if (current_affiliation === 'member') {
+          this.showChatEvent(__("%1$s is now a member of this groupchat", occupant.get('nick')));
+        } else if (current_affiliation === 'outcast') {
+          this.showChatEvent(__("%1$s has been banned from this groupchat", occupant.get('nick')));
+        } else if (current_affiliation === 'admin' || current_affiliation == 'owner') {
+          // For example: AppleJack is now an (admin|owner) of this groupchat
+          this.showChatEvent(__('%1$s is now an %2$s of this groupchat', occupant.get('nick'), current_affiliation));
+        }
+      },
+
+      onOccupantRoleChanged(occupant, changed) {
+        if (occupant.get('jid') === _converse.bare_jid) {
+          this.renderBottomPanel();
+        }
+
+        this.informOfOccupantsRoleChange(occupant, changed);
+      },
+
+      informOfOccupantsRoleChange(occupant, changed) {
+        if (changed === "none" || occupant.changed.affiliation) {
+          // We don't inform of role changes if they accompany affiliation changes.
+          return;
+        }
+
+        const previous_role = occupant._previousAttributes.role;
+
+        if (previous_role === 'moderator') {
+          this.showChatEvent(__("%1$s is no longer a moderator", occupant.get('nick')));
+        }
+
+        if (previous_role === 'visitor') {
+          this.showChatEvent(__("%1$s has been given a voice", occupant.get('nick')));
+        }
+
+        if (occupant.get('role') === 'visitor') {
+          this.showChatEvent(__("%1$s has been muted", occupant.get('nick')));
+        }
+
+        if (occupant.get('role') === 'moderator') {
+          if (!['owner', 'admin'].includes(occupant.get('affiliation'))) {
+            // We only show this message if the user isn't already
+            // an admin or owner, otherwise this isn't new
+            // information.
+            this.showChatEvent(__("%1$s is now a moderator", occupant.get('nick')));
+          }
+        }
+      },
+
+      /**
+       * Returns the groupchat heading HTML to be rendered.
+       * @private
+       * @method _converse.ChatRoomView#generateHeadingHTML
+       */
+      generateHeadingHTML() {
+        return chatroom_head_default()(Object.assign(this.model.toJSON(), {
+          'isOwner': this.model.getOwnAffiliation() === 'owner',
+          'title': this.model.getDisplayName(),
+          'Strophe': converse_muc_views_Strophe,
+          '_converse': _converse,
+          'info_close': __('Close and leave this groupchat'),
+          'info_configure': __('Configure this groupchat'),
+          'info_details': __('Show more details about this groupchat'),
+          'description': converse_muc_views_u.addHyperlinks(xss_default.a.filterXSS(converse_muc_views_.get(this.model.get('subject'), 'text'), {
+            'whiteList': {}
+          }))
+        }));
+      },
+
+      /**
+       * Callback method that gets called after the chat has become visible.
+       * @private
+       * @method _converse.ChatRoomView#afterShown
+       */
+      afterShown() {
+        // Override from converse-chatview, specifically to avoid
+        // the 'active' chat state from being sent out prematurely.
+        // This is instead done in `onConnectionStatusChanged` below.
+        if (converse_muc_views_u.isPersistableModel(this.model)) {
+          this.model.clearUnreadMsgCounter();
+        }
+
+        this.scrollDown();
+      },
+
+      onConnectionStatusChanged() {
+        const conn_status = this.model.session.get('connection_status');
+
+        if (conn_status === converse_core.ROOMSTATUS.NICKNAME_REQUIRED) {
+          this.renderNicknameForm();
+        } else if (conn_status === converse_core.ROOMSTATUS.PASSWORD_REQUIRED) {
+          this.renderPasswordForm();
+        } else if (conn_status === converse_core.ROOMSTATUS.CONNECTING) {
+          this.showSpinner();
+        } else if (conn_status === converse_core.ROOMSTATUS.ENTERED) {
+          this.renderBottomPanel();
+          this.hideSpinner();
+          this.maybeFocus();
+        } else if (conn_status === converse_core.ROOMSTATUS.DISCONNECTED) {
+          this.showDisconnectMessage();
+        } else if (conn_status === converse_core.ROOMSTATUS.DESTROYED) {
+          this.showDestroyedMessage();
+        }
+      },
+
+      getToolbarOptions() {
+        return Object.assign(_converse.ChatBoxView.prototype.getToolbarOptions.apply(this, arguments), {
+          'label_hide_occupants': __('Hide the list of participants'),
+          'show_occupants_toggle': _converse.visible_toolbar_buttons.toggle_occupants
+        });
+      },
+
+      /**
+       * Closes this chat box, which implies leaving the groupchat as well.
+       * @private
+       * @method _converse.ChatRoomView#close
+       */
+      async close() {
+        this.hide();
+
+        if (converse_muc_views_Backbone.history.getFragment() === "converse/room?jid=" + this.model.get('jid')) {
+          _converse.router.navigate('');
+        }
+
+        await this.model.leave();
+        return _converse.ChatBoxView.prototype.close.apply(this, arguments);
+      },
+
+      updateOccupantsToggle() {
+        const icon_el = this.el.querySelector('.toggle-occupants');
+        const chat_area = this.el.querySelector('.chat-area');
+
+        if (this.model.get('hidden_occupants')) {
+          converse_muc_views_u.removeClass('fa-angle-double-right', icon_el);
+          converse_muc_views_u.addClass('fa-angle-double-left', icon_el);
+          converse_muc_views_u.addClass('full', chat_area);
+        } else {
+          converse_muc_views_u.addClass('fa-angle-double-right', icon_el);
+          converse_muc_views_u.removeClass('fa-angle-double-left', icon_el);
+          converse_muc_views_u.removeClass('full', chat_area);
+        }
+      },
+
+      /**
+       * Show or hide the right sidebar containing the chat
+       * occupants (and the invite widget).
+       * @private
+       * @method _converse.ChatRoomView#hideOccupants
+       */
+      hideOccupants(ev) {
+        if (ev) {
+          ev.preventDefault();
+          ev.stopPropagation();
+        }
+
+        this.model.save({
+          'hidden_occupants': true
+        });
+        this.scrollDown();
+      },
+
+      /**
+       * Show or hide the right sidebar containing the chat
+       * occupants (and the invite widget).
+       * @private
+       * @method _converse.ChatRoomView#toggleOccupants
+       */
+      toggleOccupants(ev) {
+        if (ev) {
+          ev.preventDefault();
+          ev.stopPropagation();
+        }
+
+        this.model.save({
+          'hidden_occupants': !this.model.get('hidden_occupants')
+        });
+        this.scrollDown();
+      },
+
+      verifyRoles(roles, occupant) {
+        let show_error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
+
+        if (!Array.isArray(roles)) {
+          throw new TypeError('roles must be an Array');
+        }
+
+        if (!roles.length) {
+          return true;
+        }
+
+        if (!occupant) {
+          occupant = this.model.occupants.findWhere({
+            'jid': _converse.bare_jid
+          });
+        }
+
+        const role = occupant.get('role');
+
+        if (roles.includes(role)) {
+          return true;
+        }
+
+        if (show_error) {
+          this.showErrorMessage(__('Forbidden: you do not have the necessary role in order to do that.'));
+        }
+
+        return false;
+      },
+
+      verifyAffiliations(affiliations, occupant) {
+        let show_error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
+
+        if (!Array.isArray(affiliations)) {
+          throw new TypeError('affiliations must be an Array');
+        }
+
+        if (!affiliations.length) {
+          return true;
+        }
+
+        if (!occupant) {
+          occupant = this.model.occupants.findWhere({
+            'jid': _converse.bare_jid
+          });
+        }
+
+        const a = occupant.get('affiliation');
+
+        if (affiliations.includes(a)) {
+          return true;
+        }
+
+        if (show_error) {
+          this.showErrorMessage(__('Forbidden: you do not have the necessary affiliation in order to do that.'));
+        }
+
+        return false;
+      },
+
+      validateRoleOrAffiliationChangeArgs(command, args) {
+        if (!args) {
+          this.showErrorMessage(__('Error: the "%1$s" command takes two arguments, the user\'s nickname and optionally a reason.', command));
+          return false;
+        }
+
+        return true;
+      },
+
+      getNickOrJIDFromCommandArgs(args) {
+        if (!args.startsWith('@')) {
+          args = '@' + args;
+        }
+
+        const [text, references] = this.model.parseTextForReferences(args); // eslint-disable-line no-unused-vars
+
+        if (!references.length) {
+          this.showErrorMessage(__("Error: couldn't find a groupchat participant based on your arguments"));
+          return;
+        }
+
+        if (references.length > 1) {
+          this.showErrorMessage(__("Error: found multiple groupchat participant based on your arguments"));
+          return;
+        }
+
+        const nick_or_jid = references.pop().value;
+        const reason = args.split(nick_or_jid, 2)[1];
+
+        if (reason && !reason.startsWith(' ')) {
+          this.showErrorMessage(__("Error: couldn't find a groupchat participant based on your arguments"));
+          return;
+        }
+
+        return nick_or_jid;
+      },
+
+      setAffiliation(command, args, required_affiliations) {
+        const affiliation = COMMAND_TO_AFFILIATION[command];
+
+        if (!affiliation) {
+          throw Error("ChatRoomView#setAffiliation called with invalid command: ".concat(command));
+        }
+
+        if (!this.verifyAffiliations(required_affiliations)) {
+          return false;
+        }
+
+        if (!this.validateRoleOrAffiliationChangeArgs(command, args)) {
+          return false;
+        }
+
+        const nick_or_jid = this.getNickOrJIDFromCommandArgs(args);
+
+        if (!nick_or_jid) {
+          return false;
+        }
+
+        const reason = args.split(nick_or_jid, 2)[1].trim(); // We're guaranteed to have an occupant due to getNickOrJIDFromCommandArgs
+
+        const occupant = this.model.getOccupant(nick_or_jid);
+        const attrs = {
+          'jid': occupant.get('jid'),
+          'reason': reason
+        };
+
+        if (_converse.auto_register_muc_nickname && occupant) {
+          attrs['nick'] = occupant.get('nick');
+        }
+
+        this.model.setAffiliation(affiliation, [attrs]).then(() => this.model.occupants.fetchMembers()).catch(err => this.onCommandError(err));
+      },
+
+      getReason(args) {
+        return args.includes(',') ? args.slice(args.indexOf(',') + 1).trim() : null;
+      },
+
+      setRole(command, args) {
+        let required_affiliations = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
+        let required_roles = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
+
+        /* Check that a command to change a groupchat user's role or
+         * affiliation has anough arguments.
+         */
+        const role = COMMAND_TO_ROLE[command];
+
+        if (!role) {
+          throw Error("ChatRoomView#setRole called with invalid command: ".concat(command));
+        }
+
+        if (!this.verifyAffiliations(required_affiliations) || !this.verifyRoles(required_roles)) {
+          return false;
+        }
+
+        if (!this.validateRoleOrAffiliationChangeArgs(command, args)) {
+          return false;
+        }
+
+        const nick_or_jid = this.getNickOrJIDFromCommandArgs(args);
+
+        if (!nick_or_jid) {
+          return false;
+        }
+
+        const reason = args.split(nick_or_jid, 2)[1].trim(); // We're guaranteed to have an occupant due to getNickOrJIDFromCommandArgs
+
+        const occupant = this.model.getOccupant(nick_or_jid);
+        this.model.setRole(occupant, role, reason, undefined, this.onCommandError.bind(this));
+        return true;
+      },
+
+      onCommandError(err) {
+        headless_log.fatal(err);
+        this.showErrorMessage(__("Sorry, an error happened while running the command. Check your browser's developer console for details."));
+      },
+
+      getAllowedCommands() {
+        // FIXME: The availability of some of these commands
+        // depend on the MUCs configuration (e.g. whether it's
+        // moderated or not). We need to take that into
+        // consideration.
+        let allowed_commands = ['clear', 'help', 'me', 'nick', 'subject', 'topic', 'register'];
+        const occupant = this.model.occupants.findWhere({
+          'jid': _converse.bare_jid
+        });
+
+        if (this.verifyAffiliations(['owner'], occupant, false)) {
+          allowed_commands = allowed_commands.concat(OWNER_COMMANDS).concat(ADMIN_COMMANDS);
+        } else if (this.verifyAffiliations(['admin'], occupant, false)) {
+          allowed_commands = allowed_commands.concat(ADMIN_COMMANDS);
+        }
+
+        if (this.verifyRoles(['moderator'], occupant, false)) {
+          allowed_commands = allowed_commands.concat(MODERATOR_COMMANDS).concat(VISITOR_COMMANDS);
+        } else if (!this.verifyRoles(['visitor', 'participant', 'moderator'], occupant, false)) {
+          allowed_commands = allowed_commands.concat(VISITOR_COMMANDS);
+        }
+
+        return allowed_commands;
+      },
+
+      parseMessageForCommands(text) {
+        if (_converse.muc_disable_slash_commands && !Array.isArray(_converse.muc_disable_slash_commands)) {
+          return _converse.ChatBoxView.prototype.parseMessageForCommands.apply(this, arguments);
+        }
+
+        text = text.replace(/^\s*/, "");
+        const command = (text.match(/^\/([a-zA-Z]*) ?/) || ['']).pop().toLowerCase();
+
+        if (!command) {
+          return false;
+        }
+
+        const args = text.slice(('/' + command).length + 1).trim();
+        let disabled_commands = [];
+
+        if (Array.isArray(_converse.muc_disable_slash_commands)) {
+          disabled_commands = _converse.muc_disable_slash_commands;
+
+          if (disabled_commands.includes(command)) {
+            return false;
+          }
+        }
+
+        switch (command) {
+          case 'admin':
+            {
+              this.setAffiliation(command, args, ['owner']);
+              break;
+            }
+
+          case 'ban':
+            {
+              this.setAffiliation(command, args, ['admin', 'owner']);
+              break;
+            }
+
+          case 'modtools':
+            {
+              this.showModeratorToolsModal(args);
+              break;
+            }
+
+          case 'deop':
+            {
+              // FIXME: /deop only applies to setting a moderators
+              // role to "participant" (which only admin/owner can
+              // do). Moderators can however set non-moderator's role
+              // to participant (e.g. visitor => participant).
+              // Currently we don't distinguish between these two
+              // cases.
+              this.setRole(command, args, ['admin', 'owner']);
+              break;
+            }
+
+          case 'destroy':
+            {
+              if (!this.verifyAffiliations(['owner'])) {
+                break;
+              }
+
+              this.model.sendDestroyIQ(args).then(() => this.close()).catch(e => this.onCommandError(e));
+              break;
+            }
+
+          case 'help':
+            {
+              const allowed_commands = this.getAllowedCommands();
+              this.showHelpMessages(["<strong>".concat(__("You can run the following commands"), "</strong>")]);
+              this.showHelpMessages(["<strong>/admin</strong>: ".concat(__("Change user's affiliation to admin")), "<strong>/ban</strong>: ".concat(__('Ban user by changing their affiliation to outcast')), "<strong>/clear</strong>: ".concat(__('Clear the chat area')), "<strong>/close</strong>: ".concat(__('Close this groupchat')), "<strong>/deop</strong>: ".concat(__('Change user role to participant')), "<strong>/destroy</strong>: ".concat(__('Remove this groupchat')), "<strong>/help</strong>: ".concat(__('Show this menu')), "<strong>/kick</strong>: ".concat(__('Kick user from groupchat')), "<strong>/me</strong>: ".concat(__('Write in 3rd person')), "<strong>/member</strong>: ".concat(__('Grant membership to a user')), "<strong>/modtools</strong>: ".concat(__('Opens up the moderator tools GUI')), "<strong>/mute</strong>: ".concat(__("Remove user's ability to post messages")), "<strong>/nick</strong>: ".concat(__('Change your nickname')), "<strong>/op</strong>: ".concat(__('Grant moderator role to user')), "<strong>/owner</strong>: ".concat(__('Grant ownership of this groupchat')), "<strong>/register</strong>: ".concat(__("Register your nickname")), "<strong>/revoke</strong>: ".concat(__("Revoke the user's current affiliation")), "<strong>/subject</strong>: ".concat(__('Set groupchat subject')), "<strong>/topic</strong>: ".concat(__('Set groupchat subject (alias for /subject)')), "<strong>/voice</strong>: ".concat(__('Allow muted user to post messages'))].filter(line => disabled_commands.every(c => !line.startsWith(c + '<', 9))).filter(line => allowed_commands.some(c => line.startsWith(c + '<', 9))));
+              break;
+            }
+
+          case 'kick':
+            {
+              this.setRole(command, args, [], ['moderator']);
+              break;
+            }
+
+          case 'mute':
+            {
+              this.setRole(command, args, [], ['moderator']);
+              break;
+            }
+
+          case 'member':
+            {
+              this.setAffiliation(command, args, ['admin', 'owner']);
+              break;
+            }
+
+          case 'nick':
+            {
+              if (!this.verifyRoles(['visitor', 'participant', 'moderator'])) {
+                break;
+              } else if (args.length === 0) {
+                // e.g. Your nickname is "coolguy69"
+                this.showErrorMessage(__('Your nickname is "%1$s"', this.model.get('nick')));
+              } else {
+                const jid = converse_muc_views_Strophe.getBareJidFromJid(this.model.get('jid'));
+
+                _converse.api.send(converse_muc_views_$pres({
+                  from: _converse.connection.jid,
+                  to: "".concat(jid, "/").concat(args),
+                  id: converse_muc_views_u.getUniqueId()
+                }).tree());
+              }
+
+              break;
+            }
+
+          case 'owner':
+            this.setAffiliation(command, args, ['owner']);
+            break;
+
+          case 'op':
+            {
+              this.setRole(command, args, ['admin', 'owner']);
+              break;
+            }
+
+          case 'register':
+            {
+              if (args.length > 1) {
+                this.showErrorMessage(__('Error: invalid number of arguments'));
+              } else {
+                this.model.registerNickname().then(err_msg => {
+                  if (err_msg) this.showErrorMessage(err_msg);
+                });
+              }
+
+              break;
+            }
+
+          case 'revoke':
+            {
+              this.setAffiliation(command, args, ['admin', 'owner']);
+              break;
+            }
+
+          case 'topic':
+          case 'subject':
+            this.model.setSubject(args);
+            break;
+
+          case 'voice':
+            {
+              this.setRole(command, args, [], ['moderator']);
+              break;
+            }
+
+          default:
+            return _converse.ChatBoxView.prototype.parseMessageForCommands.apply(this, arguments);
+        }
+
+        return true;
+      },
+
+      /**
+       * Renders a form given an IQ stanza containing the current
+       * groupchat configuration.
+       * Returns a promise which resolves once the user has
+       * either submitted the form, or canceled it.
+       * @private
+       * @method _converse.ChatRoomView#renderConfigurationForm
+       * @param { XMLElement } stanza: The IQ stanza containing the groupchat config.
+       */
+      renderConfigurationForm(stanza) {
+        this.hideChatRoomContents();
+        this.model.save('config_stanza', stanza.outerHTML);
+
+        if (!this.config_form) {
+          const {
+            _converse
+          } = this.__super__;
+          this.config_form = new _converse.MUCConfigForm({
+            'model': this.model,
+            'chatroomview': this
+          });
+          const container_el = this.el.querySelector('.chatroom-body');
+          container_el.insertAdjacentElement('beforeend', this.config_form.el);
+        }
+
+        converse_muc_views_u.showElement(this.config_form.el);
+      },
+
+      /**
+       * Renders a form which allows the user to choose theirnickname.
+       * @private
+       * @method _converse.ChatRoomView#renderNicknameForm
+       */
+      renderNicknameForm() {
+        const heading = _converse.muc_show_logs_before_join ? __('Choose a nickname to enter') : __('Please choose your nickname');
+        const html = chatroom_nickname_form_default()(Object.assign({
+          heading,
+          'label_nickname': __('Nickname'),
+          'label_join': __('Enter groupchat')
+        }, this.model.toJSON()));
+
+        if (_converse.muc_show_logs_before_join) {
+          const container = this.el.querySelector('.muc-bottom-panel');
+          container.innerHTML = html;
+          converse_muc_views_u.addClass('muc-bottom-panel--nickname', container);
+        } else {
+          this.hideChatRoomContents();
+          const container = this.el.querySelector('.chatroom-body');
+          container.insertAdjacentHTML('beforeend', html);
+        }
+
+        converse_muc_views_u.safeSave(this.model.session, {
+          'connection_status': converse_core.ROOMSTATUS.NICKNAME_REQUIRED
+        });
+      },
+
+      closeForm() {
+        /* Remove the configuration form without submitting and
+         * return to the chat view.
+         */
+        converse_muc_views_sizzle('.chatroom-form-container', this.el).forEach(e => converse_muc_views_u.addClass('hidden', e));
+        this.renderAfterTransition();
+      },
+
+      /**
+       * Start the process of configuring a groupchat, either by
+       * rendering a configuration form, or by auto-configuring
+       * based on the "roomconfig" data stored on the
+       * {@link _converse.ChatRoom}.
+       * Stores the new configuration on the {@link _converse.ChatRoom}
+       * once completed.
+       * @private
+       * @method _converse.ChatRoomView#getAndRenderConfigurationForm
+       * @param { Event } ev - DOM event that might be passed in if this
+       *   method is called due to a user action. In this
+       *   case, auto-configure won't happen, regardless of
+       *   the settings.
+       */
+      getAndRenderConfigurationForm() {
+        if (!this.config_form || !converse_muc_views_u.isVisible(this.config_form.el)) {
+          this.showSpinner();
+          this.model.fetchRoomConfiguration().then(iq => this.renderConfigurationForm(iq)).catch(e => headless_log.error(e));
+        } else {
+          this.closeForm();
+        }
+      },
+
+      hideChatRoomContents() {
+        const container_el = this.el.querySelector('.chatroom-body');
+
+        if (container_el !== null) {
+          [].forEach.call(container_el.children, child => child.classList.add('hidden'));
+        }
+      },
+
+      renderPasswordForm() {
+        this.hideChatRoomContents();
+        const message = this.model.get('password_validation_message');
+        this.model.save('password_validation_message', undefined);
+
+        if (!this.password_form) {
+          this.password_form = new _converse.MUCPasswordForm({
+            'model': new converse_muc_views_Backbone.Model({
+              'validation_message': message
+            }),
+            'chatroomview': this
+          });
+          const container_el = this.el.querySelector('.chatroom-body');
+          container_el.insertAdjacentElement('beforeend', this.password_form.el);
+        } else {
+          this.password_form.model.set('validation_message', message);
+        }
+
+        converse_muc_views_u.showElement(this.password_form.el);
+        this.model.session.save('connection_status', converse_core.ROOMSTATUS.PASSWORD_REQUIRED);
+      },
+
+      showDestroyedMessage() {
+        converse_muc_views_u.hideElement(this.el.querySelector('.chat-area'));
+        converse_muc_views_u.hideElement(this.el.querySelector('.occupants'));
+        converse_muc_views_sizzle('.spinner', this.el).forEach(converse_muc_views_u.removeElement);
+        const reason = this.model.get('destroyed_reason');
+        const moved_jid = this.model.get('moved_jid');
+        this.model.save({
+          'destroyed_reason': undefined,
+          'moved_jid': undefined
+        });
+        const container = this.el.querySelector('.disconnect-container');
+        container.innerHTML = chatroom_destroyed_default()({
+          '_': converse_muc_views_,
+          '__': __,
+          'jid': moved_jid,
+          'reason': reason ? "\"".concat(reason, "\"") : null
+        });
+        const switch_el = container.querySelector('a.switch-chat');
+
+        if (switch_el) {
+          switch_el.addEventListener('click', async ev => {
+            ev.preventDefault();
+            const room = await _converse.api.rooms.get(moved_jid, null, true);
+            room.maybeShow(true);
+            this.model.destroy();
+          });
+        }
+
+        converse_muc_views_u.showElement(container);
+      },
+
+      showDisconnectMessage() {
+        const message = this.model.get('disconnection_message');
+
+        if (!message) {
+          return;
+        }
+
+        converse_muc_views_u.hideElement(this.el.querySelector('.chat-area'));
+        converse_muc_views_u.hideElement(this.el.querySelector('.occupants'));
+        converse_muc_views_sizzle('.spinner', this.el).forEach(converse_muc_views_u.removeElement);
+        const messages = [message];
+        const actor = this.model.get('disconnection_actor');
+
+        if (actor) {
+          messages.push(__('This action was done by %1$s.', actor));
+        }
+
+        const reason = this.model.get('disconnection_reason');
+
+        if (reason) {
+          messages.push(__('The reason given is: "%1$s".', reason));
+        }
+
+        this.model.save({
+          'disconnection_message': undefined,
+          'disconnection_reason': undefined,
+          'disconnection_actor': undefined
+        });
+        const container = this.el.querySelector('.disconnect-container');
+        container.innerHTML = chatroom_disconnect_default()({
+          '_': converse_muc_views_,
+          'disconnect_messages': messages
+        });
+        converse_muc_views_u.showElement(container);
+      },
+
+      getNotificationWithMessage(message) {
+        let el = this.content.lastElementChild;
+
+        while (el) {
+          if (!converse_muc_views_.includes(converse_muc_views_.get(el, 'classList', []), 'chat-info')) {
+            return;
+          }
+
+          if (el.textContent === message) {
+            return el;
+          }
+
+          el = el.previousElementSibling;
+        }
+      },
+
+      removeEmptyHistoryFeedback() {
+        if (_converse.muc_show_logs_before_join && this.content.firstElementChild.matches('.empty-history-feedback')) {
+          this.content.removeChild(this.content.firstElementChild);
+        }
+      },
+
+      insertDayIndicator() {
+        this.removeEmptyHistoryFeedback();
+        return _converse.ChatBoxView.prototype.insertDayIndicator.apply(this, arguments);
+      },
+
+      insertMessage(view) {
+        this.removeEmptyHistoryFeedback();
+        return _converse.ChatBoxView.prototype.insertMessage.call(this, view);
+      },
+
+      insertNotification(message) {
+        this.removeEmptyHistoryFeedback();
+        this.content.insertAdjacentHTML('beforeend', info_default()({
+          'isodate': new Date().toISOString(),
+          'extra_classes': 'chat-event',
+          'message': message
+        }));
+      },
+
+      onOccupantAdded(occupant) {
+        if (occupant.get('jid') === _converse.bare_jid) {
+          this.renderHeading();
+          this.renderBottomPanel();
+        }
+
+        if (occupant.get('show') === 'online') {
+          this.showJoinNotification(occupant);
+        }
+      },
+
+      onOccupantRemoved(occupant) {
+        if (this.model.session.get('connection_status') === converse_core.ROOMSTATUS.ENTERED && occupant.get('show') === 'online') {
+          this.showLeaveNotification(occupant);
+        }
+      },
+
+      showJoinOrLeaveNotification(occupant) {
+        if (converse_muc_views_.includes(occupant.get('states'), '303')) {
+          return;
+        }
+
+        if (occupant.get('show') === 'offline') {
+          this.showLeaveNotification(occupant);
+        } else if (occupant.get('show') === 'online') {
+          this.showJoinNotification(occupant);
+        }
+      },
+
+      /**
+       * Working backwards, get today's most recent join/leave notification
+       * from the same user (if any exists) after the most recent chat message.
+       * @private
+       * @method _converse.ChatRoomView#getPreviousJoinOrLeaveNotification
+       * @param {HTMLElement} el
+       * @param {string} nick
+       */
+      getPreviousJoinOrLeaveNotification(el, nick) {
+        const today = new Date().toISOString().split('T')[0];
+
+        while (el !== null) {
+          if (!el.classList.contains('chat-info')) {
+            return;
+          } // Check whether el is still from today.
+          // We don't use `Dayjs.same` here, since it's about 4 times slower.
+
+
+          const date = el.getAttribute('data-isodate');
+
+          if (date && date.split('T')[0] !== today) {
+            return;
+          }
+
+          const data = converse_muc_views_.get(el, 'dataset', {});
+
+          if (data.join === nick || data.leave === nick || data.leavejoin === nick || data.joinleave === nick) {
+            return el;
+          }
+
+          el = el.previousElementSibling;
+        }
+      },
+
+      showJoinNotification(occupant) {
+        if (!_converse.muc_show_join_leave || this.model.session.get('connection_status') !== converse_core.ROOMSTATUS.ENTERED) {
+          return;
+        }
+
+        const nick = occupant.get('nick'),
+              stat = _converse.muc_show_join_leave_status ? occupant.get('status') : null,
+              prev_info_el = this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild, nick),
+              data = converse_muc_views_.get(prev_info_el, 'dataset', {});
+
+        if (data.leave === nick) {
+          let message;
+
+          if (stat) {
+            message = __('%1$s has left and re-entered the groupchat. "%2$s"', nick, stat);
+          } else {
+            message = __('%1$s has left and re-entered the groupchat', nick);
+          }
+
+          const data = {
+            'data_name': 'leavejoin',
+            'data_value': nick,
+            'isodate': new Date().toISOString(),
+            'extra_classes': 'chat-event',
+            'message': message
+          };
+          this.content.removeChild(prev_info_el);
+          this.content.insertAdjacentHTML('beforeend', info_default()(data));
+          const el = this.content.lastElementChild;
+          setTimeout(() => converse_muc_views_u.addClass('fade-out', el), 5000);
+          setTimeout(() => el.parentElement && el.parentElement.removeChild(el), 5500);
+        } else {
+          let message;
+
+          if (stat) {
+            message = __('%1$s has entered the groupchat. "%2$s"', nick, stat);
+          } else {
+            message = __('%1$s has entered the groupchat', nick);
+          }
+
+          const data = {
+            'data_name': 'join',
+            'data_value': nick,
+            'isodate': new Date().toISOString(),
+            'extra_classes': 'chat-event',
+            'message': message
+          };
+
+          if (prev_info_el) {
+            this.content.removeChild(prev_info_el);
+            this.content.insertAdjacentHTML('beforeend', info_default()(data));
+          } else {
+            this.content.insertAdjacentHTML('beforeend', info_default()(data));
+            this.insertDayIndicator(this.content.lastElementChild);
+          }
+        }
+
+        this.scrollDown();
+      },
+
+      showLeaveNotification(occupant) {
+        if (!_converse.muc_show_join_leave || converse_muc_views_.includes(occupant.get('states'), '303') || converse_muc_views_.includes(occupant.get('states'), '307')) {
+          return;
+        }
+
+        const nick = occupant.get('nick'),
+              stat = _converse.muc_show_join_leave_status ? occupant.get('status') : null,
+              prev_info_el = this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild, nick),
+              dataset = converse_muc_views_.get(prev_info_el, 'dataset', {});
+
+        if (dataset.join === nick) {
+          let message;
+
+          if (stat) {
+            message = __('%1$s has entered and left the groupchat. "%2$s"', nick, stat);
+          } else {
+            message = __('%1$s has entered and left the groupchat', nick);
+          }
+
+          const data = {
+            'data_name': 'joinleave',
+            'data_value': nick,
+            'isodate': new Date().toISOString(),
+            'extra_classes': 'chat-event',
+            'message': message
+          };
+          this.content.removeChild(prev_info_el);
+          this.content.insertAdjacentHTML('beforeend', info_default()(data));
+          const el = this.content.lastElementChild;
+          setTimeout(() => converse_muc_views_u.addClass('fade-out', el), 5000);
+          setTimeout(() => el.parentElement && el.parentElement.removeChild(el), 5500);
+        } else {
+          let message;
+
+          if (stat) {
+            message = __('%1$s has left the groupchat. "%2$s"', nick, stat);
+          } else {
+            message = __('%1$s has left the groupchat', nick);
+          }
+
+          const data = {
+            'message': message,
+            'isodate': new Date().toISOString(),
+            'extra_classes': 'chat-event',
+            'data_name': 'leave',
+            'data_value': nick
+          };
+
+          if (prev_info_el) {
+            this.content.removeChild(prev_info_el);
+            this.content.insertAdjacentHTML('beforeend', info_default()(data));
+          } else {
+            this.content.insertAdjacentHTML('beforeend', info_default()(data));
+            this.insertDayIndicator(this.content.lastElementChild);
+          }
+        }
+
+        this.scrollDown();
+      },
+
+      /**
+       * Rerender the groupchat after some kind of transition. For
+       * example after the spinner has been removed or after a
+       * form has been submitted and removed.
+       * @private
+       * @method _converse.ChatRoomView#renderAfterTransition
+       */
+      renderAfterTransition() {
+        const conn_status = this.model.session.get('connection_status');
+
+        if (conn_status == converse_core.ROOMSTATUS.NICKNAME_REQUIRED) {
+          this.renderNicknameForm();
+        } else if (conn_status == converse_core.ROOMSTATUS.PASSWORD_REQUIRED) {
+          this.renderPasswordForm();
+        } else if (conn_status == converse_core.ROOMSTATUS.ENTERED) {
+          this.hideChatRoomContents();
+          converse_muc_views_u.showElement(this.el.querySelector('.chat-area'));
+          converse_muc_views_u.showElement(this.el.querySelector('.occupants'));
+          this.scrollDown();
+        }
+      },
+
+      showSpinner() {
+        converse_muc_views_sizzle('.spinner', this.el).forEach(converse_muc_views_u.removeElement);
+        this.hideChatRoomContents();
+        const container_el = this.el.querySelector('.chatroom-body');
+        container_el.insertAdjacentHTML('afterbegin', spinner_default()());
+      },
+
+      /**
+       * Check if the spinner is being shown and if so, hide it.
+       * Also make sure then that the chat area and occupants
+       * list are both visible.
+       * @private
+       * @method _converse.ChatRoomView#hideSpinner
+       */
+      hideSpinner() {
+        const spinner = this.el.querySelector('.spinner');
+
+        if (spinner !== null) {
+          converse_muc_views_u.removeElement(spinner);
+          this.renderAfterTransition();
+        }
+
+        return this;
+      },
+
+      setChatRoomSubject() {
+        // For translators: the %1$s and %2$s parts will get
+        // replaced by the user and topic text respectively
+        // Example: Topic set by JC Brand to: Hello World!
+        const subject = this.model.get('subject'),
+              message = subject.text ? __('Topic set by %1$s', subject.author) : __('Topic cleared by %1$s', subject.author),
+              date = new Date().toISOString();
+        this.content.insertAdjacentHTML('beforeend', info_default()({
+          'isodate': date,
+          'extra_classes': 'chat-event',
+          'message': message
+        }));
+
+        if (subject.text) {
+          this.content.insertAdjacentHTML('beforeend', info_default()({
+            'isodate': date,
+            'extra_classes': 'chat-topic',
+            'message': converse_muc_views_u.addHyperlinks(xss_default.a.filterXSS(converse_muc_views_.get(this.model.get('subject'), 'text'), {
+              'whiteList': {}
+            })),
+            'render_message': true
+          }));
+        }
+
+        this.scrollDown();
+      }
+
+    });
+    /**
+     * Backbone.NativeView which renders MUC section of the control box.
+     * @class
+     * @namespace _converse.RoomsPanel
+     * @memberOf _converse
+     */
+
+    _converse.RoomsPanel = converse_muc_views_Backbone.NativeView.extend({
+      tagName: 'div',
+      className: 'controlbox-section',
+      id: 'chatrooms',
+      events: {
+        'click a.controlbox-heading__btn.show-add-muc-modal': 'showAddRoomModal',
+        'click a.controlbox-heading__btn.show-list-muc-modal': 'showListRoomsModal'
+      },
+
+      render() {
+        this.el.innerHTML = room_panel_default()({
+          'heading_chatrooms': __('Groupchats'),
+          'title_new_room': __('Add a new groupchat'),
+          'title_list_rooms': __('Query for groupchats')
+        });
+        return this;
+      },
+
+      showAddRoomModal(ev) {
+        if (this.add_room_modal === undefined) {
+          this.add_room_modal = new _converse.AddChatRoomModal({
+            'model': this.model
+          });
+        }
+
+        this.add_room_modal.show(ev);
+      },
+
+      showListRoomsModal(ev) {
+        if (this.list_rooms_modal === undefined) {
+          this.list_rooms_modal = new _converse.ListChatRoomsModal({
+            'model': this.model
+          });
+        }
+
+        this.list_rooms_modal.show(ev);
+      }
+
+    });
+    _converse.MUCConfigForm = converse_muc_views_Backbone.VDOMView.extend({
+      className: 'muc-config-form',
+      events: {
+        'submit .chatroom-form': 'submitConfigForm',
+        'click .button-cancel': 'closeConfigForm'
+      },
+
+      initialize(attrs) {
+        this.chatroomview = attrs.chatroomview;
+        this.listenTo(this.chatroomview.model.features, 'change:passwordprotected', this.render);
+        this.listenTo(this.chatroomview.model.features, 'change:config_stanza', this.render);
+        this.render();
+      },
+
+      toHTML() {
+        const stanza = converse_muc_views_u.toStanza(this.model.get('config_stanza'));
+        const whitelist = _converse.roomconfig_whitelist;
+        let fields = converse_muc_views_sizzle('field', stanza);
+
+        if (whitelist.length) {
+          fields = fields.filter(f => converse_muc_views_.includes(whitelist, f.getAttribute('var')));
+        }
+
+        const password_protected = this.model.features.get('passwordprotected');
+        const options = {
+          'new_password': !password_protected,
+          'fixed_username': this.model.get('jid')
+        };
+        return chatroom_form_default()({
+          '__': __,
+          'title': converse_muc_views_.get(stanza.querySelector('title'), 'textContent'),
+          'instructions': converse_muc_views_.get(stanza.querySelector('instructions'), 'textContent'),
+          'fields': fields.map(f => converse_muc_views_u.xForm2webForm(f, stanza, options))
+        });
+      },
+
+      submitConfigForm(ev) {
+        ev.preventDefault();
+        this.model.saveConfiguration(ev.target).then(() => this.model.refreshRoomFeatures());
+        this.chatroomview.closeForm();
+      },
+
+      closeConfigForm(ev) {
+        ev.preventDefault();
+        this.chatroomview.closeForm();
+      }
+
+    });
+    _converse.MUCPasswordForm = converse_muc_views_Backbone.VDOMView.extend({
+      className: 'muc-password-form',
+      events: {
+        'submit form': 'submitPassword'
+      },
+
+      initialize(attrs) {
+        this.chatroomview = attrs.chatroomview;
+        this.listenTo(this.model, 'change:validation_message', this.render);
+        this.render();
+      },
+
+      toHTML() {
+        const err_msg = this.model.get('validation_message');
+        return chatroom_password_form_default()({
+          'jid': this.model.get('jid'),
+          'heading': __('This groupchat requires a password'),
+          'label_password': __('Password: '),
+          'label_submit': __('Submit'),
+          'error_class': err_msg ? 'error' : '',
+          'validation_message': err_msg
+        });
+      },
+
+      submitPassword(ev) {
+        ev.preventDefault();
+        const password = this.el.querySelector('input[type=password]').value;
+        this.chatroomview.model.join(this.chatroomview.model.get('nick'), password);
+        this.model.set('validation_message', null);
+      }
+
+    });
+    _converse.ChatRoomOccupantView = converse_muc_views_Backbone.VDOMView.extend({
+      tagName: 'li',
+
+      initialize() {
+        this.listenTo(this.model, 'change', this.render);
+      },
+
+      toHTML() {
+        const show = this.model.get('show');
+        return occupant_default()(Object.assign({
+          '_': converse_muc_views_,
+          'jid': '',
+          'show': show,
+          'hint_show': _converse.PRETTY_CHAT_STATUS[show],
+          'hint_occupant': __('Click to mention %1$s in your message.', this.model.get('nick')),
+          'desc_moderator': __('This user is a moderator.'),
+          'desc_participant': __('This user can send messages in this groupchat.'),
+          'desc_visitor': __('This user can NOT send messages in this groupchat.'),
+          'label_moderator': __('Moderator'),
+          'label_visitor': __('Visitor'),
+          'label_owner': __('Owner'),
+          'label_member': __('Member'),
+          'label_admin': __('Admin')
+        }, this.model.toJSON()));
+      },
+
+      destroy() {
+        this.el.parentElement.removeChild(this.el);
+      }
+
+    });
+    _converse.ChatRoomOccupantsView = OrderedListView.extend({
+      tagName: 'div',
+      className: 'occupants col-md-3 col-4',
+      listItems: 'model',
+      sortEvent: 'change:role',
+      listSelector: '.occupant-list',
+      ItemView: _converse.ChatRoomOccupantView,
+
+      async initialize() {
+        OrderedListView.prototype.initialize.apply(this, arguments);
+        this.listenTo(this.model, 'add', this.maybeRenderInviteWidget);
+        this.listenTo(this.model, 'change:affiliation', this.maybeRenderInviteWidget);
+        this.chatroomview = this.model.chatroomview;
+        this.listenTo(this.chatroomview.model.features, 'change', this.renderRoomFeatures);
+        this.listenTo(this.chatroomview.model.features, 'change:open', this.renderInviteWidget);
+        this.listenTo(this.chatroomview.model, 'change:hidden_occupants', this.setVisibility);
+        this.render();
+        await this.model.fetched;
+        this.sortAndPositionAllItems();
+      },
+
+      render() {
+        this.el.innerHTML = chatroom_sidebar_default()(Object.assign(this.chatroomview.model.toJSON(), {
+          'allow_muc_invitations': _converse.allow_muc_invitations,
+          'label_occupants': __('Participants')
+        }));
+
+        if (_converse.allow_muc_invitations) {
+          _converse.api.waitUntil('rosterContactsFetched').then(() => this.renderInviteWidget());
+        }
+
+        this.setVisibility();
+        return this.renderRoomFeatures();
+      },
+
+      setVisibility() {
+        if (this.chatroomview.model.get('hidden_occupants')) {
+          converse_muc_views_u.hideElement(this.el);
+        } else {
+          converse_muc_views_u.showElement(this.el);
+          this.setOccupantsHeight();
+        }
+      },
+
+      maybeRenderInviteWidget(occupant) {
+        if (occupant.get('jid') === _converse.bare_jid) {
+          this.renderInviteWidget();
+        }
+      },
+
+      renderInviteWidget() {
+        const widget = this.el.querySelector('.room-invite');
+
+        if (this.shouldInviteWidgetBeShown()) {
+          if (widget === null) {
+            const heading = this.el.querySelector('.occupants-heading');
+            heading.insertAdjacentHTML('afterend', chatroom_invite_default()({
+              'error_message': null,
+              'label_invitation': __('Invite')
+            }));
+            this.initInviteWidget();
+          }
+        } else if (widget !== null) {
+          widget.remove();
+        }
+
+        return this;
+      },
+
+      renderRoomFeatures() {
+        const features = this.chatroomview.model.features,
+              picks = converse_muc_views_.pick(features.attributes, converse_core.ROOM_FEATURES),
+              iteratee = (a, v) => a || v;
+
+        if (converse_muc_views_.reduce(Object.values(picks), iteratee)) {
+          const el = this.el.querySelector('.chatroom-features');
+          el.innerHTML = chatroom_features_default()(Object.assign(features.toJSON(), {
+            __
+          }));
+          this.setOccupantsHeight();
+        }
+
+        return this;
+      },
+
+      setOccupantsHeight() {
+        const el = this.el.querySelector('.chatroom-features');
+        this.el.querySelector('.occupant-list').style.cssText = "height: calc(100% - ".concat(el.offsetHeight, "px - 5em);");
+      },
+
+      promptForInvite(suggestion) {
+        let reason = '';
+
+        if (!_converse.auto_join_on_invite) {
+          reason = prompt(__('You are about to invite %1$s to the groupchat "%2$s". ' + 'You may optionally include a message, explaining the reason for the invitation.', suggestion.text.label, this.chatroomview.model.getDisplayName()));
+        }
+
+        if (reason !== null) {
+          this.chatroomview.model.directInvite(suggestion.text.value, reason);
+        }
+
+        const form = this.el.querySelector('.room-invite form'),
+              input = form.querySelector('.invited-contact'),
+              error = form.querySelector('.error');
+
+        if (error !== null) {
+          error.parentNode.removeChild(error);
+        }
+
+        input.value = '';
+      },
+
+      inviteFormSubmitted(evt) {
+        evt.preventDefault();
+        const el = evt.target.querySelector('input.invited-contact'),
+              jid = el.value;
+
+        if (!jid || converse_muc_views_.compact(jid.split('@')).length < 2) {
+          evt.target.outerHTML = chatroom_invite_default()({
+            'error_message': __('Please enter a valid XMPP address'),
+            'label_invitation': __('Invite')
+          });
+          this.initInviteWidget();
+          return;
+        }
+
+        this.promptForInvite({
+          'target': el,
+          'text': {
+            'label': jid,
+            'value': jid
+          }
+        });
+      },
+
+      shouldInviteWidgetBeShown() {
+        return _converse.allow_muc_invitations && (this.chatroomview.model.features.get('open') || this.chatroomview.model.getOwnAffiliation() === "owner");
+      },
+
+      initInviteWidget() {
+        const form = this.el.querySelector('.room-invite form');
+
+        if (form === null) {
+          return;
+        }
+
+        form.addEventListener('submit', this.inviteFormSubmitted.bind(this), false);
+
+        const list = _converse.roster.map(i => ({
+          'label': i.getDisplayName(),
+          'value': i.get('jid')
+        }));
+
+        const el = this.el.querySelector('.suggestion-box').parentElement;
+
+        if (this.invite_auto_complete) {
+          this.invite_auto_complete.destroy();
+        }
+
+        this.invite_auto_complete = new _converse.AutoComplete(el, {
+          'min_chars': 1,
+          'list': list
+        });
+        this.invite_auto_complete.on('suggestion-box-selectcomplete', ev => this.promptForInvite(ev));
+        this.invite_auto_complete.on('suggestion-box-open', () => {
+          this.invite_auto_complete.ul.setAttribute('style', "max-height: calc(".concat(this.el.offsetHeight, "px - 80px);"));
+        });
+      }
+
+    });
+
+    function setMUCDomain(domain, controlboxview) {
+      controlboxview.getRoomsPanel().model.save('muc_domain', converse_muc_views_Strophe.getDomainFromJid(domain));
+    }
+
+    function setMUCDomainFromDisco(controlboxview) {
+      /* Check whether service discovery for the user's domain
+       * returned MUC information and use that to automatically
+       * set the MUC domain in the "Add groupchat" modal.
+       */
+      function featureAdded(feature) {
+        if (!feature) {
+          return;
+        }
+
+        if (feature.get('var') === converse_muc_views_Strophe.NS.MUC) {
+          feature.entity.getIdentity('conference', 'text').then(identity => {
+            if (identity) {
+              setMUCDomain(feature.get('from'), controlboxview);
+            }
+          });
+        }
+      }
+
+      _converse.api.waitUntil('discoInitialized').then(() => {
+        _converse.api.listen.on('serviceDiscovered', featureAdded); // Features could have been added before the controlbox was
+        // initialized. We're only interested in MUC
+
+
+        _converse.disco_entities.each(entity => featureAdded(entity.features.findWhere({
+          'var': converse_muc_views_Strophe.NS.MUC
+        })));
+      }).catch(e => headless_log.error(e));
+    }
+
+    function fetchAndSetMUCDomain(controlboxview) {
+      if (controlboxview.model.get('connected')) {
+        if (!controlboxview.getRoomsPanel().model.get('muc_domain')) {
+          if (_converse.muc_domain === undefined) {
+            setMUCDomainFromDisco(controlboxview);
+          } else {
+            setMUCDomain(_converse.muc_domain, controlboxview);
+          }
+        }
+      }
+    }
+    /************************ BEGIN Event Handlers ************************/
+
+
+    _converse.api.listen.on('chatBoxViewsInitialized', () => {
+      function openChatRoomFromURIClicked(ev) {
+        ev.preventDefault();
+
+        _converse.api.rooms.open(ev.target.href);
+      }
+
+      _converse.chatboxviews.delegate('click', 'a.open-chatroom', openChatRoomFromURIClicked);
+
+      async function addView(model) {
+        const views = _converse.chatboxviews;
+
+        if (!views.get(model.get('id')) && model.get('type') === _converse.CHATROOMS_TYPE && model.isValid()) {
+          await model.initialized;
+          return views.add(model.get('id'), new _converse.ChatRoomView({
+            model
+          }));
+        }
+      }
+
+      _converse.chatboxes.on('add', addView);
+    });
+
+    _converse.api.listen.on('clearSession', () => {
+      const view = _converse.chatboxviews.get('controlbox');
+
+      if (view && view.roomspanel) {
+        view.roomspanel.model.destroy();
+        view.roomspanel.remove();
+        delete view.roomspanel;
+      }
+    });
+
+    _converse.api.listen.on('controlBoxInitialized', view => {
+      if (!_converse.allow_muc) {
+        return;
+      }
+
+      fetchAndSetMUCDomain(view);
+      view.model.on('change:connected', () => fetchAndSetMUCDomain(view));
+    });
+    /************************ END Event Handlers ************************/
+
+    /************************ BEGIN API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The "roomviews" namespace groups methods relevant to chatroom
+       * (aka groupchats) views.
+       *
+       * @namespace _converse.api.roomviews
+       * @memberOf _converse.api
+       */
+      roomviews: {
+        /**
+         * Retrieves a groupchat (aka chatroom) view. The chat should already be open.
+         *
+         * @method _converse.api.roomviews.get
+         * @param {String|string[]} name - e.g. 'coven@conference.shakespeare.lit' or
+         *  ['coven@conference.shakespeare.lit', 'cave@conference.shakespeare.lit']
+         * @returns {Backbone.View} Backbone.View representing the groupchat
+         *
+         * @example
+         * // To return a single view, provide the JID of the groupchat
+         * const view = _converse.api.roomviews.get('coven@conference.shakespeare.lit');
+         *
+         * @example
+         * // To return an array of views, provide an array of JIDs:
+         * const views = _converse.api.roomviews.get(['coven@conference.shakespeare.lit', 'cave@conference.shakespeare.lit']);
+         *
+         * @example
+         * // To return views of all open groupchats, call the method without any parameters::
+         * const views = _converse.api.roomviews.get();
+         *
+         */
+        get(jids) {
+          if (Array.isArray(jids)) {
+            const views = _converse.api.chatviews.get(jids);
+
+            return views.filter(v => v.model.get('type') === _converse.CHATROOMS_TYPE);
+          } else {
+            const view = _converse.api.chatviews.get(jids);
+
+            if (view.model.get('type') === _converse.CHATROOMS_TYPE) {
+              return view;
+            } else {
+              return null;
+            }
+          }
+        },
+
+        /**
+         * Lets you close open chatrooms.
+         *
+         * You can call this method without any arguments to close
+         * all open chatrooms, or you can specify a single JID or
+         * an array of JIDs.
+         *
+         * @method _converse.api.roomviews.close
+         * @param {(String[]|String)} jids The JID or array of JIDs of the chatroom(s)
+         * @returns { Promise } - Promise which resolves once the views have been closed.
+         */
+        close(jids) {
+          let views;
+
+          if (jids === undefined) {
+            views = _converse.chatboxviews;
+          } else if (converse_muc_views_.isString(jids)) {
+            views = [_converse.chatboxviews.get(jids)].filter(v => v);
+          } else if (Array.isArray(jids)) {
+            views = jids.map(jid => _converse.chatboxviews.get(jid));
+          }
+
+          return Promise.all(views.map(v => v.is_chatroom && v.model && v.close()));
+        }
+
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/converse-headlines-view.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-headlines-view
+ */
+
+
+
+converse_core.plugins.add('converse-headlines-view', {
+  /* Plugin dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin.
+   *
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found. By default it's
+   * false, which means these plugins are only loaded opportunistically.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-headlines", "converse-chatview"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    _converse.HeadlinesBoxView = _converse.ChatBoxView.extend({
+      className: 'chatbox headlines',
+      events: {
+        'click .close-chatbox-button': 'close',
+        'click .toggle-chatbox-button': 'minimize',
+        'keypress textarea.chat-textarea': 'onKeyDown'
+      },
+
+      initialize() {
+        this.initDebounced();
+        this.model.disable_mam = true; // Don't do MAM queries for this box
+
+        this.listenTo(this.model.messages, 'add', this.onMessageAdded);
+        this.listenTo(this.model, 'show', this.show);
+        this.listenTo(this.model, 'destroy', this.hide);
+        this.listenTo(this.model, 'change:minimized', this.onMinimizedChanged);
+        this.render().insertHeading();
+        this.updateAfterMessagesFetched();
+        this.insertIntoDOM().hide();
+        /**
+         * Triggered once the {@link _converse.HeadlinesBoxView} has been initialized
+         * @event _converse#headlinesBoxViewInitialized
+         * @type { _converse.HeadlinesBoxView }
+         * @example _converse.api.listen.on('headlinesBoxViewInitialized', view => { ... });
+         */
+
+        _converse.api.trigger('headlinesBoxViewInitialized', this);
+      },
+
+      render() {
+        this.el.setAttribute('id', this.model.get('box_id'));
+        this.el.innerHTML = chatbox_default()(Object.assign(this.model.toJSON(), {
+          info_close: '',
+          label_personal_message: '',
+          show_send_button: false,
+          show_toolbar: false,
+          unread_msgs: ''
+        }));
+        this.content = this.el.querySelector('.chat-content');
+        return this;
+      },
+
+      // Override to avoid the methods in converse-chatview.js
+      'renderMessageForm': function renderMessageForm() {},
+      'afterShown': function afterShown() {}
+    });
+
+    _converse.api.listen.on('chatBoxViewsInitialized', () => {
+      const views = _converse.chatboxviews;
+
+      _converse.chatboxes.on('add', item => {
+        if (!views.get(item.get('id')) && item.get('type') === _converse.HEADLINES_TYPE) {
+          views.add(item.get('id'), new _converse.HeadlinesBoxView({
+            model: item
+          }));
+        }
+      });
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/converse-notification.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, JC Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-notification
+ */
+
+
+
+const {
+  Strophe: converse_notification_Strophe,
+  sizzle: converse_notification_sizzle
+} = converse_core.env;
+const converse_notification_u = converse_core.env.utils;
+converse_core.plugins.add('converse-notification', {
+  dependencies: ["converse-chatboxes"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse;
+    _converse.supports_html5_notification = "Notification" in window;
+
+    _converse.api.settings.update({
+      notify_all_room_messages: false,
+      show_desktop_notifications: true,
+      show_chat_state_notifications: false,
+      chatstate_notification_blacklist: [],
+      // ^ a list of JIDs to ignore concerning chat state notifications
+      play_sounds: true,
+      sounds_path: 'sounds/',
+      notification_icon: 'logo/conversejs-filled.svg',
+      notification_delay: 5000
+    });
+
+    _converse.shouldNotifyOfGroupMessage = function (message) {
+      /* Is this a group message worthy of notification?
+       */
+      let notify_all = _converse.notify_all_room_messages;
+      const jid = message.getAttribute('from'),
+            resource = converse_notification_Strophe.getResourceFromJid(jid),
+            room_jid = converse_notification_Strophe.getBareJidFromJid(jid),
+            sender = resource && converse_notification_Strophe.unescapeNode(resource) || '';
+
+      if (sender === '' || message.querySelectorAll('delay').length > 0) {
+        return false;
+      }
+
+      const room = _converse.chatboxes.get(room_jid);
+
+      const body = message.querySelector('body');
+
+      if (body === null) {
+        return false;
+      }
+
+      const mentioned = new RegExp("\\b".concat(room.get('nick'), "\\b")).test(body.textContent);
+      notify_all = notify_all === true || Array.isArray(notify_all) && notify_all.includes(room_jid);
+
+      if (sender === room.get('nick') || !notify_all && !mentioned) {
+        return false;
+      }
+
+      return true;
+    };
+
+    _converse.isMessageToHiddenChat = function (message) {
+      if (_converse.isUniView()) {
+        const jid = converse_notification_Strophe.getBareJidFromJid(message.getAttribute('from'));
+
+        const view = _converse.chatboxviews.get(jid);
+
+        if (view) {
+          return view.model.get('hidden') || _converse.windowState === 'hidden' || !converse_notification_u.isVisible(view.el);
+        }
+
+        return true;
+      }
+
+      return _converse.windowState === 'hidden';
+    };
+
+    _converse.shouldNotifyOfMessage = function (message) {
+      const forwarded = message.querySelector('forwarded');
+
+      if (forwarded !== null) {
+        return false;
+      } else if (message.getAttribute('type') === 'groupchat') {
+        return _converse.shouldNotifyOfGroupMessage(message);
+      } else if (converse_notification_u.isHeadlineMessage(_converse, message)) {
+        // We want to show notifications for headline messages.
+        return _converse.isMessageToHiddenChat(message);
+      }
+
+      const is_me = converse_notification_Strophe.getBareJidFromJid(message.getAttribute('from')) === _converse.bare_jid;
+
+      return !converse_notification_u.isOnlyChatStateNotification(message) && !converse_notification_u.isOnlyMessageDeliveryReceipt(message) && !is_me && (_converse.show_desktop_notifications === 'all' || _converse.isMessageToHiddenChat(message));
+    };
+    /**
+     * Plays a notification sound
+     * @private
+     * @method _converse#playSoundNotification
+     */
+
+
+    _converse.playSoundNotification = function () {
+      if (_converse.play_sounds && window.Audio !== undefined) {
+        const audioOgg = new Audio(_converse.sounds_path + "msg_received.ogg");
+        const canPlayOgg = audioOgg.canPlayType('audio/ogg');
+
+        if (canPlayOgg === 'probably') {
+          return audioOgg.play();
+        }
+
+        const audioMp3 = new Audio(_converse.sounds_path + "msg_received.mp3");
+        const canPlayMp3 = audioMp3.canPlayType('audio/mp3');
+
+        if (canPlayMp3 === 'probably') {
+          audioMp3.play();
+        } else if (canPlayOgg === 'maybe') {
+          audioOgg.play();
+        } else if (canPlayMp3 === 'maybe') {
+          audioMp3.play();
+        }
+      }
+    };
+
+    _converse.areDesktopNotificationsEnabled = function () {
+      return _converse.supports_html5_notification && _converse.show_desktop_notifications && Notification.permission === "granted";
+    };
+    /**
+     * Shows an HTML5 Notification with the passed in message
+     * @private
+     * @method _converse#showMessageNotification
+     * @param { String } message
+     */
+
+
+    _converse.showMessageNotification = function (message) {
+      if (!_converse.areDesktopNotificationsEnabled()) {
+        return;
+      }
+
+      let title, roster_item;
+      const full_from_jid = message.getAttribute('from'),
+            from_jid = converse_notification_Strophe.getBareJidFromJid(full_from_jid);
+
+      if (message.getAttribute('type') === 'headline') {
+        if (!from_jid.includes('@') || _converse.allow_non_roster_messaging) {
+          title = __("Notification from %1$s", from_jid);
+        } else {
+          return;
+        }
+      } else if (!from_jid.includes('@')) {
+        // workaround for Prosody which doesn't give type "headline"
+        title = __("Notification from %1$s", from_jid);
+      } else if (message.getAttribute('type') === 'groupchat') {
+        title = __("%1$s says", converse_notification_Strophe.getResourceFromJid(full_from_jid));
+      } else {
+        if (_converse.roster === undefined) {
+          headless_log.error("Could not send notification, because roster is undefined");
+          return;
+        }
+
+        roster_item = _converse.roster.get(from_jid);
+
+        if (roster_item !== undefined) {
+          title = __("%1$s says", roster_item.getDisplayName());
+        } else {
+          if (_converse.allow_non_roster_messaging) {
+            title = __("%1$s says", from_jid);
+          } else {
+            return;
+          }
+        }
+      } // TODO: we should suppress notifications if we cannot decrypt
+      // the message...
+
+
+      const body = converse_notification_sizzle("encrypted[xmlns=\"".concat(converse_notification_Strophe.NS.OMEMO, "\"]"), message).length ? __('OMEMO Message received') : Object(lodash["get"])(message.querySelector('body'), 'textContent');
+
+      if (!body) {
+        return;
+      }
+
+      const n = new Notification(title, {
+        'body': body,
+        'lang': _converse.locale,
+        'icon': _converse.notification_icon,
+        'requireInteraction': !_converse.notification_delay
+      });
+
+      if (_converse.notification_delay) {
+        setTimeout(n.close.bind(n), _converse.notification_delay);
+      }
+    };
+
+    _converse.showChatStateNotification = function (contact) {
+      /* Creates an HTML5 Notification to inform of a change in a
+       * contact's chat state.
+       */
+      if (_converse.chatstate_notification_blacklist.includes(contact.jid)) {
+        // Don't notify if the user is being ignored.
+        return;
+      }
+
+      const chat_state = contact.chat_status;
+      let message = null;
+
+      if (chat_state === 'offline') {
+        message = __('has gone offline');
+      } else if (chat_state === 'away') {
+        message = __('has gone away');
+      } else if (chat_state === 'dnd') {
+        message = __('is busy');
+      } else if (chat_state === 'online') {
+        message = __('has come online');
+      }
+
+      if (message === null) {
+        return;
+      }
+
+      const n = new Notification(contact.getDisplayName(), {
+        body: message,
+        lang: _converse.locale,
+        icon: _converse.notification_icon
+      });
+      setTimeout(n.close.bind(n), 5000);
+    };
+
+    _converse.showContactRequestNotification = function (contact) {
+      const n = new Notification(contact.getDisplayName(), {
+        body: __('wants to be your contact'),
+        lang: _converse.locale,
+        icon: _converse.notification_icon
+      });
+      setTimeout(n.close.bind(n), 5000);
+    };
+
+    _converse.showFeedbackNotification = function (data) {
+      if (data.klass === 'error' || data.klass === 'warn') {
+        const n = new Notification(data.subject, {
+          body: data.message,
+          lang: _converse.locale,
+          icon: _converse.notification_icon
+        });
+        setTimeout(n.close.bind(n), 5000);
+      }
+    };
+
+    _converse.handleChatStateNotification = function (contact) {
+      /* Event handler for on('contactPresenceChanged').
+       * Will show an HTML5 notification to indicate that the chat
+       * status has changed.
+       */
+      if (_converse.areDesktopNotificationsEnabled() && _converse.show_chat_state_notifications) {
+        _converse.showChatStateNotification(contact);
+      }
+    };
+
+    _converse.handleMessageNotification = function (data) {
+      /* Event handler for the on('message') event. Will call methods
+       * to play sounds and show HTML5 notifications.
+       */
+      const message = data.stanza;
+
+      if (!_converse.shouldNotifyOfMessage(message)) {
+        return false;
+      }
+      /**
+       * Triggered when a notification (sound or HTML5 notification) for a new
+       * message has will be made.
+       * @event _converse#messageNotification
+       * @type { XMLElement }
+       * @example _converse.api.listen.on('messageNotification', stanza => { ... });
+       */
+
+
+      _converse.api.trigger('messageNotification', message);
+
+      _converse.playSoundNotification();
+
+      _converse.showMessageNotification(message);
+    };
+
+    _converse.handleContactRequestNotification = function (contact) {
+      if (_converse.areDesktopNotificationsEnabled(true)) {
+        _converse.showContactRequestNotification(contact);
+      }
+    };
+
+    _converse.handleFeedback = function (data) {
+      if (_converse.areDesktopNotificationsEnabled(true)) {
+        _converse.showFeedbackNotification(data);
+      }
+    };
+
+    _converse.requestPermission = function () {
+      if (_converse.supports_html5_notification && !['denied', 'granted'].includes(Notification.permission)) {
+        // Ask user to enable HTML5 notifications
+        Notification.requestPermission();
+      }
+    };
+
+    _converse.api.listen.on('pluginsInitialized', function () {
+      // We only register event handlers after all plugins are
+      // registered, because other plugins might override some of our
+      // handlers.
+      _converse.api.listen.on('contactRequest', _converse.handleContactRequestNotification);
+
+      _converse.api.listen.on('contactPresenceChanged', _converse.handleChatStateNotification);
+
+      _converse.api.listen.on('message', _converse.handleMessageNotification);
+
+      _converse.api.listen.on('feedback', _converse.handleFeedback);
+
+      _converse.api.listen.on('connected', _converse.requestPermission);
+    });
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/chat_status_modal.html
+var chat_status_modal = __webpack_require__(182);
+var chat_status_modal_default = /*#__PURE__*/__webpack_require__.n(chat_status_modal);
+
+// EXTERNAL MODULE: ./src/templates/client_info_modal.html
+var client_info_modal = __webpack_require__(183);
+var client_info_modal_default = /*#__PURE__*/__webpack_require__.n(client_info_modal);
+
+// EXTERNAL MODULE: ./src/templates/profile_modal.html
+var profile_modal = __webpack_require__(184);
+var profile_modal_default = /*#__PURE__*/__webpack_require__.n(profile_modal);
+
+// EXTERNAL MODULE: ./src/templates/profile_view.html
+var profile_view = __webpack_require__(185);
+var profile_view_default = /*#__PURE__*/__webpack_require__.n(profile_view);
+
+// CONCATENATED MODULE: ./src/converse-profile.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2013-2017, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-profile
+ */
+
+
+
+
+
+
+
+
+
+
+
+const {
+  sizzle: converse_profile_sizzle
+} = converse_core.env;
+const converse_profile_u = converse_core.env.utils;
+converse_core.plugins.add('converse-profile', {
+  dependencies: ["converse-status", "converse-modal", "converse-vcard", "converse-chatboxviews"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      'show_client_info': true
+    });
+
+    _converse.ProfileModal = _converse.BootstrapModal.extend({
+      events: {
+        'change input[type="file"': "updateFilePreview",
+        'click .change-avatar': "openFileSelection",
+        'submit .profile-form': 'onFormSubmitted'
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'change', this.render);
+
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+        /**
+         * Triggered when the _converse.ProfileModal has been created and initialized.
+         * @event _converse#profileModalInitialized
+         * @type { _converse.XMPPStatus }
+         * @example _converse.api.listen.on('profileModalInitialized', status => { ... });
+         */
+
+
+        _converse.api.trigger('profileModalInitialized', this.model);
+      },
+
+      toHTML() {
+        return profile_modal_default()(Object.assign(this.model.toJSON(), this.model.vcard.toJSON(), {
+          '__': __,
+          '_converse': _converse,
+          'alt_avatar': __('Your avatar image'),
+          'heading_profile': __('Your Profile'),
+          'label_close': __('Close'),
+          'label_email': __('Email'),
+          'label_fullname': __('Full Name'),
+          'label_jid': __('XMPP Address (JID)'),
+          'label_nickname': __('Nickname'),
+          'label_role': __('Role'),
+          'label_role_help': __('Use commas to separate multiple roles. ' + 'Your roles are shown next to your name on your chat messages.'),
+          'label_url': __('URL'),
+          'utils': converse_profile_u,
+          'view': this
+        }));
+      },
+
+      afterRender() {
+        this.tabs = converse_profile_sizzle('.nav-item .nav-link', this.el).map(e => new bootstrap_native_default.a.Tab(e));
+      },
+
+      openFileSelection(ev) {
+        ev.preventDefault();
+        this.el.querySelector('input[type="file"]').click();
+      },
+
+      updateFilePreview(ev) {
+        const file = ev.target.files[0],
+              reader = new FileReader();
+
+        reader.onloadend = () => {
+          this.el.querySelector('.avatar').setAttribute('src', reader.result);
+        };
+
+        reader.readAsDataURL(file);
+      },
+
+      setVCard(data) {
+        _converse.api.vcard.set(_converse.bare_jid, data).then(() => _converse.api.vcard.update(this.model.vcard, true)).catch(err => {
+          headless_log.fatal(err);
+
+          _converse.api.show('error', __('Error'), [__("Sorry, an error happened while trying to save your profile data."), __("You can check your browser's developer console for any error output.")]);
+        });
+
+        this.modal.hide();
+      },
+
+      onFormSubmitted(ev) {
+        ev.preventDefault();
+        const reader = new FileReader(),
+              form_data = new FormData(ev.target),
+              image_file = form_data.get('image');
+        const data = {
+          'fn': form_data.get('fn'),
+          'nickname': form_data.get('nickname'),
+          'role': form_data.get('role'),
+          'email': form_data.get('email'),
+          'url': form_data.get('url')
+        };
+
+        if (!image_file.size) {
+          Object.assign(data, {
+            'image': this.model.vcard.get('image'),
+            'image_type': this.model.vcard.get('image_type')
+          });
+          this.setVCard(data);
+        } else {
+          reader.onloadend = () => {
+            Object.assign(data, {
+              'image': btoa(reader.result),
+              'image_type': image_file.type
+            });
+            this.setVCard(data);
+          };
+
+          reader.readAsBinaryString(image_file);
+        }
+      }
+
+    });
+    _converse.ChatStatusModal = _converse.BootstrapModal.extend({
+      events: {
+        "submit form#set-xmpp-status": "onFormSubmitted",
+        "click .clear-input": "clearStatusMessage"
+      },
+
+      toHTML() {
+        return chat_status_modal_default()(Object.assign(this.model.toJSON(), this.model.vcard.toJSON(), {
+          'label_away': __('Away'),
+          'label_close': __('Close'),
+          'label_busy': __('Busy'),
+          'label_cancel': __('Cancel'),
+          'label_custom_status': __('Custom status'),
+          'label_offline': __('Offline'),
+          'label_online': __('Online'),
+          'label_save': __('Save'),
+          'label_xa': __('Away for long'),
+          'modal_title': __('Change chat status'),
+          'placeholder_status_message': __('Personal status message')
+        }));
+      },
+
+      afterRender() {
+        this.el.addEventListener('shown.bs.modal', () => {
+          this.el.querySelector('input[name="status_message"]').focus();
+        }, false);
+      },
+
+      clearStatusMessage(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+          converse_profile_u.hideElement(this.el.querySelector('.clear-input'));
+        }
+
+        const roster_filter = this.el.querySelector('input[name="status_message"]');
+        roster_filter.value = '';
+      },
+
+      onFormSubmitted(ev) {
+        ev.preventDefault();
+        const data = new FormData(ev.target);
+        this.model.save({
+          'status_message': data.get('status_message'),
+          'status': data.get('chat_status')
+        });
+        this.modal.hide();
+      }
+
+    });
+    _converse.ClientInfoModal = _converse.BootstrapModal.extend({
+      toHTML() {
+        return client_info_modal_default()(Object.assign(this.model.toJSON(), this.model.vcard.toJSON(), {
+          '__': __,
+          'modal_title': __('About'),
+          'version_name': _converse.VERSION_NAME,
+          'first_subtitle': __('%1$s Open Source %2$s XMPP chat client brought to you by %3$s Opkode %2$s', '<a target="_blank" rel="nofollow" href="https://conversejs.org">', '</a>', '<a target="_blank" rel="nofollow" href="https://opkode.com">'),
+          'second_subtitle': __('%1$s Translate %2$s it into your own language', '<a target="_blank" rel="nofollow" href="https://hosted.weblate.org/projects/conversejs/#languages">', '</a>')
+        }));
+      }
+
+    });
+    _converse.XMPPStatusView = _converse.VDOMViewWithAvatar.extend({
+      tagName: "div",
+      events: {
+        "click a.show-profile": "showProfileModal",
+        "click a.change-status": "showStatusChangeModal",
+        "click .show-client-info": "showClientInfoModal",
+        "click .logout": "logOut"
+      },
+
+      initialize() {
+        this.listenTo(this.model, "change", this.render);
+        this.listenTo(this.model.vcard, "change", this.render);
+      },
+
+      toHTML() {
+        const chat_status = this.model.get('status') || 'offline';
+        return profile_view_default()(Object.assign(this.model.toJSON(), this.model.vcard.toJSON(), {
+          '__': __,
+          'fullname': this.model.vcard.get('fullname') || _converse.bare_jid,
+          'status_message': this.model.get('status_message') || __("I am %1$s", this.getPrettyStatus(chat_status)),
+          'chat_status': chat_status,
+          '_converse': _converse,
+          'title_change_settings': __('Change settings'),
+          'title_change_status': __('Click to change your chat status'),
+          'title_log_out': __('Log out'),
+          'info_details': __('Show details about this chat client'),
+          'title_your_profile': __('Your profile')
+        }));
+      },
+
+      afterRender() {
+        this.renderAvatar();
+      },
+
+      showProfileModal(ev) {
+        if (this.profile_modal === undefined) {
+          this.profile_modal = new _converse.ProfileModal({
+            model: this.model
+          });
+        }
+
+        this.profile_modal.show(ev);
+      },
+
+      showStatusChangeModal(ev) {
+        if (this.status_modal === undefined) {
+          this.status_modal = new _converse.ChatStatusModal({
+            model: this.model
+          });
+        }
+
+        this.status_modal.show(ev);
+      },
+
+      showClientInfoModal(ev) {
+        if (this.client_info_modal === undefined) {
+          this.client_info_modal = new _converse.ClientInfoModal({
+            model: this.model
+          });
+        }
+
+        this.client_info_modal.show(ev);
+      },
+
+      logOut(ev) {
+        ev.preventDefault();
+        const result = confirm(__("Are you sure you want to log out?"));
+
+        if (result === true) {
+          _converse.api.user.logout();
+        }
+      },
+
+      getPrettyStatus(stat) {
+        if (stat === 'chat') {
+          return __('online');
+        } else if (stat === 'dnd') {
+          return __('busy');
+        } else if (stat === 'xa') {
+          return __('away for long');
+        } else if (stat === 'away') {
+          return __('away');
+        } else if (stat === 'offline') {
+          return __('offline');
+        } else {
+          return __(stat) || __('online');
+        }
+      }
+
+    });
+    /******************** Event Handlers ********************/
+
+    _converse.api.listen.on('controlBoxPaneInitialized', async view => {
+      await _converse.api.waitUntil('VCardsInitialized');
+      _converse.xmppstatusview = new _converse.XMPPStatusView({
+        'model': _converse.xmppstatus
+      });
+      view.el.insertAdjacentElement('afterBegin', _converse.xmppstatusview.render().el);
+    });
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/toolbar_omemo.html
+var toolbar_omemo = __webpack_require__(186);
+var toolbar_omemo_default = /*#__PURE__*/__webpack_require__.n(toolbar_omemo);
+
+// CONCATENATED MODULE: ./src/converse-omemo.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/* global libsignal, ArrayBuffer */
+
+/**
+ * @module converse-omemo
+ */
+
+
+
+
+const {
+  Backbone: converse_omemo_Backbone,
+  Strophe: converse_omemo_Strophe,
+  sizzle: converse_omemo_sizzle,
+  $build: converse_omemo_$build,
+  $iq: converse_omemo_$iq,
+  $msg: converse_omemo_$msg,
+  _: converse_omemo_
+} = converse_core.env;
+const converse_omemo_u = converse_core.env.utils;
+converse_omemo_Strophe.addNamespace('OMEMO_DEVICELIST', converse_omemo_Strophe.NS.OMEMO + ".devicelist");
+converse_omemo_Strophe.addNamespace('OMEMO_VERIFICATION', converse_omemo_Strophe.NS.OMEMO + ".verification");
+converse_omemo_Strophe.addNamespace('OMEMO_WHITELISTED', converse_omemo_Strophe.NS.OMEMO + ".whitelisted");
+converse_omemo_Strophe.addNamespace('OMEMO_BUNDLES', converse_omemo_Strophe.NS.OMEMO + ".bundles");
+const UNDECIDED = 0;
+const TRUSTED = 1; // eslint-disable-line no-unused-vars
+
+const UNTRUSTED = -1;
+const TAG_LENGTH = 128;
+const KEY_ALGO = {
+  'name': "AES-GCM",
+  'length': 128
+};
+
+class IQError extends Error {
+  constructor(message, iq) {
+    super(message, iq);
+    this.name = 'IQError';
+    this.iq = iq;
+  }
+
+}
+
+function parseBundle(bundle_el) {
+  /* Given an XML element representing a user's OMEMO bundle, parse it
+   * and return a map.
+   */
+  const signed_prekey_public_el = bundle_el.querySelector('signedPreKeyPublic');
+  const signed_prekey_signature_el = bundle_el.querySelector('signedPreKeySignature');
+  const prekeys = converse_omemo_sizzle("prekeys > preKeyPublic", bundle_el).map(el => ({
+    'id': parseInt(el.getAttribute('preKeyId'), 10),
+    'key': el.textContent
+  }));
+  return {
+    'identity_key': bundle_el.querySelector('identityKey').textContent.trim(),
+    'signed_prekey': {
+      'id': parseInt(signed_prekey_public_el.getAttribute('signedPreKeyId'), 10),
+      'public_key': signed_prekey_public_el.textContent,
+      'signature': signed_prekey_signature_el.textContent
+    },
+    'prekeys': prekeys
+  };
+}
+
+converse_core.plugins.add('converse-omemo', {
+  enabled(_converse) {
+    return window.libsignal && !_converse.blacklisted_plugins.includes('converse-omemo') && _converse.config.get('trusted');
+  },
+
+  dependencies: ["converse-chatview", "converse-pubsub", "converse-profile"],
+  overrides: {
+    ProfileModal: {
+      events: {
+        'change input.select-all': 'selectAll',
+        'click .generate-bundle': 'generateOMEMODeviceBundle',
+        'submit .fingerprint-removal': 'removeSelectedFingerprints'
+      },
+
+      initialize() {
+        const {
+          _converse
+        } = this.__super__;
+        this.debouncedRender = converse_omemo_.debounce(this.render, 50);
+        this.devicelist = _converse.devicelists.get(_converse.bare_jid);
+        this.listenTo(this.devicelist.devices, 'change:bundle', this.debouncedRender);
+        this.listenTo(this.devicelist.devices, 'reset', this.debouncedRender);
+        this.listenTo(this.devicelist.devices, 'reset', this.debouncedRender);
+        this.listenTo(this.devicelist.devices, 'remove', this.debouncedRender);
+        this.listenTo(this.devicelist.devices, 'add', this.debouncedRender);
+        return this.__super__.initialize.apply(this, arguments);
+      },
+
+      beforeRender() {
+        const {
+          _converse
+        } = this.__super__,
+              device_id = _converse.omemo_store.get('device_id');
+
+        if (device_id) {
+          this.current_device = this.devicelist.devices.get(device_id);
+        }
+
+        this.other_devices = this.devicelist.devices.filter(d => d.get('id') !== device_id);
+
+        if (this.__super__.beforeRender) {
+          return this.__super__.beforeRender.apply(this, arguments);
+        }
+      },
+
+      selectAll(ev) {
+        let sibling = converse_omemo_u.ancestor(ev.target, 'li');
+
+        while (sibling) {
+          sibling.querySelector('input[type="checkbox"]').checked = ev.target.checked;
+          sibling = sibling.nextElementSibling;
+        }
+      },
+
+      removeSelectedFingerprints(ev) {
+        ev.preventDefault();
+        ev.stopPropagation();
+        ev.target.querySelector('.select-all').checked = false;
+        const device_ids = converse_omemo_sizzle('.fingerprint-removal-item input[type="checkbox"]:checked', ev.target).map(c => c.value);
+        this.devicelist.removeOwnDevices(device_ids).then(this.modal.hide).catch(err => {
+          const {
+            _converse
+          } = this.__super__,
+                {
+            __
+          } = _converse;
+          headless_log.error(err);
+
+          _converse.api.alert(converse_omemo_Strophe.LogLevel.ERROR, __('Error'), [__('Sorry, an error occurred while trying to remove the devices.')]);
+        });
+      },
+
+      generateOMEMODeviceBundle(ev) {
+        const {
+          _converse
+        } = this.__super__,
+              {
+          __,
+          api
+        } = _converse;
+        ev.preventDefault();
+
+        if (confirm(__("Are you sure you want to generate new OMEMO keys? " + "This will remove your old keys and all previously encrypted messages will no longer be decryptable on this device."))) {
+          api.omemo.bundle.generate();
+        }
+      }
+
+    },
+    UserDetailsModal: {
+      events: {
+        'click .fingerprint-trust .btn input': 'toggleDeviceTrust'
+      },
+
+      initialize() {
+        const {
+          _converse
+        } = this.__super__;
+        const jid = this.model.get('jid');
+        this.devicelist = _converse.devicelists.getDeviceList(jid);
+        this.listenTo(this.devicelist.devices, 'change:bundle', this.render);
+        this.listenTo(this.devicelist.devices, 'change:trusted', this.render);
+        this.listenTo(this.devicelist.devices, 'remove', this.render);
+        this.listenTo(this.devicelist.devices, 'add', this.render);
+        this.listenTo(this.devicelist.devices, 'reset', this.render);
+        return this.__super__.initialize.apply(this, arguments);
+      },
+
+      toggleDeviceTrust(ev) {
+        const radio = ev.target;
+        const device = this.devicelist.devices.get(radio.getAttribute('name'));
+        device.save('trusted', parseInt(radio.value, 10));
+      }
+
+    },
+    ChatBox: {
+      async getMessageAttributesFromStanza(stanza, original_stanza) {
+        const {
+          _converse
+        } = this.__super__;
+        const encrypted = converse_omemo_sizzle("encrypted[xmlns=\"".concat(converse_omemo_Strophe.NS.OMEMO, "\"]"), original_stanza).pop(),
+              attrs = await this.__super__.getMessageAttributesFromStanza.apply(this, arguments);
+
+        if (!encrypted || !_converse.config.get('trusted')) {
+          return attrs;
+        } else {
+          return this.getEncryptionAttributesfromStanza(stanza, original_stanza, attrs);
+        }
+      },
+
+      async sendMessage(text, spoiler_hint) {
+        if (this.get('omemo_active') && text) {
+          const {
+            _converse
+          } = this.__super__;
+          const attrs = this.getOutgoingMessageAttributes(text, spoiler_hint);
+          attrs['is_encrypted'] = true;
+          attrs['plaintext'] = attrs.message;
+          let message, stanza;
+
+          try {
+            const devices = await _converse.getBundlesAndBuildSessions(this);
+            message = this.messages.create(attrs);
+            stanza = await _converse.createOMEMOMessageStanza(this, message, devices);
+          } catch (e) {
+            this.handleMessageSendError(e);
+            return null;
+          }
+
+          _converse.api.send(stanza);
+
+          return message;
+        } else {
+          return this.__super__.sendMessage.apply(this, arguments);
+        }
+      }
+
+    },
+    ChatBoxView: {
+      events: {
+        'click .toggle-omemo': 'toggleOMEMO'
+      },
+
+      initialize() {
+        this.__super__.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change:omemo_active', this.renderOMEMOToolbarButton);
+        this.listenTo(this.model, 'change:omemo_supported', this.onOMEMOSupportedDetermined);
+      },
+
+      showMessage(message) {
+        // We don't show a message if it's only keying material
+        if (!message.get('is_only_key')) {
+          return this.__super__.showMessage.apply(this, arguments);
+        }
+      }
+
+    },
+    ChatRoomView: {
+      events: {
+        'click .toggle-omemo': 'toggleOMEMO'
+      },
+
+      initialize() {
+        this.__super__.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change:omemo_active', this.renderOMEMOToolbarButton);
+        this.listenTo(this.model, 'change:omemo_supported', this.onOMEMOSupportedDetermined);
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by Converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      'omemo_default': false
+    });
+
+    _converse.api.promises.add(['OMEMOInitialized']);
+
+    _converse.NUM_PREKEYS = 100; // Set here so that tests can override
+
+    /**
+     * Mixin object that contains OMEMO-related methods for
+     * {@link _converse.ChatBox} or {@link _converse.ChatRoom} objects.
+     *
+     * @typedef {Object} OMEMOEnabledChatBox
+     */
+
+    const OMEMOEnabledChatBox = {
+      async encryptMessage(plaintext) {
+        // The client MUST use fresh, randomly generated key/IV pairs
+        // with AES-128 in Galois/Counter Mode (GCM).
+        // For GCM a 12 byte IV is strongly suggested as other IV lengths
+        // will require additional calculations. In principle any IV size
+        // can be used as long as the IV doesn't ever repeat. NIST however
+        // suggests that only an IV size of 12 bytes needs to be supported
+        // by implementations.
+        //
+        // https://crypto.stackexchange.com/questions/26783/ciphertext-and-tag-size-and-iv-transmission-with-aes-in-gcm-mode
+        const iv = crypto.getRandomValues(new window.Uint8Array(12)),
+              key = await crypto.subtle.generateKey(KEY_ALGO, true, ["encrypt", "decrypt"]),
+              algo = {
+          'name': 'AES-GCM',
+          'iv': iv,
+          'tagLength': TAG_LENGTH
+        },
+              encrypted = await crypto.subtle.encrypt(algo, key, converse_omemo_u.stringToArrayBuffer(plaintext)),
+              length = encrypted.byteLength - (128 + 7 >> 3),
+              ciphertext = encrypted.slice(0, length),
+              tag = encrypted.slice(length),
+              exported_key = await crypto.subtle.exportKey("raw", key);
+        return Promise.resolve({
+          'key': exported_key,
+          'tag': tag,
+          'key_and_tag': converse_omemo_u.appendArrayBuffer(exported_key, tag),
+          'payload': converse_omemo_u.arrayBufferToBase64(ciphertext),
+          'iv': converse_omemo_u.arrayBufferToBase64(iv)
+        });
+      },
+
+      async decryptMessage(obj) {
+        const key_obj = await crypto.subtle.importKey('raw', obj.key, KEY_ALGO, true, ['encrypt', 'decrypt']),
+              cipher = converse_omemo_u.appendArrayBuffer(converse_omemo_u.base64ToArrayBuffer(obj.payload), obj.tag),
+              algo = {
+          'name': "AES-GCM",
+          'iv': converse_omemo_u.base64ToArrayBuffer(obj.iv),
+          'tagLength': TAG_LENGTH
+        };
+        return converse_omemo_u.arrayBufferToString((await crypto.subtle.decrypt(algo, key_obj, cipher)));
+      },
+
+      reportDecryptionError(e) {
+        if (_converse.loglevel === 'debug') {
+          const {
+            __
+          } = _converse;
+          this.messages.create({
+            'message': __("Sorry, could not decrypt a received OMEMO message due to an error.") + " ".concat(e.name, " ").concat(e.message),
+            'type': 'error'
+          });
+        }
+
+        headless_log.error("".concat(e.name, " ").concat(e.message));
+      },
+
+      async handleDecryptedWhisperMessage(attrs, key_and_tag) {
+        const encrypted = attrs.encrypted,
+              devicelist = _converse.devicelists.getDeviceList(this.get('jid'));
+
+        this.save('omemo_supported', true);
+        let device = devicelist.get(encrypted.device_id);
+
+        if (!device) {
+          device = devicelist.devices.create({
+            'id': encrypted.device_id,
+            'jid': attrs.from
+          });
+        }
+
+        if (encrypted.payload) {
+          const key = key_and_tag.slice(0, 16),
+                tag = key_and_tag.slice(16);
+          const result = await this.decryptMessage(Object.assign(encrypted, {
+            'key': key,
+            'tag': tag
+          }));
+          device.save('active', true);
+          return result;
+        }
+      },
+
+      decrypt(attrs) {
+        const session_cipher = this.getSessionCipher(attrs.from, parseInt(attrs.encrypted.device_id, 10)); // https://xmpp.org/extensions/xep-0384.html#usecases-receiving
+
+        if (attrs.encrypted.prekey === true) {
+          let plaintext;
+          return session_cipher.decryptPreKeyWhisperMessage(converse_omemo_u.base64ToArrayBuffer(attrs.encrypted.key), 'binary').then(key_and_tag => this.handleDecryptedWhisperMessage(attrs, key_and_tag)).then(pt => {
+            plaintext = pt;
+            return _converse.omemo_store.generateMissingPreKeys();
+          }).then(() => _converse.omemo_store.publishBundle()).then(() => {
+            if (plaintext) {
+              return Object.assign(attrs, {
+                'plaintext': plaintext
+              });
+            } else {
+              return Object.assign(attrs, {
+                'is_only_key': true
+              });
+            }
+          }).catch(e => {
+            this.reportDecryptionError(e);
+            return attrs;
+          });
+        } else {
+          return session_cipher.decryptWhisperMessage(converse_omemo_u.base64ToArrayBuffer(attrs.encrypted.key), 'binary').then(key_and_tag => this.handleDecryptedWhisperMessage(attrs, key_and_tag)).then(plaintext => Object.assign(attrs, {
+            'plaintext': plaintext
+          })).catch(e => {
+            this.reportDecryptionError(e);
+            return attrs;
+          });
+        }
+      },
+
+      getEncryptionAttributesfromStanza(stanza, original_stanza, attrs) {
+        const encrypted = converse_omemo_sizzle("encrypted[xmlns=\"".concat(converse_omemo_Strophe.NS.OMEMO, "\"]"), original_stanza).pop(),
+              header = encrypted.querySelector('header'),
+              key = converse_omemo_sizzle("key[rid=\"".concat(_converse.omemo_store.get('device_id'), "\"]"), encrypted).pop();
+
+        if (key) {
+          attrs['is_encrypted'] = true;
+          attrs['encrypted'] = {
+            'device_id': header.getAttribute('sid'),
+            'iv': header.querySelector('iv').textContent,
+            'key': key.textContent,
+            'payload': converse_omemo_.get(encrypted.querySelector('payload'), 'textContent', null),
+            'prekey': converse_omemo_.includes(['true', '1'], key.getAttribute('prekey'))
+          };
+          return this.decrypt(attrs);
+        } else {
+          return Promise.resolve(attrs);
+        }
+      },
+
+      getSessionCipher(jid, id) {
+        const address = new libsignal.SignalProtocolAddress(jid, id);
+        this.session_cipher = new window.libsignal.SessionCipher(_converse.omemo_store, address);
+        return this.session_cipher;
+      },
+
+      encryptKey(plaintext, device) {
+        return this.getSessionCipher(device.get('jid'), device.get('id')).encrypt(plaintext).then(payload => ({
+          'payload': payload,
+          'device': device
+        }));
+      },
+
+      handleMessageSendError(e) {
+        if (e.name === 'IQError') {
+          this.save('omemo_supported', false);
+          const err_msgs = [];
+
+          if (converse_omemo_sizzle("presence-subscription-required[xmlns=\"".concat(converse_omemo_Strophe.NS.PUBSUB_ERROR, "\"]"), e.iq).length) {
+            err_msgs.push(__("Sorry, we're unable to send an encrypted message because %1$s " + "requires you to be subscribed to their presence in order to see their OMEMO information", e.iq.getAttribute('from')));
+          } else if (converse_omemo_sizzle("remote-server-not-found[xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"]", e.iq).length) {
+            err_msgs.push(__("Sorry, we're unable to send an encrypted message because the remote server for %1$s could not be found", e.iq.getAttribute('from')));
+          } else {
+            err_msgs.push(__("Unable to send an encrypted message due to an unexpected error."));
+            err_msgs.push(e.iq.outerHTML);
+          }
+
+          _converse.api.alert('error', __('Error'), err_msgs);
+
+          headless_log.error(e);
+        } else if (e.user_facing) {
+          _converse.api.alert('error', __('Error'), [e.message]);
+
+          headless_log.error(e);
+        } else {
+          throw e;
+        }
+      }
+
+    };
+    Object.assign(_converse.ChatBox.prototype, OMEMOEnabledChatBox);
+    const OMEMOEnabledChatView = {
+      onOMEMOSupportedDetermined() {
+        if (!this.model.get('omemo_supported') && this.model.get('omemo_active')) {
+          this.model.set('omemo_active', false); // Will cause render
+        } else {
+          this.renderOMEMOToolbarButton();
+        }
+      },
+
+      renderOMEMOToolbarButton() {
+        if (this.model.get('type') !== _converse.CHATROOMS_TYPE || this.model.features.get('membersonly') && this.model.features.get('nonanonymous')) {
+          const icon = this.el.querySelector('.toggle-omemo');
+          const html = toolbar_omemo_default()(Object.assign(this.model.toJSON(), {
+            '__': __
+          }));
+
+          if (icon) {
+            icon.outerHTML = html;
+          } else {
+            this.el.querySelector('.chat-toolbar').insertAdjacentHTML('beforeend', html);
+          }
+        } else {
+          const icon = this.el.querySelector('.toggle-omemo');
+
+          if (icon) {
+            icon.parentElement.removeChild(icon);
+          }
+        }
+      },
+
+      toggleOMEMO(ev) {
+        if (!this.model.get('omemo_supported')) {
+          let messages;
+
+          if (this.model.get('type') === _converse.CHATROOMS_TYPE) {
+            messages = [__('Cannot use end-to-end encryption in this groupchat, ' + 'either the groupchat has some anonymity or not all participants support OMEMO.')];
+          } else {
+            messages = [__("Cannot use end-to-end encryption because %1$s uses a client that doesn't support OMEMO.", this.model.contact.getDisplayName())];
+          }
+
+          return _converse.api.alert('error', __('Error'), messages);
+        }
+
+        ev.preventDefault();
+        this.model.save({
+          'omemo_active': !this.model.get('omemo_active')
+        });
+      }
+
+    };
+    Object.assign(_converse.ChatBoxView.prototype, OMEMOEnabledChatView);
+
+    async function generateFingerprint(device) {
+      if (converse_omemo_.get(device.get('bundle'), 'fingerprint')) {
+        return;
+      }
+
+      const bundle = await device.getBundle();
+      bundle['fingerprint'] = converse_omemo_u.arrayBufferToHex(converse_omemo_u.base64ToArrayBuffer(bundle['identity_key']));
+      device.save('bundle', bundle);
+      device.trigger('change:bundle'); // Doesn't get triggered automatically due to pass-by-reference
+    }
+
+    _converse.generateFingerprints = async function (jid) {
+      const devices = await getDevicesForContact(jid);
+      return Promise.all(devices.map(d => generateFingerprint(d)));
+    };
+
+    _converse.getDeviceForContact = function (jid, device_id) {
+      return getDevicesForContact(jid).then(devices => devices.get(device_id));
+    };
+
+    async function getDevicesForContact(jid) {
+      await _converse.api.waitUntil('OMEMOInitialized');
+
+      const devicelist = _converse.devicelists.get(jid) || _converse.devicelists.create({
+        'jid': jid
+      });
+
+      await devicelist.fetchDevices();
+      return devicelist.devices;
+    }
+
+    _converse.contactHasOMEMOSupport = async function (jid) {
+      /* Checks whether the contact advertises any OMEMO-compatible devices. */
+      const devices = await getDevicesForContact(jid);
+      return devices.length > 0;
+    };
+
+    function generateDeviceID() {
+      /* Generates a device ID, making sure that it's unique */
+      const existing_ids = _converse.devicelists.get(_converse.bare_jid).devices.pluck('id');
+
+      let device_id = libsignal.KeyHelper.generateRegistrationId();
+      let i = 0;
+
+      while (converse_omemo_.includes(existing_ids, device_id)) {
+        device_id = libsignal.KeyHelper.generateRegistrationId();
+        i++;
+
+        if (i == 10) {
+          throw new Error("Unable to generate a unique device ID");
+        }
+      }
+
+      return device_id.toString();
+    }
+
+    async function buildSession(device) {
+      const address = new libsignal.SignalProtocolAddress(device.get('jid'), device.get('id')),
+            sessionBuilder = new libsignal.SessionBuilder(_converse.omemo_store, address),
+            prekey = device.getRandomPreKey(),
+            bundle = await device.getBundle();
+      return sessionBuilder.processPreKey({
+        'registrationId': parseInt(device.get('id'), 10),
+        'identityKey': converse_omemo_u.base64ToArrayBuffer(bundle.identity_key),
+        'signedPreKey': {
+          'keyId': bundle.signed_prekey.id,
+          // <Number>
+          'publicKey': converse_omemo_u.base64ToArrayBuffer(bundle.signed_prekey.public_key),
+          'signature': converse_omemo_u.base64ToArrayBuffer(bundle.signed_prekey.signature)
+        },
+        'preKey': {
+          'keyId': prekey.id,
+          // <Number>
+          'publicKey': converse_omemo_u.base64ToArrayBuffer(prekey.key)
+        }
+      });
+    }
+
+    async function getSession(device) {
+      const address = new libsignal.SignalProtocolAddress(device.get('jid'), device.get('id'));
+      const session = await _converse.omemo_store.loadSession(address.toString());
+
+      if (session) {
+        return Promise.resolve(session);
+      } else {
+        try {
+          const session = await buildSession(device);
+          return session;
+        } catch (e) {
+          headless_log.error("Could not build an OMEMO session for device ".concat(device.get('id')));
+          headless_log.error(e);
+          return null;
+        }
+      }
+    }
+
+    _converse.getBundlesAndBuildSessions = async function (chatbox) {
+      const no_devices_err = __("Sorry, no devices found to which we can send an OMEMO encrypted message.");
+
+      let devices;
+
+      if (chatbox.get('type') === _converse.CHATROOMS_TYPE) {
+        const collections = await Promise.all(chatbox.occupants.map(o => getDevicesForContact(o.get('jid'))));
+        devices = collections.reduce((a, b) => converse_omemo_.concat(a, b.models), []);
+      } else if (chatbox.get('type') === _converse.PRIVATE_CHAT_TYPE) {
+        const their_devices = await getDevicesForContact(chatbox.get('jid'));
+
+        if (their_devices.length === 0) {
+          const err = new Error(no_devices_err);
+          err.user_facing = true;
+          throw err;
+        }
+
+        const own_devices = _converse.devicelists.get(_converse.bare_jid).devices;
+
+        devices = [...own_devices.models, ...their_devices.models];
+      } // Filter out our own device
+
+
+      const id = _converse.omemo_store.get('device_id');
+
+      devices = devices.filter(d => d.get('id') !== id);
+      await Promise.all(devices.map(d => d.getBundle()));
+      const sessions = await Promise.all(devices.map(d => getSession(d)));
+
+      if (sessions.includes(null)) {
+        // We couldn't build a session for certain devices.
+        devices = devices.filter(d => sessions[devices.indexOf(d)]);
+
+        if (devices.length === 0) {
+          const err = new Error(no_devices_err);
+          err.user_facing = true;
+          throw err;
+        }
+      }
+
+      return devices;
+    };
+
+    function addKeysToMessageStanza(stanza, dicts, iv) {
+      for (var i in dicts) {
+        if (Object.prototype.hasOwnProperty.call(dicts, i)) {
+          const payload = dicts[i].payload,
+                device = dicts[i].device,
+                prekey = 3 == parseInt(payload.type, 10);
+          stanza.c('key', {
+            'rid': device.get('id')
+          }).t(btoa(payload.body));
+
+          if (prekey) {
+            stanza.attrs({
+              'prekey': prekey
+            });
+          }
+
+          stanza.up();
+
+          if (i == dicts.length - 1) {
+            stanza.c('iv').t(iv).up().up();
+          }
+        }
+      }
+
+      return Promise.resolve(stanza);
+    }
+
+    _converse.createOMEMOMessageStanza = function (chatbox, message, devices) {
+      const {
+        __
+      } = _converse;
+
+      const body = __("This is an OMEMO encrypted message which your client doesn’t seem to support. " + "Find more information on https://conversations.im/omemo");
+
+      if (!message.get('message')) {
+        throw new Error("No message body to encrypt!");
+      }
+
+      const stanza = converse_omemo_$msg({
+        'from': _converse.connection.jid,
+        'to': chatbox.get('jid'),
+        'type': chatbox.get('message_type'),
+        'id': message.get('msgid')
+      }).c('body').t(body).up();
+
+      if (message.get('type') === 'chat') {
+        stanza.c('request', {
+          'xmlns': converse_omemo_Strophe.NS.RECEIPTS
+        }).up();
+      } // An encrypted header is added to the message for
+      // each device that is supposed to receive it.
+      // These headers simply contain the key that the
+      // payload message is encrypted with,
+      // and they are separately encrypted using the
+      // session corresponding to the counterpart device.
+
+
+      stanza.c('encrypted', {
+        'xmlns': converse_omemo_Strophe.NS.OMEMO
+      }).c('header', {
+        'sid': _converse.omemo_store.get('device_id')
+      });
+      return chatbox.encryptMessage(message.get('message')).then(obj => {
+        // The 16 bytes key and the GCM authentication tag (The tag
+        // SHOULD have at least 128 bit) are concatenated and for each
+        // intended recipient device, i.e. both own devices as well as
+        // devices associated with the contact, the result of this
+        // concatenation is encrypted using the corresponding
+        // long-standing SignalProtocol session.
+        const promises = devices.filter(device => device.get('trusted') != UNTRUSTED && device.get('active')).map(device => chatbox.encryptKey(obj.key_and_tag, device));
+        return Promise.all(promises).then(dicts => addKeysToMessageStanza(stanza, dicts, obj.iv)).then(stanza => {
+          stanza.c('payload').t(obj.payload).up().up();
+          stanza.c('store', {
+            'xmlns': converse_omemo_Strophe.NS.HINTS
+          });
+          return stanza;
+        });
+      });
+    };
+
+    _converse.OMEMOStore = converse_omemo_Backbone.Model.extend({
+      Direction: {
+        SENDING: 1,
+        RECEIVING: 2
+      },
+
+      getIdentityKeyPair() {
+        const keypair = this.get('identity_keypair');
+        return Promise.resolve({
+          'privKey': converse_omemo_u.base64ToArrayBuffer(keypair.privKey),
+          'pubKey': converse_omemo_u.base64ToArrayBuffer(keypair.pubKey)
+        });
+      },
+
+      getLocalRegistrationId() {
+        return Promise.resolve(parseInt(this.get('device_id'), 10));
+      },
+
+      isTrustedIdentity(identifier, identity_key, direction) {
+        // eslint-disable-line no-unused-vars
+        if (identifier === null || identifier === undefined) {
+          throw new Error("Can't check identity key for invalid key");
+        }
+
+        if (!(identity_key instanceof ArrayBuffer)) {
+          throw new Error("Expected identity_key to be an ArrayBuffer");
+        }
+
+        const trusted = this.get('identity_key' + identifier);
+
+        if (trusted === undefined) {
+          return Promise.resolve(true);
+        }
+
+        return Promise.resolve(converse_omemo_u.arrayBufferToBase64(identity_key) === trusted);
+      },
+
+      loadIdentityKey(identifier) {
+        if (identifier === null || identifier === undefined) {
+          throw new Error("Can't load identity_key for invalid identifier");
+        }
+
+        return Promise.resolve(converse_omemo_u.base64ToArrayBuffer(this.get('identity_key' + identifier)));
+      },
+
+      saveIdentity(identifier, identity_key) {
+        if (identifier === null || identifier === undefined) {
+          throw new Error("Can't save identity_key for invalid identifier");
+        }
+
+        const address = new libsignal.SignalProtocolAddress.fromString(identifier);
+        const existing = this.get('identity_key' + address.getName());
+        const b64_idkey = converse_omemo_u.arrayBufferToBase64(identity_key);
+        this.save('identity_key' + address.getName(), b64_idkey);
+
+        if (existing && b64_idkey !== existing) {
+          return Promise.resolve(true);
+        } else {
+          return Promise.resolve(false);
+        }
+      },
+
+      getPreKeys() {
+        return this.get('prekeys') || {};
+      },
+
+      loadPreKey(key_id) {
+        const res = this.getPreKeys()[key_id];
+
+        if (res) {
+          return Promise.resolve({
+            'privKey': converse_omemo_u.base64ToArrayBuffer(res.privKey),
+            'pubKey': converse_omemo_u.base64ToArrayBuffer(res.pubKey)
+          });
+        }
+
+        return Promise.resolve();
+      },
+
+      storePreKey(key_id, key_pair) {
+        const prekey = {};
+        prekey[key_id] = {
+          'pubKey': converse_omemo_u.arrayBufferToBase64(key_pair.pubKey),
+          'privKey': converse_omemo_u.arrayBufferToBase64(key_pair.privKey)
+        };
+        this.save('prekeys', Object.assign(this.getPreKeys(), prekey));
+        return Promise.resolve();
+      },
+
+      removePreKey(key_id) {
+        this.save('prekeys', converse_omemo_.omit(this.getPreKeys(), key_id));
+        return Promise.resolve();
+      },
+
+      loadSignedPreKey(keyId) {
+        // eslint-disable-line no-unused-vars
+        const res = this.get('signed_prekey');
+
+        if (res) {
+          return Promise.resolve({
+            'privKey': converse_omemo_u.base64ToArrayBuffer(res.privKey),
+            'pubKey': converse_omemo_u.base64ToArrayBuffer(res.pubKey)
+          });
+        }
+
+        return Promise.resolve();
+      },
+
+      storeSignedPreKey(spk) {
+        if (typeof spk !== "object") {
+          // XXX: We've changed the signature of this method from the
+          // example given in InMemorySignalProtocolStore.
+          // Should be fine because the libsignal code doesn't
+          // actually call this method.
+          throw new Error("storeSignedPreKey: expected an object");
+        }
+
+        this.save('signed_prekey', {
+          'id': spk.keyId,
+          'privKey': converse_omemo_u.arrayBufferToBase64(spk.keyPair.privKey),
+          'pubKey': converse_omemo_u.arrayBufferToBase64(spk.keyPair.pubKey),
+          // XXX: The InMemorySignalProtocolStore does not pass
+          // in or store the signature, but we need it when we
+          // publish out bundle and this method isn't called from
+          // within libsignal code, so we modify it to also store
+          // the signature.
+          'signature': converse_omemo_u.arrayBufferToBase64(spk.signature)
+        });
+        return Promise.resolve();
+      },
+
+      removeSignedPreKey(key_id) {
+        if (this.get('signed_prekey')['id'] === key_id) {
+          this.unset('signed_prekey');
+          this.save();
+        }
+
+        return Promise.resolve();
+      },
+
+      loadSession(identifier) {
+        return Promise.resolve(this.get('session' + identifier));
+      },
+
+      storeSession(identifier, record) {
+        return Promise.resolve(this.save('session' + identifier, record));
+      },
+
+      removeSession(identifier) {
+        return Promise.resolve(this.unset('session' + identifier));
+      },
+
+      removeAllSessions(identifier) {
+        const keys = converse_omemo_.filter(Object.keys(this.attributes), key => {
+          if (key.startsWith('session' + identifier)) {
+            return key;
+          }
+        });
+
+        const attrs = {};
+
+        converse_omemo_.forEach(keys, key => {
+          attrs[key] = undefined;
+        });
+
+        this.save(attrs);
+        return Promise.resolve();
+      },
+
+      publishBundle() {
+        const signed_prekey = this.get('signed_prekey');
+        const node = "".concat(converse_omemo_Strophe.NS.OMEMO_BUNDLES, ":").concat(this.get('device_id'));
+        const item = converse_omemo_$build('item').c('bundle', {
+          'xmlns': converse_omemo_Strophe.NS.OMEMO
+        }).c('signedPreKeyPublic', {
+          'signedPreKeyId': signed_prekey.id
+        }).t(signed_prekey.pubKey).up().c('signedPreKeySignature').t(signed_prekey.signature).up().c('identityKey').t(this.get('identity_keypair').pubKey).up().c('prekeys');
+
+        converse_omemo_.forEach(this.get('prekeys'), (prekey, id) => item.c('preKeyPublic', {
+          'preKeyId': id
+        }).t(prekey.pubKey).up());
+
+        const options = {
+          'pubsub#access_model': 'open'
+        };
+        return _converse.api.pubsub.publish(null, node, item, options, false);
+      },
+
+      async generateMissingPreKeys() {
+        const missing_keys = converse_omemo_.difference(converse_omemo_.invokeMap(converse_omemo_.range(0, _converse.NUM_PREKEYS), Number.prototype.toString), Object.keys(this.getPreKeys()));
+
+        if (missing_keys.length < 1) {
+          headless_log.warn("No missing prekeys to generate for our own device");
+          return Promise.resolve();
+        }
+
+        const keys = await Promise.all(missing_keys.map(id => libsignal.KeyHelper.generatePreKey(parseInt(id, 10))));
+        keys.forEach(k => this.storePreKey(k.keyId, k.keyPair));
+        const marshalled_keys = Object.keys(this.getPreKeys()).map(k => ({
+          'id': k.keyId,
+          'key': converse_omemo_u.arrayBufferToBase64(k.pubKey)
+        }));
+
+        const devicelist = _converse.devicelists.get(_converse.bare_jid);
+
+        const device = devicelist.devices.get(this.get('device_id'));
+        const bundle = await device.getBundle();
+        device.save('bundle', Object.assign(bundle, {
+          'prekeys': marshalled_keys
+        }));
+      },
+
+      async generateBundle() {
+        /* The first thing that needs to happen if a client wants to
+         * start using OMEMO is they need to generate an IdentityKey
+         * and a Device ID. The IdentityKey is a Curve25519 [6]
+         * public/private Key pair. The Device ID is a randomly
+         * generated integer between 1 and 2^31 - 1.
+         */
+        const identity_keypair = await libsignal.KeyHelper.generateIdentityKeyPair();
+        const bundle = {},
+              identity_key = converse_omemo_u.arrayBufferToBase64(identity_keypair.pubKey),
+              device_id = generateDeviceID();
+        bundle['identity_key'] = identity_key;
+        bundle['device_id'] = device_id;
+        this.save({
+          'device_id': device_id,
+          'identity_keypair': {
+            'privKey': converse_omemo_u.arrayBufferToBase64(identity_keypair.privKey),
+            'pubKey': identity_key
+          },
+          'identity_key': identity_key
+        });
+        const signed_prekey = await libsignal.KeyHelper.generateSignedPreKey(identity_keypair, 0);
+
+        _converse.omemo_store.storeSignedPreKey(signed_prekey);
+
+        bundle['signed_prekey'] = {
+          'id': signed_prekey.keyId,
+          'public_key': converse_omemo_u.arrayBufferToBase64(signed_prekey.keyPair.privKey),
+          'signature': converse_omemo_u.arrayBufferToBase64(signed_prekey.signature)
+        };
+        const keys = await Promise.all(converse_omemo_.range(0, _converse.NUM_PREKEYS).map(id => libsignal.KeyHelper.generatePreKey(id)));
+        keys.forEach(k => _converse.omemo_store.storePreKey(k.keyId, k.keyPair));
+
+        const devicelist = _converse.devicelists.get(_converse.bare_jid);
+
+        const device = devicelist.devices.create({
+          'id': bundle.device_id,
+          'jid': _converse.bare_jid
+        });
+        const marshalled_keys = keys.map(k => ({
+          'id': k.keyId,
+          'key': converse_omemo_u.arrayBufferToBase64(k.keyPair.pubKey)
+        }));
+        bundle['prekeys'] = marshalled_keys;
+        device.save('bundle', bundle);
+      },
+
+      fetchSession() {
+        if (this._setup_promise === undefined) {
+          this._setup_promise = new Promise((resolve, reject) => {
+            this.fetch({
+              'success': () => {
+                if (!_converse.omemo_store.get('device_id')) {
+                  this.generateBundle().then(resolve).catch(reject);
+                } else {
+                  resolve();
+                }
+              },
+              'error': (model, resp) => {
+                headless_log.warn("Could not fetch OMEMO session from cache, we'll generate a new one.");
+                headless_log.warn(resp);
+                this.generateBundle().then(resolve).catch(reject);
+              }
+            });
+          });
+        }
+
+        return this._setup_promise;
+      }
+
+    });
+    _converse.Device = converse_omemo_Backbone.Model.extend({
+      defaults: {
+        'trusted': UNDECIDED,
+        'active': true
+      },
+
+      getRandomPreKey() {
+        // XXX: assumes that the bundle has already been fetched
+        const bundle = this.get('bundle');
+        return bundle.prekeys[converse_omemo_u.getRandomInt(bundle.prekeys.length)];
+      },
+
+      async fetchBundleFromServer() {
+        const stanza = converse_omemo_$iq({
+          'type': 'get',
+          'from': _converse.bare_jid,
+          'to': this.get('jid')
+        }).c('pubsub', {
+          'xmlns': converse_omemo_Strophe.NS.PUBSUB
+        }).c('items', {
+          'node': "".concat(converse_omemo_Strophe.NS.OMEMO_BUNDLES, ":").concat(this.get('id'))
+        });
+        let iq;
+
+        try {
+          iq = await _converse.api.sendIQ(stanza);
+        } catch (iq) {
+          throw new IQError("Could not fetch bundle", iq);
+        }
+
+        if (iq.querySelector('error')) {
+          throw new IQError("Could not fetch bundle", iq);
+        }
+
+        const publish_el = converse_omemo_sizzle("items[node=\"".concat(converse_omemo_Strophe.NS.OMEMO_BUNDLES, ":").concat(this.get('id'), "\"]"), iq).pop(),
+              bundle_el = converse_omemo_sizzle("bundle[xmlns=\"".concat(converse_omemo_Strophe.NS.OMEMO, "\"]"), publish_el).pop(),
+              bundle = parseBundle(bundle_el);
+        this.save('bundle', bundle);
+        return bundle;
+      },
+
+      getBundle() {
+        /* Fetch and save the bundle information associated with
+         * this device, if the information is not at hand already.
+         */
+        if (this.get('bundle')) {
+          return Promise.resolve(this.get('bundle'), this);
+        } else {
+          return this.fetchBundleFromServer();
+        }
+      }
+
+    });
+    _converse.Devices = _converse.Collection.extend({
+      model: _converse.Device
+    });
+    /**
+     * @class
+     * @namespace _converse.DeviceList
+     * @memberOf _converse
+     */
+
+    _converse.DeviceList = converse_omemo_Backbone.Model.extend({
+      idAttribute: 'jid',
+
+      initialize() {
+        this.devices = new _converse.Devices();
+        const id = "converse.devicelist-".concat(_converse.bare_jid, "-").concat(this.get('jid'));
+        this.devices.browserStorage = _converse.createStore(id);
+        this.fetchDevices();
+      },
+
+      async onDevicesFound(collection) {
+        if (collection.length === 0) {
+          let ids;
+
+          try {
+            ids = await this.fetchDevicesFromServer();
+          } catch (e) {
+            if (e === null) {
+              headless_log.error("Timeout error while fetching devices for ".concat(this.get('jid')));
+            } else {
+              headless_log.error("Could not fetch devices for ".concat(this.get('jid')));
+              headless_log.error(e);
+            }
+
+            this.destroy();
+          }
+
+          if (this.get('jid') === _converse.bare_jid) {
+            await this.publishCurrentDevice(ids);
+          }
+        }
+      },
+
+      fetchDevices() {
+        if (this._devices_promise === undefined) {
+          this._devices_promise = new Promise(resolve => {
+            this.devices.fetch({
+              'success': c => resolve(this.onDevicesFound(c)),
+              'error': (m, e) => {
+                headless_log.error(e);
+                resolve();
+              }
+            });
+          });
+        }
+
+        return this._devices_promise;
+      },
+
+      async publishCurrentDevice(device_ids) {
+        if (this.get('jid') !== _converse.bare_jid) {
+          return; // We only publish for ourselves.
+        }
+
+        await restoreOMEMOSession();
+
+        let device_id = _converse.omemo_store.get('device_id');
+
+        if (!this.devices.findWhere({
+          'id': device_id
+        })) {
+          // Generate a new bundle if we cannot find our device
+          await _converse.omemo_store.generateBundle();
+          device_id = _converse.omemo_store.get('device_id');
+        }
+
+        if (!converse_omemo_.includes(device_ids, device_id)) {
+          return this.publishDevices();
+        }
+      },
+
+      async fetchDevicesFromServer() {
+        const stanza = converse_omemo_$iq({
+          'type': 'get',
+          'from': _converse.bare_jid,
+          'to': this.get('jid')
+        }).c('pubsub', {
+          'xmlns': converse_omemo_Strophe.NS.PUBSUB
+        }).c('items', {
+          'node': converse_omemo_Strophe.NS.OMEMO_DEVICELIST
+        });
+        let iq;
+
+        try {
+          iq = await _converse.api.sendIQ(stanza);
+        } catch (e) {
+          headless_log.error(e);
+          return [];
+        }
+
+        const device_ids = converse_omemo_sizzle("list[xmlns=\"".concat(converse_omemo_Strophe.NS.OMEMO, "\"] device"), iq).map(dev => dev.getAttribute('id'));
+
+        converse_omemo_.forEach(device_ids, id => this.devices.create({
+          'id': id,
+          'jid': this.get('jid')
+        }));
+
+        return device_ids;
+      },
+
+      publishDevices() {
+        const item = converse_omemo_$build('item').c('list', {
+          'xmlns': converse_omemo_Strophe.NS.OMEMO
+        });
+        this.devices.filter(d => d.get('active')).forEach(d => item.c('device', {
+          'id': d.get('id')
+        }).up());
+        const options = {
+          'pubsub#access_model': 'open'
+        };
+        return _converse.api.pubsub.publish(null, converse_omemo_Strophe.NS.OMEMO_DEVICELIST, item, options, false);
+      },
+
+      removeOwnDevices(device_ids) {
+        if (this.get('jid') !== _converse.bare_jid) {
+          throw new Error("Cannot remove devices from someone else's device list");
+        }
+
+        converse_omemo_.forEach(device_ids, device_id => this.devices.get(device_id).destroy());
+
+        return this.publishDevices();
+      }
+
+    });
+    /**
+     * @class
+     * @namespace _converse.DeviceLists
+     * @memberOf _converse
+     */
+
+    _converse.DeviceLists = _converse.Collection.extend({
+      model: _converse.DeviceList,
+
+      /**
+       * Returns the {@link _converse.DeviceList} for a particular JID.
+       * The device list will be created if it doesn't exist already.
+       * @private
+       * @method _converse.DeviceLists#getDeviceList
+       * @param { String } jid - The Jabber ID for which the device list will be returned.
+       */
+      getDeviceList(jid) {
+        return this.get(jid) || this.create({
+          'jid': jid
+        });
+      }
+
+    });
+
+    function fetchDeviceLists() {
+      return new Promise((success, _error) => _converse.devicelists.fetch({
+        success,
+        'error': (m, e) => _error(e)
+      }));
+    }
+
+    async function fetchOwnDevices() {
+      await fetchDeviceLists();
+
+      let own_devicelist = _converse.devicelists.get(_converse.bare_jid);
+
+      if (!own_devicelist) {
+        own_devicelist = _converse.devicelists.create({
+          'jid': _converse.bare_jid
+        });
+      }
+
+      return own_devicelist.fetchDevices();
+    }
+
+    function updateBundleFromStanza(stanza) {
+      const items_el = converse_omemo_sizzle("items", stanza).pop();
+
+      if (!items_el || !items_el.getAttribute('node').startsWith(converse_omemo_Strophe.NS.OMEMO_BUNDLES)) {
+        return;
+      }
+
+      const device_id = items_el.getAttribute('node').split(':')[1],
+            jid = stanza.getAttribute('from'),
+            bundle_el = converse_omemo_sizzle("item > bundle", items_el).pop(),
+            devicelist = _converse.devicelists.getDeviceList(jid),
+            device = devicelist.devices.get(device_id) || devicelist.devices.create({
+        'id': device_id,
+        'jid': jid
+      });
+
+      device.save({
+        'bundle': parseBundle(bundle_el)
+      });
+    }
+
+    function updateDevicesFromStanza(stanza) {
+      const items_el = converse_omemo_sizzle("items[node=\"".concat(converse_omemo_Strophe.NS.OMEMO_DEVICELIST, "\"]"), stanza).pop();
+
+      if (!items_el) {
+        return;
+      }
+
+      const device_selector = "item list[xmlns=\"".concat(converse_omemo_Strophe.NS.OMEMO, "\"] device");
+      const device_ids = converse_omemo_sizzle(device_selector, items_el).map(d => d.getAttribute('id'));
+      const jid = stanza.getAttribute('from');
+
+      const devicelist = _converse.devicelists.getDeviceList(jid);
+
+      const devices = devicelist.devices;
+
+      const removed_ids = converse_omemo_.difference(devices.pluck('id'), device_ids);
+
+      removed_ids.forEach(id => {
+        if (jid === _converse.bare_jid && id === _converse.omemo_store.get('device_id')) {
+          return; // We don't set the current device as inactive
+        }
+
+        devices.get(id).save('active', false);
+      });
+      device_ids.forEach(device_id => {
+        const device = devices.get(device_id);
+
+        if (device) {
+          device.save('active', true);
+        } else {
+          devices.create({
+            'id': device_id,
+            'jid': jid
+          });
+        }
+      });
+
+      if (converse_omemo_u.isSameBareJID(jid, _converse.bare_jid)) {
+        // Make sure our own device is on the list
+        // (i.e. if it was removed, add it again).
+        devicelist.publishCurrentDevice(device_ids);
+      }
+    }
+
+    function registerPEPPushHandler() {
+      // Add a handler for devices pushed from other connected clients
+      _converse.connection.addHandler(message => {
+        try {
+          if (converse_omemo_sizzle("event[xmlns=\"".concat(converse_omemo_Strophe.NS.PUBSUB, "#event\"]"), message).length) {
+            updateDevicesFromStanza(message);
+            updateBundleFromStanza(message);
+          }
+        } catch (e) {
+          headless_log.error(e.message);
+        }
+
+        return true;
+      }, null, 'message', 'headline');
+    }
+
+    function restoreOMEMOSession() {
+      if (_converse.omemo_store === undefined) {
+        const id = "converse.omemosession-".concat(_converse.bare_jid);
+        _converse.omemo_store = new _converse.OMEMOStore({
+          'id': id
+        });
+        _converse.omemo_store.browserStorage = _converse.createStore(id);
+      }
+
+      return _converse.omemo_store.fetchSession();
+    }
+
+    async function initOMEMO() {
+      if (!_converse.config.get('trusted')) {
+        return;
+      }
+
+      _converse.devicelists = new _converse.DeviceLists();
+      const id = "converse.devicelists-".concat(_converse.bare_jid);
+      _converse.devicelists.browserStorage = _converse.createStore(id);
+
+      try {
+        await fetchOwnDevices();
+        await restoreOMEMOSession();
+        await _converse.omemo_store.publishBundle();
+      } catch (e) {
+        headless_log.error("Could not initialize OMEMO support");
+        headless_log.error(e);
+        return;
+      }
+      /**
+       * Triggered once OMEMO support has been initialized
+       * @event _converse#OMEMOInitialized
+       * @example _converse.api.listen.on('OMEMOInitialized', () => { ... });
+       */
+
+
+      _converse.api.trigger('OMEMOInitialized');
+    }
+
+    async function onOccupantAdded(chatroom, occupant) {
+      if (occupant.isSelf() || !chatroom.features.get('nonanonymous') || !chatroom.features.get('membersonly')) {
+        return;
+      }
+
+      if (chatroom.get('omemo_active')) {
+        const supported = await _converse.contactHasOMEMOSupport(occupant.get('jid'));
+
+        if (!supported) {
+          chatroom.messages.create({
+            'message': __("%1$s doesn't appear to have a client that supports OMEMO. " + "Encrypted chat will no longer be possible in this grouchat.", occupant.get('nick')),
+            'type': 'error'
+          });
+          chatroom.save({
+            'omemo_active': false,
+            'omemo_supported': false
+          });
+        }
+      }
+    }
+
+    async function checkOMEMOSupported(chatbox) {
+      let supported;
+
+      if (chatbox.get('type') === _converse.CHATROOMS_TYPE) {
+        await _converse.api.waitUntil('OMEMOInitialized');
+        supported = chatbox.features.get('nonanonymous') && chatbox.features.get('membersonly');
+      } else if (chatbox.get('type') === _converse.PRIVATE_CHAT_TYPE) {
+        supported = await _converse.contactHasOMEMOSupport(chatbox.get('jid'));
+      }
+
+      chatbox.set('omemo_supported', supported);
+
+      if (supported && _converse.omemo_default) {
+        chatbox.set('omemo_active', true);
+      }
+    }
+    /******************** Event Handlers ********************/
+
+
+    _converse.api.waitUntil('chatBoxesInitialized').then(() => _converse.chatboxes.on('add', chatbox => {
+      checkOMEMOSupported(chatbox);
+
+      if (chatbox.get('type') === _converse.CHATROOMS_TYPE) {
+        chatbox.occupants.on('add', o => onOccupantAdded(chatbox, o));
+        chatbox.features.on('change', () => checkOMEMOSupported(chatbox));
+      }
+    }));
+
+    _converse.api.listen.on('connected', registerPEPPushHandler);
+
+    _converse.api.listen.on('renderToolbar', view => view.renderOMEMOToolbarButton());
+
+    _converse.api.listen.on('statusInitialized', initOMEMO);
+
+    _converse.api.listen.on('addClientFeatures', () => _converse.api.disco.own.features.add("".concat(converse_omemo_Strophe.NS.OMEMO_DEVICELIST, "+notify")));
+
+    _converse.api.listen.on('userDetailsModalInitialized', contact => {
+      const jid = contact.get('jid');
+
+      _converse.generateFingerprints(jid).catch(e => headless_log.error(e));
+    });
+
+    _converse.api.listen.on('profileModalInitialized', () => {
+      _converse.generateFingerprints(_converse.bare_jid).catch(e => headless_log.error(e));
+    });
+
+    _converse.api.listen.on('afterTearDown', () => delete _converse.omemo_store);
+
+    _converse.api.listen.on('clearSession', () => {
+      if (_converse.shouldClearCache() && _converse.devicelists) {
+        _converse.devicelists.clearSession();
+
+        delete _converse.devicelists;
+      }
+    });
+    /************************ API ************************/
+
+
+    Object.assign(_converse.api, {
+      /**
+       * The "omemo" namespace groups methods relevant to OMEMO
+       * encryption.
+       *
+       * @namespace _converse.api.omemo
+       * @memberOf _converse.api
+       */
+      'omemo': {
+        /**
+         * The "bundle" namespace groups methods relevant to the user's
+         * OMEMO bundle.
+         *
+         * @namespace _converse.api.omemo.bundle
+         * @memberOf _converse.api.omemo
+         */
+        'bundle': {
+          /**
+           * Lets you generate a new OMEMO device bundle
+           *
+           * @method _converse.api.omemo.bundle.generate
+           * @returns {promise} Promise which resolves once we have a result from the server.
+           */
+          'generate': async () => {
+            // Remove current device
+            const devicelist = _converse.devicelists.get(_converse.bare_jid),
+                  device_id = _converse.omemo_store.get('device_id');
+
+            if (device_id) {
+              const device = devicelist.devices.get(device_id);
+
+              _converse.omemo_store.unset(device_id);
+
+              if (device) {
+                await new Promise(done => device.destroy({
+                  'success': done,
+                  'error': done
+                }));
+              }
+
+              devicelist.devices.trigger('remove');
+            } // Generate new bundle and publish
+
+
+            await _converse.omemo_store.generateBundle();
+            await devicelist.publishDevices();
+            const device = devicelist.devices.get(_converse.omemo_store.get('device_id'));
+            return generateFingerprint(device);
+          }
+        }
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/converse-push.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-push
+ * @description
+ * Converse.js plugin which add support for registering
+ * an "App Server" as defined in  XEP-0357
+ */
+
+
+const {
+  Strophe: converse_push_Strophe,
+  $iq: converse_push_$iq,
+  _: converse_push_
+} = converse_core.env;
+converse_push_Strophe.addNamespace('PUSH', 'urn:xmpp:push:0');
+converse_core.plugins.add('converse-push', {
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+
+    _converse.api.settings.update({
+      'push_app_servers': [],
+      'enable_muc_push': false
+    });
+
+    async function disablePushAppServer(domain, push_app_server) {
+      if (!push_app_server.jid) {
+        return;
+      }
+
+      if (!(await _converse.api.disco.supports(converse_push_Strophe.NS.PUSH, domain || _converse.bare_jid))) {
+        headless_log.warn("Not disabling push app server \"".concat(push_app_server.jid, "\", no disco support from your server."));
+        return;
+      }
+
+      const stanza = converse_push_$iq({
+        'type': 'set'
+      });
+
+      if (domain !== _converse.bare_jid) {
+        stanza.attrs({
+          'to': domain
+        });
+      }
+
+      stanza.c('disable', {
+        'xmlns': converse_push_Strophe.NS.PUSH,
+        'jid': push_app_server.jid
+      });
+
+      if (push_app_server.node) {
+        stanza.attrs({
+          'node': push_app_server.node
+        });
+      }
+
+      _converse.api.sendIQ(stanza).catch(e => {
+        headless_log.error("Could not disable push app server for ".concat(push_app_server.jid));
+        headless_log.error(e);
+      });
+    }
+
+    async function enablePushAppServer(domain, push_app_server) {
+      if (!push_app_server.jid || !push_app_server.node) {
+        return;
+      }
+
+      const identity = await _converse.api.disco.getIdentity('pubsub', 'push', push_app_server.jid);
+
+      if (!identity) {
+        return headless_log.warn("Not enabling push the service \"".concat(push_app_server.jid, "\", it doesn't have the right disco identtiy."));
+      }
+
+      const result = await Promise.all([_converse.api.disco.supports(converse_push_Strophe.NS.PUSH, push_app_server.jid), _converse.api.disco.supports(converse_push_Strophe.NS.PUSH, domain)]);
+
+      if (!result[0] && !result[1]) {
+        headless_log.warn("Not enabling push app server \"".concat(push_app_server.jid, "\", no disco support from your server."));
+        return;
+      }
+
+      const stanza = converse_push_$iq({
+        'type': 'set'
+      });
+
+      if (domain !== _converse.bare_jid) {
+        stanza.attrs({
+          'to': domain
+        });
+      }
+
+      stanza.c('enable', {
+        'xmlns': converse_push_Strophe.NS.PUSH,
+        'jid': push_app_server.jid,
+        'node': push_app_server.node
+      });
+
+      if (push_app_server.secret) {
+        stanza.c('x', {
+          'xmlns': converse_push_Strophe.NS.XFORM,
+          'type': 'submit'
+        }).c('field', {
+          'var': 'FORM_TYPE'
+        }).c('value').t("".concat(converse_push_Strophe.NS.PUBSUB, "#publish-options")).up().up().c('field', {
+          'var': 'secret'
+        }).c('value').t(push_app_server.secret);
+      }
+
+      return _converse.api.sendIQ(stanza);
+    }
+
+    async function enablePush(domain) {
+      domain = domain || _converse.bare_jid;
+      const push_enabled = _converse.session.get('push_enabled') || [];
+
+      if (converse_push_.includes(push_enabled, domain)) {
+        return;
+      }
+
+      const enabled_services = converse_push_.reject(_converse.push_app_servers, 'disable');
+
+      const disabled_services = converse_push_.filter(_converse.push_app_servers, 'disable');
+
+      const enabled = converse_push_.map(enabled_services, converse_push_.partial(enablePushAppServer, domain));
+
+      const disabled = converse_push_.map(disabled_services, converse_push_.partial(disablePushAppServer, domain));
+
+      try {
+        await Promise.all(enabled.concat(disabled));
+      } catch (e) {
+        headless_log.error('Could not enable or disable push App Server');
+        if (e) headless_log.error(e);
+      } finally {
+        push_enabled.push(domain);
+      }
+
+      _converse.session.save('push_enabled', push_enabled);
+    }
+
+    _converse.api.listen.on('statusInitialized', () => enablePush());
+
+    function onChatBoxAdded(model) {
+      if (model.get('type') == _converse.CHATROOMS_TYPE) {
+        enablePush(converse_push_Strophe.getDomainFromJid(model.get('jid')));
+      }
+    }
+
+    if (_converse.enable_muc_push) {
+      _converse.api.listen.on('chatBoxesInitialized', () => _converse.chatboxes.on('add', onChatBoxAdded));
+    }
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/register_link.html
+var register_link = __webpack_require__(187);
+var register_link_default = /*#__PURE__*/__webpack_require__.n(register_link);
+
+// EXTERNAL MODULE: ./src/templates/register_panel.html
+var register_panel = __webpack_require__(188);
+var register_panel_default = /*#__PURE__*/__webpack_require__.n(register_panel);
+
+// EXTERNAL MODULE: ./src/templates/registration_form.html
+var registration_form = __webpack_require__(189);
+var registration_form_default = /*#__PURE__*/__webpack_require__.n(registration_form);
+
+// EXTERNAL MODULE: ./src/templates/registration_request.html
+var registration_request = __webpack_require__(190);
+var registration_request_default = /*#__PURE__*/__webpack_require__.n(registration_request);
+
+// CONCATENATED MODULE: ./src/converse-register.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/**
+ * @module converse-register
+ * @description
+ * This is a Converse.js plugin which add support for in-band registration
+ * as specified in XEP-0077.
+ */
+
+
+
+
+
+
+
+
+
+
+ // Strophe methods for building stanzas
+
+const {
+  Strophe: converse_register_Strophe,
+  Backbone: converse_register_Backbone,
+  sizzle: converse_register_sizzle,
+  $iq: converse_register_$iq,
+  _: converse_register_
+} = converse_core.env;
+const converse_register_u = converse_core.env.utils; // Add Strophe Namespaces
+
+converse_register_Strophe.addNamespace('REGISTER', 'jabber:iq:register'); // Add Strophe Statuses
+
+const converse_register_i = Object.keys(converse_register_Strophe.Status).reduce((max, k) => Math.max(max, converse_register_Strophe.Status[k]), 0);
+converse_register_Strophe.Status.REGIFAIL = converse_register_i + 1;
+converse_register_Strophe.Status.REGISTERED = converse_register_i + 2;
+converse_register_Strophe.Status.CONFLICT = converse_register_i + 3;
+converse_register_Strophe.Status.NOTACCEPTABLE = converse_register_i + 5;
+converse_core.plugins.add('converse-register', {
+  'overrides': {
+    // Overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // New functions which don't exist yet can also be added.
+    LoginPanel: {
+      render() {
+        const {
+          _converse
+        } = this.__super__;
+
+        this.__super__.render.apply(this, arguments);
+
+        if (_converse.allow_registration && !_converse.auto_login) {
+          this.insertRegisterLink();
+        }
+
+        return this;
+      }
+
+    },
+    ControlBoxView: {
+      renderLoginPanel() {
+        /* Also render a registration panel, when rendering the
+         * login panel.
+         */
+        this.__super__.renderLoginPanel.apply(this, arguments);
+
+        this.renderRegistrationPanel();
+        return this;
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse;
+    _converse.CONNECTION_STATUS[converse_register_Strophe.Status.REGIFAIL] = 'REGIFAIL';
+    _converse.CONNECTION_STATUS[converse_register_Strophe.Status.REGISTERED] = 'REGISTERED';
+    _converse.CONNECTION_STATUS[converse_register_Strophe.Status.CONFLICT] = 'CONFLICT';
+    _converse.CONNECTION_STATUS[converse_register_Strophe.Status.NOTACCEPTABLE] = 'NOTACCEPTABLE';
+
+    _converse.api.settings.update({
+      'allow_registration': true,
+      'domain_placeholder': __(" e.g. conversejs.org"),
+      // Placeholder text shown in the domain input on the registration form
+      'providers_link': 'https://compliance.conversations.im/',
+      // Link to XMPP providers shown on registration page
+      'registration_domain': ''
+    });
+
+    Object.assign(_converse.LoginPanel.prototype, {
+      insertRegisterLink() {
+        if (this.registerlinkview === undefined) {
+          this.registerlinkview = new _converse.RegisterLinkView({
+            'model': this.model
+          });
+          this.registerlinkview.render();
+          const buttons = this.el.querySelector('.buttons'); // Might not exist, if the spinner is currently
+          // showing...
+
+          if (buttons) {
+            buttons.insertAdjacentElement('afterend', this.registerlinkview.el);
+          }
+        }
+
+        this.registerlinkview.render();
+      }
+
+    });
+    Object.assign(_converse.ControlBoxView.prototype, {
+      showLoginOrRegisterForm() {
+        if (!this.registerpanel) {
+          return;
+        }
+
+        if (this.model.get('active-form') == "register") {
+          this.loginpanel.el.classList.add('hidden');
+          this.registerpanel.el.classList.remove('hidden');
+        } else {
+          this.loginpanel.el.classList.remove('hidden');
+          this.registerpanel.el.classList.add('hidden');
+        }
+      },
+
+      renderRegistrationPanel() {
+        if (_converse.allow_registration) {
+          this.registerpanel = new _converse.RegisterPanel({
+            'model': this.model
+          });
+          this.registerpanel.render();
+          this.registerpanel.el.classList.add('hidden');
+          const login_panel = this.el.querySelector('#converse-login-panel');
+
+          if (login_panel) {
+            login_panel.insertAdjacentElement('afterend', this.registerpanel.el);
+          }
+
+          this.showLoginOrRegisterForm();
+        }
+
+        return this;
+      }
+
+    });
+
+    function setActiveForm(value) {
+      _converse.api.waitUntil('controlBoxInitialized').then(() => {
+        const controlbox = _converse.chatboxes.get('controlbox');
+
+        controlbox.set({
+          'active-form': value
+        });
+      }).catch(e => headless_log.fatal(e));
+    }
+
+    _converse.router.route('converse/login', () => setActiveForm('login'));
+
+    _converse.router.route('converse/register', () => setActiveForm('register'));
+
+    _converse.RegisterLinkView = converse_register_Backbone.VDOMView.extend({
+      toHTML() {
+        return register_link_default()(Object.assign(this.model.toJSON(), {
+          '__': _converse.__,
+          '_converse': _converse,
+          'connection_status': _converse.connfeedback.get('connection_status')
+        }));
+      }
+
+    });
+    /**
+     * @class
+     * @namespace _converse.RegisterPanel
+     * @memberOf _converse
+     */
+
+    _converse.RegisterPanel = converse_register_Backbone.NativeView.extend({
+      tagName: 'div',
+      id: "converse-register-panel",
+      className: 'controlbox-pane fade-in',
+      events: {
+        'submit form#converse-register': 'onFormSubmission',
+        'click .button-cancel': 'renderProviderChoiceForm'
+      },
+
+      initialize() {
+        this.reset();
+
+        _converse.api.listen.on('connectionInitialized', () => this.registerHooks());
+      },
+
+      render() {
+        this.model.set('registration_form_rendered', false);
+        this.el.innerHTML = register_panel_default()({
+          '__': __,
+          'default_domain': _converse.registration_domain,
+          'label_register': __('Fetch registration form'),
+          'help_providers': __('Tip: A list of public XMPP providers is available'),
+          'help_providers_link': __('here'),
+          'href_providers': _converse.providers_link,
+          'domain_placeholder': _converse.domain_placeholder
+        });
+
+        if (_converse.registration_domain) {
+          this.fetchRegistrationForm(_converse.registration_domain);
+        }
+
+        return this;
+      },
+
+      registerHooks() {
+        /* Hook into Strophe's _connect_cb, so that we can send an IQ
+         * requesting the registration fields.
+         */
+        const conn = _converse.connection;
+
+        const connect_cb = conn._connect_cb.bind(conn);
+
+        conn._connect_cb = (req, callback, raw) => {
+          if (!this._registering) {
+            connect_cb(req, callback, raw);
+          } else {
+            if (this.getRegistrationFields(req, callback)) {
+              this._registering = false;
+            }
+          }
+        };
+      },
+
+      /**
+       * Send an IQ stanza to the XMPP server asking for the registration fields.
+       * @private
+       * @method _converse.RegisterPanel#getRegistrationFields
+       * @param { Strophe.Request } req - The current request
+       * @param { Function } callback - The callback function
+       */
+      getRegistrationFields(req, _callback) {
+        const conn = _converse.connection;
+        conn.connected = true;
+
+        const body = conn._proto._reqToData(req);
+
+        if (!body) {
+          return;
+        }
+
+        if (conn._proto._connect_cb(body) === converse_register_Strophe.Status.CONNFAIL) {
+          this.showValidationError(__("Sorry, we're unable to connect to your chosen provider."));
+          return false;
+        }
+
+        const register = body.getElementsByTagName("register");
+        const mechanisms = body.getElementsByTagName("mechanism");
+
+        if (register.length === 0 && mechanisms.length === 0) {
+          conn._proto._no_auth_received(_callback);
+
+          return false;
+        }
+
+        if (register.length === 0) {
+          conn._changeConnectStatus(converse_register_Strophe.Status.REGIFAIL);
+
+          this.showValidationError(__("Sorry, the given provider does not support in " + "band account registration. Please try with a " + "different provider."));
+          return true;
+        } // Send an IQ stanza to get all required data fields
+
+
+        conn._addSysHandler(this.onRegistrationFields.bind(this), null, "iq", null, null);
+
+        const stanza = converse_register_$iq({
+          type: "get"
+        }).c("query", {
+          xmlns: converse_register_Strophe.NS.REGISTER
+        }).tree();
+        stanza.setAttribute("id", conn.getUniqueId("sendIQ"));
+        conn.send(stanza);
+        conn.connected = false;
+        return true;
+      },
+
+      /**
+       * Handler for {@link _converse.RegisterPanel#getRegistrationFields}
+       * @private
+       * @method _converse.RegisterPanel#onRegistrationFields
+       * @param { XMLElement } stanza - The query stanza.
+       */
+      onRegistrationFields(stanza) {
+        if (stanza.getAttribute("type") === "error") {
+          _converse.connection._changeConnectStatus(converse_register_Strophe.Status.REGIFAIL, __('Something went wrong while establishing a connection with "%1$s". ' + 'Are you sure it exists?', this.domain));
+
+          return false;
+        }
+
+        if (stanza.getElementsByTagName("query").length !== 1) {
+          _converse.connection._changeConnectStatus(converse_register_Strophe.Status.REGIFAIL, "unknown");
+
+          return false;
+        }
+
+        this.setFields(stanza);
+
+        if (!this.model.get('registration_form_rendered')) {
+          this.renderRegistrationForm(stanza);
+        }
+
+        return false;
+      },
+
+      reset(settings) {
+        const defaults = {
+          fields: {},
+          urls: [],
+          title: "",
+          instructions: "",
+          registered: false,
+          _registering: false,
+          domain: null,
+          form_type: null
+        };
+        Object.assign(this, defaults);
+
+        if (settings) {
+          Object.assign(this, converse_register_.pick(settings, Object.keys(defaults)));
+        }
+      },
+
+      onFormSubmission(ev) {
+        /* Event handler when the #converse-register form is
+         * submitted.
+         *
+         * Depending on the available input fields, we delegate to
+         * other methods.
+         */
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        if (ev.target.querySelector('input[name=domain]') === null) {
+          this.submitRegistrationForm(ev.target);
+        } else {
+          this.onProviderChosen(ev.target);
+        }
+      },
+
+      /**
+       * Callback method that gets called when the user has chosen an XMPP provider
+       * @private
+       * @method _converse.RegisterPanel#onProviderChosen
+       * @param { HTMLElement } form - The form that was submitted
+       */
+      onProviderChosen(form) {
+        const domain_input = form.querySelector('input[name=domain]'),
+              domain = converse_register_.get(domain_input, 'value');
+
+        if (!domain) {
+          // TODO: add validation message
+          domain_input.classList.add('error');
+          return;
+        }
+
+        form.querySelector('input[type=submit]').classList.add('hidden');
+        this.fetchRegistrationForm(domain.trim());
+      },
+
+      /**
+       * Fetch a registration form from the requested domain
+       * @private
+       * @method _converse.RegisterPanel#fetchRegistrationForm
+       * @param { String } domain_name - XMPP server domain
+       */
+      async fetchRegistrationForm(domain_name) {
+        if (!this.model.get('registration_form_rendered')) {
+          this.renderRegistrationRequest();
+        }
+
+        this.reset({
+          'domain': converse_register_Strophe.getDomainFromJid(domain_name),
+          '_registering': true
+        });
+        await _converse.initConnection(this.domain);
+
+        _converse.connection.connect(this.domain, "", status => this.onConnectStatusChanged(status));
+
+        return false;
+      },
+
+      renderRegistrationRequest() {
+        /* Clear the form and inform the user that the registration
+         * form is being fetched.
+         */
+        this.clearRegistrationForm().insertAdjacentHTML('beforeend', registration_request_default()({
+          '__': _converse.__,
+          'cancel': _converse.registration_domain
+        }));
+      },
+
+      giveFeedback(message, klass) {
+        let feedback = this.el.querySelector('.reg-feedback');
+
+        if (feedback !== null) {
+          feedback.parentNode.removeChild(feedback);
+        }
+
+        const form = this.el.querySelector('form');
+        form.insertAdjacentHTML('afterbegin', '<span class="reg-feedback"></span>');
+        feedback = form.querySelector('.reg-feedback');
+        feedback.textContent = message;
+
+        if (klass) {
+          feedback.classList.add(klass);
+        }
+      },
+
+      clearRegistrationForm() {
+        const form = this.el.querySelector('form');
+        form.innerHTML = '';
+        this.model.set('registration_form_rendered', false);
+        return form;
+      },
+
+      showSpinner() {
+        const form = this.el.querySelector('form');
+        form.innerHTML = spinner_default()();
+        this.model.set('registration_form_rendered', false);
+        return this;
+      },
+
+      /**
+       * Callback function called by Strophe whenever the connection status changes.
+       * Passed to Strophe specifically during a registration attempt.
+       * @private
+       * @method _converse.RegisterPanel#onConnectStatusChanged
+       * @param { integer } status_code - The Strophe.Status status code
+       */
+      onConnectStatusChanged(status_code) {
+        headless_log.debug('converse-register: onConnectStatusChanged');
+
+        if (converse_register_.includes([converse_register_Strophe.Status.DISCONNECTED, converse_register_Strophe.Status.CONNFAIL, converse_register_Strophe.Status.REGIFAIL, converse_register_Strophe.Status.NOTACCEPTABLE, converse_register_Strophe.Status.CONFLICT], status_code)) {
+          headless_log.error("Problem during registration: Strophe.Status is ".concat(_converse.CONNECTION_STATUS[status_code]));
+          this.abortRegistration();
+        } else if (status_code === converse_register_Strophe.Status.REGISTERED) {
+          headless_log.debug("Registered successfully.");
+
+          _converse.connection.reset();
+
+          this.showSpinner();
+
+          if (converse_register_.includes(["converse/login", "converse/register"], converse_register_Backbone.history.getFragment())) {
+            _converse.router.navigate('', {
+              'replace': true
+            });
+          }
+
+          if (this.fields.password && this.fields.username) {
+            // automatically log the user in
+            _converse.connection.connect(this.fields.username.toLowerCase() + '@' + this.domain.toLowerCase(), this.fields.password, _converse.onConnectStatusChanged);
+
+            this.giveFeedback(__('Now logging you in'), 'info');
+          } else {
+            _converse.chatboxviews.get('controlbox').renderLoginPanel();
+
+            _converse.giveFeedback(__('Registered successfully'));
+          }
+
+          this.reset();
+        }
+      },
+
+      renderLegacyRegistrationForm(form) {
+        Object.keys(this.fields).forEach(key => {
+          if (key === "username") {
+            form.insertAdjacentHTML('beforeend', form_username_default()({
+              'domain': " @".concat(this.domain),
+              'name': key,
+              'type': "text",
+              'label': key,
+              'value': '',
+              'required': true
+            }));
+          } else {
+            form.insertAdjacentHTML('beforeend', form_input_default()({
+              'label': key,
+              'name': key,
+              'placeholder': key,
+              'required': true,
+              'type': key === 'password' || key === 'email' ? key : "text",
+              'value': ''
+            }));
+          }
+        }); // Show urls
+
+        this.urls.forEach(u => form.insertAdjacentHTML('afterend', '<a target="blank" rel="noopener" href="' + u + '">' + u + '</a>'));
+      },
+
+      /**
+       * Renders the registration form based on the XForm fields
+       * received from the XMPP server.
+       * @private
+       * @method _converse.RegisterPanel#renderRegistrationForm
+       * @param { XMLElement } stanza - The IQ stanza received from the XMPP server.
+       */
+      renderRegistrationForm(stanza) {
+        const form = this.el.querySelector('form');
+        form.innerHTML = registration_form_default()({
+          '__': _converse.__,
+          'domain': this.domain,
+          'title': this.title,
+          'instructions': this.instructions,
+          'registration_domain': _converse.registration_domain
+        });
+        const buttons = form.querySelector('fieldset.buttons');
+
+        if (this.form_type === 'xform') {
+          stanza.querySelectorAll('field').forEach(field => {
+            buttons.insertAdjacentHTML('beforebegin', utils_form.xForm2webForm(field, stanza, {
+              'domain': this.domain
+            }));
+          });
+        } else {
+          this.renderLegacyRegistrationForm(form);
+        }
+
+        if (!this.fields) {
+          form.querySelector('.button-primary').classList.add('hidden');
+        }
+
+        form.classList.remove('hidden');
+        this.model.set('registration_form_rendered', true);
+      },
+
+      showValidationError(message) {
+        const form = this.el.querySelector('form');
+        let flash = form.querySelector('.form-errors');
+
+        if (flash === null) {
+          flash = '<div class="form-errors hidden"></div>';
+          const instructions = form.querySelector('p.instructions');
+
+          if (instructions === null) {
+            form.insertAdjacentHTML('afterbegin', flash);
+          } else {
+            instructions.insertAdjacentHTML('afterend', flash);
+          }
+
+          flash = form.querySelector('.form-errors');
+        } else {
+          flash.innerHTML = '';
+        }
+
+        flash.insertAdjacentHTML('beforeend', '<p class="form-help error">' + message + '</p>');
+        flash.classList.remove('hidden');
+      },
+
+      /**
+       * Report back to the user any error messages received from the
+       * XMPP server after attempted registration.
+       * @private
+       * @method _converse.RegisterPanel#reportErrors
+       * @param { XMLElement } stanza - The IQ stanza received from the XMPP server
+       */
+      reportErrors(stanza) {
+        const errors = stanza.querySelectorAll('error');
+        errors.forEach(e => this.showValidationError(e.textContent));
+
+        if (!errors.length) {
+          const message = __('The provider rejected your registration attempt. ' + 'Please check the values you entered for correctness.');
+
+          this.showValidationError(message);
+        }
+      },
+
+      renderProviderChoiceForm(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        _converse.connection._proto._abortAllRequests();
+
+        _converse.connection.reset();
+
+        this.render();
+      },
+
+      abortRegistration() {
+        _converse.connection._proto._abortAllRequests();
+
+        _converse.connection.reset();
+
+        if (this.model.get('registration_form_rendered')) {
+          if (_converse.registration_domain && this.model.get('registration_form_rendered')) {
+            this.fetchRegistrationForm(_converse.registration_domain);
+          }
+        } else {
+          this.render();
+        }
+      },
+
+      /**
+       * Handler, when the user submits the registration form.
+       * Provides form error feedback or starts the registration process.
+       * @private
+       * @method _converse.RegisterPanel#submitRegistrationForm
+       * @param { HTMLElement } form - The HTML form that was submitted
+       */
+      submitRegistrationForm(form) {
+        const has_empty_inputs = converse_register_.reduce(this.el.querySelectorAll('input.required'), function (result, input) {
+          if (input.value === '') {
+            input.classList.add('error');
+            return result + 1;
+          }
+
+          return result;
+        }, 0);
+
+        if (has_empty_inputs) {
+          return;
+        }
+
+        const inputs = converse_register_sizzle(':input:not([type=button]):not([type=submit])', form),
+              iq = converse_register_$iq({
+          'type': 'set',
+          'id': converse_register_u.getUniqueId()
+        }).c("query", {
+          xmlns: converse_register_Strophe.NS.REGISTER
+        });
+
+        if (this.form_type === 'xform') {
+          iq.c("x", {
+            xmlns: converse_register_Strophe.NS.XFORM,
+            type: 'submit'
+          });
+          inputs.forEach(input => iq.cnode(utils_form.webForm2xForm(input)).up());
+        } else {
+          inputs.forEach(input => iq.c(input.getAttribute('name'), {}, input.value));
+        }
+
+        _converse.connection._addSysHandler(this._onRegisterIQ.bind(this), null, "iq", null, null);
+
+        _converse.connection.send(iq);
+
+        this.setFields(iq.tree());
+      },
+
+      /* Stores the values that will be sent to the XMPP server during attempted registration.
+       * @private
+       * @method _converse.RegisterPanel#setFields
+       * @param { XMLElement } stanza - the IQ stanza that will be sent to the XMPP server.
+       */
+      setFields(stanza) {
+        const query = stanza.querySelector('query');
+        const xform = converse_register_sizzle("x[xmlns=\"".concat(converse_register_Strophe.NS.XFORM, "\"]"), query);
+
+        if (xform.length > 0) {
+          this._setFieldsFromXForm(xform.pop());
+        } else {
+          this._setFieldsFromLegacy(query);
+        }
+      },
+
+      _setFieldsFromLegacy(query) {
+        [].forEach.call(query.children, field => {
+          if (field.tagName.toLowerCase() === 'instructions') {
+            this.instructions = converse_register_Strophe.getText(field);
+            return;
+          } else if (field.tagName.toLowerCase() === 'x') {
+            if (field.getAttribute('xmlns') === 'jabber:x:oob') {
+              this.urls.concat(converse_register_sizzle('url', field).map(u => u.textContent));
+            }
+
+            return;
+          }
+
+          this.fields[field.tagName.toLowerCase()] = converse_register_Strophe.getText(field);
+        });
+        this.form_type = 'legacy';
+      },
+
+      _setFieldsFromXForm(xform) {
+        this.title = converse_register_.get(xform.querySelector('title'), 'textContent');
+        this.instructions = converse_register_.get(xform.querySelector('instructions'), 'textContent');
+        xform.querySelectorAll('field').forEach(field => {
+          const _var = field.getAttribute('var');
+
+          if (_var) {
+            this.fields[_var.toLowerCase()] = converse_register_.get(field.querySelector('value'), 'textContent', '');
+          } else {
+            // TODO: other option seems to be type="fixed"
+            headless_log.warn("Found field we couldn't parse");
+          }
+        });
+        this.form_type = 'xform';
+      },
+
+      /**
+       * Callback method that gets called when a return IQ stanza
+       * is received from the XMPP server, after attempting to
+       * register a new user.
+       * @private
+       * @method _converse.RegisterPanel#reportErrors
+       * @param { XMLElement } stanza - The IQ stanza.
+       */
+      _onRegisterIQ(stanza) {
+        if (stanza.getAttribute("type") === "error") {
+          headless_log.error("Registration failed.");
+          this.reportErrors(stanza);
+          let error = stanza.getElementsByTagName("error");
+
+          if (error.length !== 1) {
+            _converse.connection._changeConnectStatus(converse_register_Strophe.Status.REGIFAIL, "unknown");
+
+            return false;
+          }
+
+          error = error[0].firstChild.tagName.toLowerCase();
+
+          if (error === 'conflict') {
+            _converse.connection._changeConnectStatus(converse_register_Strophe.Status.CONFLICT, error);
+          } else if (error === 'not-acceptable') {
+            _converse.connection._changeConnectStatus(converse_register_Strophe.Status.NOTACCEPTABLE, error);
+          } else {
+            _converse.connection._changeConnectStatus(converse_register_Strophe.Status.REGIFAIL, error);
+          }
+        } else {
+          _converse.connection._changeConnectStatus(converse_register_Strophe.Status.REGISTERED, null);
+        }
+
+        return false;
+      }
+
+    });
+    /************************ BEGIN Event Handlers ************************/
+
+    _converse.api.listen.on('controlBoxInitialized', view => {
+      view.model.on('change:active-form', view.showLoginOrRegisterForm, view);
+    });
+    /************************ END Event Handlers ************************/
+
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/rooms_list.html
+var rooms_list = __webpack_require__(191);
+var rooms_list_default = /*#__PURE__*/__webpack_require__.n(rooms_list);
+
+// CONCATENATED MODULE: ./src/converse-roomslist.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, Jan-Carel Brand <jc@opkode.com>
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-roomslist
+ * @description
+ * Converse.js plugin which shows a list of currently open
+ * rooms in the "Rooms Panel" of the ControlBox.
+ */
+
+
+
+const {
+  Backbone: converse_roomslist_Backbone,
+  Strophe: converse_roomslist_Strophe
+} = converse_core.env;
+const converse_roomslist_u = converse_core.env.utils;
+converse_core.plugins.add('converse-roomslist', {
+  /* Optional dependencies are other plugins which might be
+   * overridden or relied upon, and therefore need to be loaded before
+   * this plugin. They are called "optional" because they might not be
+   * available, in which case any overrides applicable to them will be
+   * ignored.
+   *
+   * It's possible however to make optional dependencies non-optional.
+   * If the setting "strict_plugin_dependencies" is set to true,
+   * an error will be raised if the plugin is not found.
+   *
+   * NB: These plugins need to have already been loaded via require.js.
+   */
+  dependencies: ["converse-singleton", "converse-controlbox", "converse-muc", "converse-bookmarks"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    const {
+      __
+    } = _converse; // Promises exposed by this plugin
+
+    _converse.api.promises.add('roomsListInitialized');
+
+    _converse.RoomsList = converse_roomslist_Backbone.Model.extend({
+      defaults: {
+        "toggle-state": _converse.OPENED
+      }
+    });
+    _converse.RoomsListView = converse_roomslist_Backbone.VDOMView.extend({
+      tagName: 'div',
+      className: 'list-container list-container--openrooms',
+      events: {
+        'click .add-bookmark': 'addBookmark',
+        'click .close-room': 'closeRoom',
+        'click .list-toggle': 'toggleRoomsList',
+        'click .remove-bookmark': 'removeBookmark',
+        'click .open-room': 'openRoom',
+        'click .room-info': 'showRoomDetailsModal'
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'add', this.renderIfChatRoom);
+        this.listenTo(this.model, 'remove', this.renderIfChatRoom);
+        this.listenTo(this.model, 'destroy', this.renderIfChatRoom);
+        this.listenTo(this.model, 'change', this.renderIfRelevantChange);
+        const id = "converse.roomslist".concat(_converse.bare_jid);
+        this.list_model = new _converse.RoomsList({
+          id
+        });
+        this.list_model.browserStorage = _converse.createStore(id);
+        this.list_model.fetch();
+        this.render();
+        this.insertIntoControlBox();
+      },
+
+      renderIfChatRoom(model) {
+        converse_roomslist_u.isChatRoom(model) && this.render();
+      },
+
+      renderIfRelevantChange(model) {
+        const attrs = ['bookmarked', 'hidden', 'name', 'num_unread', 'num_unread_general'];
+        const changed = model.changed || {};
+
+        if (converse_roomslist_u.isChatRoom(model) && Object.keys(changed).filter(m => attrs.includes(m)).length) {
+          this.render();
+        }
+      },
+
+      toHTML() {
+        return rooms_list_default()({
+          'rooms': this.model.filter(m => m.get('type') === _converse.CHATROOMS_TYPE),
+          'allow_bookmarks': _converse.allow_bookmarks && _converse.bookmarks,
+          'collapsed': this.list_model.get('toggle-state') !== _converse.OPENED,
+          'desc_rooms': __('Click to toggle the list of open groupchats'),
+          'info_add_bookmark': __('Bookmark this groupchat'),
+          'info_leave_room': __('Leave this groupchat'),
+          'info_remove_bookmark': __('Unbookmark this groupchat'),
+          'info_title': __('Show more information on this groupchat'),
+          'open_title': __('Click to open this groupchat'),
+          'currently_open': room => _converse.isUniView() && !room.get('hidden'),
+          'toggle_state': this.list_model.get('toggle-state'),
+          // Note to translators, "Open Groupchats" refers to groupchats that are open, NOT a command.
+          'label_rooms': __('Open Groupchats'),
+          '_converse': _converse
+        });
+      },
+
+      insertIntoControlBox() {
+        const controlboxview = _converse.chatboxviews.get('controlbox');
+
+        if (controlboxview !== undefined && !converse_roomslist_u.rootContains(_converse.root, this.el)) {
+          const el = controlboxview.el.querySelector('.list-container--openrooms');
+          el && el.parentNode.replaceChild(this.el, el);
+        }
+      },
+
+      showRoomDetailsModal(ev) {
+        const jid = ev.target.getAttribute('data-room-jid');
+
+        const room = _converse.chatboxes.get(jid);
+
+        ev.preventDefault();
+
+        if (room.room_details_modal === undefined) {
+          room.room_details_modal = new _converse.RoomDetailsModal({
+            'model': room
+          });
+        }
+
+        room.room_details_modal.show(ev);
+      },
+
+      async openRoom(ev) {
+        ev.preventDefault();
+        const name = ev.target.textContent;
+        const jid = ev.target.getAttribute('data-room-jid');
+        const data = {
+          'name': name || converse_roomslist_Strophe.unescapeNode(converse_roomslist_Strophe.getNodeFromJid(jid)) || jid
+        };
+        await _converse.api.rooms.open(jid, data, true);
+
+        _converse.api.chatviews.get(jid).maybeFocus();
+      },
+
+      closeRoom(ev) {
+        ev.preventDefault();
+        const name = ev.target.getAttribute('data-room-name');
+        const jid = ev.target.getAttribute('data-room-jid');
+
+        if (confirm(__("Are you sure you want to leave the groupchat %1$s?", name))) {
+          // TODO: replace with API call
+          _converse.chatboxviews.get(jid).close();
+        }
+      },
+
+      removeBookmark: _converse.removeBookmarkViaEvent,
+      addBookmark: _converse.addBookmarkViaEvent,
+
+      toggleRoomsList(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const icon_el = ev.target.matches('.fa') ? ev.target : ev.target.querySelector('.fa');
+
+        if (icon_el.classList.contains("fa-caret-down")) {
+          converse_roomslist_u.slideIn(this.el.querySelector('.open-rooms-list')).then(() => {
+            this.list_model.save({
+              'toggle-state': _converse.CLOSED
+            });
+            icon_el.classList.remove("fa-caret-down");
+            icon_el.classList.add("fa-caret-right");
+          });
+        } else {
+          converse_roomslist_u.slideOut(this.el.querySelector('.open-rooms-list')).then(() => {
+            this.list_model.save({
+              'toggle-state': _converse.OPENED
+            });
+            icon_el.classList.remove("fa-caret-right");
+            icon_el.classList.add("fa-caret-down");
+          });
+        }
+      }
+
+    });
+
+    const initRoomsListView = function initRoomsListView() {
+      _converse.rooms_list_view = new _converse.RoomsListView({
+        'model': _converse.chatboxes
+      });
+      /**
+       * Triggered once the _converse.RoomsListView has been created and initialized.
+       * @event _converse#roomsListInitialized
+       * @example _converse.api.listen.on('roomsListInitialized', status => { ... });
+       */
+
+      _converse.api.trigger('roomsListInitialized');
+    };
+
+    _converse.api.listen.on('connected', async () => {
+      if (_converse.allow_bookmarks) {
+        await _converse.api.waitUntil('bookmarksInitialized');
+      } else {
+        await Promise.all([_converse.api.waitUntil('chatBoxesFetched'), _converse.api.waitUntil('roomsPanelRendered')]);
+      }
+
+      initRoomsListView();
+    });
+
+    _converse.api.listen.on('reconnected', initRoomsListView);
+  }
+
+});
+// EXTERNAL MODULE: ./src/templates/add_contact_modal.html
+var add_contact_modal = __webpack_require__(192);
+var add_contact_modal_default = /*#__PURE__*/__webpack_require__.n(add_contact_modal);
+
+// EXTERNAL MODULE: ./src/templates/group_header.html
+var group_header = __webpack_require__(193);
+var group_header_default = /*#__PURE__*/__webpack_require__.n(group_header);
+
+// EXTERNAL MODULE: ./src/templates/pending_contact.html
+var pending_contact = __webpack_require__(194);
+var pending_contact_default = /*#__PURE__*/__webpack_require__.n(pending_contact);
+
+// EXTERNAL MODULE: ./src/templates/requesting_contact.html
+var requesting_contact = __webpack_require__(195);
+var requesting_contact_default = /*#__PURE__*/__webpack_require__.n(requesting_contact);
+
+// EXTERNAL MODULE: ./src/templates/roster.html
+var roster = __webpack_require__(196);
+var roster_default = /*#__PURE__*/__webpack_require__.n(roster);
+
+// EXTERNAL MODULE: ./src/templates/roster_filter.html
+var roster_filter = __webpack_require__(197);
+var roster_filter_default = /*#__PURE__*/__webpack_require__.n(roster_filter);
+
+// EXTERNAL MODULE: ./src/templates/roster_item.html
+var templates_roster_item = __webpack_require__(198);
+var roster_item_default = /*#__PURE__*/__webpack_require__.n(templates_roster_item);
+
+// CONCATENATED MODULE: ./src/converse-rosterview.js
+// Converse.js
+// https://conversejs.org
+//
+// Copyright (c) 2013-2019, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-rosterview
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const {
+  Backbone: converse_rosterview_Backbone,
+  Strophe: converse_rosterview_Strophe
+} = converse_core.env;
+const converse_rosterview_u = converse_core.env.utils;
+converse_core.plugins.add('converse-rosterview', {
+  dependencies: ["converse-roster", "converse-modal", "converse-chatboxviews"],
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this,
+          {
+      __
+    } = _converse;
+
+    _converse.api.settings.update({
+      'autocomplete_add_contact': true,
+      'allow_chat_pending_contacts': true,
+      'allow_contact_removal': true,
+      'hide_offline_users': false,
+      'roster_groups': true,
+      'show_toolbar': true,
+      'xhr_user_search_url': null
+    });
+
+    _converse.api.promises.add('rosterViewInitialized');
+
+    const STATUSES = {
+      'dnd': __('This contact is busy'),
+      'online': __('This contact is online'),
+      'offline': __('This contact is offline'),
+      'unavailable': __('This contact is unavailable'),
+      'xa': __('This contact is away for an extended period'),
+      'away': __('This contact is away')
+    };
+    _converse.AddContactModal = _converse.BootstrapModal.extend({
+      events: {
+        'submit form': 'addContactFromForm'
+      },
+
+      initialize() {
+        _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
+
+        this.listenTo(this.model, 'change', this.render);
+      },
+
+      toHTML() {
+        const label_nickname = _converse.xhr_user_search_url ? __('Contact name') : __('Optional nickname');
+        return add_contact_modal_default()(Object.assign(this.model.toJSON(), {
+          '_converse': _converse,
+          'heading_new_contact': __('Add a Contact'),
+          'label_xmpp_address': __('XMPP Address'),
+          'label_nickname': label_nickname,
+          'contact_placeholder': __('name@example.org'),
+          'label_add': __('Add'),
+          'error_message': __('Please enter a valid XMPP address')
+        }));
+      },
+
+      afterRender() {
+        if (_converse.xhr_user_search_url && Object(lodash["isString"])(_converse.xhr_user_search_url)) {
+          this.initXHRAutoComplete();
+        } else {
+          this.initJIDAutoComplete();
+        }
+
+        const jid_input = this.el.querySelector('input[name="jid"]');
+        this.el.addEventListener('shown.bs.modal', () => jid_input.focus(), false);
+      },
+
+      initJIDAutoComplete() {
+        if (!_converse.autocomplete_add_contact) {
+          return;
+        }
+
+        const el = this.el.querySelector('.suggestion-box__jid').parentElement;
+        this.jid_auto_complete = new _converse.AutoComplete(el, {
+          'data': (text, input) => "".concat(input.slice(0, input.indexOf("@")), "@").concat(text),
+          'filter': _converse.FILTER_STARTSWITH,
+          'list': Object(lodash["uniq"])(_converse.roster.map(item => converse_rosterview_Strophe.getDomainFromJid(item.get('jid'))))
+        });
+      },
+
+      initXHRAutoComplete() {
+        if (!_converse.autocomplete_add_contact) {
+          return this.initXHRFetch();
+        }
+
+        const el = this.el.querySelector('.suggestion-box__name').parentElement;
+        this.name_auto_complete = new _converse.AutoComplete(el, {
+          'auto_evaluate': false,
+          'filter': _converse.FILTER_STARTSWITH,
+          'list': []
+        });
+        const xhr = new window.XMLHttpRequest(); // `open` must be called after `onload` for mock/testing purposes.
+
+        xhr.onload = () => {
+          if (xhr.responseText) {
+            const r = xhr.responseText;
+            this.name_auto_complete.list = JSON.parse(r).map(i => ({
+              'label': i.fullname || i.jid,
+              'value': i.jid
+            }));
+            this.name_auto_complete.auto_completing = true;
+            this.name_auto_complete.evaluate();
+          }
+        };
+
+        const input_el = this.el.querySelector('input[name="name"]');
+        input_el.addEventListener('input', Object(lodash["debounce"])(() => {
+          xhr.open("GET", "".concat(_converse.xhr_user_search_url, "q=").concat(encodeURIComponent(input_el.value)), true);
+          xhr.send();
+        }, 300));
+        this.name_auto_complete.on('suggestion-box-selectcomplete', ev => {
+          this.el.querySelector('input[name="name"]').value = ev.text.label;
+          this.el.querySelector('input[name="jid"]').value = ev.text.value;
+        });
+      },
+
+      initXHRFetch() {
+        this.xhr = new window.XMLHttpRequest();
+
+        this.xhr.onload = () => {
+          if (this.xhr.responseText) {
+            const r = this.xhr.responseText;
+            const list = JSON.parse(r).map(i => ({
+              'label': i.fullname || i.jid,
+              'value': i.jid
+            }));
+
+            if (list.length !== 1) {
+              const el = this.el.querySelector('.invalid-feedback');
+              el.textContent = __('Sorry, could not find a contact with that name');
+              converse_rosterview_u.addClass('d-block', el);
+              return;
+            }
+
+            const jid = list[0].value;
+
+            if (this.validateSubmission(jid)) {
+              const form = this.el.querySelector('form');
+              const name = list[0].label;
+              this.afterSubmission(form, jid, name);
+            }
+          }
+        };
+      },
+
+      validateSubmission(jid) {
+        const el = this.el.querySelector('.invalid-feedback');
+
+        if (!jid || Object(lodash["compact"])(jid.split('@')).length < 2) {
+          converse_rosterview_u.addClass('is-invalid', this.el.querySelector('input[name="jid"]'));
+          converse_rosterview_u.addClass('d-block', el);
+          return false;
+        } else if (_converse.roster.get(converse_rosterview_Strophe.getBareJidFromJid(jid))) {
+          el.textContent = __('This contact has already been added');
+          converse_rosterview_u.addClass('d-block', el);
+          return false;
+        }
+
+        converse_rosterview_u.removeClass('d-block', el);
+        return true;
+      },
+
+      afterSubmission(form, jid, name) {
+        _converse.roster.addAndSubscribe(jid, name);
+
+        this.model.clear();
+        this.modal.hide();
+      },
+
+      addContactFromForm(ev) {
+        ev.preventDefault();
+        const data = new FormData(ev.target),
+              jid = (data.get('jid') || '').trim();
+
+        if (!jid && _converse.xhr_user_search_url && Object(lodash["isString"])(_converse.xhr_user_search_url)) {
+          const input_el = this.el.querySelector('input[name="name"]');
+          this.xhr.open("GET", "".concat(_converse.xhr_user_search_url, "q=").concat(encodeURIComponent(input_el.value)), true);
+          this.xhr.send();
+          return;
+        }
+
+        if (this.validateSubmission(jid)) {
+          this.afterSubmission(ev.target, jid, data.get('name'));
+        }
+      }
+
+    });
+    _converse.RosterFilter = converse_rosterview_Backbone.Model.extend({
+      initialize() {
+        this.set({
+          'filter_text': '',
+          'filter_type': 'contacts',
+          'chat_state': 'online'
+        });
+      }
+
+    });
+    _converse.RosterFilterView = converse_rosterview_Backbone.VDOMView.extend({
+      tagName: 'form',
+      className: 'roster-filter-form',
+      events: {
+        "keydown .roster-filter": "liveFilter",
+        "submit": "submitFilter",
+        "click .clear-input": "clearFilter",
+        "click .filter-by span": "changeTypeFilter",
+        "change .state-type": "changeChatStateFilter"
+      },
+
+      initialize() {
+        this.listenTo(this.model, 'change:filter_type', this.render);
+        this.listenTo(this.model, 'change:filter_text', this.render);
+      },
+
+      toHTML() {
+        return roster_filter_default()(Object.assign(this.model.toJSON(), {
+          visible: this.shouldBeVisible(),
+          placeholder: __('Filter'),
+          title_contact_filter: __('Filter by contact name'),
+          title_group_filter: __('Filter by group name'),
+          title_status_filter: __('Filter by status'),
+          label_any: __('Any'),
+          label_unread_messages: __('Unread'),
+          label_online: __('Online'),
+          label_chatty: __('Chatty'),
+          label_busy: __('Busy'),
+          label_away: __('Away'),
+          label_xa: __('Extended Away'),
+          label_offline: __('Offline')
+        }));
+      },
+
+      changeChatStateFilter(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        this.model.save({
+          'chat_state': this.el.querySelector('.state-type').value
+        });
+      },
+
+      changeTypeFilter(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const type = ev.target.dataset.type;
+
+        if (type === 'state') {
+          this.model.save({
+            'filter_type': type,
+            'chat_state': this.el.querySelector('.state-type').value
+          });
+        } else {
+          this.model.save({
+            'filter_type': type,
+            'filter_text': this.el.querySelector('.roster-filter').value
+          });
+        }
+      },
+
+      liveFilter: Object(lodash["debounce"])(function () {
+        this.model.save({
+          'filter_text': this.el.querySelector('.roster-filter').value
+        });
+      }, 250),
+
+      submitFilter(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        this.liveFilter();
+        this.render();
+      },
+
+      isActive() {
+        /* Returns true if the filter is enabled (i.e. if the user
+         * has added values to the filter).
+         */
+        if (this.model.get('filter_type') === 'state' || this.model.get('filter_text')) {
+          return true;
+        }
+
+        return false;
+      },
+
+      shouldBeVisible() {
+        return _converse.roster && _converse.roster.length >= 5 || this.isActive();
+      },
+
+      showOrHide() {
+        if (this.shouldBeVisible()) {
+          this.show();
+        } else {
+          this.hide();
+        }
+      },
+
+      show() {
+        if (converse_rosterview_u.isVisible(this.el)) {
+          return this;
+        }
+
+        this.el.classList.add('fade-in');
+        this.el.classList.remove('hidden');
+        return this;
+      },
+
+      hide() {
+        if (!converse_rosterview_u.isVisible(this.el)) {
+          return this;
+        }
+
+        this.model.save({
+          'filter_text': '',
+          'chat_state': 'online'
+        });
+        this.el.classList.add('hidden');
+        return this;
+      },
+
+      clearFilter(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+          converse_rosterview_u.hideElement(this.el.querySelector('.clear-input'));
+        }
+
+        const roster_filter = this.el.querySelector('.roster-filter');
+        roster_filter.value = '';
+        this.model.save({
+          'filter_text': ''
+        });
+      }
+
+    });
+    _converse.RosterContactView = _converse.ViewWithAvatar.extend({
+      tagName: 'li',
+      className: 'list-item d-flex hidden controlbox-padded',
+      events: {
+        "click .accept-xmpp-request": "acceptRequest",
+        "click .decline-xmpp-request": "declineRequest",
+        "click .open-chat": "openChat",
+        "click .remove-xmpp-contact": "removeContact"
+      },
+
+      async initialize() {
+        await this.model.initialized;
+        this.debouncedRender = Object(lodash["debounce"])(this.render, 50);
+        this.listenTo(this.model, "change", this.debouncedRender);
+        this.listenTo(this.model, "destroy", this.remove);
+        this.listenTo(this.model, "highlight", this.highlight);
+        this.listenTo(this.model, "open", this.openChat);
+        this.listenTo(this.model, "remove", this.remove);
+        this.listenTo(this.model, 'vcard:change', this.debouncedRender);
+        this.listenTo(this.model.presence, "change:show", this.debouncedRender);
+        this.render();
+      },
+
+      render() {
+        if (!this.mayBeShown()) {
+          converse_rosterview_u.hideElement(this.el);
+          return this;
+        }
+
+        const ask = this.model.get('ask'),
+              show = this.model.presence.get('show'),
+              requesting = this.model.get('requesting'),
+              subscription = this.model.get('subscription');
+        const classes_to_remove = ['current-xmpp-contact', 'pending-xmpp-contact', 'requesting-xmpp-contact'].concat(Object.keys(STATUSES));
+        classes_to_remove.forEach(c => converse_rosterview_u.removeClass(c, this.el));
+        this.el.classList.add(show);
+        this.el.setAttribute('data-status', show);
+        this.highlight();
+
+        if (_converse.isUniView()) {
+          const chatbox = _converse.chatboxes.get(this.model.get('jid'));
+
+          if (chatbox) {
+            if (chatbox.get('hidden')) {
+              this.el.classList.remove('open');
+            } else {
+              this.el.classList.add('open');
+            }
+          }
+        }
+
+        if (ask === 'subscribe' || subscription === 'from') {
+          /* ask === 'subscribe'
+           *      Means we have asked to subscribe to them.
+           *
+           * subscription === 'from'
+           *      They are subscribed to use, but not vice versa.
+           *      We assume that there is a pending subscription
+           *      from us to them (otherwise we're in a state not
+           *      supported by converse.js).
+           *
+           *  So in both cases the user is a "pending" contact.
+           */
+          const display_name = this.model.getDisplayName();
+          this.el.classList.add('pending-xmpp-contact');
+          this.el.innerHTML = pending_contact_default()(Object.assign(this.model.toJSON(), {
+            display_name,
+            'desc_remove': __('Click to remove %1$s as a contact', display_name),
+            'allow_chat_pending_contacts': _converse.allow_chat_pending_contacts
+          }));
+        } else if (requesting === true) {
+          const display_name = this.model.getDisplayName();
+          this.el.classList.add('requesting-xmpp-contact');
+          this.el.innerHTML = requesting_contact_default()(Object.assign(this.model.toJSON(), {
+            display_name,
+            'desc_accept': __("Click to accept the contact request from %1$s", display_name),
+            'desc_decline': __("Click to decline the contact request from %1$s", display_name),
+            'allow_chat_pending_contacts': _converse.allow_chat_pending_contacts
+          }));
+        } else if (subscription === 'both' || subscription === 'to') {
+          this.el.classList.add('current-xmpp-contact');
+          this.el.classList.remove(Object(lodash["without"])(['both', 'to'], subscription)[0]);
+          this.el.classList.add(subscription);
+          this.renderRosterItem(this.model);
+        }
+
+        return this;
+      },
+
+      /**
+       * If appropriate, highlight the contact (by adding the 'open' class).
+       * @private
+       * @method _converse.RosterContactView#highlight
+       */
+      highlight() {
+        if (_converse.isUniView()) {
+          const chatbox = _converse.chatboxes.get(this.model.get('jid'));
+
+          if (chatbox && chatbox.get('hidden') || !chatbox) {
+            this.el.classList.remove('open');
+          } else {
+            this.el.classList.add('open');
+          }
+        }
+      },
+
+      renderRosterItem(item) {
+        const show = item.presence.get('show') || 'offline';
+        let status_icon;
+
+        if (show === 'online') {
+          status_icon = 'fa fa-circle chat-status chat-status--online';
+        } else if (show === 'away') {
+          status_icon = 'fa fa-circle chat-status chat-status--away';
+        } else if (show === 'xa') {
+          status_icon = 'far fa-circle chat-status chat-status-xa';
+        } else if (show === 'dnd') {
+          status_icon = 'fa fa-minus-circle chat-status chat-status--busy';
+        } else {
+          status_icon = 'fa fa-times-circle chat-status chat-status--offline';
+        }
+
+        const display_name = item.getDisplayName();
+        this.el.innerHTML = roster_item_default()(Object.assign(item.toJSON(), {
+          show,
+          display_name,
+          status_icon,
+          'desc_status': STATUSES[show],
+          'desc_chat': __('Click to chat with %1$s (JID: %2$s)', display_name, item.get('jid')),
+          'desc_remove': __('Click to remove %1$s as a contact', display_name),
+          'allow_contact_removal': _converse.allow_contact_removal,
+          'num_unread': item.get('num_unread') || 0,
+          classes: ''
+        }));
+        this.renderAvatar();
+        return this;
+      },
+
+      /**
+       * Returns a boolean indicating whether this contact should
+       * generally be visible in the roster.
+       * It doesn't check for the more specific case of whether
+       * the group it's in is collapsed.
+       * @private
+       * @method _converse.RosterContactView#mayBeShown
+       */
+      mayBeShown() {
+        const chatStatus = this.model.presence.get('show');
+
+        if (_converse.hide_offline_users && chatStatus === 'offline') {
+          // If pending or requesting, show
+          if (this.model.get('ask') === 'subscribe' || this.model.get('subscription') === 'from' || this.model.get('requesting') === true) {
+            return true;
+          }
+
+          return false;
+        }
+
+        return true;
+      },
+
+      openChat(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const attrs = this.model.attributes;
+
+        _converse.api.chats.open(attrs.jid, attrs, true);
+      },
+
+      async removeContact(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        if (!_converse.allow_contact_removal) {
+          return;
+        }
+
+        if (!confirm(__("Are you sure you want to remove this contact?"))) {
+          return;
+        }
+
+        try {
+          await this.model.removeFromRoster();
+          this.remove();
+
+          if (this.model.collection) {
+            // The model might have already been removed as
+            // result of a roster push.
+            this.model.destroy();
+          }
+        } catch (e) {
+          headless_log.error(e);
+
+          _converse.api.alert('error', __('Error'), [__('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.getDisplayName())]);
+        }
+      },
+
+      async acceptRequest(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        await _converse.roster.sendContactAddIQ(this.model.get('jid'), this.model.getFullname(), []);
+        this.model.authorize().subscribe();
+      },
+
+      declineRequest(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const result = confirm(__("Are you sure you want to decline this contact request?"));
+
+        if (result === true) {
+          this.model.unauthorize().destroy();
+        }
+
+        return this;
+      }
+
+    });
+    /**
+     * @class
+     * @namespace _converse.RosterGroupView
+     * @memberOf _converse
+     */
+
+    _converse.RosterGroupView = OrderedListView.extend({
+      tagName: 'div',
+      className: 'roster-group hidden',
+      events: {
+        "click a.group-toggle": "toggle"
+      },
+      sortImmediatelyOnAdd: true,
+      ItemView: _converse.RosterContactView,
+      listItems: 'model.contacts',
+      listSelector: '.roster-group-contacts',
+      sortEvent: 'presenceChanged',
+
+      initialize() {
+        OrderedListView.prototype.initialize.apply(this, arguments);
+
+        if (this.model.get('name') === _converse.HEADER_UNREAD) {
+          this.listenTo(this.model.contacts, "change:num_unread", c => !this.model.get('unread_messages') && this.removeContact(c));
+        }
+
+        if (this.model.get('name') === _converse.HEADER_REQUESTING_CONTACTS) {
+          this.listenTo(this.model.contacts, "change:requesting", c => !c.get('requesting') && this.removeContact(c));
+        }
+
+        if (this.model.get('name') === _converse.HEADER_PENDING_CONTACTS) {
+          this.listenTo(this.model.contacts, "change:subscription", c => c.get('subscription') !== 'from' && this.removeContact(c));
+        }
+
+        this.listenTo(this.model.contacts, "remove", this.onRemove);
+        this.listenTo(_converse.roster, 'change:groups', this.onContactGroupChange); // This event gets triggered once *all* contacts (i.e. not
+        // just this group's) have been fetched from browser
+        // storage or the XMPP server and once they've been
+        // assigned to their various groups.
+
+        _converse.rosterview.on('rosterContactsFetchedAndProcessed', () => this.sortAndPositionAllItems());
+      },
+
+      render() {
+        this.el.setAttribute('data-group', this.model.get('name'));
+        this.el.innerHTML = group_header_default()({
+          'label_group': this.model.get('name'),
+          'desc_group_toggle': this.model.get('description'),
+          'toggle_state': this.model.get('state'),
+          '_converse': _converse
+        });
+        this.contacts_el = this.el.querySelector('.roster-group-contacts');
+        return this;
+      },
+
+      show() {
+        converse_rosterview_u.showElement(this.el);
+
+        if (this.model.get('state') === _converse.OPENED) {
+          Object.values(this.getAll()).filter(v => v.mayBeShown()).forEach(v => converse_rosterview_u.showElement(v.el));
+        }
+
+        return this;
+      },
+
+      collapse() {
+        return converse_rosterview_u.slideIn(this.contacts_el);
+      },
+
+      /* Given a list of contacts, make sure they're filtered out
+       * (aka hidden) and that all other contacts are visible.
+       * If all contacts are hidden, then also hide the group title.
+       * @private
+       * @method _converse.RosterGroupView#filterOutContacts
+       * @param { Array } contacts
+       */
+      filterOutContacts() {
+        let contacts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+        let shown = 0;
+        this.model.contacts.forEach(contact => {
+          const contact_view = this.get(contact.get('id'));
+
+          if (contacts.includes(contact)) {
+            converse_rosterview_u.hideElement(contact_view.el);
+          } else if (contact_view.mayBeShown()) {
+            converse_rosterview_u.showElement(contact_view.el);
+            shown += 1;
+          }
+        });
+
+        if (shown) {
+          converse_rosterview_u.showElement(this.el);
+        } else {
+          converse_rosterview_u.hideElement(this.el);
+        }
+      },
+
+      /**
+       * Given the filter query "q" and the filter type "type",
+       * return a list of contacts that need to be filtered out.
+       * @private
+       * @method _converse.RosterGroupView#getFilterMatches
+       * @param { String } q - The filter query
+       * @param { String } type - The filter type
+       */
+      getFilterMatches(q, type) {
+        if (q.length === 0) {
+          return [];
+        }
+
+        let matches;
+        q = q.toLowerCase();
+
+        if (type === 'state') {
+          const sticky_groups = [_converse.HEADER_REQUESTING_CONTACTS, _converse.HEADER_UNREAD];
+
+          if (sticky_groups.includes(this.model.get('name'))) {
+            // When filtering by chat state, we still want to
+            // show sticky groups, even though they don't
+            // match the state in question.
+            return [];
+          } else if (q === 'unread_messages') {
+            matches = this.model.contacts.filter({
+              'num_unread': 0
+            });
+          } else if (q === 'online') {
+            matches = this.model.contacts.filter(c => ["offline", "unavailable"].includes(c.presence.get('show')));
+          } else {
+            matches = this.model.contacts.filter(c => !c.presence.get('show').includes(q));
+          }
+        } else {
+          matches = this.model.contacts.filter(contact => {
+            return !contact.getDisplayName().toLowerCase().includes(q.toLowerCase());
+          });
+        }
+
+        return matches;
+      },
+
+      /**
+       * Filter the group's contacts based on the query "q".
+       *
+       * If all contacts are filtered out (i.e. hidden), then the
+       * group must be filtered out as well.
+       * @private
+       * @method _converse.RosterGroupView#filter
+       * @param { string } q - The query to filter against
+       * @param { string } type
+       */
+      filter(q, type) {
+        if (q === null || q === undefined) {
+          type = type || _converse.rosterview.filter_view.model.get('filter_type');
+
+          if (type === 'state') {
+            q = _converse.rosterview.filter_view.model.get('chat_state');
+          } else {
+            q = _converse.rosterview.filter_view.model.get('filter_text');
+          }
+        }
+
+        this.filterOutContacts(this.getFilterMatches(q, type));
+      },
+
+      async toggle(ev) {
+        if (ev && ev.preventDefault) {
+          ev.preventDefault();
+        }
+
+        const icon_el = ev.target.matches('.fa') ? ev.target : ev.target.querySelector('.fa');
+
+        if (converse_rosterview_u.hasClass("fa-caret-down", icon_el)) {
+          this.model.save({
+            state: _converse.CLOSED
+          });
+          await this.collapse();
+          icon_el.classList.remove("fa-caret-down");
+          icon_el.classList.add("fa-caret-right");
+        } else {
+          icon_el.classList.remove("fa-caret-right");
+          icon_el.classList.add("fa-caret-down");
+          this.model.save({
+            state: _converse.OPENED
+          });
+          this.filter();
+          converse_rosterview_u.showElement(this.el);
+          converse_rosterview_u.slideOut(this.contacts_el);
+        }
+      },
+
+      onContactGroupChange(contact) {
+        const in_this_group = contact.get('groups').includes(this.model.get('name'));
+        const cid = contact.get('id');
+        const in_this_overview = !this.get(cid);
+
+        if (in_this_group && !in_this_overview) {
+          this.items.trigger('add', contact);
+        } else if (!in_this_group) {
+          this.removeContact(contact);
+        }
+      },
+
+      removeContact(contact) {
+        // We suppress events, otherwise the remove event will
+        // also cause the contact's view to be removed from the
+        // "Pending Contacts" group.
+        this.model.contacts.remove(contact, {
+          'silent': true
+        });
+        this.onRemove(contact);
+      },
+
+      onRemove(contact) {
+        this.remove(contact.get('jid'));
+
+        if (this.model.contacts.length === 0) {
+          this.remove();
+        }
+      }
+
+    });
+    /**
+     * @class
+     * @namespace _converse.RosterView
+     * @memberOf _converse
+     */
+
+    _converse.RosterView = OrderedListView.extend({
+      tagName: 'div',
+      id: 'converse-roster',
+      className: 'controlbox-section',
+      ItemView: _converse.RosterGroupView,
+      listItems: 'model',
+      listSelector: '.roster-contacts',
+      sortEvent: null,
+      // Groups are immutable, so they don't get re-sorted
+      subviewIndex: 'name',
+      sortImmediatelyOnAdd: true,
+      events: {
+        'click a.controlbox-heading__btn.add-contact': 'showAddContactModal',
+        'click a.controlbox-heading__btn.sync-contacts': 'syncContacts'
+      },
+
+      initialize() {
+        OrderedListView.prototype.initialize.apply(this, arguments);
+        this.listenTo(_converse.roster, "add", this.onContactAdded);
+        this.listenTo(_converse.roster, 'change:groups', this.onContactAdded);
+        this.listenTo(_converse.roster, 'change', this.onContactChange);
+        this.listenTo(_converse.roster, "destroy", this.update);
+        this.listenTo(_converse.roster, "remove", this.update);
+
+        _converse.presences.on('change:show', () => {
+          this.update();
+          this.updateFilter();
+        });
+
+        this.listenTo(this.model, "reset", this.reset); // This event gets triggered once *all* contacts (i.e. not
+        // just this group's) have been fetched from browser
+        // storage or the XMPP server and once they've been
+        // assigned to their various groups.
+
+        _converse.api.listen.on('rosterGroupsFetched', this.sortAndPositionAllItems.bind(this));
+
+        _converse.api.listen.on('rosterContactsFetched', () => {
+          _converse.roster.each(contact => this.addRosterContact(contact, {
+            'silent': true
+          }));
+
+          this.update();
+          this.updateFilter();
+          this.trigger('rosterContactsFetchedAndProcessed');
+        });
+
+        this.createRosterFilter();
+      },
+
+      render() {
+        this.el.innerHTML = roster_default()({
+          'allow_contact_requests': _converse.allow_contact_requests,
+          'heading_contacts': __('Contacts'),
+          'title_add_contact': __('Add a contact'),
+          'title_sync_contacts': __('Re-sync your contacts')
+        });
+        const form = this.el.querySelector('.roster-filter-form');
+        this.el.replaceChild(this.filter_view.render().el, form);
+        this.roster_el = this.el.querySelector('.roster-contacts');
+        return this;
+      },
+
+      showAddContactModal(ev) {
+        if (this.add_contact_modal === undefined) {
+          this.add_contact_modal = new _converse.AddContactModal({
+            'model': new converse_rosterview_Backbone.Model()
+          });
+        }
+
+        this.add_contact_modal.show(ev);
+      },
+
+      createRosterFilter() {
+        // Create a model on which we can store filter properties
+        const model = new _converse.RosterFilter();
+        model.id = "_converse.rosterfilter-".concat(_converse.bare_jid);
+        model.browserStorage = _converse.createStore(model.id);
+        this.filter_view = new _converse.RosterFilterView({
+          'model': model
+        });
+        this.listenTo(this.filter_view.model, 'change', this.updateFilter);
+        this.filter_view.model.fetch();
+      },
+
+      updateFilter: Object(lodash["debounce"])(function () {
+        /* Filter the roster again.
+         * Called whenever the filter settings have been changed or
+         * when contacts have been added, removed or changed.
+         *
+         * Debounced so that it doesn't get called for every
+         * contact fetched from browser storage.
+         */
+        const type = this.filter_view.model.get('filter_type');
+
+        if (type === 'state') {
+          this.filter(this.filter_view.model.get('chat_state'), type);
+        } else {
+          this.filter(this.filter_view.model.get('filter_text'), type);
+        }
+      }, 100),
+
+      update() {
+        if (!converse_rosterview_u.isVisible(this.roster_el)) {
+          converse_rosterview_u.showElement(this.roster_el);
+        }
+
+        this.filter_view.showOrHide();
+        return this;
+      },
+
+      filter(query, type) {
+        const views = Object.values(this.getAll()); // First ensure the filter is restored to its original state
+
+        views.forEach(v => v.model.contacts.length > 0 && v.show().filter('')); // Now we can filter
+
+        query = query.toLowerCase();
+
+        if (type === 'groups') {
+          views.forEach(view => {
+            if (!view.model.get('name').toLowerCase().includes(query)) {
+              converse_rosterview_u.slideIn(view.el);
+            } else if (view.model.contacts.length > 0) {
+              converse_rosterview_u.slideOut(view.el);
+            }
+          });
+        } else {
+          views.forEach(v => v.filter(query, type));
+        }
+      },
+
+      async syncContacts(ev) {
+        ev.preventDefault();
+        converse_rosterview_u.addClass('fa-spin', ev.target);
+
+        _converse.roster.data.save('version', null);
+
+        await _converse.roster.fetchFromServer();
+
+        _converse.xmppstatus.sendPresence();
+
+        converse_rosterview_u.removeClass('fa-spin', ev.target);
+      },
+
+      reset() {
+        this.removeAll();
+        this.render().update();
+        return this;
+      },
+
+      onContactAdded(contact) {
+        this.addRosterContact(contact);
+        this.update();
+        this.updateFilter();
+      },
+
+      onContactChange(contact) {
+        this.update();
+
+        if (Object(lodash["has"])(contact.changed, 'subscription')) {
+          if (contact.changed.subscription === 'from') {
+            this.addContactToGroup(contact, _converse.HEADER_PENDING_CONTACTS);
+          } else if (['both', 'to'].includes(contact.get('subscription'))) {
+            this.addExistingContact(contact);
+          }
+        }
+
+        if (Object(lodash["has"])(contact.changed, 'num_unread') && contact.get('num_unread')) {
+          this.addContactToGroup(contact, _converse.HEADER_UNREAD);
+        }
+
+        if (Object(lodash["has"])(contact.changed, 'ask') && contact.changed.ask === 'subscribe') {
+          this.addContactToGroup(contact, _converse.HEADER_PENDING_CONTACTS);
+        }
+
+        if (Object(lodash["has"])(contact.changed, 'subscription') && contact.changed.requesting === 'true') {
+          this.addContactToGroup(contact, _converse.HEADER_REQUESTING_CONTACTS);
+        }
+
+        this.updateFilter();
+      },
+
+      /**
+       * Returns the group as specified by name.
+       * Creates the group if it doesn't exist.
+       * @method _converse.RosterView#getGroup
+       * @private
+       * @param {string} name
+       */
+      getGroup(name) {
+        const view = this.get(name);
+
+        if (view) {
+          return view.model;
+        }
+
+        return this.model.create({
+          name,
+          'id': SHA1.b64_sha1(name)
+        });
+      },
+
+      addContactToGroup(contact, name, options) {
+        this.getGroup(name).contacts.add(contact, options);
+        this.sortAndPositionAllItems();
+      },
+
+      addExistingContact(contact, options) {
+        let groups;
+
+        if (_converse.roster_groups) {
+          groups = contact.get('groups');
+          groups = groups.length === 0 ? [_converse.HEADER_UNGROUPED] : groups;
+        } else {
+          groups = [_converse.HEADER_CURRENT_CONTACTS];
+        }
+
+        if (contact.get('num_unread')) {
+          groups.push(_converse.HEADER_UNREAD);
+        }
+
+        groups.forEach(g => this.addContactToGroup(contact, g, options));
+      },
+
+      addRosterContact(contact, options) {
+        if (contact.get('subscription') === 'both' || contact.get('subscription') === 'to') {
+          this.addExistingContact(contact, options);
+        } else {
+          if (!_converse.allow_contact_requests) {
+            headless_log.debug("Not adding requesting or pending contact ".concat(contact.get('jid'), " ") + "because allow_contact_requests is false");
+            return;
+          }
+
+          if (contact.get('ask') === 'subscribe' || contact.get('subscription') === 'from') {
+            this.addContactToGroup(contact, _converse.HEADER_PENDING_CONTACTS, options);
+          } else if (contact.get('requesting') === true) {
+            this.addContactToGroup(contact, _converse.HEADER_REQUESTING_CONTACTS, options);
+          }
+        }
+
+        return this;
+      }
+
+    });
+    /* -------- Event Handlers ----------- */
+
+    _converse.api.listen.on('chatBoxesInitialized', () => {
+      function highlightRosterItem(chatbox) {
+        const contact = _converse.roster && _converse.roster.findWhere({
+          'jid': chatbox.get('jid')
+        });
+
+        if (contact !== undefined) {
+          contact.trigger('highlight');
+        }
+      }
+
+      _converse.chatboxes.on('destroy', chatbox => highlightRosterItem(chatbox));
+
+      _converse.chatboxes.on('change:hidden', chatbox => highlightRosterItem(chatbox));
+    });
+
+    _converse.api.listen.on('controlBoxInitialized', view => {
+      function insertRoster() {
+        if (!view.model.get('connected') || _converse.authentication === _converse.ANONYMOUS) {
+          return;
+        }
+        /* Place the rosterview inside the "Contacts" panel. */
+
+
+        _converse.api.waitUntil('rosterViewInitialized').then(() => view.controlbox_pane.el.insertAdjacentElement('beforeEnd', _converse.rosterview.el)).catch(e => headless_log.fatal(e));
+      }
+
+      insertRoster();
+      view.model.on('change:connected', insertRoster);
+    });
+
+    function initRosterView() {
+      /* Create an instance of RosterView once the RosterGroups
+       * collection has been created (in @converse/headless/converse-core.js)
+       */
+      if (_converse.authentication === _converse.ANONYMOUS) {
+        return;
+      }
+
+      _converse.rosterview = new _converse.RosterView({
+        'model': _converse.rostergroups
+      });
+
+      _converse.rosterview.render();
+      /**
+       * Triggered once the _converse.RosterView instance has been created and initialized.
+       * @event _converse#rosterViewInitialized
+       * @example _converse.api.listen.on('rosterViewInitialized', () => { ... });
+       */
+
+
+      _converse.api.trigger('rosterViewInitialized');
+    }
+
+    _converse.api.listen.on('rosterInitialized', initRosterView);
+
+    _converse.api.listen.on('rosterReadyAfterReconnection', initRosterView);
+
+    _converse.api.listen.on('afterTearDown', () => {
+      if (converse_core.rosterview) {
+        converse_core.rosterview.model.off().reset();
+        converse_core.rosterview.each(groupview => groupview.removeAll().remove());
+        converse_core.rosterview.removeAll().remove();
+        delete converse_core.rosterview;
+      }
+    });
+  }
+
+});
+// CONCATENATED MODULE: ./src/converse-uniview.js
+// Converse.js
+// http://conversejs.org
+//
+// Copyright (c) 2013-2018, the Converse.js developers
+// Licensed under the Mozilla Public License (MPLv2)
+
+/**
+ * @module converse-uniview
+ * @description
+ * A plugin which ensures that only one chat (private or groupchat) is
+ * visible at any one time. All other ongoing chats are hidden and kept in the
+ * background.
+ *
+ * This plugin makes sense in mobile, embedded or fullscreen chat environments
+ * (as configured by the `view_mode` setting).
+ */
+
+
+const converse_uniview_u = converse_core.env.utils;
+
+function hideChat(view) {
+  if (view.model.get('id') === 'controlbox') {
+    return;
+  }
+
+  converse_uniview_u.safeSave(view.model, {
+    'hidden': true
+  });
+  view.hide();
+}
+
+function visibleChats(_converse) {
+  return _converse.chatboxes.filter(cb => cb.get('id') !== 'controlbox' && !cb.get('hidden')).length > 0;
+}
+
+converse_core.plugins.add('converse-uniview', {
+  // It's possible however to make optional dependencies non-optional.
+  // If the setting "strict_plugin_dependencies" is set to true,
+  // an error will be raised if the plugin is not found.
+  dependencies: ['converse-chatboxes', 'converse-muc-views', 'converse-controlbox', 'converse-rosterview'],
+  overrides: {
+    // overrides mentioned here will be picked up by converse.js's
+    // plugin architecture they will replace existing methods on the
+    // relevant objects or classes.
+    //
+    // new functions which don't exist yet can also be added.
+    ChatBoxes: {
+      createChatBox(jid, attrs) {
+        /* Make sure new chat boxes are hidden by default. */
+        const {
+          _converse
+        } = this.__super__;
+
+        if (_converse.isUniView()) {
+          attrs = attrs || {};
+          attrs.hidden = true;
+        }
+
+        return this.__super__.createChatBox.call(this, jid, attrs);
+      }
+
+    },
+    ChatBox: {
+      maybeShow() {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (_converse.isUniView() && (!this.get('hidden') || !visibleChats(_converse))) {
+          return this.trigger("show");
+        } else {
+          return this.__super__.maybeShow.apply(this, arguments);
+        }
+      }
+
+    },
+    ChatBoxView: {
+      shouldShowOnTextMessage() {
+        const {
+          _converse
+        } = this.__super__;
+
+        if (_converse.isUniView()) {
+          return false;
+        } else {
+          return this.__super__.shouldShowOnTextMessage.apply(this, arguments);
+        }
+      }
+
+    }
+  },
+
+  initialize() {
+    /* The initialize function gets called as soon as the plugin is
+     * loaded by converse.js's plugin machinery.
+     */
+    const {
+      _converse
+    } = this;
+    /************************ BEGIN Event Handlers ************************/
+
+    _converse.api.listen.on('beforeShowingChatView', view => {
+      /* We only have one chat visible at any one
+       * time. So before opening a chat, we make sure all other
+       * chats are hidden.
+       */
+      if (_converse.isUniView()) {
+        Object.values(_converse.chatboxviews.xget(view.model.get('id'))).filter(v => !v.model.get('hidden')).forEach(hideChat);
+
+        if (view.model.get('hidden')) {
+          return new Promise(resolve => {
+            converse_uniview_u.safeSave(view.model, {
+              'hidden': false
+            }, {
+              'success': resolve,
+              'failure': resolve
+            });
+          });
+        }
+      }
+    });
+    /************************ END Event Handlers ************************/
+
+  }
+
+});
+// EXTERNAL MODULE: ./sass/converse.scss
+var sass_converse = __webpack_require__(457);
+
+// CONCATENATED MODULE: ./src/converse.js
+// Converse.js (A browser based XMPP chat client)
+// https://conversejs.org
+//
+// Copyright (c) 2019, The Converse developers
+// Licensed under the Mozilla Public License (MPLv2)
+//
+
+/* START: Removable components
+ * --------------------
+ * Any of the following components may be removed if they're not needed.
+ */
+
+
+ // Views for XEP-0048 Bookmarks
+
+ // Renders standalone chat boxes for single user chat
+
+ // The control box
+
+ // Allows chat boxes to be resized by dragging them
+
+
+
+
+ // Allows chat boxes to be minimized
+
+ // Views related to MUC
+
+
+ // HTML5 Notifications
+
+
+
+ // XEP-0357 Push Notifications
+
+ // XEP-0077 In-band registration
+
+ // Show currently open chat rooms
+
+
+
+
+/* END: Removable components */
+
+
+
+const WHITELISTED_PLUGINS = ['converse-autocomplete', 'converse-bookmark-views', 'converse-chatboxviews', 'converse-chatview', 'converse-controlbox', 'converse-dragresize', 'converse-emoji-views', 'converse-fullscreen', 'converse-mam-views', 'converse-message-view', 'converse-minimize', 'converse-modal', 'converse-muc-views', 'converse-headlines-view', 'converse-notification', 'converse-omemo', 'converse-profile', 'converse-push', 'converse-register', 'converse-roomslist', 'converse-rosterview', 'converse-singleton', 'converse-uniview'];
+const initialize = converse_core.initialize;
+
+converse_core.initialize = function (settings, callback) {
+  if (Array.isArray(settings.whitelisted_plugins)) {
+    settings.whitelisted_plugins = settings.whitelisted_plugins.concat(WHITELISTED_PLUGINS);
+  } else {
+    settings.whitelisted_plugins = WHITELISTED_PLUGINS;
+  }
+
+  return initialize(settings, callback);
+};
+
+/* harmony default export */ var src_converse = __webpack_exports__["default"] = (converse_core);
+
+/***/ })
+/******/ ]);
\ No newline at end of file
diff --git a/src/conversejs/converse.min.css b/src/conversejs/converse.min.css
index 6efcce5b513f40139f3321de94135e48ed7bb1db..ea372b3c17847dbe5d4d93263308ef2432701cf9 100644
--- a/src/conversejs/converse.min.css
+++ b/src/conversejs/converse.min.css
@@ -4,4 +4,4 @@
  *
  * Copyright (c) 2013-2018, JC Brand <jc@opkode.com>
  * Licensed under the Mozilla Public License
- */#conversejs :root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}#conversejs *,#conversejs ::after,#conversejs ::before{box-sizing:border-box}#conversejs html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}#conversejs article,#conversejs aside,#conversejs figcaption,#conversejs figure,#conversejs footer,#conversejs header,#conversejs hgroup,#conversejs main,#conversejs nav,#conversejs section{display:block}#conversejs body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}#conversejs [tabindex="-1"]:focus{outline:0!important}#conversejs hr{box-sizing:content-box;height:0;overflow:visible}#conversejs h1,#conversejs h2,#conversejs h3,#conversejs h4,#conversejs h5,#conversejs h6{margin-top:0;margin-bottom:.5rem}#conversejs p{margin-top:0;margin-bottom:1rem}#conversejs abbr[data-original-title],#conversejs abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}#conversejs address{margin-bottom:1rem;font-style:normal;line-height:inherit}#conversejs dl,#conversejs ol,#conversejs ul{margin-top:0;margin-bottom:1rem}#conversejs ol ol,#conversejs ol ul,#conversejs ul ol,#conversejs ul ul{margin-bottom:0}#conversejs dt{font-weight:700}#conversejs dd{margin-bottom:.5rem;margin-left:0}#conversejs blockquote{margin:0 0 1rem}#conversejs b,#conversejs strong{font-weight:bolder}#conversejs small{font-size:80%}#conversejs sub,#conversejs sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}#conversejs sub{bottom:-.25em}#conversejs sup{top:-.5em}#conversejs a{color:#007bff;text-decoration:none;background-color:transparent}#conversejs a:hover{color:#0056b3;text-decoration:underline}#conversejs a:not([href]):not([tabindex]){color:inherit;text-decoration:none}#conversejs a:not([href]):not([tabindex]):focus,#conversejs a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}#conversejs a:not([href]):not([tabindex]):focus{outline:0}#conversejs code,#conversejs kbd,#conversejs pre,#conversejs samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}#conversejs pre{margin-top:0;margin-bottom:1rem;overflow:auto}#conversejs figure{margin:0 0 1rem}#conversejs img{vertical-align:middle;border-style:none}#conversejs svg{overflow:hidden;vertical-align:middle}#conversejs table{border-collapse:collapse}#conversejs caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}#conversejs th{text-align:inherit}#conversejs label{display:inline-block;margin-bottom:.5rem}#conversejs button{border-radius:0}#conversejs button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}#conversejs button,#conversejs input,#conversejs optgroup,#conversejs select,#conversejs textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}#conversejs button,#conversejs input{overflow:visible}#conversejs button,#conversejs select{text-transform:none}#conversejs select{word-wrap:normal}#conversejs [type=button],#conversejs [type=reset],#conversejs [type=submit],#conversejs button{-webkit-appearance:button}#conversejs [type=button]:not(:disabled),#conversejs [type=reset]:not(:disabled),#conversejs [type=submit]:not(:disabled),#conversejs button:not(:disabled){cursor:pointer}#conversejs [type=button]::-moz-focus-inner,#conversejs [type=reset]::-moz-focus-inner,#conversejs [type=submit]::-moz-focus-inner,#conversejs button::-moz-focus-inner{padding:0;border-style:none}#conversejs input[type=checkbox],#conversejs input[type=radio]{box-sizing:border-box;padding:0}#conversejs input[type=date],#conversejs input[type=datetime-local],#conversejs input[type=month],#conversejs input[type=time]{-webkit-appearance:listbox}#conversejs textarea{overflow:auto;resize:vertical}#conversejs fieldset{min-width:0;padding:0;margin:0;border:0}#conversejs legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}#conversejs progress{vertical-align:baseline}#conversejs [type=number]::-webkit-inner-spin-button,#conversejs [type=number]::-webkit-outer-spin-button{height:auto}#conversejs [type=search]{outline-offset:-2px;-webkit-appearance:none}#conversejs [type=search]::-webkit-search-decoration{-webkit-appearance:none}#conversejs ::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}#conversejs output{display:inline-block}#conversejs summary{display:list-item;cursor:pointer}#conversejs template{display:none}#conversejs [hidden]{display:none!important}#conversejs .h1,#conversejs .h2,#conversejs .h3,#conversejs .h4,#conversejs .h5,#conversejs .h6,#conversejs h1,#conversejs h2,#conversejs h3,#conversejs h4,#conversejs h5,#conversejs h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}#conversejs .h1,#conversejs h1{font-size:2.5rem}#conversejs .h2,#conversejs h2{font-size:2rem}#conversejs .h3,#conversejs h3{font-size:1.75rem}#conversejs .h4,#conversejs h4{font-size:1.5rem}#conversejs .h5,#conversejs h5{font-size:1.25rem}#conversejs .h6,#conversejs h6{font-size:1rem}#conversejs .lead{font-size:1.25rem;font-weight:300}#conversejs .display-1{font-size:6rem;font-weight:300;line-height:1.2}#conversejs .display-2{font-size:5.5rem;font-weight:300;line-height:1.2}#conversejs .display-3{font-size:4.5rem;font-weight:300;line-height:1.2}#conversejs .display-4{font-size:3.5rem;font-weight:300;line-height:1.2}#conversejs hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}#conversejs .small,#conversejs small{font-size:80%;font-weight:400}#conversejs .mark,#conversejs mark{padding:.2em;background-color:#fcf8e3}#conversejs .list-unstyled{padding-left:0;list-style:none}#conversejs .list-inline{padding-left:0;list-style:none}#conversejs .list-inline-item{display:inline-block}#conversejs .list-inline-item:not(:last-child){margin-right:.5rem}#conversejs .initialism{font-size:90%;text-transform:uppercase}#conversejs .blockquote{margin-bottom:1rem;font-size:1.25rem}#conversejs .blockquote-footer{display:block;font-size:80%;color:#6c757d}#conversejs .blockquote-footer::before{content:"\2014\00A0"}#conversejs .img-fluid{max-width:100%;height:auto}#conversejs .img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}#conversejs .figure{display:inline-block}#conversejs .figure-img{margin-bottom:.5rem;line-height:1}#conversejs .figure-caption{font-size:90%;color:#6c757d}#conversejs .container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){#conversejs .container{max-width:540px}}@media (min-width:768px){#conversejs .container{max-width:720px}}@media (min-width:992px){#conversejs .container{max-width:960px}}@media (min-width:1200px){#conversejs .container{max-width:1140px}}#conversejs .container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}#conversejs .row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}#conversejs .no-gutters{margin-right:0;margin-left:0}#conversejs .no-gutters>.col,#conversejs .no-gutters>[class*=col-]{padding-right:0;padding-left:0}#conversejs .col,#conversejs .col-1,#conversejs .col-10,#conversejs .col-11,#conversejs .col-12,#conversejs .col-2,#conversejs .col-3,#conversejs .col-4,#conversejs .col-5,#conversejs .col-6,#conversejs .col-7,#conversejs .col-8,#conversejs .col-9,#conversejs .col-auto,#conversejs .col-lg,#conversejs .col-lg-1,#conversejs .col-lg-10,#conversejs .col-lg-11,#conversejs .col-lg-12,#conversejs .col-lg-2,#conversejs .col-lg-3,#conversejs .col-lg-4,#conversejs .col-lg-5,#conversejs .col-lg-6,#conversejs .col-lg-7,#conversejs .col-lg-8,#conversejs .col-lg-9,#conversejs .col-lg-auto,#conversejs .col-md,#conversejs .col-md-1,#conversejs .col-md-10,#conversejs .col-md-11,#conversejs .col-md-12,#conversejs .col-md-2,#conversejs .col-md-3,#conversejs .col-md-4,#conversejs .col-md-5,#conversejs .col-md-6,#conversejs .col-md-7,#conversejs .col-md-8,#conversejs .col-md-9,#conversejs .col-md-auto,#conversejs .col-sm,#conversejs .col-sm-1,#conversejs .col-sm-10,#conversejs .col-sm-11,#conversejs .col-sm-12,#conversejs .col-sm-2,#conversejs .col-sm-3,#conversejs .col-sm-4,#conversejs .col-sm-5,#conversejs .col-sm-6,#conversejs .col-sm-7,#conversejs .col-sm-8,#conversejs .col-sm-9,#conversejs .col-sm-auto,#conversejs .col-xl,#conversejs .col-xl-1,#conversejs .col-xl-10,#conversejs .col-xl-11,#conversejs .col-xl-12,#conversejs .col-xl-2,#conversejs .col-xl-3,#conversejs .col-xl-4,#conversejs .col-xl-5,#conversejs .col-xl-6,#conversejs .col-xl-7,#conversejs .col-xl-8,#conversejs .col-xl-9,#conversejs .col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}#conversejs .col{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-3{flex:0 0 25%;max-width:25%}#conversejs .col-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-6{flex:0 0 50%;max-width:50%}#conversejs .col-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-9{flex:0 0 75%;max-width:75%}#conversejs .col-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-12{flex:0 0 100%;max-width:100%}#conversejs .order-first{order:-1}#conversejs .order-last{order:13}#conversejs .order-0{order:0}#conversejs .order-1{order:1}#conversejs .order-2{order:2}#conversejs .order-3{order:3}#conversejs .order-4{order:4}#conversejs .order-5{order:5}#conversejs .order-6{order:6}#conversejs .order-7{order:7}#conversejs .order-8{order:8}#conversejs .order-9{order:9}#conversejs .order-10{order:10}#conversejs .order-11{order:11}#conversejs .order-12{order:12}#conversejs .offset-1{margin-left:8.33333%}#conversejs .offset-2{margin-left:16.66667%}#conversejs .offset-3{margin-left:25%}#conversejs .offset-4{margin-left:33.33333%}#conversejs .offset-5{margin-left:41.66667%}#conversejs .offset-6{margin-left:50%}#conversejs .offset-7{margin-left:58.33333%}#conversejs .offset-8{margin-left:66.66667%}#conversejs .offset-9{margin-left:75%}#conversejs .offset-10{margin-left:83.33333%}#conversejs .offset-11{margin-left:91.66667%}@media (min-width:576px){#conversejs .col-sm{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-sm-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-sm-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-sm-3{flex:0 0 25%;max-width:25%}#conversejs .col-sm-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-sm-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-sm-6{flex:0 0 50%;max-width:50%}#conversejs .col-sm-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-sm-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-sm-9{flex:0 0 75%;max-width:75%}#conversejs .col-sm-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-sm-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-sm-12{flex:0 0 100%;max-width:100%}#conversejs .order-sm-first{order:-1}#conversejs .order-sm-last{order:13}#conversejs .order-sm-0{order:0}#conversejs .order-sm-1{order:1}#conversejs .order-sm-2{order:2}#conversejs .order-sm-3{order:3}#conversejs .order-sm-4{order:4}#conversejs .order-sm-5{order:5}#conversejs .order-sm-6{order:6}#conversejs .order-sm-7{order:7}#conversejs .order-sm-8{order:8}#conversejs .order-sm-9{order:9}#conversejs .order-sm-10{order:10}#conversejs .order-sm-11{order:11}#conversejs .order-sm-12{order:12}#conversejs .offset-sm-0{margin-left:0}#conversejs .offset-sm-1{margin-left:8.33333%}#conversejs .offset-sm-2{margin-left:16.66667%}#conversejs .offset-sm-3{margin-left:25%}#conversejs .offset-sm-4{margin-left:33.33333%}#conversejs .offset-sm-5{margin-left:41.66667%}#conversejs .offset-sm-6{margin-left:50%}#conversejs .offset-sm-7{margin-left:58.33333%}#conversejs .offset-sm-8{margin-left:66.66667%}#conversejs .offset-sm-9{margin-left:75%}#conversejs .offset-sm-10{margin-left:83.33333%}#conversejs .offset-sm-11{margin-left:91.66667%}}@media (min-width:768px){#conversejs .col-md{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-md-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-md-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-md-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-md-3{flex:0 0 25%;max-width:25%}#conversejs .col-md-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-md-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-md-6{flex:0 0 50%;max-width:50%}#conversejs .col-md-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-md-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-md-9{flex:0 0 75%;max-width:75%}#conversejs .col-md-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-md-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-md-12{flex:0 0 100%;max-width:100%}#conversejs .order-md-first{order:-1}#conversejs .order-md-last{order:13}#conversejs .order-md-0{order:0}#conversejs .order-md-1{order:1}#conversejs .order-md-2{order:2}#conversejs .order-md-3{order:3}#conversejs .order-md-4{order:4}#conversejs .order-md-5{order:5}#conversejs .order-md-6{order:6}#conversejs .order-md-7{order:7}#conversejs .order-md-8{order:8}#conversejs .order-md-9{order:9}#conversejs .order-md-10{order:10}#conversejs .order-md-11{order:11}#conversejs .order-md-12{order:12}#conversejs .offset-md-0{margin-left:0}#conversejs .offset-md-1{margin-left:8.33333%}#conversejs .offset-md-2{margin-left:16.66667%}#conversejs .offset-md-3{margin-left:25%}#conversejs .offset-md-4{margin-left:33.33333%}#conversejs .offset-md-5{margin-left:41.66667%}#conversejs .offset-md-6{margin-left:50%}#conversejs .offset-md-7{margin-left:58.33333%}#conversejs .offset-md-8{margin-left:66.66667%}#conversejs .offset-md-9{margin-left:75%}#conversejs .offset-md-10{margin-left:83.33333%}#conversejs .offset-md-11{margin-left:91.66667%}}@media (min-width:992px){#conversejs .col-lg{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-lg-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-lg-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-lg-3{flex:0 0 25%;max-width:25%}#conversejs .col-lg-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-lg-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-lg-6{flex:0 0 50%;max-width:50%}#conversejs .col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-lg-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-lg-9{flex:0 0 75%;max-width:75%}#conversejs .col-lg-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-lg-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-lg-12{flex:0 0 100%;max-width:100%}#conversejs .order-lg-first{order:-1}#conversejs .order-lg-last{order:13}#conversejs .order-lg-0{order:0}#conversejs .order-lg-1{order:1}#conversejs .order-lg-2{order:2}#conversejs .order-lg-3{order:3}#conversejs .order-lg-4{order:4}#conversejs .order-lg-5{order:5}#conversejs .order-lg-6{order:6}#conversejs .order-lg-7{order:7}#conversejs .order-lg-8{order:8}#conversejs .order-lg-9{order:9}#conversejs .order-lg-10{order:10}#conversejs .order-lg-11{order:11}#conversejs .order-lg-12{order:12}#conversejs .offset-lg-0{margin-left:0}#conversejs .offset-lg-1{margin-left:8.33333%}#conversejs .offset-lg-2{margin-left:16.66667%}#conversejs .offset-lg-3{margin-left:25%}#conversejs .offset-lg-4{margin-left:33.33333%}#conversejs .offset-lg-5{margin-left:41.66667%}#conversejs .offset-lg-6{margin-left:50%}#conversejs .offset-lg-7{margin-left:58.33333%}#conversejs .offset-lg-8{margin-left:66.66667%}#conversejs .offset-lg-9{margin-left:75%}#conversejs .offset-lg-10{margin-left:83.33333%}#conversejs .offset-lg-11{margin-left:91.66667%}}@media (min-width:1200px){#conversejs .col-xl{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-xl-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-xl-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-xl-3{flex:0 0 25%;max-width:25%}#conversejs .col-xl-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-xl-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-xl-6{flex:0 0 50%;max-width:50%}#conversejs .col-xl-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-xl-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-xl-9{flex:0 0 75%;max-width:75%}#conversejs .col-xl-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-xl-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-xl-12{flex:0 0 100%;max-width:100%}#conversejs .order-xl-first{order:-1}#conversejs .order-xl-last{order:13}#conversejs .order-xl-0{order:0}#conversejs .order-xl-1{order:1}#conversejs .order-xl-2{order:2}#conversejs .order-xl-3{order:3}#conversejs .order-xl-4{order:4}#conversejs .order-xl-5{order:5}#conversejs .order-xl-6{order:6}#conversejs .order-xl-7{order:7}#conversejs .order-xl-8{order:8}#conversejs .order-xl-9{order:9}#conversejs .order-xl-10{order:10}#conversejs .order-xl-11{order:11}#conversejs .order-xl-12{order:12}#conversejs .offset-xl-0{margin-left:0}#conversejs .offset-xl-1{margin-left:8.33333%}#conversejs .offset-xl-2{margin-left:16.66667%}#conversejs .offset-xl-3{margin-left:25%}#conversejs .offset-xl-4{margin-left:33.33333%}#conversejs .offset-xl-5{margin-left:41.66667%}#conversejs .offset-xl-6{margin-left:50%}#conversejs .offset-xl-7{margin-left:58.33333%}#conversejs .offset-xl-8{margin-left:66.66667%}#conversejs .offset-xl-9{margin-left:75%}#conversejs .offset-xl-10{margin-left:83.33333%}#conversejs .offset-xl-11{margin-left:91.66667%}}#conversejs .form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .form-control{transition:none}}#conversejs .form-control::-ms-expand{background-color:transparent;border:0}#conversejs .form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}#conversejs .form-control::-moz-placeholder{color:#6c757d;opacity:1}#conversejs .form-control:-ms-input-placeholder{color:#6c757d;opacity:1}#conversejs .form-control::-ms-input-placeholder{color:#6c757d;opacity:1}#conversejs .form-control::placeholder{color:#6c757d;opacity:1}#conversejs .form-control:disabled,#conversejs .form-control[readonly]{background-color:#e9ecef;opacity:1}#conversejs select.form-control:focus::-ms-value{color:#495057;background-color:#fff}#conversejs .form-control-file,#conversejs .form-control-range{display:block;width:100%}#conversejs .col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}#conversejs .col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}#conversejs .col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}#conversejs .form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}#conversejs .form-control-plaintext.form-control-lg,#conversejs .form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}#conversejs .form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}#conversejs .form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}#conversejs select.form-control[multiple],#conversejs select.form-control[size]{height:auto}#conversejs textarea.form-control{height:auto}#conversejs .form-group{margin-bottom:1rem}#conversejs .form-text{display:block;margin-top:.25rem}#conversejs .form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}#conversejs .form-row>.col,#conversejs .form-row>[class*=col-]{padding-right:5px;padding-left:5px}#conversejs .form-check{position:relative;display:block;padding-left:1.25rem}#conversejs .form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}#conversejs .form-check-input:disabled~.form-check-label{color:#6c757d}#conversejs .form-check-label{margin-bottom:0}#conversejs .form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}#conversejs .form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}#conversejs .valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}#conversejs .valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}#conversejs .form-control.is-valid,.was-validated #conversejs .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .form-control.is-valid:focus,.was-validated #conversejs .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .form-control.is-valid~.valid-feedback,#conversejs .form-control.is-valid~.valid-tooltip,.was-validated #conversejs .form-control:valid~.valid-feedback,.was-validated #conversejs .form-control:valid~.valid-tooltip{display:block}#conversejs textarea.form-control.is-valid,.was-validated #conversejs textarea.form-control:valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}#conversejs .custom-select.is-valid,.was-validated #conversejs .custom-select:valid{border-color:#28a745;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .custom-select.is-valid:focus,.was-validated #conversejs .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .custom-select.is-valid~.valid-feedback,#conversejs .custom-select.is-valid~.valid-tooltip,.was-validated #conversejs .custom-select:valid~.valid-feedback,.was-validated #conversejs .custom-select:valid~.valid-tooltip{display:block}#conversejs .form-control-file.is-valid~.valid-feedback,#conversejs .form-control-file.is-valid~.valid-tooltip,.was-validated #conversejs .form-control-file:valid~.valid-feedback,.was-validated #conversejs .form-control-file:valid~.valid-tooltip{display:block}#conversejs .form-check-input.is-valid~.form-check-label,.was-validated #conversejs .form-check-input:valid~.form-check-label{color:#28a745}#conversejs .form-check-input.is-valid~.valid-feedback,#conversejs .form-check-input.is-valid~.valid-tooltip,.was-validated #conversejs .form-check-input:valid~.valid-feedback,.was-validated #conversejs .form-check-input:valid~.valid-tooltip{display:block}#conversejs .custom-control-input.is-valid~.custom-control-label,.was-validated #conversejs .custom-control-input:valid~.custom-control-label{color:#28a745}#conversejs .custom-control-input.is-valid~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}#conversejs .custom-control-input.is-valid~.valid-feedback,#conversejs .custom-control-input.is-valid~.valid-tooltip,.was-validated #conversejs .custom-control-input:valid~.valid-feedback,.was-validated #conversejs .custom-control-input:valid~.valid-tooltip{display:block}#conversejs .custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}#conversejs .custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}#conversejs .custom-file-input.is-valid~.custom-file-label,.was-validated #conversejs .custom-file-input:valid~.custom-file-label{border-color:#28a745}#conversejs .custom-file-input.is-valid~.valid-feedback,#conversejs .custom-file-input.is-valid~.valid-tooltip,.was-validated #conversejs .custom-file-input:valid~.valid-feedback,.was-validated #conversejs .custom-file-input:valid~.valid-tooltip{display:block}#conversejs .custom-file-input.is-valid:focus~.custom-file-label,.was-validated #conversejs .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}#conversejs .invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}#conversejs .form-control.is-invalid,.was-validated #conversejs .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .form-control.is-invalid:focus,.was-validated #conversejs .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .form-control.is-invalid~.invalid-feedback,#conversejs .form-control.is-invalid~.invalid-tooltip,.was-validated #conversejs .form-control:invalid~.invalid-feedback,.was-validated #conversejs .form-control:invalid~.invalid-tooltip{display:block}#conversejs textarea.form-control.is-invalid,.was-validated #conversejs textarea.form-control:invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}#conversejs .custom-select.is-invalid,.was-validated #conversejs .custom-select:invalid{border-color:#dc3545;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .custom-select.is-invalid:focus,.was-validated #conversejs .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .custom-select.is-invalid~.invalid-feedback,#conversejs .custom-select.is-invalid~.invalid-tooltip,.was-validated #conversejs .custom-select:invalid~.invalid-feedback,.was-validated #conversejs .custom-select:invalid~.invalid-tooltip{display:block}#conversejs .form-control-file.is-invalid~.invalid-feedback,#conversejs .form-control-file.is-invalid~.invalid-tooltip,.was-validated #conversejs .form-control-file:invalid~.invalid-feedback,.was-validated #conversejs .form-control-file:invalid~.invalid-tooltip{display:block}#conversejs .form-check-input.is-invalid~.form-check-label,.was-validated #conversejs .form-check-input:invalid~.form-check-label{color:#dc3545}#conversejs .form-check-input.is-invalid~.invalid-feedback,#conversejs .form-check-input.is-invalid~.invalid-tooltip,.was-validated #conversejs .form-check-input:invalid~.invalid-feedback,.was-validated #conversejs .form-check-input:invalid~.invalid-tooltip{display:block}#conversejs .custom-control-input.is-invalid~.custom-control-label,.was-validated #conversejs .custom-control-input:invalid~.custom-control-label{color:#dc3545}#conversejs .custom-control-input.is-invalid~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}#conversejs .custom-control-input.is-invalid~.invalid-feedback,#conversejs .custom-control-input.is-invalid~.invalid-tooltip,.was-validated #conversejs .custom-control-input:invalid~.invalid-feedback,.was-validated #conversejs .custom-control-input:invalid~.invalid-tooltip{display:block}#conversejs .custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}#conversejs .custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}#conversejs .custom-file-input.is-invalid~.custom-file-label,.was-validated #conversejs .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}#conversejs .custom-file-input.is-invalid~.invalid-feedback,#conversejs .custom-file-input.is-invalid~.invalid-tooltip,.was-validated #conversejs .custom-file-input:invalid~.invalid-feedback,.was-validated #conversejs .custom-file-input:invalid~.invalid-tooltip{display:block}#conversejs .custom-file-input.is-invalid:focus~.custom-file-label,.was-validated #conversejs .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .form-inline{display:flex;flex-flow:row wrap;align-items:center}#conversejs .form-inline .form-check{width:100%}@media (min-width:576px){#conversejs .form-inline label{display:flex;align-items:center;justify-content:center;margin-bottom:0}#conversejs .form-inline .form-group{display:flex;flex:0 0 auto;flex-flow:row wrap;align-items:center;margin-bottom:0}#conversejs .form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}#conversejs .form-inline .form-control-plaintext{display:inline-block}#conversejs .form-inline .custom-select,#conversejs .form-inline .input-group{width:auto}#conversejs .form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}#conversejs .form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}#conversejs .form-inline .custom-control{align-items:center;justify-content:center}#conversejs .form-inline .custom-control-label{margin-bottom:0}}#conversejs .btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .btn{transition:none}}#conversejs .btn:hover{color:#212529;text-decoration:none}#conversejs .btn.focus,#conversejs .btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .btn.disabled,#conversejs .btn:disabled{opacity:.65}#conversejs a.btn.disabled,#conversejs fieldset:disabled a.btn{pointer-events:none}#conversejs .btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}#conversejs .btn-primary.focus,#conversejs .btn-primary:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}#conversejs .btn-primary.disabled,#conversejs .btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-primary:not(:disabled):not(.disabled).active,#conversejs .btn-primary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}#conversejs .btn-primary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-primary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}#conversejs .btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}#conversejs .btn-secondary.focus,#conversejs .btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}#conversejs .btn-secondary.disabled,#conversejs .btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-secondary:not(:disabled):not(.disabled).active,#conversejs .btn-secondary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}#conversejs .btn-secondary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-secondary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}#conversejs .btn-success{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}#conversejs .btn-success.focus,#conversejs .btn-success:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}#conversejs .btn-success.disabled,#conversejs .btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-success:not(:disabled):not(.disabled).active,#conversejs .btn-success:not(:disabled):not(.disabled):active,.show>#conversejs .btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}#conversejs .btn-success:not(:disabled):not(.disabled).active:focus,#conversejs .btn-success:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}#conversejs .btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}#conversejs .btn-info.focus,#conversejs .btn-info:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}#conversejs .btn-info.disabled,#conversejs .btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-info:not(:disabled):not(.disabled).active,#conversejs .btn-info:not(:disabled):not(.disabled):active,.show>#conversejs .btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}#conversejs .btn-info:not(:disabled):not(.disabled).active:focus,#conversejs .btn-info:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}#conversejs .btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}#conversejs .btn-warning.focus,#conversejs .btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}#conversejs .btn-warning.disabled,#conversejs .btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-warning:not(:disabled):not(.disabled).active,#conversejs .btn-warning:not(:disabled):not(.disabled):active,.show>#conversejs .btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}#conversejs .btn-warning:not(:disabled):not(.disabled).active:focus,#conversejs .btn-warning:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}#conversejs .btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}#conversejs .btn-danger.focus,#conversejs .btn-danger:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}#conversejs .btn-danger.disabled,#conversejs .btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-danger:not(:disabled):not(.disabled).active,#conversejs .btn-danger:not(:disabled):not(.disabled):active,.show>#conversejs .btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}#conversejs .btn-danger:not(:disabled):not(.disabled).active:focus,#conversejs .btn-danger:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}#conversejs .btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}#conversejs .btn-light.focus,#conversejs .btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}#conversejs .btn-light.disabled,#conversejs .btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-light:not(:disabled):not(.disabled).active,#conversejs .btn-light:not(:disabled):not(.disabled):active,.show>#conversejs .btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}#conversejs .btn-light:not(:disabled):not(.disabled).active:focus,#conversejs .btn-light:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}#conversejs .btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}#conversejs .btn-dark.focus,#conversejs .btn-dark:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}#conversejs .btn-dark.disabled,#conversejs .btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-dark:not(:disabled):not(.disabled).active,#conversejs .btn-dark:not(:disabled):not(.disabled):active,.show>#conversejs .btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}#conversejs .btn-dark:not(:disabled):not(.disabled).active:focus,#conversejs .btn-dark:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}#conversejs .btn-outline-primary{color:#007bff;border-color:#007bff}#conversejs .btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-outline-primary.focus,#conversejs .btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}#conversejs .btn-outline-primary.disabled,#conversejs .btn-outline-primary:disabled{color:#007bff;background-color:transparent}#conversejs .btn-outline-primary:not(:disabled):not(.disabled).active,#conversejs .btn-outline-primary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-outline-primary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}#conversejs .btn-outline-secondary{color:#6c757d;border-color:#6c757d}#conversejs .btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-outline-secondary.focus,#conversejs .btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}#conversejs .btn-outline-secondary.disabled,#conversejs .btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}#conversejs .btn-outline-secondary:not(:disabled):not(.disabled).active,#conversejs .btn-outline-secondary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-outline-secondary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}#conversejs .btn-outline-success{color:#28a745;border-color:#28a745}#conversejs .btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-outline-success.focus,#conversejs .btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}#conversejs .btn-outline-success.disabled,#conversejs .btn-outline-success:disabled{color:#28a745;background-color:transparent}#conversejs .btn-outline-success:not(:disabled):not(.disabled).active,#conversejs .btn-outline-success:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-outline-success:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}#conversejs .btn-outline-info{color:#17a2b8;border-color:#17a2b8}#conversejs .btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-outline-info.focus,#conversejs .btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}#conversejs .btn-outline-info.disabled,#conversejs .btn-outline-info:disabled{color:#17a2b8;background-color:transparent}#conversejs .btn-outline-info:not(:disabled):not(.disabled).active,#conversejs .btn-outline-info:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-outline-info:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}#conversejs .btn-outline-warning{color:#ffc107;border-color:#ffc107}#conversejs .btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-outline-warning.focus,#conversejs .btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}#conversejs .btn-outline-warning.disabled,#conversejs .btn-outline-warning:disabled{color:#ffc107;background-color:transparent}#conversejs .btn-outline-warning:not(:disabled):not(.disabled).active,#conversejs .btn-outline-warning:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-outline-warning:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}#conversejs .btn-outline-danger{color:#dc3545;border-color:#dc3545}#conversejs .btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-outline-danger.focus,#conversejs .btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}#conversejs .btn-outline-danger.disabled,#conversejs .btn-outline-danger:disabled{color:#dc3545;background-color:transparent}#conversejs .btn-outline-danger:not(:disabled):not(.disabled).active,#conversejs .btn-outline-danger:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-outline-danger:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}#conversejs .btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-outline-light.focus,#conversejs .btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}#conversejs .btn-outline-light.disabled,#conversejs .btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}#conversejs .btn-outline-light:not(:disabled):not(.disabled).active,#conversejs .btn-outline-light:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-outline-light:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}#conversejs .btn-outline-dark{color:#343a40;border-color:#343a40}#conversejs .btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-outline-dark.focus,#conversejs .btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}#conversejs .btn-outline-dark.disabled,#conversejs .btn-outline-dark:disabled{color:#343a40;background-color:transparent}#conversejs .btn-outline-dark:not(:disabled):not(.disabled).active,#conversejs .btn-outline-dark:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-outline-dark:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}#conversejs .btn-link{font-weight:400;color:#007bff;text-decoration:none}#conversejs .btn-link:hover{color:#0056b3;text-decoration:underline}#conversejs .btn-link.focus,#conversejs .btn-link:focus{text-decoration:underline;box-shadow:none}#conversejs .btn-link.disabled,#conversejs .btn-link:disabled{color:#6c757d;pointer-events:none}#conversejs .btn-group-lg>.btn,#conversejs .btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}#conversejs .btn-group-sm>.btn,#conversejs .btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}#conversejs .btn-block{display:block;width:100%}#conversejs .btn-block+.btn-block{margin-top:.5rem}#conversejs input[type=button].btn-block,#conversejs input[type=reset].btn-block,#conversejs input[type=submit].btn-block{width:100%}#conversejs .fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){#conversejs .fade{transition:none}}#conversejs .fade:not(.show){opacity:0}#conversejs .collapse:not(.show){display:none}#conversejs .collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){#conversejs .collapsing{transition:none}}#conversejs .dropdown,#conversejs .dropleft,#conversejs .dropright,#conversejs .dropup{position:relative}#conversejs .dropdown-toggle{white-space:nowrap}#conversejs .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}#conversejs .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}#conversejs .dropdown-menu-left{right:auto;left:0}#conversejs .dropdown-menu-right{right:0;left:auto}@media (min-width:576px){#conversejs .dropdown-menu-sm-left{right:auto;left:0}#conversejs .dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){#conversejs .dropdown-menu-md-left{right:auto;left:0}#conversejs .dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){#conversejs .dropdown-menu-lg-left{right:auto;left:0}#conversejs .dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){#conversejs .dropdown-menu-xl-left{right:auto;left:0}#conversejs .dropdown-menu-xl-right{right:0;left:auto}}#conversejs .dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}#conversejs .dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}#conversejs .dropup .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}#conversejs .dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}#conversejs .dropright .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropright .dropdown-toggle::after{vertical-align:0}#conversejs .dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}#conversejs .dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}#conversejs .dropleft .dropdown-toggle::after{display:none}#conversejs .dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}#conversejs .dropleft .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropleft .dropdown-toggle::before{vertical-align:0}#conversejs .dropdown-menu[x-placement^=bottom],#conversejs .dropdown-menu[x-placement^=left],#conversejs .dropdown-menu[x-placement^=right],#conversejs .dropdown-menu[x-placement^=top]{right:auto;bottom:auto}#conversejs .dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}#conversejs .dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}#conversejs .dropdown-item:focus,#conversejs .dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}#conversejs .dropdown-item.active,#conversejs .dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}#conversejs .dropdown-item.disabled,#conversejs .dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}#conversejs .dropdown-menu.show{display:block}#conversejs .dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}#conversejs .dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}#conversejs .btn-group,#conversejs .btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}#conversejs .btn-group-vertical>.btn,#conversejs .btn-group>.btn{position:relative;flex:1 1 auto}#conversejs .btn-group-vertical>.btn:hover,#conversejs .btn-group>.btn:hover{z-index:1}#conversejs .btn-group-vertical>.btn.active,#conversejs .btn-group-vertical>.btn:active,#conversejs .btn-group-vertical>.btn:focus,#conversejs .btn-group>.btn.active,#conversejs .btn-group>.btn:active,#conversejs .btn-group>.btn:focus{z-index:1}#conversejs .btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}#conversejs .btn-toolbar .input-group{width:auto}#conversejs .btn-group>.btn-group:not(:first-child),#conversejs .btn-group>.btn:not(:first-child){margin-left:-1px}#conversejs .btn-group>.btn-group:not(:last-child)>.btn,#conversejs .btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .btn-group>.btn-group:not(:first-child)>.btn,#conversejs .btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}#conversejs .dropdown-toggle-split::after,.dropright #conversejs .dropdown-toggle-split::after,.dropup #conversejs .dropdown-toggle-split::after{margin-left:0}.dropleft #conversejs .dropdown-toggle-split::before{margin-right:0}#conversejs .btn-group-sm>.btn+.dropdown-toggle-split,#conversejs .btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}#conversejs .btn-group-lg>.btn+.dropdown-toggle-split,#conversejs .btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}#conversejs .btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}#conversejs .btn-group-vertical>.btn,#conversejs .btn-group-vertical>.btn-group{width:100%}#conversejs .btn-group-vertical>.btn-group:not(:first-child),#conversejs .btn-group-vertical>.btn:not(:first-child){margin-top:-1px}#conversejs .btn-group-vertical>.btn-group:not(:last-child)>.btn,#conversejs .btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}#conversejs .btn-group-vertical>.btn-group:not(:first-child)>.btn,#conversejs .btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}#conversejs .btn-group-toggle>.btn,#conversejs .btn-group-toggle>.btn-group>.btn{margin-bottom:0}#conversejs .btn-group-toggle>.btn input[type=checkbox],#conversejs .btn-group-toggle>.btn input[type=radio],#conversejs .btn-group-toggle>.btn-group>.btn input[type=checkbox],#conversejs .btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}#conversejs .input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}#conversejs .input-group>.custom-file,#conversejs .input-group>.custom-select,#conversejs .input-group>.form-control,#conversejs .input-group>.form-control-plaintext{position:relative;flex:1 1 auto;width:1%;margin-bottom:0}#conversejs .input-group>.custom-file+.custom-file,#conversejs .input-group>.custom-file+.custom-select,#conversejs .input-group>.custom-file+.form-control,#conversejs .input-group>.custom-select+.custom-file,#conversejs .input-group>.custom-select+.custom-select,#conversejs .input-group>.custom-select+.form-control,#conversejs .input-group>.form-control+.custom-file,#conversejs .input-group>.form-control+.custom-select,#conversejs .input-group>.form-control+.form-control,#conversejs .input-group>.form-control-plaintext+.custom-file,#conversejs .input-group>.form-control-plaintext+.custom-select,#conversejs .input-group>.form-control-plaintext+.form-control{margin-left:-1px}#conversejs .input-group>.custom-file .custom-file-input:focus~.custom-file-label,#conversejs .input-group>.custom-select:focus,#conversejs .input-group>.form-control:focus{z-index:3}#conversejs .input-group>.custom-file .custom-file-input:focus{z-index:4}#conversejs .input-group>.custom-select:not(:last-child),#conversejs .input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .input-group>.custom-select:not(:first-child),#conversejs .input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .input-group>.custom-file{display:flex;align-items:center}#conversejs .input-group>.custom-file:not(:last-child) .custom-file-label,#conversejs .input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .input-group-append,#conversejs .input-group-prepend{display:flex}#conversejs .input-group-append .btn,#conversejs .input-group-prepend .btn{position:relative;z-index:2}#conversejs .input-group-append .btn:focus,#conversejs .input-group-prepend .btn:focus{z-index:3}#conversejs .input-group-append .btn+.btn,#conversejs .input-group-append .btn+.input-group-text,#conversejs .input-group-append .input-group-text+.btn,#conversejs .input-group-append .input-group-text+.input-group-text,#conversejs .input-group-prepend .btn+.btn,#conversejs .input-group-prepend .btn+.input-group-text,#conversejs .input-group-prepend .input-group-text+.btn,#conversejs .input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}#conversejs .input-group-prepend{margin-right:-1px}#conversejs .input-group-append{margin-left:-1px}#conversejs .input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}#conversejs .input-group-text input[type=checkbox],#conversejs .input-group-text input[type=radio]{margin-top:0}#conversejs .input-group-lg>.custom-select,#conversejs .input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}#conversejs .input-group-lg>.custom-select,#conversejs .input-group-lg>.form-control,#conversejs .input-group-lg>.input-group-append>.btn,#conversejs .input-group-lg>.input-group-append>.input-group-text,#conversejs .input-group-lg>.input-group-prepend>.btn,#conversejs .input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}#conversejs .input-group-sm>.custom-select,#conversejs .input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}#conversejs .input-group-sm>.custom-select,#conversejs .input-group-sm>.form-control,#conversejs .input-group-sm>.input-group-append>.btn,#conversejs .input-group-sm>.input-group-append>.input-group-text,#conversejs .input-group-sm>.input-group-prepend>.btn,#conversejs .input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}#conversejs .input-group-lg>.custom-select,#conversejs .input-group-sm>.custom-select{padding-right:1.75rem}#conversejs .input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),#conversejs .input-group>.input-group-append:last-child>.input-group-text:not(:last-child),#conversejs .input-group>.input-group-append:not(:last-child)>.btn,#conversejs .input-group>.input-group-append:not(:last-child)>.input-group-text,#conversejs .input-group>.input-group-prepend>.btn,#conversejs .input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .input-group>.input-group-append>.btn,#conversejs .input-group>.input-group-append>.input-group-text,#conversejs .input-group>.input-group-prepend:first-child>.btn:not(:first-child),#conversejs .input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),#conversejs .input-group>.input-group-prepend:not(:first-child)>.btn,#conversejs .input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}#conversejs .custom-control-inline{display:inline-flex;margin-right:1rem}#conversejs .custom-control-input{position:absolute;z-index:-1;opacity:0}#conversejs .custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}#conversejs .custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}#conversejs .custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}#conversejs .custom-control-input:disabled~.custom-control-label{color:#6c757d}#conversejs .custom-control-input:disabled~.custom-control-label::before{background-color:#e9ecef}#conversejs .custom-control-label{position:relative;margin-bottom:0;vertical-align:top}#conversejs .custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}#conversejs .custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:no-repeat 50%/50% 50%}#conversejs .custom-checkbox .custom-control-label::before{border-radius:.25rem}#conversejs .custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e")}#conversejs .custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}#conversejs .custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}#conversejs .custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-radio .custom-control-label::before{border-radius:50%}#conversejs .custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}#conversejs .custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-switch{padding-left:2.25rem}#conversejs .custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}#conversejs .custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .custom-switch .custom-control-label::after{transition:none}}#conversejs .custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;transform:translateX(.75rem)}#conversejs .custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}#conversejs .custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-select:focus::-ms-value{color:#495057;background-color:#fff}#conversejs .custom-select[multiple],#conversejs .custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}#conversejs .custom-select:disabled{color:#6c757d;background-color:#e9ecef}#conversejs .custom-select::-ms-expand{display:none}#conversejs .custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}#conversejs .custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}#conversejs .custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}#conversejs .custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;opacity:0}#conversejs .custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-file-input:disabled~.custom-file-label{background-color:#e9ecef}#conversejs .custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}#conversejs .custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}#conversejs .custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}#conversejs .custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}#conversejs .custom-range{width:100%;height:calc(1rem + .4rem);padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}#conversejs .custom-range:focus{outline:0}#conversejs .custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-range::-moz-focus-outer{border:0}#conversejs .custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){#conversejs .custom-range::-webkit-slider-thumb{transition:none}}#conversejs .custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}#conversejs .custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}#conversejs .custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){#conversejs .custom-range::-moz-range-thumb{transition:none}}#conversejs .custom-range::-moz-range-thumb:active{background-color:#b3d7ff}#conversejs .custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}#conversejs .custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){#conversejs .custom-range::-ms-thumb{transition:none}}#conversejs .custom-range::-ms-thumb:active{background-color:#b3d7ff}#conversejs .custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}#conversejs .custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}#conversejs .custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}#conversejs .custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}#conversejs .custom-range:disabled::-webkit-slider-runnable-track{cursor:default}#conversejs .custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}#conversejs .custom-range:disabled::-moz-range-track{cursor:default}#conversejs .custom-range:disabled::-ms-thumb{background-color:#adb5bd}#conversejs .custom-control-label::before,#conversejs .custom-file-label,#conversejs .custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .custom-control-label::before,#conversejs .custom-file-label,#conversejs .custom-select{transition:none}}#conversejs .nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}#conversejs .nav-link{display:block;padding:.5rem 1rem}#conversejs .nav-link:focus,#conversejs .nav-link:hover{text-decoration:none}#conversejs .nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}#conversejs .nav-tabs{border-bottom:1px solid #dee2e6}#conversejs .nav-tabs .nav-item{margin-bottom:-1px}#conversejs .nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}#conversejs .nav-tabs .nav-link:focus,#conversejs .nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}#conversejs .nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}#conversejs .nav-tabs .nav-item.show .nav-link,#conversejs .nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}#conversejs .nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}#conversejs .nav-pills .nav-link{border-radius:.25rem}#conversejs .nav-pills .nav-link.active,#conversejs .nav-pills .show>.nav-link{color:#fff;background-color:#007bff}#conversejs .nav-fill .nav-item{flex:1 1 auto;text-align:center}#conversejs .nav-justified .nav-item{flex-basis:0;flex-grow:1;text-align:center}#conversejs .tab-content>.tab-pane{display:none}#conversejs .tab-content>.active{display:block}#conversejs .badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .badge{transition:none}}a#conversejs .badge:focus,a#conversejs .badge:hover{text-decoration:none}#conversejs .badge:empty{display:none}#conversejs .btn .badge{position:relative;top:-1px}#conversejs .badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}#conversejs .badge-primary{color:#fff;background-color:#007bff}a#conversejs .badge-primary:focus,a#conversejs .badge-primary:hover{color:#fff;background-color:#0062cc}a#conversejs .badge-primary.focus,a#conversejs .badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}#conversejs .badge-secondary{color:#fff;background-color:#6c757d}a#conversejs .badge-secondary:focus,a#conversejs .badge-secondary:hover{color:#fff;background-color:#545b62}a#conversejs .badge-secondary.focus,a#conversejs .badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}#conversejs .badge-success{color:#fff;background-color:#28a745}a#conversejs .badge-success:focus,a#conversejs .badge-success:hover{color:#fff;background-color:#1e7e34}a#conversejs .badge-success.focus,a#conversejs .badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}#conversejs .badge-info{color:#fff;background-color:#17a2b8}a#conversejs .badge-info:focus,a#conversejs .badge-info:hover{color:#fff;background-color:#117a8b}a#conversejs .badge-info.focus,a#conversejs .badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}#conversejs .badge-warning{color:#212529;background-color:#ffc107}a#conversejs .badge-warning:focus,a#conversejs .badge-warning:hover{color:#212529;background-color:#d39e00}a#conversejs .badge-warning.focus,a#conversejs .badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}#conversejs .badge-danger{color:#fff;background-color:#dc3545}a#conversejs .badge-danger:focus,a#conversejs .badge-danger:hover{color:#fff;background-color:#bd2130}a#conversejs .badge-danger.focus,a#conversejs .badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}#conversejs .badge-light{color:#212529;background-color:#f8f9fa}a#conversejs .badge-light:focus,a#conversejs .badge-light:hover{color:#212529;background-color:#dae0e5}a#conversejs .badge-light.focus,a#conversejs .badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}#conversejs .badge-dark{color:#fff;background-color:#343a40}a#conversejs .badge-dark:focus,a#conversejs .badge-dark:hover{color:#fff;background-color:#1d2124}a#conversejs .badge-dark.focus,a#conversejs .badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}#conversejs .alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}#conversejs .alert-heading{color:inherit}#conversejs .alert-link{font-weight:700}#conversejs .alert-dismissible{padding-right:4rem}#conversejs .alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}#conversejs .alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}#conversejs .alert-primary hr{border-top-color:#9fcdff}#conversejs .alert-primary .alert-link{color:#002752}#conversejs .alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}#conversejs .alert-secondary hr{border-top-color:#c8cbcf}#conversejs .alert-secondary .alert-link{color:#202326}#conversejs .alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}#conversejs .alert-success hr{border-top-color:#b1dfbb}#conversejs .alert-success .alert-link{color:#0b2e13}#conversejs .alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}#conversejs .alert-info hr{border-top-color:#abdde5}#conversejs .alert-info .alert-link{color:#062c33}#conversejs .alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}#conversejs .alert-warning hr{border-top-color:#ffe8a1}#conversejs .alert-warning .alert-link{color:#533f03}#conversejs .alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}#conversejs .alert-danger hr{border-top-color:#f1b0b7}#conversejs .alert-danger .alert-link{color:#491217}#conversejs .alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}#conversejs .alert-light hr{border-top-color:#ececf6}#conversejs .alert-light .alert-link{color:#686868}#conversejs .alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}#conversejs .alert-dark hr{border-top-color:#b9bbbe}#conversejs .alert-dark .alert-link{color:#040505}#conversejs .media{display:flex;align-items:flex-start}#conversejs .media-body{flex:1}#conversejs .list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0}#conversejs .list-group-item-action{width:100%;color:#495057;text-align:inherit}#conversejs .list-group-item-action:focus,#conversejs .list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}#conversejs .list-group-item-action:active{color:#212529;background-color:#e9ecef}#conversejs .list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}#conversejs .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}#conversejs .list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}#conversejs .list-group-item.disabled,#conversejs .list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}#conversejs .list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .list-group-horizontal{flex-direction:row}#conversejs .list-group-horizontal .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}@media (min-width:576px){#conversejs .list-group-horizontal-sm{flex-direction:row}#conversejs .list-group-horizontal-sm .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-sm .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-sm .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:768px){#conversejs .list-group-horizontal-md{flex-direction:row}#conversejs .list-group-horizontal-md .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-md .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-md .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:992px){#conversejs .list-group-horizontal-lg{flex-direction:row}#conversejs .list-group-horizontal-lg .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-lg .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-lg .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:1200px){#conversejs .list-group-horizontal-xl{flex-direction:row}#conversejs .list-group-horizontal-xl .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-xl .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-xl .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}#conversejs .list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}#conversejs .list-group-flush .list-group-item:last-child{margin-bottom:-1px}#conversejs .list-group-flush:first-child .list-group-item:first-child{border-top:0}#conversejs .list-group-flush:last-child .list-group-item:last-child{margin-bottom:0;border-bottom:0}#conversejs .list-group-item-primary{color:#004085;background-color:#b8daff}#conversejs .list-group-item-primary.list-group-item-action:focus,#conversejs .list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}#conversejs .list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}#conversejs .list-group-item-secondary{color:#383d41;background-color:#d6d8db}#conversejs .list-group-item-secondary.list-group-item-action:focus,#conversejs .list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}#conversejs .list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}#conversejs .list-group-item-success{color:#155724;background-color:#c3e6cb}#conversejs .list-group-item-success.list-group-item-action:focus,#conversejs .list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}#conversejs .list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}#conversejs .list-group-item-info{color:#0c5460;background-color:#bee5eb}#conversejs .list-group-item-info.list-group-item-action:focus,#conversejs .list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}#conversejs .list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}#conversejs .list-group-item-warning{color:#856404;background-color:#ffeeba}#conversejs .list-group-item-warning.list-group-item-action:focus,#conversejs .list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}#conversejs .list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}#conversejs .list-group-item-danger{color:#721c24;background-color:#f5c6cb}#conversejs .list-group-item-danger.list-group-item-action:focus,#conversejs .list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}#conversejs .list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}#conversejs .list-group-item-light{color:#818182;background-color:#fdfdfe}#conversejs .list-group-item-light.list-group-item-action:focus,#conversejs .list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}#conversejs .list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}#conversejs .list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}#conversejs .list-group-item-dark.list-group-item-action:focus,#conversejs .list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}#conversejs .list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}#conversejs .close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}#conversejs .close:hover{color:#000;text-decoration:none}#conversejs .close:not(:disabled):not(.disabled):focus,#conversejs .close:not(:disabled):not(.disabled):hover{opacity:.75}#conversejs button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}#conversejs a.close.disabled{pointer-events:none}#conversejs .modal-open{overflow:hidden}#conversejs .modal-open .modal{overflow-x:hidden;overflow-y:auto}#conversejs .modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}#conversejs .modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade #conversejs .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade #conversejs .modal-dialog{transition:none}}.modal.show #conversejs .modal-dialog{transform:none}#conversejs .modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}#conversejs .modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}#conversejs .modal-dialog-scrollable .modal-footer,#conversejs .modal-dialog-scrollable .modal-header{flex-shrink:0}#conversejs .modal-dialog-scrollable .modal-body{overflow-y:auto}#conversejs .modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}#conversejs .modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);content:""}#conversejs .modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}#conversejs .modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}#conversejs .modal-dialog-centered.modal-dialog-scrollable::before{content:none}#conversejs .modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}#conversejs .modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}#conversejs .modal-backdrop.fade{opacity:0}#conversejs .modal-backdrop.show{opacity:.5}#conversejs .modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:.3rem;border-top-right-radius:.3rem}#conversejs .modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}#conversejs .modal-title{margin-bottom:0;line-height:1.5}#conversejs .modal-body{position:relative;flex:1 1 auto;padding:1rem}#conversejs .modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:.3rem;border-bottom-left-radius:.3rem}#conversejs .modal-footer>:not(:first-child){margin-left:.25rem}#conversejs .modal-footer>:not(:last-child){margin-right:.25rem}#conversejs .modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){#conversejs .modal-dialog{max-width:500px;margin:1.75rem auto}#conversejs .modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}#conversejs .modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}#conversejs .modal-dialog-centered{min-height:calc(100% - 3.5rem)}#conversejs .modal-dialog-centered::before{height:calc(100vh - 3.5rem)}#conversejs .modal-sm{max-width:300px}}@media (min-width:992px){#conversejs .modal-lg,#conversejs .modal-xl{max-width:800px}}@media (min-width:1200px){#conversejs .modal-xl{max-width:1140px}}#conversejs .tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}#conversejs .tooltip.show{opacity:.9}#conversejs .tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}#conversejs .tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}#conversejs .bs-tooltip-auto[x-placement^=top],#conversejs .bs-tooltip-top{padding:.4rem 0}#conversejs .bs-tooltip-auto[x-placement^=top] .arrow,#conversejs .bs-tooltip-top .arrow{bottom:0}#conversejs .bs-tooltip-auto[x-placement^=top] .arrow::before,#conversejs .bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}#conversejs .bs-tooltip-auto[x-placement^=right],#conversejs .bs-tooltip-right{padding:0 .4rem}#conversejs .bs-tooltip-auto[x-placement^=right] .arrow,#conversejs .bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}#conversejs .bs-tooltip-auto[x-placement^=right] .arrow::before,#conversejs .bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}#conversejs .bs-tooltip-auto[x-placement^=bottom],#conversejs .bs-tooltip-bottom{padding:.4rem 0}#conversejs .bs-tooltip-auto[x-placement^=bottom] .arrow,#conversejs .bs-tooltip-bottom .arrow{top:0}#conversejs .bs-tooltip-auto[x-placement^=bottom] .arrow::before,#conversejs .bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}#conversejs .bs-tooltip-auto[x-placement^=left],#conversejs .bs-tooltip-left{padding:0 .4rem}#conversejs .bs-tooltip-auto[x-placement^=left] .arrow,#conversejs .bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}#conversejs .bs-tooltip-auto[x-placement^=left] .arrow::before,#conversejs .bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}#conversejs .tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}#conversejs .popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}#conversejs .popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}#conversejs .popover .arrow::after,#conversejs .popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}#conversejs .bs-popover-auto[x-placement^=top],#conversejs .bs-popover-top{margin-bottom:.5rem}#conversejs .bs-popover-auto[x-placement^=top]>.arrow,#conversejs .bs-popover-top>.arrow{bottom:calc((.5rem + 1px) * -1)}#conversejs .bs-popover-auto[x-placement^=top]>.arrow::before,#conversejs .bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=top]>.arrow::after,#conversejs .bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}#conversejs .bs-popover-auto[x-placement^=right],#conversejs .bs-popover-right{margin-left:.5rem}#conversejs .bs-popover-auto[x-placement^=right]>.arrow,#conversejs .bs-popover-right>.arrow{left:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}#conversejs .bs-popover-auto[x-placement^=right]>.arrow::before,#conversejs .bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=right]>.arrow::after,#conversejs .bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}#conversejs .bs-popover-auto[x-placement^=bottom],#conversejs .bs-popover-bottom{margin-top:.5rem}#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow,#conversejs .bs-popover-bottom>.arrow{top:calc((.5rem + 1px) * -1)}#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow::before,#conversejs .bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow::after,#conversejs .bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}#conversejs .bs-popover-auto[x-placement^=bottom] .popover-header::before,#conversejs .bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}#conversejs .bs-popover-auto[x-placement^=left],#conversejs .bs-popover-left{margin-right:.5rem}#conversejs .bs-popover-auto[x-placement^=left]>.arrow,#conversejs .bs-popover-left>.arrow{right:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}#conversejs .bs-popover-auto[x-placement^=left]>.arrow::before,#conversejs .bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=left]>.arrow::after,#conversejs .bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}#conversejs .popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}#conversejs .popover-header:empty{display:none}#conversejs .popover-body{padding:.5rem .75rem;color:#212529}#conversejs .align-baseline{vertical-align:baseline!important}#conversejs .align-top{vertical-align:top!important}#conversejs .align-middle{vertical-align:middle!important}#conversejs .align-bottom{vertical-align:bottom!important}#conversejs .align-text-bottom{vertical-align:text-bottom!important}#conversejs .align-text-top{vertical-align:text-top!important}#conversejs .bg-primary{background-color:#007bff!important}#conversejs a.bg-primary:focus,#conversejs a.bg-primary:hover,#conversejs button.bg-primary:focus,#conversejs button.bg-primary:hover{background-color:#0062cc!important}#conversejs .bg-secondary{background-color:#6c757d!important}#conversejs a.bg-secondary:focus,#conversejs a.bg-secondary:hover,#conversejs button.bg-secondary:focus,#conversejs button.bg-secondary:hover{background-color:#545b62!important}#conversejs .bg-success{background-color:#28a745!important}#conversejs a.bg-success:focus,#conversejs a.bg-success:hover,#conversejs button.bg-success:focus,#conversejs button.bg-success:hover{background-color:#1e7e34!important}#conversejs .bg-info{background-color:#17a2b8!important}#conversejs a.bg-info:focus,#conversejs a.bg-info:hover,#conversejs button.bg-info:focus,#conversejs button.bg-info:hover{background-color:#117a8b!important}#conversejs .bg-warning{background-color:#ffc107!important}#conversejs a.bg-warning:focus,#conversejs a.bg-warning:hover,#conversejs button.bg-warning:focus,#conversejs button.bg-warning:hover{background-color:#d39e00!important}#conversejs .bg-danger{background-color:#dc3545!important}#conversejs a.bg-danger:focus,#conversejs a.bg-danger:hover,#conversejs button.bg-danger:focus,#conversejs button.bg-danger:hover{background-color:#bd2130!important}#conversejs .bg-light{background-color:#f8f9fa!important}#conversejs a.bg-light:focus,#conversejs a.bg-light:hover,#conversejs button.bg-light:focus,#conversejs button.bg-light:hover{background-color:#dae0e5!important}#conversejs .bg-dark{background-color:#343a40!important}#conversejs a.bg-dark:focus,#conversejs a.bg-dark:hover,#conversejs button.bg-dark:focus,#conversejs button.bg-dark:hover{background-color:#1d2124!important}#conversejs .bg-white{background-color:#fff!important}#conversejs .bg-transparent{background-color:transparent!important}#conversejs .border{border:1px solid #dee2e6!important}#conversejs .border-top{border-top:1px solid #dee2e6!important}#conversejs .border-right{border-right:1px solid #dee2e6!important}#conversejs .border-bottom{border-bottom:1px solid #dee2e6!important}#conversejs .border-left{border-left:1px solid #dee2e6!important}#conversejs .border-0{border:0!important}#conversejs .border-top-0{border-top:0!important}#conversejs .border-right-0{border-right:0!important}#conversejs .border-bottom-0{border-bottom:0!important}#conversejs .border-left-0{border-left:0!important}#conversejs .border-primary{border-color:#007bff!important}#conversejs .border-secondary{border-color:#6c757d!important}#conversejs .border-success{border-color:#28a745!important}#conversejs .border-info{border-color:#17a2b8!important}#conversejs .border-warning{border-color:#ffc107!important}#conversejs .border-danger{border-color:#dc3545!important}#conversejs .border-light{border-color:#f8f9fa!important}#conversejs .border-dark{border-color:#343a40!important}#conversejs .border-white{border-color:#fff!important}#conversejs .rounded-sm{border-radius:.2rem!important}#conversejs .rounded{border-radius:.25rem!important}#conversejs .rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}#conversejs .rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}#conversejs .rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}#conversejs .rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}#conversejs .rounded-lg{border-radius:.3rem!important}#conversejs .rounded-circle{border-radius:50%!important}#conversejs .rounded-pill{border-radius:50rem!important}#conversejs .rounded-0{border-radius:0!important}#conversejs .clearfix::after{display:block;clear:both;content:""}#conversejs .d-none{display:none!important}#conversejs .d-inline{display:inline!important}#conversejs .d-inline-block{display:inline-block!important}#conversejs .d-block{display:block!important}#conversejs .d-table{display:table!important}#conversejs .d-table-row{display:table-row!important}#conversejs .d-table-cell{display:table-cell!important}#conversejs .d-flex{display:flex!important}#conversejs .d-inline-flex{display:inline-flex!important}@media (min-width:576px){#conversejs .d-sm-none{display:none!important}#conversejs .d-sm-inline{display:inline!important}#conversejs .d-sm-inline-block{display:inline-block!important}#conversejs .d-sm-block{display:block!important}#conversejs .d-sm-table{display:table!important}#conversejs .d-sm-table-row{display:table-row!important}#conversejs .d-sm-table-cell{display:table-cell!important}#conversejs .d-sm-flex{display:flex!important}#conversejs .d-sm-inline-flex{display:inline-flex!important}}@media (min-width:768px){#conversejs .d-md-none{display:none!important}#conversejs .d-md-inline{display:inline!important}#conversejs .d-md-inline-block{display:inline-block!important}#conversejs .d-md-block{display:block!important}#conversejs .d-md-table{display:table!important}#conversejs .d-md-table-row{display:table-row!important}#conversejs .d-md-table-cell{display:table-cell!important}#conversejs .d-md-flex{display:flex!important}#conversejs .d-md-inline-flex{display:inline-flex!important}}@media (min-width:992px){#conversejs .d-lg-none{display:none!important}#conversejs .d-lg-inline{display:inline!important}#conversejs .d-lg-inline-block{display:inline-block!important}#conversejs .d-lg-block{display:block!important}#conversejs .d-lg-table{display:table!important}#conversejs .d-lg-table-row{display:table-row!important}#conversejs .d-lg-table-cell{display:table-cell!important}#conversejs .d-lg-flex{display:flex!important}#conversejs .d-lg-inline-flex{display:inline-flex!important}}@media (min-width:1200px){#conversejs .d-xl-none{display:none!important}#conversejs .d-xl-inline{display:inline!important}#conversejs .d-xl-inline-block{display:inline-block!important}#conversejs .d-xl-block{display:block!important}#conversejs .d-xl-table{display:table!important}#conversejs .d-xl-table-row{display:table-row!important}#conversejs .d-xl-table-cell{display:table-cell!important}#conversejs .d-xl-flex{display:flex!important}#conversejs .d-xl-inline-flex{display:inline-flex!important}}@media print{#conversejs .d-print-none{display:none!important}#conversejs .d-print-inline{display:inline!important}#conversejs .d-print-inline-block{display:inline-block!important}#conversejs .d-print-block{display:block!important}#conversejs .d-print-table{display:table!important}#conversejs .d-print-table-row{display:table-row!important}#conversejs .d-print-table-cell{display:table-cell!important}#conversejs .d-print-flex{display:flex!important}#conversejs .d-print-inline-flex{display:inline-flex!important}}#conversejs .embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}#conversejs .embed-responsive::before{display:block;content:""}#conversejs .embed-responsive .embed-responsive-item,#conversejs .embed-responsive embed,#conversejs .embed-responsive iframe,#conversejs .embed-responsive object,#conversejs .embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}#conversejs .embed-responsive-21by9::before{padding-top:42.85714%}#conversejs .embed-responsive-16by9::before{padding-top:56.25%}#conversejs .embed-responsive-4by3::before{padding-top:75%}#conversejs .embed-responsive-1by1::before{padding-top:100%}#conversejs .flex-row{flex-direction:row!important}#conversejs .flex-column{flex-direction:column!important}#conversejs .flex-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-wrap{flex-wrap:wrap!important}#conversejs .flex-nowrap{flex-wrap:nowrap!important}#conversejs .flex-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-fill{flex:1 1 auto!important}#conversejs .flex-grow-0{flex-grow:0!important}#conversejs .flex-grow-1{flex-grow:1!important}#conversejs .flex-shrink-0{flex-shrink:0!important}#conversejs .flex-shrink-1{flex-shrink:1!important}#conversejs .justify-content-start{justify-content:flex-start!important}#conversejs .justify-content-end{justify-content:flex-end!important}#conversejs .justify-content-center{justify-content:center!important}#conversejs .justify-content-between{justify-content:space-between!important}#conversejs .justify-content-around{justify-content:space-around!important}#conversejs .align-items-start{align-items:flex-start!important}#conversejs .align-items-end{align-items:flex-end!important}#conversejs .align-items-center{align-items:center!important}#conversejs .align-items-baseline{align-items:baseline!important}#conversejs .align-items-stretch{align-items:stretch!important}#conversejs .align-content-start{align-content:flex-start!important}#conversejs .align-content-end{align-content:flex-end!important}#conversejs .align-content-center{align-content:center!important}#conversejs .align-content-between{align-content:space-between!important}#conversejs .align-content-around{align-content:space-around!important}#conversejs .align-content-stretch{align-content:stretch!important}#conversejs .align-self-auto{align-self:auto!important}#conversejs .align-self-start{align-self:flex-start!important}#conversejs .align-self-end{align-self:flex-end!important}#conversejs .align-self-center{align-self:center!important}#conversejs .align-self-baseline{align-self:baseline!important}#conversejs .align-self-stretch{align-self:stretch!important}@media (min-width:576px){#conversejs .flex-sm-row{flex-direction:row!important}#conversejs .flex-sm-column{flex-direction:column!important}#conversejs .flex-sm-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-sm-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-sm-wrap{flex-wrap:wrap!important}#conversejs .flex-sm-nowrap{flex-wrap:nowrap!important}#conversejs .flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-sm-fill{flex:1 1 auto!important}#conversejs .flex-sm-grow-0{flex-grow:0!important}#conversejs .flex-sm-grow-1{flex-grow:1!important}#conversejs .flex-sm-shrink-0{flex-shrink:0!important}#conversejs .flex-sm-shrink-1{flex-shrink:1!important}#conversejs .justify-content-sm-start{justify-content:flex-start!important}#conversejs .justify-content-sm-end{justify-content:flex-end!important}#conversejs .justify-content-sm-center{justify-content:center!important}#conversejs .justify-content-sm-between{justify-content:space-between!important}#conversejs .justify-content-sm-around{justify-content:space-around!important}#conversejs .align-items-sm-start{align-items:flex-start!important}#conversejs .align-items-sm-end{align-items:flex-end!important}#conversejs .align-items-sm-center{align-items:center!important}#conversejs .align-items-sm-baseline{align-items:baseline!important}#conversejs .align-items-sm-stretch{align-items:stretch!important}#conversejs .align-content-sm-start{align-content:flex-start!important}#conversejs .align-content-sm-end{align-content:flex-end!important}#conversejs .align-content-sm-center{align-content:center!important}#conversejs .align-content-sm-between{align-content:space-between!important}#conversejs .align-content-sm-around{align-content:space-around!important}#conversejs .align-content-sm-stretch{align-content:stretch!important}#conversejs .align-self-sm-auto{align-self:auto!important}#conversejs .align-self-sm-start{align-self:flex-start!important}#conversejs .align-self-sm-end{align-self:flex-end!important}#conversejs .align-self-sm-center{align-self:center!important}#conversejs .align-self-sm-baseline{align-self:baseline!important}#conversejs .align-self-sm-stretch{align-self:stretch!important}}@media (min-width:768px){#conversejs .flex-md-row{flex-direction:row!important}#conversejs .flex-md-column{flex-direction:column!important}#conversejs .flex-md-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-md-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-md-wrap{flex-wrap:wrap!important}#conversejs .flex-md-nowrap{flex-wrap:nowrap!important}#conversejs .flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-md-fill{flex:1 1 auto!important}#conversejs .flex-md-grow-0{flex-grow:0!important}#conversejs .flex-md-grow-1{flex-grow:1!important}#conversejs .flex-md-shrink-0{flex-shrink:0!important}#conversejs .flex-md-shrink-1{flex-shrink:1!important}#conversejs .justify-content-md-start{justify-content:flex-start!important}#conversejs .justify-content-md-end{justify-content:flex-end!important}#conversejs .justify-content-md-center{justify-content:center!important}#conversejs .justify-content-md-between{justify-content:space-between!important}#conversejs .justify-content-md-around{justify-content:space-around!important}#conversejs .align-items-md-start{align-items:flex-start!important}#conversejs .align-items-md-end{align-items:flex-end!important}#conversejs .align-items-md-center{align-items:center!important}#conversejs .align-items-md-baseline{align-items:baseline!important}#conversejs .align-items-md-stretch{align-items:stretch!important}#conversejs .align-content-md-start{align-content:flex-start!important}#conversejs .align-content-md-end{align-content:flex-end!important}#conversejs .align-content-md-center{align-content:center!important}#conversejs .align-content-md-between{align-content:space-between!important}#conversejs .align-content-md-around{align-content:space-around!important}#conversejs .align-content-md-stretch{align-content:stretch!important}#conversejs .align-self-md-auto{align-self:auto!important}#conversejs .align-self-md-start{align-self:flex-start!important}#conversejs .align-self-md-end{align-self:flex-end!important}#conversejs .align-self-md-center{align-self:center!important}#conversejs .align-self-md-baseline{align-self:baseline!important}#conversejs .align-self-md-stretch{align-self:stretch!important}}@media (min-width:992px){#conversejs .flex-lg-row{flex-direction:row!important}#conversejs .flex-lg-column{flex-direction:column!important}#conversejs .flex-lg-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-lg-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-lg-wrap{flex-wrap:wrap!important}#conversejs .flex-lg-nowrap{flex-wrap:nowrap!important}#conversejs .flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-lg-fill{flex:1 1 auto!important}#conversejs .flex-lg-grow-0{flex-grow:0!important}#conversejs .flex-lg-grow-1{flex-grow:1!important}#conversejs .flex-lg-shrink-0{flex-shrink:0!important}#conversejs .flex-lg-shrink-1{flex-shrink:1!important}#conversejs .justify-content-lg-start{justify-content:flex-start!important}#conversejs .justify-content-lg-end{justify-content:flex-end!important}#conversejs .justify-content-lg-center{justify-content:center!important}#conversejs .justify-content-lg-between{justify-content:space-between!important}#conversejs .justify-content-lg-around{justify-content:space-around!important}#conversejs .align-items-lg-start{align-items:flex-start!important}#conversejs .align-items-lg-end{align-items:flex-end!important}#conversejs .align-items-lg-center{align-items:center!important}#conversejs .align-items-lg-baseline{align-items:baseline!important}#conversejs .align-items-lg-stretch{align-items:stretch!important}#conversejs .align-content-lg-start{align-content:flex-start!important}#conversejs .align-content-lg-end{align-content:flex-end!important}#conversejs .align-content-lg-center{align-content:center!important}#conversejs .align-content-lg-between{align-content:space-between!important}#conversejs .align-content-lg-around{align-content:space-around!important}#conversejs .align-content-lg-stretch{align-content:stretch!important}#conversejs .align-self-lg-auto{align-self:auto!important}#conversejs .align-self-lg-start{align-self:flex-start!important}#conversejs .align-self-lg-end{align-self:flex-end!important}#conversejs .align-self-lg-center{align-self:center!important}#conversejs .align-self-lg-baseline{align-self:baseline!important}#conversejs .align-self-lg-stretch{align-self:stretch!important}}@media (min-width:1200px){#conversejs .flex-xl-row{flex-direction:row!important}#conversejs .flex-xl-column{flex-direction:column!important}#conversejs .flex-xl-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-xl-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-xl-wrap{flex-wrap:wrap!important}#conversejs .flex-xl-nowrap{flex-wrap:nowrap!important}#conversejs .flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-xl-fill{flex:1 1 auto!important}#conversejs .flex-xl-grow-0{flex-grow:0!important}#conversejs .flex-xl-grow-1{flex-grow:1!important}#conversejs .flex-xl-shrink-0{flex-shrink:0!important}#conversejs .flex-xl-shrink-1{flex-shrink:1!important}#conversejs .justify-content-xl-start{justify-content:flex-start!important}#conversejs .justify-content-xl-end{justify-content:flex-end!important}#conversejs .justify-content-xl-center{justify-content:center!important}#conversejs .justify-content-xl-between{justify-content:space-between!important}#conversejs .justify-content-xl-around{justify-content:space-around!important}#conversejs .align-items-xl-start{align-items:flex-start!important}#conversejs .align-items-xl-end{align-items:flex-end!important}#conversejs .align-items-xl-center{align-items:center!important}#conversejs .align-items-xl-baseline{align-items:baseline!important}#conversejs .align-items-xl-stretch{align-items:stretch!important}#conversejs .align-content-xl-start{align-content:flex-start!important}#conversejs .align-content-xl-end{align-content:flex-end!important}#conversejs .align-content-xl-center{align-content:center!important}#conversejs .align-content-xl-between{align-content:space-between!important}#conversejs .align-content-xl-around{align-content:space-around!important}#conversejs .align-content-xl-stretch{align-content:stretch!important}#conversejs .align-self-xl-auto{align-self:auto!important}#conversejs .align-self-xl-start{align-self:flex-start!important}#conversejs .align-self-xl-end{align-self:flex-end!important}#conversejs .align-self-xl-center{align-self:center!important}#conversejs .align-self-xl-baseline{align-self:baseline!important}#conversejs .align-self-xl-stretch{align-self:stretch!important}}#conversejs .float-left{float:left!important}#conversejs .float-right{float:right!important}#conversejs .float-none{float:none!important}@media (min-width:576px){#conversejs .float-sm-left{float:left!important}#conversejs .float-sm-right{float:right!important}#conversejs .float-sm-none{float:none!important}}@media (min-width:768px){#conversejs .float-md-left{float:left!important}#conversejs .float-md-right{float:right!important}#conversejs .float-md-none{float:none!important}}@media (min-width:992px){#conversejs .float-lg-left{float:left!important}#conversejs .float-lg-right{float:right!important}#conversejs .float-lg-none{float:none!important}}@media (min-width:1200px){#conversejs .float-xl-left{float:left!important}#conversejs .float-xl-right{float:right!important}#conversejs .float-xl-none{float:none!important}}#conversejs .overflow-auto{overflow:auto!important}#conversejs .overflow-hidden{overflow:hidden!important}#conversejs .position-static{position:static!important}#conversejs .position-relative{position:relative!important}#conversejs .position-absolute{position:absolute!important}#conversejs .position-fixed{position:fixed!important}#conversejs .position-sticky{position:-webkit-sticky!important;position:sticky!important}#conversejs .fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}#conversejs .fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){#conversejs .sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}#conversejs .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#conversejs .sr-only-focusable:active,#conversejs .sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}#conversejs .shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}#conversejs .shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}#conversejs .shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}#conversejs .shadow-none{box-shadow:none!important}#conversejs .w-25{width:25%!important}#conversejs .w-50{width:50%!important}#conversejs .w-75{width:75%!important}#conversejs .w-100{width:100%!important}#conversejs .w-auto{width:auto!important}#conversejs .h-25{height:25%!important}#conversejs .h-50{height:50%!important}#conversejs .h-75{height:75%!important}#conversejs .h-100{height:100%!important}#conversejs .h-auto{height:auto!important}#conversejs .mw-100{max-width:100%!important}#conversejs .mh-100{max-height:100%!important}#conversejs .min-vw-100{min-width:100vw!important}#conversejs .min-vh-100{min-height:100vh!important}#conversejs .vw-100{width:100vw!important}#conversejs .vh-100{height:100vh!important}#conversejs .stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}#conversejs .m-0{margin:0!important}#conversejs .mt-0,#conversejs .my-0{margin-top:0!important}#conversejs .mr-0,#conversejs .mx-0{margin-right:0!important}#conversejs .mb-0,#conversejs .my-0{margin-bottom:0!important}#conversejs .ml-0,#conversejs .mx-0{margin-left:0!important}#conversejs .m-1{margin:.25rem!important}#conversejs .mt-1,#conversejs .my-1{margin-top:.25rem!important}#conversejs .mr-1,#conversejs .mx-1{margin-right:.25rem!important}#conversejs .mb-1,#conversejs .my-1{margin-bottom:.25rem!important}#conversejs .ml-1,#conversejs .mx-1{margin-left:.25rem!important}#conversejs .m-2{margin:.5rem!important}#conversejs .mt-2,#conversejs .my-2{margin-top:.5rem!important}#conversejs .mr-2,#conversejs .mx-2{margin-right:.5rem!important}#conversejs .mb-2,#conversejs .my-2{margin-bottom:.5rem!important}#conversejs .ml-2,#conversejs .mx-2{margin-left:.5rem!important}#conversejs .m-3{margin:1rem!important}#conversejs .mt-3,#conversejs .my-3{margin-top:1rem!important}#conversejs .mr-3,#conversejs .mx-3{margin-right:1rem!important}#conversejs .mb-3,#conversejs .my-3{margin-bottom:1rem!important}#conversejs .ml-3,#conversejs .mx-3{margin-left:1rem!important}#conversejs .m-4{margin:1.5rem!important}#conversejs .mt-4,#conversejs .my-4{margin-top:1.5rem!important}#conversejs .mr-4,#conversejs .mx-4{margin-right:1.5rem!important}#conversejs .mb-4,#conversejs .my-4{margin-bottom:1.5rem!important}#conversejs .ml-4,#conversejs .mx-4{margin-left:1.5rem!important}#conversejs .m-5{margin:3rem!important}#conversejs .mt-5,#conversejs .my-5{margin-top:3rem!important}#conversejs .mr-5,#conversejs .mx-5{margin-right:3rem!important}#conversejs .mb-5,#conversejs .my-5{margin-bottom:3rem!important}#conversejs .ml-5,#conversejs .mx-5{margin-left:3rem!important}#conversejs .p-0{padding:0!important}#conversejs .pt-0,#conversejs .py-0{padding-top:0!important}#conversejs .pr-0,#conversejs .px-0{padding-right:0!important}#conversejs .pb-0,#conversejs .py-0{padding-bottom:0!important}#conversejs .pl-0,#conversejs .px-0{padding-left:0!important}#conversejs .p-1{padding:.25rem!important}#conversejs .pt-1,#conversejs .py-1{padding-top:.25rem!important}#conversejs .pr-1,#conversejs .px-1{padding-right:.25rem!important}#conversejs .pb-1,#conversejs .py-1{padding-bottom:.25rem!important}#conversejs .pl-1,#conversejs .px-1{padding-left:.25rem!important}#conversejs .p-2{padding:.5rem!important}#conversejs .pt-2,#conversejs .py-2{padding-top:.5rem!important}#conversejs .pr-2,#conversejs .px-2{padding-right:.5rem!important}#conversejs .pb-2,#conversejs .py-2{padding-bottom:.5rem!important}#conversejs .pl-2,#conversejs .px-2{padding-left:.5rem!important}#conversejs .p-3{padding:1rem!important}#conversejs .pt-3,#conversejs .py-3{padding-top:1rem!important}#conversejs .pr-3,#conversejs .px-3{padding-right:1rem!important}#conversejs .pb-3,#conversejs .py-3{padding-bottom:1rem!important}#conversejs .pl-3,#conversejs .px-3{padding-left:1rem!important}#conversejs .p-4{padding:1.5rem!important}#conversejs .pt-4,#conversejs .py-4{padding-top:1.5rem!important}#conversejs .pr-4,#conversejs .px-4{padding-right:1.5rem!important}#conversejs .pb-4,#conversejs .py-4{padding-bottom:1.5rem!important}#conversejs .pl-4,#conversejs .px-4{padding-left:1.5rem!important}#conversejs .p-5{padding:3rem!important}#conversejs .pt-5,#conversejs .py-5{padding-top:3rem!important}#conversejs .pr-5,#conversejs .px-5{padding-right:3rem!important}#conversejs .pb-5,#conversejs .py-5{padding-bottom:3rem!important}#conversejs .pl-5,#conversejs .px-5{padding-left:3rem!important}#conversejs .m-n1{margin:-.25rem!important}#conversejs .mt-n1,#conversejs .my-n1{margin-top:-.25rem!important}#conversejs .mr-n1,#conversejs .mx-n1{margin-right:-.25rem!important}#conversejs .mb-n1,#conversejs .my-n1{margin-bottom:-.25rem!important}#conversejs .ml-n1,#conversejs .mx-n1{margin-left:-.25rem!important}#conversejs .m-n2{margin:-.5rem!important}#conversejs .mt-n2,#conversejs .my-n2{margin-top:-.5rem!important}#conversejs .mr-n2,#conversejs .mx-n2{margin-right:-.5rem!important}#conversejs .mb-n2,#conversejs .my-n2{margin-bottom:-.5rem!important}#conversejs .ml-n2,#conversejs .mx-n2{margin-left:-.5rem!important}#conversejs .m-n3{margin:-1rem!important}#conversejs .mt-n3,#conversejs .my-n3{margin-top:-1rem!important}#conversejs .mr-n3,#conversejs .mx-n3{margin-right:-1rem!important}#conversejs .mb-n3,#conversejs .my-n3{margin-bottom:-1rem!important}#conversejs .ml-n3,#conversejs .mx-n3{margin-left:-1rem!important}#conversejs .m-n4{margin:-1.5rem!important}#conversejs .mt-n4,#conversejs .my-n4{margin-top:-1.5rem!important}#conversejs .mr-n4,#conversejs .mx-n4{margin-right:-1.5rem!important}#conversejs .mb-n4,#conversejs .my-n4{margin-bottom:-1.5rem!important}#conversejs .ml-n4,#conversejs .mx-n4{margin-left:-1.5rem!important}#conversejs .m-n5{margin:-3rem!important}#conversejs .mt-n5,#conversejs .my-n5{margin-top:-3rem!important}#conversejs .mr-n5,#conversejs .mx-n5{margin-right:-3rem!important}#conversejs .mb-n5,#conversejs .my-n5{margin-bottom:-3rem!important}#conversejs .ml-n5,#conversejs .mx-n5{margin-left:-3rem!important}#conversejs .m-auto{margin:auto!important}#conversejs .mt-auto,#conversejs .my-auto{margin-top:auto!important}#conversejs .mr-auto,#conversejs .mx-auto{margin-right:auto!important}#conversejs .mb-auto,#conversejs .my-auto{margin-bottom:auto!important}#conversejs .ml-auto,#conversejs .mx-auto{margin-left:auto!important}@media (min-width:576px){#conversejs .m-sm-0{margin:0!important}#conversejs .mt-sm-0,#conversejs .my-sm-0{margin-top:0!important}#conversejs .mr-sm-0,#conversejs .mx-sm-0{margin-right:0!important}#conversejs .mb-sm-0,#conversejs .my-sm-0{margin-bottom:0!important}#conversejs .ml-sm-0,#conversejs .mx-sm-0{margin-left:0!important}#conversejs .m-sm-1{margin:.25rem!important}#conversejs .mt-sm-1,#conversejs .my-sm-1{margin-top:.25rem!important}#conversejs .mr-sm-1,#conversejs .mx-sm-1{margin-right:.25rem!important}#conversejs .mb-sm-1,#conversejs .my-sm-1{margin-bottom:.25rem!important}#conversejs .ml-sm-1,#conversejs .mx-sm-1{margin-left:.25rem!important}#conversejs .m-sm-2{margin:.5rem!important}#conversejs .mt-sm-2,#conversejs .my-sm-2{margin-top:.5rem!important}#conversejs .mr-sm-2,#conversejs .mx-sm-2{margin-right:.5rem!important}#conversejs .mb-sm-2,#conversejs .my-sm-2{margin-bottom:.5rem!important}#conversejs .ml-sm-2,#conversejs .mx-sm-2{margin-left:.5rem!important}#conversejs .m-sm-3{margin:1rem!important}#conversejs .mt-sm-3,#conversejs .my-sm-3{margin-top:1rem!important}#conversejs .mr-sm-3,#conversejs .mx-sm-3{margin-right:1rem!important}#conversejs .mb-sm-3,#conversejs .my-sm-3{margin-bottom:1rem!important}#conversejs .ml-sm-3,#conversejs .mx-sm-3{margin-left:1rem!important}#conversejs .m-sm-4{margin:1.5rem!important}#conversejs .mt-sm-4,#conversejs .my-sm-4{margin-top:1.5rem!important}#conversejs .mr-sm-4,#conversejs .mx-sm-4{margin-right:1.5rem!important}#conversejs .mb-sm-4,#conversejs .my-sm-4{margin-bottom:1.5rem!important}#conversejs .ml-sm-4,#conversejs .mx-sm-4{margin-left:1.5rem!important}#conversejs .m-sm-5{margin:3rem!important}#conversejs .mt-sm-5,#conversejs .my-sm-5{margin-top:3rem!important}#conversejs .mr-sm-5,#conversejs .mx-sm-5{margin-right:3rem!important}#conversejs .mb-sm-5,#conversejs .my-sm-5{margin-bottom:3rem!important}#conversejs .ml-sm-5,#conversejs .mx-sm-5{margin-left:3rem!important}#conversejs .p-sm-0{padding:0!important}#conversejs .pt-sm-0,#conversejs .py-sm-0{padding-top:0!important}#conversejs .pr-sm-0,#conversejs .px-sm-0{padding-right:0!important}#conversejs .pb-sm-0,#conversejs .py-sm-0{padding-bottom:0!important}#conversejs .pl-sm-0,#conversejs .px-sm-0{padding-left:0!important}#conversejs .p-sm-1{padding:.25rem!important}#conversejs .pt-sm-1,#conversejs .py-sm-1{padding-top:.25rem!important}#conversejs .pr-sm-1,#conversejs .px-sm-1{padding-right:.25rem!important}#conversejs .pb-sm-1,#conversejs .py-sm-1{padding-bottom:.25rem!important}#conversejs .pl-sm-1,#conversejs .px-sm-1{padding-left:.25rem!important}#conversejs .p-sm-2{padding:.5rem!important}#conversejs .pt-sm-2,#conversejs .py-sm-2{padding-top:.5rem!important}#conversejs .pr-sm-2,#conversejs .px-sm-2{padding-right:.5rem!important}#conversejs .pb-sm-2,#conversejs .py-sm-2{padding-bottom:.5rem!important}#conversejs .pl-sm-2,#conversejs .px-sm-2{padding-left:.5rem!important}#conversejs .p-sm-3{padding:1rem!important}#conversejs .pt-sm-3,#conversejs .py-sm-3{padding-top:1rem!important}#conversejs .pr-sm-3,#conversejs .px-sm-3{padding-right:1rem!important}#conversejs .pb-sm-3,#conversejs .py-sm-3{padding-bottom:1rem!important}#conversejs .pl-sm-3,#conversejs .px-sm-3{padding-left:1rem!important}#conversejs .p-sm-4{padding:1.5rem!important}#conversejs .pt-sm-4,#conversejs .py-sm-4{padding-top:1.5rem!important}#conversejs .pr-sm-4,#conversejs .px-sm-4{padding-right:1.5rem!important}#conversejs .pb-sm-4,#conversejs .py-sm-4{padding-bottom:1.5rem!important}#conversejs .pl-sm-4,#conversejs .px-sm-4{padding-left:1.5rem!important}#conversejs .p-sm-5{padding:3rem!important}#conversejs .pt-sm-5,#conversejs .py-sm-5{padding-top:3rem!important}#conversejs .pr-sm-5,#conversejs .px-sm-5{padding-right:3rem!important}#conversejs .pb-sm-5,#conversejs .py-sm-5{padding-bottom:3rem!important}#conversejs .pl-sm-5,#conversejs .px-sm-5{padding-left:3rem!important}#conversejs .m-sm-n1{margin:-.25rem!important}#conversejs .mt-sm-n1,#conversejs .my-sm-n1{margin-top:-.25rem!important}#conversejs .mr-sm-n1,#conversejs .mx-sm-n1{margin-right:-.25rem!important}#conversejs .mb-sm-n1,#conversejs .my-sm-n1{margin-bottom:-.25rem!important}#conversejs .ml-sm-n1,#conversejs .mx-sm-n1{margin-left:-.25rem!important}#conversejs .m-sm-n2{margin:-.5rem!important}#conversejs .mt-sm-n2,#conversejs .my-sm-n2{margin-top:-.5rem!important}#conversejs .mr-sm-n2,#conversejs .mx-sm-n2{margin-right:-.5rem!important}#conversejs .mb-sm-n2,#conversejs .my-sm-n2{margin-bottom:-.5rem!important}#conversejs .ml-sm-n2,#conversejs .mx-sm-n2{margin-left:-.5rem!important}#conversejs .m-sm-n3{margin:-1rem!important}#conversejs .mt-sm-n3,#conversejs .my-sm-n3{margin-top:-1rem!important}#conversejs .mr-sm-n3,#conversejs .mx-sm-n3{margin-right:-1rem!important}#conversejs .mb-sm-n3,#conversejs .my-sm-n3{margin-bottom:-1rem!important}#conversejs .ml-sm-n3,#conversejs .mx-sm-n3{margin-left:-1rem!important}#conversejs .m-sm-n4{margin:-1.5rem!important}#conversejs .mt-sm-n4,#conversejs .my-sm-n4{margin-top:-1.5rem!important}#conversejs .mr-sm-n4,#conversejs .mx-sm-n4{margin-right:-1.5rem!important}#conversejs .mb-sm-n4,#conversejs .my-sm-n4{margin-bottom:-1.5rem!important}#conversejs .ml-sm-n4,#conversejs .mx-sm-n4{margin-left:-1.5rem!important}#conversejs .m-sm-n5{margin:-3rem!important}#conversejs .mt-sm-n5,#conversejs .my-sm-n5{margin-top:-3rem!important}#conversejs .mr-sm-n5,#conversejs .mx-sm-n5{margin-right:-3rem!important}#conversejs .mb-sm-n5,#conversejs .my-sm-n5{margin-bottom:-3rem!important}#conversejs .ml-sm-n5,#conversejs .mx-sm-n5{margin-left:-3rem!important}#conversejs .m-sm-auto{margin:auto!important}#conversejs .mt-sm-auto,#conversejs .my-sm-auto{margin-top:auto!important}#conversejs .mr-sm-auto,#conversejs .mx-sm-auto{margin-right:auto!important}#conversejs .mb-sm-auto,#conversejs .my-sm-auto{margin-bottom:auto!important}#conversejs .ml-sm-auto,#conversejs .mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){#conversejs .m-md-0{margin:0!important}#conversejs .mt-md-0,#conversejs .my-md-0{margin-top:0!important}#conversejs .mr-md-0,#conversejs .mx-md-0{margin-right:0!important}#conversejs .mb-md-0,#conversejs .my-md-0{margin-bottom:0!important}#conversejs .ml-md-0,#conversejs .mx-md-0{margin-left:0!important}#conversejs .m-md-1{margin:.25rem!important}#conversejs .mt-md-1,#conversejs .my-md-1{margin-top:.25rem!important}#conversejs .mr-md-1,#conversejs .mx-md-1{margin-right:.25rem!important}#conversejs .mb-md-1,#conversejs .my-md-1{margin-bottom:.25rem!important}#conversejs .ml-md-1,#conversejs .mx-md-1{margin-left:.25rem!important}#conversejs .m-md-2{margin:.5rem!important}#conversejs .mt-md-2,#conversejs .my-md-2{margin-top:.5rem!important}#conversejs .mr-md-2,#conversejs .mx-md-2{margin-right:.5rem!important}#conversejs .mb-md-2,#conversejs .my-md-2{margin-bottom:.5rem!important}#conversejs .ml-md-2,#conversejs .mx-md-2{margin-left:.5rem!important}#conversejs .m-md-3{margin:1rem!important}#conversejs .mt-md-3,#conversejs .my-md-3{margin-top:1rem!important}#conversejs .mr-md-3,#conversejs .mx-md-3{margin-right:1rem!important}#conversejs .mb-md-3,#conversejs .my-md-3{margin-bottom:1rem!important}#conversejs .ml-md-3,#conversejs .mx-md-3{margin-left:1rem!important}#conversejs .m-md-4{margin:1.5rem!important}#conversejs .mt-md-4,#conversejs .my-md-4{margin-top:1.5rem!important}#conversejs .mr-md-4,#conversejs .mx-md-4{margin-right:1.5rem!important}#conversejs .mb-md-4,#conversejs .my-md-4{margin-bottom:1.5rem!important}#conversejs .ml-md-4,#conversejs .mx-md-4{margin-left:1.5rem!important}#conversejs .m-md-5{margin:3rem!important}#conversejs .mt-md-5,#conversejs .my-md-5{margin-top:3rem!important}#conversejs .mr-md-5,#conversejs .mx-md-5{margin-right:3rem!important}#conversejs .mb-md-5,#conversejs .my-md-5{margin-bottom:3rem!important}#conversejs .ml-md-5,#conversejs .mx-md-5{margin-left:3rem!important}#conversejs .p-md-0{padding:0!important}#conversejs .pt-md-0,#conversejs .py-md-0{padding-top:0!important}#conversejs .pr-md-0,#conversejs .px-md-0{padding-right:0!important}#conversejs .pb-md-0,#conversejs .py-md-0{padding-bottom:0!important}#conversejs .pl-md-0,#conversejs .px-md-0{padding-left:0!important}#conversejs .p-md-1{padding:.25rem!important}#conversejs .pt-md-1,#conversejs .py-md-1{padding-top:.25rem!important}#conversejs .pr-md-1,#conversejs .px-md-1{padding-right:.25rem!important}#conversejs .pb-md-1,#conversejs .py-md-1{padding-bottom:.25rem!important}#conversejs .pl-md-1,#conversejs .px-md-1{padding-left:.25rem!important}#conversejs .p-md-2{padding:.5rem!important}#conversejs .pt-md-2,#conversejs .py-md-2{padding-top:.5rem!important}#conversejs .pr-md-2,#conversejs .px-md-2{padding-right:.5rem!important}#conversejs .pb-md-2,#conversejs .py-md-2{padding-bottom:.5rem!important}#conversejs .pl-md-2,#conversejs .px-md-2{padding-left:.5rem!important}#conversejs .p-md-3{padding:1rem!important}#conversejs .pt-md-3,#conversejs .py-md-3{padding-top:1rem!important}#conversejs .pr-md-3,#conversejs .px-md-3{padding-right:1rem!important}#conversejs .pb-md-3,#conversejs .py-md-3{padding-bottom:1rem!important}#conversejs .pl-md-3,#conversejs .px-md-3{padding-left:1rem!important}#conversejs .p-md-4{padding:1.5rem!important}#conversejs .pt-md-4,#conversejs .py-md-4{padding-top:1.5rem!important}#conversejs .pr-md-4,#conversejs .px-md-4{padding-right:1.5rem!important}#conversejs .pb-md-4,#conversejs .py-md-4{padding-bottom:1.5rem!important}#conversejs .pl-md-4,#conversejs .px-md-4{padding-left:1.5rem!important}#conversejs .p-md-5{padding:3rem!important}#conversejs .pt-md-5,#conversejs .py-md-5{padding-top:3rem!important}#conversejs .pr-md-5,#conversejs .px-md-5{padding-right:3rem!important}#conversejs .pb-md-5,#conversejs .py-md-5{padding-bottom:3rem!important}#conversejs .pl-md-5,#conversejs .px-md-5{padding-left:3rem!important}#conversejs .m-md-n1{margin:-.25rem!important}#conversejs .mt-md-n1,#conversejs .my-md-n1{margin-top:-.25rem!important}#conversejs .mr-md-n1,#conversejs .mx-md-n1{margin-right:-.25rem!important}#conversejs .mb-md-n1,#conversejs .my-md-n1{margin-bottom:-.25rem!important}#conversejs .ml-md-n1,#conversejs .mx-md-n1{margin-left:-.25rem!important}#conversejs .m-md-n2{margin:-.5rem!important}#conversejs .mt-md-n2,#conversejs .my-md-n2{margin-top:-.5rem!important}#conversejs .mr-md-n2,#conversejs .mx-md-n2{margin-right:-.5rem!important}#conversejs .mb-md-n2,#conversejs .my-md-n2{margin-bottom:-.5rem!important}#conversejs .ml-md-n2,#conversejs .mx-md-n2{margin-left:-.5rem!important}#conversejs .m-md-n3{margin:-1rem!important}#conversejs .mt-md-n3,#conversejs .my-md-n3{margin-top:-1rem!important}#conversejs .mr-md-n3,#conversejs .mx-md-n3{margin-right:-1rem!important}#conversejs .mb-md-n3,#conversejs .my-md-n3{margin-bottom:-1rem!important}#conversejs .ml-md-n3,#conversejs .mx-md-n3{margin-left:-1rem!important}#conversejs .m-md-n4{margin:-1.5rem!important}#conversejs .mt-md-n4,#conversejs .my-md-n4{margin-top:-1.5rem!important}#conversejs .mr-md-n4,#conversejs .mx-md-n4{margin-right:-1.5rem!important}#conversejs .mb-md-n4,#conversejs .my-md-n4{margin-bottom:-1.5rem!important}#conversejs .ml-md-n4,#conversejs .mx-md-n4{margin-left:-1.5rem!important}#conversejs .m-md-n5{margin:-3rem!important}#conversejs .mt-md-n5,#conversejs .my-md-n5{margin-top:-3rem!important}#conversejs .mr-md-n5,#conversejs .mx-md-n5{margin-right:-3rem!important}#conversejs .mb-md-n5,#conversejs .my-md-n5{margin-bottom:-3rem!important}#conversejs .ml-md-n5,#conversejs .mx-md-n5{margin-left:-3rem!important}#conversejs .m-md-auto{margin:auto!important}#conversejs .mt-md-auto,#conversejs .my-md-auto{margin-top:auto!important}#conversejs .mr-md-auto,#conversejs .mx-md-auto{margin-right:auto!important}#conversejs .mb-md-auto,#conversejs .my-md-auto{margin-bottom:auto!important}#conversejs .ml-md-auto,#conversejs .mx-md-auto{margin-left:auto!important}}@media (min-width:992px){#conversejs .m-lg-0{margin:0!important}#conversejs .mt-lg-0,#conversejs .my-lg-0{margin-top:0!important}#conversejs .mr-lg-0,#conversejs .mx-lg-0{margin-right:0!important}#conversejs .mb-lg-0,#conversejs .my-lg-0{margin-bottom:0!important}#conversejs .ml-lg-0,#conversejs .mx-lg-0{margin-left:0!important}#conversejs .m-lg-1{margin:.25rem!important}#conversejs .mt-lg-1,#conversejs .my-lg-1{margin-top:.25rem!important}#conversejs .mr-lg-1,#conversejs .mx-lg-1{margin-right:.25rem!important}#conversejs .mb-lg-1,#conversejs .my-lg-1{margin-bottom:.25rem!important}#conversejs .ml-lg-1,#conversejs .mx-lg-1{margin-left:.25rem!important}#conversejs .m-lg-2{margin:.5rem!important}#conversejs .mt-lg-2,#conversejs .my-lg-2{margin-top:.5rem!important}#conversejs .mr-lg-2,#conversejs .mx-lg-2{margin-right:.5rem!important}#conversejs .mb-lg-2,#conversejs .my-lg-2{margin-bottom:.5rem!important}#conversejs .ml-lg-2,#conversejs .mx-lg-2{margin-left:.5rem!important}#conversejs .m-lg-3{margin:1rem!important}#conversejs .mt-lg-3,#conversejs .my-lg-3{margin-top:1rem!important}#conversejs .mr-lg-3,#conversejs .mx-lg-3{margin-right:1rem!important}#conversejs .mb-lg-3,#conversejs .my-lg-3{margin-bottom:1rem!important}#conversejs .ml-lg-3,#conversejs .mx-lg-3{margin-left:1rem!important}#conversejs .m-lg-4{margin:1.5rem!important}#conversejs .mt-lg-4,#conversejs .my-lg-4{margin-top:1.5rem!important}#conversejs .mr-lg-4,#conversejs .mx-lg-4{margin-right:1.5rem!important}#conversejs .mb-lg-4,#conversejs .my-lg-4{margin-bottom:1.5rem!important}#conversejs .ml-lg-4,#conversejs .mx-lg-4{margin-left:1.5rem!important}#conversejs .m-lg-5{margin:3rem!important}#conversejs .mt-lg-5,#conversejs .my-lg-5{margin-top:3rem!important}#conversejs .mr-lg-5,#conversejs .mx-lg-5{margin-right:3rem!important}#conversejs .mb-lg-5,#conversejs .my-lg-5{margin-bottom:3rem!important}#conversejs .ml-lg-5,#conversejs .mx-lg-5{margin-left:3rem!important}#conversejs .p-lg-0{padding:0!important}#conversejs .pt-lg-0,#conversejs .py-lg-0{padding-top:0!important}#conversejs .pr-lg-0,#conversejs .px-lg-0{padding-right:0!important}#conversejs .pb-lg-0,#conversejs .py-lg-0{padding-bottom:0!important}#conversejs .pl-lg-0,#conversejs .px-lg-0{padding-left:0!important}#conversejs .p-lg-1{padding:.25rem!important}#conversejs .pt-lg-1,#conversejs .py-lg-1{padding-top:.25rem!important}#conversejs .pr-lg-1,#conversejs .px-lg-1{padding-right:.25rem!important}#conversejs .pb-lg-1,#conversejs .py-lg-1{padding-bottom:.25rem!important}#conversejs .pl-lg-1,#conversejs .px-lg-1{padding-left:.25rem!important}#conversejs .p-lg-2{padding:.5rem!important}#conversejs .pt-lg-2,#conversejs .py-lg-2{padding-top:.5rem!important}#conversejs .pr-lg-2,#conversejs .px-lg-2{padding-right:.5rem!important}#conversejs .pb-lg-2,#conversejs .py-lg-2{padding-bottom:.5rem!important}#conversejs .pl-lg-2,#conversejs .px-lg-2{padding-left:.5rem!important}#conversejs .p-lg-3{padding:1rem!important}#conversejs .pt-lg-3,#conversejs .py-lg-3{padding-top:1rem!important}#conversejs .pr-lg-3,#conversejs .px-lg-3{padding-right:1rem!important}#conversejs .pb-lg-3,#conversejs .py-lg-3{padding-bottom:1rem!important}#conversejs .pl-lg-3,#conversejs .px-lg-3{padding-left:1rem!important}#conversejs .p-lg-4{padding:1.5rem!important}#conversejs .pt-lg-4,#conversejs .py-lg-4{padding-top:1.5rem!important}#conversejs .pr-lg-4,#conversejs .px-lg-4{padding-right:1.5rem!important}#conversejs .pb-lg-4,#conversejs .py-lg-4{padding-bottom:1.5rem!important}#conversejs .pl-lg-4,#conversejs .px-lg-4{padding-left:1.5rem!important}#conversejs .p-lg-5{padding:3rem!important}#conversejs .pt-lg-5,#conversejs .py-lg-5{padding-top:3rem!important}#conversejs .pr-lg-5,#conversejs .px-lg-5{padding-right:3rem!important}#conversejs .pb-lg-5,#conversejs .py-lg-5{padding-bottom:3rem!important}#conversejs .pl-lg-5,#conversejs .px-lg-5{padding-left:3rem!important}#conversejs .m-lg-n1{margin:-.25rem!important}#conversejs .mt-lg-n1,#conversejs .my-lg-n1{margin-top:-.25rem!important}#conversejs .mr-lg-n1,#conversejs .mx-lg-n1{margin-right:-.25rem!important}#conversejs .mb-lg-n1,#conversejs .my-lg-n1{margin-bottom:-.25rem!important}#conversejs .ml-lg-n1,#conversejs .mx-lg-n1{margin-left:-.25rem!important}#conversejs .m-lg-n2{margin:-.5rem!important}#conversejs .mt-lg-n2,#conversejs .my-lg-n2{margin-top:-.5rem!important}#conversejs .mr-lg-n2,#conversejs .mx-lg-n2{margin-right:-.5rem!important}#conversejs .mb-lg-n2,#conversejs .my-lg-n2{margin-bottom:-.5rem!important}#conversejs .ml-lg-n2,#conversejs .mx-lg-n2{margin-left:-.5rem!important}#conversejs .m-lg-n3{margin:-1rem!important}#conversejs .mt-lg-n3,#conversejs .my-lg-n3{margin-top:-1rem!important}#conversejs .mr-lg-n3,#conversejs .mx-lg-n3{margin-right:-1rem!important}#conversejs .mb-lg-n3,#conversejs .my-lg-n3{margin-bottom:-1rem!important}#conversejs .ml-lg-n3,#conversejs .mx-lg-n3{margin-left:-1rem!important}#conversejs .m-lg-n4{margin:-1.5rem!important}#conversejs .mt-lg-n4,#conversejs .my-lg-n4{margin-top:-1.5rem!important}#conversejs .mr-lg-n4,#conversejs .mx-lg-n4{margin-right:-1.5rem!important}#conversejs .mb-lg-n4,#conversejs .my-lg-n4{margin-bottom:-1.5rem!important}#conversejs .ml-lg-n4,#conversejs .mx-lg-n4{margin-left:-1.5rem!important}#conversejs .m-lg-n5{margin:-3rem!important}#conversejs .mt-lg-n5,#conversejs .my-lg-n5{margin-top:-3rem!important}#conversejs .mr-lg-n5,#conversejs .mx-lg-n5{margin-right:-3rem!important}#conversejs .mb-lg-n5,#conversejs .my-lg-n5{margin-bottom:-3rem!important}#conversejs .ml-lg-n5,#conversejs .mx-lg-n5{margin-left:-3rem!important}#conversejs .m-lg-auto{margin:auto!important}#conversejs .mt-lg-auto,#conversejs .my-lg-auto{margin-top:auto!important}#conversejs .mr-lg-auto,#conversejs .mx-lg-auto{margin-right:auto!important}#conversejs .mb-lg-auto,#conversejs .my-lg-auto{margin-bottom:auto!important}#conversejs .ml-lg-auto,#conversejs .mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){#conversejs .m-xl-0{margin:0!important}#conversejs .mt-xl-0,#conversejs .my-xl-0{margin-top:0!important}#conversejs .mr-xl-0,#conversejs .mx-xl-0{margin-right:0!important}#conversejs .mb-xl-0,#conversejs .my-xl-0{margin-bottom:0!important}#conversejs .ml-xl-0,#conversejs .mx-xl-0{margin-left:0!important}#conversejs .m-xl-1{margin:.25rem!important}#conversejs .mt-xl-1,#conversejs .my-xl-1{margin-top:.25rem!important}#conversejs .mr-xl-1,#conversejs .mx-xl-1{margin-right:.25rem!important}#conversejs .mb-xl-1,#conversejs .my-xl-1{margin-bottom:.25rem!important}#conversejs .ml-xl-1,#conversejs .mx-xl-1{margin-left:.25rem!important}#conversejs .m-xl-2{margin:.5rem!important}#conversejs .mt-xl-2,#conversejs .my-xl-2{margin-top:.5rem!important}#conversejs .mr-xl-2,#conversejs .mx-xl-2{margin-right:.5rem!important}#conversejs .mb-xl-2,#conversejs .my-xl-2{margin-bottom:.5rem!important}#conversejs .ml-xl-2,#conversejs .mx-xl-2{margin-left:.5rem!important}#conversejs .m-xl-3{margin:1rem!important}#conversejs .mt-xl-3,#conversejs .my-xl-3{margin-top:1rem!important}#conversejs .mr-xl-3,#conversejs .mx-xl-3{margin-right:1rem!important}#conversejs .mb-xl-3,#conversejs .my-xl-3{margin-bottom:1rem!important}#conversejs .ml-xl-3,#conversejs .mx-xl-3{margin-left:1rem!important}#conversejs .m-xl-4{margin:1.5rem!important}#conversejs .mt-xl-4,#conversejs .my-xl-4{margin-top:1.5rem!important}#conversejs .mr-xl-4,#conversejs .mx-xl-4{margin-right:1.5rem!important}#conversejs .mb-xl-4,#conversejs .my-xl-4{margin-bottom:1.5rem!important}#conversejs .ml-xl-4,#conversejs .mx-xl-4{margin-left:1.5rem!important}#conversejs .m-xl-5{margin:3rem!important}#conversejs .mt-xl-5,#conversejs .my-xl-5{margin-top:3rem!important}#conversejs .mr-xl-5,#conversejs .mx-xl-5{margin-right:3rem!important}#conversejs .mb-xl-5,#conversejs .my-xl-5{margin-bottom:3rem!important}#conversejs .ml-xl-5,#conversejs .mx-xl-5{margin-left:3rem!important}#conversejs .p-xl-0{padding:0!important}#conversejs .pt-xl-0,#conversejs .py-xl-0{padding-top:0!important}#conversejs .pr-xl-0,#conversejs .px-xl-0{padding-right:0!important}#conversejs .pb-xl-0,#conversejs .py-xl-0{padding-bottom:0!important}#conversejs .pl-xl-0,#conversejs .px-xl-0{padding-left:0!important}#conversejs .p-xl-1{padding:.25rem!important}#conversejs .pt-xl-1,#conversejs .py-xl-1{padding-top:.25rem!important}#conversejs .pr-xl-1,#conversejs .px-xl-1{padding-right:.25rem!important}#conversejs .pb-xl-1,#conversejs .py-xl-1{padding-bottom:.25rem!important}#conversejs .pl-xl-1,#conversejs .px-xl-1{padding-left:.25rem!important}#conversejs .p-xl-2{padding:.5rem!important}#conversejs .pt-xl-2,#conversejs .py-xl-2{padding-top:.5rem!important}#conversejs .pr-xl-2,#conversejs .px-xl-2{padding-right:.5rem!important}#conversejs .pb-xl-2,#conversejs .py-xl-2{padding-bottom:.5rem!important}#conversejs .pl-xl-2,#conversejs .px-xl-2{padding-left:.5rem!important}#conversejs .p-xl-3{padding:1rem!important}#conversejs .pt-xl-3,#conversejs .py-xl-3{padding-top:1rem!important}#conversejs .pr-xl-3,#conversejs .px-xl-3{padding-right:1rem!important}#conversejs .pb-xl-3,#conversejs .py-xl-3{padding-bottom:1rem!important}#conversejs .pl-xl-3,#conversejs .px-xl-3{padding-left:1rem!important}#conversejs .p-xl-4{padding:1.5rem!important}#conversejs .pt-xl-4,#conversejs .py-xl-4{padding-top:1.5rem!important}#conversejs .pr-xl-4,#conversejs .px-xl-4{padding-right:1.5rem!important}#conversejs .pb-xl-4,#conversejs .py-xl-4{padding-bottom:1.5rem!important}#conversejs .pl-xl-4,#conversejs .px-xl-4{padding-left:1.5rem!important}#conversejs .p-xl-5{padding:3rem!important}#conversejs .pt-xl-5,#conversejs .py-xl-5{padding-top:3rem!important}#conversejs .pr-xl-5,#conversejs .px-xl-5{padding-right:3rem!important}#conversejs .pb-xl-5,#conversejs .py-xl-5{padding-bottom:3rem!important}#conversejs .pl-xl-5,#conversejs .px-xl-5{padding-left:3rem!important}#conversejs .m-xl-n1{margin:-.25rem!important}#conversejs .mt-xl-n1,#conversejs .my-xl-n1{margin-top:-.25rem!important}#conversejs .mr-xl-n1,#conversejs .mx-xl-n1{margin-right:-.25rem!important}#conversejs .mb-xl-n1,#conversejs .my-xl-n1{margin-bottom:-.25rem!important}#conversejs .ml-xl-n1,#conversejs .mx-xl-n1{margin-left:-.25rem!important}#conversejs .m-xl-n2{margin:-.5rem!important}#conversejs .mt-xl-n2,#conversejs .my-xl-n2{margin-top:-.5rem!important}#conversejs .mr-xl-n2,#conversejs .mx-xl-n2{margin-right:-.5rem!important}#conversejs .mb-xl-n2,#conversejs .my-xl-n2{margin-bottom:-.5rem!important}#conversejs .ml-xl-n2,#conversejs .mx-xl-n2{margin-left:-.5rem!important}#conversejs .m-xl-n3{margin:-1rem!important}#conversejs .mt-xl-n3,#conversejs .my-xl-n3{margin-top:-1rem!important}#conversejs .mr-xl-n3,#conversejs .mx-xl-n3{margin-right:-1rem!important}#conversejs .mb-xl-n3,#conversejs .my-xl-n3{margin-bottom:-1rem!important}#conversejs .ml-xl-n3,#conversejs .mx-xl-n3{margin-left:-1rem!important}#conversejs .m-xl-n4{margin:-1.5rem!important}#conversejs .mt-xl-n4,#conversejs .my-xl-n4{margin-top:-1.5rem!important}#conversejs .mr-xl-n4,#conversejs .mx-xl-n4{margin-right:-1.5rem!important}#conversejs .mb-xl-n4,#conversejs .my-xl-n4{margin-bottom:-1.5rem!important}#conversejs .ml-xl-n4,#conversejs .mx-xl-n4{margin-left:-1.5rem!important}#conversejs .m-xl-n5{margin:-3rem!important}#conversejs .mt-xl-n5,#conversejs .my-xl-n5{margin-top:-3rem!important}#conversejs .mr-xl-n5,#conversejs .mx-xl-n5{margin-right:-3rem!important}#conversejs .mb-xl-n5,#conversejs .my-xl-n5{margin-bottom:-3rem!important}#conversejs .ml-xl-n5,#conversejs .mx-xl-n5{margin-left:-3rem!important}#conversejs .m-xl-auto{margin:auto!important}#conversejs .mt-xl-auto,#conversejs .my-xl-auto{margin-top:auto!important}#conversejs .mr-xl-auto,#conversejs .mx-xl-auto{margin-right:auto!important}#conversejs .mb-xl-auto,#conversejs .my-xl-auto{margin-bottom:auto!important}#conversejs .ml-xl-auto,#conversejs .mx-xl-auto{margin-left:auto!important}}#conversejs .text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}#conversejs .text-justify{text-align:justify!important}#conversejs .text-wrap{white-space:normal!important}#conversejs .text-nowrap{white-space:nowrap!important}#conversejs .text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#conversejs .text-left{text-align:left!important}#conversejs .text-right{text-align:right!important}#conversejs .text-center{text-align:center!important}@media (min-width:576px){#conversejs .text-sm-left{text-align:left!important}#conversejs .text-sm-right{text-align:right!important}#conversejs .text-sm-center{text-align:center!important}}@media (min-width:768px){#conversejs .text-md-left{text-align:left!important}#conversejs .text-md-right{text-align:right!important}#conversejs .text-md-center{text-align:center!important}}@media (min-width:992px){#conversejs .text-lg-left{text-align:left!important}#conversejs .text-lg-right{text-align:right!important}#conversejs .text-lg-center{text-align:center!important}}@media (min-width:1200px){#conversejs .text-xl-left{text-align:left!important}#conversejs .text-xl-right{text-align:right!important}#conversejs .text-xl-center{text-align:center!important}}#conversejs .text-lowercase{text-transform:lowercase!important}#conversejs .text-uppercase{text-transform:uppercase!important}#conversejs .text-capitalize{text-transform:capitalize!important}#conversejs .font-weight-light{font-weight:300!important}#conversejs .font-weight-lighter{font-weight:lighter!important}#conversejs .font-weight-normal{font-weight:400!important}#conversejs .font-weight-bold{font-weight:700!important}#conversejs .font-weight-bolder{font-weight:bolder!important}#conversejs .font-italic{font-style:italic!important}#conversejs .text-white{color:#fff!important}#conversejs .text-primary{color:#007bff!important}#conversejs a.text-primary:focus,#conversejs a.text-primary:hover{color:#0056b3!important}#conversejs .text-secondary{color:#6c757d!important}#conversejs a.text-secondary:focus,#conversejs a.text-secondary:hover{color:#494f54!important}#conversejs .text-success{color:#28a745!important}#conversejs a.text-success:focus,#conversejs a.text-success:hover{color:#19692c!important}#conversejs .text-info{color:#17a2b8!important}#conversejs a.text-info:focus,#conversejs a.text-info:hover{color:#0f6674!important}#conversejs .text-warning{color:#ffc107!important}#conversejs a.text-warning:focus,#conversejs a.text-warning:hover{color:#ba8b00!important}#conversejs .text-danger{color:#dc3545!important}#conversejs a.text-danger:focus,#conversejs a.text-danger:hover{color:#a71d2a!important}#conversejs .text-light{color:#f8f9fa!important}#conversejs a.text-light:focus,#conversejs a.text-light:hover{color:#cbd3da!important}#conversejs .text-dark{color:#343a40!important}#conversejs a.text-dark:focus,#conversejs a.text-dark:hover{color:#121416!important}#conversejs .text-body{color:#212529!important}#conversejs .text-muted{color:#6c757d!important}#conversejs .text-black-50{color:rgba(0,0,0,.5)!important}#conversejs .text-white-50{color:rgba(255,255,255,.5)!important}#conversejs .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}#conversejs .text-decoration-none{text-decoration:none!important}#conversejs .text-break{word-break:break-word!important;overflow-wrap:break-word!important}#conversejs .text-reset{color:inherit!important}#conversejs .visible{visibility:visible!important}#conversejs .invisible{visibility:hidden!important}@font-face{font-family:Baumans;font-style:normal;font-weight:400;src:local("Baumans Regular"),local("Baumans-Regular"),url(webfonts/baumans.ttf) format("truetype")}@font-face{font-family:Muli;font-style:normal;font-weight:400;src:local("Muli Regular"),local("Muli-Regular"),url(webfonts/muli.ttf) format("truetype")}@font-face{font-family:ConverseFontAwesomeBrands;font-style:normal;font-weight:400;src:url(webfonts/fa-brands-400.eot);src:url(webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-brands-400.woff2) format("woff2"),url(webfonts/fa-brands-400.woff) format("woff"),url(webfonts/fa-brands-400.ttf) format("truetype"),url(webfonts/fa-brands-400.svg#fontawesome) format("svg")}@font-face{font-family:ConverseFontAwesomeRegular;font-style:normal;font-weight:400;src:url(webfonts/fa-regular-400.eot);src:url(webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-regular-400.woff2) format("woff2"),url(webfonts/fa-regular-400.woff) format("woff"),url(webfonts/fa-regular-400.ttf) format("truetype"),url(webfonts/fa-regular-400.svg#fontawesome) format("svg");font-weight:400;font-style:normal}@font-face{font-family:ConverseFontAwesomeSolid;font-style:normal;font-weight:900;src:url(webfonts/fa-solid-900.eot);src:url(webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-solid-900.svg#fontawesome) format("svg"),url(webfonts/fa-solid-900.woff2) format("woff2"),url(webfonts/fa-solid-900.woff) format("woff"),url(webfonts/fa-solid-900.ttf) format("truetype")}.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scale(-1,1)}.fa-flip-vertical{transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-balance-scale:before{content:"\f24e"}.fa-balance-scale-left:before{content:"\f515"}.fa-balance-scale-right:before{content:"\f516"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-biking:before{content:"\f84a"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-border-all:before{content:"\f84c"}.fa-border-none:before{content:"\f850"}.fa-border-style:before{content:"\f853"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fan:before{content:"\f863"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-icons:before{content:"\f86d"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-alt:before{content:"\f879"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-square-alt:before{content:"\f87b"}.fa-phone-volume:before{content:"\f2a0"}.fa-photo-video:before{content:"\f87c"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-remove-format:before{content:"\f87d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-down-alt:before{content:"\f881"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-alpha-up-alt:before{content:"\f882"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-down-alt:before{content:"\f884"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-amount-up-alt:before{content:"\f885"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-down-alt:before{content:"\f886"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-numeric-up-alt:before{content:"\f887"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spell-check:before{content:"\f891"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-voicemail:before{content:"\f897"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#conversejs .far,.converse-website .far{font-family:ConverseFontAwesomeRegular!important;font-weight:400}#conversejs .fa,#conversejs .fas,.converse-website .fa,.converse-website .fas{font-family:ConverseFontAwesomeSolid!important;font-weight:900}#conversejs .fab,.converse-website .fab{font-family:ConverseFontAwesomeBrands}#conversejs .fa,#conversejs .fab,#conversejs .far,#conversejs .fas,.converse-website .fa,.converse-website .fab,.converse-website .far,.converse-website .fas{display:inline-block;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#conversejs .fa-info-circle,.converse-website .fa-info-circle{height:1em}#conversejs,#conversejs-bg,.converse-fullscreen{--subdued-color:#A8ABA1;--green:#3AA569;--redder-orange:#E77051;--orange:#E7A151;--light-blue:#578EA9;--chat-status-online:var(--green);--chat-status-busy:var(--redder-orange);--chat-status-away:var(--orange);--brand-heading-color:#387592;--completion-light-color:#FFB9A7;--completion-normal-color:var(--redder-orange);--completion-dark-color:#D24E2B;--link-color:var(--light-blue);--link-hover-color:#345566;--link-color-lighten-10-percent:#79a5ba;--dark-link-color:#206485;--global-background-color:#397491;--inverse-link-color:white;--text-shadow-color:#FAFAFA;--text-color:#666;--text-color-lighten-15-percent:#8c8c8c;--message-text-color:#555;--message-receipt-color:var(--green);--save-button-color:var(--green);--message-avatar-width:36px;--message-avatar-height:36px;--chat-textarea-color:#666;--chat-textarea-background-color:white;--chat-textarea-height:60px;--send-button-height:27px;--send-button-margin:3px;--controlbox-heading-top-margin:0.75em;--inline-action-margin:0.75em;--roster-height:194px;--flyout-padding:1.2em;--chat-head-color:var(--green);--chat-head-color-dark:#1E9652;--chat-head-color-darker:#0E763B;--chat-head-color-lighten-50-percent:#e7f7ee;--chat-head-text-color:white;--chat-correcting-color:var(--chat-head-color-lighten-50-percent);--chat-content-background-color:white;--chat-topic-display:block;--chat-info-display:block;--highlight-color:#DCF9F6;--primary-color:var(--light-blue);--primary-color-dark:#397491;--secondary-color:#818479;--secondary-color-dark:#585B51;--warning-color:var(--orange);--warning-color-dark:#D2842B;--danger-color:#D24E2B;--danger-color-dark:#A93415;--light-background-color:#FCFDFD;--error-color:#D24E2B;--info-color:#1E9652;--button-border-radius:5px;--chatbox-border-radius:4px;--controlbox-width:250px;--controlbox-head-color:var(--light-blue);--controlbox-head-color-lighten-45-percent:#eff4f7;--controlbox-pane-background-color:white;--controlbox-heading-color:inherit;--controlbox-heading-font-weight:bold;--chat-gutter:0.5em;--minimized-chats-width:130px;--mobile-chat-width:100%;--mobile-chat-height:400px;--normal-font:"Helvetica","Arial",sans-serif;--heading-font:'Muli',normal;--branding-font:'Baumans',cursive;--heading-display:block;--heading-color:white;--chatroom-head-color:var(--redder-orange);--chatroom-head-color-dark:#D24E2B;--chatroom-head-color-lighten-25-percent:#f6ccc1;--chatroom-head-button-color:var(--chatroom-head-color);--chatroom-head-title-font-weight:normal;--chatroom-head-title-padding-right:0px;--chatroom-head-description-color:var(--chatroom-head-color-lighten-25-percent);--chatroom-head-description-link-color:white;--chatroom-head-description-display:block;--chatroom-head-description-border-left:0px;--chatroom-head-description-padding-left:0px;--chatroom-head-border-bottom:0px;--chatroom-width:400px;--chatroom-correcting-color:#fadfd7;--chatroom-badge-color:var(--chatroom-head-color);--chatroom-badge-hover-color:var(--chatroom-head-color-dark);--headline-head-color:var(--orange);--headline-message-color:#D2842B;--chatbox-button-size:14px;--fullpage-chatbox-button-size:16px;--font-size-tiny:10px;--font-size-small:12px;--font-size:14px;--font-size-large:16px;--font-size-huge:20px;--message-font-size:var(--font-size);--separator-text-color:var(--message-text-color);--chat-separator-border-bottom:2px solid var(--chat-head-color);--chatroom-separator-border-bottom:2px solid var(--chatroom-head-color);--message-input-border-top:4px solid var(--chatroom-head-color);--message-input-color:var(--chatroom-head-color);--line-height-small:14px;--line-height:16px;--line-height-large:20px;--line-height-huge:27px;--occupants-padding:1em;--occupants-background-color:white;--occupants-border-left:1px solid var(--text-color);--occupants-border-bottom:1px solid lightgrey;--occupants-features-display:block;--embedded-emoji-picker-height:300px;--avatar-border-radius:10%;--avatar-border:1px solid lightgrey;--avatar-background-color:white;--fullpage-chat-head-height:62px;--fullpage-chat-height:calc(var(--vh, 1vh) * 100);--fullpage-chat-width:100%;--fullpage-emoji-picker-height:300px;--fullpage-max-chat-textarea-height:15em;--overlayed-chat-head-height:55px;--overlayed-chat-height:450px;--overlayed-chat-width:250px;--overlayed-chatbox-hover-height:1em;--overlayed-emoji-picker-height:200px;--overlayed-max-chat-textarea-height:200px;--overlayed-badge-color:#818479;--list-toggle-color:#818479;--list-toggle-hover-color:#585B51;--list-toggle-font-weight:normal;--list-item-action-color:#e3eef3;--list-item-link-color:inherit;--list-item-link-hover-color:var(--dark-link-color);--list-item-open-color:var(--controlbox-head-color);--list-item-open-hover-color:var(--controlbox-head-color);--list-dot-circle-color:#f6dec1}#conversejs.theme-concord{--avatar-border-radius:100%;--avatar-border:0px;--avatar-background-color:none;--controlbox-pane-background-color:#333;--controlbox-heading-color:#777;--controlbox-heading-font-weight:bold;--chat-topic-display:none;--chat-info-display:none;--chat-textarea-background-color:#F6F6F6;--chat-correcting-color:#FFFFC0;--chat-head-text-color:#AAA;--chatbox-border-radius:0px;--heading-display:inline;--heading-color:#4F545C;--chatroom-head-color:white;--chatroom-head-color-lighten-25-percent:blue;--chatroom-head-button-color:#999;--chatroom-head-title-font-weight:bold;--chatroom-head-title-padding-right:12px;--chatroom-head-description-color:black;--chatroom-head-description-link-color:#00b3f4;--chatroom-head-description-display:inline;--chatroom-head-description-border-left:1px solid #DDD;--chatroom-head-description-padding-left:12px;--chatroom-head-border-bottom:1px solid #EEE;--chatroom-correcting-color:#FFFFC0;--chatroom-badge-color:var(--redder-orange);--chatroom-badge-hover-color:#D24E2B;--occupants-background-color:#F3F3F3;--occupants-border-left:0px;--occupants-border-bottom:0px;--occupants-features-display:none;--separator-text-color:#AAA;--chat-separator-border-bottom:1px solid #AAA;--chatroom-separator-border-bottom:1px solid #AAA;--message-input-border-top:1px solid #CCC;--message-input-color:#CCC;--fullpage-chat-head-height:62px;--fullpage-chatbox-button-size:24px;--list-toggle-font-weight:bold;--list-item-link-color:#F1F1F1;--list-item-link-hover-color:#DDD;--list-item-open-color:#444;--list-item-open-hover-color:#444}body.converse-fullscreen{margin:0;}#conversejs-bg .converse-brand{display:flex;justify-content:space-between;margin-top:15vh;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:5s;animation-duration:5s;-webkit-animation-timing-function:ease;animation-timing-function:ease}#conversejs-bg .converse-brand__padding{position:relative;width:100%;padding-right:15px;padding-left:15px;padding:0}@media (min-width:768px){#conversejs-bg .converse-brand__padding{flex:0 0 33.33333%;max-width:33.33333%}}@media (min-width:992px){#conversejs-bg .converse-brand__padding{flex:0 0 25%;max-width:25%}}@media (min-width:1200px){#conversejs-bg .converse-brand__padding{flex:0 0 16.66667%;max-width:16.66667%}}#conversejs-bg .converse-brand__heading{position:relative;width:100%;padding-right:15px;padding-left:15px;padding:0;display:flex;justify-content:center;margin:auto}@media (min-width:768px){#conversejs-bg .converse-brand__heading{font-size:4em;flex:0 0 66.66667%;max-width:66.66667%}}@media (min-width:992px){#conversejs-bg .converse-brand__heading{font-size:5em;flex:0 0 75%;max-width:75%}}@media (min-width:1200px){#conversejs-bg .converse-brand__heading{font-size:6em;flex:0 0 83.33333%;max-width:83.33333%}}#conversejs-bg .converse-brand__heading svg{margin-top:.3em}#conversejs-bg .converse-brand__text{color:#fff;font-family:var(--branding-font);font-weight:400;text-align:center;font-size:140%;margin-left:.2em}#conversejs-bg .converse-brand__text .byline{margin:0;font-family:var(--heading-font);font-size:.3em;opacity:.55;margin-bottom:2em;margin-left:-2.7em;word-spacing:5px}#conversejs .subdued,#conversejs-bg .subdued{opacity:.35}#conversejs{bottom:0;height:100%;position:fixed;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);color:var(--text-color);font-family:var(--normal-font);font-size:var(--font-size);direction:ltr;z-index:1031}#conversejs textarea:disabled{background-color:#eee!important}#conversejs .nopadding{padding:0!important}#conversejs .smooth-scroll{scroll-behavior:smooth!important}#conversejs.converse-overlayed>.row{flex-direction:row-reverse}#conversejs.converse-fullscreen .converse-chatboxes,#conversejs.converse-mobile .converse-chatboxes{width:100vw;left:-15px}#conversejs.converse-overlayed{height:3em}#conversejs.converse-embedded{box-sizing:border-box;bottom:auto;height:100%;position:relative;right:auto;width:100%}#conversejs.converse-embedded *,#conversejs.converse-embedded :after,#conversejs.converse-embedded :before{box-sizing:border-box}#conversejs .brand-heading-container{text-align:center}#conversejs .brand-heading{display:inline-flex;flex-direction:row;align-items:flex-start;font-family:var(--branding-font);color:var(--link-color);margin-bottom:1em}#conversejs .brand-heading .brand-name{color:var(--link-color);display:flex;flex-direction:column;align-items:center;margin-top:-.5em}#conversejs .brand-heading .brand-name__text{font-size:120%;vertical-align:text-bottom}#conversejs .brand-heading .converse-svg-logo{color:var(--link-color);height:1.5em;margin-right:.25em;margin-bottom:-.25em}#conversejs .brand-heading .converse-svg-logo .cls-1{isolation:isolate}#conversejs .brand-heading .converse-svg-logo .cls-2{opacity:.5;mix-blend-mode:multiply}#conversejs .brand-heading .converse-svg-logo .cls-3{fill:var(--link-color)}#conversejs .brand-heading .converse-svg-logo .cls-4{fill:var(--link-color)}#conversejs .brand-heading--inverse .converse-svg-logo{margin-bottom:0;margin-top:-.2em}#conversejs .brand-heading--inverse .byline{margin:0;font-family:var(--heading-font);font-size:.25em;opacity:.55;margin-left:-7em;word-spacing:5px}#conversejs .popover{position:fixed}#conversejs .converse-chatboxes{z-index:1031;position:fixed;bottom:0;right:0}#conversejs ::-webkit-input-placeholder{color:var(--subdued-color)}#conversejs ::-moz-placeholder{color:var(--subdued-color)}#conversejs :-ms-input-placeholder{color:var(--subdued-color)}#conversejs ::-ms-input-placeholder{color:var(--subdued-color)}#conversejs ::placeholder{color:var(--subdued-color)}#conversejs ::-moz-selection{background-color:var(--highlight-color)}#conversejs ::selection{background-color:var(--highlight-color)}#conversejs ::-moz-selection{background-color:var(--highlight-color)}@media screen and (max-width:480px){#conversejs{margin:0;right:10px;left:10px;bottom:5px}}@media screen and (max-height:450px){#conversejs{margin:0;right:10px;left:10px;bottom:5px}}#conversejs ul li{height:auto}#conversejs a,#conversejs article,#conversejs aside,#conversejs audio,#conversejs blockquote,#conversejs caption,#conversejs dd,#conversejs details,#conversejs div,#conversejs dl,#conversejs dt,#conversejs em,#conversejs embed,#conversejs fieldset,#conversejs figcaption,#conversejs figure,#conversejs footer,#conversejs form,#conversejs h1,#conversejs h2,#conversejs h3,#conversejs h4,#conversejs h5,#conversejs h6,#conversejs header,#conversejs hgroup,#conversejs img,#conversejs legend,#conversejs li,#conversejs mark,#conversejs menu,#conversejs nav,#conversejs ol,#conversejs output,#conversejs p,#conversejs pre,#conversejs ruby,#conversejs section,#conversejs span,#conversejs strong,#conversejs summary,#conversejs table,#conversejs tbody,#conversejs td,#conversejs tfoot,#conversejs th,#conversejs thead,#conversejs time,#conversejs tr,#conversejs ul,#conversejs video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}#conversejs button,#conversejs input[type=button],#conversejs input[type=password],#conversejs input[type=submit],#conversejs input[type=text],#conversejs textarea{font-size:var(--font-size);min-height:0}#conversejs strong{font-weight:700}#conversejs em{font-style:italic}#conversejs ol,#conversejs ul{list-style:none}#conversejs li{height:10px}#conversejs dl,#conversejs ol,#conversejs ul{font:inherit;margin:0}#conversejs a{cursor:pointer}#conversejs a,#conversejs a:not([href]):not([tabindex]),#conversejs a:visited{text-decoration:none;color:var(--link-color);text-shadow:none}#conversejs a:hover,#conversejs a:not([href]):not([tabindex]):hover,#conversejs a:visited:hover{color:var(--link-hover-color);text-decoration:none;text-shadow:none}#conversejs a.fa,#conversejs a.far,#conversejs a.fas,#conversejs a:not([href]):not([tabindex]).fa,#conversejs a:not([href]):not([tabindex]).far,#conversejs a:not([href]):not([tabindex]).fas,#conversejs a:visited.fa,#conversejs a:visited.far,#conversejs a:visited.fas{color:var(--subdued-color)}#conversejs a.fa:hover,#conversejs a.far:hover,#conversejs a.fas:hover,#conversejs a:not([href]):not([tabindex]).fa:hover,#conversejs a:not([href]):not([tabindex]).far:hover,#conversejs a:not([href]):not([tabindex]).fas:hover,#conversejs a:visited.fa:hover,#conversejs a:visited.far:hover,#conversejs a:visited.fas:hover{color:var(--gray-color)}#conversejs svg{border-radius:var(--chatbox-border-radius)}#conversejs .fa,#conversejs .far,#conversejs .fas{color:var(--subdued-color)}#conversejs .fa:hover,#conversejs .far:hover,#conversejs .fas:hover{color:var(--gray-color)}#conversejs q{quotes:"“" "”" "‘" "’"}#conversejs q:before{content:open-quote}#conversejs q:after{content:close-quote}#conversejs .helptext{font-size:var(--font-size-tiny);color:var(--text-color-lighten-15-percent)}#conversejs .selected{color:var(--link-color)!important}#conversejs .circle{border-radius:50%}#conversejs .badge{line-height:1;font-weight:400;font-size:90%}#conversejs .btn{font-weight:400;color:#fff}#conversejs .btn .fa,#conversejs .btn .far,#conversejs .btn .fas{color:#fff;margin-right:.5em}#conversejs .no-text-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@keyframes colorchange-chatmessage{0%{background-color:#8dd8ae}25%{background-color:rgba(141,216,174,.75)}50%{background-color:rgba(141,216,174,.5)}75%{background-color:rgba(141,216,174,.25)}100%{background-color:transparent}}@-webkit-keyframes colorchange-chatmessage{0%{background-color:#8dd8ae}25%{background-color:rgba(141,216,174,.75)}50%{background-color:rgba(141,216,174,.5)}75%{background-color:rgba(141,216,174,.25)}100%{background-color:transparent}}@keyframes colorchange-chatmessage-muc{0%{background-color:#ffb5a2}25%{background-color:rgba(255,181,162,.75)}50%{background-color:rgba(255,181,162,.5)}75%{background-color:rgba(255,181,162,.25)}100%{background-color:transparent}}@-webkit-keyframes colorchange-chatmessage-muc{0%{background-color:#ffb5a2}25%{background-color:rgba(255,181,162,.75)}50%{background-color:rgba(255,181,162,.5)}75%{background-color:rgba(255,181,162,.25)}100%{background-color:transparent}}@keyframes fadein{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadein{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeOut{0%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}@keyframes fadeOut{0%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}#conversejs .fade-in{opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease;animation-timing-function:ease}#conversejs .visible{opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease;animation-timing-function:ease}#conversejs .hidden{opacity:0!important;display:none!important}#conversejs .fade-out{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-name:fadeOut;animation-name:fadeOut;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}#conversejs .collapsed{height:0!important;overflow:hidden!important;padding:0!important}#conversejs .locked{padding-right:22px}@-webkit-keyframes spin{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes spin{from{transform:rotate(0)}to{transform:rotate(359deg)}}#conversejs .spinner{-webkit-animation:spin 2s infinite,linear;animation:spin 2s infinite,linear;width:1em;display:block;text-align:center;padding:.5em 0;font-size:24px}#conversejs .left{float:left}#conversejs .right{float:right}#conversejs .centered{text-align:center;display:block;margin:auto}#conversejs .hor_centered{text-align:center;display:block;margin:0 auto;clear:both}#conversejs .error{color:var(--error-color)}#conversejs .info{color:var(--info-color)}#conversejs .reg-feedback{font-size:85%;margin-bottom:1em}#conversejs #converse-login .conn-feedback,#conversejs .reg-feedback{display:block;text-align:center;width:100%}#conversejs .avatar{border-radius:var(--avatar-border-radius);border:var(--avatar-border);background-color:var(--avatar-background-color)}#conversejs .avatar-autocomplete{margin-right:.5em;vertical-align:middle}#conversejs .activated{display:block!important}#conversejs .nav-pills .nav-link.active,#conversejs .nav-pills .show>.nav-link{background-color:var(--primary-color)}#conversejs .list-group-item.active{background-color:var(--primary-color);border-color:var(--primary-color-dark)}#conversejs .badge{text-shadow:none;color:#fff}#conversejs .badge-light{color:var(--text-color)}#conversejs .badge-primary,#conversejs .btn-primary,#conversejs .button-primary{background-color:var(--primary-color);border-color:transparent}#conversejs .badge-primary:hover,#conversejs .btn-primary:hover,#conversejs .button-primary:hover{background-color:var(--primary-color-dark);border-color:transparent}#conversejs .badge-primary.active,#conversejs .btn-primary.active,#conversejs .button-primary.active{background-color:var(--primary-color-dark)!important;border-color:transparent!important}#conversejs .badge-groupchat{background-color:var(--chatroom-badge-color);border-color:transparent}#conversejs .badge-groupchat:hover{background-color:var(--chatroom-badge-hover-color);border-color:transparent}#conversejs .badge-groupchat.active{background-color:var(--chatroom-badge-hover-color)!important;border-color:transparent!important}#conversejs .badge-info,#conversejs .btn-info{background-color:var(--primary-color);border-color:var(--primary-color)}#conversejs .badge-info:hover,#conversejs .btn-info:hover{background-color:var(--primary-color-dark);border-color:var(--primary-color-dark)}#conversejs .badge-secondary,#conversejs .btn-secondary,#conversejs .button-cancel{color:#fff;background-color:var(--secondary-color);border-color:var(--secondary-color)}#conversejs .badge-secondary:hover,#conversejs .btn-secondary:hover,#conversejs .button-cancel:hover{background-color:var(--secondary-color-dark);border-color:var(--secondary-color-dark)}#conversejs .btn-warning{color:#fff;background-color:var(--warning-color);border-color:var(--warning-color)}#conversejs .btn-warning:hover{color:#fff;background-color:var(--warning-color-dark);border-color:var(--warning-color-dark)}#conversejs .btn-danger{color:#fff;background-color:var(--danger-color);border-color:var(--danger-color)!important}#conversejs .btn-danger:hover{background-color:var(--danger-color-dark);border-color:var(--danger-color-dark)}@media screen and (max-width:575px){body .converse-brand{font-size:3.75em}#conversejs:not(.converse-embedded) .chatbox .chat-body{border-radius:var(--chatbox-border-radius)}#conversejs:not(.converse-embedded) .flyout{border-radius:var(--chatbox-border-radius)}}@media screen and (min-width:576px){#conversejs .offset-sm-2{margin-left:16.666667%}}@media screen and (min-width:768px){#conversejs .offset-md-2{margin-left:16.666667%}#conversejs .offset-md-3{margin-left:25%}}@media screen and (min-width:992px){#conversejs .offset-lg-2{margin-left:16.666667%}#conversejs .offset-lg-3{margin-left:25%}}@media screen and (min-width:1200px){#conversejs .offset-xl-2{margin-left:16.666667%}}@media screen and (max-height:450px){#conversejs{left:0}}#conversejs .btn--small{font-size:80%;font-weight:400}#conversejs form .hidden-username{opacity:0!important;height:0!important;padding:0!important}#conversejs form .error-feedback{margin-bottom:.5em}#conversejs form .form-check-label{margin-top:.3rem}#conversejs form .form-control::-webkit-input-placeholder{color:var(--subdued-color)}#conversejs form .form-control::-moz-placeholder{color:var(--subdued-color)}#conversejs form .form-control:-ms-input-placeholder{color:var(--subdued-color)}#conversejs form .form-control::-ms-input-placeholder{color:var(--subdued-color)}#conversejs form .form-control::placeholder{color:var(--subdued-color)}#conversejs form .clear-input{margin-top:.5em;margin-bottom:.5em;position:absolute;right:.2em;cursor:pointer;font-size:var(--font-size)}#conversejs form#converse-login,#conversejs form#converse-register{background:var(--controlbox-pane-background-color)}#conversejs form#converse-login legend,#conversejs form#converse-register legend{width:100%;text-align:center;margin:0 auto .5em auto}#conversejs form#converse-login fieldset.buttons,#conversejs form#converse-register fieldset.buttons{text-align:center}#conversejs form#converse-login .login-anon,#conversejs form#converse-register .login-anon{height:auto;white-space:normal}#conversejs form#converse-login .save-submit,#conversejs form#converse-register .save-submit{color:var(--save-button-color)}#conversejs form#converse-login .form-url,#conversejs form#converse-register .form-url{display:block;font-weight:400;margin:1em 0}#conversejs form.converse-form{padding:1.2rem}#conversejs form.converse-form legend{color:var(--text-color);font-size:125%;margin-bottom:1.5em}#conversejs form.converse-form input[type=number],#conversejs form.converse-form input[type=password],#conversejs form.converse-form input[type=text],#conversejs form.converse-form select{min-width:50%}#conversejs form.converse-form input[type=button],#conversejs form.converse-form input[type=number],#conversejs form.converse-form input[type=password],#conversejs form.converse-form input[type=submit],#conversejs form.converse-form input[type=text]{padding:.5em}#conversejs form.converse-form input[type=button],#conversejs form.converse-form input[type=submit]{padding-left:1em;padding-right:1em;border:none}#conversejs form.converse-form input.error{border:1px solid var(--error-color);color:var(--text-color)}#conversejs form.converse-form .text-muted{color:var(--subdued-color)!important;font-size:85%;padding-top:.5em}#conversejs form.converse-form .text-muted a{color:var(--link-color-lighten-10-percent)}#conversejs form.converse-form .text-muted.error{color:var(--error-color)}#conversejs form.converse-form--modal{padding-bottom:0}#conversejs form.converse-centered-form{min-height:66%;text-align:center}#conversejs form.converse-centered-form input{max-width:30em;margin:auto}#conversejs .chatbox-navback{display:none}#conversejs .flyout{border-radius:var(--chatbox-border-radius);position:absolute}@media screen and (max-height:450px){#conversejs .flyout{border-radius:0}}@media screen and (max-width:480px){#conversejs .flyout{border-radius:0}}@media screen and (max-height:450px){#conversejs .flyout{bottom:0}}@media screen and (max-width:480px){#conversejs .flyout{bottom:0}}#conversejs .chatbox-btn{border-radius:25%;border:none;cursor:pointer;font-size:var(--chatbox-button-size);margin:0 .2em;padding:0 0 0 .5em;text-decoration:none}#conversejs .chatbox-btn:active{position:relative;top:1px}#conversejs .chat-head{display:flex;flex-direction:row;color:#fff;font-size:100%;margin:0;padding:0;padding-bottom:.5em;position:relative}#conversejs .chat-head.chat-head-chatbox{background-color:var(--chat-head-color)}#conversejs .chat-head .avatar{margin-right:.5em}#conversejs .chat-head .chat-head__desc{font-size:80%}#conversejs .chat-head .chatbox-title{display:flex;flex-direction:row;justify-content:space-between;width:100%}#conversejs .chat-head .chatbox-title--row{display:flex;flex-direction:row;overflow:hidden}#conversejs .chat-head .chatbox-title__text{overflow:hidden;text-overflow:ellipsis}#conversejs .chat-head .chatbox-title__buttons{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;padding:0}#conversejs .chat-head .user-custom-message{color:var(--chat-head-color-lighten-50-percent);font-size:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;padding-top:.2em}#conversejs .chat-head a.chatbox-btn.fa,#conversejs .chat-head a.chatbox-btn.far,#conversejs .chat-head a.chatbox-btn.fas,#conversejs .chat-head a:hover.chatbox-btn.fa,#conversejs .chat-head a:hover.chatbox-btn.far,#conversejs .chat-head a:hover.chatbox-btn.fas,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fa,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.far,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fas,#conversejs .chat-head a:visited.chatbox-btn.fa,#conversejs .chat-head a:visited.chatbox-btn.far,#conversejs .chat-head a:visited.chatbox-btn.fas{color:#fff}#conversejs .chat-head a.chatbox-btn.fa.button-on:before,#conversejs .chat-head a.chatbox-btn.far.button-on:before,#conversejs .chat-head a.chatbox-btn.fas.button-on:before,#conversejs .chat-head a:hover.chatbox-btn.fa.button-on:before,#conversejs .chat-head a:hover.chatbox-btn.far.button-on:before,#conversejs .chat-head a:hover.chatbox-btn.fas.button-on:before,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.far.button-on:before,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fas.button-on:before,#conversejs .chat-head a:visited.chatbox-btn.fa.button-on:before,#conversejs .chat-head a:visited.chatbox-btn.far.button-on:before,#conversejs .chat-head a:visited.chatbox-btn.fas.button-on:before{padding:.2em;background-color:var(--chat-head-text-color);color:var(--chat-head-color)}#conversejs .chat-head .chatbox-btn{color:#fff}#conversejs .chat-head .chatbox-btn.fa,#conversejs .chat-head .chatbox-btn.far,#conversejs .chat-head .chatbox-btn.fas{color:#fff}#conversejs .chat-head .chatbox-btn:active{position:relative;top:1px}#conversejs .chat-head .chatbox-btn.button-on:before{border-radius:5%;background-color:var(--chat-head-text-color);color:var(--chat-head-color)}#conversejs .chatbox{text-align:left;margin:0 var(--chat-gutter)}@media screen and (max-height:450px){#conversejs .chatbox{margin:0;width:var(--mobile-chat-width)}}@media screen and (max-width:480px){#conversejs .chatbox{margin:0;width:var(--mobile-chat-width)}}#conversejs .chatbox .box-flyout{display:flex;flex-direction:column;justify-content:space-between;background-color:var(--chat-head-color);box-shadow:1px 3px 5px 3px rgba(0,0,0,.4);z-index:2;overflow:hidden;width:100%}@media screen and (max-height:450px){#conversejs .chatbox .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}@media screen and (max-width:480px){#conversejs .chatbox .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}#conversejs .chatbox .chat-title{display:var(--heading-display);font-family:var(--heading-font);color:var(--heading-color);display:block;line-height:var(--line-height-large);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#conversejs .chatbox .chat-title.groupchat{padding-right:var(--chatroom-head-title-padding-right)}#conversejs .chatbox .chat-title a{color:var(--chat-head-text-color);width:100%}#conversejs .chatbox .chat-body{display:flex;flex-direction:column;justify-content:space-between;height:100%;background-color:var(--chat-head-color);border-bottom-left-radius:var(--chatbox-border-radius);border-bottom-right-radius:var(--chatbox-border-radius);border-top:0}@media screen and (max-height:450px){#conversejs .chatbox .chat-body{border-bottom-left-radius:0;border-bottom-right-radius:0}}@media screen and (max-width:480px){#conversejs .chatbox .chat-body{border-bottom-left-radius:0;border-bottom-right-radius:0}}#conversejs .chatbox .chat-body p{color:var(--text-color);font-size:var(--message-font-size);margin:0;padding:5px}#conversejs .chatbox .new-msgs-indicator{position:relative;width:100%;cursor:pointer;background-color:var(--chat-head-color);color:var(--light-background-color);padding:.5em;font-size:.9em;text-align:center;z-index:20;white-space:nowrap;margin-bottom:.25em}#conversejs .chatbox .chat-content{padding:1em 0;height:100%;font-size:var(--message-font-size);color:var(--text-color);overflow-y:auto;border:0;background-color:var(--chat-content-background-color);line-height:1.3em}#conversejs .chatbox .chat-content video{width:100%}#conversejs .chatbox .chat-content progress{margin:.5em 0;width:100%}#conversejs .chatbox .chat-content-sendbutton{height:calc(100% - (var(--chat-textarea-height) + var(--send-button-height) + 2 * var(--send-button-margin)))}#conversejs .chatbox .dropdown{background-color:var(--light-background-color)}#conversejs .chatbox .dropdown dd{margin:0;padding:0;position:relative}#conversejs .chatbox .sendXMPPMessage{-moz-background-clip:padding;-webkit-background-clip:padding-box;border-bottom-radius:var(--chatbox-border-radius);background-clip:padding-box;background-color:#fff;border:0;margin:0;padding:0}@media screen and (max-height:450px){#conversejs .chatbox .sendXMPPMessage{width:100%}}@media screen and (max-width:480px){#conversejs .chatbox .sendXMPPMessage{width:100%}}#conversejs .chatbox .sendXMPPMessage .suggestion-box__results:after{display:none}#conversejs .chatbox .sendXMPPMessage .spoiler-hint{width:100%}#conversejs .chatbox .sendXMPPMessage .chat-textarea{color:var(--chat-textarea-color);background-color:var(--chat-textarea-background-color);border-top-left-radius:0;border-top-right-radius:0;border-bottom-radius:var(--chatbox-border-radius);padding-left:.5em;padding-right:4.5em;padding-top:.5em;padding-bottom:.5em;width:100%;border:none;min-height:var(--chat-textarea-height);margin-bottom:-4px;resize:none;text-align:justify}#conversejs .chatbox .sendXMPPMessage .chat-textarea:active,#conversejs .chatbox .sendXMPPMessage .chat-textarea:focus{outline-color:var(--chat-head-color)}#conversejs .chatbox .sendXMPPMessage .chat-textarea.spoiler{height:42px}#conversejs .chatbox .sendXMPPMessage .chat-textarea.correcting{background-color:var(--chat-correcting-color)}#conversejs .chatbox .sendXMPPMessage .send-button{border-radius:0;bottom:var(--send-button-bottom);background-color:var(--chat-head-color);color:var(--inverse-link-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar--container{display:flex;flex-wrap:nowrap}#conversejs .chatbox .sendXMPPMessage .chat-toolbar{box-sizing:border-box;margin:0;width:100%;padding:.25em;display:block;border-top:4px solid var(--chat-head-color);background-color:#fff;color:var(--chat-head-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fa,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fa:hover,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .far,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .far:hover,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fas,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fas:hover{color:var(--chat-head-color);font-size:var(--font-size-large)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .disabled{color:var(--text-color-lighten-15-percent)!important}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted a{color:var(--text-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted .toolbar-menu a,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted a .toolbar-menu a{color:var(--link-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unverified,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unverified a{color:#cf5300}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .private,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .private a{color:#4b7003}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li{cursor:pointer;display:inline-block;list-style:none;padding:0 .5em}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li:hover{cursor:pointer}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu{background-color:#fff;bottom:1.7rem;box-shadow:-1px -1px 2px 0 rgba(0,0,0,.4);height:auto;margin-bottom:0;min-width:21rem;position:absolute;right:0;top:auto;z-index:1000}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu.otr-menu{left:-6em;min-width:15rem}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu.otr-menu.show{display:flex;flex-direction:column}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu a{color:var(--link-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul{z-index:99}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li{display:block;padding:7px}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li:hover{background-color:var(--highlight-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li a{display:block}#conversejs .chatbox .dragresize{background:0 0;border:0;margin:0;position:absolute;top:0;z-index:20}#conversejs .chatbox .dragresize-top{cursor:n-resize;height:5px;width:100%}#conversejs .chatbox .dragresize-left,#conversejs .chatbox .dragresize-occupants-left{cursor:w-resize;width:5px;height:100%;left:0}#conversejs .chatbox .dragresize-topleft{cursor:nw-resize;width:15px;height:15px;top:0;left:0}#conversejs.converse-embedded .chat-head,#conversejs.converse-overlayed .chat-head{padding:.5em;border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius)}@media screen and (max-height:450px){#conversejs.converse-embedded .chat-head,#conversejs.converse-overlayed .chat-head{border-top-left-radius:0;border-top-right-radius:0}}@media screen and (max-width:480px){#conversejs.converse-embedded .chat-head,#conversejs.converse-overlayed .chat-head{border-top-left-radius:0;border-top-right-radius:0}}#conversejs.converse-embedded .chatbox,#conversejs.converse-overlayed .chatbox{min-width:var(--overlayed-chat-width)!important;width:var(--overlayed-chat-width)}#conversejs.converse-embedded .chatbox .box-flyout,#conversejs.converse-overlayed .chatbox .box-flyout{min-width:var(--overlayed-chat-width)!important;width:var(--overlayed-chat-width)}#conversejs.converse-overlayed .flyout{bottom:var(--overlayed-chatbox-hover-height)}#conversejs.converse-overlayed .box-flyout{height:var(--overlayed-chat-height);min-height:calc(var(--overlayed-chat-height)/ 2)}#conversejs.converse-overlayed .chat-head{min-height:var(--overlayed-chat-head-height)}#conversejs.converse-overlayed .chat-textarea{max-height:var(--overlayed-max-chat-textarea-height)}#conversejs.converse-overlayed .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu{min-width:235px}@media (max-width:767.98px){#conversejs.converse-overlayed>.row{flex-direction:column}#conversejs.converse-overlayed>.row.no-gutters{margin:-1em}}#conversejs.converse-embedded .flyout,#conversejs.converse-fullscreen .flyout{border-radius:0;border-top:.8em solid var(--chat-head-color);border:var(--flyout-padding) solid var(--chat-head-color);bottom:0}#conversejs.converse-embedded .chat-head,#conversejs.converse-fullscreen .chat-head{height:var(--fullpage-chat-head-height)}#conversejs.converse-embedded .chat-head .user-custom-message,#conversejs.converse-fullscreen .chat-head .user-custom-message{font-size:70%;height:auto;line-height:var(--line-height)}#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{margin:0;position:relative;width:100%;padding-right:15px;padding-left:15px}#conversejs.converse-embedded .chatbox .box-flyout,#conversejs.converse-fullscreen .chatbox .box-flyout{box-shadow:none;overflow:hidden}@media (min-width:768px){#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{flex:0 0 66.66667%;max-width:66.66667%}}@media (min-width:992px){#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{flex:0 0 75%;max-width:75%}}@media (min-width:1200px){#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{flex:0 0 83.33333%;max-width:83.33333%}}#conversejs.converse-embedded.converse-singleton .flyout,#conversejs.converse-fullscreen.converse-singleton .flyout{border:none!important}#conversejs.converse-embedded.converse-singleton .chat-head,#conversejs.converse-fullscreen.converse-singleton .chat-head{min-height:var(--fullpage-chat-head-height);padding:.5em}#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{margin:0;position:relative;width:100%;padding-right:15px;padding-left:15px}@media (min-width:768px){#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{flex:0 0 100%;max-width:100%}}@media (min-width:992px){#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{flex:0 0 100%;max-width:100%}}@media (min-width:1200px){#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{flex:0 0 100%;max-width:100%}}#conversejs.converse-embedded .converse-chatboxes{z-index:1031;position:inherit;flex-wrap:nowrap;bottom:auto;height:100%;width:100%;margin-left:-15px}#conversejs.converse-embedded .chatbox .box-flyout{bottom:0;height:100%;min-width:auto;width:100%}#conversejs.converse-embedded .chatbox .chat-title--text{padding:.3em;font-size:120%}#conversejs.converse-embedded .chat-textarea{max-height:var(--fullpage-max-chat-textarea-height)}#conversejs.converse-fullscreen .chatbox-btn{font-size:var(--fullpage-chatbox-button-size);margin:0 .3em}#conversejs.converse-fullscreen .chat-head{font-size:var(--font-size-huge)}#conversejs.converse-fullscreen .chat-textarea{max-height:var(--fullpage-max-chat-textarea-height)}#conversejs.converse-fullscreen .chatbox .box-flyout{background-color:var(--chat-head-color);box-shadow:none;height:var(--fullpage-chat-height);min-height:calc(var(--fullpage-chat-height)/ 2);width:var(--fullpage-chat-width);overflow:hidden}#conversejs.converse-fullscreen .chatbox .chat-body{background-color:var(--chat-head-color);border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius)}#conversejs.converse-fullscreen .chatbox .chat-content{border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius)}#conversejs.converse-fullscreen .chatbox .chat-title{font-size:var(--font-size-huge);line-height:var(--line-height-huge)}#conversejs.converse-fullscreen .chatbox .sendXMPPMessage ul{width:100%}@media (max-width:767.98px){#conversejs:not(.converse-embedded)>.row{flex-direction:row-reverse}#conversejs:not(.converse-embedded) #converse-login-panel .converse-form{padding:3em 2em 3em}#conversejs:not(.converse-embedded) .chatbox{width:calc(100% - 50px)}#conversejs:not(.converse-embedded) .chatbox .row .box-flyout{left:50px;bottom:0;height:100vh;box-shadow:none}#conversejs.converse-fullscreen .chatbox .box-flyout .chatbox-navback,#conversejs.converse-mobile .chatbox .box-flyout .chatbox-navback,#conversejs.converse-overlayed .chatbox .box-flyout .chatbox-navback{display:flex;padding-right:1em}#conversejs.converse-fullscreen .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before,#conversejs.converse-mobile .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before,#conversejs.converse-overlayed .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before{color:#fff}}#conversejs .oauth-providers{text-align:center}#conversejs .oauth-providers .oauth-provider{margin:1em 0}#conversejs .oauth-providers .oauth-provider .oauth-login{margin-left:0;color:var(--link-color);font-size:var(--font-size-large)}#conversejs .oauth-providers .oauth-provider .oauth-login:hover{color:var(--link-hover-color)}#conversejs .oauth-providers .oauth-provider .oauth-login i{color:var(--link-color);font-size:var(--font-size-huge);margin-right:.5em}#conversejs .set-xmpp-status .chat-status--online,#conversejs .xmpp-status .chat-status--online{color:var(--chat-status-online)}#conversejs .set-xmpp-status .chat-status--busy,#conversejs .xmpp-status .chat-status--busy{color:var(--chat-status-busy)}#conversejs .set-xmpp-status .chat-status--away,#conversejs .xmpp-status .chat-status--away{color:var(--chat-status-away)}#conversejs .set-xmpp-status .fa-times-circle,#conversejs .set-xmpp-status .far.fa-circle,#conversejs .xmpp-status .fa-times-circle,#conversejs .xmpp-status .far.fa-circle{color:var(--subdued-color)}#conversejs .room-info{font-size:var(--font-size-small);font-style:normal;font-weight:400}#conversejs .room-info li.room-info{display:block;margin-left:5px}#conversejs .room-info p.room-info{line-height:var(--line-height);margin:0;display:block;white-space:normal}#conversejs div.room-info{padding:.3em 0;clear:left;width:100%}#conversejs #controlbox{order:-1;margin-right:calc(3 * var(--chat-gutter))}#conversejs #controlbox .open-rooms-toggle,#conversejs #controlbox .open-rooms-toggle .fa{color:var(--chatroom-head-color)!important}#conversejs #controlbox .open-rooms-toggle .fa:hover,#conversejs #controlbox .open-rooms-toggle:hover{color:var(--chatroom-head-color-dark)!important}#conversejs #controlbox .box-flyout{background-color:#fff}#conversejs #controlbox.logged-out .box-flyout .controlbox-pane{overflow-y:auto}#conversejs #controlbox form.search-xmpp-contact{margin:0;padding-left:5px;padding:0 0 5px 5px}#conversejs #controlbox form.search-xmpp-contact input{width:8em}#conversejs #controlbox .msgs-indicator{margin-right:.5em}#conversejs #controlbox a.subscribe-to-user{padding-left:2em;font-weight:700}#conversejs #controlbox #converse-register{opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease;animation-timing-function:ease;background:#fff}#conversejs #controlbox #converse-register .title{font-weight:700}#conversejs #controlbox #converse-register .info{color:green;font-size:90%;margin:1.5em 0}#conversejs #controlbox #converse-register .form-errors{color:var(--error-color);margin:1em 0}#conversejs #controlbox #converse-register .provider-title{font-size:var(--font-size-huge);margin:0}#conversejs #controlbox #converse-register .provider-score{width:178px;margin-bottom:8px}#conversejs #controlbox #converse-register .form-help .url{font-weight:700;color:var(--link-color)}#conversejs #controlbox #converse-register .input-group{display:table;margin:auto;width:100%}#conversejs #controlbox #converse-register .input-group span{overflow-x:hidden;text-overflow:ellipsis;max-width:110px}#conversejs #controlbox #converse-register .input-group input[name=username],#conversejs #controlbox #converse-register .input-group span{display:table-cell;text-align:left}#conversejs #controlbox #converse-register .instructions{color:gray;font-size:85%}#conversejs #controlbox #converse-register .instructions:hover{color:var(--text-color)}#conversejs #controlbox .conn-feedback{color:var(--controlbox-head-color)}#conversejs #controlbox .conn-feedback.error{color:var(--error-color)}#conversejs #controlbox .conn-feedback p{padding-bottom:1em}#conversejs #controlbox .conn-feedback p.feedback-subject.error{font-weight:700}#conversejs #controlbox #converse-login-panel,#conversejs #controlbox #converse-register-panel{padding-top:0;padding-bottom:0}#conversejs #controlbox #converse-login-panel{flex-direction:column}#conversejs #controlbox #converse-login-panel .brand-heading{color:var(--global-background-color)}#conversejs #controlbox .toggle-register-login{font-weight:700}#conversejs #controlbox .controlbox-pane .userinfo{padding-bottom:1em}#conversejs #controlbox .controlbox-pane .userinfo .username{margin-left:.5em;overflow:hidden;text-overflow:ellipsis}#conversejs #controlbox .controlbox-pane .userinfo .profile{margin-bottom:.75em}#conversejs #controlbox #chatrooms{padding:0}#conversejs #controlbox #chatrooms .add-chatroom{margin:0;padding:0}#conversejs #controlbox #chatrooms .add-chatroom input[type=button],#conversejs #controlbox #chatrooms .add-chatroom input[type=submit],#conversejs #controlbox #chatrooms .add-chatroom input[type=text]{width:100%}#conversejs #controlbox .controlbox-section .controlbox-heading{font-family:var(--heading-font);color:var(--controlbox-heading-color);font-weight:var(--controlbox-heading-font-weight);padding:0;font-size:1.1em;line-height:1.1em;text-transform:uppercase}#conversejs #controlbox .controlbox-section .controlbox-heading--groupchats{color:var(--chatroom-head-color)}#conversejs #controlbox .controlbox-section .controlbox-heading--contacts{color:var(--chat-head-color-dark)}#conversejs #controlbox .controlbox-section .controlbox-heading__btn{cursor:pointer;font-size:1em;padding:0;margin:var(--controlbox-heading-top-margin) 0 var(--inline-action-margin) 0;min-width:25px;text-align:center}#conversejs #controlbox .controlbox-section .controlbox-heading__btn.fa-vcard{margin-top:1em}#conversejs #controlbox .dropdown a{width:143px;display:inline-block}#conversejs #controlbox .dropdown li{list-style:none;padding-left:0}#conversejs #controlbox .dropdown dd ul{padding:0;list-style:none;position:absolute;left:0;top:0;width:100%;z-index:21;background-color:var(--light-background-color)}#conversejs #controlbox .dropdown dd ul li:hover{background-color:var(--highlight-color)}#conversejs #controlbox .dropdown dd.search-xmpp{height:0}#conversejs #controlbox .dropdown dd.search-xmpp .contact-form-container{position:absolute;z-index:22}#conversejs #controlbox .dropdown dd.search-xmpp .contact-form-container form{box-shadow:1px 4px 10px 1px rgba(0,0,0,.4);background-color:#fff}#conversejs #controlbox .dropdown dd.search-xmpp li:hover{background-color:var(--light-background-color)}#conversejs #controlbox .dropdown dt a span{cursor:pointer;display:block;padding:4px 7px 0 5px}#conversejs #controlbox .controlbox-panes{background-color:var(--controlbox-pane-background-color);height:100%;overflow-y:auto}#conversejs #controlbox .controlbox-subtitle{font-size:90%;padding:.5em;text-align:right}#conversejs #controlbox .controlbox-pane{background-color:var(--controlbox-pane-background-color);border:0;font-size:var(--font-size);left:0;text-align:left;overflow-x:hidden;padding:0 0 1em 0}#conversejs #controlbox .controlbox-pane .controlbox-padded{padding-left:1em;padding-right:1em;align-items:center;line-height:normal}#conversejs #controlbox .controlbox-pane .controlbox-padded .change-status{min-width:25px;text-align:center}#conversejs #controlbox .controlbox-pane .add-converse-contact{margin:0 0 .75em 0}#conversejs #controlbox .controlbox-pane .chatbox-btn{margin:0}#conversejs #controlbox .controlbox-pane .switch-form{text-align:center;padding:2em 0}#conversejs #controlbox .controlbox-pane .switch-form p{margin-top:.5em}#conversejs #controlbox .controlbox-pane dd{margin-left:0;margin-bottom:0}#conversejs #controlbox .controlbox-pane dd.odd{background-color:#dceac5}#conversejs #controlbox .add-xmpp-contact{padding:1em .5em}#conversejs #controlbox .add-xmpp-contact input{margin:0 0 1rem;width:100%}#conversejs #controlbox .add-xmpp-contact button{width:100%}#conversejs.converse-overlayed .toggle-controlbox{order:-1;text-align:center;background-color:var(--link-color);border-top-left-radius:var(--button-border-radius);border-top-right-radius:var(--button-border-radius);color:#0a0a0a;float:right;height:100%;margin:0 var(--chat-gutter);padding:1em}#conversejs.converse-overlayed .toggle-controlbox span{color:var(--inverse-link-color)}#conversejs.converse-overlayed #controlbox{min-width:var(--controlbox-width)!important;width:var(--controlbox-width)}#conversejs.converse-overlayed #controlbox .box-flyout{min-width:var(--controlbox-width)!important;width:var(--controlbox-width)}#conversejs.converse-overlayed #controlbox .login-trusted{white-space:nowrap;font-size:90%}#conversejs.converse-overlayed #controlbox #converse-login-trusted{margin-top:.5em}#conversejs.converse-overlayed #controlbox:not(.logged-out) .controlbox-head{height:15px}#conversejs.converse-overlayed #controlbox .brand-heading-container{width:100%}#conversejs.converse-overlayed #controlbox .controlbox-head{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;justify-content:space-between;min-height:0}#conversejs.converse-overlayed #controlbox .controlbox-head .brand-heading{color:var(--text-color);font-size:2em}#conversejs.converse-overlayed #controlbox .controlbox-head .chatbox-btn{color:var(--controlbox-head-color);margin:0}#conversejs.converse-overlayed #controlbox #converse-login,#conversejs.converse-overlayed #controlbox #converse-register{flex:0 0 100%;max-width:100%;padding-bottom:0}#conversejs.converse-overlayed #controlbox #converse-register .button-cancel{font-size:90%}#conversejs.converse-overlayed #controlbox .controlbox-panes{border-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .toggle-controlbox,#conversejs.converse-fullscreen .toggle-controlbox{display:none}#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{position:relative;width:100%;padding-right:15px;padding-left:15px;margin:0}@media (min-width:768px){#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{flex:0 0 33.33333%;max-width:33.33333%}}@media (min-width:992px){#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{flex:0 0 25%;max-width:25%}}@media (min-width:1200px){#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{flex:0 0 16.66667%;max-width:16.66667%}}#conversejs.converse-embedded #controlbox.logged-out,#conversejs.converse-fullscreen #controlbox.logged-out,#conversejs.converse-mobile #controlbox.logged-out{flex:0 0 100%;max-width:100%}#conversejs.converse-embedded #controlbox .controlbox-pane,#conversejs.converse-fullscreen #controlbox .controlbox-pane,#conversejs.converse-mobile #controlbox .controlbox-pane{border-radius:0}#conversejs.converse-embedded #controlbox .flyout,#conversejs.converse-fullscreen #controlbox .flyout,#conversejs.converse-mobile #controlbox .flyout{border-radius:0}#conversejs.converse-embedded #controlbox #converse-login-panel,#conversejs.converse-fullscreen #controlbox #converse-login-panel,#conversejs.converse-mobile #controlbox #converse-login-panel{border-radius:0}#conversejs.converse-embedded #controlbox #converse-login-panel .converse-form,#conversejs.converse-fullscreen #controlbox #converse-login-panel .converse-form,#conversejs.converse-mobile #controlbox #converse-login-panel .converse-form{padding:3em 2em 3em}#conversejs.converse-embedded #controlbox .toggle-register-login,#conversejs.converse-fullscreen #controlbox .toggle-register-login,#conversejs.converse-mobile #controlbox .toggle-register-login{line-height:var(--line-height-huge)}#conversejs.converse-embedded #controlbox .brand-heading-container,#conversejs.converse-fullscreen #controlbox .brand-heading-container,#conversejs.converse-mobile #controlbox .brand-heading-container{flex:0 0 100%;max-width:100%;margin-top:5em;margin-bottom:1em}#conversejs.converse-embedded #controlbox .brand-heading-container .brand-heading,#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-heading,#conversejs.converse-mobile #controlbox .brand-heading-container .brand-heading{font-size:500%;padding:.7em 0 0 0;opacity:.8;color:var(--brand-heading-color)}#conversejs.converse-embedded #controlbox .brand-heading-container .brand-subtitle,#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-subtitle,#conversejs.converse-mobile #controlbox .brand-heading-container .brand-subtitle{font-size:90%;padding:.5em}@media screen and (max-width:480px){#conversejs.converse-embedded #controlbox .brand-heading-container .brand-heading,#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-heading,#conversejs.converse-mobile #controlbox .brand-heading-container .brand-heading{font-size:300%}}#conversejs.converse-embedded #controlbox.logged-out,#conversejs.converse-fullscreen #controlbox.logged-out,#conversejs.converse-mobile #controlbox.logged-out{flex:0 0 100%;max-width:100%;opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease;animation-timing-function:ease;width:100%}#conversejs.converse-embedded #controlbox.logged-out .box-flyout,#conversejs.converse-fullscreen #controlbox.logged-out .box-flyout,#conversejs.converse-mobile #controlbox.logged-out .box-flyout{width:100%}#conversejs.converse-embedded #controlbox .box-flyout,#conversejs.converse-fullscreen #controlbox .box-flyout,#conversejs.converse-mobile #controlbox .box-flyout{border:0;width:100%;z-index:1;background-color:var(--controlbox-head-color)}#conversejs.converse-embedded #controlbox .box-flyout .controlbox-head,#conversejs.converse-fullscreen #controlbox .box-flyout .controlbox-head,#conversejs.converse-mobile #controlbox .box-flyout .controlbox-head{display:none}#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{position:relative;width:100%;padding-right:15px;padding-left:15px;flex:0 0 66.66667%;max-width:66.66667%;margin-left:16.66667%}@media (min-width:576px){#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{flex:0 0 66.66667%;max-width:66.66667%;margin-left:16.66667%}}@media (min-width:768px){#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{flex:0 0 66.66667%;max-width:66.66667%;margin-left:16.66667%}}@media (min-width:992px){#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{flex:0 0 50%;max-width:50%;margin-left:25%}}#conversejs.converse-embedded #controlbox #converse-login .instructions,#conversejs.converse-embedded #controlbox #converse-login .title,#conversejs.converse-embedded #controlbox #converse-register .instructions,#conversejs.converse-embedded #controlbox #converse-register .title,#conversejs.converse-fullscreen #controlbox #converse-login .instructions,#conversejs.converse-fullscreen #controlbox #converse-login .title,#conversejs.converse-fullscreen #controlbox #converse-register .instructions,#conversejs.converse-fullscreen #controlbox #converse-register .title,#conversejs.converse-mobile #controlbox #converse-login .instructions,#conversejs.converse-mobile #controlbox #converse-login .title,#conversejs.converse-mobile #controlbox #converse-register .instructions,#conversejs.converse-mobile #controlbox #converse-register .title{margin:1em 0}#conversejs.converse-embedded #controlbox #converse-login input[type=button],#conversejs.converse-embedded #controlbox #converse-login input[type=submit],#conversejs.converse-embedded #controlbox #converse-register input[type=button],#conversejs.converse-embedded #controlbox #converse-register input[type=submit],#conversejs.converse-fullscreen #controlbox #converse-login input[type=button],#conversejs.converse-fullscreen #controlbox #converse-login input[type=submit],#conversejs.converse-fullscreen #controlbox #converse-register input[type=button],#conversejs.converse-fullscreen #controlbox #converse-register input[type=submit],#conversejs.converse-mobile #controlbox #converse-login input[type=button],#conversejs.converse-mobile #controlbox #converse-login input[type=submit],#conversejs.converse-mobile #controlbox #converse-register input[type=button],#conversejs.converse-mobile #controlbox #converse-register input[type=submit]{width:auto}@media (max-width:767.98px){#conversejs{left:0;right:0;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}#conversejs .converse-chatboxes{margin:0!important;flex-direction:row!important;justify-content:space-between}#conversejs .converse-chatboxes .converse-chatroom{font-size:14px}#conversejs .converse-chatboxes .chatbox .box-flyout{margin-left:15px;left:0;bottom:0;border-radius:0;width:100vw!important;height:100vh!important}#conversejs .converse-chatboxes #controlbox{width:100vw!important}#conversejs .converse-chatboxes #controlbox .box-flyout{width:100vw!important;height:100vh!important;margin-right:-15px}#conversejs .converse-chatboxes #controlbox .sidebar{display:block}#conversejs .converse-chatboxes.sidebar-open .chatbox:not(#controlbox){display:none}#conversejs .converse-chatboxes.sidebar-open #controlbox .controlbox-pane{display:block}}#conversejs.converse-fullscreen .controlbox-panes{padding-top:1em}#conversejs.converse-overlayed .brand-heading{padding-top:.8rem;padding-left:.8rem;width:100%}#conversejs.converse-overlayed .converse-svg-logo{height:1em}#conversejs.converse-overlayed #controlbox #converse-login-panel{height:100%}#conversejs.converse-overlayed #controlbox .controlbox-panes{margin-top:.5em}#conversejs #converse-modals .modal{background-color:rgba(0,0,0,.4)}#conversejs #converse-modals .modal .modal-body{overflow-y:auto;max-height:75vh;margin-bottom:2em}#conversejs #converse-modals .modal .modal-body p{padding:.25rem 0}#conversejs #converse-modals .modal .modal-body .confirm .form-group p:first-child{font-size:110%;font-weight:700}#conversejs #converse-modals .modal .modal-footer{justify-content:flex-start}#conversejs #converse-modals .modal .roomid-policy-error{color:var(--error-color);font-size:var(--font-size-small);float:right}#conversejs #converse-modals .scrollable-container{max-height:50vh;overflow-y:auto}#conversejs #converse-modals .affiliation-form,#conversejs #converse-modals .role-form{padding:2em 0 1em 0}#conversejs #converse-modals .set-xmpp-status{margin:1em}#conversejs #converse-modals .set-xmpp-status .custom-control-label{margin-top:.25em}#conversejs #converse-modals #omemo-tabpanel{margin-top:1em}#conversejs #converse-modals .btn{font-weight:400}#conversejs #converse-modals #user-profile-modal .profile-form label{font-weight:700}#conversejs #converse-modals #user-profile-modal .fingerprint-removal label{display:flex;padding:.75rem 1.25rem}#conversejs #converse-modals #user-profile-modal .list-group-item{display:flex;justify-content:left;font-size:95%}#conversejs #converse-modals #user-profile-modal .list-group-item input[type=checkbox]{margin-right:1em}#conversejs #converse-modals .fingerprints{width:100%;margin-bottom:1em}#conversejs #converse-modals .fingerprint-trust{display:flex;justify-content:space-between;font-size:95%}#conversejs #converse-modals .fingerprint-trust .fingerprint{margin-left:1em}#conversejs #converse-roster{text-align:left;width:100%;position:relative;margin:0;height:var(--roster-height);padding:0;overflow:hidden;height:calc(100% - 70px)}#conversejs #converse-roster #online-count{display:none}#conversejs #converse-roster .search-xmpp ul li.chat-info{padding-left:10px}#conversejs #converse-roster .roster-filter-form{width:100%}#conversejs #converse-roster .roster-filter-form .button-group{padding:.2em}#conversejs #converse-roster .roster-filter-form span{padding:.3em;cursor:pointer;min-width:25px;text-align:center}#conversejs #converse-roster .roster-filter-form .roster-filter{width:100%;margin:.2em;font-size:calc(var(--font-size) - 2px)}#conversejs #converse-roster .roster-filter-form .state-type{font-size:calc(var(--font-size) - 2px);width:100%}#conversejs #converse-roster .roster-contacts{padding:0;margin:0 0 .2em 0;height:100%;overflow-x:hidden;overflow-y:auto}#conversejs #converse-roster .roster-contacts .roster-group{border:none;color:var(--text-color);font-weight:400;text-shadow:0 1px 0 var(--text-shadow-color);margin:.75em 0 .75em 0}#conversejs #converse-roster .roster-contacts .roster-group .group-toggle{font-family:var(--heading-font);display:block;width:100%;padding-top:0;padding-bottom:.3rem}#conversejs #converse-roster .roster-contacts .roster-group .group-toggle,#conversejs #converse-roster .roster-contacts .roster-group .group-toggle .fa{color:var(--chat-head-color-dark)!important}#conversejs #converse-roster .roster-contacts .roster-group .group-toggle .fa:hover,#conversejs #converse-roster .roster-contacts .roster-group .group-toggle:hover{color:var(--chat-head-color-darker)!important}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact{margin:.25em 0}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status{vertical-align:middle;font-size:.6em;margin-right:0;margin-left:-.7em;margin-bottom:-1.5em;border-radius:50%;border:2px solid var(--occupants-background-color)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--offline{margin-right:.8em}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--online{color:var(--chat-status-online)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--busy{color:var(--chat-status-busy)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--away{color:var(--chat-status-away)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--offline{display:none}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .fa-times-circle,#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .far.fa-circle{color:var(--subdued-color)}#conversejs #converse-roster .roster-contacts .roster-group li.requesting-xmpp-contact a{line-height:var(--line-height)}#conversejs #converse-roster .roster-contacts .roster-group li.requesting-xmpp-contact .req-contact-name{padding:0 .2em 0 0}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat{margin:0;padding:0}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat.unread-msgs{font-weight:700}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat.unread-msgs .contact-name{width:70%}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .msgs-indicator{color:#fff;background-color:var(--chat-head-color);opacity:1;border-radius:10%;padding:.2em;font-size:var(--font-size-small)}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0;margin:0;max-width:85%;float:none;height:100%}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name.unread-msgs{max-width:60%}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name.contact-name--offline{margin-left:.7em}#conversejs #converse-roster .roster-contacts .roster-group li.odd{background-color:#dceac5}#conversejs #converse-roster .roster-contacts .roster-group li a,#conversejs #converse-roster .roster-contacts .roster-group li span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#conversejs #converse-roster .roster-contacts .roster-group li .span{display:inline-block}#conversejs #converse-roster .roster-contacts .roster-group li .decline-xmpp-request{margin-left:5px}#conversejs #converse-roster .roster-contacts .roster-group li:hover{background-color:var(--controlbox-head-color-lighten-45-percent)}#conversejs #converse-roster span.pending-contact-name{line-height:var(--line-height);width:100%}#conversejs .list-container{text-align:left;padding:.3em 0}#conversejs .list-container .list-toggle{font-family:var(--heading-font);font-weight:var(--list-toggle-font-weight);display:block;color:var(--list-toggle-color);padding:0 0 .5rem 0}#conversejs .list-container .list-toggle:hover{color:var(--list-toggle-hover-color)}#conversejs .items-list{text-align:left}#conversejs .items-list .list-item{border:none;clear:both;color:var(--text-color);overflow:hidden;padding:.5em 0;text-shadow:0 1px 0 var(--text-shadow-color);word-wrap:break-word;height:2.5em}#conversejs .items-list .list-item.unread-msgs{font-weight:700}#conversejs .items-list .list-item .list-item-link{color:var(--list-item-link-color);margin:auto;font-size:var(--font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:baseline}#conversejs .items-list .list-item .list-item-link:hover{color:var(--list-item-link-hover-color)}#conversejs .items-list .list-item .list-item-badge{opacity:1;border-radius:25%;color:#fff;font-size:var(--font-size-small);line-height:var(--font-size-small)}#conversejs .items-list .list-item .list-item-action{opacity:0;font-size:var(--font-size-tiny);padding:.3em 0 0 0;margin:0 0 0 var(--inline-action-margin);width:2em;height:2em;color:var(--subdued-color)}#conversejs .items-list .list-item .list-item-action:before{font-size:var(--font-size)}#conversejs .items-list .list-item .list-item-action.button-on{color:var(--list-item-link-color)}#conversejs .items-list .list-item .list-item-action.button-on:hover{color:var(--list-item-link-hover-color)}#conversejs .items-list .list-item .list-item-action:hover{color:var(--list-toggle-hover-color);opacity:1}#conversejs .items-list .list-item .list-item-action--visible{opacity:1!important}#conversejs .items-list .list-item.open{background-color:var(--list-item-open-color)}#conversejs .items-list .list-item.open:hover{background-color:var(--list-item-open-hover-color)!important}#conversejs .items-list .list-item.open a{color:#fff}#conversejs .items-list .list-item.open .list-item-link:hover{color:#fff}#conversejs .items-list .list-item.open .list-item-action{color:var(--list-item-action-color)}#conversejs .items-list .list-item.open .list-item-action:hover{color:#fff}#conversejs .items-list .list-item:hover{background-color:var(--controlbox-head-color-lighten-45-percent)}#conversejs .items-list .list-item:hover .fa,#conversejs .items-list .list-item:hover .far,#conversejs .items-list .list-item:hover .fas{opacity:1}#conversejs .badge-room-color,#conversejs.converse-embedded .badge-room-color{background-color:var(--chatroom-head-color)}#conversejs .add-chatroom input[type=button],#conversejs .add-chatroom input[type=submit],#conversejs.converse-embedded .add-chatroom input[type=button],#conversejs.converse-embedded .add-chatroom input[type=submit]{margin:.3em 0}#conversejs #room-details-modal .features-list,#conversejs.converse-embedded #room-details-modal .features-list{margin-left:1em}#conversejs .chatroom-features,#conversejs.converse-embedded .chatroom-features{width:100%}#conversejs .chatroom-features .features-list,#conversejs.converse-embedded .chatroom-features .features-list{padding-top:0}#conversejs .chatroom-features .features-list .feature,#conversejs.converse-embedded .chatroom-features .features-list .feature{width:100%;margin-right:.5em;padding-right:0;font-size:1em;cursor:help}#conversejs .chatroom-features .features-list .feature .fa,#conversejs.converse-embedded .chatroom-features .features-list .feature .fa{margin-right:.5em;color:var(--text-color)}#conversejs .chat-head-chatroom,#conversejs.converse-embedded .chat-head-chatroom{background-color:var(--chatroom-head-color);border-bottom:var(--chatroom-head-border-bottom)}#conversejs .chat-head-chatroom .chat-head__desc,#conversejs.converse-embedded .chat-head-chatroom .chat-head__desc{color:var(--chatroom-head-description-color);display:var(--chatroom-head-description-display);font-size:70%;margin-top:3px;border-left:var(--chatroom-head-description-border-left);padding-left:var(--chatroom-head-description-padding-left)}#conversejs .chat-head-chatroom .chat-head__desc a,#conversejs.converse-embedded .chat-head-chatroom .chat-head__desc a{color:var(--chatroom-head-description-link-color)}#conversejs .chat-head-chatroom a.chatbox-btn.fa,#conversejs .chat-head-chatroom a:hover.chatbox-btn.fa,#conversejs .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa,#conversejs .chat-head-chatroom a:visited.chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a.chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a:hover.chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a:visited.chatbox-btn.fa{color:var(--chat-head-text-color)}#conversejs .chat-head-chatroom a.chatbox-btn.fa.button-on:before,#conversejs .chat-head-chatroom a:hover.chatbox-btn.fa.button-on:before,#conversejs .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,#conversejs .chat-head-chatroom a:visited.chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a.chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a:hover.chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a:visited.chatbox-btn.fa.button-on:before{color:var(--chatroom-head-button-color)}#conversejs .chat-head-chatroom .chatbox-btn.button-on:before,#conversejs.converse-embedded .chat-head-chatroom .chatbox-btn.button-on:before{color:var(--chatroom-head-button-color)}#conversejs .chat-head-chatroom .chatbox-title__text,#conversejs.converse-embedded .chat-head-chatroom .chatbox-title__text{display:var(--heading-display);font-weight:var(--chatroom-head-title-font-weight);padding-right:var(--chatroom-head-title-padding-right)}#conversejs .chat-head-chatroom .chatbox-title__text .chatroom-jid,#conversejs.converse-embedded .chat-head-chatroom .chatbox-title__text .chatroom-jid{font-size:var(--font-size-small)}#conversejs .chatroom,#conversejs.converse-embedded .chatroom{width:var(--chatroom-width)}@media screen and (max-height:450px){#conversejs .chatroom,#conversejs.converse-embedded .chatroom{width:var(--mobile-chat-width)}}@media screen and (max-width:480px){#conversejs .chatroom,#conversejs.converse-embedded .chatroom{width:var(--mobile-chat-width)}}#conversejs .chatroom .box-flyout,#conversejs.converse-embedded .chatroom .box-flyout{overflow-y:hidden;background-color:var(--chatroom-head-color);width:100%}@media screen and (max-height:450px){#conversejs .chatroom .box-flyout,#conversejs.converse-embedded .chatroom .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}@media screen and (max-width:480px){#conversejs .chatroom .box-flyout,#conversejs.converse-embedded .chatroom .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}#conversejs .chatroom .box-flyout .chatroom-body,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body{flex-direction:row;flex-flow:nowrap;border-bottom-radius:var(--chatbox-border-radius);background-color:#fff;border-top:0;width:100%;overflow:hidden}#conversejs .chatroom .box-flyout .chatroom-body .row,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .row{flex-direction:row}#conversejs .chatroom .box-flyout .chatroom-body .chat-topic,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-topic{display:var(--chat-topic-display);font-weight:700;color:var(--chatroom-head-color)}#conversejs .chatroom .box-flyout .chatroom-body .chat-info,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info{display:var(--chat-info-display);color:var(--chatroom-head-color);line-height:normal}#conversejs .chatroom .box-flyout .chatroom-body .chat-info.badge,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info.badge{color:var(--chat-head-text-color)}#conversejs .chatroom .box-flyout .chatroom-body .chat-info.chat-msg--retracted,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info.chat-msg--retracted{color:var(--subdued-color)}#conversejs .chatroom .box-flyout .chatroom-body .disconnect-container,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .disconnect-container{margin:1em;width:100%}#conversejs .chatroom .box-flyout .chatroom-body .disconnect-container h3.disconnect-msg,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .disconnect-container h3.disconnect-msg{padding-bottom:1em}#conversejs .chatroom .box-flyout .chatroom-body .chat-area,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area{display:flex;flex-direction:column;flex:0 1 100%;justify-content:flex-end;min-width:25%;word-wrap:break-word}#conversejs .chatroom .box-flyout .chatroom-body .chat-area .new-msgs-indicator,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .new-msgs-indicator{background-color:var(--chatroom-head-color)}#conversejs .chatroom .box-flyout .chatroom-body .chat-area .chat-content,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .chat-content{height:100%}#conversejs .chatroom .box-flyout .chatroom-body .occupants,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants{display:flex;flex-direction:column;justify-content:space-between;overflow-x:hidden;overflow-y:hidden;vertical-align:top;background-color:var(--occupants-background-color);border-left:var(--occupants-border-left);border-bottom-right-radius:var(--chatbox-border-radius);padding:.5em;max-width:75%;min-width:20%;flex:0 0 25%}#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header{display:flex;flex-direction:column}#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants{align-self:flex-end;cursor:pointer}#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-heading{font-family:var(--heading-font);margin-bottom:.5em;padding-left:0}#conversejs .chatroom .box-flyout .chatroom-body .occupants .chatroom-features,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .chatroom-features{display:var(--occupants-features-display)}#conversejs .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul{padding:0}#conversejs .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul li,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul li{padding:.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul{padding:0;margin-bottom:.5em;overflow-x:hidden;overflow-y:auto;list-style:none}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list{overflow-y:auto;flex-basis:0;flex-grow:1;border-bottom:var(--occupants-border-bottom)}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li{cursor:default;display:block;font-size:var(--font-size-small);overflow:hidden;padding:.25em .25em .25em 0;text-overflow:ellipsis}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li .fa,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li .fa{margin-right:.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.feature,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.feature{font-size:var(--font-size-tiny)}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant{cursor:pointer}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge{display:flex;justify-content:space-between;flex-wrap:wrap}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges{display:flex;justify-content:flex-end;flex-wrap:wrap;flex-direction:row}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges span,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges span{margin-right:.25rem}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant div.row.no-gutters,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant div.row.no-gutters{flex-wrap:nowrap;min-height:1.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .badge,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .badge{margin-bottom:.125rem}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status{display:inline-block;margin:0 .5em .125em 0;width:.5em;height:.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-chat,#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-online,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-chat,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-online{background-color:#1a9707}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-dnd,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-dnd{background-color:red}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-away,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-away{background-color:#ff8c00}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-xa,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-xa{background-color:orange}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-offline,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-offline{background-color:#a9a9a9}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container{background-color:#fff;border-bottom-left-radius:var(--chatbox-border-radius);border-bottom-right-radius:var(--chatbox-border-radius);border:0;color:var(--text-color);font-size:var(--font-size);height:100%;width:100%;overflow-y:auto}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container .validation-message,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container .validation-message{font-size:90%;color:var(--error-color)}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=button],#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=submit],#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=button],#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=submit]{margin:0 .5em}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container .button-primary,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container .button-primary{background-color:var(--chatroom-head-button-color)}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form{display:flex;flex-direction:column;justify-content:center;padding:2em}#conversejs .chatroom .empty-history-feedback,#conversejs.converse-embedded .chatroom .empty-history-feedback{position:relative;height:100%;color:var(--text-color-lighten-15-percent)}#conversejs .chatroom .empty-history-feedback span,#conversejs.converse-embedded .chatroom .empty-history-feedback span{width:100%;text-align:center;position:absolute;margin-top:50%}#conversejs .chatroom .muc-bottom-panel,#conversejs.converse-embedded .chatroom .muc-bottom-panel{border-top:var(--message-input-border-top);height:3em;padding:.5em;text-align:center;font-size:var(--font-size-small);background-color:var(--chatroom-head-color);color:#fff}#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname,#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname{padding:0;height:16em}#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container,#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container{border-radius:0!important}#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container .chatroom-form,#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container .chatroom-form{padding-top:2em;padding-bottom:0}#conversejs .chatroom .sendXMPPMessage .suggestion-box__results--above,#conversejs.converse-embedded .chatroom .sendXMPPMessage .suggestion-box__results--above{bottom:4.5em}#conversejs .chatroom .sendXMPPMessage .chat-toolbar,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar{background-color:#fff;border-top:var(--message-input-border-top);color:var(--message-input-color)}#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fa,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fa:hover,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .far,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .far:hover,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fas,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fas:hover,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fa,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fa:hover,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .far,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .far:hover,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fas,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fas:hover{color:var(--message-input-color)}#conversejs .chatroom .sendXMPPMessage .chat-textarea,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea{border-bottom-right-radius:0}#conversejs .chatroom .sendXMPPMessage .chat-textarea:active,#conversejs .chatroom .sendXMPPMessage .chat-textarea:focus,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea:active,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea:focus{outline-color:var(--chatroom-head-color)}#conversejs .chatroom .sendXMPPMessage .chat-textarea.correcting,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea.correcting{background-color:var(--chatroom-correcting-color)}#conversejs .chatroom .sendXMPPMessage .send-button,#conversejs.converse-embedded .chatroom .sendXMPPMessage .send-button{background-color:var(--message-input-color)}#conversejs .chatroom .room-invite .invited-contact,#conversejs.converse-embedded .chatroom .room-invite .invited-contact{margin:-1px 0 0 -1px;width:100%;border:1px solid #999}#conversejs.converse-overlayed .chatbox.chatroom{min-width:var(--chatroom-width)!important;width:var(--chatroom-width)}#conversejs.converse-overlayed .chatbox.chatroom .chat-head{padding-bottom:1em}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-features{display:none!important}#conversejs.converse-overlayed .chatbox.chatroom .box-flyout{min-width:var(--chatroom-width)!important;width:var(--chatroom-width)}#conversejs.converse-overlayed .chatbox.chatroom .chatbox-title__text{flex:0 0 58.33333%;max-width:58.33333%}#conversejs.converse-overlayed .chatbox.chatroom .chatbox-title__buttons{flex:0 0 41.66667%;max-width:41.66667%}#conversejs.converse-overlayed .chatbox.chatroom .chat-head__desc{font-size:80%}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .occupants-heading{padding:0}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .occupant-list{border-bottom:none}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .chatroom-features .feature{font-size:var(--font-size-tiny)}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants ul .occupant .occupant-nick-badge .occupant-badges{display:none}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants ul .occupant .occupant-status{margin-top:6px}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .chat-area{min-width:var(--overlayed-chat-width)}#conversejs.converse-overlayed .chatbox.chatroom .sendXMPPMessage .chat-toolbar li .toolbar-menu{min-width:280px}#conversejs.converse-embedded .chatroom .box-flyout,#conversejs.converse-fullscreen .chatroom .box-flyout,#conversejs.converse-mobile .chatroom .box-flyout{background-color:var(--chatroom-head-color);border:var(--flyout-padding) solid var(--chatroom-head-color);border-top:.8em solid var(--chatroom-head-color);width:100%}#conversejs.converse-embedded .chatroom .box-flyout .chat-head__desc,#conversejs.converse-fullscreen .chatroom .box-flyout .chat-head__desc,#conversejs.converse-mobile .chatroom .box-flyout .chat-head__desc{font-size:70%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body{border-top-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chatroom-form-container,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chatroom-form-container{border-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area{border-top-left-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .chat-content,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area .chat-content,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area .chat-content{border-top-left-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator{max-width:100%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants{border-top-right-radius:var(--chatbox-border-radius);padding:var(--occupants-padding)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants .occupants-heading{font-size:var(--font-size-large)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li{font-size:var(--font-size-small)}#conversejs.converse-embedded .chatroom .room-invite span .invited-contact,#conversejs.converse-fullscreen .chatroom .room-invite span .invited-contact,#conversejs.converse-mobile .chatroom .room-invite span .invited-contact{margin:0 0 .5em -1px}#conversejs.converse-embedded .chatroom{margin:0;width:100%}#conversejs.converse-embedded .chatroom .box-flyout .occupants-heading{font-size:120%}#conversejs.converse-embedded .chatroom .box-flyout .chat-content .chat-message{margin:.5em;font-size:120%}#conversejs.converse-embedded .chatroom .box-flyout .sendXMPPMessage .chat-textarea{padding:.5em;font-size:110%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body{height:100%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container{height:100%;position:relative}#conversejs.converse-embedded .chatroom .box-flyout .occupants .occupant-list{padding-left:.3em}#conversejs .chat-head-headline{background-color:var(--headline-head-color)}#conversejs .chatbox.headlines .chat-head.chat-head-chatbox{background-color:var(--headline-head-color)}#conversejs .chatbox.headlines .chat-body{background-color:var(--headline-head-color);border-radius:var(--chatbox-border-radius)}#conversejs .chatbox.headlines .chat-body .chat-message{color:var(--headline-message-color)}#conversejs .chatbox.headlines .chat-content{height:100%}#conversejs.converse-fullscreen .chatbox.headlines .box-flyout{background-color:var(--headline-head-color)}#conversejs.converse-fullscreen .chatbox.headlines .chat-head.chat-head-chatbox{background-color:var(--headline-head-color)}#conversejs.converse-fullscreen .chatbox.headlines .flyout{border:var(--flyout-padding) solid var(--headline-head-color);border-top:.8em solid var(--headline-head-color)}#conversejs .older-msg time{font-weight:700}#conversejs .message .mention{font-weight:700}#conversejs .message .mention--self{font-weight:400}#conversejs .message.date-separator{height:2em;margin:0;position:relative;text-align:center;z-index:0}#conversejs .message.date-separator .separator{border-top:0;border-bottom:var(--chat-separator-border-bottom);margin:0 1em;position:relative;top:1em;z-index:5}#conversejs .message.date-separator .separator-text{background:#fff;bottom:1px;color:var(--separator-text-color);display:inline-block;line-height:2em;padding:0 1em;position:relative;z-index:5}#conversejs .message.chat-msg--retracted .chat-msg__message{color:var(--subdued-color)}#conversejs .message.chat-info{color:var(--chat-head-color);font-size:var(--message-font-size);line-height:var(--line-height-small);font-size:90%;padding:.17rem 1rem}#conversejs .message.chat-info.badge{color:var(--chat-head-text-color)}#conversejs .message.chat-info.chat-state-notification{font-style:italic}#conversejs .message.chat-info.chat-event{clear:left;font-style:italic}#conversejs .message.chat-info.chat-error{color:var(--error-color);font-weight:700}#conversejs .message.chat-info .q{font-style:italic}#conversejs .message .chat-image{height:auto;width:auto;max-height:15em;max-width:100%}#conversejs .message.chat-msg--action{font-style:italic}#conversejs .message.chat-msg--action .chat-msg__author{padding-right:.2em}#conversejs .message.chat-msg{display:inline-flex;width:100%;flex-direction:row;overflow:auto;padding:.125rem 1rem}#conversejs .message.chat-msg.onload{animation:colorchange-chatmessage 1s;-webkit-animation:colorchange-chatmessage 1s}#conversejs .message.chat-msg:hover{background-color:rgba(0,0,0,.035)}#conversejs .message.chat-msg:hover .chat-msg__actions .chat-msg__action{opacity:1}#conversejs .message.chat-msg.correcting.groupchat{background-color:var(--chatroom-correcting-color)}#conversejs .message.chat-msg.correcting:not(.groupchat){background-color:var(--chat-correcting-color)}#conversejs .message.chat-msg .spoiler{margin-top:.5em}#conversejs .message.chat-msg .spoiler-hint{margin-bottom:.5em}#conversejs .message.chat-msg .spoiler-toggle{color:#fff}#conversejs .message.chat-msg .spoiler-toggle i{color:#fff;padding-right:.5em}#conversejs .message.chat-msg .spoiler-toggle:before{padding-right:.25em;whitespace:nowrap}#conversejs .message.chat-msg .chat-msg__content{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;margin-left:.5rem;width:calc(100% - var(--message-avatar-width))}#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat .chat-msg__text{color:var(--subdued-color)}#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat.chat-msg__body--delayed .chat-msg__text,#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat.chat-msg__body--received .chat-msg__text{color:var(--message-text-color)}#conversejs .message.chat-msg .chat-msg__content--action{width:100%;margin-left:0}#conversejs .message.chat-msg .chat-msg__body{display:flex;flex-direction:row;justify-content:space-between}#conversejs .message.chat-msg .chat-msg__message{display:inline-flex;flex-direction:column;width:100%;overflow-wrap:break-word}#conversejs .message.chat-msg .chat-msg__edit-modal{cursor:pointer;padding-right:.5em}#conversejs .message.chat-msg.headline .chat-msg__body{margin-left:0}#conversejs .message.chat-msg .chat-msg__subject{font-weight:700;clear:right}#conversejs .message.chat-msg .chat-msg__text{color:var(--message-text-color);padding:0;width:100%;white-space:pre-wrap;word-wrap:break-word;word-break:break-word}#conversejs .message.chat-msg .chat-msg__text a{word-wrap:break-word;word-break:break-all;display:inline-block}#conversejs .message.chat-msg .chat-msg__text img.emoji{height:1.5em;width:1.5em;margin:0 .05em 0 .1em;vertical-align:-.1em}#conversejs .message.chat-msg .chat-msg__text .emojione{margin-bottom:-6px}#conversejs .message.chat-msg .chat-msg__text--larger{font-size:1.6em;padding-top:.25em;padding-bottom:.25em}#conversejs .message.chat-msg .chat-msg__media{margin-top:.25rem;word-break:break-all}#conversejs .message.chat-msg .chat-msg__media a{word-wrap:break-word}#conversejs .message.chat-msg .chat-msg__media audio{width:100%}#conversejs .message.chat-msg .chat-msg__actions{display:flex;flex-wrap:nowrap}#conversejs .message.chat-msg .chat-msg__actions .chat-msg__action{height:var(--message-font-size);font-size:var(--message-font-size);padding:0;padding-left:.75em;border:none;opacity:0;background:0 0;cursor:pointer}#conversejs .message.chat-msg .chat-msg__actions .chat-msg__action:focus{display:block}#conversejs .message.chat-msg .chat-msg__avatar{margin-top:.5em;vertical-align:middle;height:var(--message-avatar-height);width:var(--message-avatar-width);min-height:var(--message-avatar-height);min-width:var(--message-avatar-width)}#conversejs .message.chat-msg .chat-msg__heading{width:100%;margin-top:.5em;padding-right:.25rem;padding-bottom:.25rem;display:flex}#conversejs .message.chat-msg .chat-msg__heading .chat-msg__author{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--heading-font);font-size:115%;font-weight:700;padding-bottom:1px}#conversejs .message.chat-msg .chat-msg__heading .badge{margin-left:.5em;font-family:var(--normal_font)}#conversejs .message.chat-msg .chat-msg__heading .chat-msg__time{padding-left:.25em;padding-right:.25em;color:var(--text-color-lighten-15-percent)}#conversejs .message.chat-msg.chat-msg--action .chat-msg__content{flex-wrap:wrap;flex-direction:row;justify-content:flex-start}#conversejs .message.chat-msg.chat-msg--action .chat-msg__text{width:auto}#conversejs .message.chat-msg.chat-msg--action .chat-msg__heading{margin-top:0;padding-bottom:0;width:auto}#conversejs .message.chat-msg.chat-msg--action .chat-msg__heading .fa{margin-left:.5em}#conversejs .message.chat-msg.chat-msg--action .chat-msg__author{font-size:var(--message-font-size)}#conversejs .message.chat-msg.chat-msg--action .chat-msg__time{margin-left:0}#conversejs .message.chat-msg.chat-msg--followup .chat-msg__avatar,#conversejs .message.chat-msg.chat-msg--followup .chat-msg__heading{display:none}#conversejs .message.chat-msg.chat-msg--followup .chat-msg__content{margin-left:2.75rem;width:100%}#conversejs .message.chat-msg .chat-msg__receipt{margin-right:.5em;color:var(--message-receipt-color)}#conversejs .chatroom-body .message.onload{animation:colorchange-chatmessage-muc 1s;-webkit-animation:colorchange-chatmessage-muc 1s}#conversejs .chatroom-body .message .separator{border-top:0;border-bottom:var(--chatroom-separator-border-bottom)}#conversejs.converse-overlayed .message.chat-msg.chat-msg--followup .chat-msg__content{margin-left:0}@media screen and (max-width:767px){#conversejs:not(.converse-embedded) .message.chat-msg .chat-msg__author{white-space:normal}}#conversejs.converse-overlayed #minimized-chats{order:100;width:var(--minimized-chats-width);margin-bottom:0;border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius);color:var(--inverse-link-color);margin-right:var(--chat-gutter);padding:0}#conversejs.converse-overlayed #minimized-chats .badge{bottom:8px;border:1px solid var(--overlayed-badge-color)}#conversejs.converse-overlayed #minimized-chats #toggle-minimized-chats{border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius);background-color:var(--link-color);padding:1em 0 0 0;text-align:center;color:#fff;white-space:nowrap;overflow-y:hidden;text-overflow:ellipsis;display:block;height:45px;width:9em}#conversejs.converse-overlayed #minimized-chats a.restore-chat{cursor:pointer;padding:1px 0 1px 5px;color:var(--chat-head-text-color);line-height:15px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#conversejs.converse-overlayed #minimized-chats a.restore-chat:hover{text-decoration:none}#conversejs.converse-overlayed #minimized-chats a.restore-chat:visited{color:var(--chat-head-text-color)}#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout{flex-direction:column-reverse;bottom:42px;width:var(--minimized-chats-width)}#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout .chat-head{padding:.3em;border-radius:var(--chatbox-border-radius);height:35px;margin-bottom:.2em;box-shadow:1px 3px 5px 3px rgba(0,0,0,.4);width:100%;max-width:9em}#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout.minimized{height:auto}#conversejs.converse-overlayed #minimized-chats .unread-message-count{font-weight:700;background-color:#fff;border:1px solid;text-shadow:1px 1px 0 var(--text-shadow-color);color:var(--warning-color);border-radius:5px;padding:2px 4px;font-size:16px;text-align:center;position:absolute;right:116px;bottom:10px}#conversejs.converse-overlayed #minimized-chats .chat-head-message-count-hidden,#conversejs.converse-overlayed #minimized-chats .unread-message-count-hidden{display:none}#conversejs #controlbox .bookmarks-toggle,#conversejs #controlbox .bookmarks-toggle .fa{color:var(--chatroom-head-color)!important}#conversejs #controlbox .bookmarks-toggle .fa:hover,#conversejs #controlbox .bookmarks-toggle:hover{color:var(--chatroom-head-color-dark)!important}#conversejs.fullscreen #controlbox #chatrooms .bookmarks-list dl.rooms-list.bookmarks dd.available-chatroom a.open-room{width:80%}#conversejs [hidden]{display:none}#conversejs .visually-hidden{position:absolute;clip:rect(0,0,0,0)}#conversejs .form-group .suggestion-box{width:100%}#conversejs .suggestion-box{position:relative}#conversejs .suggestion-box mark{background:var(--completion-light-color)}#conversejs .suggestion-box>input{display:block}#conversejs .suggestion-box .suggestion-box__results,#conversejs .suggestion-box>ul{position:absolute;left:0;right:0;z-index:2;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:rgba(255,255,255,.9);background:linear-gradient(to bottom right,#fff,rgba(255,255,255,.9));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.1);text-shadow:none}#conversejs .suggestion-box .suggestion-box__results:before,#conversejs .suggestion-box>ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-right:0;border-bottom:0;transform:rotate(45deg);z-index:-1}#conversejs .suggestion-box .suggestion-box__results>li,#conversejs .suggestion-box>ul>li{text-overflow:ellipsis;overflow-x:hidden;position:relative;cursor:pointer;padding:1em}#conversejs .suggestion-box .suggestion-box__results--below{top:2em}#conversejs .suggestion-box .suggestion-box__results--above{bottom:4.5em}#conversejs .suggestion-box .suggestion-box__results--above:before{display:none}#conversejs .suggestion-box .suggestion-box__results--above:after{z-index:-1;content:"";position:absolute;bottom:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-left:0;border-top:0;transform:rotate(45deg)}#conversejs .suggestion-box>ul:empty,#conversejs .suggestion-box>ul[hidden]{display:none}@supports (transform:scale(0)){#conversejs .suggestion-box>ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}#conversejs .suggestion-box>ul:empty,#conversejs .suggestion-box>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}#conversejs .suggestion-box>ul>li[aria-selected=true]{background:var(--completion-dark-color);color:var(--inverse-link-color)}#conversejs .suggestion-box li:hover mark{background:var(--completion-light-color);color:var(--inverse-link-color)}#conversejs .suggestion-box li[aria-selected=true] mark{background:var(--completion-normal-color);color:inherit}#conversejs.converse-fullscreen .suggestion-box__results--above{bottom:4.5em}#conversejs.converse-overlayed .suggestion-box__results--above{bottom:3.5em}#conversejs .chatbox img.emoji{height:1.2em;width:1.2em;margin:0 .05em 0 .1em;vertical-align:-.1em}#conversejs .chatbox .sendXMPPMessage .toggle-smiley a.toggle-smiley{padding:0}#conversejs .chatbox .emoji-picker.toolbar-menu{width:100%;padding-top:0;padding-bottom:0;background-color:var(--chat-head-color);overflow-y:hidden;background:#fff}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists{height:8em;overflow-y:auto;display:flex;flex-direction:column}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists .emoji-category__heading{cursor:auto;color:var(--subdued-color);font-size:var(--font-size);margin:0;padding:.75em 0 0 .5em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists .emoji-picker li{float:left}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker{display:flex;padding:.5em 0;background-color:var(--chat-head-color);width:auto;font-size:var(--font-size)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker label{margin:0;padding:0 .5em;white-space:nowrap;font-size:var(--font-size-small);color:var(--heading-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker ul{display:flex;flex-direction:row;flex-wrap:wrap}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker ul li{padding:0 .25em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker{background-color:#fff;padding:.5em 0 0 .5em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker:last-child{padding-bottom:.5em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li{margin-left:0;cursor:pointer;list-style:none;position:relative}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji{margin:0;height:30px;width:32px}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji.selected a{background-color:var(--highlight-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji a{padding:3px;font-size:var(--font-size-huge)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji a:hover{background-color:var(--highlight-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header{display:flex;flex-direction:column;padding-top:.5em;background-color:var(--chat-head-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header .emoji-search{width:auto;margin:.25em;height:2em;font-size:var(--font-size-small)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul{display:flex;flex-direction:row;flex-wrap:wrap}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category{padding:.25em 0;font-size:var(--font-size-huge)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.picked{background-color:#fff;border:1px var(--chat-head-color) solid;border-bottom:none}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.selected a,#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category:hover a{background-color:var(--highlight-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category a{padding:.25em}#conversejs .chatroom .emoji-picker.toolbar-menu{background-color:var(--chatroom-head-color);background:#fff}#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-skintone-picker{background-color:var(--chatroom-head-color)}#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-picker__header{background-color:var(--chatroom-head-color)}#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.picked{border:1px var(--chatroom-head-color) solid;border-bottom:none}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu li.insert-emoji{height:20px;width:20px}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker .insert-emoji a{font-size:var(--font-size)}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker{font-size:var(--font-size-small)}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker__header .emoji-category{font-size:var(--font-size-small)}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists{height:7em}#conversejs.converse-fullscreen .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists{height:12em}#conversejs .chatbox .emoji-picker.toolbar-menu{max-width:40em}
\ No newline at end of file
+ */#conversejs :root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}#conversejs *,#conversejs ::after,#conversejs ::before{box-sizing:border-box}#conversejs html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}#conversejs article,#conversejs aside,#conversejs figcaption,#conversejs figure,#conversejs footer,#conversejs header,#conversejs hgroup,#conversejs main,#conversejs nav,#conversejs section{display:block}#conversejs body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}#conversejs [tabindex="-1"]:focus{outline:0!important}#conversejs hr{box-sizing:content-box;height:0;overflow:visible}#conversejs h1,#conversejs h2,#conversejs h3,#conversejs h4,#conversejs h5,#conversejs h6{margin-top:0;margin-bottom:.5rem}#conversejs p{margin-top:0;margin-bottom:1rem}#conversejs abbr[data-original-title],#conversejs abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}#conversejs address{margin-bottom:1rem;font-style:normal;line-height:inherit}#conversejs dl,#conversejs ol,#conversejs ul{margin-top:0;margin-bottom:1rem}#conversejs ol ol,#conversejs ol ul,#conversejs ul ol,#conversejs ul ul{margin-bottom:0}#conversejs dt{font-weight:700}#conversejs dd{margin-bottom:.5rem;margin-left:0}#conversejs blockquote{margin:0 0 1rem}#conversejs b,#conversejs strong{font-weight:bolder}#conversejs small{font-size:80%}#conversejs sub,#conversejs sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}#conversejs sub{bottom:-.25em}#conversejs sup{top:-.5em}#conversejs a{color:#007bff;text-decoration:none;background-color:transparent}#conversejs a:hover{color:#0056b3;text-decoration:underline}#conversejs a:not([href]):not([tabindex]){color:inherit;text-decoration:none}#conversejs a:not([href]):not([tabindex]):focus,#conversejs a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}#conversejs a:not([href]):not([tabindex]):focus{outline:0}#conversejs code,#conversejs kbd,#conversejs pre,#conversejs samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}#conversejs pre{margin-top:0;margin-bottom:1rem;overflow:auto}#conversejs figure{margin:0 0 1rem}#conversejs img{vertical-align:middle;border-style:none}#conversejs svg{overflow:hidden;vertical-align:middle}#conversejs table{border-collapse:collapse}#conversejs caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}#conversejs th{text-align:inherit}#conversejs label{display:inline-block;margin-bottom:.5rem}#conversejs button{border-radius:0}#conversejs button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}#conversejs button,#conversejs input,#conversejs optgroup,#conversejs select,#conversejs textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}#conversejs button,#conversejs input{overflow:visible}#conversejs button,#conversejs select{text-transform:none}#conversejs select{word-wrap:normal}#conversejs [type=button],#conversejs [type=reset],#conversejs [type=submit],#conversejs button{-webkit-appearance:button}#conversejs [type=button]:not(:disabled),#conversejs [type=reset]:not(:disabled),#conversejs [type=submit]:not(:disabled),#conversejs button:not(:disabled){cursor:pointer}#conversejs [type=button]::-moz-focus-inner,#conversejs [type=reset]::-moz-focus-inner,#conversejs [type=submit]::-moz-focus-inner,#conversejs button::-moz-focus-inner{padding:0;border-style:none}#conversejs input[type=checkbox],#conversejs input[type=radio]{box-sizing:border-box;padding:0}#conversejs input[type=date],#conversejs input[type=datetime-local],#conversejs input[type=month],#conversejs input[type=time]{-webkit-appearance:listbox}#conversejs textarea{overflow:auto;resize:vertical}#conversejs fieldset{min-width:0;padding:0;margin:0;border:0}#conversejs legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}#conversejs progress{vertical-align:baseline}#conversejs [type=number]::-webkit-inner-spin-button,#conversejs [type=number]::-webkit-outer-spin-button{height:auto}#conversejs [type=search]{outline-offset:-2px;-webkit-appearance:none}#conversejs [type=search]::-webkit-search-decoration{-webkit-appearance:none}#conversejs ::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}#conversejs output{display:inline-block}#conversejs summary{display:list-item;cursor:pointer}#conversejs template{display:none}#conversejs [hidden]{display:none!important}#conversejs .h1,#conversejs .h2,#conversejs .h3,#conversejs .h4,#conversejs .h5,#conversejs .h6,#conversejs h1,#conversejs h2,#conversejs h3,#conversejs h4,#conversejs h5,#conversejs h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}#conversejs .h1,#conversejs h1{font-size:2.5rem}#conversejs .h2,#conversejs h2{font-size:2rem}#conversejs .h3,#conversejs h3{font-size:1.75rem}#conversejs .h4,#conversejs h4{font-size:1.5rem}#conversejs .h5,#conversejs h5{font-size:1.25rem}#conversejs .h6,#conversejs h6{font-size:1rem}#conversejs .lead{font-size:1.25rem;font-weight:300}#conversejs .display-1{font-size:6rem;font-weight:300;line-height:1.2}#conversejs .display-2{font-size:5.5rem;font-weight:300;line-height:1.2}#conversejs .display-3{font-size:4.5rem;font-weight:300;line-height:1.2}#conversejs .display-4{font-size:3.5rem;font-weight:300;line-height:1.2}#conversejs hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}#conversejs .small,#conversejs small{font-size:80%;font-weight:400}#conversejs .mark,#conversejs mark{padding:.2em;background-color:#fcf8e3}#conversejs .list-unstyled{padding-left:0;list-style:none}#conversejs .list-inline{padding-left:0;list-style:none}#conversejs .list-inline-item{display:inline-block}#conversejs .list-inline-item:not(:last-child){margin-right:.5rem}#conversejs .initialism{font-size:90%;text-transform:uppercase}#conversejs .blockquote{margin-bottom:1rem;font-size:1.25rem}#conversejs .blockquote-footer{display:block;font-size:80%;color:#6c757d}#conversejs .blockquote-footer::before{content:"\2014\00A0"}#conversejs .img-fluid{max-width:100%;height:auto}#conversejs .img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}#conversejs .figure{display:inline-block}#conversejs .figure-img{margin-bottom:.5rem;line-height:1}#conversejs .figure-caption{font-size:90%;color:#6c757d}#conversejs .container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){#conversejs .container{max-width:540px}}@media (min-width:768px){#conversejs .container{max-width:720px}}@media (min-width:992px){#conversejs .container{max-width:960px}}@media (min-width:1200px){#conversejs .container{max-width:1140px}}#conversejs .container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}#conversejs .row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}#conversejs .no-gutters{margin-right:0;margin-left:0}#conversejs .no-gutters>.col,#conversejs .no-gutters>[class*=col-]{padding-right:0;padding-left:0}#conversejs .col,#conversejs .col-1,#conversejs .col-10,#conversejs .col-11,#conversejs .col-12,#conversejs .col-2,#conversejs .col-3,#conversejs .col-4,#conversejs .col-5,#conversejs .col-6,#conversejs .col-7,#conversejs .col-8,#conversejs .col-9,#conversejs .col-auto,#conversejs .col-lg,#conversejs .col-lg-1,#conversejs .col-lg-10,#conversejs .col-lg-11,#conversejs .col-lg-12,#conversejs .col-lg-2,#conversejs .col-lg-3,#conversejs .col-lg-4,#conversejs .col-lg-5,#conversejs .col-lg-6,#conversejs .col-lg-7,#conversejs .col-lg-8,#conversejs .col-lg-9,#conversejs .col-lg-auto,#conversejs .col-md,#conversejs .col-md-1,#conversejs .col-md-10,#conversejs .col-md-11,#conversejs .col-md-12,#conversejs .col-md-2,#conversejs .col-md-3,#conversejs .col-md-4,#conversejs .col-md-5,#conversejs .col-md-6,#conversejs .col-md-7,#conversejs .col-md-8,#conversejs .col-md-9,#conversejs .col-md-auto,#conversejs .col-sm,#conversejs .col-sm-1,#conversejs .col-sm-10,#conversejs .col-sm-11,#conversejs .col-sm-12,#conversejs .col-sm-2,#conversejs .col-sm-3,#conversejs .col-sm-4,#conversejs .col-sm-5,#conversejs .col-sm-6,#conversejs .col-sm-7,#conversejs .col-sm-8,#conversejs .col-sm-9,#conversejs .col-sm-auto,#conversejs .col-xl,#conversejs .col-xl-1,#conversejs .col-xl-10,#conversejs .col-xl-11,#conversejs .col-xl-12,#conversejs .col-xl-2,#conversejs .col-xl-3,#conversejs .col-xl-4,#conversejs .col-xl-5,#conversejs .col-xl-6,#conversejs .col-xl-7,#conversejs .col-xl-8,#conversejs .col-xl-9,#conversejs .col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}#conversejs .col{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-3{flex:0 0 25%;max-width:25%}#conversejs .col-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-6{flex:0 0 50%;max-width:50%}#conversejs .col-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-9{flex:0 0 75%;max-width:75%}#conversejs .col-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-12{flex:0 0 100%;max-width:100%}#conversejs .order-first{order:-1}#conversejs .order-last{order:13}#conversejs .order-0{order:0}#conversejs .order-1{order:1}#conversejs .order-2{order:2}#conversejs .order-3{order:3}#conversejs .order-4{order:4}#conversejs .order-5{order:5}#conversejs .order-6{order:6}#conversejs .order-7{order:7}#conversejs .order-8{order:8}#conversejs .order-9{order:9}#conversejs .order-10{order:10}#conversejs .order-11{order:11}#conversejs .order-12{order:12}#conversejs .offset-1{margin-left:8.33333%}#conversejs .offset-2{margin-left:16.66667%}#conversejs .offset-3{margin-left:25%}#conversejs .offset-4{margin-left:33.33333%}#conversejs .offset-5{margin-left:41.66667%}#conversejs .offset-6{margin-left:50%}#conversejs .offset-7{margin-left:58.33333%}#conversejs .offset-8{margin-left:66.66667%}#conversejs .offset-9{margin-left:75%}#conversejs .offset-10{margin-left:83.33333%}#conversejs .offset-11{margin-left:91.66667%}@media (min-width:576px){#conversejs .col-sm{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-sm-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-sm-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-sm-3{flex:0 0 25%;max-width:25%}#conversejs .col-sm-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-sm-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-sm-6{flex:0 0 50%;max-width:50%}#conversejs .col-sm-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-sm-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-sm-9{flex:0 0 75%;max-width:75%}#conversejs .col-sm-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-sm-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-sm-12{flex:0 0 100%;max-width:100%}#conversejs .order-sm-first{order:-1}#conversejs .order-sm-last{order:13}#conversejs .order-sm-0{order:0}#conversejs .order-sm-1{order:1}#conversejs .order-sm-2{order:2}#conversejs .order-sm-3{order:3}#conversejs .order-sm-4{order:4}#conversejs .order-sm-5{order:5}#conversejs .order-sm-6{order:6}#conversejs .order-sm-7{order:7}#conversejs .order-sm-8{order:8}#conversejs .order-sm-9{order:9}#conversejs .order-sm-10{order:10}#conversejs .order-sm-11{order:11}#conversejs .order-sm-12{order:12}#conversejs .offset-sm-0{margin-left:0}#conversejs .offset-sm-1{margin-left:8.33333%}#conversejs .offset-sm-2{margin-left:16.66667%}#conversejs .offset-sm-3{margin-left:25%}#conversejs .offset-sm-4{margin-left:33.33333%}#conversejs .offset-sm-5{margin-left:41.66667%}#conversejs .offset-sm-6{margin-left:50%}#conversejs .offset-sm-7{margin-left:58.33333%}#conversejs .offset-sm-8{margin-left:66.66667%}#conversejs .offset-sm-9{margin-left:75%}#conversejs .offset-sm-10{margin-left:83.33333%}#conversejs .offset-sm-11{margin-left:91.66667%}}@media (min-width:768px){#conversejs .col-md{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-md-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-md-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-md-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-md-3{flex:0 0 25%;max-width:25%}#conversejs .col-md-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-md-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-md-6{flex:0 0 50%;max-width:50%}#conversejs .col-md-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-md-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-md-9{flex:0 0 75%;max-width:75%}#conversejs .col-md-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-md-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-md-12{flex:0 0 100%;max-width:100%}#conversejs .order-md-first{order:-1}#conversejs .order-md-last{order:13}#conversejs .order-md-0{order:0}#conversejs .order-md-1{order:1}#conversejs .order-md-2{order:2}#conversejs .order-md-3{order:3}#conversejs .order-md-4{order:4}#conversejs .order-md-5{order:5}#conversejs .order-md-6{order:6}#conversejs .order-md-7{order:7}#conversejs .order-md-8{order:8}#conversejs .order-md-9{order:9}#conversejs .order-md-10{order:10}#conversejs .order-md-11{order:11}#conversejs .order-md-12{order:12}#conversejs .offset-md-0{margin-left:0}#conversejs .offset-md-1{margin-left:8.33333%}#conversejs .offset-md-2{margin-left:16.66667%}#conversejs .offset-md-3{margin-left:25%}#conversejs .offset-md-4{margin-left:33.33333%}#conversejs .offset-md-5{margin-left:41.66667%}#conversejs .offset-md-6{margin-left:50%}#conversejs .offset-md-7{margin-left:58.33333%}#conversejs .offset-md-8{margin-left:66.66667%}#conversejs .offset-md-9{margin-left:75%}#conversejs .offset-md-10{margin-left:83.33333%}#conversejs .offset-md-11{margin-left:91.66667%}}@media (min-width:992px){#conversejs .col-lg{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-lg-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-lg-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-lg-3{flex:0 0 25%;max-width:25%}#conversejs .col-lg-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-lg-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-lg-6{flex:0 0 50%;max-width:50%}#conversejs .col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-lg-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-lg-9{flex:0 0 75%;max-width:75%}#conversejs .col-lg-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-lg-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-lg-12{flex:0 0 100%;max-width:100%}#conversejs .order-lg-first{order:-1}#conversejs .order-lg-last{order:13}#conversejs .order-lg-0{order:0}#conversejs .order-lg-1{order:1}#conversejs .order-lg-2{order:2}#conversejs .order-lg-3{order:3}#conversejs .order-lg-4{order:4}#conversejs .order-lg-5{order:5}#conversejs .order-lg-6{order:6}#conversejs .order-lg-7{order:7}#conversejs .order-lg-8{order:8}#conversejs .order-lg-9{order:9}#conversejs .order-lg-10{order:10}#conversejs .order-lg-11{order:11}#conversejs .order-lg-12{order:12}#conversejs .offset-lg-0{margin-left:0}#conversejs .offset-lg-1{margin-left:8.33333%}#conversejs .offset-lg-2{margin-left:16.66667%}#conversejs .offset-lg-3{margin-left:25%}#conversejs .offset-lg-4{margin-left:33.33333%}#conversejs .offset-lg-5{margin-left:41.66667%}#conversejs .offset-lg-6{margin-left:50%}#conversejs .offset-lg-7{margin-left:58.33333%}#conversejs .offset-lg-8{margin-left:66.66667%}#conversejs .offset-lg-9{margin-left:75%}#conversejs .offset-lg-10{margin-left:83.33333%}#conversejs .offset-lg-11{margin-left:91.66667%}}@media (min-width:1200px){#conversejs .col-xl{flex-basis:0;flex-grow:1;max-width:100%}#conversejs .col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}#conversejs .col-xl-1{flex:0 0 8.33333%;max-width:8.33333%}#conversejs .col-xl-2{flex:0 0 16.66667%;max-width:16.66667%}#conversejs .col-xl-3{flex:0 0 25%;max-width:25%}#conversejs .col-xl-4{flex:0 0 33.33333%;max-width:33.33333%}#conversejs .col-xl-5{flex:0 0 41.66667%;max-width:41.66667%}#conversejs .col-xl-6{flex:0 0 50%;max-width:50%}#conversejs .col-xl-7{flex:0 0 58.33333%;max-width:58.33333%}#conversejs .col-xl-8{flex:0 0 66.66667%;max-width:66.66667%}#conversejs .col-xl-9{flex:0 0 75%;max-width:75%}#conversejs .col-xl-10{flex:0 0 83.33333%;max-width:83.33333%}#conversejs .col-xl-11{flex:0 0 91.66667%;max-width:91.66667%}#conversejs .col-xl-12{flex:0 0 100%;max-width:100%}#conversejs .order-xl-first{order:-1}#conversejs .order-xl-last{order:13}#conversejs .order-xl-0{order:0}#conversejs .order-xl-1{order:1}#conversejs .order-xl-2{order:2}#conversejs .order-xl-3{order:3}#conversejs .order-xl-4{order:4}#conversejs .order-xl-5{order:5}#conversejs .order-xl-6{order:6}#conversejs .order-xl-7{order:7}#conversejs .order-xl-8{order:8}#conversejs .order-xl-9{order:9}#conversejs .order-xl-10{order:10}#conversejs .order-xl-11{order:11}#conversejs .order-xl-12{order:12}#conversejs .offset-xl-0{margin-left:0}#conversejs .offset-xl-1{margin-left:8.33333%}#conversejs .offset-xl-2{margin-left:16.66667%}#conversejs .offset-xl-3{margin-left:25%}#conversejs .offset-xl-4{margin-left:33.33333%}#conversejs .offset-xl-5{margin-left:41.66667%}#conversejs .offset-xl-6{margin-left:50%}#conversejs .offset-xl-7{margin-left:58.33333%}#conversejs .offset-xl-8{margin-left:66.66667%}#conversejs .offset-xl-9{margin-left:75%}#conversejs .offset-xl-10{margin-left:83.33333%}#conversejs .offset-xl-11{margin-left:91.66667%}}#conversejs .form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .form-control{transition:none}}#conversejs .form-control::-ms-expand{background-color:transparent;border:0}#conversejs .form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}#conversejs .form-control::-moz-placeholder{color:#6c757d;opacity:1}#conversejs .form-control:-ms-input-placeholder{color:#6c757d;opacity:1}#conversejs .form-control::-ms-input-placeholder{color:#6c757d;opacity:1}#conversejs .form-control::placeholder{color:#6c757d;opacity:1}#conversejs .form-control:disabled,#conversejs .form-control[readonly]{background-color:#e9ecef;opacity:1}#conversejs select.form-control:focus::-ms-value{color:#495057;background-color:#fff}#conversejs .form-control-file,#conversejs .form-control-range{display:block;width:100%}#conversejs .col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}#conversejs .col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}#conversejs .col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}#conversejs .form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}#conversejs .form-control-plaintext.form-control-lg,#conversejs .form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}#conversejs .form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}#conversejs .form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}#conversejs select.form-control[multiple],#conversejs select.form-control[size]{height:auto}#conversejs textarea.form-control{height:auto}#conversejs .form-group{margin-bottom:1rem}#conversejs .form-text{display:block;margin-top:.25rem}#conversejs .form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}#conversejs .form-row>.col,#conversejs .form-row>[class*=col-]{padding-right:5px;padding-left:5px}#conversejs .form-check{position:relative;display:block;padding-left:1.25rem}#conversejs .form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}#conversejs .form-check-input:disabled~.form-check-label{color:#6c757d}#conversejs .form-check-label{margin-bottom:0}#conversejs .form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}#conversejs .form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}#conversejs .valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}#conversejs .valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}#conversejs .form-control.is-valid,.was-validated #conversejs .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .form-control.is-valid:focus,.was-validated #conversejs .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .form-control.is-valid~.valid-feedback,#conversejs .form-control.is-valid~.valid-tooltip,.was-validated #conversejs .form-control:valid~.valid-feedback,.was-validated #conversejs .form-control:valid~.valid-tooltip{display:block}#conversejs textarea.form-control.is-valid,.was-validated #conversejs textarea.form-control:valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}#conversejs .custom-select.is-valid,.was-validated #conversejs .custom-select:valid{border-color:#28a745;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .custom-select.is-valid:focus,.was-validated #conversejs .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .custom-select.is-valid~.valid-feedback,#conversejs .custom-select.is-valid~.valid-tooltip,.was-validated #conversejs .custom-select:valid~.valid-feedback,.was-validated #conversejs .custom-select:valid~.valid-tooltip{display:block}#conversejs .form-control-file.is-valid~.valid-feedback,#conversejs .form-control-file.is-valid~.valid-tooltip,.was-validated #conversejs .form-control-file:valid~.valid-feedback,.was-validated #conversejs .form-control-file:valid~.valid-tooltip{display:block}#conversejs .form-check-input.is-valid~.form-check-label,.was-validated #conversejs .form-check-input:valid~.form-check-label{color:#28a745}#conversejs .form-check-input.is-valid~.valid-feedback,#conversejs .form-check-input.is-valid~.valid-tooltip,.was-validated #conversejs .form-check-input:valid~.valid-feedback,.was-validated #conversejs .form-check-input:valid~.valid-tooltip{display:block}#conversejs .custom-control-input.is-valid~.custom-control-label,.was-validated #conversejs .custom-control-input:valid~.custom-control-label{color:#28a745}#conversejs .custom-control-input.is-valid~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}#conversejs .custom-control-input.is-valid~.valid-feedback,#conversejs .custom-control-input.is-valid~.valid-tooltip,.was-validated #conversejs .custom-control-input:valid~.valid-feedback,.was-validated #conversejs .custom-control-input:valid~.valid-tooltip{display:block}#conversejs .custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}#conversejs .custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated #conversejs .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}#conversejs .custom-file-input.is-valid~.custom-file-label,.was-validated #conversejs .custom-file-input:valid~.custom-file-label{border-color:#28a745}#conversejs .custom-file-input.is-valid~.valid-feedback,#conversejs .custom-file-input.is-valid~.valid-tooltip,.was-validated #conversejs .custom-file-input:valid~.valid-feedback,.was-validated #conversejs .custom-file-input:valid~.valid-tooltip{display:block}#conversejs .custom-file-input.is-valid:focus~.custom-file-label,.was-validated #conversejs .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}#conversejs .invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}#conversejs .invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}#conversejs .form-control.is-invalid,.was-validated #conversejs .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .form-control.is-invalid:focus,.was-validated #conversejs .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .form-control.is-invalid~.invalid-feedback,#conversejs .form-control.is-invalid~.invalid-tooltip,.was-validated #conversejs .form-control:invalid~.invalid-feedback,.was-validated #conversejs .form-control:invalid~.invalid-tooltip{display:block}#conversejs textarea.form-control.is-invalid,.was-validated #conversejs textarea.form-control:invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}#conversejs .custom-select.is-invalid,.was-validated #conversejs .custom-select:invalid{border-color:#dc3545;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}#conversejs .custom-select.is-invalid:focus,.was-validated #conversejs .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .custom-select.is-invalid~.invalid-feedback,#conversejs .custom-select.is-invalid~.invalid-tooltip,.was-validated #conversejs .custom-select:invalid~.invalid-feedback,.was-validated #conversejs .custom-select:invalid~.invalid-tooltip{display:block}#conversejs .form-control-file.is-invalid~.invalid-feedback,#conversejs .form-control-file.is-invalid~.invalid-tooltip,.was-validated #conversejs .form-control-file:invalid~.invalid-feedback,.was-validated #conversejs .form-control-file:invalid~.invalid-tooltip{display:block}#conversejs .form-check-input.is-invalid~.form-check-label,.was-validated #conversejs .form-check-input:invalid~.form-check-label{color:#dc3545}#conversejs .form-check-input.is-invalid~.invalid-feedback,#conversejs .form-check-input.is-invalid~.invalid-tooltip,.was-validated #conversejs .form-check-input:invalid~.invalid-feedback,.was-validated #conversejs .form-check-input:invalid~.invalid-tooltip{display:block}#conversejs .custom-control-input.is-invalid~.custom-control-label,.was-validated #conversejs .custom-control-input:invalid~.custom-control-label{color:#dc3545}#conversejs .custom-control-input.is-invalid~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}#conversejs .custom-control-input.is-invalid~.invalid-feedback,#conversejs .custom-control-input.is-invalid~.invalid-tooltip,.was-validated #conversejs .custom-control-input:invalid~.invalid-feedback,.was-validated #conversejs .custom-control-input:invalid~.invalid-tooltip{display:block}#conversejs .custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}#conversejs .custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated #conversejs .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}#conversejs .custom-file-input.is-invalid~.custom-file-label,.was-validated #conversejs .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}#conversejs .custom-file-input.is-invalid~.invalid-feedback,#conversejs .custom-file-input.is-invalid~.invalid-tooltip,.was-validated #conversejs .custom-file-input:invalid~.invalid-feedback,.was-validated #conversejs .custom-file-input:invalid~.invalid-tooltip{display:block}#conversejs .custom-file-input.is-invalid:focus~.custom-file-label,.was-validated #conversejs .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}#conversejs .form-inline{display:flex;flex-flow:row wrap;align-items:center}#conversejs .form-inline .form-check{width:100%}@media (min-width:576px){#conversejs .form-inline label{display:flex;align-items:center;justify-content:center;margin-bottom:0}#conversejs .form-inline .form-group{display:flex;flex:0 0 auto;flex-flow:row wrap;align-items:center;margin-bottom:0}#conversejs .form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}#conversejs .form-inline .form-control-plaintext{display:inline-block}#conversejs .form-inline .custom-select,#conversejs .form-inline .input-group{width:auto}#conversejs .form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}#conversejs .form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}#conversejs .form-inline .custom-control{align-items:center;justify-content:center}#conversejs .form-inline .custom-control-label{margin-bottom:0}}#conversejs .btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .btn{transition:none}}#conversejs .btn:hover{color:#212529;text-decoration:none}#conversejs .btn.focus,#conversejs .btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .btn.disabled,#conversejs .btn:disabled{opacity:.65}#conversejs a.btn.disabled,#conversejs fieldset:disabled a.btn{pointer-events:none}#conversejs .btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}#conversejs .btn-primary.focus,#conversejs .btn-primary:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}#conversejs .btn-primary.disabled,#conversejs .btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-primary:not(:disabled):not(.disabled).active,#conversejs .btn-primary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}#conversejs .btn-primary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-primary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}#conversejs .btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}#conversejs .btn-secondary.focus,#conversejs .btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}#conversejs .btn-secondary.disabled,#conversejs .btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-secondary:not(:disabled):not(.disabled).active,#conversejs .btn-secondary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}#conversejs .btn-secondary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-secondary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}#conversejs .btn-success{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}#conversejs .btn-success.focus,#conversejs .btn-success:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}#conversejs .btn-success.disabled,#conversejs .btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-success:not(:disabled):not(.disabled).active,#conversejs .btn-success:not(:disabled):not(.disabled):active,.show>#conversejs .btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}#conversejs .btn-success:not(:disabled):not(.disabled).active:focus,#conversejs .btn-success:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}#conversejs .btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}#conversejs .btn-info.focus,#conversejs .btn-info:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}#conversejs .btn-info.disabled,#conversejs .btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-info:not(:disabled):not(.disabled).active,#conversejs .btn-info:not(:disabled):not(.disabled):active,.show>#conversejs .btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}#conversejs .btn-info:not(:disabled):not(.disabled).active:focus,#conversejs .btn-info:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}#conversejs .btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}#conversejs .btn-warning.focus,#conversejs .btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}#conversejs .btn-warning.disabled,#conversejs .btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-warning:not(:disabled):not(.disabled).active,#conversejs .btn-warning:not(:disabled):not(.disabled):active,.show>#conversejs .btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}#conversejs .btn-warning:not(:disabled):not(.disabled).active:focus,#conversejs .btn-warning:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}#conversejs .btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}#conversejs .btn-danger.focus,#conversejs .btn-danger:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}#conversejs .btn-danger.disabled,#conversejs .btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-danger:not(:disabled):not(.disabled).active,#conversejs .btn-danger:not(:disabled):not(.disabled):active,.show>#conversejs .btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}#conversejs .btn-danger:not(:disabled):not(.disabled).active:focus,#conversejs .btn-danger:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}#conversejs .btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}#conversejs .btn-light.focus,#conversejs .btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}#conversejs .btn-light.disabled,#conversejs .btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-light:not(:disabled):not(.disabled).active,#conversejs .btn-light:not(:disabled):not(.disabled):active,.show>#conversejs .btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}#conversejs .btn-light:not(:disabled):not(.disabled).active:focus,#conversejs .btn-light:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}#conversejs .btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}#conversejs .btn-dark.focus,#conversejs .btn-dark:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}#conversejs .btn-dark.disabled,#conversejs .btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-dark:not(:disabled):not(.disabled).active,#conversejs .btn-dark:not(:disabled):not(.disabled):active,.show>#conversejs .btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}#conversejs .btn-dark:not(:disabled):not(.disabled).active:focus,#conversejs .btn-dark:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}#conversejs .btn-outline-primary{color:#007bff;border-color:#007bff}#conversejs .btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-outline-primary.focus,#conversejs .btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}#conversejs .btn-outline-primary.disabled,#conversejs .btn-outline-primary:disabled{color:#007bff;background-color:transparent}#conversejs .btn-outline-primary:not(:disabled):not(.disabled).active,#conversejs .btn-outline-primary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .btn-outline-primary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}#conversejs .btn-outline-secondary{color:#6c757d;border-color:#6c757d}#conversejs .btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-outline-secondary.focus,#conversejs .btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}#conversejs .btn-outline-secondary.disabled,#conversejs .btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}#conversejs .btn-outline-secondary:not(:disabled):not(.disabled).active,#conversejs .btn-outline-secondary:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}#conversejs .btn-outline-secondary:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}#conversejs .btn-outline-success{color:#28a745;border-color:#28a745}#conversejs .btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-outline-success.focus,#conversejs .btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}#conversejs .btn-outline-success.disabled,#conversejs .btn-outline-success:disabled{color:#28a745;background-color:transparent}#conversejs .btn-outline-success:not(:disabled):not(.disabled).active,#conversejs .btn-outline-success:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}#conversejs .btn-outline-success:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}#conversejs .btn-outline-info{color:#17a2b8;border-color:#17a2b8}#conversejs .btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-outline-info.focus,#conversejs .btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}#conversejs .btn-outline-info.disabled,#conversejs .btn-outline-info:disabled{color:#17a2b8;background-color:transparent}#conversejs .btn-outline-info:not(:disabled):not(.disabled).active,#conversejs .btn-outline-info:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}#conversejs .btn-outline-info:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}#conversejs .btn-outline-warning{color:#ffc107;border-color:#ffc107}#conversejs .btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-outline-warning.focus,#conversejs .btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}#conversejs .btn-outline-warning.disabled,#conversejs .btn-outline-warning:disabled{color:#ffc107;background-color:transparent}#conversejs .btn-outline-warning:not(:disabled):not(.disabled).active,#conversejs .btn-outline-warning:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}#conversejs .btn-outline-warning:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}#conversejs .btn-outline-danger{color:#dc3545;border-color:#dc3545}#conversejs .btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-outline-danger.focus,#conversejs .btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}#conversejs .btn-outline-danger.disabled,#conversejs .btn-outline-danger:disabled{color:#dc3545;background-color:transparent}#conversejs .btn-outline-danger:not(:disabled):not(.disabled).active,#conversejs .btn-outline-danger:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}#conversejs .btn-outline-danger:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}#conversejs .btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-outline-light.focus,#conversejs .btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}#conversejs .btn-outline-light.disabled,#conversejs .btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}#conversejs .btn-outline-light:not(:disabled):not(.disabled).active,#conversejs .btn-outline-light:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}#conversejs .btn-outline-light:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}#conversejs .btn-outline-dark{color:#343a40;border-color:#343a40}#conversejs .btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-outline-dark.focus,#conversejs .btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}#conversejs .btn-outline-dark.disabled,#conversejs .btn-outline-dark:disabled{color:#343a40;background-color:transparent}#conversejs .btn-outline-dark:not(:disabled):not(.disabled).active,#conversejs .btn-outline-dark:not(:disabled):not(.disabled):active,.show>#conversejs .btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}#conversejs .btn-outline-dark:not(:disabled):not(.disabled).active:focus,#conversejs .btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>#conversejs .btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}#conversejs .btn-link{font-weight:400;color:#007bff;text-decoration:none}#conversejs .btn-link:hover{color:#0056b3;text-decoration:underline}#conversejs .btn-link.focus,#conversejs .btn-link:focus{text-decoration:underline;box-shadow:none}#conversejs .btn-link.disabled,#conversejs .btn-link:disabled{color:#6c757d;pointer-events:none}#conversejs .btn-group-lg>.btn,#conversejs .btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}#conversejs .btn-group-sm>.btn,#conversejs .btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}#conversejs .btn-block{display:block;width:100%}#conversejs .btn-block+.btn-block{margin-top:.5rem}#conversejs input[type=button].btn-block,#conversejs input[type=reset].btn-block,#conversejs input[type=submit].btn-block{width:100%}#conversejs .fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){#conversejs .fade{transition:none}}#conversejs .fade:not(.show){opacity:0}#conversejs .collapse:not(.show){display:none}#conversejs .collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){#conversejs .collapsing{transition:none}}#conversejs .dropdown,#conversejs .dropleft,#conversejs .dropright,#conversejs .dropup{position:relative}#conversejs .dropdown-toggle{white-space:nowrap}#conversejs .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}#conversejs .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}#conversejs .dropdown-menu-left{right:auto;left:0}#conversejs .dropdown-menu-right{right:0;left:auto}@media (min-width:576px){#conversejs .dropdown-menu-sm-left{right:auto;left:0}#conversejs .dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){#conversejs .dropdown-menu-md-left{right:auto;left:0}#conversejs .dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){#conversejs .dropdown-menu-lg-left{right:auto;left:0}#conversejs .dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){#conversejs .dropdown-menu-xl-left{right:auto;left:0}#conversejs .dropdown-menu-xl-right{right:0;left:auto}}#conversejs .dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}#conversejs .dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}#conversejs .dropup .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}#conversejs .dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}#conversejs .dropright .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropright .dropdown-toggle::after{vertical-align:0}#conversejs .dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}#conversejs .dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}#conversejs .dropleft .dropdown-toggle::after{display:none}#conversejs .dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}#conversejs .dropleft .dropdown-toggle:empty::after{margin-left:0}#conversejs .dropleft .dropdown-toggle::before{vertical-align:0}#conversejs .dropdown-menu[x-placement^=bottom],#conversejs .dropdown-menu[x-placement^=left],#conversejs .dropdown-menu[x-placement^=right],#conversejs .dropdown-menu[x-placement^=top]{right:auto;bottom:auto}#conversejs .dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}#conversejs .dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}#conversejs .dropdown-item:focus,#conversejs .dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}#conversejs .dropdown-item.active,#conversejs .dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}#conversejs .dropdown-item.disabled,#conversejs .dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}#conversejs .dropdown-menu.show{display:block}#conversejs .dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}#conversejs .dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}#conversejs .btn-group,#conversejs .btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}#conversejs .btn-group-vertical>.btn,#conversejs .btn-group>.btn{position:relative;flex:1 1 auto}#conversejs .btn-group-vertical>.btn:hover,#conversejs .btn-group>.btn:hover{z-index:1}#conversejs .btn-group-vertical>.btn.active,#conversejs .btn-group-vertical>.btn:active,#conversejs .btn-group-vertical>.btn:focus,#conversejs .btn-group>.btn.active,#conversejs .btn-group>.btn:active,#conversejs .btn-group>.btn:focus{z-index:1}#conversejs .btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}#conversejs .btn-toolbar .input-group{width:auto}#conversejs .btn-group>.btn-group:not(:first-child),#conversejs .btn-group>.btn:not(:first-child){margin-left:-1px}#conversejs .btn-group>.btn-group:not(:last-child)>.btn,#conversejs .btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .btn-group>.btn-group:not(:first-child)>.btn,#conversejs .btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}#conversejs .dropdown-toggle-split::after,.dropright #conversejs .dropdown-toggle-split::after,.dropup #conversejs .dropdown-toggle-split::after{margin-left:0}.dropleft #conversejs .dropdown-toggle-split::before{margin-right:0}#conversejs .btn-group-sm>.btn+.dropdown-toggle-split,#conversejs .btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}#conversejs .btn-group-lg>.btn+.dropdown-toggle-split,#conversejs .btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}#conversejs .btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}#conversejs .btn-group-vertical>.btn,#conversejs .btn-group-vertical>.btn-group{width:100%}#conversejs .btn-group-vertical>.btn-group:not(:first-child),#conversejs .btn-group-vertical>.btn:not(:first-child){margin-top:-1px}#conversejs .btn-group-vertical>.btn-group:not(:last-child)>.btn,#conversejs .btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}#conversejs .btn-group-vertical>.btn-group:not(:first-child)>.btn,#conversejs .btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}#conversejs .btn-group-toggle>.btn,#conversejs .btn-group-toggle>.btn-group>.btn{margin-bottom:0}#conversejs .btn-group-toggle>.btn input[type=checkbox],#conversejs .btn-group-toggle>.btn input[type=radio],#conversejs .btn-group-toggle>.btn-group>.btn input[type=checkbox],#conversejs .btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}#conversejs .input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}#conversejs .input-group>.custom-file,#conversejs .input-group>.custom-select,#conversejs .input-group>.form-control,#conversejs .input-group>.form-control-plaintext{position:relative;flex:1 1 auto;width:1%;margin-bottom:0}#conversejs .input-group>.custom-file+.custom-file,#conversejs .input-group>.custom-file+.custom-select,#conversejs .input-group>.custom-file+.form-control,#conversejs .input-group>.custom-select+.custom-file,#conversejs .input-group>.custom-select+.custom-select,#conversejs .input-group>.custom-select+.form-control,#conversejs .input-group>.form-control+.custom-file,#conversejs .input-group>.form-control+.custom-select,#conversejs .input-group>.form-control+.form-control,#conversejs .input-group>.form-control-plaintext+.custom-file,#conversejs .input-group>.form-control-plaintext+.custom-select,#conversejs .input-group>.form-control-plaintext+.form-control{margin-left:-1px}#conversejs .input-group>.custom-file .custom-file-input:focus~.custom-file-label,#conversejs .input-group>.custom-select:focus,#conversejs .input-group>.form-control:focus{z-index:3}#conversejs .input-group>.custom-file .custom-file-input:focus{z-index:4}#conversejs .input-group>.custom-select:not(:last-child),#conversejs .input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .input-group>.custom-select:not(:first-child),#conversejs .input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .input-group>.custom-file{display:flex;align-items:center}#conversejs .input-group>.custom-file:not(:last-child) .custom-file-label,#conversejs .input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .input-group-append,#conversejs .input-group-prepend{display:flex}#conversejs .input-group-append .btn,#conversejs .input-group-prepend .btn{position:relative;z-index:2}#conversejs .input-group-append .btn:focus,#conversejs .input-group-prepend .btn:focus{z-index:3}#conversejs .input-group-append .btn+.btn,#conversejs .input-group-append .btn+.input-group-text,#conversejs .input-group-append .input-group-text+.btn,#conversejs .input-group-append .input-group-text+.input-group-text,#conversejs .input-group-prepend .btn+.btn,#conversejs .input-group-prepend .btn+.input-group-text,#conversejs .input-group-prepend .input-group-text+.btn,#conversejs .input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}#conversejs .input-group-prepend{margin-right:-1px}#conversejs .input-group-append{margin-left:-1px}#conversejs .input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}#conversejs .input-group-text input[type=checkbox],#conversejs .input-group-text input[type=radio]{margin-top:0}#conversejs .input-group-lg>.custom-select,#conversejs .input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}#conversejs .input-group-lg>.custom-select,#conversejs .input-group-lg>.form-control,#conversejs .input-group-lg>.input-group-append>.btn,#conversejs .input-group-lg>.input-group-append>.input-group-text,#conversejs .input-group-lg>.input-group-prepend>.btn,#conversejs .input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}#conversejs .input-group-sm>.custom-select,#conversejs .input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}#conversejs .input-group-sm>.custom-select,#conversejs .input-group-sm>.form-control,#conversejs .input-group-sm>.input-group-append>.btn,#conversejs .input-group-sm>.input-group-append>.input-group-text,#conversejs .input-group-sm>.input-group-prepend>.btn,#conversejs .input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}#conversejs .input-group-lg>.custom-select,#conversejs .input-group-sm>.custom-select{padding-right:1.75rem}#conversejs .input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),#conversejs .input-group>.input-group-append:last-child>.input-group-text:not(:last-child),#conversejs .input-group>.input-group-append:not(:last-child)>.btn,#conversejs .input-group>.input-group-append:not(:last-child)>.input-group-text,#conversejs .input-group>.input-group-prepend>.btn,#conversejs .input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}#conversejs .input-group>.input-group-append>.btn,#conversejs .input-group>.input-group-append>.input-group-text,#conversejs .input-group>.input-group-prepend:first-child>.btn:not(:first-child),#conversejs .input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),#conversejs .input-group>.input-group-prepend:not(:first-child)>.btn,#conversejs .input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}#conversejs .custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}#conversejs .custom-control-inline{display:inline-flex;margin-right:1rem}#conversejs .custom-control-input{position:absolute;z-index:-1;opacity:0}#conversejs .custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}#conversejs .custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}#conversejs .custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}#conversejs .custom-control-input:disabled~.custom-control-label{color:#6c757d}#conversejs .custom-control-input:disabled~.custom-control-label::before{background-color:#e9ecef}#conversejs .custom-control-label{position:relative;margin-bottom:0;vertical-align:top}#conversejs .custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}#conversejs .custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:no-repeat 50%/50% 50%}#conversejs .custom-checkbox .custom-control-label::before{border-radius:.25rem}#conversejs .custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e")}#conversejs .custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}#conversejs .custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}#conversejs .custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-radio .custom-control-label::before{border-radius:50%}#conversejs .custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}#conversejs .custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-switch{padding-left:2.25rem}#conversejs .custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}#conversejs .custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .custom-switch .custom-control-label::after{transition:none}}#conversejs .custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;transform:translateX(.75rem)}#conversejs .custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}#conversejs .custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}#conversejs .custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-select:focus::-ms-value{color:#495057;background-color:#fff}#conversejs .custom-select[multiple],#conversejs .custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}#conversejs .custom-select:disabled{color:#6c757d;background-color:#e9ecef}#conversejs .custom-select::-ms-expand{display:none}#conversejs .custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}#conversejs .custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}#conversejs .custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}#conversejs .custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;opacity:0}#conversejs .custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-file-input:disabled~.custom-file-label{background-color:#e9ecef}#conversejs .custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}#conversejs .custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}#conversejs .custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}#conversejs .custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}#conversejs .custom-range{width:100%;height:calc(1rem + .4rem);padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}#conversejs .custom-range:focus{outline:0}#conversejs .custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}#conversejs .custom-range::-moz-focus-outer{border:0}#conversejs .custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){#conversejs .custom-range::-webkit-slider-thumb{transition:none}}#conversejs .custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}#conversejs .custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}#conversejs .custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){#conversejs .custom-range::-moz-range-thumb{transition:none}}#conversejs .custom-range::-moz-range-thumb:active{background-color:#b3d7ff}#conversejs .custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}#conversejs .custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){#conversejs .custom-range::-ms-thumb{transition:none}}#conversejs .custom-range::-ms-thumb:active{background-color:#b3d7ff}#conversejs .custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}#conversejs .custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}#conversejs .custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}#conversejs .custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}#conversejs .custom-range:disabled::-webkit-slider-runnable-track{cursor:default}#conversejs .custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}#conversejs .custom-range:disabled::-moz-range-track{cursor:default}#conversejs .custom-range:disabled::-ms-thumb{background-color:#adb5bd}#conversejs .custom-control-label::before,#conversejs .custom-file-label,#conversejs .custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .custom-control-label::before,#conversejs .custom-file-label,#conversejs .custom-select{transition:none}}#conversejs .nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}#conversejs .nav-link{display:block;padding:.5rem 1rem}#conversejs .nav-link:focus,#conversejs .nav-link:hover{text-decoration:none}#conversejs .nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}#conversejs .nav-tabs{border-bottom:1px solid #dee2e6}#conversejs .nav-tabs .nav-item{margin-bottom:-1px}#conversejs .nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}#conversejs .nav-tabs .nav-link:focus,#conversejs .nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}#conversejs .nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}#conversejs .nav-tabs .nav-item.show .nav-link,#conversejs .nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}#conversejs .nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}#conversejs .nav-pills .nav-link{border-radius:.25rem}#conversejs .nav-pills .nav-link.active,#conversejs .nav-pills .show>.nav-link{color:#fff;background-color:#007bff}#conversejs .nav-fill .nav-item{flex:1 1 auto;text-align:center}#conversejs .nav-justified .nav-item{flex-basis:0;flex-grow:1;text-align:center}#conversejs .tab-content>.tab-pane{display:none}#conversejs .tab-content>.active{display:block}#conversejs .badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){#conversejs .badge{transition:none}}a#conversejs .badge:focus,a#conversejs .badge:hover{text-decoration:none}#conversejs .badge:empty{display:none}#conversejs .btn .badge{position:relative;top:-1px}#conversejs .badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}#conversejs .badge-primary{color:#fff;background-color:#007bff}a#conversejs .badge-primary:focus,a#conversejs .badge-primary:hover{color:#fff;background-color:#0062cc}a#conversejs .badge-primary.focus,a#conversejs .badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}#conversejs .badge-secondary{color:#fff;background-color:#6c757d}a#conversejs .badge-secondary:focus,a#conversejs .badge-secondary:hover{color:#fff;background-color:#545b62}a#conversejs .badge-secondary.focus,a#conversejs .badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}#conversejs .badge-success{color:#fff;background-color:#28a745}a#conversejs .badge-success:focus,a#conversejs .badge-success:hover{color:#fff;background-color:#1e7e34}a#conversejs .badge-success.focus,a#conversejs .badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}#conversejs .badge-info{color:#fff;background-color:#17a2b8}a#conversejs .badge-info:focus,a#conversejs .badge-info:hover{color:#fff;background-color:#117a8b}a#conversejs .badge-info.focus,a#conversejs .badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}#conversejs .badge-warning{color:#212529;background-color:#ffc107}a#conversejs .badge-warning:focus,a#conversejs .badge-warning:hover{color:#212529;background-color:#d39e00}a#conversejs .badge-warning.focus,a#conversejs .badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}#conversejs .badge-danger{color:#fff;background-color:#dc3545}a#conversejs .badge-danger:focus,a#conversejs .badge-danger:hover{color:#fff;background-color:#bd2130}a#conversejs .badge-danger.focus,a#conversejs .badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}#conversejs .badge-light{color:#212529;background-color:#f8f9fa}a#conversejs .badge-light:focus,a#conversejs .badge-light:hover{color:#212529;background-color:#dae0e5}a#conversejs .badge-light.focus,a#conversejs .badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}#conversejs .badge-dark{color:#fff;background-color:#343a40}a#conversejs .badge-dark:focus,a#conversejs .badge-dark:hover{color:#fff;background-color:#1d2124}a#conversejs .badge-dark.focus,a#conversejs .badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}#conversejs .alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}#conversejs .alert-heading{color:inherit}#conversejs .alert-link{font-weight:700}#conversejs .alert-dismissible{padding-right:4rem}#conversejs .alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}#conversejs .alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}#conversejs .alert-primary hr{border-top-color:#9fcdff}#conversejs .alert-primary .alert-link{color:#002752}#conversejs .alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}#conversejs .alert-secondary hr{border-top-color:#c8cbcf}#conversejs .alert-secondary .alert-link{color:#202326}#conversejs .alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}#conversejs .alert-success hr{border-top-color:#b1dfbb}#conversejs .alert-success .alert-link{color:#0b2e13}#conversejs .alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}#conversejs .alert-info hr{border-top-color:#abdde5}#conversejs .alert-info .alert-link{color:#062c33}#conversejs .alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}#conversejs .alert-warning hr{border-top-color:#ffe8a1}#conversejs .alert-warning .alert-link{color:#533f03}#conversejs .alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}#conversejs .alert-danger hr{border-top-color:#f1b0b7}#conversejs .alert-danger .alert-link{color:#491217}#conversejs .alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}#conversejs .alert-light hr{border-top-color:#ececf6}#conversejs .alert-light .alert-link{color:#686868}#conversejs .alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}#conversejs .alert-dark hr{border-top-color:#b9bbbe}#conversejs .alert-dark .alert-link{color:#040505}#conversejs .media{display:flex;align-items:flex-start}#conversejs .media-body{flex:1}#conversejs .list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0}#conversejs .list-group-item-action{width:100%;color:#495057;text-align:inherit}#conversejs .list-group-item-action:focus,#conversejs .list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}#conversejs .list-group-item-action:active{color:#212529;background-color:#e9ecef}#conversejs .list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}#conversejs .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}#conversejs .list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}#conversejs .list-group-item.disabled,#conversejs .list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}#conversejs .list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}#conversejs .list-group-horizontal{flex-direction:row}#conversejs .list-group-horizontal .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}@media (min-width:576px){#conversejs .list-group-horizontal-sm{flex-direction:row}#conversejs .list-group-horizontal-sm .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-sm .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-sm .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:768px){#conversejs .list-group-horizontal-md{flex-direction:row}#conversejs .list-group-horizontal-md .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-md .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-md .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:992px){#conversejs .list-group-horizontal-lg{flex-direction:row}#conversejs .list-group-horizontal-lg .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-lg .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-lg .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:1200px){#conversejs .list-group-horizontal-xl{flex-direction:row}#conversejs .list-group-horizontal-xl .list-group-item{margin-right:-1px;margin-bottom:0}#conversejs .list-group-horizontal-xl .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}#conversejs .list-group-horizontal-xl .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}#conversejs .list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}#conversejs .list-group-flush .list-group-item:last-child{margin-bottom:-1px}#conversejs .list-group-flush:first-child .list-group-item:first-child{border-top:0}#conversejs .list-group-flush:last-child .list-group-item:last-child{margin-bottom:0;border-bottom:0}#conversejs .list-group-item-primary{color:#004085;background-color:#b8daff}#conversejs .list-group-item-primary.list-group-item-action:focus,#conversejs .list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}#conversejs .list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}#conversejs .list-group-item-secondary{color:#383d41;background-color:#d6d8db}#conversejs .list-group-item-secondary.list-group-item-action:focus,#conversejs .list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}#conversejs .list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}#conversejs .list-group-item-success{color:#155724;background-color:#c3e6cb}#conversejs .list-group-item-success.list-group-item-action:focus,#conversejs .list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}#conversejs .list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}#conversejs .list-group-item-info{color:#0c5460;background-color:#bee5eb}#conversejs .list-group-item-info.list-group-item-action:focus,#conversejs .list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}#conversejs .list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}#conversejs .list-group-item-warning{color:#856404;background-color:#ffeeba}#conversejs .list-group-item-warning.list-group-item-action:focus,#conversejs .list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}#conversejs .list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}#conversejs .list-group-item-danger{color:#721c24;background-color:#f5c6cb}#conversejs .list-group-item-danger.list-group-item-action:focus,#conversejs .list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}#conversejs .list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}#conversejs .list-group-item-light{color:#818182;background-color:#fdfdfe}#conversejs .list-group-item-light.list-group-item-action:focus,#conversejs .list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}#conversejs .list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}#conversejs .list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}#conversejs .list-group-item-dark.list-group-item-action:focus,#conversejs .list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}#conversejs .list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}#conversejs .close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}#conversejs .close:hover{color:#000;text-decoration:none}#conversejs .close:not(:disabled):not(.disabled):focus,#conversejs .close:not(:disabled):not(.disabled):hover{opacity:.75}#conversejs button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}#conversejs a.close.disabled{pointer-events:none}#conversejs .modal-open{overflow:hidden}#conversejs .modal-open .modal{overflow-x:hidden;overflow-y:auto}#conversejs .modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}#conversejs .modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade #conversejs .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade #conversejs .modal-dialog{transition:none}}.modal.show #conversejs .modal-dialog{transform:none}#conversejs .modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}#conversejs .modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}#conversejs .modal-dialog-scrollable .modal-footer,#conversejs .modal-dialog-scrollable .modal-header{flex-shrink:0}#conversejs .modal-dialog-scrollable .modal-body{overflow-y:auto}#conversejs .modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}#conversejs .modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);content:""}#conversejs .modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}#conversejs .modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}#conversejs .modal-dialog-centered.modal-dialog-scrollable::before{content:none}#conversejs .modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}#conversejs .modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}#conversejs .modal-backdrop.fade{opacity:0}#conversejs .modal-backdrop.show{opacity:.5}#conversejs .modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:.3rem;border-top-right-radius:.3rem}#conversejs .modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}#conversejs .modal-title{margin-bottom:0;line-height:1.5}#conversejs .modal-body{position:relative;flex:1 1 auto;padding:1rem}#conversejs .modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:.3rem;border-bottom-left-radius:.3rem}#conversejs .modal-footer>:not(:first-child){margin-left:.25rem}#conversejs .modal-footer>:not(:last-child){margin-right:.25rem}#conversejs .modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){#conversejs .modal-dialog{max-width:500px;margin:1.75rem auto}#conversejs .modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}#conversejs .modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}#conversejs .modal-dialog-centered{min-height:calc(100% - 3.5rem)}#conversejs .modal-dialog-centered::before{height:calc(100vh - 3.5rem)}#conversejs .modal-sm{max-width:300px}}@media (min-width:992px){#conversejs .modal-lg,#conversejs .modal-xl{max-width:800px}}@media (min-width:1200px){#conversejs .modal-xl{max-width:1140px}}#conversejs .tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}#conversejs .tooltip.show{opacity:.9}#conversejs .tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}#conversejs .tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}#conversejs .bs-tooltip-auto[x-placement^=top],#conversejs .bs-tooltip-top{padding:.4rem 0}#conversejs .bs-tooltip-auto[x-placement^=top] .arrow,#conversejs .bs-tooltip-top .arrow{bottom:0}#conversejs .bs-tooltip-auto[x-placement^=top] .arrow::before,#conversejs .bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}#conversejs .bs-tooltip-auto[x-placement^=right],#conversejs .bs-tooltip-right{padding:0 .4rem}#conversejs .bs-tooltip-auto[x-placement^=right] .arrow,#conversejs .bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}#conversejs .bs-tooltip-auto[x-placement^=right] .arrow::before,#conversejs .bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}#conversejs .bs-tooltip-auto[x-placement^=bottom],#conversejs .bs-tooltip-bottom{padding:.4rem 0}#conversejs .bs-tooltip-auto[x-placement^=bottom] .arrow,#conversejs .bs-tooltip-bottom .arrow{top:0}#conversejs .bs-tooltip-auto[x-placement^=bottom] .arrow::before,#conversejs .bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}#conversejs .bs-tooltip-auto[x-placement^=left],#conversejs .bs-tooltip-left{padding:0 .4rem}#conversejs .bs-tooltip-auto[x-placement^=left] .arrow,#conversejs .bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}#conversejs .bs-tooltip-auto[x-placement^=left] .arrow::before,#conversejs .bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}#conversejs .tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}#conversejs .popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}#conversejs .popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}#conversejs .popover .arrow::after,#conversejs .popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}#conversejs .bs-popover-auto[x-placement^=top],#conversejs .bs-popover-top{margin-bottom:.5rem}#conversejs .bs-popover-auto[x-placement^=top]>.arrow,#conversejs .bs-popover-top>.arrow{bottom:calc((.5rem + 1px) * -1)}#conversejs .bs-popover-auto[x-placement^=top]>.arrow::before,#conversejs .bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=top]>.arrow::after,#conversejs .bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}#conversejs .bs-popover-auto[x-placement^=right],#conversejs .bs-popover-right{margin-left:.5rem}#conversejs .bs-popover-auto[x-placement^=right]>.arrow,#conversejs .bs-popover-right>.arrow{left:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}#conversejs .bs-popover-auto[x-placement^=right]>.arrow::before,#conversejs .bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=right]>.arrow::after,#conversejs .bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}#conversejs .bs-popover-auto[x-placement^=bottom],#conversejs .bs-popover-bottom{margin-top:.5rem}#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow,#conversejs .bs-popover-bottom>.arrow{top:calc((.5rem + 1px) * -1)}#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow::before,#conversejs .bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=bottom]>.arrow::after,#conversejs .bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}#conversejs .bs-popover-auto[x-placement^=bottom] .popover-header::before,#conversejs .bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}#conversejs .bs-popover-auto[x-placement^=left],#conversejs .bs-popover-left{margin-right:.5rem}#conversejs .bs-popover-auto[x-placement^=left]>.arrow,#conversejs .bs-popover-left>.arrow{right:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}#conversejs .bs-popover-auto[x-placement^=left]>.arrow::before,#conversejs .bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}#conversejs .bs-popover-auto[x-placement^=left]>.arrow::after,#conversejs .bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}#conversejs .popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}#conversejs .popover-header:empty{display:none}#conversejs .popover-body{padding:.5rem .75rem;color:#212529}#conversejs .align-baseline{vertical-align:baseline!important}#conversejs .align-top{vertical-align:top!important}#conversejs .align-middle{vertical-align:middle!important}#conversejs .align-bottom{vertical-align:bottom!important}#conversejs .align-text-bottom{vertical-align:text-bottom!important}#conversejs .align-text-top{vertical-align:text-top!important}#conversejs .bg-primary{background-color:#007bff!important}#conversejs a.bg-primary:focus,#conversejs a.bg-primary:hover,#conversejs button.bg-primary:focus,#conversejs button.bg-primary:hover{background-color:#0062cc!important}#conversejs .bg-secondary{background-color:#6c757d!important}#conversejs a.bg-secondary:focus,#conversejs a.bg-secondary:hover,#conversejs button.bg-secondary:focus,#conversejs button.bg-secondary:hover{background-color:#545b62!important}#conversejs .bg-success{background-color:#28a745!important}#conversejs a.bg-success:focus,#conversejs a.bg-success:hover,#conversejs button.bg-success:focus,#conversejs button.bg-success:hover{background-color:#1e7e34!important}#conversejs .bg-info{background-color:#17a2b8!important}#conversejs a.bg-info:focus,#conversejs a.bg-info:hover,#conversejs button.bg-info:focus,#conversejs button.bg-info:hover{background-color:#117a8b!important}#conversejs .bg-warning{background-color:#ffc107!important}#conversejs a.bg-warning:focus,#conversejs a.bg-warning:hover,#conversejs button.bg-warning:focus,#conversejs button.bg-warning:hover{background-color:#d39e00!important}#conversejs .bg-danger{background-color:#dc3545!important}#conversejs a.bg-danger:focus,#conversejs a.bg-danger:hover,#conversejs button.bg-danger:focus,#conversejs button.bg-danger:hover{background-color:#bd2130!important}#conversejs .bg-light{background-color:#f8f9fa!important}#conversejs a.bg-light:focus,#conversejs a.bg-light:hover,#conversejs button.bg-light:focus,#conversejs button.bg-light:hover{background-color:#dae0e5!important}#conversejs .bg-dark{background-color:#343a40!important}#conversejs a.bg-dark:focus,#conversejs a.bg-dark:hover,#conversejs button.bg-dark:focus,#conversejs button.bg-dark:hover{background-color:#1d2124!important}#conversejs .bg-white{background-color:#fff!important}#conversejs .bg-transparent{background-color:transparent!important}#conversejs .border{border:1px solid #dee2e6!important}#conversejs .border-top{border-top:1px solid #dee2e6!important}#conversejs .border-right{border-right:1px solid #dee2e6!important}#conversejs .border-bottom{border-bottom:1px solid #dee2e6!important}#conversejs .border-left{border-left:1px solid #dee2e6!important}#conversejs .border-0{border:0!important}#conversejs .border-top-0{border-top:0!important}#conversejs .border-right-0{border-right:0!important}#conversejs .border-bottom-0{border-bottom:0!important}#conversejs .border-left-0{border-left:0!important}#conversejs .border-primary{border-color:#007bff!important}#conversejs .border-secondary{border-color:#6c757d!important}#conversejs .border-success{border-color:#28a745!important}#conversejs .border-info{border-color:#17a2b8!important}#conversejs .border-warning{border-color:#ffc107!important}#conversejs .border-danger{border-color:#dc3545!important}#conversejs .border-light{border-color:#f8f9fa!important}#conversejs .border-dark{border-color:#343a40!important}#conversejs .border-white{border-color:#fff!important}#conversejs .rounded-sm{border-radius:.2rem!important}#conversejs .rounded{border-radius:.25rem!important}#conversejs .rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}#conversejs .rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}#conversejs .rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}#conversejs .rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}#conversejs .rounded-lg{border-radius:.3rem!important}#conversejs .rounded-circle{border-radius:50%!important}#conversejs .rounded-pill{border-radius:50rem!important}#conversejs .rounded-0{border-radius:0!important}#conversejs .clearfix::after{display:block;clear:both;content:""}#conversejs .d-none{display:none!important}#conversejs .d-inline{display:inline!important}#conversejs .d-inline-block{display:inline-block!important}#conversejs .d-block{display:block!important}#conversejs .d-table{display:table!important}#conversejs .d-table-row{display:table-row!important}#conversejs .d-table-cell{display:table-cell!important}#conversejs .d-flex{display:flex!important}#conversejs .d-inline-flex{display:inline-flex!important}@media (min-width:576px){#conversejs .d-sm-none{display:none!important}#conversejs .d-sm-inline{display:inline!important}#conversejs .d-sm-inline-block{display:inline-block!important}#conversejs .d-sm-block{display:block!important}#conversejs .d-sm-table{display:table!important}#conversejs .d-sm-table-row{display:table-row!important}#conversejs .d-sm-table-cell{display:table-cell!important}#conversejs .d-sm-flex{display:flex!important}#conversejs .d-sm-inline-flex{display:inline-flex!important}}@media (min-width:768px){#conversejs .d-md-none{display:none!important}#conversejs .d-md-inline{display:inline!important}#conversejs .d-md-inline-block{display:inline-block!important}#conversejs .d-md-block{display:block!important}#conversejs .d-md-table{display:table!important}#conversejs .d-md-table-row{display:table-row!important}#conversejs .d-md-table-cell{display:table-cell!important}#conversejs .d-md-flex{display:flex!important}#conversejs .d-md-inline-flex{display:inline-flex!important}}@media (min-width:992px){#conversejs .d-lg-none{display:none!important}#conversejs .d-lg-inline{display:inline!important}#conversejs .d-lg-inline-block{display:inline-block!important}#conversejs .d-lg-block{display:block!important}#conversejs .d-lg-table{display:table!important}#conversejs .d-lg-table-row{display:table-row!important}#conversejs .d-lg-table-cell{display:table-cell!important}#conversejs .d-lg-flex{display:flex!important}#conversejs .d-lg-inline-flex{display:inline-flex!important}}@media (min-width:1200px){#conversejs .d-xl-none{display:none!important}#conversejs .d-xl-inline{display:inline!important}#conversejs .d-xl-inline-block{display:inline-block!important}#conversejs .d-xl-block{display:block!important}#conversejs .d-xl-table{display:table!important}#conversejs .d-xl-table-row{display:table-row!important}#conversejs .d-xl-table-cell{display:table-cell!important}#conversejs .d-xl-flex{display:flex!important}#conversejs .d-xl-inline-flex{display:inline-flex!important}}@media print{#conversejs .d-print-none{display:none!important}#conversejs .d-print-inline{display:inline!important}#conversejs .d-print-inline-block{display:inline-block!important}#conversejs .d-print-block{display:block!important}#conversejs .d-print-table{display:table!important}#conversejs .d-print-table-row{display:table-row!important}#conversejs .d-print-table-cell{display:table-cell!important}#conversejs .d-print-flex{display:flex!important}#conversejs .d-print-inline-flex{display:inline-flex!important}}#conversejs .embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}#conversejs .embed-responsive::before{display:block;content:""}#conversejs .embed-responsive .embed-responsive-item,#conversejs .embed-responsive embed,#conversejs .embed-responsive iframe,#conversejs .embed-responsive object,#conversejs .embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}#conversejs .embed-responsive-21by9::before{padding-top:42.85714%}#conversejs .embed-responsive-16by9::before{padding-top:56.25%}#conversejs .embed-responsive-4by3::before{padding-top:75%}#conversejs .embed-responsive-1by1::before{padding-top:100%}#conversejs .flex-row{flex-direction:row!important}#conversejs .flex-column{flex-direction:column!important}#conversejs .flex-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-wrap{flex-wrap:wrap!important}#conversejs .flex-nowrap{flex-wrap:nowrap!important}#conversejs .flex-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-fill{flex:1 1 auto!important}#conversejs .flex-grow-0{flex-grow:0!important}#conversejs .flex-grow-1{flex-grow:1!important}#conversejs .flex-shrink-0{flex-shrink:0!important}#conversejs .flex-shrink-1{flex-shrink:1!important}#conversejs .justify-content-start{justify-content:flex-start!important}#conversejs .justify-content-end{justify-content:flex-end!important}#conversejs .justify-content-center{justify-content:center!important}#conversejs .justify-content-between{justify-content:space-between!important}#conversejs .justify-content-around{justify-content:space-around!important}#conversejs .align-items-start{align-items:flex-start!important}#conversejs .align-items-end{align-items:flex-end!important}#conversejs .align-items-center{align-items:center!important}#conversejs .align-items-baseline{align-items:baseline!important}#conversejs .align-items-stretch{align-items:stretch!important}#conversejs .align-content-start{align-content:flex-start!important}#conversejs .align-content-end{align-content:flex-end!important}#conversejs .align-content-center{align-content:center!important}#conversejs .align-content-between{align-content:space-between!important}#conversejs .align-content-around{align-content:space-around!important}#conversejs .align-content-stretch{align-content:stretch!important}#conversejs .align-self-auto{align-self:auto!important}#conversejs .align-self-start{align-self:flex-start!important}#conversejs .align-self-end{align-self:flex-end!important}#conversejs .align-self-center{align-self:center!important}#conversejs .align-self-baseline{align-self:baseline!important}#conversejs .align-self-stretch{align-self:stretch!important}@media (min-width:576px){#conversejs .flex-sm-row{flex-direction:row!important}#conversejs .flex-sm-column{flex-direction:column!important}#conversejs .flex-sm-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-sm-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-sm-wrap{flex-wrap:wrap!important}#conversejs .flex-sm-nowrap{flex-wrap:nowrap!important}#conversejs .flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-sm-fill{flex:1 1 auto!important}#conversejs .flex-sm-grow-0{flex-grow:0!important}#conversejs .flex-sm-grow-1{flex-grow:1!important}#conversejs .flex-sm-shrink-0{flex-shrink:0!important}#conversejs .flex-sm-shrink-1{flex-shrink:1!important}#conversejs .justify-content-sm-start{justify-content:flex-start!important}#conversejs .justify-content-sm-end{justify-content:flex-end!important}#conversejs .justify-content-sm-center{justify-content:center!important}#conversejs .justify-content-sm-between{justify-content:space-between!important}#conversejs .justify-content-sm-around{justify-content:space-around!important}#conversejs .align-items-sm-start{align-items:flex-start!important}#conversejs .align-items-sm-end{align-items:flex-end!important}#conversejs .align-items-sm-center{align-items:center!important}#conversejs .align-items-sm-baseline{align-items:baseline!important}#conversejs .align-items-sm-stretch{align-items:stretch!important}#conversejs .align-content-sm-start{align-content:flex-start!important}#conversejs .align-content-sm-end{align-content:flex-end!important}#conversejs .align-content-sm-center{align-content:center!important}#conversejs .align-content-sm-between{align-content:space-between!important}#conversejs .align-content-sm-around{align-content:space-around!important}#conversejs .align-content-sm-stretch{align-content:stretch!important}#conversejs .align-self-sm-auto{align-self:auto!important}#conversejs .align-self-sm-start{align-self:flex-start!important}#conversejs .align-self-sm-end{align-self:flex-end!important}#conversejs .align-self-sm-center{align-self:center!important}#conversejs .align-self-sm-baseline{align-self:baseline!important}#conversejs .align-self-sm-stretch{align-self:stretch!important}}@media (min-width:768px){#conversejs .flex-md-row{flex-direction:row!important}#conversejs .flex-md-column{flex-direction:column!important}#conversejs .flex-md-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-md-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-md-wrap{flex-wrap:wrap!important}#conversejs .flex-md-nowrap{flex-wrap:nowrap!important}#conversejs .flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-md-fill{flex:1 1 auto!important}#conversejs .flex-md-grow-0{flex-grow:0!important}#conversejs .flex-md-grow-1{flex-grow:1!important}#conversejs .flex-md-shrink-0{flex-shrink:0!important}#conversejs .flex-md-shrink-1{flex-shrink:1!important}#conversejs .justify-content-md-start{justify-content:flex-start!important}#conversejs .justify-content-md-end{justify-content:flex-end!important}#conversejs .justify-content-md-center{justify-content:center!important}#conversejs .justify-content-md-between{justify-content:space-between!important}#conversejs .justify-content-md-around{justify-content:space-around!important}#conversejs .align-items-md-start{align-items:flex-start!important}#conversejs .align-items-md-end{align-items:flex-end!important}#conversejs .align-items-md-center{align-items:center!important}#conversejs .align-items-md-baseline{align-items:baseline!important}#conversejs .align-items-md-stretch{align-items:stretch!important}#conversejs .align-content-md-start{align-content:flex-start!important}#conversejs .align-content-md-end{align-content:flex-end!important}#conversejs .align-content-md-center{align-content:center!important}#conversejs .align-content-md-between{align-content:space-between!important}#conversejs .align-content-md-around{align-content:space-around!important}#conversejs .align-content-md-stretch{align-content:stretch!important}#conversejs .align-self-md-auto{align-self:auto!important}#conversejs .align-self-md-start{align-self:flex-start!important}#conversejs .align-self-md-end{align-self:flex-end!important}#conversejs .align-self-md-center{align-self:center!important}#conversejs .align-self-md-baseline{align-self:baseline!important}#conversejs .align-self-md-stretch{align-self:stretch!important}}@media (min-width:992px){#conversejs .flex-lg-row{flex-direction:row!important}#conversejs .flex-lg-column{flex-direction:column!important}#conversejs .flex-lg-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-lg-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-lg-wrap{flex-wrap:wrap!important}#conversejs .flex-lg-nowrap{flex-wrap:nowrap!important}#conversejs .flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-lg-fill{flex:1 1 auto!important}#conversejs .flex-lg-grow-0{flex-grow:0!important}#conversejs .flex-lg-grow-1{flex-grow:1!important}#conversejs .flex-lg-shrink-0{flex-shrink:0!important}#conversejs .flex-lg-shrink-1{flex-shrink:1!important}#conversejs .justify-content-lg-start{justify-content:flex-start!important}#conversejs .justify-content-lg-end{justify-content:flex-end!important}#conversejs .justify-content-lg-center{justify-content:center!important}#conversejs .justify-content-lg-between{justify-content:space-between!important}#conversejs .justify-content-lg-around{justify-content:space-around!important}#conversejs .align-items-lg-start{align-items:flex-start!important}#conversejs .align-items-lg-end{align-items:flex-end!important}#conversejs .align-items-lg-center{align-items:center!important}#conversejs .align-items-lg-baseline{align-items:baseline!important}#conversejs .align-items-lg-stretch{align-items:stretch!important}#conversejs .align-content-lg-start{align-content:flex-start!important}#conversejs .align-content-lg-end{align-content:flex-end!important}#conversejs .align-content-lg-center{align-content:center!important}#conversejs .align-content-lg-between{align-content:space-between!important}#conversejs .align-content-lg-around{align-content:space-around!important}#conversejs .align-content-lg-stretch{align-content:stretch!important}#conversejs .align-self-lg-auto{align-self:auto!important}#conversejs .align-self-lg-start{align-self:flex-start!important}#conversejs .align-self-lg-end{align-self:flex-end!important}#conversejs .align-self-lg-center{align-self:center!important}#conversejs .align-self-lg-baseline{align-self:baseline!important}#conversejs .align-self-lg-stretch{align-self:stretch!important}}@media (min-width:1200px){#conversejs .flex-xl-row{flex-direction:row!important}#conversejs .flex-xl-column{flex-direction:column!important}#conversejs .flex-xl-row-reverse{flex-direction:row-reverse!important}#conversejs .flex-xl-column-reverse{flex-direction:column-reverse!important}#conversejs .flex-xl-wrap{flex-wrap:wrap!important}#conversejs .flex-xl-nowrap{flex-wrap:nowrap!important}#conversejs .flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}#conversejs .flex-xl-fill{flex:1 1 auto!important}#conversejs .flex-xl-grow-0{flex-grow:0!important}#conversejs .flex-xl-grow-1{flex-grow:1!important}#conversejs .flex-xl-shrink-0{flex-shrink:0!important}#conversejs .flex-xl-shrink-1{flex-shrink:1!important}#conversejs .justify-content-xl-start{justify-content:flex-start!important}#conversejs .justify-content-xl-end{justify-content:flex-end!important}#conversejs .justify-content-xl-center{justify-content:center!important}#conversejs .justify-content-xl-between{justify-content:space-between!important}#conversejs .justify-content-xl-around{justify-content:space-around!important}#conversejs .align-items-xl-start{align-items:flex-start!important}#conversejs .align-items-xl-end{align-items:flex-end!important}#conversejs .align-items-xl-center{align-items:center!important}#conversejs .align-items-xl-baseline{align-items:baseline!important}#conversejs .align-items-xl-stretch{align-items:stretch!important}#conversejs .align-content-xl-start{align-content:flex-start!important}#conversejs .align-content-xl-end{align-content:flex-end!important}#conversejs .align-content-xl-center{align-content:center!important}#conversejs .align-content-xl-between{align-content:space-between!important}#conversejs .align-content-xl-around{align-content:space-around!important}#conversejs .align-content-xl-stretch{align-content:stretch!important}#conversejs .align-self-xl-auto{align-self:auto!important}#conversejs .align-self-xl-start{align-self:flex-start!important}#conversejs .align-self-xl-end{align-self:flex-end!important}#conversejs .align-self-xl-center{align-self:center!important}#conversejs .align-self-xl-baseline{align-self:baseline!important}#conversejs .align-self-xl-stretch{align-self:stretch!important}}#conversejs .float-left{float:left!important}#conversejs .float-right{float:right!important}#conversejs .float-none{float:none!important}@media (min-width:576px){#conversejs .float-sm-left{float:left!important}#conversejs .float-sm-right{float:right!important}#conversejs .float-sm-none{float:none!important}}@media (min-width:768px){#conversejs .float-md-left{float:left!important}#conversejs .float-md-right{float:right!important}#conversejs .float-md-none{float:none!important}}@media (min-width:992px){#conversejs .float-lg-left{float:left!important}#conversejs .float-lg-right{float:right!important}#conversejs .float-lg-none{float:none!important}}@media (min-width:1200px){#conversejs .float-xl-left{float:left!important}#conversejs .float-xl-right{float:right!important}#conversejs .float-xl-none{float:none!important}}#conversejs .overflow-auto{overflow:auto!important}#conversejs .overflow-hidden{overflow:hidden!important}#conversejs .position-static{position:static!important}#conversejs .position-relative{position:relative!important}#conversejs .position-absolute{position:absolute!important}#conversejs .position-fixed{position:fixed!important}#conversejs .position-sticky{position:-webkit-sticky!important;position:sticky!important}#conversejs .fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}#conversejs .fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){#conversejs .sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}#conversejs .sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#conversejs .sr-only-focusable:active,#conversejs .sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}#conversejs .shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}#conversejs .shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}#conversejs .shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}#conversejs .shadow-none{box-shadow:none!important}#conversejs .w-25{width:25%!important}#conversejs .w-50{width:50%!important}#conversejs .w-75{width:75%!important}#conversejs .w-100{width:100%!important}#conversejs .w-auto{width:auto!important}#conversejs .h-25{height:25%!important}#conversejs .h-50{height:50%!important}#conversejs .h-75{height:75%!important}#conversejs .h-100{height:100%!important}#conversejs .h-auto{height:auto!important}#conversejs .mw-100{max-width:100%!important}#conversejs .mh-100{max-height:100%!important}#conversejs .min-vw-100{min-width:100vw!important}#conversejs .min-vh-100{min-height:100vh!important}#conversejs .vw-100{width:100vw!important}#conversejs .vh-100{height:100vh!important}#conversejs .stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}#conversejs .m-0{margin:0!important}#conversejs .mt-0,#conversejs .my-0{margin-top:0!important}#conversejs .mr-0,#conversejs .mx-0{margin-right:0!important}#conversejs .mb-0,#conversejs .my-0{margin-bottom:0!important}#conversejs .ml-0,#conversejs .mx-0{margin-left:0!important}#conversejs .m-1{margin:.25rem!important}#conversejs .mt-1,#conversejs .my-1{margin-top:.25rem!important}#conversejs .mr-1,#conversejs .mx-1{margin-right:.25rem!important}#conversejs .mb-1,#conversejs .my-1{margin-bottom:.25rem!important}#conversejs .ml-1,#conversejs .mx-1{margin-left:.25rem!important}#conversejs .m-2{margin:.5rem!important}#conversejs .mt-2,#conversejs .my-2{margin-top:.5rem!important}#conversejs .mr-2,#conversejs .mx-2{margin-right:.5rem!important}#conversejs .mb-2,#conversejs .my-2{margin-bottom:.5rem!important}#conversejs .ml-2,#conversejs .mx-2{margin-left:.5rem!important}#conversejs .m-3{margin:1rem!important}#conversejs .mt-3,#conversejs .my-3{margin-top:1rem!important}#conversejs .mr-3,#conversejs .mx-3{margin-right:1rem!important}#conversejs .mb-3,#conversejs .my-3{margin-bottom:1rem!important}#conversejs .ml-3,#conversejs .mx-3{margin-left:1rem!important}#conversejs .m-4{margin:1.5rem!important}#conversejs .mt-4,#conversejs .my-4{margin-top:1.5rem!important}#conversejs .mr-4,#conversejs .mx-4{margin-right:1.5rem!important}#conversejs .mb-4,#conversejs .my-4{margin-bottom:1.5rem!important}#conversejs .ml-4,#conversejs .mx-4{margin-left:1.5rem!important}#conversejs .m-5{margin:3rem!important}#conversejs .mt-5,#conversejs .my-5{margin-top:3rem!important}#conversejs .mr-5,#conversejs .mx-5{margin-right:3rem!important}#conversejs .mb-5,#conversejs .my-5{margin-bottom:3rem!important}#conversejs .ml-5,#conversejs .mx-5{margin-left:3rem!important}#conversejs .p-0{padding:0!important}#conversejs .pt-0,#conversejs .py-0{padding-top:0!important}#conversejs .pr-0,#conversejs .px-0{padding-right:0!important}#conversejs .pb-0,#conversejs .py-0{padding-bottom:0!important}#conversejs .pl-0,#conversejs .px-0{padding-left:0!important}#conversejs .p-1{padding:.25rem!important}#conversejs .pt-1,#conversejs .py-1{padding-top:.25rem!important}#conversejs .pr-1,#conversejs .px-1{padding-right:.25rem!important}#conversejs .pb-1,#conversejs .py-1{padding-bottom:.25rem!important}#conversejs .pl-1,#conversejs .px-1{padding-left:.25rem!important}#conversejs .p-2{padding:.5rem!important}#conversejs .pt-2,#conversejs .py-2{padding-top:.5rem!important}#conversejs .pr-2,#conversejs .px-2{padding-right:.5rem!important}#conversejs .pb-2,#conversejs .py-2{padding-bottom:.5rem!important}#conversejs .pl-2,#conversejs .px-2{padding-left:.5rem!important}#conversejs .p-3{padding:1rem!important}#conversejs .pt-3,#conversejs .py-3{padding-top:1rem!important}#conversejs .pr-3,#conversejs .px-3{padding-right:1rem!important}#conversejs .pb-3,#conversejs .py-3{padding-bottom:1rem!important}#conversejs .pl-3,#conversejs .px-3{padding-left:1rem!important}#conversejs .p-4{padding:1.5rem!important}#conversejs .pt-4,#conversejs .py-4{padding-top:1.5rem!important}#conversejs .pr-4,#conversejs .px-4{padding-right:1.5rem!important}#conversejs .pb-4,#conversejs .py-4{padding-bottom:1.5rem!important}#conversejs .pl-4,#conversejs .px-4{padding-left:1.5rem!important}#conversejs .p-5{padding:3rem!important}#conversejs .pt-5,#conversejs .py-5{padding-top:3rem!important}#conversejs .pr-5,#conversejs .px-5{padding-right:3rem!important}#conversejs .pb-5,#conversejs .py-5{padding-bottom:3rem!important}#conversejs .pl-5,#conversejs .px-5{padding-left:3rem!important}#conversejs .m-n1{margin:-.25rem!important}#conversejs .mt-n1,#conversejs .my-n1{margin-top:-.25rem!important}#conversejs .mr-n1,#conversejs .mx-n1{margin-right:-.25rem!important}#conversejs .mb-n1,#conversejs .my-n1{margin-bottom:-.25rem!important}#conversejs .ml-n1,#conversejs .mx-n1{margin-left:-.25rem!important}#conversejs .m-n2{margin:-.5rem!important}#conversejs .mt-n2,#conversejs .my-n2{margin-top:-.5rem!important}#conversejs .mr-n2,#conversejs .mx-n2{margin-right:-.5rem!important}#conversejs .mb-n2,#conversejs .my-n2{margin-bottom:-.5rem!important}#conversejs .ml-n2,#conversejs .mx-n2{margin-left:-.5rem!important}#conversejs .m-n3{margin:-1rem!important}#conversejs .mt-n3,#conversejs .my-n3{margin-top:-1rem!important}#conversejs .mr-n3,#conversejs .mx-n3{margin-right:-1rem!important}#conversejs .mb-n3,#conversejs .my-n3{margin-bottom:-1rem!important}#conversejs .ml-n3,#conversejs .mx-n3{margin-left:-1rem!important}#conversejs .m-n4{margin:-1.5rem!important}#conversejs .mt-n4,#conversejs .my-n4{margin-top:-1.5rem!important}#conversejs .mr-n4,#conversejs .mx-n4{margin-right:-1.5rem!important}#conversejs .mb-n4,#conversejs .my-n4{margin-bottom:-1.5rem!important}#conversejs .ml-n4,#conversejs .mx-n4{margin-left:-1.5rem!important}#conversejs .m-n5{margin:-3rem!important}#conversejs .mt-n5,#conversejs .my-n5{margin-top:-3rem!important}#conversejs .mr-n5,#conversejs .mx-n5{margin-right:-3rem!important}#conversejs .mb-n5,#conversejs .my-n5{margin-bottom:-3rem!important}#conversejs .ml-n5,#conversejs .mx-n5{margin-left:-3rem!important}#conversejs .m-auto{margin:auto!important}#conversejs .mt-auto,#conversejs .my-auto{margin-top:auto!important}#conversejs .mr-auto,#conversejs .mx-auto{margin-right:auto!important}#conversejs .mb-auto,#conversejs .my-auto{margin-bottom:auto!important}#conversejs .ml-auto,#conversejs .mx-auto{margin-left:auto!important}@media (min-width:576px){#conversejs .m-sm-0{margin:0!important}#conversejs .mt-sm-0,#conversejs .my-sm-0{margin-top:0!important}#conversejs .mr-sm-0,#conversejs .mx-sm-0{margin-right:0!important}#conversejs .mb-sm-0,#conversejs .my-sm-0{margin-bottom:0!important}#conversejs .ml-sm-0,#conversejs .mx-sm-0{margin-left:0!important}#conversejs .m-sm-1{margin:.25rem!important}#conversejs .mt-sm-1,#conversejs .my-sm-1{margin-top:.25rem!important}#conversejs .mr-sm-1,#conversejs .mx-sm-1{margin-right:.25rem!important}#conversejs .mb-sm-1,#conversejs .my-sm-1{margin-bottom:.25rem!important}#conversejs .ml-sm-1,#conversejs .mx-sm-1{margin-left:.25rem!important}#conversejs .m-sm-2{margin:.5rem!important}#conversejs .mt-sm-2,#conversejs .my-sm-2{margin-top:.5rem!important}#conversejs .mr-sm-2,#conversejs .mx-sm-2{margin-right:.5rem!important}#conversejs .mb-sm-2,#conversejs .my-sm-2{margin-bottom:.5rem!important}#conversejs .ml-sm-2,#conversejs .mx-sm-2{margin-left:.5rem!important}#conversejs .m-sm-3{margin:1rem!important}#conversejs .mt-sm-3,#conversejs .my-sm-3{margin-top:1rem!important}#conversejs .mr-sm-3,#conversejs .mx-sm-3{margin-right:1rem!important}#conversejs .mb-sm-3,#conversejs .my-sm-3{margin-bottom:1rem!important}#conversejs .ml-sm-3,#conversejs .mx-sm-3{margin-left:1rem!important}#conversejs .m-sm-4{margin:1.5rem!important}#conversejs .mt-sm-4,#conversejs .my-sm-4{margin-top:1.5rem!important}#conversejs .mr-sm-4,#conversejs .mx-sm-4{margin-right:1.5rem!important}#conversejs .mb-sm-4,#conversejs .my-sm-4{margin-bottom:1.5rem!important}#conversejs .ml-sm-4,#conversejs .mx-sm-4{margin-left:1.5rem!important}#conversejs .m-sm-5{margin:3rem!important}#conversejs .mt-sm-5,#conversejs .my-sm-5{margin-top:3rem!important}#conversejs .mr-sm-5,#conversejs .mx-sm-5{margin-right:3rem!important}#conversejs .mb-sm-5,#conversejs .my-sm-5{margin-bottom:3rem!important}#conversejs .ml-sm-5,#conversejs .mx-sm-5{margin-left:3rem!important}#conversejs .p-sm-0{padding:0!important}#conversejs .pt-sm-0,#conversejs .py-sm-0{padding-top:0!important}#conversejs .pr-sm-0,#conversejs .px-sm-0{padding-right:0!important}#conversejs .pb-sm-0,#conversejs .py-sm-0{padding-bottom:0!important}#conversejs .pl-sm-0,#conversejs .px-sm-0{padding-left:0!important}#conversejs .p-sm-1{padding:.25rem!important}#conversejs .pt-sm-1,#conversejs .py-sm-1{padding-top:.25rem!important}#conversejs .pr-sm-1,#conversejs .px-sm-1{padding-right:.25rem!important}#conversejs .pb-sm-1,#conversejs .py-sm-1{padding-bottom:.25rem!important}#conversejs .pl-sm-1,#conversejs .px-sm-1{padding-left:.25rem!important}#conversejs .p-sm-2{padding:.5rem!important}#conversejs .pt-sm-2,#conversejs .py-sm-2{padding-top:.5rem!important}#conversejs .pr-sm-2,#conversejs .px-sm-2{padding-right:.5rem!important}#conversejs .pb-sm-2,#conversejs .py-sm-2{padding-bottom:.5rem!important}#conversejs .pl-sm-2,#conversejs .px-sm-2{padding-left:.5rem!important}#conversejs .p-sm-3{padding:1rem!important}#conversejs .pt-sm-3,#conversejs .py-sm-3{padding-top:1rem!important}#conversejs .pr-sm-3,#conversejs .px-sm-3{padding-right:1rem!important}#conversejs .pb-sm-3,#conversejs .py-sm-3{padding-bottom:1rem!important}#conversejs .pl-sm-3,#conversejs .px-sm-3{padding-left:1rem!important}#conversejs .p-sm-4{padding:1.5rem!important}#conversejs .pt-sm-4,#conversejs .py-sm-4{padding-top:1.5rem!important}#conversejs .pr-sm-4,#conversejs .px-sm-4{padding-right:1.5rem!important}#conversejs .pb-sm-4,#conversejs .py-sm-4{padding-bottom:1.5rem!important}#conversejs .pl-sm-4,#conversejs .px-sm-4{padding-left:1.5rem!important}#conversejs .p-sm-5{padding:3rem!important}#conversejs .pt-sm-5,#conversejs .py-sm-5{padding-top:3rem!important}#conversejs .pr-sm-5,#conversejs .px-sm-5{padding-right:3rem!important}#conversejs .pb-sm-5,#conversejs .py-sm-5{padding-bottom:3rem!important}#conversejs .pl-sm-5,#conversejs .px-sm-5{padding-left:3rem!important}#conversejs .m-sm-n1{margin:-.25rem!important}#conversejs .mt-sm-n1,#conversejs .my-sm-n1{margin-top:-.25rem!important}#conversejs .mr-sm-n1,#conversejs .mx-sm-n1{margin-right:-.25rem!important}#conversejs .mb-sm-n1,#conversejs .my-sm-n1{margin-bottom:-.25rem!important}#conversejs .ml-sm-n1,#conversejs .mx-sm-n1{margin-left:-.25rem!important}#conversejs .m-sm-n2{margin:-.5rem!important}#conversejs .mt-sm-n2,#conversejs .my-sm-n2{margin-top:-.5rem!important}#conversejs .mr-sm-n2,#conversejs .mx-sm-n2{margin-right:-.5rem!important}#conversejs .mb-sm-n2,#conversejs .my-sm-n2{margin-bottom:-.5rem!important}#conversejs .ml-sm-n2,#conversejs .mx-sm-n2{margin-left:-.5rem!important}#conversejs .m-sm-n3{margin:-1rem!important}#conversejs .mt-sm-n3,#conversejs .my-sm-n3{margin-top:-1rem!important}#conversejs .mr-sm-n3,#conversejs .mx-sm-n3{margin-right:-1rem!important}#conversejs .mb-sm-n3,#conversejs .my-sm-n3{margin-bottom:-1rem!important}#conversejs .ml-sm-n3,#conversejs .mx-sm-n3{margin-left:-1rem!important}#conversejs .m-sm-n4{margin:-1.5rem!important}#conversejs .mt-sm-n4,#conversejs .my-sm-n4{margin-top:-1.5rem!important}#conversejs .mr-sm-n4,#conversejs .mx-sm-n4{margin-right:-1.5rem!important}#conversejs .mb-sm-n4,#conversejs .my-sm-n4{margin-bottom:-1.5rem!important}#conversejs .ml-sm-n4,#conversejs .mx-sm-n4{margin-left:-1.5rem!important}#conversejs .m-sm-n5{margin:-3rem!important}#conversejs .mt-sm-n5,#conversejs .my-sm-n5{margin-top:-3rem!important}#conversejs .mr-sm-n5,#conversejs .mx-sm-n5{margin-right:-3rem!important}#conversejs .mb-sm-n5,#conversejs .my-sm-n5{margin-bottom:-3rem!important}#conversejs .ml-sm-n5,#conversejs .mx-sm-n5{margin-left:-3rem!important}#conversejs .m-sm-auto{margin:auto!important}#conversejs .mt-sm-auto,#conversejs .my-sm-auto{margin-top:auto!important}#conversejs .mr-sm-auto,#conversejs .mx-sm-auto{margin-right:auto!important}#conversejs .mb-sm-auto,#conversejs .my-sm-auto{margin-bottom:auto!important}#conversejs .ml-sm-auto,#conversejs .mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){#conversejs .m-md-0{margin:0!important}#conversejs .mt-md-0,#conversejs .my-md-0{margin-top:0!important}#conversejs .mr-md-0,#conversejs .mx-md-0{margin-right:0!important}#conversejs .mb-md-0,#conversejs .my-md-0{margin-bottom:0!important}#conversejs .ml-md-0,#conversejs .mx-md-0{margin-left:0!important}#conversejs .m-md-1{margin:.25rem!important}#conversejs .mt-md-1,#conversejs .my-md-1{margin-top:.25rem!important}#conversejs .mr-md-1,#conversejs .mx-md-1{margin-right:.25rem!important}#conversejs .mb-md-1,#conversejs .my-md-1{margin-bottom:.25rem!important}#conversejs .ml-md-1,#conversejs .mx-md-1{margin-left:.25rem!important}#conversejs .m-md-2{margin:.5rem!important}#conversejs .mt-md-2,#conversejs .my-md-2{margin-top:.5rem!important}#conversejs .mr-md-2,#conversejs .mx-md-2{margin-right:.5rem!important}#conversejs .mb-md-2,#conversejs .my-md-2{margin-bottom:.5rem!important}#conversejs .ml-md-2,#conversejs .mx-md-2{margin-left:.5rem!important}#conversejs .m-md-3{margin:1rem!important}#conversejs .mt-md-3,#conversejs .my-md-3{margin-top:1rem!important}#conversejs .mr-md-3,#conversejs .mx-md-3{margin-right:1rem!important}#conversejs .mb-md-3,#conversejs .my-md-3{margin-bottom:1rem!important}#conversejs .ml-md-3,#conversejs .mx-md-3{margin-left:1rem!important}#conversejs .m-md-4{margin:1.5rem!important}#conversejs .mt-md-4,#conversejs .my-md-4{margin-top:1.5rem!important}#conversejs .mr-md-4,#conversejs .mx-md-4{margin-right:1.5rem!important}#conversejs .mb-md-4,#conversejs .my-md-4{margin-bottom:1.5rem!important}#conversejs .ml-md-4,#conversejs .mx-md-4{margin-left:1.5rem!important}#conversejs .m-md-5{margin:3rem!important}#conversejs .mt-md-5,#conversejs .my-md-5{margin-top:3rem!important}#conversejs .mr-md-5,#conversejs .mx-md-5{margin-right:3rem!important}#conversejs .mb-md-5,#conversejs .my-md-5{margin-bottom:3rem!important}#conversejs .ml-md-5,#conversejs .mx-md-5{margin-left:3rem!important}#conversejs .p-md-0{padding:0!important}#conversejs .pt-md-0,#conversejs .py-md-0{padding-top:0!important}#conversejs .pr-md-0,#conversejs .px-md-0{padding-right:0!important}#conversejs .pb-md-0,#conversejs .py-md-0{padding-bottom:0!important}#conversejs .pl-md-0,#conversejs .px-md-0{padding-left:0!important}#conversejs .p-md-1{padding:.25rem!important}#conversejs .pt-md-1,#conversejs .py-md-1{padding-top:.25rem!important}#conversejs .pr-md-1,#conversejs .px-md-1{padding-right:.25rem!important}#conversejs .pb-md-1,#conversejs .py-md-1{padding-bottom:.25rem!important}#conversejs .pl-md-1,#conversejs .px-md-1{padding-left:.25rem!important}#conversejs .p-md-2{padding:.5rem!important}#conversejs .pt-md-2,#conversejs .py-md-2{padding-top:.5rem!important}#conversejs .pr-md-2,#conversejs .px-md-2{padding-right:.5rem!important}#conversejs .pb-md-2,#conversejs .py-md-2{padding-bottom:.5rem!important}#conversejs .pl-md-2,#conversejs .px-md-2{padding-left:.5rem!important}#conversejs .p-md-3{padding:1rem!important}#conversejs .pt-md-3,#conversejs .py-md-3{padding-top:1rem!important}#conversejs .pr-md-3,#conversejs .px-md-3{padding-right:1rem!important}#conversejs .pb-md-3,#conversejs .py-md-3{padding-bottom:1rem!important}#conversejs .pl-md-3,#conversejs .px-md-3{padding-left:1rem!important}#conversejs .p-md-4{padding:1.5rem!important}#conversejs .pt-md-4,#conversejs .py-md-4{padding-top:1.5rem!important}#conversejs .pr-md-4,#conversejs .px-md-4{padding-right:1.5rem!important}#conversejs .pb-md-4,#conversejs .py-md-4{padding-bottom:1.5rem!important}#conversejs .pl-md-4,#conversejs .px-md-4{padding-left:1.5rem!important}#conversejs .p-md-5{padding:3rem!important}#conversejs .pt-md-5,#conversejs .py-md-5{padding-top:3rem!important}#conversejs .pr-md-5,#conversejs .px-md-5{padding-right:3rem!important}#conversejs .pb-md-5,#conversejs .py-md-5{padding-bottom:3rem!important}#conversejs .pl-md-5,#conversejs .px-md-5{padding-left:3rem!important}#conversejs .m-md-n1{margin:-.25rem!important}#conversejs .mt-md-n1,#conversejs .my-md-n1{margin-top:-.25rem!important}#conversejs .mr-md-n1,#conversejs .mx-md-n1{margin-right:-.25rem!important}#conversejs .mb-md-n1,#conversejs .my-md-n1{margin-bottom:-.25rem!important}#conversejs .ml-md-n1,#conversejs .mx-md-n1{margin-left:-.25rem!important}#conversejs .m-md-n2{margin:-.5rem!important}#conversejs .mt-md-n2,#conversejs .my-md-n2{margin-top:-.5rem!important}#conversejs .mr-md-n2,#conversejs .mx-md-n2{margin-right:-.5rem!important}#conversejs .mb-md-n2,#conversejs .my-md-n2{margin-bottom:-.5rem!important}#conversejs .ml-md-n2,#conversejs .mx-md-n2{margin-left:-.5rem!important}#conversejs .m-md-n3{margin:-1rem!important}#conversejs .mt-md-n3,#conversejs .my-md-n3{margin-top:-1rem!important}#conversejs .mr-md-n3,#conversejs .mx-md-n3{margin-right:-1rem!important}#conversejs .mb-md-n3,#conversejs .my-md-n3{margin-bottom:-1rem!important}#conversejs .ml-md-n3,#conversejs .mx-md-n3{margin-left:-1rem!important}#conversejs .m-md-n4{margin:-1.5rem!important}#conversejs .mt-md-n4,#conversejs .my-md-n4{margin-top:-1.5rem!important}#conversejs .mr-md-n4,#conversejs .mx-md-n4{margin-right:-1.5rem!important}#conversejs .mb-md-n4,#conversejs .my-md-n4{margin-bottom:-1.5rem!important}#conversejs .ml-md-n4,#conversejs .mx-md-n4{margin-left:-1.5rem!important}#conversejs .m-md-n5{margin:-3rem!important}#conversejs .mt-md-n5,#conversejs .my-md-n5{margin-top:-3rem!important}#conversejs .mr-md-n5,#conversejs .mx-md-n5{margin-right:-3rem!important}#conversejs .mb-md-n5,#conversejs .my-md-n5{margin-bottom:-3rem!important}#conversejs .ml-md-n5,#conversejs .mx-md-n5{margin-left:-3rem!important}#conversejs .m-md-auto{margin:auto!important}#conversejs .mt-md-auto,#conversejs .my-md-auto{margin-top:auto!important}#conversejs .mr-md-auto,#conversejs .mx-md-auto{margin-right:auto!important}#conversejs .mb-md-auto,#conversejs .my-md-auto{margin-bottom:auto!important}#conversejs .ml-md-auto,#conversejs .mx-md-auto{margin-left:auto!important}}@media (min-width:992px){#conversejs .m-lg-0{margin:0!important}#conversejs .mt-lg-0,#conversejs .my-lg-0{margin-top:0!important}#conversejs .mr-lg-0,#conversejs .mx-lg-0{margin-right:0!important}#conversejs .mb-lg-0,#conversejs .my-lg-0{margin-bottom:0!important}#conversejs .ml-lg-0,#conversejs .mx-lg-0{margin-left:0!important}#conversejs .m-lg-1{margin:.25rem!important}#conversejs .mt-lg-1,#conversejs .my-lg-1{margin-top:.25rem!important}#conversejs .mr-lg-1,#conversejs .mx-lg-1{margin-right:.25rem!important}#conversejs .mb-lg-1,#conversejs .my-lg-1{margin-bottom:.25rem!important}#conversejs .ml-lg-1,#conversejs .mx-lg-1{margin-left:.25rem!important}#conversejs .m-lg-2{margin:.5rem!important}#conversejs .mt-lg-2,#conversejs .my-lg-2{margin-top:.5rem!important}#conversejs .mr-lg-2,#conversejs .mx-lg-2{margin-right:.5rem!important}#conversejs .mb-lg-2,#conversejs .my-lg-2{margin-bottom:.5rem!important}#conversejs .ml-lg-2,#conversejs .mx-lg-2{margin-left:.5rem!important}#conversejs .m-lg-3{margin:1rem!important}#conversejs .mt-lg-3,#conversejs .my-lg-3{margin-top:1rem!important}#conversejs .mr-lg-3,#conversejs .mx-lg-3{margin-right:1rem!important}#conversejs .mb-lg-3,#conversejs .my-lg-3{margin-bottom:1rem!important}#conversejs .ml-lg-3,#conversejs .mx-lg-3{margin-left:1rem!important}#conversejs .m-lg-4{margin:1.5rem!important}#conversejs .mt-lg-4,#conversejs .my-lg-4{margin-top:1.5rem!important}#conversejs .mr-lg-4,#conversejs .mx-lg-4{margin-right:1.5rem!important}#conversejs .mb-lg-4,#conversejs .my-lg-4{margin-bottom:1.5rem!important}#conversejs .ml-lg-4,#conversejs .mx-lg-4{margin-left:1.5rem!important}#conversejs .m-lg-5{margin:3rem!important}#conversejs .mt-lg-5,#conversejs .my-lg-5{margin-top:3rem!important}#conversejs .mr-lg-5,#conversejs .mx-lg-5{margin-right:3rem!important}#conversejs .mb-lg-5,#conversejs .my-lg-5{margin-bottom:3rem!important}#conversejs .ml-lg-5,#conversejs .mx-lg-5{margin-left:3rem!important}#conversejs .p-lg-0{padding:0!important}#conversejs .pt-lg-0,#conversejs .py-lg-0{padding-top:0!important}#conversejs .pr-lg-0,#conversejs .px-lg-0{padding-right:0!important}#conversejs .pb-lg-0,#conversejs .py-lg-0{padding-bottom:0!important}#conversejs .pl-lg-0,#conversejs .px-lg-0{padding-left:0!important}#conversejs .p-lg-1{padding:.25rem!important}#conversejs .pt-lg-1,#conversejs .py-lg-1{padding-top:.25rem!important}#conversejs .pr-lg-1,#conversejs .px-lg-1{padding-right:.25rem!important}#conversejs .pb-lg-1,#conversejs .py-lg-1{padding-bottom:.25rem!important}#conversejs .pl-lg-1,#conversejs .px-lg-1{padding-left:.25rem!important}#conversejs .p-lg-2{padding:.5rem!important}#conversejs .pt-lg-2,#conversejs .py-lg-2{padding-top:.5rem!important}#conversejs .pr-lg-2,#conversejs .px-lg-2{padding-right:.5rem!important}#conversejs .pb-lg-2,#conversejs .py-lg-2{padding-bottom:.5rem!important}#conversejs .pl-lg-2,#conversejs .px-lg-2{padding-left:.5rem!important}#conversejs .p-lg-3{padding:1rem!important}#conversejs .pt-lg-3,#conversejs .py-lg-3{padding-top:1rem!important}#conversejs .pr-lg-3,#conversejs .px-lg-3{padding-right:1rem!important}#conversejs .pb-lg-3,#conversejs .py-lg-3{padding-bottom:1rem!important}#conversejs .pl-lg-3,#conversejs .px-lg-3{padding-left:1rem!important}#conversejs .p-lg-4{padding:1.5rem!important}#conversejs .pt-lg-4,#conversejs .py-lg-4{padding-top:1.5rem!important}#conversejs .pr-lg-4,#conversejs .px-lg-4{padding-right:1.5rem!important}#conversejs .pb-lg-4,#conversejs .py-lg-4{padding-bottom:1.5rem!important}#conversejs .pl-lg-4,#conversejs .px-lg-4{padding-left:1.5rem!important}#conversejs .p-lg-5{padding:3rem!important}#conversejs .pt-lg-5,#conversejs .py-lg-5{padding-top:3rem!important}#conversejs .pr-lg-5,#conversejs .px-lg-5{padding-right:3rem!important}#conversejs .pb-lg-5,#conversejs .py-lg-5{padding-bottom:3rem!important}#conversejs .pl-lg-5,#conversejs .px-lg-5{padding-left:3rem!important}#conversejs .m-lg-n1{margin:-.25rem!important}#conversejs .mt-lg-n1,#conversejs .my-lg-n1{margin-top:-.25rem!important}#conversejs .mr-lg-n1,#conversejs .mx-lg-n1{margin-right:-.25rem!important}#conversejs .mb-lg-n1,#conversejs .my-lg-n1{margin-bottom:-.25rem!important}#conversejs .ml-lg-n1,#conversejs .mx-lg-n1{margin-left:-.25rem!important}#conversejs .m-lg-n2{margin:-.5rem!important}#conversejs .mt-lg-n2,#conversejs .my-lg-n2{margin-top:-.5rem!important}#conversejs .mr-lg-n2,#conversejs .mx-lg-n2{margin-right:-.5rem!important}#conversejs .mb-lg-n2,#conversejs .my-lg-n2{margin-bottom:-.5rem!important}#conversejs .ml-lg-n2,#conversejs .mx-lg-n2{margin-left:-.5rem!important}#conversejs .m-lg-n3{margin:-1rem!important}#conversejs .mt-lg-n3,#conversejs .my-lg-n3{margin-top:-1rem!important}#conversejs .mr-lg-n3,#conversejs .mx-lg-n3{margin-right:-1rem!important}#conversejs .mb-lg-n3,#conversejs .my-lg-n3{margin-bottom:-1rem!important}#conversejs .ml-lg-n3,#conversejs .mx-lg-n3{margin-left:-1rem!important}#conversejs .m-lg-n4{margin:-1.5rem!important}#conversejs .mt-lg-n4,#conversejs .my-lg-n4{margin-top:-1.5rem!important}#conversejs .mr-lg-n4,#conversejs .mx-lg-n4{margin-right:-1.5rem!important}#conversejs .mb-lg-n4,#conversejs .my-lg-n4{margin-bottom:-1.5rem!important}#conversejs .ml-lg-n4,#conversejs .mx-lg-n4{margin-left:-1.5rem!important}#conversejs .m-lg-n5{margin:-3rem!important}#conversejs .mt-lg-n5,#conversejs .my-lg-n5{margin-top:-3rem!important}#conversejs .mr-lg-n5,#conversejs .mx-lg-n5{margin-right:-3rem!important}#conversejs .mb-lg-n5,#conversejs .my-lg-n5{margin-bottom:-3rem!important}#conversejs .ml-lg-n5,#conversejs .mx-lg-n5{margin-left:-3rem!important}#conversejs .m-lg-auto{margin:auto!important}#conversejs .mt-lg-auto,#conversejs .my-lg-auto{margin-top:auto!important}#conversejs .mr-lg-auto,#conversejs .mx-lg-auto{margin-right:auto!important}#conversejs .mb-lg-auto,#conversejs .my-lg-auto{margin-bottom:auto!important}#conversejs .ml-lg-auto,#conversejs .mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){#conversejs .m-xl-0{margin:0!important}#conversejs .mt-xl-0,#conversejs .my-xl-0{margin-top:0!important}#conversejs .mr-xl-0,#conversejs .mx-xl-0{margin-right:0!important}#conversejs .mb-xl-0,#conversejs .my-xl-0{margin-bottom:0!important}#conversejs .ml-xl-0,#conversejs .mx-xl-0{margin-left:0!important}#conversejs .m-xl-1{margin:.25rem!important}#conversejs .mt-xl-1,#conversejs .my-xl-1{margin-top:.25rem!important}#conversejs .mr-xl-1,#conversejs .mx-xl-1{margin-right:.25rem!important}#conversejs .mb-xl-1,#conversejs .my-xl-1{margin-bottom:.25rem!important}#conversejs .ml-xl-1,#conversejs .mx-xl-1{margin-left:.25rem!important}#conversejs .m-xl-2{margin:.5rem!important}#conversejs .mt-xl-2,#conversejs .my-xl-2{margin-top:.5rem!important}#conversejs .mr-xl-2,#conversejs .mx-xl-2{margin-right:.5rem!important}#conversejs .mb-xl-2,#conversejs .my-xl-2{margin-bottom:.5rem!important}#conversejs .ml-xl-2,#conversejs .mx-xl-2{margin-left:.5rem!important}#conversejs .m-xl-3{margin:1rem!important}#conversejs .mt-xl-3,#conversejs .my-xl-3{margin-top:1rem!important}#conversejs .mr-xl-3,#conversejs .mx-xl-3{margin-right:1rem!important}#conversejs .mb-xl-3,#conversejs .my-xl-3{margin-bottom:1rem!important}#conversejs .ml-xl-3,#conversejs .mx-xl-3{margin-left:1rem!important}#conversejs .m-xl-4{margin:1.5rem!important}#conversejs .mt-xl-4,#conversejs .my-xl-4{margin-top:1.5rem!important}#conversejs .mr-xl-4,#conversejs .mx-xl-4{margin-right:1.5rem!important}#conversejs .mb-xl-4,#conversejs .my-xl-4{margin-bottom:1.5rem!important}#conversejs .ml-xl-4,#conversejs .mx-xl-4{margin-left:1.5rem!important}#conversejs .m-xl-5{margin:3rem!important}#conversejs .mt-xl-5,#conversejs .my-xl-5{margin-top:3rem!important}#conversejs .mr-xl-5,#conversejs .mx-xl-5{margin-right:3rem!important}#conversejs .mb-xl-5,#conversejs .my-xl-5{margin-bottom:3rem!important}#conversejs .ml-xl-5,#conversejs .mx-xl-5{margin-left:3rem!important}#conversejs .p-xl-0{padding:0!important}#conversejs .pt-xl-0,#conversejs .py-xl-0{padding-top:0!important}#conversejs .pr-xl-0,#conversejs .px-xl-0{padding-right:0!important}#conversejs .pb-xl-0,#conversejs .py-xl-0{padding-bottom:0!important}#conversejs .pl-xl-0,#conversejs .px-xl-0{padding-left:0!important}#conversejs .p-xl-1{padding:.25rem!important}#conversejs .pt-xl-1,#conversejs .py-xl-1{padding-top:.25rem!important}#conversejs .pr-xl-1,#conversejs .px-xl-1{padding-right:.25rem!important}#conversejs .pb-xl-1,#conversejs .py-xl-1{padding-bottom:.25rem!important}#conversejs .pl-xl-1,#conversejs .px-xl-1{padding-left:.25rem!important}#conversejs .p-xl-2{padding:.5rem!important}#conversejs .pt-xl-2,#conversejs .py-xl-2{padding-top:.5rem!important}#conversejs .pr-xl-2,#conversejs .px-xl-2{padding-right:.5rem!important}#conversejs .pb-xl-2,#conversejs .py-xl-2{padding-bottom:.5rem!important}#conversejs .pl-xl-2,#conversejs .px-xl-2{padding-left:.5rem!important}#conversejs .p-xl-3{padding:1rem!important}#conversejs .pt-xl-3,#conversejs .py-xl-3{padding-top:1rem!important}#conversejs .pr-xl-3,#conversejs .px-xl-3{padding-right:1rem!important}#conversejs .pb-xl-3,#conversejs .py-xl-3{padding-bottom:1rem!important}#conversejs .pl-xl-3,#conversejs .px-xl-3{padding-left:1rem!important}#conversejs .p-xl-4{padding:1.5rem!important}#conversejs .pt-xl-4,#conversejs .py-xl-4{padding-top:1.5rem!important}#conversejs .pr-xl-4,#conversejs .px-xl-4{padding-right:1.5rem!important}#conversejs .pb-xl-4,#conversejs .py-xl-4{padding-bottom:1.5rem!important}#conversejs .pl-xl-4,#conversejs .px-xl-4{padding-left:1.5rem!important}#conversejs .p-xl-5{padding:3rem!important}#conversejs .pt-xl-5,#conversejs .py-xl-5{padding-top:3rem!important}#conversejs .pr-xl-5,#conversejs .px-xl-5{padding-right:3rem!important}#conversejs .pb-xl-5,#conversejs .py-xl-5{padding-bottom:3rem!important}#conversejs .pl-xl-5,#conversejs .px-xl-5{padding-left:3rem!important}#conversejs .m-xl-n1{margin:-.25rem!important}#conversejs .mt-xl-n1,#conversejs .my-xl-n1{margin-top:-.25rem!important}#conversejs .mr-xl-n1,#conversejs .mx-xl-n1{margin-right:-.25rem!important}#conversejs .mb-xl-n1,#conversejs .my-xl-n1{margin-bottom:-.25rem!important}#conversejs .ml-xl-n1,#conversejs .mx-xl-n1{margin-left:-.25rem!important}#conversejs .m-xl-n2{margin:-.5rem!important}#conversejs .mt-xl-n2,#conversejs .my-xl-n2{margin-top:-.5rem!important}#conversejs .mr-xl-n2,#conversejs .mx-xl-n2{margin-right:-.5rem!important}#conversejs .mb-xl-n2,#conversejs .my-xl-n2{margin-bottom:-.5rem!important}#conversejs .ml-xl-n2,#conversejs .mx-xl-n2{margin-left:-.5rem!important}#conversejs .m-xl-n3{margin:-1rem!important}#conversejs .mt-xl-n3,#conversejs .my-xl-n3{margin-top:-1rem!important}#conversejs .mr-xl-n3,#conversejs .mx-xl-n3{margin-right:-1rem!important}#conversejs .mb-xl-n3,#conversejs .my-xl-n3{margin-bottom:-1rem!important}#conversejs .ml-xl-n3,#conversejs .mx-xl-n3{margin-left:-1rem!important}#conversejs .m-xl-n4{margin:-1.5rem!important}#conversejs .mt-xl-n4,#conversejs .my-xl-n4{margin-top:-1.5rem!important}#conversejs .mr-xl-n4,#conversejs .mx-xl-n4{margin-right:-1.5rem!important}#conversejs .mb-xl-n4,#conversejs .my-xl-n4{margin-bottom:-1.5rem!important}#conversejs .ml-xl-n4,#conversejs .mx-xl-n4{margin-left:-1.5rem!important}#conversejs .m-xl-n5{margin:-3rem!important}#conversejs .mt-xl-n5,#conversejs .my-xl-n5{margin-top:-3rem!important}#conversejs .mr-xl-n5,#conversejs .mx-xl-n5{margin-right:-3rem!important}#conversejs .mb-xl-n5,#conversejs .my-xl-n5{margin-bottom:-3rem!important}#conversejs .ml-xl-n5,#conversejs .mx-xl-n5{margin-left:-3rem!important}#conversejs .m-xl-auto{margin:auto!important}#conversejs .mt-xl-auto,#conversejs .my-xl-auto{margin-top:auto!important}#conversejs .mr-xl-auto,#conversejs .mx-xl-auto{margin-right:auto!important}#conversejs .mb-xl-auto,#conversejs .my-xl-auto{margin-bottom:auto!important}#conversejs .ml-xl-auto,#conversejs .mx-xl-auto{margin-left:auto!important}}#conversejs .text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}#conversejs .text-justify{text-align:justify!important}#conversejs .text-wrap{white-space:normal!important}#conversejs .text-nowrap{white-space:nowrap!important}#conversejs .text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#conversejs .text-left{text-align:left!important}#conversejs .text-right{text-align:right!important}#conversejs .text-center{text-align:center!important}@media (min-width:576px){#conversejs .text-sm-left{text-align:left!important}#conversejs .text-sm-right{text-align:right!important}#conversejs .text-sm-center{text-align:center!important}}@media (min-width:768px){#conversejs .text-md-left{text-align:left!important}#conversejs .text-md-right{text-align:right!important}#conversejs .text-md-center{text-align:center!important}}@media (min-width:992px){#conversejs .text-lg-left{text-align:left!important}#conversejs .text-lg-right{text-align:right!important}#conversejs .text-lg-center{text-align:center!important}}@media (min-width:1200px){#conversejs .text-xl-left{text-align:left!important}#conversejs .text-xl-right{text-align:right!important}#conversejs .text-xl-center{text-align:center!important}}#conversejs .text-lowercase{text-transform:lowercase!important}#conversejs .text-uppercase{text-transform:uppercase!important}#conversejs .text-capitalize{text-transform:capitalize!important}#conversejs .font-weight-light{font-weight:300!important}#conversejs .font-weight-lighter{font-weight:lighter!important}#conversejs .font-weight-normal{font-weight:400!important}#conversejs .font-weight-bold{font-weight:700!important}#conversejs .font-weight-bolder{font-weight:bolder!important}#conversejs .font-italic{font-style:italic!important}#conversejs .text-white{color:#fff!important}#conversejs .text-primary{color:#007bff!important}#conversejs a.text-primary:focus,#conversejs a.text-primary:hover{color:#0056b3!important}#conversejs .text-secondary{color:#6c757d!important}#conversejs a.text-secondary:focus,#conversejs a.text-secondary:hover{color:#494f54!important}#conversejs .text-success{color:#28a745!important}#conversejs a.text-success:focus,#conversejs a.text-success:hover{color:#19692c!important}#conversejs .text-info{color:#17a2b8!important}#conversejs a.text-info:focus,#conversejs a.text-info:hover{color:#0f6674!important}#conversejs .text-warning{color:#ffc107!important}#conversejs a.text-warning:focus,#conversejs a.text-warning:hover{color:#ba8b00!important}#conversejs .text-danger{color:#dc3545!important}#conversejs a.text-danger:focus,#conversejs a.text-danger:hover{color:#a71d2a!important}#conversejs .text-light{color:#f8f9fa!important}#conversejs a.text-light:focus,#conversejs a.text-light:hover{color:#cbd3da!important}#conversejs .text-dark{color:#343a40!important}#conversejs a.text-dark:focus,#conversejs a.text-dark:hover{color:#121416!important}#conversejs .text-body{color:#212529!important}#conversejs .text-muted{color:#6c757d!important}#conversejs .text-black-50{color:rgba(0,0,0,.5)!important}#conversejs .text-white-50{color:rgba(255,255,255,.5)!important}#conversejs .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}#conversejs .text-decoration-none{text-decoration:none!important}#conversejs .text-break{word-break:break-word!important;overflow-wrap:break-word!important}#conversejs .text-reset{color:inherit!important}#conversejs .visible{visibility:visible!important}#conversejs .invisible{visibility:hidden!important}@font-face{font-family:Baumans;font-style:normal;font-weight:400;src:local("Baumans Regular"),local("Baumans-Regular"),url(webfonts/baumans.ttf) format("truetype")}@font-face{font-family:Muli;font-style:normal;font-weight:400;src:local("Muli Regular"),local("Muli-Regular"),url(webfonts/muli.ttf) format("truetype")}@font-face{font-family:ConverseFontAwesomeBrands;font-style:normal;font-weight:400;src:url(webfonts/fa-brands-400.eot);src:url(webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-brands-400.woff2) format("woff2"),url(webfonts/fa-brands-400.woff) format("woff"),url(webfonts/fa-brands-400.ttf) format("truetype"),url(webfonts/fa-brands-400.svg#fontawesome) format("svg")}@font-face{font-family:ConverseFontAwesomeRegular;font-style:normal;font-weight:400;src:url(webfonts/fa-regular-400.eot);src:url(webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-regular-400.woff2) format("woff2"),url(webfonts/fa-regular-400.woff) format("woff"),url(webfonts/fa-regular-400.ttf) format("truetype"),url(webfonts/fa-regular-400.svg#fontawesome) format("svg");font-weight:400;font-style:normal}@font-face{font-family:ConverseFontAwesomeSolid;font-style:normal;font-weight:900;src:url(webfonts/fa-solid-900.eot);src:url(webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-solid-900.svg#fontawesome) format("svg"),url(webfonts/fa-solid-900.woff2) format("woff2"),url(webfonts/fa-solid-900.woff) format("woff"),url(webfonts/fa-solid-900.ttf) format("truetype")}.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scale(-1,1)}.fa-flip-vertical{transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-balance-scale:before{content:"\f24e"}.fa-balance-scale-left:before{content:"\f515"}.fa-balance-scale-right:before{content:"\f516"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-biking:before{content:"\f84a"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-border-all:before{content:"\f84c"}.fa-border-none:before{content:"\f850"}.fa-border-style:before{content:"\f853"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fan:before{content:"\f863"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-icons:before{content:"\f86d"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-alt:before{content:"\f879"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-square-alt:before{content:"\f87b"}.fa-phone-volume:before{content:"\f2a0"}.fa-photo-video:before{content:"\f87c"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-remove-format:before{content:"\f87d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-down-alt:before{content:"\f881"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-alpha-up-alt:before{content:"\f882"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-down-alt:before{content:"\f884"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-amount-up-alt:before{content:"\f885"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-down-alt:before{content:"\f886"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-numeric-up-alt:before{content:"\f887"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spell-check:before{content:"\f891"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-voicemail:before{content:"\f897"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#conversejs .far,.converse-website .far{font-family:ConverseFontAwesomeRegular!important;font-weight:400}#conversejs .fa,#conversejs .fas,.converse-website .fa,.converse-website .fas{font-family:ConverseFontAwesomeSolid!important;font-weight:900}#conversejs .fab,.converse-website .fab{font-family:ConverseFontAwesomeBrands}#conversejs .fa,#conversejs .fab,#conversejs .far,#conversejs .fas,.converse-website .fa,.converse-website .fab,.converse-website .far,.converse-website .fas{display:inline-block;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#conversejs .fa-info-circle,.converse-website .fa-info-circle{height:1em}#conversejs,#conversejs-bg,.converse-fullscreen{--subdued-color:#A8ABA1;--green:#3AA569;--redder-orange:#E77051;--orange:#E7A151;--light-blue:#578EA9;--chat-status-online:var(--green);--chat-status-busy:var(--redder-orange);--chat-status-away:var(--orange);--brand-heading-color:#387592;--completion-light-color:#FFB9A7;--completion-normal-color:var(--redder-orange);--completion-dark-color:#D24E2B;--link-color:var(--light-blue);--link-hover-color:#345566;--link-color-lighten-10-percent:#79a5ba;--dark-link-color:#206485;--global-background-color:#397491;--inverse-link-color:white;--text-shadow-color:#FAFAFA;--text-color:#666;--text-color-lighten-15-percent:#8c8c8c;--message-text-color:#555;--message-receipt-color:var(--green);--save-button-color:var(--green);--message-avatar-width:36px;--message-avatar-height:36px;--chat-textarea-color:#666;--chat-textarea-background-color:white;--chat-textarea-height:60px;--send-button-height:27px;--send-button-margin:3px;--controlbox-heading-top-margin:0.75em;--inline-action-margin:0.75em;--roster-height:194px;--flyout-padding:1.2em;--chat-head-color:var(--green);--chat-head-color-dark:#1E9652;--chat-head-color-darker:#0E763B;--chat-head-color-lighten-50-percent:#e7f7ee;--chat-head-text-color:white;--chat-correcting-color:var(--chat-head-color-lighten-50-percent);--chat-content-background-color:white;--chat-topic-display:block;--chat-info-display:block;--highlight-color:#DCF9F6;--primary-color:var(--light-blue);--primary-color-dark:#397491;--secondary-color:#818479;--secondary-color-dark:#585B51;--warning-color:var(--orange);--warning-color-dark:#D2842B;--danger-color:#D24E2B;--danger-color-dark:#A93415;--light-background-color:#FCFDFD;--error-color:#D24E2B;--info-color:#1E9652;--button-border-radius:5px;--chatbox-border-radius:4px;--controlbox-width:250px;--controlbox-head-color:var(--light-blue);--controlbox-head-color-lighten-45-percent:#eff4f7;--controlbox-pane-background-color:white;--controlbox-heading-color:inherit;--controlbox-heading-font-weight:bold;--chat-gutter:0.5em;--minimized-chats-width:130px;--mobile-chat-width:100%;--mobile-chat-height:400px;--normal-font:"Helvetica","Arial",sans-serif;--heading-font:'Muli',normal;--branding-font:'Baumans',cursive;--heading-display:block;--heading-color:white;--chatroom-head-color:var(--redder-orange);--chatroom-head-color-dark:#D24E2B;--chatroom-head-color-lighten-25-percent:#f6ccc1;--chatroom-head-button-color:var(--chatroom-head-color);--chatroom-head-title-font-weight:normal;--chatroom-head-title-padding-right:0px;--chatroom-head-description-color:var(--chatroom-head-color-lighten-25-percent);--chatroom-head-description-link-color:white;--chatroom-head-description-display:block;--chatroom-head-description-border-left:0px;--chatroom-head-description-padding-left:0px;--chatroom-head-border-bottom:0px;--chatroom-width:400px;--chatroom-correcting-color:#fadfd7;--chatroom-badge-color:var(--chatroom-head-color);--chatroom-badge-hover-color:var(--chatroom-head-color-dark);--headline-head-color:var(--orange);--headline-message-color:#D2842B;--chatbox-button-size:14px;--fullpage-chatbox-button-size:16px;--font-size-tiny:10px;--font-size-small:12px;--font-size:14px;--font-size-large:16px;--font-size-huge:20px;--message-font-size:var(--font-size);--separator-text-color:var(--message-text-color);--chat-separator-border-bottom:2px solid var(--chat-head-color);--chatroom-separator-border-bottom:2px solid var(--chatroom-head-color);--message-input-border-top:4px solid var(--chatroom-head-color);--message-input-color:var(--chatroom-head-color);--line-height-small:14px;--line-height:16px;--line-height-large:20px;--line-height-huge:27px;--occupants-padding:1em;--occupants-background-color:white;--occupants-border-left:1px solid var(--text-color);--occupants-border-bottom:1px solid lightgrey;--occupants-features-display:block;--embedded-emoji-picker-height:300px;--avatar-border-radius:10%;--avatar-border:1px solid lightgrey;--avatar-background-color:white;--fullpage-chat-head-height:62px;--fullpage-chat-height:calc(var(--vh, 1vh) * 100);--fullpage-chat-width:100%;--fullpage-emoji-picker-height:300px;--fullpage-max-chat-textarea-height:15em;--overlayed-chat-head-height:55px;--overlayed-chat-height:450px;--overlayed-chat-width:250px;--overlayed-chatbox-hover-height:1em;--overlayed-emoji-picker-height:200px;--overlayed-max-chat-textarea-height:200px;--overlayed-badge-color:#818479;--list-toggle-color:#818479;--list-toggle-hover-color:#585B51;--list-toggle-font-weight:normal;--list-item-action-color:#e3eef3;--list-item-link-color:inherit;--list-item-link-hover-color:var(--dark-link-color);--list-item-open-color:var(--controlbox-head-color);--list-item-open-hover-color:var(--controlbox-head-color);--list-dot-circle-color:#f6dec1}#conversejs.theme-concord{--avatar-border-radius:100%;--avatar-border:0px;--avatar-background-color:none;--controlbox-pane-background-color:#333;--controlbox-heading-color:#777;--controlbox-heading-font-weight:bold;--chat-topic-display:none;--chat-info-display:none;--chat-textarea-background-color:#F6F6F6;--chat-correcting-color:#FFFFC0;--chat-head-text-color:#AAA;--chatbox-border-radius:0px;--heading-display:inline;--heading-color:#4F545C;--chatroom-head-color:white;--chatroom-head-color-lighten-25-percent:blue;--chatroom-head-button-color:#999;--chatroom-head-title-font-weight:bold;--chatroom-head-title-padding-right:12px;--chatroom-head-description-color:black;--chatroom-head-description-link-color:#00b3f4;--chatroom-head-description-display:inline;--chatroom-head-description-border-left:1px solid #DDD;--chatroom-head-description-padding-left:12px;--chatroom-head-border-bottom:1px solid #EEE;--chatroom-correcting-color:#FFFFC0;--chatroom-badge-color:var(--redder-orange);--chatroom-badge-hover-color:#D24E2B;--occupants-background-color:#F3F3F3;--occupants-border-left:0px;--occupants-border-bottom:0px;--occupants-features-display:none;--separator-text-color:#AAA;--chat-separator-border-bottom:1px solid #AAA;--chatroom-separator-border-bottom:1px solid #AAA;--message-input-border-top:1px solid #CCC;--message-input-color:#CCC;--fullpage-chat-head-height:62px;--fullpage-chatbox-button-size:24px;--list-toggle-font-weight:bold;--list-item-link-color:#F1F1F1;--list-item-link-hover-color:#DDD;--list-item-open-color:#444;--list-item-open-hover-color:#444}body.converse-fullscreen{margin:0}#conversejs-bg .converse-brand{display:flex;justify-content:space-between;margin-top:15vh;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:5s;animation-duration:5s;-webkit-animation-timing-function:ease;animation-timing-function:ease}#conversejs-bg .converse-brand__padding{position:relative;width:100%;padding-right:15px;padding-left:15px;padding:0}@media (min-width:768px){#conversejs-bg .converse-brand__padding{flex:0 0 33.33333%;max-width:33.33333%}}@media (min-width:992px){#conversejs-bg .converse-brand__padding{flex:0 0 25%;max-width:25%}}@media (min-width:1200px){#conversejs-bg .converse-brand__padding{flex:0 0 16.66667%;max-width:16.66667%}}#conversejs-bg .converse-brand__heading{position:relative;width:100%;padding-right:15px;padding-left:15px;padding:0;display:flex;justify-content:center;margin:auto}@media (min-width:768px){#conversejs-bg .converse-brand__heading{font-size:4em;flex:0 0 66.66667%;max-width:66.66667%}}@media (min-width:992px){#conversejs-bg .converse-brand__heading{font-size:5em;flex:0 0 75%;max-width:75%}}@media (min-width:1200px){#conversejs-bg .converse-brand__heading{font-size:6em;flex:0 0 83.33333%;max-width:83.33333%}}#conversejs-bg .converse-brand__heading svg{margin-top:.3em}#conversejs-bg .converse-brand__text{color:#fff;font-family:var(--branding-font);font-weight:400;text-align:center;font-size:140%;margin-left:.2em}#conversejs-bg .converse-brand__text .byline{margin:0;font-family:var(--heading-font);font-size:.3em;opacity:.55;margin-bottom:2em;margin-left:-2.7em;word-spacing:5px}#conversejs .subdued,#conversejs-bg .subdued{opacity:.35}#conversejs{bottom:0;height:100%;position:fixed;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);color:var(--text-color);font-family:var(--normal-font);font-size:var(--font-size);direction:ltr;z-index:1031}#conversejs textarea:disabled{background-color:#eee!important}#conversejs .nopadding{padding:0!important}#conversejs .smooth-scroll{scroll-behavior:smooth!important}#conversejs.converse-overlayed>.row{flex-direction:row-reverse}#conversejs.converse-fullscreen .converse-chatboxes,#conversejs.converse-mobile .converse-chatboxes{width:100vw;left:-15px}#conversejs.converse-overlayed{height:3em}#conversejs.converse-embedded{box-sizing:border-box;bottom:auto;height:100%;position:relative;right:auto;width:100%}#conversejs.converse-embedded *,#conversejs.converse-embedded :after,#conversejs.converse-embedded :before{box-sizing:border-box}#conversejs .brand-heading-container{text-align:center}#conversejs .brand-heading{display:inline-flex;flex-direction:row;align-items:flex-start;font-family:var(--branding-font);color:var(--link-color);margin-bottom:1em}#conversejs .brand-heading .brand-name{color:var(--link-color);display:flex;flex-direction:column;align-items:center;margin-top:-.5em}#conversejs .brand-heading .brand-name__text{font-size:120%;vertical-align:text-bottom}#conversejs .brand-heading .converse-svg-logo{color:var(--link-color);height:1.5em;margin-right:.25em;margin-bottom:-.25em}#conversejs .brand-heading .converse-svg-logo .cls-1{isolation:isolate}#conversejs .brand-heading .converse-svg-logo .cls-2{opacity:.5;mix-blend-mode:multiply}#conversejs .brand-heading .converse-svg-logo .cls-3{fill:var(--link-color)}#conversejs .brand-heading .converse-svg-logo .cls-4{fill:var(--link-color)}#conversejs .brand-heading--inverse .converse-svg-logo{margin-bottom:0;margin-top:-.2em}#conversejs .brand-heading--inverse .byline{margin:0;font-family:var(--heading-font);font-size:.25em;opacity:.55;margin-left:-7em;word-spacing:5px}#conversejs .popover{position:fixed}#conversejs .converse-chatboxes{z-index:1031;position:fixed;bottom:0;right:0}#conversejs ::-webkit-input-placeholder{color:var(--subdued-color)}#conversejs ::-moz-placeholder{color:var(--subdued-color)}#conversejs :-ms-input-placeholder{color:var(--subdued-color)}#conversejs ::-ms-input-placeholder{color:var(--subdued-color)}#conversejs ::placeholder{color:var(--subdued-color)}#conversejs ::-moz-selection{background-color:var(--highlight-color)}#conversejs ::selection{background-color:var(--highlight-color)}#conversejs ::-moz-selection{background-color:var(--highlight-color)}@media screen and (max-width:480px){#conversejs{margin:0;right:10px;left:10px;bottom:5px}}@media screen and (max-height:450px){#conversejs{margin:0;right:10px;left:10px;bottom:5px}}#conversejs ul li{height:auto}#conversejs a,#conversejs article,#conversejs aside,#conversejs audio,#conversejs blockquote,#conversejs caption,#conversejs dd,#conversejs details,#conversejs div,#conversejs dl,#conversejs dt,#conversejs em,#conversejs embed,#conversejs fieldset,#conversejs figcaption,#conversejs figure,#conversejs footer,#conversejs form,#conversejs h1,#conversejs h2,#conversejs h3,#conversejs h4,#conversejs h5,#conversejs h6,#conversejs header,#conversejs hgroup,#conversejs img,#conversejs legend,#conversejs li,#conversejs mark,#conversejs menu,#conversejs nav,#conversejs ol,#conversejs output,#conversejs p,#conversejs pre,#conversejs ruby,#conversejs section,#conversejs span,#conversejs strong,#conversejs summary,#conversejs table,#conversejs tbody,#conversejs td,#conversejs tfoot,#conversejs th,#conversejs thead,#conversejs time,#conversejs tr,#conversejs ul,#conversejs video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}#conversejs button,#conversejs input[type=button],#conversejs input[type=password],#conversejs input[type=submit],#conversejs input[type=text],#conversejs textarea{font-size:var(--font-size);min-height:0}#conversejs strong{font-weight:700}#conversejs em{font-style:italic}#conversejs ol,#conversejs ul{list-style:none}#conversejs li{height:10px}#conversejs dl,#conversejs ol,#conversejs ul{font:inherit;margin:0}#conversejs a{cursor:pointer}#conversejs a,#conversejs a:not([href]):not([tabindex]),#conversejs a:visited{text-decoration:none;color:var(--link-color);text-shadow:none}#conversejs a:hover,#conversejs a:not([href]):not([tabindex]):hover,#conversejs a:visited:hover{color:var(--link-hover-color);text-decoration:none;text-shadow:none}#conversejs a.fa,#conversejs a.far,#conversejs a.fas,#conversejs a:not([href]):not([tabindex]).fa,#conversejs a:not([href]):not([tabindex]).far,#conversejs a:not([href]):not([tabindex]).fas,#conversejs a:visited.fa,#conversejs a:visited.far,#conversejs a:visited.fas{color:var(--subdued-color)}#conversejs a.fa:hover,#conversejs a.far:hover,#conversejs a.fas:hover,#conversejs a:not([href]):not([tabindex]).fa:hover,#conversejs a:not([href]):not([tabindex]).far:hover,#conversejs a:not([href]):not([tabindex]).fas:hover,#conversejs a:visited.fa:hover,#conversejs a:visited.far:hover,#conversejs a:visited.fas:hover{color:var(--gray-color)}#conversejs svg{border-radius:var(--chatbox-border-radius)}#conversejs .fa,#conversejs .far,#conversejs .fas{color:var(--subdued-color)}#conversejs .fa:hover,#conversejs .far:hover,#conversejs .fas:hover{color:var(--gray-color)}#conversejs q{quotes:"“" "”" "‘" "’"}#conversejs q:before{content:open-quote}#conversejs q:after{content:close-quote}#conversejs .helptext{font-size:var(--font-size-tiny);color:var(--text-color-lighten-15-percent)}#conversejs .selected{color:var(--link-color)!important}#conversejs .circle{border-radius:50%}#conversejs .badge{line-height:1;font-weight:400;font-size:90%}#conversejs .btn{font-weight:400;color:#fff}#conversejs .btn .fa,#conversejs .btn .far,#conversejs .btn .fas{color:#fff;margin-right:.5em}#conversejs .no-text-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@keyframes colorchange-chatmessage{0%{background-color:#8dd8ae}25%{background-color:rgba(141,216,174,.75)}50%{background-color:rgba(141,216,174,.5)}75%{background-color:rgba(141,216,174,.25)}100%{background-color:transparent}}@-webkit-keyframes colorchange-chatmessage{0%{background-color:#8dd8ae}25%{background-color:rgba(141,216,174,.75)}50%{background-color:rgba(141,216,174,.5)}75%{background-color:rgba(141,216,174,.25)}100%{background-color:transparent}}@keyframes colorchange-chatmessage-muc{0%{background-color:#ffb5a2}25%{background-color:rgba(255,181,162,.75)}50%{background-color:rgba(255,181,162,.5)}75%{background-color:rgba(255,181,162,.25)}100%{background-color:transparent}}@-webkit-keyframes colorchange-chatmessage-muc{0%{background-color:#ffb5a2}25%{background-color:rgba(255,181,162,.75)}50%{background-color:rgba(255,181,162,.5)}75%{background-color:rgba(255,181,162,.25)}100%{background-color:transparent}}@keyframes fadein{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadein{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeOut{0%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}@keyframes fadeOut{0%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}#conversejs .fade-in{opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease;animation-timing-function:ease}#conversejs .visible{opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease;animation-timing-function:ease}#conversejs .hidden{opacity:0!important;display:none!important}#conversejs .fade-out{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-name:fadeOut;animation-name:fadeOut;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}#conversejs .collapsed{height:0!important;overflow:hidden!important;padding:0!important}#conversejs .locked{padding-right:22px}@-webkit-keyframes spin{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes spin{from{transform:rotate(0)}to{transform:rotate(359deg)}}#conversejs .spinner{-webkit-animation:spin 2s infinite,linear;animation:spin 2s infinite,linear;width:1em;display:block;text-align:center;padding:.5em 0;font-size:24px}#conversejs .left{float:left}#conversejs .right{float:right}#conversejs .centered{text-align:center;display:block;margin:auto}#conversejs .hor_centered{text-align:center;display:block;margin:0 auto;clear:both}#conversejs .error{color:var(--error-color)}#conversejs .info{color:var(--info-color)}#conversejs .reg-feedback{font-size:85%;margin-bottom:1em}#conversejs #converse-login .conn-feedback,#conversejs .reg-feedback{display:block;text-align:center;width:100%}#conversejs .avatar{border-radius:var(--avatar-border-radius);border:var(--avatar-border);background-color:var(--avatar-background-color)}#conversejs .avatar-autocomplete{margin-right:.5em;vertical-align:middle}#conversejs .activated{display:block!important}#conversejs .nav-pills .nav-link.active,#conversejs .nav-pills .show>.nav-link{background-color:var(--primary-color)}#conversejs .list-group-item.active{background-color:var(--primary-color);border-color:var(--primary-color-dark)}#conversejs .badge{text-shadow:none;color:#fff}#conversejs .badge-light{color:var(--text-color)}#conversejs .badge-primary,#conversejs .btn-primary,#conversejs .button-primary{background-color:var(--primary-color);border-color:transparent}#conversejs .badge-primary:hover,#conversejs .btn-primary:hover,#conversejs .button-primary:hover{background-color:var(--primary-color-dark);border-color:transparent}#conversejs .badge-primary.active,#conversejs .btn-primary.active,#conversejs .button-primary.active{background-color:var(--primary-color-dark)!important;border-color:transparent!important}#conversejs .badge-groupchat{background-color:var(--chatroom-badge-color);border-color:transparent}#conversejs .badge-groupchat:hover{background-color:var(--chatroom-badge-hover-color);border-color:transparent}#conversejs .badge-groupchat.active{background-color:var(--chatroom-badge-hover-color)!important;border-color:transparent!important}#conversejs .badge-info,#conversejs .btn-info{background-color:var(--primary-color);border-color:var(--primary-color)}#conversejs .badge-info:hover,#conversejs .btn-info:hover{background-color:var(--primary-color-dark);border-color:var(--primary-color-dark)}#conversejs .badge-secondary,#conversejs .btn-secondary,#conversejs .button-cancel{color:#fff;background-color:var(--secondary-color);border-color:var(--secondary-color)}#conversejs .badge-secondary:hover,#conversejs .btn-secondary:hover,#conversejs .button-cancel:hover{background-color:var(--secondary-color-dark);border-color:var(--secondary-color-dark)}#conversejs .btn-warning{color:#fff;background-color:var(--warning-color);border-color:var(--warning-color)}#conversejs .btn-warning:hover{color:#fff;background-color:var(--warning-color-dark);border-color:var(--warning-color-dark)}#conversejs .btn-danger{color:#fff;background-color:var(--danger-color);border-color:var(--danger-color)!important}#conversejs .btn-danger:hover{background-color:var(--danger-color-dark);border-color:var(--danger-color-dark)}@media screen and (max-width:575px){body .converse-brand{font-size:3.75em}#conversejs:not(.converse-embedded) .chatbox .chat-body{border-radius:var(--chatbox-border-radius)}#conversejs:not(.converse-embedded) .flyout{border-radius:var(--chatbox-border-radius)}}@media screen and (min-width:576px){#conversejs .offset-sm-2{margin-left:16.666667%}}@media screen and (min-width:768px){#conversejs .offset-md-2{margin-left:16.666667%}#conversejs .offset-md-3{margin-left:25%}}@media screen and (min-width:992px){#conversejs .offset-lg-2{margin-left:16.666667%}#conversejs .offset-lg-3{margin-left:25%}}@media screen and (min-width:1200px){#conversejs .offset-xl-2{margin-left:16.666667%}}@media screen and (max-height:450px){#conversejs{left:0}}#conversejs .btn--small{font-size:80%;font-weight:400}#conversejs form .hidden-username{opacity:0!important;height:0!important;padding:0!important}#conversejs form .error-feedback{margin-bottom:.5em}#conversejs form .form-check-label{margin-top:.3rem}#conversejs form .form-control::-webkit-input-placeholder{color:var(--subdued-color)}#conversejs form .form-control::-moz-placeholder{color:var(--subdued-color)}#conversejs form .form-control:-ms-input-placeholder{color:var(--subdued-color)}#conversejs form .form-control::-ms-input-placeholder{color:var(--subdued-color)}#conversejs form .form-control::placeholder{color:var(--subdued-color)}#conversejs form .clear-input{margin-top:.5em;margin-bottom:.5em;position:absolute;right:.2em;cursor:pointer;font-size:var(--font-size)}#conversejs form#converse-login,#conversejs form#converse-register{background:var(--controlbox-pane-background-color)}#conversejs form#converse-login legend,#conversejs form#converse-register legend{width:100%;text-align:center;margin:0 auto .5em auto}#conversejs form#converse-login fieldset.buttons,#conversejs form#converse-register fieldset.buttons{text-align:center}#conversejs form#converse-login .login-anon,#conversejs form#converse-register .login-anon{height:auto;white-space:normal}#conversejs form#converse-login .save-submit,#conversejs form#converse-register .save-submit{color:var(--save-button-color)}#conversejs form#converse-login .form-url,#conversejs form#converse-register .form-url{display:block;font-weight:400;margin:1em 0}#conversejs form.converse-form{padding:1.2rem}#conversejs form.converse-form legend{color:var(--text-color);font-size:125%;margin-bottom:1.5em}#conversejs form.converse-form input[type=number],#conversejs form.converse-form input[type=password],#conversejs form.converse-form input[type=text],#conversejs form.converse-form select{min-width:50%}#conversejs form.converse-form input[type=button],#conversejs form.converse-form input[type=number],#conversejs form.converse-form input[type=password],#conversejs form.converse-form input[type=submit],#conversejs form.converse-form input[type=text]{padding:.5em}#conversejs form.converse-form input[type=button],#conversejs form.converse-form input[type=submit]{padding-left:1em;padding-right:1em;border:none}#conversejs form.converse-form input.error{border:1px solid var(--error-color);color:var(--text-color)}#conversejs form.converse-form .text-muted{color:var(--subdued-color)!important;font-size:85%;padding-top:.5em}#conversejs form.converse-form .text-muted a{color:var(--link-color-lighten-10-percent)}#conversejs form.converse-form .text-muted.error{color:var(--error-color)}#conversejs form.converse-form--modal{padding-bottom:0}#conversejs form.converse-centered-form{min-height:66%;text-align:center}#conversejs form.converse-centered-form input{max-width:30em;margin:auto}#conversejs .chatbox-navback{display:none}#conversejs .flyout{border-radius:var(--chatbox-border-radius);position:absolute}@media screen and (max-height:450px){#conversejs .flyout{border-radius:0}}@media screen and (max-width:480px){#conversejs .flyout{border-radius:0}}@media screen and (max-height:450px){#conversejs .flyout{bottom:0}}@media screen and (max-width:480px){#conversejs .flyout{bottom:0}}#conversejs .chatbox-btn{border-radius:25%;border:none;cursor:pointer;font-size:var(--chatbox-button-size);margin:0 .2em;padding:0 0 0 .5em;text-decoration:none}#conversejs .chatbox-btn:active{position:relative;top:1px}#conversejs .chat-head{display:flex;flex-direction:row;color:#fff;font-size:100%;margin:0;padding:0;padding-bottom:.5em;position:relative}#conversejs .chat-head.chat-head-chatbox{background-color:var(--chat-head-color)}#conversejs .chat-head .avatar{margin-right:.5em}#conversejs .chat-head .chat-head__desc{font-size:80%}#conversejs .chat-head .chatbox-title{display:flex;flex-direction:row;justify-content:space-between;width:100%}#conversejs .chat-head .chatbox-title--row{display:flex;flex-direction:row;overflow:hidden}#conversejs .chat-head .chatbox-title__text{overflow:hidden;text-overflow:ellipsis}#conversejs .chat-head .chatbox-title__buttons{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;padding:0}#conversejs .chat-head .user-custom-message{color:var(--chat-head-color-lighten-50-percent);font-size:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;padding-top:.2em}#conversejs .chat-head a.chatbox-btn.fa,#conversejs .chat-head a.chatbox-btn.far,#conversejs .chat-head a.chatbox-btn.fas,#conversejs .chat-head a:hover.chatbox-btn.fa,#conversejs .chat-head a:hover.chatbox-btn.far,#conversejs .chat-head a:hover.chatbox-btn.fas,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fa,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.far,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fas,#conversejs .chat-head a:visited.chatbox-btn.fa,#conversejs .chat-head a:visited.chatbox-btn.far,#conversejs .chat-head a:visited.chatbox-btn.fas{color:#fff}#conversejs .chat-head a.chatbox-btn.fa.button-on:before,#conversejs .chat-head a.chatbox-btn.far.button-on:before,#conversejs .chat-head a.chatbox-btn.fas.button-on:before,#conversejs .chat-head a:hover.chatbox-btn.fa.button-on:before,#conversejs .chat-head a:hover.chatbox-btn.far.button-on:before,#conversejs .chat-head a:hover.chatbox-btn.fas.button-on:before,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.far.button-on:before,#conversejs .chat-head a:not([href]):not([tabindex]).chatbox-btn.fas.button-on:before,#conversejs .chat-head a:visited.chatbox-btn.fa.button-on:before,#conversejs .chat-head a:visited.chatbox-btn.far.button-on:before,#conversejs .chat-head a:visited.chatbox-btn.fas.button-on:before{padding:.2em;background-color:var(--chat-head-text-color);color:var(--chat-head-color)}#conversejs .chat-head .chatbox-btn{color:#fff}#conversejs .chat-head .chatbox-btn.fa,#conversejs .chat-head .chatbox-btn.far,#conversejs .chat-head .chatbox-btn.fas{color:#fff}#conversejs .chat-head .chatbox-btn:active{position:relative;top:1px}#conversejs .chat-head .chatbox-btn.button-on:before{border-radius:5%;background-color:var(--chat-head-text-color);color:var(--chat-head-color)}#conversejs .chatbox{text-align:left;margin:0 var(--chat-gutter)}@media screen and (max-height:450px){#conversejs .chatbox{margin:0;width:var(--mobile-chat-width)}}@media screen and (max-width:480px){#conversejs .chatbox{margin:0;width:var(--mobile-chat-width)}}#conversejs .chatbox .box-flyout{display:flex;flex-direction:column;justify-content:space-between;background-color:var(--chat-head-color);box-shadow:1px 3px 5px 3px rgba(0,0,0,.4);z-index:2;overflow:hidden;width:100%}@media screen and (max-height:450px){#conversejs .chatbox .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}@media screen and (max-width:480px){#conversejs .chatbox .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}#conversejs .chatbox .chat-title{display:var(--heading-display);font-family:var(--heading-font);color:var(--heading-color);display:block;line-height:var(--line-height-large);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#conversejs .chatbox .chat-title.groupchat{padding-right:var(--chatroom-head-title-padding-right)}#conversejs .chatbox .chat-title a{color:var(--chat-head-text-color);width:100%}#conversejs .chatbox .chat-body{display:flex;flex-direction:column;justify-content:space-between;height:100%;background-color:var(--chat-head-color);border-bottom-left-radius:var(--chatbox-border-radius);border-bottom-right-radius:var(--chatbox-border-radius);border-top:0}@media screen and (max-height:450px){#conversejs .chatbox .chat-body{border-bottom-left-radius:0;border-bottom-right-radius:0}}@media screen and (max-width:480px){#conversejs .chatbox .chat-body{border-bottom-left-radius:0;border-bottom-right-radius:0}}#conversejs .chatbox .chat-body p{color:var(--text-color);font-size:var(--message-font-size);margin:0;padding:5px}#conversejs .chatbox .new-msgs-indicator{position:relative;width:100%;cursor:pointer;background-color:var(--chat-head-color);color:var(--light-background-color);padding:.5em;font-size:.9em;text-align:center;z-index:20;white-space:nowrap;margin-bottom:.25em}#conversejs .chatbox .chat-content{padding:1em 0;height:100%;font-size:var(--message-font-size);color:var(--text-color);overflow-y:auto;border:0;background-color:var(--chat-content-background-color);line-height:1.3em}#conversejs .chatbox .chat-content video{width:100%}#conversejs .chatbox .chat-content progress{margin:.5em 0;width:100%}#conversejs .chatbox .chat-content-sendbutton{height:calc(100% - (var(--chat-textarea-height) + var(--send-button-height) + 2 * var(--send-button-margin)))}#conversejs .chatbox .dropdown{background-color:var(--light-background-color)}#conversejs .chatbox .dropdown dd{margin:0;padding:0;position:relative}#conversejs .chatbox .sendXMPPMessage{-moz-background-clip:padding;-webkit-background-clip:padding-box;border-bottom-radius:var(--chatbox-border-radius);background-clip:padding-box;background-color:#fff;border:0;margin:0;padding:0}@media screen and (max-height:450px){#conversejs .chatbox .sendXMPPMessage{width:100%}}@media screen and (max-width:480px){#conversejs .chatbox .sendXMPPMessage{width:100%}}#conversejs .chatbox .sendXMPPMessage .suggestion-box__results:after{display:none}#conversejs .chatbox .sendXMPPMessage .spoiler-hint{width:100%}#conversejs .chatbox .sendXMPPMessage .chat-textarea{color:var(--chat-textarea-color);background-color:var(--chat-textarea-background-color);border-top-left-radius:0;border-top-right-radius:0;border-bottom-radius:var(--chatbox-border-radius);padding-left:.5em;padding-right:4.5em;padding-top:.5em;padding-bottom:.5em;width:100%;border:none;min-height:var(--chat-textarea-height);margin-bottom:-4px;resize:none;text-align:justify}#conversejs .chatbox .sendXMPPMessage .chat-textarea:active,#conversejs .chatbox .sendXMPPMessage .chat-textarea:focus{outline-color:var(--chat-head-color)}#conversejs .chatbox .sendXMPPMessage .chat-textarea.spoiler{height:42px}#conversejs .chatbox .sendXMPPMessage .chat-textarea.correcting{background-color:var(--chat-correcting-color)}#conversejs .chatbox .sendXMPPMessage .send-button{border-radius:0;bottom:var(--send-button-bottom);background-color:var(--chat-head-color);color:var(--inverse-link-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar--container{display:flex;flex-wrap:nowrap}#conversejs .chatbox .sendXMPPMessage .chat-toolbar{box-sizing:border-box;margin:0;width:100%;padding:.25em;display:block;border-top:4px solid var(--chat-head-color);background-color:#fff;color:var(--chat-head-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fa,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fa:hover,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .far,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .far:hover,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fas,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .fas:hover{color:var(--chat-head-color);font-size:var(--font-size-large)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .disabled{color:var(--text-color-lighten-15-percent)!important}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted a{color:var(--text-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted .toolbar-menu a,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unencrypted a .toolbar-menu a{color:var(--link-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unverified,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .unverified a{color:#cf5300}#conversejs .chatbox .sendXMPPMessage .chat-toolbar .private,#conversejs .chatbox .sendXMPPMessage .chat-toolbar .private a{color:#4b7003}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li{cursor:pointer;display:inline-block;list-style:none;padding:0 .5em}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li:hover{cursor:pointer}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu{background-color:#fff;bottom:1.7rem;box-shadow:-1px -1px 2px 0 rgba(0,0,0,.4);height:auto;margin-bottom:0;min-width:21rem;position:absolute;right:0;top:auto;z-index:1000}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu.otr-menu{left:-6em;min-width:15rem}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu.otr-menu.show{display:flex;flex-direction:column}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu a{color:var(--link-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul{z-index:99}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li{display:block;padding:7px}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li:hover{background-color:var(--highlight-color)}#conversejs .chatbox .sendXMPPMessage .chat-toolbar li.toggle-otr ul li a{display:block}#conversejs .chatbox .dragresize{background:0 0;border:0;margin:0;position:absolute;top:0;z-index:20}#conversejs .chatbox .dragresize-top{cursor:n-resize;height:5px;width:100%}#conversejs .chatbox .dragresize-left,#conversejs .chatbox .dragresize-occupants-left{cursor:w-resize;width:5px;height:100%;left:0}#conversejs .chatbox .dragresize-topleft{cursor:nw-resize;width:15px;height:15px;top:0;left:0}#conversejs.converse-embedded .chat-head,#conversejs.converse-overlayed .chat-head{padding:.5em;border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius)}@media screen and (max-height:450px){#conversejs.converse-embedded .chat-head,#conversejs.converse-overlayed .chat-head{border-top-left-radius:0;border-top-right-radius:0}}@media screen and (max-width:480px){#conversejs.converse-embedded .chat-head,#conversejs.converse-overlayed .chat-head{border-top-left-radius:0;border-top-right-radius:0}}#conversejs.converse-embedded .chatbox,#conversejs.converse-overlayed .chatbox{min-width:var(--overlayed-chat-width)!important;width:var(--overlayed-chat-width)}#conversejs.converse-embedded .chatbox .box-flyout,#conversejs.converse-overlayed .chatbox .box-flyout{min-width:var(--overlayed-chat-width)!important;width:var(--overlayed-chat-width)}#conversejs.converse-overlayed .flyout{bottom:var(--overlayed-chatbox-hover-height)}#conversejs.converse-overlayed .box-flyout{height:var(--overlayed-chat-height);min-height:calc(var(--overlayed-chat-height)/ 2)}#conversejs.converse-overlayed .chat-head{min-height:var(--overlayed-chat-head-height)}#conversejs.converse-overlayed .chat-textarea{max-height:var(--overlayed-max-chat-textarea-height)}#conversejs.converse-overlayed .chatbox .sendXMPPMessage .chat-toolbar li .toolbar-menu{min-width:235px}@media (max-width:767.98px){#conversejs.converse-overlayed>.row{flex-direction:column}#conversejs.converse-overlayed>.row.no-gutters{margin:-1em}}#conversejs.converse-embedded .flyout,#conversejs.converse-fullscreen .flyout{border-radius:0;border-top:.8em solid var(--chat-head-color);border:var(--flyout-padding) solid var(--chat-head-color);bottom:0}#conversejs.converse-embedded .chat-head,#conversejs.converse-fullscreen .chat-head{height:var(--fullpage-chat-head-height)}#conversejs.converse-embedded .chat-head .user-custom-message,#conversejs.converse-fullscreen .chat-head .user-custom-message{font-size:70%;height:auto;line-height:var(--line-height)}#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{margin:0;position:relative;width:100%;padding-right:15px;padding-left:15px}#conversejs.converse-embedded .chatbox .box-flyout,#conversejs.converse-fullscreen .chatbox .box-flyout{box-shadow:none;overflow:hidden}@media (min-width:768px){#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{flex:0 0 66.66667%;max-width:66.66667%}}@media (min-width:992px){#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{flex:0 0 75%;max-width:75%}}@media (min-width:1200px){#conversejs.converse-embedded .chatbox,#conversejs.converse-fullscreen .chatbox{flex:0 0 83.33333%;max-width:83.33333%}}#conversejs.converse-embedded.converse-singleton .flyout,#conversejs.converse-fullscreen.converse-singleton .flyout{border:none!important}#conversejs.converse-embedded.converse-singleton .chat-head,#conversejs.converse-fullscreen.converse-singleton .chat-head{min-height:var(--fullpage-chat-head-height);padding:.5em}#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{margin:0;position:relative;width:100%;padding-right:15px;padding-left:15px}@media (min-width:768px){#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{flex:0 0 100%;max-width:100%}}@media (min-width:992px){#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{flex:0 0 100%;max-width:100%}}@media (min-width:1200px){#conversejs.converse-embedded.converse-singleton .chatbox,#conversejs.converse-fullscreen.converse-singleton .chatbox{flex:0 0 100%;max-width:100%}}#conversejs.converse-embedded .converse-chatboxes{z-index:1031;position:inherit;flex-wrap:nowrap;bottom:auto;height:100%;width:100%;margin-left:-15px}#conversejs.converse-embedded .chatbox .box-flyout{bottom:0;height:100%;min-width:auto;width:100%}#conversejs.converse-embedded .chatbox .chat-title--text{padding:.3em;font-size:120%}#conversejs.converse-embedded .chat-textarea{max-height:var(--fullpage-max-chat-textarea-height)}#conversejs.converse-fullscreen .chatbox-btn{font-size:var(--fullpage-chatbox-button-size);margin:0 .3em}#conversejs.converse-fullscreen .chat-head{font-size:var(--font-size-huge)}#conversejs.converse-fullscreen .chat-textarea{max-height:var(--fullpage-max-chat-textarea-height)}#conversejs.converse-fullscreen .chatbox .box-flyout{background-color:var(--chat-head-color);box-shadow:none;height:var(--fullpage-chat-height);min-height:calc(var(--fullpage-chat-height)/ 2);width:var(--fullpage-chat-width);overflow:hidden}#conversejs.converse-fullscreen .chatbox .chat-body{background-color:var(--chat-head-color);border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius)}#conversejs.converse-fullscreen .chatbox .chat-content{border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius)}#conversejs.converse-fullscreen .chatbox .chat-title{font-size:var(--font-size-huge);line-height:var(--line-height-huge)}#conversejs.converse-fullscreen .chatbox .sendXMPPMessage ul{width:100%}@media (max-width:767.98px){#conversejs:not(.converse-embedded)>.row{flex-direction:row-reverse}#conversejs:not(.converse-embedded) #converse-login-panel .converse-form{padding:3em 2em 3em}#conversejs:not(.converse-embedded) .chatbox{width:calc(100% - 50px)}#conversejs:not(.converse-embedded) .chatbox .row .box-flyout{left:50px;bottom:0;height:100vh;box-shadow:none}#conversejs.converse-fullscreen .chatbox .box-flyout .chatbox-navback,#conversejs.converse-mobile .chatbox .box-flyout .chatbox-navback,#conversejs.converse-overlayed .chatbox .box-flyout .chatbox-navback{display:flex;padding-right:1em}#conversejs.converse-fullscreen .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before,#conversejs.converse-mobile .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before,#conversejs.converse-overlayed .chatbox .box-flyout .chatbox-navback .fa-arrow-left:before{color:#fff}}#conversejs .oauth-providers{text-align:center}#conversejs .oauth-providers .oauth-provider{margin:1em 0}#conversejs .oauth-providers .oauth-provider .oauth-login{margin-left:0;color:var(--link-color);font-size:var(--font-size-large)}#conversejs .oauth-providers .oauth-provider .oauth-login:hover{color:var(--link-hover-color)}#conversejs .oauth-providers .oauth-provider .oauth-login i{color:var(--link-color);font-size:var(--font-size-huge);margin-right:.5em}#conversejs .set-xmpp-status .chat-status--online,#conversejs .xmpp-status .chat-status--online{color:var(--chat-status-online)}#conversejs .set-xmpp-status .chat-status--busy,#conversejs .xmpp-status .chat-status--busy{color:var(--chat-status-busy)}#conversejs .set-xmpp-status .chat-status--away,#conversejs .xmpp-status .chat-status--away{color:var(--chat-status-away)}#conversejs .set-xmpp-status .fa-times-circle,#conversejs .set-xmpp-status .far.fa-circle,#conversejs .xmpp-status .fa-times-circle,#conversejs .xmpp-status .far.fa-circle{color:var(--subdued-color)}#conversejs .room-info{font-size:var(--font-size-small);font-style:normal;font-weight:400}#conversejs .room-info li.room-info{display:block;margin-left:5px}#conversejs .room-info p.room-info{line-height:var(--line-height);margin:0;display:block;white-space:normal}#conversejs div.room-info{padding:.3em 0;clear:left;width:100%}#conversejs #controlbox{order:-1;margin-right:calc(3 * var(--chat-gutter))}#conversejs #controlbox .open-rooms-toggle,#conversejs #controlbox .open-rooms-toggle .fa{color:var(--chatroom-head-color)!important}#conversejs #controlbox .open-rooms-toggle .fa:hover,#conversejs #controlbox .open-rooms-toggle:hover{color:var(--chatroom-head-color-dark)!important}#conversejs #controlbox .box-flyout{background-color:#fff}#conversejs #controlbox.logged-out .box-flyout .controlbox-pane{overflow-y:auto}#conversejs #controlbox form.search-xmpp-contact{margin:0;padding-left:5px;padding:0 0 5px 5px}#conversejs #controlbox form.search-xmpp-contact input{width:8em}#conversejs #controlbox .msgs-indicator{margin-right:.5em}#conversejs #controlbox a.subscribe-to-user{padding-left:2em;font-weight:700}#conversejs #controlbox #converse-register{opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease;animation-timing-function:ease;background:#fff}#conversejs #controlbox #converse-register .title{font-weight:700}#conversejs #controlbox #converse-register .info{color:green;font-size:90%;margin:1.5em 0}#conversejs #controlbox #converse-register .form-errors{color:var(--error-color);margin:1em 0}#conversejs #controlbox #converse-register .provider-title{font-size:var(--font-size-huge);margin:0}#conversejs #controlbox #converse-register .provider-score{width:178px;margin-bottom:8px}#conversejs #controlbox #converse-register .form-help .url{font-weight:700;color:var(--link-color)}#conversejs #controlbox #converse-register .input-group{display:table;margin:auto;width:100%}#conversejs #controlbox #converse-register .input-group span{overflow-x:hidden;text-overflow:ellipsis;max-width:110px}#conversejs #controlbox #converse-register .input-group input[name=username],#conversejs #controlbox #converse-register .input-group span{display:table-cell;text-align:left}#conversejs #controlbox #converse-register .instructions{color:gray;font-size:85%}#conversejs #controlbox #converse-register .instructions:hover{color:var(--text-color)}#conversejs #controlbox .conn-feedback{color:var(--controlbox-head-color)}#conversejs #controlbox .conn-feedback.error{color:var(--error-color)}#conversejs #controlbox .conn-feedback p{padding-bottom:1em}#conversejs #controlbox .conn-feedback p.feedback-subject.error{font-weight:700}#conversejs #controlbox #converse-login-panel,#conversejs #controlbox #converse-register-panel{padding-top:0;padding-bottom:0}#conversejs #controlbox #converse-login-panel{flex-direction:column}#conversejs #controlbox #converse-login-panel .brand-heading{color:var(--global-background-color)}#conversejs #controlbox .toggle-register-login{font-weight:700}#conversejs #controlbox .controlbox-pane .userinfo{padding-bottom:1em}#conversejs #controlbox .controlbox-pane .userinfo .username{margin-left:.5em;overflow:hidden;text-overflow:ellipsis}#conversejs #controlbox .controlbox-pane .userinfo .profile{margin-bottom:.75em}#conversejs #controlbox #chatrooms{padding:0}#conversejs #controlbox #chatrooms .add-chatroom{margin:0;padding:0}#conversejs #controlbox #chatrooms .add-chatroom input[type=button],#conversejs #controlbox #chatrooms .add-chatroom input[type=submit],#conversejs #controlbox #chatrooms .add-chatroom input[type=text]{width:100%}#conversejs #controlbox .controlbox-section .controlbox-heading{font-family:var(--heading-font);color:var(--controlbox-heading-color);font-weight:var(--controlbox-heading-font-weight);padding:0;font-size:1.1em;line-height:1.1em;text-transform:uppercase}#conversejs #controlbox .controlbox-section .controlbox-heading--groupchats{color:var(--chatroom-head-color)}#conversejs #controlbox .controlbox-section .controlbox-heading--contacts{color:var(--chat-head-color-dark)}#conversejs #controlbox .controlbox-section .controlbox-heading__btn{cursor:pointer;font-size:1em;padding:0;margin:var(--controlbox-heading-top-margin) 0 var(--inline-action-margin) 0;min-width:25px;text-align:center}#conversejs #controlbox .controlbox-section .controlbox-heading__btn.fa-vcard{margin-top:1em}#conversejs #controlbox .dropdown a{width:143px;display:inline-block}#conversejs #controlbox .dropdown li{list-style:none;padding-left:0}#conversejs #controlbox .dropdown dd ul{padding:0;list-style:none;position:absolute;left:0;top:0;width:100%;z-index:21;background-color:var(--light-background-color)}#conversejs #controlbox .dropdown dd ul li:hover{background-color:var(--highlight-color)}#conversejs #controlbox .dropdown dd.search-xmpp{height:0}#conversejs #controlbox .dropdown dd.search-xmpp .contact-form-container{position:absolute;z-index:22}#conversejs #controlbox .dropdown dd.search-xmpp .contact-form-container form{box-shadow:1px 4px 10px 1px rgba(0,0,0,.4);background-color:#fff}#conversejs #controlbox .dropdown dd.search-xmpp li:hover{background-color:var(--light-background-color)}#conversejs #controlbox .dropdown dt a span{cursor:pointer;display:block;padding:4px 7px 0 5px}#conversejs #controlbox .controlbox-panes{background-color:var(--controlbox-pane-background-color);height:100%;overflow-y:auto}#conversejs #controlbox .controlbox-subtitle{font-size:90%;padding:.5em;text-align:right}#conversejs #controlbox .controlbox-pane{background-color:var(--controlbox-pane-background-color);border:0;font-size:var(--font-size);left:0;text-align:left;overflow-x:hidden;padding:0 0 1em 0}#conversejs #controlbox .controlbox-pane .controlbox-padded{padding-left:1em;padding-right:1em;align-items:center;line-height:normal}#conversejs #controlbox .controlbox-pane .controlbox-padded .change-status{min-width:25px;text-align:center}#conversejs #controlbox .controlbox-pane .add-converse-contact{margin:0 0 .75em 0}#conversejs #controlbox .controlbox-pane .chatbox-btn{margin:0}#conversejs #controlbox .controlbox-pane .switch-form{text-align:center;padding:2em 0}#conversejs #controlbox .controlbox-pane .switch-form p{margin-top:.5em}#conversejs #controlbox .controlbox-pane dd{margin-left:0;margin-bottom:0}#conversejs #controlbox .controlbox-pane dd.odd{background-color:#dceac5}#conversejs #controlbox .add-xmpp-contact{padding:1em .5em}#conversejs #controlbox .add-xmpp-contact input{margin:0 0 1rem;width:100%}#conversejs #controlbox .add-xmpp-contact button{width:100%}#conversejs.converse-overlayed .toggle-controlbox{order:-1;text-align:center;background-color:var(--link-color);border-top-left-radius:var(--button-border-radius);border-top-right-radius:var(--button-border-radius);color:#0a0a0a;float:right;height:100%;margin:0 var(--chat-gutter);padding:1em}#conversejs.converse-overlayed .toggle-controlbox span{color:var(--inverse-link-color)}#conversejs.converse-overlayed #controlbox{min-width:var(--controlbox-width)!important;width:var(--controlbox-width)}#conversejs.converse-overlayed #controlbox .box-flyout{min-width:var(--controlbox-width)!important;width:var(--controlbox-width)}#conversejs.converse-overlayed #controlbox .login-trusted{white-space:nowrap;font-size:90%}#conversejs.converse-overlayed #controlbox #converse-login-trusted{margin-top:.5em}#conversejs.converse-overlayed #controlbox:not(.logged-out) .controlbox-head{height:15px}#conversejs.converse-overlayed #controlbox .brand-heading-container{width:100%}#conversejs.converse-overlayed #controlbox .controlbox-head{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;justify-content:space-between;min-height:0}#conversejs.converse-overlayed #controlbox .controlbox-head .brand-heading{color:var(--text-color);font-size:2em}#conversejs.converse-overlayed #controlbox .controlbox-head .chatbox-btn{color:var(--controlbox-head-color);margin:0}#conversejs.converse-overlayed #controlbox #converse-login,#conversejs.converse-overlayed #controlbox #converse-register{flex:0 0 100%;max-width:100%;padding-bottom:0}#conversejs.converse-overlayed #controlbox #converse-register .button-cancel{font-size:90%}#conversejs.converse-overlayed #controlbox .controlbox-panes{border-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .toggle-controlbox,#conversejs.converse-fullscreen .toggle-controlbox{display:none}#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{position:relative;width:100%;padding-right:15px;padding-left:15px;margin:0}@media (min-width:768px){#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{flex:0 0 33.33333%;max-width:33.33333%}}@media (min-width:992px){#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{flex:0 0 25%;max-width:25%}}@media (min-width:1200px){#conversejs.converse-embedded #controlbox,#conversejs.converse-fullscreen #controlbox,#conversejs.converse-mobile #controlbox{flex:0 0 16.66667%;max-width:16.66667%}}#conversejs.converse-embedded #controlbox.logged-out,#conversejs.converse-fullscreen #controlbox.logged-out,#conversejs.converse-mobile #controlbox.logged-out{flex:0 0 100%;max-width:100%}#conversejs.converse-embedded #controlbox .controlbox-pane,#conversejs.converse-fullscreen #controlbox .controlbox-pane,#conversejs.converse-mobile #controlbox .controlbox-pane{border-radius:0}#conversejs.converse-embedded #controlbox .flyout,#conversejs.converse-fullscreen #controlbox .flyout,#conversejs.converse-mobile #controlbox .flyout{border-radius:0}#conversejs.converse-embedded #controlbox #converse-login-panel,#conversejs.converse-fullscreen #controlbox #converse-login-panel,#conversejs.converse-mobile #controlbox #converse-login-panel{border-radius:0}#conversejs.converse-embedded #controlbox #converse-login-panel .converse-form,#conversejs.converse-fullscreen #controlbox #converse-login-panel .converse-form,#conversejs.converse-mobile #controlbox #converse-login-panel .converse-form{padding:3em 2em 3em}#conversejs.converse-embedded #controlbox .toggle-register-login,#conversejs.converse-fullscreen #controlbox .toggle-register-login,#conversejs.converse-mobile #controlbox .toggle-register-login{line-height:var(--line-height-huge)}#conversejs.converse-embedded #controlbox .brand-heading-container,#conversejs.converse-fullscreen #controlbox .brand-heading-container,#conversejs.converse-mobile #controlbox .brand-heading-container{flex:0 0 100%;max-width:100%;margin-top:5em;margin-bottom:1em}#conversejs.converse-embedded #controlbox .brand-heading-container .brand-heading,#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-heading,#conversejs.converse-mobile #controlbox .brand-heading-container .brand-heading{font-size:500%;padding:.7em 0 0 0;opacity:.8;color:var(--brand-heading-color)}#conversejs.converse-embedded #controlbox .brand-heading-container .brand-subtitle,#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-subtitle,#conversejs.converse-mobile #controlbox .brand-heading-container .brand-subtitle{font-size:90%;padding:.5em}@media screen and (max-width:480px){#conversejs.converse-embedded #controlbox .brand-heading-container .brand-heading,#conversejs.converse-fullscreen #controlbox .brand-heading-container .brand-heading,#conversejs.converse-mobile #controlbox .brand-heading-container .brand-heading{font-size:300%}}#conversejs.converse-embedded #controlbox.logged-out,#conversejs.converse-fullscreen #controlbox.logged-out,#conversejs.converse-mobile #controlbox.logged-out{flex:0 0 100%;max-width:100%;opacity:0;-webkit-animation-name:fadein;animation-name:fadein;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease;animation-timing-function:ease;width:100%}#conversejs.converse-embedded #controlbox.logged-out .box-flyout,#conversejs.converse-fullscreen #controlbox.logged-out .box-flyout,#conversejs.converse-mobile #controlbox.logged-out .box-flyout{width:100%}#conversejs.converse-embedded #controlbox .box-flyout,#conversejs.converse-fullscreen #controlbox .box-flyout,#conversejs.converse-mobile #controlbox .box-flyout{border:0;width:100%;z-index:1;background-color:var(--controlbox-head-color)}#conversejs.converse-embedded #controlbox .box-flyout .controlbox-head,#conversejs.converse-fullscreen #controlbox .box-flyout .controlbox-head,#conversejs.converse-mobile #controlbox .box-flyout .controlbox-head{display:none}#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{position:relative;width:100%;padding-right:15px;padding-left:15px;flex:0 0 66.66667%;max-width:66.66667%;margin-left:16.66667%}@media (min-width:576px){#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{flex:0 0 66.66667%;max-width:66.66667%;margin-left:16.66667%}}@media (min-width:768px){#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{flex:0 0 66.66667%;max-width:66.66667%;margin-left:16.66667%}}@media (min-width:992px){#conversejs.converse-embedded #controlbox #converse-login,#conversejs.converse-embedded #controlbox #converse-register,#conversejs.converse-fullscreen #controlbox #converse-login,#conversejs.converse-fullscreen #controlbox #converse-register,#conversejs.converse-mobile #controlbox #converse-login,#conversejs.converse-mobile #controlbox #converse-register{flex:0 0 50%;max-width:50%;margin-left:25%}}#conversejs.converse-embedded #controlbox #converse-login .instructions,#conversejs.converse-embedded #controlbox #converse-login .title,#conversejs.converse-embedded #controlbox #converse-register .instructions,#conversejs.converse-embedded #controlbox #converse-register .title,#conversejs.converse-fullscreen #controlbox #converse-login .instructions,#conversejs.converse-fullscreen #controlbox #converse-login .title,#conversejs.converse-fullscreen #controlbox #converse-register .instructions,#conversejs.converse-fullscreen #controlbox #converse-register .title,#conversejs.converse-mobile #controlbox #converse-login .instructions,#conversejs.converse-mobile #controlbox #converse-login .title,#conversejs.converse-mobile #controlbox #converse-register .instructions,#conversejs.converse-mobile #controlbox #converse-register .title{margin:1em 0}#conversejs.converse-embedded #controlbox #converse-login input[type=button],#conversejs.converse-embedded #controlbox #converse-login input[type=submit],#conversejs.converse-embedded #controlbox #converse-register input[type=button],#conversejs.converse-embedded #controlbox #converse-register input[type=submit],#conversejs.converse-fullscreen #controlbox #converse-login input[type=button],#conversejs.converse-fullscreen #controlbox #converse-login input[type=submit],#conversejs.converse-fullscreen #controlbox #converse-register input[type=button],#conversejs.converse-fullscreen #controlbox #converse-register input[type=submit],#conversejs.converse-mobile #controlbox #converse-login input[type=button],#conversejs.converse-mobile #controlbox #converse-login input[type=submit],#conversejs.converse-mobile #controlbox #converse-register input[type=button],#conversejs.converse-mobile #controlbox #converse-register input[type=submit]{width:auto}@media (max-width:767.98px){#conversejs{left:0;right:0;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}#conversejs .converse-chatboxes{margin:0!important;flex-direction:row!important;justify-content:space-between}#conversejs .converse-chatboxes .converse-chatroom{font-size:14px}#conversejs .converse-chatboxes .chatbox .box-flyout{margin-left:15px;left:0;bottom:0;border-radius:0;width:100vw!important;height:100vh!important}#conversejs .converse-chatboxes #controlbox{width:100vw!important}#conversejs .converse-chatboxes #controlbox .box-flyout{width:100vw!important;height:100vh!important;margin-right:-15px}#conversejs .converse-chatboxes #controlbox .sidebar{display:block}#conversejs .converse-chatboxes.sidebar-open .chatbox:not(#controlbox){display:none}#conversejs .converse-chatboxes.sidebar-open #controlbox .controlbox-pane{display:block}}#conversejs.converse-fullscreen .controlbox-panes{padding-top:1em}#conversejs.converse-overlayed .brand-heading{padding-top:.8rem;padding-left:.8rem;width:100%}#conversejs.converse-overlayed .converse-svg-logo{height:1em}#conversejs.converse-overlayed #controlbox #converse-login-panel{height:100%}#conversejs.converse-overlayed #controlbox .controlbox-panes{margin-top:.5em}#conversejs #converse-modals .modal{background-color:rgba(0,0,0,.4)}#conversejs #converse-modals .modal .modal-body{overflow-y:auto;max-height:75vh;margin-bottom:2em}#conversejs #converse-modals .modal .modal-body p{padding:.25rem 0}#conversejs #converse-modals .modal .modal-body .confirm .form-group p:first-child{font-size:110%;font-weight:700}#conversejs #converse-modals .modal .modal-footer{justify-content:flex-start}#conversejs #converse-modals .modal .roomid-policy-error{color:var(--error-color);font-size:var(--font-size-small);float:right}#conversejs #converse-modals .scrollable-container{max-height:50vh;overflow-y:auto}#conversejs #converse-modals .affiliation-form,#conversejs #converse-modals .role-form{padding:2em 0 1em 0}#conversejs #converse-modals .set-xmpp-status{margin:1em}#conversejs #converse-modals .set-xmpp-status .custom-control-label{margin-top:.25em}#conversejs #converse-modals #omemo-tabpanel{margin-top:1em}#conversejs #converse-modals .btn{font-weight:400}#conversejs #converse-modals #user-profile-modal .profile-form label{font-weight:700}#conversejs #converse-modals #user-profile-modal .fingerprint-removal label{display:flex;padding:.75rem 1.25rem}#conversejs #converse-modals #user-profile-modal .list-group-item{display:flex;justify-content:left;font-size:95%}#conversejs #converse-modals #user-profile-modal .list-group-item input[type=checkbox]{margin-right:1em}#conversejs #converse-modals .fingerprints{width:100%;margin-bottom:1em}#conversejs #converse-modals .fingerprint-trust{display:flex;justify-content:space-between;font-size:95%}#conversejs #converse-modals .fingerprint-trust .fingerprint{margin-left:1em}#conversejs #converse-roster{text-align:left;width:100%;position:relative;margin:0;height:var(--roster-height);padding:0;overflow:hidden;height:calc(100% - 70px)}#conversejs #converse-roster #online-count{display:none}#conversejs #converse-roster .search-xmpp ul li.chat-info{padding-left:10px}#conversejs #converse-roster .roster-filter-form{width:100%}#conversejs #converse-roster .roster-filter-form .button-group{padding:.2em}#conversejs #converse-roster .roster-filter-form span{padding:.3em;cursor:pointer;min-width:25px;text-align:center}#conversejs #converse-roster .roster-filter-form .roster-filter{width:100%;margin:.2em;font-size:calc(var(--font-size) - 2px)}#conversejs #converse-roster .roster-filter-form .state-type{font-size:calc(var(--font-size) - 2px);width:100%}#conversejs #converse-roster .roster-contacts{padding:0;margin:0 0 .2em 0;height:100%;overflow-x:hidden;overflow-y:auto}#conversejs #converse-roster .roster-contacts .roster-group{border:none;color:var(--text-color);font-weight:400;text-shadow:0 1px 0 var(--text-shadow-color);margin:.75em 0 .75em 0}#conversejs #converse-roster .roster-contacts .roster-group .group-toggle{font-family:var(--heading-font);display:block;width:100%;padding-top:0;padding-bottom:.3rem}#conversejs #converse-roster .roster-contacts .roster-group .group-toggle,#conversejs #converse-roster .roster-contacts .roster-group .group-toggle .fa{color:var(--chat-head-color-dark)!important}#conversejs #converse-roster .roster-contacts .roster-group .group-toggle .fa:hover,#conversejs #converse-roster .roster-contacts .roster-group .group-toggle:hover{color:var(--chat-head-color-darker)!important}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact{margin:.25em 0}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status{vertical-align:middle;font-size:.6em;margin-right:0;margin-left:-.7em;margin-bottom:-1.5em;border-radius:50%;border:2px solid var(--occupants-background-color)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--offline{margin-right:.8em}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--online{color:var(--chat-status-online)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--busy{color:var(--chat-status-busy)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--away{color:var(--chat-status-away)}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .chat-status--offline{display:none}#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .fa-times-circle,#conversejs #converse-roster .roster-contacts .roster-group .current-xmpp-contact .far.fa-circle{color:var(--subdued-color)}#conversejs #converse-roster .roster-contacts .roster-group li.requesting-xmpp-contact a{line-height:var(--line-height)}#conversejs #converse-roster .roster-contacts .roster-group li.requesting-xmpp-contact .req-contact-name{padding:0 .2em 0 0}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat{margin:0;padding:0}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat.unread-msgs{font-weight:700}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat.unread-msgs .contact-name{width:70%}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .msgs-indicator{color:#fff;background-color:var(--chat-head-color);opacity:1;border-radius:10%;padding:.2em;font-size:var(--font-size-small)}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0;margin:0;max-width:85%;float:none;height:100%}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name.unread-msgs{max-width:60%}#conversejs #converse-roster .roster-contacts .roster-group li .open-chat .contact-name.contact-name--offline{margin-left:.7em}#conversejs #converse-roster .roster-contacts .roster-group li.odd{background-color:#dceac5}#conversejs #converse-roster .roster-contacts .roster-group li a,#conversejs #converse-roster .roster-contacts .roster-group li span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#conversejs #converse-roster .roster-contacts .roster-group li .span{display:inline-block}#conversejs #converse-roster .roster-contacts .roster-group li .decline-xmpp-request{margin-left:5px}#conversejs #converse-roster .roster-contacts .roster-group li:hover{background-color:var(--controlbox-head-color-lighten-45-percent)}#conversejs #converse-roster span.pending-contact-name{line-height:var(--line-height);width:100%}#conversejs .list-container{text-align:left;padding:.3em 0}#conversejs .list-container .list-toggle{font-family:var(--heading-font);font-weight:var(--list-toggle-font-weight);display:block;color:var(--list-toggle-color);padding:0 0 .5rem 0}#conversejs .list-container .list-toggle:hover{color:var(--list-toggle-hover-color)}#conversejs .items-list{text-align:left}#conversejs .items-list .list-item{border:none;clear:both;color:var(--text-color);overflow:hidden;padding:.5em 0;text-shadow:0 1px 0 var(--text-shadow-color);word-wrap:break-word;height:2.5em}#conversejs .items-list .list-item.unread-msgs{font-weight:700}#conversejs .items-list .list-item .list-item-link{color:var(--list-item-link-color);margin:auto;font-size:var(--font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:baseline}#conversejs .items-list .list-item .list-item-link:hover{color:var(--list-item-link-hover-color)}#conversejs .items-list .list-item .list-item-badge{opacity:1;border-radius:25%;color:#fff;font-size:var(--font-size-small);line-height:var(--font-size-small)}#conversejs .items-list .list-item .list-item-action{opacity:0;font-size:var(--font-size-tiny);padding:.3em 0 0 0;margin:0 0 0 var(--inline-action-margin);width:2em;height:2em;color:var(--subdued-color)}#conversejs .items-list .list-item .list-item-action:before{font-size:var(--font-size)}#conversejs .items-list .list-item .list-item-action.button-on{color:var(--list-item-link-color)}#conversejs .items-list .list-item .list-item-action.button-on:hover{color:var(--list-item-link-hover-color)}#conversejs .items-list .list-item .list-item-action:hover{color:var(--list-toggle-hover-color);opacity:1}#conversejs .items-list .list-item .list-item-action--visible{opacity:1!important}#conversejs .items-list .list-item.open{background-color:var(--list-item-open-color)}#conversejs .items-list .list-item.open:hover{background-color:var(--list-item-open-hover-color)!important}#conversejs .items-list .list-item.open a{color:#fff}#conversejs .items-list .list-item.open .list-item-link:hover{color:#fff}#conversejs .items-list .list-item.open .list-item-action{color:var(--list-item-action-color)}#conversejs .items-list .list-item.open .list-item-action:hover{color:#fff}#conversejs .items-list .list-item:hover{background-color:var(--controlbox-head-color-lighten-45-percent)}#conversejs .items-list .list-item:hover .fa,#conversejs .items-list .list-item:hover .far,#conversejs .items-list .list-item:hover .fas{opacity:1}#conversejs .badge-room-color,#conversejs.converse-embedded .badge-room-color{background-color:var(--chatroom-head-color)}#conversejs .add-chatroom input[type=button],#conversejs .add-chatroom input[type=submit],#conversejs.converse-embedded .add-chatroom input[type=button],#conversejs.converse-embedded .add-chatroom input[type=submit]{margin:.3em 0}#conversejs #room-details-modal .features-list,#conversejs.converse-embedded #room-details-modal .features-list{margin-left:1em}#conversejs .chatroom-features,#conversejs.converse-embedded .chatroom-features{width:100%}#conversejs .chatroom-features .features-list,#conversejs.converse-embedded .chatroom-features .features-list{padding-top:0}#conversejs .chatroom-features .features-list .feature,#conversejs.converse-embedded .chatroom-features .features-list .feature{width:100%;margin-right:.5em;padding-right:0;font-size:1em;cursor:help}#conversejs .chatroom-features .features-list .feature .fa,#conversejs.converse-embedded .chatroom-features .features-list .feature .fa{margin-right:.5em;color:var(--text-color)}#conversejs .chat-head-chatroom,#conversejs.converse-embedded .chat-head-chatroom{background-color:var(--chatroom-head-color);border-bottom:var(--chatroom-head-border-bottom)}#conversejs .chat-head-chatroom .chat-head__desc,#conversejs.converse-embedded .chat-head-chatroom .chat-head__desc{color:var(--chatroom-head-description-color);display:var(--chatroom-head-description-display);font-size:70%;margin-top:3px;border-left:var(--chatroom-head-description-border-left);padding-left:var(--chatroom-head-description-padding-left)}#conversejs .chat-head-chatroom .chat-head__desc a,#conversejs.converse-embedded .chat-head-chatroom .chat-head__desc a{color:var(--chatroom-head-description-link-color)}#conversejs .chat-head-chatroom a.chatbox-btn.fa,#conversejs .chat-head-chatroom a:hover.chatbox-btn.fa,#conversejs .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa,#conversejs .chat-head-chatroom a:visited.chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a.chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a:hover.chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa,#conversejs.converse-embedded .chat-head-chatroom a:visited.chatbox-btn.fa{color:var(--chat-head-text-color)}#conversejs .chat-head-chatroom a.chatbox-btn.fa.button-on:before,#conversejs .chat-head-chatroom a:hover.chatbox-btn.fa.button-on:before,#conversejs .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,#conversejs .chat-head-chatroom a:visited.chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a.chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a:hover.chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a:not([href]):not([tabindex]).chatbox-btn.fa.button-on:before,#conversejs.converse-embedded .chat-head-chatroom a:visited.chatbox-btn.fa.button-on:before{color:var(--chatroom-head-button-color)}#conversejs .chat-head-chatroom .chatbox-btn.button-on:before,#conversejs.converse-embedded .chat-head-chatroom .chatbox-btn.button-on:before{color:var(--chatroom-head-button-color)}#conversejs .chat-head-chatroom .chatbox-title__text,#conversejs.converse-embedded .chat-head-chatroom .chatbox-title__text{display:var(--heading-display);font-weight:var(--chatroom-head-title-font-weight);padding-right:var(--chatroom-head-title-padding-right)}#conversejs .chat-head-chatroom .chatbox-title__text .chatroom-jid,#conversejs.converse-embedded .chat-head-chatroom .chatbox-title__text .chatroom-jid{font-size:var(--font-size-small)}#conversejs .chatroom,#conversejs.converse-embedded .chatroom{width:var(--chatroom-width)}@media screen and (max-height:450px){#conversejs .chatroom,#conversejs.converse-embedded .chatroom{width:var(--mobile-chat-width)}}@media screen and (max-width:480px){#conversejs .chatroom,#conversejs.converse-embedded .chatroom{width:var(--mobile-chat-width)}}#conversejs .chatroom .box-flyout,#conversejs.converse-embedded .chatroom .box-flyout{overflow-y:hidden;background-color:var(--chatroom-head-color);width:100%}@media screen and (max-height:450px){#conversejs .chatroom .box-flyout,#conversejs.converse-embedded .chatroom .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}@media screen and (max-width:480px){#conversejs .chatroom .box-flyout,#conversejs.converse-embedded .chatroom .box-flyout{height:var(--mobile-chat-height);width:var(--mobile-chat-width);height:100vh}}#conversejs .chatroom .box-flyout .chatroom-body,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body{flex-direction:row;flex-flow:nowrap;border-bottom-radius:var(--chatbox-border-radius);background-color:#fff;border-top:0;width:100%;overflow:hidden}#conversejs .chatroom .box-flyout .chatroom-body .row,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .row{flex-direction:row}#conversejs .chatroom .box-flyout .chatroom-body .chat-topic,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-topic{display:var(--chat-topic-display);font-weight:700;color:var(--chatroom-head-color)}#conversejs .chatroom .box-flyout .chatroom-body .chat-info,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info{display:var(--chat-info-display);color:var(--chatroom-head-color);line-height:normal}#conversejs .chatroom .box-flyout .chatroom-body .chat-info.badge,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info.badge{color:var(--chat-head-text-color)}#conversejs .chatroom .box-flyout .chatroom-body .chat-info.chat-msg--retracted,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-info.chat-msg--retracted{color:var(--subdued-color)}#conversejs .chatroom .box-flyout .chatroom-body .disconnect-container,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .disconnect-container{margin:1em;width:100%}#conversejs .chatroom .box-flyout .chatroom-body .disconnect-container h3.disconnect-msg,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .disconnect-container h3.disconnect-msg{padding-bottom:1em}#conversejs .chatroom .box-flyout .chatroom-body .chat-area,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area{display:flex;flex-direction:column;flex:0 1 100%;justify-content:flex-end;min-width:25%;word-wrap:break-word}#conversejs .chatroom .box-flyout .chatroom-body .chat-area .new-msgs-indicator,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .new-msgs-indicator{background-color:var(--chatroom-head-color)}#conversejs .chatroom .box-flyout .chatroom-body .chat-area .chat-content,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .chat-content{height:100%}#conversejs .chatroom .box-flyout .chatroom-body .occupants,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants{display:flex;flex-direction:column;justify-content:space-between;overflow-x:hidden;overflow-y:hidden;vertical-align:top;background-color:var(--occupants-background-color);border-left:var(--occupants-border-left);border-bottom-right-radius:var(--chatbox-border-radius);padding:.5em;max-width:75%;min-width:20%;flex:0 0 25%}#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header{display:flex;flex-direction:column}#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants{align-self:flex-end;cursor:pointer}#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-heading{font-family:var(--heading-font);margin-bottom:.5em;padding-left:0}#conversejs .chatroom .box-flyout .chatroom-body .occupants .chatroom-features,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .chatroom-features{display:var(--occupants-features-display)}#conversejs .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul{padding:0}#conversejs .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul li,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .suggestion-box ul li{padding:.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul{padding:0;margin-bottom:.5em;overflow-x:hidden;overflow-y:auto;list-style:none}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list{overflow-y:auto;flex-basis:0;flex-grow:1;border-bottom:var(--occupants-border-bottom)}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li{cursor:default;display:block;font-size:var(--font-size-small);overflow:hidden;padding:.25em .25em .25em 0;text-overflow:ellipsis}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li .fa,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li .fa{margin-right:.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.feature,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.feature{font-size:var(--font-size-tiny)}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant{cursor:pointer}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge{display:flex;justify-content:space-between;flex-wrap:wrap}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges{display:flex;justify-content:flex-end;flex-wrap:wrap;flex-direction:row}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges span,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-nick-badge .occupant-badges span{margin-right:.25rem}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant div.row.no-gutters,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant div.row.no-gutters{flex-wrap:nowrap;min-height:1.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .badge,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .badge{margin-bottom:.125rem}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status{display:inline-block;margin:0 .5em .125em 0;width:.5em;height:.5em}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-chat,#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-online,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-chat,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-online{background-color:#1a9707}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-dnd,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-dnd{background-color:red}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-away,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-away{background-color:#ff8c00}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-xa,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-xa{background-color:orange}#conversejs .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-offline,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul li.occupant .occupant-status.occupant-offline{background-color:#a9a9a9}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container{background-color:#fff;border-bottom-left-radius:var(--chatbox-border-radius);border-bottom-right-radius:var(--chatbox-border-radius);border:0;color:var(--text-color);font-size:var(--font-size);height:100%;width:100%;overflow-y:auto}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container .validation-message,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container .validation-message{font-size:90%;color:var(--error-color)}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=button],#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=submit],#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=button],#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container input[type=submit]{margin:0 .5em}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container .button-primary,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container .button-primary{background-color:var(--chatroom-head-button-color)}#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form,#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form{display:flex;flex-direction:column;justify-content:center;padding:2em}#conversejs .chatroom .empty-history-feedback,#conversejs.converse-embedded .chatroom .empty-history-feedback{position:relative;height:100%;color:var(--text-color-lighten-15-percent)}#conversejs .chatroom .empty-history-feedback span,#conversejs.converse-embedded .chatroom .empty-history-feedback span{width:100%;text-align:center;position:absolute;margin-top:50%}#conversejs .chatroom .muc-bottom-panel,#conversejs.converse-embedded .chatroom .muc-bottom-panel{border-top:var(--message-input-border-top);height:3em;padding:.5em;text-align:center;font-size:var(--font-size-small);background-color:var(--chatroom-head-color);color:#fff}#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname,#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname{padding:0;height:16em}#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container,#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container{border-radius:0!important}#conversejs .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container .chatroom-form,#conversejs.converse-embedded .chatroom .muc-bottom-panel.muc-bottom-panel--nickname .chatroom-form-container .chatroom-form{padding-top:2em;padding-bottom:0}#conversejs .chatroom .sendXMPPMessage .suggestion-box__results--above,#conversejs.converse-embedded .chatroom .sendXMPPMessage .suggestion-box__results--above{bottom:4.5em}#conversejs .chatroom .sendXMPPMessage .chat-toolbar,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar{background-color:#fff;border-top:var(--message-input-border-top);color:var(--message-input-color)}#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fa,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fa:hover,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .far,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .far:hover,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fas,#conversejs .chatroom .sendXMPPMessage .chat-toolbar .fas:hover,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fa,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fa:hover,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .far,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .far:hover,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fas,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-toolbar .fas:hover{color:var(--message-input-color)}#conversejs .chatroom .sendXMPPMessage .chat-textarea,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea{border-bottom-right-radius:0}#conversejs .chatroom .sendXMPPMessage .chat-textarea:active,#conversejs .chatroom .sendXMPPMessage .chat-textarea:focus,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea:active,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea:focus{outline-color:var(--chatroom-head-color)}#conversejs .chatroom .sendXMPPMessage .chat-textarea.correcting,#conversejs.converse-embedded .chatroom .sendXMPPMessage .chat-textarea.correcting{background-color:var(--chatroom-correcting-color)}#conversejs .chatroom .sendXMPPMessage .send-button,#conversejs.converse-embedded .chatroom .sendXMPPMessage .send-button{background-color:var(--message-input-color)}#conversejs .chatroom .room-invite .invited-contact,#conversejs.converse-embedded .chatroom .room-invite .invited-contact{margin:-1px 0 0 -1px;width:100%;border:1px solid #999}#conversejs.converse-overlayed .chatbox.chatroom{min-width:var(--chatroom-width)!important;width:var(--chatroom-width)}#conversejs.converse-overlayed .chatbox.chatroom .chat-head{padding-bottom:1em}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-features{display:none!important}#conversejs.converse-overlayed .chatbox.chatroom .box-flyout{min-width:var(--chatroom-width)!important;width:var(--chatroom-width)}#conversejs.converse-overlayed .chatbox.chatroom .chatbox-title__text{flex:0 0 58.33333%;max-width:58.33333%}#conversejs.converse-overlayed .chatbox.chatroom .chatbox-title__buttons{flex:0 0 41.66667%;max-width:41.66667%}#conversejs.converse-overlayed .chatbox.chatroom .chat-head__desc{font-size:80%}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .occupants-heading{padding:0}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .occupant-list{border-bottom:none}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants .chatroom-features .feature{font-size:var(--font-size-tiny)}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants ul .occupant .occupant-nick-badge .occupant-badges{display:none}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .occupants ul .occupant .occupant-status{margin-top:6px}#conversejs.converse-overlayed .chatbox.chatroom .chatroom-body .chat-area{min-width:var(--overlayed-chat-width)}#conversejs.converse-overlayed .chatbox.chatroom .sendXMPPMessage .chat-toolbar li .toolbar-menu{min-width:280px}#conversejs.converse-embedded .chatroom .box-flyout,#conversejs.converse-fullscreen .chatroom .box-flyout,#conversejs.converse-mobile .chatroom .box-flyout{background-color:var(--chatroom-head-color);border:var(--flyout-padding) solid var(--chatroom-head-color);border-top:.8em solid var(--chatroom-head-color);width:100%}#conversejs.converse-embedded .chatroom .box-flyout .chat-head__desc,#conversejs.converse-fullscreen .chatroom .box-flyout .chat-head__desc,#conversejs.converse-mobile .chatroom .box-flyout .chat-head__desc{font-size:70%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body{border-top-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chatroom-form-container,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chatroom-form-container{border-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area{border-top-left-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area .chat-content,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area .chat-content,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area .chat-content{border-top-left-radius:var(--chatbox-border-radius)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator{max-width:100%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants{border-top-right-radius:var(--chatbox-border-radius);padding:var(--occupants-padding)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants .occupants-heading{font-size:var(--font-size-large)}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li,#conversejs.converse-fullscreen .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li,#conversejs.converse-mobile .chatroom .box-flyout .chatroom-body .occupants ul.occupant-list li{font-size:var(--font-size-small)}#conversejs.converse-embedded .chatroom .room-invite span .invited-contact,#conversejs.converse-fullscreen .chatroom .room-invite span .invited-contact,#conversejs.converse-mobile .chatroom .room-invite span .invited-contact{margin:0 0 .5em -1px}#conversejs.converse-embedded .chatroom{margin:0;width:100%}#conversejs.converse-embedded .chatroom .box-flyout .occupants-heading{font-size:120%}#conversejs.converse-embedded .chatroom .box-flyout .chat-content .chat-message{margin:.5em;font-size:120%}#conversejs.converse-embedded .chatroom .box-flyout .sendXMPPMessage .chat-textarea{padding:.5em;font-size:110%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body{height:100%}#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .chatroom-form-container{height:100%;position:relative}#conversejs.converse-embedded .chatroom .box-flyout .occupants .occupant-list{padding-left:.3em}#conversejs .chat-head-headline{background-color:var(--headline-head-color)}#conversejs .chatbox.headlines .chat-head.chat-head-chatbox{background-color:var(--headline-head-color)}#conversejs .chatbox.headlines .chat-body{background-color:var(--headline-head-color);border-radius:var(--chatbox-border-radius)}#conversejs .chatbox.headlines .chat-body .chat-message{color:var(--headline-message-color)}#conversejs .chatbox.headlines .chat-content{height:100%}#conversejs.converse-fullscreen .chatbox.headlines .box-flyout{background-color:var(--headline-head-color)}#conversejs.converse-fullscreen .chatbox.headlines .chat-head.chat-head-chatbox{background-color:var(--headline-head-color)}#conversejs.converse-fullscreen .chatbox.headlines .flyout{border:var(--flyout-padding) solid var(--headline-head-color);border-top:.8em solid var(--headline-head-color)}#conversejs .older-msg time{font-weight:700}#conversejs .message .mention{font-weight:700}#conversejs .message .mention--self{font-weight:400}#conversejs .message.date-separator{height:2em;margin:0;position:relative;text-align:center;z-index:0}#conversejs .message.date-separator .separator{border-top:0;border-bottom:var(--chat-separator-border-bottom);margin:0 1em;position:relative;top:1em;z-index:5}#conversejs .message.date-separator .separator-text{background:#fff;bottom:1px;color:var(--separator-text-color);display:inline-block;line-height:2em;padding:0 1em;position:relative;z-index:5}#conversejs .message.chat-msg--retracted .chat-msg__message{color:var(--subdued-color)}#conversejs .message.chat-info{color:var(--chat-head-color);font-size:var(--message-font-size);line-height:var(--line-height-small);font-size:90%;padding:.17rem 1rem}#conversejs .message.chat-info.badge{color:var(--chat-head-text-color)}#conversejs .message.chat-info.chat-state-notification{font-style:italic}#conversejs .message.chat-info.chat-event{clear:left;font-style:italic}#conversejs .message.chat-info.chat-error{color:var(--error-color);font-weight:700}#conversejs .message.chat-info .q{font-style:italic}#conversejs .message .chat-image{height:auto;width:auto;max-height:15em;max-width:100%}#conversejs .message.chat-msg--action{font-style:italic}#conversejs .message.chat-msg--action .chat-msg__author{padding-right:.2em}#conversejs .message.chat-msg{display:inline-flex;width:100%;flex-direction:row;overflow:auto;padding:.125rem 1rem}#conversejs .message.chat-msg.onload{animation:colorchange-chatmessage 1s;-webkit-animation:colorchange-chatmessage 1s}#conversejs .message.chat-msg:hover{background-color:rgba(0,0,0,.035)}#conversejs .message.chat-msg:hover .chat-msg__actions .chat-msg__action{opacity:1}#conversejs .message.chat-msg.correcting.groupchat{background-color:var(--chatroom-correcting-color)}#conversejs .message.chat-msg.correcting:not(.groupchat){background-color:var(--chat-correcting-color)}#conversejs .message.chat-msg .spoiler{margin-top:.5em}#conversejs .message.chat-msg .spoiler-hint{margin-bottom:.5em}#conversejs .message.chat-msg .spoiler-toggle{color:#fff}#conversejs .message.chat-msg .spoiler-toggle i{color:#fff;padding-right:.5em}#conversejs .message.chat-msg .spoiler-toggle:before{padding-right:.25em;whitespace:nowrap}#conversejs .message.chat-msg .chat-msg__content{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;margin-left:.5rem;width:calc(100% - var(--message-avatar-width))}#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat .chat-msg__text{color:var(--subdued-color)}#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat.chat-msg__body--delayed .chat-msg__text,#conversejs .message.chat-msg .chat-msg__content--me .chat-msg__body--groupchat.chat-msg__body--received .chat-msg__text{color:var(--message-text-color)}#conversejs .message.chat-msg .chat-msg__content--action{width:100%;margin-left:0}#conversejs .message.chat-msg .chat-msg__body{display:flex;flex-direction:row;justify-content:space-between}#conversejs .message.chat-msg .chat-msg__message{display:inline-flex;flex-direction:column;width:100%;overflow-wrap:break-word}#conversejs .message.chat-msg .chat-msg__edit-modal{cursor:pointer;padding-right:.5em}#conversejs .message.chat-msg.headline .chat-msg__body{margin-left:0}#conversejs .message.chat-msg .chat-msg__subject{font-weight:700;clear:right}#conversejs .message.chat-msg .chat-msg__text{color:var(--message-text-color);padding:0;width:100%;white-space:pre-wrap;word-wrap:break-word;word-break:break-word}#conversejs .message.chat-msg .chat-msg__text a{word-wrap:break-word;word-break:break-all;display:inline-block}#conversejs .message.chat-msg .chat-msg__text img.emoji{height:1.5em;width:1.5em;margin:0 .05em 0 .1em;vertical-align:-.1em}#conversejs .message.chat-msg .chat-msg__text .emojione{margin-bottom:-6px}#conversejs .message.chat-msg .chat-msg__text--larger{font-size:1.6em;padding-top:.25em;padding-bottom:.25em}#conversejs .message.chat-msg .chat-msg__media{margin-top:.25rem;word-break:break-all}#conversejs .message.chat-msg .chat-msg__media a{word-wrap:break-word}#conversejs .message.chat-msg .chat-msg__media audio{width:100%}#conversejs .message.chat-msg .chat-msg__actions{display:flex;flex-wrap:nowrap}#conversejs .message.chat-msg .chat-msg__actions .chat-msg__action{height:var(--message-font-size);font-size:var(--message-font-size);padding:0;padding-left:.75em;border:none;opacity:0;background:0 0;cursor:pointer}#conversejs .message.chat-msg .chat-msg__actions .chat-msg__action:focus{display:block}#conversejs .message.chat-msg .chat-msg__avatar{margin-top:.5em;vertical-align:middle;height:var(--message-avatar-height);width:var(--message-avatar-width);min-height:var(--message-avatar-height);min-width:var(--message-avatar-width)}#conversejs .message.chat-msg .chat-msg__heading{width:100%;margin-top:.5em;padding-right:.25rem;padding-bottom:.25rem;display:flex}#conversejs .message.chat-msg .chat-msg__heading .chat-msg__author{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--heading-font);font-size:115%;font-weight:700;padding-bottom:1px}#conversejs .message.chat-msg .chat-msg__heading .badge{margin-left:.5em;font-family:var(--normal_font)}#conversejs .message.chat-msg .chat-msg__heading .chat-msg__time{padding-left:.25em;padding-right:.25em;color:var(--text-color-lighten-15-percent)}#conversejs .message.chat-msg.chat-msg--action .chat-msg__content{flex-wrap:wrap;flex-direction:row;justify-content:flex-start}#conversejs .message.chat-msg.chat-msg--action .chat-msg__text{width:auto}#conversejs .message.chat-msg.chat-msg--action .chat-msg__heading{margin-top:0;padding-bottom:0;width:auto}#conversejs .message.chat-msg.chat-msg--action .chat-msg__heading .fa{margin-left:.5em}#conversejs .message.chat-msg.chat-msg--action .chat-msg__author{font-size:var(--message-font-size)}#conversejs .message.chat-msg.chat-msg--action .chat-msg__time{margin-left:0}#conversejs .message.chat-msg.chat-msg--followup .chat-msg__avatar,#conversejs .message.chat-msg.chat-msg--followup .chat-msg__heading{display:none}#conversejs .message.chat-msg.chat-msg--followup .chat-msg__content{margin-left:2.75rem;width:100%}#conversejs .message.chat-msg .chat-msg__receipt{margin-right:.5em;color:var(--message-receipt-color)}#conversejs .chatroom-body .message.onload{animation:colorchange-chatmessage-muc 1s;-webkit-animation:colorchange-chatmessage-muc 1s}#conversejs .chatroom-body .message .separator{border-top:0;border-bottom:var(--chatroom-separator-border-bottom)}#conversejs.converse-overlayed .message.chat-msg.chat-msg--followup .chat-msg__content{margin-left:0}@media screen and (max-width:767px){#conversejs:not(.converse-embedded) .message.chat-msg .chat-msg__author{white-space:normal}}#conversejs.converse-overlayed #minimized-chats{order:100;width:var(--minimized-chats-width);margin-bottom:0;border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius);color:var(--inverse-link-color);margin-right:var(--chat-gutter);padding:0}#conversejs.converse-overlayed #minimized-chats .badge{bottom:8px;border:1px solid var(--overlayed-badge-color)}#conversejs.converse-overlayed #minimized-chats #toggle-minimized-chats{border-top-left-radius:var(--chatbox-border-radius);border-top-right-radius:var(--chatbox-border-radius);background-color:var(--link-color);padding:1em 0 0 0;text-align:center;color:#fff;white-space:nowrap;overflow-y:hidden;text-overflow:ellipsis;display:block;height:45px;width:9em}#conversejs.converse-overlayed #minimized-chats a.restore-chat{cursor:pointer;padding:1px 0 1px 5px;color:var(--chat-head-text-color);line-height:15px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#conversejs.converse-overlayed #minimized-chats a.restore-chat:hover{text-decoration:none}#conversejs.converse-overlayed #minimized-chats a.restore-chat:visited{color:var(--chat-head-text-color)}#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout{flex-direction:column-reverse;bottom:42px;width:var(--minimized-chats-width)}#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout .chat-head{padding:.3em;border-radius:var(--chatbox-border-radius);height:35px;margin-bottom:.2em;box-shadow:1px 3px 5px 3px rgba(0,0,0,.4);width:100%;max-width:9em}#conversejs.converse-overlayed #minimized-chats .minimized-chats-flyout.minimized{height:auto}#conversejs.converse-overlayed #minimized-chats .unread-message-count{font-weight:700;background-color:#fff;border:1px solid;text-shadow:1px 1px 0 var(--text-shadow-color);color:var(--warning-color);border-radius:5px;padding:2px 4px;font-size:16px;text-align:center;position:absolute;right:116px;bottom:10px}#conversejs.converse-overlayed #minimized-chats .chat-head-message-count-hidden,#conversejs.converse-overlayed #minimized-chats .unread-message-count-hidden{display:none}#conversejs #controlbox .bookmarks-toggle,#conversejs #controlbox .bookmarks-toggle .fa{color:var(--chatroom-head-color)!important}#conversejs #controlbox .bookmarks-toggle .fa:hover,#conversejs #controlbox .bookmarks-toggle:hover{color:var(--chatroom-head-color-dark)!important}#conversejs.fullscreen #controlbox #chatrooms .bookmarks-list dl.rooms-list.bookmarks dd.available-chatroom a.open-room{width:80%}#conversejs [hidden]{display:none}#conversejs .visually-hidden{position:absolute;clip:rect(0,0,0,0)}#conversejs .form-group .suggestion-box{width:100%}#conversejs .suggestion-box{position:relative}#conversejs .suggestion-box mark{background:var(--completion-light-color)}#conversejs .suggestion-box>input{display:block}#conversejs .suggestion-box .suggestion-box__results,#conversejs .suggestion-box>ul{position:absolute;left:0;right:0;z-index:2;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:rgba(255,255,255,.9);background:linear-gradient(to bottom right,#fff,rgba(255,255,255,.9));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.1);text-shadow:none}#conversejs .suggestion-box .suggestion-box__results:before,#conversejs .suggestion-box>ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-right:0;border-bottom:0;transform:rotate(45deg);z-index:-1}#conversejs .suggestion-box .suggestion-box__results>li,#conversejs .suggestion-box>ul>li{text-overflow:ellipsis;overflow-x:hidden;position:relative;cursor:pointer;padding:1em}#conversejs .suggestion-box .suggestion-box__results--below{top:2em}#conversejs .suggestion-box .suggestion-box__results--above{bottom:4.5em}#conversejs .suggestion-box .suggestion-box__results--above:before{display:none}#conversejs .suggestion-box .suggestion-box__results--above:after{z-index:-1;content:"";position:absolute;bottom:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-left:0;border-top:0;transform:rotate(45deg)}#conversejs .suggestion-box>ul:empty,#conversejs .suggestion-box>ul[hidden]{display:none}@supports (transform:scale(0)){#conversejs .suggestion-box>ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}#conversejs .suggestion-box>ul:empty,#conversejs .suggestion-box>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}#conversejs .suggestion-box>ul>li[aria-selected=true]{background:var(--completion-dark-color);color:var(--inverse-link-color)}#conversejs .suggestion-box li:hover mark{background:var(--completion-light-color);color:var(--inverse-link-color)}#conversejs .suggestion-box li[aria-selected=true] mark{background:var(--completion-normal-color);color:inherit}#conversejs.converse-fullscreen .suggestion-box__results--above{bottom:4.5em}#conversejs.converse-overlayed .suggestion-box__results--above{bottom:3.5em}#conversejs .chatbox img.emoji{height:1.2em;width:1.2em;margin:0 .05em 0 .1em;vertical-align:-.1em}#conversejs .chatbox .sendXMPPMessage .toggle-smiley a.toggle-smiley{padding:0}#conversejs .chatbox .emoji-picker.toolbar-menu{width:100%;padding-top:0;padding-bottom:0;background-color:var(--chat-head-color);overflow-y:hidden;background:#fff}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists{height:8em;overflow-y:auto;display:flex;flex-direction:column}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists .emoji-category__heading{cursor:auto;color:var(--subdued-color);font-size:var(--font-size);margin:0;padding:.75em 0 0 .5em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists .emoji-picker li{float:left}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker{display:flex;padding:.5em 0;background-color:var(--chat-head-color);width:auto;font-size:var(--font-size)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker label{margin:0;padding:0 .5em;white-space:nowrap;font-size:var(--font-size-small);color:var(--heading-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker ul{display:flex;flex-direction:row;flex-wrap:wrap}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker ul li{padding:0 .25em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker{background-color:#fff;padding:.5em 0 0 .5em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker:last-child{padding-bottom:.5em}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li{margin-left:0;cursor:pointer;list-style:none;position:relative}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji{margin:0;height:30px;width:32px}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji.selected a{background-color:var(--highlight-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji a{padding:3px;font-size:var(--font-size-huge)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker li.insert-emoji a:hover{background-color:var(--highlight-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header{display:flex;flex-direction:column;padding-top:.5em;background-color:var(--chat-head-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header .emoji-search{width:auto;margin:.25em;height:2em;font-size:var(--font-size-small)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul{display:flex;flex-direction:row;flex-wrap:wrap}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category{padding:.25em 0;font-size:var(--font-size-huge)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.picked{background-color:#fff;border:1px var(--chat-head-color) solid;border-bottom:none}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.selected a,#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category:hover a{background-color:var(--highlight-color)}#conversejs .chatbox .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category a{padding:.25em}#conversejs .chatroom .emoji-picker.toolbar-menu{background-color:var(--chatroom-head-color);background:#fff}#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-skintone-picker{background-color:var(--chatroom-head-color)}#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-picker__header{background-color:var(--chatroom-head-color)}#conversejs .chatroom .emoji-picker.toolbar-menu .emoji-picker__header ul .emoji-category.picked{border:1px var(--chatroom-head-color) solid;border-bottom:none}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu li.insert-emoji{height:20px;width:20px}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker .insert-emoji a{font-size:var(--font-size)}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-skintone-picker{font-size:var(--font-size-small)}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker__header .emoji-category{font-size:var(--font-size-small)}#conversejs.converse-overlayed .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists{height:7em}#conversejs.converse-fullscreen .chatbox .emoji-picker.toolbar-menu .emoji-picker__lists{height:12em}#conversejs .chatbox .emoji-picker.toolbar-menu{max-width:40em}
\ No newline at end of file
diff --git a/src/conversejs/converse.min.js b/src/conversejs/converse.min.js
index 081f00be01ba31ef34020574e5bff96a8a1302f0..d91f8612fae90eb2c94dd5369d2fbca0053afdfa 100644
--- a/src/conversejs/converse.min.js
+++ b/src/conversejs/converse.min.js
@@ -1 +1 @@
-(function(e){function t(t){for(var o=t[0],n=t[1],a=0,r=[],l,d;a<o.length;a++)d=o[a],s[d]&&r.push(s[d][0]),s[d]=0;for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);for(c&&c(t);r.length;)r.shift()()}function o(e){return n.p+""+({0:"locales/dayjs/af",1:"locales/dayjs/ar",2:"locales/dayjs/ar-dz",3:"locales/dayjs/ar-kw",4:"locales/dayjs/ar-ly",5:"locales/dayjs/ar-ma",6:"locales/dayjs/ar-sa",7:"locales/dayjs/ar-tn",8:"locales/dayjs/az",9:"locales/dayjs/be",10:"locales/dayjs/bg",11:"locales/dayjs/bm",12:"locales/dayjs/bn",13:"locales/dayjs/bo",14:"locales/dayjs/br",15:"locales/dayjs/bs",16:"locales/dayjs/ca",17:"locales/dayjs/cs",18:"locales/dayjs/cv",19:"locales/dayjs/cy",20:"locales/dayjs/da",21:"locales/dayjs/de",22:"locales/dayjs/de-at",23:"locales/dayjs/de-ch",24:"locales/dayjs/dv",25:"locales/dayjs/el",26:"locales/dayjs/en",27:"locales/dayjs/en-SG",28:"locales/dayjs/en-au",29:"locales/dayjs/en-ca",30:"locales/dayjs/en-gb",31:"locales/dayjs/en-ie",32:"locales/dayjs/en-il",33:"locales/dayjs/en-nz",34:"locales/dayjs/eo",35:"locales/dayjs/es",36:"locales/dayjs/es-do",37:"locales/dayjs/es-us",38:"locales/dayjs/et",39:"locales/dayjs/eu",40:"locales/dayjs/fa",41:"locales/dayjs/fi",42:"locales/dayjs/fo",43:"locales/dayjs/fr",44:"locales/dayjs/fr-ca",45:"locales/dayjs/fr-ch",46:"locales/dayjs/fy",47:"locales/dayjs/ga",48:"locales/dayjs/gd",49:"locales/dayjs/gl",50:"locales/dayjs/gom-latn",51:"locales/dayjs/gu",52:"locales/dayjs/he",53:"locales/dayjs/hi",54:"locales/dayjs/hr",55:"locales/dayjs/hu",56:"locales/dayjs/hy-am",57:"locales/dayjs/id",58:"locales/dayjs/is",59:"locales/dayjs/it",60:"locales/dayjs/it-ch",61:"locales/dayjs/ja",62:"locales/dayjs/jv",63:"locales/dayjs/ka",64:"locales/dayjs/kk",65:"locales/dayjs/km",66:"locales/dayjs/kn",67:"locales/dayjs/ko",68:"locales/dayjs/ku",69:"locales/dayjs/ky",70:"locales/dayjs/lb",71:"locales/dayjs/lo",72:"locales/dayjs/lt",73:"locales/dayjs/lv",74:"locales/dayjs/me",75:"locales/dayjs/mi",76:"locales/dayjs/mk",77:"locales/dayjs/ml",78:"locales/dayjs/mn",79:"locales/dayjs/mr",80:"locales/dayjs/ms",81:"locales/dayjs/ms-my",82:"locales/dayjs/mt",83:"locales/dayjs/my",84:"locales/dayjs/nb",85:"locales/dayjs/ne",86:"locales/dayjs/nl",87:"locales/dayjs/nl-be",88:"locales/dayjs/nn",89:"locales/dayjs/oc-lnc",90:"locales/dayjs/pa-in",91:"locales/dayjs/pl",92:"locales/dayjs/pt",93:"locales/dayjs/pt-br",94:"locales/dayjs/ro",95:"locales/dayjs/ru",96:"locales/dayjs/sd",97:"locales/dayjs/se",98:"locales/dayjs/si",99:"locales/dayjs/sk",100:"locales/dayjs/sl",101:"locales/dayjs/sq",102:"locales/dayjs/sr",103:"locales/dayjs/sr-cyrl",104:"locales/dayjs/ss",105:"locales/dayjs/sv",106:"locales/dayjs/sw",107:"locales/dayjs/ta",108:"locales/dayjs/te",109:"locales/dayjs/tet",110:"locales/dayjs/tg",111:"locales/dayjs/th",112:"locales/dayjs/tl-ph",113:"locales/dayjs/tlh",114:"locales/dayjs/tr",115:"locales/dayjs/tzl",116:"locales/dayjs/tzm",117:"locales/dayjs/tzm-latn",118:"locales/dayjs/ug-cn",119:"locales/dayjs/uk",120:"locales/dayjs/ur",121:"locales/dayjs/uz",122:"locales/dayjs/uz-latn",123:"locales/dayjs/vi",124:"locales/dayjs/x-pseudo",125:"locales/dayjs/yo",126:"locales/dayjs/zh-cn",127:"locales/dayjs/zh-hk",128:"locales/dayjs/zh-tw",129:"emojis",130:"locales/af-LC_MESSAGES-converse-po",131:"locales/ar-LC_MESSAGES-converse-po",132:"locales/bg-LC_MESSAGES-converse-po",133:"locales/ca-LC_MESSAGES-converse-po",134:"locales/cs-LC_MESSAGES-converse-po",135:"locales/de-LC_MESSAGES-converse-po",136:"locales/eo-LC_MESSAGES-converse-po",137:"locales/es-LC_MESSAGES-converse-po",138:"locales/eu-LC_MESSAGES-converse-po",139:"locales/fr-LC_MESSAGES-converse-po",140:"locales/gl-LC_MESSAGES-converse-po",141:"locales/he-LC_MESSAGES-converse-po",142:"locales/hi-LC_MESSAGES-converse-po",143:"locales/hu-LC_MESSAGES-converse-po",144:"locales/id-LC_MESSAGES-converse-po",145:"locales/it-LC_MESSAGES-converse-po",146:"locales/ja-LC_MESSAGES-converse-po",147:"locales/lt-LC_MESSAGES-converse-po",148:"locales/mr-LC_MESSAGES-converse-po",149:"locales/nb-LC_MESSAGES-converse-po",150:"locales/nl-LC_MESSAGES-converse-po",151:"locales/nl_BE-LC_MESSAGES-converse-po",152:"locales/oc-LC_MESSAGES-converse-po",153:"locales/pl-LC_MESSAGES-converse-po",154:"locales/pt-LC_MESSAGES-converse-po",155:"locales/pt_BR-LC_MESSAGES-converse-po",156:"locales/ro-LC_MESSAGES-converse-po",157:"locales/ru-LC_MESSAGES-converse-po",158:"locales/tr-LC_MESSAGES-converse-po",159:"locales/uk-LC_MESSAGES-converse-po",160:"locales/vi-LC_MESSAGES-converse-po",161:"locales/zh_CN-LC_MESSAGES-converse-po",162:"locales/zh_TW-LC_MESSAGES-converse-po"}[e]||e)+".js"}function n(t){if(a[t])return a[t].exports;var o=a[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var a={},s={163:0};n.e=function(e){var t=[],a=s[e];if(0!==a)if(a)t.push(a[2]);else{var i=new Promise(function(t,o){a=s[e]=[t,o]});t.push(a[2]=i);var r=document.createElement("script"),l;r.charset="utf-8",r.timeout=120,n.nc&&r.setAttribute("nonce",n.nc),r.src=o(e);var d=new Error;l=function(t){r.onerror=r.onload=null,clearTimeout(c);var o=s[e];if(0!==o){if(o){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",d.name="ChunkLoadError",d.type=n,d.request=a,o[1](d)}s[e]=void 0}};var c=setTimeout(function(){l({type:"timeout",target:r})},12e4);r.onerror=r.onload=l,document.head.appendChild(r)}return Promise.all(t)},n.m=e,n.c=a,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],l=r.push.bind(r);r.push=t,r=r.slice();for(var d=0;d<r.length;d++)t(r[d]);var c=l;return n(n.s=328)})([function(e,t,o){(function(e,n){var a;(function(){function s(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2]);}return e.apply(t,o)}function i(e,t,o,n){for(var a=-1,s=null==e?0:e.length;++a<s;){var i=e[a];t(n,i,o(i),e)}return n}function r(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!(!1===t(e[o],o,e)););return e}function l(e,t){for(var o=null==e?0:e.length;o--&&!(!1===t(e[o],o,e)););return e}function d(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(!t(e[o],o,e))return!1;return!0}function c(e,t){for(var o=-1,n=null==e?0:e.length,a=0,s=[];++o<n;){var i=e[o];t(i,o,e)&&(s[a++]=i)}return s}function p(e,t){var o=null==e?0:e.length;return!!o&&-1<w(e,t,0)}function u(e,t,o){for(var n=-1,a=null==e?0:e.length;++n<a;)if(o(t,e[n]))return!0;return!1}function m(e,t){for(var o=-1,n=null==e?0:e.length,a=Array(n);++o<n;)a[o]=t(e[o],o,e);return a}function g(e,t){for(var o=-1,n=t.length,a=e.length;++o<n;)e[a+o]=t[o];return e}function h(e,t,o,n){var a=-1,s=null==e?0:e.length;for(n&&s&&(o=e[++a]);++a<s;)o=t(o,e[a],a,e);return o}function f(e,t,o,n){var a=null==e?0:e.length;for(n&&a&&(o=e[--a]);a--;)o=t(o,e[a],a,e);return o}function b(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(t(e[o],o,e))return!0;return!1}function v(e){return e.split("")}function y(e){return e.match(ct)||[]}function x(e,t,o){var n;return o(e,function(e,o,a){if(t(e,o,a))return n=o,!1}),n}function S(e,t,o,n){for(var a=e.length,s=o+(n?1:-1);n?s--:++s<a;)if(t(e[s],s,e))return s;return-1}function w(e,t,o){return t===t?Y(e,t,o):S(e,E,o)}function k(e,t,o,n){for(var a=o-1,s=e.length;++a<s;)if(n(e[a],t))return a;return-1}function E(e){return e!==e}function C(e,t){var o=null==e?0:e.length;return o?M(e,t)/o:Ee}function A(e){return function(t){return null==t?void 0:t[e]}}function T(e){return function(t){return null==e?void 0:e[t]}}function j(e,t,o,n,a){return a(e,function(e,a,s){o=n?(n=!1,e):t(o,e,a,s)}),o}function N(e,t){var o=e.length;for(e.sort(t);o--;)e[o]=e[o].value;return e}function M(e,t){for(var o=-1,n=e.length,a;++o<n;){var s=t(e[o]);s!==void 0&&(a=a===void 0?s:a+s)}return a}function I(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}function O(e,t){return m(t,function(t){return[t,e[t]]})}function R(e){return function(t){return e(t)}}function D(e,t){return m(t,function(t){return e[t]})}function L(e,t){return e.has(t)}function P(e,t){for(var o=-1,n=e.length;++o<n&&-1<w(t,e[o],0););return o}function q(e,t){for(var o=e.length;o--&&-1<w(t,e[o],0););return o}function B(e,t){for(var o=e.length,n=0;o--;)e[o]===t&&++n;return n}function z(e){return"\\"+Xt[e]}function F(e,t){return null==e?void 0:e[t]}function H(e){return Wt.test(e)}function U(e){return Gt.test(e)}function V(e){for(var t=[],o;!(o=e.next()).done;)t.push(o.value);return t}function W(e){var t=-1,o=Array(e.size);return e.forEach(function(e,n){o[++t]=[n,e]}),o}function G(e,t){return function(o){return e(t(o))}}function J(e,t){for(var o=-1,n=e.length,a=0,s=[];++o<n;){var i=e[o];(i===t||i==="__lodash_placeholder__")&&(e[o]="__lodash_placeholder__",s[a++]=o)}return s}function $(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=e}),o}function Q(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=[e,e]}),o}function Y(e,t,o){for(var n=o-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}function X(e,t,o){for(var n=o+1;n--;)if(e[n]===t)return n;return n}function K(e){return H(e)?ee(e):ho(e)}function Z(e){return H(e)?te(e):v(e)}function ee(e){for(var t=Ut.lastIndex=0;Ut.test(e);)++t;return t}function te(e){return e.match(Ut)||[]}function oe(e){return e.match(Vt)||[]}var ne=200,ae="Expected a function",se="__lodash_hash_undefined__",ie="__lodash_placeholder__",re=1,le=2,de=4,ce=1,pe=2,ue=1,me=2,ge=4,he=8,_e=16,fe=32,be=64,ve=128,ye=256,xe=512,Se=1,we=1/0,ke=9007199254740991,Ee=0/0,Ce=4294967295,Ae=[["ary",ve],["bind",ue],["bindKey",me],["curry",he],["curryRight",_e],["flip",xe],["partial",fe],["partialRight",be],["rearg",ye]],Te="[object Arguments]",je="[object Array]",Ne="[object Boolean]",Me="[object Date]",Ie="[object Error]",Oe="[object Function]",Re="[object GeneratorFunction]",De="[object Map]",Le="[object Number]",Pe="[object Object]",qe="[object Promise]",Be="[object RegExp]",ze="[object Set]",Fe="[object String]",He="[object Symbol]",Ue="[object WeakMap]",Ve="[object ArrayBuffer]",We="[object DataView]",Ge="[object Float32Array]",Je="[object Float64Array]",$e="[object Int8Array]",Qe="[object Int16Array]",Ye="[object Int32Array]",Xe="[object Uint8Array]",Ke="[object Uint8ClampedArray]",Ze="[object Uint16Array]",et="[object Uint32Array]",tt=/&(?:amp|lt|gt|quot|#39);/g,ot=/[&<>"']/g,nt=RegExp(tt.source),at=RegExp(ot.source),st=/<%=([\s\S]+?)%>/g,it=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(it.source),lt=/^\s+|\s+$/g,dt=/^\s+/,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/\w*$/,ut=/($^)/,mt="\\ud800-\\udfff",gt="\\u0300-\\u036f"+"\\ufe20-\\ufe2f"+"\\u20d0-\\u20ff",ht="\\u2700-\\u27bf",_t="a-z\\xdf-\\xf6\\xf8-\\xff",ft="A-Z\\xc0-\\xd6\\xd8-\\xde",bt="\\ufe0e\\ufe0f",vt="\\xac\\xb1\\xd7\\xf7"+"\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf"+"\\u2000-\\u206f"+" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",yt="['\u2019]",xt="["+vt+"]",St="["+gt+"]",wt="\\d+",kt="["+_t+"]",Et="[^"+mt+vt+wt+ht+_t+ft+"]",Ct="\\ud83c[\\udffb-\\udfff]",At="[^"+mt+"]",Tt="(?:\\ud83c[\\udde6-\\uddff]){2}",jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Nt="["+ft+"]",Mt="\\u200d",It="(?:"+kt+"|"+Et+")",Ot="(?:"+yt+"(?:d|ll|m|re|s|t|ve))?",Rt="(?:"+yt+"(?:D|LL|M|RE|S|T|VE))?",Dt="(?:"+St+"|"+Ct+")"+"?",Lt="["+bt+"]?",Pt="(?:"+Mt+"(?:"+[At,Tt,jt].join("|")+")"+Lt+Dt+")*",qt=Lt+Dt+Pt,Bt="(?:"+["["+ht+"]",Tt,jt].join("|")+")"+qt,zt="(?:"+[At+St+"?",St,Tt,jt,"["+mt+"]"].join("|")+")",Ft=RegExp(yt,"g"),Ht=RegExp(St,"g"),Ut=RegExp(Ct+"(?="+Ct+")|"+zt+qt,"g"),Vt=RegExp([Nt+"?"+kt+"+"+Ot+"(?="+[xt,Nt,"$"].join("|")+")","(?:"+Nt+"|"+Et+")"+"+"+Rt+"(?="+[xt,Nt+It,"$"].join("|")+")",Nt+"?"+It+"+"+Ot,Nt+"+"+Rt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wt,Bt].join("|"),"g"),Wt=RegExp("["+Mt+mt+gt+bt+"]"),Gt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$t=-1,Qt={};Qt[Ge]=Qt[Je]=Qt[$e]=Qt[Qe]=Qt[Ye]=Qt[Xe]=Qt[Ke]=Qt[Ze]=Qt[et]=!0,Qt[Te]=Qt[je]=Qt[Ve]=Qt[Ne]=Qt[We]=Qt[Me]=Qt[Ie]=Qt[Oe]=Qt[De]=Qt[Le]=Qt[Pe]=Qt[Be]=Qt[ze]=Qt[Fe]=Qt[Ue]=!1;var Yt={};Yt[Te]=Yt[je]=Yt[Ve]=Yt[We]=Yt[Ne]=Yt[Me]=Yt[Ge]=Yt[Je]=Yt[$e]=Yt[Qe]=Yt[Ye]=Yt[De]=Yt[Le]=Yt[Pe]=Yt[Be]=Yt[ze]=Yt[Fe]=Yt[He]=Yt[Xe]=Yt[Ke]=Yt[Ze]=Yt[et]=!0,Yt[Ie]=Yt[Oe]=Yt[Ue]=!1;var Xt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kt=parseFloat,Zt=parseInt,eo="object"==typeof e&&e&&e.Object===Object&&e,to="object"==typeof self&&self&&self.Object===Object&&self,oo=eo||to||Function("return this")(),no=t&&!t.nodeType&&t,ao=no&&"object"==typeof n&&n&&!n.nodeType&&n,so=ao&&ao.exports===no,io=so&&eo.process,ro=function(){try{var e=ao&&ao.require&&ao.require("util").types;return e?e:io&&io.binding&&io.binding("util")}catch(t){}}(),lo=ro&&ro.isArrayBuffer,co=ro&&ro.isDate,po=ro&&ro.isMap,uo=ro&&ro.isRegExp,mo=ro&&ro.isSet,go=ro&&ro.isTypedArray,ho=A("length"),_o=T({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),fo=T({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),bo=T({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":"\"","&#39;":"'"}),vo=function e(t){function o(e){if(ys(e)&&!pl(e)&&!(e instanceof _)){if(e instanceof a)return e;if(mi.call(e,"__wrapped__"))return Fa(e)}return new a(e)}function n(){}function a(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function _(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ce,this.__views__=[]}function v(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function T(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Y(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new Y;++t<o;)this.add(e[t])}function te(e){var t=this.__data__=new T(e);this.size=t.size}function ct(e,t){var o=pl(e),n=!o&&cl(e),a=!o&&!n&&ml(e),s=!o&&!n&&!a&&bl(e),i=o||n||a||s,r=i?I(e.length,ii):[],l=r.length;for(var d in e)(t||mi.call(e,d))&&!(i&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||va(d,l)))&&r.push(d);return r}function mt(e){var t=e.length;return t?e[Bo(0,t-1)]:void 0}function ht(e,t){return Pa(Sn(e),Et(t,0,e.length))}function _t(e){return Pa(Sn(e))}function ft(e,t,o){(void 0===o||ps(e[t],o))&&(void 0!==o||t in e)||wt(e,t,o)}function bt(e,t,o){var n=e[t];mi.call(e,t)&&ps(n,o)&&(void 0!==o||t in e)||wt(e,t,o)}function vt(e,t){for(var o=e.length;o--;)if(ps(e[o][0],t))return o;return-1}function yt(e,t,o,n){return pr(e,function(e,a,s){t(n,e,o(e),s)}),n}function xt(e,t){return e&&wn(t,Ds(t),e)}function St(e,t){return e&&wn(t,Ls(t),e)}function wt(e,t,o){"__proto__"==t&&Mi?Mi(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function kt(e,t){for(var o=-1,n=t.length,a=Zs(n);++o<n;)a[o]=null==e?void 0:Os(e,t[o]);return a}function Et(e,t,o){return e===e&&(void 0!==o&&(e=e<=o?e:o),void 0!==t&&(e=e>=t?e:t)),e}function Ct(e,t,o,n,a,s){var i=t&re,l=t&le,d;if(o&&(d=a?o(e,n,a,s):o(e)),void 0!==d)return d;if(!vs(e))return e;var c=pl(e);if(!c){var p=Sr(e),u=p==Oe||p==Re;if(ml(e))return un(e,i);if(p!=Pe&&p!=Te&&(!u||a)){if(!Yt[p])return a?e:{};d=_a(e,p,i)}else if(d=l||u?{}:ha(e),!i)return l?En(e,St(d,e)):kn(e,xt(d,e))}else if(d=ga(e),!i)return Sn(e,d);s||(s=new te);var m=s.get(e);if(m)return m;s.set(e,d),fl(e)?e.forEach(function(n){d.add(Ct(n,t,o,n,e,s))}):hl(e)&&e.forEach(function(n,a){d.set(a,Ct(n,t,o,a,e,s))});var g=t&de?l?na:oa:l?Ls:Ds,h=c?void 0:g(e);return r(h||e,function(n,a){h&&(a=n,n=e[a]),bt(d,a,Ct(n,t,o,a,e,s))}),d}function At(e){var t=Ds(e);return function(o){return Tt(o,e,t)}}function Tt(e,t,o){var n=o.length;if(null==e)return!n;for(e=ai(e);n--;){var a=o[n],s=t[a],i=e[a];if(void 0===i&&!(a in e)||!s(i))return!1}return!0}function jt(e,t,o){if("function"!=typeof e)throw new ri(ae);return Er(function(){e.apply(void 0,o)},t)}function Nt(e,t,o,n){var a=-1,s=p,i=!0,r=e.length,l=[],d=t.length;if(!r)return l;o&&(t=m(t,R(o))),n?(s=u,i=!1):t.length>=ne&&(s=L,i=!1,t=new ee(t));outer:for(;++a<r;){var c=e[a],g=null==o?c:o(c);if(c=n||0!==c?c:0,i&&g===g){for(var h=d;h--;)if(t[h]===g)continue outer;l.push(c)}else s(t,g,n)||l.push(c)}return l}function Mt(e,t){var o=!0;return pr(e,function(e,n,a){return o=!!t(e,n,a),o}),o}function It(e,t,o){for(var n=-1,a=e.length;++n<a;){var s=e[n],i=t(s);if(null!=i&&(void 0===r?i===i&&!ks(i):o(i,r)))var r=i,l=s}return l}function Ot(e,t,o,n){var a=e.length;for(o=Ts(o),0>o&&(o=-o>a?0:a+o),n=void 0===n||n>a?a:Ts(n),0>n&&(n+=a),n=o>n?0:js(n);o<n;)e[o++]=t;return e}function Rt(e,t){var o=[];return pr(e,function(e,n,a){t(e,n,a)&&o.push(e)}),o}function Dt(e,t,o,n,a){var s=-1,i=e.length;for(o||(o=ba),a||(a=[]);++s<i;){var r=e[s];0<t&&o(r)?1<t?Dt(r,t-1,o,n,a):g(a,r):!n&&(a[a.length]=r)}return a}function Lt(e,t){return e&&mr(e,t,Ds)}function Pt(e,t){return e&&gr(e,t,Ds)}function qt(e,t){return c(t,function(t){return _s(e[t])})}function Bt(e,t){t=cn(t,e);for(var o=0,n=t.length;null!=e&&o<n;)e=e[qa(t[o++])];return o&&o==n?e:void 0}function zt(e,t,o){var n=t(e);return pl(e)?n:g(n,o(e))}function Ut(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ni&&Ni in ai(e)?ca(e):Na(e)}function Vt(e,t){return e>t}function Wt(e,t){return null!=e&&mi.call(e,t)}function Gt(e,t){return null!=e&&t in ai(e)}function Xt(e,t,o){return e>=Ui(t,o)&&e<Hi(t,o)}function eo(e,t,o){for(var n=o?u:p,a=e[0].length,s=e.length,i=s,r=Zs(s),l=1/0,d=[],c;i--;)c=e[i],i&&t&&(c=m(c,R(t))),l=Ui(c.length,l),r[i]=!o&&(t||120<=a&&120<=c.length)?new ee(i&&c):void 0;c=e[0];var g=-1,h=r[0];outer:for(;++g<a&&d.length<l;){var _=c[g],f=t?t(_):_;if(_=o||0!==_?_:0,h?!L(h,f):!n(d,f,o)){for(i=s;--i;){var b=r[i];if(b?!L(b,f):!n(e[i],f,o))continue outer}h&&h.push(f),d.push(_)}}return d}function to(e,t,o,n){return Lt(e,function(e,a,s){t(n,o(e),a,s)}),n}function no(e,t,o){t=cn(t,e),e=Ia(e,t);var n=null==e?e:e[qa(Ga(t))];return null==n?void 0:s(n,e,o)}function ao(e){return ys(e)&&Ut(e)==Te}function io(e,t,o,n,a){return e===t||(null!=e&&null!=t&&(ys(e)||ys(t))?ro(e,t,o,n,io,a):e!==e&&t!==t)}function ro(e,t,o,n,a,s){var i=pl(e),r=pl(t),l=i?je:Sr(e),d=r?je:Sr(t);l=l==Te?Pe:l,d=d==Te?Pe:d;var c=l==Pe,p=d==Pe,u=l==d;if(u&&ml(e)){if(!ml(t))return!1;i=!0,c=!1}if(u&&!c)return s||(s=new te),i||bl(e)?Kn(e,t,o,n,a,s):Zn(e,t,l,o,n,a,s);if(!(o&ce)){var m=c&&mi.call(e,"__wrapped__"),g=p&&mi.call(t,"__wrapped__");if(m||g){var h=m?e.value():e,_=g?t.value():t;return s||(s=new te),a(h,_,o,n,s)}}return!!u&&(s||(s=new te),ea(e,t,o,n,a,s))}function ho(e){return ys(e)&&Sr(e)==De}function yo(e,t,o,n){var a=o.length,s=a,i=!n;if(null==e)return!s;for(e=ai(e);a--;){var r=o[a];if(i&&r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++a<s;){r=o[a];var l=r[0],d=e[l],c=r[1];if(!(i&&r[2])){var p=new te;if(n)var u=n(d,c,l,e,t,p);if(void 0===u?!io(c,d,ce|pe,n,p):!u)return!1}else if(void 0===d&&!(l in e))return!1}return!0}function xo(e){if(!vs(e)||ka(e))return!1;var t=_s(e)?vi:/^\[object .+?Constructor\]$/;return t.test(Ba(e))}function So(e){return ys(e)&&Sr(e)==ze}function wo(e){return"function"==typeof e?e:null==e?Ws:"object"==typeof e?pl(e)?jo(e[0],e[1]):To(e):Qs(e)}function ko(e){if(!Ea(e))return Fi(e);var t=[];for(var o in ai(e))mi.call(e,o)&&"constructor"!=o&&t.push(o);return t}function Eo(e){if(!vs(e))return ja(e);var t=Ea(e),o=[];for(var n in e)("constructor"!=n||!t&&mi.call(e,n))&&o.push(n);return o}function Co(e,t){return e<t}function Ao(e,t){var o=-1,n=us(e)?Zs(e.length):[];return pr(e,function(e,a,s){n[++o]=t(e,a,s)}),n}function To(e){var t=la(e);return 1==t.length&&t[0][2]?Aa(t[0][0],t[0][1]):function(o){return o===e||yo(o,e,t)}}function jo(e,t){return xa(e)&&Ca(t)?Aa(qa(e),t):function(o){var n=Os(o,e);return void 0===n&&n===t?Rs(o,e):io(t,n,ce|pe)}}function No(e,t,o,n,a){e===t||mr(t,function(s,i){if(a||(a=new te),vs(s))Mo(e,t,i,o,No,n,a);else{var r=n?n(Ra(e,i),s,i+"",e,t,a):void 0;void 0===r&&(r=s),ft(e,i,r)}},Ls)}function Mo(e,t,o,n,a,s,i){var r=Ra(e,o),l=Ra(t,o),d=i.get(l);if(d)return void ft(e,o,d);var c=s?s(r,l,o+"",e,t,i):void 0,p=void 0===c;if(p){var u=pl(l),m=!u&&ml(l),g=!u&&!m&&bl(l);c=l,u||m||g?pl(r)?c=r:ms(r)?c=Sn(r):m?(p=!1,c=un(l,!0)):g?(p=!1,c=fn(l,!0)):c=[]:Ss(l)||cl(l)?(c=r,cl(r)?c=Ms(r):(!vs(r)||_s(r))&&(c=ha(l))):p=!1}p&&(i.set(l,c),a(c,l,n,s,i),i["delete"](l)),ft(e,o,c)}function Io(e,t){var o=e.length;if(o)return t+=0>t?o:0,va(t,o)?e[t]:void 0}function Oo(e,t,o){var n=-1;t=m(t.length?t:[Ws],R(ia()));var a=Ao(e,function(e){var o=m(t,function(t){return t(e)});return{criteria:o,index:++n,value:e}});return N(a,function(e,t){return vn(e,t,o)})}function Ro(e,t){return Do(e,t,function(t,o){return Rs(e,o)})}function Do(e,t,o){for(var n=-1,a=t.length,s={};++n<a;){var i=t[n],r=Bt(e,i);o(r,i)&&Wo(s,cn(i,e),r)}return s}function Lo(e){return function(t){return Bt(t,e)}}function Po(e,t,o,n){var a=n?k:w,s=-1,i=t.length,r=e;for(e===t&&(t=Sn(t)),o&&(r=m(e,R(o)));++s<i;)for(var l=0,d=t[s],c=o?o(d):d;-1<(l=a(r,c,l,n));)r!==e&&Ai.call(r,l,1),Ai.call(e,l,1);return e}function qo(e,t){for(var o=e?t.length:0,n=o-1,a;o--;)if(a=t[o],o==n||a!==s){var s=a;va(a)?Ai.call(e,a,1):tn(e,a)}return e}function Bo(e,t){return e+Li(Gi()*(t-e+1))}function zo(e,t,o,n){for(var a=-1,s=Hi(Di((t-e)/(o||1)),0),i=Zs(s);s--;)i[n?s:++a]=e,e+=o;return i}function Fo(e,t){var o="";if(!e||1>t||t>ke)return o;do t%2&&(o+=e),t=Li(t/2),t&&(e+=e);while(t);return o}function Ho(e,t){return Cr(Ma(e,t,Ws),e+"")}function Uo(e){return mt(qs(e))}function Vo(e,t){var o=qs(e);return Pa(o,Et(t,0,o.length))}function Wo(e,t,o,n){if(!vs(e))return e;t=cn(t,e);for(var a=-1,s=t.length,i=e;null!=i&&++a<s;){var r=qa(t[a]),l=o;if(a!=s-1){var d=i[r];l=n?n(d,r,i):void 0,void 0===l&&(l=vs(d)?d:va(t[a+1])?[]:{})}bt(i,r,l),i=i[r]}return e}function Go(e){return Pa(qs(e))}function Jo(e,t,o){var n=-1,a=e.length;0>t&&(t=-t>a?0:a+t),o=o>a?a:o,0>o&&(o+=a),a=t>o?0:o-t>>>0,t>>>=0;for(var s=Zs(a);++n<a;)s[n]=e[n+t];return s}function $o(e,t){var o;return pr(e,function(e,n,a){return o=t(e,n,a),!o}),!!o}function Qo(e,t,o){var n=0,a=null==e?n:e.length;if("number"==typeof t&&t===t&&a<=Ce>>>1){for(;n<a;){var s=n+a>>>1,i=e[s];null!==i&&!ks(i)&&(o?i<=t:i<t)?n=s+1:a=s}return a}return Yo(e,t,Ws,o)}function Yo(e,t,o,n){t=o(t);for(var a=0,s=null==e?0:e.length,i=t!==t,r=null===t,l=ks(t),d=void 0===t;a<s;){var c=Li((a+s)/2),p=o(e[c]),u=void 0!==p,m=null===p,g=p===p,h=ks(p);if(i)var _=n||g;else _=d?g&&(n||u):r?g&&u&&(n||!m):l?g&&u&&!m&&(n||!h):!(m||h)&&(n?p<=t:p<t);_?a=c+1:s=c}return Ui(s,Ce-1)}function Xo(e,t){for(var o=-1,n=e.length,a=0,s=[];++o<n;){var i=e[o],r=t?t(i):i;if(!o||!ps(r,l)){var l=r;s[a++]=0===i?0:i}}return s}function Ko(e){return"number"==typeof e?e:ks(e)?Ee:+e}function Zo(e){if("string"==typeof e)return e;if(pl(e))return m(e,Zo)+"";if(ks(e))return dr?dr.call(e):"";var t=e+"";return"0"==t&&1/e==-we?"-0":t}function en(e,t,o){var n=-1,a=p,s=e.length,i=!0,r=[],l=r;if(o)i=!1,a=u;else if(s>=ne){var d=t?null:br(e);if(d)return $(d);i=!1,a=L,l=new ee}else l=t?[]:r;outer:for(;++n<s;){var c=e[n],m=t?t(c):c;if(c=o||0!==c?c:0,i&&m===m){for(var g=l.length;g--;)if(l[g]===m)continue outer;t&&l.push(m),r.push(c)}else a(l,m,o)||(l!==r&&l.push(m),r.push(c))}return r}function tn(e,t){return t=cn(t,e),e=Ia(e,t),null==e||delete e[qa(Ga(t))]}function on(e,t,o,n){return Wo(e,t,o(Bt(e,t)),n)}function nn(e,t,o,n){for(var a=e.length,s=n?a:-1;(n?s--:++s<a)&&t(e[s],s,e););return o?Jo(e,n?0:s,n?s+1:a):Jo(e,n?s+1:0,n?a:s)}function an(e,t){var o=e;return o instanceof _&&(o=o.value()),h(t,function(e,t){return t.func.apply(t.thisArg,g([e],t.args))},o)}function sn(e,t,o){var n=e.length;if(2>n)return n?en(e[0]):[];for(var a=-1,s=Zs(n);++a<n;)for(var i=e[a],r=-1;++r<n;)r!=a&&(s[a]=Nt(s[a]||i,e[r],t,o));return en(Dt(s,1),t,o)}function rn(e,t,o){for(var n=-1,a=e.length,s=t.length,i={},r;++n<a;)r=n<s?t[n]:void 0,o(i,e[n],r);return i}function ln(e){return ms(e)?e:[]}function dn(e){return"function"==typeof e?e:Ws}function cn(e,t){return pl(e)?e:xa(e,t)?[e]:Ar(Is(e))}function pn(e,t,o){var n=e.length;return o=void 0===o?n:o,!t&&o>=n?e:Jo(e,t,o)}function un(e,t){if(t)return e.slice();var o=e.length,n=wi?wi(o):new e.constructor(o);return e.copy(n),n}function mn(e){var t=new e.constructor(e.byteLength);return new Si(t).set(new Si(e)),t}function gn(e,t){var o=t?mn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function hn(e){var t=new e.constructor(e.source,pt.exec(e));return t.lastIndex=e.lastIndex,t}function _n(e){return lr?ai(lr.call(e)):{}}function fn(e,t){var o=t?mn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function bn(e,t){if(e!==t){var o=void 0!==e,n=null===e,a=e===e,s=ks(e),i=void 0!==t,r=null===t,l=t===t,d=ks(t);if(!r&&!d&&!s&&e>t||s&&i&&l&&!r&&!d||n&&i&&l||!o&&l||!a)return 1;if(!n&&!s&&!d&&e<t||d&&o&&a&&!n&&!s||r&&o&&a||!i&&a||!l)return-1}return 0}function vn(e,t,o){for(var n=-1,a=e.criteria,s=t.criteria,i=a.length,r=o.length,l;++n<i;)if(l=bn(a[n],s[n]),l){if(n>=r)return l;var d=o[n];return l*("desc"==d?-1:1)}return e.index-t.index}function yn(e,t,o,n){for(var a=-1,s=e.length,i=o.length,r=-1,l=t.length,d=Hi(s-i,0),c=Zs(l+d),p=!n;++r<l;)c[r]=t[r];for(;++a<i;)(p||a<s)&&(c[o[a]]=e[a]);for(;d--;)c[r++]=e[a++];return c}function xn(e,t,o,n){for(var a=-1,s=e.length,i=-1,r=o.length,l=-1,d=t.length,c=Hi(s-r,0),p=Zs(c+d),u=!n;++a<c;)p[a]=e[a];for(var m=a;++l<d;)p[m+l]=t[l];for(;++i<r;)(u||a<s)&&(p[m+o[i]]=e[a++]);return p}function Sn(e,t){var o=-1,n=e.length;for(t||(t=Zs(n));++o<n;)t[o]=e[o];return t}function wn(e,t,o,n){var a=!o;o||(o={});for(var s=-1,i=t.length;++s<i;){var r=t[s],l=n?n(o[r],e[r],r,o,e):void 0;void 0===l&&(l=e[r]),a?wt(o,r,l):bt(o,r,l)}return o}function kn(e,t){return wn(e,yr(e),t)}function En(e,t){return wn(e,xr(e),t)}function Cn(e,t){return function(o,n){var a=pl(o)?i:yt,s=t?t():{};return a(o,e,ia(n,2),s)}}function An(e){return Ho(function(t,o){var n=-1,a=o.length,s=1<a?o[a-1]:void 0,i=2<a?o[2]:void 0;for(s=3<e.length&&"function"==typeof s?(a--,s):void 0,i&&ya(o[0],o[1],i)&&(s=3>a?void 0:s,a=1),t=ai(t);++n<a;){var r=o[n];r&&e(t,r,n,s)}return t})}function Tn(e,t){return function(o,n){if(null==o)return o;if(!us(o))return e(o,n);for(var a=o.length,s=t?a:-1,i=ai(o);(t?s--:++s<a)&&!1!==n(i[s],s,i););return o}}function jn(e){return function(t,o,n){for(var a=-1,s=ai(t),i=n(t),r=i.length,l;r--&&(l=i[e?r:++a],!1!==o(s[l],l,s)););return t}}function Nn(e,t,o){function n(){var t=this&&this!==oo&&this instanceof n?s:e;return t.apply(a?o:this,arguments)}var a=t&ue,s=On(e);return n}function Mn(e){return function(t){t=Is(t);var o=H(t)?Z(t):void 0,n=o?o[0]:t.charAt(0),a=o?pn(o,1).join(""):t.slice(1);return n[e]()+a}}function In(e){return function(t){return h(Us(zs(t).replace(Ft,"")),e,"")}}function On(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);}var o=cr(e.prototype),n=e.apply(o,t);return vs(n)?n:o}}function Rn(e,t,o){function n(){for(var i=arguments.length,r=Zs(i),l=i,d=sa(n);l--;)r[l]=arguments[l];var c=3>i&&r[0]!==d&&r[i-1]!==d?[]:J(r,d);if(i-=c.length,i<o)return Wn(e,t,Pn,n.placeholder,void 0,r,c,void 0,void 0,o-i);var p=this&&this!==oo&&this instanceof n?a:e;return s(p,this,r)}var a=On(e);return n}function Dn(e){return function(t,o,n){var a=ai(t);if(!us(t)){var s=ia(o,3);t=Ds(t),o=function(e){return s(a[e],e,a)}}var i=e(t,o,n);return-1<i?a[s?t[i]:i]:void 0}}function Ln(e){return ta(function(t){var o=t.length,n=o,s=a.prototype.thru;for(e&&t.reverse();n--;){var i=t[n];if("function"!=typeof i)throw new ri(ae);if(s&&!r&&"wrapper"==aa(i))var r=new a([],!0)}for(n=r?n:o;++n<o;){i=t[n];var l=aa(i),d="wrapper"==l?vr(i):void 0;r=d&&wa(d[0])&&d[1]==(ve|he|fe|ye)&&!d[4].length&&1==d[9]?r[aa(d[0])].apply(r,d[3]):1==i.length&&wa(i)?r[l]():r.thru(i)}return function(){var e=arguments,n=e[0];if(r&&1==e.length&&pl(n))return r.plant(n).value();for(var a=0,s=o?t[a].apply(this,e):n;++a<o;)s=t[a].call(this,s);return s}})}function Pn(e,t,o,n,a,s,i,r,l,d){function c(){for(var f=arguments.length,b=Zs(f),v=f;v--;)b[v]=arguments[v];if(g)var y=sa(c),x=B(b,y);if(n&&(b=yn(b,n,a,g)),s&&(b=xn(b,s,i,g)),f-=x,g&&f<d){var S=J(b,y);return Wn(e,t,Pn,c.placeholder,o,b,S,r,l,d-f)}var w=u?o:this,k=m?w[e]:e;return f=b.length,r?b=Oa(b,r):h&&1<f&&b.reverse(),p&&l<f&&(b.length=l),this&&this!==oo&&this instanceof c&&(k=_||On(k)),k.apply(w,b)}var p=t&ve,u=t&ue,m=t&me,g=t&(he|_e),h=t&xe,_=m?void 0:On(e);return c}function qn(e,t){return function(o,n){return to(o,e,t(n),{})}}function Bn(e,t){return function(o,n){var a;if(void 0===o&&void 0===n)return t;if(void 0!==o&&(a=o),void 0!==n){if(void 0===a)return n;"string"==typeof o||"string"==typeof n?(o=Zo(o),n=Zo(n)):(o=Ko(o),n=Ko(n)),a=e(o,n)}return a}}function zn(e){return ta(function(t){return t=m(t,R(ia())),Ho(function(o){var n=this;return e(t,function(e){return s(e,n,o)})})})}function Fn(e,t){t=void 0===t?" ":Zo(t);var o=t.length;if(2>o)return o?Fo(t,e):t;var n=Fo(t,Di(e/K(t)));return H(t)?pn(Z(n),0,e).join(""):n.slice(0,e)}function Hn(e,t,o,n){function a(){for(var t=-1,l=arguments.length,d=-1,c=n.length,p=Zs(c+l),u=this&&this!==oo&&this instanceof a?r:e;++d<c;)p[d]=n[d];for(;l--;)p[d++]=arguments[++t];return s(u,i?o:this,p)}var i=t&ue,r=On(e);return a}function Un(e){return function(t,o,n){return n&&"number"!=typeof n&&ya(t,o,n)&&(o=n=void 0),t=As(t),void 0===o?(o=t,t=0):o=As(o),n=void 0===n?t<o?1:-1:As(n),zo(t,o,n,e)}}function Vn(e){return function(t,o){return"string"==typeof t&&"string"==typeof o||(t=Ns(t),o=Ns(o)),e(t,o)}}function Wn(e,t,o,n,a,s,i,r,l,d){var c=t&he,p=c?i:void 0,u=c?void 0:i,m=c?s:void 0,g=c?void 0:s;t|=c?fe:be,t&=~(c?be:fe),t&ge||(t&=~(ue|me));var h=[e,t,a,m,p,g,u,r,l,d],_=o.apply(void 0,h);return wa(e)&&kr(_,h),_.placeholder=n,Da(_,e,t)}function Gn(e){var t=ni[e];return function(e,o){if(e=Ns(e),o=null==o?0:Ui(Ts(o),292),o&&Bi(e)){var n=(Is(e)+"e").split("e"),a=t(n[0]+"e"+(+n[1]+o));return n=(Is(a)+"e").split("e"),+(n[0]+"e"+(+n[1]-o))}return t(e)}}function Jn(e){return function(t){var o=Sr(t);return o==De?W(t):o==ze?Q(t):O(t,e(t))}}function $n(e,t,o,n,a,s,i,r){var l=t&me;if(!l&&"function"!=typeof e)throw new ri(ae);var d=n?n.length:0;if(d||(t&=~(fe|be),n=a=void 0),i=void 0===i?i:Hi(Ts(i),0),r=void 0===r?r:Ts(r),d-=a?a.length:0,t&be){var c=n,p=a;n=a=void 0}var u=l?void 0:vr(e),m=[e,t,o,n,a,c,p,s,i,r];if(u&&Ta(m,u),e=m[0],t=m[1],o=m[2],n=m[3],a=m[4],r=m[9]=void 0===m[9]?l?0:e.length:Hi(m[9]-d,0),!r&&t&(he|_e)&&(t&=~(he|_e)),!t||t==ue)var g=Nn(e,t,o);else g=t==he||t==_e?Rn(e,t,r):t!=fe&&t!=(ue|fe)||a.length?Pn.apply(void 0,m):Hn(e,t,o,n);var h=u?hr:kr;return Da(h(g,m),e,t)}function Qn(e,t,o,n){return void 0===e||ps(e,ci[o])&&!mi.call(n,o)?t:e}function Yn(e,t,o,n,a,s){return vs(e)&&vs(t)&&(s.set(t,e),No(e,t,void 0,Yn,s),s["delete"](t)),e}function Xn(e){return Ss(e)?void 0:e}function Kn(e,t,o,n,a,s){var i=o&ce,r=e.length,l=t.length;if(r!=l&&!(i&&l>r))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var c=-1,p=!0,u=o&pe?new ee:void 0;for(s.set(e,t),s.set(t,e);++c<r;){var m=e[c],g=t[c];if(n)var h=i?n(g,m,c,t,e,s):n(m,g,c,e,t,s);if(void 0!==h){if(h)continue;p=!1;break}if(u){if(!b(t,function(e,t){if(!L(u,t)&&(m===e||a(m,e,o,n,s)))return u.push(t)})){p=!1;break}}else if(!(m===g||a(m,g,o,n,s))){p=!1;break}}return s["delete"](e),s["delete"](t),p}function Zn(e,t,o,n,a,s,i){switch(o){case We:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ve:return!!(e.byteLength==t.byteLength&&s(new Si(e),new Si(t)));case Ne:case Me:case Le:return ps(+e,+t);case Ie:return e.name==t.name&&e.message==t.message;case Be:case Fe:return e==t+"";case De:var r=W;case ze:var l=n&ce;if(r||(r=$),e.size!=t.size&&!l)return!1;var d=i.get(e);if(d)return d==t;n|=pe,i.set(e,t);var c=Kn(r(e),r(t),n,a,s,i);return i["delete"](e),c;case He:if(lr)return lr.call(e)==lr.call(t);}return!1}function ea(e,t,o,n,a,s){var i=o&ce,r=oa(e),l=r.length,d=oa(t),c=d.length;if(l!=c&&!i)return!1;for(var p=l,u;p--;)if(u=r[p],i?!(u in t):!mi.call(t,u))return!1;var m=s.get(e);if(m&&s.get(t))return m==t;var g=!0;s.set(e,t),s.set(t,e);for(var h=i;++p<l;){u=r[p];var _=e[u],f=t[u];if(n)var b=i?n(f,_,u,t,e,s):n(_,f,u,e,t,s);if(void 0===b?!(_===f||a(_,f,o,n,s)):!b){g=!1;break}h||(h="constructor"==u)}if(g&&!h){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(g=!1)}return s["delete"](e),s["delete"](t),g}function ta(e){return Cr(Ma(e,void 0,Va),e+"")}function oa(e){return zt(e,Ds,yr)}function na(e){return zt(e,Ls,xr)}function aa(e){for(var t=e.name+"",o=tr[t],n=mi.call(tr,t)?o.length:0;n--;){var a=o[n],s=a.func;if(null==s||s==e)return a.name}return t}function sa(e){var t=mi.call(o,"placeholder")?o:e;return t.placeholder}function ia(){var e=o.iteratee||Gs;return e=e===Gs?wo:e,arguments.length?e(arguments[0],arguments[1]):e}function ra(e,t){var o=e.__data__;return Sa(t)?o["string"==typeof t?"string":"hash"]:o.map}function la(e){for(var t=Ds(e),o=t.length;o--;){var n=t[o],a=e[n];t[o]=[n,a,Ca(a)]}return t}function da(e,t){var o=F(e,t);return xo(o)?o:void 0}function ca(e){var t=mi.call(e,Ni),o=e[Ni];try{e[Ni]=void 0;var n=!0}catch(t){}var a=_i.call(e);return n&&(t?e[Ni]=o:delete e[Ni]),a}function pa(e,t,o){for(var n=-1,a=o.length;++n<a;){var s=o[n],i=s.size;switch(s.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=Ui(t,e+i);break;case"takeRight":e=Hi(e,t-i);}}return{start:e,end:t}}function ua(e){var t=e.match(/\{\n\/\* \[wrapped with (.+)\] \*/);return t?t[1].split(/,? & /):[]}function ma(e,t,o){t=cn(t,e);for(var n=-1,a=t.length,s=!1,i;++n<a&&(i=qa(t[n]),!!(s=null!=e&&o(e,i)));)e=e[i];return s||++n!=a?s:(a=null==e?0:e.length,!!a&&bs(a)&&va(i,a)&&(pl(e)||cl(e)))}function ga(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&mi.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function ha(e){return"function"!=typeof e.constructor||Ea(e)?{}:cr(ki(e))}function _a(e,t,o){var n=e.constructor;return t===Ve?mn(e):t===Ne||t===Me?new n(+e):t===We?gn(e,o):t===Ge||t===Je||t===$e||t===Qe||t===Ye||t===Xe||t===Ke||t===Ze||t===et?fn(e,o):t===De?new n:t===Le||t===Fe?new n(e):t===Be?hn(e):t===ze?new n:t===He?_n(e):void 0}function fa(e,t){var o=t.length;if(!o)return e;var n=o-1;return t[n]=(1<o?"& ":"")+t[n],t=t.join(2<o?", ":" "),e.replace(/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,"{\n/* [wrapped with "+t+"] */\n")}function ba(e){return pl(e)||cl(e)||!!(Ti&&e&&e[Ti])}function va(e,t){var o=typeof e;return t=null==t?ke:t,!!t&&("number"==o||"symbol"!=o&&/^(?:0|[1-9]\d*)$/.test(e))&&-1<e&&0==e%1&&e<t}function ya(e,t,o){if(!vs(o))return!1;var n=typeof t;return("number"==n?!!(us(o)&&va(t,o.length)):!!("string"==n&&t in o))&&ps(o[t],e)}function xa(e,t){if(pl(e))return!1;var o=typeof e;return!!("number"==o||"symbol"==o||"boolean"==o||null==e||ks(e))||/^\w*$/.test(e)||!/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/.test(e)||null!=t&&e in ai(t)}function Sa(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function wa(e){var t=aa(e),n=o[t];if("function"!=typeof n||!(t in _.prototype))return!1;if(e===n)return!0;var a=vr(n);return!!a&&e===a[0]}function ka(e){return!!hi&&hi in e}function Ea(e){var t=e&&e.constructor,o="function"==typeof t&&t.prototype||ci;return e===o}function Ca(e){return e===e&&!vs(e)}function Aa(e,t){return function(o){return null!=o&&o[e]===t&&(void 0!==t||e in ai(o))}}function Ta(e,t){var o=e[1],n=t[1],a=o|n,s=a<(ue|me|ve),i=n==ve&&o==he||n==ve&&o==ye&&e[7].length<=t[8]||n==(ve|ye)&&t[7].length<=t[8]&&o==he;if(!(s||i))return e;n&ue&&(e[2]=t[2],a|=o&ue?0:ge);var r=t[3];if(r){var l=e[3];e[3]=l?yn(l,r,t[4]):r,e[4]=l?J(e[3],ie):t[4]}return r=t[5],r&&(l=e[5],e[5]=l?xn(l,r,t[6]):r,e[6]=l?J(e[5],ie):t[6]),r=t[7],r&&(e[7]=r),n&ve&&(e[8]=null==e[8]?t[8]:Ui(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a,e}function ja(e){var t=[];if(null!=e)for(var o in ai(e))t.push(o);return t}function Na(e){return _i.call(e)}function Ma(e,t,o){return t=Hi(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Hi(n.length-t,0),r=Zs(i);++a<i;)r[a]=n[t+a];a=-1;for(var l=Zs(t+1);++a<t;)l[a]=n[a];return l[t]=o(r),s(e,this,l)}}function Ia(e,t){return 2>t.length?e:Bt(e,Jo(t,0,-1))}function Oa(e,t){for(var o=e.length,n=Ui(t.length,o),a=Sn(e),s;n--;)s=t[n],e[n]=va(s,o)?a[s]:void 0;return e}function Ra(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"==t?void 0:e[t]}function Da(e,t,o){var n=t+"";return Cr(e,fa(n,za(ua(n),o)))}function La(e){var t=0,o=0;return function(){var n=Vi(),a=16-(n-o);if(o=n,!(0<a))t=0;else if(++t>=800)return arguments[0];return e.apply(void 0,arguments)}}function Pa(e,t){var o=-1,n=e.length;for(t=void 0===t?n:t;++o<t;){var a=Bo(o,n-1),s=e[a];e[a]=e[o],e[o]=s}return e.length=t,e}function qa(e){if("string"==typeof e||ks(e))return e;var t=e+"";return"0"==t&&1/e==-we?"-0":t}function Ba(e){if(null!=e){try{return ui.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function za(e,t){return r(Ae,function(o){var n="_."+o[0];t&o[1]&&!p(e,n)&&e.push(n)}),e.sort()}function Fa(e){if(e instanceof _)return e.clone();var t=new a(e.__wrapped__,e.__chain__);return t.__actions__=Sn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ha(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=null==o?0:Ts(o);return 0>a&&(a=Hi(n+a,0)),S(e,ia(t,3),a)}function Ua(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=n-1;return void 0!==o&&(a=Ts(o),a=0>o?Hi(n+a,0):Ui(a,n-1)),S(e,ia(t,3),a,!0)}function Va(e){var t=null==e?0:e.length;return t?Dt(e,1):[]}function Wa(e){return e&&e.length?e[0]:void 0}function Ga(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function Ja(e,t){return e&&e.length&&t&&t.length?Po(e,t):e}function $a(e){return null==e?e:Ji.call(e)}function Qa(e){if(!(e&&e.length))return[];var t=0;return e=c(e,function(e){if(ms(e))return t=Hi(e.length,t),!0}),I(t,function(t){return m(e,A(t))})}function Ya(e,t){if(!(e&&e.length))return[];var o=Qa(e);return null==t?o:m(o,function(e){return s(t,void 0,e)})}function Xa(e){var t=o(e);return t.__chain__=!0,t}function Ka(e,t){return t(e)}function Za(e,t){var o=pl(e)?r:pr;return o(e,ia(t,3))}function es(e,t){var o=pl(e)?l:ur;return o(e,ia(t,3))}function ts(e,t){var o=pl(e)?m:Ao;return o(e,ia(t,3))}function os(e){if(null==e)return 0;if(us(e))return ws(e)?K(e):e.length;var t=Sr(e);return t==De||t==ze?e.size:ko(e).length}function ns(e,t,o){return t=o?void 0:t,t=e&&null==t?e.length:t,$n(e,ve,void 0,void 0,void 0,void 0,t)}function as(e,t){var o;if("function"!=typeof t)throw new ri(ae);return e=Ts(e),function(){return 0<--e&&(o=t.apply(this,arguments)),1>=e&&(t=void 0),o}}function ss(e,t,o){t=o?void 0:t;var n=$n(e,he,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=ss.placeholder,n}function is(e,t,o){t=o?void 0:t;var n=$n(e,_e,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=is.placeholder,n}function rs(e,t,o){function n(t){var o=_,n=f;return _=f=void 0,u=t,v=e.apply(n,o),v}function a(e){return u=e,y=Er(r,t),m?n(e):v}function s(e){var o=e-x,n=e-u,a=t-o;return g?Ui(a,b-n):a}function i(e){var o=e-x,n=e-u;return void 0===x||o>=t||0>o||g&&n>=b}function r(){var e=el();return i(e)?l(e):void(y=Er(r,s(e)))}function l(e){return(y=void 0,h&&_)?n(e):(_=f=void 0,v)}function d(){void 0!==y&&fr(y),u=0,_=x=f=y=void 0}function c(){return void 0===y?v:l(el())}function p(){var e=el(),o=i(e);if(_=arguments,f=this,x=e,o){if(void 0===y)return a(x);if(g)return fr(y),y=Er(r,t),n(x)}return void 0===y&&(y=Er(r,t)),v}var u=0,m=!1,g=!1,h=!0,_,f,b,v,y,x;if("function"!=typeof e)throw new ri(ae);return t=Ns(t)||0,vs(o)&&(m=!!o.leading,g="maxWait"in o,b=g?Hi(Ns(o.maxWait)||0,t):b,h="trailing"in o?!!o.trailing:h),p.cancel=d,p.flush=c,p}function ls(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ri(ae);var o=function(){var n=arguments,a=t?t.apply(this,n):n[0],s=o.cache;if(s.has(a))return s.get(a);var i=e.apply(this,n);return o.cache=s.set(a,i)||s,i};return o.cache=new(ls.Cache||Y),o}function ds(e){if("function"!=typeof e)throw new ri(ae);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2]);}return!e.apply(this,t)}}function cs(e,t,o){var n=!0,a=!0;if("function"!=typeof e)throw new ri(ae);return vs(o)&&(n="leading"in o?!!o.leading:n,a="trailing"in o?!!o.trailing:a),rs(e,t,{leading:n,maxWait:t,trailing:a})}function ps(e,t){return e===t||e!==e&&t!==t}function us(e){return null!=e&&bs(e.length)&&!_s(e)}function ms(e){return ys(e)&&us(e)}function gs(e){if(null==e)return!0;if(us(e)&&(pl(e)||"string"==typeof e||"function"==typeof e.splice||ml(e)||bl(e)||cl(e)))return!e.length;var t=Sr(e);if(t==De||t==ze)return!e.size;if(Ea(e))return!ko(e).length;for(var o in e)if(mi.call(e,o))return!1;return!0}function hs(e){if(!ys(e))return!1;var t=Ut(e);return t==Ie||t=="[object DOMException]"||"string"==typeof e.message&&"string"==typeof e.name&&!Ss(e)}function _s(e){if(!vs(e))return!1;var t=Ut(e);return t==Oe||t==Re||t=="[object AsyncFunction]"||t=="[object Proxy]"}function fs(e){return"number"==typeof e&&e==Ts(e)}function bs(e){return"number"==typeof e&&-1<e&&0==e%1&&e<=ke}function vs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ys(e){return null!=e&&"object"==typeof e}function xs(e){return"number"==typeof e||ys(e)&&Ut(e)==Le}function Ss(e){if(!ys(e)||Ut(e)!=Pe)return!1;var t=ki(e);if(null===t)return!0;var o=mi.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&ui.call(o)==fi}function ws(e){return"string"==typeof e||!pl(e)&&ys(e)&&Ut(e)==Fe}function ks(e){return"symbol"==typeof e||ys(e)&&Ut(e)==He}function Es(e){return ys(e)&&Sr(e)==Ue}function Cs(e){if(!e)return[];if(us(e))return ws(e)?Z(e):Sn(e);if(ji&&e[ji])return V(e[ji]());var t=Sr(e),o=t==De?W:t==ze?$:qs;return o(e)}function As(e){if(!e)return 0===e?e:0;if(e=Ns(e),e===we||e===-we){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0}function Ts(e){var t=As(e),o=t%1;return t===t?o?t-o:t:0}function js(e){return e?Et(Ts(e),0,Ce):0}function Ns(e){if("number"==typeof e)return e;if(ks(e))return Ee;if(vs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=vs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(lt,"");var o=/^0b[01]+$/i.test(e);return o||/^0o[0-7]+$/i.test(e)?Zt(e.slice(2),o?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?Ee:+e}function Ms(e){return wn(e,Ls(e))}function Is(e){return null==e?"":Zo(e)}function Os(e,t,o){var n=null==e?void 0:Bt(e,t);return void 0===n?o:n}function Rs(e,t){return null!=e&&ma(e,t,Gt)}function Ds(e){return us(e)?ct(e):ko(e)}function Ls(e){return us(e)?ct(e,!0):Eo(e)}function Ps(e,t){if(null==e)return{};var o=m(na(e),function(e){return[e]});return t=ia(t),Do(e,o,function(e,o){return t(e,o[0])})}function qs(e){return null==e?[]:D(e,Ds(e))}function Bs(e){return Vl(Is(e).toLowerCase())}function zs(e){return e=Is(e),e&&e.replace(/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_o).replace(Ht,"")}function Fs(e,t,n){var a=o.templateSettings;n&&ya(e,t,n)&&(t=void 0),e=Is(e),t=wl({},t,a,Qn);var s=wl({},t.imports,a.imports,Qn),i=Ds(s),r=D(s,i),l=0,d=t.interpolate||ut,c="__p += '",p=si((t.escape||ut).source+"|"+d.source+"|"+(d===st?/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g:ut).source+"|"+(t.evaluate||ut).source+"|$","g"),u="//# sourceURL="+(mi.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++$t+"]")+"\n",m,g;e.replace(p,function(t,o,n,a,s,i){return n||(n=a),c+=e.slice(l,i).replace(/['\n\r\u2028\u2029\\]/g,z),o&&(m=!0,c+="' +\n__e("+o+") +\n'"),s&&(g=!0,c+="';\n"+s+";\n__p += '"),n&&(c+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=i+t.length,t}),c+="';\n";var h=mi.call(t,"variable")&&t.variable;h||(c="with (obj) {\n"+c+"\n}\n"),c=(g?c.replace(/\b__p \+= '';/g,""):c).replace(/\b(__p \+=) '' \+/g,"$1").replace(/(__e\(.*?\)|\b__t\)) \+\n'';/g,"$1;"),c="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(m?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+c+"return __p\n}";var _=Wl(function(){return oi(i,u+"return "+c).apply(void 0,r)});if(_.source=c,hs(_))throw _;return _}function Hs(e,t){var o=30,n="...";if(vs(t)){var a="separator"in t?t.separator:a;o="length"in t?Ts(t.length):o,n="omission"in t?Zo(t.omission):n}e=Is(e);var s=e.length;if(H(e)){var i=Z(e);s=i.length}if(o>=s)return e;var r=o-K(n);if(1>r)return n;var l=i?pn(i,0,r).join(""):e.slice(0,r);if(void 0===a)return l+n;if(i&&(r+=l.length-r),_l(a)){if(e.slice(r).search(a)){var d=l,c;for(a.global||(a=si(a.source,Is(pt.exec(a))+"g")),a.lastIndex=0;c=a.exec(d);)var p=c.index;l=l.slice(0,void 0===p?r:p)}}else if(e.indexOf(Zo(a),r)!=r){var u=l.lastIndexOf(a);-1<u&&(l=l.slice(0,u))}return l+n}function Us(e,t,o){return e=Is(e),t=o?void 0:t,void 0===t?U(e)?oe(e):y(e):e.match(t)||[]}function Vs(e){return function(){return e}}function Ws(e){return e}function Gs(e){return wo("function"==typeof e?e:Ct(e,re))}function Js(e,t,o){var n=Ds(t),a=qt(t,n);null!=o||vs(t)&&(a.length||!n.length)||(o=t,t=e,e=this,a=qt(t,Ds(t)));var s=!(vs(o)&&"chain"in o)||!!o.chain,i=_s(e);return r(a,function(o){var n=t[o];e[o]=n,i&&(e.prototype[o]=function(){var t=this.__chain__;if(s||t){var o=e(this.__wrapped__),a=o.__actions__=Sn(this.__actions__);return a.push({func:n,args:arguments,thisArg:e}),o.__chain__=t,o}return n.apply(e,g([this.value()],arguments))})}),e}function $s(){}function Qs(e){return xa(e)?A(qa(e)):Lo(e)}function Ys(){return[]}function Xs(){return!1}function Ks(e){var t=++gi;return Is(e)+t}t=null==t?oo:vo.defaults(oo.Object(),t,vo.pick(oo,Jt));var Zs=t.Array,ei=t.Date,ti=t.Error,oi=t.Function,ni=t.Math,ai=t.Object,si=t.RegExp,ii=t.String,ri=t.TypeError,li=Zs.prototype,di=oi.prototype,ci=ai.prototype,pi=t["__core-js_shared__"],ui=di.toString,mi=ci.hasOwnProperty,gi=0,hi=function(){var e=/[^.]+$/.exec(pi&&pi.keys&&pi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),_i=ci.toString,fi=ui.call(ai),bi=oo._,vi=si("^"+ui.call(mi).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yi=so?t.Buffer:void 0,xi=t.Symbol,Si=t.Uint8Array,wi=yi?yi.allocUnsafe:void 0,ki=G(ai.getPrototypeOf,ai),Ei=ai.create,Ci=ci.propertyIsEnumerable,Ai=li.splice,Ti=xi?xi.isConcatSpreadable:void 0,ji=xi?xi.iterator:void 0,Ni=xi?xi.toStringTag:void 0,Mi=function(){try{var e=da(ai,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ii=t.clearTimeout!==oo.clearTimeout&&t.clearTimeout,Oi=ei&&ei.now!==oo.Date.now&&ei.now,Ri=t.setTimeout!==oo.setTimeout&&t.setTimeout,Di=ni.ceil,Li=ni.floor,Pi=ai.getOwnPropertySymbols,qi=yi?yi.isBuffer:void 0,Bi=t.isFinite,zi=li.join,Fi=G(ai.keys,ai),Hi=ni.max,Ui=ni.min,Vi=ei.now,Wi=t.parseInt,Gi=ni.random,Ji=li.reverse,$i=da(t,"DataView"),Qi=da(t,"Map"),Yi=da(t,"Promise"),Xi=da(t,"Set"),Ki=da(t,"WeakMap"),Zi=da(ai,"create"),er=Ki&&new Ki,tr={},or=Ba($i),nr=Ba(Qi),ar=Ba(Yi),sr=Ba(Xi),ir=Ba(Ki),rr=xi?xi.prototype:void 0,lr=rr?rr.valueOf:void 0,dr=rr?rr.toString:void 0,cr=function(){function e(){}return function(t){if(!vs(t))return{};if(Ei)return Ei(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:st,variable:"",imports:{_:o}},o.prototype=n.prototype,o.prototype.constructor=o,a.prototype=cr(n.prototype),a.prototype.constructor=a,_.prototype=cr(n.prototype),_.prototype.constructor=_,v.prototype.clear=function(){this.__data__=Zi?Zi(null):{},this.size=0},v.prototype["delete"]=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},v.prototype.get=function(e){var t=this.__data__;if(Zi){var o=t[e];return o===se?void 0:o}return mi.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return Zi?void 0!==t[e]:mi.call(t,e)},v.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Zi&&void 0===t?se:t,this},T.prototype.clear=function(){this.__data__=[],this.size=0},T.prototype["delete"]=function(e){var t=this.__data__,o=vt(t,e);if(0>o)return!1;var n=t.length-1;return o==n?t.pop():Ai.call(t,o,1),--this.size,!0},T.prototype.get=function(e){var t=this.__data__,o=vt(t,e);return 0>o?void 0:t[o][1]},T.prototype.has=function(e){return-1<vt(this.__data__,e)},T.prototype.set=function(e,t){var o=this.__data__,n=vt(o,e);return 0>n?(++this.size,o.push([e,t])):o[n][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new v,map:new(Qi||T),string:new v}},Y.prototype["delete"]=function(e){var t=ra(this,e)["delete"](e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return ra(this,e).get(e)},Y.prototype.has=function(e){return ra(this,e).has(e)},Y.prototype.set=function(e,t){var o=ra(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this},ee.prototype.add=ee.prototype.push=function(e){return this.__data__.set(e,se),this},ee.prototype.has=function(e){return this.__data__.has(e)},te.prototype.clear=function(){this.__data__=new T,this.size=0},te.prototype["delete"]=function(e){var t=this.__data__,o=t["delete"](e);return this.size=t.size,o},te.prototype.get=function(e){return this.__data__.get(e)},te.prototype.has=function(e){return this.__data__.has(e)},te.prototype.set=function(e,t){var o=this.__data__;if(o instanceof T){var n=o.__data__;if(!Qi||n.length<ne-1)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new Y(n)}return o.set(e,t),this.size=o.size,this};var pr=Tn(Lt),ur=Tn(Pt,!0),mr=jn(),gr=jn(!0),hr=er?function(e,t){return er.set(e,t),e}:Ws,_r=Mi?function(e,t){return Mi(e,"toString",{configurable:!0,enumerable:!1,value:Vs(t),writable:!0})}:Ws,fr=Ii||function(e){return oo.clearTimeout(e)},br=Xi&&1/$(new Xi([,-0]))[1]==we?function(e){return new Xi(e)}:$s,vr=er?function(e){return er.get(e)}:$s,yr=Pi?function(e){return null==e?[]:(e=ai(e),c(Pi(e),function(t){return Ci.call(e,t)}))}:Ys,xr=Pi?function(e){for(var t=[];e;)g(t,yr(e)),e=ki(e);return t}:Ys,Sr=Ut;($i&&Sr(new $i(new ArrayBuffer(1)))!=We||Qi&&Sr(new Qi)!=De||Yi&&Sr(Yi.resolve())!=qe||Xi&&Sr(new Xi)!=ze||Ki&&Sr(new Ki)!=Ue)&&(Sr=function(e){var t=Ut(e),o=t==Pe?e.constructor:void 0,n=o?Ba(o):"";if(n)switch(n){case or:return We;case nr:return De;case ar:return qe;case sr:return ze;case ir:return Ue;}return t});var wr=pi?_s:Xs,kr=La(hr),Er=Ri||function(e,t){return oo.setTimeout(e,t)},Cr=La(_r),Ar=function(e){var t=ls(e,function(e){return o.size===500&&o.clear(),e}),o=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,o,n,a){t.push(n?a.replace(/\\(\\)?/g,"$1"):o||e)}),t}),Tr=Ho(function(e,t){return ms(e)?Nt(e,Dt(t,1,ms,!0)):[]}),jr=Ho(function(e,t){var o=Ga(t);return ms(o)&&(o=void 0),ms(e)?Nt(e,Dt(t,1,ms,!0),ia(o,2)):[]}),Nr=Ho(function(e,t){var o=Ga(t);return ms(o)&&(o=void 0),ms(e)?Nt(e,Dt(t,1,ms,!0),void 0,o):[]}),Mr=Ho(function(e){var t=m(e,ln);return t.length&&t[0]===e[0]?eo(t):[]}),Ir=Ho(function(e){var t=Ga(e),o=m(e,ln);return t===Ga(o)?t=void 0:o.pop(),o.length&&o[0]===e[0]?eo(o,ia(t,2)):[]}),Or=Ho(function(e){var t=Ga(e),o=m(e,ln);return t="function"==typeof t?t:void 0,t&&o.pop(),o.length&&o[0]===e[0]?eo(o,void 0,t):[]}),Rr=Ho(Ja),Dr=ta(function(e,t){var o=null==e?0:e.length,n=kt(e,t);return qo(e,m(t,function(e){return va(e,o)?+e:e}).sort(bn)),n}),Lr=Ho(function(e){return en(Dt(e,1,ms,!0))}),Pr=Ho(function(e){var t=Ga(e);return ms(t)&&(t=void 0),en(Dt(e,1,ms,!0),ia(t,2))}),qr=Ho(function(e){var t=Ga(e);return t="function"==typeof t?t:void 0,en(Dt(e,1,ms,!0),void 0,t)}),Br=Ho(function(e,t){return ms(e)?Nt(e,t):[]}),zr=Ho(function(e){return sn(c(e,ms))}),Fr=Ho(function(e){var t=Ga(e);return ms(t)&&(t=void 0),sn(c(e,ms),ia(t,2))}),Hr=Ho(function(e){var t=Ga(e);return t="function"==typeof t?t:void 0,sn(c(e,ms),void 0,t)}),Ur=Ho(Qa),Vr=Ho(function(e){var t=e.length,o=1<t?e[t-1]:void 0;return o="function"==typeof o?(e.pop(),o):void 0,Ya(e,o)}),Wr=ta(function(e){var t=e.length,o=t?e[0]:0,n=this.__wrapped__,s=function(t){return kt(t,e)};return 1<t||this.__actions__.length||!(n instanceof _)||!va(o)?this.thru(s):(n=n.slice(o,+o+(t?1:0)),n.__actions__.push({func:Ka,args:[s],thisArg:void 0}),new a(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e}))}),Gr=Cn(function(e,t,o){mi.call(e,o)?++e[o]:wt(e,o,1)}),Jr=Dn(Ha),$r=Dn(Ua),Qr=Cn(function(e,t,o){mi.call(e,o)?e[o].push(t):wt(e,o,[t])}),Yr=Ho(function(e,t,o){var n=-1,a=us(e)?Zs(e.length):[];return pr(e,function(e){a[++n]="function"==typeof t?s(t,e,o):no(e,t,o)}),a}),Xr=Cn(function(e,t,o){wt(e,o,t)}),Kr=Cn(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]}),Zr=Ho(function(e,t){if(null==e)return[];var o=t.length;return 1<o&&ya(e,t[0],t[1])?t=[]:2<o&&ya(t[0],t[1],t[2])&&(t=[t[0]]),Oo(e,Dt(t,1),[])}),el=Oi||function(){return oo.Date.now()},tl=Ho(function(e,t,o){var n=ue;if(o.length){var a=J(o,sa(tl));n|=fe}return $n(e,n,t,o,a)}),ol=Ho(function(e,t,o){var n=ue|me;if(o.length){var a=J(o,sa(ol));n|=fe}return $n(t,n,e,o,a)}),nl=Ho(function(e,t){return jt(e,1,t)}),al=Ho(function(e,t,o){return jt(e,Ns(t)||0,o)});ls.Cache=Y;var sl=Ho(function(e,t){t=1==t.length&&pl(t[0])?m(t[0],R(ia())):m(Dt(t,1),R(ia()));var o=t.length;return Ho(function(n){for(var a=-1,i=Ui(n.length,o);++a<i;)n[a]=t[a].call(this,n[a]);return s(e,this,n)})}),il=Ho(function(e,t){var o=J(t,sa(il));return $n(e,fe,void 0,t,o)}),rl=Ho(function(e,t){var o=J(t,sa(rl));return $n(e,be,void 0,t,o)}),ll=ta(function(e,t){return $n(e,ye,void 0,void 0,void 0,t)}),dl=Vn(Vt),gt=Vn(function(e,t){return e>=t}),cl=ao(function(){return arguments}())?ao:function(e){return ys(e)&&mi.call(e,"callee")&&!Ci.call(e,"callee")},pl=Zs.isArray,ul=lo?R(lo):function(e){return ys(e)&&Ut(e)==Ve},ml=qi||Xs,gl=co?R(co):function(e){return ys(e)&&Ut(e)==Me},hl=po?R(po):ho,_l=uo?R(uo):function(e){return ys(e)&&Ut(e)==Be},fl=mo?R(mo):So,bl=go?R(go):function(e){return ys(e)&&bs(e.length)&&!!Qt[Ut(e)]},vl=Vn(Co),yl=Vn(function(e,t){return e<=t}),xl=An(function(e,t){if(Ea(t)||us(t))return void wn(t,Ds(t),e);for(var o in t)mi.call(t,o)&&bt(e,o,t[o])}),Sl=An(function(e,t){wn(t,Ls(t),e)}),wl=An(function(e,t,o,n){wn(t,Ls(t),e,n)}),kl=An(function(e,t,o,n){wn(t,Ds(t),e,n)}),El=ta(kt),Cl=Ho(function(e,t){e=ai(e);var o=-1,n=t.length,a=2<n?t[2]:void 0;for(a&&ya(t[0],t[1],a)&&(n=1);++o<n;)for(var s=t[o],i=Ls(s),r=-1,l=i.length;++r<l;){var d=i[r],c=e[d];(void 0===c||ps(c,ci[d])&&!mi.call(e,d))&&(e[d]=s[d])}return e}),Al=Ho(function(e){return e.push(void 0,Yn),s(Il,void 0,e)}),Tl=qn(function(e,t,o){null!=t&&"function"!=typeof t.toString&&(t=_i.call(t)),e[t]=o},Vs(Ws)),jl=qn(function(e,t,o){null!=t&&"function"!=typeof t.toString&&(t=_i.call(t)),mi.call(e,t)?e[t].push(o):e[t]=[o]},ia),Nl=Ho(no),Ml=An(function(e,t,o){No(e,t,o)}),Il=An(function(e,t,o,n){No(e,t,o,n)}),Ol=ta(function(e,t){var o={};if(null==e)return o;var n=!1;t=m(t,function(t){return t=cn(t,e),n||(n=1<t.length),t}),wn(e,na(e),o),n&&(o=Ct(o,re|le|de,Xn));for(var a=t.length;a--;)tn(o,t[a]);return o}),Rl=ta(function(e,t){return null==e?{}:Ro(e,t)}),Dl=Jn(Ds),Ll=Jn(Ls),Pl=In(function(e,t,o){return t=t.toLowerCase(),e+(o?Bs(t):t)}),ql=In(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),Bl=In(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),zl=Mn("toLowerCase"),Fl=In(function(e,t,o){return e+(o?"_":"")+t.toLowerCase()}),Hl=In(function(e,t,o){return e+(o?" ":"")+Vl(t)}),Ul=In(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Vl=Mn("toUpperCase"),Wl=Ho(function(e,t){try{return s(e,void 0,t)}catch(t){return hs(t)?t:new ti(t)}}),Gl=ta(function(e,t){return r(t,function(t){t=qa(t),wt(e,t,tl(e[t],e))}),e}),Jl=Ln(),$l=Ln(!0),Ql=Ho(function(e,t){return function(o){return no(o,e,t)}}),Yl=Ho(function(e,t){return function(o){return no(e,o,t)}}),Xl=zn(m),Kl=zn(d),Zl=zn(b),ed=Un(),td=Un(!0),od=Bn(function(e,t){return e+t},0),nd=Gn("ceil"),ad=Bn(function(e,t){return e/t},1),sd=Gn("floor"),id=Bn(function(e,t){return e*t},1),rd=Gn("round"),ld=Bn(function(e,t){return e-t},0);return o.after=function(e,t){if("function"!=typeof t)throw new ri(ae);return e=Ts(e),function(){if(1>--e)return t.apply(this,arguments)}},o.ary=ns,o.assign=xl,o.assignIn=Sl,o.assignInWith=wl,o.assignWith=kl,o.at=El,o.before=as,o.bind=tl,o.bindAll=Gl,o.bindKey=ol,o.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return pl(e)?e:[e]},o.chain=Xa,o.chunk=function(e,t,o){t=(o?ya(e,t,o):void 0===t)?1:Hi(Ts(t),0);var n=null==e?0:e.length;if(!n||1>t)return[];for(var a=0,s=0,i=Zs(Di(n/t));a<n;)i[s++]=Jo(e,a,a+=t);return i},o.compact=function(e){for(var t=-1,o=null==e?0:e.length,n=0,a=[],s;++t<o;)s=e[t],s&&(a[n++]=s);return a},o.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Zs(e-1),o=arguments[0],n=e;n--;)t[n-1]=arguments[n];return g(pl(o)?Sn(o):[o],Dt(t,1))},o.cond=function(e){var t=null==e?0:e.length,o=ia();return e=t?m(e,function(e){if("function"!=typeof e[1])throw new ri(ae);return[o(e[0]),e[1]]}):[],Ho(function(o){for(var n=-1,a;++n<t;)if(a=e[n],s(a[0],this,o))return s(a[1],this,o)})},o.conforms=function(e){return At(Ct(e,re))},o.constant=Vs,o.countBy=Gr,o.create=function(e,t){var o=cr(e);return null==t?o:xt(o,t)},o.curry=ss,o.curryRight=is,o.debounce=rs,o.defaults=Cl,o.defaultsDeep=Al,o.defer=nl,o.delay=al,o.difference=Tr,o.differenceBy=jr,o.differenceWith=Nr,o.drop=function(e,t,o){var a=null==e?0:e.length;return a?(t=o||void 0===t?1:Ts(t),Jo(e,0>t?0:t,a)):[]},o.dropRight=function(e,t,o){var a=null==e?0:e.length;return a?(t=o||void 0===t?1:Ts(t),t=a-t,Jo(e,0,0>t?0:t)):[]},o.dropRightWhile=function(e,t){return e&&e.length?nn(e,ia(t,3),!0,!0):[]},o.dropWhile=function(e,t){return e&&e.length?nn(e,ia(t,3),!0):[]},o.fill=function(e,t,o,n){var a=null==e?0:e.length;return a?(o&&"number"!=typeof o&&ya(e,t,o)&&(o=0,n=a),Ot(e,t,o,n)):[]},o.filter=function(e,t){var o=pl(e)?c:Rt;return o(e,ia(t,3))},o.flatMap=function(e,t){return Dt(ts(e,t),1)},o.flatMapDeep=function(e,t){return Dt(ts(e,t),we)},o.flatMapDepth=function(e,t,o){return o=void 0===o?1:Ts(o),Dt(ts(e,t),o)},o.flatten=Va,o.flattenDeep=function(e){var t=null==e?0:e.length;return t?Dt(e,we):[]},o.flattenDepth=function(e,t){var o=null==e?0:e.length;return o?(t=void 0===t?1:Ts(t),Dt(e,t)):[]},o.flip=function(e){return $n(e,xe)},o.flow=Jl,o.flowRight=$l,o.fromPairs=function(e){for(var t=-1,o=null==e?0:e.length,n={},a;++t<o;)a=e[t],n[a[0]]=a[1];return n},o.functions=function(e){return null==e?[]:qt(e,Ds(e))},o.functionsIn=function(e){return null==e?[]:qt(e,Ls(e))},o.groupBy=Qr,o.initial=function(e){var t=null==e?0:e.length;return t?Jo(e,0,-1):[]},o.intersection=Mr,o.intersectionBy=Ir,o.intersectionWith=Or,o.invert=Tl,o.invertBy=jl,o.invokeMap=Yr,o.iteratee=Gs,o.keyBy=Xr,o.keys=Ds,o.keysIn=Ls,o.map=ts,o.mapKeys=function(e,t){var o={};return t=ia(t,3),Lt(e,function(e,n,a){wt(o,t(e,n,a),e)}),o},o.mapValues=function(e,t){var o={};return t=ia(t,3),Lt(e,function(e,n,a){wt(o,n,t(e,n,a))}),o},o.matches=function(e){return To(Ct(e,re))},o.matchesProperty=function(e,t){return jo(e,Ct(t,re))},o.memoize=ls,o.merge=Ml,o.mergeWith=Il,o.method=Ql,o.methodOf=Yl,o.mixin=Js,o.negate=ds,o.nthArg=function(e){return e=Ts(e),Ho(function(t){return Io(t,e)})},o.omit=Ol,o.omitBy=function(e,t){return Ps(e,ds(ia(t)))},o.once=function(e){return as(2,e)},o.orderBy=function(e,t,o,n){return null==e?[]:(pl(t)||(t=null==t?[]:[t]),o=n?void 0:o,pl(o)||(o=null==o?[]:[o]),Oo(e,t,o))},o.over=Xl,o.overArgs=sl,o.overEvery=Kl,o.overSome=Zl,o.partial=il,o.partialRight=rl,o.partition=Kr,o.pick=Rl,o.pickBy=Ps,o.property=Qs,o.propertyOf=function(e){return function(t){return null==e?void 0:Bt(e,t)}},o.pull=Rr,o.pullAll=Ja,o.pullAllBy=function(e,t,o){return e&&e.length&&t&&t.length?Po(e,t,ia(o,2)):e},o.pullAllWith=function(e,t,o){return e&&e.length&&t&&t.length?Po(e,t,void 0,o):e},o.pullAt=Dr,o.range=ed,o.rangeRight=td,o.rearg=ll,o.reject=function(e,t){var o=pl(e)?c:Rt;return o(e,ds(ia(t,3)))},o.remove=function(e,t){var o=[];if(!(e&&e.length))return o;var n=-1,a=[],s=e.length;for(t=ia(t,3);++n<s;){var i=e[n];t(i,n,e)&&(o.push(i),a.push(n))}return qo(e,a),o},o.rest=function(e,t){if("function"!=typeof e)throw new ri(ae);return t=void 0===t?t:Ts(t),Ho(e,t)},o.reverse=$a,o.sampleSize=function(e,t,o){t=(o?ya(e,t,o):void 0===t)?1:Ts(t);var a=pl(e)?ht:Vo;return a(e,t)},o.set=function(e,t,o){return null==e?e:Wo(e,t,o)},o.setWith=function(e,t,o,n){return n="function"==typeof n?n:void 0,null==e?e:Wo(e,t,o,n)},o.shuffle=function(e){var t=pl(e)?_t:Go;return t(e)},o.slice=function(e,t,o){var n=null==e?0:e.length;return n?(o&&"number"!=typeof o&&ya(e,t,o)?(t=0,o=n):(t=null==t?0:Ts(t),o=void 0===o?n:Ts(o)),Jo(e,t,o)):[]},o.sortBy=Zr,o.sortedUniq=function(e){return e&&e.length?Xo(e):[]},o.sortedUniqBy=function(e,t){return e&&e.length?Xo(e,ia(t,2)):[]},o.split=function(e,t,o){return(o&&"number"!=typeof o&&ya(e,t,o)&&(t=o=void 0),o=void 0===o?Ce:o>>>0,!o)?[]:(e=Is(e),e&&("string"==typeof t||null!=t&&!_l(t))&&(t=Zo(t),!t&&H(e))?pn(Z(e),0,o):e.split(t,o))},o.spread=function(e,t){if("function"!=typeof e)throw new ri(ae);return t=null==t?0:Hi(Ts(t),0),Ho(function(o){var n=o[t],a=pn(o,0,t);return n&&g(a,n),s(e,this,a)})},o.tail=function(e){var t=null==e?0:e.length;return t?Jo(e,1,t):[]},o.take=function(e,t,o){return e&&e.length?(t=o||void 0===t?1:Ts(t),Jo(e,0,0>t?0:t)):[]},o.takeRight=function(e,t,o){var a=null==e?0:e.length;return a?(t=o||void 0===t?1:Ts(t),t=a-t,Jo(e,0>t?0:t,a)):[]},o.takeRightWhile=function(e,t){return e&&e.length?nn(e,ia(t,3),!1,!0):[]},o.takeWhile=function(e,t){return e&&e.length?nn(e,ia(t,3)):[]},o.tap=function(e,t){return t(e),e},o.throttle=cs,o.thru=Ka,o.toArray=Cs,o.toPairs=Dl,o.toPairsIn=Ll,o.toPath=function(e){return pl(e)?m(e,qa):ks(e)?[e]:Sn(Ar(Is(e)))},o.toPlainObject=Ms,o.transform=function(e,t,o){var n=pl(e),a=n||ml(e)||bl(e);if(t=ia(t,4),null==o){var s=e&&e.constructor;o=a?n?new s:[]:vs(e)?_s(s)?cr(ki(e)):{}:{}}return(a?r:Lt)(e,function(e,n,a){return t(o,e,n,a)}),o},o.unary=function(e){return ns(e,1)},o.union=Lr,o.unionBy=Pr,o.unionWith=qr,o.uniq=function(e){return e&&e.length?en(e):[]},o.uniqBy=function(e,t){return e&&e.length?en(e,ia(t,2)):[]},o.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?en(e,void 0,t):[]},o.unset=function(e,t){return null==e||tn(e,t)},o.unzip=Qa,o.unzipWith=Ya,o.update=function(e,t,o){return null==e?e:on(e,t,dn(o))},o.updateWith=function(e,t,o,n){return n="function"==typeof n?n:void 0,null==e?e:on(e,t,dn(o),n)},o.values=qs,o.valuesIn=function(e){return null==e?[]:D(e,Ls(e))},o.without=Br,o.words=Us,o.wrap=function(e,t){return il(dn(t),e)},o.xor=zr,o.xorBy=Fr,o.xorWith=Hr,o.zip=Ur,o.zipObject=function(e,t){return rn(e||[],t||[],bt)},o.zipObjectDeep=function(e,t){return rn(e||[],t||[],Wo)},o.zipWith=Vr,o.entries=Dl,o.entriesIn=Ll,o.extend=Sl,o.extendWith=wl,Js(o,o),o.add=od,o.attempt=Wl,o.camelCase=Pl,o.capitalize=Bs,o.ceil=nd,o.clamp=function(e,t,o){return void 0===o&&(o=t,t=void 0),void 0!==o&&(o=Ns(o),o=o===o?o:0),void 0!==t&&(t=Ns(t),t=t===t?t:0),Et(Ns(e),t,o)},o.clone=function(e){return Ct(e,de)},o.cloneDeep=function(e){return Ct(e,re|de)},o.cloneDeepWith=function(e,t){return t="function"==typeof t?t:void 0,Ct(e,re|de,t)},o.cloneWith=function(e,t){return t="function"==typeof t?t:void 0,Ct(e,de,t)},o.conformsTo=function(e,t){return null==t||Tt(e,t,Ds(t))},o.deburr=zs,o.defaultTo=function(e,t){return null==e||e!==e?t:e},o.divide=ad,o.endsWith=function(e,t,o){e=Is(e),t=Zo(t);var n=e.length;o=void 0===o?n:Et(Ts(o),0,n);var a=o;return o-=t.length,0<=o&&e.slice(o,a)==t},o.eq=ps,o.escape=function(e){return e=Is(e),e&&at.test(e)?e.replace(ot,fo):e},o.escapeRegExp=function(e){return e=Is(e),e&&rt.test(e)?e.replace(it,"\\$&"):e},o.every=function(e,t,o){var n=pl(e)?d:Mt;return o&&ya(e,t,o)&&(t=void 0),n(e,ia(t,3))},o.find=Jr,o.findIndex=Ha,o.findKey=function(e,t){return x(e,ia(t,3),Lt)},o.findLast=$r,o.findLastIndex=Ua,o.findLastKey=function(e,t){return x(e,ia(t,3),Pt)},o.floor=sd,o.forEach=Za,o.forEachRight=es,o.forIn=function(e,t){return null==e?e:mr(e,ia(t,3),Ls)},o.forInRight=function(e,t){return null==e?e:gr(e,ia(t,3),Ls)},o.forOwn=function(e,t){return e&&Lt(e,ia(t,3))},o.forOwnRight=function(e,t){return e&&Pt(e,ia(t,3))},o.get=Os,o.gt=dl,o.gte=gt,o.has=function(e,t){return null!=e&&ma(e,t,Wt)},o.hasIn=Rs,o.head=Wa,o.identity=Ws,o.includes=function(e,t,o,n){e=us(e)?e:qs(e),o=o&&!n?Ts(o):0;var a=e.length;return 0>o&&(o=Hi(a+o,0)),ws(e)?o<=a&&-1<e.indexOf(t,o):!!a&&-1<w(e,t,o)},o.indexOf=function(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=null==o?0:Ts(o);return 0>a&&(a=Hi(n+a,0)),w(e,t,a)},o.inRange=function(e,t,o){return t=As(t),void 0===o?(o=t,t=0):o=As(o),e=Ns(e),Xt(e,t,o)},o.invoke=Nl,o.isArguments=cl,o.isArray=pl,o.isArrayBuffer=ul,o.isArrayLike=us,o.isArrayLikeObject=ms,o.isBoolean=function(e){return!0===e||!1===e||ys(e)&&Ut(e)==Ne},o.isBuffer=ml,o.isDate=gl,o.isElement=function(e){return ys(e)&&1===e.nodeType&&!Ss(e)},o.isEmpty=gs,o.isEqual=function(e,t){return io(e,t)},o.isEqualWith=function(e,t,o){o="function"==typeof o?o:void 0;var n=o?o(e,t):void 0;return void 0===n?io(e,t,void 0,o):!!n},o.isError=hs,o.isFinite=function(e){return"number"==typeof e&&Bi(e)},o.isFunction=_s,o.isInteger=fs,o.isLength=bs,o.isMap=hl,o.isMatch=function(e,t){return e===t||yo(e,t,la(t))},o.isMatchWith=function(e,t,o){return o="function"==typeof o?o:void 0,yo(e,t,la(t),o)},o.isNaN=function(e){return xs(e)&&e!=+e},o.isNative=function(e){if(wr(e))throw new ti("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xo(e)},o.isNil=function(e){return null==e},o.isNull=function(e){return null===e},o.isNumber=xs,o.isObject=vs,o.isObjectLike=ys,o.isPlainObject=Ss,o.isRegExp=_l,o.isSafeInteger=function(e){return fs(e)&&e>=-ke&&e<=ke},o.isSet=fl,o.isString=ws,o.isSymbol=ks,o.isTypedArray=bl,o.isUndefined=function(e){return void 0===e},o.isWeakMap=Es,o.isWeakSet=function(e){return ys(e)&&Ut(e)=="[object WeakSet]"},o.join=function(e,t){return null==e?"":zi.call(e,t)},o.kebabCase=ql,o.last=Ga,o.lastIndexOf=function(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=n;return void 0!==o&&(a=Ts(o),a=0>a?Hi(n+a,0):Ui(a,n-1)),t===t?X(e,t,a):S(e,E,a,!0)},o.lowerCase=Bl,o.lowerFirst=zl,o.lt=vl,o.lte=yl,o.max=function(e){return e&&e.length?It(e,Ws,Vt):void 0},o.maxBy=function(e,t){return e&&e.length?It(e,ia(t,2),Vt):void 0},o.mean=function(e){return C(e,Ws)},o.meanBy=function(e,t){return C(e,ia(t,2))},o.min=function(e){return e&&e.length?It(e,Ws,Co):void 0},o.minBy=function(e,t){return e&&e.length?It(e,ia(t,2),Co):void 0},o.stubArray=Ys,o.stubFalse=Xs,o.stubObject=function(){return{}},o.stubString=function(){return""},o.stubTrue=function(){return!0},o.multiply=id,o.nth=function(e,t){return e&&e.length?Io(e,Ts(t)):void 0},o.noConflict=function(){return oo._===this&&(oo._=bi),this},o.noop=$s,o.now=el,o.pad=function(e,t,o){e=Is(e),t=Ts(t);var n=t?K(e):0;if(!t||n>=t)return e;var a=(t-n)/2;return Fn(Li(a),o)+e+Fn(Di(a),o)},o.padEnd=function(e,t,o){e=Is(e),t=Ts(t);var n=t?K(e):0;return t&&n<t?e+Fn(t-n,o):e},o.padStart=function(e,t,o){e=Is(e),t=Ts(t);var n=t?K(e):0;return t&&n<t?Fn(t-n,o)+e:e},o.parseInt=function(e,t,o){return o||null==t?t=0:t&&(t=+t),Wi(Is(e).replace(dt,""),t||0)},o.random=function(e,t,o){if(o&&"boolean"!=typeof o&&ya(e,t,o)&&(t=o=void 0),void 0===o&&("boolean"==typeof t?(o=t,t=void 0):"boolean"==typeof e&&(o=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=As(e),void 0===t?(t=e,e=0):t=As(t)),e>t){var n=e;e=t,t=n}if(o||e%1||t%1){var a=Gi();return Ui(e+a*(t-e+Kt("1e-"+((a+"").length-1))),t)}return Bo(e,t)},o.reduce=function(e,t,o){var n=pl(e)?h:j,a=3>arguments.length;return n(e,ia(t,4),o,a,pr)},o.reduceRight=function(e,t,o){var n=pl(e)?f:j,a=3>arguments.length;return n(e,ia(t,4),o,a,ur)},o.repeat=function(e,t,o){return t=(o?ya(e,t,o):void 0===t)?1:Ts(t),Fo(Is(e),t)},o.replace=function(){var e=arguments,t=Is(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},o.result=function(e,t,o){t=cn(t,e);var n=-1,a=t.length;for(a||(a=1,e=void 0);++n<a;){var s=null==e?void 0:e[qa(t[n])];void 0===s&&(n=a,s=o),e=_s(s)?s.call(e):s}return e},o.round=rd,o.runInContext=e,o.sample=function(e){var t=pl(e)?mt:Uo;return t(e)},o.size=os,o.snakeCase=Fl,o.some=function(e,t,o){var n=pl(e)?b:$o;return o&&ya(e,t,o)&&(t=void 0),n(e,ia(t,3))},o.sortedIndex=function(e,t){return Qo(e,t)},o.sortedIndexBy=function(e,t,o){return Yo(e,t,ia(o,2))},o.sortedIndexOf=function(e,t){var o=null==e?0:e.length;if(o){var n=Qo(e,t);if(n<o&&ps(e[n],t))return n}return-1},o.sortedLastIndex=function(e,t){return Qo(e,t,!0)},o.sortedLastIndexBy=function(e,t,o){return Yo(e,t,ia(o,2),!0)},o.sortedLastIndexOf=function(e,t){var o=null==e?0:e.length;if(o){var n=Qo(e,t,!0)-1;if(ps(e[n],t))return n}return-1},o.startCase=Hl,o.startsWith=function(e,t,o){return e=Is(e),o=null==o?0:Et(Ts(o),0,e.length),t=Zo(t),e.slice(o,o+t.length)==t},o.subtract=ld,o.sum=function(e){return e&&e.length?M(e,Ws):0},o.sumBy=function(e,t){return e&&e.length?M(e,ia(t,2)):0},o.template=Fs,o.times=function(e,t){if(e=Ts(e),1>e||e>ke)return[];var o=Ce,a=Ui(e,Ce);t=ia(t),e-=Ce;for(var s=I(a,t);++o<e;)t(o);return s},o.toFinite=As,o.toInteger=Ts,o.toLength=js,o.toLower=function(e){return Is(e).toLowerCase()},o.toNumber=Ns,o.toSafeInteger=function(e){return e?Et(Ts(e),-ke,ke):0===e?e:0},o.toString=Is,o.toUpper=function(e){return Is(e).toUpperCase()},o.trim=function(e,t,o){if(e=Is(e),e&&(o||void 0===t))return e.replace(lt,"");if(!e||!(t=Zo(t)))return e;var n=Z(e),a=Z(t),s=P(n,a),i=q(n,a)+1;return pn(n,s,i).join("")},o.trimEnd=function(e,t,o){if(e=Is(e),e&&(o||void 0===t))return e.replace(/\s+$/,"");if(!e||!(t=Zo(t)))return e;var n=Z(e),a=q(n,Z(t))+1;return pn(n,0,a).join("")},o.trimStart=function(e,t,o){if(e=Is(e),e&&(o||void 0===t))return e.replace(dt,"");if(!e||!(t=Zo(t)))return e;var n=Z(e),a=P(n,Z(t));return pn(n,a).join("")},o.truncate=Hs,o.unescape=function(e){return e=Is(e),e&&nt.test(e)?e.replace(tt,bo):e},o.uniqueId=Ks,o.upperCase=Ul,o.upperFirst=Vl,o.each=Za,o.eachRight=es,o.first=Wa,Js(o,function(){var e={};return Lt(o,function(t,n){mi.call(o.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),o.VERSION="4.17.15",r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){o[e].placeholder=o}),r(["drop","take"],function(e,t){_.prototype[e]=function(o){o=void 0===o?1:Hi(Ts(o),0);var a=this.__filtered__&&!t?new _(this):this.clone();return a.__filtered__?a.__takeCount__=Ui(o,a.__takeCount__):a.__views__.push({size:Ui(o,Ce),type:e+(0>a.__dir__?"Right":"")}),a},_.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),r(["filter","map","takeWhile"],function(e,t){var o=t+1;_.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ia(e,3),type:o}),t.__filtered__=t.__filtered__||o==Se||o==3,t}}),r(["head","last"],function(e,t){var o="take"+(t?"Right":"");_.prototype[e]=function(){return this[o](1).value()[0]}}),r(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");_.prototype[e]=function(){return this.__filtered__?new _(this):this[o](1)}}),_.prototype.compact=function(){return this.filter(Ws)},_.prototype.find=function(e){return this.filter(e).head()},_.prototype.findLast=function(e){return this.reverse().find(e)},_.prototype.invokeMap=Ho(function(e,t){return"function"==typeof e?new _(this):this.map(function(o){return no(o,e,t)})}),_.prototype.reject=function(e){return this.filter(ds(ia(e)))},_.prototype.slice=function(e,t){e=Ts(e);var o=this;return o.__filtered__&&(0<e||0>t)?new _(o):(0>e?o=o.takeRight(-e):e&&(o=o.drop(e)),void 0!==t&&(t=Ts(t),o=0>t?o.dropRight(-t):o.take(t-e)),o)},_.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_.prototype.toArray=function(){return this.take(Ce)},Lt(_.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),s=/^(?:head|last)$/.test(t),i=o[s?"take"+("last"==t?"Right":""):t],r=s||/^find/.test(t);i&&(o.prototype[t]=function(){var t=this.__wrapped__,l=s?[1]:arguments,d=t instanceof _,c=l[0],p=d||pl(t),u=function(e){var t=i.apply(o,g([e],l));return s&&m?t[0]:t};p&&n&&"function"==typeof c&&1!=c.length&&(d=p=!1);var m=this.__chain__,h=!!this.__actions__.length,f=r&&!m,b=d&&!h;if(!r&&p){t=b?t:new _(this);var v=e.apply(t,l);return v.__actions__.push({func:Ka,args:[u],thisArg:void 0}),new a(v,m)}return f&&b?e.apply(this,l):(v=this.thru(u),f?s?v.value()[0]:v.value():v)})}),r(["pop","push","shift","sort","splice","unshift"],function(e){var t=li[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);o.prototype[e]=function(){var e=arguments;if(a&&!this.__chain__){var o=this.value();return t.apply(pl(o)?o:[],e)}return this[n](function(o){return t.apply(pl(o)?o:[],e)})}}),Lt(_.prototype,function(e,t){var n=o[t];if(n){var a=n.name+"";mi.call(tr,a)||(tr[a]=[]),tr[a].push({name:t,func:n})}}),tr[Pn(void 0,me).name]=[{name:"wrapper",func:void 0}],_.prototype.clone=function(){var e=new _(this.__wrapped__);return e.__actions__=Sn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Sn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Sn(this.__views__),e},_.prototype.reverse=function(){if(this.__filtered__){var e=new _(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},_.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,o=pl(e),n=0>t,a=o?e.length:0,s=pa(0,a,this.__views__),i=s.start,r=s.end,l=r-i,d=n?r:i-1,c=this.__iteratees__,p=c.length,u=0,m=Ui(l,this.__takeCount__);if(!o||!n&&a==l&&m==l)return an(e,this.__actions__);var g=[];outer:for(;l--&&u<m;){d+=t;for(var h=-1,_=e[d];++h<p;){var f=c[h],b=f.iteratee,v=f.type,y=b(_);if(v==2)_=y;else if(!y)if(v==Se)continue outer;else break outer}g[u++]=_}return g},o.prototype.at=Wr,o.prototype.chain=function(){return Xa(this)},o.prototype.commit=function(){return new a(this.value(),this.__chain__)},o.prototype.next=function(){void 0===this.__values__&&(this.__values__=Cs(this.value()));var e=this.__index__>=this.__values__.length,t=e?void 0:this.__values__[this.__index__++];return{done:e,value:t}},o.prototype.plant=function(e){for(var t=this,o,a;t instanceof n;){a=Fa(t),a.__index__=0,a.__values__=void 0,o?s.__wrapped__=a:o=a;var s=a;t=t.__wrapped__}return s.__wrapped__=e,o},o.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof _){var t=e;return this.__actions__.length&&(t=new _(this)),t=t.reverse(),t.__actions__.push({func:Ka,args:[$a],thisArg:void 0}),new a(t,this.__chain__)}return this.thru($a)},o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return an(this.__wrapped__,this.__actions__)},o.prototype.first=o.prototype.head,ji&&(o.prototype[ji]=function(){return this}),o}();oo._=vo,a=function(){return vo}.call(t,o,t,n),!(a!==void 0&&(n.exports=a))}).call(this)}).call(this,o(14),o(27)(e))},function(e,t,o){var n=o(448),a=o(108),s=/[&<>"']/g,i=RegExp(s.source);e.exports=function(e){return e=a(e),e&&i.test(e)?e.replace(s,n):e}},function(e,t,o){var n,a;n=[o(0)],a=function(e){return e.noConflict()}.apply(t,n),!(a!==void 0&&(e.exports=a))},function(e,t,o){var n;(function(a){function s(e,t,o,n){var a=t&&t.ownerDocument,s=t?t.nodeType:9,r,l,d,c,p,u,g;if(o=o||[],"string"!=typeof e||!e||1!==s&&9!==s&&11!==s)return o;if(!n&&((t?t.ownerDocument||t:A)!==ue&&pe(t),t=t||ue,ge)){if(11!==s&&(p=G.exec(e)))if(!(r=p[1])){if(p[2])return B.apply(o,t.getElementsByTagName(e)),o;if((r=p[3])&&te.getElementsByClassName&&t.getElementsByClassName)return B.apply(o,t.getElementsByClassName(r)),o}else if(9===s){if(!(d=t.getElementById(r)))return o;if(d.id===r)return o.push(d),o}else if(a&&(d=a.getElementById(r))&&be(t,d)&&d.id===r)return o.push(d),o;if(te.qsa&&!O[e+" "]&&(!he||!he.test(e))&&(1!==s||"object"!==t.nodeName.toLowerCase())){if(g=e,a=t,1===s&&U.test(e)){for((c=t.getAttribute("id"))?c=c.replace(Y,X):t.setAttribute("id",c=C),u=se(e),l=u.length;l--;)u[l]="#"+c+" "+b(u[l]);g=u.join(","),a=J.test(e)&&_(t.parentNode)||t}try{return B.apply(o,a.querySelectorAll(g)),o}catch(t){O(e,!0)}finally{c===C&&t.removeAttribute("id")}}}return re(e.replace(H,"$1"),t,o,n)}function r(){function e(o,n){return t.push(o+" ")>oe.cacheLength&&delete e[t.shift()],e[o+" "]=n}var t=[];return e}function l(e){return e[C]=!0,e}function d(e){var t=ue.createElement("fieldset");try{return!!e(t)}catch(t){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function c(e,t){for(var o=e.split("|"),n=o.length;n--;)oe.attrHandle[o[n]]=t}function p(e,t){var o=t&&e,n=o&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(o)for(;o=o.nextSibling;)if(o===t)return-1;return e?1:-1}function u(e){return function(t){var o=t.nodeName.toLowerCase();return"input"===o&&t.type===e}}function m(e){return function(t){var o=t.nodeName.toLowerCase();return("input"===o||"button"===o)&&t.type===e}}function g(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Z(t)===e:t.disabled===e:!!("label"in t)&&t.disabled===e}}function h(e){return l(function(t){return t=+t,l(function(o,n){for(var a=e([],o.length,t),s=a.length,r;s--;)o[r=a[s]]&&(o[r]=!(n[r]=o[r]))})})}function _(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function b(e){for(var t=0,o=e.length,n="";t<o;t++)n+=e[t].value;return n}function v(e,t,o){var n=t.dir,a=t.next,s=a||n,i=o&&"parentNode"===s,r=j++;return t.first?function(t,o,a){for(;t=t[n];)if(1===t.nodeType||i)return e(t,o,a);return!1}:function(t,o,l){var d=[T,r],c,p,u;if(l){for(;t=t[n];)if((1===t.nodeType||i)&&e(t,o,l))return!0;}else for(;t=t[n];)if(1===t.nodeType||i)if(u=t[C]||(t[C]={}),p=u[t.uniqueID]||(u[t.uniqueID]={}),a&&a===t.nodeName.toLowerCase())t=t[n]||t;else{if((c=p[s])&&c[0]===T&&c[1]===r)return d[2]=c[2];if(p[s]=d,d[2]=e(t,o,l))return!0}return!1}}function y(e){return 1<e.length?function(t,o,n){for(var a=e.length;a--;)if(!e[a](t,o,n))return!1;return!0}:e[0]}function x(e,t,o){for(var n=0,a=t.length;n<a;n++)s(e,t[n],o);return o}function S(e,t,o,n,a){for(var s=[],r=0,l=e.length,d;r<l;r++)(d=e[r])&&(!o||o(d,n,a))&&(s.push(d),null!=t&&t.push(r));return s}function w(e,t,o,n,a,s){return n&&!n[C]&&(n=w(n)),a&&!a[C]&&(a=w(a,s)),l(function(s,r,l,d){var c=[],p=[],u=r.length,m=s||x(t||"*",l.nodeType?[l]:l,[]),g=e&&(s||!t)?S(m,c,e,l,d):m,h=o?a||(s?e:u||n)?[]:r:g,_,f,b;if(o&&o(g,h,l,d),n)for(_=S(h,p),n(_,[],l,d),f=_.length;f--;)(b=_[f])&&(h[p[f]]=!(g[p[f]]=b));if(!s)h=S(h===r?h.splice(u,h.length):h),a?a(null,r,h,d):B.apply(r,h);else if(a||e){if(a){for(_=[],f=h.length;f--;)(b=h[f])&&_.push(g[f]=b);a(null,h=[],_,d)}for(f=h.length;f--;)(b=h[f])&&-1<(_=a?F(s,b):c[f])&&(s[_]=!(r[_]=b))}})}function k(e){for(var t=e.length,o=oe.relative[e[0].type],n=o||oe.relative[" "],a=o?1:0,s=v(function(e){return e===d},n,!0),r=v(function(e){return-1<F(d,e)},n,!0),l=[function(e,t,n){var a=!o&&(n||t!==le)||((d=t).nodeType?s(e,t,n):r(e,t,n));return d=null,a}],d,c,p;a<t;a++)if(c=oe.relative[e[a].type])l=[v(y(l),c)];else{if(c=oe.filter[e[a].type].apply(null,e[a].matches),c[C]){for(p=++a;p<t&&!oe.relative[e[p].type];p++);return w(1<a&&y(l),1<a&&b(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(H,"$1"),c,a<p&&k(e.slice(a,p)),p<t&&k(e=e.slice(p)),p<t&&b(e))}l.push(c)}return y(l)}function E(e,t){var o=0<t.length,n=0<e.length,a=function(a,r,l,d,c){var p=0,u="0",m=a&&[],g=[],h=le,_=a||n&&oe.find.TAG("*",c),f=T+=null==h?1:Math.random()||.1,b=_.length,v,y,x;for(c&&(le=r===ue||r||c);u!==b&&null!=(v=_[u]);u++){if(n&&v){for(y=0,r||v.ownerDocument===ue||(pe(v),l=!ge);x=e[y++];)if(x(v,r||ue,l)){d.push(v);break}c&&(T=f)}o&&((v=!x&&v)&&p--,a&&m.push(v))}if(p+=u,o&&u!==p){for(y=0;x=t[y++];)x(m,g,r,l);if(a){if(0<p)for(;u--;)m[u]||g[u]||(g[u]=P.call(d));g=S(g)}B.apply(d,g),c&&!a&&0<g.length&&1<p+t.length&&s.uniqueSort(d)}return c&&(T=f,le=h),m};return o?l(a):a}var C="sizzle"+1*new Date,A=a.document,T=0,j=0,N=r(),M=r(),I=r(),O=r(),R=function(e,t){return e===t&&(ce=!0),0},D={}.hasOwnProperty,L=[],P=L.pop,q=L.push,B=L.push,z=L.slice,F=function(e,t){for(var o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},H=/^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$/g,U=/[\x20\t\r\n\f]|>/,V={ID:/^#((?:\\.|[\w-]|[^\0-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\0-\xa0])+)/,TAG:/^((?:\\.|[\w-]|[^\0-\xa0])+|[*])/,ATTR:/^\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\0-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\0-\xa0])+))|)[\x20\t\r\n\f]*\]/,PSEUDO:/^:((?:\\.|[\w-]|[^\0-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\0-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\0-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/,CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},W=/^[^{]+\{\s*\[native \w/,G=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,$=/\\([\da-f]{1,6}[\x20\t\r\n\f]?|([\x20\t\r\n\f])|.)/ig,Q=function(e,t,o){var n="0x"+t-65536;return n!=n||o?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)},Y=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,X=function(e,t){return t?"\0"===e?"\uFFFD":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},K=function(){pe()},Z=v(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"}),ee,te,oe,ne,ae,se,ie,re,le,de,ce,pe,ue,me,ge,he,_e,fe,be;try{B.apply(L=z.call(A.childNodes),A.childNodes),L[A.childNodes.length].nodeType}catch(t){B={apply:L.length?function(e,t){q.apply(e,z.call(t))}:function(e,t){for(var o=e.length,n=0;e[o++]=t[n++];);e.length=o-1}}}for(ee in te=s.support={},ae=s.isXML=function(e){var t=e.namespaceURI,o=(e.ownerDocument||e).documentElement;return!/HTML$/i.test(t||o&&o.nodeName||"HTML")},pe=s.setDocument=function(e){var t=e?e.ownerDocument||e:A,o,n;return t!==ue&&9===t.nodeType&&t.documentElement?(ue=t,me=ue.documentElement,ge=!ae(ue),A!==ue&&(n=ue.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",K,!1):n.attachEvent&&n.attachEvent("onunload",K)),te.attributes=d(function(e){return e.className="i",!e.getAttribute("className")}),te.getElementsByTagName=d(function(e){return e.appendChild(ue.createComment("")),!e.getElementsByTagName("*").length}),te.getElementsByClassName=W.test(ue.getElementsByClassName),te.getById=d(function(e){return me.appendChild(e).id=C,!ue.getElementsByName||!ue.getElementsByName(C).length}),te.getById?(oe.filter.ID=function(e){var t=e.replace($,Q);return function(e){return e.getAttribute("id")===t}},oe.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&ge){var o=t.getElementById(e);return o?[o]:[]}}):(oe.filter.ID=function(e){var t=e.replace($,Q);return function(e){var o="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return o&&o.value===t}},oe.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&ge){var o=t.getElementById(e),n,a,s;if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(s=t.getElementsByName(e),a=0;o=s[a++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),oe.find.TAG=te.getElementsByTagName?function(e,t){return"undefined"==typeof t.getElementsByTagName?te.qsa?t.querySelectorAll(e):void 0:t.getElementsByTagName(e)}:function(e,t){var o=[],n=0,a=t.getElementsByTagName(e),s;if("*"===e){for(;s=a[n++];)1===s.nodeType&&o.push(s);return o}return a},oe.find.CLASS=te.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&ge)return t.getElementsByClassName(e)},_e=[],he=[],(te.qsa=W.test(ue.querySelectorAll))&&(d(function(e){me.appendChild(e).innerHTML="<a id='"+C+"'></a><select id='"+C+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&he.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||he.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)"),e.querySelectorAll("[id~="+C+"-]").length||he.push("~="),e.querySelectorAll(":checked").length||he.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||he.push(".#.+[+~]")}),d(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=ue.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&he.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&he.push(":enabled",":disabled"),me.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&he.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),he.push(",.*:")})),(te.matchesSelector=W.test(fe=me.matches||me.webkitMatchesSelector||me.mozMatchesSelector||me.oMatchesSelector||me.msMatchesSelector))&&d(function(e){te.disconnectedMatch=fe.call(e,"*"),fe.call(e,"[s!='']:x"),_e.push("!=",":((?:\\\\.|[\\w-]|[^\0-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\0-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\0-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)")}),he=he.length&&new RegExp(he.join("|")),_e=_e.length&&new RegExp(_e.join("|")),o=W.test(me.compareDocumentPosition),be=o||W.test(me.contains)?function(e,t){var o=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!!(n&&1===n.nodeType&&(o.contains?o.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},R=o?function(e,t){if(e===t)return ce=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o?o:(o=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&o||!te.sortDetached&&t.compareDocumentPosition(e)===o?e===ue||e.ownerDocument===A&&be(A,e)?-1:t===ue||t.ownerDocument===A&&be(A,t)?1:de?F(de,e)-F(de,t):0:4&o?-1:1)}:function(e,t){if(e===t)return ce=!0,0;var o=0,n=e.parentNode,a=t.parentNode,s=[e],r=[t],l;if(!n||!a)return e===ue?-1:t===ue?1:n?-1:a?1:de?F(de,e)-F(de,t):0;if(n===a)return p(e,t);for(l=e;l=l.parentNode;)s.unshift(l);for(l=t;l=l.parentNode;)r.unshift(l);for(;s[o]===r[o];)o++;return o?p(s[o],r[o]):s[o]===A?-1:r[o]===A?1:0},ue):ue},s.matches=function(e,t){return s(e,null,null,t)},s.matchesSelector=function(e,t){if((e.ownerDocument||e)!==ue&&pe(e),te.matchesSelector&&ge&&!O[t+" "]&&(!_e||!_e.test(t))&&(!he||!he.test(t)))try{var o=fe.call(e,t);if(o||te.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(o){O(t,!0)}return 0<s(t,ue,null,[e]).length},s.contains=function(e,t){return(e.ownerDocument||e)!==ue&&pe(e),be(e,t)},s.attr=function(e,t){(e.ownerDocument||e)!==ue&&pe(e);var o=oe.attrHandle[t.toLowerCase()],n=o&&D.call(oe.attrHandle,t.toLowerCase())?o(e,t,!ge):void 0;return void 0===n?te.attributes||!ge?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null:n},s.escape=function(e){return(e+"").replace(Y,X)},s.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},s.uniqueSort=function(e){var t=[],o=0,n=0,a;if(ce=!te.detectDuplicates,de=!te.sortStable&&e.slice(0),e.sort(R),ce){for(;a=e[n++];)a===e[n]&&(o=t.push(n));for(;o--;)e.splice(t[o],1)}return de=null,e},ne=s.getText=function(e){var t="",o=0,n=e.nodeType,a;if(!n)for(;a=e[o++];)t+=ne(a);else if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)t+=ne(e)}else if(3===n||4===n)return e.nodeValue;return t},oe=s.selectors={cacheLength:50,createPseudo:l,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,Q),e[3]=(e[3]||e[4]||e[5]||"").replace($,Q),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(!e[3]&&s.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&s.error(e[0]),e},PSEUDO:function(e){var t=!e[6]&&e[2],o;return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":t&&/:((?:\\.|[\w-]|[^\0-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\0-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\0-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/.test(t)&&(o=se(t,!0))&&(o=t.indexOf(")",t.length-o)-t.length)&&(e[0]=e[0].slice(0,o),e[2]=t.slice(0,o)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace($,Q).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"([\\x20\\t\\r\\n\\f]|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,o){return function(n){var a=s.attr(n,e);return null==a?"!="===t:!t||(a+="","="===t?a===o:"!="===t?a!==o:"^="===t?o&&0===a.indexOf(o):"*="===t?o&&-1<a.indexOf(o):"$="===t?o&&a.slice(-o.length)===o:"~="===t?-1<(" "+a.replace(/[\x20\t\r\n\f]+/g," ")+" ").indexOf(o):"|="==t&&(a===o||a.slice(0,o.length+1)===o+"-"))}},CHILD:function(e,t,o,n,a){var s="nth"!==e.slice(0,3),i="last"!==e.slice(-4),r="of-type"===t;return 1===n&&0===a?function(e){return!!e.parentNode}:function(t,o,l){var d=s===i?"previousSibling":"nextSibling",c=t.parentNode,p=r&&t.nodeName.toLowerCase(),u=!l&&!r,m=!1,g,h,_,f,b,v;if(c){if(s){for(;d;){for(f=t;f=f[d];)if(r?f.nodeName.toLowerCase()===p:1===f.nodeType)return!1;v=d="only"===e&&!v&&"nextSibling"}return!0}if(v=[i?c.firstChild:c.lastChild],i&&u){for(f=c,_=f[C]||(f[C]={}),h=_[f.uniqueID]||(_[f.uniqueID]={}),g=h[e]||[],b=g[0]===T&&g[1],m=b&&g[2],f=b&&c.childNodes[b];f=++b&&f&&f[d]||(m=b=0)||v.pop();)if(1===f.nodeType&&++m&&f===t){h[e]=[T,b,m];break}}else if(u&&(f=t,_=f[C]||(f[C]={}),h=_[f.uniqueID]||(_[f.uniqueID]={}),g=h[e]||[],b=g[0]===T&&g[1],m=b),!1===m)for(;(f=++b&&f&&f[d]||(m=b=0)||v.pop())&&!((r?f.nodeName.toLowerCase()===p:1===f.nodeType)&&++m&&(u&&(_=f[C]||(f[C]={}),h=_[f.uniqueID]||(_[f.uniqueID]={}),h[e]=[T,m]),f===t)););return m-=a,m===n||0==m%n&&0<=m/n}}},PSEUDO:function(e,t){var o=oe.pseudos[e]||oe.setFilters[e.toLowerCase()]||s.error("unsupported pseudo: "+e),n;return o[C]?o(t):1<o.length?(n=[e,e,"",t],oe.setFilters.hasOwnProperty(e.toLowerCase())?l(function(e,n){for(var a=o(e,t),s=a.length,r;s--;)r=F(e,a[s]),e[r]=!(n[r]=a[s])}):function(e){return o(e,0,n)}):o}},pseudos:{not:l(function(e){var t=[],o=[],n=ie(e.replace(H,"$1"));return n[C]?l(function(e,t,o,a){for(var s=n(e,null,a,[]),r=e.length,l;r--;)(l=s[r])&&(e[r]=!(t[r]=l))}):function(e,a,s){return t[0]=e,n(t,null,s,o),t[0]=null,!o.pop()}}),has:l(function(e){return function(t){return 0<s(e,t).length}}),contains:l(function(e){return e=e.replace($,Q),function(t){return-1<(t.textContent||ne(t)).indexOf(e)}}),lang:l(function(e){return /^(?:\\.|[\w-]|[^\0-\xa0])+$/.test(e||"")||s.error("unsupported lang: "+e),e=e.replace($,Q).toLowerCase(),function(t){var o;do if(o=ge?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return o=o.toLowerCase(),o===e||0===o.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=a.location&&a.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===me},focus:function(e){return e===ue.activeElement&&(!ue.hasFocus||ue.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:g(!1),disabled:g(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(6>e.nodeType)return!1;return!0},parent:function(e){return!oe.pseudos.empty(e)},header:function(e){return /^h\d$/i.test(e.nodeName)},input:function(e){return /^(?:input|select|textarea|button)$/i.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:h(function(){return[0]}),last:h(function(e,t){return[t-1]}),eq:h(function(e,t,o){return[0>o?o+t:o]}),even:h(function(e,t){for(var o=0;o<t;o+=2)e.push(o);return e}),odd:h(function(e,t){for(var o=1;o<t;o+=2)e.push(o);return e}),lt:h(function(e,t,o){for(var n=0>o?o+t:o>t?t:o;0<=--n;)e.push(n);return e}),gt:h(function(e,t,o){for(var n=0>o?o+t:o;++n<t;)e.push(n);return e})}},oe.pseudos.nth=oe.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})oe.pseudos[ee]=u(ee);for(ee in{submit:!0,reset:!0})oe.pseudos[ee]=m(ee);f.prototype=oe.filters=oe.pseudos,oe.setFilters=new f,se=s.tokenize=function(e,t){var o=M[e+" "],n,a,i,r,l,d,c;if(o)return t?0:o.slice(0);for(l=e,d=[],c=oe.preFilter;l;){for(r in(!n||(a=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/.exec(l)))&&(a&&(l=l.slice(a[0].length)||l),d.push(i=[])),n=!1,(a=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/.exec(l))&&(n=a.shift(),i.push({value:n,type:a[0].replace(H," ")}),l=l.slice(n.length)),oe.filter)(a=V[r].exec(l))&&(!c[r]||(a=c[r](a)))&&(n=a.shift(),i.push({value:n,type:r,matches:a}),l=l.slice(n.length));if(!n)break}return t?l.length:l?s.error(e):M(e,d).slice(0)},ie=s.compile=function(e,t){var o=[],n=[],a=I[e+" "],s;if(!a){for(t||(t=se(e)),s=t.length;s--;)a=k(t[s]),a[C]?o.push(a):n.push(a);a=I(e,E(n,o)),a.selector=e}return a},re=s.select=function(e,t,o,n){var a="function"==typeof e&&e,s=!n&&se(e=a.selector||e),r,l,d,c,p;if(o=o||[],1===s.length){if(l=s[0]=s[0].slice(0),2<l.length&&"ID"===(d=l[0]).type&&9===t.nodeType&&ge&&oe.relative[l[1].type]){if(t=(oe.find.ID(d.matches[0].replace($,Q),t)||[])[0],!t)return o;a&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(r=V.needsContext.test(e)?0:l.length;r--&&(d=l[r],!oe.relative[c=d.type]);)if((p=oe.find[c])&&(n=p(d.matches[0].replace($,Q),J.test(l[0].type)&&_(t.parentNode)||t))){if(l.splice(r,1),e=n.length&&b(l),!e)return B.apply(o,n),o;break}}return(a||ie(e,s))(n,t,!ge,o,!t||J.test(e)&&_(t.parentNode)||t),o},te.sortStable=C.split("").sort(R).join("")===C,te.detectDuplicates=!!ce,pe(),te.sortDetached=d(function(e){return 1&e.compareDocumentPosition(ue.createElement("fieldset"))}),d(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||c("type|href|height|width",function(e,t,o){if(!o)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),te.attributes&&d(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||c("value",function(e,t,o){if(!o&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),d(function(e){return null==e.getAttribute("disabled")})||c("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(e,t,o){var n;if(!o)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null});var ve=a.Sizzle;s.noConflict=function(){return a.Sizzle===s&&(a.Sizzle=ve),s},n=function(){return s}.call(t,o,t,e),!(void 0!==n&&(e.exports=n))})(window)},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/info.html -->\n<div class=\"message chat-info "+o(e.extra_classes)+"\" data-isodate=\""+o(e.isodate)+"\" ",e.data_name&&(t+=" data-"+o(e.data_name)+"=\""+o(e.data_value)+"\""),t+=">\n",t+=e.render_message?"\n    "+(null==(s=e.message)?"":s)+"\n":"\n    "+o(e.message)+"\n",t+="\n",e.retry&&(t+="\n    <a class=\"retry\">Retry</a>\n"),(t+="\n</div>\n",t)}},function(e,t,o){var n=o(67),a="object"==typeof self&&self&&self.Object===Object&&self,s=n||a||Function("return this")();e.exports=s},function(e){var t=Array.isArray;e.exports=t},function(e){!function(o,t){e.exports=t()}(this,function(){"use strict";var o=function(o,t,n){var e=o+"";return!e||e.length>=t?o:""+Array(t+1-e.length).join(n)+o},a="en",s={};s[a]={name:"en",weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]};var i=function(e){return e instanceof d},r=function(o,t,n){var e;if(!o)return a;if("string"==typeof o)s[o]&&(e=o),t&&(s[o]=t,e=o);else{var l=o.name;s[l]=o,e=l}return n||(a=e),e},p=function(o,t,n){if(i(o))return o.clone();var e=t?"string"==typeof t?{format:t,pl:n}:t:{};return e.date=o,new d(e)},_={s:o,z:function(a){var t=-a.utcOffset(),n=Math.abs(t),e=Math.floor(n/60);return(0>=t?"+":"-")+o(e,2,"0")+":"+o(n%60,2,"0")},m:function(o,t){var n=12*(t.year()-o.year())+(t.month()-o.month()),e=o.clone().add(n,"month"),a=0>t-e,i=o.clone().add(n+(a?-1:1),"month");return+(-(n+(t-e)/(a?e-i:i-e))||0)},a:function(e){return 0>e?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:"month",y:"year",w:"week",d:"day",h:"hour",m:"minute",s:"second",ms:"millisecond",Q:"quarter"}[e]||((e||"")+"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};_.l=r,_.i=i,_.w=function(e,t){return p(e,{locale:t.$L,utc:t.$u})};var d=function(){function e(e){this.$L=this.$L||r(e.locale,null,!0),this.parse(e)}var t=e.prototype;return t.parse=function(e){this.$d=function(o){var t=o.date,n=o.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var e=t.match(/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/);if(e)return n?new Date(Date.UTC(e[1],e[2]-1,e[3]||1,e[4]||0,e[5]||0,e[6]||0,e[7]||0)):new Date(e[1],e[2]-1,e[3]||1,e[4]||0,e[5]||0,e[6]||0,e[7]||0)}return new Date(t)}(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return _},t.isValid=function(){return"Invalid Date"!==this.$d.toString()},t.isSame=function(o,t){var n=p(o);return this.startOf(t)<=n&&n<=this.endOf(t)},t.isAfter=function(e,t){return p(e)<this.startOf(t)},t.isBefore=function(e,t){return this.endOf(t)<p(e)},t.$g=function(o,t,n){return _.u(o)?this[t]:this.set(n,o)},t.year=function(e){return this.$g(e,"$y","year")},t.month=function(e){return this.$g(e,"$M","month")},t.day=function(e){return this.$g(e,"$W","day")},t.date=function(e){return this.$g(e,"$D","date")},t.hour=function(e){return this.$g(e,"$H","hour")},t.minute=function(e){return this.$g(e,"$m","minute")},t.second=function(e){return this.$g(e,"$s","second")},t.millisecond=function(e){return this.$g(e,"$ms","millisecond")},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(e,t){var o=this,a=!!_.u(t)||t,n=_.p(e),s=function(s,t){var n=_.w(o.$u?Date.UTC(o.$y,t,s):new Date(o.$y,t,s),o);return a?n:n.endOf("day")},i=function(e,t){return _.w(o.toDate()[e].apply(o.toDate(),(a?[0,0,0,0]:[23,59,59,999]).slice(t)),o)},r=this.$W,l=this.$M,d=this.$D,c="set"+(this.$u?"UTC":"");switch(n){case"year":return a?s(1,0):s(31,11);case"month":return a?s(1,l):s(0,l+1);case"week":var p=this.$locale().weekStart||0,u=(r<p?r+7:r)-p;return s(a?d-u:d+(6-u),l);case"day":case"date":return i(c+"Hours",0);case"hour":return i(c+"Minutes",1);case"minute":return i(c+"Seconds",2);case"second":return i(c+"Milliseconds",3);default:return this.clone();}},t.endOf=function(e){return this.startOf(e,!1)},t.$set=function(e,t){var o=_.p(e),n="set"+(this.$u?"UTC":""),a=(i={},i.day=n+"Date",i.date=n+"Date",i.month=n+"Month",i.year=n+"FullYear",i.hour=n+"Hours",i.minute=n+"Minutes",i.second=n+"Seconds",i.millisecond=n+"Milliseconds",i)[o],s=o==="day"?this.$D+(t-this.$W):t,i;if(o==="month"||o==="year"){var r=this.clone().set("date",1);r.$d[a](s),r.init(),this.$d=r.set("date",Math.min(this.$D,r.daysInMonth())).toDate()}else a&&this.$d[a](s);return this.init(),this},t.set=function(e,t){return this.clone().$set(e,t)},t.get=function(e){return this[_.p(e)]()},t.add=function(a,e){var o=this,n;a=+a;var s=_.p(e),i=function(t){var n=p(o);return _.w(n.date(n.date()+Math.round(t*a)),o)};if(s==="month")return this.set("month",this.$M+a);if("year"===s)return this.set("year",this.$y+a);if("day"===s)return i(1);if("week"===s)return i(7);var r=(n={},n.minute=6e4,n.hour=36e5,n.second=1e3,n)[s]||1,d=this.valueOf()+a*r;return _.w(d,this)},t.subtract=function(e,t){return this.add(-1*e,t)},t.format=function(p){var m=this;if(!this.isValid())return"Invalid Date";var n=p||"YYYY-MM-DDTHH:mm:ssZ",e=_.z(this),t=this.$locale(),i=this.$H,s=this.$m,r=this.$M,o=t.weekdays,a=t.months,u=function(e,t,o,a){return e&&(e[t]||e(m,n))||o[t].substr(0,a)},c=function(e){return _.s(i%12||12,e,"0")},d=t.meridiem||function(o,t,n){var e=12>o?"AM":"PM";return n?e.toLowerCase():e},g={YY:(this.$y+"").slice(-2),YYYY:this.$y,M:r+1,MM:_.s(r+1,2,"0"),MMM:u(t.monthsShort,r,a,3),MMMM:a[r]||a(this,n),D:this.$D,DD:_.s(this.$D,2,"0"),d:this.$W+"",dd:u(t.weekdaysMin,this.$W,o,2),ddd:u(t.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:i+"",HH:_.s(i,2,"0"),h:c(1),hh:c(2),a:d(i,s,!0),A:d(i,s,!1),m:s+"",mm:_.s(s,2,"0"),s:this.$s+"",ss:_.s(this.$s,2,"0"),SSS:_.s(this.$ms,3,"0"),Z:e};return n.replace(/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,function(o,t){return t||g[o]||e.replace(":","")})},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(e,t,o){var n=_.p(t),a=p(e),s=6e4*(a.utcOffset()-this.utcOffset()),i=this-a,r=_.m(this,a),l;return r=(l={},l.year=r/12,l.month=r,l.quarter=r/3,l.week=(i-s)/6048e5,l.day=(i-s)/864e5,l.hour=i/36e5,l.minute=i/6e4,l.second=i/1e3,l)[n]||i,o?r:_.a(r)},t.daysInMonth=function(){return this.endOf("month").$D},t.$locale=function(){return s[this.$L]},t.locale=function(o,t){if(!o)return this.$L;var n=this.clone();return n.$L=r(o,t,!0),n},t.clone=function(){return _.w(this.toDate(),this)},t.toDate=function(){return new Date(this.$d)},t.toJSON=function(){return this.toISOString()},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},e}();return p.prototype=d.prototype,p.extend=function(e,t){return e(t,d,p),p},p.locale=r,p.isDayjs=i,p.unix=function(e){return p(1e3*e)},p.en=s[a],p.Ls=s,p})},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/spinner.html -->\n<span class=\"spinner fa fa-spinner centered\"/>\n",e}},function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,o){(function(n){var a,s;(function(i){var r="object"==typeof self&&self.self===self&&self||"object"==typeof n&&n.global===n&&n;a=[o(46),o(330),t],s=function(e,t,o){r.Backbone=i(r,o,e,t)}.apply(t,a),!(void 0!==s&&(e.exports=s))})(function(e,t,o,n){var a=e.Backbone,s=Array.prototype.slice;t.VERSION="1.4.0",t.$=n,t.noConflict=function(){return e.Backbone=a,this},t.emulateHTTP=!1,t.emulateJSON=!1;var i=t.Events={},r=/\s+/,l=function(e,t,n,a,s){var d=0,c;if(n&&"object"==typeof n)for(void 0!==a&&("context"in s)&&void 0===s.context&&(s.context=a),c=o.keys(n);d<c.length;d++)t=l(e,t,c[d],n[c[d]],s);else if(n&&r.test(n))for(c=n.split(r);d<c.length;d++)t=e(t,c[d],a,s);else t=e(t,n,a,s);return t},d;i.on=function(e,t,o){if(this._events=l(c,this._events||{},e,t,{context:o,ctx:this,listening:d}),d){var n=this._listeners||(this._listeners={});n[d.id]=d,d.interop=!1}return this},i.listenTo=function(e,t,n){if(!e)return this;var a=e._listenId||(e._listenId=o.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),i=d=s[a];i||(this._listenId||(this._listenId=o.uniqueId("l")),i=d=s[a]=new _(this,e));var r=p(e,t,n,this);if(d=void 0,r)throw r;return i.interop&&i.on(t,n),this};var c=function(e,t,o,n){if(o){var a=e[t]||(e[t]=[]),s=n.context,i=n.ctx,r=n.listening;r&&r.count++,a.push({callback:o,context:s,ctx:s||i,listening:r})}return e},p=function(e,t,o,n){try{e.on(t,o,n)}catch(t){return t}};i.off=function(e,t,o){return this._events?(this._events=l(u,this._events,e,t,{context:o,listeners:this._listeners}),this):this},i.stopListening=function(e,t,n){var a=this._listeningTo;if(!a)return this;for(var s=e?[e._listenId]:o.keys(a),r=0,l;r<s.length&&(l=a[s[r]],!!l);r++)l.obj.off(t,n,this),l.interop&&l.off(t,n);return o.isEmpty(a)&&(this._listeningTo=void 0),this};var u=function(e,t,n,a){if(e){var s=a.context,r=a.listeners,l=0,d;if(!t&&!s&&!n){for(d=o.keys(r);l<d.length;l++)r[d[l]].cleanup();return}for(d=t?[t]:o.keys(e);l<d.length;l++){t=d[l];var c=e[t];if(!c)break;for(var p=[],u=0,m;u<c.length;u++)if(m=c[u],n&&n!==m.callback&&n!==m.callback._callback||s&&s!==m.context)p.push(m);else{var g=m.listening;g&&g.off(t,n)}p.length?e[t]=p:delete e[t]}return e}};i.once=function(e,t,o){var n=l(m,{},e,t,this.off.bind(this));return"string"==typeof e&&null==o&&(t=void 0),this.on(n,t,o)},i.listenToOnce=function(e,t,o){var n=l(m,{},t,o,this.stopListening.bind(this,e));return this.listenTo(e,n)};var m=function(e,t,n,a){if(n){var s=e[t]=o.once(function(){a(t,s),n.apply(this,arguments)});s._callback=n}return e};i.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),o=Array(t),n=0;n<t;n++)o[n]=arguments[n+1];return l(g,this._events,e,void 0,o),this};var g=function(e,t,o,n){if(e){var a=e[t],s=e.all;a&&s&&(s=s.slice()),a&&h(a,n),s&&h(s,[t].concat(n))}return e},h=function(e,t){var o=-1,n=e.length,a=t[0],s=t[1],r=t[2],l;switch(t.length){case 0:for(;++o<n;)(l=e[o]).callback.call(l.ctx);return;case 1:for(;++o<n;)(l=e[o]).callback.call(l.ctx,a);return;case 2:for(;++o<n;)(l=e[o]).callback.call(l.ctx,a,s);return;case 3:for(;++o<n;)(l=e[o]).callback.call(l.ctx,a,s,r);return;default:for(;++o<n;)(l=e[o]).callback.apply(l.ctx,t);}},_=function(e,t){this.id=e._listenId,this.listener=e,this.obj=t,this.interop=!0,this.count=0,this._events=void 0};_.prototype.on=i.on,_.prototype.off=function(e,t){var o;this.interop?(this._events=l(u,this._events,e,t,{context:void 0,listeners:void 0}),o=!this._events):(this.count--,o=0===this.count),o&&this.cleanup()},_.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},i.bind=i.on,i.unbind=i.off,o.extend(t,i);var f=t.Model=function(e,t){var n=e||{};t||(t={}),this.preinitialize.apply(this,arguments),this.cid=o.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(n=this.parse(n,t)||{});var a=o.result(this,"defaults");n=o.defaults(o.extend({},a,n),a),this.set(n,t),this.changed={},this.initialize.apply(this,arguments)};o.extend(f.prototype,i,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(){return o.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return o.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!o.iteratee(e,this)(this.attributes)},set:function(e,t,n){if(null==e)return this;var a;if("object"==typeof e?(a=e,n=t):(a={})[e]=t,n||(n={}),!this._validate(a,n))return!1;var s=n.unset,r=n.silent,l=[],d=this._changing;this._changing=!0,d||(this._previousAttributes=o.clone(this.attributes),this.changed={});var c=this.attributes,p=this.changed,u=this._previousAttributes;for(var m in a)t=a[m],o.isEqual(c[m],t)||l.push(m),o.isEqual(u[m],t)?delete p[m]:p[m]=t,s?delete c[m]:c[m]=t;if(this.idAttribute in a&&(this.id=this.get(this.idAttribute)),!r){l.length&&(this._pending=n);for(var g=0;g<l.length;g++)this.trigger("change:"+l[g],this,c[l[g]],n)}if(d)return this;if(!r)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,o.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,o.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!o.isEmpty(this.changed):o.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&o.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,n={},a;for(var s in e){var i=e[s];o.isEqual(t[s],i)||(n[s]=i,a=!0)}return!!a&&n},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return o.clone(this._previousAttributes)},fetch:function(e){e=o.extend({parse:!0},e);var t=this,n=e.success;return e.success=function(o){var a=e.parse?t.parse(o,e):o;return!!t.set(a,e)&&void(n&&n.call(e.context,t,o,e),t.trigger("sync",t,o,e))},P(this,e),this.sync("read",this,e)},save:function(e,t,n){var a;null==e||"object"==typeof e?(a=e,n=t):(a={})[e]=t,n=o.extend({validate:!0,parse:!0},n);var s=n.wait;if(a&&!s){if(!this.set(a,n))return!1;}else if(!this._validate(a,n))return!1;var i=this,r=n.success,l=this.attributes;n.success=function(e){i.attributes=l;var t=n.parse?i.parse(e,n):e;return s&&(t=o.extend({},a,t)),(!t||i.set(t,n))&&void(r&&r.call(n.context,i,e,n),i.trigger("sync",i,e,n))},P(this,n),a&&s&&(this.attributes=o.extend({},l,a));var d=this.isNew()?"create":n.patch?"patch":"update";"patch"!=d||n.attrs||(n.attrs=a);var c=this.sync(d,this,n);return this.attributes=l,c},destroy:function(e){e=e?o.clone(e):{};var t=this,n=e.success,a=e.wait,s=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(o){a&&s(),n&&n.call(e.context,t,o,e),t.isNew()||t.trigger("sync",t,o,e)};var i=!1;return this.isNew()?o.defer(e.success):(P(this,e),i=this.sync("delete",this,e)),a||s(),i},url:function(){var e=o.result(this,"urlRoot")||o.result(this.collection,"url")||L();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},o.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=o.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;return!n||(this.trigger("invalid",this,n,o.extend(t,{validationError:n})),!1)}});var b=t.Collection=function(e,t){t||(t={}),this.preinitialize.apply(this,arguments),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,o.extend({silent:!0},t))},v={add:!0,remove:!0,merge:!0},y={add:!0,remove:!1},x=function(e,t,o){o=Math.min(Math.max(o,0),e.length);var n=Array(e.length-o),a=t.length,s;for(s=0;s<n.length;s++)n[s]=e[s+o];for(s=0;s<a;s++)e[s+o]=t[s];for(s=0;s<n.length;s++)e[s+a+o]=n[s]};o.extend(b.prototype,i,{model:f,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,o.extend({merge:!1},t,y))},remove:function(e,t){t=o.extend({},t);var n=!o.isArray(e);e=n?[e]:e.slice();var a=this._removeModels(e,t);return!t.silent&&a.length&&(t.changes={added:[],merged:[],removed:a},this.trigger("update",this,t)),n?a[0]:a},set:function(e,t){if(null!=e){t=o.extend({},v,t),t.parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var n=!o.isArray(e);e=n?[e]:e.slice();var a=t.at;null!=a&&(a=+a),a>this.length&&(a=this.length),0>a&&(a+=this.length+1);var s=[],r=[],l=[],d=[],c={},p=t.add,u=t.merge,m=t.remove,g=!1,h=this.comparator&&null==a&&!1!==t.sort,_=o.isString(this.comparator)?this.comparator:null,f,b;for(b=0;b<e.length;b++){f=e[b];var y=this.get(f);if(y){if(u&&f!==y){var S=this._isModel(f)?f.attributes:f;t.parse&&(S=y.parse(S,t)),y.set(S,t),l.push(y),h&&!g&&(g=y.hasChanged(_))}c[y.cid]||(c[y.cid]=!0,s.push(y)),e[b]=y}else p&&(f=e[b]=this._prepareModel(f,t),f&&(r.push(f),this._addReference(f,t),c[f.cid]=!0,s.push(f)))}if(m){for(b=0;b<this.length;b++)f=this.models[b],c[f.cid]||d.push(f);d.length&&this._removeModels(d,t)}var w=!1;if(s.length&&!h&&p&&m?(w=this.length!==s.length||o.some(this.models,function(e,t){return e!==s[t]}),this.models.length=0,x(this.models,s,0),this.length=this.models.length):r.length&&(h&&(g=!0),x(this.models,r,null==a?this.length:a),this.length=this.models.length),g&&this.sort({silent:!0}),!t.silent){for(b=0;b<r.length;b++)null!=a&&(t.index=a+b),f=r[b],f.trigger("add",f,this,t);(g||w)&&this.trigger("sort",this,t),(r.length||d.length||l.length)&&(t.changes={added:r,removed:d,merged:l},this.trigger("update",this,t))}return n?e[0]:e}},reset:function(e,t){t=t?o.clone(t):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],t);return t.previousModels=this.models,this._reset(),e=this.add(e,o.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,o.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,o.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return s.apply(this.models,arguments)},get:function(e){return null==e?void 0:this._byId[e]||this._byId[this.modelId(this._isModel(e)?e.attributes:e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return 0>e&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var n=t.length;return o.isFunction(t)&&(t=t.bind(this)),1===n||o.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){e=o.extend({parse:!0},e);var t=e.success,n=this;return e.success=function(o){var a=e.reset?"reset":"set";n[a](o,e),t&&t.call(e.context,n,o,e),n.trigger("sync",n,o,e)},P(this,e),this.sync("read",this,e)},create:function(e,t){t=t?o.clone(t):{};var n=t.wait;if(e=this._prepareModel(e,t),!e)return!1;n||this.add(e,t);var a=this,s=t.success;return t.success=function(e,t,o){n&&a.add(e,o),s&&s.call(o.context,e,t,o)},e.save(null,t),e},parse:function(e){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},values:function(){return new w(this,k)},keys:function(){return new w(this,E)},entries:function(){return new w(this,C)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;t=t?o.clone(t):{},t.collection=this;var n=new this.model(e,t);return n.validationError?(this.trigger("invalid",this,n.validationError,t),!1):n},_removeModels:function(e,t){for(var o=[],n=0,a;n<e.length;n++)if(a=this.get(e[n]),a){var s=this.indexOf(a);this.models.splice(s,1),this.length--,delete this._byId[a.cid];var r=this.modelId(a.attributes);null!=r&&delete this._byId[r],t.silent||(t.index=s,a.trigger("remove",a,this,t)),o.push(a),this._removeReference(a,t)}return o},_isModel:function(e){return e instanceof f},_addReference:function(e){this._byId[e.cid]=e;var t=this.modelId(e.attributes);null!=t&&(this._byId[t]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e){delete this._byId[e.cid];var t=this.modelId(e.attributes);null!=t&&delete this._byId[t],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,o,n){if(t){if(("add"===e||"remove"===e)&&o!==this)return;if("destroy"===e&&this.remove(t,n),"change"===e){var a=this.modelId(t.previousAttributes()),s=this.modelId(t.attributes);a!==s&&(null!=a&&delete this._byId[a],null!=s&&(this._byId[s]=t))}}this.trigger.apply(this,arguments)}});var S="function"==typeof Symbol&&Symbol.iterator;S&&(b.prototype[S]=b.prototype.values);var w=function(e,t){this._collection=e,this._kind=t,this._index=0},k=1,E=2,C=3;S&&(w.prototype[S]=function(){return this}),w.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var e=this._collection.at(this._index);this._index++;var t;if(this._kind===k)t=e;else{var o=this._collection.modelId(e.attributes);t=this._kind===E?o:[o,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var A=t.View=function(e){this.cid=o.uniqueId("view"),this.preinitialize.apply(this,arguments),o.extend(this,o.pick(e,T)),this._ensureElement(),this.initialize.apply(this,arguments)},T=["model","collection","el","id","attributes","className","tagName","events"];o.extend(A.prototype,i,{tagName:"div",$:function(e){return this.$el.find(e)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=o.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var n=e[t];if(o.isFunction(n)||(n=this[n]),n){var a=t.match(/^(\S+)\s*(.*)$/);this.delegate(a[1],a[2],n.bind(this))}}return this},delegate:function(e,t,o){return this.$el.on(e+".delegateEvents"+this.cid,t,o),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,o){return this.$el.off(e+".delegateEvents"+this.cid,t,o),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(!this.el){var e=o.extend({},o.result(this,"attributes"));this.id&&(e.id=o.result(this,"id")),this.className&&(e["class"]=o.result(this,"className")),this.setElement(this._createElement(o.result(this,"tagName"))),this._setAttributes(e)}else this.setElement(o.result(this,"el"))},_setAttributes:function(e){this.$el.attr(e)}});var j=function(e,t,o,n){return 1===t?function(){return e[o](this[n])}:2===t?function(t){return e[o](this[n],t)}:3===t?function(t,a){return e[o](this[n],M(t,this),a)}:4===t?function(t,a,s){return e[o](this[n],M(t,this),a,s)}:function(){var t=s.call(arguments);return t.unshift(this[n]),e[o].apply(e,t)}},N=function(e,t,n,a){o.each(n,function(o,n){t[n]&&(e.prototype[n]=j(t,o,n,a))})},M=function(e,t){return o.isFunction(e)?e:o.isObject(e)&&!t._isModel(e)?I(e):o.isString(e)?function(t){return t.get(e)}:e},I=function(e){var t=o.matches(e);return function(e){return t(e.attributes)}};o.each([[b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[f,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(e){var t=e[0],n=e[1],a=e[2];t.mixin=function(e){var n=o.reduce(o.functions(e),function(e,t){return e[t]=0,e},{});N(t,e,n,a)},N(t,o,n,a)}),t.sync=function(e,n,a){var s=O[e];o.defaults(a||(a={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var i={type:s,dataType:"json"};if(a.url||(i.url=o.result(n,"url")||L()),null==a.data&&n&&("create"===e||"update"===e||"patch"===e)&&(i.contentType="application/json",i.data=JSON.stringify(a.attrs||n.toJSON(a))),a.emulateJSON&&(i.contentType="application/x-www-form-urlencoded",i.data=i.data?{model:i.data}:{}),a.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){i.type="POST",a.emulateJSON&&(i.data._method=s);var r=a.beforeSend;a.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",s),r)return r.apply(this,arguments)}}"GET"===i.type||a.emulateJSON||(i.processData=!1);var l=a.error;a.error=function(e,t,o){a.textStatus=t,a.errorThrown=o,l&&l.call(a.context,e,t,o)};var d=a.xhr=t.ajax(o.extend(i,a));return n.trigger("request",n,d,a),d};var O={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var R=t.Router=function(e){e||(e={}),this.preinitialize.apply(this,arguments),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)};o.extend(R.prototype,i,{preinitialize:function(){},initialize:function(){},route:function(e,n,a){o.isRegExp(e)||(e=this._routeToRegExp(e)),o.isFunction(n)&&(a=n,n=""),a||(a=this[n]);var s=this;return t.history.route(e,function(o){var i=s._extractParameters(e,o);!1!==s.execute(a,i,n)&&(s.trigger.apply(s,["route:"+n].concat(i)),s.trigger("route",n,i),t.history.trigger("route",s,n,i))}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,o){return t.history.navigate(e,o),this},_bindRoutes:function(){if(this.routes){this.routes=o.result(this,"routes");for(var e=o.keys(this.routes),t;null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(e){return e=e.replace(/[\-{}\[\]+?.,\\\^$|#\s]/g,"\\$&").replace(/\((.*?)\)/g,"(?:$1)?").replace(/(\(\?)?:\w+/g,function(e,t){return t?e:"([^/?]+)"}).replace(/\*\w+/g,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return o.map(n,function(e,t){return t===n.length-1?e||null:e?decodeURIComponent(e):null})}});var D=t.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)};D.started=!1,o.extend(D.prototype,i,{interval:50,atRoot:function(){var e=this.location.pathname.replace(/[^\/]$/,"$&/");return e===this.root&&!this.getSearch()},matchRoot:function(){var e=this.decodeFragment(this.location.pathname),t=e.slice(0,this.root.length-1)+"/";return t===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(this._usePushState||!this._wantsHashChange?e=this.getPath():e=this.getHash()),e.replace(/^[#\/]|\s+$/g,"")},start:function(e){if(D.started)throw new Error("Backbone.history has already been started");if(D.started=!0,this.options=o.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||7<document.documentMode),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.history&&this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(/^\/+|\/+$/g,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,a=n.insertBefore(this.iframe,n.firstChild).contentWindow;a.document.open(),a.document.close(),a.location.hash="#"+this.fragment}var s=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),D.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e!==this.fragment&&void(this.iframe&&this.navigate(e),this.loadUrl())},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),o.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))},navigate:function(e,t){if(!D.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var o=this.root;(""===e||"?"===e.charAt(0))&&(o=o.slice(0,-1)||"/");var n=o+e;e=e.replace(/#.*$/,"");var a=this.decodeFragment(e);if(this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;t.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,o){if(o){var n=e.href.replace(/(javascript:|#).*$/,"");e.replace(n+"#"+t)}else e.hash="#"+t}}),t.history=new D;f.extend=b.extend=R.extend=A.extend=D.extend=function(e,t){var n=this,a;return a=e&&o.has(e,"constructor")?e.constructor:function(){return n.apply(this,arguments)},o.extend(a,n,t),a.prototype=o.create(n.prototype,e),a.prototype.constructor=a,a.__super__=n.prototype,a};var L=function(){throw new Error("A \"url\" property or function must be specified")},P=function(e,t){var o=t.error;t.error=function(n){o&&o.call(t.context,e,n,t),e.trigger("error",e,n,t)}};return t})}).call(this,o(14))},function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,o){(function(o){var n,a,s;(function(o,i){a=[],n=i,s="function"==typeof n?n.apply(t,a):n,!(void 0!==s&&(e.exports=s))})(this,function(){"use strict";var e="undefined"==typeof o?this||window:o,t=document,n=t.documentElement,a=e.BSN={},s=a.supports=[],i="onmouseleave"in t?["mouseenter","mouseleave"]:["mouseover","mouseout"],r=0,l="WebkitTransition"in n.style||"Transition".toLowerCase()in n.style,d="WebkitTransition"in n.style?"Webkit".toLowerCase()+"TransitionEnd":"Transition".toLowerCase()+"end",c="WebkitDuration"in n.style?"Webkit".toLowerCase()+"TransitionDuration":"Transition".toLowerCase()+"Duration",p=function(e){e.focus?e.focus():e.setActive()},u=function(e,t){e.classList.add(t)},m=function(e,t){e.classList.remove(t)},g=function(e,t){return e.classList.contains(t)},h=function(e,t){return[].slice.call(e.getElementsByClassName(t))},_=function(e,o){var n=o?o:t;return"object"==typeof e?e:n.querySelector(e)},f=function(e,o){var n=o.charAt(0),a=o.substr(1);if("."===n){for(;e&&e!==t;e=e.parentNode)if(null!==_(o,e.parentNode)&&g(e,a))return e;}else if("#"===n)for(;e&&e!==t;e=e.parentNode)if(e.id===a)return e;return!1},b=function(e,t,o){e.addEventListener(t,o,!1)},v=function(e,t,o){e.removeEventListener(t,o,!1)},y=function(t,o,n){b(t,o,function a(s){n(s),v(t,o,a)})},x=function(t){var o=l?e.getComputedStyle(t)[c]:0;return o=parseFloat(o),o="number"!=typeof o||isNaN(o)?0:1e3*o,o},S=function(e,t){var o=0,n=x(e);n?y(e,d,function(n){o||t(n),o=1}):setTimeout(function(){o||t(),o=1},17)},w=function(e,t,o){var n=new CustomEvent(e+".bs."+t);n.relatedTarget=o,this.dispatchEvent(n)},k=function(){return{y:e.pageYOffset||n.scrollTop,x:e.pageXOffset||n.scrollLeft}},E=function(e,o,a,s){var i={w:o.offsetWidth,h:o.offsetHeight},r=n.clientWidth||t.body.clientWidth,l=n.clientHeight||t.body.clientHeight,d=e.getBoundingClientRect(),c=s===t.body?k():{x:s.offsetLeft+s.scrollLeft,y:s.offsetTop+s.scrollTop},p={w:d.right-d.left,h:d.bottom-d.top},u=g(o,"popover"),m=_(".arrow",o),h=0>d.top+p.h/2-i.h/2,f=0>d.left+p.w/2-i.w/2,b=d.left+i.w/2+p.w/2>=r,v=d.top+i.h/2+p.h/2>=l,y=0>d.top-i.h,x=0>d.left-i.w,S=d.top+i.h+p.h>=l,w=d.left+i.w+p.w>=r,E,C,A,T,j,N;a=("left"===a||"right"===a)&&x&&w?"top":a,a="top"===a&&y?"bottom":a,a="bottom"===a&&S?"top":a,a="left"===a&&x?"right":a,a="right"===a&&w?"left":a,-1===o.className.indexOf(a)&&(o.className=o.className.replace(/\b(top|bottom|left|right)+/,a)),j=m.offsetWidth,N=m.offsetHeight,"left"===a||"right"===a?(C="left"===a?d.left+c.x-i.w-(u?j:0):d.left+c.x+p.w,h?(E=d.top+c.y,A=p.h/2-j):v?(E=d.top+c.y-i.h+p.h,A=i.h-p.h/2-j):(E=d.top+c.y-i.h/2+p.h/2,A=i.h/2-(u?.9*N:N/2))):("top"===a||"bottom"===a)&&(E="top"===a?d.top+c.y-i.h-(u?N:0):d.top+c.y+p.h,f?(C=0,T=d.left+p.w/2-j):b?(C=r-1.01*i.w,T=i.w-(r-d.left)+p.w/2-j/2):(C=d.left+c.x-i.w/2+p.w/2,T=i.w/2-j/2)),o.style.top=E+"px",o.style.left=C+"px",A&&(m.style.top=A+"px"),T&&(m.style.left=T+"px")};a.version="2.0.26";var C=function(t){t=_(t);var o=this,n=f(t,".alert"),a=function(){g(n,"fade")?S(n,i):i()},s=function(a){n=f(a.target,".alert"),t=_("[data-dismiss=\"alert\"]",n),t&&n&&(t===a.target||t.contains(a.target))&&o.close()},i=function(){w.call(n,"closed","alert"),v(t,"click",s),n.parentNode.removeChild(n)};this.close=function(){n&&t&&g(n,"show")&&(w.call(n,"close","alert"),m(n,"show"),n&&a())},"Alert"in t||b(t,"click",s),t.Alert=o};s.push(["Alert",C,"[data-dismiss=\"alert\"]"]);var A=function(e){e=_(e);var o=!1,n=function(t){var n="LABEL"===t.target.tagName?t.target:"LABEL"===t.target.parentNode.tagName?t.target.parentNode:null;if(n){var a=t.target,s=h(a.parentNode,"btn"),r=n.getElementsByTagName("INPUT")[0];if(r){if("checkbox"===r.type&&(r.checked?(m(n,"active"),r.getAttribute("checked"),r.removeAttribute("checked"),r.checked=!1):(u(n,"active"),r.getAttribute("checked"),r.setAttribute("checked","checked"),r.checked=!0),!o&&(o=!0,w.call(r,"change","button"),w.call(e,"change","button"))),"radio"===r.type&&!o&&!r.checked){u(n,"active"),r.setAttribute("checked","checked"),r.checked=!0,w.call(r,"change","button"),w.call(e,"change","button"),o=!0;for(var l=0,d=s.length;l<d;l++){var c=s[l],p=c.getElementsByTagName("INPUT")[0];c!==n&&g(c,"active")&&(m(c,"active"),p.removeAttribute("checked"),p.checked=!1,w.call(p,"change","button"))}}setTimeout(function(){o=!1},50)}}};"Button"in e||(b(e,"click",n),_("[tabindex]",e)&&b(e,"keyup",function(o){var e=o.which||o.keyCode;32===e&&o.target===t.activeElement&&n(o)}),b(e,"keydown",function(t){var e=t.which||t.keyCode;32===e&&t.preventDefault()}));for(var a=h(e,"btn"),s=a.length,r=0;r<s;r++)!g(a[r],"active")&&_("input:checked",a[r])&&u(a[r],"active");e.Button=this};s.push(["Button",A,"[data-toggle=\"buttons\"]"]);var T=function(e,t){e=_(e),t=t||{};var o=null,n=null,a=this,s=e.getAttribute("data-parent"),i=function(e,t){w.call(e,"show","collapse"),e.isAnimating=!0,u(e,"collapsing"),m(e,"collapse"),e.style.height=e.scrollHeight+"px",S(e,function(){e.isAnimating=!1,e.setAttribute("aria-expanded","true"),t.setAttribute("aria-expanded","true"),m(e,"collapsing"),u(e,"collapse"),u(e,"show"),e.style.height="",w.call(e,"shown","collapse")})},r=function(e,t){w.call(e,"hide","collapse"),e.isAnimating=!0,e.style.height=e.scrollHeight+"px",m(e,"collapse"),m(e,"show"),u(e,"collapsing"),e.offsetWidth,e.style.height="0px",S(e,function(){e.isAnimating=!1,e.setAttribute("aria-expanded","false"),t.setAttribute("aria-expanded","false"),m(e,"collapsing"),u(e,"collapse"),e.style.height="",w.call(e,"hidden","collapse")})},l=function(){var t=e.href&&e.getAttribute("href"),o=e.getAttribute("data-target"),n=t||o&&"#"===o.charAt(0)&&o;return n&&_(n)},d,c;this.toggle=function(t){t.preventDefault(),g(n,"show")?a.hide():a.show()},this.hide=function(){n.isAnimating||(r(n,e),u(e,"collapsed"))},this.show=function(){o&&(d=_(".collapse.show",o),c=d&&(_("[data-target=\"#"+d.id+"\"]",o)||_("[href=\"#"+d.id+"\"]",o))),n.isAnimating&&(!d||d.isAnimating)||(c&&d!==n&&(r(d,c),u(c,"collapsed")),i(n,e),m(e,"collapsed"))},"Collapse"in e||b(e,"click",a.toggle),n=l(),n.isAnimating=!1,o=_(t.parent)||s&&f(e,s),e.Collapse=a};s.push(["Collapse",T,"[data-toggle=\"collapse\"]"]);var j=function(o,n){o=_(o),this.persist=!0===n||"true"===o.getAttribute("data-persist")||!1;var a=this,s=o.parentNode,i=null,r=_(".dropdown-menu",s),l=function(){for(var e=r.children,t=[],o=0;o<e.length;o++)e[o].children.length&&"A"===e[o].children[0].tagName&&t.push(e[o].children[0]),"A"===e[o].tagName&&t.push(e[o]);return t}(),d=function(e){(e.href&&"#"===e.href.slice(-1)||e.parentNode&&e.parentNode.href&&"#"===e.parentNode.href.slice(-1))&&this.preventDefault()},c=function(){var e=o.open?b:v;e(t,"click",h),e(t,"keydown",y),e(t,"keyup",x)},h=function(t){var e=t.target,n=e&&("Dropdown"in e||"Dropdown"in e.parentNode);(e===r||r.contains(e))&&(a.persist||n)||(i=e===o||o.contains(e)?o:null,k(),d.call(t,e))},f=function(t){i=o,S(),d.call(t,t.target)},y=function(t){var e=t.which||t.keyCode;(38===e||40===e)&&t.preventDefault()},x=function(n){var e=n.which||n.keyCode,s=t.activeElement,d=l.indexOf(s),c=s===o,u=r.contains(s),m=s.parentNode===r||s.parentNode.parentNode===r;(m||c)&&(d=c?0:38===e?1<d?d-1:0:40===e?d<l.length-1?d+1:d:d,l[d]&&p(l[d])),(l.length&&m||!l.length&&(u||c)||!u)&&o.open&&27===e&&(a.toggle(),i=null)},S=function(){w.call(s,"show","dropdown",i),u(r,"show"),u(s,"show"),o.setAttribute("aria-expanded",!0),w.call(s,"shown","dropdown",i),o.open=!0,v(o,"click",f),setTimeout(function(){p(r.getElementsByTagName("INPUT")[0]||o),c()},1)},k=function(){w.call(s,"hide","dropdown",i),m(r,"show"),m(s,"show"),o.setAttribute("aria-expanded",!1),w.call(s,"hidden","dropdown",i),o.open=!1,c(),p(o),setTimeout(function(){b(o,"click",f)},1)};o.open=!1,this.toggle=function(){g(s,"show")&&o.open?k():S()},"Dropdown"in o||(!1 in r&&r.setAttribute("tabindex","0"),b(o,"click",f)),o.Dropdown=a};s.push(["Dropdown",j,"[data-toggle=\"dropdown\"]"]);var N=function(o,a){o=_(o);var s=o.getAttribute("data-target")||o.getAttribute("href"),i=_(s),d=g(o,"modal")?o:i;if(g(o,"modal")&&(o=null),!!d){a=a||{},this.keyboard=!1!==a.keyboard&&"false"!==d.getAttribute("data-keyboard"),this.backdrop="static"!==a.backdrop&&"static"!==d.getAttribute("data-backdrop")||"static",this.backdrop=!1!==a.backdrop&&"false"!==d.getAttribute("data-backdrop")&&this.backdrop,this.content=a.content;var c=this,f=null,y=h(n,"fixed-top").concat(h(n,"fixed-bottom")),k=function(){var t=n.getBoundingClientRect();return e.innerWidth||t.right-Math.abs(t.left)},E=function(){var o=e.getComputedStyle(t.body),n=parseInt(o.paddingRight,10),a;if(B&&(t.body.style.paddingRight=n+z+"px",d.style.paddingRight=z+"px",y.length))for(var s=0;s<y.length;s++)a=e.getComputedStyle(y[s]).paddingRight,y[s].style.paddingRight=parseInt(a)+z+"px"},C=function(){if(t.body.style.paddingRight="",d.style.paddingRight="",y.length)for(var e=0;e<y.length;e++)y[e].style.paddingRight=""},A=function(){var e=t.createElement("div"),o;return e.className="modal-scrollbar-measure",t.body.appendChild(e),o=e.offsetWidth-e.clientWidth,t.body.removeChild(e),o},T=function(){B=t.body.clientWidth<k(),z=A()},j=function(){r=1;var e=t.createElement("div");F=_(".modal-backdrop"),null===F&&(e.setAttribute("class","modal-backdrop fade"),F=e,t.body.appendChild(F))},N=function(){F=_(".modal-backdrop"),F&&null!==F&&"object"==typeof F&&(r=0,t.body.removeChild(F),F=null),w.call(d,"hidden","modal")},M=function(){g(d,"show")?b(t,"keydown",P):v(t,"keydown",P)},I=function(){g(d,"show")?b(e,"resize",c.update):v(e,"resize",c.update)},O=function(){g(d,"show")?b(d,"click",q):v(d,"click",q)},R=function(){I(),O(),M(),p(d),w.call(d,"shown","modal",f)},D=function(){d.style.display="",o&&p(o),function(){h(t,"modal show")[0]||(C(),m(t.body,"modal-open"),F&&g(F,"fade")?(m(F,"show"),S(F,N)):N(),I(),O(),M())}()},L=function(t){var e=t.target;e=e.hasAttribute("data-target")||e.hasAttribute("href")?e:e.parentNode,e!==o||g(d,"show")||(d.modalTrigger=o,f=o,c.show(),t.preventDefault())},P=function(t){c.keyboard&&27==t.which&&g(d,"show")&&c.hide()},q=function(t){var e=t.target;g(d,"show")&&("modal"===e.parentNode.getAttribute("data-dismiss")||"modal"===e.getAttribute("data-dismiss")||e===d&&"static"!==c.backdrop)&&(c.hide(),f=null,t.preventDefault())},B,z,F,H;this.toggle=function(){g(d,"show")?this.hide():this.show()},this.show=function(){w.call(d,"show","modal",f);var e=h(t,"modal show")[0];e&&e!==d&&("modalTrigger"in e&&e.modalTrigger.Modal.hide(),"Modal"in e&&e.Modal.hide()),this.backdrop&&!r&&j(),F&&r&&!g(F,"show")&&(F.offsetWidth,H=x(F),u(F,"show")),setTimeout(function(){d.style.display="block",T(),E(),u(t.body,"modal-open"),u(d,"show"),d.setAttribute("aria-hidden",!1),g(d,"fade")?S(d,R):R()},l&&F?H:0)},this.hide=function(){w.call(d,"hide","modal"),F=_(".modal-backdrop"),H=F&&x(F),m(d,"show"),d.setAttribute("aria-hidden",!0),setTimeout(function(){g(d,"fade")?S(d,D):D()},l&&F?H:0)},this.setContent=function(e){_(".modal-content",d).innerHTML=e},this.update=function(){g(d,"show")&&(T(),E())},!o||"Modal"in o||b(o,"click",L),!c.content||c.setContent(c.content),o?(o.Modal=c,d.modalTrigger=o):d.Modal=c}};s.push(["Modal",N,"[data-toggle=\"modal\"]"]);var M=function(o,n){o=_(o),n=n||{};var a=o.getAttribute("data-trigger"),s=o.getAttribute("data-animation"),r=o.getAttribute("data-placement"),l=o.getAttribute("data-dismissible"),d=o.getAttribute("data-delay"),c=o.getAttribute("data-container"),p=_(n.container),h=_(c),y=f(o,".modal"),x=f(o,".fixed-top"),k=f(o,".fixed-bottom");this.template=n.template?n.template:null,this.trigger=n.trigger?n.trigger:a||"hover",this.animation=n.animation&&"fade"!==n.animation?n.animation:s||"fade",this.placement=n.placement?n.placement:r||"top",this.delay=parseInt(n.delay||d)||200,this.dismissible=!!(n.dismissible||"true"===l),this.container=p?p:h?h:x?x:k?k:y?y:t.body;var C=this,A=o.getAttribute("data-title")||null,T=o.getAttribute("data-content")||null;if(T||this.template){var j=null,N=0,M=this.placement,I=function(t){null!==j&&t.target===_(".close",j)&&C.hide()},O=function(){C.container.removeChild(j),N=null,j=null},R=function(){A=n.title||o.getAttribute("data-title")||null,T=n.content||o.getAttribute("data-content")||null,j=t.createElement("div");var e=t.createElement("div");if(e.setAttribute("class","arrow"),j.appendChild(e),null!==T&&null===C.template){if(j.setAttribute("role","tooltip"),null!==A){var a=t.createElement("h3");a.setAttribute("class","popover-header"),a.innerHTML=C.dismissible?A+"<button type=\"button\" class=\"close\">\xD7</button>":A,j.appendChild(a)}var s=t.createElement("div");s.setAttribute("class","popover-body"),s.innerHTML=C.dismissible&&null===A?T+"<button type=\"button\" class=\"close\">\xD7</button>":T,j.appendChild(s)}else{var i=t.createElement("div");i.innerHTML=C.template,j.innerHTML=i.firstChild.innerHTML}C.container.appendChild(j),j.style.display="block",j.setAttribute("class","popover bs-popover-"+M+" "+C.animation)},D=function(){g(j,"show")||u(j,"show")},L=function(){E(o,j,M,C.container)},P=function(n){"click"!=C.trigger&&"focus"!=C.trigger||C.dismissible||n(o,"blur",C.hide),C.dismissible&&n(t,"click",I),n(e,"resize",C.hide)},q=function(){P(b),w.call(o,"shown","popover")},B=function(){P(v),O(),w.call(o,"hidden","popover")};this.toggle=function(){null===j?C.show():C.hide()},this.show=function(){clearTimeout(N),N=setTimeout(function(){null===j&&(M=C.placement,R(),L(),D(),w.call(o,"show","popover"),C.animation?S(j,q):q())},20)},this.hide=function(){clearTimeout(N),N=setTimeout(function(){j&&null!==j&&g(j,"show")&&(w.call(o,"hide","popover"),m(j,"show"),C.animation?S(j,B):B())},C.delay)},"Popover"in o||("hover"===C.trigger?(b(o,i[0],C.show),!C.dismissible&&b(o,i[1],C.hide)):("click"==C.trigger||"focus"==C.trigger)&&b(o,C.trigger,C.toggle)),o.Popover=C}};s.push(["Popover",M,"[data-toggle=\"popover\"]"]);var I=function(e,t){e=_(e);var o=e.getAttribute("data-height");t=t||{},this.height=!!l&&(t.height||"true"===o);var n=this,a=f(e,".nav"),s=!1,i=a&&_(".dropdown-toggle",a),r=function(){s.style.height="",m(s,"collapsing"),a.isAnimating=!1},d=function(){s?E?r():setTimeout(function(){s.style.height=C+"px",s.offsetWidth,S(s,r)},50):a.isAnimating=!1,w.call(p,"shown","tab",v)},c=function(){s&&(y.style.float="left",x.style.float="left",k=y.scrollHeight),u(x,"active"),w.call(p,"show","tab",v),m(y,"active"),w.call(v,"hidden","tab",p),s&&(C=x.scrollHeight,E=C===k,u(s,"collapsing"),s.style.height=k+"px",s.offsetHeight,y.style.float="",x.style.float=""),g(x,"fade")?setTimeout(function(){u(x,"show"),S(x,d)},20):d()},p,v,y,x,k,E,C;if(a){a.isAnimating=!1;var A=function(){var e=h(a,"active"),t;return 1!==e.length||g(e[0].parentNode,"dropdown")?1<e.length&&(t=e[e.length-1]):t=e[0],t},T=function(){return _(A().getAttribute("href"))},j=function(t){t.preventDefault(),p=t.currentTarget,a.isAnimating||g(p,"active")||n.show()};this.show=function(){p=p||e,x=_(p.getAttribute("href")),v=A(),y=T(),a.isAnimating=!0,m(v,"active"),v.setAttribute("aria-selected","false"),u(p,"active"),p.setAttribute("aria-selected","true"),i&&(g(e.parentNode,"dropdown-menu")?!g(i,"active")&&u(i,"active"):g(i,"active")&&m(i,"active")),w.call(v,"hide","tab",p),g(y,"fade")?(m(y,"show"),S(y,c)):c()},"Tab"in e||b(e,"click",j),n.height&&(s=T().parentNode),e.Tab=n}};s.push(["Tab",I,"[data-toggle=\"tab\"]"]);var O=function(e,t){e=_(e),t=t||{};var o=e.getAttribute("data-animation"),n=e.getAttribute("data-autohide"),a=e.getAttribute("data-delay");this.animation=!1===t.animation||"false"===o?0:1,this.autohide=!1===t.autohide||"false"===n?0:1,this.delay=parseInt(t.delay||a)||500;var s=this,i=0,r=f(e,".toast"),l=function(){m(r,"showing"),u(r,"show"),w.call(r,"shown","toast"),s.autohide&&s.hide()},d=function(){u(r,"hide"),w.call(r,"hidden","toast")},c=function(){m(r,"show"),s.animation?S(r,d):d()},p=function(){clearTimeout(i),i=null,u(r,"hide"),v(e,"click",s.hide),e.Toast=null,e=null,r=null};this.show=function(){r&&(w.call(r,"show","toast"),s.animation&&u(r,"fade"),m(r,"hide"),u(r,"showing"),s.animation?S(r,l):l())},this.hide=function(e){r&&g(r,"show")&&(w.call(r,"hide","toast"),e?c():i=setTimeout(c,s.delay))},this.dispose=function(){r&&g(r,"show")&&(m(r,"show"),s.animation?S(r,p):p())},"Toast"in e||b(e,"click",s.hide),e.Toast=s};s.push(["Toast",O,"[data-dismiss=\"toast\"]"]);var R=function(o,n){o=_(o),n=n||{};var a=o.getAttribute("data-animation"),s=o.getAttribute("data-placement"),r=o.getAttribute("data-delay"),l=o.getAttribute("data-container"),d=_(n.container),c=_(l),p=f(o,".modal"),h=f(o,".fixed-top"),y=f(o,".fixed-bottom");this.animation=n.animation&&"fade"!==n.animation?n.animation:a||"fade",this.placement=n.placement?n.placement:s||"top",this.delay=parseInt(n.delay||r)||200,this.container=d?d:c?c:h?h:y?y:p?p:t.body;var x=this,k=0,C=this.placement,A=null,T=o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title");if(T&&""!=T){var j=function(){x.container.removeChild(A),A=null,k=null},N=function(){if(T=o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title"),!T||""==T)return!1;A=t.createElement("div"),A.setAttribute("role","tooltip");var e=t.createElement("div");e.setAttribute("class","arrow"),A.appendChild(e);var n=t.createElement("div");n.setAttribute("class","tooltip-inner"),A.appendChild(n),n.innerHTML=T,x.container.appendChild(A),A.setAttribute("class","tooltip bs-tooltip-"+C+" "+x.animation)},M=function(){E(o,A,C,x.container)},I=function(){g(A,"show")||u(A,"show")},O=function(){b(e,"resize",x.hide),w.call(o,"shown","tooltip")},R=function(){v(e,"resize",x.hide),j(),w.call(o,"hidden","tooltip")};this.show=function(){clearTimeout(k),k=setTimeout(function(){if(null===A){if(C=x.placement,!1==N())return;M(),I(),w.call(o,"show","tooltip"),x.animation?S(A,O):O()}},20)},this.hide=function(){clearTimeout(k),k=setTimeout(function(){A&&g(A,"show")&&(w.call(o,"hide","tooltip"),m(A,"show"),x.animation?S(A,R):R())},x.delay)},this.toggle=function(){A?x.hide():x.show()},"Tooltip"in o||(o.setAttribute("data-original-title",T),o.removeAttribute("title"),b(o,i[0],x.show),b(o,i[1],x.hide)),o.Tooltip=x}};s.push(["Tooltip",R,"[data-toggle=\"tooltip\"]"]);var D=function(e,t){for(var o=0,n=t.length;o<n;o++)new e(t[o])},L=a.initCallback=function(e){e=e||t;for(var o=0,n=s.length;o<n;o++)D(s[o][1],e.querySelectorAll(s[o][2]))};return t.body?L():b(t,"DOMContentLoaded",function(){L()}),{Alert:C,Button:A,Collapse:T,Dropdown:j,Modal:N,Popover:M,Tab:I,Toast:O,Tooltip:R}})}).call(this,o(14))},function(e,t){var n,n;(function d(c,e,t){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof n&&n;if(!o&&r)return n(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,t)}return e[i].exports}for(var s="function"==typeof n&&n,i=0;i<t.length;i++)a(t[i]);return a})({1:[function(e,t,o){function n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}function a(e){return e.replace(_,"&lt;").replace(f,"&gt;")}function s(e){return e.replace(b,"&quot;")}function i(e){return e.replace(v,"\"")}function r(e){return e.replace(y,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function l(e){return e.replace(x,":").replace(S," ")}function d(e){for(var t="",o=0,n=e.length;o<n;o++)t+=32>e.charCodeAt(o)?" ":e.charAt(o);return g.trim(t)}function c(e){return e=i(e),e=r(e),e=l(e),e=d(e),e}function p(e){return e=s(e),e=a(e),e}var u=e("cssfilter").FilterCSS,m=e("cssfilter").getDefaultWhiteList,g=e("./util"),h=new u,_=/</g,f=/>/g,b=/"/g,v=/&quot;/g,y=/&#([a-zA-Z0-9]*);?/gim,x=/&colon;?/gim,S=/&newline;?/gim,w=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,k=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,E=/u\s*r\s*l\s*\(.*/gi;o.whiteList=n(),o.getDefaultWhiteList=n,o.onTag=function(){},o.onIgnoreTag=function(){},o.onTagAttr=function(){},o.onIgnoreTagAttr=function(){},o.safeAttrValue=function(e,t,o,n){if(o=c(o),"href"===t||"src"===t){if(o=g.trim(o),"#"===o)return"#";if("http://"!==o.substr(0,7)&&"https://"!==o.substr(0,8)&&"mailto:"!==o.substr(0,7)&&"tel:"!==o.substr(0,4)&&"#"!==o[0]&&"/"!==o[0])return""}else if("background"===t){if(w.lastIndex=0,w.test(o))return"";}else if("style"===t){if(k.lastIndex=0,k.test(o))return"";if(E.lastIndex=0,E.test(o)&&(w.lastIndex=0,w.test(o)))return"";!1!==n&&(n=n||h,o=n.process(o))}return o=p(o),o},o.escapeHtml=a,o.escapeQuote=s,o.unescapeQuote=i,o.escapeHtmlEntities=r,o.escapeDangerHtml5Entities=l,o.clearNonPrintableCharacter=d,o.friendlyAttrValue=c,o.escapeAttrValue=p,o.onIgnoreTagStripAll=function(){return""},o.StripTagBody=function(e,t){function o(t){return!!n||-1!==g.indexOf(e,t)}"function"!=typeof t&&(t=function(){});var n=!Array.isArray(e),a=[],s=!1;return{onIgnoreTag:function(e,n,i){if(o(e)){if(i.isClosing){var r=i.position+10;return a.push([!1===s?i.position:s,r]),s=!1,"[/removed]"}return s||(s=i.position),"[removed]"}return t(e,n,i)},remove:function(e){var t="",o=0;return g.forEach(a,function(n){t+=e.slice(o,n[0]),o=n[1]}),t+=e.slice(o),t}}},o.stripCommentTag=function(e){return e.replace(/<!--[\s\S]*?-->/g,"")},o.stripBlankChar=function(e){var t=e.split("");return t=t.filter(function(e){var t=e.charCodeAt(0);return 127!==t&&(!(31>=t)||10===t||13===t)}),t.join("")},o.cssFilter=h,o.getDefaultCSSWhiteList=m},{"./util":4,cssfilter:8}],2:[function(e,t,o){function n(e,t){var o=new r(t);return o.process(e)}var a=e("./default"),s=e("./parser"),r=e("./xss");for(var l in o=t.exports=n,o.filterXSS=n,o.FilterXSS=r,a)o[l]=a[l];for(var l in s)o[l]=s[l];"undefined"!=typeof window&&(window.filterXSS=t.exports),function(){return"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}()&&(self.filterXSS=t.exports)},{"./default":1,"./parser":3,"./xss":5}],3:[function(e,t,o){function n(e){var t=p.spaceIndex(e);if(-1===t)var o=e.slice(1,-1);else var o=e.slice(1,t+1);return o=p.trim(o).toLowerCase(),"/"===o.slice(0,1)&&(o=o.slice(1)),"/"===o.slice(-1)&&(o=o.slice(0,-1)),o}function a(e){return"</"===e.slice(0,2)}function s(e,t){for(;t<e.length;t++){var o=e[t];if(" "!==o)return"="===o?t:-1}}function r(e,t){for(;0<t;t--){var o=e[t];if(" "!==o)return"="===o?t:-1}}function l(e){return!(("\""!==e[0]||"\""!==e[e.length-1])&&("'"!==e[0]||"'"!==e[e.length-1]))}function d(e){return l(e)?e.substr(1,e.length-2):e}var p=e("./util");o.parseTag=function(e,t,o){"user strict";var s="",i=0,r=!1,l=!1,d=0,p=e.length,u="",m="";for(d=0;d<p;d++){var g=e.charAt(d);if(!1===r){if("<"===g){r=d;continue}}else if(!1===l){if("<"===g){s+=o(e.slice(i,d)),r=d,i=d;continue}if(">"===g){s+=o(e.slice(i,r)),m=e.slice(r,d+1),u=n(m),s+=t(r,s.length,u,m,a(m)),i=d+1,r=!1;continue}if(("\""===g||"'"===g)&&"="===e.charAt(d-1)){l=g;continue}}else if(g===l){l=!1;continue}}return i<e.length&&(s+=o(e.substr(i))),s},o.parseAttr=function(e,t){"user strict";function o(e,o){if(e=p.trim(e),e=e.replace(/[^a-zA-Z0-9_:\.\-]/gim,"").toLowerCase(),!(1>e.length)){var n=t(e,o||"");n&&a.push(n)}}for(var n=0,a=[],l=!1,u=e.length,m=0;m<u;m++){var g=e.charAt(m),c,h;if(!1===l&&"="===g){l=e.slice(n,m),n=m+1;continue}if(!1!==l&&m===n&&("\""===g||"'"===g)&&"="===e.charAt(m-1))if(h=e.indexOf(g,m+1),-1===h)break;else{c=p.trim(e.slice(n+1,h)),o(l,c),l=!1,m=h,n=m+1;continue}if(/\s|\n|\t/.test(g))if(e=e.replace(/\s|\n|\t/g," "),!1===l){if(h=s(e,m),-1===h){c=p.trim(e.slice(n,m)),o(c),l=!1,n=m+1;continue}else{m=h-1;continue}}else if(h=r(e,m-1),-1===h){c=p.trim(e.slice(n,m)),c=d(c),o(l,c),l=!1,n=m+1;continue}else continue}return n<e.length&&(!1===l?o(e.slice(n)):o(l,d(p.trim(e.slice(n))))),p.trim(a.join(" "))}},{"./util":4}],4:[function(e,t){t.exports={indexOf:function(e,t){var o,n;if(Array.prototype.indexOf)return e.indexOf(t);for(o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},forEach:function(e,t,o){var n,a;if(Array.prototype.forEach)return e.forEach(t,o);for(n=0,a=e.length;n<a;n++)t.call(o,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},{}],5:[function(e,t){function o(e){return e===void 0||null===e}function n(e){var t=p.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};e=p.trim(e.slice(t+1,-1));var o="/"===e[e.length-1];return o&&(e=p.trim(e.slice(0,-1))),{html:e,closing:o}}function a(e){var t={};for(var o in e)t[o]=e[o];return t}function s(e){e=a(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error("Notes: cannot use these two options \"stripIgnoreTag\" and \"onIgnoreTag\" at the same time"),e.onIgnoreTag=r.onIgnoreTagStripAll),e.whiteList=e.whiteList||r.whiteList,e.onTag=e.onTag||r.onTag,e.onTagAttr=e.onTagAttr||r.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||r.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||r.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,e.escapeHtml=e.escapeHtml||r.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new i(e.css))}var i=e("cssfilter").FilterCSS,r=e("./default"),l=e("./parser"),d=l.parseTag,c=l.parseAttr,p=e("./util");s.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,a=t.options,s=a.whiteList,i=a.onTag,l=a.onIgnoreTag,u=a.onTagAttr,m=a.onIgnoreTagAttr,g=a.safeAttrValue,h=a.escapeHtml,_=t.cssFilter;a.stripBlankChar&&(e=r.stripBlankChar(e)),a.allowCommentTag||(e=r.stripCommentTag(e));var f=!1;if(a.stripIgnoreTagBody){var f=r.StripTagBody(a.stripIgnoreTagBody,l);l=f.onIgnoreTag}var b=d(e,function(e,t,a,r,d){var f={sourcePosition:e,position:t,isClosing:d,isWhite:s.hasOwnProperty(a)},b=i(a,r,f);if(!o(b))return b;if(f.isWhite){if(f.isClosing)return"</"+a+">";var v=n(r),y=s[a],x=c(v.html,function(e,t){var n=-1!==p.indexOf(y,e),s=u(a,e,t,n);if(!o(s))return s;if(n)return t=g(a,e,t,_),t?e+"=\""+t+"\"":e;var s=m(a,e,t,n);return o(s)?void 0:s}),r="<"+a;return x&&(r+=" "+x),v.closing&&(r+=" /"),r+=">",r}var b=l(a,r,f);return o(b)?h(r):b},h);return f&&(b=f.remove(b)),b},t.exports=s},{"./default":1,"./parser":3,"./util":4,cssfilter:8}],6:[function(e,t){function o(e){return e===void 0||null===e}function n(e){var t={};for(var o in e)t[o]=e[o];return t}function a(e){e=n(e||{}),e.whiteList=e.whiteList||s.whiteList,e.onAttr=e.onAttr||s.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||s.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||s.safeAttrValue,this.options=e}var s=e("./default"),i=e("./parser"),r=e("./util");a.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,a=n.whiteList,s=n.onAttr,r=n.onIgnoreAttr,l=n.safeAttrValue,d=i(e,function(e,t,n,i,d){var c=a[n],p=!1;if(!0===c?p=c:"function"==typeof c?p=c(i):c instanceof RegExp&&(p=c.test(i)),!0!==p&&(p=!1),i=l(n,i),!!i){var u={position:t,sourcePosition:e,source:d,isWhite:p};if(p){var m=s(n,i,u);return o(m)?n+":"+i:m}var m=r(n,i,u);if(!o(m))return m}});return d},t.exports=a},{"./default":7,"./parser":9,"./util":10}],7:[function(e,t,o){function n(){return{"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1}}o.whiteList=n(),o.getDefaultWhiteList=n,o.onAttr=function(){},o.onIgnoreAttr=function(){},o.safeAttrValue=function(e,t){return /javascript\s*\:/img.test(t)?"":t}},{}],8:[function(e,t,o){function n(e,t){var o=new s(t);return o.process(e)}var a=e("./default"),s=e("./css");for(var r in o=t.exports=n,o.FilterCSS=s,a)o[r]=a[r];"undefined"!=typeof window&&(window.filterCSS=t.exports)},{"./css":6,"./default":7}],9:[function(e,t){var o=e("./util");t.exports=function(e,t){function n(){if(!s){var n=o.trim(e.slice(r,l)),a=n.indexOf(":");if(-1!==a){var i=o.trim(n.slice(0,a)),c=o.trim(n.slice(a+1));if(i){var p=t(r,d.length,i,c,n);p&&(d+=p+"; ")}}}r=l+1}e=o.trimRight(e),";"!==e[e.length-1]&&(e+=";");for(var a=e.length,s=!1,r=0,l=0,d="";l<a;l++){var p=e[l];if("/"===p&&"*"===e[l+1]){var c=e.indexOf("*/",l+2);if(-1===c)break;l=c+1,r=l+1,s=!1}else"("===p?s=!0:")"===p?s=!1:";"===p?s||n():"\n"===p&&n()}return o.trim(d)}},{"./util":10}],10:[function(e,t){t.exports={indexOf:function(e,t){var o,n;if(Array.prototype.indexOf)return e.indexOf(t);for(o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},forEach:function(e,t,o){var n,a;if(Array.prototype.forEach)return e.forEach(t,o);for(n=0,a=e.length;n<a;n++)t.call(o,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},{}]},{},[2]),t.filterXSS=filterXSS,t.filterCSS=filterCSS},function(e){var t=function(){return this}();try{t=t||new Function("return this")()}catch(o){"object"==typeof window&&(t=window)}e.exports=t},function(e,t,o){function n(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?s(e):i(e)}var a=o(29),s=o(336),i=o(337),r=a?a.toStringTag:void 0;e.exports=n},function(e,t,o){var n=o(354),a=o(357);e.exports=function(e,t){var o=a(e,t);return n(o)?o:void 0}},function(e,t,o){(function(t){var n,n;(function(t){e.exports=t()})(function(){return function d(c,e,t){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof n&&n;if(!o&&r)return n(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,t)}return e[i].exports}for(var s="function"==typeof n&&n,i=0;i<t.length;i++)a(t[i]);return a}({1:[function(e,o){(function(e){'use strict';function t(){p=!0;for(var e=c.length,t,o;e;){for(o=c,c=[],t=-1;++t<e;)o[t]();e=c.length}p=!1}function n(e){1!==c.push(e)||p||s()}var a=e.MutationObserver||e.WebKitMutationObserver,s;if(a){var i=0,r=new a(t),l=e.document.createTextNode("");r.observe(l,{characterData:!0}),s=function(){l.data=i=++i%2}}else if(!e.setImmediate&&"undefined"!=typeof e.MessageChannel){var d=new e.MessageChannel;d.port1.onmessage=t,s=function(){d.port2.postMessage(0)}}else s="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var o=e.document.createElement("script");o.onreadystatechange=function(){t(),o.onreadystatechange=null,o.parentNode.removeChild(o),o=null},e.document.documentElement.appendChild(o)}:function(){setTimeout(t,0)};var c=[],p;o.exports=n}).call(this,"undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)},{}],2:[function(e,t){'use strict';function o(){}function n(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,e!==o&&l(this,e)}function a(e,t,o){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof o&&(this.onRejected=o,this.callRejected=this.otherCallRejected)}function s(t,o,n){c(function(){var e;try{e=o(n)}catch(o){return p.reject(t,o)}e===t?p.reject(t,new TypeError("Cannot resolve promise with itself")):p.resolve(t,e)})}function r(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function l(e,t){function o(t){a||(a=!0,p.reject(e,t))}function n(t){a||(a=!0,p.resolve(e,t))}var a=!1,s=d(function(){t(n,o)});"error"===s.status&&o(s.value)}function d(e,t){var o={};try{o.value=e(t),o.status="success"}catch(t){o.status="error",o.value=t}return o}var c=e(1),p={},u=["REJECTED"],m=["FULFILLED"],g=["PENDING"];t.exports=n,n.prototype["catch"]=function(e){return this.then(null,e)},n.prototype.then=function(e,t){if("function"!=typeof e&&this.state===m||"function"!=typeof t&&this.state===u)return this;var n=new this.constructor(o);if(this.state!==g){var i=this.state===m?e:t;s(n,i,this.outcome)}else this.queue.push(new a(n,e,t));return n},a.prototype.callFulfilled=function(e){p.resolve(this.promise,e)},a.prototype.otherCallFulfilled=function(e){s(this.promise,this.onFulfilled,e)},a.prototype.callRejected=function(e){p.reject(this.promise,e)},a.prototype.otherCallRejected=function(e){s(this.promise,this.onRejected,e)},p.resolve=function(e,t){var o=d(r,t);if("error"===o.status)return p.reject(e,o.value);var n=o.value;if(n)l(e,n);else{e.state=m,e.outcome=t;for(var a=-1,s=e.queue.length;++a<s;)e.queue[a].callFulfilled(t)}return e},p.reject=function(e,t){e.state=u,e.outcome=t;for(var o=-1,n=e.queue.length;++o<n;)e.queue[o].callRejected(t);return e},n.resolve=function(e){return e instanceof this?e:p.resolve(new this(o),e)},n.reject=function(e){var t=new this(o);return p.reject(t,e)},n.all=function(e){function t(e,t){function o(e){r[t]=e,++l!==a||s||(s=!0,p.resolve(c,r))}n.resolve(e).then(o,function(e){s||(s=!0,p.reject(c,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var a=e.length,s=!1;if(!a)return this.resolve([]);for(var r=Array(a),l=0,d=-1,c=new this(o);++d<a;)t(e[d],d);return c},n.race=function(e){function t(e){n.resolve(e).then(function(e){s||(s=!0,p.resolve(l,e))},function(e){s||(s=!0,p.reject(l,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var a=e.length,s=!1;if(!a)return this.resolve([]);for(var r=-1,l=new this(o);++r<a;)t(e[r]);return l}},{1:1}],3:[function(e){(function(t){'use strict';"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,"undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)},{2:2}],4:[function(e,t){'use strict';function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(s){if("TypeError"!==s.name)throw s;for(var o="undefined"==typeof BlobBuilder?"undefined"==typeof MSBlobBuilder?"undefined"==typeof MozBlobBuilder?WebKitBlobBuilder:MozBlobBuilder:MSBlobBuilder:BlobBuilder,n=new o,a=0;a<e.length;a+=1)n.append(e[a]);return n.getBlob(t.type)}}function a(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function s(e,t,o){"function"==typeof t&&e.then(t),"function"==typeof o&&e["catch"](o)}function i(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e+=""),e}function r(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function l(e){for(var t=e.length,o=new ArrayBuffer(t),n=new Uint8Array(o),a=0;a<t;a++)n[a]=e.charCodeAt(a);return o}function d(e){return new B(function(t){var o=e.transaction("local-forage-detect-blob-support","readwrite"),a=n([""]);o.objectStore("local-forage-detect-blob-support").put(a,"key"),o.onabort=function(o){o.preventDefault(),o.stopPropagation(),t(!1)},o.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),o=navigator.userAgent.match(/Edge\//);t(o||!e||43<=parseInt(e[1],10))}})["catch"](function(){return!1})}function c(e){return"boolean"==typeof z?B.resolve(z):d(e).then(function(e){return z=e,z})}function p(e){var t=F[e.name],o={};o.promise=new B(function(e,t){o.resolve=e,o.reject=t}),t.deferredOperations.push(o),t.dbReady=t.dbReady?t.dbReady.then(function(){return o.promise}):o.promise}function u(e){var t=F[e.name],o=t.deferredOperations.pop();if(o)return o.resolve(),o.promise}function m(e,t){var o=F[e.name],n=o.deferredOperations.pop();if(n)return n.reject(t),n.promise}function g(t,o){return new B(function(e,n){if(F[t.name]=F[t.name]||k(),t.db)if(o)p(t),t.db.close();else return e(t.db);var a=[t.name];o&&a.push(t.version);var s=q.open.apply(q,a);o&&(s.onupgradeneeded=function(o){var e=s.result;try{e.createObjectStore(t.storeName),1>=o.oldVersion&&e.createObjectStore("local-forage-detect-blob-support")}catch(e){if("ConstraintError"===e.name)console.warn("The database \""+t.name+"\" has been upgraded from version "+o.oldVersion+" to version "+o.newVersion+", but the storage \""+t.storeName+"\" already exists.");else throw e}}),s.onerror=function(t){t.preventDefault(),n(s.error)},s.onsuccess=function(){e(s.result),u(t)}})}function h(e){return g(e,!1)}function _(e){return g(e,!0)}function f(e,t){if(!e.db)return!0;var o=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,a=e.version>e.db.version;if(n&&(e.version!==t&&console.warn("The database \""+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),a||o){if(o){var s=e.db.version+1;s>e.version&&(e.version=s)}return!0}return!1}function b(t){return new B(function(o,n){var a=new FileReader;a.onerror=n,a.onloadend=function(n){var e=btoa(n.target.result||"");o({__local_forage_encoded_blob:!0,data:e,type:t.type})},a.readAsBinaryString(t)})}function v(e){var t=l(atob(e.data));return n([t],{type:e.type})}function y(e){return e&&e.__local_forage_encoded_blob}function x(e){var t=this,o=t._initReady().then(function(){var e=F[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return s(o,e,e),o}function S(e){p(e);for(var t=F[e.name],o=t.forages,n=0,a;n<o.length;n++)a=o[n],a._dbInfo.db&&(a._dbInfo.db.close(),a._dbInfo.db=null);return e.db=null,h(e).then(function(t){return e.db=t,f(e)?_(e):t}).then(function(n){e.db=t.db=n;for(var a=0;a<o.length;a++)o[a]._dbInfo.db=n})["catch"](function(t){throw m(e,t),t})}function w(e,t,o,n){n===void 0&&(n=1);try{var a=e.db.transaction(e.storeName,t);o(null,a)}catch(a){if(0<n&&(!e.db||"InvalidStateError"===a.name||"NotFoundError"===a.name))return B.resolve().then(function(){if(!e.db||"NotFoundError"===a.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),_(e)}).then(function(){return S(e).then(function(){w(e,t,o,n-1)})})["catch"](o);o(a)}}function k(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function E(e){var t=.75*e.length,o=e.length,n=0,a,s,r,l,d;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);var c=new ArrayBuffer(t),u=new Uint8Array(c);for(a=0;a<o;a+=4)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a]),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+1]),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+2]),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+3]),u[n++]=s<<2|r>>4,u[n++]=(15&r)<<4|l>>2,u[n++]=(3&l)<<6|63&d;return c}function C(e){var t=new Uint8Array(e),o="",n;for(n=0;n<t.length;n+=3)o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[t[n]>>2],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t[n])<<4|t[n+1]>>4],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t[n+1])<<2|t[n+2]>>6],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[63&t[n+2]];return 2==t.length%3?o=o.substring(0,o.length-1)+"=":1==t.length%3&&(o=o.substring(0,o.length-2)+"=="),o}function A(e,t,o,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],o,n)}function T(e,o,n,a,s,i){e.executeSql(n,a,s,function(e,r){r.code===r.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[o.storeName],function(e,t){t.rows.length?i(e,r):A(e,o,function(){e.executeSql(n,a,s,i)},i)},i):i(e,r)},i)}function j(e,t,o,n){var s=this;e=i(e);var r=new B(function(a,i){s.ready().then(function(){void 0===t&&(t=null);var r=t,l=s._dbInfo;l.serializer.serialize(t,function(d,c){c?i(c):l.db.transaction(function(o){T(o,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,d],function(){a(r)},function(e,t){i(t)})},function(t){if(t.code===t.QUOTA_ERR){if(0<n)return void a(j.apply(s,[e,r,o,n-1]));i(t)}})})})["catch"](i)});return a(r,o),r}function N(e){return new B(function(o,n){e.transaction(function(a){a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,t){for(var a=[],s=0;s<t.rows.length;s++)a.push(t.rows.item(s).name);o({db:e,storeNames:a})},function(e,t){n(t)})},function(e){n(e)})})}function M(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}function I(e,t){var o=e.name+"/";return e.storeName!==t.storeName&&(o+=e.storeName+"/"),o}function O(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}function R(){return!O()||0<localStorage.length}function D(e,t){e[t]=function(){var o=arguments;return e.ready().then(function(){return e[t].apply(e,o)})}}function L(){for(var e=1,t;e<arguments.length;e++)if(t=arguments[e],t)for(var o in t)t.hasOwnProperty(o)&&(arguments[0][o]=Z(t[o])?t[o].slice():t[o]);return arguments[0]}var P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){}}();"undefined"==typeof Promise&&e(3);var B=Promise,z=void 0,F={},H=Object.prototype.toString,U={_driver:"asyncStorage",_initStorage:function(e){function t(){return B.resolve()}var o=this,n={db:null};if(e)for(var a in e)n[a]=e[a];var s=F[n.name];s||(s=k(),F[n.name]=s),s.forages.push(o),o._initReady||(o._initReady=o.ready,o.ready=x);for(var i=[],r=0,l;r<s.forages.length;r++)l=s.forages[r],l!==o&&i.push(l._initReady()["catch"](t));var d=s.forages.slice(0);return B.all(i).then(function(){return n.db=s.db,h(n)}).then(function(e){return n.db=e,f(n,o._defaultConfig.version)?_(n):e}).then(function(e){n.db=s.db=e,o._dbInfo=n;for(var t=0,a;t<d.length;t++)a=d[t],a!==o&&(a._dbInfo.db=n.db,a._dbInfo.version=n.version)})},_support:function(){try{if(!q)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(e,t){var o=this,n=new B(function(t,n){o.ready().then(function(){w(o._dbInfo,"readonly",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=i.openCursor(),l=1;r.onsuccess=function(){var o=r.result;if(o){var n=o.value;y(n)&&(n=v(n));var a=e(n,o.key,l++);void 0===a?o["continue"]():t(a)}else t()},r.onerror=function(){n(r.error)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},getItem:function(e,t){var o=this;e=i(e);var n=new B(function(t,n){o.ready().then(function(){w(o._dbInfo,"readonly",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=i.get(e);r.onsuccess=function(){var e=r.result;void 0===e&&(e=null),y(e)&&(e=v(e)),t(e)},r.onerror=function(){n(r.error)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},setItem:function(e,t,o){var n=this;e=i(e);var s=new B(function(o,a){var s;n.ready().then(function(){return s=n._dbInfo,"[object Blob]"===H.call(t)?c(s.db).then(function(e){return e?t:b(t)}):t}).then(function(t){w(n._dbInfo,"readwrite",function(s,i){if(s)return a(s);try{var r=i.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var l=r.put(t,e);i.oncomplete=function(){void 0===t&&(t=null),o(t)},i.onabort=i.onerror=function(){var e=l.error?l.error:l.transaction.error;a(e)}}catch(t){a(t)}})})["catch"](a)});return a(s,o),s},removeItem:function(e,t){var o=this;e=i(e);var n=new B(function(t,n){o.ready().then(function(){w(o._dbInfo,"readwrite",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=i["delete"](e);s.oncomplete=function(){t()},s.onerror=function(){n(r.error)},s.onabort=function(){var e=r.error?r.error:r.transaction.error;n(e)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},clear:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){w(t._dbInfo,"readwrite",function(n,a){if(n)return o(n);try{var s=a.objectStore(t._dbInfo.storeName),i=s.clear();a.oncomplete=function(){e()},a.onabort=a.onerror=function(){var e=i.error?i.error:i.transaction.error;o(e)}}catch(t){o(t)}})})["catch"](o)});return a(o,e),o},length:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){w(t._dbInfo,"readonly",function(n,a){if(n)return o(n);try{var s=a.objectStore(t._dbInfo.storeName),i=s.count();i.onsuccess=function(){e(i.result)},i.onerror=function(){o(i.error)}}catch(t){o(t)}})})["catch"](o)});return a(o,e),o},key:function(e,t){var o=this,n=new B(function(t,n){return 0>e?void t(null):void o.ready().then(function(){w(o._dbInfo,"readonly",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=!1,l=i.openCursor();l.onsuccess=function(){var o=l.result;return o?void(0===e?t(o.key):r?t(o.key):(r=!0,o.advance(e))):void t(null)},l.onerror=function(){n(l.error)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},keys:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){w(t._dbInfo,"readonly",function(n,a){if(n)return o(n);try{var s=a.objectStore(t._dbInfo.storeName),i=s.openCursor(),r=[];i.onsuccess=function(){var t=i.result;return t?void(r.push(t.key),t["continue"]()):void e(r)},i.onerror=function(){o(i.error)}}catch(t){o(t)}})})["catch"](o)});return a(o,e),o},dropInstance:function(e,t){t=r.apply(this,arguments);var o=this.config();e="function"!=typeof e&&e||{},e.name||(e.name=e.name||o.name,e.storeName=e.storeName||o.storeName);var n=this,s;if(!e.name)s=B.reject("Invalid arguments");else{var i=e.name===o.name&&n._dbInfo.db,l=i?B.resolve(n._dbInfo.db):h(e).then(function(t){var o=F[e.name],n=o.forages;o.db=t;for(var a=0;a<n.length;a++)n[a]._dbInfo.db=t;return t});s=e.storeName?l.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var o=t.version+1;p(e);var n=F[e.name],a=n.forages;t.close();for(var s=0,r;s<a.length;s++)r=a[s],r._dbInfo.db=null,r._dbInfo.version=o;var l=new B(function(t,n){var a=q.open(e.name,o);a.onerror=function(e){var t=a.result;t.close(),n(e)},a.onupgradeneeded=function(){var t=a.result;t.deleteObjectStore(e.storeName)},a.onsuccess=function(){var e=a.result;e.close(),t(e)}});return l.then(function(e){n.db=e;for(var t=0,o;t<a.length;t++)o=a[t],o._dbInfo.db=e,u(o._dbInfo)})["catch"](function(t){throw(m(e,t)||B.resolve())["catch"](function(){}),t})}}):l.then(function(t){p(e);var o=F[e.name],n=o.forages;t.close();for(var a=0,s;a<n.length;a++)s=n[a],s._dbInfo.db=null;var r=new B(function(t,o){var n=q.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),o(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}});return r.then(function(e){o.db=e;for(var t=0,a;t<n.length;t++)a=n[t],u(a._dbInfo)})["catch"](function(t){throw(m(e,t)||B.resolve())["catch"](function(){}),t})})}return a(s,t),s}},V=/^~~local_forage_type~([^~]+)~/,W="__lfsc__:".length,G=W+"arbf".length,J=Object.prototype.toString,$={serialize:function(t,o){var n="";if(t&&(n=J.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===J.call(t.buffer))){var a="__lfsc__:",s;t instanceof ArrayBuffer?(s=t,a+="arbf"):(s=t.buffer,"[object Int8Array]"===n?a+="si08":"[object Uint8Array]"===n?a+="ui08":"[object Uint8ClampedArray]"===n?a+="uic8":"[object Int16Array]"===n?a+="si16":"[object Uint16Array]"===n?a+="ur16":"[object Int32Array]"===n?a+="si32":"[object Uint32Array]"===n?a+="ui32":"[object Float32Array]"===n?a+="fl32":"[object Float64Array]"===n?a+="fl64":o(new Error("Failed to get type for BinaryArray"))),o(a+C(s))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var e="~~local_forage_type~"+t.type+"~"+C(this.result);o("__lfsc__:blob"+e)},i.readAsArrayBuffer(t)}else try{o(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),o(null,n)}},deserialize:function(e){if(e.substring(0,W)!=="__lfsc__:")return JSON.parse(e);var t=e.substring(G),o=e.substring(W,G),a;if(o==="blob"&&V.test(t)){var s=t.match(V);a=s[1],t=t.substring(s[0].length)}var i=E(t);switch(o){case"arbf":return i;case"blob":return n([i],{type:a});case"si08":return new Int8Array(i);case"ui08":return new Uint8Array(i);case"uic8":return new Uint8ClampedArray(i);case"si16":return new Int16Array(i);case"ur16":return new Uint16Array(i);case"si32":return new Int32Array(i);case"ui32":return new Uint32Array(i);case"fl32":return new Float32Array(i);case"fl64":return new Float64Array(i);default:throw new Error("Unkown type: "+o);}},stringToBuffer:E,bufferToString:C},Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,o={db:null};if(e)for(var n in e)o[n]="string"==typeof e[n]?e[n]:e[n].toString();var a=new B(function(e,n){try{o.db=openDatabase(o.name,o.version+"",o.description,o.size)}catch(t){return n(t)}o.db.transaction(function(a){A(a,o,function(){t._dbInfo=o,e()},function(e,t){n(t)})},n)});return o.serializer=$,a},_support:function(){return"function"==typeof openDatabase}(),iterate:function(e,t){var o=this,n=new B(function(n,a){o.ready().then(function(){var s=o._dbInfo;s.db.transaction(function(o){T(o,s,"SELECT * FROM "+s.storeName,[],function(o,t){for(var a=t.rows,r=a.length,l=0;l<r;l++){var d=a.item(l),c=d.value;if(c&&(c=s.serializer.deserialize(c)),c=e(c,d.key,l+1),void 0!==c)return void n(c)}n()},function(e,t){a(t)})})})["catch"](a)});return a(n,t),n},getItem:function(e,t){var o=this;e=i(e);var n=new B(function(n,a){o.ready().then(function(){var s=o._dbInfo;s.db.transaction(function(o){T(o,s,"SELECT * FROM "+s.storeName+" WHERE key = ? LIMIT 1",[e],function(e,t){var o=t.rows.length?t.rows.item(0).value:null;o&&(o=s.serializer.deserialize(o)),n(o)},function(e,t){a(t)})})})["catch"](a)});return a(n,t),n},setItem:function(e,t,o){return j.apply(this,[e,t,o,1])},removeItem:function(e,t){var o=this;e=i(e);var n=new B(function(t,n){o.ready().then(function(){var a=o._dbInfo;a.db.transaction(function(o){T(o,a,"DELETE FROM "+a.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){n(t)})})})["catch"](n)});return a(n,t),n},clear:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(a){T(a,n,"DELETE FROM "+n.storeName,[],function(){e()},function(e,t){o(t)})})})["catch"](o)});return a(o,e),o},length:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(a){T(a,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],function(o,t){var n=t.rows.item(0).c;e(n)},function(e,t){o(t)})})})["catch"](o)});return a(o,e),o},key:function(e,t){var o=this,n=new B(function(n,a){o.ready().then(function(){var s=o._dbInfo;s.db.transaction(function(o){T(o,s,"SELECT key FROM "+s.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,t){var o=t.rows.length?t.rows.item(0).key:null;n(o)},function(e,t){a(t)})})})["catch"](a)});return a(n,t),n},keys:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(a){T(a,n,"SELECT key FROM "+n.storeName,[],function(o,t){for(var n=[],a=0;a<t.rows.length;a++)n.push(t.rows.item(a).key);e(n)},function(e,t){o(t)})})})["catch"](o)});return a(o,e),o},dropInstance:function(e,t){t=r.apply(this,arguments);var o=this.config();e="function"!=typeof e&&e||{},e.name||(e.name=e.name||o.name,e.storeName=e.storeName||o.storeName);var n=this,s;return s=e.name?new B(function(t){var a;a=e.name===o.name?n._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:a,storeNames:[e.storeName]}):t(N(a))}).then(function(e){return new B(function(t,o){e.db.transaction(function(n){function a(e){return new B(function(t,o){n.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){o(t)})})}for(var s=[],r=0,l=e.storeNames.length;r<l;r++)s.push(a(e.storeNames[r]));B.all(s).then(function(){t()})["catch"](function(t){o(t)})},function(e){o(e)})})}):B.reject("Invalid arguments"),a(s,t),s}},Y={_driver:"localStorageWrapper",_initStorage:function(e){var t=this,o={};if(e)for(var n in e)o[n]=e[n];return(o.keyPrefix=I(e,t._defaultConfig),!R())?B.reject():(t._dbInfo=o,o.serializer=$,B.resolve())},_support:M(),iterate:function(e,t){var o=this,n=o.ready().then(function(){for(var t=o._dbInfo,n=t.keyPrefix,a=n.length,s=localStorage.length,r=1,l=0,d;l<s;l++)if(d=localStorage.key(l),0===d.indexOf(n)){var c=localStorage.getItem(d);if(c&&(c=t.serializer.deserialize(c)),c=e(c,d.substring(a),r++),void 0!==c)return c}});return a(n,t),n},getItem:function(e,t){var o=this;e=i(e);var n=o.ready().then(function(){var t=o._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n});return a(n,t),n},setItem:function(e,t,o){var n=this;e=i(e);var s=n.ready().then(function(){void 0===t&&(t=null);var o=t;return new B(function(a,s){var i=n._dbInfo;i.serializer.serialize(t,function(t,n){if(n)s(n);else try{localStorage.setItem(i.keyPrefix+e,t),a(o)}catch(t){("QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&s(t),s(t)}})})});return a(s,o),s},removeItem:function(e,t){var o=this;e=i(e);var n=o.ready().then(function(){var t=o._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return a(n,t),n},clear:function(e){var t=this,o=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,o=localStorage.length-1,n;0<=o;o--)n=localStorage.key(o),0===n.indexOf(e)&&localStorage.removeItem(n)});return a(o,e),o},length:function(e){var t=this,o=t.keys().then(function(e){return e.length});return a(o,e),o},key:function(e,t){var o=this,n=o.ready().then(function(){var t=o._dbInfo,n;try{n=localStorage.key(e)}catch(e){n=null}return n&&(n=n.substring(t.keyPrefix.length)),n});return a(n,t),n},keys:function(e){var t=this,o=t.ready().then(function(){for(var e=t._dbInfo,o=localStorage.length,n=[],a=0,s;a<o;a++)s=localStorage.key(a),0===s.indexOf(e.keyPrefix)&&n.push(s.substring(e.keyPrefix.length));return n});return a(o,e),o},dropInstance:function(e,t){if(t=r.apply(this,arguments),e="function"!=typeof e&&e||{},!e.name){var o=this.config();e.name=e.name||o.name,e.storeName=e.storeName||o.storeName}var n=this,s;return s=e.name?new B(function(t){e.storeName?t(I(e,n._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1,o;0<=t;t--)o=localStorage.key(t),0===o.indexOf(e)&&localStorage.removeItem(o)}):B.reject("Invalid arguments"),a(s,t),s}},X=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},K=function(e,t){for(var o=e.length,n=0;n<o;){if(X(e[n],t))return!0;n++}return!1},Z=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},ee={},te={},oe={INDEXEDDB:U,WEBSQL:Q,LOCALSTORAGE:Y},ne=[oe.INDEXEDDB._driver,oe.WEBSQL._driver,oe.LOCALSTORAGE._driver],ae=["dropInstance"],se=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ae),ie={description:"",driver:ne.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},re=function(){function e(t){for(var n in o(this,e),oe)if(oe.hasOwnProperty(n)){var a=oe[n],s=a._driver;this[n]=s,ee[s]||this.defineDriver(a)}this._defaultConfig=L({},ie),this._config=L({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)["catch"](function(){})}return e.prototype.config=function(e){if("object"===("undefined"==typeof e?"undefined":P(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"==t&&(e[t]=e[t].replace(/\W/g,"_")),"version"==t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e&&e.driver)||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,o){var n=new B(function(t,o){try{var n=e._driver,s=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void o(s);for(var r=se.concat("_initStorage"),l=0,d=r.length;l<d;l++){var c=r[l],p=!K(ae,c);if((p||e[c])&&"function"!=typeof e[c])return void o(s)}var u=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),o=B.reject(t);return a(o,arguments[arguments.length-1]),o}},o=0,n=ae.length,s;o<n;o++)s=ae[o],e[s]||(e[s]=t(s))};u();var m=function(o){ee[n]&&console.info("Redefining LocalForage driver: "+n),ee[n]=e,te[n]=o,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(m,o):m(!!e._support):m(!0)}catch(t){o(t)}});return s(n,t,o),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,o){var n=ee[e]?B.resolve(ee[e]):B.reject(new Error("Driver not found."));return s(n,t,o),n},e.prototype.getSerializer=function(e){var t=B.resolve($);return s(t,e),t},e.prototype.ready=function(e){var t=this,o=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return s(o,e,e),o},e.prototype.setDriver=function(e,t,o){function n(){r._config.driver=r.driver()}function a(e){return r._extend(e),n(),r._ready=r._initStorage(r._config),r._ready}function i(e){return function(){function t(){for(;o<e.length;){var s=e[o];return o++,r._dbInfo=null,r._ready=null,r.getDriver(s).then(a)["catch"](t)}n();var i=new Error("No available storage method found.");return r._driverSet=B.reject(i),r._driverSet}var o=0;return t()}}var r=this;Z(e)||(e=[e]);var l=this._getSupportedDrivers(e),d=null===this._driverSet?B.resolve():this._driverSet["catch"](function(){return B.resolve()});return this._driverSet=d.then(function(){var e=l[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,n(),r._wrapLibraryMethodsWithReady(),r._initDriver=i(l)})})["catch"](function(){n();var e=new Error("No available storage method found.");return r._driverSet=B.reject(e),r._driverSet}),s(this._driverSet,t,o),this._driverSet},e.prototype.supports=function(e){return!!te[e]},e.prototype._extend=function(e){L(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],o=0,n=e.length,a;o<n;o++)a=e[o],this.supports(a)&&t.push(a);return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=se.length;e<t;e++)D(this,se[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),le=new re;t.exports=le},{3:3}]},{},[4])(4)})}).call(this,o(14))},function(e,t,o){var n=o(40),a=o(48);e.exports=function(e){return null!=e&&a(e.length)&&!n(e)}},function(e,t,o){var n=o(69),a=o(73),s=o(18);e.exports=function(e){return s(e)?n(e):a(e)}},function(e,t,o){var n,a,s;(function(i,r){'use strict';e.exports?e.exports=r(o(110),o(111),o(112)):(a=[o(110),o(111),o(112)],n=r,s="function"==typeof n?n.apply(t,a):n,!(s!==void 0&&(e.exports=s)))})(this,function(e,t,o,n){'use strict';function a(e,t){var o=1<=arguments.length,n=2<=arguments.length;if(!(this instanceof a))return o?n?new a(e,t):new a(e):new a;if(void 0===e){if(o)throw new TypeError("undefined is not a valid argument for URI");e="undefined"==typeof location?"":location.href+""}if(null===e&&o)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0===t?this:this.absoluteTo(t)}function s(e){return /^[0-9]+$/.test(e)}function i(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function r(e){return void 0===e?"Undefined":(Object.prototype.toString.call(e)+"").slice(8,-1)}function d(e){return"Array"===r(e)}function c(e,t){var o={},n,a;if("RegExp"===r(t))o=null;else if(d(t))for(n=0,a=t.length;n<a;n++)o[t[n]]=!0;else o[t]=!0;for(n=0,a=e.length;n<a;n++){var s=o&&void 0!==o[e[n]]||!o&&t.test(e[n]);s&&(e.splice(n,1),a--,n--)}return e}function u(e,t){var o,n;if(d(t)){for(o=0,n=t.length;o<n;o++)if(!u(e,t[o]))return!1;return!0}var a=r(t);for(o=0,n=e.length;o<n;o++)if("RegExp"===a){if("string"==typeof e[o]&&e[o].match(t))return!0;}else if(e[o]===t)return!0;return!1}function m(e,t){if(!d(e)||!d(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var o=0,n=e.length;o<n;o++)if(e[o]!==t[o])return!1;return!0}function g(e){return e.replace(/^\/+|\/+$/g,"")}function h(e){return escape(e)}function _(e){return encodeURIComponent(e).replace(/[!'()*]/g,h).replace(/\*/g,"%2A")}function f(e){return function(t,o){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!o),this)}}function b(e,t){return function(o,n){return void 0===o?this._parts[e]||"":(null!==o&&(o+="",o.charAt(0)===t&&(o=o.substring(1))),this._parts[e]=o,this.build(!n),this)}}var v=n&&n.URI;a.version="1.19.1";var y=a.prototype,l=Object.prototype.hasOwnProperty;a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return"input"===t&&"image"!==e.type?void 0:a.domAttributes[t]}},a.encode=_,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=_,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(e,t){var o=a.encode(e+"");return void 0===t&&(t=a.escapeQuerySpace),t?o.replace(/%20/g,"+"):o},a.decodeQuery=function(t,o){t+="",void 0===o&&(o=a.escapeQuerySpace);try{return a.decode(o?t.replace(/\+/g,"%20"):t)}catch(o){return t}};var p={encode:"encode",decode:"decode"},x=function(e,t){return function(o){try{return a[t](o+"").replace(a.characters[e][t].expression,function(o){return a.characters[e][t].map[o]})}catch(t){return o}}},S;for(S in p)a[S+"PathSegment"]=x("pathname",p[S]),a[S+"UrnPathSegment"]=x("urnpath",p[S]);var w=function(e,t,o){return function(n){var s=o?function(e){return a[t](a[o](e))}:a[t];for(var r=(n+"").split(e),l=0,d=r.length;l<d;l++)r[l]=s(r[l]);return r.join(e)}};a.decodePath=w("/","decodePathSegment"),a.decodeUrnPath=w(":","decodeUrnPathSegment"),a.recodePath=w("/","encodePathSegment","decode"),a.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),a.encodeReserved=x("reserved","encode"),a.parse=function(e,t){var o;return t||(t={preventInvalidHostname:a.preventInvalidHostname}),o=e.indexOf("#"),-1<o&&(t.fragment=e.substring(o+1)||null,e=e.substring(0,o)),o=e.indexOf("?"),-1<o&&(t.query=e.substring(o+1)||null,e=e.substring(0,o)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=a.parseAuthority(e,t)):(o=e.indexOf(":"),-1<o&&(t.protocol=e.substring(0,o)||null,t.protocol&&!t.protocol.match(a.protocol_expression)?t.protocol=void 0:"//"===e.substring(o+1,o+3)?(e=e.substring(o+3),e=a.parseAuthority(e,t)):(e=e.substring(o+1),t.urn=!0))),t.path=e,t},a.parseHost=function(e,o){e||(e=""),e=e.replace(/\\/g,"/");var n=e.indexOf("/"),s,i;if(-1===n&&(n=e.length),"["===e.charAt(0))s=e.indexOf("]"),o.hostname=e.substring(1,s)||null,o.port=e.substring(s+2,n)||null,"/"===o.port&&(o.port=null);else{var r=e.indexOf(":"),l=e.indexOf("/"),d=e.indexOf(":",r+1);-1!==d&&(-1===l||d<l)?(o.hostname=e.substring(0,n)||null,o.port=null):(i=e.substring(0,n).split(":"),o.hostname=i[0]||null,o.port=i[1]||null)}return o.hostname&&"/"!==e.substring(n).charAt(0)&&(n++,e="/"+e),o.preventInvalidHostname&&a.ensureValidHostname(o.hostname,o.protocol),o.port&&a.ensureValidPort(o.port),e.substring(n)||"/"},a.parseAuthority=function(e,t){return e=a.parseUserinfo(e,t),a.parseHost(e,t)},a.parseUserinfo=function(e,o){var n=e.indexOf("/"),s=e.lastIndexOf("@",-1<n?n:e.length-1),i;return-1<s&&(-1===n||s<n)?(i=e.substring(0,s).split(":"),o.username=i[0]?a.decode(i[0]):null,i.shift(),o.password=i[0]?a.decode(i.join(":")):null,e=e.substring(s+1)):(o.username=null,o.password=null),e},a.parseQuery=function(e,t){if(!e)return{};if(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!e)return{};for(var o={},n=e.split("&"),s=n.length,r=0,d,c,p;r<s;r++)d=n[r].split("="),c=a.decodeQuery(d.shift(),t),p=d.length?a.decodeQuery(d.join("="),t):null,l.call(o,c)?(("string"==typeof o[c]||null===o[c])&&(o[c]=[o[c]]),o[c].push(p)):o[c]=p;return o},a.build=function(e){var o="";return e.protocol&&(o+=e.protocol+":"),!e.urn&&(o||e.hostname)&&(o+="//"),o+=a.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&"string"==typeof e.hostname&&(o+="/"),o+=e.path),"string"==typeof e.query&&e.query&&(o+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(o+="#"+e.fragment),o},a.buildHost=function(e){var o="";return e.hostname?(o+=a.ip6_expression.test(e.hostname)?"["+e.hostname+"]":e.hostname,e.port&&(o+=":"+e.port),o):""},a.buildAuthority=function(e){return a.buildUserinfo(e)+a.buildHost(e)},a.buildUserinfo=function(e){var o="";return e.username&&(o+=a.encode(e.username)),e.password&&(o+=":"+a.encode(e.password)),o&&(o+="@"),o},a.buildQuery=function(e,o,n){var s="",r,c,p,u;for(c in e)if(l.call(e,c)&&c)if(d(e[c]))for(r={},p=0,u=e[c].length;p<u;p++)void 0!==e[c][p]&&void 0===r[e[c][p]+""]&&(s+="&"+a.buildQueryParameter(c,e[c][p],n),!0!==o&&(r[e[c][p]+""]=!0));else void 0!==e[c]&&(s+="&"+a.buildQueryParameter(c,e[c],n));return s.substring(1)},a.buildQueryParameter=function(e,t,o){return a.encodeQuery(e,o)+(null===t?"":"="+a.encodeQuery(t,o))},a.addQuery=function(e,t,o){if("object"==typeof t)for(var n in t)l.call(t,n)&&a.addQuery(e,n,t[n]);else if("string"==typeof t){if(void 0===e[t])return void(e[t]=o);"string"==typeof e[t]&&(e[t]=[e[t]]),d(o)||(o=[o]),e[t]=(e[t]||[]).concat(o)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(e,t,o){if("object"==typeof t)for(var n in t)l.call(t,n)&&a.setQuery(e,n,t[n]);else if("string"==typeof t)e[t]=void 0===o?null:o;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(e,t,o){var n,s,p;if(d(t))for(n=0,s=t.length;n<s;n++)e[t[n]]=void 0;else if("RegExp"===r(t))for(p in e)t.test(p)&&(e[p]=void 0);else if("object"==typeof t)for(p in t)l.call(t,p)&&a.removeQuery(e,p,t[p]);else if("string"==typeof t)void 0===o?e[t]=void 0:"RegExp"===r(o)?!d(e[t])&&o.test(e[t])?e[t]=void 0:e[t]=c(e[t],o):e[t]!==o+""||d(o)&&1!==o.length?d(e[t])&&(e[t]=c(e[t],o)):e[t]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(e,t,o,n){switch(r(t)){case"String":break;case"RegExp":for(var s in e)if(l.call(e,s)&&t.test(s)&&(void 0===o||a.hasQuery(e,s,o)))return!0;return!1;case"Object":for(var i in t)if(l.call(t,i)&&!a.hasQuery(e,i,t[i]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(r(o)){case"Undefined":return t in e;case"Boolean":var c=d(e[t])?!!e[t].length:!!e[t];return o===c;case"Function":return!!o(e[t],t,e);case"Array":if(!d(e[t]))return!1;var p=n?u:m;return p(e[t],o);case"RegExp":return d(e[t])?!!n&&u(e[t],o):!!(e[t]&&e[t].match(o));case"Number":o+="";case"String":return d(e[t])?!!n&&u(e[t],o):e[t]===o;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}},a.joinPaths=function(){for(var e=[],t=[],o=0,n=0,r;n<arguments.length;n++){r=new a(arguments[n]),e.push(r);for(var l=r.segment(),d=0;d<l.length;d++)"string"==typeof l[d]&&t.push(l[d]),l[d]&&o++}if(!t.length||!o)return new a("");var c=new a("").segment(t);return(""===e[0].path()||"/"===e[0].path().slice(0,1))&&c.path("/"+c.path()),c.normalize()},a.commonPath=function(e,t){var o=Math.min(e.length,t.length),n;for(n=0;n<o;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return 1>n?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":(("/"!==e.charAt(n)||"/"!==t.charAt(n))&&(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},a.withinString=function(e,t,o){o||(o={});var n=o.start||a.findUri.start,s=o.end||a.findUri.end,i=o.trim||a.findUri.trim,r=o.parens||a.findUri.parens;for(n.lastIndex=0;;){var l=n.exec(e);if(!l)break;var d=l.index;if(o.ignoreHtml){var c=e.slice(Math.max(d-3,0),d);if(c&&/[a-z0-9-]=["']?$/i.test(c))continue}for(var p=d+e.slice(d).search(s),u=e.slice(d,p),m=-1,g,h;g=r.exec(u),!!g;)h=g.index+g[0].length,m=Math.max(m,h);if((u=-1<m?u.slice(0,m)+u.slice(m).replace(i,""):u.replace(i,""),!(u.length<=l[0].length))&&!(o.ignore&&o.ignore.test(u))){p=d+u.length;var _=t(u,d,p,e);if(void 0===_){n.lastIndex=p;continue}_+="",e=e.slice(0,d)+_+e.slice(p),n.lastIndex=d+_.length}}return n.lastIndex=0,e},a.ensureValidHostname=function(t,o){var n=!1;if(!!o&&(n=u(a.hostProtocols,o)),n&&!!!t)throw new TypeError("Hostname cannot be empty, if protocol is "+o);else if(t&&t.match(a.invalid_hostname_characters)){if(!e)throw new TypeError("Hostname \""+t+"\" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available");if(e.toASCII(t).match(a.invalid_hostname_characters))throw new TypeError("Hostname \""+t+"\" contains characters other than [A-Z0-9.-:_]")}},a.ensureValidPort=function(e){if(e){var t=+e;if(!(s(t)&&0<t&&65536>t))throw new TypeError("Port \""+e+"\" is not a valid port")}},a.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=v),this},y.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},y.clone=function(){return new a(this)},y.valueOf=y.toString=function(){return this.build(!1)._string},y.protocol=f("protocol"),y.username=f("username"),y.password=f("password"),y.hostname=f("hostname"),y.port=f("port"),y.query=b("query","?"),y.fragment=b("fragment","#"),y.search=function(e,o){var n=this.query(e,o);return"string"==typeof n&&n.length?"?"+n:n},y.hash=function(e,o){var n=this.fragment(e,o);return"string"==typeof n&&n.length?"#"+n:n},y.pathname=function(e,t){if(void 0===e||!0===e){var o=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?a.decodeUrnPath:a.decodePath)(o):o}return this._parts.path=this._parts.urn?e?a.recodeUrnPath(e):"":e?a.recodePath(e):"/",this.build(!t),this},y.path=y.pathname,y.href=function(e,t){if(void 0===e)return this.toString();this._string="",this._parts=a._parts();var o=e instanceof a,n="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){var s=a.getDomAttribute(e);e=e[s]||"",n=!1}if(!o&&n&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=a.parse(e+"",this._parts);else if(o||n){var i=o?e._parts:e;for(var r in i)"query"!==r&&l.call(this._parts,r)&&(this._parts[r]=i[r]);i.query&&this.query(i.query,!1)}else throw new TypeError("invalid input");return this.build(!t),this},y.is=function(e){var t=!1,n=!1,s=!1,i=!1,r=!1,l=!1,d=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=a.ip4_expression.test(this._parts.hostname),s=a.ip6_expression.test(this._parts.hostname),t=n||s,i=!t,r=i&&o&&o.has(this._parts.hostname),l=i&&a.idn_expression.test(this._parts.hostname),d=i&&a.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return i;case"sld":return r;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return s;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return d;}return null};var k=y.protocol,E=y.port,C=y.hostname;y.protocol=function(e,t){if(e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(a.protocol_expression)))throw new TypeError("Protocol \""+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,e,t)},y.scheme=y.protocol,y.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),a.ensureValidPort(e))),E.call(this,e,t))},y.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var o={preventInvalidHostname:this._parts.preventInvalidHostname},n=a.parseHost(e,o);if("/"!==n)throw new TypeError("Hostname \""+e+"\" contains characters other than [A-Z0-9.-]");e=o.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(e,this._parts.protocol)}return C.call(this,e,t)},y.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var o=this.protocol(),n=this.authority();return n?(o?o+"://":"")+this.authority():""}var s=a(e);return this.protocol(s.protocol()).authority(s.authority()).build(!t),this},y.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildHost(this._parts):"";var o=a.parseHost(e,this._parts);if("/"!==o)throw new TypeError("Hostname \""+e+"\" contains characters other than [A-Z0-9.-]");return this.build(!t),this},y.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildAuthority(this._parts):"";var o=a.parseAuthority(e,this._parts);if("/"!==o)throw new TypeError("Hostname \""+e+"\" contains characters other than [A-Z0-9.-]");return this.build(!t),this},y.userinfo=function(e,o){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=a.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),a.parseUserinfo(e,this._parts),this.build(!o),this},y.resource=function(e,t){var o;return void 0===e?this.path()+this.search()+this.hash():(o=a.parse(e),this._parts.path=o.path,this._parts.query=o.query,this._parts.fragment=o.fragment,this.build(!t),this)},y.subdomain=function(t,o){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var s=this._parts.hostname.length-this.domain().length,e=this._parts.hostname.substring(0,s),r=new RegExp("^"+i(e));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&a.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(r,t),this.build(!o),this},y.domain=function(e,o){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(o=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&2>n.length)return this._parts.hostname;var t=this._parts.hostname.length-this.tld(o).length-1;return t=this._parts.hostname.lastIndexOf(".",t-1)+1,this._parts.hostname.substring(t)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var s=new RegExp(i(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(s,e)}return this.build(!o),this},y.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),a=this._parts.hostname.substring(n+1);return!0!==t&&o&&o.list[a.toLowerCase()]?o.get(this._parts.hostname)||a:a}var s;if(!e)throw new TypeError("cannot set TLD empty");else if(e.match(/[^a-zA-Z0-9-]/)){if(o&&o.is(e))s=new RegExp(i(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e);else throw new TypeError("TLD \""+e+"\" contains characters other than [A-Z0-9]");}else if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");else s=new RegExp(i(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e);return this.build(!t),this},y.directory=function(t,o){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,s=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?a.decodePath(s):s}var r=this._parts.path.length-this.filename().length,e=this._parts.path.substring(0,r),l=new RegExp("^"+i(e));return this.is("relative")||(!t&&(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=a.recodePath(t),this._parts.path=this._parts.path.replace(l,t),this.build(!o),this},y.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var o=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(o+1);return e?a.decodePathSegment(n):n}var s=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(s=!0);var r=new RegExp(i(this.filename())+"$");return e=a.recodePath(e),this._parts.path=this._parts.path.replace(r,e),s?this.normalizePath(t):this.build(!t),this},y.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var o=this.filename(),n=o.lastIndexOf("."),r,l;return-1===n?"":(r=o.substring(n+1),l=/^[a-z0-9%]+$/i.test(r)?r:"",e?a.decodePathSegment(l):l)}"."===e.charAt(0)&&(e=e.substring(1));var d=this.suffix(),c;if(!d){if(!e)return this;this._parts.path+="."+a.recodePath(e)}else c=e?new RegExp(i(d)+"$"):new RegExp(i("."+d)+"$");return c&&(e=a.recodePath(e),this._parts.path=this._parts.path.replace(c,e)),this.build(!t),this},y.segment=function(e,t,o){var n=this._parts.urn?":":"/",a=this.path(),s="/"===a.substring(0,1),r=a.split(n);if(void 0!==e&&"number"!=typeof e&&(o=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error("Bad segment \""+e+"\", must be 0-based integer");if(s&&r.shift(),0>e&&(e=Math.max(r.length+e,0)),void 0===t)return void 0===e?r:r[e];if(null!==e&&void 0!==r[e])t?r[e]=g(t):r.splice(e,1);else if(d(t)){r=[];for(var c=0,p=t.length;c<p;c++)(t[c].length||r.length&&r[r.length-1].length)&&(r.length&&!r[r.length-1].length&&r.pop(),r.push(g(t[c])))}else(t||"string"==typeof t)&&(t=g(t),""===r[r.length-1]?r[r.length-1]=t:r.push(t));return s&&r.unshift(""),this.path(r.join(n),o)},y.segmentCoded=function(e,t,o){var n,s,r;if("number"!=typeof e&&(o=t,t=e,e=void 0),void 0===t){if(n=this.segment(e,t,o),!d(n))n=void 0===n?void 0:a.decode(n);else for(s=0,r=n.length;s<r;s++)n[s]=a.decode(n[s]);return n}if(!d(t))t="string"==typeof t||t instanceof String?a.encode(t):t;else for(s=0,r=t.length;s<r;s++)t[s]=a.encode(t[s]);return this.segment(e,t,o)};var A=y.query;return y.query=function(e,t){if(!0===e)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var o=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,o);return this._parts.query=a.buildQuery(n||o,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=a.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):A.call(this,e,t)},y.setQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0===t?null:t;else if("object"==typeof e)for(var s in e)l.call(e,s)&&(n[s]=e[s]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(o=t),this.build(!o),this},y.addQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(n,e,void 0===t?null:t),this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(o=t),this.build(!o),this},y.removeQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(n,e,t),this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(o=t),this.build(!o),this},y.hasQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(n,e,t,o)},y.setSearch=y.setQuery,y.addSearch=y.addQuery,y.removeSearch=y.removeQuery,y.hasSearch=y.hasQuery,y.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},y.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},y.normalizeHostname=function(o){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!o)),this},y.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},y.normalizePath=function(e){var t=this._parts.path;if(!t)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;t=a.recodePath(t);var o="",n,s,i;for("/"!==t.charAt(0)&&(n=!0,t="/"+t),("/.."===t.slice(-3)||"/."===t.slice(-2))&&(t+="/"),t=t.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),n&&(o=t.substring(1).match(/^(\.\.\/)+/)||"",o&&(o=o[0]));s=t.search(/\/\.\.(\/|$)/),-1!==s;){if(0===s){t=t.substring(3);continue}i=t.substring(0,s).lastIndexOf("/"),-1===i&&(i=s),t=t.substring(0,i)+t.substring(s+3)}return n&&this.is("relative")&&(t=o+t.substring(1)),this._parts.path=t,this.build(!e),this},y.normalizePathname=y.normalizePath,y.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},y.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},y.normalizeSearch=y.normalizeQuery,y.normalizeHash=y.normalizeFragment,y.iso8859=function(){var t=a.encode,e=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=t,a.decode=e}return this},y.unicode=function(){var t=a.encode,e=a.decode;a.encode=_,a.decode=unescape;try{this.normalize()}finally{a.encode=t,a.decode=e}return this},y.readable=function(){var o=this.clone();o.username("").password("").normalize();var n="";if(o._parts.protocol&&(n+=o._parts.protocol+"://"),o._parts.hostname&&(o.is("punycode")&&e?(n+=e.toUnicode(o._parts.hostname),o._parts.port&&(n+=":"+o._parts.port)):n+=o.host()),o._parts.hostname&&o._parts.path&&"/"!==o._parts.path.charAt(0)&&(n+="/"),n+=o.path(!0),o._parts.query){for(var s="",r=0,d=o._parts.query.split("&"),c=d.length,l;r<c;r++)l=(d[r]||"").split("="),s+="&"+a.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==l[1]&&(s+="="+a.decodeQuery(l[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"));n+="?"+s.substring(1)}return n+=a.decodeQuery(o.hash(),!0),n},y.absoluteTo=function(e){var t=this.clone(),o=["protocol","username","password","hostname","port"],n,s,r;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof a||(e=new a(e)),t._parts.protocol)return t;if(t._parts.protocol=e._parts.protocol,this._parts.hostname)return t;for(s=0;r=o[s];s++)t._parts[r]=e._parts[r];return t._parts.path?(".."===t._parts.path.substring(-2)&&(t._parts.path+="/"),"/"!==t.path().charAt(0)&&(n=e.directory(),n=n?n:0===e.path().indexOf("/")?"/":"",t._parts.path=(n?n+"/":"")+t._parts.path,t.normalizePath())):(t._parts.path=e._parts.path,!t._parts.query&&(t._parts.query=e._parts.query)),t.build(),t},y.relativeTo=function(e){var t=this.clone().normalize(),o,n,s,i,r;if(t._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new a(e).normalize(),o=t._parts,n=e._parts,i=t.path(),r=e.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==r.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(o.protocol===n.protocol&&(o.protocol=null),o.username!==n.username||o.password!==n.password)return t.build();if(null!==o.protocol||null!==o.username||null!==o.password)return t.build();if(o.hostname===n.hostname&&o.port===n.port)o.hostname=null,o.port=null;else return t.build();if(i===r)return o.path="",t.build();if(s=a.commonPath(i,r),!s)return t.build();var l=n.path.substring(s.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return o.path=l+o.path.substring(s.length)||"./",t.build()},y.equals=function(e){var t=this.clone(),o=new a(e),n={},s={},i={},r,c,p;if(t.normalize(),o.normalize(),t.toString()===o.toString())return!0;if(r=t.query(),c=o.query(),t.query(""),o.query(""),t.toString()!==o.toString())return!1;if(r.length!==c.length)return!1;for(p in n=a.parseQuery(r,this._parts.escapeQuerySpace),s=a.parseQuery(c,this._parts.escapeQuerySpace),n)if(l.call(n,p)){if(!d(n[p])){if(n[p]!==s[p])return!1;}else if(!m(n[p],s[p]))return!1;i[p]=!0}for(p in s)if(l.call(s,p)&&!i[p])return!1;return!0},y.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},y.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},y.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},a})},function(e,t,o){var n=o(84),a=o(18),s=o(85),i=o(47),r=o(59),l=Math.max;e.exports=function(e,t,o,d){e=a(e)?e:r(e),o=o&&!d?i(o):0;var c=e.length;return 0>o&&(o=l(c+o,0)),s(e)?o<=c&&-1<e.indexOf(t,o):!!c&&-1<n(e,t,o)}},function(e){e.exports=function(e,t){var o=typeof e;return t=null==t?9007199254740991:t,!!t&&("number"==o||"symbol"!=o&&/^(?:0|[1-9]\d*)$/.test(e))&&-1<e&&0==e%1&&e<t}},function(e){e.exports=function(e){return e}},function(e,t,o){var n=o(28);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-(1/0)?"-0":t}},function(e,t,o){e.exports=o(338)},function(e,t,o){e.exports=o(352)},function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],!e.children&&(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,o){var n=o(15),a=o(11);e.exports=function(e){return"symbol"==typeof e||a(e)&&n(e)=="[object Symbol]"}},function(e,t,o){var n=o(5),a=n.Symbol;e.exports=a},function(e){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,o){var n=o(51),a=o(9);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);}var o=n(e.prototype),s=e.apply(o,t);return a(s)?s:o}}},function(e){e.exports=function(e,t){for(var o=-1,n=e.length,a=0,s=[];++o<n;){var i=e[o];(i===t||i==="__lodash_placeholder__")&&(e[o]="__lodash_placeholder__",s[a++]=o)}return s}},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}var a=o(389),s=o(390),i=o(391),r=o(392),l=o(393);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=i,n.prototype.has=r,n.prototype.set=l,e.exports=n},function(e,t,o){var n=o(30);e.exports=function(e,t){for(var o=e.length;o--;)if(n(e[o][0],t))return o;return-1}},function(e,t,o){var n=o(16),a=n(Object,"create");e.exports=a},function(e,t,o){var n=o(407);e.exports=function(e,t){var o=e.__data__;return n(t)?o["string"==typeof t?"string":"hash"]:o.map}},function(e,t,o){var n=o(6),a=o(58),s=o(430),i=o(108);e.exports=function(e,t){return n(e)?e:a(e,t)?[e]:s(i(e))}},function(e,t,o){var n,a,s;(function(i){a=[o(46),o(10)],n=i,s="function"==typeof n?n.apply(t,a):n,!(s!==void 0&&(e.exports=s))})(function(e,t){var o="undefined"!=typeof Element&&Element.prototype||{},n=o.addEventListener?function(e,t){return this.addEventListener(e,t,!1)}:function(e,t){return this.attachEvent("on"+e,t)},a=o.removeEventListener?function(e,t){return this.removeEventListener(e,t,!1)}:function(e,t){return this.detachEvent("on"+e,t)},s=function(e,t){for(var o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},i=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||function(e){var t=(this.parentNode||document).querySelectorAll(e)||[];return~s(t,this)},r=t.View;return t.NativeViewMixin={_domEvents:null,constructor:function(){return this._domEvents=[],r.apply(this,arguments)},$:function(e){return this.el.querySelectorAll(e)},_removeElement:function(){this.undelegateEvents(),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},_setElement:function(t){if("string"!=typeof t)this.el=t&&!e.isElement(t)&&t.length?t[0]:t;else if(/^\s*</.test(t)){var o=document.createElement("div");o.innerHTML=t,this.el=o.firstChild}else this.el=document.querySelector(t)},_setAttributes:function(e){for(var t in e)t in this.el?this.el[t]=e[t]:this.el.setAttribute(t,e[t])},delegate:function(e,t,o){var a=this.el;if(a){if("function"==typeof t&&(o=t,t=null),-1!==["focus","blur"].indexOf(e)){for(var s=this.el.querySelectorAll(t),r=0,l=s.length,d;r<l;r++)d=s[r],n.call(d,e,o,!1),this._domEvents.push({el:d,eventName:e,handler:o});return o}var c=t?function(n){for(var e=n.target||n.srcElement;e&&e!=a;e=e.parentNode)i.call(e,t)&&(n.delegateTarget=e,o(n))}:o;return n.call(this.el,e,c,!1),this._domEvents.push({el:this.el,eventName:e,handler:c,listener:o,selector:t}),c}},undelegate:function(e,t,o){if("function"==typeof t&&(o=t,t=null),this.el)for(var n=this._domEvents.slice(),s=n.length;s--;){var r=n[s],l=r.eventName===e&&(!o||r.listener===o)&&(!t||r.selector===t);l&&(a.call(r.el,r.eventName,r.handler,!1),this._domEvents.splice(s,1))}return this},undelegateEvents:function(){if(this.el){for(var e=0,t=this._domEvents.length,o;e<t;e++)o=this._domEvents[e],a.call(o.el,o.eventName,o.handler,!1);this._domEvents.length=0}return this}},t.NativeView=t.View.extend(t.NativeViewMixin),t.NativeView})},function(){if("function"==typeof Blob&&("undefined"==typeof FormData||!FormData.prototype.keys)){function e([e,t]){return e instanceof Blob&&(e=new File([e],t,{type:e.type,lastModified:e.lastModified})),e}function t(e,t){if(e.length<t)throw new TypeError(`${t} argument required, but only ${e.length} present.`)}function o(e,t,o){return t instanceof Blob?[e+"",t,void 0===o?"string"==typeof t.name?t.name:"blob":o+""]:[e+"",t+""]}function n(e){return e.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n")}function a(e,t){for(let o=0;o<e.length;o++)t(e[o])}const s="object"==typeof window?window:"object"==typeof self?self:this,i=s.FormData,r=s.XMLHttpRequest&&s.XMLHttpRequest.prototype.send,l=s.Request&&s.fetch,d=s.navigator&&s.navigator.sendBeacon,p=s.Symbol&&Symbol.toStringTag;p&&(!Blob.prototype[p]&&(Blob.prototype[p]="Blob"),"File"in s&&!File.prototype[p]&&(File.prototype[p]="File"));try{new File([],"")}catch(e){s.File=function(e,o,n){const a=new Blob(e,n),s=n&&void 0!==n.lastModified?new Date(n.lastModified):new Date;return Object.defineProperties(a,{name:{value:o},lastModifiedDate:{value:s},lastModified:{value:+s},toString:{value(){return"[object File]"}}}),p&&Object.defineProperty(a,p,{value:"File"}),a}}class u{constructor(e){if(this._data=Object.create(null),!e)return this;const t=this;a(e.elements,e=>{if(e.name&&!e.disabled&&"submit"!==e.type&&"button"!==e.type)if("file"===e.type){const o=e.files&&e.files.length?e.files:[new File([],"",{type:"application/octet-stream"})];a(o,o=>{t.append(e.name,o)})}else if("select-multiple"===e.type||"select-one"===e.type)a(e.options,o=>{!o.disabled&&o.selected&&t.append(e.name,o.value)});else if("checkbox"===e.type||"radio"===e.type)e.checked&&t.append(e.name,e.value);else{const o="textarea"===e.type?n(e.value):e.value;t.append(e.name,o)}})}append(e,n,a){t(arguments,2),[e,n,a]=o.apply(null,arguments);const s=this._data;s[e]||(s[e]=[]),s[e].push([n,a])}delete(e){t(arguments,1),delete this._data[e+""]}*entries(){const t=this._data;for(let o in t)for(let n of t[o])yield[o,e(n)]}forEach(e,o){t(arguments,1);for(let[t,n]of this)e.call(o,n,t,this)}get(o){t(arguments,1);const n=this._data;return o+="",n[o]?e(n[o][0]):null}getAll(o){return t(arguments,1),(this._data[o+""]||[]).map(e)}has(e){return t(arguments,1),e+""in this._data}*keys(){for(let[e]of this)yield e}set(){t(arguments,2);const e=o.apply(null,arguments);this._data[e[0]]=[[e[1],e[2]]]}*values(){for(let[,e]of this)yield e}["_asNative"](){const e=new i;for(let[t,o]of this)e.append(t,o);return e}["_blob"](){const e="----formdata-polyfill-"+Math.random(),t=[];for(let[o,n]of this)t.push(`--${e}\r\n`),n instanceof Blob?t.push(`Content-Disposition: form-data; name="${o}"; filename="${n.name}"\r\n`,`Content-Type: ${n.type||"application/octet-stream"}\r\n\r\n`,n,"\r\n"):t.push(`Content-Disposition: form-data; name="${o}"\r\n\r\n${n}\r\n`);return t.push(`--${e}--`),new Blob(t,{type:"multipart/form-data; boundary="+e})}[Symbol.iterator](){return this.entries()}toString(){return"[object FormData]"}}if(p&&(u.prototype[p]="FormData"),r){const e=s.XMLHttpRequest.prototype.setRequestHeader;s.XMLHttpRequest.prototype.setRequestHeader=function(t,o){return"content-type"===t.toLowerCase()&&(this._hasContentType=!0),e.call(this,t,o)},s.XMLHttpRequest.prototype.send=function(e){if(e instanceof u){const t=e._blob();this._hasContentType||this.setRequestHeader("Content-Type",t.type),r.call(this,t)}else r.call(this,e)}}if(l){const e=s.fetch;s.fetch=function(t,o){return o&&o.body&&o.body instanceof u&&(o.body=o.body._blob()),e.call(this,t,o)}}d&&(s.navigator.sendBeacon=function(e,t){return t instanceof u&&(t=t._asNative()),d.call(this,e,t)}),s.FormData=u}},function(e,t,o){var n=o(15),a=o(9);e.exports=function(e){if(!a(e))return!1;var t=n(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"}},function(e,t,o){"use strict";(function(t){(function(){function t(t){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=[],r=0,l=void 0,d=void 0,c=void 0,p=void 0,u=void 0,m=void 0,g=void 0,h=void 0,_=void 0,f=void 0,b=void 0,v=void 0,y=void 0,x=void 0,S=void 0,w=void 0,k=void 0;if(isNaN(t))throw new TypeError("Invalid number");return(c=!0===s.bits,y=!0===s.unix,d=s.base||2,v=void 0===s.round?y?1:2:s.round,g=void 0===s.locale?"":s.locale,h=s.localeOptions||{},x=void 0===s.separator?"":s.separator,S=void 0===s.spacer?y?"":" ":s.spacer,k=s.symbols||{},w=2===d?s.standard||"jedec":"jedec",b=s.output||"string",u=!0===s.fullform,m=s.fullforms instanceof Array?s.fullforms:[],l=void 0===s.exponent?-1:s.exponent,f=+t,_=0>f,p=2<d?1e3:1024,_&&(f=-f),(-1===l||isNaN(l))&&(l=Math.floor(Math.log(f)/Math.log(p)),0>l&&(l=0)),8<l&&(l=8),"exponent"===b)?l:(0===f?(i[0]=0,i[1]=y?"":n[w][c?"bits":"bytes"][l]):(r=f/(2===d?Math.pow(2,10*l):Math.pow(1e3,l)),c&&(r*=8,r>=p&&8>l&&(r/=p,l++)),i[0]=+r.toFixed(0<l?v:0),i[0]===p&&8>l&&void 0===s.exponent&&(i[0]=1,l++),i[1]=10===d&&1===l?c?"kb":"kB":n[w][c?"bits":"bytes"][l],y&&(i[1]="jedec"===w?i[1].charAt(0):0<l?i[1].replace(/B$/,""):i[1],o.test(i[1])&&(i[0]=Math.floor(i[0]),i[1]=""))),_&&(i[0]=-i[0]),i[1]=k[i[1]]||i[1],!0===g?i[0]=i[0].toLocaleString():0<g.length?i[0]=i[0].toLocaleString(g,h):0<x.length&&(i[0]=i[0].toString().replace(".",x)),"array"===b)?i:(u&&(i[1]=m[l]?m[l]:a[w][l]+(c?"bit":"byte")+(1===i[0]?"":"s")),"object"===b?{value:i[0],symbol:i[1]}:i.join(S))}var o=/^(b|B)$/,n={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},a={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};t.partial=function(e){return function(o){return t(o,e)}},e.exports=t})("undefined"==typeof window?t:window)}).call(this,o(14))},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_input.html -->\n<div class=\"form-group\">\n    ","hidden"!==e.type&&(t+="\n        <label for=\""+o(e.id)+"\">"+o(e.label)+"</label>\n    "),t+="\n    ","password"===e.type&&e.fixed_username&&(t+="\n        <!-- This is a hack to prevent Chrome from auto-filling the username in\n            any of the other input fields in the MUC configuration form. -->\n        <input class=\"hidden-username\" type=\"text\" autocomplete=\"username\" value=\""+o(e.fixed_username)+"\"></input>\n    "),t+="\n    <input \n        class=\"form-control\" name=\""+o(e.name)+"\" type=\""+o(e.type)+"\" id=\""+o(e.id)+"\"\n        ",e.autocomplete&&(t+=" autocomplete=\""+o(e.autocomplete)+"\" "),t+="\n        ",e.placeholder&&(t+=" placeholder=\""+o(e.placeholder)+"\" "),t+="\n        ",e.value&&(t+=" value=\""+o(e.value)+"\" "),t+="\n        ",e.required&&(t+=" required=\"required\" "),(t+=" />\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_username.html -->\n<div class=\"form-group\">\n    ",e.label&&(t+="\n    <label>\n        "+o(e.label)+"\n    </label>\n    "),t+="\n    <div class=\"input-group\">\n        <div class=\"input-group-prepend\">\n            <input name=\""+o(e.name)+"\" type=\""+o(e.type)+"\"\n                ",e.value&&(t+=" value=\""+o(e.value)+"\" "),t+="\n                ",e.required&&(t+=" required=\"required\" "),(t+=" />\n            <div class=\"input-group-text col\" title=\""+o(e.domain)+"\">"+o(e.domain)+"</div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(e){var t="",o=Array.prototype.join;return t+="<!-- src/templates/chatbox.html -->\n<div class=\"flyout box-flyout\">\n    <div class=\"chat-body\">\n        <div class=\"chat-content ",e.show_send_button&&(t+="chat-content-sendbutton"),(t+="\" aria-live=\"polite\"></div>\n        <div class=\"bottom-panel\">\n            <div class=\"emoji-picker__container dropup\"></div>\n            <div class=\"message-form-container\">\n        </div>\n    </div>\n</div>\n",t)}},function(e,t){(function(o,n){function a(e){return m.PF.compile(e||"nplurals=2; plural=(n != 1);")}function s(e,t){this._key=e,this._i18n=t}var i=Array.prototype,r=Object.prototype,l=i.slice,d=r.hasOwnProperty,c=i.forEach,p={},u={forEach:function(e,t,o){var n,a,s;if(null!==e)if(c&&e.forEach===c)e.forEach(t,o);else if(e.length===+e.length){for(n=0,a=e.length;n<a;n++)if(n in e&&t.call(o,e[n],n,e)===p)return;}else for(s in e)if(d.call(e,s)&&t.call(o,e[s],s,e)===p)return},extend:function(e){return this.forEach(l.call(arguments,1),function(t){for(var o in t)e[o]=t[o]}),e}},m=function(e){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=u.extend({},this.defaults,e),this.textdomain(this.options.domain),e.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+e.domain+"`")};m.context_delimiter=String.fromCharCode(4),u.extend(s.prototype,{onDomain:function(e){return this._domain=e,this},withContext:function(e){return this._context=e,this},ifPlural:function(e,t){return this._val=e,this._pkey=t,this},fetch:function(e){return"[object Array]"!={}.toString.call(e)&&(e=[].slice.call(arguments,0)),(e&&e.length?m.sprintf:function(e){return e})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),e)}}),u.extend(m.prototype,{translate:function(e){return new s(e,this)},textdomain:function(e){return e?void(this._textdomain=e):this._textdomain},gettext:function(e){return this.dcnpgettext.call(this,n,n,e)},dgettext:function(e,t){return this.dcnpgettext.call(this,e,n,t)},dcgettext:function(e,t){return this.dcnpgettext.call(this,e,n,t)},ngettext:function(e,t,o){return this.dcnpgettext.call(this,n,n,e,t,o)},dngettext:function(e,t,o,a){return this.dcnpgettext.call(this,e,n,t,o,a)},dcngettext:function(e,t,o,a){return this.dcnpgettext.call(this,e,n,t,o,a)},pgettext:function(e,t){return this.dcnpgettext.call(this,n,e,t)},dpgettext:function(e,t,o){return this.dcnpgettext.call(this,e,t,o)},dcpgettext:function(e,t,o){return this.dcnpgettext.call(this,e,t,o)},npgettext:function(e,t,o,a){return this.dcnpgettext.call(this,n,e,t,o,a)},dnpgettext:function(e,t,o,n,a){return this.dcnpgettext.call(this,e,t,o,n,a)},dcnpgettext:function(e,t,o,n,s){n=n||o,e=e||this._textdomain;var i;if(!this.options)return i=new m,i.dcnpgettext.call(i,void 0,void 0,o,n,s);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[e])throw new Error("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])throw new Error("No locale meta information provided.");if(!o)throw new Error("No translation key found.");var r=t?t+m.context_delimiter+o:o,l=this.options.locale_data,d=l[e],c=(l.messages||this.defaults.locale_data.messages)[""],p=d[""].plural_forms||d[""]["Plural-Forms"]||d[""]["plural-forms"]||c.plural_forms||c["Plural-Forms"]||c["plural-forms"],u,g,h;if(void 0===s)h=0;else{if("number"!=typeof s&&(s=parseInt(s,10),isNaN(s)))throw new Error("The number that was passed in is not a number.");h=a(p)(s)}if(!d)throw new Error("No domain named `"+e+"` could be found.");return(u=d[r],!u||h>u.length)?(this.options.missing_key_callback&&this.options.missing_key_callback(r,e),g=[o,n],!0===this.options.debug&&console.log(g[a(p)(s)]),g[a()(s)]):(g=u[h],g?g:(g=[o,n],g[a()(s)]))}});var g=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function t(e,t){for(var o=[];0<t;o[--t]=e);return o.join("")}var o=function(){return o.cache.hasOwnProperty(arguments[0])||(o.cache[arguments[0]]=o.parse(arguments[0])),o.format.call(null,o.cache[arguments[0]],arguments)};return o.format=function(o,n){var a=1,s=o.length,r="",l=[],d,c,p,u,m,h,_;for(c=0;c<s;c++)if(r=e(o[c]),"string"===r)l.push(o[c]);else if("array"===r){if(u=o[c],u[2])for(d=n[a],p=0;p<u[2].length;p++){if(!d.hasOwnProperty(u[2][p]))throw g("[sprintf] property \"%s\" does not exist",u[2][p]);d=d[u[2][p]]}else d=u[1]?n[u[1]]:n[a++];if(/[^s]/.test(u[8])&&"number"!=e(d))throw g("[sprintf] expecting number but found %s",e(d));switch(("undefined"==typeof d||null===d)&&(d=""),u[8]){case"b":d=d.toString(2);break;case"c":d=String.fromCharCode(d);break;case"d":d=parseInt(d,10);break;case"e":d=u[7]?d.toExponential(u[7]):d.toExponential();break;case"f":d=u[7]?parseFloat(d).toFixed(u[7]):parseFloat(d);break;case"o":d=d.toString(8);break;case"s":d=(d+="")&&u[7]?d.substring(0,u[7]):d;break;case"u":d=Math.abs(d);break;case"x":d=d.toString(16);break;case"X":d=d.toString(16).toUpperCase();}d=/[def]/.test(u[8])&&u[3]&&0<=d?"+"+d:d,h=u[4]?"0"==u[4]?"0":u[4].charAt(1):" ",_=u[6]-(d+"").length,m=u[6]?t(h,_):"",l.push(u[5]?d+m:m+d)}return l.join("")},o.cache={},o.parse=function(e){for(var t=e,o=[],n=[],a=0;t;){if(null!==(o=/^[^\x25]+/.exec(t)))n.push(o[0]);else if(null!==(o=/^\x25{2}/.exec(t)))n.push("%");else if(null!==(o=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))){if(o[2]){a|=1;var s=[],i=o[2],r=[];if(null!==(r=/^([a-z_][a-z_\d]*)/i.exec(i))){for(s.push(r[1]);""!==(i=i.substring(r[0].length));)if(null!==(r=/^\.([a-z_][a-z_\d]*)/i.exec(i)))s.push(r[1]);else if(null!==(r=/^\[(\d+)\]/.exec(i)))s.push(r[1]);else throw"[sprintf] huh?";}else throw"[sprintf] huh?";o[2]=s}else a|=2;if(3===a)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";n.push(o)}else throw"[sprintf] huh?";t=t.substring(o[0].length)}return n},o}(),h=function(e,t){return t.unshift(e),g.apply(null,t)};m.parse_plural=function(e,t){return e=e.replace(/n/g,t),m.parse_expression(e)},m.sprintf=function(e,t){return"[object Array]"=={}.toString.call(t)?h(e,[].slice.call(t)):g.apply(this,[].slice.call(arguments))},m.prototype.sprintf=function(){return m.sprintf.apply(this,arguments)},m.PF={},m.PF.parse=function(e){var t=m.PF.extractPluralExpr(e);return m.PF.parser.parse.call(m.PF.parser,t)},m.PF.compile=function(e){function t(e){return!0===e?1:e?e:0}var o=m.PF.parse(e);return function(e){return t(m.PF.interpreter(o)(e))}},m.PF.interpreter=function(e){return function(t){switch(e.type){case"GROUP":return m.PF.interpreter(e.expr)(t);case"TERNARY":return m.PF.interpreter(e.expr)(t)?m.PF.interpreter(e.truthy)(t):m.PF.interpreter(e.falsey)(t);case"OR":return m.PF.interpreter(e.left)(t)||m.PF.interpreter(e.right)(t);case"AND":return m.PF.interpreter(e.left)(t)&&m.PF.interpreter(e.right)(t);case"LT":return m.PF.interpreter(e.left)(t)<m.PF.interpreter(e.right)(t);case"GT":return m.PF.interpreter(e.left)(t)>m.PF.interpreter(e.right)(t);case"LTE":return m.PF.interpreter(e.left)(t)<=m.PF.interpreter(e.right)(t);case"GTE":return m.PF.interpreter(e.left)(t)>=m.PF.interpreter(e.right)(t);case"EQ":return m.PF.interpreter(e.left)(t)==m.PF.interpreter(e.right)(t);case"NEQ":return m.PF.interpreter(e.left)(t)!=m.PF.interpreter(e.right)(t);case"MOD":return m.PF.interpreter(e.left)(t)%m.PF.interpreter(e.right)(t);case"VAR":return t;case"NUM":return e.val;default:throw new Error("Invalid Token found.");}}},m.PF.extractPluralExpr=function(e){e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(e)||(e=e.concat(";"));var t=/nplurals\=(\d+);/,o=e.match(t),n;if(1<o.length)({}).nplurals=o[1];else throw new Error("nplurals not found in plural_forms string: "+e);if(e=e.replace(t,""),n=e.match(/plural\=(.*);/),!(n&&1<n.length))throw new Error("`plural` expression not found: "+e);return n[1]},m.PF.parser=function(){var e={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(e,t,o,n,a,s){var i=s.length-1;switch(a){case 1:return{type:"GROUP",expr:s[i-1]};break;case 2:this.$={type:"TERNARY",expr:s[i-4],truthy:s[i-2],falsey:s[i]};break;case 3:this.$={type:"OR",left:s[i-2],right:s[i]};break;case 4:this.$={type:"AND",left:s[i-2],right:s[i]};break;case 5:this.$={type:"LT",left:s[i-2],right:s[i]};break;case 6:this.$={type:"LTE",left:s[i-2],right:s[i]};break;case 7:this.$={type:"GT",left:s[i-2],right:s[i]};break;case 8:this.$={type:"GTE",left:s[i-2],right:s[i]};break;case 9:this.$={type:"NEQ",left:s[i-2],right:s[i]};break;case 10:this.$={type:"EQ",left:s[i-2],right:s[i]};break;case 11:this.$={type:"MOD",left:s[i-2],right:s[i]};break;case 12:this.$={type:"GROUP",expr:s[i-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:+e};}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(e){throw new Error(e)},parse:function(e){function t(e){a.length-=2*e,s.length-=e,i.length-=e}function o(){var e;return e=n.lexer.lex()||1,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,a=[0],s=[null],i=[],l=this.table,d="",c=0,u=0,m=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var g=this.lexer.yylloc;i.push(g),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var h={},_,f,b,v,y,x,S,w,k;;){b=a[a.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==_&&(_=o()),v=l[b]&&l[b][_]);_handle_error:if("undefined"==typeof v||!v.length||!v[0]){if(!m){for(x in k=[],l[b])this.terminals_[x]&&2<x&&k.push("'"+this.terminals_[x]+"'");var E="";E=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+this.terminals_[_]+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[_]||_,line:this.lexer.yylineno,loc:g,expected:k})}if(3==m){if(1==_)throw new Error(E||"Parsing halted.");u=this.lexer.yyleng,d=this.lexer.yytext,c=this.lexer.yylineno,g=this.lexer.yylloc,_=o()}for(;!(2 .toString()in l[b]);){if(0==b)throw new Error(E||"Parsing halted.");t(1),b=a[a.length-1]}f=_,_=2,b=a[a.length-1],v=l[b]&&l[b][2],m=3}if(v[0]instanceof Array&&1<v.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(v[0]){case 1:a.push(_),s.push(this.lexer.yytext),i.push(this.lexer.yylloc),a.push(v[1]),_=null,f?(_=f,f=null):(u=this.lexer.yyleng,d=this.lexer.yytext,c=this.lexer.yylineno,g=this.lexer.yylloc,0<m&&m--);break;case 2:if(S=this.productions_[v[1]][1],h.$=s[s.length-S],h._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},y=this.performAction.call(h,d,u,c,this.yy,v[1],s,i),"undefined"!=typeof y)return y;S&&(a=a.slice(0,2*(-1*S)),s=s.slice(0,-1*S),i=i.slice(0,-1*S)),a.push(this.productions_[v[1]][0]),s.push(h.$),i.push(h._$),w=l[a[a.length-2]][a[a.length-1]],a.push(w);break;case 3:return!0;}}return!0}},t=function(){return{EOF:1,parseError:function(e,t){if(this.yy.parseError)this.yy.parseError(e,t);else throw new Error(e)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return 20>e.length&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,o;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if(t=this._input.match(this.rules[n[a]]),t)return o=t[0].match(/\n.*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n[a],this.conditionStack[this.conditionStack.length-1]),e?e:void 0;return""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"==typeof e?this.lex():e},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},performAction:function(e,t,o,n){switch(o){case 0:break;case 1:return 20;break;case 2:return 19;break;case 3:return 8;break;case 4:return 9;break;case 5:return 6;break;case 6:return 7;break;case 7:return 11;break;case 8:return 13;break;case 9:return 10;break;case 10:return 12;break;case 11:return 14;break;case 12:return 15;break;case 13:return 16;break;case 14:return 17;break;case 15:return 18;break;case 16:return 5;break;case 17:return"INVALID";}},rules:[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}}}();return e.lexer=t,e}(),e.exports&&(t=e.exports=m),t.Jed=m})(this)},function(e,t,o){var n,a;n=[o(0)],a=function(e){return e.noConflict()}.apply(t,n),!(a!==void 0&&(e.exports=a))},function(e,t,o){var n=o(334);e.exports=function(e){var t=n(e),o=t%1;return t===t?o?t-o:t:0}},function(e){e.exports=function(e){return"number"==typeof e&&-1<e&&0==e%1&&e<=9007199254740991}},function(e){e.exports=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2]);}return e.apply(t,o)}},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length,a=Array(n);++o<n;)a[o]=t(e[o],o,e);return a}},function(e,t,o){var n=o(9),a=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(a)return a(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();e.exports=s},function(e,t,o){function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}var a=o(51),s=o(53);n.prototype=a(s.prototype),n.prototype.constructor=n,e.exports=n},function(e){e.exports=function(){}},function(e){e.exports=function(e){return e.placeholder}},function(e,t,o){var n=o(16),a=o(5),s=n(a,"Map");e.exports=s},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}var a=o(399),s=o(406),i=o(408),r=o(409),l=o(410);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=i,n.prototype.has=r,n.prototype.set=l,e.exports=n},function(e,t,o){var n=o(37),a=o(24);e.exports=function(e,t){t=n(t,e);for(var o=0,s=t.length;null!=e&&o<s;)e=e[a(t[o++])];return o&&o==s?e:void 0}},function(e,t,o){function n(e,t){if(a(e))return!1;var o=typeof e;return!!("number"==o||"symbol"==o||"boolean"==o||null==e||s(e))||r.test(e)||!i.test(e)||null!=t&&e in Object(t)}var a=o(6),s=o(28),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.exports=n},function(e,t,o){var n=o(368),a=o(19);e.exports=function(e){return null==e?[]:n(e,a(e))}},function(e,t,o){var n=o(80),a=o(369),s=o(54),i=o(32),r=n(function(e,t){var o=i(t,s(r));return a(e,32,void 0,t,o)});r.placeholder={},e.exports=r},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/chatboxes.html -->\n<div class=\"converse-chatboxes row no-gutters\"></div>\n<div id=\"converse-modals\" class=\"modals\"></div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/image.html -->\n<a href=\""+o(e.url)+"\" target=\"_blank\" rel=\"noopener\"><img class=\"chat-image img-thumbnail\" src=\""+o(e.url)+"\"/></a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/prompt.html -->\n<div class=\"modal\" tabindex=\"-1\" role=\"dialog\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header "+o(e.level)+"\">\n        <h5 class=\"modal-title\">"+o(e.title)+"</h5>\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n          <span aria-hidden=\"true\">\xD7</span>\n        </button>\n      </div>\n      <div class=\"modal-body\">\n          <form class=\"converse-form converse-form--modal confirm\" action=\"#\">\n            <div class=\"form-group\">\n                ",e.messages.forEach(function(e){t+="\n                    <p>"+o(e)+"</p>\n                "}),t+="\n            </div>\n            ","prompt"===e.type&&(t+="\n              <div class=\"form-group\">\n                  <input type=\"text\" name=\"reason\" class=\"form-control\" placeholder=\""+o(e.placeholder)+"\"/>\n              </div>\n            "),(t+="\n            <div class=\"form-group\">\n                <button type=\"submit\" class=\"btn btn-primary\">"+o(e.__("OK"))+"</button>\n                <input type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\" value=\""+o(e.__("Cancel"))+"\"/>\n            </div>\n        </form>\n      </div>\n    </div>\n  </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/chatbox_minimize.html -->\n<a class=\"chatbox-btn toggle-chatbox-button fa fa-minus\" title=\""+o(e.info_minimize)+"\"></a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_invite.html -->\n<div class=\"suggestion-box room-invite\">\n    <form>\n        ",e.error_message&&(t+=" <div class=\"error error-feedback\">"+o(e.error_message)+"</div> "),(t+="\n        <div class=\"form-group\">\n            <input class=\"form-control invited-contact suggestion-box__input\"\n                   placeholder=\""+o(e.label_invitation)+"\"\n                   type=\"text\"/>\n            <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n        </div>\n    </form>\n    <ul class=\"suggestion-box__results suggestion-box__results--below\" hidden=\"\"></ul>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/rooms_results.html -->\n<li class=\"list-group-item active\">"+o(e.feedback_text)+"</li>\n",t}},function(e,t,o){(function(t){var o="object"==typeof t&&t&&t.Object===Object&&t;e.exports=o}).call(this,o(14))},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!(!1===t(e[o],o,e)););return e}},function(e,t,o){var n=o(343),a=o(70),s=o(6),i=o(71),r=o(22),l=o(72),d=Object.prototype,c=d.hasOwnProperty;e.exports=function(e,t){var o=s(e),d=!o&&a(e),p=!o&&!d&&i(e),u=!o&&!d&&!p&&l(e),m=o||d||p||u,g=m?n(e.length,String):[],h=g.length;for(var _ in e)(t||c.call(e,_))&&!(m&&("length"==_||p&&("offset"==_||"parent"==_)||u&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||r(_,h)))&&g.push(_);return g}},function(e,t,o){var n=o(344),a=o(11),s=Object.prototype,i=s.hasOwnProperty,r=s.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return a(e)&&i.call(e,"callee")&&!r.call(e,"callee")};e.exports=l},function(e,t,o){(function(e){var n=o(5),a=o(345),s=t&&!t.nodeType&&t,i=s&&"object"==typeof e&&e&&!e.nodeType&&e,r=i&&i.exports===s,l=r?n.Buffer:void 0,d=l?l.isBuffer:void 0;e.exports=d||a}).call(this,o(27)(e))},function(e,t,o){var n=o(346),a=o(347),s=o(348),i=s&&s.isTypedArray,r=i?a(i):n;e.exports=r},function(e,t,o){var n=o(74),a=o(349),s=Object.prototype,i=s.hasOwnProperty;e.exports=function(e){if(!n(e))return a(e);var t=[];for(var o in Object(e))i.call(e,o)&&"constructor"!=o&&t.push(o);return t}},function(e){var t=Object.prototype;e.exports=function(e){var o=e&&e.constructor,n="function"==typeof o&&o.prototype||t;return e===n}},function(e){e.exports=function(e,t){return function(o){return e(t(o))}}},function(e,t,o){function n(e,t,o){var n=e[t];r.call(e,t)&&s(n,o)&&(o!==void 0||t in e)||a(e,t,o)}var a=o(77),s=o(30),i=Object.prototype,r=i.hasOwnProperty;e.exports=n},function(e,t,o){var n=o(78);e.exports=function(e,t,o){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},function(e,t,o){var n=o(16),a=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},function(e){var t=Function.prototype,o=t.toString;e.exports=function(e){if(null!=e){try{return o.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t,o){var n=o(23),a=o(359),s=o(81);e.exports=function(e,t){return s(a(e,t,n),e+"")}},function(e,t,o){var n=o(360),a=o(82),s=a(n);e.exports=s},function(e){var t=Date.now;e.exports=function(e){var o=0,n=0;return function(){var a=t(),s=16-(a-n);if(n=a,!(0<s))o=0;else if(800<=++o)return arguments[0];return e.apply(void 0,arguments)}}},function(e,t,o){var n=o(69),a=o(363),s=o(18);e.exports=function(e){return s(e)?n(e,!0):a(e)}},function(e,t,o){var n=o(365),a=o(366),s=o(367);e.exports=function(e,t,o){return t===t?s(e,t,o):n(e,a,o)}},function(e,t,o){var n=o(15),a=o(6),s=o(11);e.exports=function(e){return"string"==typeof e||!a(e)&&s(e)&&n(e)=="[object String]"}},function(e,t,o){var n=o(23),a=o(87),s=a?function(e,t){return a.set(e,t),e}:n;e.exports=s},function(e,t,o){var n=o(88),a=n&&new n;e.exports=a},function(e,t,o){var n=o(16),a=o(5),s=n(a,"WeakMap");e.exports=s},function(e,t,o){function n(e,t,o,m,g,h,_,f,b,v){function y(){for(var A=arguments.length,T=Array(A),j=A;j--;)T[j]=arguments[j];if(k)var N=d(y),M=i(T,N);if(m&&(T=a(T,m,g,k)),h&&(T=s(T,h,_,k)),A-=M,k&&A<v){var I=p(T,N);return l(e,t,n,y.placeholder,o,T,I,f,b,v-A)}var O=S?o:this,R=w?O[e]:e;return A=T.length,f?T=c(T,f):E&&1<A&&T.reverse(),x&&b<A&&(T.length=b),this&&this!==u&&this instanceof y&&(R=C||r(R)),R.apply(O,T)}var x=t&128,S=t&1,w=t&2,k=t&24,E=t&512,C=w?void 0:r(e);return y}var a=o(90),s=o(91),i=o(372),r=o(31),l=o(92),d=o(54),c=o(383),p=o(32),u=o(5);e.exports=n},function(e){var t=Math.max;e.exports=function(e,o,n,a){for(var s=-1,i=e.length,r=n.length,l=-1,d=o.length,c=t(i-r,0),p=Array(d+c),u=!a;++l<d;)p[l]=o[l];for(;++s<r;)(u||s<i)&&(p[n[s]]=e[s]);for(;c--;)p[l++]=e[s++];return p}},function(e){var t=Math.max;e.exports=function(e,o,n,a){for(var s=-1,i=e.length,r=-1,l=n.length,d=-1,c=o.length,p=t(i-l,0),u=Array(p+c),m=!a;++s<p;)u[s]=e[s];for(var g=s;++d<c;)u[g+d]=o[d];for(;++r<l;)(m||s<i)&&(u[g+n[r]]=e[s++]);return u}},function(e,t,o){var n=o(373),a=o(96),s=o(97);e.exports=function(e,t,o,i,r,l,d,c,p,u){var m=8&t,g=m?d:void 0,h=m?void 0:d,_=m?l:void 0,f=m?void 0:l;t|=m?32:64,t&=~(m?64:32),4&t||(t&=-4);var b=[e,t,r,_,g,f,h,c,p,u],v=o.apply(void 0,b);return n(e)&&a(v,b),v.placeholder=i,s(v,e,t)}},function(e,t,o){var n=o(87),a=o(374),s=n?function(e){return n.get(e)}:a;e.exports=s},function(e,t,o){function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var a=o(51),s=o(53);n.prototype=a(s.prototype),n.prototype.constructor=n,e.exports=n},function(e){e.exports=function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o<n;)t[o]=e[o];return t}},function(e,t,o){var n=o(86),a=o(82),s=a(n);e.exports=s},function(e,t,o){var n=o(379),a=o(380),s=o(81),i=o(381);e.exports=function(e,t,o){var r=t+"";return s(e,a(r,i(n(r),o)))}},function(e,t,o){function n(e){var t=this.__data__=new a(e);this.size=t.size}var a=o(33),s=o(394),i=o(395),r=o(396),l=o(397),d=o(398);n.prototype.clear=s,n.prototype["delete"]=i,n.prototype.get=r,n.prototype.has=l,n.prototype.set=d,e.exports=n},function(e,t,o){function n(e,t,o,i,r){return!(e!==t)||(null!=e&&null!=t&&(s(e)||s(t))?a(e,t,o,i,n,r):e!==e&&t!==t)}var a=o(411),s=o(11);e.exports=n},function(e,t,o){var n=o(412),a=o(415),s=o(416);e.exports=function(e,t,o,i,r,l){var d=1&o,c=e.length,p=t.length;if(c!=p&&!(d&&p>c))return!1;var u=l.get(e);if(u&&l.get(t))return u==t;var m=-1,g=!0,h=2&o?new n:void 0;for(l.set(e,t),l.set(t,e);++m<c;){var _=e[m],f=t[m];if(i)var b=d?i(f,_,m,t,e,l):i(_,f,m,e,t,l);if(void 0!==b){if(b)continue;g=!1;break}if(h){if(!a(t,function(e,t){if(!s(h,t)&&(_===e||r(_,e,o,i,l)))return h.push(t)})){g=!1;break}}else if(!(_===f||r(_,f,o,i,l))){g=!1;break}}return l["delete"](e),l["delete"](t),g}},function(e,t,o){var n=o(102),a=o(6);e.exports=function(e,t,o){var s=t(e);return a(e)?s:n(s,o(e))}},function(e){e.exports=function(e,t){for(var o=-1,n=t.length,a=e.length;++o<n;)e[a+o]=t[o];return e}},function(e,t,o){var n=o(423),a=o(104),s=Object.prototype,i=s.propertyIsEnumerable,r=Object.getOwnPropertySymbols,l=r?function(e){return null==e?[]:(e=Object(e),n(r(e),function(t){return i.call(e,t)}))}:a;e.exports=l},function(e){e.exports=function(){return[]}},function(e,t,o){var n=o(424),a=o(55),s=o(425),i=o(426),r=o(88),l=o(15),d=o(79),c="[object Map]",p="[object Promise]",u="[object Set]",m="[object WeakMap]",g="[object DataView]",h=d(n),_=d(a),f=d(s),b=d(i),v=d(r),y=l;(n&&y(new n(new ArrayBuffer(1)))!=g||a&&y(new a)!=c||s&&y(s.resolve())!=p||i&&y(new i)!=u||r&&y(new r)!=m)&&(y=function(e){var t=l(e),o=t=="[object Object]"?e.constructor:void 0,n=o?d(o):"";if(n)switch(n){case h:return g;case _:return c;case f:return p;case b:return u;case v:return m;}return t}),e.exports=y},function(e,t,o){var n=o(9);e.exports=function(e){return e===e&&!n(e)}},function(e){e.exports=function(e,t){return function(o){return null!=o&&o[e]===t&&(t!==void 0||e in Object(o))}}},function(e,t,o){var n=o(433);e.exports=function(e){return null==e?"":n(e)}},function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,o){(function(e,n){var a;(function(s){function r(e){throw new RangeError(x[e])}function l(e,t){for(var o=e.length,n=[];o--;)n[o]=t(e[o]);return n}function d(e,t){var o=e.split("@"),n="";1<o.length&&(n=o[0]+"@",e=o[1]),e=e.replace(y,".");var a=e.split("."),s=l(a,t).join(".");return n+s}function c(e){for(var t=[],o=0,n=e.length,a,s;o<n;)a=e.charCodeAt(o++),55296<=a&&56319>=a&&o<n?(s=e.charCodeAt(o++),56320==(64512&s)?t.push(((1023&a)<<10)+(1023&s)+65536):(t.push(a),o--)):t.push(a);return t}function p(e){return l(e,function(e){var t="";return 65535<e&&(e-=65536,t+=w(55296|1023&e>>>10),e=56320|1023&e),t+=w(e),t}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:36}function m(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function g(e,t,o){var n=0;for(e=o?S(e/700):e>>1,e+=S(e/t);e>455;n+=36)e=S(e/35);return S(n+36*e/(e+38))}function h(e){var o=[],a=e.length,s=0,l=128,d=72,c,m,h,_,f,b,v,y,x,E;for(m=e.lastIndexOf("-"),0>m&&(m=0),h=0;h<m;++h)128<=e.charCodeAt(h)&&r("not-basic"),o.push(e.charCodeAt(h));for(_=0<m?m+1:0;_<a;){for(f=s,b=1,v=36;;v+=36){if(_>=a&&r("invalid-input"),y=u(e.charCodeAt(_++)),(36<=y||y>S((2147483647-s)/b))&&r("overflow"),s+=y*b,x=v<=d?1:v>=d+26?26:v-d,y<x)break;E=36-x,b>S(2147483647/E)&&r("overflow"),b*=E}c=o.length+1,d=g(s-f,c,0==f),S(s/c)>2147483647-l&&r("overflow"),l+=S(s/c),s%=c,o.splice(s++,0,l)}return p(o)}function _(e){var o=[],a,s,i,l,d,p,u,h,_,f,b,v,y,x,E;for(e=c(e),v=e.length,a=128,s=0,d=72,p=0;p<v;++p)b=e[p],128>b&&o.push(w(b));for(i=l=o.length,l&&o.push("-");i<v;){for(u=2147483647,p=0;p<v;++p)b=e[p],b>=a&&b<u&&(u=b);for(y=i+1,u-a>S((2147483647-s)/y)&&r("overflow"),s+=(u-a)*y,a=u,p=0;p<v;++p)if(b=e[p],b<a&&2147483647<++s&&r("overflow"),b==a){for(h=s,_=36;;_+=36){if(f=_<=d?1:_>=d+26?26:_-d,h<f)break;E=h-f,x=36-f,o.push(w(m(f+E%x,0))),h=S(E/x)}o.push(w(m(h,0))),d=g(s,y,i==l),s=0,++i}++s,++a}return o.join("")}var f=t&&!t.nodeType&&t,b=e&&!e.nodeType&&e,v="object"==typeof n&&n;(v.global===v||v.window===v||v.self===v)&&(s=v);var y=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=Math.floor,w=String.fromCharCode,k;k={version:"1.3.2",ucs2:{decode:c,encode:p},decode:h,encode:_,toASCII:function(e){return d(e,function(e){return /[^\x20-\x7E]/.test(e)?"xn--"+_(e):e})},toUnicode:function(e){return d(e,function(e){return /^xn--/.test(e)?h(e.slice(4).toLowerCase()):e})}},a=function(){return k}.call(t,o,t,e),!(a!==void 0&&(e.exports=a))})(this)}).call(this,o(27)(e),o(14))},function(e,t,o){var n,a;(function(s,i){'use strict';e.exports?e.exports=i():(n=i,a="function"==typeof n?n.call(t,o,t,e):n,!(a!==void 0&&(e.exports=a)))})(this,function(e){'use strict';var t=e&&e.IPv6;return{best:function(e){var t=e.toLowerCase(),o=t.split(":"),n=o.length,a=8;""===o[0]&&""===o[1]&&""===o[2]?(o.shift(),o.shift()):""===o[0]&&""===o[1]?o.shift():""===o[n-1]&&""===o[n-2]&&o.pop(),n=o.length,-1!==o[n-1].indexOf(".")&&(a=7);var s;for(s=0;s<n&&""!==o[s];s++);if(s<a)for(o.splice(s,1,"0000");o.length<a;)o.splice(s,0,"0000");for(var r=0,l;r<a;r++){l=o[r].split("");for(var d=0;3>d&&"0"===l[0]&&1<l.length;d++)l.splice(0,1);o[r]=l.join("")}var c=-1,p=0,u=0,m=-1,g=!1;for(r=0;r<a;r++)g?"0"===o[r]?u+=1:(g=!1,u>p&&(c=m,p=u)):"0"===o[r]&&(g=!0,m=r,u=1);u>p&&(c=m,p=u),1<p&&o.splice(c,p,""),n=o.length;var h="";for(""===o[0]&&(h=":"),r=0;r<n&&(h+=o[r],r!=n-1);r++)h+=":";return""===o[n-1]&&(h+=":"),h},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}})},function(e,t,o){var n,a;(function(s,i){'use strict';e.exports?e.exports=i():(n=i,a="function"==typeof n?n.call(t,o,t,e):n,!(a!==void 0&&(e.exports=a)))})(this,function(e){'use strict';var t=e&&e.SecondLevelDomains,o={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(0>=n||n>=t-1)return!1;var a=o.list[e.slice(t+1)];return!!a&&0<=a.indexOf(" "+e.slice(n+1,t)+" ")},is:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(0<=n)return!1;var a=o.list[e.slice(t+1)];return!!a&&0<=a.indexOf(" "+e.slice(0,t)+" ")},get:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(0>=n||n>=t-1)return null;var a=o.list[e.slice(t+1)];return a?0>a.indexOf(" "+e.slice(n+1,t)+" ")?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return o})},function(e,t,o){var n=n||{},a,s,i;n.nativeview=o(38),function(n,r){s=[o(450),o(451),o(452),o(453),o(454),o(455),o(456),o(46),o(10)],a=r,i="function"==typeof a?a.apply(t,s):a,!(i!==void 0&&(e.exports=i))}(this,function(e,t,o,n,a,s,i,r,l){"use strict";function d(e){if("string"!=typeof e)throw new Error("Invalid parameter type in parseHTMLToDOM");if(!("DOMParser"in window))throw new Error("DOMParser is not available, so parsing string to DOM node is not possible.");if(!e)return document.createTextNode("");c=c||new DOMParser;const t=c.parseFromString(e,"text/html");return t.body.firstChild?t.getElementsByTagName("body")[0].firstChild:t.head.firstChild&&("TITLE"!==t.head.firstChild.tagName||t.title)?t.head.firstChild:t.firstChild&&"HTML"!==t.firstChild.tagName?t.firstChild:document.createTextNode("")}let c=new DOMParser;const p=e.init([t.default,o.default,n.default,a.default,s.default]),u=r.isUndefined(l.NativeView)?l.View:l.NativeView;return l.VDOMView=u.extend({updateEventListeners(e,t){this.setElement(t.elm)},render(){r.isFunction(this.beforeRender)&&this.beforeRender();const e=i.toVNode(d(this.toHTML()));e.data.hook=r.extend({create:this.updateEventListeners.bind(this),update:this.updateEventListeners.bind(this)});const t=this.vnode?this.vnode.elm:this.el;return t.outerHTML!==e.elm.outerHTML&&(this.vnode=p(this.vnode||this.el,e)),r.isFunction(this.afterRender)&&this.afterRender(),this}}),l.VDOMView})},function(o){!function(n,e){o.exports=e()}(this,function(){"use strict";return function(a,e,t){var s=e.prototype,l=s.format;t.en.ordinal=function(o){var e=["th","st","nd","rd"],t=o%100;return"["+o+(e[(t-20)%10]||e[t]||e[0])+"]"},s.format=function(o){var a=this,t=this.$locale(),s=this.$utils(),e=(o||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|gggg|Do|X|x|k{1,2}|S/g,function(o){return"Q"===o?Math.ceil((a.$M+1)/3):"Do"===o?t.ordinal(a.$D):"gggg"===o?a.weekYear():"wo"===o?t.ordinal(a.week(),"W"):"k"===o||"kk"===o?s.s((0===a.$H?24:a.$H)+"","k"===o?1:2,"0"):"X"===o?Math.floor(a.$d.getTime()/1e3):"x"===o?a.$d.getTime():o});return l.bind(this)(e)}}})},function(e,t,o){var a=o(333),s=o(47);e.exports=function(e,t,o){var i=null==e?0:e.length;return i?(t=o||void 0===t?1:s(t),a(e,0>t?0:t,i)):[]}},function(e,t,o){var n=o(15),a=o(11);e.exports=function(e){return!0===e||!1===e||a(e)&&n(e)=="[object Boolean]"}},function(e){e.exports=function(e){return null==e}},function(e,t,o){var n=o(50),a=o(386),s=o(439),i=o(441);e.exports=function(e,t){if(null==e)return{};var o=n(i(e),function(e){return[e]});return t=a(t),s(e,o,function(e,o){return t(e,o[0])})}},function(e,t,o){var n=o(73),a=o(105),s=o(18),i=o(85),r=o(444);e.exports=function(e){if(null==e)return 0;if(s(e))return i(e)?r(e):e.length;var t=a(e);return"[object Map]"==t||"[object Set]"==t?e.size:n(e).length}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/headless/templates/field.html -->\n<field var=\""+o(e.name)+"\">\n",e.value.constructor===Array?(t+="\n    ",e.value.forEach(function(e){t+="<value>"+o(e)+"</value>"}),t+="\n"):t+="\n    <value>"+o(e.value)+"</value>\n",(t+="</field>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/avatar.svg -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" class=\""+o(e.classes)+"\" width=\""+o(e.width)+"\" height=\""+o(e.height)+"\">\n    <image width=\""+o(e.width)+"\" height=\""+o(e.height)+"\" preserveAspectRatio=\"xMidYMid meet\" xlink:href=\""+o(e.image)+"\"/>\n</svg>\n",t}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/background_logo.html -->\n<div class=\"inner-content converse-brand row\">\n    <div class=\"converse-brand__padding\"></div>\n    <div class=\"converse-brand__heading\">\n        <svg height=\"200px\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n            viewBox=\"0 0 364 364\"\n            version=\"1.1\">\n            <title>Logo Converse</title>\n            <defs>\n                <linearGradient id=\"gradient\" x1=\"92.14\" y1=\"27.64\" x2=\"267.65\" y2=\"331.62\" gradientUnits=\"userSpaceOnUse\">\n                    <stop offset=\"0\" stop-color=\"#fff1d1\"/>\n                    <stop offset=\"0.05\" stop-color=\"#fae8c1\"/>\n                    <stop offset=\"0.15\" stop-color=\"#f0d5a1\"/>\n                    <stop offset=\"0.27\" stop-color=\"#e7c687\"/>\n                    <stop offset=\"0.4\" stop-color=\"#e1bb72\"/>\n                    <stop offset=\"0.54\" stop-color=\"#dcb264\"/>\n                    <stop offset=\"0.71\" stop-color=\"#daad5c\"/>\n                    <stop offset=\"1\" stop-color=\"#d9ac59\"/>\n                </linearGradient>\n                <filter id=\"shadow\">\n                    <feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"2.3\" result=\"blur1\"/>\n                    <feOffset in=\"blur1\" dx=\"3\" dy=\"3\" result=\"blur2\"/>\n                    <feColorMatrix in=\"blur2\" type=\"matrix\" result=\"blur3\"\n                        values=\"1 0 0 0 0.1\n                                0 1 0 0 0.1\n                                0 0 1 0 0.1\n                                0 0 0 1 0\"/>\n                    <feMerge>\n                        <feMergeNode in=\"blur3\"/>\n                        <feMergeNode in=\"SourceGraphic\"/>\n                    </feMerge>\n                </filter>\n            </defs>\n            <g filter=\"url(#shadow)\">\n                <path d=\"M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z\" fill=\"#d9ac59\"/>\n                <path d=\"M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z\" fill=\"url(#gradient)\"/>\n            </g>\n        </svg>\n        <span class=\"converse-brand__text\">\n            <span>converse<span class=\"subdued\">.js</span></span>\n            <p class=\"byline\">messaging freedom</p>\n        </span>\n    </div>\n</div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/audio.html -->\n<audio controls src=\""+o(e.url)+"\"></audio>\n<a target=\"_blank\" rel=\"noopener\" href=\""+o(e.url)+"\">"+o(e.label_download)+"</a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/file.html -->\n<a target=\"_blank\" rel=\"noopener\" href=\""+o(e.url)+"\">"+o(e.label_download)+"</a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_captcha.html -->\n",e.label&&(t+="\n<label>\n    "+o(e.label)+"\n</label>\n"),t+="\n<img src=\"data:"+o(e.type)+";base64,"+o(e.data)+"\">\n<input name=\""+o(e.name)+"\" type=\"text\" ",e.required&&(t+=" required=\"required\" "),(t+=" />\n\n\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_checkbox.html -->\n<div class=\"form-group\">\n    <input id=\""+o(e.id)+"\" name=\""+o(e.name)+"\" type=\"checkbox\" "+o(e.checked)+" ",e.required&&(t+=" required "),(t+=" />\n    <label class=\"form-check-label\" for=\""+o(e.id)+"\">"+o(e.label)+"</label>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/form_select.html -->\n<div class=\"form-group\">\n    <label for=\""+o(e.id)+"\">"+o(e.label)+"</label>\n    <select class=\"form-control\" id=\""+o(e.id)+"\" name=\""+o(e.name)+"\" ",e.multiple&&(t+=" multiple=\"multiple\" "),(t+=">"+(null==(s=e.options)?"":s)+"</select>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/form_textarea.html -->\n<label class=\"label-ta\">"+o(e.label)+"</label>\n<textarea name=\""+o(e.name)+"\">"+o(e.value)+"</textarea>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/form_url.html -->\n<label>\n    "+o(e.label)+"\n    <a class=\"form-url\" target=\"_blank\" rel=\"noopener\" href=\""+o(e.value)+"\">"+o(e.value)+"</a>\n</label>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/select_option.html -->\n<option value=\""+o(e.value)+"\" ",e.selected&&(t+=" selected=\"selected\" "),(t+=" >"+o(e.label)+"</option>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/video.html -->\n<video controls preload=\"metadata\" src=\""+o(e.url)+"\" style=\"max-height: 50vh\"></video>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/csn.html -->\n<div class=\"message chat-info chat-state-notification\"\n     data-isodate=\""+o(e.isodate)+"\"\n     data-csn=\""+o(e.from)+"\">"+o(e.message)+"</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/file_progress.html -->\n<div class=\"message chat-msg\" data-isodate=\""+o(e.time)+"\" data-msgid=\""+o(e.msgid)+"\">\n    <canvas class=\"avatar chat-msg__avatar\" height=\"36\" width=\"36\"></canvas>\n    <div class=\"chat-msg__content\">\n        <span class=\"chat-msg__text\">"+o(e.__("Uploading file:"))+" <strong>"+o(e.filename)+"</strong>, "+o(e.filesize)+"</span>\n        <progress value=\""+o(e.progress)+"\"/>\n    </div>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/message.html -->\n<div class=\"message chat-msg "+o(e.type)+" "+o(e.extra_classes)+" ",e.is_me_message&&(t+=" chat-msg--action "),t+="\"\n        data-isodate=\""+o(e.time)+"\" data-msgid=\""+o(e.msgid)+"\" data-from=\""+o(e.from)+"\" data-encrypted=\""+o(e.is_encrypted)+"\">\n    ","headline"===e.type||e.is_me_message||(t+="\n    <canvas class=\"avatar chat-msg__avatar\" height=\"36\" width=\"36\"></canvas>\n    "),t+="\n    <div class=\"chat-msg__content chat-msg__content--"+o(e.sender)+" "+o(e.is_me_message?"chat-msg__content--action":"")+"\">\n        ",e.first_unread&&(t+="<div class=\"message date-separator\"><hr class=\"separator\"><span class=\"separator-text\">"+o(e.__("unread messages"))+"</span></div>\n"),t+="<span class=\"chat-msg__heading\">\n            ",e.is_me_message&&(t+="<time timestamp=\""+o(e.isodate)+"\" class=\"chat-msg__time\">"+o(e.pretty_time)+"</time>"),t+="\n            <span class=\"chat-msg__author\">",e.is_me_message&&(t+="**"),t+=o(e.username)+"</span>\n            ",e.is_me_message||(t+="\n                ",e.roles.forEach(function(e){t+=" <span class=\"badge badge-secondary\">"+o(e)+"</span> "}),t+="\n                <time timestamp=\""+o(e.isodate)+"\" class=\"chat-msg__time\">"+o(e.pretty_time)+"</time>\n            "),t+="\n            ",e.is_encrypted&&(t+="<span class=\"fa fa-lock\"></span>"),t+="\n        </span>\n        <div class=\"chat-msg__body chat-msg__body--"+o(e.type)+" "+o(e.received?"chat-msg__body--received":"")+" "+o(e.is_delayed?"chat-msg__body--delayed":"")+"\">\n            <div class=\"chat-msg__message\">\n                ",e.is_retracted?(t+="\n                    <div>"+o(e.retraction_text)+"</div>\n                    ",e.moderation_reason&&(t+="<q class=\"chat-msg--retracted__reason\">"+o(e.moderation_reason)+"</q>"),t+="\n                "):(t+="\n                    ",e.is_spoiler&&(t+="\n                        <div class=\"chat-msg__spoiler-hint\">\n                            <span class=\"spoiler-hint\">"+o(e.spoiler_hint)+"</span>\n                            <a class=\"badge badge-info spoiler-toggle\" data-toggle-state=\"closed\" href=\"#\"><i class=\"fa fa-eye\"></i>"+o(e.label_show)+"</a>\n                        </div>\n                    "),t+="\n\n                    ",e.subject&&(t+="\n                        <div class=\"chat-msg__subject\">"+o(e.subject)+"</div>\n                    "),t+="\n                    <div class=\"chat-msg__text\n                        ",e.is_only_emojis&&(t+=" chat-msg__text--larger"),t+="\n                        ",e.is_spoiler&&(t+=" spoiler collapsed"),t+="\"><!-- message gets added here via renderMessage --></div>\n                    <div class=\"chat-msg__media\"></div>\n                "),t+="\n            </div>\n            ",!e.received||e.is_me_message||e.is_groupchat_message||(t+=" <span class=\"fa fa-check chat-msg__receipt\"></span> "),t+="\n            ",e.edited&&(t+=" <i title=\""+o(e.__("This message has been edited"))+"\" class=\"fa fa-edit chat-msg__edit-modal\"></i> "),t+="\n            <div class=\"chat-msg__actions\">\n                ",e.editable&&(t+="\n                    <button class=\"chat-msg__action chat-msg__action-edit fa fa-pencil-alt\" title=\""+o(e.__("Edit this message"))+"\"></button>\n                "),t+="\n                ",e.retractable&&(t+="\n                    <button class=\"chat-msg__action chat-msg__action-retract fa fa-trash-alt\" title=\""+o(e.__("Retract this message"))+"\"></button>\n                "),(t+="\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/message_versions_modal.html -->\n<div class=\"modal\" id=\"message-versions-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"message-versions-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h4 class=\"modal-title\" id=\"message-versions-modal-label\">"+o(e.__("Message versions"))+"</h4>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                <h4>Older versions</h4>\n                ",Object.keys(e.older_versions).forEach(function(n){t+=" <p class=\"older-msg\"><time>"+o(e.dayjs(n).format("MMM D, YYYY, HH:mm:ss"))+"</time>: "+o(e.older_versions[n])+"</p> "}),(t+="\n                <hr/>\n                <h4>Current version</h4>\n                <p>"+o(e.message)+"</p>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">"+o(e.__("Close"))+"</button>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/alert.html -->\n<div class=\"alert "+o(e.type)+"\" role=\"alert\"><p>"+o(e.message)+"</p></div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/alert_modal.html -->\n<div class=\"modal\" tabindex=\"-1\" role=\"dialog\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header "+o(e.level)+"\">\n        <h5 class=\"modal-title\">"+o(e.title)+"</h5>\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n          <span aria-hidden=\"true\">\xD7</span>\n        </button>\n      </div>\n      <div class=\"modal-body\">",e.messages.forEach(function(e){t+="\n          <p>"+o(e)+"</p>\n      "}),t+="\n      </div>\n    </div>\n  </div>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatbox_head.html -->\n<div class=\"chat-head chat-head-chatbox row no-gutters\">\n    ",e._converse.singleton||(t+="\n        <div class=\"chatbox-navback\"><i class=\"fa fa-arrow-left\"></i></div>\n    "),t+="\n    <div class=\"chatbox-title\">\n        <div class=\"row no-gutters\">\n            ",e.type!==e._converse.HEADLINES_TYPE&&(t+="\n                <canvas class=\"avatar\" height=\"36\" width=\"36\"></canvas>\n            "),t+="\n            <div class=\"col chat-title\" title=\""+o(e.jid)+"\">\n                ",e.url&&(t+="\n                    <a href=\""+o(e.url)+"\" target=\"_blank\" rel=\"noopener\" class=\"user\">\n                "),t+="\n                        "+o(e.display_name)+"\n                ",e.url&&(t+="\n                    </a>\n                "),(t+="\n                <p class=\"user-custom-message\">"+o(e.status)+"</p>\n            </div>\n        </div>\n    </div>\n    <div class=\"chatbox-buttons row no-gutters\">\n        <a class=\"chatbox-btn close-chatbox-button fa fa-times\" title=\""+o(e.info_close)+"\"></a>\n        <a class=\"chatbox-btn show-user-details-modal fa fa-id-card\" title=\""+o(e.info_details)+"\"></a>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatbox_message_form.html -->\n<div class=\"new-msgs-indicator hidden\">\u25BC "+o(e.unread_msgs)+" \u25BC</div>\n<form class=\"setNicknameButtonForm hidden\">\n    <input type=\"submit\" class=\"btn btn-primary\" name=\"join\" value=\"Join\"/>\n</form>\n<form class=\"sendXMPPMessage\">\n    ",e.show_toolbar&&(t+="\n        <ul class=\"chat-toolbar no-text-select\"></ul>\n    "),t+="\n    <input type=\"text\" placeholder=\""+(null==(s=e.label_spoiler_hint)?"":s)+"\" value=\""+(null==(s=e.hint_value)?"":s)+"\"\n           class=\"",e.composing_spoiler||(t+=" hidden "),t+=" spoiler-hint\"/>\n\n    <div class=\"suggestion-box\">\n        <ul class=\"suggestion-box__results suggestion-box__results--above\" hidden=\"\"></ul>\n        <textarea\n            type=\"text\"\n            class=\"chat-textarea suggestion-box__input\n                ",e.show_send_button&&(t+=" chat-textarea-send-button "),t+="\n                ",e.composing_spoiler&&(t+=" spoiler "),t+="\"\n            placeholder=\""+o(e.label_message)+"\">"+(null==(s=e.message_value)?"":s)+"</textarea>\n        <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n\n        ",e.show_send_button&&(t+="\n            <button type=\"submit\" class=\"pure-button send-button\">"+o(e.label_send)+"</button>\n        "),(t+="\n    </div>\n</form>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/error_message.html -->\n<div class=\"message chat-info chat-error\" data-isodate=\""+o(e.isodate)+"\">"+o(e.message)+"</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/help_message.html -->\n<div class=\"message chat-info ","info"!==e.type&&(t+=" chat-"+o(e.type)+" "),(t+="\" data-isodate=\""+o(e.isodate)+"\">"+(null==(s=e.message)?"":s)+"</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/new_day.html -->\n<div class=\"message date-separator\" data-isodate=\""+o(e.isodate)+"\">\n    <hr class=\"separator\"/>\n    <time class=\"separator-text\" datetime=\""+o(e.isodate)+"\"><span>"+o(e.datestring)+"</span></time>\n</div>\n",t}},function(e,t,o){({escape:o(1)});e.exports=function(e){var t="",o=Array.prototype.join,n;return t+="<!-- src/templates/spoiler_button.html -->\n<li class=\"toggle-compose-spoiler fa ",e.composing_spoiler&&(t+=" fa-eye-slash "),t+=" ",e.composing_spoiler||(t+=" fa-eye "),(t+="\"\n    title=\""+(null==(n=e.label_toggle_spoiler)?"":n)+"\">\n</li>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/status_message.html -->\n<div class=\"message chat-info chat-status\"\n     data-isodate=\""+o(e.isodate)+"\"\n     data-status=\""+o(e.from)+"\">"+o(e.message)+"</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/toolbar.html -->\n",e.show_call_button&&(t+="\n<li class=\"toggle-call fa fa-phone\" title=\""+o(e.label_start_call)+"\"></li>\n"),t+="\n",e.show_occupants_toggle&&(t+="\n<li class=\"toggle-occupants float-right fa ",t+=e.hidden_occupants?" fa-angle-double-left ":" fa-angle-double-right ",t+="\"\n    title=\""+o(e.label_hide_occupants)+"\"></li>\n"),t+="\n",e.message_limit&&(t+="\n<li class=\"message-limit font-weight-bold float-right\" title=\""+o(e.label_message_limit)+"\">"+o(e.message_limit)+"</li>\n"),(t+="\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/toolbar_fileupload.html -->\n<li class=\"upload-file\">\n    <a class=\"fa fa-paperclip\" title=\""+o(e.tooltip_upload_file)+"\"></a>\n    <input type=\"file\" class=\"fileupload\" multiple=\"\" style=\"display:none\"/>\n</li> \n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/user_details_modal.html -->\n<div class=\"modal\" id=\"user-details-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"user-details-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"user-details-modal-label\">"+o(e.display_name)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.__("Close"))+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                ",e.image&&(t+="\n                <img alt=\""+o(e.__("The User's Profile Image"))+"\"\n                    class=\"img-thumbnail avatar align-self-center mb-3\"\n                    height=\"100\" width=\"100\" src=\"data:"+o(e.image_type)+";base64,"+o(e.image)+"\"/>\n                "),t+="\n                ",e.fullname&&(t+="\n                <p><label>"+o(e.__("Full Name:"))+"</label> "+o(e.fullname)+"</p>\n                "),t+="\n                <p><label>"+o(e.__("XMPP Address:"))+"</label> <a href=\"xmpp:"+o(e.jid)+"\">"+o(e.jid)+"</a></p>\n                ",e.nickname&&(t+="\n                <p><label>"+o(e.__("Nickname:"))+"</label> "+o(e.nickname)+"</p>\n                "),t+="\n                ",e.url&&(t+="\n                <p><label>"+o(e.__("URL:"))+"</label> <a target=\"_blank\" rel=\"noopener\" href=\""+o(e.url)+"\">"+o(e.url)+"</a></p>\n                "),t+="\n                ",e.email&&(t+="\n                <p><label>"+o(e.__("Email:"))+"</label> <a href=\"mailto:"+o(e.email)+"\">"+o(e.email)+"</a></p>\n                "),t+="\n                ",e.role&&(t+="\n                <p><label>"+o(e.__("Role:"))+"</label> "+o(e.role)+"</p>\n                "),t+="\n\n                ",e._converse.pluggable.plugins["converse-omemo"].enabled(e._converse)&&(t+="\n                    <hr/>\n                    <ul class=\"list-group fingerprints\">\n                        <li class=\"list-group-item active\">"+o(e.__("OMEMO Fingerprints"))+"</li>\n                        ",e.view.devicelist.devices||(t+="\n                            <li class=\"list-group-item\"><span class=\"spinner fa fa-spinner centered\"/></li>\n                        "),t+="\n                        ",e.view.devicelist.devices&&(t+="\n                            ",e.view.devicelist.devices.each(function(n){t+="\n                                ",n.get("bundle")&&n.get("bundle").fingerprint&&(t+="\n                                <li class=\"list-group-item\">\n                                    <form class=\"fingerprint-trust\">\n                                    <div class=\"btn-group btn-group-toggle\">\n                                        <label class=\"btn btn--small ",t+=-1===n.get("trusted")?"  btn-secondary ":" btn-primary active ",t+="\">\n                                            <input type=\"radio\" name=\""+o(n.get("id"))+"\" value=\"1\"\n                                                ",-1!==n.get("trusted")&&(t+=" checked=\"checked\" "),t+="/>"+o(e.__("Trusted"))+"\n                                        </label>\n                                        <label class=\"btn btn--small ",t+=-1===n.get("trusted")?" btn-primary active ":" btn-secondary ",t+="\">\n                                            <input type=\"radio\" name=\""+o(n.get("id"))+"\" value=\"-1\"\n                                                ",-1===n.get("trusted")&&(t+=" checked=\"checked\" "),t+="/>"+o(e.__("Untrusted"))+"\n                                        </label>\n                                    </div>\n                                    <span class=\"fingerprint\">"+o(e.utils.formatFingerprint(n.get("bundle").fingerprint))+"</span>\n                                    </form>\n                                </li>\n                                "),t+="\n                            "}),t+="\n                        "),t+="\n                    </ul>\n                "),t+="\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-warning\" data-dismiss=\"modal\">"+o(e.__("Close"))+"</button>\n                <button type=\"button\" class=\"btn btn-info refresh-contact\"><i class=\"fa fa-refresh\"> </i>"+o(e.__("Refresh"))+"</button>\n                ",e.allow_contact_removal&&e.is_roster_contact&&(t+="\n                    <button type=\"button\" class=\"btn btn-danger remove-contact\"><i class=\"far fa-trash-alt\"> </i>"+o(e.__("Remove as contact"))+"</button>\n                "),(t+="\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/headless/templates/vcard.html -->\n<vCard xmlns=\"vcard-temp\">\n    <FN>"+o(e.fn)+"</FN>\n    <NICKNAME>"+o(e.nickname)+"</NICKNAME>\n    <URL>"+o(e.url)+"</URL>\n    <ROLE>"+o(e.role)+"</ROLE>\n    <EMAIL><INTERNET/><PREF/><USERID>"+o(e.email)+"</USERID></EMAIL>\n    <PHOTO>\n      <TYPE>"+o(e.image_type)+"</TYPE>\n      <BINVAL>"+o(e.image)+"</BINVAL>\n    </PHOTO>\n</vCard>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/bookmarks_list.html -->\n<div class=\"list-container list-container--bookmarks "+o(!e.hidden&&"hidden"||"")+"\">\n    <a href=\"#\" class=\"list-toggle bookmarks-toggle controlbox-padded\" title=\""+o(e.desc_bookmarks)+"\">\n        <span class=\"fa ",t+=e.toggle_state===e._converse.OPENED?" fa-caret-down ":" fa-caret-right ",t+="\">\n        </span> "+o(e.label_bookmarks)+"</a>\n\n    <div class=\"items-list bookmarks rooms-list ",e.toggle_state!==e._converse.OPENED&&(t+=" hidden "),(t+="\">\n    ",e.bookmarks.forEach(function(n){t+="\n        <div class=\"list-item controlbox-padded room-item available-chatroom d-flex flex-row ",e.is_bookmark_hidden(n)&&(t+=" hidden "),t+="\" data-room-jid=\""+o(n.get("jid"))+"\">\n            <a class=\"list-item-link open-room w-100\" data-room-jid=\""+o(n.get("jid"))+"\" title=\""+o(e.open_title)+"\" href=\"#\">"+o(n.getDisplayName())+"</a>\n            <a class=\"list-item-action remove-bookmark fa fa-bookmark align-self-center ",n.get("bookmarked")&&(t+=" button-on "),t+="\"\n                data-room-jid=\""+o(n.get("jid"))+"\" data-bookmark-name=\""+o(n.getDisplayName())+"\"\n                title=\""+o(e.info_remove_bookmark)+"\" href=\"#\"></a>\n        </div>\n    "}),t+="\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/chatroom_bookmark_form.html -->\n<div class=\"chatroom-form-container muc-bookmark-form\">\n    <form class=\"converse-form chatroom-form\">\n        <legend>"+o(e.heading)+"</legend>\n        <fieldset class=\"form-group\">\n            <label for=\"converse_muc_bookmark_name\">"+o(e.label_name)+"</label>\n            <input class=\"form-control\" type=\"text\" value=\""+o(e.name)+"\" name=\"name\" required=\"required\" id=\"converse_muc_bookmark_name\"/>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <label for=\"converse_muc_bookmark_nick\">"+o(e.label_nick)+"</label>\n            <input class=\"form-control\" type=\"text\" name=\"nick\" value=\""+o(e.default_nick)+"\" id=\"converse_muc_bookmark_nick\"/>\n        </fieldset>\n        <fieldset class=\"form-group form-check\">\n            <input class=\"form-check-input\" id=\"converse_muc_bookmark_autojoin\" type=\"checkbox\" name=\"autojoin\"/>\n            <label class=\"form-check-label\" for=\"converse_muc_bookmark_autojoin\">"+o(e.label_autojoin)+"</label>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.label_submit)+"\"/>\n            <input class=\"btn btn-secondary button-cancel\" type=\"button\" value=\""+o(e.label_cancel)+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_bookmark_toggle.html -->\n<a class=\"chatbox-btn toggle-bookmark fa fa-bookmark\n   ",e.bookmarked&&(t+=" button-on "),(t+="\" title=\""+o(e.info_toggle_bookmark)+"\"></a>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/converse_brand_heading.html -->\n<span class=\"brand-heading-container\">\n    <a class=\"brand-heading\" href=\"https://conversejs.org\" target=\"_blank\" rel=\"noopener\">\n        <svg class=\"converse-svg-logo\"\n            xmlns:svg=\"http://www.w3.org/2000/svg\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n            viewBox=\"0 0 364 364\">\n            <title>Converse</title>\n            <g class=\"cls-1\" id=\"g904\">\n                <g data-name=\"Layer 2\">\n                    <g data-name=\"Layer 7\">\n                        <path\n                            class=\"cls-3\"\n                            d=\"M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z\" />\n                        <path\n                            class=\"cls-4\"\n                            d=\"M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z\" />\n                    </g>\n                </g>\n            </g>\n        </svg>\n        <span class=\"brand-name\">\n            <span class=\"brand-name__text\">converse<span class=\"subdued\">.js</span></span>\n        </span>\n    </a>\n</span>\n",e}},function(e,t,o){({escape:o(1)});e.exports=function(e){var t="",o=Array.prototype.join;return t+="<!-- src/templates/controlbox.html -->\n<div class=\"flyout box-flyout\">\n    <div class=\"chat-head controlbox-head\">\n        ",e.sticky_controlbox||(t+="\n            <a class=\"chatbox-btn close-chatbox-button fa fa-times\"></a>\n        "),(t+="\n    </div>\n    <div class=\"controlbox-panes\"></div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/controlbox_toggle.html -->\n<span class=\"toggle-feedback\">"+o(e.label_toggle)+"</span>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/login_panel.html -->\n<div id=\"converse-login-panel\" class=\"controlbox-pane fade-in row no-gutters\">\n    <form id=\"converse-login\" class=\"converse-form\" method=\"post\">\n        <div class=\"conn-feedback fade-in ",e.conn_feedback_subject||(t+=" hidden "),t+=" "+o(e.conn_feedback_class)+"\">\n            <p class=\"feedback-subject\">"+o(e.conn_feedback_subject)+"</p>\n            <p class=\"feedback-message ",e.conn_feedback_message||(t+=" hidden "),t+="\">"+o(e.conn_feedback_message)+"</p>\n        </div>\n        ","CONNECTING"===e._converse.CONNECTION_STATUS[e.connection_status]?t+="\n            <span class=\"spinner fa fa-spinner centered\"/>\n        ":(t+="\n            ",(e.authentication==e.LOGIN||e.authentication==e.EXTERNAL)&&(t+="\n                <div class=\"form-group\">\n                    <label for=\"converse-login-jid\">"+o(e.__("XMPP Address:"))+"</label>\n                    <input id=\"converse-login-jid\" class=\"form-control\" required=\"required\" type=\"text\" name=\"jid\" placeholder=\""+o(e.placeholder_username)+"\"/>\n                </div>\n                ",e.authentication!==e.EXTERNAL&&(t+="\n                <div class=\"form-group\">\n                    <label for=\"converse-login-password\">"+o(e.__("Password:"))+"</label>\n                    <input id=\"converse-login-password\" class=\"form-control\" required=\"required\" type=\"password\" name=\"password\" placeholder=\""+o(e.__("password"))+"\"/>\n                </div>\n                "),t+="\n                ",e.show_trust_checkbox&&(t+="\n                    <div class=\"form-group form-check login-trusted\">\n                        <input id=\"converse-login-trusted\" type=\"checkbox\" class=\"form-check-input\" name=\"trusted\" ",e._converse.config.get("trusted")&&(t+=" checked=\"checked\" "),t+="/>\n                        <label for=\"converse-login-trusted\" class=\"form-check-label login-trusted__desc\">"+o(e.__("This is a trusted device"))+"</label>\n                        <i class=\"fa fa-info-circle\" data-toggle=\"popover\"\n                           data-title=\"Trusted device?\"\n                           data-content=\""+o(e.__("To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It's important that you explicitly log out, otherwise not all cached data might be deleted. Please note, when using an untrusted device, OMEMO encryption is NOT available."))+"\"></i>\n                    </div>\n                "),t+="\n\n                <fieldset class=\"buttons\">\n                    <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.__("Log in"))+"\"/>\n                </fieldset>\n            "),t+="\n            ",e.authentication==e.ANONYMOUS&&(t+="\n                <input class=\"btn btn-primary login-anon\" type=\"submit\" value=\""+o(e.__("Click here to log in anonymously"))+"\"/>\n            "),t+="\n            ",e.authentication==e.PREBIND&&(t+="\n                <p>Disconnected.</p>\n            "),t+="\n        "),(t+="\n    </form>\n</div>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/dragresize.html -->\n<div class=\"dragresize dragresize-top\"></div>\n<div class=\"dragresize dragresize-topleft\"></div>\n<div class=\"dragresize dragresize-left\"></div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/emoji_button.html -->\n<li class=\"toggle-toolbar-menu toggle-smiley__container\">\n    <a class=\"toggle-smiley far fa-smile\"\n       title=\""+o(e.tooltip_insert_smiley)+"\"\n       data-toggle=\"dropdown\"\n       aria-haspopup=\"true\"\n       aria-expanded=\"false\"></a>\n</li>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/emojis.html -->\n<div class=\"emoji-picker dropdown-menu toolbar-menu\">\n    <div class=\"emoji-picker__header\">\n        <input class=\"form-control emoji-search\" name=\"emoji-search\" placeholder=\""+o(e.__("Search"))+"\"/>\n        ",e.query||(t+="\n        <ul>\n            ",Object.keys(e.emoji_categories).forEach(function(n){t+="\n                ",e.emoji_categories[n]&&(t+="\n                <li data-category=\""+o(n)+"\" class=\"emoji-category "+o(e.current_category)+" "+o(n)+" ",e.current_category===n&&(t+=" picked "),t+="\"\n                    title=\""+o(e.__(e._converse.emoji_category_labels[n]))+"\">\n                    <a class=\"pick-category\" href=\"#emoji-picker-"+o(n)+"\" data-category=\""+o(n)+"\"> "+(null==(s=e.transformCategory(e.emoji_categories[n]))?"":s)+" </a>\n                </li>\n                "),t+="\n            "}),t+="\n        </ul>\n        "),t+="\n    </div>\n    <div class=\"emoji-picker__lists\">\n        ",e.query?(t+="\n            <a id=\"emoji-picker-search-results\" class=\"emoji-category__heading\">"+o(e.__("Search results"))+"</a>\n            <ul class=\"emoji-picker\">\n                ",e.search_results.forEach(function(n){t+="\n                <li class=\"emoji insert-emoji ",e.shouldBeHidden(n.sn)&&(t+=" hidden "),t+="\"\n                    data-emoji=\""+o(n.sn)+"\" title=\""+o(n.sn)+"\">\n                        <a href=\"#\" data-emoji=\""+o(n.sn)+"\"> "+(null==(s=e.transform(n.sn))?"":s)+"  </a>\n                </li>\n                "}),t+="\n            </ul>\n        "):(t+="\n            ",Object.keys(e.emoji_categories).forEach(function(n){t+="\n                ",e.emoji_categories[n]&&(t+="\n                    <a id=\"emoji-picker-"+o(n)+"\" class=\"emoji-category__heading\" data-category=\""+o(n)+"\">"+o(e.__(e._converse.emoji_category_labels[n]))+" </a>\n                    <ul class=\"emoji-picker\" data-category=\""+o(n)+"\">\n                        ",Object.values(e.emojis_by_category[n]).forEach(function(n){t+="\n                        <li class=\"emoji insert-emoji ",e.shouldBeHidden(n.sn)&&(t+=" hidden "),t+="\"\n                            data-emoji=\""+o(n.sn)+"\" title=\""+o(n.sn)+"\">\n                                <a href=\"#\" data-emoji=\""+o(n.sn)+"\"> "+(null==(s=e.transform(n.sn))?"":s)+"  </a>\n                        </li>\n                        "}),t+="\n                    </ul>\n                "),t+="\n            "}),t+="\n        "),t+="\n    </div>\n    <div class=\"emoji-skintone-picker\">\n        <label>Skin tone</label>\n        <ul>\n            ",e.skintones.forEach(function(n){t+="\n                <li data-skintone=\""+o(n)+"\" class=\"emoji-skintone ",e.current_skintone===n&&(t+=" picked "),t+="\">\n                    <a class=\"pick-skintone\" href=\"#\" data-skintone=\""+o(n)+"\"> "+(null==(s=e.transform(":"+n+":"))?"":s)+" </a>\n                </li>\n            "}),(t+="\n        </ul>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/inverse_brand_heading.html -->\n<div>\n    <div class=\"container brand-heading-container\">\n        <h1 class=\"brand-heading brand-heading--inverse\">\n            <svg class=\"converse-svg-logo\"\n                xmlns:svg=\"http://www.w3.org/2000/svg\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n                viewBox=\"0 0 364 364\">\n                <title>Converse</title>\n                <g class=\"cls-1\" id=\"g904\">\n                    <g data-name=\"Layer 2\">\n                        <g data-name=\"Layer 7\">\n                            <path\n                                class=\"cls-3\"\n                                d=\"M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z\" />\n                            <path\n                                class=\"cls-4\"\n                                d=\"M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z\" />\n                        </g>\n                    </g>\n                </g>\n            </svg>\n            <span class=\"brand-name\">\n                <span class=\"brand-name__text\">converse<span class=\"subdued\">.js</span></span>\n                <p class=\"byline\">messaging freedom</p>\n            </span>\n        </h1>\n        <p class=\"brand-subtitle\">"+o(e.version_name)+"</p>\n        <p class=\"brand-subtitle\"><a target=\"_blank\" rel=\"nofollow\" href=\"https://conversejs.org\">Open Source</a> XMPP chat client brought to you by <a target=\"_blank\" rel=\"nofollow\" href=\"https://opkode.com\">Opkode</a> </p>\n        <p class=\"brand-subtitle\"><a target=\"_blank\" rel=\"nofollow\" href=\"https://hosted.weblate.org/projects/conversejs/#languages\">Translate</a> it into your own language</p>\n    </div>\n</div>\n",t}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/chats_panel.html -->\n<a id=\"toggle-minimized-chats\" href=\"#\" class=\"row no-gutters\"></a>\n<div class=\"flyout minimized-chats-flyout row no-gutters\"></div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/toggle_chats.html -->\n"+o(e.num_minimized)+" "+o(e.Minimized)+"\n<span class=\"unread-message-count ",e.num_unread||(t+=" unread-message-count-hidden "),(t+="\" href=\"#\">"+o(e.num_unread)+"</span>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/trimmed_chat.html -->\n<div class=\"chat-head-"+o(e.type)+" chat-head row no-gutters\">\n    <a class=\"restore-chat w-100 align-self-center\" title=\""+o(e.tooltip)+"\">\n        ",e.num_unread&&(t+="\n            <span class=\"message-count badge badge-light\">"+o(e.num_unread)+"</span>\n        "),(t+="\n        "+o(e.title)+"\n    </a>\n    <a class=\"chatbox-btn close-chatbox-button fa fa-times\"></a>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/add_chatroom_modal.html -->\n<div class=\"modal\" id=\"add-chatroom-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"add-chatroom-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\"\n                    id=\"add-chatroom-modal-label\">"+o(e.__("Enter a new Groupchat"))+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body\">\n                <form class=\"converse-form add-chatroom\">\n                    <div class=\"form-group\">\n                        <label for=\"chatroom\">"+o(e.label_room_address)+":</label>\n                        <input type=\"text\" required=\"required\" name=\"chatroom\" class=\"form-control\" placeholder=\""+o(e.chatroom_placeholder)+"\"/>\n                    </div>\n                    ",e._converse.locked_muc_nickname||(t+="\n                    <div class=\"form-group\" >\n                        <label for=\"nickname\">"+o(e.__("Nickname"))+":</label>\n                        <input type=\"text\" pattern=\".*\\S+.*\" title=\""+o(e.__("This field is required"))+"\" required=\"required\" name=\"nickname\" value=\""+o(e.nick)+"\" class=\"form-control\"/>\n                    </div>\n                    "),(t+="\n                    <input type=\"submit\" class=\"btn btn-primary\" name=\"join\" value=\""+o(e.__("Join"))+"\"/>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatarea.html -->\n<div class=\"chat-area col\">\n    <div class=\"chat-content ",e.show_send_button&&(t+="chat-content-sendbutton"),t+="\" aria-live=\"polite\">\n        ",e.muc_show_logs_before_join&&(t+="\n            <div class=\"empty-history-feedback\"><span>"+o(e.__("No message history available."))+"</span></div>\n        "),(t+="\n    </div>\n    <div class=\"bottom-panel\"></div>\n</div>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/chatroom.html -->\n<div class=\"flyout box-flyout\">\n    <div class=\"chat-head chat-head-chatroom row no-gutters\"></div>\n    <div class=\"chat-body chatroom-body row no-gutters\">\n        <div class=\"disconnect-container hidden\"></div>\n    </div>\n</div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_bottom_panel.html -->\n",e.entered?(t+="\n    ",t+=e.can_edit?"\n        <div class=\"emoji-picker__container dropup\"></div>\n        <div class=\"message-form-container\">\n    ":"\n        <div class=\"muc-bottom-panel\">"+o(e.__("You're not allowed to send messages in this room"))+"</div>\n    ",t+="\n"):t+="\n    <div class=\"muc-bottom-panel\"></div>\n",(t+="\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_destroyed.html -->\n<div class=\"alert alert-danger\">\n    <h3 class=\"alert-heading disconnect-msg\">"+o(e.__("This groupchat no longer exists"))+"</h3>\n\n    <p class=\"destroyed-reason\">"+o(e.reason)+"</p>\n\n    ",e.jid&&(t+="\n    <p class=\"moved-label\">\n        "+o(e.__("The conversation has moved. Click below to enter."))+"\n    </p>\n    <p class=\"moved-link\"><a class=\"switch-chat\" href=\"#\">"+o(e.jid)+"</a></p>\n    "),(t+="\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatroom_details_modal.html -->\n<div class=\"modal\" id=\"room-details-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"room-details-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"room-details-modal-label\">"+o(e.display_name)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"room-info\">\n                    <p class=\"room-info\"><strong>"+o(e.__("Name"))+"</strong>: "+o(e.name)+"</p>\n                    <p class=\"room-info\"><strong>"+o(e.__("Groupchat address (JID)"))+"</strong>: "+o(e.jid)+"</p>\n                    <p class=\"room-info\"><strong>"+o(e.__("Description"))+"</strong>: "+o(e.description)+"</p>\n                    ",e.subject&&(t+="\n                    <p class=\"room-info\"><strong>"+o(e.__("Topic"))+"</strong>: "+(null==(s=e.topic)?"":s)+"</p> <!-- Sanitized in converse-muc-views. We want to render links. -->\n                        <p class=\"room-info\"><strong>"+o(e.__("Topic author"))+"</strong>: "+o(e._.get(e.subject,"author"))+"</p>\n                    "),t+="\n                    <p class=\"room-info\"><strong>"+o(e.__("Online users"))+"</strong>: "+o(e.num_occupants)+"</p>\n                    <p class=\"room-info\"><strong>"+o(e.__("Features"))+"</strong>:\n                        <div class=\"chatroom-features\">\n                        <ul class=\"features-list\">\n                        ",e.features.passwordprotected&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-lock\"></span>"+o(e.__("Password protected"))+" - <em>"+o(e.__("This groupchat requires a password before entry"))+"</em></li>\n                        "),t+="\n                        ",e.features.unsecured&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-unlock\"></span>"+o(e.__("No password required"))+" - <em>"+o(e.__("This groupchat does not require a password upon entry"))+"</em></li>\n                        "),t+="\n                        ",e.features.hidden&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-eye-slash\"></span>"+o(e.__("Hidden"))+" - <em>"+o(e.__("This groupchat is not publicly searchable"))+"</em></li>\n                        "),t+="\n                        ",e.features.public_room&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-eye\"></span>"+o(e.__("Public"))+" - <em>"+o(e.__("This groupchat is publicly searchable"))+"</em></li>\n                        "),t+="\n                        ",e.features.membersonly&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-address-book\"></span>"+o(e.__("Members only"))+" - <em>"+o(e.__("This groupchat is restricted to members only"))+"</em></li>\n                        "),t+="\n                        ",e.features.open&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-globe\"></span>"+o(e.__("Open"))+" - <em>"+o(e.__("Anyone can join this groupchat"))+"</em></li>\n                        "),t+="\n                        ",e.features.persistent&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-save\"></span>"+o(e.__("Persistent"))+" - <em>"+o(e.__("This groupchat persists even if it's unoccupied"))+"</em></li>\n                        "),t+="\n                        ",e.features.temporary&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-snowflake-o\"></span>"+o(e.__("Temporary"))+" - <em>"+o(e.__("This groupchat will disappear once the last person leaves"))+"</em></li>\n                        "),t+="\n                        ",e.features.nonanonymous&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-id-card\"></span>"+o(e.__("Not anonymous"))+" - <em>"+o(e.__("All other groupchat participants can see your XMPP address"))+"</em></li>\n                        "),t+="\n                        ",e.features.semianonymous&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-user-secret\"></span>"+o(e.__("Semi-anonymous"))+" - <em>"+o(e.__("Only moderators can see your XMPP address"))+"</em></li>\n                        "),t+="\n                        ",e.features.moderated&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-gavel\"></span>"+o(e.__("Moderated"))+" - <em>"+o(e.__("Participants entering this groupchat need to request permission to write"))+"</em></li>\n                        "),t+="\n                        ",e.features.unmoderated&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-info-circle\"></span>"+o(e.__("Not moderated"))+" - <em>"+o(e.__("Participants entering this groupchat can write right away"))+"</em></li>\n                        "),t+="\n                        ",e.features.mam_enabled&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-database\"></span>"+o(e.__("Message archiving"))+" - <em>"+o(e.__("Messages are archived on the server"))+"</em></li>\n                        "),(t+="\n                        </ul>\n                        </div>\n                    </p>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-warning\" data-dismiss=\"modal\">"+o(e.__("Close"))+"</button>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_disconnect.html -->\n<div class=\"alert alert-danger\">\n    <h3 class=\"alert-heading disconnect-msg\">"+o(e.disconnect_messages[0])+"</h3>\n\n    ",e._.forEach(e.disconnect_messages.slice(1),function(e){t+="\n        <p class=\"disconnect-msg\">"+o(e)+"</p>\n    "}),(t+="\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_features.html -->\n<p class=\"occupants-heading\">"+o(e.__("Features"))+"</p>\n<ul class=\"features-list\">\n",e.passwordprotected&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat requires a password before entry"))+"\"><span class=\"fa fa-lock\"></span>"+o(e.__("Password protected"))+"</li>\n"),t+="\n",e.unsecured&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat does not require a password upon entry"))+"\"><span class=\"fa fa-unlock\"></span>"+o(e.__("No password"))+"</li>\n"),t+="\n",e.hidden&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat is not publicly searchable"))+"\"><span class=\"fa fa-eye-slash\"></span>"+o(e.__("Hidden"))+"</li>\n"),t+="\n",e.public_room&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat is publicly searchable"))+"\"><span class=\"fa fa-eye\"></span>"+o(e.__("Public"))+"</li>\n"),t+="\n",e.membersonly&&(t+="\n<li class=\"feature\" title=\""+o(e.__("this groupchat is restricted to members only"))+"\"><span class=\"fa fa-address-book\"></span>"+o(e.__("Members only"))+"</li>\n"),t+="\n",e.open&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Anyone can join this groupchat"))+"\"><span class=\"fa fa-globe\"></span>"+o(e.__("Open"))+"</li>\n"),t+="\n",e.persistent&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat persists even if it's unoccupied"))+"\"><span class=\"fa fa-save\"></span>"+o(e.__("Persistent"))+"</li>\n"),t+="\n",e.temporary&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat will disappear once the last person leaves"))+"\"><span class=\"fa fa-snowflake\"></span>"+o(e.__("Temporary"))+"</li>\n"),t+="\n",e.nonanonymous&&(t+="\n<li class=\"feature\" title=\""+o(e.__("All other groupchat participants can see your XMPP address"))+"\"><span class=\"fa fa-id-card\"></span>"+o(e.__("Not anonymous"))+"</li>\n"),t+="\n",e.semianonymous&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Only moderators can see your XMPP address"))+"\"><span class=\"fa fa-user-secret\"></span>"+o(e.__("Semi-anonymous"))+"</li>\n"),t+="\n",e.moderated&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Participants entering this groupchat need to request permission to write"))+"\"><span class=\"fa fa-gavel\"></span>"+o(e.__("Moderated"))+"</li>\n"),t+="\n",e.unmoderated&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Participants entering this groupchat can write right away"))+"\"><span class=\"fa fa-info-circle\"></span>"+o(e.__("Not moderated"))+"</li>\n"),t+="\n",e.mam_enabled&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Messages are archived on the server"))+"\"><span class=\"fa fa-database\"></span>"+o(e.__("Message archiving"))+"</li>\n"),(t+="\n</ul>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatroom_form.html -->\n<div class=\"chatroom-form-container muc-config-form\">\n    <form class=\"converse-form chatroom-form\" autocomplete=\"off\">\n        <fieldset class=\"form-group\">\n            <legend>"+o(e.title)+"</legend>\n            ",e.title!==e.instructions&&(t+="\n                <p class=\"form-help\">"+o(e.instructions)+"</p>\n            "),(t+="\n            <!-- Fields are generated internally, with xForm2webForm -->\n            ",e.fields.forEach(function(e){t+=" "+(null==(s=e)?"":s)+" "}),t+="\n        </fieldset>\n        <fieldset>\n            <input type=\"submit\" class=\"btn btn-primary\" value=\""+o(e.__("Save"))+"\"/>\n            <input type=\"button\" class=\"btn btn-secondary .button-cancel\" value=\""+o(e.__("Cancel"))+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatroom_head.html -->\n",e._converse.singleton||(t+="\n    <div class=\"chatbox-navback\"><i class=\"fa fa-arrow-left\"></i></div>\n"),t+="\n<div class=\"chatbox-title\">\n    <div class=\"chat-title\" ","hidden"!==e._converse.locked_muc_domain&&(t+=" title=\""+o(e.jid)+"\" "),t+=" >\n        "+o(e.title)+"\n    </div>\n    <!-- Sanitized in converse-muc-views. We want to render links. -->\n    <p class=\"chatroom-description\">"+(null==(s=e.description)?"":s)+"</p>\n</div>\n<div class=\"chatbox-buttons row no-gutters\">\n    ",e._converse.singleton||(t+="\n        <a class=\"chatbox-btn close-chatbox-button fa fa-sign-out-alt\" title=\""+o(e.info_close)+"\"></a>\n    "),t+="\n    ",e.isOwner&&(t+="\n        <a class=\"chatbox-btn configure-chatroom-button fa fa-wrench\" title=\""+o(e.info_configure)+" \"></a>\n    "),(t+="\n    <a class=\"chatbox-btn show-room-details-modal fa fa-info-circle\" title=\""+o(e.info_details)+"\"></a>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a;return t+="<!-- src/templates/chatroom_nickname_form.html -->\n<div class=\"chatroom-form-container muc-nickname-form\">\n    <form class=\"converse-form chatroom-form converse-centered-form\">\n        <fieldset class=\"form-group\">\n            <label>"+o(e.heading)+"</label>\n            <input type=\"text\" required=\"required\" name=\"nick\" value=\""+o(e.nickname)+"\"\n                   class=\"form-control "+(null==(a=e.error_class)?"":a)+"\" placeholder=\""+o(e.label_nickname)+"\"/>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <input type=\"submit\" class=\"btn btn-primary\" name=\"join\" value=\""+o(e.label_join)+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a;return t+="<!-- src/templates/chatroom_password_form.html -->\n<div class=\"chatroom-form-container muc-password-form\">\n    <form class=\"converse-form chatroom-form converse-centered-form\">\n        <fieldset class=\"form-group\">\n            <label>"+o(e.heading)+"</label>\n            <p class=\"validation-message\">"+o(e.validation_message)+"</p>\n            <input class=\"hidden-username\" type=\"text\" autocomplete=\"username\" value=\""+o(e.jid)+"\"></input>\n            <input type=\"password\" name=\"password\" required=\"required\"\n                   class=\"form-control "+(null==(a=e.error_class)?"":a)+"\" placeholder=\""+o(e.label_password)+"\"/>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.label_submit)+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/chatroom_sidebar.html -->\n<!-- <div class=\"occupants\"> -->\n<div class=\"occupants-header\">\n    <i class=\"hide-occupants fa fa-times\"></i>\n    <p class=\"occupants-heading\">"+o(e.label_occupants)+"</p>\n</div>\n<div class=\"dragresize dragresize-occupants-left\"></div>\n<ul class=\"occupant-list\"></ul>\n<div class=\"chatroom-features\"></div>\n<!-- </div> -->\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/list_chatrooms_modal.html -->\n<div class=\"modal\" id=\"list-chatrooms-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"list-chatrooms-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\"\n                    id=\"list-chatrooms-modal-label\">"+o(e.heading_list_chatrooms)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body d-flex flex-column\">\n                ",e.show_form&&(t+="\n                <form class=\"converse-form list-chatrooms\">\n                    <div class=\"form-group\">\n                        <label for=\"chatroom\">"+o(e.label_server_address)+":</label>\n                        <input type=\"text\" value=\""+o(e.muc_domain)+"\" required=\"required\" name=\"server\" class=\"form-control\" placeholder=\""+o(e.server_placeholder)+"\"/>\n                    </div>\n                    <input type=\"submit\" class=\"btn btn-primary\" name=\"list\" value=\""+o(e.label_query)+"\"/>\n                </form>\n                "),(t+="\n                <ul class=\"available-chatrooms list-group\"></ul>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/moderator_tools_modal.html -->\n<div class=\"modal\" id=\"converse-modtools-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"converse-modtools-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"converse-modtools-modal-label\">"+o(e.__("Moderator Tools"))+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body d-flex flex-column\">\n                <ul class=\"nav nav-pills justify-content-center\">\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link active\" id=\"roles-tab\" href=\"#roles-tabpanel\" aria-controls=\"roles-tabpanel\" role=\"tab\" data-toggle=\"tab\">Roles</a>\n                    </li>\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link\" id=\"affiliations-tab\" href=\"#affiliations-tabpanel\" aria-controls=\"affiliations-tabpanel\" role=\"tab\" data-toggle=\"tab\">Affiliations</a>\n                    </li>\n                </ul>\n\n                <div class=\"tab-content\">\n                    <div class=\"tab-pane tab-pane--columns active\" id=\"roles-tabpanel\" role=\"tabpanel\" aria-labelledby=\"roles-tab\">\n                        <form class=\"converse-form query-role\">\n                            <p class=\"helptext pb-3\">\n"+o(e.__("Roles are assigned to users to grant or deny them certain abilities in a multi-user chat. They're assigned either explicitly or implicitly as part of an affiliation. A role that's not due to an affiliation, is only valid for the duration of the user's session."))+"\n                            </p>\n                            <div class=\"form-group\">\n                                <label for=\"role\">\n                                    <strong>"+o(e.__("Role"))+":</strong>\n                                </label>\n                                <div class=\"row\">\n                                    <div class=\"col\">\n                                        <select class=\"custom-select select-role\" name=\"role\">\n                                            ",e.roles.forEach(function(n){t+="\n                                                <option value=\""+o(n)+"\" ",n===e.role&&(t+=" selected=\"selected\" "),t+="\n                                                    ","moderator"===n&&(t+="\n                                                    title=\""+o(e.__("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations."))+"\"\n                                                    "),t+="\n                                                    ","participant"===n&&(t+="\n                                                    title=\""+o(e.__("The default role, implies that you can read and write messages."))+"\"\n                                                    "),t+="\n                                                    ","visitor"===n&&(t+="\n                                                    title=\""+o(e.__("Visitors aren't allowed to write messages in a moderated multi-user chat."))+"\"\n                                                    "),t+=">"+o(n)+"</option>\n                                            "}),t+="\n                                        </select>\n                                    </div>\n                                    <div class=\"col\">\n                                        <input type=\"submit\" class=\"btn btn-primary\" name=\"users_with_role\" value=\""+o(e.__("Show users"))+"\"/>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col pt-2\">\n                                        ","moderator"===e.role&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations."))+"</p>\n                                        "),t+="\n                                        ","participant"===e.role&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("The default role, implies that you can read and write messages."))+"</p>\n                                        "),t+="\n                                        ","visitor"===e.role&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Visitors aren't allowed to write messages in a moderated multi-user chat."))+"</p>\n                                        "),t+="\n                                    </div>\n                                </div>\n                            </div>\n                        </form>\n                        <div class=\"scrollable-container\">\n                        <ul class=\"list-group list-group--users\">\n                            ",e.loading_users_with_role&&(t+="\n                                <li class=\"list-group-item\"> <span class=\"spinner fa fa-spinner centered\"/> </li>\n                            "),t+="\n                            ",e.users_with_role&&0===e.users_with_role.length&&(t+="\n                                <li class=\"list-group-item\">"+o(e.__("No users with that role found."))+"</li>\n                            "),t+="\n                            ",(e.users_with_role||[]).forEach(function(n){t+="\n                                <li class=\"list-group-item\">\n                                    <ul class=\"list-group\">\n                                        <li class=\"list-group-item active\">\n                                            <div><strong>JID:</strong> "+o(n.jid)+"</div>\n                                        </li>\n                                        <li class=\"list-group-item\">\n                                            <div><strong>Nickname:</strong> "+o(n.nick)+"</div>\n                                        </li>\n                                        <li class=\"list-group-item\">\n                                            <div><strong>Role:</strong> "+o(n.role)+"<a href=\"#\" data-form=\"role-form\" class=\"toggle-form right fa fa-wrench\"></a></div>\n                                            <form class=\"role-form hidden\">\n                                                <div class=\"form-group\">\n                                                    <input type=\"hidden\" name=\"jid\" value=\""+o(n.jid)+"\"/>\n                                                    <input type=\"hidden\" name=\"nick\" value=\""+o(n.nick)+"\"/>\n                                                    <div class=\"row\">\n                                                        <div class=\"col\">\n                                                            <label><strong>"+o(e.__("New Role"))+":</strong></label>\n                                                            <select class=\"custom-select select-role\" name=\"role\">\n                                                                ",e.allowed_roles.forEach(function(e){t+="\n                                                                    <option value=\""+o(e)+"\" ",e===n.role&&(t+=" selected=\"selected\" "),t+=">"+o(e)+"</option>\n                                                                "}),t+="\n                                                            </select>\n                                                        </div>\n                                                        <div class=\"col\">\n                                                            <label><strong>"+o(e.__("Reason"))+":</strong></label>\n                                                            <input class=\"form-control\" type=\"text\" name=\"reason\"/>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"form-group\">\n                                                    <input type=\"submit\" class=\"btn btn-primary\" value=\""+o(e.__("Change role"))+"\"/>\n                                                </div>\n                                            </form>\n                                        </li>\n                                    </ul>\n                                </li>\n                            "}),t+="\n                        </ul>\n                        </div>\n                    </div>\n\n\n                    <div class=\"tab-pane tab-pane--columns\" id=\"affiliations-tabpanel\" role=\"tabpanel\" aria-labelledby=\"affiliations-tab\">\n                        <form class=\"converse-form query-affiliation\">\n                            <p class=\"helptext pb-3\">\n"+o(e.__("An affiliation is a long-lived entitlement which typically implies a certain role and which grants privileges and responsibilities. For example admins and owners automatically have the moderator role."))+"\n                            </p>\n                            <div class=\"form-group\">\n                                <label for=\"affiliation\">\n                                    <strong>"+o(e.__("Affiliation"))+":</strong>\n                                </label>\n                                <div class=\"row\">\n                                    <div class=\"col\">\n                                        <select class=\"custom-select select-affiliation\" name=\"affiliation\">\n                                            ",e.affiliations.forEach(function(n){t+="\n                                                <option value=\""+o(n)+"\" ",n===e.affiliation&&(t+=" selected=\"selected\" "),t+="\n                                                    ","owner"===n&&(t+="\n                                                    title=\""+o(e.__("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users."))+"\"\n                                                    "),t+="\n                                                    ","admin"===n&&(t+="\n                                                    title=\""+o(e.__("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners."))+"\"\n                                                    "),t+="\n                                                    ","outcast"===n&&(t+="\n                                                    title=\""+o(e.__("To ban a user, you give them the affiliation of \"outcast\"."))+"\"\n                                                    "),t+=">"+o(n)+"</option>\n                                            "}),t+="\n                                        </select>\n                                    </div>\n                                    <div class=\"col\">\n                                        <input type=\"submit\" class=\"btn btn-primary\" name=\"users_with_affiliation\" value=\""+o(e.__("Show users"))+"\"/>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col pt-2\">\n                                        ","owner"===e.affiliation&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users."))+"</p>\n                                        "),t+="\n                                        ","admin"===e.affiliation&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners."))+"</p>\n                                        "),t+="\n                                        ","outcast"===e.affiliation&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("To ban a user, you give them the affiliation of \"outcast\"."))+"</p>\n                                        "),t+="\n                                    </div>\n                                </div>\n                            </div>\n                        </form>\n                        <div class=\"scrollable-container\">\n                        <ul class=\"list-group list-group--users\">\n                            ",e.loading_users_with_affiliation?t+="\n                                <li class=\"list-group-item\"> <span class=\"spinner fa fa-spinner centered\"/> </li>\n                            ":(t+="\n                                ",e.users_with_affiliation&&0===e.users_with_affiliation.length?t+="\n                                    <li class=\"list-group-item\">"+o(e.__("No users with that affiliation found."))+"</li>\n                                ":e.users_with_affiliation instanceof Error?t+="\n                                    <li class=\"list-group-item\">"+o(e.users_with_affiliation.message)+"</li>\n                                ":(t+="\n                                    ",(e.users_with_affiliation||[]).forEach(function(n){t+="\n                                        <li class=\"list-group-item\">\n                                            <ul class=\"list-group\">\n                                                <li class=\"list-group-item active\">\n                                                    <div><strong>JID:</strong> "+o(n.jid)+"</div>\n                                                </li>\n                                                <li class=\"list-group-item\">\n                                                    <div><strong>Nickname:</strong> "+o(n.nick)+"</div>\n                                                </li>\n                                                <li class=\"list-group-item\">\n                                                    <div><strong>Affiliation:</strong> "+o(n.affiliation)+" <a href=\"#\" data-form=\"affiliation-form\" class=\"toggle-form right fa fa-wrench\"></a></div>\n                                                    <form class=\"affiliation-form hidden\">\n                                                        <div class=\"form-group\">\n                                                            <input type=\"hidden\" name=\"jid\" value=\""+o(n.jid)+"\"/>\n                                                            <input type=\"hidden\" name=\"nick\" value=\""+o(n.nick)+"\"/>\n                                                            <div class=\"row\">\n                                                                <div class=\"col\">\n                                                                    <label><strong>"+o(e.__("New affiliation"))+":</strong></label>\n                                                                    <select class=\"custom-select select-affiliation\" name=\"affiliation\">\n                                                                        ",e.allowed_affiliations.forEach(function(e){t+="\n                                                                            <option value=\""+o(e)+"\" ",e===n.affiliation&&(t+=" selected=\"selected\" "),t+=">"+o(e)+"</option>\n                                                                        "}),t+="\n                                                                    </select>\n                                                                </div>\n                                                                <div class=\"col\">\n                                                                    <label><strong>"+o(e.__("Reason"))+":</strong></label>\n                                                                    <input class=\"form-control\" type=\"text\" name=\"reason\"/>\n                                                                </div>\n                                                            </div>\n                                                        </div>\n                                                        <div class=\"form-group\">\n                                                            <input type=\"submit\" class=\"btn btn-primary\" name=\"change\" value=\""+o(e.__("Change affiliation"))+"\"/>\n                                                        </div>\n                                                    </form>\n                                                </li>\n                                            </ul>\n                                        </li>\n                                    "}),t+="\n                                "),t+="\n                            "),(t+="\n                        </ul>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/occupant.html -->\n<li class=\"occupant\" id=\""+o(e.id)+"\"\n    ","moderator"===e.role&&(t+="\n       title=\""+o(e.jid)+" "+o(e.desc_moderator)+" "+o(e.hint_occupant)+"\"\n    "),t+="\n    ","participant"===e.role&&(t+="\n       title=\""+o(e.jid)+" "+o(e.desc_participant)+" "+o(e.hint_occupant)+"\"\n    "),t+="\n    ","visitor"===e.role&&(t+="\n       title=\""+o(e.jid)+" "+o(e.desc_visitor)+" "+o(e.hint_occupant)+"\"\n    "),t+="\n    ",e._.includes(["visitor","participant","moderator"],e.role)||(t+="\n       title=\""+o(e.jid)+" "+o(e.hint_occupant)+"\"\n    "),t+=">\n    <div class=\"row no-gutters\">\n        <div class=\"col-auto\">\n            <div class=\"occupant-status occupant-"+o(e.show)+" circle\" title=\""+o(e.hint_show)+"\"></div>\n        </div>\n        <div class=\"col occupant-nick-badge\">\n            <span class=\"occupant-nick\">"+o(e.nick||e.jid)+"</span>\n            <span class=\"occupant-badges\">\n                ","owner"===e.affiliation&&(t+="\n                    <span class=\"badge badge-groupchat\">"+o(e.label_owner)+"</span>\n                "),t+="\n                ","admin"===e.affiliation&&(t+="\n                    <span class=\"badge badge-info\">"+o(e.label_admin)+"</span>\n                "),t+="\n                ","member"===e.affiliation&&(t+="\n                    <span class=\"badge badge-info\">"+o(e.label_member)+"</span>\n                "),t+="\n\n                ","moderator"===e.role&&(t+="\n                    <span class=\"badge badge-info\">"+o(e.label_moderator)+"</span>\n                "),t+="\n                ","visitor"===e.role&&(t+="\n                    <span class=\"badge badge-secondary\">"+o(e.label_visitor)+"</span>\n                "),(t+="\n            </span>\n        </div>\n    </div>\n</li>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/room_description.html -->\n<!-- FIXME: check markup in mockup -->\n<div class=\"room-info\">\n<p class=\"room-info\"><strong>"+o(e.label_jid)+"</strong> "+o(e.jid)+"</p>\n<p class=\"room-info\"><strong>"+o(e.label_desc)+"</strong> "+o(e.desc)+"</p>\n<p class=\"room-info\"><strong>"+o(e.label_occ)+"</strong> "+o(e.occ)+"</p>\n<p class=\"room-info\"><strong>"+o(e.label_features)+"</strong>\n    <ul>\n        ",e.passwordprotected&&(t+="\n        <li class=\"room-info locked\">"+o(e.label_requires_auth)+"</li>\n        "),t+="\n        ",e.hidden&&(t+="\n        <li class=\"room-info\">"+o(e.label_hidden)+"</li>\n        "),t+="\n        ",e.membersonly&&(t+="\n        <li class=\"room-info\">"+o(e.label_requires_invite)+"</li>\n        "),t+="\n        ",e.moderated&&(t+="\n        <li class=\"room-info\">"+o(e.label_moderated)+"</li>\n        "),t+="\n        ",e.nonanonymous&&(t+="\n        <li class=\"room-info\">"+o(e.label_non_anon)+"</li>\n        "),t+="\n        ",e.open&&(t+="\n        <li class=\"room-info\">"+o(e.label_open_room)+"</li>\n        "),t+="\n        ",e.persistent&&(t+="\n        <li class=\"room-info\">"+o(e.label_permanent_room)+"</li>\n        "),t+="\n        ",e.publicroom&&(t+="\n        <li class=\"room-info\">"+o(e.label_public)+"</li>\n        "),t+="\n        ",e.semianonymous&&(t+="\n        <li class=\"room-info\">"+o(e.label_semi_anon)+"</li>\n        "),t+="\n        ",e.temporary&&(t+="\n        <li class=\"room-info\">"+o(e.label_temp_room)+"</li>\n        "),t+="\n        ",e.unmoderated&&(t+="\n        <li class=\"room-info\">"+o(e.label_unmoderated)+"</li>\n        "),(t+="\n    </ul>\n</p>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/room_item.html -->\n<li class=\"room-item list-group-item\">\n  <div class=\"available-chatroom d-flex flex-row\">\n    <a class=\"open-room available-room w-100\"\n       data-room-jid=\""+o(e.jid)+"\"\n       data-room-name=\""+o(e.name)+"\"\n       title=\""+o(e.open_title)+"\"\n       href=\"#\">"+o(e.name)+"</a>\n    <a class=\"right room-info icon-room-info\"\n       data-room-jid=\""+o(e.jid)+"\"\n       title=\""+o(e.info_title)+"\" href=\"#\"></a>\n  </div>\n</li>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/room_panel.html -->\n<!-- <div id=\"chatrooms\"> -->\n<div class=\"d-flex controlbox-padded\">\n    <span class=\"w-100 controlbox-heading controlbox-heading--groupchats\">"+o(e.heading_chatrooms)+"</span>\n    <a class=\"controlbox-heading__btn show-list-muc-modal fa fa-list-ul\" title=\""+o(e.title_list_rooms)+"\" data-toggle=\"modal\" data-target=\"#list-chatrooms-modal\"></a>\n    <a class=\"controlbox-heading__btn show-add-muc-modal fa fa-plus\" title=\""+o(e.title_new_room)+"\" data-toggle=\"modal\" data-target=\"#add-chatrooms-modal\"></a>\n</div>\n<div class=\"list-container list-container--openrooms\"></div>\n<div class=\"list-container list-container--bookmarks\"></div>\n<!-- </div> -->\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chat_status_modal.html -->\n<!-- Change status Modal -->\n<div class=\"modal\" id=\"modal-status-change\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"changeStatusModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"changeStatusModalLabel\">"+o(e.modal_title)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body\">\n                <form class=\"converse-form set-xmpp-status\" id=\"set-xmpp-status\">\n                    <div class=\"form-group\">\n                        <div class=\"custom-control custom-radio\">\n                            <input ","online"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-online\" value=\"online\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-online\">\n                                <span class=\"fa fa-circle chat-status chat-status--online\"></span>"+o(e.label_online)+"</label>\n                        </div>\n                        <div class=\"custom-control custom-radio\">\n                            <input ","busy"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-busy\" value=\"dnd\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-busy\">\n                                <span class=\"fa fa-minus-circle  chat-status chat-status--busy\"></span>"+o(e.label_busy)+"</label>\n                        </div>\n                        <div class=\"custom-control custom-radio\">\n                            <input ","away"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-away\" value=\"away\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-away\">\n                                <span class=\"fa fa-circle chat-status chat-status--away\"></span>"+o(e.label_away)+"</label>\n                        </div>\n                        <div class=\"custom-control custom-radio\">\n                            <input ","xa"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-xa\" value=\"xa\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-xa\">\n                                <span class=\"far fa-circle chat-status chat-status--xa\"></span>"+o(e.label_xa)+"</label>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <div class=\"btn-group w-100\">\n                            <input name=\"status_message\" type=\"text\" class=\"form-control\" \n                                value=\""+o(e.status_message)+"\" placeholder=\""+o(e.placeholder_status_message)+"\"/>\n                            <span class=\"clear-input fa fa-times ",e.status_message||(t+=" hidden "),(t+="\"></span>\n                        </div>\n                    </div>\n                    <button type=\"submit\" class=\"btn btn-primary\">"+o(e.label_save)+"</button>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a;return t+="<!-- src/templates/client_info_modal.html -->\n<!-- Change status Modal -->\n<div class=\"modal\" id=\"modal-status-change\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"changeStatusModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"changeStatusModalLabel\">"+o(e.modal_title)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"container brand-heading-container\">\n                    <h6 class=\"brand-heading\">Converse</h6>\n                    <p class=\"brand-subtitle\">"+o(e.version_name)+"</p>\n                    <p class=\"brand-subtitle\">"+(null==(a=e.first_subtitle)?"":a)+"</p>\n                    <p class=\"brand-subtitle\">"+(null==(a=e.second_subtitle)?"":a)+"</p>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/profile_modal.html -->\n<div class=\"modal\" id=\"user-profile-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"user-profile-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"user-profile-modal-label\">"+o(e.heading_profile)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                ",e._converse.pluggable.plugins["converse-omemo"].enabled(e._converse)&&(t+="\n                <ul class=\"nav nav-pills justify-content-center\">\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link active\" id=\"profile-tab\" href=\"#profile-tabpanel\" aria-controls=\"profile-tabpanel\" role=\"tab\" data-toggle=\"tab\">Profile</a>\n                    </li>\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link\" id=\"omemo-tab\" href=\"#omemo-tabpanel\" aria-controls=\"omemo-tabpanel\" role=\"tab\" data-toggle=\"tab\">OMEMO</a>\n                    </li>\n                </ul>\n                "),t+="\n                <div class=\"tab-content\">\n                    <div class=\"tab-pane active\" id=\"profile-tabpanel\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">\n                        <form class=\"converse-form converse-form--modal profile-form\" action=\"#\">\n                            <div class=\"row\">\n                                <div class=\"col-auto\">\n                                    <a class=\"change-avatar\" href=\"#\">\n                                        ",e.image&&(t+="\n                                            <img alt=\""+o(e.alt_avatar)+"\" class=\"img-thumbnail avatar align-self-center\" height=\"100px\" width=\"100px\" src=\"data:"+o(e.image_type)+";base64,"+o(e.image)+"\"/>\n                                        "),t+="\n                                        ",e.image||(t+="\n                                            <canvas class=\"avatar\" height=\"100px\" width=\"100px\"></canvas>\n                                        "),t+="\n                                    </a>\n                                    <input class=\"hidden\" name=\"image\" type=\"file\"/>\n                                </div>\n                                <div class=\"col\">\n                                    <div class=\"form-group\">\n                                        <label class=\"col-form-label\">"+o(e.label_jid)+":</label>\n                                        <div>"+o(e.jid)+"</div>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-fullname\" class=\"col-form-label\">"+o(e.label_fullname)+":</label>\n                                <input id=\"vcard-fullname\" type=\"text\" class=\"form-control\" name=\"fn\" value=\""+o(e.fullname)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-nickname\" class=\"col-form-label\">"+o(e.label_nickname)+":</label>\n                                <input id=\"vcard-nickname\" type=\"text\" class=\"form-control\" name=\"nickname\" value=\""+o(e.nickname)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-url\" class=\"col-form-label\">"+o(e.label_url)+":</label>\n                                <input id=\"vcard-url\" type=\"url\" class=\"form-control\" name=\"url\" value=\""+o(e.url)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-email\" class=\"col-form-label\">"+o(e.label_email)+":</label>\n                                <input id=\"vcard-email\" type=\"email\" class=\"form-control\" name=\"email\" value=\""+o(e.email)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-role\" class=\"col-form-label\">"+o(e.label_role)+":</label>\n                                <input id=\"vcard-role\" type=\"text\" class=\"form-control\" name=\"role\" value=\""+o(e.role)+"\" aria-describedby=\"vcard-role-help\"/>\n                                <small id=\"vcard-role-help\" class=\"form-text text-muted\">"+o(e.label_role_help)+"</small>\n                            </div>\n                            <hr/>\n                            <div class=\"form-group\">\n                                <button type=\"submit\" class=\"save-form btn btn-primary\">"+o(e.__("Save and close"))+"</button>\n                            </div>\n                        </form>\n                    </div>\n                    ",e._converse.pluggable.plugins["converse-omemo"].enabled(e._converse)&&(t+="\n                        <div class=\"tab-pane\" id=\"omemo-tabpanel\" role=\"tabpanel\" aria-labelledby=\"omemo-tab\">\n                            <form class=\"converse-form fingerprint-removal\">\n                                <ul class=\"list-group fingerprints\">\n                                    <li class=\"list-group-item active\">"+o(e.__("This device's OMEMO fingerprint"))+"</li>\n                                    <li class=\"list-group-item\">\n                                    ",t+=e.view.current_device&&e.view.current_device.get("bundle")&&e.view.current_device.get("bundle").fingerprint?"\n                                        <span class=\"fingerprint\">"+o(e.utils.formatFingerprint(e.view.current_device.get("bundle").fingerprint))+"</span>\n                                    ":"\n                                        <span class=\"spinner fa fa-spinner centered\"/>\n                                    ",t+="\n                                    </li>\n                                </ul>\n                                <div class=\"form-group\">\n                                    <button type=\"button\" class=\"generate-bundle btn btn-danger\">"+o(e.__("Generate new keys and fingerprint"))+"</button>\n                                </div>\n\n                                ",e.view.other_devices.length&&(t+="\n                                    <ul class=\"list-group fingerprints\">\n                                        <li class=\"list-group-item nopadding active\">\n                                            <label>\n                                            <input type=\"checkbox\" class=\"select-all\" title=\""+o(e.__("Select all"))+"\"\n                                                   aria-label=\""+o(e.__("Checkbox to select fingerprints of all other OMEMO devices"))+"\"/>\n                                            "+o(e.__("Other OMEMO-enabled devices"))+"\n                                            </label>\n                                        </li>\n                                        ",e.view.other_devices.forEach(function(n){t+="\n                                            ",t+=n.get("bundle")&&n.get("bundle").fingerprint?"\n                                            <li class=\"fingerprint-removal-item list-group-item nopadding\">\n                                                <label>\n                                                <input type=\"checkbox\" value=\""+o(n.get("id"))+"\"\n                                                       aria-label=\""+o(e.__("Checkbox for selecting the following fingerprint"))+"\"/>\n                                                <span class=\"fingerprint\">"+o(e.utils.formatFingerprint(n.get("bundle").fingerprint))+"</span>\n                                                </label>\n                                            </li>\n                                            ":"\n                                            <li class=\"fingerprint-removal-item list-group-item nopadding\">\n                                                <label>\n                                                <input type=\"checkbox\" value=\""+o(n.get("id"))+"\"\n                                                       aria-label=\""+o(e.__("Checkbox for selecting the following fingerprint"))+"\"/>\n                                                <span>"+o(e.__("Device without a fingerprint"))+"</span>\n                                                </label>\n                                            </li>\n                                            ",t+="\n                                        "}),t+="\n                                    </ul>\n                                    <div class=\"form-group\">\n                                        <button type=\"submit\" class=\"save-form btn btn-primary\">"+o(e.__("Remove checked devices and close"))+"</button>\n                                    </div>\n                                "),t+="\n                            </form>\n                        </div>\n                    "),(t+="\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/profile_view.html -->\n<div class=\"userinfo controlbox-padded\">\n<div class=\"controlbox-section profile d-flex\">\n    <a class=\"show-profile\" href=\"#\">\n        <canvas class=\"avatar align-self-center\" height=\"40\" width=\"40\"></canvas>\n    </a>\n    <span class=\"username w-100 align-self-center\">"+o(e.fullname)+"</span>\n    ",e._converse.show_client_info&&(t+="\n        <a class=\"controlbox-heading__btn show-client-info fa fa-info-circle align-self-center\" title=\""+o(e.info_details)+"\"></a>\n    "),t+="\n    ",e._converse.allow_logout&&(t+="\n        <a class=\"controlbox-heading__btn logout fa fa-sign-out-alt align-self-center\" title=\""+o(e.title_log_out)+"\"></a>\n    "),t+="\n</div>\n<div class=\"d-flex xmpp-status\">\n    <a class=\"change-status\" title=\""+o(e.title_change_status)+"\" data-toggle=\"modal\" data-target=\"#changeStatusModal\">\n        <span class=\""+o(e.chat_status)+" w-100 align-self-center\" data-value=\""+o(e.chat_status)+"\">\n            <span class=\"\n                ","online"===e.chat_status&&(t+=" fa fa-circle chat-status chat-status--online"),t+="\n                ","dnd"===e.chat_status&&(t+=" fa fa-minus-circle chat-status chat-status--busy "),t+="\n                ","away"===e.chat_status&&(t+=" fa fa-circle chat-status chat-status--away"),t+="\n                ","xa"===e.chat_status&&(t+=" far fa-circle chat-status chat-status--xa "),t+="\n                ","offline"===e.chat_status&&(t+=" fa fa-circle chat-status chat-status--offline"),(t+="\"></span> "+o(e.status_message)+"</span>\n    </a>\n</div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/toolbar_omemo.html -->\n<li class=\"toggle-omemo fa \n        ",e.omemo_supported||(t+=" disabled "),t+="\n        ",t+=e.omemo_active?" fa-lock ":" fa-unlock ",(t+="\"\n    title=\""+o(e.__("Messages are being sent in plaintext"))+"\"></li>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/register_link.html -->\n<fieldset class=\"switch-form\">\n    ",e._converse.auto_login||"CONNECTING"===e._converse.CONNECTION_STATUS[e.connection_status]||(t+="\n        <p>"+o(e.__("Don't have a chat account?"))+"</p>\n        <p><a class=\"register-account toggle-register-login\" href=\"#converse/register\">"+o(e.__("Create an account"))+"</a></p>\n    "),(t+="\n</fieldset>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/register_panel.html -->\n<div>\n    <form id=\"converse-register\" class=\"converse-form\">\n        <legend class=\"col-form-label\">"+o(e.__("Create your account"))+"</legend>\n\n        <div class=\"form-group\">\n            <label>"+o(e.__("Please enter the XMPP provider to register with:"))+"</label>\n            <div class=\"form-errors hidden\"></div>\n\n            ",t+=e.default_domain?"\n                "+o(e.default_domain)+"\n            </div>\n            ":"\n                <input class=\"form-control\" required=\"required\" type=\"text\" name=\"domain\" placeholder=\""+o(e.domain_placeholder)+"\"/>\n                <p class=\"form-text text-muted\">"+o(e.help_providers)+" <a href=\""+o(e.href_providers)+"\" class=\"url\" target=\"_blank\" rel=\"noopener\">"+o(e.help_providers_link)+"</a>.</p>\n            </div>\n            <fieldset class=\"buttons\">\n                <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.label_register)+"\"/>\n                <div class=\"switch-form\">\n                    <p>"+o(e.__("Already have a chat account?"))+"</p>\n                    <p><a class=\"login-here toggle-register-login\" href=\"#converse/login\">"+o(e.__("Log in here"))+"</a></p>\n                </div>\n            </fieldset>\n            ",(t+="\n        <!--</div>-->\n    </form>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/registration_form.html -->\n<legend class=\"col-form-label\">"+o(e.__("Account Registration:"))+" "+o(e.domain)+"</legend>\n<p class=\"title\">"+o(e.title)+"</p>\n<p class=\"form-help instructions\">"+o(e.instructions)+"</p>\n<div class=\"form-errors hidden\"></div>\n\n<fieldset class=\"buttons\">\n    <input type=\"submit\" class=\"btn btn-primary\" value=\""+o(e.__("Register"))+"\"/>\n    ",e.registration_domain||(t+="\n        <input type=\"button\" class=\"btn btn-secondary button-cancel\" value=\""+o(e.__("Choose a different provider"))+"\"/>\n    "),(t+="\n    <div class=\"switch-form\">\n        <p>"+o(e.__("Already have a chat account?"))+"</p>\n        <p><a class=\"login-here toggle-register-login\" href=\"#converse/login\">"+o(e.__("Log in here"))+"</a></p>\n    </div>\n</fieldset>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/registration_request.html -->\n<span class=\"spinner login-submit fa fa-spinner\"></span>\n<p class=\"info\">"+o(e.__("Hold tight, we're fetching the registration form\u2026"))+"</p>\n",e.cancel&&(t+="\n    <button class=\"btn btn-secondary button-cancel hor_centered\">"+o(e.__("Cancel"))+"</button>\n"),(t+="\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/rooms_list.html -->\n<div class=\"list-container list-container--openrooms "+o(!e.rooms.length&&"hidden"||"")+"\">\n\n<a href=\"#\" class=\"list-toggle open-rooms-toggle controlbox-padded\" title=\""+o(e.desc_rooms)+"\">\n<span class=\"fa ",t+=e.toggle_state===e._converse.OPENED?" fa-caret-down ":" fa-caret-right ",(t+="\"></span>"+o(e.label_rooms)+"</a>\n\n<div class=\"items-list rooms-list open-rooms-list "+o(e.collapsed&&"collapsed")+"\">\n    ",e.rooms.forEach(function(n){t+="\n        <div class=\"list-item controlbox-padded available-chatroom d-flex flex-row\n            ",e.currently_open(n)&&(t+=" open "),t+="\n            ",n.get("num_unread_general")&&(t+=" unread-msgs "),t+="\"\n            data-room-jid=\""+o(n.get("jid"))+"\">\n\n        ",n.get("num_unread")&&(t+="\n            <span class=\"list-item-badge badge badge-room-color msgs-indicator\">"+o(n.get("num_unread"))+"</span>\n        "),t+="\n        <a class=\"list-item-link open-room available-room w-100\"\n            data-room-jid=\""+o(n.get("jid"))+"\"\n            title=\""+o(e.open_title)+"\" href=\"#\">"+o(n.getDisplayName())+"</a>\n\n        ",e.allow_bookmarks&&(t+="\n        <a class=\"list-item-action fa ",t+=e.bookmarked?" fa-bookmark remove-bookmark button-on ":" add-bookmark fa-bookmark ",t+="\"\n           data-room-jid=\""+o(n.get("jid"))+"\"\n           data-bookmark-name=\""+o(n.getDisplayName())+"\"\n           title=\"",t+=e.bookmarked?" "+o(e.info_remove_bookmark)+" ":" "+o(e.info_add_bookmark)+" ",t+="\"\n           href=\"#\"></a>\n        "),t+="\n\n        <a class=\"list-item-action room-info fa fa-info-circle\"\n           data-room-jid=\""+o(n.get("jid"))+"\"\n           title=\""+o(e.info_title)+"\" href=\"#\"></a>\n\n        <a class=\"list-item-action fa fa-sign-out-alt close-room\"\n           data-room-jid=\""+o(n.get("jid"))+"\"\n           data-room-name=\""+o(n.getDisplayName())+"\"\n           title=\""+o(e.info_leave_room)+"\" href=\"#\"></a>\n\n        </div>\n    "}),t+="\n</div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/add_contact_modal.html -->\n<!-- Add contact Modal -->\n<div class=\"modal\" id=\"add-contact-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addContactModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"addContactModalLabel\">"+o(e.heading_new_contact)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <form class=\"converse-form add-xmpp-contact\">\n                <div class=\"modal-body\">\n                    <div class=\"form-group add-xmpp-contact__jid\">\n                        <label class=\"clearfix\" for=\"jid\">"+o(e.label_xmpp_address)+":</label>\n                        <div class=\"suggestion-box suggestion-box__jid\">\n                            <ul class=\"suggestion-box__results suggestion-box__results--above\" hidden=\"\"></ul>\n                            <input type=\"text\" name=\"jid\"\n                                   ",e._converse.xhr_user_search_url||(t+=" required=\"required\" "),(t+="\n                                   value=\""+o(e.jid)+"\"\n                                   class=\"form-control suggestion-box__input\"\n                                   placeholder=\""+o(e.contact_placeholder)+"\"/>\n                            <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n                        </div>\n                    </div>\n                    <div class=\"form-group add-xmpp-contact__name\">\n                        <label class=\"clearfix\" for=\"name\">"+o(e.label_nickname)+":</label>\n                        <div class=\"suggestion-box suggestion-box__name\">\n                            <ul class=\"suggestion-box__results suggestion-box__results--above\" hidden=\"\"></ul>\n                            <input type=\"text\" name=\"name\" value=\""+o(e.nickname)+"\"\n                                   class=\"form-control suggestion-box__input\"\n                                   placeholder=\""+o(e.nickname_placeholder)+"\"/>\n                            <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <div class=\"invalid-feedback\">"+o(e.error_message)+"</div>\n                    </div>\n                    <button type=\"submit\" class=\"btn btn-primary\">"+o(e.label_add)+"</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/group_header.html -->\n<a href=\"#\" class=\"list-toggle group-toggle controlbox-padded\" title=\""+o(e.desc_group_toggle)+"\">\n    <span class=\"fa ",t+=e.toggle_state===e._converse.OPENED?" fa-caret-down ":" fa-caret-right ",t+="\">\n    </span> "+o(e.label_group)+"</a>\n<ul class=\"items-list roster-group-contacts ",e.toggle_state===e._converse.CLOSED&&(t+=" collapsed "),(t+="\"></ul>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/pending_contact.html -->\n",e.allow_chat_pending_contacts&&(t+="\n<a class=\"list-item-link open-chat w-100\" href=\"#\">\n"),t+="\n<span class=\"pending-contact-name\" title=\"JID: "+o(e.jid)+"\">"+o(e.display_name)+"</span> \n",e.allow_chat_pending_contacts&&(t+="</a>"),(t+="\n<a class=\"list-item-action remove-xmpp-contact far fa-trash-alt\" title=\""+o(e.desc_remove)+"\" href=\"#\"></a>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/requesting_contact.html -->\n",e.allow_chat_pending_contacts&&(t+="\n<a class=\"open-chat w-100\"href=\"#\">\n"),t+="\n<span class=\"req-contact-name w-100\" title=\"JID: "+o(e.jid)+"\">"+o(e.display_name)+"</span>\n",e.allow_chat_pending_contacts&&(t+="\n</a>\n"),(t+="\n<a class=\"accept-xmpp-request list-item-action list-item-action--visible fa fa-check\"\n   aria-label=\""+o(e.desc_accept)+"\" title=\""+o(e.desc_accept)+"\" href=\"#\"></a>\n<a class=\"decline-xmpp-request list-item-action list-item-action--visible  fa fa-times\"\n   aria-label=\""+o(e.desc_decline)+"\" title=\""+o(e.desc_decline)+"\" href=\"#\"></a>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/roster.html -->\n<div class=\"d-flex controlbox-padded\">\n    <span class=\"w-100 controlbox-heading controlbox-heading--contacts\">"+o(e.heading_contacts)+"</span>\n    <a class=\"controlbox-heading__btn sync-contacts fa fa-sync\" title=\""+o(e.title_sync_contacts)+"\"></a>\n    ",e.allow_contact_requests&&(t+="\n        <a class=\"controlbox-heading__btn add-contact fa fa-user-plus\"\n           title=\""+o(e.title_add_contact)+"\"\n           data-toggle=\"modal\"\n           data-target=\"#add-contact-modal\"></a>\n    "),(t+="\n</div>\n\n<form class=\"roster-filter-form\"></form>\n\n<div class=\"list-container roster-contacts\"></div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/roster_filter.html -->\n<form class=\"controlbox-padded roster-filter-form input-button-group ",e.visible||(t+=" hidden "),t+="\">\n    <div class=\"form-inline flex-nowrap\">\n        <div class=\"filter-by d-flex flex-nowrap\">\n            <span class=\"fa fa-user ","contacts"===e.filter_type&&(t+=" selected "),t+="\" data-type=\"contacts\" title=\""+o(e.title_contact_filter)+"\"></span>\n            <span class=\"fa fa-users ","groups"===e.filter_type&&(t+=" selected "),t+="\" data-type=\"groups\" title=\""+o(e.title_group_filter)+"\"></span>\n            <span class=\"fa fa-circle ","state"===e.filter_type&&(t+=" selected "),t+="\" data-type=\"state\" title=\""+o(e.title_status_filter)+"\"></span>\n        </div>\n\n        <div class=\"btn-group\">\n            <input ",e.filter_text&&(t+=" value=\""+o(e.filter_text)+"\" "),t+="\n                class=\"roster-filter form-control ","state"===e.filter_type&&(t+=" hidden "),t+="\"\n                placeholder=\""+o(e.placeholder)+"\"/>\n            <span class=\"clear-input fa fa-times ",e.filter_text&&"state"!==e.filter_type||(t+=" hidden "),t+="\"></span>\n        </div>\n\n        <select class=\"form-control state-type ","state"!==e.filter_type&&(t+=" hidden "),t+="\">\n            <option value=\"\">"+o(e.label_any)+"</option>\n            <option ","unread_messages"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"unread_messages\">"+o(e.label_unread_messages)+"</option>\n            <option ","online"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"online\">"+o(e.label_online)+"</option>\n            <option ","chat"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"chat\">"+o(e.label_chatty)+"</option>\n            <option ","dnd"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"dnd\">"+o(e.label_busy)+"</option>\n            <option ","away"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"away\">"+o(e.label_away)+"</option>\n            <option ","xa"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"xa\">"+o(e.label_xa)+"</option>\n            <option ","offline"===e.chat_state&&(t+=" selected=\"selected\" "),(t+="\n                value=\"offline\">"+o(e.label_offline)+"</option>\n        </select>\n    </div>\n</form>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/roster_item.html -->\n<a class=\"list-item-link cbox-list-item open-chat w-100 ",e.num_unread&&(t+=" unread-msgs "),t+="\"\n   title=\""+o(e.desc_chat)+"\" href=\"#\">\n\n    <canvas class=\"avatar\" height=\"30\" width=\"30\"></canvas>\n    <span class=\""+o(e.status_icon)+"\" title=\""+o(e.desc_status)+"\"></span>\n    ",e.num_unread&&(t+=" <span class=\"msgs-indicator\">"+o(e.num_unread)+"</span> "),t+="\n    <span class=\"contact-name contact-name--"+o(e.show)+" ",e.num_unread&&(t+=" unread-msgs "),t+="\">"+o(e.display_name)+"</span>\n</a>\n",e.allow_contact_removal&&(t+="\n<a class=\"list-item-action remove-xmpp-contact far fa-trash-alt\" title=\""+o(e.desc_remove)+"\" href=\"#\"></a>\n"),(t+="\n",t)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,o){"use strict";o.r(t);const n={},a={plugins:{add(e,t){if(n[e]!==void 0)throw new TypeError("Error: plugin with name \"".concat(e,"\" has already been ")+"registered!");n[e]=t}},initialize(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};a.load(e).initialize(e)},load(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.assets_path&&(o.p=e.assets_path),o(462),Object.keys(n).forEach(e=>a.plugins.add(e,n[e])),a}};window.converse=a,t["default"]=a},function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var o=document.createEvent("CustomEvent");return o.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),o}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e),String.prototype.includes||(String.prototype.includes=function(e,t){'use strict';return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var o=this.toString();(t===void 0||t>o.length)&&(t=o.length),t-=e.length;var n=o.indexOf(e,t);return-1!==n&&n===t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.splitOnce||(String.prototype.splitOnce=function(e){var t=this.split(e);return[t.shift(),t.join(e)]}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},function(e,t){var o,n;o=[],n=function(){return Object}.apply(t,o),!(n!==void 0&&(e.exports=n))},function(e,t,o){function n(t){if(!o.o(a,t))return Promise.resolve().then(function(){var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o});var n=a[t],s=n[0];return o.e(n[1]).then(function(){return o.t(s,3)})}var a={"./af/LC_MESSAGES/converse.po":[463,130],"./ar/LC_MESSAGES/converse.po":[464,131],"./bg/LC_MESSAGES/converse.po":[465,132],"./ca/LC_MESSAGES/converse.po":[466,133],"./cs/LC_MESSAGES/converse.po":[467,134],"./de/LC_MESSAGES/converse.po":[468,135],"./eo/LC_MESSAGES/converse.po":[469,136],"./es/LC_MESSAGES/converse.po":[470,137],"./eu/LC_MESSAGES/converse.po":[471,138],"./fr/LC_MESSAGES/converse.po":[472,139],"./gl/LC_MESSAGES/converse.po":[473,140],"./he/LC_MESSAGES/converse.po":[474,141],"./hi/LC_MESSAGES/converse.po":[475,142],"./hu/LC_MESSAGES/converse.po":[476,143],"./id/LC_MESSAGES/converse.po":[477,144],"./it/LC_MESSAGES/converse.po":[478,145],"./ja/LC_MESSAGES/converse.po":[479,146],"./lt/LC_MESSAGES/converse.po":[480,147],"./mr/LC_MESSAGES/converse.po":[481,148],"./nb/LC_MESSAGES/converse.po":[482,149],"./nl/LC_MESSAGES/converse.po":[483,150],"./nl_BE/LC_MESSAGES/converse.po":[484,151],"./oc/LC_MESSAGES/converse.po":[485,152],"./pl/LC_MESSAGES/converse.po":[486,153],"./pt/LC_MESSAGES/converse.po":[487,154],"./pt_BR/LC_MESSAGES/converse.po":[488,155],"./ro/LC_MESSAGES/converse.po":[489,156],"./ru/LC_MESSAGES/converse.po":[490,157],"./tr/LC_MESSAGES/converse.po":[491,158],"./uk/LC_MESSAGES/converse.po":[492,159],"./vi/LC_MESSAGES/converse.po":[493,160],"./zh_CN/LC_MESSAGES/converse.po":[494,161],"./zh_TW/LC_MESSAGES/converse.po":[495,162]};n.keys=function(){return Object.keys(a)},n.id=331,e.exports=n},function(e,t,o){function n(t){if(!o.o(a,t))return Promise.resolve().then(function(){var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o});var n=a[t],s=n[0];return o.e(n[1]).then(function(){return o.t(s,7)})}var a={"./af":[199,0],"./af.js":[199,0],"./ar":[206,1],"./ar-dz":[200,2],"./ar-dz.js":[200,2],"./ar-kw":[201,3],"./ar-kw.js":[201,3],"./ar-ly":[202,4],"./ar-ly.js":[202,4],"./ar-ma":[203,5],"./ar-ma.js":[203,5],"./ar-sa":[204,6],"./ar-sa.js":[204,6],"./ar-tn":[205,7],"./ar-tn.js":[205,7],"./ar.js":[206,1],"./az":[207,8],"./az.js":[207,8],"./be":[208,9],"./be.js":[208,9],"./bg":[209,10],"./bg.js":[209,10],"./bm":[210,11],"./bm.js":[210,11],"./bn":[211,12],"./bn.js":[211,12],"./bo":[212,13],"./bo.js":[212,13],"./br":[213,14],"./br.js":[213,14],"./bs":[214,15],"./bs.js":[214,15],"./ca":[215,16],"./ca.js":[215,16],"./cs":[216,17],"./cs.js":[216,17],"./cv":[217,18],"./cv.js":[217,18],"./cy":[218,19],"./cy.js":[218,19],"./da":[219,20],"./da.js":[219,20],"./de":[222,21],"./de-at":[220,22],"./de-at.js":[220,22],"./de-ch":[221,23],"./de-ch.js":[221,23],"./de.js":[222,21],"./dv":[223,24],"./dv.js":[223,24],"./el":[224,25],"./el.js":[224,25],"./en":[232,26],"./en-SG":[225,27],"./en-SG.js":[225,27],"./en-au":[226,28],"./en-au.js":[226,28],"./en-ca":[227,29],"./en-ca.js":[227,29],"./en-gb":[228,30],"./en-gb.js":[228,30],"./en-ie":[229,31],"./en-ie.js":[229,31],"./en-il":[230,32],"./en-il.js":[230,32],"./en-nz":[231,33],"./en-nz.js":[231,33],"./en.js":[232,26],"./eo":[233,34],"./eo.js":[233,34],"./es":[236,35],"./es-do":[234,36],"./es-do.js":[234,36],"./es-us":[235,37],"./es-us.js":[235,37],"./es.js":[236,35],"./et":[237,38],"./et.js":[237,38],"./eu":[238,39],"./eu.js":[238,39],"./fa":[239,40],"./fa.js":[239,40],"./fi":[240,41],"./fi.js":[240,41],"./fo":[241,42],"./fo.js":[241,42],"./fr":[244,43],"./fr-ca":[242,44],"./fr-ca.js":[242,44],"./fr-ch":[243,45],"./fr-ch.js":[243,45],"./fr.js":[244,43],"./fy":[245,46],"./fy.js":[245,46],"./ga":[246,47],"./ga.js":[246,47],"./gd":[247,48],"./gd.js":[247,48],"./gl":[248,49],"./gl.js":[248,49],"./gom-latn":[249,50],"./gom-latn.js":[249,50],"./gu":[250,51],"./gu.js":[250,51],"./he":[251,52],"./he.js":[251,52],"./hi":[252,53],"./hi.js":[252,53],"./hr":[253,54],"./hr.js":[253,54],"./hu":[254,55],"./hu.js":[254,55],"./hy-am":[255,56],"./hy-am.js":[255,56],"./id":[256,57],"./id.js":[256,57],"./is":[257,58],"./is.js":[257,58],"./it":[259,59],"./it-ch":[258,60],"./it-ch.js":[258,60],"./it.js":[259,59],"./ja":[260,61],"./ja.js":[260,61],"./jv":[261,62],"./jv.js":[261,62],"./ka":[262,63],"./ka.js":[262,63],"./kk":[263,64],"./kk.js":[263,64],"./km":[264,65],"./km.js":[264,65],"./kn":[265,66],"./kn.js":[265,66],"./ko":[266,67],"./ko.js":[266,67],"./ku":[267,68],"./ku.js":[267,68],"./ky":[268,69],"./ky.js":[268,69],"./lb":[269,70],"./lb.js":[269,70],"./lo":[270,71],"./lo.js":[270,71],"./lt":[271,72],"./lt.js":[271,72],"./lv":[272,73],"./lv.js":[272,73],"./me":[273,74],"./me.js":[273,74],"./mi":[274,75],"./mi.js":[274,75],"./mk":[275,76],"./mk.js":[275,76],"./ml":[276,77],"./ml.js":[276,77],"./mn":[277,78],"./mn.js":[277,78],"./mr":[278,79],"./mr.js":[278,79],"./ms":[280,80],"./ms-my":[279,81],"./ms-my.js":[279,81],"./ms.js":[280,80],"./mt":[281,82],"./mt.js":[281,82],"./my":[282,83],"./my.js":[282,83],"./nb":[283,84],"./nb.js":[283,84],"./ne":[284,85],"./ne.js":[284,85],"./nl":[286,86],"./nl-be":[285,87],"./nl-be.js":[285,87],"./nl.js":[286,86],"./nn":[287,88],"./nn.js":[287,88],"./oc-lnc":[288,89],"./oc-lnc.js":[288,89],"./pa-in":[289,90],"./pa-in.js":[289,90],"./pl":[290,91],"./pl.js":[290,91],"./pt":[292,92],"./pt-br":[291,93],"./pt-br.js":[291,93],"./pt.js":[292,92],"./ro":[293,94],"./ro.js":[293,94],"./ru":[294,95],"./ru.js":[294,95],"./sd":[295,96],"./sd.js":[295,96],"./se":[296,97],"./se.js":[296,97],"./si":[297,98],"./si.js":[297,98],"./sk":[298,99],"./sk.js":[298,99],"./sl":[299,100],"./sl.js":[299,100],"./sq":[300,101],"./sq.js":[300,101],"./sr":[302,102],"./sr-cyrl":[301,103],"./sr-cyrl.js":[301,103],"./sr.js":[302,102],"./ss":[303,104],"./ss.js":[303,104],"./sv":[304,105],"./sv.js":[304,105],"./sw":[305,106],"./sw.js":[305,106],"./ta":[306,107],"./ta.js":[306,107],"./te":[307,108],"./te.js":[307,108],"./tet":[308,109],"./tet.js":[308,109],"./tg":[309,110],"./tg.js":[309,110],"./th":[310,111],"./th.js":[310,111],"./tl-ph":[311,112],"./tl-ph.js":[311,112],"./tlh":[312,113],"./tlh.js":[312,113],"./tr":[313,114],"./tr.js":[313,114],"./tzl":[314,115],"./tzl.js":[314,115],"./tzm":[316,116],"./tzm-latn":[315,117],"./tzm-latn.js":[315,117],"./tzm.js":[316,116],"./ug-cn":[317,118],"./ug-cn.js":[317,118],"./uk":[318,119],"./uk.js":[318,119],"./ur":[319,120],"./ur.js":[319,120],"./uz":[321,121],"./uz-latn":[320,122],"./uz-latn.js":[320,122],"./uz.js":[321,121],"./vi":[322,123],"./vi.js":[322,123],"./x-pseudo":[323,124],"./x-pseudo.js":[323,124],"./yo":[324,125],"./yo.js":[324,125],"./zh-cn":[325,126],"./zh-cn.js":[325,126],"./zh-hk":[326,127],"./zh-hk.js":[326,127],"./zh-tw":[327,128],"./zh-tw.js":[327,128]};n.keys=function(){return Object.keys(a)},n.id=332,e.exports=n},function(e){e.exports=function(e,t,o){var n=-1,a=e.length;0>t&&(t=-t>a?0:a+t),o=o>a?a:o,0>o&&(o+=a),a=t>o?0:o-t>>>0,t>>>=0;for(var s=Array(a);++n<a;)s[n]=e[n+t];return s}},function(e,t,o){var n=o(335),a=1/0;e.exports=function(e){if(!e)return 0===e?e:0;if(e=n(e),e===a||e===-a){var t=0>e?-1:1;return 1.7976931348623157e+308*t}return e===e?e:0}},function(e,t,o){var n=o(9),a=o(28),s=0/0,i=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return s;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(/^\s+|\s+$/g,"");var o=/^0b[01]+$/i.test(e);return o||/^0o[0-7]+$/i.test(e)?i(e.slice(2),o?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?s:+e}},function(e,t,o){var n=o(29),a=Object.prototype,s=a.hasOwnProperty,i=a.toString,r=n?n.toStringTag:void 0;e.exports=function(e){var t=s.call(e,r),o=e[r];try{e[r]=void 0;var n=!0}catch(t){}var a=i.call(e);return n&&(t?e[r]=o:delete e[r]),a}},function(e){var t=Object.prototype,o=t.toString;e.exports=function(e){return o.call(e)}},function(e,t,o){var n=o(68),a=o(339),s=o(351),i=o(6);e.exports=function(e,t){var o=i(e)?n:a;return o(e,s(t))}},function(e,t,o){var n=o(340),a=o(350),s=a(n);e.exports=s},function(e,t,o){var n=o(341),a=o(19);e.exports=function(e,t){return e&&n(e,t,a)}},function(e,t,o){var n=o(342),a=n();e.exports=a},function(e){e.exports=function(e){return function(t,o,n){for(var a=-1,s=Object(t),i=n(t),r=i.length;r--;){var l=i[e?r:++a];if(!1===o(s[l],l,s))break}return t}}},function(e){e.exports=function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}},function(e,t,o){var n=o(15),a=o(11);e.exports=function(e){return a(e)&&n(e)=="[object Arguments]"}},function(e){e.exports=function(){return!1}},function(e,t,o){var n=o(15),a=o(48),s=o(11),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&a(e.length)&&!!i[n(e)]}},function(e){e.exports=function(e){return function(t){return e(t)}}},function(e,t,o){(function(e){var n=o(67),a=t&&!t.nodeType&&t,s=a&&"object"==typeof e&&e&&!e.nodeType&&e,i=s&&s.exports===a,r=i&&n.process,l=function(){try{var e=s&&s.require&&s.require("util").types;return e?e:r&&r.binding&&r.binding("util")}catch(t){}}();e.exports=l}).call(this,o(27)(e))},function(e,t,o){var n=o(75),a=n(Object.keys,Object);e.exports=a},function(e,t,o){var n=o(18);e.exports=function(e,t){return function(o,a){if(null==o)return o;if(!n(o))return e(o,a);for(var s=o.length,i=t?s:-1,r=Object(o);(t?i--:++i<s)&&!(!1===a(r[i],i,r)););return o}}},function(e,t,o){var n=o(23);e.exports=function(e){return"function"==typeof e?e:n}},function(e,t,o){var n=o(353),a=o(358),s=o(83),i=a(function(e,t){n(t,s(t),e)});e.exports=i},function(e,t,o){var n=o(76),a=o(77);e.exports=function(e,t,o,s){var i=!o;o||(o={});for(var r=-1,l=t.length;++r<l;){var d=t[r],c=s?s(o[d],e[d],d,o,e):void 0;c===void 0&&(c=e[d]),i?a(o,d,c):n(o,d,c)}return o}},function(e,t,o){var n=o(40),a=o(355),s=o(9),i=o(79),r=Function.prototype,l=Object.prototype,d=r.toString,c=l.hasOwnProperty,p=RegExp("^"+d.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){if(!s(e)||a(e))return!1;var t=n(e)?p:/^\[object .+?Constructor\]$/;return t.test(i(e))}},function(e,t,o){function n(e){return!!s&&s in e}var a=o(356),s=function(){var e=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t,o){var n=o(5),a=n["__core-js_shared__"];e.exports=a},function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,o){var n=o(80),a=o(362);e.exports=function(e){return n(function(t,o){var n=-1,s=o.length,i=1<s?o[s-1]:void 0,r=2<s?o[2]:void 0;for(i=3<e.length&&"function"==typeof i?(s--,i):void 0,r&&a(o[0],o[1],r)&&(i=3>s?void 0:i,s=1),t=Object(t);++n<s;){var l=o[n];l&&e(t,l,n,i)}return t})}},function(e,t,o){var n=o(49),a=Math.max;e.exports=function(e,t,o){return t=a(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,r=a(s.length-t,0),l=Array(r);++i<r;)l[i]=s[t+i];i=-1;for(var d=Array(t+1);++i<t;)d[i]=s[i];return d[t]=o(l),n(e,this,d)}}},function(e,t,o){var n=o(361),a=o(78),s=o(23),i=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;e.exports=i},function(e){e.exports=function(e){return function(){return e}}},function(e,t,o){function n(e,t,o){if(!r(o))return!1;var n=typeof t;return!("number"==n?!(s(o)&&i(t,o.length)):!("string"==n&&t in o))&&a(o[t],e)}var a=o(30),s=o(18),i=o(22),r=o(9);e.exports=n},function(e,t,o){var n=o(9),a=o(74),s=o(364),i=Object.prototype,r=i.hasOwnProperty;e.exports=function(e){if(!n(e))return s(e);var t=a(e),o=[];for(var i in e)("constructor"!=i||!t&&r.call(e,i))&&o.push(i);return o}},function(e){e.exports=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}},function(e){e.exports=function(e,t,o,n){for(var a=e.length,s=o+(n?1:-1);n?s--:++s<a;)if(t(e[s],s,e))return s;return-1}},function(e){e.exports=function(e){return e!==e}},function(e){e.exports=function(e,t,o){for(var n=o-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}},function(e,t,o){var n=o(50);e.exports=function(e,t){return n(t,function(t){return e[t]})}},function(e,t,o){var n=o(86),a=o(370),s=o(371),i=o(89),r=o(384),l=o(93),d=o(385),c=o(96),p=o(97),u=o(47),m=Math.max;e.exports=function(e,t,o,g,h,_,f,b){var v=2&t;if(!v&&"function"!=typeof e)throw new TypeError("Expected a function");var y=g?g.length:0;if(y||(t&=-97,g=h=void 0),f=void 0===f?f:m(u(f),0),b=void 0===b?b:u(b),y-=h?h.length:0,64&t){var x=g,S=h;g=h=void 0}var w=v?void 0:l(e),k=[e,t,o,g,h,x,S,_,f,b];if(w&&d(k,w),e=k[0],t=k[1],o=k[2],g=k[3],h=k[4],b=k[9]=void 0===k[9]?v?0:e.length:m(k[9]-y,0),!b&&24&t&&(t&=-25),!t||1==t)var E=a(e,t,o);else E=8==t||16==t?s(e,t,b):32!=t&&33!=t||h.length?i.apply(void 0,k):r(e,t,o,g);var C=w?n:c;return p(C(E,k),e,t)}},function(e,t,o){var n=o(31),a=o(5);e.exports=function(e,t,o){function s(){var t=this&&this!==a&&this instanceof s?r:e;return t.apply(i?o:this,arguments)}var i=t&1,r=n(e);return s}},function(e,t,o){var n=o(49),a=o(31),s=o(89),i=o(92),r=o(54),l=o(32),d=o(5);e.exports=function(e,t,o){function c(){for(var a=arguments.length,u=Array(a),m=a,g=r(c);m--;)u[m]=arguments[m];var h=3>a&&u[0]!==g&&u[a-1]!==g?[]:l(u,g);if(a-=h.length,a<o)return i(e,t,s,c.placeholder,void 0,u,h,void 0,void 0,o-a);var _=this&&this!==d&&this instanceof c?p:e;return n(_,this,u)}var p=a(e);return c}},function(e){e.exports=function(e,t){for(var o=e.length,n=0;o--;)e[o]===t&&++n;return n}},function(e,t,o){function n(e){var t=i(e),o=r[t];if("function"!=typeof o||!(t in a.prototype))return!1;if(e===o)return!0;var n=s(o);return!!n&&e===n[0]}var a=o(52),s=o(93),i=o(375),r=o(377);e.exports=n},function(e){e.exports=function(){}},function(e,t,o){var n=o(376),a=Object.prototype,s=a.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",o=n[t],a=s.call(n,t)?o.length:0;a--;){var i=o[a],r=i.func;if(null==r||r==e)return i.name}return t}},function(e){e.exports={}},function(e,t,o){function n(e){if(l(e)&&!r(e)&&!(e instanceof a)){if(e instanceof s)return e;if(p.call(e,"__wrapped__"))return d(e)}return new s(e)}var a=o(52),s=o(94),i=o(53),r=o(6),l=o(11),d=o(378),c=Object.prototype,p=c.hasOwnProperty;n.prototype=i.prototype,n.prototype.constructor=n,e.exports=n},function(e,t,o){var n=o(52),a=o(94),s=o(95);e.exports=function(e){if(e instanceof n)return e.clone();var t=new a(e.__wrapped__,e.__chain__);return t.__actions__=s(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},function(e){e.exports=function(e){var t=e.match(/\{\n\/\* \[wrapped with (.+)\] \*/);return t?t[1].split(/,? & /):[]}},function(e){e.exports=function(e,t){var o=t.length;if(!o)return e;var n=o-1;return t[n]=(1<o?"& ":"")+t[n],t=t.join(2<o?", ":" "),e.replace(/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,o){var n=o(68),a=o(382),s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(s,function(o){var n="_."+o[0];t&o[1]&&!a(e,n)&&e.push(n)}),e.sort()}},function(e,t,o){var n=o(84);e.exports=function(e,t){var o=null==e?0:e.length;return!!o&&-1<n(e,t,0)}},function(e,t,o){var n=o(95),a=o(22),s=Math.min;e.exports=function(e,t){for(var o=e.length,i=s(t.length,o),r=n(e);i--;){var l=t[i];e[i]=a(l,o)?r[l]:void 0}return e}},function(e,t,o){var n=o(49),a=o(31),s=o(5);e.exports=function(e,t,o,i){function r(){for(var t=-1,a=arguments.length,c=-1,p=i.length,u=Array(p+a),m=this&&this!==s&&this instanceof r?d:e;++c<p;)u[c]=i[c];for(;a--;)u[c++]=arguments[++t];return n(m,l?o:this,u)}var l=t&1,d=a(e);return r}},function(e,t,o){var n=o(90),a=o(91),s=o(32),i=Math.min;e.exports=function(e,t){var o=e[1],r=t[1],l=o|r,d=131>l,c=128==r&&8==o||128==r&&256==o&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==o;if(!(d||c))return e;1&r&&(e[2]=t[2],l|=1&o?0:4);var p=t[3];if(p){var u=e[3];e[3]=u?n(u,p,t[4]):p,e[4]=u?s(e[3],"__lodash_placeholder__"):t[4]}return p=t[5],p&&(u=e[5],e[5]=u?a(u,p,t[6]):p,e[6]=u?s(e[5],"__lodash_placeholder__"):t[6]),p=t[7],p&&(e[7]=p),128&r&&(e[8]=null==e[8]?t[8]:i(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}},function(e,t,o){var n=o(387),a=o(428),s=o(23),i=o(6),r=o(437);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?i(e)?a(e[0],e[1]):n(e):r(e)}},function(e,t,o){var n=o(388),a=o(427),s=o(107);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(o){return o===e||n(o,e,t)}}},function(e,t,o){function n(e,t,o,n){var i=o.length,r=i,l=!n;if(null==e)return!r;for(e=Object(e);i--;){var d=o[i];if(l&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++i<r;){d=o[i];var c=d[0],p=e[c],u=d[1];if(!(l&&d[2])){var m=new a;if(n)var g=n(p,u,c,e,t,m);if(void 0===g?!s(u,p,3,n,m):!g)return!1}else if(void 0===p&&!(c in e))return!1}return!0}var a=o(98),s=o(99);e.exports=n},function(e){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,o){var n=o(34),a=Array.prototype,s=a.splice;e.exports=function(e){var t=this.__data__,o=n(t,e);if(0>o)return!1;var a=t.length-1;return o==a?t.pop():s.call(t,o,1),--this.size,!0}},function(e,t,o){var n=o(34);e.exports=function(e){var t=this.__data__,o=n(t,e);return 0>o?void 0:t[o][1]}},function(e,t,o){var n=o(34);e.exports=function(e){return-1<n(this.__data__,e)}},function(e,t,o){var n=o(34);e.exports=function(e,t){var o=this.__data__,a=n(o,e);return 0>a?(++this.size,o.push([e,t])):o[a][1]=t,this}},function(e,t,o){var n=o(33);e.exports=function(){this.__data__=new n,this.size=0}},function(e){e.exports=function(e){var t=this.__data__,o=t["delete"](e);return this.size=t.size,o}},function(e){e.exports=function(e){return this.__data__.get(e)}},function(e){e.exports=function(e){return this.__data__.has(e)}},function(e,t,o){var n=o(33),a=o(55),s=o(56);e.exports=function(e,t){var o=this.__data__;if(o instanceof n){var i=o.__data__;if(!a||199>i.length)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new s(i)}return o.set(e,t),this.size=o.size,this}},function(e,t,o){var n=o(400),a=o(33),s=o(55);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||a),string:new n}}},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}var a=o(401),s=o(402),i=o(403),r=o(404),l=o(405);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=i,n.prototype.has=r,n.prototype.set=l,e.exports=n},function(e,t,o){var n=o(35);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,o){var n=o(35),a=Object.prototype,s=a.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var o=t[e];return o==="__lodash_hash_undefined__"?void 0:o}return s.call(t,e)?t[e]:void 0}},function(e,t,o){var n=o(35),a=Object.prototype,s=a.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?t[e]!==void 0:s.call(t,e)}},function(e,t,o){var n=o(35);e.exports=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,o){var n=o(36);e.exports=function(e){var t=n(this,e)["delete"](e);return this.size-=t?1:0,t}},function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,o){var n=o(36);e.exports=function(e){return n(this,e).get(e)}},function(e,t,o){var n=o(36);e.exports=function(e){return n(this,e).has(e)}},function(e,t,o){var n=o(36);e.exports=function(e,t){var o=n(this,e),a=o.size;return o.set(e,t),this.size+=o.size==a?0:1,this}},function(e,t,o){var n=o(98),a=o(100),s=o(417),i=o(421),r=o(105),l=o(6),d=o(71),c=o(72),p=Object.prototype,u=p.hasOwnProperty;e.exports=function(e,t,o,p,m,g){var h=l(e),_=l(t),f=h?"[object Array]":r(e),b=_?"[object Array]":r(t);f="[object Arguments]"==f?"[object Object]":f,b="[object Arguments]"==b?"[object Object]":b;var v="[object Object]"==f,y="[object Object]"==b,x=f==b;if(x&&d(e)){if(!d(t))return!1;h=!0,v=!1}if(x&&!v)return g||(g=new n),h||c(e)?a(e,t,o,p,m,g):s(e,t,f,o,p,m,g);if(!(1&o)){var S=v&&u.call(e,"__wrapped__"),w=y&&u.call(t,"__wrapped__");if(S||w){var k=S?e.value():e,E=w?t.value():t;return g||(g=new n),m(k,E,o,p,g)}}return!!x&&(g||(g=new n),i(e,t,o,p,m,g))}},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new a;++t<o;)this.add(e[t])}var a=o(56),s=o(413),i=o(414);n.prototype.add=n.prototype.push=s,n.prototype.has=i,e.exports=n},function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e){e.exports=function(e){return this.__data__.has(e)}},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(t(e[o],o,e))return!0;return!1}},function(e){e.exports=function(e,t){return e.has(t)}},function(e,t,o){var n=o(29),a=o(418),s=o(30),i=o(100),r=o(419),l=o(420),d=n?n.prototype:void 0,c=d?d.valueOf:void 0;e.exports=function(e,t,o,n,d,p,u){switch(o){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!!(e.byteLength==t.byteLength&&p(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var m=r;case"[object Set]":var g=1&n;if(m||(m=l),e.size!=t.size&&!g)return!1;var h=u.get(e);if(h)return h==t;n|=2,u.set(e,t);var _=i(m(e),m(t),n,d,p,u);return u["delete"](e),_;case"[object Symbol]":if(c)return c.call(e)==c.call(t);}return!1}},function(e,t,o){var n=o(5),a=n.Uint8Array;e.exports=a},function(e){e.exports=function(e){var t=-1,o=Array(e.size);return e.forEach(function(e,n){o[++t]=[n,e]}),o}},function(e){e.exports=function(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=e}),o}},function(e,t,o){function n(e,t,o,n,s,r){var l=1&o,d=a(e),c=d.length,p=a(t),u=p.length;if(c!=u&&!l)return!1;for(var m=c,g;m--;)if(g=d[m],l?!(g in t):!i.call(t,g))return!1;var h=r.get(e);if(h&&r.get(t))return h==t;var _=!0;r.set(e,t),r.set(t,e);for(var f=l;++m<c;){g=d[m];var b=e[g],v=t[g];if(n)var y=l?n(v,b,g,t,e,r):n(b,v,g,e,t,r);if(void 0===y?!(b===v||s(b,v,o,n,r)):!y){_=!1;break}f||(f="constructor"==g)}if(_&&!f){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof S&&S instanceof S)&&(_=!1)}return r["delete"](e),r["delete"](t),_}var a=o(422),s=Object.prototype,i=s.hasOwnProperty;e.exports=n},function(e,t,o){var n=o(101),a=o(103),s=o(19);e.exports=function(e){return n(e,s,a)}},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length,a=0,s=[];++o<n;){var i=e[o];t(i,o,e)&&(s[a++]=i)}return s}},function(e,t,o){var n=o(16),a=o(5),s=n(a,"DataView");e.exports=s},function(e,t,o){var n=o(16),a=o(5),s=n(a,"Promise");e.exports=s},function(e,t,o){var n=o(16),a=o(5),s=n(a,"Set");e.exports=s},function(e,t,o){var n=o(106),a=o(19);e.exports=function(e){for(var t=a(e),o=t.length;o--;){var s=t[o],i=e[s];t[o]=[s,i,n(i)]}return t}},function(e,t,o){var n=o(99),a=o(429),s=o(434),i=o(58),r=o(106),l=o(107),d=o(24);e.exports=function(e,t){return i(e)&&r(t)?l(d(e),t):function(o){var i=a(o,e);return i===void 0&&i===t?s(o,e):n(t,i,3)}}},function(e,t,o){var n=o(57);e.exports=function(e,t,o){var a=null==e?void 0:n(e,t);return a===void 0?o:a}},function(e,t,o){var n=o(431),a=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,o,n,a){t.push(n?a.replace(/\\(\\)?/g,"$1"):o||e)}),t});e.exports=a},function(e,t,o){var n=o(432);e.exports=function(e){var t=n(e,function(e){return 500===o.size&&o.clear(),e}),o=t.cache;return t}},function(e,t,o){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var o=function(){var n=arguments,a=t?t.apply(this,n):n[0],s=o.cache;if(s.has(a))return s.get(a);var i=e.apply(this,n);return o.cache=s.set(a,i)||s,i};return o.cache=new(n.Cache||a),o}var a=o(56);n.Cache=a,e.exports=n},function(e,t,o){function n(e){if("string"==typeof e)return e;if(i(e))return s(e,n)+"";if(r(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}var a=o(29),s=o(50),i=o(6),r=o(28),l=1/0,d=a?a.prototype:void 0,c=d?d.toString:void 0;e.exports=n},function(e,t,o){var n=o(435),a=o(436);e.exports=function(e,t){return null!=e&&a(e,t,n)}},function(e){function t(e,t){return null!=e&&t in Object(e)}e.exports=t},function(e,t,o){var n=o(37),a=o(70),s=o(6),i=o(22),r=o(48),l=o(24);e.exports=function(e,t,o){t=n(t,e);for(var d=-1,c=t.length,p=!1,u;++d<c&&(u=l(t[d]),!!(p=null!=e&&o(e,u)));)e=e[u];return p||++d!=c?p:(c=null==e?0:e.length,!!c&&r(c)&&i(u,c)&&(s(e)||a(e)))}},function(e,t,o){var n=o(109),a=o(438),s=o(58),i=o(24);e.exports=function(e){return s(e)?n(i(e)):a(e)}},function(e,t,o){var n=o(57);e.exports=function(e){return function(t){return n(t,e)}}},function(e,t,o){var n=o(57),a=o(440),s=o(37);e.exports=function(e,t,o){for(var i=-1,r=t.length,l={};++i<r;){var d=t[i],c=n(e,d);o(c,d)&&a(l,s(d,e),c)}return l}},function(e,t,o){var n=o(76),a=o(37),s=o(22),i=o(9),r=o(24);e.exports=function(e,t,o,l){if(!i(e))return e;t=a(t,e);for(var d=-1,c=t.length,p=e;null!=p&&++d<c;){var u=r(t[d]),m=o;if(d!=c-1){var g=p[u];m=l?l(g,u,p):void 0,m===void 0&&(m=i(g)?g:s(t[d+1])?[]:{})}n(p,u,m),p=p[u]}return e}},function(e,t,o){var n=o(101),a=o(442),s=o(83);e.exports=function(e){return n(e,s,a)}},function(e,t,o){var n=o(102),a=o(443),s=o(103),i=o(104),r=Object.getOwnPropertySymbols,l=r?function(e){for(var t=[];e;)n(t,s(e)),e=a(e);return t}:i;e.exports=l},function(e,t,o){var n=o(75),a=n(Object.getPrototypeOf,Object);e.exports=a},function(e,t,o){var n=o(445),a=o(446),s=o(447);e.exports=function(e){return a(e)?s(e):n(e)}},function(e,t,o){var n=o(109),a=n("length");e.exports=a},function(e){var t=RegExp("["+"\\u200d"+"\\ud800-\\udfff"+"\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff"+"\\ufe0e\\ufe0f"+"]");e.exports=function(e){return t.test(e)}},function(e){var t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",n="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",i="(?:"+t+"|"+o+")"+"?",r="[\\ufe0e\\ufe0f]?",l="(?:"+"\\u200d"+"(?:"+[n,a,s].join("|")+")"+r+i+")*",d="(?:"+[n+t+"?",t,a,s,"[\\ud800-\\udfff]"].join("|")+")",c=RegExp(o+"(?="+o+")|"+d+(r+i+l),"g");e.exports=function(e){for(var t=c.lastIndex=0;c.test(e);)++t;return t}},function(e,t,o){var n=o(449),a=n({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=a},function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t,o){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==o&&void 0!==t)for(var a=0,s;a<t.length;++a)s=t[a].data,void 0!==s&&n(s,t[a].children,t[a].sel)}function a(e,t,o){var a={},l,d,c;if(void 0===o?void 0!==t&&(r.array(t)?l=t:r.primitive(t)?d=t:t&&t.sel?l=[t]:a=t):(a=t,r.array(o)?l=o:r.primitive(o)?d=o:o&&o.sel&&(l=[o])),r.array(l))for(c=0;c<l.length;++c)r.primitive(l[c])&&(l[c]=s.vnode(void 0,void 0,void 0,l[c]));return"s"===e[0]&&"v"===e[1]&&"g"===e[2]&&(3===e.length||"."===e[3]||"#"===e[3])&&n(a,l,e),s.vnode(e,a,l,d,void 0)}Object.defineProperty(o,"__esModule",{value:!0});var s=e("./vnode"),r=e("./is");o.h=a;o.default=a},{"./is":3,"./vnode":6}],2:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.htmlDomApi={createElement:function(e){return document.createElement(e)},createElementNS:function(e,t){return document.createElementNS(e,t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,o){e.insertBefore(t,o)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}},o.default=o.htmlDomApi},{}],3:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.array=Array.isArray,o.primitive=function(e){return"string"==typeof e||"number"==typeof e}},{}],4:[function(e,t,o){"use strict";function n(e){return e===void 0}function a(e){return e!==void 0}function s(e,t){return e.key===t.key&&e.sel===t.sel}function r(e){return e.sel!==void 0}function l(e,t,o){var n={},a,s,r;for(a=t;a<=o;++a)r=e[a],null!=r&&(s=r.key,void 0!==s&&(n[s]=a));return n}Object.defineProperty(o,"__esModule",{value:!0});var d=e("./vnode"),c=e("./is"),p=e("./htmldomapi"),u=d.default("",{},[],void 0,void 0),m=["create","update","remove","destroy","pre","post"],g=e("./h");o.h=g.h;var h=e("./thunk");o.thunk=h.thunk,o.init=function(e,t){function o(e){var t=e.id?"#"+e.id:"",o=e.className?"."+e.className.split(" ").join("."):"";return d.default(S.tagName(e).toLowerCase()+t+o,{},[],void 0,e)}function g(e,t){return function(){if(0==--t){var o=S.parentNode(e);S.removeChild(o,e)}}}function h(e,t){var o=e.data,s;o!==void 0&&a(s=o.hook)&&a(s=s.init)&&(s(e),o=e.data);var r=e.children,l=e.sel;if("!"===l)n(e.text)&&(e.text=""),e.elm=S.createComment(e.text);else if(l!==void 0){var d=l.indexOf("#"),p=l.indexOf(".",d),m=0<d?d:l.length,g=0<p?p:l.length,_=-1!==d||-1!==p?l.slice(0,Math.min(m,g)):l,f=e.elm=a(o)&&a(s=o.ns)?S.createElementNS(s,_):S.createElement(_);for(m<g&&f.setAttribute("id",l.slice(m+1,g)),0<p&&f.setAttribute("class",l.slice(g+1).replace(/\./g," ")),s=0;s<x.create.length;++s)x.create[s](u,e);if(c.array(r))for(s=0;s<r.length;++s){var b=r[s];null!=b&&S.appendChild(f,h(b,t))}else c.primitive(e.text)&&S.appendChild(f,S.createTextNode(e.text));s=e.data.hook,a(s)&&(s.create&&s.create(u,e),s.insert&&t.push(e))}else e.elm=S.createTextNode(e.text);return e.elm}function _(e,t,o,n,a,s){for(;n<=a;++n){var i=o[n];null!=i&&S.insertBefore(e,h(i,s),t)}}function f(e){var t=e.data,o,n;if(t!==void 0){for(a(o=t.hook)&&a(o=o.destroy)&&o(e),o=0;o<x.destroy.length;++o)x.destroy[o](e);if(e.children!==void 0)for(n=0;n<e.children.length;++n)o=e.children[n],null!=o&&"string"!=typeof o&&f(o)}}function b(e,t,o,n){for(;o<=n;++o){var s=void 0,i=void 0,r=void 0,l=t[o];if(null!=l)if(a(l.sel)){for(f(l),i=x.remove.length+1,r=g(l.elm,i),s=0;s<x.remove.length;++s)x.remove[s](l,r);a(s=l.data)&&a(s=s.hook)&&a(s=s.remove)?s(l,r):r()}else S.removeChild(e,l.elm)}}function v(e,t,o,a){for(var i=0,r=0,d=t.length-1,c=t[0],p=t[d],u=o.length-1,m=o[0],g=o[u],f,v,x,w;i<=d&&r<=u;)null==c?c=t[++i]:null==p?p=t[--d]:null==m?m=o[++r]:null==g?g=o[--u]:s(c,m)?(y(c,m,a),c=t[++i],m=o[++r]):s(p,g)?(y(p,g,a),p=t[--d],g=o[--u]):s(c,g)?(y(c,g,a),S.insertBefore(e,c.elm,S.nextSibling(p.elm)),c=t[++i],g=o[--u]):s(p,m)?(y(p,m,a),S.insertBefore(e,p.elm,c.elm),p=t[--d],m=o[++r]):(void 0===f&&(f=l(t,i,d)),v=f[m.key],n(v)?(S.insertBefore(e,h(m,a),c.elm),m=o[++r]):(x=t[v],x.sel===m.sel?(y(x,m,a),t[v]=void 0,S.insertBefore(e,x.elm,c.elm)):S.insertBefore(e,h(m,a),c.elm),m=o[++r]));i>d?(w=null==o[u+1]?null:o[u+1].elm,_(e,w,o,r,u,a)):r>u&&b(e,t,i,d)}function y(e,t,o){var s,r;a(s=t.data)&&a(r=s.hook)&&a(s=r.prepatch)&&s(e,t);var l=t.elm=e.elm,d=e.children,c=t.children;if(e!==t){if(void 0!==t.data){for(s=0;s<x.update.length;++s)x.update[s](e,t);s=t.data.hook,a(s)&&a(s=s.update)&&s(e,t)}n(t.text)?a(d)&&a(c)?d!==c&&v(l,d,c,o):a(c)?(a(e.text)&&S.setTextContent(l,""),_(l,null,c,0,c.length-1,o)):a(d)?b(l,d,0,d.length-1):a(e.text)&&S.setTextContent(l,""):e.text!==t.text&&S.setTextContent(l,t.text),a(r)&&a(s=r.postpatch)&&s(e,t)}}var x={},S=t===void 0?p.default:t,w,k;for(w=0;w<m.length;++w)for(x[m[w]]=[],k=0;k<e.length;++k){var E=e[k][m[w]];void 0!==E&&x[m[w]].push(E)}return function(e,t){var n=[],a,l,d;for(a=0;a<x.pre.length;++a)x.pre[a]();for(r(e)||(e=o(e)),s(e,t)?y(e,t,n):(l=e.elm,d=S.parentNode(l),h(t,n),null!==d&&(S.insertBefore(d,t.elm,S.nextSibling(l)),b(d,[e],0,0))),a=0;a<n.length;++a)n[a].data.hook.insert(n[a]);for(a=0;a<x.post.length;++a)x.post[a]();return t}}},{"./h":1,"./htmldomapi":2,"./is":3,"./thunk":5,"./vnode":6}],5:[function(e,t,o){"use strict";function n(e,t){t.elm=e.elm,e.data.fn=t.data.fn,e.data.args=t.data.args,t.data=e.data,t.children=e.children,t.text=e.text,t.elm=e.elm}function a(e){var t=e.data,o=t.fn.apply(void 0,t.args);n(o,e)}function s(e,t){var o=e.data,a=t.data,s=o.args,r=a.args,l;if(o.fn!==a.fn||s.length!==r.length)return void n(a.fn.apply(void 0,r),t);for(l=0;l<r.length;++l)if(s[l]!==r[l])return void n(a.fn.apply(void 0,r),t);n(e,t)}Object.defineProperty(o,"__esModule",{value:!0});var i=e("./h");o.thunk=function(e,t,o,n){return void 0===n&&(n=o,o=t,t=void 0),i.h(e,{key:t,hook:{init:a,prepatch:s},fn:o,args:n})},o.default=o.thunk},{"./h":1}],6:[function(e,t,o){"use strict";function n(e,t,o,n,a){var s=t===void 0?void 0:t.key;return{sel:e,data:t,children:o,text:n,elm:a,key:s}}Object.defineProperty(o,"__esModule",{value:!0}),o.vnode=n,o.default=n},{}]},{},[4])(4)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.attrs,a=t.data.attrs,i;if((n||a)&&n!==a){for(i in n=n||{},a=a||{},a){var r=a[i],l=n[i];l!==r&&(s[i]?r?o.setAttribute(i,""):o.removeAttribute(i):120===i.charCodeAt(0)?58===i.charCodeAt(3)?o.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,r):58===i.charCodeAt(5)?o.setAttributeNS("http://www.w3.org/1999/xlink",i,r):o.setAttribute(i,r):o.setAttribute(i,r))}for(i in n)i in a||o.removeAttribute(i)}}Object.defineProperty(o,"__esModule",{value:!0});for(var a=["allowfullscreen","async","autofocus","autoplay","checked","compact","controls","declare","default","defaultchecked","defaultmuted","defaultselected","defer","disabled","draggable","enabled","formnovalidate","hidden","indeterminate","inert","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","pauseonexit","readonly","required","reversed","scoped","seamless","selected","sortable","spellcheck","translate","truespeed","typemustmatch","visible"],s=Object.create(null),r=0,l=a.length;r<l;r++)s[a[r]]=!0;o.attributesModule={create:n,update:n},o.default=o.attributesModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.class,a=t.data.class,s,i;if((n||a)&&n!==a){for(i in n=n||{},a=a||{},n)a[i]||o.classList.remove(i);for(i in a)s=a[i],s!==n[i]&&o.classList[s?"add":"remove"](i)}}Object.defineProperty(o,"__esModule",{value:!0}),o.classModule={create:n,update:n},o.default=o.classModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.dataset,s=t.data.dataset,i;if((n||s)&&n!==s){n=n||{},s=s||{};var r=o.dataset;for(i in n)s[i]||(r?i in r&&delete r[i]:o.removeAttribute("data-"+i.replace(a,"-$&").toLowerCase()));for(i in s)n[i]!==s[i]&&(r?r[i]=s[i]:o.setAttribute("data-"+i.replace(a,"-$&").toLowerCase(),s[i]))}}Object.defineProperty(o,"__esModule",{value:!0});var a=/[A-Z]/g;o.datasetModule={create:n,update:n},o.default=o.datasetModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.props,a=t.data.props,s,i,r;if((n||a)&&n!==a){for(s in n=n||{},a=a||{},n)a[s]||delete o[s];for(s in a)i=a[s],r=n[s],r!==i&&("value"!==s||o[s]!==i)&&(o[s]=i)}}Object.defineProperty(o,"__esModule",{value:!0}),o.propsModule={create:n,update:n},o.default=o.propsModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t,o){i(function(){e[t]=o})}function a(e,t){var o=t.elm,a=e.data.style,s=t.data.style,i,r;if((a||s)&&a!==s){a=a||{},s=s||{};var l=("delayed"in a);for(r in a)s[r]||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in s)if(i=s[r],"delayed"===r&&s.delayed)for(var d in s.delayed)i=s.delayed[d],l&&i===a.delayed[d]||n(o.style,d,i);else"remove"!==r&&i!==a[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,i):o.style[r]=i)}}Object.defineProperty(o,"__esModule",{value:!0});var s="undefined"!=typeof window&&window.requestAnimationFrame||setTimeout,i=function(e){s(function(){s(e)})};o.styleModule={create:a,update:a,destroy:function(e){var t=e.elm,o=e.data.style,n,a;if(o&&(n=o.destroy))for(a in n)t.style[a]=n[a]},remove:function(e,t){var o=e.data.style;if(!o||!o.remove)return void t();var n=e.elm,a=0,s=o.remove,r=0,l=[],d,c;for(d in s)l.push(d),n.style[d]=s[d];c=getComputedStyle(n);for(var p=c["transition-property"].split(", ");a<p.length;++a)-1!==l.indexOf(p[a])&&r++;n.addEventListener("transitionend",function(e){e.target===n&&--r,0===r&&t()})}},o.default=o.styleModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.htmlDomApi={createElement:function(e){return document.createElement(e)},createElementNS:function(e,t){return document.createElementNS(e,t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,o){e.insertBefore(t,o)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}},o.default=o.htmlDomApi},{}],2:[function(e,t,o){"use strict";function a(e,t){var o=t===void 0?r.default:t,l;if(o.isElement(e)){var d=e.id?"#"+e.id:"",p=e.getAttribute("class"),u=p?"."+p.split(" ").join("."):"",c=o.tagName(e).toLowerCase()+d+u,m={},g=[],h=void 0,_=void 0,f=e.attributes,b=e.childNodes,v;for(h=0,_=f.length;h<_;h++)v=f[h].nodeName,"id"!==v&&"class"!==v&&(m[v]=f[h].nodeValue);for(h=0,_=b.length;h<_;h++)g.push(a(b[h]));return s.default(c,{attrs:m},g,void 0,e)}return o.isText(e)?(l=o.getTextContent(e),s.default(void 0,void 0,void 0,l,e)):o.isComment(e)?(l=o.getTextContent(e),s.default("!",{},[],l,e)):s.default("",{},[],void 0,void 0)}Object.defineProperty(o,"__esModule",{value:!0});var s=e("./vnode"),r=e("./htmldomapi");o.toVNode=a,o.default=a},{"./htmldomapi":1,"./vnode":3}],3:[function(e,t,o){"use strict";function n(e,t,o,n,a){var s=t===void 0?void 0:t.key;return{sel:e,data:t,children:o,text:n,elm:a,key:s}}Object.defineProperty(o,"__esModule",{value:!0}),o.vnode=n,o.default=n},{}]},{},[2])(2)})},function(e,t,o){var n=o(458);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0},s;a.transform=s,a.insertInto=void 0;o(460)(n,a);n.locals&&(e.exports=n.locals),!1},function(e,t,o){t=e.exports=o(459)(!0),t.push([e.i,"","",{version:3,sources:[],names:[],mappings:"",file:"converse.scss"}])},function(e){"use strict";function t(e,t){var n=e[1]||"",a=e[3];if(!a)return n;if(t&&"function"==typeof btoa){var s=o(a),i=a.sources.map(function(e){return"/*# sourceURL=".concat(a.sourceRoot).concat(e," */")});return[n].concat(i).concat([s]).join("\n")}return[n].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(o," */")}e.exports=function(e){var o=[];return o.toString=function(){return this.map(function(o){var n=t(o,e);return o[2]?"@media ".concat(o[2],"{").concat(n,"}"):n}).join("")},o.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},a=0,s;a<this.length;a++)s=this[a][0],null!=s&&(n[s]=!0);for(var r=0,l;r<e.length;r++)l=e[r],null!=l[0]&&n[l[0]]||(t&&!l[2]?l[2]=t:t&&(l[2]="(".concat(l[2],") and (").concat(t,")")),o.push(l))},o}},function(e,t,o){function n(e,t){for(var o=0;o<e.length;o++){var n=e[o],a=h[n.id];if(a){a.refs++;for(var s=0;s<a.parts.length;s++)a.parts[s](n.parts[s]);for(;s<n.parts.length;s++)a.parts.push(p(n.parts[s],t))}else{for(var r=[],s=0;s<n.parts.length;s++)r.push(p(n.parts[s],t));h[n.id]={id:n.id,refs:1,parts:r}}}}function a(e,t){for(var o=[],n={},a=0;a<e.length;a++){var s=e[a],r=t.base?s[0]+t.base:s[0],l=s[1],d=s[2],c=s[3],p={css:l,media:d,sourceMap:c};n[r]?n[r].parts.push(p):o.push(n[r]={id:r,parts:[p]})}return o}function s(e,t){var o=b(e.insertInto);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=x[x.length-1];if("top"===e.insertAt)n?n.nextSibling?o.insertBefore(t,n.nextSibling):o.appendChild(t):o.insertBefore(t,o.firstChild),x.push(t);else if("bottom"===e.insertAt)o.appendChild(t);else if("object"==typeof e.insertAt&&e.insertAt.before){var a=b(e.insertAt.before,o);o.insertBefore(t,a)}else throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n")}function i(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=x.indexOf(e);0<=t&&x.splice(t,1)}function r(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=c();o&&(e.attrs.nonce=o)}return d(t,e.attrs),s(e,t),t}function l(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",d(t,e.attrs),s(e,t),t}function d(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}function c(){return!1,o.nc}function p(e,t){var o,n,a,s;if(t.transform&&e.css)if(s="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css),s)e.css=s;else return function(){};if(t.singleton){var d=y++;o=v||(v=r(t)),n=u.bind(null,o,d,!1),a=u.bind(null,o,d,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=l(t),n=g.bind(null,o,t),a=function(){i(o),o.href&&URL.revokeObjectURL(o.href)}):(o=r(t),n=m.bind(null,o),a=function(){i(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}function u(e,t,o,n){var a=o?"":n.css;if(e.styleSheet)e.styleSheet.cssText=w(t,a);else{var s=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(s,i[t]):e.appendChild(s)}}function m(e,t){var o=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}function g(e,t,o){var n=o.css,a=o.sourceMap,s=t.convertToAbsoluteUrls===void 0&&a;(t.convertToAbsoluteUrls||s)&&(n=S(n)),a&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var i=new Blob([n],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var h={},_=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),f=function(e,t){return t?t.querySelector(e):document.querySelector(e)},b=function(){var e={};return function(t,o){if("function"==typeof t)return t();if("undefined"==typeof e[t]){var n=f.call(this,t,o);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),v=null,y=0,x=[],S=o(461);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=_()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var o=a(e,t);return n(o,t),function(e){for(var s=[],r=0;r<o.length;r++){var l=o[r],d=h[l.id];d.refs--,s.push(d)}if(e){var c=a(e,t);n(c,t)}for(var r=0,d;r<s.length;r++)if(d=s[r],0===d.refs){for(var p=0;p<d.parts.length;p++)d.parts[p]();delete h[d.id]}}};var w=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}()},function(e){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var o=t.protocol+"//"+t.host,n=o+t.pathname.replace(/\/[^\/]*$/,"/"),a=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a))return e;var s;return s=0===a.indexOf("//")?a:0===a.indexOf("/")?o+a:n+a.replace(/^\.\//,""),"url("+JSON.stringify(s)+")"});return a}},function(e,t,o){"use strict";function n(o,n){o[n>>5]|=128<<24-n%32,o[(n+64>>9<<4)+15]=n;var l=Array(80),u=1732584193,g=-271733879,h=-1732584194,_=271733878,f=-1009589776,v,y,x,S,w,k,E,C;for(v=0;v<o.length;v+=16){for(S=u,w=g,k=h,E=_,C=f,y=0;80>y;y++)l[y]=16>y?o[v+y]:m(l[y-3]^l[y-8]^l[y-14]^l[y-16],1),x=p(p(m(u,5),s(y,g,h,_)),p(p(f,l[y]),r(y))),f=_,_=h,h=m(g,30),g=u,u=x;u=p(u,S),g=p(g,w),h=p(h,k),_=p(_,E),f=p(f,C)}return[u,g,h,_,f]}function s(e,t,o,n){return 20>e?t&o|~t&n:40>e?t^o^n:60>e?t&o|t&n|o&n:t^o^n}function r(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function l(e,t){var o=g(e);16<o.length&&(o=n(o,8*e.length));for(var a=Array(16),s=Array(16),r=0;16>r;r++)a[r]=909522486^o[r],s[r]=1549556828^o[r];var l=n(a.concat(g(t)),512+8*t.length);return n(s.concat(l),672)}function p(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o}function m(e,t){return e<<t|e>>>32-t}function g(e){for(var t=[],o=0;o<8*e.length;o+=8)t[o>>5]|=(e.charCodeAt(o/8)&255)<<24-o%32;return t}function h(e){for(var t="",o=0,n,a;o<4*e.length;o+=3)for(n=(255&e[o>>2]>>8*(3-o%4))<<16|(255&e[o+1>>2]>>8*(3-(o+1)%4))<<8|255&e[o+2>>2]>>8*(3-(o+2)%4),a=0;4>a;a++)t+=8*o+6*a>32*e.length?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n>>6*(3-a));return t}function f(e){for(var t="",o=0;o<32*e.length;o+=8)t+=String.fromCharCode(e[o>>5]>>>24-o%32&255);return t}function b(e,t){return new Be.Builder(e,t)}function v(e){return new Be.Builder("iq",e)}function y(e){return new Be.Builder("presence",e)}function x(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function S(e){return"string"!=typeof e&&(console.warn(`${e} used as a key, but it is not a string.`),e+=""),e}function w(e){var t=.75*e.length,o=e.length,n=0,a,s,r,l,d;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);var c=new ArrayBuffer(t),u=new Uint8Array(c);for(a=0;a<o;a+=4)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a]),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+1]),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+2]),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+3]),u[n++]=s<<2|r>>4,u[n++]=(15&r)<<4|l>>2,u[n++]=(3&l)<<6|63&d;return c}function k(e){var t=new Uint8Array(e),o="",n;for(n=0;n<t.length;n+=3)o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[t[n]>>2],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t[n])<<4|t[n+1]>>4],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t[n+1])<<2|t[n+2]>>6],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[63&t[n+2]];return 2==t.length%3?o=o.substring(0,o.length-1)+"=":1==t.length%3&&(o=o.substring(0,o.length-2)+"=="),o}function E(){try{if(sessionStorage&&"setItem"in sessionStorage)return!0}catch(t){console.log(t)}return!1}function C(e,t){var o=e.name+"/";return e.storeName!==t.storeName&&(o+=e.storeName+"/"),o}function A(){return(0|65536*(1+Math.random())).toString(16).substring(1)}function a(){return A()+A()+"-"+A()+"-"+A()+"-"+A()+"-"+A()+A()+A()}function i(e){var t,o;if(window.navigator.userLanguage&&(t=T(window.navigator.userLanguage,e)),window.navigator.languages&&!t)for(o=0;o<window.navigator.languages.length&&!t;o++)t=T(window.navigator.languages[o],e);return window.navigator.browserLanguage&&!t&&(t=T(window.navigator.browserLanguage,e)),window.navigator.language&&!t&&(t=T(window.navigator.language,e)),window.navigator.systemLanguage&&!t&&(t=T(window.navigator.systemLanguage,e)),t||"en"}function d(e,t){return"string"==typeof e&&t.includes(e)}function c(e,t){return"string"==typeof e&&("en"===e||t(e))?e:i(t)||"en"}function T(e,t){if(t(e))return e;var o=e.split("-")[0];if(o!==e&&t(o))return o}function j(e,t){this.name=t,this.plugged=e,"undefined"==typeof this.plugged.__super__?this.plugged.__super__={}:"string"==typeof this.plugged.__super__&&(this.plugged.__super__={__string__:this.plugged.__super__}),this.plugged.__super__[t]=this.plugged,this.plugins={},this.initialized_plugins=[]}function N(e,t){clearTimeout(e),clearInterval(t)}function M(e){const t=io.promises[e];if(!t)throw new Error("Tried to replace non-existing promise: ".concat(e));if(t.replace){const o=Qt.getResolveablePromise();o.replace=t.replace,io.promises[e]=o}else vt.debug("Not replacing promise \"".concat(e,"\""))}async function I(){await it.sessionStorageInitialized,io.storage={session:it.localForage.createInstance({name:io.isTestEnv()?"converse-test-session":"converse-session",description:"sessionStorage instance",driver:["sessionStorageWrapper"]})}}function O(){if("persistent"===io.config.get("storage")){const e={name:io.isTestEnv()?"converse-test-persistent":"converse-persistent",storeName:io.bare_jid};"localStorage"===io.persistent_store?(e.description="localStorage instance",e.driver=[it.localForage.LOCALSTORAGE]):"IndexedDB"===io.persistent_store&&(e.description="indexedDB instance",e.driver=[it.localForage.INDEXEDDB]),io.storage.persistent=it.localForage.createInstance(e)}}function R(){io.pluggable.initialized_plugins=[];const e=so.concat(io.whitelisted_plugins);io.singleton&&["converse-bookmarks","converse-controlbox","converse-headline","converse-register"].forEach(e=>io.blacklisted_plugins.push(e)),io.pluggable.initializePlugins({_converse:io},e,io.blacklisted_plugins),io.api.trigger("pluginsInitialized")}function D(){io.config=new Backbone.Model({id:"converse.client-config",trusted:io.trusted&&!0||!1,storage:io.trusted?"persistent":"session"}),io.config.browserStorage=io.createStore("converse.client-config","session"),io.config.fetch(),io.api.trigger("clientConfigInitialized")}async function L(){return await io.api.trigger("beforeTearDown",{synchronous:!0}),window.removeEventListener("click",io.onUserActivity),window.removeEventListener("focus",io.onUserActivity),window.removeEventListener("keypress",io.onUserActivity),window.removeEventListener("mousemove",io.onUserActivity),window.removeEventListener(io.unloadevent,io.onUserActivity),window.clearInterval(io.everySecondTrigger),io.api.trigger("afterTearDown"),io}async function P(e,t){io.authentication===io.LOGIN?e?q(e):io.credentials_url?q(await X()):io.jid&&(io.password||io.connection.pass)?q():!io.isTestEnv()&&window.PasswordCredential?q(await K()):vt.warn("attemptNonPreboundSession: Could not find any credentials to log in with"):[io.ANONYMOUS,io.EXTERNAL].includes(io.authentication)&&(!t||io.auto_login)&&q()}function q(e){if([io.ANONYMOUS,io.EXTERNAL].includes(io.authentication)){if(!io.jid)throw new Error("Config Error: when using anonymous login you need to provide the server's domain via the 'jid' option. Either when calling converse.initialize, or when calling _converse.api.user.login.");io.connection.reconnecting||io.connection.reset(),io.connection.connect(io.jid.toLowerCase(),null,io.onConnectStatusChanged,ao)}else if(io.authentication===io.LOGIN){const t=e?e.password:lt.a.get(io.connection,"pass")||io.password;if(!t){if(io.auto_login)throw new Error("autoLogin: If you use auto_login and authentication='login' then you also need to provide a password.");return io.setDisconnectionCause(Zt.Status.AUTHFAIL,void 0,!0),void io.api.connection.disconnect()}io.connection.reconnecting||io.connection.reset(),io.connection.connect(io.jid,t,io.onConnectStatusChanged,ao)}}async function B(){return vt.debug("RECONNECTING: the connection has dropped, attempting to reconnect."),io.setConnectionStatus(Zt.Status.RECONNECTING,co("The connection has dropped, attempting to reconnect.")),io.api.trigger("will-reconnect"),io.connection.reconnecting=!0,await L(),io.api.user.login()}function z(){io.session!==void 0&&(io.session.destroy(),delete io.session),io.api.trigger("clearSession")}async function F(e){const t=await e.text(),o=new window.DOMParser().parseFromString(t,"text/xml").firstElementChild;if("XRD"!=o.nodeName||"http://docs.oasis-open.org/ns/xri/xrd-1.0"!=o.namespaceURI)return vt.warn("Could not discover XEP-0156 connection methods");const n=Wt()("Link[rel=\"urn:xmpp:alt-connections:xbosh\"]",o),a=Wt()("Link[rel=\"urn:xmpp:alt-connections:websocket\"]",o),s=n.map(e=>e.getAttribute("href")),i=a.map(e=>e.getAttribute("href"));io.websocket_url=i.pop(),io.bosh_service_url=s.pop(),0===s.length&&0===i.length&&vt.warn("onDomainDiscovered: neither BOSH nor WebSocket connection methods have been specified with XEP-0156.")}async function H(e){const t="https://".concat(e,"/.well-known/host-meta");let o;try{o=await fetch(t,{mode:"cors",headers:{Accept:"application/xrd+xml, text/xml"}})}catch(o){return vt.error("Failed to discover alternative connection methods at ".concat(t)),void vt.error(o)}200<=o.status&&400>o.status?await F(o):vt.warn("Could not discover XEP-0156 connection methods")}async function U(e){const t=Zt.getBareJidFromJid(e).toLowerCase(),o="converse.session-".concat(t);io.session&&io.session.get("id")===o?V(e):(io.session=new Backbone.Model({id:o}),io.session.browserStorage=io.createStore(o,"session"),await new Promise(e=>io.session.fetch({success:e,error:e})),io.session.get("active")&&(io.session.clear(),io.session.save({id:o})),V(e),O(),io.api.trigger("userSessionInitialized"))}function V(e){e=io.session.get("jid")||e,io.authentication===io.ANONYMOUS||Zt.getResourceFromJid(e)||(e=e.toLowerCase()+io.generateResource()),io.jid=e,io.bare_jid=Zt.getBareJidFromJid(e),io.resource=Zt.getResourceFromJid(e),io.domain=Zt.getDomainFromJid(e),io.session.save({jid:e,bare_jid:io.bare_jid,resource:io.resource,domain:io.domain,active:!0}),io.connection.jid=e}function W(){if(io.message_carbons&&io.session&&!io.session.get("carbons_enabled")){const e=new Zt.Builder("iq",{from:io.connection.jid,id:"enablecarbons",type:"set"}).c("enable",{xmlns:Zt.NS.CARBONS});io.connection.addHandler(e=>{0<e.querySelectorAll("error").length?vt.warn("An error occurred while trying to enable message carbons."):(io.session.save({carbons_enabled:!0}),vt.debug("Message carbons have been enabled."))},null,"iq",null,"enablecarbons"),io.connection.send(e)}}async function G(e){delete io.connection.reconnecting,io.connection.flush(),await io.setUserJID(io.connection.jid),await io.api.trigger("afterResourceBinding",e,{synchronous:!0}),W(),e?io.api.trigger("reconnected"):(io.api.trigger("initialized"),io.api.trigger("connected"))}function J(){const e={};e[Zt.LogLevel.DEBUG]="debug",e[Zt.LogLevel.INFO]="info",e[Zt.LogLevel.WARN]="warn",e[Zt.LogLevel.ERROR]="error",e[Zt.LogLevel.FATAL]="fatal",Zt.log=(t,o)=>vt.log(o,e[t]),Zt.error=e=>vt.error(e),io.connection.xmlInput=e=>vt.debug(e.outerHTML,"color: darkgoldenrod"),io.connection.xmlOutput=e=>vt.debug(e.outerHTML,"color: darkcyan")}async function $(){await I(),D(),R(),Z(),Backbone.History.started||Backbone.history.start(),0<io.idle_presence_timeout&&io.api.listen.on("addClientFeatures",()=>{io.api.disco.own.features.add(Zt.NS.IDLE)}),(io.auto_login||io.keepalive&&lt.a.invoke(io.pluggable.plugins["converse-bosh"],"enabled"))&&(await io.api.user.login(null,null,!0))}function Q(){vt.debug("DISCONNECTED"),delete io.connection.reconnecting,io.connection.reset(),L(),z(),delete io.connection,io.api.trigger("disconnected")}function Y(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0;return new Promise(lt.a.debounce((e,t)=>{const o=new XMLHttpRequest;o.open("GET",io.credentials_url,!0),o.setRequestHeader("Accept","application/json, text/javascript"),o.onload=()=>{if(200<=o.status&&400>o.status){const t=JSON.parse(o.responseText);io.setUserJID(t.jid).then(()=>{e({jid:t.jid,password:t.password})})}else t(new Error("".concat(o.status,": ").concat(o.responseText)))},o.onerror=t,o.send()},e))}async function X(){let e=0,t;for(;!t;){try{t=await Y(e)}catch(t){vt.error("Could not fetch login credentials"),vt.error(t)}e=2e3}return t}async function K(){const e=await navigator.credentials.get({password:!0});if(e&&"password"==e.type&&Qt.isValidJID(e.id))return await io.setUserJID(e.id),{jid:e.id,password:e.password}}function Z(){document.addEventListener("visibilitychange",io.saveWindowState),io.saveWindowState({type:document.hidden?"blur":"focus"}),io.api.trigger("registeredGlobalEventHandlers")}function ee(){document.removeEventListener("visibilitychange",io.saveWindowState),io.api.trigger("unregisteredGlobalEventHandlers")}function te(){Backbone.history.stop(),ee(),delete io.controlboxtoggle,io.chatboxviews&&delete io.chatboxviews,io.connection&&io.connection.reset(),io.stopListening(),io.off()}function oe(e){if(-1<e.indexOf("-")){const t=[],o=e.split("-");for(let e=0,n;e<o.length;e++){if(n=parseInt(o[e],16),65536<=n&&1114111>=n){const e=Math.floor((n-65536)/1024)+55296,t=(n-65536)%1024+56320;n=String.fromCharCode(e)+String.fromCharCode(t)}else n=String.fromCharCode(n);t.push(n)}return t.join("")}return Ao.convert.fromCodePoint(e)}function ne(e,t){return e.sort((e,o)=>e[t]>o[t]?-1:1)}function ae(e){const t=e.api.disco.own.identities.get(),o=e.api.disco.own.features.get();1<t.length&&(ne(t,"category"),ne(t,"type"),ne(t,"lang"));let n=an.reduce(t,(e,t)=>"".concat(e).concat(t.category,"/").concat(t.type,"/").concat(an.get(t,"lang",""),"/").concat(t.name,"<"),"");return o.sort(),n=an.reduce(o,(e,t)=>"".concat(e).concat(t,"<"),n),Pe.b64_sha1(n)}function se(e){return nn("c",{xmlns:on.NS.CAPS,hash:"sha-1",node:"https://conversejs.org",ver:ae(e)}).nodeTree}function ie(e,t){return{"muc#roomconfig_lang":"language","muc#roomconfig_roomsecret":t.new_password?"new-password":"current-password"}[e]}function re(e){e.removeAttribute("data-slider-marker"),e.classList.remove("collapsed"),e.style.overflow="",e.style.height=""}function le(e){return new Promise((t,o)=>{var n=new Image,a=window.setTimeout(function(){o(new Error("Could not determine whether it's an image")),n=null},3e3);n.onerror=n.onabort=function(){clearTimeout(a),o(new Error("Could not determine whether it's an image"))},n.onload=function(){clearTimeout(a),t(n)},n.src=e})}function de(e){try{return e instanceof Tn.a?e:new Tn.a(e)}catch(e){return vt.debug(e),null}}function ce(e){return"http:"===window.location.protocol||"https:"===window.location.protocol&&"https"===e.protocol().toLowerCase()}function pe(e,t){const o=de(t);if(null===o||!ce(o))return!1;const n=o.filename().toLowerCase();return!!e.filter(e=>n.endsWith(e)).length}function ue(e){try{return decodeURI(e.filename())}catch(t){return vt.debug(t),e.filename()}}function me(e,t){const{__:o}=e;return Nn()({url:t.toString(),label_download:o("Download audio file \"%1$s\"",ue(t))})}function ge(e,t){if(!e.show_images_inline)return Qt.convertToHyperlink(t);const{__:o}=e;return $n()({url:t.toString(),label_download:o("Download image \"%1$s\"",ue(t))})}function he(e,t){const{__:o}=e;return In()({url:t.toString(),label_download:o("Download file \"%1$s\"",ue(t))})}function _e(e,t){e.classList.remove("visible"),lt.a.isFunction(t)&&t()}function fe(e,t){const o=t.el.querySelector(".box-flyout"),n=document.createElement("div");n.innerHTML=si()(),o.insertBefore(n,o.firstChild)}function be(e){const t=e.getBoundingClientRect();return 0<=t.top&&0<=t.left&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function ve(e){let t=0;do isNaN(e.offsetTop)||(t+=e.offsetTop);while(e=e.offsetParent);return t}function ye(e){let t=0;do isNaN(e.offsetLeft)||(t+=e.offsetLeft);while(e=e.offsetParent);return t}function xe(e){const t=e.querySelector("signedPreKeyPublic"),o=e.querySelector("signedPreKeySignature"),n=Yr("prekeys > preKeyPublic",e).map(e=>({id:parseInt(e.getAttribute("preKeyId"),10),key:e.textContent}));return{identity_key:e.querySelector("identityKey").textContent.trim(),signed_prekey:{id:parseInt(t.getAttribute("signedPreKeyId"),10),public_key:t.textContent,signature:o.textContent},prekeys:n}}function Se(e){"controlbox"===e.model.get("id")||(Wl.safeSave(e.model,{hidden:!0}),e.hide())}function we(e){return 0<e.chatboxes.filter(e=>"controlbox"!==e.get("id")&&!e.get("hidden")).length}o.r(t);var ke=o(0);const Ee=function(e,t){const o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o},Ce=function(e,t){return e<<t|e>>>32-t},Ae=function(e){if("string"!=typeof e)throw new Error("str2binl was passed a non-string");const t=[];for(let o=0;o<8*e.length;o+=8)t[o>>5]|=(255&e.charCodeAt(o/8))<<o%32;return t},Te=function(e){let t="";for(let o=0;o<32*e.length;o+=8)t+=String.fromCharCode(255&e[o>>5]>>>o%32);return t},je=function(e){const t="0123456789abcdef";let o="";for(let n=0;n<4*e.length;n++)o+=t.charAt(15&e[n>>2]>>8*(n%4)+4)+t.charAt(15&e[n>>2]>>8*(n%4));return o},Ne=function(e,o,n,a,i,s){return Ee(Ce(Ee(Ee(o,e),Ee(a,s)),i),n)},Me=function(e,o,n,a,i,r,s){return Ne(o&n|~o&a,e,o,i,r,s)},Ie=function(e,o,n,a,i,r,s){return Ne(o&a|n&~a,e,o,i,r,s)},Oe=function(e,o,n,a,i,r,s){return Ne(o^n^a,e,o,i,r,s)},Re=function(e,o,n,a,i,r,s){return Ne(n^(o|~a),e,o,i,r,s)},De=function(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;let o=1732584193,n=-271733879,s=-1732584194,r=271733878,l,p,u,m;for(let a=0;a<e.length;a+=16)l=o,p=n,u=s,m=r,o=Me(o,n,s,r,e[a+0],7,-680876936),r=Me(r,o,n,s,e[a+1],12,-389564586),s=Me(s,r,o,n,e[a+2],17,606105819),n=Me(n,s,r,o,e[a+3],22,-1044525330),o=Me(o,n,s,r,e[a+4],7,-176418897),r=Me(r,o,n,s,e[a+5],12,1200080426),s=Me(s,r,o,n,e[a+6],17,-1473231341),n=Me(n,s,r,o,e[a+7],22,-45705983),o=Me(o,n,s,r,e[a+8],7,1770035416),r=Me(r,o,n,s,e[a+9],12,-1958414417),s=Me(s,r,o,n,e[a+10],17,-42063),n=Me(n,s,r,o,e[a+11],22,-1990404162),o=Me(o,n,s,r,e[a+12],7,1804603682),r=Me(r,o,n,s,e[a+13],12,-40341101),s=Me(s,r,o,n,e[a+14],17,-1502002290),n=Me(n,s,r,o,e[a+15],22,1236535329),o=Ie(o,n,s,r,e[a+1],5,-165796510),r=Ie(r,o,n,s,e[a+6],9,-1069501632),s=Ie(s,r,o,n,e[a+11],14,643717713),n=Ie(n,s,r,o,e[a+0],20,-373897302),o=Ie(o,n,s,r,e[a+5],5,-701558691),r=Ie(r,o,n,s,e[a+10],9,38016083),s=Ie(s,r,o,n,e[a+15],14,-660478335),n=Ie(n,s,r,o,e[a+4],20,-405537848),o=Ie(o,n,s,r,e[a+9],5,568446438),r=Ie(r,o,n,s,e[a+14],9,-1019803690),s=Ie(s,r,o,n,e[a+3],14,-187363961),n=Ie(n,s,r,o,e[a+8],20,1163531501),o=Ie(o,n,s,r,e[a+13],5,-1444681467),r=Ie(r,o,n,s,e[a+2],9,-51403784),s=Ie(s,r,o,n,e[a+7],14,1735328473),n=Ie(n,s,r,o,e[a+12],20,-1926607734),o=Oe(o,n,s,r,e[a+5],4,-378558),r=Oe(r,o,n,s,e[a+8],11,-2022574463),s=Oe(s,r,o,n,e[a+11],16,1839030562),n=Oe(n,s,r,o,e[a+14],23,-35309556),o=Oe(o,n,s,r,e[a+1],4,-1530992060),r=Oe(r,o,n,s,e[a+4],11,1272893353),s=Oe(s,r,o,n,e[a+7],16,-155497632),n=Oe(n,s,r,o,e[a+10],23,-1094730640),o=Oe(o,n,s,r,e[a+13],4,681279174),r=Oe(r,o,n,s,e[a+0],11,-358537222),s=Oe(s,r,o,n,e[a+3],16,-722521979),n=Oe(n,s,r,o,e[a+6],23,76029189),o=Oe(o,n,s,r,e[a+9],4,-640364487),r=Oe(r,o,n,s,e[a+12],11,-421815835),s=Oe(s,r,o,n,e[a+15],16,530742520),n=Oe(n,s,r,o,e[a+2],23,-995338651),o=Re(o,n,s,r,e[a+0],6,-198630844),r=Re(r,o,n,s,e[a+7],10,1126891415),s=Re(s,r,o,n,e[a+14],15,-1416354905),n=Re(n,s,r,o,e[a+5],21,-57434055),o=Re(o,n,s,r,e[a+12],6,1700485571),r=Re(r,o,n,s,e[a+3],10,-1894986606),s=Re(s,r,o,n,e[a+10],15,-1051523),n=Re(n,s,r,o,e[a+1],21,-2054922799),o=Re(o,n,s,r,e[a+8],6,1873313359),r=Re(r,o,n,s,e[a+15],10,-30611744),s=Re(s,r,o,n,e[a+6],15,-1560198380),n=Re(n,s,r,o,e[a+13],21,1309151649),o=Re(o,n,s,r,e[a+4],6,-145523070),r=Re(r,o,n,s,e[a+11],10,-1120210379),s=Re(s,r,o,n,e[a+2],15,718787259),n=Re(n,s,r,o,e[a+9],21,-343485551),o=Ee(o,l),n=Ee(n,p),s=Ee(s,u),r=Ee(r,m);return[o,n,s,r]},Le={hexdigest:function(e){return je(De(Ae(e),8*e.length))},hash:function(e){return Te(De(Ae(e),8*e.length))}},Pe={b64_hmac_sha1:function(e,t){return h(l(e,t))},b64_sha1:function(e){return h(n(g(e),8*e.length))},binb2str:f,core_hmac_sha1:l,str_hmac_sha1:function(e,t){return f(l(e,t))},str_sha1:function(e){return f(n(g(e),8*e.length))}},qe={utf16to8:function(e){var t="",o=e.length,n,a;for(n=0;n<o;n++)a=e.charCodeAt(n),0<=a&&127>=a?t+=e.charAt(n):2047<a?(t+=String.fromCharCode(224|15&a>>12),t+=String.fromCharCode(128|63&a>>6),t+=String.fromCharCode(128|63&a>>0)):(t+=String.fromCharCode(192|31&a>>6),t+=String.fromCharCode(128|63&a>>0));return t},addCookies:function(e){for(const t in e=e||{},e)if(Object.prototype.hasOwnProperty.call(e,t)){let o="",n="",a="";const s=e[t],i="object"==typeof s,r=escape(unescape(i?s.value:s));i&&(o=s.expires?";expires="+s.expires:"",n=s.domain?";domain="+s.domain:"",a=s.path?";path="+s.path:""),document.cookie=t+"="+r+o+n+a}}},Be={VERSION:"@VERSION@",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",FRAMING:"urn:ietf:params:xml:ns:xmpp-framing",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag:function(e){for(let t=0;t<Be.XHTML.tags.length;t++)if(e===Be.XHTML.tags[t])return!0;return!1},validAttribute:function(e,t){if("undefined"!=typeof Be.XHTML.attributes[e]&&0<Be.XHTML.attributes[e].length)for(let o=0;o<Be.XHTML.attributes[e].length;o++)if(t===Be.XHTML.attributes[e][o])return!0;return!1},validCSS:function(e){for(let t=0;t<Be.XHTML.css.length;t++)if(e===Be.XHTML.css[t])return!0;return!1}},Status:{ERROR:0,CONNECTING:1,CONNFAIL:2,AUTHENTICATING:3,AUTHFAIL:4,CONNECTED:5,DISCONNECTED:6,DISCONNECTING:7,ATTACHED:8,REDIRECT:9,CONNTIMEOUT:10,BINDREQUIRED:11},ErrorCondition:{BAD_FORMAT:"bad-format",CONFLICT:"conflict",MISSING_JID_NODE:"x-strophe-bad-non-anon-jid",NO_AUTH_MECH:"no-auth-mech",UNKNOWN_REASON:"unknown"},LogLevel:{DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4},ElementType:{NORMAL:1,TEXT:3,CDATA:4,FRAGMENT:11},TIMEOUT:1.1,SECONDARY_TIMEOUT:.1,addNamespace:function(e,t){Be.NS[e]=t},forEachChild:function(e,t,o){for(let n=0;n<e.childNodes.length;n++){const a=e.childNodes[n];a.nodeType===Be.ElementType.NORMAL&&(!t||this.isTagEqual(a,t))&&o(a)}},isTagEqual:function(e,t){return e.tagName===t},_xmlGenerator:null,_makeGenerator:function(){let e;return void 0===document.implementation.createDocument||document.implementation.createDocument&&document.documentMode&&10>document.documentMode?(e=this._getIEXmlDom(),e.appendChild(e.createElement("strophe"))):e=document.implementation.createDocument("jabber:client","strophe",null),e},xmlGenerator:function(){return Be._xmlGenerator||(Be._xmlGenerator=Be._makeGenerator()),Be._xmlGenerator},_getIEXmlDom:function(){let t=null;const o=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];for(let e=0;e<o.length&&null===t;e++)try{t=new ActiveXObject(o[e])}catch(o){t=null}return t},xmlElement:function(e){if(!e)return null;const t=Be.xmlGenerator().createElement(e);for(let o=1;o<arguments.length;o++){const e=arguments[o];if(e)if("string"==typeof e||"number"==typeof e)t.appendChild(Be.xmlTextNode(e));else if("object"==typeof e&&"function"==typeof e.sort)for(let o=0;o<e.length;o++){const n=e[o];"object"==typeof n&&"function"==typeof n.sort&&void 0!==n[1]&&null!==n[1]&&t.setAttribute(n[0],n[1])}else if("object"==typeof e)for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&void 0!==e[o]&&null!==e[o]&&t.setAttribute(o,e[o])}return t},xmlescape:function(e){return e=e.replace(/\&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/'/g,"&apos;"),e=e.replace(/"/g,"&quot;"),e},xmlunescape:function(e){return e=e.replace(/\&amp;/g,"&"),e=e.replace(/&lt;/g,"<"),e=e.replace(/&gt;/g,">"),e=e.replace(/&apos;/g,"'"),e=e.replace(/&quot;/g,"\""),e},xmlTextNode:function(e){return Be.xmlGenerator().createTextNode(e)},xmlHtmlNode:function(e){let t;if(DOMParser){const o=new DOMParser;t=o.parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},getText:function(e){if(!e)return null;let t="";0===e.childNodes.length&&e.nodeType===Be.ElementType.TEXT&&(t+=e.nodeValue);for(let o=0;o<e.childNodes.length;o++)e.childNodes[o].nodeType===Be.ElementType.TEXT&&(t+=e.childNodes[o].nodeValue);return Be.xmlescape(t)},copyElement:function(e){let t;if(e.nodeType===Be.ElementType.NORMAL){t=Be.xmlElement(e.tagName);for(let o=0;o<e.attributes.length;o++)t.setAttribute(e.attributes[o].nodeName,e.attributes[o].value);for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.copyElement(e.childNodes[o]))}else e.nodeType===Be.ElementType.TEXT&&(t=Be.xmlGenerator().createTextNode(e.nodeValue));return t},createHtml:function(e){let t;if(e.nodeType===Be.ElementType.NORMAL){const o=e.nodeName.toLowerCase();if(Be.XHTML.validTag(o))try{t=Be.xmlElement(o);for(let n=0;n<Be.XHTML.attributes[o].length;n++){const a=Be.XHTML.attributes[o][n];let s=e.getAttribute(a);if("undefined"!=typeof s&&null!==s&&""!==s&&!1!==s&&0!==s)if("style"===a&&"object"==typeof s&&"undefined"!=typeof s.cssText&&(s=s.cssText),"style"===a){const e=[],o=s.split(";");for(let t=0;t<o.length;t++){const n=o[t].split(":"),a=n[0].replace(/^\s*/,"").replace(/\s*$/,"").toLowerCase();if(Be.XHTML.validCSS(a)){const t=n[1].replace(/^\s*/,"").replace(/\s*$/,"");e.push(a+": "+t)}}0<e.length&&(s=e.join("; "),t.setAttribute(a,s))}else t.setAttribute(a,s)}for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.createHtml(e.childNodes[o]))}catch(o){t=Be.xmlTextNode("")}else{t=Be.xmlGenerator().createDocumentFragment();for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.createHtml(e.childNodes[o]))}}else if(e.nodeType===Be.ElementType.FRAGMENT){t=Be.xmlGenerator().createDocumentFragment();for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.createHtml(e.childNodes[o]))}else e.nodeType===Be.ElementType.TEXT&&(t=Be.xmlTextNode(e.nodeValue));return t},escapeNode:function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/\"/g,"\\22").replace(/\&/g,"\\26").replace(/\'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(/</g,"\\3c").replace(/>/g,"\\3e").replace(/@/g,"\\40"):e},unescapeNode:function(e){return"string"==typeof e?e.replace(/\\20/g," ").replace(/\\22/g,"\"").replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\"):e},getNodeFromJid:function(e){return 0>e.indexOf("@")?null:e.split("@")[0]},getDomainFromJid:function(e){const t=Be.getBareJidFromJid(e);if(0>t.indexOf("@"))return t;else{const e=t.split("@");return e.splice(0,1),e.join("@")}},getResourceFromJid:function(e){if(!e)return null;const t=e.split("/");return 2>t.length?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:function(e){return e?e.split("/")[0]:null},_handleError:function(t){"undefined"!=typeof t.stack&&Be.fatal(t.stack),t.sourceURL?Be.fatal("error: "+this.handler+" "+t.sourceURL+":"+t.line+" - "+t.name+": "+t.message):t.fileName?Be.fatal("error: "+this.handler+" "+t.fileName+":"+t.lineNumber+" - "+t.name+": "+t.message):Be.fatal("error: "+t.message)},log:function(e,t){e===this.LogLevel.FATAL&&"object"==typeof window.console&&"function"==typeof window.console.error&&window.console.error(t)},debug:function(e){this.log(this.LogLevel.DEBUG,e)},info:function(e){this.log(this.LogLevel.INFO,e)},warn:function(e){this.log(this.LogLevel.WARN,e)},error:function(e){this.log(this.LogLevel.ERROR,e)},fatal:function(e){this.log(this.LogLevel.FATAL,e)},serialize:function(e){if(!e)return null;"function"==typeof e.tree&&(e=e.tree());const t=[...Array(e.attributes.length).keys()].map(t=>e.attributes[t].nodeName);t.sort();let o=t.reduce((t,o)=>`${t} ${o}="${Be.xmlescape(e.attributes.getNamedItem(o).value)}"`,`<${e.nodeName}`);if(0<e.childNodes.length){o+=">";for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];switch(n.nodeType){case Be.ElementType.NORMAL:o+=Be.serialize(n);break;case Be.ElementType.TEXT:o+=Be.xmlescape(n.nodeValue);break;case Be.ElementType.CDATA:o+="<![CDATA["+n.nodeValue+"]]>";}}o+="</"+e.nodeName+">"}else o+="/>";return o},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(e,t){Be._connectionPlugins[e]=t}};Be.Builder=function(e,t){("presence"===e||"message"===e||"iq"===e)&&(t&&!t.xmlns?t.xmlns=Be.NS.CLIENT:!t&&(t={xmlns:Be.NS.CLIENT})),this.nodeTree=Be.xmlElement(e,t),this.node=this.nodeTree},Be.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return Be.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},root:function(){return this.node=this.nodeTree,this},attrs:function(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(void 0===e[t]?this.node.removeAttribute(t):this.node.setAttribute(t,e[t]));return this},c:function(e,t,o){const n=Be.xmlElement(e,t,o);return this.node.appendChild(n),"string"!=typeof o&&"number"!=typeof o&&(this.node=n),this},cnode:function(e){let t;const o=Be.xmlGenerator();try{t=void 0!==o.importNode}catch(o){t=!1}const n=t?o.importNode(e,!0):Be.copyElement(e);return this.node.appendChild(n),this.node=n,this},t:function(e){const t=Be.xmlTextNode(e);return this.node.appendChild(t),this},h:function(e){const t=document.createElement("body");t.innerHTML=e;for(const o=Be.createHtml(t);0<o.childNodes.length;)this.node.appendChild(o.childNodes[0]);return this}},Be.Handler=function(e,t,o,n,a,s,i){this.handler=e,this.ns=t,this.name=o,this.type=n,this.id=a,this.options=i||{matchBareFromJid:!1,ignoreNamespaceFragment:!1},this.options.matchBare&&(Be.warn("The \"matchBare\" option is deprecated, use \"matchBareFromJid\" instead."),this.options.matchBareFromJid=this.options.matchBare,delete this.options.matchBare),this.from=this.options.matchBareFromJid?s?Be.getBareJidFromJid(s):null:s,this.user=!0},Be.Handler.prototype={getNamespace:function(e){let t=e.getAttribute("xmlns");return t&&this.options.ignoreNamespaceFragment&&(t=t.split("#")[0]),t},namespaceMatch:function(e){let t=!1;return!this.ns||(Be.forEachChild(e,null,e=>{this.getNamespace(e)===this.ns&&(t=!0)}),t||this.getNamespace(e)===this.ns)},isMatch:function(e){let t=e.getAttribute("from");this.options.matchBareFromJid&&(t=Be.getBareJidFromJid(t));const o=e.getAttribute("type");return!(!this.namespaceMatch(e)||this.name&&!Be.isTagEqual(e,this.name)||this.type&&(Array.isArray(this.type)?-1===this.type.indexOf(o):o!==this.type)||this.id&&e.getAttribute("id")!==this.id||this.from&&t!==this.from)},run:function(e){let t=null;try{t=this.handler(e)}catch(t){throw Be._handleError(t),t}return t},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},Be.TimedHandler=function(e,t){this.period=e,this.handler=t,this.lastCalled=new Date().getTime(),this.user=!0},Be.TimedHandler.prototype={run:function(){return this.lastCalled=new Date().getTime(),this.handler()},reset:function(){this.lastCalled=new Date().getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},Be.Connection=function(e,t){this.service=e,this.options=t||{};const o=this.options.protocol||"";for(const n in this._proto=0===e.indexOf("ws:")||0===e.indexOf("wss:")||0===o.indexOf("ws")?new Be.Websocket(this):new Be.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.protocolErrorHandlers={HTTP:{},websocket:{}},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(()=>this._onIdle(),100),qe.addCookies(this.options.cookies),this.registerSASLMechanisms(this.options.mechanisms),Be._connectionPlugins)if(Object.prototype.hasOwnProperty.call(Be._connectionPlugins,n)){const e=function(){};e.prototype=Be._connectionPlugins[n],this[n]=new e,this[n].init(this)}},Be.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=0|16*Math.random(),o="x"===e?t:8|3&t;return o.toString(16)});return"string"==typeof e||"number"==typeof e?t+":"+e:t+""},addProtocolErrorHandler:function(e,t,o){this.protocolErrorHandlers[e][t]=o},connect:function(e,t,o,n,a,s,i){this.jid=e,this.authzid=Be.getBareJidFromJid(this.jid),this.authcid=i||Be.getNodeFromJid(this.jid),this.pass=t,this.servtype="xmpp",this.connect_callback=o,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=Be.getDomainFromJid(this.jid),this._changeConnectStatus(Be.Status.CONNECTING,null),this._proto._connect(n,a,s)},attach:function(e,t,o,n,a,s,i){if(this._proto instanceof Be.Bosh)this._proto._attach(e,t,o,n,a,s,i);else{const e=new Error("The \"attach\" method can only be used with a BOSH connection.");throw e.name="StropheSessionError",e}},restore:function(e,t,o,n,a){if(this._sessionCachingSupported())this._proto._restore(e,t,o,n,a);else{const e=new Error("The \"restore\" method can only be used with a BOSH connection.");throw e.name="StropheSessionError",e}},_sessionCachingSupported:function(){if(this._proto instanceof Be.Bosh){if(!JSON)return!1;try{sessionStorage.setItem("_strophe_","_strophe_"),sessionStorage.removeItem("_strophe_")}catch(t){return!1}return!0}return!1},xmlInput:function(){},xmlOutput:function(){},rawInput:function(){},rawOutput:function(){},nextValidRid:function(){},send:function(e){if(null!==e){if("function"==typeof e.sort)for(let t=0;t<e.length;t++)this._queueData(e[t]);else"function"==typeof e.tree?this._queueData(e.tree()):this._queueData(e);this._proto._send()}},flush:function(){clearTimeout(this._idleTimeout),this._onIdle()},sendPresence:function(e,t,o,n){let a=null;"function"==typeof e.tree&&(e=e.tree());let s=e.getAttribute("id");if(s||(s=this.getUniqueId("sendPresence"),e.setAttribute("id",s)),"function"==typeof t||"function"==typeof o){const e=this.addHandler(e=>{a&&this.deleteTimedHandler(a),"error"===e.getAttribute("type")?o&&o(e):t&&t(e)},null,"presence",null,s);n&&(a=this.addTimedHandler(n,()=>(this.deleteHandler(e),o&&o(null),!1)))}return this.send(e),s},sendIQ:function(e,t,o,n){let a=null;"function"==typeof e.tree&&(e=e.tree());let s=e.getAttribute("id");if(s||(s=this.getUniqueId("sendIQ"),e.setAttribute("id",s)),"function"==typeof t||"function"==typeof o){const e=this.addHandler(e=>{a&&this.deleteTimedHandler(a);const n=e.getAttribute("type");if("result"===n)t&&t(e);else if("error"===n)o&&o(e);else{const e=new Error(`Got bad IQ type of ${n}`);throw e.name="StropheError",e}},null,"iq",["error","result"],s);n&&(a=this.addTimedHandler(n,()=>(this.deleteHandler(e),o&&o(null),!1)))}return this.send(e),s},_queueData:function(e){if(null===e||!e.tagName||!e.childNodes){const e=new Error("Cannot queue non-DOMElement.");throw e.name="StropheError",e}this._data.push(e)},_sendRestart:function(){this._data.push("restart"),this._proto._sendRestart(),this._idleTimeout=setTimeout(()=>this._onIdle(),100)},addTimedHandler:function(e,t){const o=new Be.TimedHandler(e,t);return this.addTimeds.push(o),o},deleteTimedHandler:function(e){this.removeTimeds.push(e)},addHandler:function(e,t,o,n,a,s,i){const r=new Be.Handler(e,t,o,n,a,s,i);return this.addHandlers.push(r),r},deleteHandler:function(e){this.removeHandlers.push(e);const t=this.addHandlers.indexOf(e);0<=t&&this.addHandlers.splice(t,1)},registerSASLMechanisms:function(e){this.mechanisms={},e=e||[Be.SASLAnonymous,Be.SASLExternal,Be.SASLMD5,Be.SASLOAuthBearer,Be.SASLXOAuth2,Be.SASLPlain,Be.SASLSHA1],e.forEach(this.registerSASLMechanism.bind(this))},registerSASLMechanism:function(e){this.mechanisms[e.prototype.name]=e},disconnect:function(e){if(this._changeConnectStatus(Be.Status.DISCONNECTING,e),Be.warn("Disconnect was called because: "+e),this.connected){let e=!1;this.disconnecting=!0,this.authenticated&&(e=y({xmlns:Be.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(e)}else Be.warn("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests(),this._doDisconnect()},_changeConnectStatus:function(e,t,o){for(const n in Be._connectionPlugins)if(Object.prototype.hasOwnProperty.call(Be._connectionPlugins,n)){const o=this[n];if(o.statusChanged)try{o.statusChanged(e,t)}catch(e){Be.error(`${n} plugin caused an exception changing status: ${e}`)}}if(this.connect_callback)try{this.connect_callback(e,t,o)}catch(t){Be._handleError(t),Be.error(`User connection callback caused an exception: ${t}`)}},_doDisconnect:function(e){"number"==typeof this._idleTimeout&&clearTimeout(this._idleTimeout),null!==this._disconnectTimeout&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),Be.debug("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(Be.Status.DISCONNECTED,e),this.connected=!1},_dataRecv:function(e,t){Be.debug("_dataRecv called");const o=this._proto._reqToData(e);if(null!==o){for(this.xmlInput!==Be.Connection.prototype.xmlInput&&(o.nodeName===this._proto.strip&&o.childNodes.length?this.xmlInput(o.childNodes[0]):this.xmlInput(o)),this.rawInput!==Be.Connection.prototype.rawInput&&(t?this.rawInput(t):this.rawInput(Be.serialize(o)));0<this.removeHandlers.length;){const e=this.removeHandlers.pop(),t=this.handlers.indexOf(e);0<=t&&this.handlers.splice(t,1)}for(;0<this.addHandlers.length;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())return void this._doDisconnect();const e=o.getAttribute("type");if(null!==e&&"terminate"===e){if(this.disconnecting)return;let e=o.getAttribute("condition");const t=o.getElementsByTagName("conflict");return null===e?this._changeConnectStatus(Be.Status.CONNFAIL,Be.ErrorCondition.UNKOWN_REASON):("remote-stream-error"===e&&0<t.length&&(e="conflict"),this._changeConnectStatus(Be.Status.CONNFAIL,e)),void this._doDisconnect(e)}Be.forEachChild(o,null,e=>{const t=this.handlers;this.handlers=[];for(let o=0;o<t.length;o++){const n=t[o];try{n.isMatch(e)&&(this.authenticated||!n.user)?n.run(e)&&this.handlers.push(n):this.handlers.push(n)}catch(t){Be.warn("Removing Strophe handlers due to uncaught exception: "+t.message)}}})}},mechanisms:{},_connect_cb:function(e,t,o){Be.debug("_connect_cb was called"),this.connected=!0;let n;try{n=this._proto._reqToData(e)}catch(t){if(t.name!==Be.ErrorCondition.BAD_FORMAT)throw t;this._changeConnectStatus(Be.Status.CONNFAIL,Be.ErrorCondition.BAD_FORMAT),this._doDisconnect(Be.ErrorCondition.BAD_FORMAT)}if(!n)return;this.xmlInput!==Be.Connection.prototype.xmlInput&&(n.nodeName===this._proto.strip&&n.childNodes.length?this.xmlInput(n.childNodes[0]):this.xmlInput(n)),this.rawInput!==Be.Connection.prototype.rawInput&&(o?this.rawInput(o):this.rawInput(Be.serialize(n)));const a=this._proto._connect_cb(n);if(a===Be.Status.CONNFAIL)return;let s;if(s=n.getElementsByTagNameNS?0<n.getElementsByTagNameNS(Be.NS.STREAM,"features").length:0<n.getElementsByTagName("stream:features").length||0<n.getElementsByTagName("features").length,!s)return void this._proto._no_auth_received(t);const r=[],l=n.getElementsByTagName("mechanism");if(0<l.length)for(let e=0;e<l.length;e++){const t=Be.getText(l[e]);this.mechanisms[t]&&r.push(this.mechanisms[t])}return 0===r.length&&0===n.getElementsByTagName("auth").length?void this._proto._no_auth_received(t):void(!1!==this.do_authentication&&this.authenticate(r))},sortMechanismsByPriority:function(e){for(let t=0,o;t<e.length-1;++t){o=t;for(let n=t+1;n<e.length;++n)e[n].prototype.priority>e[o].prototype.priority&&(o=n);if(o!==t){const n=e[t];e[t]=e[o],e[o]=n}}return e},authenticate:function(e){this._attemptSASLAuth(e)||this._attemptLegacyAuth()},_attemptSASLAuth:function(e){e=this.sortMechanismsByPriority(e||[]);let t=!1;for(let o=0;o<e.length;++o){if(!e[o].prototype.test(this))continue;this._sasl_success_handler=this._addSysHandler(this._sasl_success_cb.bind(this),null,"success",null,null),this._sasl_failure_handler=this._addSysHandler(this._sasl_failure_cb.bind(this),null,"failure",null,null),this._sasl_challenge_handler=this._addSysHandler(this._sasl_challenge_cb.bind(this),null,"challenge",null,null),this._sasl_mechanism=new e[o],this._sasl_mechanism.onStart(this);const n=b("auth",{xmlns:Be.NS.SASL,mechanism:this._sasl_mechanism.name});if(this._sasl_mechanism.isClientFirst){const e=this._sasl_mechanism.onChallenge(this,null);n.t(btoa(e))}this.send(n.tree()),t=!0;break}return t},_sasl_challenge_cb:function(e){const t=atob(Be.getText(e)),o=this._sasl_mechanism.onChallenge(this,t),n=b("response",{xmlns:Be.NS.SASL});return""!==o&&n.t(btoa(o)),this.send(n.tree()),!0},_attemptLegacyAuth:function(){null===Be.getNodeFromJid(this.jid)?(this._changeConnectStatus(Be.Status.CONNFAIL,Be.ErrorCondition.MISSING_JID_NODE),this.disconnect(Be.ErrorCondition.MISSING_JID_NODE)):(this._changeConnectStatus(Be.Status.AUTHENTICATING,null),this._addSysHandler(this._onLegacyAuthIQResult.bind(this),null,null,null,"_auth_1"),this.send(v({type:"get",to:this.domain,id:"_auth_1"}).c("query",{xmlns:Be.NS.AUTH}).c("username",{}).t(Be.getNodeFromJid(this.jid)).tree()))},_onLegacyAuthIQResult:function(){const e=v({type:"set",id:"_auth_2"}).c("query",{xmlns:Be.NS.AUTH}).c("username",{}).t(Be.getNodeFromJid(this.jid)).up().c("password").t(this.pass);return Be.getResourceFromJid(this.jid)||(this.jid=Be.getBareJidFromJid(this.jid)+"/strophe"),e.up().c("resource",{}).t(Be.getResourceFromJid(this.jid)),this._addSysHandler(this._auth2_cb.bind(this),null,null,null,"_auth_2"),this.send(e.tree()),!1},_sasl_success_cb:function(e){if(this._sasl_data["server-signature"]){let t;const o=atob(Be.getText(e)),n=o.match(/([a-z]+)=([^,]+)(,|$)/);if("v"===n[1]&&(t=n[2]),t!==this._sasl_data["server-signature"])return this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_data={},this._sasl_failure_cb(null)}Be.info("SASL authentication succeeded."),this._sasl_mechanism&&this._sasl_mechanism.onSuccess(),this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null);const t=[],o=(e,t)=>{for(;e.length;)this.deleteHandler(e.pop());return this._onStreamFeaturesAfterSASL(t),!1};return t.push(this._addSysHandler(e=>o(t,e),null,"stream:features",null,null)),t.push(this._addSysHandler(e=>o(t,e),Be.NS.STREAM,"features",null,null)),this._sendRestart(),!1},_onStreamFeaturesAfterSASL:function(e){this.features=e;for(let t=0;t<e.childNodes.length;t++){const o=e.childNodes[t];"bind"===o.nodeName&&(this.do_bind=!0),"session"===o.nodeName&&(this.do_session=!0)}return this.do_bind?(this.options.explicitResourceBinding?this._changeConnectStatus(Be.Status.BINDREQUIRED,null):this.bind(),!1):(this._changeConnectStatus(Be.Status.AUTHFAIL,null),!1)},bind:function(){if(!this.do_bind)return void Be.log(Be.LogLevel.INFO,`Strophe.Connection.prototype.bind called but "do_bind" is false`);this._addSysHandler(this._onResourceBindResultIQ.bind(this),null,null,null,"_bind_auth_2");const e=Be.getResourceFromJid(this.jid);e?this.send(v({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:Be.NS.BIND}).c("resource",{}).t(e).tree()):this.send(v({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:Be.NS.BIND}).tree())},_onResourceBindResultIQ:function(e){if("error"===e.getAttribute("type")){Be.warn("Resource binding failed.");const t=e.getElementsByTagName("conflict");let o;return 0<t.length&&(o=Be.ErrorCondition.CONFLICT),this._changeConnectStatus(Be.Status.AUTHFAIL,o,e),!1}const t=e.getElementsByTagName("bind");if(0<t.length){const e=t[0].getElementsByTagName("jid");0<e.length&&(this.jid=Be.getText(e[0]),this.do_session?this._establishSession():(this.authenticated=!0,this._changeConnectStatus(Be.Status.CONNECTED,null)))}else return Be.warn("Resource binding failed."),this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),!1},_establishSession:function(){if(!this.do_session)throw new Error(`Strophe.Connection.prototype._establishSession `+`called but apparently ${Be.NS.SESSION} wasn't advertised by the server`);this._addSysHandler(this._onSessionResultIQ.bind(this),null,null,null,"_session_auth_2"),this.send(v({type:"set",id:"_session_auth_2"}).c("session",{xmlns:Be.NS.SESSION}).tree())},_onSessionResultIQ:function(e){if("result"===e.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(Be.Status.CONNECTED,null);else if("error"===e.getAttribute("type"))return Be.warn("Session creation failed."),this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),!1;return!1},_sasl_failure_cb:function(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),!1},_auth2_cb:function(e){return"result"===e.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(Be.Status.CONNECTED,null)):"error"===e.getAttribute("type")&&(this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(e,t){const o=new Be.TimedHandler(e,t);return o.user=!1,this.addTimeds.push(o),o},_addSysHandler:function(e,t,o,n,a){const s=new Be.Handler(e,t,o,n,a);return s.user=!1,this.addHandlers.push(s),s},_onDisconnectTimeout:function(){return Be.debug("_onDisconnectTimeout was called"),this._changeConnectStatus(Be.Status.CONNTIMEOUT,null),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){for(;0<this.addTimeds.length;)this.timedHandlers.push(this.addTimeds.pop());for(;0<this.removeTimeds.length;){const e=this.removeTimeds.pop(),t=this.timedHandlers.indexOf(e);0<=t&&this.timedHandlers.splice(t,1)}const e=new Date().getTime(),t=[];for(let o=0;o<this.timedHandlers.length;o++){const n=this.timedHandlers[o];if(this.authenticated||!n.user){const o=n.lastCalled+n.period;0>=o-e?n.run()&&t.push(n):t.push(n)}}this.timedHandlers=t,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(()=>this._onIdle(),100))}},Be.SASLMechanism=function(e,t,o){this.name=e,this.isClientFirst=t,this.priority=o},Be.SASLMechanism.prototype={test:function(){return!0},onStart:function(e){this._connection=e},onChallenge:function(){throw new Error("You should implement challenge handling!")},onFailure:function(){this._connection=null},onSuccess:function(){this._connection=null}},Be.SASLAnonymous=function(){},Be.SASLAnonymous.prototype=new Be.SASLMechanism("ANONYMOUS",!1,20),Be.SASLAnonymous.prototype.test=function(e){return null===e.authcid},Be.SASLPlain=function(){},Be.SASLPlain.prototype=new Be.SASLMechanism("PLAIN",!0,50),Be.SASLPlain.prototype.test=function(e){return null!==e.authcid},Be.SASLPlain.prototype.onChallenge=function(e){let t=e.authzid;return t+="\0",t+=e.authcid,t+="\0",t+=e.pass,qe.utf16to8(t)},Be.SASLSHA1=function(){},Be.SASLSHA1.prototype=new Be.SASLMechanism("SCRAM-SHA-1",!0,70),Be.SASLSHA1.prototype.test=function(e){return null!==e.authcid},Be.SASLSHA1.prototype.onChallenge=function(e,t,o){const n=o||Le.hexdigest(""+1234567890*Math.random());let a="n="+qe.utf16to8(e.authcid);return a+=",r=",a+=n,e._sasl_data.cnonce=n,e._sasl_data["client-first-message-bare"]=a,a="n,,"+a,this.onChallenge=(e,t)=>{let o="c=biws,",n=`${e._sasl_data["client-first-message-bare"]},${t},`,a,s,r,l,d,c,p,u;const m=e._sasl_data.cnonce,g=/([a-z]+)=([^,]+)(,|$)/;for(;t.match(g);){const e=t.match(g);switch(t=t.replace(e[0],""),e[1]){case"r":a=e[2];break;case"s":s=e[2];break;case"i":r=e[2];}}if(a.substr(0,m.length)!==m)return e._sasl_data={},e._sasl_failure_cb();o+="r="+a,n+=o,s=atob(s),s+="\0\0\0\x01";const h=qe.utf16to8(e.pass);for(l=c=Pe.core_hmac_sha1(h,s),p=1;p<r;p++){for(d=Pe.core_hmac_sha1(h,Pe.binb2str(c)),u=0;5>u;u++)l[u]^=d[u];c=d}l=Pe.binb2str(l);const _=Pe.core_hmac_sha1(l,"Client Key"),f=Pe.str_hmac_sha1(l,"Server Key"),b=Pe.core_hmac_sha1(Pe.str_sha1(Pe.binb2str(_)),n);for(e._sasl_data["server-signature"]=Pe.b64_hmac_sha1(f,n),u=0;5>u;u++)_[u]^=b[u];return o+=",p="+btoa(Pe.binb2str(_)),o},a},Be.SASLMD5=function(){},Be.SASLMD5.prototype=new Be.SASLMechanism("DIGEST-MD5",!1,60),Be.SASLMD5.prototype.test=function(e){return null!==e.authcid},Be.SASLMD5.prototype._quote=function(e){return"\""+e.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+"\""},Be.SASLMD5.prototype.onChallenge=function(e,t,o){const n=/([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/,a=o||Le.hexdigest(""+1234567890*Math.random());let s="",i=null,r="";for(;t.match(n);){const e=t.match(n);switch(t=t.replace(e[0],""),e[2]=e[2].replace(/^"(.+)"$/,"$1"),e[1]){case"realm":s=e[2];break;case"nonce":r=e[2];break;case"qop":e[2];break;case"host":i=e[2];}}let l=e.servtype+"/"+e.domain;null!==i&&(l=l+"/"+i);const d=qe.utf16to8(e.authcid+":"+s+":"+this._connection.pass),c=Le.hash(d)+":"+r+":"+a,p="AUTHENTICATE:"+l;let u="";return u+="charset=utf-8,",u+="username="+this._quote(qe.utf16to8(e.authcid))+",",u+="realm="+this._quote(s)+",",u+="nonce="+this._quote(r)+",",u+="nc=00000001,",u+="cnonce="+this._quote(a)+",",u+="digest-uri="+this._quote(l)+",",u+="response="+Le.hexdigest(Le.hexdigest(c)+":"+r+":00000001:"+a+":auth:"+Le.hexdigest(p))+",",u+="qop=auth",this.onChallenge=()=>"",u},Be.SASLOAuthBearer=function(){},Be.SASLOAuthBearer.prototype=new Be.SASLMechanism("OAUTHBEARER",!0,40),Be.SASLOAuthBearer.prototype.test=function(e){return null!==e.pass},Be.SASLOAuthBearer.prototype.onChallenge=function(e){let t="n,";return null!==e.authcid&&(t=t+"a="+e.authzid),t+=",",t+="\x01",t+="auth=Bearer ",t+=e.pass,t+="\x01",t+="\x01",qe.utf16to8(t)},Be.SASLExternal=function(){},Be.SASLExternal.prototype=new Be.SASLMechanism("EXTERNAL",!0,10),Be.SASLExternal.prototype.onChallenge=function(e){return e.authcid===e.authzid?"":e.authzid},Be.SASLXOAuth2=function(){},Be.SASLXOAuth2.prototype=new Be.SASLMechanism("X-OAUTH2",!0,30),Be.SASLXOAuth2.prototype.test=function(e){return null!==e.pass},Be.SASLXOAuth2.prototype.onChallenge=function(e){let t="\0";return null!==e.authcid&&(t+=e.authzid),t+="\0",t+=e.pass,qe.utf16to8(t)};var ze={Strophe:Be,$build:b,$iq:v,$msg:function(e){return new Be.Builder("message",e)},$pres:y,SHA1:Pe,MD5:Le,b64_hmac_sha1:Pe.b64_hmac_sha1,b64_sha1:Pe.b64_sha1,str_hmac_sha1:Pe.str_hmac_sha1,str_sha1:Pe.str_sha1};const Fe=ze.Strophe,He=ze.$build;Fe.Websocket=function(e){this._conn=e,this.strip="wrapper";const t=e.service;if(0!==t.indexOf("ws:")&&0!==t.indexOf("wss:")){let o="";o+="ws"===e.options.protocol&&"https:"!==window.location.protocol?"ws":"wss",o+="://"+window.location.host,o+=0===t.indexOf("/")?t:window.location.pathname+t,e.service=o}},Fe.Websocket.prototype={_buildStream:function(){return He("open",{xmlns:Fe.NS.FRAMING,to:this._conn.domain,version:"1.0"})},_check_streamerror:function(e,t){let o;if(o=e.getElementsByTagNameNS?e.getElementsByTagNameNS(Fe.NS.STREAM,"error"):e.getElementsByTagName("stream:error"),0===o.length)return!1;const n=o[0];let a="",s="";for(let o=0;o<n.childNodes.length;o++){const t=n.childNodes[o];if(t.getAttribute("xmlns")!=="urn:ietf:params:xml:ns:xmpp-streams")break;"text"===t.nodeName?s=t.textContent:a=t.nodeName}let i="WebSocket stream error: ";return i+=a?a:"unknown",s&&(i+=" - "+s),Fe.error(i),this._conn._changeConnectStatus(t,a),this._conn._doDisconnect(),!0},_reset:function(){},_connect:function(){this._closeSocket(),this.socket=new WebSocket(this._conn.service,"xmpp"),this.socket.onopen=this._onOpen.bind(this),this.socket.onerror=this._onError.bind(this),this.socket.onclose=this._onClose.bind(this),this.socket.onmessage=this._connect_cb_wrapper.bind(this)},_connect_cb:function(e){const t=this._check_streamerror(e,Fe.Status.CONNFAIL);if(t)return Fe.Status.CONNFAIL},_handleStreamStart:function(e){let t=!1;const o=e.getAttribute("xmlns");"string"==typeof o?o!==Fe.NS.FRAMING&&(t="Wrong xmlns in <open />: "+o):t="Missing xmlns in <open />";const n=e.getAttribute("version");return"string"==typeof n?"1.0"!=n&&(t="Wrong version in <open />: "+n):t="Missing version in <open />",!t||(this._conn._changeConnectStatus(Fe.Status.CONNFAIL,t),this._conn._doDisconnect(),!1)},_connect_cb_wrapper:function(e){if(0===e.data.indexOf("<open ")||0===e.data.indexOf("<?xml")){const t=e.data.replace(/^(<\?.*?\?>\s*)*/,"");if(""===t)return;const o=new DOMParser().parseFromString(t,"text/xml").documentElement;this._conn.xmlInput(o),this._conn.rawInput(e.data),this._handleStreamStart(o)&&this._connect_cb(o)}else if(0===e.data.indexOf("<close ")){const t=new DOMParser().parseFromString(e.data,"text/xml").documentElement;this._conn.xmlInput(t),this._conn.rawInput(e.data);const o=t.getAttribute("see-other-uri");if(o){const e=this._conn.service,t=0<=e.indexOf("wss:")&&0<=o.indexOf("wss:")||0<=e.indexOf("ws:");t&&(this._conn._changeConnectStatus(Fe.Status.REDIRECT,"Received see-other-uri, resetting connection"),this._conn.reset(),this._conn.service=o,this._connect())}else this._conn._changeConnectStatus(Fe.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect()}else{const t=this._streamWrap(e.data),o=new DOMParser().parseFromString(t,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(o,null,e.data)}},_disconnect:function(e){if(this.socket&&this.socket.readyState!==WebSocket.CLOSED){e&&this._conn.send(e);const t=He("close",{xmlns:Fe.NS.FRAMING});this._conn.xmlOutput(t.tree());const o=Fe.serialize(t);this._conn.rawOutput(o);try{this.socket.send(o)}catch(t){Fe.warn("Couldn't send <close /> tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){Fe.debug("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(e){return"<wrapper>"+e+"</wrapper>"},_closeSocket:function(){if(this.socket)try{this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close()}catch(t){Fe.debug(t.message)}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(t){this._conn.connected&&!this._conn.disconnecting?(Fe.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):t&&1006===t.code&&!this._conn.connected&&this.socket?(Fe.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(Fe.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):Fe.debug("Websocket closed")},_no_auth_received:function(e){Fe.error("Server did not offer a supported authentication mechanism"),this._conn._changeConnectStatus(Fe.Status.CONNFAIL,Fe.ErrorCondition.NO_AUTH_MECH),e&&e.call(this._conn),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_abortAllRequests:function(){},_onError:function(e){Fe.error("Websocket error "+e),this._conn._changeConnectStatus(Fe.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._disconnect()},_onIdle:function(){const e=this._conn._data;if(0<e.length&&!this._conn.paused){for(let t=0;t<e.length;t++)if(null!==e[t]){let o="restart"===e[t]?this._buildStream().tree():e[t];const n=Fe.serialize(o);this._conn.xmlOutput(o),this._conn.rawOutput(n),this.socket.send(n)}this._conn._data=[]}},_onMessage:function(e){let t;if("<close xmlns=\"urn:ietf:params:xml:ns:xmpp-framing\" />"===e.data)return this._conn.rawInput("<close xmlns=\"urn:ietf:params:xml:ns:xmpp-framing\" />"),this._conn.xmlInput(e),void(this._conn.disconnecting||this._conn._doDisconnect());if(0!==e.data.search("<open ")){const o=this._streamWrap(e.data);t=new DOMParser().parseFromString(o,"text/xml").documentElement}else if(t=new DOMParser().parseFromString(e.data,"text/xml").documentElement,!this._handleStreamStart(t))return;return this._check_streamerror(t,Fe.Status.ERROR)?void 0:this._conn.disconnecting&&"presence"===t.firstChild.nodeName&&"unavailable"===t.firstChild.getAttribute("type")?(this._conn.xmlInput(t),void this._conn.rawInput(Fe.serialize(t))):void this._conn._dataRecv(t,e.data)},_onOpen:function(){Fe.debug("Websocket open");const e=this._buildStream();this._conn.xmlOutput(e.tree());const t=Fe.serialize(e);this._conn.rawOutput(t),this.socket.send(t)},_reqToData:function(e){return e},_send:function(){this._conn.flush()},_sendRestart:function(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}};var Ue=o(329),Ve=o(10),We=o.n(Ve),Ge=o(17),Je=function(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})},$e=function(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(s){if("TypeError"!==s.name)throw s;for(var o="undefined"==typeof BlobBuilder?"undefined"==typeof MSBlobBuilder?"undefined"==typeof MozBlobBuilder?WebKitBlobBuilder:MozBlobBuilder:MSBlobBuilder:BlobBuilder,n=new o,a=0;a<e.length;a+=1)n.append(e[a]);return n.getBlob(t.type)}},Qe=/^~~local_forage_type~([^~]+)~/,Ye="__lfsc__:".length,Xe=Ye+"arbf".length,Ke=Object.prototype.toString,Ze={serialize:function(t,o){var n="";if(t&&(n=Ke.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===Ke.call(t.buffer))){var a="__lfsc__:",s;t instanceof ArrayBuffer?(s=t,a+="arbf"):(s=t.buffer,"[object Int8Array]"===n?a+="si08":"[object Uint8Array]"===n?a+="ui08":"[object Uint8ClampedArray]"===n?a+="uic8":"[object Int16Array]"===n?a+="si16":"[object Uint16Array]"===n?a+="ur16":"[object Int32Array]"===n?a+="si32":"[object Uint32Array]"===n?a+="ui32":"[object Float32Array]"===n?a+="fl32":"[object Float64Array]"===n?a+="fl64":o(new Error("Failed to get type for BinaryArray"))),o(a+k(s))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var e="~~local_forage_type~"+t.type+"~"+k(this.result);o("__lfsc__:blob"+e)},i.readAsArrayBuffer(t)}else try{o(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),o(null,n)}},deserialize:function(e){if(e.substring(0,Ye)!=="__lfsc__:")return JSON.parse(e);var t=e.substring(Xe),o=e.substring(Ye,Xe),n;if(o==="blob"&&Qe.test(t)){var a=t.match(Qe);n=a[1],t=t.substring(a[0].length)}var s=w(t);switch(o){case"arbf":return s;case"blob":return $e([s],{type:n});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+o);}},stringToBuffer:w,bufferToString:k};const et=Ze.serialize,tt=Ze.deserialize,ot={serializer:{serialize:et,deserialize:tt}},nt={_driver:"sessionStorageWrapper",_initStorage:function(e){if(ot.keyPrefix=C(e,this._defaultConfig),e)for(var t in e)ot[t]=e[t]},_support:E(),iterate:function(e,t){var o=this,n=o.ready().then(function(){for(var t=ot.keyPrefix,o=t.length,n=sessionStorage.length,a=1,s=0,r;s<n;s++)if(r=sessionStorage.key(s),0===r.indexOf(t)){var l=sessionStorage.getItem(r);if(l&&(l=ot.serializer.deserialize(l)),l=e(l,r.substring(o),a++),void 0!==l)return l}});return Je(n,t),n},getItem:function(e,t){e=S(e);const o=this.ready().then(function(){let t=sessionStorage.getItem(ot.keyPrefix+e);return t&&(t=ot.serializer.deserialize(t)),t});return Je(o,t),o},setItem:function(e,t,o){e=S(e);const n=this.ready().then(function(){void 0===t&&(t=null);var o=t;return new Promise(function(n,a){ot.serializer.serialize(t,function(t,s){if(s)a(s);else try{sessionStorage.setItem(ot.keyPrefix+e,t),n(o)}catch(t){("QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&a(t),a(t)}})})});return Je(n,o),n},removeItem:function(e,t){e=S(e);const o=this.ready().then(function(){sessionStorage.removeItem(ot.keyPrefix+e)});return Je(o,t),o},clear:function(e){var t=this.ready().then(function(){const e=ot.keyPrefix;for(let t=sessionStorage.length-1;0<=t;t--){const o=sessionStorage.key(t);0===o.indexOf(e)&&sessionStorage.removeItem(o)}});return Je(t,e),t},length:function(e){var t=this,o=t.keys().then(function(e){return e.length});return Je(o,e),o},key:function(e,t){var o=this,n=o.ready().then(function(){var t;try{t=sessionStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(ot.keyPrefix.length)),t});return Je(n,t),n},keys:function(e){var t=this,o=t.ready().then(function(){for(var e=sessionStorage.length,t=[],o=0,n;o<e;o++)n=sessionStorage.key(o),0===n.indexOf(ot.keyPrefix)&&t.push(n.substring(ot.keyPrefix.length));return t});return Je(o,e),o},dropInstance:function(e,t){if(t=x.apply(this,arguments),e="function"!=typeof e&&e||{},!e.name){var o=this.config();e.name=e.name||o.name,e.storeName=e.storeName||o.storeName}var n=this,a;return a=e.name?new Promise(function(t){e.storeName?t(C(e,n._defaultConfig)):t(`${e.name}/`)}).then(function(e){for(var t=sessionStorage.length-1,o;0<=t;t--)o=sessionStorage.key(t),0===o.indexOf(e)&&sessionStorage.removeItem(o)}):Promise.reject(new Error("Invalid arguments")),Je(a,t),a}};var at=nt;class st{constructor(e,t){if("local"===t&&!window.localStorage)throw new Error("Backbone.browserStorage: Environment does not support localStorage.");else if("session"===t&&!window.sessionStorage)throw new Error("Backbone.browserStorage: Environment does not support sessionStorage.");Object(ke.isString)(t)?this.storeInitialized=this.initStore(t):(this.store=t,this.storeInitialized=Promise.resolve()),this.name=e}async initStore(e){if("session"===e)Ge.setDriver(at._driver);else if("local"===e)await Ge.config({driver:Ge.LOCALSTORAGE});else if("indexed"!==e)throw new Error("Backbone.browserStorage: No storage type was specified");this.store=Ge}async clear(){await this.store.removeItem(this.name).catch(t=>console.error(t));const e=new RegExp(`^${this.name}-`),t=await this.store.keys(),o=t.filter(t=>e.test(t));await Promise.all(o.map(e=>this.store.removeItem(e).catch(t=>console.error(t))))}sync(){async function e(e,o,n){let a,s,i,r;const l=o.collection;["patch","update"].includes(e)&&(r=Object(ke.cloneDeep)(o.attributes)),await t.storeInitialized;try{const s=o.attributes;"read"===e?a=void 0===o.id?await t.findAll():await t.find(o):"create"===e?a=await t.create(o,n):"patch"===e||"update"===e?(n.wait&&(o.attributes=r),i=t.update(o,n),n.wait&&(o.attributes=s),a=await i):"delete"===e?a=await t.destroy(o,l):void 0}catch(e){s=22===e.code&&0===t.getStorageSize()?"Private browsing is unsupported":e.message}if(!a)s=s?s:"Record Not Found",n&&n.error&&n.error(s);else if(n&&n.success){const t="read"===e?a:null;n.success(t,n)}}const t=this;return e.__name__="localSync",e}removeCollectionReference(e,t){if(t){const o=t.filter(t=>t.id!==e.id).map(e=>this.getItemName(e.id));return this.store.setItem(this.name,o)}}addCollectionReference(e,t){if(!t)return;const o=t.map(e=>this.getItemName(e.id)),n=this.getItemName(e.id);return o.includes(n)||o.push(n),this.store.setItem(this.name,o)}async save(e,t={}){const o=this.getItemName(e.id),n=await this.store.setItem(o,e.toJSON());return await this.addCollectionReference(e,e.collection),n}create(e,t){return e.id||(e.id=a(),e.set(e.idAttribute,e.id,t)),this.save(e)}update(e,t){return this.save(e,t)}find(e){return this.store.getItem(this.getItemName(e.id))}async findAll(){const e=await this.store.getItem(this.name);return e&&e.length?Promise.all(e.map(e=>this.store.getItem(e))):[]}async destroy(e,t){return await this.store.removeItem(this.getItemName(e.id)),await this.removeCollectionReference(e,t),e}getStorageSize(){return this.store.length}getItemName(e){return this.name+"-"+e}}st.sessionStorageInitialized=Ge.defineDriver(at),st.localForage=Ge,st.patch=function(e){e.BrowserStorage=st,e.ajaxSync=e.sync,e.getSyncMethod=function(t){const o=Object(ke.result)(t,"browserStorage")||Object(ke.result)(t.collection,"browserStorage");return o?o.sync():e.ajaxSync},e.sync=function(t,o,n){return e.getSyncMethod(o).apply(this,[t,o,n])}};var it=st,rt=o(2),lt=o.n(rt),dt=o(114),ct=o.n(dt),pt=o(7),ut=o.n(pt),mt=o(45),gt=o.n(mt);let ht;var _t={getLocale(e,t){return c(e,e=>d(e,t))},translate(e){if(!ht)return gt.a.sprintf.apply(gt.a,arguments);const o=ht.translate(e);return 1<arguments.length?o.fetch.apply(o,[].slice.call(arguments,1)):o.fetch()},async fetchTranslations(e){const t=e.locale;if(d(t,e.locales)&&"en"!==t){const{default:n}=await o(331)("./".concat(t,"/LC_MESSAGES/converse.po"));await o(332)("./".concat(t.toLowerCase().replace("_","-"))),ut.a.locale(c(e.locale,e=>ut.a.locale(e))),ht=new gt.a(n)}}};const ft={debug:0,info:1,warn:2,error:3,fatal:4},bt=Object.assign({debug:Object(ke.get)(console,"log")?console.log.bind(console):function(){},error:Object(ke.get)(console,"log")?console.log.bind(console):function(){},info:Object(ke.get)(console,"log")?console.log.bind(console):function(){},warn:Object(ke.get)(console,"log")?console.log.bind(console):function(){}},console);var vt={setLogLevel(e){if(!["debug","info","warn","error","fatal"].includes(e))throw new Error("Invalid loglevel: ".concat(e));this.loglevel=e},log(e,t){let o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"";if(!(ft[t]<ft[this.loglevel])){"error"===t||"fatal"===t?o=o||"color: maroon":"debug"===t&&(o=o||"color: green"),e instanceof Error?e=e.stack:Object(ke.isElement)(e)&&(e=e.outerHTML);const n=o?"%c":"";"error"===t?bt.error("".concat(n," ERROR: ").concat(e),o):"warn"===t?bt.warn("".concat(n," ").concat(new Date().toISOString()," WARNING: ").concat(e),o):"fatal"===t?bt.error("".concat(n," FATAL: ").concat(e),o):"debug"===t?bt.debug("".concat(n," ").concat(new Date().toISOString()," DEBUG: ").concat(e),o):bt.info("".concat(n," ").concat(new Date().toISOString()," INFO: ").concat(e),o)}},debug(e,t){this.log(e,"debug",t)},error(e,t){this.log(e,"error",t)},info(e,t){this.log(e,"info",t)},warn(e,t){this.log(e,"warn",t)},fatal(e,t){this.log(e,"fatal",t)}},yt=o(115),xt=o.n(yt),St=o(25),wt=o.n(St),kt=o(26),Et=o.n(kt),Ct=o(21),At=o.n(Ct),Tt=o(116),jt=o.n(Tt),Nt=o(40),Mt=o.n(Nt),It=o(117),Ot=o.n(It),Rt=o(19),Dt=o.n(Rt),Lt=o(60),Pt=o.n(Lt),qt=o(118),Bt=o.n(qt),zt=o(119),Ft=o.n(zt),Ht=o(59),Ut=o.n(Ht);Et()(j.prototype,{wrappedOverride:function(e,t,o,n){return"function"==typeof o&&("undefined"==typeof this.__super__&&(this.__super__=n),this.__super__[e]=o.bind(this)),t.apply(this,xt()(arguments,4))},_overrideAttribute:function(e,t){let o=t.overrides[e];if("function"==typeof o){let t={};t[this.name]=this.plugged;let n=Pt()(this.wrappedOverride,e,o,this.plugged[e],t);this.plugged[e]=n}else this.plugged[e]=o},_extendObject:function(e,t){e.prototype.__super__||(e.prototype.__super__={},e.prototype.__super__[this.name]=this.plugged);let o=this;wt()(t,function(t,n){if("events"===n)e.prototype[n]=Et()(t,e.prototype[n]);else if("function"==typeof t){let a={};a[o.name]=o.plugged;let s=Pt()(o.wrappedOverride,n,t,e.prototype[n],a);e.prototype[n]=s}else e.prototype[n]=t})},loadPluginDependencies:function(e){wt()(e.dependencies,t=>{let o=this.plugins[t];if(o){if(At()(o.dependencies,e.__name__))throw"Found a circular dependency between the plugins \""+e.__name__+"\" and \""+t+"\"";this.initializePlugin(o)}else this.throwUndefinedDependencyError("Could not find dependency \""+t+"\" for the plugin \""+e.__name__+"\". If it's needed, make sure it's loaded by require.js")})},throwUndefinedDependencyError:function(e){if(this.plugged.strict_plugin_dependencies)throw e;else console.warn?console.warn(e):console.log(e)},applyOverrides:function(e){wt()(Object.keys(e.overrides||{}),t=>{let o=e.overrides[t];"object"==typeof o?"undefined"==typeof this.plugged[t]?this.throwUndefinedDependencyError(`Plugin "${e.__name__}" tried to override "${t}" but it's not found.`):this._extendObject(this.plugged[t],o):this._overrideAttribute(t,e)})},initializePlugin:function(e){!At()(Dt()(this.allowed_plugins),e.__name__)||At()(this.initialized_plugins,e.__name__)||(jt()(e.enabled)&&e.enabled||Mt()(e.enabled)&&e.enabled(this.plugged)||Ot()(e.enabled))&&(Et()(e,this.properties),e.dependencies&&this.loadPluginDependencies(e),this.applyOverrides(e),"function"==typeof e.initialize&&e.initialize.bind(e)(this),this.initialized_plugins.push(e.__name__))},registerPlugin:function(e,t){if(e in this.plugins)throw new Error("Error: Plugin name "+e+" is already taken");t.__name__=e,this.plugins[e]=t},initializePlugins:function(e={},t=[],o=[]){Ft()(this.plugins)&&(this.properties=e,this.allowed_plugins=Bt()(this.plugins,function(e,n){return(!t.length||t.length&&At()(t,n))&&!At()(o,n)}),wt()(Ut()(this.allowed_plugins),this.initializePlugin.bind(this)))}});var Vt=o(3),Wt=o.n(Vt);const Gt=ze.Strophe,Jt={};Jt.isTagEqual=function(e,t){if(e.nodeTree)return Jt.isTagEqual(e.nodeTree,t);if(!(e instanceof Element))throw Error("isTagEqual called with value which isn't an element or Strophe.Builder instance");else return Gt.isTagEqual(e,t)};const u=new DOMParser,$t=u.parseFromString("invalid","text/xml").getElementsByTagName("parsererror")[0].namespaceURI;Jt.toStanza=function(e){const t=u.parseFromString(e,"text/xml");if(t.getElementsByTagNameNS($t,"parsererror").length)throw new Error("Parser Error: ".concat(e));return t.firstElementChild},Jt.isMAMMessage=function(e){return 0<Wt()("message > result[xmlns=\"".concat(Gt.NS.MAM,"\"]"),e).length},Jt.isCarbonMessage=function(e){const t=Gt.NS.CARBONS;return 0<Wt()("message > received[xmlns=\"".concat(t,"\"]"),e).length||0<Wt()("message > sent[xmlns=\"".concat(t,"\"]"),e).length},Jt.getLongestSubstring=function(e,t){return t.reduce(function(t,o){return e.startsWith(o)?o.length>t.length?o:t:t},"")},Jt.prefixMentions=function(e){let t=e.get("message");return(e.get("references")||[]).sort((e,t)=>t.begin-e.begin).forEach(e=>{t="".concat(t.slice(0,e.begin),"@").concat(t.slice(e.begin))}),t},Jt.isValidJID=function(e){return!!lt.a.isString(e)&&2===lt.a.compact(e.split("@")).length&&!e.startsWith("@")&&!e.endsWith("@")},Jt.isValidMUCJID=function(e){return!e.startsWith("@")&&!e.endsWith("@")},Jt.isSameBareJID=function(e,t){return!!(lt.a.isString(e)&&lt.a.isString(t))&&Gt.getBareJidFromJid(e).toLowerCase()===Gt.getBareJidFromJid(t).toLowerCase()},Jt.isSameDomain=function(e,t){return!!(lt.a.isString(e)&&lt.a.isString(t))&&Gt.getDomainFromJid(e).toLowerCase()===Gt.getDomainFromJid(t).toLowerCase()},Jt.isNewMessage=function(e){return e instanceof Element?!(Wt()("result[xmlns=\"".concat(Gt.NS.MAM,"\"]"),e).length&&Wt()("delay[xmlns=\"".concat(Gt.NS.DELAY,"\"]"),e).length):(e instanceof We.a.Model&&(e=e.attributes),!(e.is_delayed&&e.is_archived))},Jt.isEmptyMessage=function(e){return e instanceof We.a.Model&&(e=e.attributes),!e.oob_url&&!e.file&&!(e.is_encrypted&&e.plaintext)&&!e.message},Jt.isOnlyChatStateNotification=function(e){return e instanceof Element?null===e.querySelector("body")&&(null!==e.querySelector("active")||null!==e.querySelector("composing")||null!==e.querySelector("inactive")||null!==e.querySelector("paused")||null!==e.querySelector("gone")):(e instanceof We.a.Model&&(e=e.attributes),e.chat_state&&Jt.isEmptyMessage(e))},Jt.isOnlyMessageDeliveryReceipt=function(e){return e instanceof Element?null===e.querySelector("body")&&null!==e.querySelector("received"):(e instanceof We.a.Model&&(e=e.attributes),e.received&&Jt.isEmptyMessage(e))},Jt.isChatRoom=function(e){return e&&"chatroom"===e.get("type")},Jt.isHeadlineMessage=function(e,t){const o=t.getAttribute("from");if("headline"===t.getAttribute("type"))return!0;const n=e.chatboxes.get(Gt.getBareJidFromJid(o));return!Jt.isChatRoom(n)&&!("error"===t.getAttribute("type")||!o||lt.a.includes(o,"@"))},Jt.isErrorObject=function(e){return e instanceof Error},Jt.isErrorStanza=function(e){return!!lt.a.isElement(e)&&"error"===e.getAttribute("type")},Jt.isForbiddenError=function(e){return!!lt.a.isElement(e)&&0<Wt()("error[type=\"auth\"] forbidden[xmlns=\"".concat(Gt.NS.STANZAS,"\"]"),e).length},Jt.isServiceUnavailableError=function(e){return!!lt.a.isElement(e)&&0<Wt()("error[type=\"cancel\"] service-unavailable[xmlns=\"".concat(Gt.NS.STANZAS,"\"]"),e).length},Jt.merge=function e(t,o){for(var n in o)lt.a.isObject(t[n])?e(t[n],o[n]):t[n]=o[n]},Jt.applyUserSettings=function e(t,o,n){for(var a in o)void 0!==n[a]&&(lt.a.isObject(o[a])&&!Array.isArray(o[a])?e(t[a],o[a],n[a]):t[a]=n[a])},Jt.stringToNode=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild},Jt.getOuterWidth=function(e){let t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],o=e.offsetWidth;if(!t)return o;const n=window.getComputedStyle(e);return o+=parseInt(n.marginLeft?n.marginLeft:0,10)+parseInt(n.marginRight?n.marginRight:0,10),o},Jt.stringToElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild},Jt.matchesSelector=function(e,t){const o=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return!!o&&o.call(e,t)},Jt.queryChildren=function(e,t){return Array.from(e.childNodes).filter(e=>Jt.matchesSelector(e,t))},Jt.contains=function(e,t){return function(o){if("object"==typeof e){var n=!1;return lt.a.forEach(e,function(e){n=n||lt.a.includes(o.get(e).toLowerCase(),t.toLowerCase())}),n}if("string"==typeof e)return lt.a.includes(o.get(e).toLowerCase(),t.toLowerCase());throw new TypeError("contains: wrong attribute type. Must be string or array.")}},Jt.isOfType=function(e,t){return t.get("type")==e},Jt.isInstance=function(e,t){return t instanceof e},Jt.getAttribute=function(e,t){return t.get(e)},Jt.contains.not=function(e,t){return function(o){return!Jt.contains(e,t)(o)}},Jt.rootContains=function(e,t){return e!==document||e.contains?e.contains?e.contains(t):window.HTMLElement.prototype.contains.call(e,t):document.head.contains(t)||document.body.contains(t)},Jt.createFragmentFromText=function(e){var t=document.createDocumentFragment(),o=document.createElement("body"),n;for(o.innerHTML=e;n=o.firstChild;)t.appendChild(n);return t},Jt.isPersistableModel=function(e){return e.collection&&e.collection.browserStorage},Jt.getResolveablePromise=function(){const e={isResolved:!1,isPending:!0,isRejected:!1},t=new Promise((t,o)=>{e.resolve=t,e.reject=o});return lt.a.assign(t,e),t.then(function(e){return t.isResolved=!0,t.isPending=!1,t.isRejected=!1,e},function(o){throw t.isResolved=!1,t.isPending=!1,t.isRejected=!0,o}),t},Jt.interpolate=function(e,t){return e.replace(/{{{([^{}]*)}}}/g,(e,o)=>{var n=t[o];return"string"==typeof n||"number"==typeof n?n:e})},Jt.onMultipleEvents=function(){function t(e){a.push(e),o.length===a.length&&(n(a),a=[])}let o=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],n=1<arguments.length?arguments[1]:void 0,a=[];o.forEach(o=>o.object.on(o.event,t))},Jt.safeSave=function(e,t,o){Jt.isPersistableModel(e)?e.save(t,o):e.set(t,o)},Jt.siblingIndex=function(e){for(var t=0;e=e.previousElementSibling;t++);return t},Jt.getCurrentWord=function(e,t,o){t||(t=e.selectionEnd||void 0);let[n]=e.value.slice(0,t).split(" ").slice(-1);return o&&([n]=n.split(o).slice(-1)),n},Jt.replaceCurrentWord=function(e,t){const o=e.selectionEnd||void 0,n=lt.a.last(e.value.slice(0,o).split(" ")),a=e.value;e.value=a.slice(0,o-n.length)+"".concat(t," ")+a.slice(o),e.selectionEnd=o-n.length+t.length+1},Jt.triggerEvent=function(e,t){let o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"Event",n=!(3<arguments.length&&arguments[3]!==void 0)||arguments[3],a=!(4<arguments.length&&arguments[4]!==void 0)||arguments[4];const s=document.createEvent(o);s.initEvent(t,n,a),e.dispatchEvent(s)},Jt.geoUriToHttp=function(e,t){return e.replace(/geo:([\-0-9.]+),([\-0-9.]+)(?:,([\-0-9.]+))?(?:\?(.*))?/g,t)},Jt.httpToGeoUri=function(e,t){return e.replace(t.geouri_regex,"geo:$1,$2")},Jt.getSelectValues=function(e){const t=[],o=e&&e.options;for(var n=0,a=o.length;n<a;n++){const e=o[n];e.selected&&t.push(e.value||e.text)}return t},Jt.formatFingerprint=function(e){e=e.replace(/^05/,"");for(let t=1;8>t;t++){const o=8*t+t-1;e=e.slice(0,o)+" "+e.slice(o)}return e},Jt.appendArrayBuffer=function(e,t){const o=new Uint8Array(e.byteLength+t.byteLength);return o.set(new Uint8Array(e),0),o.set(new Uint8Array(t),e.byteLength),o.buffer},Jt.arrayBufferToHex=function(e){return Array.prototype.map.call(new Uint8Array(e),e=>("00"+e.toString(16)).slice(-2)).join("")},Jt.arrayBufferToString=function(e){return new TextDecoder("utf-8").decode(e)},Jt.stringToArrayBuffer=function(e){const t=new TextEncoder("utf-8").encode(e);return t.buffer},Jt.arrayBufferToBase64=function(e){return btoa(new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),""))},Jt.base64ToArrayBuffer=function(e){const t=window.atob(e),o=t.length,n=new Uint8Array(o);for(let a=0;a<o;a++)n[a]=t.charCodeAt(a);return n.buffer},Jt.getRandomInt=function(e){return Math.floor(Math.random()*Math.floor(e))},Jt.placeCaretAtEnd=function(e){e!==document.activeElement&&e.focus();const t=2*e.value.length;setTimeout(()=>e.setSelectionRange(t,t),1),this.scrollTop=999999},Jt.getUniqueId=function(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=0|16*Math.random(),o="x"===e?t:8|3&t;return o.toString(16)});return"string"==typeof e||"number"==typeof e?"id"+t+":"+e:"id"+t},Jt.waitUntil=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:300,o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:3;try{const t=e();if(t)return Promise.resolve(t)}catch(t){return Promise.reject(t)}const n=Jt.getResolveablePromise(),a=setInterval(function(){try{const t=e();t&&(N(s,a),n.resolve(t))}catch(t){N(s,a),n.reject(t)}},o),s=setTimeout(()=>{N(s,a);vt.error("Wait until promise timed out"),n.reject(new Error("Wait until promise timed out"))},t);return n};var Qt=Jt;const Yt=ze.Strophe,Xt={isReceipt(e){return 0<Wt()("received[xmlns=\"".concat(Yt.NS.RECEIPTS,"\"]"),e).length},isChatMarker(e){return 0<Wt()("received[xmlns=\"".concat(Yt.NS.MARKERS,"\"],\n             displayed[xmlns=\"").concat(Yt.NS.MARKERS,"\"],\n             acknowledged[xmlns=\"").concat(Yt.NS.MARKERS,"\"]"),e).length},isArchived(e){return!!Wt()("result[xmlns=\"".concat(Yt.NS.MAM,"\"]"),e).pop()},getStanzaIDs(e,t){const o={},n=Wt()("stanza-id[xmlns=\"".concat(Yt.NS.SID,"\"]"),e);n.length&&n.forEach(e=>o["stanza_id ".concat(e.getAttribute("by"))]=e.getAttribute("id"));const a=Wt()("message > result[xmlns=\"".concat(Yt.NS.MAM,"\"]"),t).pop();if(a){const e=t.getAttribute("from");o["stanza_id ".concat(e)]=a.getAttribute("id")}const s=Wt()("origin-id[xmlns=\"".concat(Yt.NS.SID,"\"]"),e).pop();return s&&(o.origin_id=s.getAttribute("id")),o.id=o.origin_id||o["stanza_id ".concat(o.from)]||Qt.getUniqueId(),o},getModerationAttributes(e,t,o){const n=Wt()("apply-to[xmlns=\"".concat(Yt.NS.FASTEN,"\"]"),e).pop();if(n){const a=n.getAttribute("id"),s=Wt()("moderated[xmlns=\"".concat(Yt.NS.MODERATE,"\"]"),n).pop();if(s){const n=Wt()("retract[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),s).pop();if(n){const n=e.getAttribute("from");return n===o.get("jid")?{edtiable:!1,moderated:"retracted",moderated_by:s.getAttribute("by"),moderated_id:a,moderation_reason:Object(ke.get)(s.querySelector("reason"),"textContent")}:(vt.warn("getModerationAttributes: ignore moderation stanza that's not from the MUC!"),vt.error(t),{})}}}else{const t=Wt()("> moderated[xmlns=\"".concat(Yt.NS.MODERATE,"\"]"),e).pop();if(t){const e=Wt()("retracted[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),t).pop();if(e)return{edtiable:!1,is_tombstone:!0,moderated_by:t.getAttribute("by"),retracted:t.getAttribute("stamp"),moderation_reason:Object(ke.get)(t.querySelector("reason"),"textContent")}}}return{}},getRetractionAttributes(e,t){const o=Wt()("> apply-to[xmlns=\"".concat(Yt.NS.FASTEN,"\"]"),e).pop();if(o){const e=o.getAttribute("id"),n=Wt()("> retract[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),o).pop();if(n){const o=Wt()("delay[xmlns=\"".concat(Yt.NS.DELAY,"\"]"),t).pop(),n=o?ut()(o.getAttribute("stamp")).toISOString():new Date().toISOString();return{editable:!1,retracted:n,retracted_id:e}}}else{const t=Wt()("> retracted[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),e).pop();if(t)return{editable:!1,is_tombstone:!0,retracted:t.getAttribute("stamp")}}return{}},getReferences(e){const t=Object(ke.propertyOf)(e.querySelector("body"))("textContent");return Wt()("reference[xmlns=\"".concat(Yt.NS.REFERENCE,"\"]"),e).map(e=>{const o=e.getAttribute("begin"),n=e.getAttribute("end");return{begin:o,end:n,type:e.getAttribute("type"),value:t.slice(o,n),uri:e.getAttribute("uri")}})},getSenderAttributes(e,t,o){if(Qt.isChatRoom(t)){const o=e.getAttribute("from"),n=Yt.unescapeNode(Yt.getResourceFromJid(o));return{from:o,nick:n,sender:n===t.get("nick")?"me":"them",received:new Date().toISOString()}}else{const n=Yt.getBareJidFromJid(e.getAttribute("from"));return n===o.bare_jid?{from:n,sender:"me",fullname:o.xmppstatus.get("fullname")}:{from:n,sender:"them",fullname:t.get("fullname")}}},getSpoilerAttributes(e){const t=Wt()("spoiler[xmlns=\"".concat(Yt.NS.SPOILER,"\"]"),e).pop();return{is_spoiler:!!t,spoiler_hint:Object(ke.get)(t,"textContent")}},getOutOfBandAttributes(e){const t=Wt()("x[xmlns=\"".concat(Yt.NS.OUTOFBAND,"\"]"),e).pop();return t?{oob_url:Object(ke.get)(t.querySelector("url"),"textContent"),oob_desc:Object(ke.get)(t.querySelector("desc"),"textContent")}:{}},getCorrectionAttributes(e,t){const o=Wt()("replace[xmlns=\"".concat(Yt.NS.MESSAGE_CORRECT,"\"]"),e).pop();if(o){const e=o.getAttribute("id");if(e){const o=Wt()("delay[xmlns=\"".concat(Yt.NS.DELAY,"\"]"),t).pop(),n=o?ut()(o.getAttribute("stamp")).toISOString():new Date().toISOString();return{msgid:e,replaced_id:e,edited:n}}}return{}},getErrorMessage(e,t,o){const{__:n}=o;if(t){if(Wt()("forbidden[xmlns=\"".concat(Yt.NS.STANZAS,"\"]"),e).length)return n("Your message was not delivered because you're not allowed to send messages in this groupchat.");if(Wt()("not-acceptable[xmlns=\"".concat(Yt.NS.STANZAS,"\"]"),e).length)return n("Your message was not delivered because you're not present in the groupchat.")}const a=e.querySelector("error");return Object(ke.propertyOf)(a.querySelector("text"))("textContent")||n("Sorry, an error occurred:")+" "+a.innerHTML},getMessageBody(e,t,o){const n=e.getAttribute("type");if("error"===n)return Xt.getErrorMessage(e,t,o);else{const t=e.querySelector("body");if(t)return t.textContent.trim()}},getChatState(e){return e.getElementsByTagName("composing").length&&"composing"||e.getElementsByTagName("paused").length&&"paused"||e.getElementsByTagName("inactive").length&&"inactive"||e.getElementsByTagName("active").length&&"active"||e.getElementsByTagName("gone").length&&"gone"},getMessageAttributesFromStanza(e,t,o,n){const a=Qt.isChatRoom(o);let s=Object.assign(Xt.getStanzaIDs(e,t),Xt.getRetractionAttributes(e,t),a?Xt.getModerationAttributes(e,t,o):{});const i=Xt.getMessageBody(e,a,n)||void 0,r=Wt()("delay[xmlns=\"".concat(Yt.NS.DELAY,"\"]"),t).pop();return s=Object.assign({chat_state:Xt.getChatState(e),is_archived:Xt.isArchived(t),is_delayed:!!r,is_only_emojis:!!i&&Qt.isOnlyEmojis(i),message:i,msgid:e.getAttribute("id")||t.getAttribute("id"),references:Xt.getReferences(e),subject:Object(ke.propertyOf)(e.querySelector("subject"))("textContent"),thread:Object(ke.propertyOf)(e.querySelector("thread"))("textContent"),time:r?ut()(r.getAttribute("stamp")).toISOString():new Date().toISOString(),type:e.getAttribute("type")},s,Xt.getSenderAttributes(e,o,n),Xt.getOutOfBandAttributes(e),Xt.getSpoilerAttributes(e),Xt.getCorrectionAttributes(e,t)),s}};var Kt=Xt;const Zt=ze.Strophe,eo=ze.$build,to=ze.$iq,oo=ze.$msg,no=ze.$pres;Backbone=We.a.noConflict(),it.patch(Backbone),ut.a.extend(ct.a),Zt.addNamespace("CARBONS","urn:xmpp:carbons:2"),Zt.addNamespace("CHATSTATES","http://jabber.org/protocol/chatstates"),Zt.addNamespace("CSI","urn:xmpp:csi:0"),Zt.addNamespace("DELAY","urn:xmpp:delay"),Zt.addNamespace("FASTEN","urn:xmpp:fasten:0"),Zt.addNamespace("FORWARD","urn:xmpp:forward:0"),Zt.addNamespace("HINTS","urn:xmpp:hints"),Zt.addNamespace("HTTPUPLOAD","urn:xmpp:http:upload:0"),Zt.addNamespace("IDLE","urn:xmpp:idle:1"),Zt.addNamespace("MAM","urn:xmpp:mam:2"),Zt.addNamespace("MODERATE","urn:xmpp:message-moderate:0"),Zt.addNamespace("NICK","http://jabber.org/protocol/nick"),Zt.addNamespace("OMEMO","eu.siacs.conversations.axolotl"),Zt.addNamespace("OUTOFBAND","jabber:x:oob"),Zt.addNamespace("PUBSUB","http://jabber.org/protocol/pubsub"),Zt.addNamespace("REGISTER","jabber:iq:register"),Zt.addNamespace("RETRACT","urn:xmpp:message-retract:0"),Zt.addNamespace("ROSTERX","http://jabber.org/protocol/rosterx"),Zt.addNamespace("RSM","http://jabber.org/protocol/rsm"),Zt.addNamespace("SID","urn:xmpp:sid:0"),Zt.addNamespace("SPOILER","urn:xmpp:spoiler:0"),Zt.addNamespace("STANZAS","urn:ietf:params:xml:ns:xmpp-stanzas"),Zt.addNamespace("VCARD","vcard-temp"),Zt.addNamespace("VCARDUPDATE","vcard-temp:x:update"),Zt.addNamespace("XFORM","jabber:x:data"),lt.a.templateSettings={escape:/\{\{\{([\s\S]+?)\}\}\}/g,evaluate:/\{\[([\s\S]+?)\]\}/g,interpolate:/\{\{([\s\S]+?)\}\}/g,imports:{_:lt.a}};const ao=59,so=["converse-bookmarks","converse-bosh","converse-caps","converse-chatboxes","converse-chat","converse-disco","converse-emoji","converse-mam","converse-muc","converse-headlines","converse-ping","converse-pubsub","converse-roster","converse-rsm","converse-smacks","converse-status","converse-vcard"],io={templates:{},promises:{}};io.VERSION_NAME="v6.0.0",Object.assign(io,Backbone.Events),io.Collection=Backbone.Collection.extend({async clearSession(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};await Promise.all(Array.from(this.models).map(t=>new Promise(o=>{t.destroy(Object.assign(e,{success:o,error:(t,n)=>{vt.error(n),o()}}))}))),await this.browserStorage.clear(),this.reset()}});class ro extends Error{}io.TimeoutError=ro;class lo extends Error{}io.IllegalMessage=lo,{enable:function(e,t,o){"undefined"==typeof o&&(o="pluginSocket"),"undefined"==typeof t&&(t="plugged");let n={};return n[o]=new j(e,t),Et()(e,n)}}.enable(io,"_converse","pluggable"),io.STATUS_WEIGHTS={offline:6,unavailable:5,xa:4,away:3,dnd:2,chat:1,online:1},io.PRETTY_CHAT_STATUS={offline:"Offline",unavailable:"Unavailable",xa:"Extended Away",away:"Away",dnd:"Do not disturb",chat:"Chattty",online:"Online"},io.ANONYMOUS="anonymous",io.CLOSED="closed",io.EXTERNAL="external",io.LOGIN="login",io.LOGOUT="logout",io.OPENED="opened",io.PREBIND="prebind",io.STANZA_TIMEOUT=1e4,io.CONNECTION_STATUS={0:"ERROR",1:"CONNECTING",2:"CONNFAIL",3:"AUTHENTICATING",4:"AUTHFAIL",5:"CONNECTED",6:"DISCONNECTED",7:"DISCONNECTING",8:"ATTACHED",9:"REDIRECT",10:"RECONNECTING"},io.SUCCESS="success",io.FAILURE="failure",io.DEFAULT_IMAGE_TYPE="image/svg+xml",io.DEFAULT_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+CiA8cmVjdCB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgZmlsbD0iIzU1NSIvPgogPGNpcmNsZSBjeD0iNjQiIGN5PSI0MSIgcj0iMjQiIGZpbGw9IiNmZmYiLz4KIDxwYXRoIGQ9Im0yOC41IDExMiB2LTEyIGMwLTEyIDEwLTI0IDI0LTI0IGgyMyBjMTQgMCAyNCAxMiAyNCAyNCB2MTIiIGZpbGw9IiNmZmYiLz4KPC9zdmc+Cg==",io.TIMEOUTS={PAUSED:1e4,INACTIVE:9e4},io.INACTIVE="inactive",io.ACTIVE="active",io.COMPOSING="composing",io.PAUSED="paused",io.GONE="gone",io.PRIVATE_CHAT_TYPE="chatbox",io.CHATROOMS_TYPE="chatroom",io.HEADLINES_TYPE="headline",io.CONTROLBOX_TYPE="controlbox",io.default_connection_options={explicitResourceBinding:!0},io.default_settings={allow_non_roster_messaging:!1,authentication:"login",auto_away:0,auto_login:!1,auto_reconnect:!0,auto_xa:0,blacklisted_plugins:[],connection_options:{},credentials_url:null,csi_waiting_time:0,loglevel:"info",default_state:"online",discover_connection_methods:!1,geouri_regex:/https\:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g,geouri_replacement:"https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2",idle_presence_timeout:300,jid:void 0,keepalive:!0,locales:["af","ar","bg","ca","cs","de","eo","es","eu","en","fr","gl","he","hi","hu","id","it","ja","nb","nl","mr","oc","pl","pt","pt_BR","ro","ru","tr","uk","vi","zh_CN","zh_TW"],message_carbons:!0,nickname:void 0,password:void 0,persistent_store:"localStorage",priority:0,rid:void 0,root:window.document,sid:void 0,singleton:!1,strict_plugin_dependencies:!1,trusted:!0,view_mode:"overlayed",websocket_url:void 0,whitelisted_plugins:[]},io.__=function(e){return void 0===_t?e:_t.translate.apply(_t,arguments)},io.___=function(e){return e};const co=io.__,po=["afterResourceBinding","connectionInitialized","initialized","pluginsInitialized","statusInitialized"];io.isTestEnv=function(){return"MockConnection"===Zt.Connection.name},io.haveResumed=function(){return io.api.connection.isType("bosh")?io.connfeedback.get("connection_status")===Zt.Status.ATTACHED:!io.connection.do_bind},io.isUniView=function(){return lt.a.includes(["mobile","fullscreen","embedded"],io.view_mode)},io.createStore=function(e,t){const o=io.storage[t?t:io.config.get("storage")];return new Backbone.BrowserStorage(e,o)},io.router=new Backbone.Router;const uo=lt.a.debounce(B,2e3);io.shouldClearCache=()=>!io.config.get("trusted")||io.isTestEnv(),io.initConnection=async function(e){if(io.discover_connection_methods&&(await H(e)),!io.bosh_service_url){if(io.authentication===io.PREBIND)throw new Error("authentication is set to 'prebind' but we don't have a BOSH connection");if(!io.websocket_url)throw new Error("initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.")}if(("WebSocket"in window||"MozWebSocket"in window)&&io.websocket_url)io.connection=new Zt.Connection(io.websocket_url,Object.assign(io.default_connection_options,io.connection_options));else if(io.bosh_service_url)io.connection=new Zt.Connection(io.bosh_service_url,Object.assign(io.default_connection_options,io.connection_options,{keepalive:io.keepalive}));else throw new Error("initConnection: this browser does not support websockets and bosh_service_url wasn't specified.");J(),io.api.trigger("connectionInitialized")},io.setUserJID=async function(e){if(!io.connection||!Qt.isSameDomain(io.connection.jid,e)){const t=Zt.getDomainFromJid(e);await io.initConnection(t)}return await U(e),io.api.trigger("setUserJID"),e},io.saveWindowState=function(e){let t;const o={focus:"visible",focusin:"visible",pageshow:"visible",blur:"hidden",focusout:"hidden",pagehide:"hidden"};e=e||document.createEvent("Events"),t=e.type in o?o[e.type]:document.hidden?"hidden":"visible",io.windowState=t,io.api.trigger("windowStateChanged",{state:t})},io.initialize=async function(e,t){if(te(),e=void 0===e?{}:e,po.forEach(e=>io.api.promises.add(e)),"onpagehide"in window?io.unloadevent="pagehide":"onbeforeunload"in window?io.unloadevent="beforeunload":"onunload"in window&&(io.unloadevent="unload"),lt.a.assignIn(this,this.default_settings),lt.a.assignIn(this,lt.a.pick(e,Object.keys(this.default_settings))),this.settings={},lt.a.assignIn(this.settings,lt.a.pick(e,Object.keys(this.default_settings))),vt.setLogLevel(io.loglevel),io.log=vt.log,this.authentication===io.ANONYMOUS&&this.auto_login&&!this.jid)throw new Error("Config Error: you need to provide the server's domain via the 'jid' option when using anonymous authentication with auto_login.");if(io.router.route(/^converse\?loglevel=(debug|info|warn|error|fatal)$/,"loglevel",e=>vt.setLogLevel(e)),void 0===_t||io.isTestEnv())io.locale="en";else try{io.locale=_t.getLocale(e.i18n,io.locales),await _t.fetchTranslations(io)}catch(t){vt.fatal(t.message)}return(this.callback=t||function(){},this.send_initial_presence=!0,this.user_settings=e,this.generateResource=()=>"/converse.js-".concat(Math.floor(139749528*Math.random()).toString()),this.setConnectionStatus=function(e,t){io.connfeedback.set({connection_status:e,message:t})},this.onDisconnected=function(){const e=io.disconnection_reason;return io.disconnection_cause===Zt.Status.AUTHFAIL?io.auto_reconnect&&(io.credentials_url||io.authentication===io.ANONYMOUS)?io.api.connection.reconnect():Q():io.disconnection_cause!==io.LOGOUT&&(void 0===e||e!==lt.a.get(Zt,"ErrorCondition.NO_AUTH_MECH"))&&"host-unknown"!==e&&"remote-connection-failed"!==e&&io.auto_reconnect?void io.api.connection.reconnect():Q()},this.setDisconnectionCause=function(e,t,o){void 0===e?(delete io.disconnection_cause,delete io.disconnection_reason):(void 0===io.disconnection_cause||o)&&(io.disconnection_cause=e,io.disconnection_reason=t)},this.onConnectStatusChanged=function(e,t){if(vt.debug("Status changed to: ".concat(io.CONNECTION_STATUS[e])),e===Zt.Status.CONNECTED||e===Zt.Status.ATTACHED)io.setConnectionStatus(e),io.send_initial_presence=!0,io.setDisconnectionCause(),io.connection.reconnecting?(vt.debug(e===Zt.Status.CONNECTED?"Reconnected":"Reattached"),G(!0)):(vt.debug(e===Zt.Status.CONNECTED?"Connected":"Attached"),io.connection.restored&&(io.send_initial_presence=!1),G());else if(e===Zt.Status.DISCONNECTED)io.setDisconnectionCause(e,t),io.onDisconnected();else if(e===Zt.Status.BINDREQUIRED)io.bindResource();else if(e===Zt.Status.ERROR)io.setConnectionStatus(e,co("An error occurred while connecting to the chat server."));else if(e===Zt.Status.CONNECTING)io.setConnectionStatus(e);else if(e===Zt.Status.AUTHENTICATING)io.setConnectionStatus(e);else if(e===Zt.Status.AUTHFAIL)t||(t=co("Your Jabber ID and/or password is incorrect. Please try again.")),io.setConnectionStatus(e,t),io.setDisconnectionCause(e,t,!0),io.onDisconnected();else if(e===Zt.Status.CONNFAIL){let o=t;"host-unknown"===t||"remote-connection-failed"==t?o=co("Sorry, we could not connect to the XMPP host with domain: %1$s","\"".concat(Zt.getDomainFromJid(io.connection.jid),"\"")):void 0!==t&&t===lt.a.get(Zt,"ErrorCondition.NO_AUTH_MECH")&&(o=co("The XMPP server did not offer a supported authentication mechanism")),io.setConnectionStatus(e,o),io.setDisconnectionCause(e,t)}else e===Zt.Status.DISCONNECTING&&io.setDisconnectionCause(e,t)},this.bindResource=async function(){await io.api.trigger("beforeResourceBinding",{synchronous:!0}),io.connection.bind()},this.ConnectionFeedback=Backbone.Model.extend({defaults:{connection_status:Zt.Status.DISCONNECTED,message:""},initialize(){this.on("change",()=>io.api.trigger("connfeedback",io.connfeedback))}}),this.connfeedback=new this.ConnectionFeedback,await $(),io.isTestEnv())?io:void 0},io.api={connection:{connected(){return lt.a.get(io,"connection",{}).connected&&!0},disconnect(){io.connection&&io.connection.disconnect()},async reconnect(){const e=io.connfeedback.get("connection_status");return io.authentication===io.ANONYMOUS&&(await L(),z()),e===Zt.Status.CONNFAIL&&(io.api.connection.isType("websocket")&&io.bosh_service_url?(await io.setUserJID(io.bare_jid),io.connection._proto._doDisconnect(),io.connection._proto=new Zt.Bosh(io.connection),io.connection.service=io.bosh_service_url):io.api.connection.isType("bosh")&&io.websocket_url&&(io.authentication===io.ANONYMOUS?await io.setUserJID(io.settings.jid):await io.setUserJID(io.bare_jid),io.connection._proto._doDisconnect(),io.connection._proto=new Zt.Websocket(io.connection),io.connection.service=io.websocket_url)),e===Zt.Status.AUTHFAIL&&io.authentication===io.ANONYMOUS&&(await io.setUserJID(io.settings.jid)),io.connection.reconnecting?void uo():B()},isType(e){if("websocket"===e.toLowerCase())return io.connection._proto instanceof Zt.Websocket;return"bosh"===e.toLowerCase()?io.connection._proto instanceof Zt.Bosh:void 0}},async trigger(e){const t=Array.from(arguments),o=t.pop();if(o&&o.synchronous){const o=io._events[e]||[];await Promise.all(o.map(o=>o.callback.apply(o.ctx,t.splice(1))))}else io.trigger.apply(io,arguments);const n=io.promises[e];n!==void 0&&n.resolve()},user:{jid(){return io.connection.jid},async login(e,t){let o=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2];(e||io.jid)&&(e=await io.setUserJID(e||io.jid));const n=io.pluggable.plugins["converse-bosh"];if(n&&n.enabled()){if(await io.restoreBOSHSession())return;if(io.authentication===io.PREBIND&&(!o||io.auto_login))return io.startNewPreboundBOSHSession()}t=t||io.password;const a=e&&t?{jid:e,password:t}:null;P(a,o)},logout(){const e=Qt.getResolveablePromise(),t=()=>{Object.keys(io.promises).forEach(M),delete io.jid,io.api.trigger("logout"),e.resolve()};return io.setDisconnectionCause(io.LOGOUT,void 0,!0),void 0===io.connection?t():(io.api.listen.once("disconnected",()=>t()),io.connection.disconnect()),e}},settings:{update(e){Qt.merge(io.default_settings,e),Qt.merge(io,e),Qt.applyUserSettings(io,e,io.user_settings)},get(e){if(lt.a.includes(Object.keys(io.default_settings),e))return io[e]},set(e,t){const n={};lt.a.isObject(e)?lt.a.assignIn(io,lt.a.pick(e,Object.keys(io.default_settings))):lt.a.isString("string")&&(n[e]=t,lt.a.assignIn(io,lt.a.pick(n,Object.keys(io.default_settings))))}},promises:{add(e){let t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];e=Array.isArray(e)?e:[e],e.forEach(e=>{const o=Qt.getResolveablePromise();o.replace=t,io.promises[e]=o})}},listen:{once:io.once.bind(io),on:io.on.bind(io),not:io.off.bind(io),stanza(e,t,o){lt.a.isFunction(t)?(o=t,t={}):t=t||{},io.connection.addHandler(o,t.ns,e,t.type,t.id,t.from,t)}},waitUntil(e){if(lt.a.isFunction(e))return Qt.waitUntil(e);else{const t=io.promises[e];return void 0===t?null:t}},send(e){return io.api.connection.connected()?(lt.a.isString(e)&&(e=Qt.toStanza(e)),"iq"===e.tagName?io.api.sendIQ(e):void(io.connection.send(e),io.api.trigger("send",e))):(vt.warn("Not sending stanza because we're not connected!"),void vt.warn(Zt.serialize(e)))},sendIQ(e,t){let o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];t=t||io.STANZA_TIMEOUT;let n;return n=o?new Promise((o,n)=>io.connection.sendIQ(e,o,n,t)):new Promise(o=>io.connection.sendIQ(e,o,o,t)),io.api.trigger("send",e),n}},window.converse=window.converse||{},Object.assign(window.converse,{keycodes:{TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESCAPE:27,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,FORWARD_SLASH:47,AT:50,META:91,META_RIGHT:93},initialize(e,t){return io.initialize(e,t)},plugins:{add(e,t){if(t.__name__=e,void 0!==io.pluggable.plugins[e])throw new TypeError("Error: plugin with name \"".concat(e,"\" has already been ")+"registered!");else io.pluggable.plugins[e]=t}},env:{$build:eo,$iq:to,$msg:oo,$pres:no,Backbone,BrowserStorage:it,Promise,Strophe:Zt,_:lt.a,dayjs:ut.a,log:vt,sizzle:Wt.a,stanza_utils:Kt,u:Qt,utils:Qt}}),window.dispatchEvent(new CustomEvent("converse-loaded"));var mo=converse,go=o(41),ho=o.n(go);const{$msg:_o,Backbone:fo,Strophe:bo,sizzle:vo,utils:yo}=mo.env,xo=mo.env.utils;mo.plugins.add("converse-chat",{dependencies:["converse-chatboxes","converse-disco"],initialize(){function e(e,t){o.api.send(_o({to:e.getAttribute("from"),type:"error",id:e.getAttribute("id")}).c("error",{type:"cancel"}).c("not-allowed",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("text",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).t(t)),vt.warn("Rejecting message stanza with the following reason: ".concat(t)),vt.warn(e)}async function t(e){const t=bo.getBareJidFromJid(e.getAttribute("from"));if(!yo.isSameBareJID(t,o.bare_jid)){const n=await o.api.chatboxes.get(t);if(n){const t=await n.shouldShowErrorMessage(e);if(t){const t=await n.getMessageAttributesFromStanza(e,e);await n.messages.create(t)}}}}const{_converse:o}=this,{__:n}=o;o.api.settings.update({auto_join_private_chats:[],clear_messages_on_reconnection:!1,filter_by_resource:!1,allow_message_corrections:"all",send_chat_state_notifications:!0});const a=fo.Model.extend({initialize(){this.rosterContactAdded=xo.getResolveablePromise()},async setRosterContact(e){const t=await o.api.contacts.get(e);t&&(this.contact=t,this.set("nickname",t.get("nickname")),this.rosterContactAdded.resolve())}});o.Message=a.extend({defaults(){return{msgid:xo.getUniqueId(),time:new Date().toISOString(),is_ephemeral:!1}},async initialize(){this.initialized=xo.getResolveablePromise(),"chat"===this.get("type")&&(a.prototype.initialize.apply(this,arguments),this.setRosterContact(bo.getBareJidFromJid(this.get("from")))),this.get("file")&&this.on("change:put",this.uploadFile,this),this.setTimerForEphemeralMessage(),await o.api.trigger("messageInitialized",this,{Synchronous:!0}),this.initialized.resolve()},setTimerForEphemeralMessage(){const e=()=>{this.ephemeral_timer=window.setTimeout(this.safeDestroy.bind(this),1e4)};return this.isEphemeral()?(e(),!0):(this.on("change:is_ephemeral",()=>this.isEphemeral()?e():clearTimeout(this.ephemeral_timer)),!1)},safeDestroy(){try{this.destroy()}catch(t){vt.error(t)}},isOnlyChatStateNotification(){return xo.isOnlyChatStateNotification(this)},isEphemeral(){return this.get("is_ephemeral")||xo.isOnlyChatStateNotification(this)},getDisplayName(){return"groupchat"===this.get("type")?this.get("nick"):this.contact?this.contact.getDisplayName():this.vcard?this.vcard.getDisplayName():this.get("from")},getMessageText(){return this.get("is_encrypted")?this.get("plaintext")||("debug"===o.loglevel?n("Unencryptable OMEMO message"):null):this.get("message")},isMeCommand(){const e=this.getMessageText();return!!e&&e.startsWith("/me ")},sendSlotRequestStanza(){if(!this.file)return Promise.reject(new Error("file is undefined"));const e=mo.env.$iq({from:o.jid,to:this.get("slot_request_url"),type:"get"}).c("request",{xmlns:bo.NS.HTTPUPLOAD,filename:this.file.name,size:this.file.size,"content-type":this.file.type});return o.api.sendIQ(e)},async getRequestSlotURL(){let e;try{e=await this.sendSlotRequestStanza()}catch(t){return vt.error(t),this.save({type:"error",message:n("Sorry, could not determine upload URL."),is_ephemeral:!0})}const t=e.querySelector("slot");return t?void this.save({get:t.querySelector("get").getAttribute("url"),put:t.querySelector("put").getAttribute("url")}):this.save({type:"error",message:n("Sorry, could not determine file upload URL."),is_ephemeral:!0})},uploadFile(){const e=new XMLHttpRequest;e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&(vt.info("Status: "+e.status),200===e.status||201===e.status?this.save({upload:o.SUCCESS,oob_url:this.get("get"),message:this.get("get")}):e.onerror())},e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.set("progress",e.loaded/e.total)},!1),e.onerror=()=>{let t;t=e.responseText?n("Sorry, could not succesfully upload your file. Your server\u2019s response: \"%1$s\"",e.responseText):n("Sorry, could not succesfully upload your file."),this.save({type:"error",upload:o.FAILURE,message:t,is_ephemeral:!0})},e.open("PUT",this.get("put"),!0),e.setRequestHeader("Content-type",this.file.type),e.send(this.file)}}),o.Messages=o.Collection.extend({model:o.Message,comparator:"time"}),o.ChatBox=a.extend({messagesCollection:o.Messages,defaults(){return{bookmarked:!1,chat_state:void 0,hidden:["mobile","fullscreen"].includes(o.view_mode),message_type:"chat",nickname:void 0,num_unread:0,time_sent:new Date(0).toISOString(),time_opened:this.get("time_opened")||new Date().getTime(),type:o.PRIVATE_CHAT_TYPE,url:""}},async initialize(){this.initialized=xo.getResolveablePromise(),a.prototype.initialize.apply(this,arguments);const e=this.get("jid");e&&(this.set({box_id:"box-".concat(btoa(e))}),this.get("type")===o.PRIVATE_CHAT_TYPE&&(this.presence=o.presences.findWhere({jid:e})||o.presences.create({jid:e}),await this.setRosterContact(e)),this.on("change:chat_state",this.sendChatState,this),this.initMessages(),await this.fetchMessages(),await o.api.trigger("chatBoxInitialized",this,{Synchronous:!0}),this.initialized.resolve())},getMessagesCacheKey(){return"converse.messages-".concat(this.get("jid"),"-").concat(o.bare_jid)},initMessages(){this.messages=new this.messagesCollection,this.messages.chatbox=this,this.messages.browserStorage=o.createStore(this.getMessagesCacheKey()),this.listenTo(this.messages,"change:upload",e=>{e.get("upload")===o.SUCCESS&&o.api.send(this.createMessageStanza(e))})},afterMessagesFetched(){o.api.trigger("afterMessagesFetched",this)},fetchMessages(){if(this.messages.fetched)return void vt.info("Not re-fetching messages for ".concat(this.get("jid")));this.messages.fetched=xo.getResolveablePromise();const e=this.messages.fetched.resolve;return this.messages.fetch({add:!0,success:()=>{this.afterMessagesFetched(),e()},error:()=>{this.afterMessagesFetched(),e()}}),this.messages.fetched},async onMessage(e,t,o){const n=await this.getDuplicateMessage(e);if(n)this.updateMessage(n,t);else if(!this.handleReceipt(e,o,t)&&!this.handleChatMarker(e,o)){const o=await this.getMessageAttributesFromStanza(e,t);if(this.handleRetraction(o))return;if(this.setEditable(o,o.time,e),o.chat_state||o.retracted||!xo.isEmptyMessage(o)){const e=this.handleCorrection(o)||this.messages.create(o);this.incrementUnreadMsgCounter(e)}}},async clearMessages(){try{await this.messages.clearSession()}catch(t){this.messages.trigger("reset"),vt.error(t)}finally{delete this.messages.fetched}},async close(){try{await new Promise((e,t)=>this.destroy({success:e,error:(o,n)=>t(n)}))}catch(t){vt.error(t)}finally{o.clear_messages_on_reconnection&&(await this.clearMessages())}},announceReconnection(){o.api.trigger("chatReconnected",this)},async onReconnection(){o.clear_messages_on_reconnection&&(await this.clearMessages()),this.announceReconnection()},validate(e){if(!e.jid)return"Ignored ChatBox without JID";const t=o.auto_join_rooms.map(e=>Object(ke.isObject)(e)?e.jid:e),n=o.auto_join_private_chats.concat(t);if(o.singleton&&!n.includes(e.jid)&&!o.auto_join_on_invite){const t="".concat(e.jid," is not allowed because singleton is true and it's not being auto_joined");return vt.warn(t),t}},getDisplayName(){return this.contact?this.contact.getDisplayName():this.vcard?this.vcard.getDisplayName():this.get("jid")},createMessageFromError(e){if(e instanceof o.TimeoutError){const t=this.messages.create({type:"error",message:e.message,retry:!0});t.error=e}},getOldestMessage(){for(let e=0;e<this.messages.length;e++){const t=this.messages.at(e);if(t.get("type")===this.get("message_type"))return t}},getMostRecentMessage(){for(let e=this.messages.length-1;0<=e;e--){const t=this.messages.at(e);if(t.get("type")===this.get("message_type"))return t}},getUpdatedMessageAttributes(e,t){return{is_archived:Kt.isArchived(t)}},updateMessage(e,t){const o=this.getUpdatedMessageAttributes(e,t);o&&e.save(o)},setChatState(e,t){return void 0!==this.chat_state_timeout&&(window.clearTimeout(this.chat_state_timeout),delete this.chat_state_timeout),e===o.COMPOSING?this.chat_state_timeout=window.setTimeout(this.setChatState.bind(this),o.TIMEOUTS.PAUSED,o.PAUSED):e===o.PAUSED&&(this.chat_state_timeout=window.setTimeout(this.setChatState.bind(this),o.TIMEOUTS.INACTIVE,o.INACTIVE)),this.set("chat_state",e,t),this},shouldShowErrorMessage(e){const t=e.getAttribute("id");if(t){const o=this.messages.where({msgid:t}),n=o.filter(e=>"error"!==e.get("type"));if(!n.length&&null===e.querySelector("body"))return;const a=o.filter(e=>"error"===e.get("type"));if(a.length)return}return!0},isSameUser(e,t){return xo.isSameBareJID(e,t)},findDanglingRetraction(e){if(!e.origin_id||!this.messages.length)return null;if(this.messages.last().get("time")>e.time){const t=Array.from(this.messages.models);return t.reverse(),t.find(t=>{let{attributes:o}=t;return o.retracted_id===e.origin_id&&o.from===e.from&&!o.moderated_by})}},handleRetraction(e){const t=["retracted","retracted_id","editable"];if(e.retracted){if(e.is_tombstone)return!1;const o=this.messages.findWhere({origin_id:e.retracted_id,from:e.from});return o?(o.save(Object(ke.pick)(e,t)),!0):(e.dangling_retraction=!0,this.messages.create(e),!0)}else{const o=this.findDanglingRetraction(e);if(o){const n=Object(ke.pick)(o.attributes,t),a=Object.assign({dangling_retraction:!1},e,n);return delete a.id,o.save(a),!0}}return!1},handleCorrection(e){if(e.replaced_id&&e.from){const t=this.messages.findWhere({msgid:e.replaced_id,from:e.from});if(t){const o=t.get("older_versions")||{};return e.time<t.get("time")&&t.get("edited")?(o[e.time]=e.message,t.save({older_versions:o})):(o[t.get("time")]=t.get("message"),e=Object.assign(e,{older_versions:o}),delete e.id,t.save(e)),t}}},async getDuplicateMessage(e){return this.findDuplicateFromOriginID(e)||(await this.findDuplicateFromStanzaID(e))||this.findDuplicateFromMessage(e)},findDuplicateFromOriginID(e){const t=vo("origin-id[xmlns=\"".concat(bo.NS.SID,"\"]"),e).pop();return t?this.messages.findWhere({origin_id:t.getAttribute("id"),from:e.getAttribute("from")}):null},async findDuplicateFromStanzaID(e){const t=vo("stanza-id[xmlns=\"".concat(bo.NS.SID,"\"]"),e).pop();if(!t)return!1;const n=t.getAttribute("by");if(!(await o.api.disco.supports(bo.NS.SID,n)))return!1;const a={};return a["stanza_id ".concat(n)]=t.getAttribute("id"),this.messages.findWhere(a)},findDuplicateFromMessage(e){const t=Kt.getMessageBody(e)||void 0;if(!t)return!1;const o=e.getAttribute("id");return!!o&&this.messages.findWhere({message:t,from:e.getAttribute("from"),msgid:o})},sendRetractionMessage(e){const t=e.get("origin_id");if(!t)throw new Error("Can't retract message without a XEP-0359 Origin ID");const n=_o({id:xo.getUniqueId(),to:this.get("jid"),type:"chat"}).c("store",{xmlns:bo.NS.HINTS}).up().c("apply-to",{id:t,xmlns:bo.NS.FASTEN}).c("retract",{xmlns:bo.NS.RETRACT});return o.connection.send(n)},sendMarker(e,t,n,a){const s=_o({from:o.connection.jid,id:xo.getUniqueId(),to:e,type:a?a:"chat"}).c(n,{xmlns:bo.NS.MARKERS,id:t});o.api.send(s)},handleChatMarker(e,t){const n=bo.getBareJidFromJid(e.getAttribute("to")),a=bo.getBareJidFromJid(t);if(n!==o.bare_jid)return!1;const s=vo("[xmlns=\"".concat(bo.NS.MARKERS,"\"]"),e);if(0===s.length)return!1;if(1<s.length)return vt.error("handleChatMarker: Ignoring incoming stanza with multiple message markers"),vt.error(e),!1;else{const t=s.pop();if("markable"===t.nodeName)return!this.contact||xo.isMAMMessage(e)||xo.isCarbonMessage(e)||this.sendMarker(a,e.getAttribute("id"),"received",e.getAttribute("type")),!1;else{const e=t&&t.getAttribute("id"),o=e&&this.messages.findWhere({msgid:e}),n="marker_".concat(t.nodeName);return o&&!o.get(n)&&o.save({field_name:new Date().toISOString()}),!0}}},sendReceiptStanza(e,t){const n=_o({from:o.connection.jid,id:xo.getUniqueId(),to:e,type:"chat"}).c("received",{xmlns:bo.NS.RECEIPTS,id:t}).up().c("store",{xmlns:bo.NS.HINTS}).up();o.api.send(n)},handleReceipt(e,t,n){const a=bo.getBareJidFromJid(t)===o.bare_jid,s=vo("request[xmlns=\"".concat(bo.NS.RECEIPTS,"\"]"),e).pop()!==void 0;!s||a||xo.isCarbonMessage(e)||xo.isMAMMessage(n)||this.sendReceiptStanza(t,e.getAttribute("id"));const i=bo.getBareJidFromJid(e.getAttribute("to"));if(i===o.bare_jid){const t=vo("received[xmlns=\"".concat(bo.NS.RECEIPTS,"\"]"),e).pop();if(t){const e=t&&t.getAttribute("id"),o=e&&this.messages.findWhere({msgid:e});return o&&!o.get("received")&&o.save({received:new Date().toISOString()}),!0}}return!1},createMessageStanza(e){const t=_o({from:o.connection.jid,to:this.get("jid"),type:this.get("message_type"),id:e.get("edited")&&xo.getUniqueId()||e.get("msgid")}).c("body").t(e.get("message")).up().c(o.ACTIVE,{xmlns:bo.NS.CHATSTATES}).root();return"chat"===e.get("type")&&t.c("request",{xmlns:bo.NS.RECEIPTS}).root(),e.get("is_spoiler")&&(e.get("spoiler_hint")?t.c("spoiler",{xmlns:bo.NS.SPOILER},e.get("spoiler_hint")).root():t.c("spoiler",{xmlns:bo.NS.SPOILER}).root()),(e.get("references")||[]).forEach(e=>{const o={xmlns:bo.NS.REFERENCE,begin:e.begin,end:e.end,type:e.type};e.uri&&(o.uri=e.uri),t.c("reference",o).root()}),e.get("oob_url")&&t.c("x",{xmlns:bo.NS.OUTOFBAND}).c("url").t(e.get("oob_url")).root(),e.get("edited")&&t.c("replace",{xmlns:bo.NS.MESSAGE_CORRECT,id:e.get("msgid")}).root(),e.get("origin_id")&&t.c("origin-id",{xmlns:bo.NS.SID,id:e.get("origin_id")}).root(),t},getOutgoingMessageAttributes(e,t){const n=this.get("composing_spoiler"),a=xo.getUniqueId();return{id:a,jid:this.get("jid"),nickname:this.get("nickname"),msgid:a,origin_id:a,fullname:o.xmppstatus.get("fullname"),from:o.bare_jid,is_only_emojis:!!e&&xo.isOnlyEmojis(e),sender:"me",time:new Date().toISOString(),message:e?xo.httpToGeoUri(xo.shortnameToUnicode(e),o):void 0,is_spoiler:n,spoiler_hint:n?t:void 0,type:this.get("message_type")}},setEditable(e,t,n){if(!(n&&xo.isHeadlineMessage(o,n))&&!(xo.isEmptyMessage(e)||"me"!==e.sender))if("all"===o.allow_message_corrections)e.editable=!(e.file||e.retracted||"oob_url"in e);else if("last"===o.allow_message_corrections&&t>this.get("time_sent")){this.set({time_sent:t});const o=this.messages.findWhere({editable:!0});o&&o.save({editable:!1}),e.editable=!(e.file||e.retracted||"oob_url"in e)}},sendMessage(e,t){const n=this.getOutgoingMessageAttributes(e,t);let a=this.messages.findWhere("correcting");if(a){const e=a.get("older_versions")||{};e[a.get("time")]=a.get("message"),a.save({correcting:!1,edited:new Date().toISOString(),message:n.message,older_versions:e,references:n.references,is_only_emojis:n.is_only_emojis,origin_id:xo.getUniqueId(),received:void 0})}else this.setEditable(n,new Date().toISOString()),a=this.messages.create(n);return o.api.send(this.createMessageStanza(a)),a},sendChatState(){if(o.send_chat_state_notifications&&this.get("chat_state")){const e=o.send_chat_state_notifications;if(Array.isArray(e)&&!e.includes(this.get("chat_state")))return;o.api.send(_o({id:xo.getUniqueId(),to:this.get("jid"),type:"chat"}).c(this.get("chat_state"),{xmlns:bo.NS.CHATSTATES}).up().c("no-store",{xmlns:bo.NS.HINTS}).up().c("no-permanent-store",{xmlns:bo.NS.HINTS}))}},async sendFiles(e){const t=await o.api.disco.features.get(bo.NS.HTTPUPLOAD,o.domain),a=t.pop();if(!a)return void this.messages.create({message:n("Sorry, looks like file upload is not supported by your server."),type:"error",is_ephemeral:!0});const s=a.dataforms.where({FORM_TYPE:{value:bo.NS.HTTPUPLOAD,type:"hidden"}}).pop(),i=window.parseInt(Object(ke.get)(s,"attributes.max-file-size.value")),r=Object(ke.get)(a,"id");return r?void Array.from(e).forEach(e=>{if(!window.isNaN(i)&&window.parseInt(e.size)>i)return this.messages.create({message:n("The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.",e.name,ho()(i)),type:"error",is_ephemeral:!0});else{const t=Object.assign(this.getOutgoingMessageAttributes(),{file:!0,progress:0,slot_request_url:r});this.setEditable(t,new Date().toISOString());const o=this.messages.create(t,{silent:!0});o.file=e,this.messages.trigger("add",o),o.getRequestSlotURL()}}):void this.messages.create({message:n("Sorry, looks like file upload is not supported by your server."),type:"error",is_ephemeral:!0})},getMessageAttributesFromStanza(e,t){return Kt.getMessageAttributesFromStanza(e,t,this,o)},maybeShow(){return this.trigger("show")},isHidden(){return this.get("hidden")||this.get("minimized")||this.isScrolledUp()||"hidden"===o.windowState},incrementUnreadMsgCounter(e){if(e&&e.get("message")&&yo.isNewMessage(e)&&this.isHidden()){let t=this.get("first_unread");if(0==this.get("num_unread")){if(t){const e=this.messages.where({msgid:t});0<e.length&&e[0].set("first_unread",!1)}e.set("first_unread",!0),t=e.get("msgid")}this.save({first_unread:t,num_unread:this.get("num_unread")+1});const n=bo.getBareJidFromJid(e.get("from"));this.sendMarker(n,e.get("msgid"),"displayed"),o.incrementMsgCounter()}},clearUnreadMsgCounter(){if(0<this.get("num_unread")){const e=this.messages.last();if(e){const t=bo.getBareJidFromJid(e.get("from"));this.sendMarker(t,e.get("msgid"),"acknowledged")}}xo.safeSave(this,{num_unread:0})},isScrolledUp(){return this.get("scrolled",!0)}}),o.handleMessageStanza=async function(t){const n=t;let a=t.getAttribute("to");const s=bo.getResourceFromJid(a);if(o.filter_by_resource&&s&&s!==o.resource)return vt.info("onMessage: Ignoring incoming message intended for a different resource: ".concat(a));if(yo.isHeadlineMessage(o,t))return vt.info("onMessage: Ignoring incoming headline message from JID: ".concat(t.getAttribute("from")));const i=vo("message > forwarded[xmlns=\"".concat(bo.NS.FORWARD,"\"]"),t).length;if(i)return e(t,"Forwarded messages not part of an encapsulating protocol are not supported");let r=t.getAttribute("from")||o.bare_jid;if(xo.isCarbonMessage(t))if(r===o.bare_jid){const e="[xmlns=\"".concat(bo.NS.CARBONS,"\"] > forwarded[xmlns=\"").concat(bo.NS.FORWARD,"\"] > message");t=vo(e,t).pop(),a=t.getAttribute("to"),r=t.getAttribute("from")}else return e(t,"Rejecting carbon from invalid JID");if(xo.isMAMMessage(t))if(r===o.bare_jid){const e="[xmlns=\"".concat(bo.NS.MAM,"\"] > forwarded[xmlns=\"").concat(bo.NS.FORWARD,"\"] > message");t=vo(e,t).pop(),a=t.getAttribute("to"),r=t.getAttribute("from")}else return vt.warn("onMessage: Ignoring alleged MAM message from ".concat(t.getAttribute("from")));const l=bo.getBareJidFromJid(r),d=l===o.bare_jid;if(d&&null===a)return vt.error("Don't know how to handle message stanza without 'to' attribute. ".concat(t.outerHTML));const c=d?bo.getBareJidFromJid(a):l,p=await o.api.contacts.get(c);if(void 0===p&&!o.allow_non_roster_messaging)return vt.error("Blocking messaging with a JID not in our roster because allow_non_roster_messaging is false."),vt.error(t);const u=0<vo("body, encrypted[xmlns=\"".concat(bo.NS.OMEMO,"\"]"),t).length,m=Object(ke.get)(p,"attributes.nickname"),g=await o.api.chats.get(c,{nickname:m},u);g&&(await g.onMessage(t,n,r)),o.api.trigger("message",{stanza:n,chatbox:g})},o.router.route("converse/chat?jid=:jid",function(e){return yo.isValidJID(e)?void o.api.chats.open(e):vt.warn("Invalid JID \"".concat(e,"\" provided in URL fragment"))}),o.api.listen.on("chatBoxesFetched",function(){o.auto_join_private_chats.forEach(e=>{o.chatboxes.where({jid:e}).length||(Object(ke.isString)(e)?o.api.chats.open(e):vt.error("Invalid jid criteria specified for \"auto_join_private_chats\""))}),o.api.trigger("privateChatsAutoJoined")}),o.api.listen.on("presencesInitialized",function(){o.connection.addHandler(e=>vo("message > result[xmlns=\"".concat(bo.NS.MAM,"\"]"),e).pop()?(vt.warn("Received a MAM message with type \"chat\"."),!0):(o.handleMessageStanza(e),!0),null,"message","chat"),o.connection.addHandler(e=>null!==e.getAttribute("type")||(o.handleMessageStanza(e),!0),bo.NS.RECEIPTS,"message"),o.connection.addHandler(e=>(t(e),!0),null,"message","error")}),o.api.listen.on("clearSession",()=>{o.shouldClearCache()&&o.chatboxes.filter(e=>e.messages&&e.messages.clearSession({silent:!0}))}),Object.assign(o.api,{chats:{async create(e,t){if(Object(ke.isString)(e)){if(t&&!Object(ke.get)(t,"fullname")){const n=await o.api.contacts.get(e);t.fullname=Object(ke.get)(n,"attributes.fullname")}const n=o.api.chats.get(e,t,!0);return n?n:void vt.error("Could not open chatbox for JID: "+e)}return Array.isArray(e)?Promise.all(e.forEach(async n=>{const a=await o.api.contacts.get(e);return t.fullname=Object(ke.get)(a,"attributes.fullname"),o.api.chats.get(n,t,!0).maybeShow()})):(vt.error("chats.create: You need to provide at least one JID"),null)},async open(e,t,n){if(Object(ke.isString)(e)){const a=await o.api.chats.get(e,t,!0);return a?a.maybeShow(n):a}if(Array.isArray(e))return Promise.all(e.map(e=>o.api.chats.get(e,t,!0).then(e=>e&&e.maybeShow(n))).filter(e=>e));throw vt.error("chats.open: You need to provide at least one JID"),new Error("chats.open: You need to provide at least one JID")},async get(e){async function t(e){let t=await o.api.chatboxes.get(e);return!t&&a?t=await o.api.chatboxes.create(e,n,o.ChatBox):(t=t&&t.get("type")===o.PRIVATE_CHAT_TYPE?t:null,t&&Object.keys(n).length&&t.save(n)),t}let n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},a=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2];if(e===void 0){const e=await o.api.chatboxes.get();return e.filter(e=>e.get("type")===o.PRIVATE_CHAT_TYPE)}return Object(ke.isString)(e)?t(e):Promise.all(e.map(e=>t(e)))}}})}});const{Backbone:So,Strophe:wo,$iq:ko,utils:Eo}=mo.env;mo.plugins.add("converse-disco",{initialize(){function e(){return s.api.disco.own.identities.add("client","web","Converse"),s.api.disco.own.features.add(wo.NS.CHATSTATES),s.api.disco.own.features.add(wo.NS.DISCO_INFO),s.api.disco.own.features.add(wo.NS.ROSTERX),s.message_carbons&&s.api.disco.own.features.add(wo.NS.CARBONS),s.api.trigger("addClientFeatures"),this}function t(){if(!s.stream_features){const e=wo.getBareJidFromJid(s.jid),t="converse.stream-features-".concat(e);s.api.promises.add("streamFeaturesAdded"),s.stream_features=new s.Collection,s.stream_features.browserStorage=s.createStore(t,"session")}}function o(){s.api.trigger("streamFeaturesAdded")}function n(e){const t=e.getElementsByTagName("query")[0].getAttribute("node"),o={xmlns:wo.NS.DISCO_INFO};t&&(o.node=t);const n=ko({type:"result",id:e.getAttribute("id")}),a=e.getAttribute("from");return null!==a&&n.attrs({to:a}),n.c("query",o),r._identities.forEach(e=>{const t={category:e.category,type:e.type};e.name&&(t.name=e.name),e.lang&&(t["xml:lang"]=e.lang),n.c("identity",t).up()}),r._features.forEach(e=>n.c("feature",{var:e}).up()),s.api.send(n.tree()),!0}async function a(){e(),s.connection.addHandler(n,wo.NS.DISCO_INFO,"iq","get",null,null),s.disco_entities=new s.DiscoEntities;const t="converse.disco-entities-".concat(s.bare_jid);s.disco_entities.browserStorage=s.createStore(t,"session");const o=await s.disco_entities.fetchEntities();0!==o.length&&o.get(s.domain)||s.disco_entities.create({jid:s.domain}),s.api.trigger("discoInitialized")}const{_converse:s}=this;s.api.promises.add("discoInitialized"),s.api.promises.add("streamFeaturesAdded"),s.DiscoEntity=So.Model.extend({idAttribute:"jid",initialize(e,t){this.waitUntilFeaturesDiscovered=Eo.getResolveablePromise(),this.dataforms=new s.Collection;let o="converse.dataforms-".concat(this.get("jid"));this.dataforms.browserStorage=s.createStore(o,"session"),this.features=new s.Collection,o="converse.features-".concat(this.get("jid")),this.features.browserStorage=s.createStore(o,"session"),this.listenTo(this.features,"add",this.onFeatureAdded),this.fields=new s.Collection,o="converse.fields-".concat(this.get("jid")),this.fields.browserStorage=s.createStore(o,"session"),this.listenTo(this.fields,"add",this.onFieldAdded),this.identities=new s.Collection,o="converse.identities-".concat(this.get("jid")),this.identities.browserStorage=s.createStore(o,"session"),this.fetchFeatures(t),this.items=new s.DiscoEntities,o="converse.disco-items-".concat(this.get("jid")),this.items.browserStorage=s.createStore(o,"session"),this.items.fetch()},async getIdentity(e,t){return await this.waitUntilFeaturesDiscovered,this.identities.findWhere({category:e,type:t})},async hasFeature(e){if(await this.waitUntilFeaturesDiscovered,this.features.findWhere({var:e}))return this},onFeatureAdded(e){e.entity=this,s.api.trigger("serviceDiscovered",e)},onFieldAdded(e){e.entity=this,s.api.trigger("discoExtensionFieldDiscovered",e)},async fetchFeatures(e){if(e.ignore_cache)this.queryInfo();else{const e=this.features.browserStorage.name,t=await this.features.browserStorage.store.getItem(e);t&&0===t.length||null===t?this.queryInfo():(this.features.fetch({add:!0,success:()=>{this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),this.identities.fetch({add:!0}))}},async queryInfo(){let e;try{e=await s.api.disco.info(this.get("jid"),null)}catch(e){return vt.error(e),void this.waitUntilFeaturesDiscovered.resolve(this)}this.onInfo(e)},onDiscoItems(e){Wt()("query[xmlns=\"".concat(wo.NS.DISCO_ITEMS,"\"] item"),e).forEach(e=>{if(!e.getAttribute("node")){const t=e.getAttribute("jid");if(void 0===this.items.get(t)){const e=s.disco_entities.get(t);e?this.items.add(e):this.items.create({jid:t})}}})},async queryForItems(){if(!Object(ke.isEmpty)(this.identities.where({category:"server"}))){const e=await s.api.disco.items(this.get("jid"));this.onDiscoItems(e)}},onInfo(e){Array.from(e.querySelectorAll("identity")).forEach(e=>{this.identities.create({category:e.getAttribute("category"),type:e.getAttribute("type"),name:e.getAttribute("name")})}),Wt()("x[type=\"result\"][xmlns=\"".concat(wo.NS.XFORM,"\"]"),e).forEach(e=>{const t={};Wt()("field",e).forEach(e=>{t[e.getAttribute("var")]={value:Object(ke.get)(e.querySelector("value"),"textContent"),type:e.getAttribute("type")}}),this.dataforms.create(t)}),e.querySelector("feature[var=\"".concat(wo.NS.DISCO_ITEMS,"\"]"))&&this.queryForItems(),Array.from(e.querySelectorAll("feature")).forEach(t=>{this.features.create({var:t.getAttribute("var"),from:e.getAttribute("from")})}),Wt()("x[type=\"result\"][xmlns=\"jabber:x:data\"] field",e).forEach(t=>{this.fields.create({var:t.getAttribute("var"),value:Object(ke.get)(t.querySelector("value"),"textContent"),from:e.getAttribute("from")})}),this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),s.DiscoEntities=s.Collection.extend({model:s.DiscoEntity,fetchEntities(){return new Promise((e,t)=>{this.fetch({add:!0,success:e,error(o,n){vt.error(n),t(new Error("Could not fetch disco entities"))}})})}});const r=this;r._identities=[],r._features=[],s.api.listen.on("userSessionInitialized",async()=>{t(),s.connfeedback.get("connection_status")===wo.Status.ATTACHED&&(await new Promise((e,t)=>s.stream_features.fetch({success:e,error:t})),o())}),s.api.listen.on("beforeResourceBinding",function(){t(),Array.from(s.connection.features.childNodes).forEach(e=>{s.stream_features.create({name:e.nodeName,xmlns:e.getAttribute("xmlns")})}),o()}),s.api.listen.on("reconnected",a),s.api.listen.on("connected",a),s.api.listen.on("beforeTearDown",async()=>{s.api.promises.add("streamFeaturesAdded"),s.stream_features&&(await s.stream_features.clearSession(),delete s.stream_features)}),s.api.listen.on("clearSession",()=>{s.shouldClearCache()&&s.disco_entities&&(Array.from(s.disco_entities.models).forEach(t=>t.features.clearSession()),Array.from(s.disco_entities.models).forEach(t=>t.identities.clearSession()),Array.from(s.disco_entities.models).forEach(t=>t.dataforms.clearSession()),Array.from(s.disco_entities.models).forEach(t=>t.fields.clearSession()),s.disco_entities.clearSession(),delete s.disco_entities)}),Object.assign(s.api,{disco:{stream:{async getFeature(e,t){if(await s.api.waitUntil("streamFeaturesAdded"),!e||!t)throw new Error("name and xmlns need to be provided when calling disco.stream.getFeature");if(void 0===s.stream_features&&!s.api.connection.connected()){const o="Tried to get feature ".concat(e," ").concat(t," but _converse.stream_features has been torn down");return void vt.warn(o)}return s.stream_features.findWhere({name:e,xmlns:t})}},own:{identities:{add(e,t,o,n){for(var a=0;a<r._identities.length;a++)if(r._identities[a].category==e&&r._identities[a].type==t&&r._identities[a].name==o&&r._identities[a].lang==n)return!1;r._identities.push({category:e,type:t,name:o,lang:n})},clear(){r._identities=[]},get(){return r._identities}},features:{add(e){for(var t=0;t<r._features.length;t++)if(r._features[t]==e)return!1;r._features.push(e)},clear(){r._features=[]},get(){return r._features}}},info(e,t){const o={xmlns:wo.NS.DISCO_INFO};t&&(o.node=t);const n=ko({from:s.connection.jid,to:e,type:"get"}).c("query",o);return s.api.sendIQ(n)},items(e,t){const o={xmlns:wo.NS.DISCO_ITEMS};return t&&(o.node=t),s.api.sendIQ(ko({from:s.connection.jid,to:e,type:"get"}).c("query",o))},entities:{async get(e){let t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(await s.api.waitUntil("discoInitialized"),!e)return s.disco_entities;if(void 0===s.disco_entities&&!s.api.connection.connected()){const t="Tried to look up entity ".concat(e," but _converse.disco_entities has been torn down");return void vt.warn(t)}const o=s.disco_entities.get(e);return o||!t?o:s.api.disco.entities.create(e)},create(e,t){return s.disco_entities.create({jid:e},t)}},features:{async get(e,t){if(!t)throw new TypeError("You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let o=await s.api.disco.entities.get(t,!0);if(void 0===s.disco_entities&&!s.api.connection.connected()){const o="Tried to get feature ".concat(e," for ").concat(t," but _converse.disco_entities has been torn down");return void vt.warn(o)}o=await o.waitUntilFeaturesDiscovered;const n=[...o.items.map(t=>t.hasFeature(e)),o.hasFeature(e)],a=await Promise.all(n);return a.filter(ke.isObject)}},async supports(e,t){const o=await s.api.disco.features.get(e,t);return 0<o.length},async refreshFeatures(e){if(!e)throw new TypeError("api.disco.refreshFeatures: You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let t=await s.api.disco.entities.get(e);return t?(t.features.reset(),t.fields.reset(),t.identities.reset(),!t.waitUntilFeaturesDiscovered.isPending&&(t.waitUntilFeaturesDiscovered=Eo.getResolveablePromise()),t.queryInfo()):t=await s.api.disco.entities.create(e,{ignore_cache:!0}),t.waitUntilFeaturesDiscovered},async getFeatures(e){if(!e)throw new TypeError("api.disco.getFeatures: You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let t=await s.api.disco.entities.get(e,!0);return t=await t.waitUntilFeaturesDiscovered,t.features},async getFields(e){if(!e)throw new TypeError("api.disco.getFields: You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let t=await s.api.disco.entities.get(e,!0);return t=await t.waitUntilFeaturesDiscovered,t.fields},async getIdentity(t,o,n){const a=await s.api.disco.entities.get(n,!0);if(void 0===a&&!s.api.connection.connected()){const e="Tried to look up category ".concat(t," for ").concat(n," but _converse.disco_entities has been torn down");return void vt.warn(e)}return a.getIdentity(t,o)}}})}});var Co=function(){function e(e,t){return document.createTextNode(t?e.replace(m,""):e)}function t(e){return e.replace(f,r)}function o(e,t){return"".concat(t.base,t.size,"/",e,t.ext)}function n(e,t){for(var o=e.childNodes,a=o.length,s,i;a--;)s=o[a],i=s.nodeType,3===i?t.push(s):1===i&&!("ownerSVGElement"in s)&&!b.test(s.nodeName.toLowerCase())&&n(s,t);return t}function a(e){return p(0>e.indexOf("\u200D")?e.replace(m,""):e)}function s(t,o){for(var s=n(t,[]),r=s.length,l,d,c,p,u,m,g,_,f,b,v,y,x;r--;){for(c=!1,p=document.createDocumentFragment(),u=s[r],m=u.nodeValue,_=0;g=h.exec(m);){if(f=g.index,f!==_&&p.appendChild(e(m.slice(_,f),!0)),v=g[0],y=a(v),_=f+v.length,x=o.callback(y,o),y&&x){for(d in b=new Image,b.onerror=o.onerror,b.setAttribute("draggable","false"),l=o.attributes(v,y),l)l.hasOwnProperty(d)&&0!==d.indexOf("on")&&!b.hasAttribute(d)&&b.setAttribute(d,l[d]);b.className=o.className,b.alt=v,b.src=x,c=!0,p.appendChild(b)}b||p.appendChild(e(v,!1)),b=null}c&&(_<m.length&&p.appendChild(e(m.slice(_),!0)),u.parentNode.replaceChild(p,u))}return t}function i(e,o){return c(e,function(e){var n=e,s=a(e),i=o.callback(s,o),r,l;if(s&&i){for(l in n="<img ".concat("class=\"",o.className,"\" ","draggable=\"false\" ","alt=\"",e,"\""," src=\"",i,"\""),r=o.attributes(e,s),r)r.hasOwnProperty(l)&&0!==l.indexOf("on")&&-1===n.indexOf(" "+l+"=")&&(n=n.concat(" ",l,"=\"",t(r[l]),"\""));n=n.concat("/>")}return n})}function r(e){return g[e]}function l(){return null}function d(e){return"number"==typeof e?e+"x"+e:e}function c(e,t){return(e+"").replace(h,t)}function p(e,t){for(var o=[],n=0,a=0,s=0;s<e.length;)n=e.charCodeAt(s++),a?(o.push((65536+(a-55296<<10)+(n-56320)).toString(16)),a=0):55296<=n&&56319>=n?a=n:o.push(n.toString(16));return o.join(t||"-")}var u={base:"https://twemoji.maxcdn.com/v/12.1.4/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(e){var t="string"==typeof e?parseInt(e,16):e;return 65536>t?v(t):(t-=65536,v(55296+(t>>10),56320+(1023&t)))},toCodePoint:p},onerror:function(){this.parentNode&&this.parentNode.replaceChild(e(this.alt,!1),this)},parse:function(e,t){return t&&"function"!=typeof t||(t={callback:t}),("string"==typeof e?i:s)(e,{callback:t.callback||o,attributes:"function"==typeof t.attributes?t.attributes:l,base:"string"==typeof t.base?t.base:u.base,ext:t.ext||u.ext,size:t.folder||d(t.size||u.size),className:t.className||u.className,onerror:t.onerror||u.onerror})},replace:c,test:function(e){h.lastIndex=0;var t=h.test(e);return h.lastIndex=0,t}},g={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},h=/(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69])(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5\udeeb\udeec\udef4-\udefa\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd71\udd73-\udd76\udd7a-\udda2\udda5-\uddaa\uddae-\uddb4\uddb7\uddba\uddbc-\uddca\uddd0\uddde-\uddff\ude70-\ude73\ude78-\ude7a\ude80-\ude82\ude90-\ude95]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,m=/\uFE0F/g,_=String.fromCharCode(8205),f=/[&<>'"]/g,b=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,v=String.fromCharCode;return u}(),Ao=Co;const{Backbone:To}=mo.env,jo=mo.env.utils,No={"*\\0/*":"1f646","*\\O/*":"1f646","-___-":"1f611",":'-)":"1f602","':-)":"1f605","':-D":"1f605",">:-)":"1f606","':-(":"1f613",">:-(":"1f620",":'-(":"1f622","O:-)":"1f607","0:-3":"1f607","0:-)":"1f607","0;^)":"1f607","O;-)":"1f607","0;-)":"1f607","O:-3":"1f607","-__-":"1f611",":-Þ":"1f61b","</3":"1f494",":')":"1f602",":-D":"1f603","':)":"1f605","'=)":"1f605","':D":"1f605","'=D":"1f605",">:)":"1f606",">;)":"1f606",">=)":"1f606",";-)":"1f609","*-)":"1f609",";-]":"1f609",";^)":"1f609","':(":"1f613","'=(":"1f613",":-*":"1f618",":^*":"1f618",">:P":"1f61c","X-P":"1f61c",">:[":"1f61e",":-(":"1f61e",":-[":"1f61e",">:(":"1f620",":'(":"1f622",";-(":"1f622",">.<":"1f623","#-)":"1f635","%-)":"1f635","X-)":"1f635","\\0/":"1f646","\\O/":"1f646","0:3":"1f607","0:)":"1f607","O:)":"1f607","O=)":"1f607","O:3":"1f607","B-)":"1f60e","8-)":"1f60e","B-D":"1f60e","8-D":"1f60e","-_-":"1f611",">:\\":"1f615",">:/":"1f615",":-/":"1f615",":-.":"1f615",":-P":"1f61b",":Þ":"1f61b",":-b":"1f61b",":-O":"1f62e",O_O:"1f62e",">:O":"1f62e",":-X":"1f636",":-#":"1f636",":-)":"1f642","(y)":"1f44d","<3":"2764",":D":"1f603","=D":"1f603",";)":"1f609","*)":"1f609",";]":"1f609",";D":"1f609",":*":"1f618","=*":"1f618",":(":"1f61e",":[":"1f61e","=(":"1f61e",":@":"1f620",";(":"1f622","D:":"1f628",":$":"1f633","=$":"1f633","#)":"1f635","%)":"1f635","X)":"1f635","B)":"1f60e","8)":"1f60e",":/":"1f615",":\\":"1f615","=/":"1f615","=\\":"1f615",":L":"1f615","=L":"1f615",":P":"1f61b","=P":"1f61b",":b":"1f61b",":O":"1f62e",":X":"1f636",":#":"1f636","=X":"1f636","=#":"1f636",":)":"1f642","=]":"1f642","=)":"1f642",":]":"1f642"},Mo=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)"+"(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:'\\-\\)|'\\:\\-\\)|'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-\xDE|\\:\\-\xDE|\\<\\/3|<\\/3|\\:'\\)|\\:\\-D|'\\:\\)|'\\=\\)|'\\:D|'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|'\\:\\(|'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:\xDE|\\:\xDE|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])"+"(?=\\s|$|[!,.?]))","gi");mo.plugins.add("converse-emoji",{async initialize(){const{_converse:e}=this,{___:t}=e;e.api.settings.update({emoji_image_path:Ao.base,emoji_categories:{smileys:":grinning:",people:":thumbsup:",activity:":soccer:",travel:":motorcycle:",objects:":bomb:",nature:":rainbow:",food:":hotdog:",symbols:":musical_note:",flags:":flag_ac:",custom:null},emoji_category_labels:{smileys:t("Smileys and emotions"),people:t("People"),activity:t("Activities"),travel:t("Travel"),objects:t("Objects"),nature:t("Animals and nature"),food:t("Food and drink"),symbols:t("Symbols"),flags:t("Flags"),custom:t("Stickers")}}),e.api.promises.add("emojisInitialized",!1),Ao.base=e.emoji_image_path,e.EmojiPicker=To.Model.extend({defaults:{current_category:"smileys",current_skintone:"",scroll_position:0}}),e.emojis={};const n={};Object.assign(jo,{addEmoji(e){return jo.getEmojiRenderer()(e)},getEmojiRenderer(){const t={attributes:e=>{const t=Ao.convert.toCodePoint(e);return{title:"".concat(jo.getEmojisByAtrribute("cp")[t].sn," ").concat(e)}}},o=jo.shortnamesToEmojis;return e.use_system_emojis?o:e=>Ao.parse(o(e),t)},shortnamesToEmojis(t){let o=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];return t=t.replace(e.emojis.shortnames_regex,t=>{if("undefined"==typeof t||""===t||!e.emoji_shortnames.includes(t))return t;const n=e.emojis_map[t].cp;return n?oe(n.toUpperCase()):o?t:"<img class=\"emoji\" draggable=\"false\" alt=\"".concat(t,"\" src=\"").concat(e.emojis_map[t].url,"\"/>")}),t=t.replace(Mo,(e,t,o,n)=>{if("undefined"==typeof n||""===n||!(jo.unescapeHTML(n)in No))return e;n=jo.unescapeHTML(n);const a=No[n].toUpperCase();return o+oe(a)}),t},shortnameToUnicode(e){return this.shortnamesToEmojis(e,!0)},isOnlyEmojis(e){const t=e.trim().split(/\s+/);if(0===t.length||3<t.length)return!1;const o=t.filter(e=>{const t=Ao.parse(jo.shortnameToUnicode(e)),o=t.match(/<img class="emoji" draggable="false" alt=".*?" src=".*?\.png"\/>/);return!o||1!==o.length});return 0===o.length},getEmojisByAtrribute(t){if(n[t])return n[t];if("category"===t)return e.emojis.json;const o=e.emojis_list.map(o=>o[t]).filter((e,t,o)=>o.indexOf(e)==t);return n[t]={},o.forEach(o=>n[t][o]=lt.a.find(e.emojis_list,e=>e[t]===o)),n[t]}});const{default:a}=await o.e(129).then(o.t.bind(null,496,3));e.emojis.json=a,e.emojis.categories=Object.keys(e.emojis.json),e.emojis_map=e.emojis.categories.reduce((t,o)=>Object.assign(t,e.emojis.json[o]),{}),e.emojis_list=Object.values(e.emojis_map),e.emojis_list.sort((e,t)=>e.sn<t.sn?-1:e.sn>t.sn?1:0),e.emoji_shortnames=e.emojis_list.map(e=>e.sn);e.emojis.shortnames_regex=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+(()=>e.emoji_shortnames.map(e=>e.replace(/[+]/g,"\\$&")).join("|"))()+")","gi"),e.emojis.toned=function(){return e.toned_emojis||(e.toned_emojis=lt.a.uniq(Object.values(e.emojis.json.people).filter(e=>e.sn.includes("_tone")).map(e=>e.sn.replace(/_tone[1-5]/,"")))),e.toned_emojis}(),e.api.trigger("emojisInitialized"),e.api.listen.on("clearSession",()=>{e.emojipicker&&(e.emojipicker.destroy(),delete e.emojipicker)})}});const{Strophe:Io,sizzle:Oo}=mo.env;var Ro={computeAffiliationsDelta(e,t,o,n){const a=o.map(e=>e.jid),s=n.map(e=>e.jid);let i=Object(ke.difference)(a,s).map(e=>o[Object(ke.indexOf)(a,e)]);return e||(i=i.concat(o.filter(e=>{const t=Object(ke.indexOf)(s,e.jid);return!!(0<=t)&&e.affiliation!==n[t].affiliation}))),t&&(i=i.concat(Object(ke.difference)(s,a).map(e=>({jid:e,affiliation:"none"})))),i},parseMemberListIQ(e){return Oo("query[xmlns=\"".concat(Io.NS.MUC_ADMIN,"\"] item"),e).map(e=>{const t={affiliation:e.getAttribute("affiliation")},o=e.getAttribute("jid");Qt.isValidJID(o)?t.jid=o:t.nick=o;const n=e.getAttribute("nick");n&&(t.nick=n);const a=e.getAttribute("role");return a&&(t.role=n),t})}},Do=o(120),Lo=o.n(Do);Qt.webForm2xForm=function(e){let t;return t="checkbox"===e.getAttribute("type")?e.checked&&1||0:"TEXTAREA"==e.tagName?lt.a.filter(e.value.split("\n"),lt.a.trim):"SELECT"==e.tagName?Qt.getSelectValues(e):e.value,Qt.stringToNode(Lo()({name:e.getAttribute("name"),value:t}))};var Po=Qt;const qo={moderator:1,participant:2,visitor:3,none:2},{Strophe:Bo,Backbone:zo,$iq:Fo,$build:Ho,$msg:Uo,$pres:Vo,sizzle:Wo}=mo.env;Bo.addNamespace("MUC_ADMIN",Bo.NS.MUC+"#admin"),Bo.addNamespace("MUC_OWNER",Bo.NS.MUC+"#owner"),Bo.addNamespace("MUC_REGISTER","jabber:iq:register"),Bo.addNamespace("MUC_ROOMCONF",Bo.NS.MUC+"#roomconfig"),Bo.addNamespace("MUC_USER",Bo.NS.MUC+"#user"),mo.MUC_NICK_CHANGED_CODE="303",mo.ROOM_FEATURES=["passwordprotected","unsecured","hidden","publicroom","membersonly","open","persistent","temporary","nonanonymous","semianonymous","moderated","unmoderated","mam_enabled"],mo.ROOMSTATUS={CONNECTED:0,CONNECTING:1,NICKNAME_REQUIRED:2,PASSWORD_REQUIRED:3,DISCONNECTED:4,ENTERED:5,DESTROYED:6},mo.plugins.add("converse-muc",{dependencies:["converse-chatboxes","converse-chat","converse-disco","converse-controlbox"],overrides:{ChatBoxes:{model(e,t){const{_converse:o}=this.__super__;return e&&e.type==o.CHATROOMS_TYPE?new o.ChatRoom(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){async function e(e,t){t.type=o.CHATROOMS_TYPE,t.id=e;const n=await o.api.rooms.get(e,t,!0);return n.maybeShow(!0),n}function t(){return o.chatboxes.filter(e=>e.get("type")===o.CHATROOMS_TYPE).forEach(e=>e.session.save({connection_status:mo.ROOMSTATUS.DISCONNECTED}))}const{_converse:o}=this,{__:n,___:a}=o;if(o.api.settings.update({allow_muc:!0,allow_muc_invitations:!0,auto_join_on_invite:!1,auto_join_rooms:[],auto_register_muc_nickname:!1,locked_muc_domain:!1,muc_domain:void 0,muc_fetch_members:!0,muc_history_max_stanzas:void 0,muc_instant_rooms:!0,muc_nickname_from_jid:!1,muc_show_logs_before_join:!1}),o.api.promises.add(["roomsAutoJoined"]),o.locked_muc_domain&&!Object(ke.isString)(o.muc_domain))throw new Error("Config Error: it makes no sense to set locked_muc_domain to true when muc_domain is not set");o.muc={info_messages:{100:n("This groupchat is not anonymous"),102:n("This groupchat now shows unavailable members"),103:n("This groupchat does not show unavailable members"),104:n("The groupchat configuration has changed"),170:n("Groupchat logging is now enabled"),171:n("Groupchat logging is now disabled"),172:n("This groupchat is now no longer anonymous"),173:n("This groupchat is now semi-anonymous"),174:n("This groupchat is now fully-anonymous"),201:n("A new groupchat has been created")},new_nickname_messages:{210:a("Your nickname has been automatically set to %1$s"),303:a("Your nickname has been changed to %1$s")},disconnect_messages:{301:n("You have been banned from this groupchat"),307:n("You have been kicked from this groupchat"),321:n("You have been removed from this groupchat because of an affiliation change"),322:n("You have been removed from this groupchat because the groupchat has changed to members-only and you're not a member"),332:n("You have been removed from this groupchat because the service hosting it is being shut down")},action_info_messages:{301:a("%1$s has been banned"),303:a("%1$s's nickname has changed"),307:a("%1$s has been kicked out"),321:a("%1$s has been removed because of an affiliation change"),322:a("%1$s has been removed for not being a member")}},o.router.route("converse/room?jid=:jid",async function(e){return Po.isValidMUCJID(e)?void(await o.api.waitUntil("roomsAutoJoined"),o.allow_bookmarks&&(await o.api.waitUntil("bookmarksInitialized")),o.api.rooms.open(e)):vt.warn("invalid jid \"".concat(e,"\" provided in url fragment"))}),o.getDefaultMUCNickname=function(){if(!o.xmppstatus)throw new Error("Can't call _converse.getDefaultMUCNickname before the statusInitialized has been fired.");const e=o.xmppstatus.getNickname();return e?e:o.muc_nickname_from_jid?Bo.unescapeNode(Bo.getNodeFromJid(o.bare_jid)):void 0},o.ChatRoomMessage=o.Message.extend({initialize(){this.get("file")&&this.on("change:put",this.uploadFile,this),this.setTimerForEphemeralMessage()||this.setOccupant(),o.api.trigger("chatRoomMessageInitialized",this)},onOccupantRemoved(){this.stopListening(this.occupant),delete this.occupant;const e=Object(ke.get)(this,"collection.chatbox");return e?void this.listenTo(e.occupants,"add",this.onOccupantAdded):vt.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())))},onOccupantAdded(e){if(e.get("nick")===Bo.getResourceFromJid(this.get("from"))){this.occupant=e,this.listenTo(this.occupant,"destroy",this.onOccupantRemoved);const t=Object(ke.get)(this,"collection.chatbox");if(!t)return vt.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));this.stopListening(t.occupants,"add",this.onOccupantAdded)}},setOccupant(){if("groupchat"===this.get("type")){const e=Object(ke.get)(this,"collection.chatbox");if(!e)return vt.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));const t=Bo.getResourceFromJid(this.get("from"));this.occupant=e.occupants.findWhere({nick:t}),this.occupant?this.listenTo(this.occupant,"destroy",this.onOccupantRemoved):this.listenTo(e.occupants,"add",this.onOccupantAdded)}}});const s=zo.Model.extend({defaults(){return{connection_status:mo.ROOMSTATUS.DISCONNECTED}}});if(o.ChatRoomMessages=o.Collection.extend({model:o.ChatRoomMessage,comparator:"time"}),o.ChatRoom=o.ChatBox.extend({messagesCollection:o.ChatRoomMessages,defaults(){return{num_unread_general:0,bookmarked:!1,chat_state:void 0,description:"",hidden:["mobile","fullscreen"].includes(o.view_mode),message_type:"groupchat",name:"",num_unread:0,roomconfig:{},time_sent:new Date(0).toISOString(),time_opened:this.get("time_opened")||new Date().getTime(),type:o.CHATROOMS_TYPE}},async initialize(){this.initialized=Po.getResolveablePromise(),this.set("box_id","box-".concat(btoa(this.get("jid")))),this.initMessages(),this.initOccupants(),this.initFeatures(),this.registerHandlers(),this.on("change:chat_state",this.sendChatState,this),await this.restoreSession(),this.session.on("change:connection_status",this.onConnectionStatusChanged,this);const e=await this.restoreFromCache();e||this.join(),await o.api.trigger("chatRoomInitialized",this,{Synchronous:!0}),this.initialized.resolve()},async restoreFromCache(){return this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&(await this.isJoined())?(await new Promise(e=>this.features.fetch({success:e,error:e})),await this.fetchOccupants(),await this.fetchMessages(),!0):(await this.clearCache(),!1)},async join(e,t){if(this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED)return this;if(await this.refreshRoomFeatures(),e=await this.getAndPersistNickname(e),!e)return Po.safeSave(this.session,{connection_status:mo.ROOMSTATUS.NICKNAME_REQUIRED}),o.muc_show_logs_before_join&&(await this.fetchMessages()),this;const n=Vo({from:o.connection.jid,to:this.getRoomJIDAndNick()}).c("x",{xmlns:Bo.NS.MUC}).c("history",{maxstanzas:this.features.get("mam_enabled")?0:o.muc_history_max_stanzas}).up();return t&&n.cnode(Bo.xmlElement("password",[],t)),this.session.save("connection_status",mo.ROOMSTATUS.CONNECTING),o.api.send(n),this},async clearCache(){this.session.save("connection_status",mo.ROOMSTATUS.DISCONNECTED),this.occupants.length?this.occupants.filter(e=>!e.isMember()).forEach(e=>e.destroy()):this.occupants.clearSession(),o.clear_messages_on_reconnection&&(await this.clearMessages())},rejoin(){return this.clearCache(),this.join()},async onConnectionStatusChanged(){this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&(o.muc_fetch_members&&(await this.occupants.fetchMembers()),await this.fetchMessages(),o.api.trigger("enteredNewRoom",this),o.auto_register_muc_nickname&&(await o.api.disco.supports(Bo.NS.MUC_REGISTER,this.get("jid")))&&this.registerNickname())},async onReconnection(){this.registerHandlers(),await this.rejoin(),this.announceReconnection()},restoreSession(){const e="muc.session-".concat(o.bare_jid,"-").concat(this.get("jid"));return this.session=new s({id:e}),this.session.browserStorage=o.createStore(e,"session"),new Promise(e=>this.session.fetch({success:e,error:e}))},initFeatures(){const e="converse.muc-features-".concat(o.bare_jid,"-").concat(this.get("jid"));this.features=new zo.Model(Object.assign({id:e},Object(ke.zipObject)(mo.ROOM_FEATURES,mo.ROOM_FEATURES.map(()=>!1)))),this.features.browserStorage=o.createStore(e,"session")},initOccupants(){this.occupants=new o.ChatRoomOccupants;const e="converse.occupants-".concat(o.bare_jid).concat(this.get("jid"));this.occupants.browserStorage=o.createStore(e,"session"),this.occupants.chatroom=this},fetchOccupants(){return this.occupants.fetched=new Promise(e=>{this.occupants.fetch({add:!0,silent:!0,success:e,error:e})}),this.occupants.fetched},handleAffiliationChangedMessage(e){const t=Wo("x[xmlns=\"".concat(Bo.NS.MUC_USER,"\"] item"),e).pop();if(t){const o=e.getAttribute("from"),n=e.getAttribute("type"),a=t.getAttribute("affiliation"),s=t.getAttribute("jid"),i={from:o,type:n,affiliation:a,nick:Bo.getNodeFromJid(s),states:[],show:"unavailable"==n?"offline":"online",role:t.getAttribute("role"),jid:Bo.getBareJidFromJid(s),resource:Bo.getResourceFromJid(s)},r=this.occupants.findOccupant({jid:i.jid});r?r.save(i):this.occupants.create(i)}},registerHandlers(){const e=this.get("jid");this.removeHandlers(),this.presence_handler=o.connection.addHandler(e=>this.onPresence(e)||!0,null,"presence",null,null,e,{ignoreNamespaceFragment:!0,matchBareFromJid:!0}),this.message_handler=o.connection.addHandler(e=>Wo("message > result[xmlns=\"".concat(Bo.NS.MAM,"\"]"),e).pop()?(vt.warn("received a mam message with type \"chat\"."),!0):(this.onMessage(e),!0),null,"message","groupchat",null,e,{matchBareFromJid:!0}),this.affiliation_message_handler=o.connection.addHandler(e=>this.handleAffiliationChangedMessage(e)||!0,Bo.NS.MUC_USER,"message",null,null,e)},removeHandlers(){return this.message_handler&&(o.connection&&o.connection.deleteHandler(this.message_handler),delete this.message_handler),this.presence_handler&&(o.connection&&o.connection.deleteHandler(this.presence_handler),delete this.presence_handler),this.affiliation_message_handler&&(o.connection&&o.connection.deleteHandler(this.affiliation_message_handler),delete this.affiliation_message_handler),this},getDisplayName(){const e=this.get("name");return e?e:"hidden"===o.locked_muc_domain?Bo.getNodeFromJid(this.get("jid")):this.get("jid")},sendTimedMessage(e){"function"==typeof e.tree&&(e=e.tree());let t=e.getAttribute("id");t||(t=this.getUniqueId("sendIQ"),e.setAttribute("id",t));const n=Po.getResolveablePromise(),a=o.connection.addTimedHandler(o.STANZA_TIMEOUT,()=>(o.connection.deleteHandler(s),n.reject(new o.TimeoutError("Timeout Error: No response from server")),!1)),s=o.connection.addHandler(e=>{a&&o.connection.deleteTimedHandler(a),"groupchat"===e.getAttribute("type")?n.resolve(e):n.reject(e)},null,"message",["error","groupchat"],t);return o.api.send(e),n},sendRetractionMessage(e){const t=e.get("origin_id");if(!t)throw new Error("Can't retract message without a XEP-0359 Origin ID");const o=Uo({id:Po.getUniqueId(),to:this.get("jid"),type:"groupchat"}).c("store",{xmlns:Bo.NS.HINTS}).up().c("apply-to",{id:t,xmlns:Bo.NS.FASTEN}).c("retract",{xmlns:Bo.NS.RETRACT});return this.sendTimedMessage(o)},sendRetractionIQ(e,t){const n=Fo({to:this.get("jid"),type:"set"}).c("apply-to",{id:e.get("stanza_id ".concat(this.get("jid"))),xmlns:Bo.NS.FASTEN}).c("moderate",{xmlns:Bo.NS.MODERATE}).c("retract",{xmlns:Bo.NS.RETRACT}).up().c("reason").t(t);return o.api.sendIQ(n,null,!1)},sendDestroyIQ(e,t){const n=Ho("destroy");t&&n.attrs({jid:t});const a=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_OWNER}).cnode(n.node);return e&&0<e.length&&a.c("reason",e),o.api.sendIQ(a)},async leave(e){if(this.features.destroy(),this.occupants.clearSession(),o.disco_entities){const e=o.disco_entities.get(this.get("jid"));e&&(await new Promise((t,o)=>e.destroy({success:t,error:o})))}o.api.connection.connected()&&this.sendUnavailablePresence(e),Po.safeSave(this.session,{connection_status:mo.ROOMSTATUS.DISCONNECTED}),this.removeHandlers()},async close(){return await new Promise(t=>this.session.destroy({success:t,error:(o,n)=>{vt.error(n),t()}})),await new Promise(t=>this.features.destroy({success:t,error:(o,n)=>{vt.error(n),t()}})),o.ChatBox.prototype.close.call(this)},canRetractMessages(){const e=this.getOwnOccupant();return e&&e.isModerator()&&o.api.disco.supports(Bo.NS.MODERATE,this.get("jid"))},sendUnavailablePresence(e){const t=Vo({type:"unavailable",from:o.connection.jid,to:this.getRoomJIDAndNick()});null!==e&&t.c("status",e),o.connection.sendPresence(t)},getReferenceForMention(e,t){const o=Po.getLongestSubstring(e,this.occupants.map(e=>e.getDisplayName()));if(!o)return null;if((e[o.length]||"").match(/[A-Za-zäëïöüâêîôûáéíóúàèìòùÄËÏÖÜÂÊÎÔÛÁÉÍÓÚÀÈÌÒÙ0-9]/i))return null;const n=this.occupants.findOccupant({nick:o})||this.occupants.findOccupant({jid:o});if(!n)return null;const a={begin:t,end:t+o.length,value:o,type:"mention"};return a.uri=n.get("jid")?encodeURI("xmpp:".concat(n.get("jid"))):encodeURI("xmpp:".concat(this.get("jid"),"/").concat(n.get("nick"))),a},extractReference(e,t){for(let o=t;o<e.length;o++)if("@"===e[o]&&(0===o||" "===e[o-1])){const t=e.slice(o+1),n=this.getReferenceForMention(t,o);if(n)return[e.slice(0,o)+t,n,o]}},parseTextForReferences(e){const t=[];for(let o=0;o<(e||"").length;){const n=this.extractReference(e,o);if(n)e=n[0],t.push(n[1]),o=n[2];else break}return[e,t]},getOutgoingMessageAttributes(e,t){const n=this.get("composing_spoiler");var a;[e,a]=this.parseTextForReferences(e);const s=Po.getUniqueId();return{id:s,msgid:s,origin_id:s,from:"".concat(this.get("jid"),"/").concat(this.get("nick")),fullname:this.get("nick"),is_only_emojis:!!e&&Po.isOnlyEmojis(e),is_spoiler:n,message:e?Po.httpToGeoUri(Po.shortnameToUnicode(e),o):void 0,nick:this.get("nick"),references:a,sender:"me",spoiler_hint:n?t:void 0,type:"groupchat"}},getRoomJIDAndNick(){const e=this.get("nick"),t=Bo.getBareJidFromJid(this.get("jid"));return t+(null===e?"":"/".concat(e))},sendChatState(){if(o.send_chat_state_notifications&&this.get("chat_state")&&this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&(!this.features.get("moderated")||"visitor"!==this.getOwnRole())){const e=o.send_chat_state_notifications;if(!Array.isArray(e)||e.includes(this.get("chat_state"))){const e=this.get("chat_state");e===o.GONE||o.api.send(Uo({to:this.get("jid"),type:"groupchat"}).c(e,{xmlns:Bo.NS.CHATSTATES}).up().c("no-store",{xmlns:Bo.NS.HINTS}).up().c("no-permanent-store",{xmlns:Bo.NS.HINTS}))}}},directInvite(e,t){this.features.get("membersonly")&&this.updateMemberLists([{jid:e,affiliation:"member",reason:t}]);const n={xmlns:"jabber:x:conference",jid:this.get("jid")};null!==t&&(n.reason=t),this.get("password")&&(n.password=this.get("password"));const a=Uo({from:o.connection.jid,to:e,id:Po.getUniqueId()}).c("x",n);o.api.send(a),o.api.trigger("roomInviteSent",{room:this,recipient:e,reason:t})},async refreshRoomFeatures(){return await o.api.disco.refreshFeatures(this.get("jid")),this.getRoomFeatures()},async getRoomFeatures(){let e;try{e=await o.api.disco.getIdentity("conference","text",this.get("jid"))}catch(t){return vt.error(t)}const t=await o.api.disco.getFields(this.get("jid"));this.save({name:e&&e.get("name"),description:Object(ke.get)(t.findWhere({var:"muc#roominfo_description"}),"attributes.value")});const n=await o.api.disco.getFeatures(this.get("jid")),a=Object.assign(Object(ke.zipObject)(mo.ROOM_FEATURES,mo.ROOM_FEATURES.map(()=>!1)),{fetched:new Date().toISOString()});n.each(e=>{const t=e.get("var");return t.startsWith("muc_")?void(a[t.replace("muc_","")]=!0):void(t===Bo.NS.MAM&&(a.mam_enabled=!0))}),a.description=Object(ke.get)(t.findWhere({var:"muc#roominfo_description"}),"attributes.value"),this.features.save(a)},setAffiliation(e,t){return t=t.filter(t=>void 0===t.affiliation||t.affiliation===e),Promise.all(t.map(t=>this.sendAffiliationIQ(e,t)))},saveConfiguration(e){const t=e?Wo(":input:not([type=button]):not([type=submit])",e):[],o=t.map(Po.webForm2xForm);return this.sendConfiguration(o)},addFieldValue(e){const t=e.getAttribute("type");if("fixed"===t)return e;const o=e.getAttribute("var").replace("muc#roomconfig_",""),n=this.get("roomconfig");if(o in n){let a;a="boolean"===t?[n[o]?1:0]:"list-multi"===t?n[o]:[n[o]],e.innerHTML=a.map(e=>Ho("value").t(e)).join("")}return e},async autoConfigureChatRoom(){const e=await this.fetchRoomConfiguration(),t=Wo("field",e),o=t.map(e=>this.addFieldValue(e));if(o.length)return this.sendConfiguration(o)},fetchRoomConfiguration(){return o.api.sendIQ(Fo({to:this.get("jid"),type:"get"}).c("query",{xmlns:Bo.NS.MUC_OWNER}))},sendConfiguration(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];const t=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_OWNER}).c("x",{xmlns:Bo.NS.XFORM,type:"submit"});return e.forEach(e=>t.cnode(e).up()),o.api.sendIQ(t)},getOwnRole(){return Object(ke.get)(this.getOwnOccupant(),"attributes.role")},getOwnAffiliation(){return Object(ke.get)(this.getOwnOccupant(),"attributes.affiliation")},getOwnOccupant(){return this.occupants.findWhere({jid:o.bare_jid})},sendAffiliationIQ(e,t){const n=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_ADMIN}).c("item",{affiliation:t.affiliation||e,nick:t.nick,jid:t.jid});return void 0!==t.reason&&n.c("reason",t.reason),o.api.sendIQ(n)},setAffiliations(e){const t=Object(ke.uniq)(e.map(e=>e.affiliation));return Promise.all(t.map(t=>this.setAffiliation(t,e)))},setRole(e,t,n,a,s){const i=Ho("item",{nick:e.get("nick"),role:t}),r=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_ADMIN}).cnode(i.node);return null!==n&&r.c("reason",n),o.api.sendIQ(r).then(a).catch(s)},getOccupant(e){return Po.isValidJID(e)&&this.occupants.findWhere({jid:e})||this.occupants.findWhere({nick:e})},async getAffiliationList(e){const t=Fo({to:this.get("jid"),type:"get"}).c("query",{xmlns:Bo.NS.MUC_ADMIN}).c("item",{affiliation:e}),n=await o.api.sendIQ(t,null,!1);if(null===n){const t="Error: timeout while fetching ".concat(e," list for MUC ").concat(this.get("jid")),o=new Error(t);return vt.warn(t),vt.warn(n),o}if(Po.isErrorStanza(n)){const t="Error: not allowed to fetch ".concat(e," list for MUC ").concat(this.get("jid")),o=new Error(t);return vt.warn(t),vt.warn(n),o}return Ro.parseMemberListIQ(n).filter(e=>e)},async updateMemberLists(e){const t=await Promise.all(["member","admin","owner"].map(e=>this.getAffiliationList(e))),n=t.reduce((e,t)=>Po.isErrorObject(t)?e:[...t,...e],[]);if(await this.setAffiliations(Ro.computeAffiliationsDelta(!0,!1,e,n)),o.muc_fetch_members)return this.occupants.fetchMembers()},async getAndPersistNickname(e){return e=e||this.get("nick")||(await this.getReservedNick())||o.getDefaultMUCNickname(),e&&this.save({nick:e},{silent:!0}),e},async getReservedNick(){const e=Fo({to:this.get("jid"),from:o.connection.jid,type:"get"}).c("query",{xmlns:Bo.NS.DISCO_INFO,node:"x-roomuser-item"}),t=await o.api.sendIQ(e,null,!1);if(Po.isErrorObject(t))throw t;const n=t.querySelector("query[node=\"x-roomuser-item\"] identity");return n?n.getAttribute("name"):null},async registerNickname(){const e=this.get("nick"),t=this.get("jid");let a,s;try{a=await o.api.sendIQ(Fo({to:t,from:o.connection.jid,type:"get"}).c("query",{xmlns:Bo.NS.MUC_REGISTER}))}catch(t){return Wo("not-allowed[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length?s=n("You're not allowed to register yourself in this groupchat."):Wo("registration-required[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length&&(s=n("You're not allowed to register in this groupchat because it's members-only.")),vt.error(t),s}const i=Wo("field required",a).map(e=>e.parentElement);if(1<i.length&&"muc#register_roomnick"!==i[0].getAttribute("var"))return vt.error("Can't register the user register in the groupchat ".concat(t," due to the required fields"));try{await o.api.sendIQ(Fo({to:t,from:o.connection.jid,type:"set"}).c("query",{xmlns:Bo.NS.MUC_REGISTER}).c("x",{xmlns:Bo.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#register").up().up().c("field",{var:"muc#register_roomnick"}).c("value").t(e))}catch(t){return Wo("service-unavailable[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length?s=n("Can't register your nickname in this groupchat, it doesn't support registration."):Wo("bad-request[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length&&(s=n("Can't register your nickname in this groupchat, invalid data form supplied.")),vt.error(s),vt.error(t),s}},updateOccupantsOnPresence(e){const t=this.parsePresence(e);if("error"===t.type||!t.jid&&!t.nick)return!0;const o=this.occupants.findOccupant(t);if("unavailable"===t.type&&o&&!t.states.includes(mo.MUC_NICK_CHANGED_CODE)&&!o.isMember())return o.set(t),void o.destroy();const n=t.jid||"",a=Object.assign(t,{jid:Bo.getBareJidFromJid(n)||Object(ke.get)(o,"attributes.jid"),resource:Bo.getResourceFromJid(n)||Object(ke.get)(o,"attributes.resource")});o?o.save(a):this.occupants.create(a)},parsePresence(e){const t=e.getAttribute("from"),o=e.getAttribute("type"),n={from:t,nick:Bo.getResourceFromJid(t),type:o,states:[],show:"unavailable"===o?"offline":"online"};return e.childNodes.forEach(e=>{switch(e.nodeName){case"status":n.status=e.textContent||null;break;case"show":n.show=e.textContent||"online";break;case"x":e.getAttribute("xmlns")===Bo.NS.MUC_USER?e.childNodes.forEach(e=>{switch(e.nodeName){case"item":n.affiliation=e.getAttribute("affiliation"),n.role=e.getAttribute("role"),n.jid=e.getAttribute("jid"),n.nick=e.getAttribute("nick")||n.nick;break;case"status":e.getAttribute("code")&&n.states.push(e.getAttribute("code"));}}):e.getAttribute("xmlns")===Bo.NS.VCARDUPDATE&&(n.image_hash=Object(ke.get)(e.querySelector("photo"),"textContent"));}}),n},fetchFeaturesIfConfigurationChanged(e){const t=["104","170","171","172","173","174"];Wo("status",e).filter(o=>t.includes(o.getAttribute("status"))).length&&this.refreshRoomFeatures()},isSameUser(e,t){const o=Bo.getBareJidFromJid(e),n=Bo.getBareJidFromJid(t),a=Bo.getResourceFromJid(e),s=Bo.getResourceFromJid(t);if(Po.isSameBareJID(e,t))return o!==this.get("jid")||a===s;else{const e=o===this.get("jid")?this.occupants.findOccupant({nick:a}):this.occupants.findOccupant({jid:o}),t=n===this.get("jid")?this.occupants.findOccupant({nick:s}):this.occupants.findOccupant({jid:n});return e===t}},subjectChangeHandled(e){return!(!e.subject||e.thread||e.message)&&(Po.safeSave(this,{subject:{author:e.nick,text:e.subject||""}}),!0)},setSubject(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";o.api.send(Uo({to:this.get("jid"),from:o.connection.jid,type:"groupchat"}).c("subject",{xmlns:"jabber:client"}).t(e).tree())},ignorableCSN(e){const t=Po.isOnlyChatStateNotification(e);return t&&(e.is_delayed||this.isOwnMessage(e))},isOwnMessage(e){let t;return t=Object(ke.isElement)(e)?e.getAttribute("from"):e instanceof o.Message?e.get("from"):e.from,Bo.getResourceFromJid(t)==this.get("nick")},getUpdatedMessageAttributes(e,t){const n=o.ChatBox.prototype.getUpdatedMessageAttributes.call(this,e,t);if(this.isOwnMessage(e)){const o=Wo("stanza-id[xmlns=\"".concat(Bo.NS.SID,"\"]"),t).pop(),a=o?o.getAttribute("by"):void 0;if(a){const e="stanza_id ".concat(a);n[e]=o.getAttribute("id")}e.get("received")||(n.received=new Date().toISOString())}return n},async isJoined(){const e=Fo({to:"".concat(this.get("jid"),"/").concat(this.get("nick")),type:"get"}).c("ping",{xmlns:Bo.NS.PING});try{await o.api.sendIQ(e)}catch(t){return null===t?vt.error("Timeout error while checking whether we're joined to MUC: ".concat(this.get("jid"))):(vt.error("Apparently we're no longer connected to MUC: ".concat(this.get("jid"))),vt.error(t)),!1}return!0},async rejoinIfNecessary(){if(!(await this.isJoined()))return this.rejoin(),!0},async shouldShowErrorMessage(e){return!(Wo("not-acceptable[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),e).length&&(await this.rejoinIfNecessary()))&&o.ChatBox.prototype.shouldShowErrorMessage.call(this,e)},findDanglingModeration(e){if(!this.messages.length)return null;if(this.messages.last().get("time")>e.time){const t=Array.from(this.messages.models),o=e["stanza_id ".concat(this.get("jid"))];return o?(t.reverse(),t.find(e=>{let{attributes:t}=e;return"retraction"===t.moderation&&t.moderated_id===o&&t.moderated_by})):null}},handleModeration(e){const t=["editable","moderated","moderated_by","moderated_id","moderation_reason"];if("retracted"===e.moderated){const o={},n="stanza_id ".concat(this.get("jid"));o[n]=e.moderated_id;const a=this.messages.findWhere(o);return a?(a.save(Object(ke.pick)(e,t)),!0):(e.dangling_moderation=!0,this.messages.create(e),!0)}else{const o=this.findDanglingModeration(e);if(o){const n=Object(ke.pick)(o.attributes,t),a=Object.assign({dangling_moderation:!1},e,n);return delete a.id,o.save(a),!0}}return!1},createMessageObject(e){return new Promise((t,o)=>{this.messages.create(e,{success:t,error:(t,n)=>o(n)})})},async onMessage(e){if(Wo("message > forwarded[xmlns=\"".concat(Bo.NS.FORWARD,"\"]"),e).length)return vt.warn("onMessage: Ignoring unencapsulated forwarded groupchat message");if(Po.isCarbonMessage(e))return vt.warn("onMessage: Ignoring XEP-0280 \"groupchat\" message carbon, according to the XEP groupchat messages SHOULD NOT be carbon copied");const t=e;if(Po.isMAMMessage(e))if(t.getAttribute("from")===this.get("jid")){const t="[xmlns=\"".concat(Bo.NS.MAM,"\"] > forwarded[xmlns=\"").concat(Bo.NS.FORWARD,"\"] > message");e=Wo(t,e).pop()}else return vt.warn("onMessage: Ignoring alleged MAM groupchat message from ".concat(e.getAttribute("from")));this.createInfoMessages(e),this.fetchFeaturesIfConfigurationChanged(e);const n=await this.getDuplicateMessage(t);if(n&&this.updateMessage(n,t),n||Kt.isReceipt(e)||Kt.isChatMarker(e))return o.api.trigger("message",{stanza:t});const a=await this.getMessageAttributesFromStanza(e,t);if(this.handleRetraction(a)||this.handleModeration(a)||this.subjectChangeHandled(a)||this.ignorableCSN(a))return o.api.trigger("message",{stanza:t});if(this.setEditable(a,a.time),a.nick&&(a.is_tombstone||Po.isNewMessage(a)||!Po.isEmptyMessage(a))){const e=this.handleCorrection(a)||(await this.createMessageObject(a));this.incrementUnreadMsgCounter(e)}o.api.trigger("message",{stanza:t,chatbox:this})},handleModifyError(e){const t=Object(ke.get)(e.querySelector("error text"),"textContent");if(t)if(this.session.get("connection_status")===mo.ROOMSTATUS.CONNECTING)this.setDisconnectionMessage(t);else{this.messages.create({type:"error",message:t,is_ephemeral:!0})}},handleDisconnection(e){const t=null!==e.querySelector("status[code='110']"),n=Wo("x[xmlns=\"".concat(Bo.NS.MUC_USER,"\"]"),e).pop();if(!n)return;const a=Wo("status",n).map(e=>e.getAttribute("code")),s=Object(ke.intersection)(a,Object.keys(o.muc.disconnect_messages)),i=t&&0<s.length;if(!i)return;const r=n.querySelector("item"),l=r?Object(ke.get)(r.querySelector("reason"),"textContent"):void 0,d=r?Object(ke.invoke)(r.querySelector("actor"),"getAttribute","nick"):void 0,c=o.muc.disconnect_messages[s[0]];this.setDisconnectionMessage(c,l,d)},createInfoMessages(e){const t=null!==e.querySelector("status[code='110']"),a=Wo("x[xmlns=\"".concat(Bo.NS.MUC_USER,"\"]"),e).pop();if(a){const s=Wo("status",a).map(e=>e.getAttribute("code"));s.forEach(s=>{let i;if("110"!==s&&("100"!==s||t)){if(s in o.muc.info_messages)i=o.muc.info_messages[s];else if(!t&&s in o.muc.action_info_messages){const t=Bo.getResourceFromJid(e.getAttribute("from"));i=n(o.muc.action_info_messages[s],t);const r=a.querySelector("item"),l=r?Object(ke.get)(r.querySelector("reason"),"textContent"):void 0,d=r?Object(ke.invoke)(r.querySelector("actor"),"getAttribute","nick"):void 0;d&&(i+="\n"+n("This action was done by %1$s.",d)),l&&(i+="\n"+n("The reason given is: \"%1$s\".",l))}else if(t&&s in o.muc.new_nickname_messages){let a;t&&"210"===s?a=Bo.getResourceFromJid(e.getAttribute("from")):t&&"303"==s&&(a=e.querySelector("x item").getAttribute("nick")),this.save("nick",a),i=n(o.muc.new_nickname_messages[s],a)}if(i){if("201"===s&&this.messages.findWhere({type:"info",message:i}))return;if(s in o.muc.info_messages&&this.messages.length&&this.messages.pop().get("message")===i)return;o.api.settings.get("muc_show_room_info")&&this.messages.create({type:"info",message:i})}}})}},setDisconnectionMessage(e,t,o){this.save({disconnection_message:e,disconnection_reason:t,disconnection_actor:o}),this.session.save({connection_status:mo.ROOMSTATUS.DISCONNECTED})},onNicknameClash(e){if(o.muc_nickname_from_jid){const t=e.getAttribute("from").split("/")[1];if(t===o.getDefaultMUCNickname())this.join(t+"-2");else{const e=t.lastIndexOf("-"),o=t.substring(e+1,t.length);this.join(t.substring(0,e+1)+(+o+1+""))}}else this.save({nickname_validation_message:n("The nickname you chose is reserved or currently in use, please choose a different one.")}),this.session.save({connection_status:mo.ROOMSTATUS.NICKNAME_REQUIRED})},onErrorPresence(e){const t=e.querySelector("error"),o=t.getAttribute("type"),a=Object(ke.get)(Wo("text[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).pop(),"textContent");if("modify"===o)this.handleModifyError(e);else if("auth"===o){if(Wo("not-authorized[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length&&(this.save({password_validation_message:a||n("Password incorrect")}),this.session.save({connection_status:mo.ROOMSTATUS.PASSWORD_REQUIRED})),t.querySelector("registration-required")){const e=n("You are not on the member list of this groupchat.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("forbidden")){const e=n("You have been banned from this groupchat.");this.setDisconnectionMessage(e,a)}}else if("cancel"===o)if(t.querySelector("not-allowed")){const e=n("You are not allowed to create new groupchats.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("not-acceptable")){const e=n("Your nickname doesn't conform to this groupchat's policies.");this.setDisconnectionMessage(e,a)}else if(Wo("gone[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length){const e=Object(ke.get)(Wo("gone[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).pop(),"textContent").replace(/^xmpp:/,"").replace(/\?join$/,"");this.save({moved_jid:e,destroyed_reason:a}),this.session.save({connection_status:mo.ROOMSTATUS.DESTROYED})}else if(t.querySelector("conflict"))this.onNicknameClash(e);else if(t.querySelector("item-not-found")){const e=n("This groupchat does not (yet) exist.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("service-unavailable")){const e=n("This groupchat has reached its maximum number of participants.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("remote-server-not-found")){const e=n("Remote server not found"),t=a?n("The explanation given is: \"%1$s\".",a):void 0;this.setDisconnectionMessage(e,t)}},onPresence(e){return"error"===e.getAttribute("type")?this.onErrorPresence(e):void(this.createInfoMessages(e),e.querySelector("status[code='110']")?(this.onOwnPresence(e),"none"!==this.getOwnRole()&&this.session.get("connection_status")===mo.ROOMSTATUS.CONNECTING&&this.session.save("connection_status",mo.ROOMSTATUS.CONNECTED)):this.updateOccupantsOnPresence(e))},onOwnPresence(e){if("unavailable"!==e.getAttribute("type")&&this.session.save("connection_status",mo.ROOMSTATUS.ENTERED),this.updateOccupantsOnPresence(e),"unavailable"===e.getAttribute("type"))this.handleDisconnection(e);else{const t=e.querySelector("status[code='201']");if(!t)this.features.get("fetched")||("owner"===this.getOwnAffiliation()&&this.get("auto_configure")?this.autoConfigureChatRoom().then(()=>this.refreshRoomFeatures()):this.getRoomFeatures());else if(this.get("auto_configure"))this.autoConfigureChatRoom().then(()=>this.refreshRoomFeatures());else if(o.muc_instant_rooms)this.saveConfiguration().then(()=>this.refreshRoomFeatures());else return void this.trigger("configurationNeeded")}this.session.save({connection_status:mo.ROOMSTATUS.ENTERED})},isUserMentioned(e){const t=this.get("nick");if(e.get("references").length){const o=e.get("references").filter(e=>"mention"===e.type).map(e=>e.value);return o.includes(t)}return new RegExp("\\b".concat(t,"\\b")).test(e.get("message"))},incrementUnreadMsgCounter(e){if(e){const t=e.get("message");if(t&&Po.isNewMessage(e)&&this.isHidden()){let t=this.get("first_unread");if(0==this.get("num_unread_general")){if(t){const e=this.messages.where({msgid:t});0<e.length&&e[0].set("first_unread",!1)}e.set("first_unread",!0),t=e.get("msgid")}const n={first_unread:t,num_unread_general:this.get("num_unread_general")+1};this.isUserMentioned(e)&&(n.num_unread=this.get("num_unread")+1,o.incrementMsgCounter()),this.save(n);const a=bo.getBareJidFromJid(e.get("from"));this.sendMarker(a,e.get("msgid"),"displayed","groupchat")}}},clearUnreadMsgCounter(){if(0<this.get("num_unread_general")){const e=this.messages.last();if(e){const t=bo.getBareJidFromJid(e.get("from"));this.sendMarker(t,e.get("msgid"),"acknowledged","groupchat")}}Po.safeSave(this,{num_unread:0,num_unread_general:0})}}),o.ChatRoomOccupant=zo.Model.extend({defaults:{show:"offline",states:[]},initialize(e){this.set(Object.assign({id:Po.getUniqueId()},e)),this.on("change:image_hash",this.onAvatarChanged,this)},onAvatarChanged(){const e=this.get("image_hash"),t=[];this.get("jid")&&t.push(o.vcards.findWhere({jid:this.get("jid")})),t.push(o.vcards.findWhere({jid:this.get("from")})),t.filter(e=>e).forEach(t=>{e&&t.get("image_hash")!==e&&o.api.vcard.update(t,!0)})},getDisplayName(){return this.get("nick")||this.get("jid")},isMember(){return["admin","owner","member"].includes(this.get("affiliation"))},isModerator(){return["admin","owner"].includes(this.get("affiliation"))||"moderator"===this.get("role")},isSelf(){return this.get("states").includes("110")}}),o.ChatRoomOccupants=o.Collection.extend({model:o.ChatRoomOccupant,comparator(e,t){const o=e.get("role")||"none",n=t.get("role")||"none";if(qo[o]===qo[n]){const o=e.getDisplayName().toLowerCase(),n=t.getDisplayName().toLowerCase();return o<n?-1:o>n?1:0}return qo[o]<qo[n]?-1:1},async fetchMembers(){const e=["member","admin","owner"],t=await Promise.all(e.map(e=>this.chatroom.getAffiliationList(e))),n=t.reduce((e,t)=>Po.isErrorObject(t)?e:[...t,...e],[]),a=e.filter(o=>!Po.isErrorObject(t[e.indexOf(o)])),s=n.map(e=>e.jid).filter(e=>void 0!==e),i=n.map(e=>!e.jid&&e.nick||void 0).filter(e=>void 0!==e),r=this.filter(e=>a.includes(e.get("affiliation"))&&!i.includes(e.get("nick"))&&!s.includes(e.get("jid")));r.forEach(e=>{e.get("jid")===o.bare_jid||("offline"===e.get("show")?e.destroy():e.save("affiliation",null))}),n.forEach(e=>{const t=e.jid?this.findOccupant({jid:e.jid}):this.findOccupant({nick:e.nick});t?t.save(e):this.create(e)}),o.api.trigger("membersFetched")},findOccupant(e){const t=Bo.getBareJidFromJid(e.jid);return null===t?this.findWhere({nick:e.nick}):this.findWhere({jid:t})}}),o.RoomsPanelModel=zo.Model.extend({defaults:function(){return{muc_domain:o.muc_domain,nick:o.getDefaultMUCNickname()}},setDomain(e){o.locked_muc_domain||this.save("muc_domain",Bo.getDomainFromJid(e))}}),o.onDirectMUCInvitation=async function(t){const a=Wo("x[xmlns=\"jabber:x:conference\"]",t).pop(),s=Bo.getBareJidFromJid(t.getAttribute("from")),i=a.getAttribute("jid"),r=a.getAttribute("reason");let l=o.roster.get(s),d;if(o.auto_join_on_invite?d=!0:(l=l?l.getDisplayName():Bo.getNodeFromJid(s),d=r?confirm(n("%1$s has invited you to join a groupchat: %2$s, and left the following reason: \"%3$s\"",l,i,r)):confirm(n("%1$s has invited you to join a groupchat: %2$s",l,i))),!0===d){const t=await e(i,{password:a.getAttribute("password")});t.session.get("connection_status")===mo.ROOMSTATUS.DISCONNECTED&&o.chatboxes.get(i).rejoin()}},o.allow_muc_invitations){const e=function(){o.connection.addHandler(e=>(o.onDirectMUCInvitation(e),!0),"jabber:x:conference","message")};o.api.listen.on("connected",e),o.api.listen.on("reconnected",e)}const i=function(e,t){return e.startsWith("xmpp:")&&e.endsWith("?join")&&(e=e.replace(/^xmpp:/,"").replace(/\?join$/,"")),o.api.rooms.get(e,t,!0)};o.api.listen.on("beforeTearDown",()=>{const e=o.chatboxes.where({type:o.CHATROOMS_TYPE});e.forEach(e=>Po.safeSave(e.session,{connection_status:mo.ROOMSTATUS.DISCONNECTED}))}),o.api.listen.on("windowStateChanged",async function(e){if("visible"===e.state&&o.api.connection.connected()){const e=await o.api.rooms.get();e.forEach(e=>e.rejoinIfNecessary())}}),o.api.listen.on("addClientFeatures",()=>{o.allow_muc&&o.api.disco.own.features.add(Bo.NS.MUC),o.allow_muc_invitations&&o.api.disco.own.features.add("jabber:x:conference")}),o.api.listen.on("chatBoxesFetched",function(){o.auto_join_rooms.forEach(e=>{if(Object(ke.isString)(e)){if(o.chatboxes.where({jid:e}).length)return;o.api.rooms.open(e)}else Object(ke.isObject)(e)?o.api.rooms.open(e.jid,Object(ke.clone)(e)):vt.error("Invalid groupchat criteria specified for \"auto_join_rooms\"")}),o.api.trigger("roomsAutoJoined")}),o.api.listen.on("disconnected",t),o.api.listen.on("statusInitialized",()=>{window.addEventListener(o.unloadevent,()=>{const e=o.api.connection.isType("websocket");!e||o.enable_smacks&&o.session.get("smacks_stream_id")||t()})}),mo.env.muc_utils=Ro,Object.assign(o.api,{rooms:{create(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(t=Object(ke.isString)(t)?{nick:t}:t||{},!t.nick&&o.muc_nickname_from_jid&&(t.nick=Bo.getNodeFromJid(o.bare_jid)),void 0===e)throw new TypeError("rooms.create: You need to provide at least one JID");else if(Object(ke.isString)(e))return i(e,t);return e.map(e=>i(e,t))},async open(e,t){let n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];if(await o.api.waitUntil("chatBoxesFetched"),void 0===e){throw vt.error("rooms.open: You need to provide at least one JID"),new TypeError("rooms.open: You need to provide at least one JID")}else if(Object(ke.isString)(e)){const a=await o.api.rooms.create(e,t);return a&&a.maybeShow(n),a}else{const a=await Promise.all(e.map(e=>o.api.rooms.create(e,t)));return a.forEach(e=>e.maybeShow(n)),a}},async get(e){async function t(e){let t=await o.api.chatboxes.get(e);return!t&&a?t=await o.api.chatboxes.create(e,n,o.ChatRoom):(t=t&&t.get("type")===o.CHATROOMS_TYPE?t:null,t&&Object.keys(n).length&&t.save(n)),t}let n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];if(void 0===e){const e=await o.api.chatboxes.get();return e.filter(e=>e.get("type")===o.CHATROOMS_TYPE)}return Object(ke.isString)(e)?t(e):Promise.all(e.map(e=>t(e)))}}})}});const{Backbone:Go,Strophe:Jo,$iq:$o,sizzle:Qo}=mo.env,Yo=mo.env.utils;mo.plugins.add("converse-bookmarks",{dependencies:["converse-chatboxes","converse-muc"],overrides:{ChatRoom:{getDisplayName(){const{_converse:e}=this.__super__;if(this.get("bookmarked")&&e.bookmarks){const t=e.bookmarks.findWhere({jid:this.get("jid")});if(t)return t.get("name")}return this.__super__.getDisplayName.apply(this,arguments)},getAndPersistNickname(e){const{_converse:t}=this.__super__;return e=e||t.getNicknameFromBookmark(this.get("jid")),this.__super__.getAndPersistNickname.call(this,e)}}},initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({allow_bookmarks:!0,allow_public_bookmarks:!1}),e.api.promises.add("bookmarksInitialized"),e.getNicknameFromBookmark=function(t){if(!e.bookmarks||!e.allow_bookmarks)return null;const o=e.bookmarks.findWhere({jid:t});if(o)return o.get("nick")},e.Bookmark=Go.Model.extend({getDisplayName(){return Jo.xmlunescape(this.get("name"))}}),e.Bookmarks=e.Collection.extend({model:e.Bookmark,comparator:e=>e.get("name").toLowerCase(),initialize(){this.on("add",e=>this.openBookmarkedRoom(e).then(e=>this.markRoomAsBookmarked(e)).catch(t=>vt.fatal(t))),this.on("remove",this.markRoomAsUnbookmarked,this),this.on("remove",this.sendBookmarkStanza,this);const t="converse.room-bookmarks".concat(e.bare_jid);this.fetched_flag=t+"fetched",this.browserStorage=e.createStore(t)},async openBookmarkedRoom(t){if(e.muc_respect_autojoin&&t.get("autojoin")){const o=await e.api.rooms.create(t.get("jid"),t.get("nick"));o.maybeShow()}return t},fetchBookmarks(){const e=Yo.getResolveablePromise();return window.sessionStorage.getItem(this.fetched_flag)?this.fetch({success:()=>e.resolve(),error:()=>e.resolve()}):this.fetchBookmarksFromServer(e),e},createBookmark(e){this.create(e),this.sendBookmarkStanza().catch(t=>this.onBookmarkError(t,e))},sendBookmarkStanza(){const t=$o({type:"set",from:e.connection.jid}).c("pubsub",{xmlns:Jo.NS.PUBSUB}).c("publish",{node:"storage:bookmarks"}).c("item",{id:"current"}).c("storage",{xmlns:"storage:bookmarks"});return this.forEach(e=>{t.c("conference",{name:e.get("name"),autojoin:e.get("autojoin"),jid:e.get("jid")}).c("nick").t(e.get("nick")).up().up()}),t.up().up().up(),t.c("publish-options").c("x",{xmlns:Jo.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t("http://jabber.org/protocol/pubsub#publish-options").up().up().c("field",{var:"pubsub#persist_items"}).c("value").t("true").up().up().c("field",{var:"pubsub#access_model"}).c("value").t("whitelist"),e.api.sendIQ(t)},onBookmarkError(o,n){vt.error("Error while trying to add bookmark"),vt.error(o),e.api.alert("error",t("Error"),[t("Sorry, something went wrong while trying to save your bookmark.")]),this.findWhere({jid:n.jid}).destroy()},fetchBookmarksFromServer(t){const o=$o({from:e.connection.jid,type:"get"}).c("pubsub",{xmlns:Jo.NS.PUBSUB}).c("items",{node:"storage:bookmarks"});e.api.sendIQ(o).then(e=>this.onBookmarksReceived(t,e)).catch(e=>this.onBookmarksReceivedError(t,e))},markRoomAsBookmarked(t){const o=e.chatboxes.get(t.get("jid"));o!==void 0&&o.save("bookmarked",!0)},markRoomAsUnbookmarked(t){const o=e.chatboxes.get(t.get("jid"));o!==void 0&&o.save("bookmarked",!1)},createBookmarksFromStanza(e){const t=Qo("items[node=\"storage:bookmarks\"] item storage[xmlns=\"storage:bookmarks\"] conference",e);t.forEach(e=>{const t=e.getAttribute("jid");this.create({jid:t,name:e.getAttribute("name")||t,autojoin:"true"===e.getAttribute("autojoin"),nick:Object(ke.get)(e.querySelector("nick"),"textContent")})})},onBookmarksReceived(e,t){if(this.createBookmarksFromStanza(t),window.sessionStorage.setItem(this.fetched_flag,!0),void 0!==e)return e.resolve()},onBookmarksReceivedError(o,n){if(null===n?(vt.error("Error: timeout while fetching bookmarks"),e.api.alert("error",t("Timeout Error"),[t("The server did not return your bookmarks within the allowed time. You can reload the page to request them again.")])):(vt.error("Error while fetching bookmarks"),vt.error(n)),o)return n.querySelector("error[type=\"cancel\"] item-not-found")?(window.sessionStorage.setItem(this.fetched_flag,!0),o.resolve()):o.reject(new Error("Could not fetch bookmarks"))},getUnopenedBookmarks(){return this.filter(t=>!e.chatboxes.get(t.get("jid")))}}),e.BookmarksList=Go.Model.extend({defaults:{"toggle-state":e.OPENED}}),e.checkBookmarksSupport=async function(){const t=await e.api.disco.getIdentity("pubsub","pep",e.bare_jid);return e.allow_public_bookmarks?!!t:e.api.disco.supports(Jo.NS.PUBSUB+"#publish-options",e.bare_jid)};const o=async function(){!e.allow_bookmarks||(await e.checkBookmarksSupport())&&(e.bookmarks=new e.Bookmarks,await e.bookmarks.fetchBookmarks(),e.api.trigger("bookmarksInitialized"))};e.api.listen.on("clearSession",()=>{e.bookmarks!==void 0&&(e.bookmarks.clearSession({silent:!0}),window.sessionStorage.removeItem(e.bookmarks.fetched_flag),delete e.bookmarks)}),e.api.listen.on("reconnected",o),e.api.listen.on("connected",async()=>{e.connection.addHandler(t=>{Qo("event[xmlns=\""+Jo.NS.PUBSUB+"#event\"] items[node=\"storage:bookmarks\"]",t).length&&e.api.waitUntil("bookmarksInitialized").then(()=>e.bookmarks.createBookmarksFromStanza(t)).catch(t=>vt.fatal(t))},null,"message","headline",null,e.bare_jid),await Promise.all([e.api.waitUntil("chatBoxesFetched")]),o()})}});const Xo=ze.Strophe,Ko=ze.$build;Xo.Request=function(e,t,o,n){this.id=++Xo._requestId,this.xmlData=e,this.data=Xo.serialize(e),this.origFunc=t,this.func=t,this.rid=o,this.date=NaN,this.sends=n||0,this.abort=!1,this.dead=null,this.age=function(){if(!this.date)return 0;const e=new Date;return(e-this.date)/1e3},this.timeDead=function(){if(!this.dead)return 0;const e=new Date;return(e-this.dead)/1e3},this.xhr=this._newXHR()},Xo.Request.prototype={getResponse:function(){let e=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if(e=this.xhr.responseXML.documentElement,"parsererror"===e.tagName)throw Xo.error("invalid response received"),Xo.error("responseText: "+this.xhr.responseText),Xo.error("responseXML: "+Xo.serialize(this.xhr.responseXML)),new Error("parsererror");}else if(this.xhr.responseText)if(Xo.debug("Got responseText but no responseXML; attempting to parse it with DOMParser..."),e=new DOMParser().parseFromString(this.xhr.responseText,"application/xml").documentElement,!e)throw new Error("Parsing produced null node");else if(e.querySelector("parsererror")){Xo.error("invalid response received: "+e.querySelector("parsererror").textContent),Xo.error("responseText: "+this.xhr.responseText);const t=new Error;throw t.name=Xo.ErrorCondition.BAD_FORMAT,t}return e},_newXHR:function(){let e=null;return window.XMLHttpRequest?(e=new XMLHttpRequest,e.overrideMimeType&&e.overrideMimeType("text/xml; charset=utf-8")):window.ActiveXObject&&(e=new ActiveXObject("Microsoft.XMLHTTP")),e.onreadystatechange=this.func.bind(null,this),e}},Xo.Bosh=function(e){this._conn=e,this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.hold=1,this.wait=60,this.window=5,this.errors=0,this.inactivity=null,this.lastResponseHeaders=null,this._requests=[]},Xo.Bosh.prototype={strip:null,_buildBody:function(){const e=Ko("body",{rid:this.rid++,xmlns:Xo.NS.HTTPBIND});return null!==this.sid&&e.attrs({sid:this.sid}),this._conn.options.keepalive&&this._conn._sessionCachingSupported()&&this._cacheSession(),e},_reset:function(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.errors=0,this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_connect:function(e,t,o){this.wait=e||this.wait,this.hold=t||this.hold,this.errors=0;const n=this._buildBody().attrs({to:this._conn.domain,"xml:lang":"en",wait:this.wait,hold:this.hold,content:"text/xml; charset=utf-8",ver:"1.6","xmpp:version":"1.0","xmlns:xmpp":Xo.NS.BOSH});o&&n.attrs({route:o});const a=this._conn._connect_cb;this._requests.push(new Xo.Request(n.tree(),this._onRequestStateChange.bind(this,a.bind(this._conn)),n.tree().getAttribute("rid"))),this._throttledRequestHandler()},_attach:function(e,t,o,n,a,s,i){this._conn.jid=e,this.sid=t,this.rid=o,this._conn.connect_callback=n,this._conn.domain=Xo.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=a||this.wait,this.hold=s||this.hold,this.window=i||this.window,this._conn._changeConnectStatus(Xo.Status.ATTACHED,null)},_restore:function(e,t,o,n,a){const s=JSON.parse(window.sessionStorage.getItem("strophe-bosh-session"));if("undefined"!=typeof s&&null!==s&&s.rid&&s.sid&&s.jid&&("undefined"==typeof e||null===e||Xo.getBareJidFromJid(s.jid)===Xo.getBareJidFromJid(e)||null===Xo.getNodeFromJid(e)&&Xo.getDomainFromJid(s.jid)===e))this._conn.restored=!0,this._attach(s.jid,s.sid,s.rid,t,o,n,a);else{const e=new Error("_restore: no restoreable session.");throw e.name="StropheSessionError",e}},_cacheSession:function(){this._conn.authenticated?this._conn.jid&&this.rid&&this.sid&&window.sessionStorage.setItem("strophe-bosh-session",JSON.stringify({jid:this._conn.jid,rid:this.rid,sid:this.sid})):window.sessionStorage.removeItem("strophe-bosh-session")},_connect_cb:function(e){const t=e.getAttribute("type");if(null!==t&&"terminate"===t){let t=e.getAttribute("condition");Xo.error("BOSH-Connection failed: "+t);const o=e.getElementsByTagName("conflict");return null===t?this._conn._changeConnectStatus(Xo.Status.CONNFAIL,"unknown"):("remote-stream-error"===t&&0<o.length&&(t="conflict"),this._conn._changeConnectStatus(Xo.Status.CONNFAIL,t)),this._conn._doDisconnect(t),Xo.Status.CONNFAIL}this.sid||(this.sid=e.getAttribute("sid"));const o=e.getAttribute("requests");o&&(this.window=parseInt(o,10));const n=e.getAttribute("hold");n&&(this.hold=parseInt(n,10));const a=e.getAttribute("wait");a&&(this.wait=parseInt(a,10));const s=e.getAttribute("inactivity");s&&(this.inactivity=parseInt(s,10))},_disconnect:function(e){this._sendTerminate(e)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_emptyQueue:function(){return 0===this._requests.length},_callProtocolErrorHandlers:function(e){const t=this._getRequestStatus(e),o=this._conn.protocolErrorHandlers.HTTP[t];o&&o.call(this,t)},_hitError:function(e){this.errors++,Xo.warn("request errored, status: "+e+", number of errors: "+this.errors),4<this.errors&&this._conn._onDisconnectTimeout()},_no_auth_received:function(e){Xo.warn("Server did not yet offer a supported authentication mechanism. Sending a blank poll request."),e=e?e.bind(this._conn):this._conn._connect_cb.bind(this._conn);const t=this._buildBody();this._requests.push(new Xo.Request(t.tree(),this._onRequestStateChange.bind(this,e),t.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){this._abortAllRequests()},_abortAllRequests:function(){for(;0<this._requests.length;){const e=this._requests.pop();e.abort=!0,e.xhr.abort(),e.xhr.onreadystatechange=function(){}}},_onIdle:function(){const e=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===e.length&&!this._conn.disconnecting&&(Xo.debug("no requests during idle cycle, sending blank request"),e.push(null)),!this._conn.paused){if(2>this._requests.length&&0<e.length){const t=this._buildBody();for(let o=0;o<e.length;o++)null!==e[o]&&("restart"===e[o]?t.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":Xo.NS.BOSH}):t.cnode(e[o]).up());delete this._conn._data,this._conn._data=[],this._requests.push(new Xo.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"))),this._throttledRequestHandler()}if(0<this._requests.length){const e=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(Xo.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),e>Math.floor(Xo.TIMEOUT*this.wait)&&(Xo.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(Xo.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}},_getRequestStatus:function(e,t){let o;if(4===e.xhr.readyState)try{o=e.xhr.status}catch(t){Xo.error("Caught an error while retrieving a request's status, reqStatus: "+o)}return"undefined"==typeof o&&(o="number"==typeof t?t:0),o},_onRequestStateChange:function(e,t){if(Xo.debug("request id "+t.id+"."+t.sends+" state changed to "+t.xhr.readyState),t.abort)return void(t.abort=!1);if(4!==t.xhr.readyState)return;const o=this._getRequestStatus(t);if(this.lastResponseHeaders=t.xhr.getAllResponseHeaders(),this.disconnecting&&400<=o)return this._hitError(o),void this._callProtocolErrorHandlers(t);const n=0<o&&500>o,a=t.sends>this._conn.maxRetries;if((n||a)&&(this._removeRequest(t),Xo.debug("request id "+t.id+" should now be removed")),200===o){const o=this._requests[0]===t,n=this._requests[1]===t;(n||o&&0<this._requests.length&&this._requests[0].age()>Math.floor(Xo.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(+t.rid+1),Xo.debug("request id "+t.id+"."+t.sends+" got 200"),e(t),this.errors=0}else 0===o||400<=o&&600>o||12e3<=o?(Xo.error("request id "+t.id+"."+t.sends+" error "+o+" happened"),this._hitError(o),this._callProtocolErrorHandlers(t),400<=o&&500>o&&(this._conn._changeConnectStatus(Xo.Status.DISCONNECTING,null),this._conn._doDisconnect())):Xo.error("request id "+t.id+"."+t.sends+" error "+o+" happened");n||a?a&&!this._conn.connected&&this._conn._changeConnectStatus(Xo.Status.CONNFAIL,"giving-up"):this._throttledRequestHandler()},_processRequest:function(e){let t=this._requests[e];const o=this._getRequestStatus(t,-1);if(t.sends>this._conn.maxRetries)return void this._conn._onDisconnectTimeout();const n=t.age(),a=!isNaN(n)&&n>Math.floor(Xo.TIMEOUT*this.wait),s=null!==t.dead&&t.timeDead()>Math.floor(Xo.SECONDARY_TIMEOUT*this.wait),i=4===t.xhr.readyState&&(1>o||500<=o);if((a||s||i)&&(s&&Xo.error(`Request ${this._requests[e].id} timed out (secondary), restarting`),t.abort=!0,t.xhr.abort(),t.xhr.onreadystatechange=function(){},this._requests[e]=new Xo.Request(t.xmlData,t.origFunc,t.rid,t.sends),t=this._requests[e]),0===t.xhr.readyState){Xo.debug("request id "+t.id+"."+t.sends+" posting");try{const e=this._conn.options.contentType||"text/xml; charset=utf-8";t.xhr.open("POST",this._conn.service,!this._conn.options.sync),"undefined"!=typeof t.xhr.setRequestHeader&&t.xhr.setRequestHeader("Content-Type",e),this._conn.options.withCredentials&&(t.xhr.withCredentials=!0)}catch(e){return Xo.error("XHR open failed: "+e.toString()),this._conn.connected||this._conn._changeConnectStatus(Xo.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}const e=()=>{if(t.date=new Date,this._conn.options.customHeaders){const e=this._conn.options.customHeaders;for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.xhr.setRequestHeader(o,e[o])}t.xhr.send(t.data)};if(1<t.sends){const o=1e3*Math.min(Math.floor(Xo.TIMEOUT*this.wait),Math.pow(t.sends,3));setTimeout(function(){e()},o)}else e();t.sends++,this._conn.xmlOutput!==Xo.Connection.prototype.xmlOutput&&(t.xmlData.nodeName===this.strip&&t.xmlData.childNodes.length?this._conn.xmlOutput(t.xmlData.childNodes[0]):this._conn.xmlOutput(t.xmlData)),this._conn.rawOutput!==Xo.Connection.prototype.rawOutput&&this._conn.rawOutput(t.data)}else Xo.debug("_processRequest: "+(0===e?"first":"second")+" request has readyState of "+t.xhr.readyState)},_removeRequest:function(e){Xo.debug("removing request");for(let t=this._requests.length-1;0<=t;t--)e===this._requests[t]&&this._requests.splice(t,1);e.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(e){const t=this._requests[e];null===t.dead&&(t.dead=new Date),this._processRequest(e)},_reqToData:function(e){try{return e.getResponse()}catch(t){if("parsererror"!==t.message)throw t;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(e){Xo.debug("_sendTerminate was called");const t=this._buildBody().attrs({type:"terminate"});e&&t.cnode(e.tree());const o=new Xo.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"));this._requests.push(o),this._throttledRequestHandler()},_send:function(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(()=>this._conn._onIdle(),100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?Xo.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):Xo.debug("_throttledRequestHandler called with undefined requests");this._requests&&0!==this._requests.length&&(0<this._requests.length&&this._processRequest(0),1<this._requests.length&&Math.abs(this._requests[0].rid-this._requests[1].rid)<this.window&&this._processRequest(1))}};const{Backbone:Zo,Strophe:en}=mo.env,tn="converse.bosh-session";mo.plugins.add("converse-bosh",{enabled(){return!0},initialize(){async function e(){const e=tn;if(t.bosh_session||(t.bosh_session=new Zo.Model({id:e}),t.bosh_session.browserStorage=t.createStore(e,"session"),await new Promise(e=>t.bosh_session.fetch({success:e,error:e}))),!t.jid){const e=t.bosh_session.get("jid");e&&(await t.setUserJID(e))}else if(t.bosh_session.get("jid")!==t.jid){const e=await t.setUserJID(t.jid);t.bosh_session.clear({silent:!0}),t.bosh_session.save({jid:e})}return t.bosh_session}const{_converse:t}=this;t.api.settings.update({bosh_service_url:void 0,prebind_url:null}),t.startNewPreboundBOSHSession=function(){if(!t.prebind_url)throw new Error("startNewPreboundBOSHSession: If you use prebind then you MUST supply a prebind_url");const e=new XMLHttpRequest;e.open("GET",t.prebind_url,!0),e.setRequestHeader("Accept","application/json, text/javascript"),e.onload=async function(){if(200<=e.status&&400>e.status){const o=JSON.parse(e.responseText),n=await t.setUserJID(o.jid);t.connection.attach(n,o.sid,o.rid,t.onConnectStatusChanged)}else e.onerror()},e.onerror=function(){delete t.connection,t.api.trigger("noResumeableBOSHSession",t)},e.send()},t.restoreBOSHSession=async function(){const o=(await e()).get("jid");if(o&&t.connection._proto instanceof en.Bosh)try{return t.connection.restore(o,t.onConnectStatusChanged),!0}catch(t){return vt.warn("Could not restore session for jid: "+o+" Error message: "+t.message),!1}return!1},t.api.listen.on("clearSession",()=>{if(t.bosh_session===void 0){const e=tn;sessionStorage.removeItem(e),sessionStorage.removeItem("".concat(e,"-").concat(e))}else t.bosh_session.destroy(),delete t.bosh_session}),t.api.listen.on("setUserJID",()=>{t.bosh_session!==void 0&&t.bosh_session.save({jid:t.jid})}),t.api.listen.on("addClientFeatures",()=>t.api.disco.own.features.add(en.NS.BOSH)),Object.assign(t.api,{tokens:{get(e){if(t.connection===void 0)return null;return"rid"===e.toLowerCase()?t.connection.rid||t.connection._proto.rid:"sid"===e.toLowerCase()?t.connection.sid||t.connection._proto.sid:void 0}}})}});const{Strophe:on,$build:nn,_:an}=mo.env;on.addNamespace("CAPS","http://jabber.org/protocol/caps"),mo.plugins.add("converse-caps",{overrides:{XMPPStatus:{constructPresence(){const e=this.__super__.constructPresence.apply(this,arguments);return e.root().cnode(se(this.__super__._converse)),e}}}});const{Strophe:_}=mo.env;_.addNamespace("MESSAGE_CORRECT","urn:xmpp:message-correct:0"),_.addNamespace("RECEIPTS","urn:xmpp:receipts"),_.addNamespace("REFERENCE","urn:xmpp:reference:0"),_.addNamespace("MARKERS","urn:xmpp:chat-markers:0"),mo.plugins.add("converse-chatboxes",{dependencies:["converse-emoji","converse-roster","converse-vcard"],initialize(){async function e(e,o,n){e=_.getBareJidFromJid(e.toLowerCase()),Object.assign(o,{jid:e,id:e});let a;try{a=new n(o,{collection:t.chatboxes})}catch(t){return vt.error(t),null}return(await a.initialized,!a.isValid())?(a.destroy(),null):(t.chatboxes.add(a),await a.messages.fetched,a)}const{_converse:t}=this;t.api.promises.add(["chatBoxesFetched","chatBoxesInitialized","privateChatsAutoJoined"]);let o=0;t.incrementMsgCounter=function(){o+=1;const e=document.title;e&&(-1===e.search(/^Messages \(\d+\) /)?document.title="Messages (".concat(o,") ").concat(e):document.title=e.replace(/^Messages \(\d+\) /,"Messages (".concat(o,")")))},t.clearMsgCounter=function(){o=0;const e=document.title;e&&(-1===e.search(/^Messages \(\d+\) /)||(document.title=e.replace(/^Messages \(\d+\) /,"")))},t.ChatBoxes=t.Collection.extend({comparator:"time_opened",model(e,o){return new t.ChatBox(e,o)},onChatBoxesFetched(e){e.filter(e=>!e.isValid()).forEach(e=>e.destroy()),e.forEach(e=>e.maybeShow()),t.api.trigger("chatBoxesFetched")},onConnected(e){e||(this.browserStorage=t.createStore("converse.chatboxes-".concat(t.bare_jid)),this.fetch({add:!0,success:e=>this.onChatBoxesFetched(e)}))}}),t.api.listen.on("addClientFeatures",()=>{t.api.disco.own.features.add(_.NS.MESSAGE_CORRECT),t.api.disco.own.features.add(_.NS.HTTPUPLOAD),t.api.disco.own.features.add(_.NS.OUTOFBAND)}),t.api.listen.on("pluginsInitialized",()=>{t.chatboxes=new t.ChatBoxes,t.api.trigger("chatBoxesInitialized")}),t.api.listen.on("presencesInitialized",e=>t.chatboxes.onConnected(e)),t.api.listen.on("reconnected",()=>t.chatboxes.forEach(e=>e.onReconnection())),t.api.listen.on("windowStateChanged",e=>"visible"===e.state&&t.clearMsgCounter()),Object.assign(t.api,{chatboxes:{async create(){let o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=2<arguments.length?arguments[2]:void 0;return await t.api.waitUntil("chatBoxesFetched"),Object(ke.isString)(o)?e(o,n,a):Promise.all(o.map(t=>e(t,n,a)))},async get(e){return await t.api.waitUntil("chatBoxesFetched"),void 0===e?t.chatboxes.models:Object(ke.isString)(e)?t.chatboxes.get(e.toLowerCase()):(e=e.map(e=>e.toLowerCase()),t.chatboxes.models.filter(t=>e.includes(t.get("jid"))))}}})}});const{Strophe:sn,$build:rn}=mo.env;sn.addNamespace("RSM","http://jabber.org/protocol/rsm"),mo.plugins.add("converse-rsm",{initialize(){const{_converse:e}=this,t=["max","first","last","after","before","index","count"];e.RSM_ATTRIBUTES=t;class o{constructor(e){if("undefined"!=typeof e.xml)this.fromXMLElement(e.xml);else for(let o=0;o<t.length;o++){const n=t[o];this[n]=e[n]}}toXML(){let e=rn("set",{xmlns:sn.NS.RSM});for(let o=0;o<t.length;o++){const n=t[o];"undefined"!=typeof this[n]&&(e=e.c(n).t(this[n].toString()).up())}return e.tree()}next(e,t){return new o({max:e,after:this.last,before:t})}previous(e,t){return new o({max:e,before:this.first,after:t})}fromXMLElement(e){for(var o=0;o<t.length;o++){const n=t[o],a=e.getElementsByTagName(n)[0];"undefined"!=typeof a&&null!==a&&(this[n]=sn.getText(a),"first"==n&&(this.index=a.getAttribute("index")))}}}e.RSM=o}});const{Strophe:ln,$iq:dn,dayjs:cn}=mo.env,pn=mo.env.utils,un=["with","start","end"];mo.plugins.add("converse-mam",{dependencies:["converse-rsm","converse-disco","converse-muc"],overrides:{ChatBox:{async getDuplicateMessage(e){const t=await this.__super__.getDuplicateMessage.apply(this,arguments);return t?t:this.findDuplicateFromArchiveID(e)}}},initialize(){function e(e){t.muc_show_logs_before_join&&e.features.get("mam_enabled")&&e.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&!e.get("prejoin_mam_fetched")&&(e.fetchNewestMessages(),e.save({prejoin_mam_fetched:!0}))}const{_converse:t}=this;t.api.settings.update({archived_messages_page_size:"50",message_archiving:void 0,message_archiving_timeout:2e4});Object.assign(t.ChatBox.prototype,{fetchNewestMessages(){if(!this.disable_mam){const e=this.getMostRecentMessage();if(e){const t=e.get("stanza_id ".concat(this.get("jid")));t?this.fetchArchivedMessages({after:t},"forwards"):this.fetchArchivedMessages({start:e.get("time")},"forwards")}else this.fetchArchivedMessages({before:""})}},async fetchArchivedMessages(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o=1<arguments.length?arguments[1]:void 0;if(this.disable_mam)return;const n=this.get("type")===t.CHATROOMS_TYPE,a=n?this.get("jid"):t.bare_jid;if(!(await t.api.disco.supports(ln.NS.MAM,a)))return;const s=n?this.onMessage.bind(this):t.handleMessageStanza.bind(t.chatboxes),i=Object.assign({groupchat:n,max:t.archived_messages_page_size,with:this.get("jid")},e),r=await t.api.archive.query(i);for(const e of r.messages)try{await s(e)}catch(t){vt.error(t)}if(r.error&&(r.error.retry=()=>this.fetchArchivedMessages(e,o),this.createMessageFromError(r.error)),o&&r.rsm)return"forwards"===o?e=r.rsm.next(t.archived_messages_page_size,e.before):"backwards"===o&&(e=r.rsm.previous(t.archived_messages_page_size,e.after)),this.fetchArchivedMessages(e,o)},async findDuplicateFromArchiveID(e){const o=Wt()("result[xmlns=\"".concat(ln.NS.MAM,"\"]"),e).pop();if(!o)return null;const n=e.getAttribute("from")||this.get("jid"),a=await t.api.disco.supports(ln.NS.MAM,n);if(!a)return null;const s={};return s["stanza_id ".concat(n)]=o.getAttribute("id"),this.messages.findWhere(s)}}),Object.assign(t.ChatRoom.prototype,{}),t.onMAMError=function(e){e&&e.querySelectorAll("feature-not-implemented").length?vt.warn("Message Archive Management (XEP-0313) not supported by this server"):(vt.error("An error occured while trying to set archiving preferences."),vt.error(e))},t.onMAMPreferences=function(e,o){const n=Wt()("prefs[xmlns=\"".concat(ln.NS.MAM,"\"]"),e).pop(),a=n.getAttribute("default");if(a!==t.message_archiving){const e=dn({type:"set"}).c("prefs",{xmlns:ln.NS.MAM,default:t.message_archiving});Array.from(n.children).forEach(t=>e.cnode(t).up()),t.api.sendIQ(e).then(()=>o.save({preferences:{default:t.message_archiving}})).catch(t.onMAMError)}else o.save({preferences:{default:t.message_archiving}})},t.api.listen.on("addClientFeatures",()=>t.api.disco.own.features.add(ln.NS.MAM)),t.api.listen.on("serviceDiscovered",function(e){const o=e.get("preferences")||{};e.get("var")!==ln.NS.MAM||void 0===t.message_archiving||o["default"]!==t.message_archiving&&t.api.sendIQ(dn({type:"get"}).c("prefs",{xmlns:ln.NS.MAM})).then(o=>t.onMAMPreferences(o,e)).catch(t.onMAMError)}),t.api.listen.on("chatRoomViewInitialized",o=>{t.muc_show_logs_before_join&&o.model.features.on("change:mam_enabled",e(o.model))}),t.api.listen.on("enteredNewRoom",e=>e.features.get("mam_enabled")&&e.fetchNewestMessages()),t.api.listen.on("chatReconnected",e=>{e.get("type")===t.PRIVATE_CHAT_TYPE&&e.fetchNewestMessages()}),t.api.listen.on("afterMessagesFetched",e=>{e.get("type")!==t.PRIVATE_CHAT_TYPE||t.connection.restored||e.fetchNewestMessages()}),Object.assign(t.api,{archive:{async query(e){if(!t.api.connection.connected())throw new Error("Can't call `api.archive.query` before having established an XMPP session");const o={type:"set"};if(e&&e.groupchat){if(!e["with"])throw new Error("You need to specify a \"with\" value containing the chat room JID, when querying groupchat messages.");o.to=e["with"]}const n=o.to||t.bare_jid,a=await t.api.disco.supports(ln.NS.MAM,n);if(!a)return vt.warn("Did not fetch MAM archive for ".concat(n," because it doesn't support ").concat(ln.NS.MAM)),{messages:[]};const s=pn.getUniqueId(),i=dn(o).c("query",{xmlns:ln.NS.MAM,queryid:s});e&&(i.c("x",{xmlns:ln.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t(ln.NS.MAM).up().up(),e["with"]&&!e.groupchat&&i.c("field",{var:"with"}).c("value").t(e["with"]).up().up(),["start","end"].forEach(o=>{if(e[o]){const t=cn(e[o]);if(t.isValid())i.c("field",{var:o}).c("value").t(t.toISOString()).up().up();else throw new TypeError("archive.query: invalid date provided for: ".concat(o))}}),i.up(),e instanceof t.RSM?i.cnode(e.toXML()):Object(ke.intersection)(t.RSM_ATTRIBUTES,Object.keys(e)).length&&i.cnode(new t.RSM(e).toXML()));const r=[],l=t.connection.addHandler(o=>{const n=Wt()("message > result[xmlns=\"".concat(ln.NS.MAM,"\"]"),o).pop();if(void 0===n||n.getAttribute("queryid")!==s)return!0;const a=o.getAttribute("from")||t.bare_jid;if(e.groupchat){if(a!==e["with"])return vt.warn("Ignoring alleged groupchat MAM message from ".concat(o.getAttribute("from"))),!0;}else if(a!==t.bare_jid)return vt.warn("Ignoring alleged MAM message from ".concat(o.getAttribute("from"))),!0;return r.push(o),!0},ln.NS.MAM);let d;const c=await t.api.sendIQ(i,t.message_archiving_timeout,!1);if(null===c){return vt.error("Timeout while trying to fetch archived messages."),d=new t.TimeoutError("Timeout while trying to fetch archived messages."),{messages:r,error:d}}if(pn.isErrorStanza(c))return vt.error("Error stanza received while trying to fetch archived messages"),vt.error(c),{messages:r};t.connection.deleteHandler(l);let p;const u=c&&Wt()("fin[xmlns=\"".concat(ln.NS.MAM,"\"]"),c).pop();if(u&&[null,"false"].includes(u.getAttribute("complete"))){const o=Wt()("set[xmlns=\"".concat(ln.NS.RSM,"\"]"),u).pop();o&&(p=new t.RSM({xml:o}),Object.assign(p,Object.assign(Object(ke.pick)(e,[...un,...t.RSM_ATTRIBUTES]),p)))}return{messages:r,rsm:p,error:d}}}})}});o(38);const mn=Backbone.NativeView===void 0?Backbone.View:Backbone.NativeView,gn=Backbone.Overview=function(){this.views={},this.keys=()=>Object.keys(this.views),this.getAll=()=>this.views,this.get=e=>this.views[e],this.xget=e=>this.keys().filter(t=>t!==e).reduce((e,t)=>(e[t]=this.views[t],e),{}),this.add=(e,t)=>(this.views[e]=t,t),this.remove=e=>{"undefined"==typeof e&&new mn().remove.apply(this);const t=this.views[e];if(t)return delete this.views[e],t.remove(),t},this.removeAll=()=>(this.keys().forEach(e=>this.remove(e)),this),mn.apply(this,Array.prototype.slice.apply(arguments))},hn={chain:ke.chain,includes:ke.includes,difference:ke.difference,drop:ke.drop,every:ke.every,filter:ke.filter,find:ke.find,first:ke.first,forEach:ke.forEach,head:ke.head,indexOf:ke.indexOf,initial:ke.initial,invoke:ke.invoke,isEmpty:ke.isEmpty,last:ke.last,lastIndexOf:ke.lastIndexOf,map:ke.map,max:ke.max,min:ke.min,reduce:ke.reduce,reduceRight:ke.reduceRight,reject:ke.reject,rest:ke.rest,sample:ke.sample,shuffle:ke.shuffle,size:ke.size,some:ke.some,sortBy:ke.sortBy,tail:ke.tail,take:ke.take,toArray:ke.toArray,without:ke.without};Object.keys(hn).forEach(e=>{gn.prototype[e]=function(){const t=Array.prototype.slice.call(arguments);return t.unshift(this.views),hn[e].apply(this,t)}}),Object(ke.extend)(gn.prototype,mn.prototype),gn.extend=mn.extend;const _n=Backbone.OrderedListView=Backbone.Overview.extend({listItems:"model",sortEvent:"change",sortImmediatelyOnAdd:!1,listSelector:".ordered-items",ItemView:void 0,subviewIndex:"id",initialize(){this.sortEventually=Object(ke.debounce)(()=>this.sortAndPositionAllItems(),100),this.items=Object(ke.get)(this,this.listItems),this.items.on("remove",this.removeView,this),this.items.on("reset",this.removeAll,this),this.items.on("add",()=>{this.sortImmediatelyOnAdd?this.sortAndPositionAllItems():this.sortEventually()}),this.sortEvent&&this.items.on(this.sortEvent,this.sortEventually,this)},createItemView(e){let t=this.get(e.get(this.subviewIndex));return t?(t.model=e,t.initialize()):(t=new this.ItemView({model:e}),this.add(e.get(this.subviewIndex),t)),t.render(),t},removeView(e){this.remove(e.get(this.subviewIndex))},sortAndPositionAllItems(){if(!this.items.length)return;this.items.sort();const e=this.el.querySelector(this.listSelector),t=document.createElement("div");e.parentNode.replaceChild(t,e),this.items.forEach(t=>{let o=this.get(t.get(this.subviewIndex));o||(o=this.createItemView(t)),e.insertAdjacentElement("beforeend",o.el)}),t.parentNode.replaceChild(e,t)}});var fn=o(121),bn=o.n(fn),vn=o(122),yn=o.n(vn),xn=o(61),Sn=o.n(xn);const{Backbone:wn,_:kn,utils:En}=mo.env,Cn={renderAvatar(e){e=e||this.el;const t=e.querySelector("canvas.avatar, svg.avatar");if(null!==t&&this.model.vcard){const e={classes:t.getAttribute("class"),width:t.getAttribute("width"),height:t.getAttribute("height")},o=this.model.vcard.get("image_type"),n=this.model.vcard.get("image");e.image="data:"+o+";base64,"+n,t.outerHTML=bn()(e)}}};mo.plugins.add("converse-chatboxviews",{dependencies:["converse-chatboxes","converse-vcard"],initialize(){function e(){const e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))}const{_converse:t}=this;t.api.promises.add(["chatBoxViewsInitialized"]),t.api.settings.update({animate:!0,theme:"default"}),t.ViewWithAvatar=wn.NativeView.extend(Cn),t.VDOMViewWithAvatar=wn.VDOMView.extend(Cn),t.ChatBoxViews=gn.extend({_ensureElement(){if(!this.el){let e=t.root.querySelector("#conversejs");if(null===e){e=document.createElement("div"),e.setAttribute("id","conversejs"),En.addClass("theme-".concat(t.theme),e);const o=t.root.querySelector("body");o?o.appendChild(e):t.root.appendChild(e)}e.innerHTML="",this.setElement(e,!1)}else this.setElement(kn.result(this,"el"),!1)},initialize(){this.listenTo(this.model,"destroy",this.removeChat);const e=document.getElementById("conversejs-bg");e&&!e.innerHTML.trim()&&(e.innerHTML=yn()());const o=document.querySelector("body");o.classList.add("converse-".concat(t.view_mode)),this.el.classList.add("converse-".concat(t.view_mode)),t.singleton&&this.el.classList.add("converse-singleton"),this.render()},render(){try{this.el.innerHTML=Sn()()}catch(t){this._ensureElement(),this.el.innerHTML=Sn()()}this.row_el=this.el.querySelector(".row")},insertRowColumn(e){this.row_el.insertAdjacentElement("afterBegin",e)},removeChat(e){this.remove(e.get("id"))},closeAllChatBoxes(){return Promise.all(this.map(e=>e.close({name:"closeAllChatBoxes"})))}}),t.api.listen.on("chatBoxesInitialized",()=>{t.chatboxviews=new t.ChatBoxViews({model:t.chatboxes}),t.api.trigger("chatBoxViewsInitialized")}),t.api.listen.on("clearSession",()=>t.chatboxviews.closeAllChatBoxes()),t.api.listen.on("chatBoxViewsInitialized",()=>e()),window.addEventListener("resize",()=>e())}});var An=o(20),Tn=o.n(An),jn=o(123),Nn=o.n(jn),Mn=o(124),In=o.n(Mn),On=o(125),Rn=o.n(On),Dn=o(126),Ln=o.n(Dn),Pn=o(42),qn=o.n(Pn),Bn=o(127),zn=o.n(Bn),Fn=o(128),Hn=o.n(Fn),Un=o(129),Vn=o.n(Un),Wn=o(43),Gn=o.n(Wn),Jn=o(62),$n=o.n(Jn),Qn=o(130),Yn=o.n(Qn),Xn=o(131),Kn=o.n(Xn);const Zn={"text-private":"password","text-single":"text",fixed:"label",boolean:"checkbox",hidden:"hidden","jid-multi":"textarea","list-single":"dropdown","list-multi":"dropdown"};Qt.isAudioURL=e=>pe([".ogg",".mp3",".m4a"],e),Qt.isImageURL=e=>pe([".jpg",".jpeg",".png",".gif",".bmp",".tiff",".svg"],e),Qt.isVideoURL=e=>pe([".mp4",".webm"],e),Qt.getOOBURLMarkup=function(e,t){const o=de(t);return null===o?t:Qt.isVideoURL(o)?Kn()({url:t}):Qt.isAudioURL(o)?me(e,o):Qt.isImageURL(o)?ge(e,o):he(e,o)},Qt.applyDragResistance=function(e,t){if(void 0===e)return;if(void 0===t)return e;return e!==t&&10>Math.abs(e-t)?t:e},Qt.renderImageURLs=function(e,t){if(!e.show_images_inline)return Promise.resolve();const o=t.textContent.match(/\b(https?\:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b\/?/g)||[];return Promise.all(o.map(o=>new Promise(n=>Qt.isImageURL(o)?le(o).then(a=>{const s=new Image;s.src=a.src,s.addEventListener("load",n),s.addEventListener("error",n);const{__:i}=e;Wt()("a[href=\"".concat(o,"\"]"),t).forEach(e=>e.outerHTML=$n()({url:o,label_download:i("Download")}))}).catch(n):n())))},Qt.renderNewLines=function(e){return e.replace(/\n\n+/g,"<br/><br/>").replace(/\n/g,"<br/>")},Qt.calculateElementHeight=function(e){return lt.a.reduce(e.children,(e,t)=>e+t.offsetHeight,0)},Qt.getNextElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.nextElementSibling;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.nextElementSibling;return o},Qt.getPreviousElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.previousElementSibling;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.previousElementSibling;return o},Qt.getFirstChildElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.firstElementChild;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.nextElementSibling;return o},Qt.getLastChildElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.lastElementChild;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.previousElementSibling;return o},Qt.hasClass=function(e,t){return t instanceof Element&&t.classList.contains(e)},Qt.addClass=function(e,t){return t instanceof Element&&t.classList.add(e),t},Qt.removeClass=function(e,t){return t instanceof Element&&t.classList.remove(e),t},Qt.removeElement=function(e){return e instanceof Element&&e.parentNode&&e.parentNode.removeChild(e),e},Qt.showElement=lt.a.flow(lt.a.partial(Qt.removeClass,"collapsed"),lt.a.partial(Qt.removeClass,"hidden")),Qt.hideElement=function(e){return e instanceof Element&&e.classList.add("hidden"),e},Qt.ancestor=function(e,t){let o=e;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.parentElement;return o},Qt.nextUntil=function(e,t){const o=[];for(let n=e.nextElementSibling;null!==n&&!n.matches(t);)o.push(n),n=n.nextElementSibling;return o},Qt.unescapeHTML=function(e){var t=document.createElement("div");return t.innerHTML=e,t.innerText},Qt.escapeHTML=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},Qt.addMentionsMarkup=function(e,t,o){if("groupchat"!==o.get("message_type"))return e;const n=o.get("nick");return t.sort((e,t)=>t.begin-e.begin).forEach(t=>{const a=e.slice(0,t.begin),s=3*((a.match(/&lt;/g)||[]).length+(a.match(/&gt;/g)||[]).length),i=parseInt(t.begin)+parseInt(s),r=parseInt(t.end)+parseInt(s),l=e.slice(i,r);o,e=l===n?e.slice(0,i)+"<span class=\"mention mention--self badge badge-info\">".concat(l,"</span>")+e.slice(r):e.slice(0,i)+"<span class=\"mention\">".concat(l,"</span>")+e.slice(r)}),e},Qt.convertToHyperlink=function(e){const t=de(e);if(null===t)return e;e=t.normalize()._string;const o=t._parts.urn?e:t.readable();return t._parts.protocol||e.startsWith("http://")||e.startsWith("https://")||(e="http://"+e),"xmpp"===t._parts.protocol&&"join"===t._parts.query?"<a target=\"_blank\" rel=\"noopener\" class=\"open-chatroom\" href=\"".concat(e,"\">").concat(Qt.escapeHTML(o),"</a>"):"<a target=\"_blank\" rel=\"noopener\" href=\"".concat(e,"\">").concat(Qt.escapeHTML(o),"</a>")},Qt.addHyperlinks=function(e){return Tn.a.withinString(e,e=>Qt.convertToHyperlink(e),{start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi})},Qt.slideInAllElements=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:300;return Promise.all(lt.a.map(e,lt.a.partial(Qt.slideIn,lt.a,t)))},Qt.slideToggleElement=function(e,t){return lt.a.includes(e.classList,"collapsed")||lt.a.includes(e.classList,"hidden")?Qt.slideOut(e,t):Qt.slideIn(e,t)},Qt.slideOut=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:200;return new Promise((o,n)=>{function a(){l+=i/r,l<i?(e.style.height=l+"px",e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))):(e.removeAttribute("data-slider-marker"),e.style.height=Qt.calculateElementHeight(e)+"px",e.style.overflow="",e.style.height="",o())}if(!e){return vt.warn("An element needs to be passed in to slideOut"),void n(new Error("An element needs to be passed in to slideOut"))}const s=e.getAttribute("data-slider-marker");s&&(e.removeAttribute("data-slider-marker"),window.cancelAnimationFrame(s));const i=Qt.calculateElementHeight(e);if(window.converse_disable_effects)return e.style.height=i+"px",re(e),void o();if(!Qt.hasClass("collapsed",e)&&!Qt.hasClass("hidden",e))return void o();const r=t/17;let l=0;e.style.height="0",e.style.overflow="hidden",e.classList.remove("hidden"),e.classList.remove("collapsed"),e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))})},Qt.slideIn=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:200;return new Promise((o,n)=>{function a(){l-=i/r,0<l?(e.style.height=l+"px",e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))):(e.removeAttribute("data-slider-marker"),e.classList.add("collapsed"),e.style.height="",o(e))}if(!e){return vt.warn("An element needs to be passed in to slideIn"),n(new Error("An element needs to be passed in to slideIn"))}if(lt.a.includes(e.classList,"collapsed"))return o(e);if(window.converse_disable_effects)return e.classList.add("collapsed"),e.style.height="",o(e);const s=e.getAttribute("data-slider-marker");s&&(e.removeAttribute("data-slider-marker"),window.cancelAnimationFrame(s));const i=e.offsetHeight,r=t/17;let l=i;e.style.overflow="hidden",e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))})},Qt.isInDOM=function(e){return document.querySelector("body").contains(e)},Qt.isVisible=function(e){return null!==e&&!Qt.hasClass("hidden",e)&&(0<e.offsetWidth||0<e.offsetHeight||0<e.getClientRects().length)},Qt.fadeIn=function(e,t){return e||vt.warn("An element needs to be passed in to fadeIn"),window.converse_disable_effects?(e.classList.remove("hidden"),_e(e,t)):void(lt.a.includes(e.classList,"hidden")?(e.classList.add("visible"),e.classList.remove("hidden"),e.addEventListener("webkitAnimationEnd",lt.a.partial(_e,e,t)),e.addEventListener("animationend",lt.a.partial(_e,e,t)),e.addEventListener("oanimationend",lt.a.partial(_e,e,t))):_e(e,t))},Qt.xForm2webForm=function(e,t,o){if("list-single"===e.getAttribute("type")||"list-multi"===e.getAttribute("type")){const t=lt.a.map(Qt.queryChildren(e,"value"),lt.a.partial(lt.a.get,lt.a,"textContent")),o=lt.a.map(Qt.queryChildren(e,"option"),function(o){const n=lt.a.get(o.querySelector("value"),"textContent");return Yn()({value:n,label:o.getAttribute("label"),selected:lt.a.includes(t,n),required:!!e.querySelector("required")})});return zn()({id:Qt.getUniqueId(),name:e.getAttribute("var"),label:e.getAttribute("label"),options:o.join(""),multiple:"list-multi"===e.getAttribute("type"),required:!!e.querySelector("required")})}if("fixed"===e.getAttribute("type")){const t=lt.a.get(e.querySelector("value"),"textContent");return"<p class=\"form-help\">"+t+"</p>"}if("jid-multi"===e.getAttribute("type"))return Hn()({name:e.getAttribute("var"),label:e.getAttribute("label")||"",value:lt.a.get(e.querySelector("value"),"textContent"),required:!!e.querySelector("required")});if("boolean"===e.getAttribute("type"))return Ln()({id:Qt.getUniqueId(),name:e.getAttribute("var"),label:e.getAttribute("label")||"",checked:"1"===lt.a.get(e.querySelector("value"),"textContent")&&"checked=\"1\""||"",required:!!e.querySelector("required")});if("url"===e.getAttribute("var"))return Vn()({label:e.getAttribute("label")||"",value:lt.a.get(e.querySelector("value"),"textContent")});if("username"===e.getAttribute("var"))return Gn()({domain:" @"+o.domain,name:e.getAttribute("var"),type:Zn[e.getAttribute("type")],label:e.getAttribute("label")||"",value:lt.a.get(e.querySelector("value"),"textContent"),required:!!e.querySelector("required")});if("ocr"===e.getAttribute("var")){const o=e.querySelector("uri"),n=Wt()("data[cid=\""+o.textContent.replace(/^cid:/,"")+"\"]",t)[0];return Rn()({label:e.getAttribute("label"),name:e.getAttribute("var"),data:lt.a.get(n,"textContent"),type:o.getAttribute("type"),required:!!e.querySelector("required")})}else{const t=e.getAttribute("var");return qn()({id:Qt.getUniqueId(),label:e.getAttribute("label")||"",name:t,fixed_username:o.fixed_username,autocomplete:ie(t,o),placeholder:null,required:!!e.querySelector("required"),type:Zn[e.getAttribute("type")],value:lt.a.get(e.querySelector("value"),"textContent")})}};var ea=Qt,ta=o(132),oa=o.n(ta),na=o(133),aa=o.n(na),sa=o(4),ia=o.n(sa),ra=o(134),la=o.n(ra),da=o(135),ca=o.n(da),pa=o(8),ua=o.n(pa),ma=o(13),ga=o.n(ma);const{Strophe:ha,dayjs:_a}=mo.env,fa=mo.env.utils;mo.plugins.add("converse-message-view",{dependencies:["converse-modal","converse-chatboxviews"],initialize(){function e(e,t,o){if(o.isClosing)return;const n=new Tn.a(e),a=n.protocol().toLowerCase();return["https","http","xmpp","ftp"].includes(a)?n.equals(e)&&"<".concat(e,">")===t.toLocaleLowerCase()?t:void 0:void 0}const{_converse:t}=this,{__:o}=t;t.api.settings.update({show_images_inline:!0,allow_message_retraction:"all"}),t.MessageVersionsModal=t.BootstrapModal.extend({toHTML(){return ca()(Object.assign(this.model.toJSON(),{__:o,dayjs:_a}))}}),t.MessageView=t.ViewWithAvatar.extend({events:{"click .chat-msg__edit-modal":"showMessageVersionsModal","click .retry":"onRetryClicked"},initialize(){this.debouncedRender=Object(ke.debounce)(()=>{this.model.collection&&this.render()},50),this.model.rosterContactAdded&&this.model.rosterContactAdded.then(()=>{this.listenTo(this.model.contact,"change:nickname",this.debouncedRender),this.debouncedRender()}),this.model.occupant&&(this.listenTo(this.model.occupant,"change:role",this.debouncedRender),this.listenTo(this.model.occupant,"change:affiliation",this.debouncedRender),this.debouncedRender()),this.listenTo(this.model,"change",this.onChanged),this.listenTo(this.model,"destroy",this.fadeOut),this.listenTo(this.model,"vcard:change",this.debouncedRender)},async render(){const e=fa.hasClass("chat-msg--followup",this.el);if(this.model.isOnlyChatStateNotification())this.renderChatStateNotification();else if(this.model.get("file")&&!this.model.get("oob_url")){if(!this.model.file)return vt.error("Attempted to render a file upload message with no file data"),this.el;this.renderFileUploadProgresBar()}else"error"===this.model.get("type")?this.renderErrorMessage():"info"===this.model.get("type")?this.renderInfoMessage():await this.renderChatMessage();return e&&fa.addClass("chat-msg--followup",this.el),this.el},async onChanged(e){const t=e.changed.edited;if(this.model.changed.progress)return this.renderFileUploadProgresBar();["moderated","retracted","correcting","message","type","upload","received","editable","first_unread"].filter(e=>Object.prototype.hasOwnProperty.call(this.model.changed,e)).length&&(await this.debouncedRender()),t&&this.onMessageEdited()},fadeOut(){t.animate?(setTimeout(()=>this.remove(),600),fa.addClass("fade-out",this.el)):this.remove()},async onRetryClicked(){this.showSpinner(),await this.model.error.retry(),this.model.destroy()},showSpinner(){this.el.innerHTML=ua()()},onMessageEdited(){this.model.get("is_archived")||(this.el.addEventListener("animationend",()=>fa.removeClass("onload",this.el),{once:!0}),fa.addClass("onload",this.el))},replaceElement(e){return this.el.parentElement&&this.el.parentElement.replaceChild(e,this.el),this.setElement(e),this.el},transformOOBURL(e){return fa.getOOBURLMarkup(t,e)},async transformBodyText(o){return await t.api.trigger("beforeMessageBodyTransformed",this,o,{Synchronous:!0}),o=this.model.isMeCommand()?o.substring(4):o,o=ga.a.filterXSS(o,{whiteList:{},onTag:e}),o=fa.geoUriToHttp(o,t.geouri_replacement),o=fa.addMentionsMarkup(o,this.model.get("references"),this.model.collection.chatbox),o=fa.addHyperlinks(o),o=fa.renderNewLines(o),o=fa.addEmoji(o),await t.api.trigger("afterMessageBodyTransformed",this,o,{Synchronous:!0}),o},async renderChatMessage(){await t.api.waitUntil("emojisInitialized");const e=_a(this.model.get("time")),n=this.model.vcard?this.model.vcard.get("role"):null,a=n?n.split(","):[],s=this.model.get("retracted")||"retracted"===this.model.get("moderated"),i="groupchat"===this.model.get("type"),r="me"===this.model.get("sender"),l=this.model.collection.chatbox,d=r&&["all","own"].includes(t.allow_message_retraction),c=!r&&i&&["all","moderator"].includes(t.allow_message_retraction)&&(await l.canRetractMessages()),p=fa.stringToElement(la()(Object.assign(this.model.toJSON(),{__:o,is_retracted:s,retractable:!s&&(c||d),extra_classes:this.getExtraMessageClasses(),is_groupchat_message:i,is_me_message:this.model.isMeCommand(),label_show:o("Show more"),occupant:this.model.occupant,pretty_time:e.format(t.time_format),retraction_text:s?this.getRetractionText():null,first_unread:this.model.get("first_unread"),roles:a,time:e.toISOString(),username:this.model.getDisplayName()}))),u=this.model.get("oob_url");if(u&&(p.querySelector(".chat-msg__media").innerHTML=this.transformOOBURL(u)),!s){const e=this.model.getMessageText(),o=p.querySelector(".chat-msg__text");e&&e!==u&&(o.innerHTML=await this.transformBodyText(e),await fa.renderImageURLs(t,o))}"headline"!==this.model.get("type")&&this.renderAvatar(p),this.replaceElement(p),this.model.collection&&this.model.collection.trigger("rendered",this)},renderInfoMessage(){const e=fa.stringToElement(ia()(Object.assign(this.model.toJSON(),{extra_classes:"chat-info",isodate:_a(this.model.get("time")).toISOString()})));return this.replaceElement(e)},getRetractionText(){if("groupchat"===this.model.get("type")&&this.model.get("moderated_by")){const e=this.model.get("moderated_by"),t=this.model.collection.chatbox;this.model.mod||(this.model.mod=t.occupants.findOccupant({jid:e})||t.occupants.findOccupant({nick:ha.getResourceFromJid(e)}));const n=this.model.mod?this.model.mod.getDisplayName():"A moderator";return o("%1$s has removed this message",n)}return o("%1$s has removed this message",this.model.getDisplayName())},renderErrorMessage(){const e=fa.stringToElement(ia()(Object.assign(this.model.toJSON(),{extra_classes:"chat-error",isodate:_a(this.model.get("time")).toISOString()})));return this.replaceElement(e)},renderChatStateNotification(){let e;const n=this.model.get("from"),a=this.model.getDisplayName();if(this.model.get("chat_state")===t.COMPOSING)e="me"===this.model.get("sender")?o("Typing from another device"):o("%1$s is typing",a);else if(this.model.get("chat_state")===t.PAUSED)e="me"===this.model.get("sender")?o("Stopped typing on the other device"):o("%1$s has stopped typing",a);else if(this.model.get("chat_state")===t.GONE)e=o("%1$s has gone away",a);else return;const s=new Date().toISOString();this.replaceElement(fa.stringToElement(oa()({message:e,from:n,isodate:s})))},renderFileUploadProgresBar(){const e=fa.stringToElement(aa()(Object.assign(this.model.toJSON(),{__:o,filename:this.model.file.name,filesize:ho()(this.model.file.size)})));this.replaceElement(e),this.renderAvatar()},showMessageVersionsModal(e){e.preventDefault(),this.model.message_versions_modal===void 0&&(this.model.message_versions_modal=new t.MessageVersionsModal({model:this.model})),this.model.message_versions_modal.show(e)},getExtraMessageClasses(){const e=this.model.get("retracted")||"retracted"===this.model.get("moderated"),t=[...(this.model.get("is_delayed")?["delayed"]:[]),...(e?["chat-msg--retracted"]:[])];return"groupchat"===this.model.get("type")&&(this.model.occupant&&(t.push(this.model.occupant.get("role")),t.push(this.model.occupant.get("affiliation"))),"them"===this.model.get("sender")&&this.model.collection.chatbox.isUserMentioned(this.model)&&t.push("mentioned")),this.model.get("correcting")&&t.push("correcting"),t.filter(e=>e).join(" ")}})}});var ba=o(113),va=o(12),ya=o.n(va),xa=o(136),Sa=o.n(xa),wa=o(137),ka=o.n(wa),Ea=o(63),Ca=o.n(Ea);const{Backbone:Aa,sizzle:Ta}=mo.env,ja=mo.env.utils;mo.plugins.add("converse-modal",{initialize(){const{_converse:e}=this,{__:t}=e;e.BootstrapModal=Aa.VDOMView.extend({events:{"click  .nav-item .nav-link":"switchTab"},initialize(){this.render().insertIntoDOM(),this.modal=new ya.a.Modal(this.el,{backdrop:"static",keyboard:!0}),this.el.addEventListener("hide.bs.modal",()=>ja.removeClass("selected",this.trigger_el),!1)},insertIntoDOM(){const t=e.chatboxviews.el.querySelector("#converse-modals");t.insertAdjacentElement("beforeEnd",this.el)},switchTab(e){e.stopPropagation(),e.preventDefault(),Ta(".nav-link.active",this.el).forEach(e=>{ja.removeClass("active",this.el.querySelector(e.getAttribute("href"))),ja.removeClass("active",e)}),ja.addClass("active",e.target),ja.addClass("active",this.el.querySelector(e.target.getAttribute("href")))},alert(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"primary";const o=this.el.querySelector(".modal-body");o.insertAdjacentHTML("afterBegin",Sa()({type:"alert-".concat(t),message:e}));const n=o.firstElementChild;setTimeout(()=>{ja.addClass("fade-out",n),setTimeout(()=>ja.removeElement(n),600)},5e3)},show(e){e&&(e.preventDefault(),this.trigger_el=e.target,this.trigger_el.classList.add("selected")),this.modal.show()}}),e.Confirm=e.BootstrapModal.extend({events:{"submit .confirm":"onConfimation"},initialize(){this.confirmation=ja.getResolveablePromise(),e.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.el.addEventListener("closed.bs.modal",()=>this.confirmation.reject(),!1)},toHTML(){return Ca()(Object.assign({__:t},this.model.toJSON()))},afterRender(){this.close_handler_registered||(this.el.addEventListener("closed.bs.modal",()=>{this.confirmation.isResolved||this.confirmation.reject()},!1),this.close_handler_registered=!0)},onConfimation(e){e.preventDefault(),this.confirmation.resolve(!0),this.modal.hide()}}),e.Prompt=e.Confirm.extend({toHTML(){return Ca()(Object.assign({__:t},this.model.toJSON()))},onConfimation(e){e.preventDefault();const t=new FormData(e.target);this.confirmation.resolve(t.get("reason")),this.modal.hide()}}),e.Alert=e.BootstrapModal.extend({initialize(){e.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render)},toHTML(){return ka()(Object.assign({__:t},this.model.toJSON()))}}),e.api.listen.on("disconnect",()=>{const e=document.querySelector("#converse-modals");e&&(e.innerHTML="")});let o,n,a;Object.assign(e.api,{async confirm(t){let o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];if(Object(ke.isString)(o)&&(o=[o]),void 0===a){const n=new Aa.Model({title:t,messages:o,type:"confirm"});a=new e.Confirm({model:n})}else a.confirmation=ja.getResolveablePromise(),a.model.set({title:t,messages:o,type:"confirm"});a.show();try{return await a.confirmation}catch(t){return!1}},async prompt(t){let o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"";if(Object(ke.isString)(o)&&(o=[o]),void 0===n){const s=new Aa.Model({title:t,messages:o,placeholder:a,type:"prompt"});n=new e.Prompt({model:s})}else n.confirmation=ja.getResolveablePromise(),n.model.set({title:t,messages:o,type:"prompt"});n.show();try{return await n.confirmation}catch(t){return!1}},alert(t,n,a){Object(ke.isString)(a)&&(a=[a]);let s;if("error"===t?s="alert-danger":"info"===t?s="alert-info":"warn"==t&&(s="alert-warning"),void 0===o){const t=new Aa.Model({title:n,messages:a,level:s,type:"alert"});o=new e.Alert({model:t})}else o.model.set({title:n,messages:a,level:s});o.show()}})}});var Na=o(44),Ma=o.n(Na),Ia=o(138),Oa=o.n(Ia),Ra=o(139),Da=o.n(Ra),La=o(140),Pa=o.n(La),qa=o(141),Ba=o.n(qa),za=o(142),Fa=o.n(za),Ha=o(143),Ua=o.n(Ha),Va=o(144),Wa=o.n(Va),Ga=o(145),Ja=o.n(Ga),$a=o(146),Qa=o.n($a),Ya=o(147),Xa=o.n(Ya);const{Backbone:Ka,Strophe:Za,sizzle:es,dayjs:ts}=mo.env,os=mo.env.utils;mo.plugins.add("converse-chatview",{dependencies:["converse-chatboxviews","converse-chat","converse-disco","converse-message-view","converse-modal"],initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({auto_focus:!0,message_limit:0,show_send_button:!1,show_retraction_warning:!0,show_toolbar:!0,time_format:"HH:mm",visible_toolbar_buttons:{call:!1,clear:!0,spoiler:!0}}),e.ChatBoxHeading=e.ViewWithAvatar.extend({initialize(){this.listenTo(this.model,"change:status",this.onStatusMessageChanged),this.debouncedRender=Object(ke.debounce)(this.render,50),this.listenTo(this.model,"vcard:change",this.debouncedRender),this.model.contact&&this.listenTo(this.model.contact,"destroy",this.debouncedRender),this.model.rosterContactAdded&&this.model.rosterContactAdded.then(()=>{this.listenTo(this.model.contact,"change:nickname",this.debouncedRender),this.debouncedRender()})},render(){const o=Object(ke.get)(this.model,"vcard"),n=o?o.toJSON():{};return this.el.innerHTML=Oa()(Object.assign(n,this.model.toJSON(),{_converse:e,info_close:t("Close this chat box"),display_name:this.model.getDisplayName()})),this.renderAvatar(),this},onStatusMessageChanged(t){this.debouncedRender(),e.api.trigger("contactStatusMessageChanged",{contact:t.attributes,message:t.get("status")})}}),e.UserDetailsModal=e.BootstrapModal.extend({events:{"click button.remove-contact":"removeContact","click button.refresh-contact":"refreshContact","click .fingerprint-trust .btn input":"toggleDeviceTrust"},initialize(){e.BootstrapModal.prototype.initialize.apply(this,arguments),this.model.rosterContactAdded.then(()=>this.registerContactEventHandlers()),this.listenTo(this.model,"change",this.render),this.registerContactEventHandlers(),e.api.trigger("userDetailsModalInitialized",this.model)},toHTML(){const o=Object(ke.get)(this.model,"vcard"),n=o?o.toJSON():{};return Xa()(Object.assign(this.model.toJSON(),n,{__:t,view:this,_converse:e,allow_contact_removal:e.allow_contact_removal,display_name:this.model.getDisplayName(),is_roster_contact:void 0!==this.model.contact,utils:os}))},registerContactEventHandlers(){this.model.contact!==void 0&&(this.listenTo(this.model.contact,"change",this.render),this.listenTo(this.model.contact.vcard,"change",this.render),this.model.contact.on("destroy",()=>{delete this.model.contact,this.render()}))},async refreshContact(o){o&&o.preventDefault&&o.preventDefault();const n=this.el.querySelector(".fa-refresh");os.addClass("fa-spin",n);try{await e.api.vcard.update(this.model.contact.vcard,!0)}catch(o){vt.fatal(o),this.alert(t("Sorry, something went wrong while trying to refresh"),"danger")}os.removeClass("fa-spin",n)},removeContact(o){if(o&&o.preventDefault&&o.preventDefault(),!!e.allow_contact_removal){const o=confirm(t("Are you sure you want to remove this contact?"));!0===o&&(this.modal.hide(),this.model.contact.removeFromRoster(()=>this.model.contact.destroy(),o=>{vt.error(o),e.api.alert("error",t("Error"),[t("Sorry, there was an error while trying to remove %1$s as a contact.",this.model.contact.getDisplayName())])}))}}}),e.ChatBoxView=gn.extend({length:200,className:"chatbox hidden",is_chatroom:!1,events:{"change input.fileupload":"onFileSelection","click .chat-msg__action-edit":"onMessageEditButtonClicked","click .chat-msg__action-retract":"onMessageRetractButtonClicked","click .chatbox-navback":"showControlBox","click .close-chatbox-button":"close","click .new-msgs-indicator":"viewUnreadMessages","click .send-button":"onFormSubmitted","click .show-user-details-modal":"showUserDetailsModal","click .spoiler-toggle":"toggleSpoilerMessage","click .toggle-call":"toggleCall","click .toggle-clear":"clearMessages","click .toggle-compose-spoiler":"toggleComposeSpoilerMessage","click .upload-file":"toggleFileUpload","input .chat-textarea":"inputChanged","keydown .chat-textarea":"onKeyDown","keyup .chat-textarea":"onKeyUp","paste .chat-textarea":"onPaste","dragover .chat-textarea":"onDragOver","drop .chat-textarea":"onDrop"},async initialize(){this.initDebounced(),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"rendered",this.scrollDown),this.model.messages.on("reset",()=>{this.content.innerHTML="",this.removeAll()}),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model.presence,"change:show",this.onPresenceChanged),this.render(),await this.updateAfterMessagesFetched(),e.api.trigger("chatBoxViewInitialized",this)},initDebounced(){this.scrollDown=Object(ke.debounce)(this._scrollDown,50),this.markScrolled=Object(ke.debounce)(this._markScrolled,100)},render(){return this.el.innerHTML=Ma()(Object.assign(this.model.toJSON(),{unread_msgs:t("You have unread messages")})),this.content=this.el.querySelector(".chat-content"),this.renderMessageForm(),this.insertHeading(),this},renderToolbar(){if(!e.show_toolbar)return this;const t=Object.assign(this.model.toJSON(),this.getToolbarOptions());return this.el.querySelector(".chat-toolbar").innerHTML=Ja()(t),this.addSpoilerButton(t),this.addFileUploadButton(),e.api.trigger("renderToolbar",this),this},renderMessageForm(){const o=this.el.querySelector(".message-form-container");o.innerHTML=Da()(Object.assign(this.model.toJSON(),{message_limit:e.message_limit,hint_value:Object(ke.get)(this.el.querySelector(".spoiler-hint"),"value"),label_message:this.model.get("composing_spoiler")?t("Hidden message"):t("Message"),label_send:t("Send"),label_spoiler_hint:t("Optional hint"),message_value:Object(ke.get)(this.el.querySelector(".chat-textarea"),"value"),show_send_button:e.show_send_button,show_toolbar:e.show_toolbar,unread_msgs:t("You have unread messages")}));const n=this.el.querySelector(".chat-textarea");n.addEventListener("focus",e=>this.emitFocused(e)),n.addEventListener("blur",e=>this.emitBlurred(e)),this.renderToolbar()},showControlBox(){const t=e.chatboxviews.get("controlbox");t.show(),this.hide()},showUserDetailsModal(t){t.preventDefault(),this.user_details_modal===void 0&&(this.user_details_modal=new e.UserDetailsModal({model:this.model})),this.user_details_modal.show(t)},toggleFileUpload(){this.el.querySelector("input.fileupload").click()},onFileSelection(e){this.model.sendFiles(e.target.files)},onDragOver(e){e.preventDefault()},onDrop(e){0==e.dataTransfer.files.length||(e.preventDefault(),this.model.sendFiles(e.dataTransfer.files))},async addFileUploadButton(){if(await e.api.disco.supports(Za.NS.HTTPUPLOAD,e.domain)){if(this.el.querySelector(".chat-toolbar .upload-file"))return;this.el.querySelector(".chat-toolbar").insertAdjacentHTML("beforeend",Qa()({tooltip_upload_file:t("Choose a file to send")}))}},async addSpoilerButton(t){if(!t.show_spoiler_button||this.model.get("type")===e.CHATROOMS_TYPE)return;const o=this.model.get("jid");if(0===this.model.presence.resources.length)return;const n=await Promise.all(this.model.presence.resources.map(t=>e.api.disco.supports(Za.NS.SPOILER,"".concat(o,"/").concat(t.get("name"))))),a=n.reduce((e,t)=>e&&t,!0);if(a){const e=Ua()(this.model.toJSON());this.el.querySelector(".chat-toolbar").insertAdjacentHTML("afterBegin",e)}},insertHeading(){this.heading=new e.ChatBoxHeading({model:this.model}),this.heading.render(),this.heading.chatview=this;const t=this.el.querySelector(".flyout");return t.insertBefore(this.heading.el,t.querySelector(".chat-body")),this},getToolbarOptions(){let o;return o=this.model.get("composing_spoiler")?t("Click to write as a normal (non-spoiler) message"):t("Click to write your message as a spoiler"),{label_clear:t("Clear all messages"),label_message_limit:t("Message characters remaining"),label_toggle_spoiler:o,message_limit:e.message_limit,show_call_button:e.visible_toolbar_buttons.call,show_spoiler_button:e.visible_toolbar_buttons.spoiler,tooltip_start_call:t("Start a call")}},async updateAfterMessagesFetched(){await this.model.messages.fetched,await Promise.all(this.model.messages.map(e=>this.onMessageAdded(e))),this.insertIntoDOM(),this.scrollDown(),this.content.addEventListener("scroll",()=>this.markScrolled()),e.api.trigger("afterMessagesFetched",this)},insertIntoDOM(){return e.chatboxviews.insertRowColumn(this.el),e.api.trigger("chatBoxInsertedIntoDOM",this),this},showChatEvent(e){const t=new Date().toISOString();return this.content.insertAdjacentHTML("beforeend",ia()({extra_classes:"chat-event",message:e,isodate:t})),this.insertDayIndicator(this.content.lastElementChild),this.scrollDown(),t},showErrorMessage(e){this.content.insertAdjacentHTML("beforeend",Pa()({message:e,isodate:new Date().toISOString()})),this.scrollDown()},addSpinner(){let e=!!(0<arguments.length&&arguments[0]!==void 0)&&arguments[0];null===this.el.querySelector(".spinner")&&(e?(this.content.insertAdjacentHTML("beforeend",ua()()),this.scrollDown()):this.content.insertAdjacentHTML("afterbegin",ua()()))},clearSpinner(){this.content.querySelectorAll(".spinner").forEach(os.removeElement)},insertDayIndicator(e){const t=os.getPreviousElement(e,".message:not(.chat-state-notification)"),o=null===t?null:t.getAttribute("data-isodate"),n=e.getAttribute("data-isodate");if((null!==o||null!==n)&&(null===o||ts(n).isAfter(o,"day"))){const t=ts(n).startOf("day");e.insertAdjacentHTML("beforeBegin",Fa()({isodate:t.toISOString(),datestring:t.format("dddd MMM Do YYYY")}))}},getLastMessageDate(e){const t=os.getFirstChildElement(this.content,".message:not(.chat-state-notification)"),o=t?t.getAttribute("data-isodate"):null;if(null!==o&&ts(o).isAfter(e))return null;const n=os.getLastChildElement(this.content,".message:not(.chat-state-notification)"),a=n?n.getAttribute("data-isodate"):null;if(null===a)return null;if(ts(a).isBefore(e))return ts(a).toDate();const s=es(".message:not(.chat-state-notification)",this.content).map(t=>t.getAttribute("data-isodate")),i=e.toISOString();s.push(i),s.sort();const r=s.lastIndexOf(i);return 0===r?null:ts(s[r-1]).toDate()},setScrollPosition(e){if(this.model.get("scrolled")){const t=os.getNextElement(e,".chat-msg");if(t&&(0===this.content.scrollTop||this.model.get("top_visible_message"))){const e=this.model.get("top_visible_message")||t;this.model.set("top_visible_message",e),this.content.scrollTop=e.offsetTop-30}}else this.scrollDown()},showHelpMessages(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"info",o=2<arguments.length?arguments[2]:void 0;return e.forEach(e=>{this.content.insertAdjacentHTML("beforeend",Ba()({isodate:new Date().toISOString(),type:t,message:ga.a.filterXSS(e,{whiteList:{strong:[]}})}))}),!0===o?this.addSpinner():!1===o&&this.clearSpinner(),this.scrollDown()},shouldShowOnTextMessage(){return!os.isVisible(this.el)},insertMessage(e){if("error"===e.model.get("type")){const t=this.content.querySelector("[data-msgid=\"".concat(e.model.get("msgid"),"\"]"));if(t)return t.insertAdjacentElement("afterend",e.el),this.trigger("messageInserted",e.el)}const t=ts(e.model.get("time")).toDate()||new Date,o=this.getLastMessageDate(t);if(null===o)this.content.insertAdjacentElement("afterbegin",e.el);else{const t=es("[data-isodate=\"".concat(o.toISOString(),"\"]:last"),this.content).pop();if("error"===e.model.get("type")&&os.hasClass("chat-error",t)&&t.textContent===e.model.get("message"))return;t.insertAdjacentElement("afterend",e.el),this.markFollowups(e.el)}return this.trigger("messageInserted",e.el)},markFollowups(e){const t=e.getAttribute("data-from"),o=e.previousElementSibling,n=ts(e.getAttribute("data-isodate")),a=e.nextElementSibling;os.hasClass("chat-msg--action",e)||os.hasClass("chat-msg--action",o)||os.hasClass("chat-info",e)||os.hasClass("chat-info",o)||o.getAttribute("data-from")!==t||!n.isBefore(ts(o.getAttribute("data-isodate")).add(10,"minutes"))||e.getAttribute("data-encrypted")!==o.getAttribute("data-encrypted")||os.addClass("chat-msg--followup",e);a&&(!os.hasClass("chat-msg--action",e)&&os.hasClass("chat-info",e)&&a.getAttribute("data-from")===t&&ts(a.getAttribute("data-isodate")).isBefore(n.add(10,"minutes"))&&e.getAttribute("data-encrypted")===a.getAttribute("data-encrypted")?os.addClass("chat-msg--followup",a):os.removeClass("chat-msg--followup",a))},async showMessage(t){await t.initialized;const o=this.add(t.get("id"),new e.MessageView({model:t}));await o.render(),es(".chat-state-notification[data-csn=\"".concat(t.get("from"),"\"]"),this.content).forEach(os.removeElement),this.insertMessage(o),this.insertDayIndicator(o.el),this.setScrollPosition(o.el),os.isNewMessage(t)&&("me"===t.get("sender")?this.model.set("scrolled",!1):this.model.get("scrolled",!0)&&!os.isOnlyChatStateNotification(t)&&this.showNewMessagesIndicator()),this.shouldShowOnTextMessage()?this.show():this.scrollDown(),t.get("correcting")&&this.insertIntoTextArea(t.get("message"),!0,!0)},async onMessageAdded(t){const o=t.get("id");o&&this.get(o)||(!t.get("dangling_retraction")&&(await this.showMessage(t)),e.api.trigger("messageAdded",{message:t,chatbox:this.model}))},parseMessageForCommands(e){const o=e.replace(/^\s*/,"").match(/^\/(.*)\s*$/);if(o){if("clear"===o[1])return this.clearMessages(),!0;if("close"===o[1])return this.close(),!0;if("help"===o[1]){const e=["<strong>/clear</strong>: ".concat(t("Remove messages")),"<strong>/close</strong>: ".concat(t("Close this chat")),"<strong>/me</strong>: ".concat(t("Write in the third person")),"<strong>/help</strong>: ".concat(t("Show this menu"))];return this.showHelpMessages(e),!0}}},async onFormSubmitted(t){t.preventDefault();const o=this.el.querySelector(".chat-textarea"),n=o.value.trim();if(e.message_limit&&n.length>e.message_limit||!n.replace(/\s/g,"").length)return;if(!e.connection.authenticated)return this.showHelpMessages(["Sorry, the connection has been lost, and your message could not be sent"],"error"),void e.api.connection.reconnect();let a={},s;this.model.get("composing_spoiler")&&(a=this.el.querySelector("form.sendXMPPMessage input.spoiler-hint"),s=a.value),os.addClass("disabled",o),o.setAttribute("disabled","disabled");const i=this.parseMessageForCommands(n),r=i?null:await this.model.sendMessage(n,s);(i||r)&&(a.value="",o.value="",os.removeClass("correcting",o),o.style.height="auto"),r&&e.api.trigger("messageSend",r),o.removeAttribute("disabled"),os.removeClass("disabled",o),o.focus(),this.model.setChatState(e.ACTIVE,{silent:!0})},updateCharCounter(t){if(e.message_limit){const o=this.el.querySelector(".message-limit"),n=e.message_limit-t.length;o.textContent=n,1>n?os.addClass("error",o):os.removeClass("error",o)}},onPaste(e){return 0===e.clipboardData.files.length?void this.updateCharCounter(e.clipboardData.getData("text/plain")):(e.preventDefault(),void this.model.sendFiles(Array.from(e.clipboardData.files)))},onKeyUp(e){this.updateCharCounter(e.target.value)},onKeyDown(t){if(!t.ctrlKey){if(!t.shiftKey&&!t.altKey&&!t.metaKey){if(t.keyCode===mo.keycodes.FORWARD_SLASH)return;if(t.keyCode===mo.keycodes.ESCAPE)return this.onEscapePressed(t);if(t.keyCode===mo.keycodes.ENTER)return this.onEnterPressed(t);if(t.keyCode===mo.keycodes.UP_ARROW&&!t.target.selectionEnd){const e=this.el.querySelector(".chat-textarea");if(!e.value||os.hasClass("correcting",e))return this.editEarlierMessage()}else if(t.keyCode===mo.keycodes.DOWN_ARROW&&t.target.selectionEnd===t.target.value.length&&os.hasClass("correcting",this.el.querySelector(".chat-textarea")))return this.editLaterMessage()}[mo.keycodes.SHIFT,mo.keycodes.META,mo.keycodes.META_RIGHT,mo.keycodes.ESCAPE,mo.keycodes.ALT].includes(t.keyCode)||this.model.get("chat_state")!==e.COMPOSING&&this.model.setChatState(e.COMPOSING)}},getOwnMessages(){return this.model.messages.filter({sender:"me"})},onEnterPressed(e){return this.onFormSubmitted(e)},onEscapePressed(e){e.preventDefault();const t=this.model.messages.findLastIndex("correcting"),o=0<=t?this.model.messages.at(t):null;o&&o.save("correcting",!1),this.insertIntoTextArea("",!0,!1)},retractOwnMessage(e){this.model.sendRetractionMessage(e),e.save({retracted:new Date().toISOString(),retracted_id:e.get("origin_id"),is_ephemeral:!0})},async onMessageRetractButtonClicked(o){o.preventDefault();const n=os.ancestor(o.target,".message"),a=n.getAttribute("data-msgid"),s=n.getAttribute("data-isodate"),i=this.model.messages.findWhere({msgid:a,time:s});if("me"!==i.get("sender"))return vt.error("onMessageEditButtonClicked called for someone else's message!");const r=t("Be aware that other XMPP/Jabber clients (and servers) may not yet support retractions and that this message may not be removed everywhere."),l=[t("Are you sure you want to retract this message?")];e.show_retraction_warning&&(l[1]=r);const d=await e.api.confirm(t("Confirm"),l);d&&this.retractOwnMessage(i)},onMessageEditButtonClicked(e){e.preventDefault();const o=this.model.messages.findLastIndex("correcting"),n=0<=o?this.model.messages.at(o):null,a=os.ancestor(e.target,".chat-msg"),s=this.model.messages.findWhere({msgid:a.getAttribute("data-msgid")}),i=this.el.querySelector(".chat-textarea");i.value&&(null===n||n.get("message")!==i.value)&&!confirm(t("You have an unsent message which will be lost if you continue. Are you sure?"))||(n===s?(s.save("correcting",!1),this.insertIntoTextArea("",!0,!1)):(null!==n&&n.save("correcting",!1),s.save("correcting",!0),this.insertIntoTextArea(os.prefixMentions(s),!0,!0)))},editLaterMessage(){let e=this.model.messages.findLastIndex("correcting"),t;if(0<=e)for(this.model.messages.at(e).save("correcting",!1);e<this.model.messages.length-1;){e+=1;const o=this.model.messages.at(e);if(o.get("editable")){t=o;break}}t?(this.insertIntoTextArea(os.prefixMentions(t),!0,!0),t.save("correcting",!0)):this.insertIntoTextArea("",!0,!1)},editEarlierMessage(){let e=this.model.messages.findLastIndex("correcting"),t;if(0<=e)for(this.model.messages.at(e).save("correcting",!1);0<e;){e-=1;const o=this.model.messages.at(e);if(o.get("editable")){t=o;break}}t=t||this.getOwnMessages().reverse().find(e=>e.get("editable")),t&&(this.insertIntoTextArea(os.prefixMentions(t),!0,!0),t.save("correcting",!0))},inputChanged(e){const t=e.target.scrollHeight+"px";e.target.style.height!=t&&(e.target.style.height="auto",e.target.style.height=t)},async clearMessages(e){e&&e.preventDefault&&e.preventDefault();const o=confirm(t("Are you sure you want to clear the messages from this conversation?"));return!0===o&&(await this.model.clearMessages()),this},insertIntoTextArea(e){let t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],o=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],n=3<arguments.length?arguments[3]:void 0;const a=this.el.querySelector(".chat-textarea");if(o?os.addClass("correcting",a):os.removeClass("correcting",a),t)a.value=n&&"string"==typeof t?a.value.replace(new RegExp(t,"g"),(o,a)=>a==n-t.length?e+" ":o):e;else{let t=a.value;t&&" "!==t[t.length-1]&&(t+=" "),a.value=t+e+" "}this.updateCharCounter(a.value),os.placeCaretAtEnd(a)},toggleCall(t){t.stopPropagation(),e.api.trigger("callButtonClicked",{connection:e.connection,model:this.model})},toggleComposeSpoilerMessage(){this.model.set("composing_spoiler",!this.model.get("composing_spoiler")),this.renderMessageForm(),this.focus()},toggleSpoilerMessage(e){e&&e.preventDefault&&e.preventDefault();const t=e.target,o=t.firstElementChild;os.slideToggleElement(t.parentElement.parentElement.querySelector(".spoiler")),"closed"==t.getAttribute("data-toggle-state")?(t.textContent="Show less",o.classList.remove("fa-eye"),o.classList.add("fa-eye-slash"),t.insertAdjacentElement("afterBegin",o),t.setAttribute("data-toggle-state","open")):(t.textContent="Show more",o.classList.remove("fa-eye-slash"),o.classList.add("fa-eye"),t.insertAdjacentElement("afterBegin",o),t.setAttribute("data-toggle-state","closed"))},onPresenceChanged(e){const o=e.get("show"),n=this.model.getDisplayName();let a;os.isVisible(this.el)&&("offline"===o?a=t("%1$s has gone offline",n):"away"===o?a=t("%1$s has gone away",n):"dnd"===o?a=t("%1$s is busy",n):"online"===o&&(a=t("%1$s is online",n)),a&&(this.content.insertAdjacentHTML("beforeend",Wa()({message:a,isodate:new Date().toISOString()})),this.scrollDown()))},async close(t){return t&&t.preventDefault&&t.preventDefault(),Ka.history.getFragment()==="converse/chat?jid="+this.model.get("jid")&&e.router.navigate(""),e.api.connection.connected()&&(this.model.setChatState(e.INACTIVE),this.model.sendChatState()),await this.model.close(),this.remove(),e.api.trigger("chatBoxClosed",this),this},emitBlurred(t){this.el.contains(document.activeElement)||e.api.trigger("chatBoxBlurred",this,t)},emitFocused(t){e.api.trigger("chatBoxFocused",this,t)},focus(){const e=this.el.getElementsByClassName("chat-textarea")[0];return e&&document.activeElement!==e&&e.focus(),this},maybeFocus(){e.auto_focus&&this.focus()},hide(){return this.el.classList.add("hidden"),this},afterShown(){this.model.clearUnreadMsgCounter(),this.model.setChatState(e.ACTIVE),this.scrollDown(),this.maybeFocus()},show(){return os.isVisible(this.el)?void this.maybeFocus():void(e.api.trigger("beforeShowingChatView",this),e.animate?os.fadeIn(this.el,()=>this.afterShown()):(os.showElement(this.el),this.afterShown()))},showNewMessagesIndicator(){os.showElement(this.el.querySelector(".new-msgs-indicator"))},hideNewMessagesIndicator(){const e=this.el.querySelector(".new-msgs-indicator");null!==e&&e.classList.add("hidden")},_markScrolled:function(){let e=!0;const t=this.content.scrollTop+this.content.clientHeight>=this.content.scrollHeight-62;t&&(e=!1,this.onScrolledDown()),os.safeSave(this.model,{scrolled:e,top_visible_message:null})},viewUnreadMessages(){this.model.save({scrolled:!1,top_visible_message:null}),this.scrollDown()},_scrollDown(){void 0===this.content||os.isVisible(this.content)&&!this.model.get("scrolled")&&(0===this.content.scrollTop||this.content.scrollTop<this.content.scrollHeight/2?os.removeClass("smooth-scroll",this.content):e.api.settings.get("animate")&&os.addClass("smooth-scroll",this.content),this.content.scrollTop=this.content.scrollHeight)},onScrolledDown(){this.hideNewMessagesIndicator(),"hidden"!==e.windowState&&this.model.clearUnreadMsgCounter(),e.api.trigger("chatBoxScrolledDown",{chatbox:this.model})},onWindowStateChanged(t){"visible"===t?!this.model.isHidden()&&this.model.get("num_unread",0)&&this.model.clearUnreadMsgCounter():"hidden"==t&&(this.model.setChatState(e.INACTIVE,{silent:!0}),this.model.sendChatState())}}),e.api.listen.on("chatBoxViewsInitialized",()=>{const t=e.chatboxviews;e.chatboxes.on("add",async o=>{t.get(o.get("id"))||o.get("type")!==e.PRIVATE_CHAT_TYPE||(await o.initialized,t.add(o.get("id"),new e.ChatBoxView({model:o})))})}),e.api.listen.on("windowStateChanged",function(t){e.chatboxviews&&e.chatboxviews.forEach(e=>{"controlbox"!==e.model.get("id")&&e.onWindowStateChanged(t.state)})}),e.api.listen.on("connected",()=>e.api.disco.own.features.add(Za.NS.SPOILER)),Object.assign(e.api,{chatviews:{get(t){return void 0===t?Object.values(e.chatboxviews.getAll()):Object(ke.isString)(t)?e.chatboxviews.get(t):t.map(t=>e.chatboxviews.get(t))}}})}});const{utils:ns}=mo.env;mo.plugins.add("converse-headlines",{dependencies:["converse-chat"],overrides:{ChatBoxes:{model(e,t){const{_converse:o}=this.__super__;return e.type==o.HEADLINES_TYPE?new o.HeadlinesBox(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){async function e(e){if(ns.isHeadlineMessage(o,e)){const t=e.getAttribute("from");if(t.includes("@")&&!o.roster.get(t)&&!o.allow_non_roster_messaging)return;if(null===e.querySelector("body"))return;const n=o.chatboxes.create({id:t,jid:t,type:o.HEADLINES_TYPE,from:t}),a=await n.getMessageAttributesFromStanza(e,e);await n.messages.create(a),o.api.trigger("message",{chatbox:n,stanza:e})}}function t(){o.connection.addHandler(t=>(e(t),!0),null,"message")}const{_converse:o}=this;o.HeadlinesBox=o.ChatBox.extend({defaults(){return{bookmarked:!1,hidden:["mobile","fullscreen"].includes(o.view_mode),message_type:"headline",num_unread:0,time_opened:this.get("time_opened")||new Date().getTime(),type:o.HEADLINES_TYPE}},initialize(){this.initMessages(),this.set({box_id:"box-".concat(btoa(this.get("jid")))})}}),o.api.listen.on("connected",t),o.api.listen.on("reconnected",t),Object.assign(o.api,{headlines:{async get(e){async function t(e){let t=await o.api.chatboxes.get(e);return!t&&a?t=await o.api.chatboxes.create(e,n,o.HeadlinesBox):(t=t&&t.get("type")===o.HEADLINES_TYPE?t:null,t&&Object.keys(n).length&&t.save(n)),t}let n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},a=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2];if(e===void 0){const e=await o.api.chatboxes.get();return e.filter(e=>e.get("type")===o.HEADLINES_TYPE)}return Object(ke.isString)(e)?t(e):Promise.all(e.map(e=>t(e)))}}})}});const{Strophe:as,$iq:ss}=mo.env,is=mo.env.utils;as.addNamespace("PING","urn:xmpp:ping"),mo.plugins.add("converse-ping",{initialize(){function e(e){a=new Date;const t=e.getAttribute("from"),o=e.getAttribute("id"),s=ss({type:"result",to:t,id:o});return n.connection.sendIQ(s),!0}function t(){return void 0!==n.connection.disco&&n.api.disco.own.features.add(as.NS.PING),n.connection.addHandler(e,as.NS.PING,"iq","get")}function o(){n.connection.addHandler(()=>{if(0<n.ping_interval)return a=new Date,!0})}const{_converse:n}=this;let a;n.api.settings.update({ping_interval:60}),setTimeout(()=>{if(0<n.ping_interval){const e=new Date;return a||(a=e),!((e-a)/1e3>n.ping_interval)||n.api.ping()}},1e3);const s=function(){t(),o()};n.api.listen.on("connected",s),n.api.listen.on("reconnected",s),n.api.listen.on("windowStateChanged",function(e){"visible"===e.state&&n.api.connection.connected()&&n.api.ping(null,5e3)}),Object.assign(n.api,{async ping(e,t){if(a=new Date,e=e||as.getDomainFromJid(n.bare_jid),n.connection){const o=ss({type:"get",to:e,id:is.getUniqueId("ping")}).c("ping",{xmlns:as.NS.PING}),a=await n.api.sendIQ(o,t||1e4,!1);return null===a?(vt.warn("Timeout while pinging ".concat(e)),e===as.getDomainFromJid(n.bare_jid)&&n.api.connection.reconnect()):is.isErrorStanza(a)&&(vt.error("Error while pinging ".concat(e)),vt.error(a)),!0}return!1}})}});const{Strophe:rs,$iq:ls}=mo.env;rs.addNamespace("PUBSUB_ERROR",rs.NS.PUBSUB+"#errors"),mo.plugins.add("converse-pubsub",{dependencies:["converse-disco"],initialize(){const{_converse:e}=this;Object.assign(e.api,{pubsub:{async"publish"(t,o,n,a){let s=!(4<arguments.length&&void 0!==arguments[4])||arguments[4];const i=ls({from:e.bare_jid,type:"set",to:t}).c("pubsub",{xmlns:rs.NS.PUBSUB}).c("publish",{node:o}).cnode(n.tree()).up().up();a&&(t=t||e.bare_jid,(await e.api.disco.supports(rs.NS.PUBSUB+"#publish-options",t))?(i.c("publish-options").c("x",{xmlns:rs.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t("".concat(rs.NS.PUBSUB,"#publish-options")).up().up(),Object.keys(a).forEach(e=>i.c("field",{var:e}).c("value").t(a[e]).up().up())):vt.warn("_converse.api.publish: ".concat(t," does not support #publish-options, ")+"so we didn't set them even though they were provided."));try{e.api.sendIQ(i)}catch(t){if(t instanceof Element&&s&&t.querySelector("precondition-not-met[xmlns=\"".concat(rs.NS.PUBSUB_ERROR,"\"]"))){const t=i.nodeTree;t.querySelector("publish-options").outerHTML="",vt.warn("PubSub: Republishing without publish options. ".concat(t.outerHTML)),e.api.sendIQ(t)}else throw t}}}})}});const{Backbone:ds,Strophe:cs,$build:ps,$pres:us}=mo.env;mo.plugins.add("converse-status",{initialize(){function e(e){o.api.trigger("statusInitialized",e)}function t(t){if(t=void 0!==o.xmppstatus&&t,t)e(t);else{const n="converse.xmppstatus-".concat(o.bare_jid);o.xmppstatus=new o.XMPPStatus({id:n}),o.xmppstatus.browserStorage=o.createStore(n,"session"),o.xmppstatus.fetch({success:()=>e(t),error:()=>e(t),silent:!0})}}const{_converse:o}=this;o.XMPPStatus=ds.Model.extend({defaults(){return{status:o.default_state}},initialize(){this.on("change",e=>{!Object(ke.isObject)(e.changed)||("status"in e.changed||"status_message"in e.changed)&&this.sendPresence(this.get("status"),this.get("status_message"))})},getNickname(){return o.nickname},getFullname(){return""},constructPresence(e,t){let n;if(e=Object(ke.isString)(e)?e:this.get("status")||o.default_state,t=Object(ke.isString)(t)?t:this.get("status_message"),n="unavailable"===e||"probe"===e||"error"===e||"unsubscribe"===e||"unsubscribed"===e||"subscribe"===e||"subscribed"===e?us({type:e}):"offline"===e?us({type:"unavailable"}):"online"===e?us():us().c("show").t(e).up(),t&&n.c("status").t(t).up(),n.c("priority").t(Object(ke.isNaN)(+o.priority)?0:o.priority).up(),o.idle){const e=new Date;e.setSeconds(e.getSeconds()-o.idle_seconds),n.c("idle",{xmlns:cs.NS.IDLE,since:e.toISOString()})}return n},sendPresence(e,t){o.api.send(this.constructPresence(e,t))}}),o.sendCSI=function(e){o.api.send(ps(e,{xmlns:cs.NS.CSI})),o.inactive=!(e!==o.INACTIVE)},o.onUserActivity=function(){0<o.idle_seconds&&(o.idle_seconds=0);Object(ke.get)(o.connection,"authenticated")&&(o.inactive&&o.sendCSI(o.ACTIVE),o.idle&&(o.idle=!1,o.xmppstatus.sendPresence()),!0===o.auto_changed_status&&(o.auto_changed_status=!1,o.xmppstatus.set("status",o.default_state)))},o.onEverySecond=function(){if(Object(ke.get)(o.connection,"authenticated")){const e=o.xmppstatus.get("status");o.idle_seconds++,0<o.csi_waiting_time&&o.idle_seconds>o.csi_waiting_time&&!o.inactive&&o.sendCSI(o.INACTIVE),0<o.idle_presence_timeout&&o.idle_seconds>o.idle_presence_timeout&&!o.idle&&(o.idle=!0,o.xmppstatus.sendPresence()),0<o.auto_away&&o.idle_seconds>o.auto_away&&"away"!==e&&"xa"!==e&&"dnd"!==e?(o.auto_changed_status=!0,o.xmppstatus.set("status","away")):0<o.auto_xa&&o.idle_seconds>o.auto_xa&&"xa"!==e&&"dnd"!==e&&(o.auto_changed_status=!0,o.xmppstatus.set("status","xa"))}},o.registerIntervalHandler=function(){if(!(1>o.auto_away&&1>o.auto_xa&&1>o.csi_waiting_time&&1>o.idle_presence_timeout)){o.idle_seconds=0,o.auto_changed_status=!1,window.addEventListener("click",o.onUserActivity),window.addEventListener("focus",o.onUserActivity),window.addEventListener("keypress",o.onUserActivity),window.addEventListener("mousemove",o.onUserActivity);window.addEventListener(o.unloadevent,o.onUserActivity,{once:!0,passive:!0}),window.addEventListener(o.unloadevent,()=>{o.session&&o.session.save("active",!1)}),o.everySecondTrigger=window.setInterval(o.onEverySecond,1e3)}},o.api.listen.on("presencesInitialized",e=>{e||o.registerIntervalHandler()}),o.api.listen.on("clearSession",()=>{o.shouldClearCache()&&o.xmppstatus&&(o.xmppstatus.destroy(),delete o.xmppstatus)}),o.api.listen.on("connected",()=>t(!1)),o.api.listen.on("reconnected",()=>t(!0)),Object.assign(o.api.user,{status:{get(){return o.xmppstatus.get("status")},set(e,t){const n={status:e};if(!Object.keys(o.STATUS_WEIGHTS).includes(e))throw new Error("Invalid availability value. See https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.2.2.1");Object(ke.isString)(t)&&(n.status_message=t),o.xmppstatus.sendPresence(e),o.xmppstatus.save(n)},message:{get(){return o.xmppstatus.get("status_message")},set(e){o.xmppstatus.save({status_message:e})}}}})}});const{Backbone:ms,Strophe:gs,$iq:hs,$pres:_s,dayjs:fs,sizzle:bs}=mo.env,vs=mo.env.utils;mo.plugins.add("converse-roster",{dependencies:["converse-status"],initialize(){function e(e){const t=n.roster&&n.roster.findWhere({jid:e.get("jid")});t!==void 0&&t.save({num_unread:e.get("num_unread")})}function t(){n.presences&&(n.presences.forEach(e=>{e.resources.reject(e=>e===void 0).forEach(e=>e.destroy({silent:!0}))}),n.presences.clearSession())}async function o(){await n.api.waitUntil("VCardsInitialized"),n.roster=new n.RosterContacts;let e="converse.contacts-".concat(n.bare_jid);n.roster.browserStorage=n.createStore(e),n.roster.data=new ms.Model,e="converse-roster-model-".concat(n.bare_jid),n.roster.data.id=e,n.roster.data.browserStorage=n.createStore(e),n.roster.data.fetch(),e="converse.roster.groups".concat(n.bare_jid),n.rostergroups=new n.RosterGroups,n.rostergroups.browserStorage=n.createStore(e),n.api.trigger("rosterInitialized")}const{_converse:n}=this,{__:a}=n;n.api.settings.update({allow_contact_requests:!0,auto_subscribe:!1,synchronize_availability:!0}),n.api.promises.add(["cachedRoster","roster","rosterContactsFetched","rosterGroupsFetched","rosterInitialized"]),n.HEADER_CURRENT_CONTACTS=a("My contacts"),n.HEADER_PENDING_CONTACTS=a("Pending contacts"),n.HEADER_REQUESTING_CONTACTS=a("Contact requests"),n.HEADER_UNGROUPED=a("Ungrouped"),n.HEADER_UNREAD=a("New messages");const s={};s[n.HEADER_UNREAD]=0,s[n.HEADER_REQUESTING_CONTACTS]=1,s[n.HEADER_CURRENT_CONTACTS]=2,s[n.HEADER_UNGROUPED]=3,s[n.HEADER_PENDING_CONTACTS]=4,n.registerPresenceHandler=function(){n.unregisterPresenceHandler(),n.presence_ref=n.connection.addHandler(e=>(n.roster.presenceHandler(e),!0),null,"presence",null)},n.rejectPresenceSubscription=function(e,t){const o=_s({to:e,type:"unsubscribed"});t&&""!==t&&o.c("status").t(t),n.api.send(o)},n.sendInitialPresence=function(){n.send_initial_presence&&n.xmppstatus.sendPresence()},n.populateRoster=async function(){let e=!!(0<arguments.length&&arguments[0]!==void 0)&&arguments[0];e&&(n.send_initial_presence=!0);try{await n.rostergroups.fetchRosterGroups(),n.api.trigger("rosterGroupsFetched"),await n.roster.fetchRosterContacts(),n.api.trigger("rosterContactsFetched")}catch(e){vt.error(e)}finally{n.sendInitialPresence()}};const i=ms.Model.extend({idAttribute:"name"}),r=n.Collection.extend({model:i});n.Presence=ms.Model.extend({defaults:{show:"offline"},initialize(){this.resources=new r;const e="converse.identities-".concat(this.get("jid"));this.resources.browserStorage=n.createStore(e,"session"),this.listenTo(this.resources,"update",this.onResourcesChanged),this.listenTo(this.resources,"change",this.onResourcesChanged)},onResourcesChanged(){const e=this.getHighestPriorityResource(),t=Object(ke.get)(e,"attributes.show","offline");this.get("show")!==t&&this.save({show:t})},getHighestPriorityResource(){return this.resources.sortBy(e=>"".concat(e.get("priority"),"-").concat(e.get("timestamp"))).reverse()[0]},addResource(e){const t=e.getAttribute("from"),o=gs.getResourceFromJid(t),n=bs("delay[xmlns=\"".concat(gs.NS.DELAY,"\"]"),e).pop(),a=Object(ke.propertyOf)(e.querySelector("priority"))("textContent")||0,s=this.resources.get(o),i={name:o,priority:Object(ke.isNaN)(parseInt(a,10))?0:parseInt(a,10),show:Object(ke.propertyOf)(e.querySelector("show"))("textContent")||"online",timestamp:n?fs(n.getAttribute("stamp")).toISOString():new Date().toISOString()};s?s.save(i):this.resources.create(i)},removeResource(e){const t=this.resources.get(e);t&&t.destroy()}}),n.Presences=n.Collection.extend({model:n.Presence}),n.RosterContact=ms.Model.extend({defaults:{chat_state:void 0,image:n.DEFAULT_IMAGE,image_type:n.DEFAULT_IMAGE_TYPE,num_unread:0,status:void 0},async initialize(e){this.initialized=vs.getResolveablePromise(),this.setPresence();const{jid:t}=e,o=gs.getBareJidFromJid(t).toLowerCase();e.jid=o,this.set(Object.assign({groups:[],id:o,jid:o,user_id:gs.getNodeFromJid(t)},e)),this.listenTo(this.presence,"change:show",()=>n.api.trigger("contactPresenceChanged",this)),this.listenTo(this.presence,"change:show",()=>this.trigger("presenceChanged")),await n.api.trigger("rosterContactInitialized",this,{Synchronous:!0}),this.initialized.resolve()},setPresence(){const e=this.get("jid");this.presence=n.presences.findWhere({jid:e})||n.presences.create({jid:e})},getDisplayName(){return this.get("nickname")?this.get("nickname"):this.get("jid")},getFullname(){return this.get("jid")},subscribe(e){const t=_s({to:this.get("jid"),type:"subscribe"});e&&""!==e&&t.c("status").t(e).up();const o=n.xmppstatus.getNickname()||n.xmppstatus.getFullname();return o&&t.c("nick",{xmlns:gs.NS.NICK}).t(o).up(),n.api.send(t),this.save("ask","subscribe"),this},ackSubscribe(){n.api.send(_s({type:"subscribe",to:this.get("jid")}))},ackUnsubscribe(){n.api.send(_s({type:"unsubscribe",to:this.get("jid")})),this.removeFromRoster(),this.destroy()},unauthorize(e){return n.rejectPresenceSubscription(this.get("jid"),e),this},authorize(e){const t=_s({to:this.get("jid"),type:"subscribed"});return e&&""!==e&&t.c("status").t(e),n.api.send(t),this},removeFromRoster(){const e=hs({type:"set"}).c("query",{xmlns:gs.NS.ROSTER}).c("item",{jid:this.get("jid"),subscription:"remove"});return n.api.sendIQ(e)}}),n.RosterContacts=n.Collection.extend({model:n.RosterContact,comparator(e,t){const o=e.presence.get("show")||"offline",a=t.presence.get("show")||"offline";if(n.STATUS_WEIGHTS[o]===n.STATUS_WEIGHTS[a]){const o=e.getDisplayName().toLowerCase(),n=t.getDisplayName().toLowerCase();return o<n?-1:o>n?1:0}return n.STATUS_WEIGHTS[o]<n.STATUS_WEIGHTS[a]?-1:1},onConnected(){this.registerRosterHandler(),this.registerRosterXHandler()},registerRosterHandler(){n.connection.addHandler(e=>(n.roster.onRosterPush(e),!0),gs.NS.ROSTER,"iq","set")},registerRosterXHandler(){let e=0;n.connection.addHandler(function(t){return window.setTimeout(function(){n.connection.flush(),n.roster.subscribeToSuggestedItems.bind(n.roster)(t)},e),e+=250*t.querySelectorAll("item").length,!0},gs.NS.ROSTERX,"message",null)},async fetchRosterContacts(){const e=await new Promise((e,t)=>{this.fetch({add:!0,silent:!0,success:e,error:(o,n)=>t(n)})});return vs.isErrorObject(e)&&(vt.error(e),n.session.set("roster_cached",!1),this.data.save("version",void 0)),n.session.get("roster_cached")?void n.api.trigger("cachedRoster",e):(n.send_initial_presence=!0,n.roster.fetchFromServer())},subscribeToSuggestedItems(e){return Array.from(e.querySelectorAll("item")).forEach(e=>{"add"===e.getAttribute("action")&&n.roster.addAndSubscribe(e.getAttribute("jid"),n.xmppstatus.getNickname()||n.xmppstatus.getFullname())}),!0},isSelf(e){return vs.isSameBareJID(e,n.connection.jid)},addAndSubscribe(e,t,o,a,s){const i=e=>{e instanceof n.RosterContact&&e.subscribe(a)};this.addContactToRoster(e,t,o,s).then(i,i)},sendContactAddIQ(e,t,o){t=Object(ke.isEmpty)(t)?null:t;const a=hs({type:"set"}).c("query",{xmlns:gs.NS.ROSTER}).c("item",{jid:e,name:t});return o.forEach(e=>a.c("group").t(e).up()),n.api.sendIQ(a)},async addContactToRoster(t,o,n,s){n=n||[];try{await this.sendContactAddIQ(t,o,n)}catch(n){return vt.error(n),alert(a("Sorry, there was an error while trying to add %1$s as a contact.",o||t)),n}return this.create(Object.assign({ask:void 0,nickname:o,groups:n,jid:t,requesting:!1,subscription:"none"},s),{sort:!1})},subscribeBack(e,t){const o=this.get(e);if(o instanceof n.RosterContact)o.authorize().subscribe();else{const o=e=>{e instanceof n.RosterContact&&e.authorize().subscribe()},a=Object(ke.get)(bs("nick[xmlns=\"".concat(gs.NS.NICK,"\"]"),t).pop(),"textContent",null);this.addContactToRoster(e,a,[],{subscription:"from"}).then(o,o)}},getNumOnlineContacts(){const e=["offline","unavailable"];return Object(ke.sum)(this.models.filter(t=>!e.includes(t.presence.get("show"))))},onRosterPush(e){const t=e.getAttribute("id"),o=e.getAttribute("from");if(o&&o!==n.bare_jid)return void vt.warn("Ignoring roster illegitimate roster push message from ".concat(e.getAttribute("from")));n.api.send(hs({type:"result",id:t,from:n.connection.jid}));const a=bs("query[xmlns=\"".concat(gs.NS.ROSTER,"\"]"),e).pop();this.data.save("version",a.getAttribute("ver"));const s=bs("item",a);if(1<s.length)throw vt.error(e),new Error("Roster push query may not contain more than one \"item\" element.");return 0===s.length?(vt.warn(e),void vt.warn("Received a roster push stanza without an \"item\" element.")):(this.updateContact(s.pop()),void n.api.trigger("rosterPush",e))},rosterVersioningSupported(){return n.api.disco.stream.getFeature("ver","urn:xmpp:features:rosterver")&&this.data.get("version")},async fetchFromServer(){const e=hs({type:"get",id:vs.getUniqueId("roster")}).c("query",{xmlns:gs.NS.ROSTER});this.rosterVersioningSupported()&&e.attrs({ver:this.data.get("version")});const t=await n.api.sendIQ(e,null,!1);if("error"!==t.getAttribute("type")){const e=bs("query[xmlns=\"".concat(gs.NS.ROSTER,"\"]"),t).pop();if(e){const t=bs("item",e);t.forEach(e=>this.updateContact(e)),this.data.save("version",e.getAttribute("ver"))}}else if(!vs.isServiceUnavailableError(t))return vt.error(t),void vt.error("Error while trying to fetch roster from the server");n.session.save("roster_cached",!0),n.api.trigger("roster",t)},updateContact(e){const t=e.getAttribute("jid");if(this.isSelf(t))return;const o=this.get(t),n=e.getAttribute("subscription"),a=e.getAttribute("ask"),s=Array.from(e.getElementsByTagName("group")).map(t=>t.textContent);if(!o){if("none"===n&&null===a||"remove"===n)return;this.create({ask:a,nickname:e.getAttribute("name"),groups:s,jid:t,subscription:n},{sort:!1})}else{if("remove"===n)return o.destroy();o.save({subscription:n,ask:a,nickname:e.getAttribute("name"),requesting:null,groups:s})}},createRequestingContact(e){const t=gs.getBareJidFromJid(e.getAttribute("from")),o=Object(ke.get)(bs("nick[xmlns=\"".concat(gs.NS.NICK,"\"]"),e).pop(),"textContent",null);n.api.trigger("contactRequest",this.create({jid:t,subscription:"none",ask:null,requesting:!0,nickname:o}))},handleIncomingSubscription(e){const t=e.getAttribute("from"),o=gs.getBareJidFromJid(t),s=this.get(o);n.allow_contact_requests||n.rejectPresenceSubscription(t,a("This client does not allow presence subscriptions")),n.auto_subscribe?s&&"to"===s.get("subscription")?s.authorize():this.subscribeBack(o,e):s?"none"===s.get("subscription")?"subscribe"===s.get("ask")&&s.authorize():s.authorize():this.createRequestingContact(e)},handleOwnPresence(e){const t=e.getAttribute("from"),o=gs.getResourceFromJid(t),a=e.getAttribute("type");if(n.connection.jid!==t&&"unavailable"!==a&&(!0===n.synchronize_availability||n.synchronize_availability===o)){const t=Object(ke.propertyOf)(e.querySelector("show"))("textContent")||"online";n.xmppstatus.save({status:t},{silent:!0});const o=Object(ke.propertyOf)(e.querySelector("status"))("textContent");o&&n.xmppstatus.save({status_message:o})}n.jid===t&&"unavailable"===a&&n.xmppstatus.sendPresence()},presenceHandler(e){const t=e.getAttribute("type");if("error"===t)return!0;const o=e.getAttribute("from"),n=gs.getBareJidFromJid(o);if(this.isSelf(n))return this.handleOwnPresence(e);if(!bs("query[xmlns=\"".concat(gs.NS.MUC,"\"]"),e).length){const a=Object(ke.propertyOf)(e.querySelector("status"))("textContent"),s=this.get(n);if(s&&a!==s.get("status")&&s.save({status:a}),"subscribed"===t&&s)s.ackSubscribe();else if("unsubscribed"===t&&s)s.ackUnsubscribe();else{if("unsubscribe"===t)return;if("subscribe"===t)this.handleIncomingSubscription(e);else if("unavailable"===t&&s){const e=gs.getResourceFromJid(o);s.presence.removeResource(e)}else s&&s.presence.addResource(e)}}}}),n.RosterGroup=ms.Model.extend({initialize(e){this.set(Object.assign({description:a("Click to hide these contacts"),state:n.OPENED},e)),this.contacts=new n.RosterContacts}}),n.RosterGroups=n.Collection.extend({model:n.RosterGroup,comparator(e,t){e=e.get("name"),t=t.get("name");const o=s,i=Object.keys(s),r=i.includes(e),l=i.includes(t);if(!r&&!l)return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0;if(r&&l)return o[e]<o[t]?-1:o[e]>o[t]?1:0;if(!r&&l){const e=n.HEADER_CURRENT_CONTACTS;return o[e]<o[t]?-1:o[e]>o[t]?1:0}if(r&&!l){const t=n.HEADER_CURRENT_CONTACTS;return o[e]<o[t]?-1:o[e]>o[t]?1:0}},fetchRosterGroups(){return new Promise(e=>{this.fetch({success:e,silent:!0})})}}),n.unregisterPresenceHandler=function(){n.presence_ref!==void 0&&(n.connection.deleteHandler(n.presence_ref),delete n.presence_ref)},n.api.listen.on("chatBoxesInitialized",()=>{n.chatboxes.on("change:num_unread",e),n.chatboxes.on("add",e=>{e.get("type")===n.PRIVATE_CHAT_TYPE&&e.setRosterContact(e.get("jid"))})}),n.api.listen.on("beforeTearDown",()=>n.unregisterPresenceHandler()),n.api.waitUntil("rosterContactsFetched").then(()=>{n.roster.on("add",e=>{const t=n.chatboxes.findWhere({jid:e.get("jid")});t&&t.setRosterContact(e.get("jid"))})}),n.api.listen.on("streamResumptionFailed",()=>n.session.set("roster_cached",!1)),n.api.listen.on("clearSession",()=>{t(),n.shouldClearCache()&&(n.roster&&(Object(ke.invoke)(n,"roster.data.destroy"),n.roster.clearSession(),delete n.roster),n.rostergroups&&(n.rostergroups.clearSession(),delete n.rostergroups))}),n.api.listen.on("statusInitialized",e=>{if(e)n.haveResumed()||t();else{n.presences=new n.Presences;const e="converse.presences-".concat(n.bare_jid);n.presences.browserStorage=n.createStore(e,"session"),n.presences.fetch()}n.api.trigger("presencesInitialized",e)}),n.api.listen.on("presencesInitialized",async e=>{e?n.api.trigger("rosterReadyAfterReconnection"):await o(),n.roster.onConnected(),n.registerPresenceHandler(),n.populateRoster(!n.connection.restored)}),Object.assign(n.api,{contacts:{async get(e){await n.api.waitUntil("rosterContactsFetched");const t=e=>n.roster.get(gs.getBareJidFromJid(e));if(e===void 0)e=n.roster.pluck("jid");else if(Object(ke.isString)(e))return t(e);return e.map(t)},async add(e,t){if(await n.api.waitUntil("rosterContactsFetched"),!Object(ke.isString)(e)||!e.includes("@"))throw new TypeError("contacts.add: invalid jid");n.roster.addAndSubscribe(e,Object(ke.isEmpty)(t)?e:t)}}})}});const{Strophe:ys}=mo.env,xs=mo.env.utils;ys.addNamespace("SM","urn:xmpp:sm:3"),mo.plugins.add("converse-smacks",{initialize(){function e(){return(!c.api.connection.isType("bosh")||c.isTestEnv())&&c.api.disco.stream.getFeature("sm",ys.NS.SM)}function t(e){if(!c.session.get("smacks_enabled"))return!0;const t=parseInt(e.getAttribute("h"),10),o=c.session.get("num_stanzas_handled_by_server"),n=t-o;if(0>n){const e="New reported stanza count lower than previous. "+"New: ".concat(t," - Previous: ").concat(o);vt.error(e)}const a=c.session.get("unacked_stanzas");if(n>a.length){const e="Higher reported acknowledge count than unacknowledged stanzas. "+"Reported Acknowledged Count: ".concat(n," -")+"Unacknowledged Stanza Count: ".concat(a.length," -")+"New: ".concat(t," - Previous: ").concat(o);vt.error(e)}return c.session.save({num_stanzas_handled_by_server:t,num_stanzas_since_last_ack:0,unacked_stanzas:a.slice(n)}),!0}function o(){if(c.session.get("smacks_enabled")){const e=c.session.get("num_stanzas_handled"),t=xs.toStanza("<a xmlns=\"".concat(ys.NS.SM,"\" h=\"").concat(e,"\"/>"));c.api.send(t)}return!0}function n(e){if(c.session.get("smacks_enabled")&&(xs.isTagEqual(e,"iq")||xs.isTagEqual(e,"presence")||xs.isTagEqual(e,"message"))){const e=c.session.get("num_stanzas_handled");c.session.save("num_stanzas_handled",e+1)}return!0}function a(){c.session&&c.session.save({smacks_enabled:!1,num_stanzas_handled:0,num_stanzas_handled_by_server:0,num_stanzas_since_last_ack:0,unacked_stanzas:[]})}function s(e){const t={smacks_enabled:!0};return["1","true"].includes(e.getAttribute("resume"))&&(t.smacks_stream_id=e.getAttribute("id")),c.session.save(t),!0}function i(e){return e.querySelector("item-not-found")?vt.warn("Could not resume previous SMACKS session, session id not found. A new session will be established."):(vt.error("Failed to enable stream management"),vt.error(e.outerHTML)),a(),c.api.trigger("streamResumptionFailed"),!0}function r(){const e=c.session.get("unacked_stanzas");c.session.save("unacked_stanzas",[]),e.forEach(e=>c.api.send(e))}function l(e){s(e),t(e),r(),c.connection.do_bind=!1,c.connection.authenticated=!0,c.connection.restored=!0,c.connection._changeConnectStatus(ys.Status.CONNECTED,null)}async function d(){const e=xs.getResolveablePromise();c.connection._addSysHandler(t=>e.resolve(l(t)),ys.NS.SM,"resumed"),c.connection._addSysHandler(t=>e.resolve(i(t)),ys.NS.SM,"failed");const t=c.session.get("smacks_stream_id"),o=c.session.get("num_stanzas_handled"),n=xs.toStanza("<resume xmlns=\"".concat(ys.NS.SM,"\" h=\"").concat(o,"\" previd=\"").concat(t,"\"/>"));c.api.send(n),c.connection.flush(),await e}const{_converse:c}=this;c.api.settings.update({enable_smacks:!0,smacks_max_unacked_stanzas:5}),c.api.listen.on("userSessionInitialized",function(){c.session.save({smacks_enabled:c.session.get("smacks_enabled")||!1,num_stanzas_handled:c.session.get("num_stanzas_handled")||0,num_stanzas_handled_by_server:c.session.get("num_stanzas_handled_by_server")||0,num_stanzas_since_last_ack:c.session.get("num_stanzas_since_last_ack")||0,unacked_stanzas:c.session.get("unacked_stanzas")||[]})}),c.api.listen.on("beforeResourceBinding",async function(){c.enable_smacks&&(await e())&&(c.connection.addHandler(n),c.connection.addHandler(o,ys.NS.SM,"r"),c.connection.addHandler(t,ys.NS.SM,"a"),c.session.get("smacks_stream_id")?await d():a())}),c.api.listen.on("afterResourceBinding",async function(){if(c.enable_smacks&&!c.session.get("smacks_enabled")&&(await e())){const e=xs.getResolveablePromise();c.connection._addSysHandler(t=>e.resolve(s(t)),ys.NS.SM,"enabled"),c.connection._addSysHandler(t=>e.resolve(i(t)),ys.NS.SM,"failed");const t=c.api.connection.isType("websocket")||c.isTestEnv(),o=xs.toStanza("<enable xmlns=\"".concat(ys.NS.SM,"\" resume=\"").concat(t,"\"/>"));c.api.send(o),c.connection.flush(),await e}}),c.api.listen.on("send",function(e){if(!c.session)return void vt.warn("No _converse.session!");if(c.session.get("smacks_enabled")&&(xs.isTagEqual(e,"iq")||xs.isTagEqual(e,"presence")||xs.isTagEqual(e,"message"))){const t=ys.serialize(e);c.session.save("unacked_stanzas",(c.session.get("unacked_stanzas")||[]).concat([t]));const o=c.smacks_max_unacked_stanzas;if(0<o){const e=c.session.get("num_stanzas_since_last_ack")+1;0==e%o&&c.api.send(xs.toStanza("<r xmlns=\"".concat(ys.NS.SM,"\"/>"))),c.session.save({num_stanzas_since_last_ack:e})}}})}});var Ss=o(148),ws=o.n(Ss);const{Backbone:ks,Strophe:Es,$iq:Cs,dayjs:As}=mo.env,Ts=mo.env.utils;mo.plugins.add("converse-vcard",{dependencies:["converse-status","converse-roster"],overrides:{XMPPStatus:{getNickname(){const{_converse:e}=this.__super__,t=this.__super__.getNickname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("nickname"):t},getFullname(){const{_converse:e}=this.__super__,t=this.__super__.getFullname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("fullname"):t}},RosterContact:{getDisplayName(){return!this.get("nickname")&&this.vcard?this.vcard.getDisplayName():this.__super__.getDisplayName.apply(this)},getFullname(){return this.vcard?this.vcard.get("fullname"):this.__super__.getFullname.apply(this)}}},initialize(){async function e(e,t){const o=t.querySelector("vCard");let n={};if(null!==o&&(n={stanza:t,fullname:Object(ke.get)(o.querySelector("FN"),"textContent"),nickname:Object(ke.get)(o.querySelector("NICKNAME"),"textContent"),image:Object(ke.get)(o.querySelector("PHOTO BINVAL"),"textContent"),image_type:Object(ke.get)(o.querySelector("PHOTO TYPE"),"textContent"),url:Object(ke.get)(o.querySelector("URL"),"textContent"),role:Object(ke.get)(o.querySelector("ROLE"),"textContent"),email:Object(ke.get)(o.querySelector("EMAIL USERID"),"textContent"),vcard_updated:new Date().toISOString(),vcard_error:void 0}),n.image){const e=Ts.base64ToArrayBuffer(n.image),t=await crypto.subtle.digest("SHA-1",e);n.image_hash=Ts.arrayBufferToHex(t)}return n}function t(e,t,o){const n=Cs(t?{type:e,to:t}:{type:e});return o?n.cnode(o):n.c("vCard",{xmlns:Es.NS.VCARD}),n}async function o(o,n){const a=Es.getBareJidFromJid(n)===o.bare_jid?null:n;let s;try{s=await o.api.sendIQ(t("get",a))}catch(e){return{stanza:e,jid:n,vcard_error:new Date().toISOString()}}return e(n,s)}async function n(e){let t;if(e instanceof r.Message){if("error"===e.get("type"))return;t=e.get("from")}else t=e.get("jid");await r.api.waitUntil("VCardsInitialized"),e.vcard=r.vcards.findWhere({jid:t}),e.vcard||(e.vcard=r.vcards.create({jid:t})),e.vcard.on("change",()=>e.trigger("vcard:change"))}function a(e){const t=Object(ke.get)(e,"collection.chatbox"),o=Es.getResourceFromJid(e.get("from"));if(t&&t.get("nick")===o)return r.xmppstatus.vcard;else{const t=e.occupant&&e.occupant.get("jid")||e.get("from");return t?r.vcards.findWhere({jid:t})||r.vcards.create({jid:t}):void vt.error("Could not assign VCard for message because no JID found! msgid: ".concat(e.get("msgid")))}}async function s(e){await r.api.waitUntil("VCardsInitialized");["error","info"].includes(e.get("type"))||(e.vcard=a(e))}function i(){r.shouldClearCache()&&(r.api.promises.add("VCardsInitialized"),r.vcards&&(r.vcards.clearSession(),delete r.vcards))}const{_converse:r}=this;r.api.promises.add("VCardsInitialized"),r.VCard=ks.Model.extend({defaults:{image:r.DEFAULT_IMAGE,image_type:r.DEFAULT_IMAGE_TYPE},set(e,t,o){let n;return"object"==typeof e?(n=e,o=t):(n={})[e]=t,Object(ke.has)(n,"image")&&!n.image?(n.image=r.DEFAULT_IMAGE,n.image_type=r.DEFAULT_IMAGE_TYPE,ks.Model.prototype.set.call(this,n,o)):ks.Model.prototype.set.apply(this,arguments)},getDisplayName(){return this.get("nickname")||this.get("fullname")||this.get("jid")}}),r.VCards=r.Collection.extend({model:r.VCard,initialize(){this.on("add",e=>{r.api.vcard.update(e)})}}),r.initVCardCollection=async function(){r.vcards=new r.VCards,r.vcards.browserStorage=r.createStore("".concat(r.bare_jid,"-converse.vcards")),await new Promise(e=>{r.vcards.fetch({success:e,error:e},{silent:!0})});const e=r.vcards;if(r.session){const t=r.session.get("bare_jid");r.xmppstatus.vcard=e.findWhere({jid:t})||e.create({jid:t})}r.api.trigger("VCardsInitialized")},r.api.listen.on("chatBoxInitialized",e=>n(e)),r.api.listen.on("chatRoomInitialized",e=>n(e)),r.api.listen.on("chatRoomMessageInitialized",e=>s(e)),r.api.listen.on("addClientFeatures",()=>r.api.disco.own.features.add(Es.NS.VCARD)),r.api.listen.on("clearSession",()=>i()),r.api.listen.on("messageInitialized",e=>n(e)),r.api.listen.on("rosterContactInitialized",e=>n(e)),r.api.listen.on("statusInitialized",r.initVCardCollection),Object.assign(r.api,{vcard:{set(e,o){if(!e)throw Error("No jid provided for the VCard data");const n=Es.xmlHtmlNode(ws()(o)).firstElementChild;return r.api.sendIQ(t("set",e,n))},get(e,t){if(Object(ke.isString)(e))return o(r,e);if(t||!e.get("vcard_updated")||!As(e.get("vcard_error")).isSame(new Date,"day")){const t=e.get("jid");if(!t)throw new Error("No JID to get vcard for!");return o(r,t)}return Promise.resolve({})},async update(e,t){const o=await this.get(e,t);delete o.stanza,e.save(o)}}})}});const{_:js,Backbone:Ns}=mo.env,Ms=mo.env.utils;mo.plugins.add("converse-autocomplete",{initialize(){const{_converse:e}=this;e.FILTER_CONTAINS=function(e,t){return RegExp(s.regExpEscape(t.trim()),"i").test(e)},e.FILTER_STARTSWITH=function(e,t){return RegExp("^"+s.regExpEscape(t.trim()),"i").test(e)};const t=function(e,t){return e.length===t.length?e<t?-1:1:e.length-t.length},o=(e,t)=>{t=t.trim();const o=document.createElement("li");o.setAttribute("aria-selected","false");const n=new RegExp("("+t+")","ig"),a=t?e.split(n):[e];return a.forEach(e=>{if(t&&e.match(n)){const t=document.createElement("mark");t.textContent=e,o.appendChild(t)}else o.appendChild(document.createTextNode(e))}),o};class n extends String{constructor(e){super();const t=Array.isArray(e)?{label:e[0],value:e[1]}:"object"==typeof e&&"label"in e&&"value"in e?e:{label:e,value:e};this.label=t.label||t.value,this.value=t.value}get lenth(){return this.label.length}toString(){return""+this.label}valueOf(){return this.toString()}}class a{constructor(n){let a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};this.is_opened=!1,this.container=Ms.hasClass(".suggestion-box",n)?n:n.querySelector(".suggestion-box"),this.input=this.container.querySelector(".suggestion-box__input"),this.input.setAttribute("aria-autocomplete","list"),this.ul=this.container.querySelector(".suggestion-box__results"),this.status=this.container.querySelector(".suggestion-box__additions"),js.assignIn(this,{match_current_word:!1,ac_triggers:[],include_triggers:[],min_chars:2,max_items:10,auto_evaluate:!0,auto_first:!1,data:js.identity,filter:e.FILTER_CONTAINS,sort:!1!==a.sort&&t,item:o},a),this.index=-1,this.bindEvents(),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||a.list||[]}bindEvents(){const e={blur:()=>this.close({reason:"blur"})};this.auto_evaluate&&(e.input=()=>this.evaluate()),this._events={input:e,form:{submit:()=>this.close({reason:"submit"})},ul:{mousedown:e=>this.onMouseDown(e),mouseover:e=>this.onMouseOver(e)}},s.bind(this.input,this._events.input),s.bind(this.input.form,this._events.form),s.bind(this.ul,this._events.ul)}set list(e){if(Array.isArray(e)||"function"==typeof e)this._list=e;else if("string"==typeof e&&js.includes(e,","))this._list=e.split(/\s*,\s*/);else if(e=s.getElement(e),e&&e.children){const t=[];Array.prototype.slice.apply(e.children).forEach(function(e){if(!e.disabled){const o=e.textContent.trim(),n=e.value||o,a=e.label||o;""!==n&&t.push({label:a,value:n})}}),this._list=t}document.activeElement===this.input&&this.evaluate()}get selected(){return-1<this.index}get opened(){return this.is_opened}close(e){this.opened&&(this.ul.setAttribute("hidden",""),this.is_opened=!1,this.index=-1,this.trigger("suggestion-box-close",e||{}))}insertValue(e){this.match_current_word?Ms.replaceCurrentWord(this.input,e.value):this.input.value=e.value}open(){this.ul.removeAttribute("hidden"),this.is_opened=!0,this.auto_first&&-1===this.index&&this.goto(0),this.trigger("suggestion-box-open")}destroy(){s.unbind(this.input,this._events.input),s.unbind(this.input.form,this._events.form),this.input.removeAttribute("aria-autocomplete")}next(){const e=this.ul.children.length;this.goto(this.index<e-1?this.index+1:e?0:-1)}previous(){const e=this.ul.children.length,t=this.index-1;this.goto(this.selected&&-1!==t?t:e-1)}goto(e){const t=this.ul.children;this.selected&&t[this.index].setAttribute("aria-selected","false"),this.index=e,-1<e&&0<t.length&&(t[e].setAttribute("aria-selected","true"),t[e].focus(),this.status.textContent=t[e].textContent,this.ul.scrollTop=t[e].offsetTop-this.ul.clientHeight+t[e].clientHeight,this.trigger("suggestion-box-highlight",{text:this.suggestions[this.index]}))}select(e){if(e?this.index=Ms.siblingIndex(e):e=this.ul.children[this.index],e){const e=this.suggestions[this.index];this.insertValue(e),this.close({reason:"select"}),this.auto_completing=!1,this.trigger("suggestion-box-selectcomplete",{text:e})}}onMouseOver(e){const t=Ms.ancestor(e.target,"li");t&&this.goto(Array.prototype.slice.call(this.ul.children).indexOf(t))}onMouseDown(e){if(0===e.button){const t=Ms.ancestor(e.target,"li");t&&(e.preventDefault(),this.select(t,e.target))}}onKeyDown(e){if(this.opened){if(js.includes([mo.keycodes.ENTER,mo.keycodes.TAB],e.keyCode)&&this.selected)return e.preventDefault(),e.stopPropagation(),this.select(),!0;if(e.keyCode===mo.keycodes.ESCAPE)return this.close({reason:"esc"}),!0;if(js.includes([mo.keycodes.UP_ARROW,mo.keycodes.DOWN_ARROW],e.keyCode))return e.preventDefault(),e.stopPropagation(),this[e.keyCode===mo.keycodes.UP_ARROW?"previous":"next"](),!0}if(!js.includes([mo.keycodes.SHIFT,mo.keycodes.META,mo.keycodes.META_RIGHT,mo.keycodes.ESCAPE,mo.keycodes.ALT],e.keyCode))if(this.ac_triggers.includes(e.key))"Tab"===e.key&&e.preventDefault(),this.auto_completing=!0;else if("Backspace"===e.key){const t=Ms.getCurrentWord(e.target,e.target.selectionEnd-1);this.ac_triggers.includes(t[0])&&(this.auto_completing=!0)}}evaluate(e){const t=this.selected&&e&&(e.keyCode===mo.keycodes.UP_ARROW||e.keyCode===mo.keycodes.DOWN_ARROW);if(!this.auto_evaluate&&!this.auto_completing||t)return;const o="function"==typeof this._list?this._list():this._list;if(0===o.length)return;let a=this.match_current_word?Ms.getCurrentWord(this.input):this.input.value;const s=this.ac_triggers.includes(a[0]);s&&(this.auto_completing=!0,!this.include_triggers.includes(e.key)&&(a=a.slice("1"))),(s||a.length)&&a.length>=this.min_chars?(this.index=-1,this.ul.innerHTML="",this.suggestions=o.map(e=>new n(this.data(e,a))).filter(e=>this.filter(e,a)),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.max_items),this.suggestions.forEach(e=>this.ul.appendChild(this.item(e,a))),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):(this.close({reason:"nomatches"}),!s&&(this.auto_completing=!1))}}Object.assign(a.prototype,Ns.Events);const s={getElement(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null},bind(e,t){if(e)for(var o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const n=t[o];o.split(/\s+/).forEach(t=>e.addEventListener(t,n))}},unbind(e,t){if(e)for(var o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const n=t[o];o.split(/\s+/).forEach(t=>e.removeEventListener(t,n))}},regExpEscape(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}};e.AutoComplete=a}});var Is=o(149),Os=o.n(Is),Rs=o(150),Ds=o.n(Rs),Ls=o(151),Ps=o.n(Ls);const{Backbone:qs,Strophe:Bs,_:zs}=mo.env,Fs=mo.env.utils;mo.plugins.add("converse-bookmark-views",{dependencies:["converse-chatboxes","converse-muc","converse-muc-views"],overrides:{ChatRoomView:{events:{"click .toggle-bookmark":"toggleBookmark"},async renderHeading(){this.__super__.renderHeading.apply(this,arguments);const{_converse:e}=this.__super__;if(e.allow_bookmarks){const t=await e.checkBookmarksSupport();t&&this.renderBookmarkToggle()}}}},initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({hide_open_bookmarks:!0,muc_respect_autojoin:!0}),Object.assign(e,{removeBookmarkViaEvent(o){o.preventDefault();const n=o.target.getAttribute("data-bookmark-name"),a=o.target.getAttribute("data-room-jid");confirm(t("Are you sure you want to remove the bookmark \"%1$s\"?",n))&&zs.invokeMap(e.bookmarks.where({jid:a}),qs.Model.prototype.destroy)},addBookmarkViaEvent(t){t.preventDefault();const o=t.target.getAttribute("data-room-jid");e.api.rooms.open(o,{bring_to_foreground:!0}),e.chatboxviews.get(o).renderBookmarkForm()}});Object.assign(e.ChatRoomView.prototype,{renderBookmarkToggle(){if(this.el.querySelector(".chat-head .toggle-bookmark"))return;const{_converse:e}=this.__super__,{__:t}=e,o=Ps()(zs.assignIn(this.model.toJSON(),{info_toggle_bookmark:this.model.get("bookmarked")?t("Unbookmark this groupchat"):t("Bookmark this groupchat"),bookmarked:this.model.get("bookmarked")})),n=this.el.querySelector(".chatbox-buttons"),a=n.querySelector(".close-chatbox-button");a?a.insertAdjacentHTML("afterend",o):n.insertAdjacentHTML("beforeEnd",o)},setBookmarkState(){if(e.bookmarks!==void 0){const t=e.bookmarks.where({jid:this.model.get("jid")});t.length?this.model.save("bookmarked",!0):this.model.save("bookmarked",!1)}},renderBookmarkForm(){if(this.hideChatRoomContents(),!this.bookmark_form){this.bookmark_form=new e.MUCBookmarkForm({model:this.model,chatroomview:this});const t=this.el.querySelector(".chatroom-body");t.insertAdjacentElement("beforeend",this.bookmark_form.el)}Fs.showElement(this.bookmark_form.el)},toggleBookmark(t){t&&(t.preventDefault(),t.stopPropagation());const o=e.bookmarks.where({jid:this.model.get("jid")});o.length?o.forEach(e=>e.destroy()):this.renderBookmarkForm()}}),e.MUCBookmarkForm=qs.VDOMView.extend({className:"muc-bookmark-form",events:{"submit form":"onBookmarkFormSubmitted","click .button-cancel":"closeBookmarkForm"},initialize(e){this.chatroomview=e.chatroomview,this.render()},toHTML(){return Ds()({default_nick:this.model.get("nick"),heading:t("Bookmark this groupchat"),label_autojoin:t("Would you like this groupchat to be automatically joined upon startup?"),label_cancel:t("Cancel"),label_name:t("The name for this bookmark:"),label_nick:t("What should your nickname for this groupchat be?"),label_submit:t("Save"),name:this.model.get("name")})},onBookmarkFormSubmitted(t){t.preventDefault(),e.bookmarks.createBookmark({jid:this.model.get("jid"),autojoin:zs.get(t.target.querySelector("input[name=\"autojoin\"]"),"checked")||!1,name:zs.get(t.target.querySelector("input[name=name]"),"value"),nick:zs.get(t.target.querySelector("input[name=nick]"),"value")}),this.closeBookmarkForm(t)},closeBookmarkForm(e){e.preventDefault(),this.chatroomview.closeForm()}}),e.BookmarksView=qs.VDOMView.extend({tagName:"div",className:"bookmarks-list list-container rooms-list-container",events:{"click .add-bookmark":"addBookmark","click .bookmarks-toggle":"toggleBookmarksList","click .remove-bookmark":"removeBookmark","click .open-room":"openRoom"},initialize(){this.listenTo(this.model,"add",this.render),this.listenTo(this.model,"remove",this.render),this.listenTo(e.chatboxes,"add",this.render),this.listenTo(e.chatboxes,"remove",this.render);const t="converse.room-bookmarks".concat(e.bare_jid,"-list-model");this.list_model=new e.BookmarksList({id:t}),this.list_model.browserStorage=e.createStore(t);const o=()=>{this.render(),this.insertIntoControlBox()};this.list_model.fetch({success:o,error:o})},toHTML(){return Os()({_converse:e,bookmarks:this.model,desc_bookmarks:t("Click to toggle the bookmarks list"),info_leave_room:t("Leave this groupchat"),info_remove:t("Remove this bookmark"),info_remove_bookmark:t("Unbookmark this groupchat"),info_title:t("Show more information on this groupchat"),label_bookmarks:t("Bookmarks"),open_title:t("Click to open this groupchat"),toggle_state:this.list_model.get("toggle-state"),is_bookmark_hidden:t=>!!(e.hide_open_bookmarks&&e.chatboxes.get(t.get("jid"))),hidden:this.model.getUnopenedBookmarks().length&&!0})},insertIntoControlBox(){const t=e.chatboxviews.get("controlbox");if(t!==void 0&&!Fs.rootContains(e.root,this.el)){const e=t.el.querySelector(".list-container--bookmarks");e&&e.parentNode.replaceChild(this.el,e)}},openRoom(t){t.preventDefault();const o=t.target.textContent,n=t.target.getAttribute("data-room-jid"),a={name:o||Bs.unescapeNode(Bs.getNodeFromJid(n))||n};e.api.rooms.open(n,a,!0)},removeBookmark:e.removeBookmarkViaEvent,addBookmark:e.addBookmarkViaEvent,toggleBookmarksList(t){t&&t.preventDefault&&t.preventDefault();const o=t.target.matches(".fa")?t.target:t.target.querySelector(".fa");Fs.hasClass("fa-caret-down",o)?(Fs.slideIn(this.el.querySelector(".bookmarks")),this.list_model.save({"toggle-state":e.CLOSED}),o.classList.remove("fa-caret-down"),o.classList.add("fa-caret-right")):(o.classList.remove("fa-caret-right"),o.classList.add("fa-caret-down"),Fs.slideOut(this.el.querySelector(".bookmarks")),this.list_model.save({"toggle-state":e.OPENED}))}});e.api.listen.on("bookmarksInitialized",async function(){await e.api.waitUntil("roomsPanelRendered"),e.bookmarksview=new e.BookmarksView({model:e.bookmarks}),e.api.trigger("bookmarkViewsInitialized")}),e.api.listen.on("chatRoomViewInitialized",e=>e.setBookmarkState())}});var Hs=o(39),Us=o(152),Vs=o.n(Us),Ws=o(153),Gs=o.n(Ws),Js=o(154),$s=o.n(Js),Qs=o(155),Ys=o.n(Qs);const{Strophe:Xs,Backbone:Ks,dayjs:Zs}=mo.env,ei=mo.env.utils,ti={Error:"error",Connecting:"info","Connection failure":"error",Authenticating:"info","Authentication failure":"error",Connected:"info",Disconnected:"error",Disconnecting:"warn",Attached:"info",Redirect:"info",Reconnecting:"warn"},oi={0:"Error",1:"Connecting",2:"Connection failure",3:"Authenticating",4:"Authentication failure",5:"Connected",6:"Disconnected",7:"Disconnecting",8:"Attached",9:"Redirect",10:"Reconnecting"},ni=[0,1,2,3,4,7,10];mo.plugins.add("converse-controlbox",{dependencies:["converse-modal","converse-chatboxes","converse-chat","converse-rosterview","converse-chatview"],enabled(e){return!e.singleton},overrides:{ChatBoxes:{model(e,t){const{_converse:o}=this.__super__;return e&&"controlbox"==e.id?new o.ControlBox(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){function e(){const e=new t.ControlBox({id:"controlbox"});return t.chatboxes.add(e)}const{_converse:t}=this,{__:o}=t;t.api.settings.update({allow_logout:!0,default_domain:void 0,locked_domain:void 0,show_controlbox_by_default:!1,sticky_controlbox:!1}),t.api.promises.add("controlBoxInitialized"),t.ControlBox=t.ChatBox.extend({defaults(){return{bookmarked:!1,box_id:"controlbox",chat_state:void 0,closed:!t.show_controlbox_by_default,num_unread:0,time_opened:this.get("time_opened")||new Date().getTime(),type:t.CONTROLBOX_TYPE,url:""}},initialize(){"controlbox"===this.get("id")?this.set({time_opened:Zs(0).valueOf()}):t.ChatBox.prototype.initialize.apply(this,arguments)},validate(e){return e.type===t.CONTROLBOX_TYPE?"embedded"===t.view_mode&&t.singleton?"Controlbox not relevant in embedded view mode":void 0:t.ChatBox.prototype.validate.call(this,e)},maybeShow(e){return e||"controlbox"!==this.get("id")?t.ChatBox.prototype.maybeShow.call(this,e):this},onReconnection:function(){}}),t.ControlBoxView=t.ChatBoxView.extend({tagName:"div",className:"chatbox",id:"controlbox",events:{"click a.close-chatbox-button":"close"},initialize(){t.controlboxtoggle===void 0&&(t.controlboxtoggle=new t.ControlBoxToggle),t.controlboxtoggle.el.insertAdjacentElement("afterend",this.el),this.listenTo(this.model,"change:connected",this.onConnected),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"hide",this.hide),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"change:closed",this.ensureClosedState),this.render(),t.api.trigger("controlBoxInitialized",this)},render(){this.model.get("connected")&&void 0===this.model.get("closed")&&this.model.set("closed",!t.show_controlbox_by_default),this.el.innerHTML=Gs()(Object.assign(this.model.toJSON())),this.model.get("closed")?this.hide():this.show();const e=Object(ke.get)(t,"connection",{});return e.connected&&e.authenticated&&!e.disconnecting?this.model.get("connected")&&this.renderControlBoxPane():this.renderLoginPanel(),this},onConnected(){this.model.get("connected")&&this.render()},createBrandHeadingHTML(){return Vs()({sticky_controlbox:t.sticky_controlbox})},insertBrandHeading(){const e=this.el.querySelector(".brand-heading-container");if(null===e){const e=this.el.querySelector(".controlbox-head");e.insertAdjacentHTML("beforeend",this.createBrandHeadingHTML())}else e.outerHTML=this.createBrandHeadingHTML()},renderLoginPanel(){if(this.el.classList.add("logged-out"),this.loginpanel)this.loginpanel.render();else{this.loginpanel=new t.LoginPanel({model:new t.LoginPanelModel});const e=this.el.querySelector(".controlbox-panes");e.innerHTML="",e.appendChild(this.loginpanel.render().el),this.insertBrandHeading()}return this.loginpanel.initPopovers(),this},renderControlBoxPane(){this.loginpanel&&(this.loginpanel.remove(),delete this.loginpanel);this.controlbox_pane&&ei.isVisible(this.controlbox_pane.el)||(this.el.classList.remove("logged-out"),this.controlbox_pane=new t.ControlBoxPane,this.el.querySelector(".controlbox-panes").insertAdjacentElement("afterBegin",this.controlbox_pane.el))},async close(e){if((e&&e.preventDefault&&e.preventDefault(),!("closeAllChatBoxes"===Object(ke.get)(e,"name")&&(t.disconnection_cause!==t.LOGOUT||t.show_controlbox_by_default)))&&!t.sticky_controlbox){const e=Object(ke.get)(t,"connection",{});return e.connected&&!e.disconnecting?await new Promise((e,t)=>this.model.save({closed:!0},{success:e,error:t})):this.model.trigger("hide"),t.api.trigger("controlBoxClosed",this),this}},ensureClosedState(){this.model.get("closed")?this.hide():this.show()},hide(e){if(!t.sticky_controlbox)return ei.addClass("hidden",this.el),t.api.trigger("chatBoxClosed",this),t.api.connection.connected()||t.controlboxtoggle.render(),t.controlboxtoggle.show(e),this},onControlBoxToggleHidden(){this.model.set("closed",!1),this.el.classList.remove("hidden"),t.api.trigger("controlBoxOpened",this)},show(){return t.controlboxtoggle.hide(this.onControlBoxToggleHidden.bind(this)),this},showHelpMessages(){}}),t.LoginPanelModel=Ks.Model.extend({defaults:{errors:[]}}),t.LoginPanel=Ks.VDOMView.extend({tagName:"div",id:"converse-login-panel",className:"controlbox-pane fade-in",events:{"submit form#converse-login":"authenticate","change input":"validate"},initialize(){this.listenTo(this.model,"change",this.render),this.listenTo(t.connfeedback,"change",this.render),this.render()},toHTML(){const e=t.connfeedback.get("connection_status");let n,a;return ni.includes(e)&&(a=oi[e],n=ti[a]),Ys()(Object.assign(this.model.toJSON(),{__:o,_converse:t,ANONYMOUS:t.ANONYMOUS,EXTERNAL:t.EXTERNAL,LOGIN:t.LOGIN,PREBIND:t.PREBIND,auto_login:t.auto_login,authentication:t.authentication,connection_status:e,conn_feedback_class:n,conn_feedback_subject:a,conn_feedback_message:t.connfeedback.get("message"),placeholder_username:(t.locked_domain||t.default_domain)&&o("Username")||o("user@domain"),show_trust_checkbox:"on"!==t.trusted&&"off"!==t.trusted}))},initPopovers(){Array.from(this.el.querySelectorAll("[data-title]")).forEach(e=>{new ya.a.Popover(e,{trigger:"mobile"===t.view_mode&&"click"||"hover",dismissible:"mobile"===t.view_mode&&!0||!1,container:this.el.parentElement.parentElement.parentElement})})},validate(){const e=this.el.querySelector("form"),n=e.querySelector("input[name=jid]");return!n.value||t.locked_domain||t.default_domain||ei.isValidJID(n.value)?(n.setCustomValidity(""),!0):(n.setCustomValidity(o("Please enter a valid XMPP address")),!1)},authenticate(e){if(e&&e.preventDefault&&e.preventDefault(),t.authentication===t.ANONYMOUS)return this.connect(t.jid,null);if(!this.validate())return;const o=new FormData(e.target);"on"===t.trusted||"off"===t.trusted?t.config.save({trusted:"on"===t.trusted,storage:"on"===t.trusted?"persistent":"session"}):t.config.save({trusted:o.get("trusted")&&!0||!1,storage:o.get("trusted")?"persistent":"session"});let n=o.get("jid");if(t.locked_domain){const e="@"+t.locked_domain;n.endsWith(e)&&(n=n.substr(0,n.length-e.length)),n=Xs.escapeNode(n)+e}else t.default_domain&&!n.includes("@")&&(n=n+"@"+t.default_domain);this.connect(n,o.get("password"))},connect(e,o){["converse/login","converse/register"].includes(Ks.history.getFragment())&&t.router.navigate("",{replace:!0}),t.connection&&t.connection.reset(),t.api.user.login(e,o)}}),t.ControlBoxPane=Ks.NativeView.extend({tagName:"div",className:"controlbox-pane",initialize(){t.api.trigger("controlBoxPaneInitialized",this)}}),t.ControlBoxToggle=Ks.NativeView.extend({tagName:"a",className:"toggle-controlbox hidden",id:"toggle-controlbox",events:{click:"onClick"},attributes:{href:"#"},initialize(){t.chatboxviews.insertRowColumn(this.render().el),t.api.waitUntil("initialized").then(this.render.bind(this)).catch(t=>vt.fatal(t))},render(){return this.el.innerHTML=$s()({label_toggle:t.api.connection.connected()?o("Chat Contacts"):o("Toggle chat")}),this},hide(e){ei.hideElement(this.el),e()},show(e){ei.fadeIn(this.el,e)},showControlBox(){let o=t.chatboxes.get("controlbox");o||(o=e()),t.api.connection.connected()?o.save({closed:!1}):o.trigger("show")},onClick(o){if(o.preventDefault(),ei.isVisible(t.root.querySelector("#controlbox"))){const e=t.chatboxes.get("controlbox");t.api.connection.connected?e.save({closed:!0}):e.trigger("hide")}else this.showControlBox()}}),t.api.listen.on("chatBoxViewsInitialized",()=>{t.chatboxes.on("add",e=>{if(e.get("type")===t.CONTROLBOX_TYPE){const o=t.chatboxviews,n=o.get(e.get("id"));n?(n.model=e,n.initialize()):o.add(e.get("id"),new t.ControlBoxView({model:e}))}})}),t.api.listen.on("clearSession",()=>{const e=Object(ke.get)(t,"chatboxviews",null),o=e&&e.get("controlbox");o&&(ei.safeSave(o.model,{connected:!1}),Object(ke.get)(o,"controlbox_pane")&&(o.controlbox_pane.remove(),delete o.controlbox_pane))}),t.api.waitUntil("chatBoxViewsInitialized").then(e).catch(t=>vt.fatal(t)),t.api.listen.on("chatBoxesFetched",()=>{const o=t.chatboxes.get("controlbox")||e();o.save({connected:!0})});const n=function(){const e=t.chatboxviews.get("controlbox");return e.model.set({connected:!1}),e};t.api.listen.on("disconnected",()=>n().renderLoginPanel()),t.api.listen.on("will-reconnect",n),Object.assign(t.api,{controlbox:{async open(){await t.api.waitUntil("chatBoxesFetched");const e=(await t.api.chatboxes.get("controlbox"))||t.api.chatboxes.create("controlbox",{},t.Controlbox);return e.trigger("show"),e},get(){return t.chatboxviews.get("controlbox")}}})}});var ai=o(156),si=o.n(ai);const ii=mo.env.utils;mo.plugins.add("converse-dragresize",{dependencies:["converse-chatview","converse-headlines-view","converse-muc-views"],enabled(e){return"overlayed"==e.view_mode},overrides:{ChatBox:{initialize(){const e=this.__super__.initialize.apply(this,arguments),t=this.get("height"),o=this.get("width"),n="controlbox"===this.get("id")?e=>this.set(e):e=>this.save(e);return n({height:ii.applyDragResistance(t,this.get("default_height")),width:ii.applyDragResistance(o,this.get("default_width"))}),e}},ChatBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e}},HeadlinesBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e}},ControlBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e},renderLoginPanel(){const e=this.__super__.renderLoginPanel.apply(this,arguments);return this.initDragResize().setDimensions(),e},renderControlBoxPane(){const e=this.__super__.renderControlBoxPane.apply(this,arguments);return this.initDragResize().setDimensions(),e}},ChatRoomView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e}}},initialize(){function e(e){return!(o.resizing&&o.allow_dragresize)||void(e.preventDefault(),o.resizing.chatbox.resizeChatBox(e))}function t(e){if(!o.resizing||!o.allow_dragresize)return!0;e.preventDefault();const t=ii.applyDragResistance(o.resizing.chatbox.height,o.resizing.chatbox.model.get("default_height")),n=ii.applyDragResistance(o.resizing.chatbox.width,o.resizing.chatbox.model.get("default_width"));o.api.connection.connected()?(o.resizing.chatbox.model.save({height:t}),o.resizing.chatbox.model.save({width:n})):(o.resizing.chatbox.model.set({height:t}),o.resizing.chatbox.model.set({width:n})),o.resizing=null}const{_converse:o}=this;o.api.settings.update({allow_dragresize:!0});Object.assign(o.ChatBoxView.prototype,{initDragResize(){const e=this,t=Object(ke.debounce)(()=>e.setDimensions());window.addEventListener("resize",e.debouncedSetDimensions),this.listenTo(this.model,"destroy",()=>window.removeEventListener("resize",t));const n=this.el.querySelector(".box-flyout"),a=window.getComputedStyle(n);if(void 0===this.model.get("height")){const e=parseInt(a.height.replace(/px$/,""),10),t=parseInt(a.width.replace(/px$/,""),10);this.model.set("height",e),this.model.set("default_height",e),this.model.set("width",t),this.model.set("default_width",t)}const s=a["min-width"],i=a["min-height"];return this.model.set("min_width",s.endsWith("px")?+s.replace(/px$/,""):0),this.model.set("min_height",i.endsWith("px")?+i.replace(/px$/,""):0),this.prev_pageY=0,this.prev_pageX=0,Object(ke.get)(o.connection,"connected")&&(this.height=this.model.get("height"),this.width=this.model.get("width")),this},resizeChatBox(e){let t;0===o.resizing.direction.indexOf("top")&&(t=e.pageY-this.prev_pageY,t&&(this.height=this.height-t>(this.model.get("min_height")||0)?this.height-t:this.model.get("min_height"),this.prev_pageY=e.pageY,this.setChatBoxHeight(this.height))),o.resizing.direction.includes("left")&&(t=this.prev_pageX-e.pageX,t&&(this.width=this.width+t>(this.model.get("min_width")||0)?this.width+t:this.model.get("min_width"),this.prev_pageX=e.pageX,this.setChatBoxWidth(this.width)))},setWidth(){this.model.get("width")&&(this.el.style.width=this.model.get("width"))},setDimensions(){this.adjustToViewport(),this.setChatBoxHeight(this.model.get("height")),this.setChatBoxWidth(this.model.get("width"))},setChatBoxHeight(e){e=e?ii.applyDragResistance(e,this.model.get("default_height"))+"px":"";const t=this.el.querySelector(".box-flyout");null!==t&&(t.style.height=e)},setChatBoxWidth(e){e=e?ii.applyDragResistance(e,this.model.get("default_width"))+"px":"",this.el.style.width=e;const t=this.el.querySelector(".box-flyout");null!==t&&(t.style.width=e)},adjustToViewport(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);480>=e?(this.model.set("height",void 0),this.model.set("width",void 0)):e<=this.model.get("width")?this.model.set("width",void 0):t<=this.model.get("height")&&this.model.set("height",void 0)},onStartVerticalResize(e){let t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];if(!o.allow_dragresize)return!0;const n=this.el.querySelector(".box-flyout"),a=window.getComputedStyle(n);this.height=parseInt(a.height.replace(/px$/,""),10),o.resizing={chatbox:this,direction:"top"},this.prev_pageY=e.pageY,t&&o.api.trigger("startVerticalResize",this)},onStartHorizontalResize(e){let t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];if(!o.allow_dragresize)return!0;const n=this.el.querySelector(".box-flyout"),a=window.getComputedStyle(n);this.width=parseInt(a.width.replace(/px$/,""),10),o.resizing={chatbox:this,direction:"left"},this.prev_pageX=e.pageX,t&&o.api.trigger("startHorizontalResize",this)},onStartDiagonalResize(e){this.onStartHorizontalResize(e,!1),this.onStartVerticalResize(e,!1),o.resizing.direction="topleft",o.api.trigger("startDiagonalResize",this)}}),ii.applyDragResistance=function(e,t){if(void 0===e)return;if(void 0===t)return e;return e!==t&&10>Math.abs(e-t)?t:e},o.api.listen.on("registeredGlobalEventHandlers",function(){document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)}),o.api.listen.on("unregisteredGlobalEventHandlers",function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}),o.api.listen.on("beforeShowingChatView",e=>e.initDragResize().setDimensions())}});class ri{static get DIRECTION(){return{down:"down",end:"end",home:"home",left:"left",right:"right",up:"up"}}static get DEFAULTS(){return{home:["".concat(converse.keycodes.SHIFT,"+").concat(converse.keycodes.UP_ARROW)],end:["".concat(converse.keycodes.SHIFT,"+").concat(converse.keycodes.DOWN_ARROW)],up:[converse.keycodes.UP_ARROW],down:[converse.keycodes.DOWN_ARROW],left:[converse.keycodes.LEFT_ARROW,"".concat(converse.keycodes.SHIFT,"+").concat(converse.keycodes.TAB)],right:[converse.keycodes.RIGHT_ARROW,converse.keycodes.TAB],getSelector:null,jump_to_picked:null,jump_to_picked_direction:null,jump_to_picked_selector:"picked",onSelected:null,selected:"selected",selector:"li"}}static getClosestElement(e,t){const o=e.reduce((e,o)=>{const n=t(o);return n<e.distance?{distance:n,element:o}:e},{distance:1/0});return o.element}constructor(e,t){this.doc=window.document,this.container=e,this.scroll_container=t.scroll_container||e,this.options=Object.assign({},ri.DEFAULTS,t),this.init()}init(){this.selected=null,this.keydownHandler=null,this.elements={},this.keys={},this.options.down.forEach(e=>this.keys[e]=ri.DIRECTION.down),this.options.end.forEach(e=>this.keys[e]=ri.DIRECTION.end),this.options.home.forEach(e=>this.keys[e]=ri.DIRECTION.home),this.options.left.forEach(e=>this.keys[e]=ri.DIRECTION.left),this.options.right.forEach(e=>this.keys[e]=ri.DIRECTION.right),this.options.up.forEach(e=>this.keys[e]=ri.DIRECTION.up)}enable(){this.getElements(),this.keydownHandler=e=>this.handleKeydown(e),this.doc.addEventListener("keydown",this.keydownHandler),this.enabled=!0}disable(){this.keydownHandler&&this.doc.removeEventListener("keydown",this.keydownHandler),this.unselect(),this.elements={},this.enabled=!1}destroy(){this.disable(),this.container.domNavigator&&delete this.container.domNavigator}getNextElement(e){let t;if(e===ri.DIRECTION.home)t=this.getElements(e)[0];else if(e===ri.DIRECTION.end)t=Array.from(this.getElements(e)).pop();else if(!this.selected)t=e===ri.DIRECTION.right||e===ri.DIRECTION.down?this.getElements(e)[1]:this.getElements(e)[0];else if(e===ri.DIRECTION.right){const o=this.getElements(e);t=o.slice(o.indexOf(this.selected))[1]}else if(e==ri.DIRECTION.left){const o=this.getElements(e);t=o.slice(0,o.indexOf(this.selected)).pop()||this.selected}else if(e==ri.DIRECTION.down){const e=this.selected.offsetLeft,o=this.selected.offsetTop+this.selected.offsetHeight,n=this.elementsAfter(0,o),a=t=>Math.abs(t.offsetLeft-e)+Math.abs(t.offsetTop-o);t=ri.getClosestElement(n,a)}else if(e==ri.DIRECTION.up){const e=this.selected.offsetLeft,o=this.selected.offsetTop-1,n=this.elementsBefore(1/0,o),a=t=>Math.abs(e-t.offsetLeft)+Math.abs(o-t.offsetTop);t=ri.getClosestElement(n,a)}else throw new Error("getNextElement: invalid direction value");return this.options.jump_to_picked&&t&&t.matches(this.options.jump_to_picked)&&e===this.options.jump_to_picked_direction&&(t=this.container.querySelector(this.options.jump_to_picked_selector)||t),t}select(e,t){e&&e!==this.selected&&(this.unselect(),t&&this.scrollTo(e,t),e.matches("input")?e.focus():ea.addClass(this.options.selected,e),this.selected=e,this.options.onSelected&&this.options.onSelected(e))}unselect(){this.selected&&(ea.removeClass(this.options.selected,this.selected),delete this.selected)}scrollTo(e,t){if(!this.inScrollContainerViewport(e)){const o=this.scroll_container;if(!o.contains(e))return;t===ri.DIRECTION.left?(o.scrollLeft=e.offsetLeft-o.offsetLeft,o.scrollTop=e.offsetTop-o.offsetTop):t===ri.DIRECTION.up?o.scrollTop=e.offsetTop-o.offsetTop:t===ri.DIRECTION.right?(o.scrollLeft=e.offsetLeft-o.offsetLeft-(o.offsetWidth-e.offsetWidth),o.scrollTop=e.offsetTop-o.offsetTop-(o.offsetHeight-e.offsetHeight)):t===ri.DIRECTION.down?o.scrollTop=e.offsetTop-o.offsetTop-(o.offsetHeight-e.offsetHeight):void 0}else be(e)||(t===ri.DIRECTION.left?document.body.scrollLeft=ye(e)-document.body.offsetLeft:t===ri.DIRECTION.up?document.body.scrollTop=ve(e)-document.body.offsetTop:t===ri.DIRECTION.right?document.body.scrollLeft=ye(e)-document.body.offsetLeft-(document.documentElement.clientWidth-e.offsetWidth):t===ri.DIRECTION.down?document.body.scrollTop=ve(e)-document.body.offsetTop-(document.documentElement.clientHeight-e.offsetHeight):void 0)}inScrollContainerViewport(e){const t=this.scroll_container;return!(e.offsetLeft-t.scrollLeft<t.offsetLeft)&&!(e.offsetTop-t.scrollTop<t.offsetTop)&&!(e.offsetLeft+e.offsetWidth-t.scrollLeft>t.offsetLeft+t.offsetWidth)&&!(e.offsetTop+e.offsetHeight-t.scrollTop>t.offsetTop+t.offsetHeight)}getElements(e){const t=this.options.getSelector?this.options.getSelector(e):this.options.selector;return this.elements[t]||(this.elements[t]=Array.from(this.container.querySelectorAll(t))),this.elements[t]}elementsAfter(e,t){return this.getElements(ri.DIRECTION.down).filter(o=>o.offsetLeft>=e&&o.offsetTop>=t)}elementsBefore(e,t){return this.getElements(ri.DIRECTION.up).filter(o=>o.offsetLeft<=e&&o.offsetTop<=t)}handleKeydown(e){const t=converse.keycodes,o=e.shiftKey?this.keys["".concat(t.SHIFT,"+").concat(e.which)]:this.keys[e.which];if(o){e.preventDefault(),e.stopPropagation();const t=this.getNextElement(o,e);this.select(t,o)}}}var li=ri,di=o(157),ci=o.n(di),pi=o(158),ui=o.n(pi);const{Backbone:mi,sizzle:gi}=converse.env,hi=converse.env.utils;converse.plugins.add("converse-emoji-views",{dependencies:["converse-emoji","converse-chatview","converse-muc-views"],overrides:{ChatBoxView:{events:{"click .toggle-smiley":"toggleEmojiMenu"},onEnterPressed(){this.emoji_dropdown&&hi.isVisible(this.emoji_dropdown.el.querySelector(".emoji-picker"))&&this.emoji_dropdown.toggle(),this.__super__.onEnterPressed.apply(this,arguments)},onKeyDown(e){if(e.keyCode===converse.keycodes.TAB){const t=hi.getCurrentWord(e.target,null,/(:.*?:)/g);if(t.startsWith(":"))return e.preventDefault(),e.stopPropagation(),this.autocompleteInPicker(e.target,t)}return this.__super__.onKeyDown.call(this,e)}},ChatRoomView:{events:{"click .toggle-smiley":"toggleEmojiMenu"}}},initialize(){const{_converse:t}=this,{__:o}=t;t.api.settings.update({use_system_emojis:!0,visible_toolbar_buttons:{emoji:!0}});Object.assign(t.ChatBoxView.prototype,{async autocompleteInPicker(e,t){await this.createEmojiDropdown(),this.emoji_picker_view.model.set({autocompleting:t,position:e.selectionStart},{silent:!0}),this.emoji_picker_view.filter(t,!0),this.emoji_dropdown.toggle()},createEmojiPicker(){if(this.emoji_picker_view)return void this.insertEmojiPicker();if(!t.emojipicker){const e="converse.emoji-".concat(t.bare_jid);t.emojipicker=new t.EmojiPicker({id:e}),t.emojipicker.browserStorage=t.createStore(e),t.emojipicker.fetch()}this.emoji_picker_view=new t.EmojiPickerView({model:t.emojipicker}),this.emoji_picker_view.chatview=this,this.insertEmojiPicker()},async createEmojiDropdown(){if(!this.emoji_dropdown){await t.api.waitUntil("emojisInitialized");const e=this.el.querySelector(".emoji-picker");this.emoji_dropdown=new ya.a.Dropdown(e,!0),this.emoji_dropdown.el=e}},async toggleEmojiMenu(e){e.stopPropagation(),await this.createEmojiDropdown(),this.emoji_dropdown.toggle(),this.emoji_picker_view.setScrollPosition()},insertEmojiPicker(){const e=this.el.querySelector(".emoji-picker__container");e.innerHTML="",e.appendChild(this.emoji_picker_view.el)}}),t.EmojiPickerView=mi.VDOMView.extend({className:"emoji-picker",events:{"click .emoji-picker__header li.emoji-category .pick-category":"chooseCategory","click .emoji-skintone-picker li.emoji-skintone":"chooseSkinTone","click .insert-emoji":"insertEmoji","focus .emoji-search":"disableArrowNavigation","keydown .emoji-search":"onKeyDown"},async initialize(){this.onGlobalKeyDown=e=>this._onGlobalKeyDown(e);const e=document.querySelector("body");e.addEventListener("keydown",this.onGlobalKeyDown),this.search_results=[],this.debouncedFilter=Object(ke.debounce)(e=>this.filter(e.value),150),this.listenTo(this.model,"change:query",this.render),this.listenTo(this.model,"change:current_skintone",this.render),this.listenTo(this.model,"change:current_category",()=>{this.render();const e=this.model.get("current_category"),t=this.el.querySelector(".emoji-category[data-category=\"".concat(e,"\"]"));this.navigator.select(t),this.navigator.enabled||this.navigator.enable()}),await t.api.waitUntil("emojisInitialized"),this.render()},toHTML(){return ui()(Object.assign(this.model.toJSON(),{__:o,_converse:t,emoji_categories:t.emoji_categories,emojis_by_category:t.emojis.json,shouldBeHidden:e=>this.shouldBeHidden(e),skintones:["tone1","tone2","tone3","tone4","tone5"],toned_emojis:t.emojis.toned,transform:hi.getEmojiRenderer(),transformCategory:e=>hi.getEmojiRenderer()(this.getTonedShortname(e)),search_results:this.search_results}))},remove(){const e=document.querySelector("body");e.removeEventListener("keydown",this.onGlobalKeyDown),mi.VDOMView.prototype.remove.call(this)},afterRender(){this.initIntersectionObserver();const e=this.el.querySelector(".emoji-search");e.addEventListener("focus",e=>this.chatview.emitFocused(e)),e.addEventListener("blur",e=>this.chatview.emitBlurred(e)),this.initArrowNavigation()},initArrowNavigation(){if(!this.navigator){const e={jump_to_picked:".emoji-category",jump_to_picked_selector:".emoji-category.picked",jump_to_picked_direction:li.DIRECTION.down,picked_selector:".picked",scroll_container:this.el.querySelector(".emoji-picker__lists"),getSelector:e=>{if(e===li.DIRECTION.down){const e=this.navigator.selected&&this.navigator.selected.getAttribute("data-category");return e?"ul[data-category=\"".concat(e,"\"] li:not(.hidden):not(.emoji-skintone), .emoji-search"):"li:not(.hidden):not(.emoji-skintone), .emoji-search"}return"li:not(.hidden):not(.emoji-skintone), .emoji-search"},onSelected:e=>{e.matches(".insert-emoji")&&this.setCategoryForElement(e.parentElement),e.matches(".insert-emoji, .emoji-category")&&e.firstElementChild.focus(),e.matches(".emoji-search")&&e.focus()}};this.navigator=new li(this.el,e),this.listenTo(this.chatview.model,"destroy",()=>this.navigator.destroy())}},enableArrowNavigation(e){e&&(e.preventDefault(),e.stopPropagation()),this.disableArrowNavigation(),this.navigator.enable(),this.navigator.handleKeydown(e)},disableArrowNavigation(){this.navigator.disable()},filter(o,n){const a=this.model.get("query");if(this.search_results=o?a&&o.includes(a)?this.search_results.filter(n=>t.FILTER_CONTAINS(n.sn,o)):t.emojis_list.filter(n=>t.FILTER_CONTAINS(n.sn,o)):[],this.model.set({query:o}),n){const e=this.el.querySelector(".emoji-search");e.value=o}},setCategoryForElement(e){const t=e.getAttribute("data-category"),o=this.model.get("current_category");if(o!==t){this.model.set({current_category:t},{silent:!0});const e=gi(".emoji-picker__header .emoji-category",this.el);e.forEach(e=>hi.removeClass("picked",e));const o=e.filter(e=>e.getAttribute("data-category")===t).pop();o&&hi.addClass("picked",o)}},setCategoryOnVisibilityChange(e){const t=this.navigator.selected,o=e.filter(e=>e.target.contains(t)).pop();let n;n=o?o:e.reduce((e,t)=>t.intersectionRatio>=Object(ke.get)(e,"intersectionRatio",0)?t:e,null),n&&n.isIntersecting&&this.setCategoryForElement(n.target)},initIntersectionObserver(){if(window.IntersectionObserver){if(this.observer)this.observer.disconnect();else{const e={root:this.el.querySelector(".emoji-picker__lists"),threshold:[.1]};this.observer=new IntersectionObserver(e=>this.setCategoryOnVisibilityChange(e),e)}gi(".emoji-picker",this.el).forEach(e=>this.observer.observe(e))}},insertIntoTextArea(e){const t=this.model.get("autocompleting"),o=this.model.get("position");this.model.set({autocompleting:null,position:null}),this.chatview.insertIntoTextArea(e,t,!1,o),this.chatview.emoji_dropdown&&this.chatview.emoji_dropdown.toggle(),this.filter("",!0),this.disableArrowNavigation()},onEnterPressed(e){e.preventDefault(),e.stopPropagation(),t.emoji_shortnames.includes(e.target.value)?this.insertIntoTextArea(e.target.value):1===this.search_results.length?this.insertIntoTextArea(this.search_results[0].sn):this.navigator.selected&&this.navigator.selected.matches(".insert-emoji")?this.insertIntoTextArea(this.navigator.selected.getAttribute("data-emoji")):this.navigator.selected&&this.navigator.selected.matches(".emoji-category")&&this.chooseCategory({target:this.navigator.selected})},_onGlobalKeyDown(e){this.navigator&&(e.keyCode===converse.keycodes.ENTER&&this.navigator.selected&&hi.isVisible(this.el)?this.onEnterPressed(e):e.keyCode===converse.keycodes.DOWN_ARROW&&!this.navigator.enabled&&hi.isVisible(this.el)&&this.enableArrowNavigation(e))},onKeyDown(e){if(e.keyCode===converse.keycodes.RIGHT_ARROW){e.preventDefault(),e.stopPropagation(),e.target.blur();const t=this.el.querySelector(".pick-category");this.navigator.select(t,"right")}else if(!(e.keyCode===converse.keycodes.TAB))e.keyCode!==converse.keycodes.DOWN_ARROW||this.navigator.enabled?e.keyCode===converse.keycodes.ENTER?this.onEnterPressed(e):e.keyCode!==converse.keycodes.ENTER&&e.keyCode!==converse.keycodes.DOWN_ARROW&&this.debouncedFilter(e.target):this.enableArrowNavigation(e);else if(e.target.value){e.preventDefault();const o=Object(ke.find)(t.emoji_shortnames,o=>t.FILTER_CONTAINS(o,e.target.value));o&&this.filter(o,!0)}else this.navigator.enabled||this.enableArrowNavigation(e)},shouldBeHidden(e){const o=this.model.get("current_skintone");if(e.includes("_tone")){if(!o||!e.includes(o))return!0;}else if(o&&t.emojis.toned.includes(e))return!0;const n=this.model.get("query");return!(!n||t.FILTER_CONTAINS(e,n))},getTonedShortname(e){return t.emojis.toned.includes(e)&&this.model.get("current_skintone")?"".concat(e.slice(0,e.length-1),"_").concat(this.model.get("current_skintone"),":"):e},chooseSkinTone(e){e.preventDefault(),e.stopPropagation();const t="IMG"===e.target.nodeName?e.target.parentElement:e.target,o=t.getAttribute("data-skintone").trim();this.model.get("current_skintone")===o?this.model.save({current_skintone:""}):this.model.save({current_skintone:o})},chooseCategory(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();const t=this.el.querySelector(".emoji-search");t.value="";const o=e.target.matches("li")?e.target:hi.ancestor(e.target,"li");this.setCategoryForElement(o),this.navigator.select(o),this.setScrollPosition()},setScrollPosition(){const e=this.model.get("current_category"),t=this.el.querySelector(".emoji-picker__lists"),o=this.el.querySelector("#emoji-picker-".concat(e));o&&(t.scrollTop=o.offsetTop-3*o.offsetHeight+4)},insertEmoji(e){e.preventDefault(),e.stopPropagation();const t="IMG"===e.target.nodeName?e.target.parentElement:e.target,o=this.model.get("autocompleting"),n=this.model.get("position");this.model.set({autocompleting:null,position:null}),this.chatview.insertIntoTextArea(t.getAttribute("data-emoji"),o,!1,n),this.chatview.emoji_dropdown.toggle(),this.filter("",!0)}}),t.api.listen.on("chatBoxClosed",e=>e.emoji_picker_view&&e.emoji_picker_view.remove()),t.api.listen.on("renderToolbar",e=>{if(t.visible_toolbar_buttons.emoji){const t=ci()({tooltip_insert_smiley:o("Insert emojis")});e.el.querySelector(".chat-toolbar").insertAdjacentHTML("afterBegin",t),e.createEmojiPicker()}})}}),mo.plugins.add("converse-singleton",{enabled(e){return e.singleton},initialize(){this._converse.api.settings.update({allow_logout:!1,allow_muc_invitations:!1,hide_muc_server:!0});const{_converse:e}=this;if(!Array.isArray(e.auto_join_rooms)&&!Array.isArray(e.auto_join_private_chats))throw new Error("converse-singleton: auto_join_rooms must be an Array");if(1<e.auto_join_rooms.length||1<e.auto_join_private_chats.length)throw new Error("It doesn't make sense to have singleton set to true and auto_join_rooms or auto_join_private_chats set to more then one, since only one chat room may be open at any time.")}});var _i=o(159),fi=o.n(_i);mo.plugins.add("converse-fullscreen",{enabled(e){return e.isUniView()},overrides:{ControlBoxView:{createBrandHeadingHTML(){const{_converse:e}=this.__super__;return fi()({version_name:e.VERSION_NAME})},insertBrandHeading(){const{_converse:e}=this.__super__,t=e.root.getElementById("converse-login-panel");t.parentNode.insertAdjacentHTML("afterbegin",this.createBrandHeadingHTML())}}},initialize(){this._converse.api.settings.update({chatview_avatar_height:50,chatview_avatar_width:50,hide_open_bookmarks:!0,show_controlbox_by_default:!0,sticky_controlbox:!0})}}),mo.plugins.add("converse-mam-views",{dependencies:["converse-mam","converse-chatview","converse-muc-views"],overrides:{ChatBoxView:{render(){const e=this.__super__.render.apply(this,arguments);return this.disable_mam||this.content.addEventListener("scroll",Object(ke.debounce)(this.onScroll.bind(this),100)),e},async onScroll(){if(0===this.content.scrollTop&&this.model.messages.length){const e=this.model.getOldestMessage();if(e){const t=this.model.get("jid"),o=e&&e.get("stanza_id ".concat(t));this.addSpinner(),o?await this.model.fetchArchivedMessages({before:o}):await this.model.fetchArchivedMessages({end:e.get("time")}),this.clearSpinner()}}}},ChatRoomView:{renderChatArea(){const e=this.__super__.renderChatArea.apply(this,arguments);return this.disable_mam||this.content.addEventListener("scroll",Object(ke.debounce)(this.onScroll.bind(this),100)),e}}}});var bi=o(64),vi=o.n(bi),yi=o(160),xi=o.n(yi),Si=o(161),wi=o.n(Si),ki=o(162),Ei=o.n(ki);const{_:Ci,Backbone:Ai,dayjs:Ti}=mo.env,ji=mo.env.utils;mo.plugins.add("converse-minimize",{dependencies:["converse-chatview","converse-controlbox","converse-muc-views","converse-headlines-view","converse-dragresize"],enabled(e){return"overlayed"===e.view_mode},overrides:{ChatBox:{initialize(){this.__super__.initialize.apply(this,arguments),this.on("show",this.maximize,this);"controlbox"===this.get("id")||this.save({minimized:this.get("minimized")||!1,time_minimized:this.get("time_minimized")||Ti()})},maybeShow(e){return!e&&this.get("minimized")?this:this.__super__.maybeShow.apply(this,arguments)}},ChatBoxView:{events:{"click .toggle-chatbox-button":"minimize"},initialize(){return this.listenTo(this.model,"change:minimized",this.onMinimizedChanged),this.__super__.initialize.apply(this,arguments)},show(){const{_converse:e}=this.__super__;return"overlayed"===e.view_mode&&this.model.get("minimized")?(this.model.minimize(),this):this.__super__.show.apply(this,arguments)},isNewMessageHidden(){return this.model.get("minimized")||this.__super__.isNewMessageHidden.apply(this,arguments)},shouldShowOnTextMessage(){return!this.model.get("minimized")&&this.__super__.shouldShowOnTextMessage.apply(this,arguments)},setChatBoxHeight(e){if(!this.model.get("minimized"))return this.__super__.setChatBoxHeight.call(this,e)},setChatBoxWidth(e){if(!this.model.get("minimized"))return this.__super__.setChatBoxWidth.call(this,e)}},ChatBoxHeading:{render(){const{_converse:e}=this.__super__,{__:t}=e;this.__super__.render.apply(this,arguments);const o=vi()({info_minimize:t("Minimize this chat box")}),n=this.el.querySelector(".toggle-chatbox-button");if(n)n.outerHTML=o;else{const e=this.el.querySelector(".close-chatbox-button");e.insertAdjacentHTML("afterEnd",o)}}},ChatRoomView:{events:{"click .toggle-chatbox-button":"minimize"},initialize(){this.listenTo(this.model,"change:minimized",this.onMinimizedChanged);const e=this.__super__.initialize.apply(this,arguments);return this.model.get("minimized")&&this.hide(),e},generateHeadingHTML(){const{_converse:e}=this.__super__,{__:t}=e,o=this.__super__.generateHeadingHTML.apply(this,arguments),n=document.createElement("div");n.innerHTML=o;const a=n.querySelector(".chatbox-buttons"),s=a.querySelector(".close-chatbox-button"),i=vi()({info_minimize:t("Minimize this chat box")});return s?s.insertAdjacentHTML("afterend",i):a.insertAdjacentHTML("beforeEnd",i),n.innerHTML}}},initialize(){function e(){t.minimized_chats=new t.MinimizedChats({model:t.chatboxes}),t.api.trigger("minimizedChatsInitialized")}const{_converse:t}=this,{__:o}=t;t.api.settings.update({no_trimming:!1});Object.assign(t.ChatBox.prototype,{maximize(){ji.safeSave(this,{minimized:!1,time_opened:new Date().getTime()})},minimize(){ji.safeSave(this,{minimized:!0,time_minimized:new Date().toISOString()})}});Object.assign(t.ChatBoxView.prototype,{onMaximized(){const{_converse:e}=this.__super__;return this.insertIntoDOM(),this.model.isScrolledUp()||this.model.clearUnreadMsgCounter(),this.model.setChatState(e.ACTIVE),this.show(),e.api.trigger("chatBoxMaximized",this),this},onMinimized(e){const{_converse:t}=this.__super__;return e&&e.preventDefault&&e.preventDefault(),this.model.collection&&this.model.collection.browserStorage?this.model.save({scroll:this.content.scrollTop}):this.model.set({scroll:this.content.scrollTop}),this.model.setChatState(t.INACTIVE),this.hide(),t.api.trigger("chatBoxMinimized",this),this},minimize(){return this.model.minimize(),this},onMinimizedChanged(e){e.get("minimized")?this.onMinimized():this.onMaximized()}});Object.assign(t.ChatBoxViews.prototype,{getChatBoxWidth(e){if("controlbox"===e.model.get("id")){const e=this.get("controlbox");return e&&ji.isVisible(e.el)?ji.getOuterWidth(e.el,!0):ji.getOuterWidth(t.controlboxtoggle.el,!0)}return!e.model.get("minimized")&&ji.isVisible(e.el)?ji.getOuterWidth(e.el,!0):0},getShownChats(){return this.filter(e=>!e.model.get("minimized")&&!e.model.get("closed")&&ji.isVisible(e.el))},getMinimizedWidth(){const e=Ci.get(t.minimized_chats,"el");return Ci.includes(this.model.pluck("minimized"),!0)?ji.getOuterWidth(e,!0):0},getBoxesWidth(e){const t=e?e.model.get("id"):null,o=e?ji.getOuterWidth(e.el,!0):0;return Object.values(this.xget(t)).reduce((e,t)=>e+this.getChatBoxWidth(t),o)},async trimChats(e){if(!t.no_trimming&&t.api.connection.connected()&&"overlayed"===t.view_mode){const o=this.getShownChats();if(!(1>=o.length)){const n=ji.getOuterWidth(document.querySelector("body"),!0);if(this.getChatBoxWidth(o[0])!==n){await t.api.waitUntil("minimizedChatsInitialized");const o=Ci.get(t.minimized_chats,"el");if(o)for(;this.getMinimizedWidth()+this.getBoxesWidth(e)>n;){const t=e?e.model.get("id"):null,o=this.getOldestMaximizedChat([t]);if(o){const e=this.get(o.get("id"));e&&e.hide(),o.minimize()}else break}}}}},getOldestMaximizedChat(e){e.push("controlbox");let t=0,o=this.model.sort().at(t);for(;Ci.includes(e,o.get("id"))||!0===o.get("minimized");)if(t++,o=this.model.at(t),!o)return null;return o}}),t.api.promises.add("minimizedChatsInitialized"),t.MinimizedChatBoxView=Ai.NativeView.extend({tagName:"div",events:{"click .close-chatbox-button":"close","click .restore-chat":"restore"},initialize(){this.listenTo(this.model,"change:num_unread",this.render),this.listenTo(this.model,"change:name",this.render),this.listenTo(this.model,"change:fullname",this.render),this.listenTo(this.model,"change:jid",this.render),this.listenTo(this.model,"destroy",this.remove),t.api.trigger("minimizedChatViewInitialized",this)},render(){const e=Object.assign(this.model.toJSON(),{tooltip:o("Click to restore this chat"),title:this.model.getDisplayName()});return this.el.innerHTML=Ei()(e),this.el},close(e){e&&e.preventDefault&&e.preventDefault(),this.remove();const o=t.chatboxviews.get(this.model.get("id"));return o?o.close():(this.model.destroy(),t.api.trigger("chatBoxClosed",this)),this},restore:Ci.debounce(function(e){e&&e.preventDefault&&e.preventDefault(),this.model.off("change:num_unread",null,this),this.remove(),this.model.maximize()},200,{leading:!0})}),t.MinimizedChats=gn.extend({tagName:"div",id:"minimized-chats",className:"hidden",events:{"click #toggle-minimized-chats":"toggle"},initialize(){this.render(),this.initToggle(),this.addMultipleChats(this.model.where({minimized:!0})),this.listenTo(this.model,"add",this.onChanged),this.listenTo(this.model,"destroy",this.removeChat),this.listenTo(this.model,"change:minimized",this.onChanged),this.listenTo(this.model,"change:num_unread",this.updateUnreadMessagesCounter)},render(){return this.el.parentElement||(this.el.innerHTML=xi()(),t.chatboxviews.insertRowColumn(this.el)),0===this.keys().length?this.el.classList.add("hidden"):0<this.keys().length&&!ji.isVisible(this.el)&&this.el.classList.remove("hidden"),this.el},initToggle(){const e="converse.minchatstoggle-".concat(t.bare_jid);this.toggleview=new t.MinimizedChatsToggleView({model:new t.MinimizedChatsToggle({id:e})}),this.toggleview.model.browserStorage=t.createStore(e),this.toggleview.model.fetch()},toggle(e){e&&e.preventDefault&&e.preventDefault(),this.toggleview.model.save({collapsed:!this.toggleview.model.get("collapsed")}),ji.slideToggleElement(this.el.querySelector(".minimized-chats-flyout"),200)},onChanged(e){"controlbox"===e.get("id")||(e.get("minimized")?this.addChat(e):this.get(e.get("id"))&&this.removeChat(e))},addChatView(e){const o=this.get(e.get("id"));if(!(o&&o.el.parentNode)){const o=new t.MinimizedChatBoxView({model:e});this.el.querySelector(".minimized-chats-flyout").insertAdjacentElement("beforeEnd",o.render()),this.add(e.get("id"),o)}},addMultipleChats(e){e.forEach(e=>this.addChatView(e)),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},addChat(e){this.addChatView(e),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},removeChat(e){this.remove(e.get("id")),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},updateUnreadMessagesCounter(){this.toggleview.model.save({num_unread:Ci.sum(this.model.pluck("num_unread"))}),this.render()}}),t.MinimizedChatsToggle=Ai.Model.extend({defaults:{collapsed:!1,num_minimized:0,num_unread:0}}),t.MinimizedChatsToggleView=Ai.NativeView.extend({_setElement(){this.el=t.root.querySelector("#toggle-minimized-chats")},initialize(){this.listenTo(this.model,"change:num_minimized",this.render),this.listenTo(this.model,"change:num_unread",this.render),this.flyout=this.el.parentElement.querySelector(".minimized-chats-flyout")},render(){return this.el.innerHTML=wi()(Object.assign(this.model.toJSON(),{Minimized:o("Minimized")})),this.model.get("collapsed")?ji.hideElement(this.flyout):ji.showElement(this.flyout),this.el}}),t.api.listen.on("chatBoxViewsInitialized",()=>e()),t.api.listen.on("chatBoxInsertedIntoDOM",e=>t.chatboxviews.trimChats(e)),t.api.listen.on("controlBoxOpened",e=>t.chatboxviews.trimChats(e));const n=Ci.debounce(()=>t.chatboxviews.trimChats(),250);t.api.listen.on("registeredGlobalEventHandlers",()=>window.addEventListener("resize",n)),t.api.listen.on("unregisteredGlobalEventHandlers",()=>window.removeEventListener("resize",n))}});var Ni=o(163),Mi=o.n(Ni),Ii=o(164),Oi=o.n(Ii),Ri=o(165),Di=o.n(Ri),Li=o(166),Pi=o.n(Li),qi=o(167),Bi=o.n(qi),zi=o(168),Fi=o.n(zi),Hi=o(169),Ui=o.n(Hi),Vi=o(170),Wi=o.n(Vi),Gi=o(171),Ji=o.n(Gi),$i=o(172),Qi=o.n($i),Yi=o(65),Xi=o.n(Yi),Ki=o(173),Zi=o.n(Ki),er=o(174),tr=o.n(er),or=o(175),nr=o.n(or),ar=o(176),sr=o.n(ar),ir=o(177),rr=o.n(ir),lr=o(178),dr=o.n(lr),cr=o(179),pr=o.n(cr),ur=o(180),mr=o.n(ur),gr=o(181),hr=o.n(gr),_r=o(66),fr=o.n(_r);const{Backbone:br,Strophe:vr,sizzle:yr,_:xr,$iq:Sr,$pres:wr}=mo.env,kr=mo.env.utils,Er=["moderator","participant","visitor"],Cr=["admin","member","outcast","owner"],Ar=["owner"],Tr=["admin","ban","deop","destroy","member","op","revoke"],jr=["kick","mute","voice","modtools"],Nr=["nick"],Mr={deop:"participant",kick:"none",mute:"visitor",op:"moderator",voice:"participant"},Ir={admin:"admin",ban:"outcast",member:"member",owner:"owner",revoke:"none"};mo.plugins.add("converse-muc-views",{dependencies:["converse-autocomplete","converse-modal","converse-controlbox","converse-chatview"],overrides:{ControlBoxView:{renderControlBoxPane(){const{_converse:e}=this.__super__;this.__super__.renderControlBoxPane.apply(this,arguments),e.allow_muc&&this.renderRoomsPanel()}}},initialize(){function e(e,t){e.querySelector("span.spinner").remove(),e.querySelector("a.room-info").classList.add("selected"),e.insertAdjacentHTML("beforeEnd",pr()({jid:t.getAttribute("from"),desc:xr.get(xr.head(yr("field[var=\"muc#roominfo_description\"] value",t)),"textContent"),occ:xr.get(xr.head(yr("field[var=\"muc#roominfo_occupants\"] value",t)),"textContent"),hidden:yr("feature[var=\"muc_hidden\"]",t).length,membersonly:yr("feature[var=\"muc_membersonly\"]",t).length,moderated:yr("feature[var=\"muc_moderated\"]",t).length,nonanonymous:yr("feature[var=\"muc_nonanonymous\"]",t).length,open:yr("feature[var=\"muc_open\"]",t).length,passwordprotected:yr("feature[var=\"muc_passwordprotected\"]",t).length,persistent:yr("feature[var=\"muc_persistent\"]",t).length,publicroom:yr("feature[var=\"muc_publicroom\"]",t).length,semianonymous:yr("feature[var=\"muc_semianonymous\"]",t).length,temporary:yr("feature[var=\"muc_temporary\"]",t).length,unmoderated:yr("feature[var=\"muc_unmoderated\"]",t).length,label_desc:i("Description:"),label_jid:i("Groupchat Address (JID):"),label_occ:i("Participants:"),label_features:i("Features:"),label_requires_auth:i("Requires authentication"),label_hidden:i("Hidden"),label_requires_invite:i("Requires an invitation"),label_moderated:i("Moderated"),label_non_anon:i("Non-anonymous"),label_open_room:i("Open"),label_permanent_room:i("Permanent"),label_public:i("Public"),label_semi_anon:i("Semi-anonymous"),label_temp_room:i("Temporary"),label_unmoderated:i("Unmoderated")}))}function t(t){const o=kr.ancestor(t.target,".room-item"),n=o.querySelector("div.room-info");n?(kr.slideIn(n).then(kr.removeElement),o.querySelector("a.room-info").classList.remove("selected")):(o.insertAdjacentHTML("beforeend",ua()()),s.api.disco.info(t.target.getAttribute("data-room-jid"),null).then(t=>e(o,t)).catch(t=>vt.error(t)))}function o(e,t){t.getRoomsPanel().model.save("muc_domain",vr.getDomainFromJid(e))}function n(e){function t(t){t&&(t.get("var")!==vr.NS.MUC||t.entity.getIdentity("conference","text").then(n=>{n&&o(t.get("from"),e)}))}s.api.waitUntil("discoInitialized").then(()=>{s.api.listen.on("serviceDiscovered",t),s.disco_entities.each(e=>t(e.features.findWhere({var:vr.NS.MUC})))}).catch(t=>vt.error(t))}function a(e){e.model.get("connected")&&!e.getRoomsPanel().model.get("muc_domain")&&(s.muc_domain===void 0?n(e):o(s.muc_domain,e))}const{_converse:s}=this,{__:i}=s;s.api.promises.add(["roomsPanelRendered"]),s.api.settings.update({auto_list_rooms:!1,cache_muc_messages:!0,locked_muc_nickname:!1,show_retraction_warning:!0,muc_disable_slash_commands:!1,muc_show_room_info:!1,muc_show_join_leave:!0,muc_show_join_leave_status:!0,muc_mention_autocomplete_min_chars:0,muc_mention_autocomplete_filter:"contains",muc_mention_autocomplete_show_avatar:!0,roomconfig_whitelist:[],visible_toolbar_buttons:{toggle_occupants:!0}});s.ControlBoxView&&Object.assign(s.ControlBoxView.prototype,{renderRoomsPanel(){if(this.roomspanel&&kr.isInDOM(this.roomspanel.el))return this.roomspanel;const e="converse.roomspanel".concat(s.bare_jid);return this.roomspanel=new s.RoomsPanel({model:new(s.RoomsPanelModel.extend({id:e,browserStorage:s.createStore(e)}))}),this.roomspanel.model.fetch(),this.el.querySelector(".controlbox-pane").insertAdjacentElement("beforeEnd",this.roomspanel.render().el),s.api.trigger("roomsPanelRendered"),this.roomspanel},getRoomsPanel(){return this.roomspanel&&kr.isInDOM(this.roomspanel.el)?this.roomspanel:this.renderRoomsPanel()}}),s.ModeratorToolsModal=s.BootstrapModal.extend({events:{"submit .affiliation-form":"assignAffiliation","submit .role-form":"assignRole","submit .query-affiliation":"queryAffiliation","submit .query-role":"queryRole","click  .nav-item .nav-link":"switchTab","click .toggle-form":"toggleForm"},initialize(e){this.chatroomview=e.chatroomview,s.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:role",()=>{this.users_with_role=this.getUsersWithRole(),this.render()}),this.listenTo(this.model,"change:affiliation",async()=>{this.loading_users_with_affiliation=!0,this.users_with_affiliation=null,this.render();const e=this.model.get("affiliation");this.users_with_affiliation=s.muc_fetch_members&&"outcast"!==e?this.getUsersWithAffiliation():await this.chatroomview.model.getAffiliationList(e),this.loading_users_with_affiliation=!1,this.render()})},toHTML(){const e=this.chatroomview.getAllowedCommands(),t=e.map(e=>Ir[e]).filter(e=>e),o=xr.uniq(e.map(e=>Mr[e]).filter(e=>e));return t.sort(),o.sort(),rr()(Object.assign(this.model.toJSON(),{__:i,affiliations:[...Cr,"none"],allowed_affiliations:t,allowed_roles:o,loading_users_with_affiliation:this.loading_users_with_affiliation,roles:Er,users_with_affiliation:this.users_with_affiliation,users_with_role:this.users_with_role}))},toggleForm(e){e.stopPropagation(),e.preventDefault();const t=e.target.getAttribute("data-form"),o=kr.ancestor(e.target,".list-group-item").querySelector(".".concat(t));kr.hasClass("hidden",o)?kr.removeClass("hidden",o):kr.addClass("hidden",o)},getUsersWithAffiliation(){return this.chatroomview.model.occupants.where({affiliation:this.model.get("affiliation")}).map(e=>({jid:e.get("jid"),nick:e.get("nick"),affiliation:e.get("affiliation")}))},getUsersWithRole(){return this.chatroomview.model.occupants.where({role:this.model.get("role")}).map(e=>({jid:e.get("jid"),nick:e.get("nick"),role:e.get("role")}))},queryRole(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=t.get("role");this.model.set({role:null},{silent:!0}),this.model.set({role:o})},queryAffiliation(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=t.get("affiliation");this.model.set({affiliation:null},{silent:!0}),this.model.set({affiliation:o})},assignAffiliation(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=t.get("affiliation"),n={jid:t.get("jid"),reason:t.get("reason")},a=this.model.get("affiliation");this.chatroomview.model.setAffiliation(o,[n]).then(async()=>{this.alert(i("Affiliation changed"),"primary"),await this.chatroomview.model.occupants.fetchMembers(),this.model.set({affiliation:null},{silent:!0}),this.model.set({affiliation:a})}).catch(e=>{this.alert(i("Sorry, something went wrong while trying to set the affiliation"),"danger"),vt.error(e)})},assignRole(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=this.chatroomview.model.getOccupant(t.get("jid")||t.get("nick")),n=t.get("role"),a=t.get("reason"),s=this.model.get("role");this.chatroomview.model.setRole(o,n,a,()=>{this.alert(i("Role changed"),"primary"),this.model.set({role:null},{silent:!0}),this.model.set({role:s})},t=>{yr("not-allowed[xmlns=\"".concat(vr.NS.STANZAS,"\"]"),t).length?this.alert(i("You're not allowed to make that change"),"danger"):(this.alert(i("Sorry, something went wrong while trying to set the role"),"danger"),kr.isErrorObject(t)&&vt.error(t))})}}),s.ListChatRoomsModal=s.BootstrapModal.extend({events:{"submit form":"showRooms","click a.room-info":"toggleRoomInfo","change input[name=nick]":"setNick","change input[name=server]":"setDomainFromEvent","click .open-room":"openRoom"},initialize(){s.BootstrapModal.prototype.initialize.apply(this,arguments),s.muc_domain&&!this.model.get("muc_domain")&&this.model.save("muc_domain",s.muc_domain),this.listenTo(this.model,"change:muc_domain",this.onDomainChange)},toHTML(){const e=this.model.get("muc_domain")||s.muc_domain;return sr()(Object.assign(this.model.toJSON(),{heading_list_chatrooms:i("Query for Groupchats"),label_server_address:i("Server address"),label_query:i("Show groupchats"),show_form:!s.locked_muc_domain,server_placeholder:e?e:i("conference.example.org")}))},afterRender(){s.locked_muc_domain?this.updateRoomsList():this.el.addEventListener("shown.bs.modal",()=>this.el.querySelector("input[name=\"server\"]").focus(),!1)},openRoom(e){e.preventDefault();const t=e.target.getAttribute("data-room-jid"),o=e.target.getAttribute("data-room-name");this.modal.hide(),s.api.rooms.open(t,{name:o})},toggleRoomInfo(e){e.preventDefault(),t(e)},onDomainChange(){s.auto_list_rooms&&this.updateRoomsList()},roomStanzaItemToHTMLElement(e){const t=vr.unescapeNode(e.getAttribute("name")||e.getAttribute("jid")),o=document.createElement("div");return o.innerHTML=mr()({name:vr.xmlunescape(t),jid:e.getAttribute("jid"),open_title:i("Click to open this groupchat"),info_title:i("Show more information on this groupchat")}),o.firstElementChild},removeSpinner(){yr(".spinner",this.el).forEach(kr.removeElement)},informNoRoomsFound(){const e=this.el.querySelector(".available-chatrooms");e.innerHTML=fr()({feedback_text:i("No groupchats found")});const t=this.el.querySelector("input[name=\"server\"]");t.classList.remove("hidden"),this.removeSpinner()},onRoomsFound(e){const t=this.el.querySelector(".available-chatrooms"),o=yr("query item",e);if(o.length){t.innerHTML=fr()({feedback_text:i("Groupchats found:")});const e=document.createDocumentFragment();o.map(this.roomStanzaItemToHTMLElement).filter(e=>e).forEach(t=>e.appendChild(t)),t.appendChild(e),this.removeSpinner()}else this.informNoRoomsFound();return!0},updateRoomsList(){const e=Sr({to:this.model.get("muc_domain"),from:s.connection.jid,type:"get"}).c("query",{xmlns:vr.NS.DISCO_ITEMS});s.api.sendIQ(e).then(e=>this.onRoomsFound(e)).catch(()=>this.informNoRoomsFound())},showRooms(e){e.preventDefault();const t=new FormData(e.target);this.model.setDomain(t.get("server")),this.updateRoomsList()},setDomainFromEvent(e){this.model.setDomain(e.target.value)},setNick(e){this.model.save({nick:e.target.value})}}),s.AddChatRoomModal=s.BootstrapModal.extend({events:{"submit form.add-chatroom":"openChatRoom"},initialize(){s.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:muc_domain",this.render)},toHTML(){let e="";if(!s.locked_muc_domain){const t=this.model.get("muc_domain")||s.muc_domain;e=t?"name@".concat(t):i("name@conference.example.org")}return Mi()(Object.assign(this.model.toJSON(),{__:s.__,_converse:s,label_room_address:s.muc_domain?i("Groupchat name"):i("Groupchat address"),chatroom_placeholder:e}))},afterRender(){this.el.addEventListener("shown.bs.modal",()=>{this.el.querySelector("input[name=\"chatroom\"]").focus()},!1)},parseRoomDataFromEvent(e){const t=new FormData(e),o=t.get("chatroom");let n;if(!s.locked_muc_nickname)n=t.get("nickname").trim();else if(n=s.getDefaultMUCNickname(),!n)throw new Error("Using locked_muc_nickname but no nickname found!");return{jid:o,nick:n}},openChatRoom(e){e.preventDefault();const t=this.parseRoomDataFromEvent(e.target);""===t.nick&&(t.nick=void 0);let o;s.locked_muc_domain||s.muc_domain&&!kr.isValidJID(t.jid)?o="".concat(vr.escapeNode(t.jid),"@").concat(s.muc_domain):(o=t.jid,this.model.setDomain(o)),s.api.rooms.open(o,Object.assign(t,{jid:o})),this.modal.hide(),e.target.reset()}}),s.RoomDetailsModal=s.BootstrapModal.extend({initialize(){s.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.listenTo(this.model.occupants,"add",this.render),this.listenTo(this.model.occupants,"change",this.render)},toHTML(){return Fi()(Object.assign(this.model.toJSON(),{_:xr,__:i,display_name:i("Groupchat info for %1$s",this.model.getDisplayName()),features:this.model.features.toJSON(),num_occupants:this.model.occupants.length,topic:kr.addHyperlinks(ga.a.filterXSS(xr.get(this.model.get("subject"),"text"),{whiteList:{}}))}))}}),s.ChatRoomView=s.ChatBoxView.extend({length:300,tagName:"div",className:"chatbox chatroom hidden",is_chatroom:!0,events:{"change input.fileupload":"onFileSelection","click .chat-msg__action-edit":"onMessageEditButtonClicked","click .chat-msg__action-retract":"onMessageRetractButtonClicked","click .chatbox-navback":"showControlBox","click .close-chatbox-button":"close","click .configure-chatroom-button":"getAndRenderConfigurationForm","click .hide-occupants":"hideOccupants","click .new-msgs-indicator":"viewUnreadMessages","click .occupant-nick":function(e){this.insertIntoTextArea(e.target.textContent)},"click .send-button":"onFormSubmitted","click .show-room-details-modal":"showRoomDetailsModal","click .toggle-call":"toggleCall","click .toggle-occupants":"toggleOccupants","click .upload-file":"toggleFileUpload","dragover .chat-textarea":"onDragOver","drop .chat-textarea":"onDrop","input .chat-textarea":"inputChanged","keydown .chat-textarea":"onKeyDown","keyup .chat-textarea":"onKeyUp","mousedown .dragresize-occupants-left":"onStartResizeOccupants","paste .chat-textarea":"onPaste","submit .muc-nickname-form":"submitNickname"},async initialize(){this.initDebounced(),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"rendered",this.scrollDown),this.model.messages.on("reset",()=>{this.content.innerHTML="",this.removeAll()}),this.listenTo(this.model,"change",this.renderHeading),this.listenTo(this.model.session,"change:connection_status",this.onConnectionStatusChanged),this.listenTo(this.model,"change:hidden_occupants",this.updateOccupantsToggle),this.listenTo(this.model,"change:subject",this.setChatRoomSubject),this.listenTo(this.model,"configurationNeeded",this.getAndRenderConfigurationForm),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"show",this.show),this.listenTo(this.model.features,"change:moderated",this.renderBottomPanel),this.listenTo(this.model.occupants,"add",this.onOccupantAdded),this.listenTo(this.model.occupants,"remove",this.onOccupantRemoved),this.listenTo(this.model.occupants,"change:show",this.showJoinOrLeaveNotification),this.listenTo(this.model.occupants,"change:role",this.onOccupantRoleChanged),this.listenTo(this.model.occupants,"change:affiliation",this.onOccupantAffiliationChanged),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.render(),this.createOccupantsView(),await this.updateAfterMessagesFetched(),this.onConnectionStatusChanged(),s.api.trigger("chatRoomViewInitialized",this)},render(){return this.el.setAttribute("id",this.model.get("box_id")),this.el.innerHTML=Di()(),this.renderHeading(),this.renderChatArea(),this.renderBottomPanel(),s.muc_show_logs_before_join||this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED||this.showSpinner(),this.model.get("hidden")||this.show(),this},renderHeading(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;const t=xr.get(e,"changed",{});(null===e||xr.intersection(Object.keys(t),["affiliation","bookmarked","jid","name","description","subject"]).length)&&(this.el.querySelector(".chat-head-chatroom").innerHTML=this.generateHeadingHTML())},renderBottomPanel(){const e=this.el.querySelector(".bottom-panel"),t=this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED,o=t&&!(this.model.features.get("moderated")&&"visitor"===this.model.getOwnRole());e.innerHTML=Pi()({__:i,can_edit:o,entered:t}),t&&o&&(this.renderMessageForm(),this.initMentionAutoComplete())},renderChatArea(){if(null===this.el.querySelector(".chat-area")){const e=this.el.querySelector(".chatroom-body");e.insertAdjacentHTML("beforeend",Oi()({__:i,muc_show_logs_before_join:s.muc_show_logs_before_join,show_send_button:s.show_send_button})),this.content=this.el.querySelector(".chat-content")}return this},createOccupantsView(){this.model.occupants.chatroomview=this,this.occupants_view=new s.ChatRoomOccupantsView({model:this.model.occupants});const e=this.el.querySelector(".chatroom-body"),t=this.model.get("occupants_width");this.occupants_view&&t!==void 0&&(this.occupants_view.el.style.flex="0 0 "+t+"px"),e.insertAdjacentElement("beforeend",this.occupants_view.el)},onStartResizeOccupants(e){this.resizing=!0,this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseup",this.onMouseUp);const t=window.getComputedStyle(this.occupants_view.el);this.width=parseInt(t.width.replace(/px$/,""),10),this.prev_pageX=e.pageX},onMouseMove(e){if(this.resizing){e.preventDefault();const t=this.prev_pageX-e.pageX;this.resizeOccupantsView(t,e.pageX),this.prev_pageX=e.pageX}},onMouseUp(e){if(this.resizing){e.preventDefault(),this.resizing=!1,this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseup",this.onMouseUp);const t=this.occupants_view.el.getBoundingClientRect(),o=this.calculateOccupantsWidth(t,0),n={occupants_width:o};s.connection.connected?this.model.save(n):this.model.set(n)}},resizeOccupantsView(e,t){const o=this.occupants_view.el.getBoundingClientRect();if(this.is_minimum)this.is_minimum=o.left<t;else if(this.is_maximum)this.is_maximum=o.left>t;else{const t=this.calculateOccupantsWidth(o,e);this.occupants_view.el.style.flex="0 0 "+t+"px"}},calculateOccupantsWidth(e,t){let o=e.width+t;const n=this.el.clientWidth;return o<.2*n?(o=.2*n,this.is_minimum=!0):o>.75*n?(o=.75*n,this.is_maximum=!0):250>n-o?(o=n-250,this.is_maximum=!0):(this.is_maximum=!1,this.is_minimum=!1),o},getAutoCompleteList(){return this.model.occupants.filter("nick").map(e=>({label:e.get("nick"),value:"@".concat(e.get("nick"))}))},getAutoCompleteListItem(e,t){t=t.trim();const o=document.createElement("li");if(o.setAttribute("aria-selected","false"),s.muc_mention_autocomplete_show_avatar){const t=document.createElement("img");let n="data:"+s.DEFAULT_IMAGE_TYPE+";base64,"+s.DEFAULT_IMAGE;if(s.vcards){const t=s.vcards.findWhere({nickname:e});t&&(n="data:"+t.get("image_type")+";base64,"+t.get("image"))}t.setAttribute("src",n),t.setAttribute("width","22"),t.setAttribute("class","avatar avatar-autocomplete"),o.appendChild(t)}const n=new RegExp("("+t+")","ig"),a=t?e.split(n):[e];return a.forEach(e=>{if(t&&e.match(n)){const t=document.createElement("mark");t.textContent=e,o.appendChild(t)}else o.appendChild(document.createTextNode(e))}),o},initMentionAutoComplete(){this.mention_auto_complete=new s.AutoComplete(this.el,{auto_first:!0,auto_evaluate:!1,min_chars:s.muc_mention_autocomplete_min_chars,match_current_word:!0,list:()=>this.getAutoCompleteList(),filter:"contains"==s.muc_mention_autocomplete_filter?s.FILTER_CONTAINS:s.FILTER_STARTSWITH,ac_triggers:["Tab","@"],include_triggers:[],item:this.getAutoCompleteListItem}),this.mention_auto_complete.on("suggestion-box-selectcomplete",()=>this.auto_completing=!1)},submitNickname(e){e.preventDefault();const t=e.target.nick.value.trim();t&&this.model.join(t)},onKeyDown(e){return this.mention_auto_complete.onKeyDown(e)?void 0:s.ChatBoxView.prototype.onKeyDown.call(this,e)},onKeyUp(e){return this.mention_auto_complete.evaluate(e),s.ChatBoxView.prototype.onKeyUp.call(this,e)},async onMessageRetractButtonClicked(e){e.preventDefault();const t=kr.ancestor(e.target,".message"),o=t.getAttribute("data-msgid"),n=t.getAttribute("data-isodate"),a=this.model.messages.findWhere({msgid:o,time:n}),r=i("Be aware that other XMPP/Jabber clients (and servers) may not yet support retractions and that this message may not be removed everywhere.");if("me"===a.get("sender")){const e=[i("Are you sure you want to retract this message?")];s.show_retraction_warning&&(e[1]=r);const t=await s.api.confirm(i("Confirm"),e);t&&this.retractOwnMessage(a)}else{let e=[i("You are about to retract this message."),i("You may optionally include a message, explaining the reason for the retraction.")];s.show_retraction_warning&&(e=[e[0],r,e[1]]);const t=await s.api.prompt(i("Message Retraction"),e,i("Optional reason"));!1!==t&&this.retractOtherMessage(a,t)}},retractOwnMessage(t){this.model.sendRetractionMessage(t).catch(o=>{t.save({retracted:void 0,retracted_id:void 0});const e=i("Sorry, something went wrong while trying to retract your message.");kr.isErrorStanza(o)?this.showErrorMessage(e):(this.showErrorMessage(e),this.showErrorMessage(o.message)),vt.error(o)}),t.save({retracted:new Date().toISOString(),retracted_id:t.get("origin_id")})},async retractOtherMessage(e,t){const o=await this.model.sendRetractionIQ(e,t);if(null===o){const e=i("A timeout occurred while trying to retract the message");s.api.alert("error",i("Error"),e),s.log(e,vr.LogLevel.WARN)}else if(kr.isErrorStanza(o)){const e=i("Sorry, you're not allowed to retract this message.");s.api.alert("error",i("Error"),e),s.log(e,vr.LogLevel.WARN),s.log(o,vr.LogLevel.WARN)}else e.save({moderated:"retracted",moderated_by:s.bare_jid,moderated_id:e.get("msgid"),moderation_reason:t})},showModeratorToolsModal(e){if(this.verifyRoles(["moderator"])){if(xr.isUndefined(this.model.modtools_modal)){const t=new br.Model({affiliation:e});this.modtools_modal=new s.ModeratorToolsModal({model:t,chatroomview:this})}else this.modtools_modal.set("affiliation",e);this.modtools_modal.show()}},showRoomDetailsModal(e){e.preventDefault(),this.model.room_details_modal===void 0&&(this.model.room_details_modal=new s.RoomDetailsModal({model:this.model})),this.model.room_details_modal.show(e)},showChatStateNotification(e){return"me"===e.get("sender")?void 0:s.ChatBoxView.prototype.showChatStateNotification.apply(this,arguments)},onOccupantAffiliationChanged(e){e.get("jid")===s.bare_jid&&this.renderHeading(),this.informOfOccupantsAffiliationChange(e)},informOfOccupantsAffiliationChange(e){const t=e._previousAttributes.affiliation,o=e.get("affiliation");"admin"===t?this.showChatEvent(i("%1$s is no longer an admin of this groupchat",e.get("nick"))):"owner"===t?this.showChatEvent(i("%1$s is no longer an owner of this groupchat",e.get("nick"))):"outcast"===t&&this.showChatEvent(i("%1$s is no longer banned from this groupchat",e.get("nick"))),"none"===o&&"member"===t&&this.showChatEvent(i("%1$s is no longer a member of this groupchat",e.get("nick"))),"member"===o?this.showChatEvent(i("%1$s is now a member of this groupchat",e.get("nick"))):"outcast"===o?this.showChatEvent(i("%1$s has been banned from this groupchat",e.get("nick"))):("admin"===o||"owner"==o)&&this.showChatEvent(i("%1$s is now an %2$s of this groupchat",e.get("nick"),o))},onOccupantRoleChanged(e,t){e.get("jid")===s.bare_jid&&this.renderBottomPanel(),this.informOfOccupantsRoleChange(e,t)},informOfOccupantsRoleChange(e,t){if(!("none"===t||e.changed.affiliation)){const t=e._previousAttributes.role;"moderator"===t&&this.showChatEvent(i("%1$s is no longer a moderator",e.get("nick"))),"visitor"===t&&this.showChatEvent(i("%1$s has been given a voice",e.get("nick"))),"visitor"===e.get("role")&&this.showChatEvent(i("%1$s has been muted",e.get("nick"))),"moderator"!==e.get("role")||["owner","admin"].includes(e.get("affiliation"))||this.showChatEvent(i("%1$s is now a moderator",e.get("nick")))}},generateHeadingHTML(){return Qi()(Object.assign(this.model.toJSON(),{isOwner:"owner"===this.model.getOwnAffiliation(),title:this.model.getDisplayName(),Strophe:vr,_converse:s,info_close:i("Close and leave this groupchat"),info_configure:i("Configure this groupchat"),info_details:i("Show more details about this groupchat"),description:kr.addHyperlinks(ga.a.filterXSS(xr.get(this.model.get("subject"),"text"),{whiteList:{}}))}))},afterShown(){kr.isPersistableModel(this.model)&&this.model.clearUnreadMsgCounter(),this.scrollDown()},onConnectionStatusChanged(){const e=this.model.session.get("connection_status");e===mo.ROOMSTATUS.NICKNAME_REQUIRED?this.renderNicknameForm():e===mo.ROOMSTATUS.PASSWORD_REQUIRED?this.renderPasswordForm():e===mo.ROOMSTATUS.CONNECTING?this.showSpinner():e===mo.ROOMSTATUS.ENTERED?(this.renderBottomPanel(),this.hideSpinner(),this.maybeFocus()):e===mo.ROOMSTATUS.DISCONNECTED?this.showDisconnectMessage():e===mo.ROOMSTATUS.DESTROYED&&this.showDestroyedMessage()},getToolbarOptions(){return Object.assign(s.ChatBoxView.prototype.getToolbarOptions.apply(this,arguments),{label_hide_occupants:i("Hide the list of participants"),show_occupants_toggle:s.visible_toolbar_buttons.toggle_occupants})},async close(){return this.hide(),br.history.getFragment()==="converse/room?jid="+this.model.get("jid")&&s.router.navigate(""),await this.model.leave(),s.ChatBoxView.prototype.close.apply(this,arguments)},updateOccupantsToggle(){const e=this.el.querySelector(".toggle-occupants"),t=this.el.querySelector(".chat-area");this.model.get("hidden_occupants")?(kr.removeClass("fa-angle-double-right",e),kr.addClass("fa-angle-double-left",e),kr.addClass("full",t)):(kr.addClass("fa-angle-double-right",e),kr.removeClass("fa-angle-double-left",e),kr.removeClass("full",t))},hideOccupants(e){e&&(e.preventDefault(),e.stopPropagation()),this.model.save({hidden_occupants:!0}),this.scrollDown()},toggleOccupants(e){e&&(e.preventDefault(),e.stopPropagation()),this.model.save({hidden_occupants:!this.model.get("hidden_occupants")}),this.scrollDown()},verifyRoles(e,t){let o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(!Array.isArray(e))throw new TypeError("roles must be an Array");if(!e.length)return!0;t||(t=this.model.occupants.findWhere({jid:s.bare_jid}));const n=t.get("role");return!!e.includes(n)||(o&&this.showErrorMessage(i("Forbidden: you do not have the necessary role in order to do that.")),!1)},verifyAffiliations(e,t){let o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(!Array.isArray(e))throw new TypeError("affiliations must be an Array");if(!e.length)return!0;t||(t=this.model.occupants.findWhere({jid:s.bare_jid}));const n=t.get("affiliation");return!!e.includes(n)||(o&&this.showErrorMessage(i("Forbidden: you do not have the necessary affiliation in order to do that.")),!1)},validateRoleOrAffiliationChangeArgs(e,t){return!!t||(this.showErrorMessage(i("Error: the \"%1$s\" command takes two arguments, the user's nickname and optionally a reason.",e)),!1)},getNickOrJIDFromCommandArgs(e){e.startsWith("@")||(e="@"+e);const[t,o]=this.model.parseTextForReferences(e);if(!o.length)return void this.showErrorMessage(i("Error: couldn't find a groupchat participant based on your arguments"));if(1<o.length)return void this.showErrorMessage(i("Error: found multiple groupchat participant based on your arguments"));const n=o.pop().value,a=e.split(n,2)[1];return a&&!a.startsWith(" ")?void this.showErrorMessage(i("Error: couldn't find a groupchat participant based on your arguments")):n},setAffiliation(e,t,o){const n=Ir[e];if(!n)throw Error("ChatRoomView#setAffiliation called with invalid command: ".concat(e));if(!this.verifyAffiliations(o))return!1;if(!this.validateRoleOrAffiliationChangeArgs(e,t))return!1;const a=this.getNickOrJIDFromCommandArgs(t);if(!a)return!1;const i=t.split(a,2)[1].trim(),r=this.model.getOccupant(a),l={jid:r.get("jid"),reason:i};s.auto_register_muc_nickname&&r&&(l.nick=r.get("nick")),this.model.setAffiliation(n,[l]).then(()=>this.model.occupants.fetchMembers()).catch(e=>this.onCommandError(e))},getReason(e){return e.includes(",")?e.slice(e.indexOf(",")+1).trim():null},setRole(e,t){let o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:[];const a=Mr[e];if(!a)throw Error("ChatRoomView#setRole called with invalid command: ".concat(e));if(!this.verifyAffiliations(o)||!this.verifyRoles(n))return!1;if(!this.validateRoleOrAffiliationChangeArgs(e,t))return!1;const s=this.getNickOrJIDFromCommandArgs(t);if(!s)return!1;const i=t.split(s,2)[1].trim(),r=this.model.getOccupant(s);return this.model.setRole(r,a,i,void 0,this.onCommandError.bind(this)),!0},onCommandError(e){vt.fatal(e),this.showErrorMessage(i("Sorry, an error happened while running the command. Check your browser's developer console for details."))},getAllowedCommands(){let e=["clear","help","me","nick","subject","topic","register"];const t=this.model.occupants.findWhere({jid:s.bare_jid});return this.verifyAffiliations(["owner"],t,!1)?e=e.concat(Ar).concat(Tr):this.verifyAffiliations(["admin"],t,!1)&&(e=e.concat(Tr)),this.verifyRoles(["moderator"],t,!1)?e=e.concat(jr).concat(Nr):!this.verifyRoles(["visitor","participant","moderator"],t,!1)&&(e=e.concat(Nr)),e},parseMessageForCommands(e){if(s.muc_disable_slash_commands&&!Array.isArray(s.muc_disable_slash_commands))return s.ChatBoxView.prototype.parseMessageForCommands.apply(this,arguments);e=e.replace(/^\s*/,"");const t=(e.match(/^\/([a-zA-Z]*) ?/)||[""]).pop().toLowerCase();if(!t)return!1;const o=e.slice(("/"+t).length+1).trim();let n=[];if(Array.isArray(s.muc_disable_slash_commands)&&(n=s.muc_disable_slash_commands,n.includes(t)))return!1;switch(t){case"admin":{this.setAffiliation(t,o,["owner"]);break}case"ban":{this.setAffiliation(t,o,["admin","owner"]);break}case"modtools":{this.showModeratorToolsModal(o);break}case"deop":{this.setRole(t,o,["admin","owner"]);break}case"destroy":{if(!this.verifyAffiliations(["owner"]))break;this.model.sendDestroyIQ(o).then(()=>this.close()).catch(t=>this.onCommandError(t));break}case"help":{const e=this.getAllowedCommands();this.showHelpMessages(["<strong>".concat(i("You can run the following commands"),"</strong>")]),this.showHelpMessages(["<strong>/admin</strong>: ".concat(i("Change user's affiliation to admin")),"<strong>/ban</strong>: ".concat(i("Ban user by changing their affiliation to outcast")),"<strong>/clear</strong>: ".concat(i("Clear the chat area")),"<strong>/close</strong>: ".concat(i("Close this groupchat")),"<strong>/deop</strong>: ".concat(i("Change user role to participant")),"<strong>/destroy</strong>: ".concat(i("Remove this groupchat")),"<strong>/help</strong>: ".concat(i("Show this menu")),"<strong>/kick</strong>: ".concat(i("Kick user from groupchat")),"<strong>/me</strong>: ".concat(i("Write in 3rd person")),"<strong>/member</strong>: ".concat(i("Grant membership to a user")),"<strong>/modtools</strong>: ".concat(i("Opens up the moderator tools GUI")),"<strong>/mute</strong>: ".concat(i("Remove user's ability to post messages")),"<strong>/nick</strong>: ".concat(i("Change your nickname")),"<strong>/op</strong>: ".concat(i("Grant moderator role to user")),"<strong>/owner</strong>: ".concat(i("Grant ownership of this groupchat")),"<strong>/register</strong>: ".concat(i("Register your nickname")),"<strong>/revoke</strong>: ".concat(i("Revoke the user's current affiliation")),"<strong>/subject</strong>: ".concat(i("Set groupchat subject")),"<strong>/topic</strong>: ".concat(i("Set groupchat subject (alias for /subject)")),"<strong>/voice</strong>: ".concat(i("Allow muted user to post messages"))].filter(e=>n.every(t=>!e.startsWith(t+"<",9))).filter(t=>e.some(e=>t.startsWith(e+"<",9))));break}case"kick":{this.setRole(t,o,[],["moderator"]);break}case"mute":{this.setRole(t,o,[],["moderator"]);break}case"member":{this.setAffiliation(t,o,["admin","owner"]);break}case"nick":{if(!this.verifyRoles(["visitor","participant","moderator"]))break;else if(0===o.length)this.showErrorMessage(i("Your nickname is \"%1$s\"",this.model.get("nick")));else{const e=vr.getBareJidFromJid(this.model.get("jid"));s.api.send(wr({from:s.connection.jid,to:"".concat(e,"/").concat(o),id:kr.getUniqueId()}).tree())}break}case"owner":this.setAffiliation(t,o,["owner"]);break;case"op":{this.setRole(t,o,["admin","owner"]);break}case"register":{1<o.length?this.showErrorMessage(i("Error: invalid number of arguments")):this.model.registerNickname().then(e=>{e&&this.showErrorMessage(e)});break}case"revoke":{this.setAffiliation(t,o,["admin","owner"]);break}case"topic":case"subject":this.model.setSubject(o);break;case"voice":{this.setRole(t,o,[],["moderator"]);break}default:return s.ChatBoxView.prototype.parseMessageForCommands.apply(this,arguments);}return!0},renderConfigurationForm(e){if(this.hideChatRoomContents(),this.model.save("config_stanza",e.outerHTML),!this.config_form){const{_converse:e}=this.__super__;this.config_form=new e.MUCConfigForm({model:this.model,chatroomview:this});const t=this.el.querySelector(".chatroom-body");t.insertAdjacentElement("beforeend",this.config_form.el)}kr.showElement(this.config_form.el)},renderNicknameForm(){const e=s.muc_show_logs_before_join?i("Choose a nickname to enter"):i("Please choose your nickname"),t=Zi()(Object.assign({heading:e,label_nickname:i("Nickname"),label_join:i("Enter groupchat")},this.model.toJSON()));if(s.muc_show_logs_before_join){const e=this.el.querySelector(".muc-bottom-panel");e.innerHTML=t,kr.addClass("muc-bottom-panel--nickname",e)}else{this.hideChatRoomContents();const e=this.el.querySelector(".chatroom-body");e.insertAdjacentHTML("beforeend",t)}kr.safeSave(this.model.session,{connection_status:mo.ROOMSTATUS.NICKNAME_REQUIRED})},closeForm(){yr(".chatroom-form-container",this.el).forEach(t=>kr.addClass("hidden",t)),this.renderAfterTransition()},getAndRenderConfigurationForm(){this.config_form&&kr.isVisible(this.config_form.el)?this.closeForm():(this.showSpinner(),this.model.fetchRoomConfiguration().then(e=>this.renderConfigurationForm(e)).catch(t=>vt.error(t)))},hideChatRoomContents(){const e=this.el.querySelector(".chatroom-body");null!==e&&[].forEach.call(e.children,e=>e.classList.add("hidden"))},renderPasswordForm(){this.hideChatRoomContents();const e=this.model.get("password_validation_message");if(this.model.save("password_validation_message",void 0),!this.password_form){this.password_form=new s.MUCPasswordForm({model:new br.Model({validation_message:e}),chatroomview:this});const t=this.el.querySelector(".chatroom-body");t.insertAdjacentElement("beforeend",this.password_form.el)}else this.password_form.model.set("validation_message",e);kr.showElement(this.password_form.el),this.model.session.save("connection_status",mo.ROOMSTATUS.PASSWORD_REQUIRED)},showDestroyedMessage(){kr.hideElement(this.el.querySelector(".chat-area")),kr.hideElement(this.el.querySelector(".occupants")),yr(".spinner",this.el).forEach(kr.removeElement);const e=this.model.get("destroyed_reason"),t=this.model.get("moved_jid");this.model.save({destroyed_reason:void 0,moved_jid:void 0});const o=this.el.querySelector(".disconnect-container");o.innerHTML=Bi()({_:xr,__:i,jid:t,reason:e?"\"".concat(e,"\""):null});const n=o.querySelector("a.switch-chat");n&&n.addEventListener("click",async e=>{e.preventDefault();const o=await s.api.rooms.get(t,null,!0);o.maybeShow(!0),this.model.destroy()}),kr.showElement(o)},showDisconnectMessage(){const e=this.model.get("disconnection_message");if(!e)return;kr.hideElement(this.el.querySelector(".chat-area")),kr.hideElement(this.el.querySelector(".occupants")),yr(".spinner",this.el).forEach(kr.removeElement);const t=[e],o=this.model.get("disconnection_actor");o&&t.push(i("This action was done by %1$s.",o));const n=this.model.get("disconnection_reason");n&&t.push(i("The reason given is: \"%1$s\".",n)),this.model.save({disconnection_message:void 0,disconnection_reason:void 0,disconnection_actor:void 0});const a=this.el.querySelector(".disconnect-container");a.innerHTML=Ui()({_:xr,disconnect_messages:t}),kr.showElement(a)},getNotificationWithMessage(e){for(let t=this.content.lastElementChild;t;){if(!xr.includes(xr.get(t,"classList",[]),"chat-info"))return;if(t.textContent===e)return t;t=t.previousElementSibling}},removeEmptyHistoryFeedback(){s.muc_show_logs_before_join&&this.content.firstElementChild.matches(".empty-history-feedback")&&this.content.removeChild(this.content.firstElementChild)},insertDayIndicator(){return this.removeEmptyHistoryFeedback(),s.ChatBoxView.prototype.insertDayIndicator.apply(this,arguments)},insertMessage(e){return this.removeEmptyHistoryFeedback(),s.ChatBoxView.prototype.insertMessage.call(this,e)},insertNotification(e){this.removeEmptyHistoryFeedback(),this.content.insertAdjacentHTML("beforeend",ia()({isodate:new Date().toISOString(),extra_classes:"chat-event",message:e}))},onOccupantAdded(e){e.get("jid")===s.bare_jid&&(this.renderHeading(),this.renderBottomPanel()),"online"===e.get("show")&&this.showJoinNotification(e)},onOccupantRemoved(e){this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&"online"===e.get("show")&&this.showLeaveNotification(e)},showJoinOrLeaveNotification(e){xr.includes(e.get("states"),"303")||("offline"===e.get("show")?this.showLeaveNotification(e):"online"===e.get("show")&&this.showJoinNotification(e))},getPreviousJoinOrLeaveNotification(e,t){for(const o=new Date().toISOString().split("T")[0];null!==e;){if(!e.classList.contains("chat-info"))return;const n=e.getAttribute("data-isodate");if(n&&n.split("T")[0]!==o)return;const a=xr.get(e,"dataset",{});if(a.join===t||a.leave===t||a.leavejoin===t||a.joinleave===t)return e;e=e.previousElementSibling}},showJoinNotification(e){if(s.muc_show_join_leave&&this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED){const t=e.get("nick"),o=s.muc_show_join_leave_status?e.get("status"):null,n=this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild,t),a=xr.get(n,"dataset",{});if(a.leave===t){let e=o?i("%1$s has left and re-entered the groupchat. \"%2$s\"",t,o):i("%1$s has left and re-entered the groupchat",t);const a={data_name:"leavejoin",data_value:t,isodate:new Date().toISOString(),extra_classes:"chat-event",message:e};this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a));const s=this.content.lastElementChild;setTimeout(()=>kr.addClass("fade-out",s),5e3),setTimeout(()=>s.parentElement&&s.parentElement.removeChild(s),5500)}else{let e=o?i("%1$s has entered the groupchat. \"%2$s\"",t,o):i("%1$s has entered the groupchat",t);const a={data_name:"join",data_value:t,isodate:new Date().toISOString(),extra_classes:"chat-event",message:e};n?(this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a))):(this.content.insertAdjacentHTML("beforeend",ia()(a)),this.insertDayIndicator(this.content.lastElementChild))}this.scrollDown()}},showLeaveNotification(e){if(!(!s.muc_show_join_leave||xr.includes(e.get("states"),"303")||xr.includes(e.get("states"),"307"))){const t=e.get("nick"),o=s.muc_show_join_leave_status?e.get("status"):null,n=this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild,t),a=xr.get(n,"dataset",{});if(a.join===t){let e=o?i("%1$s has entered and left the groupchat. \"%2$s\"",t,o):i("%1$s has entered and left the groupchat",t);const a={data_name:"joinleave",data_value:t,isodate:new Date().toISOString(),extra_classes:"chat-event",message:e};this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a));const s=this.content.lastElementChild;setTimeout(()=>kr.addClass("fade-out",s),5e3),setTimeout(()=>s.parentElement&&s.parentElement.removeChild(s),5500)}else{let e=o?i("%1$s has left the groupchat. \"%2$s\"",t,o):i("%1$s has left the groupchat",t);const a={message:e,isodate:new Date().toISOString(),extra_classes:"chat-event",data_name:"leave",data_value:t};n?(this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a))):(this.content.insertAdjacentHTML("beforeend",ia()(a)),this.insertDayIndicator(this.content.lastElementChild))}this.scrollDown()}},renderAfterTransition(){const e=this.model.session.get("connection_status");e==mo.ROOMSTATUS.NICKNAME_REQUIRED?this.renderNicknameForm():e==mo.ROOMSTATUS.PASSWORD_REQUIRED?this.renderPasswordForm():e==mo.ROOMSTATUS.ENTERED&&(this.hideChatRoomContents(),kr.showElement(this.el.querySelector(".chat-area")),kr.showElement(this.el.querySelector(".occupants")),this.scrollDown())},showSpinner(){yr(".spinner",this.el).forEach(kr.removeElement),this.hideChatRoomContents();const e=this.el.querySelector(".chatroom-body");e.insertAdjacentHTML("afterbegin",ua()())},hideSpinner(){const e=this.el.querySelector(".spinner");return null!==e&&(kr.removeElement(e),this.renderAfterTransition()),this},setChatRoomSubject(){const e=this.model.get("subject"),t=e.text?i("Topic set by %1$s",e.author):i("Topic cleared by %1$s",e.author),o=new Date().toISOString();this.content.insertAdjacentHTML("beforeend",ia()({isodate:o,extra_classes:"chat-event",message:t})),e.text&&this.content.insertAdjacentHTML("beforeend",ia()({isodate:o,extra_classes:"chat-topic",message:kr.addHyperlinks(ga.a.filterXSS(xr.get(this.model.get("subject"),"text"),{whiteList:{}})),render_message:!0})),this.scrollDown()}}),s.RoomsPanel=br.NativeView.extend({tagName:"div",className:"controlbox-section",id:"chatrooms",events:{"click a.controlbox-heading__btn.show-add-muc-modal":"showAddRoomModal","click a.controlbox-heading__btn.show-list-muc-modal":"showListRoomsModal"},render(){return this.el.innerHTML=hr()({heading_chatrooms:i("Groupchats"),title_new_room:i("Add a new groupchat"),title_list_rooms:i("Query for groupchats")}),this},showAddRoomModal(e){this.add_room_modal===void 0&&(this.add_room_modal=new s.AddChatRoomModal({model:this.model})),this.add_room_modal.show(e)},showListRoomsModal(e){this.list_rooms_modal===void 0&&(this.list_rooms_modal=new s.ListChatRoomsModal({model:this.model})),this.list_rooms_modal.show(e)}}),s.MUCConfigForm=br.VDOMView.extend({className:"muc-config-form",events:{"submit .chatroom-form":"submitConfigForm","click .button-cancel":"closeConfigForm"},initialize(e){this.chatroomview=e.chatroomview,this.listenTo(this.chatroomview.model.features,"change:passwordprotected",this.render),this.listenTo(this.chatroomview.model.features,"change:config_stanza",this.render),this.render()},toHTML(){const e=kr.toStanza(this.model.get("config_stanza")),t=s.roomconfig_whitelist;let o=yr("field",e);t.length&&(o=o.filter(e=>xr.includes(t,e.getAttribute("var"))));const n=this.model.features.get("passwordprotected"),a={new_password:!n,fixed_username:this.model.get("jid")};return Ji()({__:i,title:xr.get(e.querySelector("title"),"textContent"),instructions:xr.get(e.querySelector("instructions"),"textContent"),fields:o.map(t=>kr.xForm2webForm(t,e,a))})},submitConfigForm(e){e.preventDefault(),this.model.saveConfiguration(e.target).then(()=>this.model.refreshRoomFeatures()),this.chatroomview.closeForm()},closeConfigForm(e){e.preventDefault(),this.chatroomview.closeForm()}}),s.MUCPasswordForm=br.VDOMView.extend({className:"muc-password-form",events:{"submit form":"submitPassword"},initialize(e){this.chatroomview=e.chatroomview,this.listenTo(this.model,"change:validation_message",this.render),this.render()},toHTML(){const e=this.model.get("validation_message");return tr()({jid:this.model.get("jid"),heading:i("This groupchat requires a password"),label_password:i("Password: "),label_submit:i("Submit"),error_class:e?"error":"",validation_message:e})},submitPassword(e){e.preventDefault();const t=this.el.querySelector("input[type=password]").value;this.chatroomview.model.join(this.chatroomview.model.get("nick"),t),this.model.set("validation_message",null)}}),s.ChatRoomOccupantView=br.VDOMView.extend({tagName:"li",initialize(){this.listenTo(this.model,"change",this.render)},toHTML(){const e=this.model.get("show");return dr()(Object.assign({_:xr,jid:"",show:e,hint_show:s.PRETTY_CHAT_STATUS[e],hint_occupant:i("Click to mention %1$s in your message.",this.model.get("nick")),desc_moderator:i("This user is a moderator."),desc_participant:i("This user can send messages in this groupchat."),desc_visitor:i("This user can NOT send messages in this groupchat."),label_moderator:i("Moderator"),label_visitor:i("Visitor"),label_owner:i("Owner"),label_member:i("Member"),label_admin:i("Admin")},this.model.toJSON()))},destroy(){this.el.parentElement.removeChild(this.el)}}),s.ChatRoomOccupantsView=_n.extend({tagName:"div",className:"occupants col-md-3 col-4",listItems:"model",sortEvent:"change:role",listSelector:".occupant-list",ItemView:s.ChatRoomOccupantView,async initialize(){_n.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"add",this.maybeRenderInviteWidget),this.listenTo(this.model,"change:affiliation",this.maybeRenderInviteWidget),this.chatroomview=this.model.chatroomview,this.listenTo(this.chatroomview.model.features,"change",this.renderRoomFeatures),this.listenTo(this.chatroomview.model.features,"change:open",this.renderInviteWidget),this.listenTo(this.chatroomview.model,"change:hidden_occupants",this.setVisibility),this.render(),await this.model.fetched,this.sortAndPositionAllItems()},render(){return this.el.innerHTML=nr()(Object.assign(this.chatroomview.model.toJSON(),{allow_muc_invitations:s.allow_muc_invitations,label_occupants:i("Participants")})),s.allow_muc_invitations&&s.api.waitUntil("rosterContactsFetched").then(()=>this.renderInviteWidget()),this.setVisibility(),this.renderRoomFeatures()},setVisibility(){this.chatroomview.model.get("hidden_occupants")?kr.hideElement(this.el):(kr.showElement(this.el),this.setOccupantsHeight())},maybeRenderInviteWidget(e){e.get("jid")===s.bare_jid&&this.renderInviteWidget()},renderInviteWidget(){const e=this.el.querySelector(".room-invite");if(!this.shouldInviteWidgetBeShown())null!==e&&e.remove();else if(null===e){const e=this.el.querySelector(".occupants-heading");e.insertAdjacentHTML("afterend",Xi()({error_message:null,label_invitation:i("Invite")})),this.initInviteWidget()}return this},renderRoomFeatures(){const e=this.chatroomview.model.features,t=xr.pick(e.attributes,mo.ROOM_FEATURES);if(xr.reduce(Object.values(t),(e,t)=>e||t)){const t=this.el.querySelector(".chatroom-features");t.innerHTML=Wi()(Object.assign(e.toJSON(),{__:i})),this.setOccupantsHeight()}return this},setOccupantsHeight(){const e=this.el.querySelector(".chatroom-features");this.el.querySelector(".occupant-list").style.cssText="height: calc(100% - ".concat(e.offsetHeight,"px - 5em);")},promptForInvite(e){let t="";s.auto_join_on_invite||(t=prompt(i("You are about to invite %1$s to the groupchat \"%2$s\". You may optionally include a message, explaining the reason for the invitation.",e.text.label,this.chatroomview.model.getDisplayName()))),null!==t&&this.chatroomview.model.directInvite(e.text.value,t);const o=this.el.querySelector(".room-invite form"),n=o.querySelector(".invited-contact"),a=o.querySelector(".error");null!==a&&a.parentNode.removeChild(a),n.value=""},inviteFormSubmitted(e){e.preventDefault();const t=e.target.querySelector("input.invited-contact"),o=t.value;return!o||2>xr.compact(o.split("@")).length?(e.target.outerHTML=Xi()({error_message:i("Please enter a valid XMPP address"),label_invitation:i("Invite")}),void this.initInviteWidget()):void this.promptForInvite({target:t,text:{label:o,value:o}})},shouldInviteWidgetBeShown(){return s.allow_muc_invitations&&(this.chatroomview.model.features.get("open")||"owner"===this.chatroomview.model.getOwnAffiliation())},initInviteWidget(){const e=this.el.querySelector(".room-invite form");if(null===e)return;e.addEventListener("submit",this.inviteFormSubmitted.bind(this),!1);const t=s.roster.map(e=>({label:e.getDisplayName(),value:e.get("jid")})),o=this.el.querySelector(".suggestion-box").parentElement;this.invite_auto_complete&&this.invite_auto_complete.destroy(),this.invite_auto_complete=new s.AutoComplete(o,{min_chars:1,list:t}),this.invite_auto_complete.on("suggestion-box-selectcomplete",e=>this.promptForInvite(e)),this.invite_auto_complete.on("suggestion-box-open",()=>{this.invite_auto_complete.ul.setAttribute("style","max-height: calc(".concat(this.el.offsetHeight,"px - 80px);"))})}}),s.api.listen.on("chatBoxViewsInitialized",()=>{s.chatboxviews.delegate("click","a.open-chatroom",function(e){e.preventDefault(),s.api.rooms.open(e.target.href)}),s.chatboxes.on("add",async function(e){const t=s.chatboxviews;if(!t.get(e.get("id"))&&e.get("type")===s.CHATROOMS_TYPE&&e.isValid())return await e.initialized,t.add(e.get("id"),new s.ChatRoomView({model:e}))})}),s.api.listen.on("clearSession",()=>{const e=s.chatboxviews.get("controlbox");e&&e.roomspanel&&(e.roomspanel.model.destroy(),e.roomspanel.remove(),delete e.roomspanel)}),s.api.listen.on("controlBoxInitialized",e=>{s.allow_muc&&(a(e),e.model.on("change:connected",()=>a(e)))}),Object.assign(s.api,{roomviews:{get(e){if(Array.isArray(e)){const t=s.api.chatviews.get(e);return t.filter(e=>e.model.get("type")===s.CHATROOMS_TYPE)}else{const t=s.api.chatviews.get(e);return t.model.get("type")===s.CHATROOMS_TYPE?t:null}},close(e){let t;return void 0===e?t=s.chatboxviews:xr.isString(e)?t=[s.chatboxviews.get(e)].filter(e=>e):Array.isArray(e)&&(t=e.map(e=>s.chatboxviews.get(e))),Promise.all(t.map(e=>e.is_chatroom&&e.model&&e.close()))}}})}}),mo.plugins.add("converse-headlines-view",{dependencies:["converse-headlines","converse-chatview"],initialize(){const{_converse:e}=this;e.HeadlinesBoxView=e.ChatBoxView.extend({className:"chatbox headlines",events:{"click .close-chatbox-button":"close","click .toggle-chatbox-button":"minimize","keypress textarea.chat-textarea":"onKeyDown"},initialize(){this.initDebounced(),this.model.disable_mam=!0,this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"change:minimized",this.onMinimizedChanged),this.render().insertHeading(),this.updateAfterMessagesFetched(),this.insertIntoDOM().hide(),e.api.trigger("headlinesBoxViewInitialized",this)},render(){return this.el.setAttribute("id",this.model.get("box_id")),this.el.innerHTML=Ma()(Object.assign(this.model.toJSON(),{info_close:"",label_personal_message:"",show_send_button:!1,show_toolbar:!1,unread_msgs:""})),this.content=this.el.querySelector(".chat-content"),this},renderMessageForm:function(){},afterShown:function(){}}),e.api.listen.on("chatBoxViewsInitialized",()=>{const t=e.chatboxviews;e.chatboxes.on("add",o=>{t.get(o.get("id"))||o.get("type")!==e.HEADLINES_TYPE||t.add(o.get("id"),new e.HeadlinesBoxView({model:o}))})})}});const{Strophe:Or,sizzle:Rr}=mo.env,Dr=mo.env.utils;mo.plugins.add("converse-notification",{dependencies:["converse-chatboxes"],initialize(){const{_converse:e}=this,{__:t}=e;e.supports_html5_notification="Notification"in window,e.api.settings.update({notify_all_room_messages:!1,show_desktop_notifications:!0,show_chat_state_notifications:!1,chatstate_notification_blacklist:[],play_sounds:!0,sounds_path:"sounds/",notification_icon:"logo/conversejs-filled.svg",notification_delay:5e3}),e.shouldNotifyOfGroupMessage=function(t){let o=e.notify_all_room_messages;const n=t.getAttribute("from"),a=Or.getResourceFromJid(n),s=Or.getBareJidFromJid(n),i=a&&Or.unescapeNode(a)||"";if(""===i||0<t.querySelectorAll("delay").length)return!1;const r=e.chatboxes.get(s),l=t.querySelector("body");if(null===l)return!1;const d=new RegExp("\\b".concat(r.get("nick"),"\\b")).test(l.textContent);return o=!0===o||Array.isArray(o)&&o.includes(s),!!(i!==r.get("nick")&&(o||d))},e.isMessageToHiddenChat=function(t){if(e.isUniView()){const o=Or.getBareJidFromJid(t.getAttribute("from")),n=e.chatboxviews.get(o);return!n||n.model.get("hidden")||"hidden"===e.windowState||!Dr.isVisible(n.el)}return"hidden"===e.windowState},e.shouldNotifyOfMessage=function(t){const o=t.querySelector("forwarded");if(null!==o)return!1;if("groupchat"===t.getAttribute("type"))return e.shouldNotifyOfGroupMessage(t);if(Dr.isHeadlineMessage(e,t))return e.isMessageToHiddenChat(t);const n=Or.getBareJidFromJid(t.getAttribute("from"))===e.bare_jid;return!Dr.isOnlyChatStateNotification(t)&&!Dr.isOnlyMessageDeliveryReceipt(t)&&!n&&("all"===e.show_desktop_notifications||e.isMessageToHiddenChat(t))},e.playSoundNotification=function(){if(e.play_sounds&&window.Audio!==void 0){const t=new Audio(e.sounds_path+"msg_received.ogg"),o=t.canPlayType("audio/ogg");if("probably"===o)return t.play();const n=new Audio(e.sounds_path+"msg_received.mp3"),a=n.canPlayType("audio/mp3");"probably"===a?n.play():"maybe"===o?t.play():"maybe"===a&&n.play()}},e.areDesktopNotificationsEnabled=function(){return e.supports_html5_notification&&e.show_desktop_notifications&&"granted"===Notification.permission},e.showMessageNotification=function(o){if(!e.areDesktopNotificationsEnabled())return;let a,s;const i=o.getAttribute("from"),r=Or.getBareJidFromJid(i);if("headline"===o.getAttribute("type")){if(!r.includes("@")||e.allow_non_roster_messaging)a=t("Notification from %1$s",r);else return;}else if(!r.includes("@"))a=t("Notification from %1$s",r);else if("groupchat"===o.getAttribute("type"))a=t("%1$s says",Or.getResourceFromJid(i));else{if(void 0===e.roster)return void vt.error("Could not send notification, because roster is undefined");if(s=e.roster.get(r),void 0!==s)a=t("%1$s says",s.getDisplayName());else if(e.allow_non_roster_messaging)a=t("%1$s says",r);else return}const l=Rr("encrypted[xmlns=\"".concat(Or.NS.OMEMO,"\"]"),o).length?t("OMEMO Message received"):Object(ke.get)(o.querySelector("body"),"textContent");if(l){const t=new Notification(a,{body:l,lang:e.locale,icon:e.notification_icon,requireInteraction:!e.notification_delay});e.notification_delay&&setTimeout(t.close.bind(t),e.notification_delay)}},e.showChatStateNotification=function(o){if(e.chatstate_notification_blacklist.includes(o.jid))return;const n=o.chat_status;let a=null;if("offline"===n?a=t("has gone offline"):"away"===n?a=t("has gone away"):"dnd"===n?a=t("is busy"):"online"===n&&(a=t("has come online")),null!==a){const t=new Notification(o.getDisplayName(),{body:a,lang:e.locale,icon:e.notification_icon});setTimeout(t.close.bind(t),5e3)}},e.showContactRequestNotification=function(o){const a=new Notification(o.getDisplayName(),{body:t("wants to be your contact"),lang:e.locale,icon:e.notification_icon});setTimeout(a.close.bind(a),5e3)},e.showFeedbackNotification=function(t){if("error"===t.klass||"warn"===t.klass){const o=new Notification(t.subject,{body:t.message,lang:e.locale,icon:e.notification_icon});setTimeout(o.close.bind(o),5e3)}},e.handleChatStateNotification=function(t){e.areDesktopNotificationsEnabled()&&e.show_chat_state_notifications&&e.showChatStateNotification(t)},e.handleMessageNotification=function(t){const o=t.stanza;return!!e.shouldNotifyOfMessage(o)&&void(e.api.trigger("messageNotification",o),e.playSoundNotification(),e.showMessageNotification(o))},e.handleContactRequestNotification=function(t){e.areDesktopNotificationsEnabled(!0)&&e.showContactRequestNotification(t)},e.handleFeedback=function(t){e.areDesktopNotificationsEnabled(!0)&&e.showFeedbackNotification(t)},e.requestPermission=function(){e.supports_html5_notification&&!["denied","granted"].includes(Notification.permission)&&Notification.requestPermission()},e.api.listen.on("pluginsInitialized",function(){e.api.listen.on("contactRequest",e.handleContactRequestNotification),e.api.listen.on("contactPresenceChanged",e.handleChatStateNotification),e.api.listen.on("message",e.handleMessageNotification),e.api.listen.on("feedback",e.handleFeedback),e.api.listen.on("connected",e.requestPermission)})}});var Lr=o(182),Pr=o.n(Lr),qr=o(183),Br=o.n(qr),zr=o(184),Fr=o.n(zr),Hr=o(185),Ur=o.n(Hr);const{sizzle:Vr}=mo.env,Wr=mo.env.utils;mo.plugins.add("converse-profile",{dependencies:["converse-status","converse-modal","converse-vcard","converse-chatboxviews"],initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({show_client_info:!0}),e.ProfileModal=e.BootstrapModal.extend({events:{'change input[type="file"':"updateFilePreview","click .change-avatar":"openFileSelection","submit .profile-form":"onFormSubmitted"},initialize(){this.listenTo(this.model,"change",this.render),e.BootstrapModal.prototype.initialize.apply(this,arguments),e.api.trigger("profileModalInitialized",this.model)},toHTML(){return Fr()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{__:t,_converse:e,alt_avatar:t("Your avatar image"),heading_profile:t("Your Profile"),label_close:t("Close"),label_email:t("Email"),label_fullname:t("Full Name"),label_jid:t("XMPP Address (JID)"),label_nickname:t("Nickname"),label_role:t("Role"),label_role_help:t("Use commas to separate multiple roles. Your roles are shown next to your name on your chat messages."),label_url:t("URL"),utils:Wr,view:this}))},afterRender(){this.tabs=Vr(".nav-item .nav-link",this.el).map(t=>new ya.a.Tab(t))},openFileSelection(e){e.preventDefault(),this.el.querySelector("input[type=\"file\"]").click()},updateFilePreview(e){const t=e.target.files[0],o=new FileReader;o.onloadend=()=>{this.el.querySelector(".avatar").setAttribute("src",o.result)},o.readAsDataURL(t)},setVCard(o){e.api.vcard.set(e.bare_jid,o).then(()=>e.api.vcard.update(this.model.vcard,!0)).catch(o=>{vt.fatal(o),e.api.show("error",t("Error"),[t("Sorry, an error happened while trying to save your profile data."),t("You can check your browser's developer console for any error output.")])}),this.modal.hide()},onFormSubmitted(e){e.preventDefault();const t=new FileReader,o=new FormData(e.target),n=o.get("image"),a={fn:o.get("fn"),nickname:o.get("nickname"),role:o.get("role"),email:o.get("email"),url:o.get("url")};n.size?(t.onloadend=()=>{Object.assign(a,{image:btoa(t.result),image_type:n.type}),this.setVCard(a)},t.readAsBinaryString(n)):(Object.assign(a,{image:this.model.vcard.get("image"),image_type:this.model.vcard.get("image_type")}),this.setVCard(a))}}),e.ChatStatusModal=e.BootstrapModal.extend({events:{"submit form#set-xmpp-status":"onFormSubmitted","click .clear-input":"clearStatusMessage"},toHTML(){return Pr()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{label_away:t("Away"),label_close:t("Close"),label_busy:t("Busy"),label_cancel:t("Cancel"),label_custom_status:t("Custom status"),label_offline:t("Offline"),label_online:t("Online"),label_save:t("Save"),label_xa:t("Away for long"),modal_title:t("Change chat status"),placeholder_status_message:t("Personal status message")}))},afterRender(){this.el.addEventListener("shown.bs.modal",()=>{this.el.querySelector("input[name=\"status_message\"]").focus()},!1)},clearStatusMessage(e){e&&e.preventDefault&&(e.preventDefault(),Wr.hideElement(this.el.querySelector(".clear-input")));const t=this.el.querySelector("input[name=\"status_message\"]");t.value=""},onFormSubmitted(e){e.preventDefault();const t=new FormData(e.target);this.model.save({status_message:t.get("status_message"),status:t.get("chat_status")}),this.modal.hide()}}),e.ClientInfoModal=e.BootstrapModal.extend({toHTML(){return Br()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{__:t,modal_title:t("About"),version_name:e.VERSION_NAME,first_subtitle:t("%1$s Open Source %2$s XMPP chat client brought to you by %3$s Opkode %2$s","<a target=\"_blank\" rel=\"nofollow\" href=\"https://conversejs.org\">","</a>","<a target=\"_blank\" rel=\"nofollow\" href=\"https://opkode.com\">"),second_subtitle:t("%1$s Translate %2$s it into your own language","<a target=\"_blank\" rel=\"nofollow\" href=\"https://hosted.weblate.org/projects/conversejs/#languages\">","</a>")}))}}),e.XMPPStatusView=e.VDOMViewWithAvatar.extend({tagName:"div",events:{"click a.show-profile":"showProfileModal","click a.change-status":"showStatusChangeModal","click .show-client-info":"showClientInfoModal","click .logout":"logOut"},initialize(){this.listenTo(this.model,"change",this.render),this.listenTo(this.model.vcard,"change",this.render)},toHTML(){const o=this.model.get("status")||"offline";return Ur()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{__:t,fullname:this.model.vcard.get("fullname")||e.bare_jid,status_message:this.model.get("status_message")||t("I am %1$s",this.getPrettyStatus(o)),chat_status:o,_converse:e,title_change_settings:t("Change settings"),title_change_status:t("Click to change your chat status"),title_log_out:t("Log out"),info_details:t("Show details about this chat client"),title_your_profile:t("Your profile")}))},afterRender(){this.renderAvatar()},showProfileModal(t){this.profile_modal===void 0&&(this.profile_modal=new e.ProfileModal({model:this.model})),this.profile_modal.show(t)},showStatusChangeModal(t){this.status_modal===void 0&&(this.status_modal=new e.ChatStatusModal({model:this.model})),this.status_modal.show(t)},showClientInfoModal(t){this.client_info_modal===void 0&&(this.client_info_modal=new e.ClientInfoModal({model:this.model})),this.client_info_modal.show(t)},logOut(o){o.preventDefault();const n=confirm(t("Are you sure you want to log out?"));!0===n&&e.api.user.logout()},getPrettyStatus(e){return"chat"===e?t("online"):"dnd"===e?t("busy"):"xa"===e?t("away for long"):"away"===e?t("away"):"offline"===e?t("offline"):t(e)||t("online")}}),e.api.listen.on("controlBoxPaneInitialized",async t=>{await e.api.waitUntil("VCardsInitialized"),e.xmppstatusview=new e.XMPPStatusView({model:e.xmppstatus}),t.el.insertAdjacentElement("afterBegin",e.xmppstatusview.render().el)})}});var Gr=o(186),Jr=o.n(Gr);const{Backbone:$r,Strophe:Qr,sizzle:Yr,$build:Xr,$iq:Kr,$msg:Zr,_:el}=mo.env,tl=mo.env.utils;Qr.addNamespace("OMEMO_DEVICELIST",Qr.NS.OMEMO+".devicelist"),Qr.addNamespace("OMEMO_VERIFICATION",Qr.NS.OMEMO+".verification"),Qr.addNamespace("OMEMO_WHITELISTED",Qr.NS.OMEMO+".whitelisted"),Qr.addNamespace("OMEMO_BUNDLES",Qr.NS.OMEMO+".bundles");const ol=128,nl={name:"AES-GCM",length:128};class al extends Error{constructor(e,t){super(e,t),this.name="IQError",this.iq=t}}mo.plugins.add("converse-omemo",{enabled(e){return window.libsignal&&!e.blacklisted_plugins.includes("converse-omemo")&&e.config.get("trusted")},dependencies:["converse-chatview","converse-pubsub","converse-profile"],overrides:{ProfileModal:{events:{"change input.select-all":"selectAll","click .generate-bundle":"generateOMEMODeviceBundle","submit .fingerprint-removal":"removeSelectedFingerprints"},initialize(){const{_converse:e}=this.__super__;return this.debouncedRender=el.debounce(this.render,50),this.devicelist=e.devicelists.get(e.bare_jid),this.listenTo(this.devicelist.devices,"change:bundle",this.debouncedRender),this.listenTo(this.devicelist.devices,"reset",this.debouncedRender),this.listenTo(this.devicelist.devices,"reset",this.debouncedRender),this.listenTo(this.devicelist.devices,"remove",this.debouncedRender),this.listenTo(this.devicelist.devices,"add",this.debouncedRender),this.__super__.initialize.apply(this,arguments)},beforeRender(){const{_converse:e}=this.__super__,t=e.omemo_store.get("device_id");if(t&&(this.current_device=this.devicelist.devices.get(t)),this.other_devices=this.devicelist.devices.filter(e=>e.get("id")!==t),this.__super__.beforeRender)return this.__super__.beforeRender.apply(this,arguments)},selectAll(e){for(let t=tl.ancestor(e.target,"li");t;)t.querySelector("input[type=\"checkbox\"]").checked=e.target.checked,t=t.nextElementSibling},removeSelectedFingerprints(e){e.preventDefault(),e.stopPropagation(),e.target.querySelector(".select-all").checked=!1;const t=Yr(".fingerprint-removal-item input[type=\"checkbox\"]:checked",e.target).map(e=>e.value);this.devicelist.removeOwnDevices(t).then(this.modal.hide).catch(e=>{const{_converse:t}=this.__super__,{__:o}=t;vt.error(e),t.api.alert(Qr.LogLevel.ERROR,o("Error"),[o("Sorry, an error occurred while trying to remove the devices.")])})},generateOMEMODeviceBundle(e){const{_converse:t}=this.__super__,{__:o,api:n}=t;e.preventDefault(),confirm(o("Are you sure you want to generate new OMEMO keys? This will remove your old keys and all previously encrypted messages will no longer be decryptable on this device."))&&n.omemo.bundle.generate()}},UserDetailsModal:{events:{"click .fingerprint-trust .btn input":"toggleDeviceTrust"},initialize(){const{_converse:e}=this.__super__,t=this.model.get("jid");return this.devicelist=e.devicelists.getDeviceList(t),this.listenTo(this.devicelist.devices,"change:bundle",this.render),this.listenTo(this.devicelist.devices,"change:trusted",this.render),this.listenTo(this.devicelist.devices,"remove",this.render),this.listenTo(this.devicelist.devices,"add",this.render),this.listenTo(this.devicelist.devices,"reset",this.render),this.__super__.initialize.apply(this,arguments)},toggleDeviceTrust(e){const t=e.target,o=this.devicelist.devices.get(t.getAttribute("name"));o.save("trusted",parseInt(t.value,10))}},ChatBox:{async getMessageAttributesFromStanza(e,t){const{_converse:o}=this.__super__,n=Yr("encrypted[xmlns=\"".concat(Qr.NS.OMEMO,"\"]"),t).pop(),a=await this.__super__.getMessageAttributesFromStanza.apply(this,arguments);return n&&o.config.get("trusted")?this.getEncryptionAttributesfromStanza(e,t,a):a},async sendMessage(e,t){if(this.get("omemo_active")&&e){const{_converse:o}=this.__super__,n=this.getOutgoingMessageAttributes(e,t);n.is_encrypted=!0,n.plaintext=n.message;let a,s;try{const e=await o.getBundlesAndBuildSessions(this);a=this.messages.create(n),s=await o.createOMEMOMessageStanza(this,a,e)}catch(t){return this.handleMessageSendError(t),null}return o.api.send(s),a}return this.__super__.sendMessage.apply(this,arguments)}},ChatBoxView:{events:{"click .toggle-omemo":"toggleOMEMO"},initialize(){this.__super__.initialize.apply(this,arguments),this.listenTo(this.model,"change:omemo_active",this.renderOMEMOToolbarButton),this.listenTo(this.model,"change:omemo_supported",this.onOMEMOSupportedDetermined)},showMessage(e){if(!e.get("is_only_key"))return this.__super__.showMessage.apply(this,arguments)}},ChatRoomView:{events:{"click .toggle-omemo":"toggleOMEMO"},initialize(){this.__super__.initialize.apply(this,arguments),this.listenTo(this.model,"change:omemo_active",this.renderOMEMOToolbarButton),this.listenTo(this.model,"change:omemo_supported",this.onOMEMOSupportedDetermined)}}},initialize(){async function e(e){if(!el.get(e.get("bundle"),"fingerprint")){const t=await e.getBundle();t.fingerprint=tl.arrayBufferToHex(tl.base64ToArrayBuffer(t.identity_key)),e.save("bundle",t),e.trigger("change:bundle")}}async function t(e){await m.api.waitUntil("OMEMOInitialized");const t=m.devicelists.get(e)||m.devicelists.create({jid:e});return await t.fetchDevices(),t.devices}function o(){const e=m.devicelists.get(m.bare_jid).devices.pluck("id");let t=libsignal.KeyHelper.generateRegistrationId(),o=0;for(;el.includes(e,t);)if(t=libsignal.KeyHelper.generateRegistrationId(),o++,10==o)throw new Error("Unable to generate a unique device ID");return t.toString()}async function n(e){const t=new libsignal.SignalProtocolAddress(e.get("jid"),e.get("id")),o=new libsignal.SessionBuilder(m.omemo_store,t),n=e.getRandomPreKey(),a=await e.getBundle();return o.processPreKey({registrationId:parseInt(e.get("id"),10),identityKey:tl.base64ToArrayBuffer(a.identity_key),signedPreKey:{keyId:a.signed_prekey.id,publicKey:tl.base64ToArrayBuffer(a.signed_prekey.public_key),signature:tl.base64ToArrayBuffer(a.signed_prekey.signature)},preKey:{keyId:n.id,publicKey:tl.base64ToArrayBuffer(n.key)}})}async function a(t){const o=new libsignal.SignalProtocolAddress(t.get("jid"),t.get("id")),a=await m.omemo_store.loadSession(o.toString());if(a)return Promise.resolve(a);try{const e=await n(t);return e}catch(o){return vt.error("Could not build an OMEMO session for device ".concat(t.get("id"))),vt.error(o),null}}function s(e,t,o){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const a=t[n].payload,s=t[n].device,i=3==parseInt(a.type,10);e.c("key",{rid:s.get("id")}).t(btoa(a.body)),i&&e.attrs({prekey:i}),e.up(),n==t.length-1&&e.c("iv").t(o).up().up()}return Promise.resolve(e)}function i(){return new Promise((e,t)=>m.devicelists.fetch({success:e,error:(o,n)=>t(n)}))}async function r(){await i();let e=m.devicelists.get(m.bare_jid);return e||(e=m.devicelists.create({jid:m.bare_jid})),e.fetchDevices()}function l(e){const t=Yr("items",e).pop();if(t&&t.getAttribute("node").startsWith(Qr.NS.OMEMO_BUNDLES)){const o=t.getAttribute("node").split(":")[1],n=e.getAttribute("from"),a=Yr("item > bundle",t).pop(),s=m.devicelists.getDeviceList(n),i=s.devices.get(o)||s.devices.create({id:o,jid:n});i.save({bundle:xe(a)})}}function d(e){const t=Yr("items[node=\"".concat(Qr.NS.OMEMO_DEVICELIST,"\"]"),e).pop();if(!t)return;const o="item list[xmlns=\"".concat(Qr.NS.OMEMO,"\"] device"),n=Yr(o,t).map(e=>e.getAttribute("id")),a=e.getAttribute("from"),s=m.devicelists.getDeviceList(a),i=s.devices,r=el.difference(i.pluck("id"),n);r.forEach(e=>{a===m.bare_jid&&e===m.omemo_store.get("device_id")||i.get(e).save("active",!1)}),n.forEach(e=>{const t=i.get(e);t?t.save("active",!0):i.create({id:e,jid:a})}),tl.isSameBareJID(a,m.bare_jid)&&s.publishCurrentDevice(n)}function c(){if(m.omemo_store===void 0){const e="converse.omemosession-".concat(m.bare_jid);m.omemo_store=new m.OMEMOStore({id:e}),m.omemo_store.browserStorage=m.createStore(e)}return m.omemo_store.fetchSession()}async function p(e,t){if(!t.isSelf()&&e.features.get("nonanonymous")&&e.features.get("membersonly")&&e.get("omemo_active")){const o=await m.contactHasOMEMOSupport(t.get("jid"));o||(e.messages.create({message:g("%1$s doesn't appear to have a client that supports OMEMO. Encrypted chat will no longer be possible in this grouchat.",t.get("nick")),type:"error"}),e.save({omemo_active:!1,omemo_supported:!1}))}}async function u(e){let t;e.get("type")===m.CHATROOMS_TYPE?(await m.api.waitUntil("OMEMOInitialized"),t=e.features.get("nonanonymous")&&e.features.get("membersonly")):e.get("type")===m.PRIVATE_CHAT_TYPE&&(t=await m.contactHasOMEMOSupport(e.get("jid"))),e.set("omemo_supported",t),t&&m.omemo_default&&e.set("omemo_active",!0)}const{_converse:m}=this,{__:g}=m;m.api.settings.update({omemo_default:!1}),m.api.promises.add(["OMEMOInitialized"]),m.NUM_PREKEYS=100;Object.assign(m.ChatBox.prototype,{async encryptMessage(e){const t=crypto.getRandomValues(new window.Uint8Array(12)),o=await crypto.subtle.generateKey(nl,!0,["encrypt","decrypt"]),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:t,tagLength:ol},o,tl.stringToArrayBuffer(e)),a=n.byteLength-16,s=n.slice(0,a),i=n.slice(a),r=await crypto.subtle.exportKey("raw",o);return Promise.resolve({key:r,tag:i,key_and_tag:tl.appendArrayBuffer(r,i),payload:tl.arrayBufferToBase64(s),iv:tl.arrayBufferToBase64(t)})},async decryptMessage(e){const t=await crypto.subtle.importKey("raw",e.key,nl,!0,["encrypt","decrypt"]),o=tl.appendArrayBuffer(tl.base64ToArrayBuffer(e.payload),e.tag),n={name:"AES-GCM",iv:tl.base64ToArrayBuffer(e.iv),tagLength:ol};return tl.arrayBufferToString(await crypto.subtle.decrypt(n,t,o))},reportDecryptionError(t){if("debug"===m.loglevel){const{__:e}=m;this.messages.create({message:e("Sorry, could not decrypt a received OMEMO message due to an error.")+" ".concat(t.name," ").concat(t.message),type:"error"})}vt.error("".concat(t.name," ").concat(t.message))},async handleDecryptedWhisperMessage(e,t){const o=e.encrypted,n=m.devicelists.getDeviceList(this.get("jid"));this.save("omemo_supported",!0);let a=n.get(o.device_id);if(a||(a=n.devices.create({id:o.device_id,jid:e.from})),o.payload){const e=t.slice(0,16),n=t.slice(16),s=await this.decryptMessage(Object.assign(o,{key:e,tag:n}));return a.save("active",!0),s}},decrypt(t){const o=this.getSessionCipher(t.from,parseInt(t.encrypted.device_id,10));if(!0===t.encrypted.prekey){let e;return o.decryptPreKeyWhisperMessage(tl.base64ToArrayBuffer(t.encrypted.key),"binary").then(e=>this.handleDecryptedWhisperMessage(t,e)).then(t=>(e=t,m.omemo_store.generateMissingPreKeys())).then(()=>m.omemo_store.publishBundle()).then(()=>e?Object.assign(t,{plaintext:e}):Object.assign(t,{is_only_key:!0})).catch(o=>(this.reportDecryptionError(o),t))}return o.decryptWhisperMessage(tl.base64ToArrayBuffer(t.encrypted.key),"binary").then(e=>this.handleDecryptedWhisperMessage(t,e)).then(e=>Object.assign(t,{plaintext:e})).catch(o=>(this.reportDecryptionError(o),t))},getEncryptionAttributesfromStanza(e,t,o){const n=Yr("encrypted[xmlns=\"".concat(Qr.NS.OMEMO,"\"]"),t).pop(),a=n.querySelector("header"),s=Yr("key[rid=\"".concat(m.omemo_store.get("device_id"),"\"]"),n).pop();return s?(o.is_encrypted=!0,o.encrypted={device_id:a.getAttribute("sid"),iv:a.querySelector("iv").textContent,key:s.textContent,payload:el.get(n.querySelector("payload"),"textContent",null),prekey:el.includes(["true","1"],s.getAttribute("prekey"))},this.decrypt(o)):Promise.resolve(o)},getSessionCipher(e,t){const o=new libsignal.SignalProtocolAddress(e,t);return this.session_cipher=new window.libsignal.SessionCipher(m.omemo_store,o),this.session_cipher},encryptKey(e,t){return this.getSessionCipher(t.get("jid"),t.get("id")).encrypt(e).then(e=>({payload:e,device:t}))},handleMessageSendError(t){if("IQError"===t.name){this.save("omemo_supported",!1);const e=[];Yr("presence-subscription-required[xmlns=\"".concat(Qr.NS.PUBSUB_ERROR,"\"]"),t.iq).length?e.push(g("Sorry, we're unable to send an encrypted message because %1$s requires you to be subscribed to their presence in order to see their OMEMO information",t.iq.getAttribute("from"))):Yr("remote-server-not-found[xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"]",t.iq).length?e.push(g("Sorry, we're unable to send an encrypted message because the remote server for %1$s could not be found",t.iq.getAttribute("from"))):(e.push(g("Unable to send an encrypted message due to an unexpected error.")),e.push(t.iq.outerHTML)),m.api.alert("error",g("Error"),e),vt.error(t)}else if(t.user_facing)m.api.alert("error",g("Error"),[t.message]),vt.error(t);else throw t}});Object.assign(m.ChatBoxView.prototype,{onOMEMOSupportedDetermined(){!this.model.get("omemo_supported")&&this.model.get("omemo_active")?this.model.set("omemo_active",!1):this.renderOMEMOToolbarButton()},renderOMEMOToolbarButton(){if(this.model.get("type")!==m.CHATROOMS_TYPE||this.model.features.get("membersonly")&&this.model.features.get("nonanonymous")){const e=this.el.querySelector(".toggle-omemo"),t=Jr()(Object.assign(this.model.toJSON(),{__:g}));e?e.outerHTML=t:this.el.querySelector(".chat-toolbar").insertAdjacentHTML("beforeend",t)}else{const e=this.el.querySelector(".toggle-omemo");e&&e.parentElement.removeChild(e)}},toggleOMEMO(e){if(!this.model.get("omemo_supported")){let e;return e=this.model.get("type")===m.CHATROOMS_TYPE?[g("Cannot use end-to-end encryption in this groupchat, either the groupchat has some anonymity or not all participants support OMEMO.")]:[g("Cannot use end-to-end encryption because %1$s uses a client that doesn't support OMEMO.",this.model.contact.getDisplayName())],m.api.alert("error",g("Error"),e)}e.preventDefault(),this.model.save({omemo_active:!this.model.get("omemo_active")})}}),m.generateFingerprints=async function(o){const n=await t(o);return Promise.all(n.map(t=>e(t)))},m.getDeviceForContact=function(e,o){return t(e).then(e=>e.get(o))},m.contactHasOMEMOSupport=async function(e){const o=await t(e);return 0<o.length},m.getBundlesAndBuildSessions=async function(e){const o=g("Sorry, no devices found to which we can send an OMEMO encrypted message.");let n;if(e.get("type")===m.CHATROOMS_TYPE){const o=await Promise.all(e.occupants.map(e=>t(e.get("jid"))));n=o.reduce((e,t)=>el.concat(e,t.models),[])}else if(e.get("type")===m.PRIVATE_CHAT_TYPE){const a=await t(e.get("jid"));if(0===a.length){const e=new Error(o);throw e.user_facing=!0,e}const s=m.devicelists.get(m.bare_jid).devices;n=[...s.models,...a.models]}const s=m.omemo_store.get("device_id");n=n.filter(e=>e.get("id")!==s),await Promise.all(n.map(e=>e.getBundle()));const i=await Promise.all(n.map(e=>a(e)));if(i.includes(null)&&(n=n.filter(e=>i[n.indexOf(e)]),0===n.length)){const e=new Error(o);throw e.user_facing=!0,e}return n},m.createOMEMOMessageStanza=function(e,t,o){const{__:n}=m,a=n("This is an OMEMO encrypted message which your client doesn\u2019t seem to support. Find more information on https://conversations.im/omemo");if(!t.get("message"))throw new Error("No message body to encrypt!");const i=Zr({from:m.connection.jid,to:e.get("jid"),type:e.get("message_type"),id:t.get("msgid")}).c("body").t(a).up();return"chat"===t.get("type")&&i.c("request",{xmlns:Qr.NS.RECEIPTS}).up(),i.c("encrypted",{xmlns:Qr.NS.OMEMO}).c("header",{sid:m.omemo_store.get("device_id")}),e.encryptMessage(t.get("message")).then(t=>{const n=o.filter(e=>e.get("trusted")!=-1&&e.get("active")).map(o=>e.encryptKey(t.key_and_tag,o));return Promise.all(n).then(e=>s(i,e,t.iv)).then(e=>(e.c("payload").t(t.payload).up().up(),e.c("store",{xmlns:Qr.NS.HINTS}),e))})},m.OMEMOStore=$r.Model.extend({Direction:{SENDING:1,RECEIVING:2},getIdentityKeyPair(){const e=this.get("identity_keypair");return Promise.resolve({privKey:tl.base64ToArrayBuffer(e.privKey),pubKey:tl.base64ToArrayBuffer(e.pubKey)})},getLocalRegistrationId(){return Promise.resolve(parseInt(this.get("device_id"),10))},isTrustedIdentity(e,t){if(null===e||e===void 0)throw new Error("Can't check identity key for invalid key");if(!(t instanceof ArrayBuffer))throw new Error("Expected identity_key to be an ArrayBuffer");const o=this.get("identity_key"+e);return void 0===o?Promise.resolve(!0):Promise.resolve(tl.arrayBufferToBase64(t)===o)},loadIdentityKey(e){if(null===e||e===void 0)throw new Error("Can't load identity_key for invalid identifier");return Promise.resolve(tl.base64ToArrayBuffer(this.get("identity_key"+e)))},saveIdentity(e,t){if(null===e||void 0===e)throw new Error("Can't save identity_key for invalid identifier");const o=new libsignal.SignalProtocolAddress.fromString(e),n=this.get("identity_key"+o.getName()),a=tl.arrayBufferToBase64(t);return this.save("identity_key"+o.getName(),a),n&&a!==n?Promise.resolve(!0):Promise.resolve(!1)},getPreKeys(){return this.get("prekeys")||{}},loadPreKey(e){const t=this.getPreKeys()[e];return t?Promise.resolve({privKey:tl.base64ToArrayBuffer(t.privKey),pubKey:tl.base64ToArrayBuffer(t.pubKey)}):Promise.resolve()},storePreKey(e,t){const o={};return o[e]={pubKey:tl.arrayBufferToBase64(t.pubKey),privKey:tl.arrayBufferToBase64(t.privKey)},this.save("prekeys",Object.assign(this.getPreKeys(),o)),Promise.resolve()},removePreKey(e){return this.save("prekeys",el.omit(this.getPreKeys(),e)),Promise.resolve()},loadSignedPreKey(){const e=this.get("signed_prekey");return e?Promise.resolve({privKey:tl.base64ToArrayBuffer(e.privKey),pubKey:tl.base64ToArrayBuffer(e.pubKey)}):Promise.resolve()},storeSignedPreKey(e){if("object"!=typeof e)throw new Error("storeSignedPreKey: expected an object");return this.save("signed_prekey",{id:e.keyId,privKey:tl.arrayBufferToBase64(e.keyPair.privKey),pubKey:tl.arrayBufferToBase64(e.keyPair.pubKey),signature:tl.arrayBufferToBase64(e.signature)}),Promise.resolve()},removeSignedPreKey(e){return this.get("signed_prekey").id===e&&(this.unset("signed_prekey"),this.save()),Promise.resolve()},loadSession(e){return Promise.resolve(this.get("session"+e))},storeSession(e,t){return Promise.resolve(this.save("session"+e,t))},removeSession(e){return Promise.resolve(this.unset("session"+e))},removeAllSessions(e){const t=el.filter(Object.keys(this.attributes),t=>{if(t.startsWith("session"+e))return t}),o={};return el.forEach(t,e=>{o[e]=void 0}),this.save(o),Promise.resolve()},publishBundle(){const e=this.get("signed_prekey"),t="".concat(Qr.NS.OMEMO_BUNDLES,":").concat(this.get("device_id")),o=Xr("item").c("bundle",{xmlns:Qr.NS.OMEMO}).c("signedPreKeyPublic",{signedPreKeyId:e.id}).t(e.pubKey).up().c("signedPreKeySignature").t(e.signature).up().c("identityKey").t(this.get("identity_keypair").pubKey).up().c("prekeys");el.forEach(this.get("prekeys"),(e,t)=>o.c("preKeyPublic",{preKeyId:t}).t(e.pubKey).up());return m.api.pubsub.publish(null,t,o,{"pubsub#access_model":"open"},!1)},async generateMissingPreKeys(){const e=el.difference(el.invokeMap(el.range(0,m.NUM_PREKEYS),Number.prototype.toString),Object.keys(this.getPreKeys()));if(1>e.length)return vt.warn("No missing prekeys to generate for our own device"),Promise.resolve();const t=await Promise.all(e.map(e=>libsignal.KeyHelper.generatePreKey(parseInt(e,10))));t.forEach(e=>this.storePreKey(e.keyId,e.keyPair));const o=Object.keys(this.getPreKeys()).map(e=>({id:e.keyId,key:tl.arrayBufferToBase64(e.pubKey)})),n=m.devicelists.get(m.bare_jid),a=n.devices.get(this.get("device_id")),s=await a.getBundle();a.save("bundle",Object.assign(s,{prekeys:o}))},async generateBundle(){const e=await libsignal.KeyHelper.generateIdentityKeyPair(),t={},n=tl.arrayBufferToBase64(e.pubKey),a=o();t.identity_key=n,t.device_id=a,this.save({device_id:a,identity_keypair:{privKey:tl.arrayBufferToBase64(e.privKey),pubKey:n},identity_key:n});const s=await libsignal.KeyHelper.generateSignedPreKey(e,0);m.omemo_store.storeSignedPreKey(s),t.signed_prekey={id:s.keyId,public_key:tl.arrayBufferToBase64(s.keyPair.privKey),signature:tl.arrayBufferToBase64(s.signature)};const i=await Promise.all(el.range(0,m.NUM_PREKEYS).map(e=>libsignal.KeyHelper.generatePreKey(e)));i.forEach(e=>m.omemo_store.storePreKey(e.keyId,e.keyPair));const r=m.devicelists.get(m.bare_jid),l=r.devices.create({id:t.device_id,jid:m.bare_jid}),d=i.map(e=>({id:e.keyId,key:tl.arrayBufferToBase64(e.keyPair.pubKey)}));t.prekeys=d,l.save("bundle",t)},fetchSession(){return void 0===this._setup_promise&&(this._setup_promise=new Promise((e,t)=>{this.fetch({success:()=>{m.omemo_store.get("device_id")?e():this.generateBundle().then(e).catch(t)},error:(o,n)=>{vt.warn("Could not fetch OMEMO session from cache, we'll generate a new one."),vt.warn(n),this.generateBundle().then(e).catch(t)}})})),this._setup_promise}}),m.Device=$r.Model.extend({defaults:{trusted:0,active:!0},getRandomPreKey(){const e=this.get("bundle");return e.prekeys[tl.getRandomInt(e.prekeys.length)]},async fetchBundleFromServer(){const e=Kr({type:"get",from:m.bare_jid,to:this.get("jid")}).c("pubsub",{xmlns:Qr.NS.PUBSUB}).c("items",{node:"".concat(Qr.NS.OMEMO_BUNDLES,":").concat(this.get("id"))});let t;try{t=await m.api.sendIQ(e)}catch(e){throw new al("Could not fetch bundle",e)}if(t.querySelector("error"))throw new al("Could not fetch bundle",t);const o=Yr("items[node=\"".concat(Qr.NS.OMEMO_BUNDLES,":").concat(this.get("id"),"\"]"),t).pop(),n=Yr("bundle[xmlns=\"".concat(Qr.NS.OMEMO,"\"]"),o).pop(),a=xe(n);return this.save("bundle",a),a},getBundle(){return this.get("bundle")?Promise.resolve(this.get("bundle"),this):this.fetchBundleFromServer()}}),m.Devices=m.Collection.extend({model:m.Device}),m.DeviceList=$r.Model.extend({idAttribute:"jid",initialize(){this.devices=new m.Devices;const e="converse.devicelist-".concat(m.bare_jid,"-").concat(this.get("jid"));this.devices.browserStorage=m.createStore(e),this.fetchDevices()},async onDevicesFound(e){if(0===e.length){let e;try{e=await this.fetchDevicesFromServer()}catch(t){null===t?vt.error("Timeout error while fetching devices for ".concat(this.get("jid"))):(vt.error("Could not fetch devices for ".concat(this.get("jid"))),vt.error(t)),this.destroy()}this.get("jid")===m.bare_jid&&(await this.publishCurrentDevice(e))}},fetchDevices(){return void 0===this._devices_promise&&(this._devices_promise=new Promise(t=>{this.devices.fetch({success:e=>t(this.onDevicesFound(e)),error:(o,n)=>{vt.error(n),t()}})})),this._devices_promise},async publishCurrentDevice(e){if(this.get("jid")!==m.bare_jid)return;await c();let t=m.omemo_store.get("device_id");if(this.devices.findWhere({id:t})||(await m.omemo_store.generateBundle(),t=m.omemo_store.get("device_id")),!el.includes(e,t))return this.publishDevices()},async fetchDevicesFromServer(){const e=Kr({type:"get",from:m.bare_jid,to:this.get("jid")}).c("pubsub",{xmlns:Qr.NS.PUBSUB}).c("items",{node:Qr.NS.OMEMO_DEVICELIST});let t;try{t=await m.api.sendIQ(e)}catch(t){return vt.error(t),[]}const o=Yr("list[xmlns=\"".concat(Qr.NS.OMEMO,"\"] device"),t).map(e=>e.getAttribute("id"));return el.forEach(o,e=>this.devices.create({id:e,jid:this.get("jid")})),o},publishDevices(){const e=Xr("item").c("list",{xmlns:Qr.NS.OMEMO});this.devices.filter(e=>e.get("active")).forEach(t=>e.c("device",{id:t.get("id")}).up());return m.api.pubsub.publish(null,Qr.NS.OMEMO_DEVICELIST,e,{"pubsub#access_model":"open"},!1)},removeOwnDevices(e){if(this.get("jid")!==m.bare_jid)throw new Error("Cannot remove devices from someone else's device list");return el.forEach(e,e=>this.devices.get(e).destroy()),this.publishDevices()}}),m.DeviceLists=m.Collection.extend({model:m.DeviceList,getDeviceList(e){return this.get(e)||this.create({jid:e})}}),m.api.waitUntil("chatBoxesInitialized").then(()=>m.chatboxes.on("add",e=>{u(e),e.get("type")===m.CHATROOMS_TYPE&&(e.occupants.on("add",t=>p(e,t)),e.features.on("change",()=>u(e)))})),m.api.listen.on("connected",function(){m.connection.addHandler(e=>{try{Yr("event[xmlns=\"".concat(Qr.NS.PUBSUB,"#event\"]"),e).length&&(d(e),l(e))}catch(t){vt.error(t.message)}return!0},null,"message","headline")}),m.api.listen.on("renderToolbar",e=>e.renderOMEMOToolbarButton()),m.api.listen.on("statusInitialized",async function(){if(m.config.get("trusted")){m.devicelists=new m.DeviceLists;const e="converse.devicelists-".concat(m.bare_jid);m.devicelists.browserStorage=m.createStore(e);try{await r(),await c(),await m.omemo_store.publishBundle()}catch(t){return vt.error("Could not initialize OMEMO support"),void vt.error(t)}m.api.trigger("OMEMOInitialized")}}),m.api.listen.on("addClientFeatures",()=>m.api.disco.own.features.add("".concat(Qr.NS.OMEMO_DEVICELIST,"+notify"))),m.api.listen.on("userDetailsModalInitialized",e=>{const t=e.get("jid");m.generateFingerprints(t).catch(t=>vt.error(t))}),m.api.listen.on("profileModalInitialized",()=>{m.generateFingerprints(m.bare_jid).catch(t=>vt.error(t))}),m.api.listen.on("afterTearDown",()=>delete m.omemo_store),m.api.listen.on("clearSession",()=>{m.shouldClearCache()&&m.devicelists&&(m.devicelists.clearSession(),delete m.devicelists)}),Object.assign(m.api,{omemo:{bundle:{generate:async()=>{const t=m.devicelists.get(m.bare_jid),o=m.omemo_store.get("device_id");if(o){const e=t.devices.get(o);m.omemo_store.unset(o),e&&(await new Promise(t=>e.destroy({success:t,error:t}))),t.devices.trigger("remove")}await m.omemo_store.generateBundle(),await t.publishDevices();const n=t.devices.get(m.omemo_store.get("device_id"));return e(n)}}}})}});const{Strophe:sl,$iq:il,_:rl}=mo.env;sl.addNamespace("PUSH","urn:xmpp:push:0"),mo.plugins.add("converse-push",{initialize(){async function e(e,t){if(t.jid){if(!(await a.api.disco.supports(sl.NS.PUSH,e||a.bare_jid)))return void vt.warn("Not disabling push app server \"".concat(t.jid,"\", no disco support from your server."));const o=il({type:"set"});e!==a.bare_jid&&o.attrs({to:e}),o.c("disable",{xmlns:sl.NS.PUSH,jid:t.jid}),t.node&&o.attrs({node:t.node}),a.api.sendIQ(o).catch(o=>{vt.error("Could not disable push app server for ".concat(t.jid)),vt.error(o)})}}async function t(e,t){if(t.jid&&t.node){const o=await a.api.disco.getIdentity("pubsub","push",t.jid);if(!o)return vt.warn("Not enabling push the service \"".concat(t.jid,"\", it doesn't have the right disco identtiy."));const n=await Promise.all([a.api.disco.supports(sl.NS.PUSH,t.jid),a.api.disco.supports(sl.NS.PUSH,e)]);if(!n[0]&&!n[1])return void vt.warn("Not enabling push app server \"".concat(t.jid,"\", no disco support from your server."));const s=il({type:"set"});return e!==a.bare_jid&&s.attrs({to:e}),s.c("enable",{xmlns:sl.NS.PUSH,jid:t.jid,node:t.node}),t.secret&&s.c("x",{xmlns:sl.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE"}).c("value").t("".concat(sl.NS.PUBSUB,"#publish-options")).up().up().c("field",{var:"secret"}).c("value").t(t.secret),a.api.sendIQ(s)}}async function o(o){o=o||a.bare_jid;const n=a.session.get("push_enabled")||[];if(rl.includes(n,o))return;const s=rl.reject(a.push_app_servers,"disable"),i=rl.filter(a.push_app_servers,"disable"),r=rl.map(s,rl.partial(t,o)),l=rl.map(i,rl.partial(e,o));try{await Promise.all(r.concat(l))}catch(t){vt.error("Could not enable or disable push App Server"),t&&vt.error(t)}finally{n.push(o)}a.session.save("push_enabled",n)}function n(e){e.get("type")==a.CHATROOMS_TYPE&&o(sl.getDomainFromJid(e.get("jid")))}const{_converse:a}=this;a.api.settings.update({push_app_servers:[],enable_muc_push:!1}),a.api.listen.on("statusInitialized",()=>o()),a.enable_muc_push&&a.api.listen.on("chatBoxesInitialized",()=>a.chatboxes.on("add",n))}});var ll=o(187),dl=o.n(ll),cl=o(188),pl=o.n(cl),ul=o(189),ml=o.n(ul),gl=o(190),hl=o.n(gl);const{Strophe:_l,Backbone:fl,sizzle:bl,$iq:vl,_:yl}=mo.env,xl=mo.env.utils;_l.addNamespace("REGISTER","jabber:iq:register");const Sl=Object.keys(_l.Status).reduce((e,t)=>Math.max(e,_l.Status[t]),0);_l.Status.REGIFAIL=Sl+1,_l.Status.REGISTERED=Sl+2,_l.Status.CONFLICT=Sl+3,_l.Status.NOTACCEPTABLE=Sl+5,mo.plugins.add("converse-register",{overrides:{LoginPanel:{render(){const{_converse:e}=this.__super__;return this.__super__.render.apply(this,arguments),e.allow_registration&&!e.auto_login&&this.insertRegisterLink(),this}},ControlBoxView:{renderLoginPanel(){return this.__super__.renderLoginPanel.apply(this,arguments),this.renderRegistrationPanel(),this}}},initialize(){function e(e){t.api.waitUntil("controlBoxInitialized").then(()=>{const o=t.chatboxes.get("controlbox");o.set({"active-form":e})}).catch(t=>vt.fatal(t))}const{_converse:t}=this,{__:o}=t;t.CONNECTION_STATUS[_l.Status.REGIFAIL]="REGIFAIL",t.CONNECTION_STATUS[_l.Status.REGISTERED]="REGISTERED",t.CONNECTION_STATUS[_l.Status.CONFLICT]="CONFLICT",t.CONNECTION_STATUS[_l.Status.NOTACCEPTABLE]="NOTACCEPTABLE",t.api.settings.update({allow_registration:!0,domain_placeholder:o(" e.g. conversejs.org"),providers_link:"https://compliance.conversations.im/",registration_domain:""}),Object.assign(t.LoginPanel.prototype,{insertRegisterLink(){if(this.registerlinkview===void 0){this.registerlinkview=new t.RegisterLinkView({model:this.model}),this.registerlinkview.render();const e=this.el.querySelector(".buttons");e&&e.insertAdjacentElement("afterend",this.registerlinkview.el)}this.registerlinkview.render()}}),Object.assign(t.ControlBoxView.prototype,{showLoginOrRegisterForm(){this.registerpanel&&("register"==this.model.get("active-form")?(this.loginpanel.el.classList.add("hidden"),this.registerpanel.el.classList.remove("hidden")):(this.loginpanel.el.classList.remove("hidden"),this.registerpanel.el.classList.add("hidden")))},renderRegistrationPanel(){if(t.allow_registration){this.registerpanel=new t.RegisterPanel({model:this.model}),this.registerpanel.render(),this.registerpanel.el.classList.add("hidden");const e=this.el.querySelector("#converse-login-panel");e&&e.insertAdjacentElement("afterend",this.registerpanel.el),this.showLoginOrRegisterForm()}return this}}),t.router.route("converse/login",()=>e("login")),t.router.route("converse/register",()=>e("register")),t.RegisterLinkView=fl.VDOMView.extend({toHTML(){return dl()(Object.assign(this.model.toJSON(),{__:t.__,_converse:t,connection_status:t.connfeedback.get("connection_status")}))}}),t.RegisterPanel=fl.NativeView.extend({tagName:"div",id:"converse-register-panel",className:"controlbox-pane fade-in",events:{"submit form#converse-register":"onFormSubmission","click .button-cancel":"renderProviderChoiceForm"},initialize(){this.reset(),t.api.listen.on("connectionInitialized",()=>this.registerHooks())},render(){return this.model.set("registration_form_rendered",!1),this.el.innerHTML=pl()({__:o,default_domain:t.registration_domain,label_register:o("Fetch registration form"),help_providers:o("Tip: A list of public XMPP providers is available"),help_providers_link:o("here"),href_providers:t.providers_link,domain_placeholder:t.domain_placeholder}),t.registration_domain&&this.fetchRegistrationForm(t.registration_domain),this},registerHooks(){const e=t.connection,o=e._connect_cb.bind(e);e._connect_cb=(e,t,n)=>{this._registering?this.getRegistrationFields(e,t)&&(this._registering=!1):o(e,t,n)}},getRegistrationFields(e,n){const a=t.connection;a.connected=!0;const s=a._proto._reqToData(e);if(!s)return;if(a._proto._connect_cb(s)===_l.Status.CONNFAIL)return this.showValidationError(o("Sorry, we're unable to connect to your chosen provider.")),!1;const i=s.getElementsByTagName("register"),r=s.getElementsByTagName("mechanism");if(0===i.length&&0===r.length)return a._proto._no_auth_received(n),!1;if(0===i.length)return a._changeConnectStatus(_l.Status.REGIFAIL),this.showValidationError(o("Sorry, the given provider does not support in band account registration. Please try with a different provider.")),!0;a._addSysHandler(this.onRegistrationFields.bind(this),null,"iq",null,null);const l=vl({type:"get"}).c("query",{xmlns:_l.NS.REGISTER}).tree();return l.setAttribute("id",a.getUniqueId("sendIQ")),a.send(l),a.connected=!1,!0},onRegistrationFields(e){return"error"===e.getAttribute("type")?(t.connection._changeConnectStatus(_l.Status.REGIFAIL,o("Something went wrong while establishing a connection with \"%1$s\". Are you sure it exists?",this.domain)),!1):1===e.getElementsByTagName("query").length?(this.setFields(e),this.model.get("registration_form_rendered")||this.renderRegistrationForm(e),!1):(t.connection._changeConnectStatus(_l.Status.REGIFAIL,"unknown"),!1)},reset(e){const t={fields:{},urls:[],title:"",instructions:"",registered:!1,_registering:!1,domain:null,form_type:null};Object.assign(this,t),e&&Object.assign(this,yl.pick(e,Object.keys(t)))},onFormSubmission(e){e&&e.preventDefault&&e.preventDefault(),null===e.target.querySelector("input[name=domain]")?this.submitRegistrationForm(e.target):this.onProviderChosen(e.target)},onProviderChosen(e){const t=e.querySelector("input[name=domain]"),o=yl.get(t,"value");return o?void(e.querySelector("input[type=submit]").classList.add("hidden"),this.fetchRegistrationForm(o.trim())):void t.classList.add("error")},async fetchRegistrationForm(e){return this.model.get("registration_form_rendered")||this.renderRegistrationRequest(),this.reset({domain:_l.getDomainFromJid(e),_registering:!0}),await t.initConnection(this.domain),t.connection.connect(this.domain,"",e=>this.onConnectStatusChanged(e)),!1},renderRegistrationRequest(){this.clearRegistrationForm().insertAdjacentHTML("beforeend",hl()({__:t.__,cancel:t.registration_domain}))},giveFeedback(e,t){let o=this.el.querySelector(".reg-feedback");null!==o&&o.parentNode.removeChild(o);const n=this.el.querySelector("form");n.insertAdjacentHTML("afterbegin","<span class=\"reg-feedback\"></span>"),o=n.querySelector(".reg-feedback"),o.textContent=e,t&&o.classList.add(t)},clearRegistrationForm(){const e=this.el.querySelector("form");return e.innerHTML="",this.model.set("registration_form_rendered",!1),e},showSpinner(){const e=this.el.querySelector("form");return e.innerHTML=ua()(),this.model.set("registration_form_rendered",!1),this},onConnectStatusChanged(e){vt.debug("converse-register: onConnectStatusChanged"),yl.includes([_l.Status.DISCONNECTED,_l.Status.CONNFAIL,_l.Status.REGIFAIL,_l.Status.NOTACCEPTABLE,_l.Status.CONFLICT],e)?(vt.error("Problem during registration: Strophe.Status is ".concat(t.CONNECTION_STATUS[e])),this.abortRegistration()):e===_l.Status.REGISTERED&&(vt.debug("Registered successfully."),t.connection.reset(),this.showSpinner(),yl.includes(["converse/login","converse/register"],fl.history.getFragment())&&t.router.navigate("",{replace:!0}),this.fields.password&&this.fields.username?(t.connection.connect(this.fields.username.toLowerCase()+"@"+this.domain.toLowerCase(),this.fields.password,t.onConnectStatusChanged),this.giveFeedback(o("Now logging you in"),"info")):(t.chatboxviews.get("controlbox").renderLoginPanel(),t.giveFeedback(o("Registered successfully"))),this.reset())},renderLegacyRegistrationForm(e){Object.keys(this.fields).forEach(t=>{"username"===t?e.insertAdjacentHTML("beforeend",Gn()({domain:" @".concat(this.domain),name:t,type:"text",label:t,value:"",required:!0})):e.insertAdjacentHTML("beforeend",qn()({label:t,name:t,placeholder:t,required:!0,type:"password"===t||"email"===t?t:"text",value:""}))}),this.urls.forEach(t=>e.insertAdjacentHTML("afterend","<a target=\"blank\" rel=\"noopener\" href=\""+t+"\">"+t+"</a>"))},renderRegistrationForm(e){const o=this.el.querySelector("form");o.innerHTML=ml()({__:t.__,domain:this.domain,title:this.title,instructions:this.instructions,registration_domain:t.registration_domain});const n=o.querySelector("fieldset.buttons");"xform"===this.form_type?e.querySelectorAll("field").forEach(t=>{n.insertAdjacentHTML("beforebegin",Po.xForm2webForm(t,e,{domain:this.domain}))}):this.renderLegacyRegistrationForm(o),this.fields||o.querySelector(".button-primary").classList.add("hidden"),o.classList.remove("hidden"),this.model.set("registration_form_rendered",!0)},showValidationError(e){const t=this.el.querySelector("form");let o=t.querySelector(".form-errors");if(null===o){o="<div class=\"form-errors hidden\"></div>";const e=t.querySelector("p.instructions");null===e?t.insertAdjacentHTML("afterbegin",o):e.insertAdjacentHTML("afterend",o),o=t.querySelector(".form-errors")}else o.innerHTML="";o.insertAdjacentHTML("beforeend","<p class=\"form-help error\">"+e+"</p>"),o.classList.remove("hidden")},reportErrors(e){const t=e.querySelectorAll("error");if(t.forEach(t=>this.showValidationError(t.textContent)),!t.length){const e=o("The provider rejected your registration attempt. Please check the values you entered for correctness.");this.showValidationError(e)}},renderProviderChoiceForm(e){e&&e.preventDefault&&e.preventDefault(),t.connection._proto._abortAllRequests(),t.connection.reset(),this.render()},abortRegistration(){t.connection._proto._abortAllRequests(),t.connection.reset(),this.model.get("registration_form_rendered")?t.registration_domain&&this.model.get("registration_form_rendered")&&this.fetchRegistrationForm(t.registration_domain):this.render()},submitRegistrationForm(e){const o=yl.reduce(this.el.querySelectorAll("input.required"),function(e,t){return""===t.value?(t.classList.add("error"),e+1):e},0);if(o)return;const n=bl(":input:not([type=button]):not([type=submit])",e),a=vl({type:"set",id:xl.getUniqueId()}).c("query",{xmlns:_l.NS.REGISTER});"xform"===this.form_type?(a.c("x",{xmlns:_l.NS.XFORM,type:"submit"}),n.forEach(e=>a.cnode(Po.webForm2xForm(e)).up())):n.forEach(e=>a.c(e.getAttribute("name"),{},e.value)),t.connection._addSysHandler(this._onRegisterIQ.bind(this),null,"iq",null,null),t.connection.send(a),this.setFields(a.tree())},setFields(e){const t=e.querySelector("query"),o=bl("x[xmlns=\"".concat(_l.NS.XFORM,"\"]"),t);0<o.length?this._setFieldsFromXForm(o.pop()):this._setFieldsFromLegacy(t)},_setFieldsFromLegacy(e){[].forEach.call(e.children,e=>"instructions"===e.tagName.toLowerCase()?void(this.instructions=_l.getText(e)):"x"===e.tagName.toLowerCase()?void("jabber:x:oob"===e.getAttribute("xmlns")&&this.urls.concat(bl("url",e).map(e=>e.textContent))):void(this.fields[e.tagName.toLowerCase()]=_l.getText(e))),this.form_type="legacy"},_setFieldsFromXForm(e){this.title=yl.get(e.querySelector("title"),"textContent"),this.instructions=yl.get(e.querySelector("instructions"),"textContent"),e.querySelectorAll("field").forEach(e=>{const t=e.getAttribute("var");t?this.fields[t.toLowerCase()]=yl.get(e.querySelector("value"),"textContent",""):vt.warn("Found field we couldn't parse")}),this.form_type="xform"},_onRegisterIQ(e){if("error"===e.getAttribute("type")){vt.error("Registration failed."),this.reportErrors(e);let o=e.getElementsByTagName("error");if(1!==o.length)return t.connection._changeConnectStatus(_l.Status.REGIFAIL,"unknown"),!1;o=o[0].firstChild.tagName.toLowerCase(),"conflict"===o?t.connection._changeConnectStatus(_l.Status.CONFLICT,o):"not-acceptable"===o?t.connection._changeConnectStatus(_l.Status.NOTACCEPTABLE,o):t.connection._changeConnectStatus(_l.Status.REGIFAIL,o)}else t.connection._changeConnectStatus(_l.Status.REGISTERED,null);return!1}}),t.api.listen.on("controlBoxInitialized",e=>{e.model.on("change:active-form",e.showLoginOrRegisterForm,e)})}});var wl=o(191),kl=o.n(wl);const{Backbone:El,Strophe:Cl}=mo.env,Al=mo.env.utils;mo.plugins.add("converse-roomslist",{dependencies:["converse-singleton","converse-controlbox","converse-muc","converse-bookmarks"],initialize(){const{_converse:e}=this,{__:t}=e;e.api.promises.add("roomsListInitialized"),e.RoomsList=El.Model.extend({defaults:{"toggle-state":e.OPENED}}),e.RoomsListView=El.VDOMView.extend({tagName:"div",className:"list-container list-container--openrooms",events:{"click .add-bookmark":"addBookmark","click .close-room":"closeRoom","click .list-toggle":"toggleRoomsList","click .remove-bookmark":"removeBookmark","click .open-room":"openRoom","click .room-info":"showRoomDetailsModal"},initialize(){this.listenTo(this.model,"add",this.renderIfChatRoom),this.listenTo(this.model,"remove",this.renderIfChatRoom),this.listenTo(this.model,"destroy",this.renderIfChatRoom),this.listenTo(this.model,"change",this.renderIfRelevantChange);const t="converse.roomslist".concat(e.bare_jid);this.list_model=new e.RoomsList({id:t}),this.list_model.browserStorage=e.createStore(t),this.list_model.fetch(),this.render(),this.insertIntoControlBox()},renderIfChatRoom(e){Al.isChatRoom(e)&&this.render()},renderIfRelevantChange(e){const t=["bookmarked","hidden","name","num_unread","num_unread_general"],o=e.changed||{};Al.isChatRoom(e)&&Object.keys(o).filter(e=>t.includes(e)).length&&this.render()},toHTML(){return kl()({rooms:this.model.filter(t=>t.get("type")===e.CHATROOMS_TYPE),allow_bookmarks:e.allow_bookmarks&&e.bookmarks,collapsed:this.list_model.get("toggle-state")!==e.OPENED,desc_rooms:t("Click to toggle the list of open groupchats"),info_add_bookmark:t("Bookmark this groupchat"),info_leave_room:t("Leave this groupchat"),info_remove_bookmark:t("Unbookmark this groupchat"),info_title:t("Show more information on this groupchat"),open_title:t("Click to open this groupchat"),currently_open:t=>e.isUniView()&&!t.get("hidden"),toggle_state:this.list_model.get("toggle-state"),label_rooms:t("Open Groupchats"),_converse:e})},insertIntoControlBox(){const t=e.chatboxviews.get("controlbox");if(t!==void 0&&!Al.rootContains(e.root,this.el)){const e=t.el.querySelector(".list-container--openrooms");e&&e.parentNode.replaceChild(this.el,e)}},showRoomDetailsModal(t){const o=t.target.getAttribute("data-room-jid"),n=e.chatboxes.get(o);t.preventDefault(),n.room_details_modal===void 0&&(n.room_details_modal=new e.RoomDetailsModal({model:n})),n.room_details_modal.show(t)},async openRoom(t){t.preventDefault();const o=t.target.textContent,n=t.target.getAttribute("data-room-jid"),a={name:o||Cl.unescapeNode(Cl.getNodeFromJid(n))||n};await e.api.rooms.open(n,a,!0),e.api.chatviews.get(n).maybeFocus()},closeRoom(o){o.preventDefault();const n=o.target.getAttribute("data-room-name"),a=o.target.getAttribute("data-room-jid");confirm(t("Are you sure you want to leave the groupchat %1$s?",n))&&e.chatboxviews.get(a).close()},removeBookmark:e.removeBookmarkViaEvent,addBookmark:e.addBookmarkViaEvent,toggleRoomsList(t){t&&t.preventDefault&&t.preventDefault();const o=t.target.matches(".fa")?t.target:t.target.querySelector(".fa");o.classList.contains("fa-caret-down")?Al.slideIn(this.el.querySelector(".open-rooms-list")).then(()=>{this.list_model.save({"toggle-state":e.CLOSED}),o.classList.remove("fa-caret-down"),o.classList.add("fa-caret-right")}):Al.slideOut(this.el.querySelector(".open-rooms-list")).then(()=>{this.list_model.save({"toggle-state":e.OPENED}),o.classList.remove("fa-caret-right"),o.classList.add("fa-caret-down")})}});const o=function(){e.rooms_list_view=new e.RoomsListView({model:e.chatboxes}),e.api.trigger("roomsListInitialized")};e.api.listen.on("connected",async()=>{e.allow_bookmarks?await e.api.waitUntil("bookmarksInitialized"):await Promise.all([e.api.waitUntil("chatBoxesFetched"),e.api.waitUntil("roomsPanelRendered")]),o()}),e.api.listen.on("reconnected",o)}});var Tl=o(192),jl=o.n(Tl),Nl=o(193),Ml=o.n(Nl),Il=o(194),Ol=o.n(Il),Rl=o(195),Dl=o.n(Rl),Ll=o(196),Pl=o.n(Ll),ql=o(197),Bl=o.n(ql),zl=o(198),Fl=o.n(zl);const{Backbone:Hl,Strophe:Ul}=mo.env,Vl=mo.env.utils;mo.plugins.add("converse-rosterview",{dependencies:["converse-roster","converse-modal","converse-chatboxviews"],initialize(){function e(){t.authentication===t.ANONYMOUS||(t.rosterview=new t.RosterView({model:t.rostergroups}),t.rosterview.render(),t.api.trigger("rosterViewInitialized"))}const{_converse:t}=this,{__:o}=t;t.api.settings.update({autocomplete_add_contact:!0,allow_chat_pending_contacts:!0,allow_contact_removal:!0,hide_offline_users:!1,roster_groups:!0,show_toolbar:!0,xhr_user_search_url:null}),t.api.promises.add("rosterViewInitialized");const n={dnd:o("This contact is busy"),online:o("This contact is online"),offline:o("This contact is offline"),unavailable:o("This contact is unavailable"),xa:o("This contact is away for an extended period"),away:o("This contact is away")};t.AddContactModal=t.BootstrapModal.extend({events:{"submit form":"addContactFromForm"},initialize(){t.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render)},toHTML(){const e=t.xhr_user_search_url?o("Contact name"):o("Optional nickname");return jl()(Object.assign(this.model.toJSON(),{_converse:t,heading_new_contact:o("Add a Contact"),label_xmpp_address:o("XMPP Address"),label_nickname:e,contact_placeholder:o("name@example.org"),label_add:o("Add"),error_message:o("Please enter a valid XMPP address")}))},afterRender(){t.xhr_user_search_url&&Object(ke.isString)(t.xhr_user_search_url)?this.initXHRAutoComplete():this.initJIDAutoComplete();const e=this.el.querySelector("input[name=\"jid\"]");this.el.addEventListener("shown.bs.modal",()=>e.focus(),!1)},initJIDAutoComplete(){if(t.autocomplete_add_contact){const e=this.el.querySelector(".suggestion-box__jid").parentElement;this.jid_auto_complete=new t.AutoComplete(e,{data:(e,t)=>"".concat(t.slice(0,t.indexOf("@")),"@").concat(e),filter:t.FILTER_STARTSWITH,list:Object(ke.uniq)(t.roster.map(e=>Ul.getDomainFromJid(e.get("jid"))))})}},initXHRAutoComplete(){if(!t.autocomplete_add_contact)return this.initXHRFetch();const e=this.el.querySelector(".suggestion-box__name").parentElement;this.name_auto_complete=new t.AutoComplete(e,{auto_evaluate:!1,filter:t.FILTER_STARTSWITH,list:[]});const o=new window.XMLHttpRequest;o.onload=()=>{if(o.responseText){const e=o.responseText;this.name_auto_complete.list=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid})),this.name_auto_complete.auto_completing=!0,this.name_auto_complete.evaluate()}};const n=this.el.querySelector("input[name=\"name\"]");n.addEventListener("input",Object(ke.debounce)(()=>{o.open("GET","".concat(t.xhr_user_search_url,"q=").concat(encodeURIComponent(n.value)),!0),o.send()},300)),this.name_auto_complete.on("suggestion-box-selectcomplete",e=>{this.el.querySelector("input[name=\"name\"]").value=e.text.label,this.el.querySelector("input[name=\"jid\"]").value=e.text.value})},initXHRFetch(){this.xhr=new window.XMLHttpRequest,this.xhr.onload=()=>{if(this.xhr.responseText){const e=this.xhr.responseText,t=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid}));if(1!==t.length){const e=this.el.querySelector(".invalid-feedback");return e.textContent=o("Sorry, could not find a contact with that name"),void Vl.addClass("d-block",e)}const n=t[0].value;if(this.validateSubmission(n)){const e=this.el.querySelector("form"),o=t[0].label;this.afterSubmission(e,n,o)}}}},validateSubmission(e){const n=this.el.querySelector(".invalid-feedback");return!e||2>Object(ke.compact)(e.split("@")).length?(Vl.addClass("is-invalid",this.el.querySelector("input[name=\"jid\"]")),Vl.addClass("d-block",n),!1):t.roster.get(Ul.getBareJidFromJid(e))?(n.textContent=o("This contact has already been added"),Vl.addClass("d-block",n),!1):(Vl.removeClass("d-block",n),!0)},afterSubmission(e,o,n){t.roster.addAndSubscribe(o,n),this.model.clear(),this.modal.hide()},addContactFromForm(e){e.preventDefault();const o=new FormData(e.target),n=(o.get("jid")||"").trim();if(!n&&t.xhr_user_search_url&&Object(ke.isString)(t.xhr_user_search_url)){const e=this.el.querySelector("input[name=\"name\"]");return this.xhr.open("GET","".concat(t.xhr_user_search_url,"q=").concat(encodeURIComponent(e.value)),!0),void this.xhr.send()}this.validateSubmission(n)&&this.afterSubmission(e.target,n,o.get("name"))}}),t.RosterFilter=Hl.Model.extend({initialize(){this.set({filter_text:"",filter_type:"contacts",chat_state:"online"})}}),t.RosterFilterView=Hl.VDOMView.extend({tagName:"form",className:"roster-filter-form",events:{"keydown .roster-filter":"liveFilter",submit:"submitFilter","click .clear-input":"clearFilter","click .filter-by span":"changeTypeFilter","change .state-type":"changeChatStateFilter"},initialize(){this.listenTo(this.model,"change:filter_type",this.render),this.listenTo(this.model,"change:filter_text",this.render)},toHTML(){return Bl()(Object.assign(this.model.toJSON(),{visible:this.shouldBeVisible(),placeholder:o("Filter"),title_contact_filter:o("Filter by contact name"),title_group_filter:o("Filter by group name"),title_status_filter:o("Filter by status"),label_any:o("Any"),label_unread_messages:o("Unread"),label_online:o("Online"),label_chatty:o("Chatty"),label_busy:o("Busy"),label_away:o("Away"),label_xa:o("Extended Away"),label_offline:o("Offline")}))},changeChatStateFilter(e){e&&e.preventDefault&&e.preventDefault(),this.model.save({chat_state:this.el.querySelector(".state-type").value})},changeTypeFilter(e){e&&e.preventDefault&&e.preventDefault();const t=e.target.dataset.type;"state"===t?this.model.save({filter_type:t,chat_state:this.el.querySelector(".state-type").value}):this.model.save({filter_type:t,filter_text:this.el.querySelector(".roster-filter").value})},liveFilter:Object(ke.debounce)(function(){this.model.save({filter_text:this.el.querySelector(".roster-filter").value})},250),submitFilter(e){e&&e.preventDefault&&e.preventDefault(),this.liveFilter(),this.render()},isActive(){return!!("state"===this.model.get("filter_type")||this.model.get("filter_text"))},shouldBeVisible(){return t.roster&&5<=t.roster.length||this.isActive()},showOrHide(){this.shouldBeVisible()?this.show():this.hide()},show(){return Vl.isVisible(this.el)?this:(this.el.classList.add("fade-in"),this.el.classList.remove("hidden"),this)},hide(){return Vl.isVisible(this.el)?(this.model.save({filter_text:"",chat_state:"online"}),this.el.classList.add("hidden"),this):this},clearFilter(e){e&&e.preventDefault&&(e.preventDefault(),Vl.hideElement(this.el.querySelector(".clear-input")));const t=this.el.querySelector(".roster-filter");t.value="",this.model.save({filter_text:""})}}),t.RosterContactView=t.ViewWithAvatar.extend({tagName:"li",className:"list-item d-flex hidden controlbox-padded",events:{"click .accept-xmpp-request":"acceptRequest","click .decline-xmpp-request":"declineRequest","click .open-chat":"openChat","click .remove-xmpp-contact":"removeContact"},async initialize(){await this.model.initialized,this.debouncedRender=Object(ke.debounce)(this.render,50),this.listenTo(this.model,"change",this.debouncedRender),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"highlight",this.highlight),this.listenTo(this.model,"open",this.openChat),this.listenTo(this.model,"remove",this.remove),this.listenTo(this.model,"vcard:change",this.debouncedRender),this.listenTo(this.model.presence,"change:show",this.debouncedRender),this.render()},render(){if(!this.mayBeShown())return Vl.hideElement(this.el),this;const e=this.model.get("ask"),a=this.model.presence.get("show"),s=this.model.get("requesting"),i=this.model.get("subscription"),r=["current-xmpp-contact","pending-xmpp-contact","requesting-xmpp-contact"].concat(Object.keys(n));if(r.forEach(e=>Vl.removeClass(e,this.el)),this.el.classList.add(a),this.el.setAttribute("data-status",a),this.highlight(),t.isUniView()){const e=t.chatboxes.get(this.model.get("jid"));e&&(e.get("hidden")?this.el.classList.remove("open"):this.el.classList.add("open"))}if("subscribe"===e||"from"===i){const e=this.model.getDisplayName();this.el.classList.add("pending-xmpp-contact"),this.el.innerHTML=Ol()(Object.assign(this.model.toJSON(),{display_name:e,desc_remove:o("Click to remove %1$s as a contact",e),allow_chat_pending_contacts:t.allow_chat_pending_contacts}))}else if(!0===s){const e=this.model.getDisplayName();this.el.classList.add("requesting-xmpp-contact"),this.el.innerHTML=Dl()(Object.assign(this.model.toJSON(),{display_name:e,desc_accept:o("Click to accept the contact request from %1$s",e),desc_decline:o("Click to decline the contact request from %1$s",e),allow_chat_pending_contacts:t.allow_chat_pending_contacts}))}else("both"===i||"to"===i)&&(this.el.classList.add("current-xmpp-contact"),this.el.classList.remove(Object(ke.without)(["both","to"],i)[0]),this.el.classList.add(i),this.renderRosterItem(this.model));return this},highlight(){if(t.isUniView()){const e=t.chatboxes.get(this.model.get("jid"));e&&e.get("hidden")||!e?this.el.classList.remove("open"):this.el.classList.add("open")}},renderRosterItem(e){const a=e.presence.get("show")||"offline";let s="online"===a?"fa fa-circle chat-status chat-status--online":"away"===a?"fa fa-circle chat-status chat-status--away":"xa"===a?"far fa-circle chat-status chat-status-xa":"dnd"===a?"fa fa-minus-circle chat-status chat-status--busy":"fa fa-times-circle chat-status chat-status--offline";const i=e.getDisplayName();return this.el.innerHTML=Fl()(Object.assign(e.toJSON(),{show:a,display_name:i,status_icon:s,desc_status:n[a],desc_chat:o("Click to chat with %1$s (JID: %2$s)",i,e.get("jid")),desc_remove:o("Click to remove %1$s as a contact",i),allow_contact_removal:t.allow_contact_removal,num_unread:e.get("num_unread")||0,classes:""})),this.renderAvatar(),this},mayBeShown(){const e=this.model.presence.get("show");return!(t.hide_offline_users&&"offline"===e)||"subscribe"===this.model.get("ask")||"from"===this.model.get("subscription")||!0===this.model.get("requesting")},openChat(e){e&&e.preventDefault&&e.preventDefault();const o=this.model.attributes;t.api.chats.open(o.jid,o,!0)},async removeContact(e){if((e&&e.preventDefault&&e.preventDefault(),!!t.allow_contact_removal)&&confirm(o("Are you sure you want to remove this contact?")))try{await this.model.removeFromRoster(),this.remove(),this.model.collection&&this.model.destroy()}catch(n){vt.error(n),t.api.alert("error",o("Error"),[o("Sorry, there was an error while trying to remove %1$s as a contact.",this.model.getDisplayName())])}},async acceptRequest(e){e&&e.preventDefault&&e.preventDefault(),await t.roster.sendContactAddIQ(this.model.get("jid"),this.model.getFullname(),[]),this.model.authorize().subscribe()},declineRequest(e){e&&e.preventDefault&&e.preventDefault();const t=confirm(o("Are you sure you want to decline this contact request?"));return!0===t&&this.model.unauthorize().destroy(),this}}),t.RosterGroupView=_n.extend({tagName:"div",className:"roster-group hidden",events:{"click a.group-toggle":"toggle"},sortImmediatelyOnAdd:!0,ItemView:t.RosterContactView,listItems:"model.contacts",listSelector:".roster-group-contacts",sortEvent:"presenceChanged",initialize(){_n.prototype.initialize.apply(this,arguments),this.model.get("name")===t.HEADER_UNREAD&&this.listenTo(this.model.contacts,"change:num_unread",e=>!this.model.get("unread_messages")&&this.removeContact(e)),this.model.get("name")===t.HEADER_REQUESTING_CONTACTS&&this.listenTo(this.model.contacts,"change:requesting",e=>!e.get("requesting")&&this.removeContact(e)),this.model.get("name")===t.HEADER_PENDING_CONTACTS&&this.listenTo(this.model.contacts,"change:subscription",e=>"from"!==e.get("subscription")&&this.removeContact(e)),this.listenTo(this.model.contacts,"remove",this.onRemove),this.listenTo(t.roster,"change:groups",this.onContactGroupChange),t.rosterview.on("rosterContactsFetchedAndProcessed",()=>this.sortAndPositionAllItems())},render(){return this.el.setAttribute("data-group",this.model.get("name")),this.el.innerHTML=Ml()({label_group:this.model.get("name"),desc_group_toggle:this.model.get("description"),toggle_state:this.model.get("state"),_converse:t}),this.contacts_el=this.el.querySelector(".roster-group-contacts"),this},show(){return Vl.showElement(this.el),this.model.get("state")===t.OPENED&&Object.values(this.getAll()).filter(e=>e.mayBeShown()).forEach(e=>Vl.showElement(e.el)),this},collapse(){return Vl.slideIn(this.contacts_el)},filterOutContacts(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],t=0;this.model.contacts.forEach(o=>{const n=this.get(o.get("id"));e.includes(o)?Vl.hideElement(n.el):n.mayBeShown()&&(Vl.showElement(n.el),t+=1)}),t?Vl.showElement(this.el):Vl.hideElement(this.el)},getFilterMatches(e,o){if(0===e.length)return[];let n;if(e=e.toLowerCase(),"state"===o){const o=[t.HEADER_REQUESTING_CONTACTS,t.HEADER_UNREAD];if(o.includes(this.model.get("name")))return[];n="unread_messages"===e?this.model.contacts.filter({num_unread:0}):"online"===e?this.model.contacts.filter(e=>["offline","unavailable"].includes(e.presence.get("show"))):this.model.contacts.filter(t=>!t.presence.get("show").includes(e))}else n=this.model.contacts.filter(t=>!t.getDisplayName().toLowerCase().includes(e.toLowerCase()));return n},filter(e,o){(null===e||e===void 0)&&(o=o||t.rosterview.filter_view.model.get("filter_type"),e="state"===o?t.rosterview.filter_view.model.get("chat_state"):t.rosterview.filter_view.model.get("filter_text")),this.filterOutContacts(this.getFilterMatches(e,o))},async toggle(e){e&&e.preventDefault&&e.preventDefault();const o=e.target.matches(".fa")?e.target:e.target.querySelector(".fa");Vl.hasClass("fa-caret-down",o)?(this.model.save({state:t.CLOSED}),await this.collapse(),o.classList.remove("fa-caret-down"),o.classList.add("fa-caret-right")):(o.classList.remove("fa-caret-right"),o.classList.add("fa-caret-down"),this.model.save({state:t.OPENED}),this.filter(),Vl.showElement(this.el),Vl.slideOut(this.contacts_el))},onContactGroupChange(e){const t=e.get("groups").includes(this.model.get("name")),o=e.get("id"),n=!this.get(o);t&&!n?this.items.trigger("add",e):!t&&this.removeContact(e)},removeContact(e){this.model.contacts.remove(e,{silent:!0}),this.onRemove(e)},onRemove(e){this.remove(e.get("jid")),0===this.model.contacts.length&&this.remove()}}),t.RosterView=_n.extend({tagName:"div",id:"converse-roster",className:"controlbox-section",ItemView:t.RosterGroupView,listItems:"model",listSelector:".roster-contacts",sortEvent:null,subviewIndex:"name",sortImmediatelyOnAdd:!0,events:{"click a.controlbox-heading__btn.add-contact":"showAddContactModal","click a.controlbox-heading__btn.sync-contacts":"syncContacts"},initialize(){_n.prototype.initialize.apply(this,arguments),this.listenTo(t.roster,"add",this.onContactAdded),this.listenTo(t.roster,"change:groups",this.onContactAdded),this.listenTo(t.roster,"change",this.onContactChange),this.listenTo(t.roster,"destroy",this.update),this.listenTo(t.roster,"remove",this.update),t.presences.on("change:show",()=>{this.update(),this.updateFilter()}),this.listenTo(this.model,"reset",this.reset),t.api.listen.on("rosterGroupsFetched",this.sortAndPositionAllItems.bind(this)),t.api.listen.on("rosterContactsFetched",()=>{t.roster.each(e=>this.addRosterContact(e,{silent:!0})),this.update(),this.updateFilter(),this.trigger("rosterContactsFetchedAndProcessed")}),this.createRosterFilter()},render(){this.el.innerHTML=Pl()({allow_contact_requests:t.allow_contact_requests,heading_contacts:o("Contacts"),title_add_contact:o("Add a contact"),title_sync_contacts:o("Re-sync your contacts")});const e=this.el.querySelector(".roster-filter-form");return this.el.replaceChild(this.filter_view.render().el,e),this.roster_el=this.el.querySelector(".roster-contacts"),this},showAddContactModal(e){this.add_contact_modal===void 0&&(this.add_contact_modal=new t.AddContactModal({model:new Hl.Model})),this.add_contact_modal.show(e)},createRosterFilter(){const e=new t.RosterFilter;e.id="_converse.rosterfilter-".concat(t.bare_jid),e.browserStorage=t.createStore(e.id),this.filter_view=new t.RosterFilterView({model:e}),this.listenTo(this.filter_view.model,"change",this.updateFilter),this.filter_view.model.fetch()},updateFilter:Object(ke.debounce)(function(){const e=this.filter_view.model.get("filter_type");"state"===e?this.filter(this.filter_view.model.get("chat_state"),e):this.filter(this.filter_view.model.get("filter_text"),e)},100),update(){return Vl.isVisible(this.roster_el)||Vl.showElement(this.roster_el),this.filter_view.showOrHide(),this},filter(e,t){const o=Object.values(this.getAll());o.forEach(e=>0<e.model.contacts.length&&e.show().filter("")),e=e.toLowerCase(),"groups"===t?o.forEach(t=>{t.model.get("name").toLowerCase().includes(e)?0<t.model.contacts.length&&Vl.slideOut(t.el):Vl.slideIn(t.el)}):o.forEach(o=>o.filter(e,t))},async syncContacts(e){e.preventDefault(),Vl.addClass("fa-spin",e.target),t.roster.data.save("version",null),await t.roster.fetchFromServer(),t.xmppstatus.sendPresence(),Vl.removeClass("fa-spin",e.target)},reset(){return this.removeAll(),this.render().update(),this},onContactAdded(e){this.addRosterContact(e),this.update(),this.updateFilter()},onContactChange(e){this.update(),Object(ke.has)(e.changed,"subscription")&&("from"===e.changed.subscription?this.addContactToGroup(e,t.HEADER_PENDING_CONTACTS):["both","to"].includes(e.get("subscription"))&&this.addExistingContact(e)),Object(ke.has)(e.changed,"num_unread")&&e.get("num_unread")&&this.addContactToGroup(e,t.HEADER_UNREAD),Object(ke.has)(e.changed,"ask")&&"subscribe"===e.changed.ask&&this.addContactToGroup(e,t.HEADER_PENDING_CONTACTS),Object(ke.has)(e.changed,"subscription")&&"true"===e.changed.requesting&&this.addContactToGroup(e,t.HEADER_REQUESTING_CONTACTS),this.updateFilter()},getGroup(e){const t=this.get(e);return t?t.model:this.model.create({name:e,id:Pe.b64_sha1(e)})},addContactToGroup(e,t,o){this.getGroup(t).contacts.add(e,o),this.sortAndPositionAllItems()},addExistingContact(e,o){let n;t.roster_groups?(n=e.get("groups"),n=0===n.length?[t.HEADER_UNGROUPED]:n):n=[t.HEADER_CURRENT_CONTACTS],e.get("num_unread")&&n.push(t.HEADER_UNREAD),n.forEach(t=>this.addContactToGroup(e,t,o))},addRosterContact(e,o){if("both"===e.get("subscription")||"to"===e.get("subscription"))this.addExistingContact(e,o);else{if(!t.allow_contact_requests)return void vt.debug("Not adding requesting or pending contact ".concat(e.get("jid")," ")+"because allow_contact_requests is false");"subscribe"===e.get("ask")||"from"===e.get("subscription")?this.addContactToGroup(e,t.HEADER_PENDING_CONTACTS,o):!0===e.get("requesting")&&this.addContactToGroup(e,t.HEADER_REQUESTING_CONTACTS,o)}return this}}),t.api.listen.on("chatBoxesInitialized",()=>{function e(e){const o=t.roster&&t.roster.findWhere({jid:e.get("jid")});o!==void 0&&o.trigger("highlight")}t.chatboxes.on("destroy",t=>e(t)),t.chatboxes.on("change:hidden",t=>e(t))}),t.api.listen.on("controlBoxInitialized",e=>{function o(){e.model.get("connected")&&t.authentication!==t.ANONYMOUS&&t.api.waitUntil("rosterViewInitialized").then(()=>e.controlbox_pane.el.insertAdjacentElement("beforeEnd",t.rosterview.el)).catch(t=>vt.fatal(t))}o(),e.model.on("change:connected",o)}),t.api.listen.on("rosterInitialized",e),t.api.listen.on("rosterReadyAfterReconnection",e),t.api.listen.on("afterTearDown",()=>{mo.rosterview&&(mo.rosterview.model.off().reset(),mo.rosterview.each(e=>e.removeAll().remove()),mo.rosterview.removeAll().remove(),delete mo.rosterview)})}});const Wl=mo.env.utils;mo.plugins.add("converse-uniview",{dependencies:["converse-chatboxes","converse-muc-views","converse-controlbox","converse-rosterview"],overrides:{ChatBoxes:{createChatBox(e,t){const{_converse:o}=this.__super__;return o.isUniView()&&(t=t||{},t.hidden=!0),this.__super__.createChatBox.call(this,e,t)}},ChatBox:{maybeShow(){const{_converse:e}=this.__super__;return!e.isUniView()||this.get("hidden")&&we(e)?this.__super__.maybeShow.apply(this,arguments):this.trigger("show")}},ChatBoxView:{shouldShowOnTextMessage(){const{_converse:e}=this.__super__;return!e.isUniView()&&this.__super__.shouldShowOnTextMessage.apply(this,arguments)}}},initialize(){const{_converse:e}=this;e.api.listen.on("beforeShowingChatView",t=>{if(e.isUniView()&&(Object.values(e.chatboxviews.xget(t.model.get("id"))).filter(e=>!e.model.get("hidden")).forEach(Se),t.model.get("hidden")))return new Promise(e=>{Wl.safeSave(t.model,{hidden:!1},{success:e,failure:e})})})}});o(457);const Gl=["converse-autocomplete","converse-bookmark-views","converse-chatboxviews","converse-chatview","converse-controlbox","converse-dragresize","converse-emoji-views","converse-fullscreen","converse-mam-views","converse-message-view","converse-minimize","converse-modal","converse-muc-views","converse-headlines-view","converse-notification","converse-omemo","converse-profile","converse-push","converse-register","converse-roomslist","converse-rosterview","converse-singleton","converse-uniview"],Jl=mo.initialize;mo.initialize=function(e,t){return e.whitelisted_plugins=Array.isArray(e.whitelisted_plugins)?e.whitelisted_plugins.concat(Gl):Gl,Jl(e,t)};t["default"]=mo}]);
\ No newline at end of file
+(function(e){function t(t){for(var o=t[0],n=t[1],a=0,r=[],l,d;a<o.length;a++)d=o[a],s[d]&&r.push(s[d][0]),s[d]=0;for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);for(c&&c(t);r.length;)r.shift()()}function o(e){return n.p+""+({0:"locales/dayjs/af",1:"locales/dayjs/ar",2:"locales/dayjs/ar-dz",3:"locales/dayjs/ar-kw",4:"locales/dayjs/ar-ly",5:"locales/dayjs/ar-ma",6:"locales/dayjs/ar-sa",7:"locales/dayjs/ar-tn",8:"locales/dayjs/az",9:"locales/dayjs/be",10:"locales/dayjs/bg",11:"locales/dayjs/bm",12:"locales/dayjs/bn",13:"locales/dayjs/bo",14:"locales/dayjs/br",15:"locales/dayjs/bs",16:"locales/dayjs/ca",17:"locales/dayjs/cs",18:"locales/dayjs/cv",19:"locales/dayjs/cy",20:"locales/dayjs/da",21:"locales/dayjs/de",22:"locales/dayjs/de-at",23:"locales/dayjs/de-ch",24:"locales/dayjs/dv",25:"locales/dayjs/el",26:"locales/dayjs/en",27:"locales/dayjs/en-SG",28:"locales/dayjs/en-au",29:"locales/dayjs/en-ca",30:"locales/dayjs/en-gb",31:"locales/dayjs/en-ie",32:"locales/dayjs/en-il",33:"locales/dayjs/en-nz",34:"locales/dayjs/eo",35:"locales/dayjs/es",36:"locales/dayjs/es-do",37:"locales/dayjs/es-us",38:"locales/dayjs/et",39:"locales/dayjs/eu",40:"locales/dayjs/fa",41:"locales/dayjs/fi",42:"locales/dayjs/fo",43:"locales/dayjs/fr",44:"locales/dayjs/fr-ca",45:"locales/dayjs/fr-ch",46:"locales/dayjs/fy",47:"locales/dayjs/ga",48:"locales/dayjs/gd",49:"locales/dayjs/gl",50:"locales/dayjs/gom-latn",51:"locales/dayjs/gu",52:"locales/dayjs/he",53:"locales/dayjs/hi",54:"locales/dayjs/hr",55:"locales/dayjs/hu",56:"locales/dayjs/hy-am",57:"locales/dayjs/id",58:"locales/dayjs/is",59:"locales/dayjs/it",60:"locales/dayjs/it-ch",61:"locales/dayjs/ja",62:"locales/dayjs/jv",63:"locales/dayjs/ka",64:"locales/dayjs/kk",65:"locales/dayjs/km",66:"locales/dayjs/kn",67:"locales/dayjs/ko",68:"locales/dayjs/ku",69:"locales/dayjs/ky",70:"locales/dayjs/lb",71:"locales/dayjs/lo",72:"locales/dayjs/lt",73:"locales/dayjs/lv",74:"locales/dayjs/me",75:"locales/dayjs/mi",76:"locales/dayjs/mk",77:"locales/dayjs/ml",78:"locales/dayjs/mn",79:"locales/dayjs/mr",80:"locales/dayjs/ms",81:"locales/dayjs/ms-my",82:"locales/dayjs/mt",83:"locales/dayjs/my",84:"locales/dayjs/nb",85:"locales/dayjs/ne",86:"locales/dayjs/nl",87:"locales/dayjs/nl-be",88:"locales/dayjs/nn",89:"locales/dayjs/oc-lnc",90:"locales/dayjs/pa-in",91:"locales/dayjs/pl",92:"locales/dayjs/pt",93:"locales/dayjs/pt-br",94:"locales/dayjs/ro",95:"locales/dayjs/ru",96:"locales/dayjs/sd",97:"locales/dayjs/se",98:"locales/dayjs/si",99:"locales/dayjs/sk",100:"locales/dayjs/sl",101:"locales/dayjs/sq",102:"locales/dayjs/sr",103:"locales/dayjs/sr-cyrl",104:"locales/dayjs/ss",105:"locales/dayjs/sv",106:"locales/dayjs/sw",107:"locales/dayjs/ta",108:"locales/dayjs/te",109:"locales/dayjs/tet",110:"locales/dayjs/tg",111:"locales/dayjs/th",112:"locales/dayjs/tl-ph",113:"locales/dayjs/tlh",114:"locales/dayjs/tr",115:"locales/dayjs/tzl",116:"locales/dayjs/tzm",117:"locales/dayjs/tzm-latn",118:"locales/dayjs/ug-cn",119:"locales/dayjs/uk",120:"locales/dayjs/ur",121:"locales/dayjs/uz",122:"locales/dayjs/uz-latn",123:"locales/dayjs/vi",124:"locales/dayjs/x-pseudo",125:"locales/dayjs/yo",126:"locales/dayjs/zh-cn",127:"locales/dayjs/zh-hk",128:"locales/dayjs/zh-tw",129:"emojis",130:"locales/af-LC_MESSAGES-converse-po",131:"locales/ar-LC_MESSAGES-converse-po",132:"locales/bg-LC_MESSAGES-converse-po",133:"locales/ca-LC_MESSAGES-converse-po",134:"locales/cs-LC_MESSAGES-converse-po",135:"locales/de-LC_MESSAGES-converse-po",136:"locales/eo-LC_MESSAGES-converse-po",137:"locales/es-LC_MESSAGES-converse-po",138:"locales/eu-LC_MESSAGES-converse-po",139:"locales/fr-LC_MESSAGES-converse-po",140:"locales/gl-LC_MESSAGES-converse-po",141:"locales/he-LC_MESSAGES-converse-po",142:"locales/hi-LC_MESSAGES-converse-po",143:"locales/hu-LC_MESSAGES-converse-po",144:"locales/id-LC_MESSAGES-converse-po",145:"locales/it-LC_MESSAGES-converse-po",146:"locales/ja-LC_MESSAGES-converse-po",147:"locales/lt-LC_MESSAGES-converse-po",148:"locales/mr-LC_MESSAGES-converse-po",149:"locales/nb-LC_MESSAGES-converse-po",150:"locales/nl-LC_MESSAGES-converse-po",151:"locales/nl_BE-LC_MESSAGES-converse-po",152:"locales/oc-LC_MESSAGES-converse-po",153:"locales/pl-LC_MESSAGES-converse-po",154:"locales/pt-LC_MESSAGES-converse-po",155:"locales/pt_BR-LC_MESSAGES-converse-po",156:"locales/ro-LC_MESSAGES-converse-po",157:"locales/ru-LC_MESSAGES-converse-po",158:"locales/tr-LC_MESSAGES-converse-po",159:"locales/uk-LC_MESSAGES-converse-po",160:"locales/vi-LC_MESSAGES-converse-po",161:"locales/zh_CN-LC_MESSAGES-converse-po",162:"locales/zh_TW-LC_MESSAGES-converse-po"}[e]||e)+".js"}function n(t){if(a[t])return a[t].exports;var o=a[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var a={},s={163:0};n.e=function(e){var t=[],a=s[e];if(0!==a)if(a)t.push(a[2]);else{var i=new Promise(function(t,o){a=s[e]=[t,o]});t.push(a[2]=i);var r=document.createElement("script"),l;r.charset="utf-8",r.timeout=120,n.nc&&r.setAttribute("nonce",n.nc),r.src=o(e);var d=new Error;l=function(t){r.onerror=r.onload=null,clearTimeout(c);var o=s[e];if(0!==o){if(o){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",d.name="ChunkLoadError",d.type=n,d.request=a,o[1](d)}s[e]=void 0}};var c=setTimeout(function(){l({type:"timeout",target:r})},12e4);r.onerror=r.onload=l,document.head.appendChild(r)}return Promise.all(t)},n.m=e,n.c=a,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],l=r.push.bind(r);r.push=t,r=r.slice();for(var d=0;d<r.length;d++)t(r[d]);var c=l;return n(n.s=328)})([function(e,t,o){(function(e,n){var a;(function(){function s(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2]);}return e.apply(t,o)}function i(e,t,o,n){for(var a=-1,s=null==e?0:e.length;++a<s;){var i=e[a];t(n,i,o(i),e)}return n}function r(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!(!1===t(e[o],o,e)););return e}function l(e,t){for(var o=null==e?0:e.length;o--&&!(!1===t(e[o],o,e)););return e}function d(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(!t(e[o],o,e))return!1;return!0}function c(e,t){for(var o=-1,n=null==e?0:e.length,a=0,s=[];++o<n;){var i=e[o];t(i,o,e)&&(s[a++]=i)}return s}function p(e,t){var o=null==e?0:e.length;return!!o&&-1<w(e,t,0)}function u(e,t,o){for(var n=-1,a=null==e?0:e.length;++n<a;)if(o(t,e[n]))return!0;return!1}function m(e,t){for(var o=-1,n=null==e?0:e.length,a=Array(n);++o<n;)a[o]=t(e[o],o,e);return a}function g(e,t){for(var o=-1,n=t.length,a=e.length;++o<n;)e[a+o]=t[o];return e}function h(e,t,o,n){var a=-1,s=null==e?0:e.length;for(n&&s&&(o=e[++a]);++a<s;)o=t(o,e[a],a,e);return o}function f(e,t,o,n){var a=null==e?0:e.length;for(n&&a&&(o=e[--a]);a--;)o=t(o,e[a],a,e);return o}function b(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(t(e[o],o,e))return!0;return!1}function v(e){return e.split("")}function y(e){return e.match(ct)||[]}function x(e,t,o){var n;return o(e,function(e,o,a){if(t(e,o,a))return n=o,!1}),n}function S(e,t,o,n){for(var a=e.length,s=o+(n?1:-1);n?s--:++s<a;)if(t(e[s],s,e))return s;return-1}function w(e,t,o){return t===t?Y(e,t,o):S(e,E,o)}function k(e,t,o,n){for(var a=o-1,s=e.length;++a<s;)if(n(e[a],t))return a;return-1}function E(e){return e!==e}function C(e,t){var o=null==e?0:e.length;return o?M(e,t)/o:Ee}function A(e){return function(t){return null==t?void 0:t[e]}}function T(e){return function(t){return null==e?void 0:e[t]}}function j(e,t,o,n,a){return a(e,function(e,a,s){o=n?(n=!1,e):t(o,e,a,s)}),o}function N(e,t){var o=e.length;for(e.sort(t);o--;)e[o]=e[o].value;return e}function M(e,t){for(var o=-1,n=e.length,a;++o<n;){var s=t(e[o]);s!==void 0&&(a=a===void 0?s:a+s)}return a}function I(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}function O(e,t){return m(t,function(t){return[t,e[t]]})}function R(e){return function(t){return e(t)}}function D(e,t){return m(t,function(t){return e[t]})}function L(e,t){return e.has(t)}function P(e,t){for(var o=-1,n=e.length;++o<n&&-1<w(t,e[o],0););return o}function q(e,t){for(var o=e.length;o--&&-1<w(t,e[o],0););return o}function B(e,t){for(var o=e.length,n=0;o--;)e[o]===t&&++n;return n}function z(e){return"\\"+Xt[e]}function F(e,t){return null==e?void 0:e[t]}function H(e){return Wt.test(e)}function U(e){return Gt.test(e)}function V(e){for(var t=[],o;!(o=e.next()).done;)t.push(o.value);return t}function W(e){var t=-1,o=Array(e.size);return e.forEach(function(e,n){o[++t]=[n,e]}),o}function G(e,t){return function(o){return e(t(o))}}function J(e,t){for(var o=-1,n=e.length,a=0,s=[];++o<n;){var i=e[o];(i===t||i==="__lodash_placeholder__")&&(e[o]="__lodash_placeholder__",s[a++]=o)}return s}function $(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=e}),o}function Q(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=[e,e]}),o}function Y(e,t,o){for(var n=o-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}function X(e,t,o){for(var n=o+1;n--;)if(e[n]===t)return n;return n}function K(e){return H(e)?ee(e):ho(e)}function Z(e){return H(e)?te(e):v(e)}function ee(e){for(var t=Ut.lastIndex=0;Ut.test(e);)++t;return t}function te(e){return e.match(Ut)||[]}function oe(e){return e.match(Vt)||[]}var ne=200,ae="Expected a function",se="__lodash_hash_undefined__",ie="__lodash_placeholder__",re=1,le=2,de=4,ce=1,pe=2,ue=1,me=2,ge=4,he=8,_e=16,fe=32,be=64,ve=128,ye=256,xe=512,Se=1,we=1/0,ke=9007199254740991,Ee=0/0,Ce=4294967295,Ae=[["ary",ve],["bind",ue],["bindKey",me],["curry",he],["curryRight",_e],["flip",xe],["partial",fe],["partialRight",be],["rearg",ye]],Te="[object Arguments]",je="[object Array]",Ne="[object Boolean]",Me="[object Date]",Ie="[object Error]",Oe="[object Function]",Re="[object GeneratorFunction]",De="[object Map]",Le="[object Number]",Pe="[object Object]",qe="[object Promise]",Be="[object RegExp]",ze="[object Set]",Fe="[object String]",He="[object Symbol]",Ue="[object WeakMap]",Ve="[object ArrayBuffer]",We="[object DataView]",Ge="[object Float32Array]",Je="[object Float64Array]",$e="[object Int8Array]",Qe="[object Int16Array]",Ye="[object Int32Array]",Xe="[object Uint8Array]",Ke="[object Uint8ClampedArray]",Ze="[object Uint16Array]",et="[object Uint32Array]",tt=/&(?:amp|lt|gt|quot|#39);/g,ot=/[&<>"']/g,nt=RegExp(tt.source),at=RegExp(ot.source),st=/<%=([\s\S]+?)%>/g,it=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(it.source),lt=/^\s+|\s+$/g,dt=/^\s+/,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/\w*$/,ut=/($^)/,mt="\\ud800-\\udfff",gt="\\u0300-\\u036f"+"\\ufe20-\\ufe2f"+"\\u20d0-\\u20ff",ht="\\u2700-\\u27bf",_t="a-z\\xdf-\\xf6\\xf8-\\xff",ft="A-Z\\xc0-\\xd6\\xd8-\\xde",bt="\\ufe0e\\ufe0f",vt="\\xac\\xb1\\xd7\\xf7"+"\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf"+"\\u2000-\\u206f"+" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",yt="['\u2019]",xt="["+vt+"]",St="["+gt+"]",wt="\\d+",kt="["+_t+"]",Et="[^"+mt+vt+wt+ht+_t+ft+"]",Ct="\\ud83c[\\udffb-\\udfff]",At="[^"+mt+"]",Tt="(?:\\ud83c[\\udde6-\\uddff]){2}",jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Nt="["+ft+"]",Mt="\\u200d",It="(?:"+kt+"|"+Et+")",Ot="(?:"+yt+"(?:d|ll|m|re|s|t|ve))?",Rt="(?:"+yt+"(?:D|LL|M|RE|S|T|VE))?",Dt="(?:"+St+"|"+Ct+")"+"?",Lt="["+bt+"]?",Pt="(?:"+Mt+"(?:"+[At,Tt,jt].join("|")+")"+Lt+Dt+")*",qt=Lt+Dt+Pt,Bt="(?:"+["["+ht+"]",Tt,jt].join("|")+")"+qt,zt="(?:"+[At+St+"?",St,Tt,jt,"["+mt+"]"].join("|")+")",Ft=RegExp(yt,"g"),Ht=RegExp(St,"g"),Ut=RegExp(Ct+"(?="+Ct+")|"+zt+qt,"g"),Vt=RegExp([Nt+"?"+kt+"+"+Ot+"(?="+[xt,Nt,"$"].join("|")+")","(?:"+Nt+"|"+Et+")"+"+"+Rt+"(?="+[xt,Nt+It,"$"].join("|")+")",Nt+"?"+It+"+"+Ot,Nt+"+"+Rt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wt,Bt].join("|"),"g"),Wt=RegExp("["+Mt+mt+gt+bt+"]"),Gt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$t=-1,Qt={};Qt[Ge]=Qt[Je]=Qt[$e]=Qt[Qe]=Qt[Ye]=Qt[Xe]=Qt[Ke]=Qt[Ze]=Qt[et]=!0,Qt[Te]=Qt[je]=Qt[Ve]=Qt[Ne]=Qt[We]=Qt[Me]=Qt[Ie]=Qt[Oe]=Qt[De]=Qt[Le]=Qt[Pe]=Qt[Be]=Qt[ze]=Qt[Fe]=Qt[Ue]=!1;var Yt={};Yt[Te]=Yt[je]=Yt[Ve]=Yt[We]=Yt[Ne]=Yt[Me]=Yt[Ge]=Yt[Je]=Yt[$e]=Yt[Qe]=Yt[Ye]=Yt[De]=Yt[Le]=Yt[Pe]=Yt[Be]=Yt[ze]=Yt[Fe]=Yt[He]=Yt[Xe]=Yt[Ke]=Yt[Ze]=Yt[et]=!0,Yt[Ie]=Yt[Oe]=Yt[Ue]=!1;var Xt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kt=parseFloat,Zt=parseInt,eo="object"==typeof e&&e&&e.Object===Object&&e,to="object"==typeof self&&self&&self.Object===Object&&self,oo=eo||to||Function("return this")(),no=t&&!t.nodeType&&t,ao=no&&"object"==typeof n&&n&&!n.nodeType&&n,so=ao&&ao.exports===no,io=so&&eo.process,ro=function(){try{var e=ao&&ao.require&&ao.require("util").types;return e?e:io&&io.binding&&io.binding("util")}catch(t){}}(),lo=ro&&ro.isArrayBuffer,co=ro&&ro.isDate,po=ro&&ro.isMap,uo=ro&&ro.isRegExp,mo=ro&&ro.isSet,go=ro&&ro.isTypedArray,ho=A("length"),_o=T({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),fo=T({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),bo=T({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":"\"","&#39;":"'"}),vo=function e(t){function o(e){if(ys(e)&&!pl(e)&&!(e instanceof _)){if(e instanceof a)return e;if(mi.call(e,"__wrapped__"))return Fa(e)}return new a(e)}function n(){}function a(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function _(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ce,this.__views__=[]}function v(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function T(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Y(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new Y;++t<o;)this.add(e[t])}function te(e){var t=this.__data__=new T(e);this.size=t.size}function ct(e,t){var o=pl(e),n=!o&&cl(e),a=!o&&!n&&ml(e),s=!o&&!n&&!a&&bl(e),i=o||n||a||s,r=i?I(e.length,ii):[],l=r.length;for(var d in e)(t||mi.call(e,d))&&!(i&&("length"==d||a&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||va(d,l)))&&r.push(d);return r}function mt(e){var t=e.length;return t?e[Bo(0,t-1)]:void 0}function ht(e,t){return Pa(Sn(e),Et(t,0,e.length))}function _t(e){return Pa(Sn(e))}function ft(e,t,o){(void 0===o||ps(e[t],o))&&(void 0!==o||t in e)||wt(e,t,o)}function bt(e,t,o){var n=e[t];mi.call(e,t)&&ps(n,o)&&(void 0!==o||t in e)||wt(e,t,o)}function vt(e,t){for(var o=e.length;o--;)if(ps(e[o][0],t))return o;return-1}function yt(e,t,o,n){return pr(e,function(e,a,s){t(n,e,o(e),s)}),n}function xt(e,t){return e&&wn(t,Ds(t),e)}function St(e,t){return e&&wn(t,Ls(t),e)}function wt(e,t,o){"__proto__"==t&&Mi?Mi(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function kt(e,t){for(var o=-1,n=t.length,a=Zs(n);++o<n;)a[o]=null==e?void 0:Os(e,t[o]);return a}function Et(e,t,o){return e===e&&(void 0!==o&&(e=e<=o?e:o),void 0!==t&&(e=e>=t?e:t)),e}function Ct(e,t,o,n,a,s){var i=t&re,l=t&le,d;if(o&&(d=a?o(e,n,a,s):o(e)),void 0!==d)return d;if(!vs(e))return e;var c=pl(e);if(!c){var p=Sr(e),u=p==Oe||p==Re;if(ml(e))return un(e,i);if(p!=Pe&&p!=Te&&(!u||a)){if(!Yt[p])return a?e:{};d=_a(e,p,i)}else if(d=l||u?{}:ha(e),!i)return l?En(e,St(d,e)):kn(e,xt(d,e))}else if(d=ga(e),!i)return Sn(e,d);s||(s=new te);var m=s.get(e);if(m)return m;s.set(e,d),fl(e)?e.forEach(function(n){d.add(Ct(n,t,o,n,e,s))}):hl(e)&&e.forEach(function(n,a){d.set(a,Ct(n,t,o,a,e,s))});var g=t&de?l?na:oa:l?Ls:Ds,h=c?void 0:g(e);return r(h||e,function(n,a){h&&(a=n,n=e[a]),bt(d,a,Ct(n,t,o,a,e,s))}),d}function At(e){var t=Ds(e);return function(o){return Tt(o,e,t)}}function Tt(e,t,o){var n=o.length;if(null==e)return!n;for(e=ai(e);n--;){var a=o[n],s=t[a],i=e[a];if(void 0===i&&!(a in e)||!s(i))return!1}return!0}function jt(e,t,o){if("function"!=typeof e)throw new ri(ae);return Er(function(){e.apply(void 0,o)},t)}function Nt(e,t,o,n){var a=-1,s=p,i=!0,r=e.length,l=[],d=t.length;if(!r)return l;o&&(t=m(t,R(o))),n?(s=u,i=!1):t.length>=ne&&(s=L,i=!1,t=new ee(t));outer:for(;++a<r;){var c=e[a],g=null==o?c:o(c);if(c=n||0!==c?c:0,i&&g===g){for(var h=d;h--;)if(t[h]===g)continue outer;l.push(c)}else s(t,g,n)||l.push(c)}return l}function Mt(e,t){var o=!0;return pr(e,function(e,n,a){return o=!!t(e,n,a),o}),o}function It(e,t,o){for(var n=-1,a=e.length;++n<a;){var s=e[n],i=t(s);if(null!=i&&(void 0===r?i===i&&!ks(i):o(i,r)))var r=i,l=s}return l}function Ot(e,t,o,n){var a=e.length;for(o=Ts(o),0>o&&(o=-o>a?0:a+o),n=void 0===n||n>a?a:Ts(n),0>n&&(n+=a),n=o>n?0:js(n);o<n;)e[o++]=t;return e}function Rt(e,t){var o=[];return pr(e,function(e,n,a){t(e,n,a)&&o.push(e)}),o}function Dt(e,t,o,n,a){var s=-1,i=e.length;for(o||(o=ba),a||(a=[]);++s<i;){var r=e[s];0<t&&o(r)?1<t?Dt(r,t-1,o,n,a):g(a,r):!n&&(a[a.length]=r)}return a}function Lt(e,t){return e&&mr(e,t,Ds)}function Pt(e,t){return e&&gr(e,t,Ds)}function qt(e,t){return c(t,function(t){return _s(e[t])})}function Bt(e,t){t=cn(t,e);for(var o=0,n=t.length;null!=e&&o<n;)e=e[qa(t[o++])];return o&&o==n?e:void 0}function zt(e,t,o){var n=t(e);return pl(e)?n:g(n,o(e))}function Ut(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ni&&Ni in ai(e)?ca(e):Na(e)}function Vt(e,t){return e>t}function Wt(e,t){return null!=e&&mi.call(e,t)}function Gt(e,t){return null!=e&&t in ai(e)}function Xt(e,t,o){return e>=Ui(t,o)&&e<Hi(t,o)}function eo(e,t,o){for(var n=o?u:p,a=e[0].length,s=e.length,i=s,r=Zs(s),l=1/0,d=[],c;i--;)c=e[i],i&&t&&(c=m(c,R(t))),l=Ui(c.length,l),r[i]=!o&&(t||120<=a&&120<=c.length)?new ee(i&&c):void 0;c=e[0];var g=-1,h=r[0];outer:for(;++g<a&&d.length<l;){var _=c[g],f=t?t(_):_;if(_=o||0!==_?_:0,h?!L(h,f):!n(d,f,o)){for(i=s;--i;){var b=r[i];if(b?!L(b,f):!n(e[i],f,o))continue outer}h&&h.push(f),d.push(_)}}return d}function to(e,t,o,n){return Lt(e,function(e,a,s){t(n,o(e),a,s)}),n}function no(e,t,o){t=cn(t,e),e=Ia(e,t);var n=null==e?e:e[qa(Ga(t))];return null==n?void 0:s(n,e,o)}function ao(e){return ys(e)&&Ut(e)==Te}function io(e,t,o,n,a){return e===t||(null!=e&&null!=t&&(ys(e)||ys(t))?ro(e,t,o,n,io,a):e!==e&&t!==t)}function ro(e,t,o,n,a,s){var i=pl(e),r=pl(t),l=i?je:Sr(e),d=r?je:Sr(t);l=l==Te?Pe:l,d=d==Te?Pe:d;var c=l==Pe,p=d==Pe,u=l==d;if(u&&ml(e)){if(!ml(t))return!1;i=!0,c=!1}if(u&&!c)return s||(s=new te),i||bl(e)?Kn(e,t,o,n,a,s):Zn(e,t,l,o,n,a,s);if(!(o&ce)){var m=c&&mi.call(e,"__wrapped__"),g=p&&mi.call(t,"__wrapped__");if(m||g){var h=m?e.value():e,_=g?t.value():t;return s||(s=new te),a(h,_,o,n,s)}}return!!u&&(s||(s=new te),ea(e,t,o,n,a,s))}function ho(e){return ys(e)&&Sr(e)==De}function yo(e,t,o,n){var a=o.length,s=a,i=!n;if(null==e)return!s;for(e=ai(e);a--;){var r=o[a];if(i&&r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++a<s;){r=o[a];var l=r[0],d=e[l],c=r[1];if(!(i&&r[2])){var p=new te;if(n)var u=n(d,c,l,e,t,p);if(void 0===u?!io(c,d,ce|pe,n,p):!u)return!1}else if(void 0===d&&!(l in e))return!1}return!0}function xo(e){if(!vs(e)||ka(e))return!1;var t=_s(e)?vi:/^\[object .+?Constructor\]$/;return t.test(Ba(e))}function So(e){return ys(e)&&Sr(e)==ze}function wo(e){return"function"==typeof e?e:null==e?Ws:"object"==typeof e?pl(e)?jo(e[0],e[1]):To(e):Qs(e)}function ko(e){if(!Ea(e))return Fi(e);var t=[];for(var o in ai(e))mi.call(e,o)&&"constructor"!=o&&t.push(o);return t}function Eo(e){if(!vs(e))return ja(e);var t=Ea(e),o=[];for(var n in e)("constructor"!=n||!t&&mi.call(e,n))&&o.push(n);return o}function Co(e,t){return e<t}function Ao(e,t){var o=-1,n=us(e)?Zs(e.length):[];return pr(e,function(e,a,s){n[++o]=t(e,a,s)}),n}function To(e){var t=la(e);return 1==t.length&&t[0][2]?Aa(t[0][0],t[0][1]):function(o){return o===e||yo(o,e,t)}}function jo(e,t){return xa(e)&&Ca(t)?Aa(qa(e),t):function(o){var n=Os(o,e);return void 0===n&&n===t?Rs(o,e):io(t,n,ce|pe)}}function No(e,t,o,n,a){e===t||mr(t,function(s,i){if(a||(a=new te),vs(s))Mo(e,t,i,o,No,n,a);else{var r=n?n(Ra(e,i),s,i+"",e,t,a):void 0;void 0===r&&(r=s),ft(e,i,r)}},Ls)}function Mo(e,t,o,n,a,s,i){var r=Ra(e,o),l=Ra(t,o),d=i.get(l);if(d)return void ft(e,o,d);var c=s?s(r,l,o+"",e,t,i):void 0,p=void 0===c;if(p){var u=pl(l),m=!u&&ml(l),g=!u&&!m&&bl(l);c=l,u||m||g?pl(r)?c=r:ms(r)?c=Sn(r):m?(p=!1,c=un(l,!0)):g?(p=!1,c=fn(l,!0)):c=[]:Ss(l)||cl(l)?(c=r,cl(r)?c=Ms(r):(!vs(r)||_s(r))&&(c=ha(l))):p=!1}p&&(i.set(l,c),a(c,l,n,s,i),i["delete"](l)),ft(e,o,c)}function Io(e,t){var o=e.length;if(o)return t+=0>t?o:0,va(t,o)?e[t]:void 0}function Oo(e,t,o){var n=-1;t=m(t.length?t:[Ws],R(ia()));var a=Ao(e,function(e){var o=m(t,function(t){return t(e)});return{criteria:o,index:++n,value:e}});return N(a,function(e,t){return vn(e,t,o)})}function Ro(e,t){return Do(e,t,function(t,o){return Rs(e,o)})}function Do(e,t,o){for(var n=-1,a=t.length,s={};++n<a;){var i=t[n],r=Bt(e,i);o(r,i)&&Wo(s,cn(i,e),r)}return s}function Lo(e){return function(t){return Bt(t,e)}}function Po(e,t,o,n){var a=n?k:w,s=-1,i=t.length,r=e;for(e===t&&(t=Sn(t)),o&&(r=m(e,R(o)));++s<i;)for(var l=0,d=t[s],c=o?o(d):d;-1<(l=a(r,c,l,n));)r!==e&&Ai.call(r,l,1),Ai.call(e,l,1);return e}function qo(e,t){for(var o=e?t.length:0,n=o-1,a;o--;)if(a=t[o],o==n||a!==s){var s=a;va(a)?Ai.call(e,a,1):tn(e,a)}return e}function Bo(e,t){return e+Li(Gi()*(t-e+1))}function zo(e,t,o,n){for(var a=-1,s=Hi(Di((t-e)/(o||1)),0),i=Zs(s);s--;)i[n?s:++a]=e,e+=o;return i}function Fo(e,t){var o="";if(!e||1>t||t>ke)return o;do t%2&&(o+=e),t=Li(t/2),t&&(e+=e);while(t);return o}function Ho(e,t){return Cr(Ma(e,t,Ws),e+"")}function Uo(e){return mt(qs(e))}function Vo(e,t){var o=qs(e);return Pa(o,Et(t,0,o.length))}function Wo(e,t,o,n){if(!vs(e))return e;t=cn(t,e);for(var a=-1,s=t.length,i=e;null!=i&&++a<s;){var r=qa(t[a]),l=o;if(a!=s-1){var d=i[r];l=n?n(d,r,i):void 0,void 0===l&&(l=vs(d)?d:va(t[a+1])?[]:{})}bt(i,r,l),i=i[r]}return e}function Go(e){return Pa(qs(e))}function Jo(e,t,o){var n=-1,a=e.length;0>t&&(t=-t>a?0:a+t),o=o>a?a:o,0>o&&(o+=a),a=t>o?0:o-t>>>0,t>>>=0;for(var s=Zs(a);++n<a;)s[n]=e[n+t];return s}function $o(e,t){var o;return pr(e,function(e,n,a){return o=t(e,n,a),!o}),!!o}function Qo(e,t,o){var n=0,a=null==e?n:e.length;if("number"==typeof t&&t===t&&a<=Ce>>>1){for(;n<a;){var s=n+a>>>1,i=e[s];null!==i&&!ks(i)&&(o?i<=t:i<t)?n=s+1:a=s}return a}return Yo(e,t,Ws,o)}function Yo(e,t,o,n){t=o(t);for(var a=0,s=null==e?0:e.length,i=t!==t,r=null===t,l=ks(t),d=void 0===t;a<s;){var c=Li((a+s)/2),p=o(e[c]),u=void 0!==p,m=null===p,g=p===p,h=ks(p);if(i)var _=n||g;else _=d?g&&(n||u):r?g&&u&&(n||!m):l?g&&u&&!m&&(n||!h):!(m||h)&&(n?p<=t:p<t);_?a=c+1:s=c}return Ui(s,Ce-1)}function Xo(e,t){for(var o=-1,n=e.length,a=0,s=[];++o<n;){var i=e[o],r=t?t(i):i;if(!o||!ps(r,l)){var l=r;s[a++]=0===i?0:i}}return s}function Ko(e){return"number"==typeof e?e:ks(e)?Ee:+e}function Zo(e){if("string"==typeof e)return e;if(pl(e))return m(e,Zo)+"";if(ks(e))return dr?dr.call(e):"";var t=e+"";return"0"==t&&1/e==-we?"-0":t}function en(e,t,o){var n=-1,a=p,s=e.length,i=!0,r=[],l=r;if(o)i=!1,a=u;else if(s>=ne){var d=t?null:br(e);if(d)return $(d);i=!1,a=L,l=new ee}else l=t?[]:r;outer:for(;++n<s;){var c=e[n],m=t?t(c):c;if(c=o||0!==c?c:0,i&&m===m){for(var g=l.length;g--;)if(l[g]===m)continue outer;t&&l.push(m),r.push(c)}else a(l,m,o)||(l!==r&&l.push(m),r.push(c))}return r}function tn(e,t){return t=cn(t,e),e=Ia(e,t),null==e||delete e[qa(Ga(t))]}function on(e,t,o,n){return Wo(e,t,o(Bt(e,t)),n)}function nn(e,t,o,n){for(var a=e.length,s=n?a:-1;(n?s--:++s<a)&&t(e[s],s,e););return o?Jo(e,n?0:s,n?s+1:a):Jo(e,n?s+1:0,n?a:s)}function an(e,t){var o=e;return o instanceof _&&(o=o.value()),h(t,function(e,t){return t.func.apply(t.thisArg,g([e],t.args))},o)}function sn(e,t,o){var n=e.length;if(2>n)return n?en(e[0]):[];for(var a=-1,s=Zs(n);++a<n;)for(var i=e[a],r=-1;++r<n;)r!=a&&(s[a]=Nt(s[a]||i,e[r],t,o));return en(Dt(s,1),t,o)}function rn(e,t,o){for(var n=-1,a=e.length,s=t.length,i={},r;++n<a;)r=n<s?t[n]:void 0,o(i,e[n],r);return i}function ln(e){return ms(e)?e:[]}function dn(e){return"function"==typeof e?e:Ws}function cn(e,t){return pl(e)?e:xa(e,t)?[e]:Ar(Is(e))}function pn(e,t,o){var n=e.length;return o=void 0===o?n:o,!t&&o>=n?e:Jo(e,t,o)}function un(e,t){if(t)return e.slice();var o=e.length,n=wi?wi(o):new e.constructor(o);return e.copy(n),n}function mn(e){var t=new e.constructor(e.byteLength);return new Si(t).set(new Si(e)),t}function gn(e,t){var o=t?mn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function hn(e){var t=new e.constructor(e.source,pt.exec(e));return t.lastIndex=e.lastIndex,t}function _n(e){return lr?ai(lr.call(e)):{}}function fn(e,t){var o=t?mn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function bn(e,t){if(e!==t){var o=void 0!==e,n=null===e,a=e===e,s=ks(e),i=void 0!==t,r=null===t,l=t===t,d=ks(t);if(!r&&!d&&!s&&e>t||s&&i&&l&&!r&&!d||n&&i&&l||!o&&l||!a)return 1;if(!n&&!s&&!d&&e<t||d&&o&&a&&!n&&!s||r&&o&&a||!i&&a||!l)return-1}return 0}function vn(e,t,o){for(var n=-1,a=e.criteria,s=t.criteria,i=a.length,r=o.length,l;++n<i;)if(l=bn(a[n],s[n]),l){if(n>=r)return l;var d=o[n];return l*("desc"==d?-1:1)}return e.index-t.index}function yn(e,t,o,n){for(var a=-1,s=e.length,i=o.length,r=-1,l=t.length,d=Hi(s-i,0),c=Zs(l+d),p=!n;++r<l;)c[r]=t[r];for(;++a<i;)(p||a<s)&&(c[o[a]]=e[a]);for(;d--;)c[r++]=e[a++];return c}function xn(e,t,o,n){for(var a=-1,s=e.length,i=-1,r=o.length,l=-1,d=t.length,c=Hi(s-r,0),p=Zs(c+d),u=!n;++a<c;)p[a]=e[a];for(var m=a;++l<d;)p[m+l]=t[l];for(;++i<r;)(u||a<s)&&(p[m+o[i]]=e[a++]);return p}function Sn(e,t){var o=-1,n=e.length;for(t||(t=Zs(n));++o<n;)t[o]=e[o];return t}function wn(e,t,o,n){var a=!o;o||(o={});for(var s=-1,i=t.length;++s<i;){var r=t[s],l=n?n(o[r],e[r],r,o,e):void 0;void 0===l&&(l=e[r]),a?wt(o,r,l):bt(o,r,l)}return o}function kn(e,t){return wn(e,yr(e),t)}function En(e,t){return wn(e,xr(e),t)}function Cn(e,t){return function(o,n){var a=pl(o)?i:yt,s=t?t():{};return a(o,e,ia(n,2),s)}}function An(e){return Ho(function(t,o){var n=-1,a=o.length,s=1<a?o[a-1]:void 0,i=2<a?o[2]:void 0;for(s=3<e.length&&"function"==typeof s?(a--,s):void 0,i&&ya(o[0],o[1],i)&&(s=3>a?void 0:s,a=1),t=ai(t);++n<a;){var r=o[n];r&&e(t,r,n,s)}return t})}function Tn(e,t){return function(o,n){if(null==o)return o;if(!us(o))return e(o,n);for(var a=o.length,s=t?a:-1,i=ai(o);(t?s--:++s<a)&&!1!==n(i[s],s,i););return o}}function jn(e){return function(t,o,n){for(var a=-1,s=ai(t),i=n(t),r=i.length,l;r--&&(l=i[e?r:++a],!1!==o(s[l],l,s)););return t}}function Nn(e,t,o){function n(){var t=this&&this!==oo&&this instanceof n?s:e;return t.apply(a?o:this,arguments)}var a=t&ue,s=On(e);return n}function Mn(e){return function(t){t=Is(t);var o=H(t)?Z(t):void 0,n=o?o[0]:t.charAt(0),a=o?pn(o,1).join(""):t.slice(1);return n[e]()+a}}function In(e){return function(t){return h(Us(zs(t).replace(Ft,"")),e,"")}}function On(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);}var o=cr(e.prototype),n=e.apply(o,t);return vs(n)?n:o}}function Rn(e,t,o){function n(){for(var i=arguments.length,r=Zs(i),l=i,d=sa(n);l--;)r[l]=arguments[l];var c=3>i&&r[0]!==d&&r[i-1]!==d?[]:J(r,d);if(i-=c.length,i<o)return Wn(e,t,Pn,n.placeholder,void 0,r,c,void 0,void 0,o-i);var p=this&&this!==oo&&this instanceof n?a:e;return s(p,this,r)}var a=On(e);return n}function Dn(e){return function(t,o,n){var a=ai(t);if(!us(t)){var s=ia(o,3);t=Ds(t),o=function(e){return s(a[e],e,a)}}var i=e(t,o,n);return-1<i?a[s?t[i]:i]:void 0}}function Ln(e){return ta(function(t){var o=t.length,n=o,s=a.prototype.thru;for(e&&t.reverse();n--;){var i=t[n];if("function"!=typeof i)throw new ri(ae);if(s&&!r&&"wrapper"==aa(i))var r=new a([],!0)}for(n=r?n:o;++n<o;){i=t[n];var l=aa(i),d="wrapper"==l?vr(i):void 0;r=d&&wa(d[0])&&d[1]==(ve|he|fe|ye)&&!d[4].length&&1==d[9]?r[aa(d[0])].apply(r,d[3]):1==i.length&&wa(i)?r[l]():r.thru(i)}return function(){var e=arguments,n=e[0];if(r&&1==e.length&&pl(n))return r.plant(n).value();for(var a=0,s=o?t[a].apply(this,e):n;++a<o;)s=t[a].call(this,s);return s}})}function Pn(e,t,o,n,a,s,i,r,l,d){function c(){for(var f=arguments.length,b=Zs(f),v=f;v--;)b[v]=arguments[v];if(g)var y=sa(c),x=B(b,y);if(n&&(b=yn(b,n,a,g)),s&&(b=xn(b,s,i,g)),f-=x,g&&f<d){var S=J(b,y);return Wn(e,t,Pn,c.placeholder,o,b,S,r,l,d-f)}var w=u?o:this,k=m?w[e]:e;return f=b.length,r?b=Oa(b,r):h&&1<f&&b.reverse(),p&&l<f&&(b.length=l),this&&this!==oo&&this instanceof c&&(k=_||On(k)),k.apply(w,b)}var p=t&ve,u=t&ue,m=t&me,g=t&(he|_e),h=t&xe,_=m?void 0:On(e);return c}function qn(e,t){return function(o,n){return to(o,e,t(n),{})}}function Bn(e,t){return function(o,n){var a;if(void 0===o&&void 0===n)return t;if(void 0!==o&&(a=o),void 0!==n){if(void 0===a)return n;"string"==typeof o||"string"==typeof n?(o=Zo(o),n=Zo(n)):(o=Ko(o),n=Ko(n)),a=e(o,n)}return a}}function zn(e){return ta(function(t){return t=m(t,R(ia())),Ho(function(o){var n=this;return e(t,function(e){return s(e,n,o)})})})}function Fn(e,t){t=void 0===t?" ":Zo(t);var o=t.length;if(2>o)return o?Fo(t,e):t;var n=Fo(t,Di(e/K(t)));return H(t)?pn(Z(n),0,e).join(""):n.slice(0,e)}function Hn(e,t,o,n){function a(){for(var t=-1,l=arguments.length,d=-1,c=n.length,p=Zs(c+l),u=this&&this!==oo&&this instanceof a?r:e;++d<c;)p[d]=n[d];for(;l--;)p[d++]=arguments[++t];return s(u,i?o:this,p)}var i=t&ue,r=On(e);return a}function Un(e){return function(t,o,n){return n&&"number"!=typeof n&&ya(t,o,n)&&(o=n=void 0),t=As(t),void 0===o?(o=t,t=0):o=As(o),n=void 0===n?t<o?1:-1:As(n),zo(t,o,n,e)}}function Vn(e){return function(t,o){return"string"==typeof t&&"string"==typeof o||(t=Ns(t),o=Ns(o)),e(t,o)}}function Wn(e,t,o,n,a,s,i,r,l,d){var c=t&he,p=c?i:void 0,u=c?void 0:i,m=c?s:void 0,g=c?void 0:s;t|=c?fe:be,t&=~(c?be:fe),t&ge||(t&=~(ue|me));var h=[e,t,a,m,p,g,u,r,l,d],_=o.apply(void 0,h);return wa(e)&&kr(_,h),_.placeholder=n,Da(_,e,t)}function Gn(e){var t=ni[e];return function(e,o){if(e=Ns(e),o=null==o?0:Ui(Ts(o),292),o&&Bi(e)){var n=(Is(e)+"e").split("e"),a=t(n[0]+"e"+(+n[1]+o));return n=(Is(a)+"e").split("e"),+(n[0]+"e"+(+n[1]-o))}return t(e)}}function Jn(e){return function(t){var o=Sr(t);return o==De?W(t):o==ze?Q(t):O(t,e(t))}}function $n(e,t,o,n,a,s,i,r){var l=t&me;if(!l&&"function"!=typeof e)throw new ri(ae);var d=n?n.length:0;if(d||(t&=~(fe|be),n=a=void 0),i=void 0===i?i:Hi(Ts(i),0),r=void 0===r?r:Ts(r),d-=a?a.length:0,t&be){var c=n,p=a;n=a=void 0}var u=l?void 0:vr(e),m=[e,t,o,n,a,c,p,s,i,r];if(u&&Ta(m,u),e=m[0],t=m[1],o=m[2],n=m[3],a=m[4],r=m[9]=void 0===m[9]?l?0:e.length:Hi(m[9]-d,0),!r&&t&(he|_e)&&(t&=~(he|_e)),!t||t==ue)var g=Nn(e,t,o);else g=t==he||t==_e?Rn(e,t,r):t!=fe&&t!=(ue|fe)||a.length?Pn.apply(void 0,m):Hn(e,t,o,n);var h=u?hr:kr;return Da(h(g,m),e,t)}function Qn(e,t,o,n){return void 0===e||ps(e,ci[o])&&!mi.call(n,o)?t:e}function Yn(e,t,o,n,a,s){return vs(e)&&vs(t)&&(s.set(t,e),No(e,t,void 0,Yn,s),s["delete"](t)),e}function Xn(e){return Ss(e)?void 0:e}function Kn(e,t,o,n,a,s){var i=o&ce,r=e.length,l=t.length;if(r!=l&&!(i&&l>r))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var c=-1,p=!0,u=o&pe?new ee:void 0;for(s.set(e,t),s.set(t,e);++c<r;){var m=e[c],g=t[c];if(n)var h=i?n(g,m,c,t,e,s):n(m,g,c,e,t,s);if(void 0!==h){if(h)continue;p=!1;break}if(u){if(!b(t,function(e,t){if(!L(u,t)&&(m===e||a(m,e,o,n,s)))return u.push(t)})){p=!1;break}}else if(!(m===g||a(m,g,o,n,s))){p=!1;break}}return s["delete"](e),s["delete"](t),p}function Zn(e,t,o,n,a,s,i){switch(o){case We:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ve:return!!(e.byteLength==t.byteLength&&s(new Si(e),new Si(t)));case Ne:case Me:case Le:return ps(+e,+t);case Ie:return e.name==t.name&&e.message==t.message;case Be:case Fe:return e==t+"";case De:var r=W;case ze:var l=n&ce;if(r||(r=$),e.size!=t.size&&!l)return!1;var d=i.get(e);if(d)return d==t;n|=pe,i.set(e,t);var c=Kn(r(e),r(t),n,a,s,i);return i["delete"](e),c;case He:if(lr)return lr.call(e)==lr.call(t);}return!1}function ea(e,t,o,n,a,s){var i=o&ce,r=oa(e),l=r.length,d=oa(t),c=d.length;if(l!=c&&!i)return!1;for(var p=l,u;p--;)if(u=r[p],i?!(u in t):!mi.call(t,u))return!1;var m=s.get(e);if(m&&s.get(t))return m==t;var g=!0;s.set(e,t),s.set(t,e);for(var h=i;++p<l;){u=r[p];var _=e[u],f=t[u];if(n)var b=i?n(f,_,u,t,e,s):n(_,f,u,e,t,s);if(void 0===b?!(_===f||a(_,f,o,n,s)):!b){g=!1;break}h||(h="constructor"==u)}if(g&&!h){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(g=!1)}return s["delete"](e),s["delete"](t),g}function ta(e){return Cr(Ma(e,void 0,Va),e+"")}function oa(e){return zt(e,Ds,yr)}function na(e){return zt(e,Ls,xr)}function aa(e){for(var t=e.name+"",o=tr[t],n=mi.call(tr,t)?o.length:0;n--;){var a=o[n],s=a.func;if(null==s||s==e)return a.name}return t}function sa(e){var t=mi.call(o,"placeholder")?o:e;return t.placeholder}function ia(){var e=o.iteratee||Gs;return e=e===Gs?wo:e,arguments.length?e(arguments[0],arguments[1]):e}function ra(e,t){var o=e.__data__;return Sa(t)?o["string"==typeof t?"string":"hash"]:o.map}function la(e){for(var t=Ds(e),o=t.length;o--;){var n=t[o],a=e[n];t[o]=[n,a,Ca(a)]}return t}function da(e,t){var o=F(e,t);return xo(o)?o:void 0}function ca(e){var t=mi.call(e,Ni),o=e[Ni];try{e[Ni]=void 0;var n=!0}catch(t){}var a=_i.call(e);return n&&(t?e[Ni]=o:delete e[Ni]),a}function pa(e,t,o){for(var n=-1,a=o.length;++n<a;){var s=o[n],i=s.size;switch(s.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=Ui(t,e+i);break;case"takeRight":e=Hi(e,t-i);}}return{start:e,end:t}}function ua(e){var t=e.match(/\{\n\/\* \[wrapped with (.+)\] \*/);return t?t[1].split(/,? & /):[]}function ma(e,t,o){t=cn(t,e);for(var n=-1,a=t.length,s=!1,i;++n<a&&(i=qa(t[n]),!!(s=null!=e&&o(e,i)));)e=e[i];return s||++n!=a?s:(a=null==e?0:e.length,!!a&&bs(a)&&va(i,a)&&(pl(e)||cl(e)))}function ga(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&mi.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function ha(e){return"function"!=typeof e.constructor||Ea(e)?{}:cr(ki(e))}function _a(e,t,o){var n=e.constructor;return t===Ve?mn(e):t===Ne||t===Me?new n(+e):t===We?gn(e,o):t===Ge||t===Je||t===$e||t===Qe||t===Ye||t===Xe||t===Ke||t===Ze||t===et?fn(e,o):t===De?new n:t===Le||t===Fe?new n(e):t===Be?hn(e):t===ze?new n:t===He?_n(e):void 0}function fa(e,t){var o=t.length;if(!o)return e;var n=o-1;return t[n]=(1<o?"& ":"")+t[n],t=t.join(2<o?", ":" "),e.replace(/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,"{\n/* [wrapped with "+t+"] */\n")}function ba(e){return pl(e)||cl(e)||!!(Ti&&e&&e[Ti])}function va(e,t){var o=typeof e;return t=null==t?ke:t,!!t&&("number"==o||"symbol"!=o&&/^(?:0|[1-9]\d*)$/.test(e))&&-1<e&&0==e%1&&e<t}function ya(e,t,o){if(!vs(o))return!1;var n=typeof t;return("number"==n?!!(us(o)&&va(t,o.length)):!!("string"==n&&t in o))&&ps(o[t],e)}function xa(e,t){if(pl(e))return!1;var o=typeof e;return!!("number"==o||"symbol"==o||"boolean"==o||null==e||ks(e))||/^\w*$/.test(e)||!/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/.test(e)||null!=t&&e in ai(t)}function Sa(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function wa(e){var t=aa(e),n=o[t];if("function"!=typeof n||!(t in _.prototype))return!1;if(e===n)return!0;var a=vr(n);return!!a&&e===a[0]}function ka(e){return!!hi&&hi in e}function Ea(e){var t=e&&e.constructor,o="function"==typeof t&&t.prototype||ci;return e===o}function Ca(e){return e===e&&!vs(e)}function Aa(e,t){return function(o){return null!=o&&o[e]===t&&(void 0!==t||e in ai(o))}}function Ta(e,t){var o=e[1],n=t[1],a=o|n,s=a<(ue|me|ve),i=n==ve&&o==he||n==ve&&o==ye&&e[7].length<=t[8]||n==(ve|ye)&&t[7].length<=t[8]&&o==he;if(!(s||i))return e;n&ue&&(e[2]=t[2],a|=o&ue?0:ge);var r=t[3];if(r){var l=e[3];e[3]=l?yn(l,r,t[4]):r,e[4]=l?J(e[3],ie):t[4]}return r=t[5],r&&(l=e[5],e[5]=l?xn(l,r,t[6]):r,e[6]=l?J(e[5],ie):t[6]),r=t[7],r&&(e[7]=r),n&ve&&(e[8]=null==e[8]?t[8]:Ui(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=a,e}function ja(e){var t=[];if(null!=e)for(var o in ai(e))t.push(o);return t}function Na(e){return _i.call(e)}function Ma(e,t,o){return t=Hi(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Hi(n.length-t,0),r=Zs(i);++a<i;)r[a]=n[t+a];a=-1;for(var l=Zs(t+1);++a<t;)l[a]=n[a];return l[t]=o(r),s(e,this,l)}}function Ia(e,t){return 2>t.length?e:Bt(e,Jo(t,0,-1))}function Oa(e,t){for(var o=e.length,n=Ui(t.length,o),a=Sn(e),s;n--;)s=t[n],e[n]=va(s,o)?a[s]:void 0;return e}function Ra(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"==t?void 0:e[t]}function Da(e,t,o){var n=t+"";return Cr(e,fa(n,za(ua(n),o)))}function La(e){var t=0,o=0;return function(){var n=Vi(),a=16-(n-o);if(o=n,!(0<a))t=0;else if(++t>=800)return arguments[0];return e.apply(void 0,arguments)}}function Pa(e,t){var o=-1,n=e.length;for(t=void 0===t?n:t;++o<t;){var a=Bo(o,n-1),s=e[a];e[a]=e[o],e[o]=s}return e.length=t,e}function qa(e){if("string"==typeof e||ks(e))return e;var t=e+"";return"0"==t&&1/e==-we?"-0":t}function Ba(e){if(null!=e){try{return ui.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function za(e,t){return r(Ae,function(o){var n="_."+o[0];t&o[1]&&!p(e,n)&&e.push(n)}),e.sort()}function Fa(e){if(e instanceof _)return e.clone();var t=new a(e.__wrapped__,e.__chain__);return t.__actions__=Sn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ha(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=null==o?0:Ts(o);return 0>a&&(a=Hi(n+a,0)),S(e,ia(t,3),a)}function Ua(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=n-1;return void 0!==o&&(a=Ts(o),a=0>o?Hi(n+a,0):Ui(a,n-1)),S(e,ia(t,3),a,!0)}function Va(e){var t=null==e?0:e.length;return t?Dt(e,1):[]}function Wa(e){return e&&e.length?e[0]:void 0}function Ga(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function Ja(e,t){return e&&e.length&&t&&t.length?Po(e,t):e}function $a(e){return null==e?e:Ji.call(e)}function Qa(e){if(!(e&&e.length))return[];var t=0;return e=c(e,function(e){if(ms(e))return t=Hi(e.length,t),!0}),I(t,function(t){return m(e,A(t))})}function Ya(e,t){if(!(e&&e.length))return[];var o=Qa(e);return null==t?o:m(o,function(e){return s(t,void 0,e)})}function Xa(e){var t=o(e);return t.__chain__=!0,t}function Ka(e,t){return t(e)}function Za(e,t){var o=pl(e)?r:pr;return o(e,ia(t,3))}function es(e,t){var o=pl(e)?l:ur;return o(e,ia(t,3))}function ts(e,t){var o=pl(e)?m:Ao;return o(e,ia(t,3))}function os(e){if(null==e)return 0;if(us(e))return ws(e)?K(e):e.length;var t=Sr(e);return t==De||t==ze?e.size:ko(e).length}function ns(e,t,o){return t=o?void 0:t,t=e&&null==t?e.length:t,$n(e,ve,void 0,void 0,void 0,void 0,t)}function as(e,t){var o;if("function"!=typeof t)throw new ri(ae);return e=Ts(e),function(){return 0<--e&&(o=t.apply(this,arguments)),1>=e&&(t=void 0),o}}function ss(e,t,o){t=o?void 0:t;var n=$n(e,he,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=ss.placeholder,n}function is(e,t,o){t=o?void 0:t;var n=$n(e,_e,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=is.placeholder,n}function rs(e,t,o){function n(t){var o=_,n=f;return _=f=void 0,u=t,v=e.apply(n,o),v}function a(e){return u=e,y=Er(r,t),m?n(e):v}function s(e){var o=e-x,n=e-u,a=t-o;return g?Ui(a,b-n):a}function i(e){var o=e-x,n=e-u;return void 0===x||o>=t||0>o||g&&n>=b}function r(){var e=el();return i(e)?l(e):void(y=Er(r,s(e)))}function l(e){return(y=void 0,h&&_)?n(e):(_=f=void 0,v)}function d(){void 0!==y&&fr(y),u=0,_=x=f=y=void 0}function c(){return void 0===y?v:l(el())}function p(){var e=el(),o=i(e);if(_=arguments,f=this,x=e,o){if(void 0===y)return a(x);if(g)return fr(y),y=Er(r,t),n(x)}return void 0===y&&(y=Er(r,t)),v}var u=0,m=!1,g=!1,h=!0,_,f,b,v,y,x;if("function"!=typeof e)throw new ri(ae);return t=Ns(t)||0,vs(o)&&(m=!!o.leading,g="maxWait"in o,b=g?Hi(Ns(o.maxWait)||0,t):b,h="trailing"in o?!!o.trailing:h),p.cancel=d,p.flush=c,p}function ls(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ri(ae);var o=function(){var n=arguments,a=t?t.apply(this,n):n[0],s=o.cache;if(s.has(a))return s.get(a);var i=e.apply(this,n);return o.cache=s.set(a,i)||s,i};return o.cache=new(ls.Cache||Y),o}function ds(e){if("function"!=typeof e)throw new ri(ae);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2]);}return!e.apply(this,t)}}function cs(e,t,o){var n=!0,a=!0;if("function"!=typeof e)throw new ri(ae);return vs(o)&&(n="leading"in o?!!o.leading:n,a="trailing"in o?!!o.trailing:a),rs(e,t,{leading:n,maxWait:t,trailing:a})}function ps(e,t){return e===t||e!==e&&t!==t}function us(e){return null!=e&&bs(e.length)&&!_s(e)}function ms(e){return ys(e)&&us(e)}function gs(e){if(null==e)return!0;if(us(e)&&(pl(e)||"string"==typeof e||"function"==typeof e.splice||ml(e)||bl(e)||cl(e)))return!e.length;var t=Sr(e);if(t==De||t==ze)return!e.size;if(Ea(e))return!ko(e).length;for(var o in e)if(mi.call(e,o))return!1;return!0}function hs(e){if(!ys(e))return!1;var t=Ut(e);return t==Ie||t=="[object DOMException]"||"string"==typeof e.message&&"string"==typeof e.name&&!Ss(e)}function _s(e){if(!vs(e))return!1;var t=Ut(e);return t==Oe||t==Re||t=="[object AsyncFunction]"||t=="[object Proxy]"}function fs(e){return"number"==typeof e&&e==Ts(e)}function bs(e){return"number"==typeof e&&-1<e&&0==e%1&&e<=ke}function vs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ys(e){return null!=e&&"object"==typeof e}function xs(e){return"number"==typeof e||ys(e)&&Ut(e)==Le}function Ss(e){if(!ys(e)||Ut(e)!=Pe)return!1;var t=ki(e);if(null===t)return!0;var o=mi.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&ui.call(o)==fi}function ws(e){return"string"==typeof e||!pl(e)&&ys(e)&&Ut(e)==Fe}function ks(e){return"symbol"==typeof e||ys(e)&&Ut(e)==He}function Es(e){return ys(e)&&Sr(e)==Ue}function Cs(e){if(!e)return[];if(us(e))return ws(e)?Z(e):Sn(e);if(ji&&e[ji])return V(e[ji]());var t=Sr(e),o=t==De?W:t==ze?$:qs;return o(e)}function As(e){if(!e)return 0===e?e:0;if(e=Ns(e),e===we||e===-we){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0}function Ts(e){var t=As(e),o=t%1;return t===t?o?t-o:t:0}function js(e){return e?Et(Ts(e),0,Ce):0}function Ns(e){if("number"==typeof e)return e;if(ks(e))return Ee;if(vs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=vs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(lt,"");var o=/^0b[01]+$/i.test(e);return o||/^0o[0-7]+$/i.test(e)?Zt(e.slice(2),o?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?Ee:+e}function Ms(e){return wn(e,Ls(e))}function Is(e){return null==e?"":Zo(e)}function Os(e,t,o){var n=null==e?void 0:Bt(e,t);return void 0===n?o:n}function Rs(e,t){return null!=e&&ma(e,t,Gt)}function Ds(e){return us(e)?ct(e):ko(e)}function Ls(e){return us(e)?ct(e,!0):Eo(e)}function Ps(e,t){if(null==e)return{};var o=m(na(e),function(e){return[e]});return t=ia(t),Do(e,o,function(e,o){return t(e,o[0])})}function qs(e){return null==e?[]:D(e,Ds(e))}function Bs(e){return Vl(Is(e).toLowerCase())}function zs(e){return e=Is(e),e&&e.replace(/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_o).replace(Ht,"")}function Fs(e,t,n){var a=o.templateSettings;n&&ya(e,t,n)&&(t=void 0),e=Is(e),t=wl({},t,a,Qn);var s=wl({},t.imports,a.imports,Qn),i=Ds(s),r=D(s,i),l=0,d=t.interpolate||ut,c="__p += '",p=si((t.escape||ut).source+"|"+d.source+"|"+(d===st?/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g:ut).source+"|"+(t.evaluate||ut).source+"|$","g"),u="//# sourceURL="+(mi.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++$t+"]")+"\n",m,g;e.replace(p,function(t,o,n,a,s,i){return n||(n=a),c+=e.slice(l,i).replace(/['\n\r\u2028\u2029\\]/g,z),o&&(m=!0,c+="' +\n__e("+o+") +\n'"),s&&(g=!0,c+="';\n"+s+";\n__p += '"),n&&(c+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=i+t.length,t}),c+="';\n";var h=mi.call(t,"variable")&&t.variable;h||(c="with (obj) {\n"+c+"\n}\n"),c=(g?c.replace(/\b__p \+= '';/g,""):c).replace(/\b(__p \+=) '' \+/g,"$1").replace(/(__e\(.*?\)|\b__t\)) \+\n'';/g,"$1;"),c="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(m?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+c+"return __p\n}";var _=Wl(function(){return oi(i,u+"return "+c).apply(void 0,r)});if(_.source=c,hs(_))throw _;return _}function Hs(e,t){var o=30,n="...";if(vs(t)){var a="separator"in t?t.separator:a;o="length"in t?Ts(t.length):o,n="omission"in t?Zo(t.omission):n}e=Is(e);var s=e.length;if(H(e)){var i=Z(e);s=i.length}if(o>=s)return e;var r=o-K(n);if(1>r)return n;var l=i?pn(i,0,r).join(""):e.slice(0,r);if(void 0===a)return l+n;if(i&&(r+=l.length-r),_l(a)){if(e.slice(r).search(a)){var d=l,c;for(a.global||(a=si(a.source,Is(pt.exec(a))+"g")),a.lastIndex=0;c=a.exec(d);)var p=c.index;l=l.slice(0,void 0===p?r:p)}}else if(e.indexOf(Zo(a),r)!=r){var u=l.lastIndexOf(a);-1<u&&(l=l.slice(0,u))}return l+n}function Us(e,t,o){return e=Is(e),t=o?void 0:t,void 0===t?U(e)?oe(e):y(e):e.match(t)||[]}function Vs(e){return function(){return e}}function Ws(e){return e}function Gs(e){return wo("function"==typeof e?e:Ct(e,re))}function Js(e,t,o){var n=Ds(t),a=qt(t,n);null!=o||vs(t)&&(a.length||!n.length)||(o=t,t=e,e=this,a=qt(t,Ds(t)));var s=!(vs(o)&&"chain"in o)||!!o.chain,i=_s(e);return r(a,function(o){var n=t[o];e[o]=n,i&&(e.prototype[o]=function(){var t=this.__chain__;if(s||t){var o=e(this.__wrapped__),a=o.__actions__=Sn(this.__actions__);return a.push({func:n,args:arguments,thisArg:e}),o.__chain__=t,o}return n.apply(e,g([this.value()],arguments))})}),e}function $s(){}function Qs(e){return xa(e)?A(qa(e)):Lo(e)}function Ys(){return[]}function Xs(){return!1}function Ks(e){var t=++gi;return Is(e)+t}t=null==t?oo:vo.defaults(oo.Object(),t,vo.pick(oo,Jt));var Zs=t.Array,ei=t.Date,ti=t.Error,oi=t.Function,ni=t.Math,ai=t.Object,si=t.RegExp,ii=t.String,ri=t.TypeError,li=Zs.prototype,di=oi.prototype,ci=ai.prototype,pi=t["__core-js_shared__"],ui=di.toString,mi=ci.hasOwnProperty,gi=0,hi=function(){var e=/[^.]+$/.exec(pi&&pi.keys&&pi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),_i=ci.toString,fi=ui.call(ai),bi=oo._,vi=si("^"+ui.call(mi).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yi=so?t.Buffer:void 0,xi=t.Symbol,Si=t.Uint8Array,wi=yi?yi.allocUnsafe:void 0,ki=G(ai.getPrototypeOf,ai),Ei=ai.create,Ci=ci.propertyIsEnumerable,Ai=li.splice,Ti=xi?xi.isConcatSpreadable:void 0,ji=xi?xi.iterator:void 0,Ni=xi?xi.toStringTag:void 0,Mi=function(){try{var e=da(ai,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ii=t.clearTimeout!==oo.clearTimeout&&t.clearTimeout,Oi=ei&&ei.now!==oo.Date.now&&ei.now,Ri=t.setTimeout!==oo.setTimeout&&t.setTimeout,Di=ni.ceil,Li=ni.floor,Pi=ai.getOwnPropertySymbols,qi=yi?yi.isBuffer:void 0,Bi=t.isFinite,zi=li.join,Fi=G(ai.keys,ai),Hi=ni.max,Ui=ni.min,Vi=ei.now,Wi=t.parseInt,Gi=ni.random,Ji=li.reverse,$i=da(t,"DataView"),Qi=da(t,"Map"),Yi=da(t,"Promise"),Xi=da(t,"Set"),Ki=da(t,"WeakMap"),Zi=da(ai,"create"),er=Ki&&new Ki,tr={},or=Ba($i),nr=Ba(Qi),ar=Ba(Yi),sr=Ba(Xi),ir=Ba(Ki),rr=xi?xi.prototype:void 0,lr=rr?rr.valueOf:void 0,dr=rr?rr.toString:void 0,cr=function(){function e(){}return function(t){if(!vs(t))return{};if(Ei)return Ei(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:st,variable:"",imports:{_:o}},o.prototype=n.prototype,o.prototype.constructor=o,a.prototype=cr(n.prototype),a.prototype.constructor=a,_.prototype=cr(n.prototype),_.prototype.constructor=_,v.prototype.clear=function(){this.__data__=Zi?Zi(null):{},this.size=0},v.prototype["delete"]=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},v.prototype.get=function(e){var t=this.__data__;if(Zi){var o=t[e];return o===se?void 0:o}return mi.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return Zi?void 0!==t[e]:mi.call(t,e)},v.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Zi&&void 0===t?se:t,this},T.prototype.clear=function(){this.__data__=[],this.size=0},T.prototype["delete"]=function(e){var t=this.__data__,o=vt(t,e);if(0>o)return!1;var n=t.length-1;return o==n?t.pop():Ai.call(t,o,1),--this.size,!0},T.prototype.get=function(e){var t=this.__data__,o=vt(t,e);return 0>o?void 0:t[o][1]},T.prototype.has=function(e){return-1<vt(this.__data__,e)},T.prototype.set=function(e,t){var o=this.__data__,n=vt(o,e);return 0>n?(++this.size,o.push([e,t])):o[n][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new v,map:new(Qi||T),string:new v}},Y.prototype["delete"]=function(e){var t=ra(this,e)["delete"](e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return ra(this,e).get(e)},Y.prototype.has=function(e){return ra(this,e).has(e)},Y.prototype.set=function(e,t){var o=ra(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this},ee.prototype.add=ee.prototype.push=function(e){return this.__data__.set(e,se),this},ee.prototype.has=function(e){return this.__data__.has(e)},te.prototype.clear=function(){this.__data__=new T,this.size=0},te.prototype["delete"]=function(e){var t=this.__data__,o=t["delete"](e);return this.size=t.size,o},te.prototype.get=function(e){return this.__data__.get(e)},te.prototype.has=function(e){return this.__data__.has(e)},te.prototype.set=function(e,t){var o=this.__data__;if(o instanceof T){var n=o.__data__;if(!Qi||n.length<ne-1)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new Y(n)}return o.set(e,t),this.size=o.size,this};var pr=Tn(Lt),ur=Tn(Pt,!0),mr=jn(),gr=jn(!0),hr=er?function(e,t){return er.set(e,t),e}:Ws,_r=Mi?function(e,t){return Mi(e,"toString",{configurable:!0,enumerable:!1,value:Vs(t),writable:!0})}:Ws,fr=Ii||function(e){return oo.clearTimeout(e)},br=Xi&&1/$(new Xi([,-0]))[1]==we?function(e){return new Xi(e)}:$s,vr=er?function(e){return er.get(e)}:$s,yr=Pi?function(e){return null==e?[]:(e=ai(e),c(Pi(e),function(t){return Ci.call(e,t)}))}:Ys,xr=Pi?function(e){for(var t=[];e;)g(t,yr(e)),e=ki(e);return t}:Ys,Sr=Ut;($i&&Sr(new $i(new ArrayBuffer(1)))!=We||Qi&&Sr(new Qi)!=De||Yi&&Sr(Yi.resolve())!=qe||Xi&&Sr(new Xi)!=ze||Ki&&Sr(new Ki)!=Ue)&&(Sr=function(e){var t=Ut(e),o=t==Pe?e.constructor:void 0,n=o?Ba(o):"";if(n)switch(n){case or:return We;case nr:return De;case ar:return qe;case sr:return ze;case ir:return Ue;}return t});var wr=pi?_s:Xs,kr=La(hr),Er=Ri||function(e,t){return oo.setTimeout(e,t)},Cr=La(_r),Ar=function(e){var t=ls(e,function(e){return o.size===500&&o.clear(),e}),o=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,o,n,a){t.push(n?a.replace(/\\(\\)?/g,"$1"):o||e)}),t}),Tr=Ho(function(e,t){return ms(e)?Nt(e,Dt(t,1,ms,!0)):[]}),jr=Ho(function(e,t){var o=Ga(t);return ms(o)&&(o=void 0),ms(e)?Nt(e,Dt(t,1,ms,!0),ia(o,2)):[]}),Nr=Ho(function(e,t){var o=Ga(t);return ms(o)&&(o=void 0),ms(e)?Nt(e,Dt(t,1,ms,!0),void 0,o):[]}),Mr=Ho(function(e){var t=m(e,ln);return t.length&&t[0]===e[0]?eo(t):[]}),Ir=Ho(function(e){var t=Ga(e),o=m(e,ln);return t===Ga(o)?t=void 0:o.pop(),o.length&&o[0]===e[0]?eo(o,ia(t,2)):[]}),Or=Ho(function(e){var t=Ga(e),o=m(e,ln);return t="function"==typeof t?t:void 0,t&&o.pop(),o.length&&o[0]===e[0]?eo(o,void 0,t):[]}),Rr=Ho(Ja),Dr=ta(function(e,t){var o=null==e?0:e.length,n=kt(e,t);return qo(e,m(t,function(e){return va(e,o)?+e:e}).sort(bn)),n}),Lr=Ho(function(e){return en(Dt(e,1,ms,!0))}),Pr=Ho(function(e){var t=Ga(e);return ms(t)&&(t=void 0),en(Dt(e,1,ms,!0),ia(t,2))}),qr=Ho(function(e){var t=Ga(e);return t="function"==typeof t?t:void 0,en(Dt(e,1,ms,!0),void 0,t)}),Br=Ho(function(e,t){return ms(e)?Nt(e,t):[]}),zr=Ho(function(e){return sn(c(e,ms))}),Fr=Ho(function(e){var t=Ga(e);return ms(t)&&(t=void 0),sn(c(e,ms),ia(t,2))}),Hr=Ho(function(e){var t=Ga(e);return t="function"==typeof t?t:void 0,sn(c(e,ms),void 0,t)}),Ur=Ho(Qa),Vr=Ho(function(e){var t=e.length,o=1<t?e[t-1]:void 0;return o="function"==typeof o?(e.pop(),o):void 0,Ya(e,o)}),Wr=ta(function(e){var t=e.length,o=t?e[0]:0,n=this.__wrapped__,s=function(t){return kt(t,e)};return 1<t||this.__actions__.length||!(n instanceof _)||!va(o)?this.thru(s):(n=n.slice(o,+o+(t?1:0)),n.__actions__.push({func:Ka,args:[s],thisArg:void 0}),new a(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e}))}),Gr=Cn(function(e,t,o){mi.call(e,o)?++e[o]:wt(e,o,1)}),Jr=Dn(Ha),$r=Dn(Ua),Qr=Cn(function(e,t,o){mi.call(e,o)?e[o].push(t):wt(e,o,[t])}),Yr=Ho(function(e,t,o){var n=-1,a=us(e)?Zs(e.length):[];return pr(e,function(e){a[++n]="function"==typeof t?s(t,e,o):no(e,t,o)}),a}),Xr=Cn(function(e,t,o){wt(e,o,t)}),Kr=Cn(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]}),Zr=Ho(function(e,t){if(null==e)return[];var o=t.length;return 1<o&&ya(e,t[0],t[1])?t=[]:2<o&&ya(t[0],t[1],t[2])&&(t=[t[0]]),Oo(e,Dt(t,1),[])}),el=Oi||function(){return oo.Date.now()},tl=Ho(function(e,t,o){var n=ue;if(o.length){var a=J(o,sa(tl));n|=fe}return $n(e,n,t,o,a)}),ol=Ho(function(e,t,o){var n=ue|me;if(o.length){var a=J(o,sa(ol));n|=fe}return $n(t,n,e,o,a)}),nl=Ho(function(e,t){return jt(e,1,t)}),al=Ho(function(e,t,o){return jt(e,Ns(t)||0,o)});ls.Cache=Y;var sl=Ho(function(e,t){t=1==t.length&&pl(t[0])?m(t[0],R(ia())):m(Dt(t,1),R(ia()));var o=t.length;return Ho(function(n){for(var a=-1,i=Ui(n.length,o);++a<i;)n[a]=t[a].call(this,n[a]);return s(e,this,n)})}),il=Ho(function(e,t){var o=J(t,sa(il));return $n(e,fe,void 0,t,o)}),rl=Ho(function(e,t){var o=J(t,sa(rl));return $n(e,be,void 0,t,o)}),ll=ta(function(e,t){return $n(e,ye,void 0,void 0,void 0,t)}),dl=Vn(Vt),gt=Vn(function(e,t){return e>=t}),cl=ao(function(){return arguments}())?ao:function(e){return ys(e)&&mi.call(e,"callee")&&!Ci.call(e,"callee")},pl=Zs.isArray,ul=lo?R(lo):function(e){return ys(e)&&Ut(e)==Ve},ml=qi||Xs,gl=co?R(co):function(e){return ys(e)&&Ut(e)==Me},hl=po?R(po):ho,_l=uo?R(uo):function(e){return ys(e)&&Ut(e)==Be},fl=mo?R(mo):So,bl=go?R(go):function(e){return ys(e)&&bs(e.length)&&!!Qt[Ut(e)]},vl=Vn(Co),yl=Vn(function(e,t){return e<=t}),xl=An(function(e,t){if(Ea(t)||us(t))return void wn(t,Ds(t),e);for(var o in t)mi.call(t,o)&&bt(e,o,t[o])}),Sl=An(function(e,t){wn(t,Ls(t),e)}),wl=An(function(e,t,o,n){wn(t,Ls(t),e,n)}),kl=An(function(e,t,o,n){wn(t,Ds(t),e,n)}),El=ta(kt),Cl=Ho(function(e,t){e=ai(e);var o=-1,n=t.length,a=2<n?t[2]:void 0;for(a&&ya(t[0],t[1],a)&&(n=1);++o<n;)for(var s=t[o],i=Ls(s),r=-1,l=i.length;++r<l;){var d=i[r],c=e[d];(void 0===c||ps(c,ci[d])&&!mi.call(e,d))&&(e[d]=s[d])}return e}),Al=Ho(function(e){return e.push(void 0,Yn),s(Il,void 0,e)}),Tl=qn(function(e,t,o){null!=t&&"function"!=typeof t.toString&&(t=_i.call(t)),e[t]=o},Vs(Ws)),jl=qn(function(e,t,o){null!=t&&"function"!=typeof t.toString&&(t=_i.call(t)),mi.call(e,t)?e[t].push(o):e[t]=[o]},ia),Nl=Ho(no),Ml=An(function(e,t,o){No(e,t,o)}),Il=An(function(e,t,o,n){No(e,t,o,n)}),Ol=ta(function(e,t){var o={};if(null==e)return o;var n=!1;t=m(t,function(t){return t=cn(t,e),n||(n=1<t.length),t}),wn(e,na(e),o),n&&(o=Ct(o,re|le|de,Xn));for(var a=t.length;a--;)tn(o,t[a]);return o}),Rl=ta(function(e,t){return null==e?{}:Ro(e,t)}),Dl=Jn(Ds),Ll=Jn(Ls),Pl=In(function(e,t,o){return t=t.toLowerCase(),e+(o?Bs(t):t)}),ql=In(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),Bl=In(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),zl=Mn("toLowerCase"),Fl=In(function(e,t,o){return e+(o?"_":"")+t.toLowerCase()}),Hl=In(function(e,t,o){return e+(o?" ":"")+Vl(t)}),Ul=In(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Vl=Mn("toUpperCase"),Wl=Ho(function(e,t){try{return s(e,void 0,t)}catch(t){return hs(t)?t:new ti(t)}}),Gl=ta(function(e,t){return r(t,function(t){t=qa(t),wt(e,t,tl(e[t],e))}),e}),Jl=Ln(),$l=Ln(!0),Ql=Ho(function(e,t){return function(o){return no(o,e,t)}}),Yl=Ho(function(e,t){return function(o){return no(e,o,t)}}),Xl=zn(m),Kl=zn(d),Zl=zn(b),ed=Un(),td=Un(!0),od=Bn(function(e,t){return e+t},0),nd=Gn("ceil"),ad=Bn(function(e,t){return e/t},1),sd=Gn("floor"),id=Bn(function(e,t){return e*t},1),rd=Gn("round"),ld=Bn(function(e,t){return e-t},0);return o.after=function(e,t){if("function"!=typeof t)throw new ri(ae);return e=Ts(e),function(){if(1>--e)return t.apply(this,arguments)}},o.ary=ns,o.assign=xl,o.assignIn=Sl,o.assignInWith=wl,o.assignWith=kl,o.at=El,o.before=as,o.bind=tl,o.bindAll=Gl,o.bindKey=ol,o.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return pl(e)?e:[e]},o.chain=Xa,o.chunk=function(e,t,o){t=(o?ya(e,t,o):void 0===t)?1:Hi(Ts(t),0);var n=null==e?0:e.length;if(!n||1>t)return[];for(var a=0,s=0,i=Zs(Di(n/t));a<n;)i[s++]=Jo(e,a,a+=t);return i},o.compact=function(e){for(var t=-1,o=null==e?0:e.length,n=0,a=[],s;++t<o;)s=e[t],s&&(a[n++]=s);return a},o.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Zs(e-1),o=arguments[0],n=e;n--;)t[n-1]=arguments[n];return g(pl(o)?Sn(o):[o],Dt(t,1))},o.cond=function(e){var t=null==e?0:e.length,o=ia();return e=t?m(e,function(e){if("function"!=typeof e[1])throw new ri(ae);return[o(e[0]),e[1]]}):[],Ho(function(o){for(var n=-1,a;++n<t;)if(a=e[n],s(a[0],this,o))return s(a[1],this,o)})},o.conforms=function(e){return At(Ct(e,re))},o.constant=Vs,o.countBy=Gr,o.create=function(e,t){var o=cr(e);return null==t?o:xt(o,t)},o.curry=ss,o.curryRight=is,o.debounce=rs,o.defaults=Cl,o.defaultsDeep=Al,o.defer=nl,o.delay=al,o.difference=Tr,o.differenceBy=jr,o.differenceWith=Nr,o.drop=function(e,t,o){var a=null==e?0:e.length;return a?(t=o||void 0===t?1:Ts(t),Jo(e,0>t?0:t,a)):[]},o.dropRight=function(e,t,o){var a=null==e?0:e.length;return a?(t=o||void 0===t?1:Ts(t),t=a-t,Jo(e,0,0>t?0:t)):[]},o.dropRightWhile=function(e,t){return e&&e.length?nn(e,ia(t,3),!0,!0):[]},o.dropWhile=function(e,t){return e&&e.length?nn(e,ia(t,3),!0):[]},o.fill=function(e,t,o,n){var a=null==e?0:e.length;return a?(o&&"number"!=typeof o&&ya(e,t,o)&&(o=0,n=a),Ot(e,t,o,n)):[]},o.filter=function(e,t){var o=pl(e)?c:Rt;return o(e,ia(t,3))},o.flatMap=function(e,t){return Dt(ts(e,t),1)},o.flatMapDeep=function(e,t){return Dt(ts(e,t),we)},o.flatMapDepth=function(e,t,o){return o=void 0===o?1:Ts(o),Dt(ts(e,t),o)},o.flatten=Va,o.flattenDeep=function(e){var t=null==e?0:e.length;return t?Dt(e,we):[]},o.flattenDepth=function(e,t){var o=null==e?0:e.length;return o?(t=void 0===t?1:Ts(t),Dt(e,t)):[]},o.flip=function(e){return $n(e,xe)},o.flow=Jl,o.flowRight=$l,o.fromPairs=function(e){for(var t=-1,o=null==e?0:e.length,n={},a;++t<o;)a=e[t],n[a[0]]=a[1];return n},o.functions=function(e){return null==e?[]:qt(e,Ds(e))},o.functionsIn=function(e){return null==e?[]:qt(e,Ls(e))},o.groupBy=Qr,o.initial=function(e){var t=null==e?0:e.length;return t?Jo(e,0,-1):[]},o.intersection=Mr,o.intersectionBy=Ir,o.intersectionWith=Or,o.invert=Tl,o.invertBy=jl,o.invokeMap=Yr,o.iteratee=Gs,o.keyBy=Xr,o.keys=Ds,o.keysIn=Ls,o.map=ts,o.mapKeys=function(e,t){var o={};return t=ia(t,3),Lt(e,function(e,n,a){wt(o,t(e,n,a),e)}),o},o.mapValues=function(e,t){var o={};return t=ia(t,3),Lt(e,function(e,n,a){wt(o,n,t(e,n,a))}),o},o.matches=function(e){return To(Ct(e,re))},o.matchesProperty=function(e,t){return jo(e,Ct(t,re))},o.memoize=ls,o.merge=Ml,o.mergeWith=Il,o.method=Ql,o.methodOf=Yl,o.mixin=Js,o.negate=ds,o.nthArg=function(e){return e=Ts(e),Ho(function(t){return Io(t,e)})},o.omit=Ol,o.omitBy=function(e,t){return Ps(e,ds(ia(t)))},o.once=function(e){return as(2,e)},o.orderBy=function(e,t,o,n){return null==e?[]:(pl(t)||(t=null==t?[]:[t]),o=n?void 0:o,pl(o)||(o=null==o?[]:[o]),Oo(e,t,o))},o.over=Xl,o.overArgs=sl,o.overEvery=Kl,o.overSome=Zl,o.partial=il,o.partialRight=rl,o.partition=Kr,o.pick=Rl,o.pickBy=Ps,o.property=Qs,o.propertyOf=function(e){return function(t){return null==e?void 0:Bt(e,t)}},o.pull=Rr,o.pullAll=Ja,o.pullAllBy=function(e,t,o){return e&&e.length&&t&&t.length?Po(e,t,ia(o,2)):e},o.pullAllWith=function(e,t,o){return e&&e.length&&t&&t.length?Po(e,t,void 0,o):e},o.pullAt=Dr,o.range=ed,o.rangeRight=td,o.rearg=ll,o.reject=function(e,t){var o=pl(e)?c:Rt;return o(e,ds(ia(t,3)))},o.remove=function(e,t){var o=[];if(!(e&&e.length))return o;var n=-1,a=[],s=e.length;for(t=ia(t,3);++n<s;){var i=e[n];t(i,n,e)&&(o.push(i),a.push(n))}return qo(e,a),o},o.rest=function(e,t){if("function"!=typeof e)throw new ri(ae);return t=void 0===t?t:Ts(t),Ho(e,t)},o.reverse=$a,o.sampleSize=function(e,t,o){t=(o?ya(e,t,o):void 0===t)?1:Ts(t);var a=pl(e)?ht:Vo;return a(e,t)},o.set=function(e,t,o){return null==e?e:Wo(e,t,o)},o.setWith=function(e,t,o,n){return n="function"==typeof n?n:void 0,null==e?e:Wo(e,t,o,n)},o.shuffle=function(e){var t=pl(e)?_t:Go;return t(e)},o.slice=function(e,t,o){var n=null==e?0:e.length;return n?(o&&"number"!=typeof o&&ya(e,t,o)?(t=0,o=n):(t=null==t?0:Ts(t),o=void 0===o?n:Ts(o)),Jo(e,t,o)):[]},o.sortBy=Zr,o.sortedUniq=function(e){return e&&e.length?Xo(e):[]},o.sortedUniqBy=function(e,t){return e&&e.length?Xo(e,ia(t,2)):[]},o.split=function(e,t,o){return(o&&"number"!=typeof o&&ya(e,t,o)&&(t=o=void 0),o=void 0===o?Ce:o>>>0,!o)?[]:(e=Is(e),e&&("string"==typeof t||null!=t&&!_l(t))&&(t=Zo(t),!t&&H(e))?pn(Z(e),0,o):e.split(t,o))},o.spread=function(e,t){if("function"!=typeof e)throw new ri(ae);return t=null==t?0:Hi(Ts(t),0),Ho(function(o){var n=o[t],a=pn(o,0,t);return n&&g(a,n),s(e,this,a)})},o.tail=function(e){var t=null==e?0:e.length;return t?Jo(e,1,t):[]},o.take=function(e,t,o){return e&&e.length?(t=o||void 0===t?1:Ts(t),Jo(e,0,0>t?0:t)):[]},o.takeRight=function(e,t,o){var a=null==e?0:e.length;return a?(t=o||void 0===t?1:Ts(t),t=a-t,Jo(e,0>t?0:t,a)):[]},o.takeRightWhile=function(e,t){return e&&e.length?nn(e,ia(t,3),!1,!0):[]},o.takeWhile=function(e,t){return e&&e.length?nn(e,ia(t,3)):[]},o.tap=function(e,t){return t(e),e},o.throttle=cs,o.thru=Ka,o.toArray=Cs,o.toPairs=Dl,o.toPairsIn=Ll,o.toPath=function(e){return pl(e)?m(e,qa):ks(e)?[e]:Sn(Ar(Is(e)))},o.toPlainObject=Ms,o.transform=function(e,t,o){var n=pl(e),a=n||ml(e)||bl(e);if(t=ia(t,4),null==o){var s=e&&e.constructor;o=a?n?new s:[]:vs(e)?_s(s)?cr(ki(e)):{}:{}}return(a?r:Lt)(e,function(e,n,a){return t(o,e,n,a)}),o},o.unary=function(e){return ns(e,1)},o.union=Lr,o.unionBy=Pr,o.unionWith=qr,o.uniq=function(e){return e&&e.length?en(e):[]},o.uniqBy=function(e,t){return e&&e.length?en(e,ia(t,2)):[]},o.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?en(e,void 0,t):[]},o.unset=function(e,t){return null==e||tn(e,t)},o.unzip=Qa,o.unzipWith=Ya,o.update=function(e,t,o){return null==e?e:on(e,t,dn(o))},o.updateWith=function(e,t,o,n){return n="function"==typeof n?n:void 0,null==e?e:on(e,t,dn(o),n)},o.values=qs,o.valuesIn=function(e){return null==e?[]:D(e,Ls(e))},o.without=Br,o.words=Us,o.wrap=function(e,t){return il(dn(t),e)},o.xor=zr,o.xorBy=Fr,o.xorWith=Hr,o.zip=Ur,o.zipObject=function(e,t){return rn(e||[],t||[],bt)},o.zipObjectDeep=function(e,t){return rn(e||[],t||[],Wo)},o.zipWith=Vr,o.entries=Dl,o.entriesIn=Ll,o.extend=Sl,o.extendWith=wl,Js(o,o),o.add=od,o.attempt=Wl,o.camelCase=Pl,o.capitalize=Bs,o.ceil=nd,o.clamp=function(e,t,o){return void 0===o&&(o=t,t=void 0),void 0!==o&&(o=Ns(o),o=o===o?o:0),void 0!==t&&(t=Ns(t),t=t===t?t:0),Et(Ns(e),t,o)},o.clone=function(e){return Ct(e,de)},o.cloneDeep=function(e){return Ct(e,re|de)},o.cloneDeepWith=function(e,t){return t="function"==typeof t?t:void 0,Ct(e,re|de,t)},o.cloneWith=function(e,t){return t="function"==typeof t?t:void 0,Ct(e,de,t)},o.conformsTo=function(e,t){return null==t||Tt(e,t,Ds(t))},o.deburr=zs,o.defaultTo=function(e,t){return null==e||e!==e?t:e},o.divide=ad,o.endsWith=function(e,t,o){e=Is(e),t=Zo(t);var n=e.length;o=void 0===o?n:Et(Ts(o),0,n);var a=o;return o-=t.length,0<=o&&e.slice(o,a)==t},o.eq=ps,o.escape=function(e){return e=Is(e),e&&at.test(e)?e.replace(ot,fo):e},o.escapeRegExp=function(e){return e=Is(e),e&&rt.test(e)?e.replace(it,"\\$&"):e},o.every=function(e,t,o){var n=pl(e)?d:Mt;return o&&ya(e,t,o)&&(t=void 0),n(e,ia(t,3))},o.find=Jr,o.findIndex=Ha,o.findKey=function(e,t){return x(e,ia(t,3),Lt)},o.findLast=$r,o.findLastIndex=Ua,o.findLastKey=function(e,t){return x(e,ia(t,3),Pt)},o.floor=sd,o.forEach=Za,o.forEachRight=es,o.forIn=function(e,t){return null==e?e:mr(e,ia(t,3),Ls)},o.forInRight=function(e,t){return null==e?e:gr(e,ia(t,3),Ls)},o.forOwn=function(e,t){return e&&Lt(e,ia(t,3))},o.forOwnRight=function(e,t){return e&&Pt(e,ia(t,3))},o.get=Os,o.gt=dl,o.gte=gt,o.has=function(e,t){return null!=e&&ma(e,t,Wt)},o.hasIn=Rs,o.head=Wa,o.identity=Ws,o.includes=function(e,t,o,n){e=us(e)?e:qs(e),o=o&&!n?Ts(o):0;var a=e.length;return 0>o&&(o=Hi(a+o,0)),ws(e)?o<=a&&-1<e.indexOf(t,o):!!a&&-1<w(e,t,o)},o.indexOf=function(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=null==o?0:Ts(o);return 0>a&&(a=Hi(n+a,0)),w(e,t,a)},o.inRange=function(e,t,o){return t=As(t),void 0===o?(o=t,t=0):o=As(o),e=Ns(e),Xt(e,t,o)},o.invoke=Nl,o.isArguments=cl,o.isArray=pl,o.isArrayBuffer=ul,o.isArrayLike=us,o.isArrayLikeObject=ms,o.isBoolean=function(e){return!0===e||!1===e||ys(e)&&Ut(e)==Ne},o.isBuffer=ml,o.isDate=gl,o.isElement=function(e){return ys(e)&&1===e.nodeType&&!Ss(e)},o.isEmpty=gs,o.isEqual=function(e,t){return io(e,t)},o.isEqualWith=function(e,t,o){o="function"==typeof o?o:void 0;var n=o?o(e,t):void 0;return void 0===n?io(e,t,void 0,o):!!n},o.isError=hs,o.isFinite=function(e){return"number"==typeof e&&Bi(e)},o.isFunction=_s,o.isInteger=fs,o.isLength=bs,o.isMap=hl,o.isMatch=function(e,t){return e===t||yo(e,t,la(t))},o.isMatchWith=function(e,t,o){return o="function"==typeof o?o:void 0,yo(e,t,la(t),o)},o.isNaN=function(e){return xs(e)&&e!=+e},o.isNative=function(e){if(wr(e))throw new ti("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xo(e)},o.isNil=function(e){return null==e},o.isNull=function(e){return null===e},o.isNumber=xs,o.isObject=vs,o.isObjectLike=ys,o.isPlainObject=Ss,o.isRegExp=_l,o.isSafeInteger=function(e){return fs(e)&&e>=-ke&&e<=ke},o.isSet=fl,o.isString=ws,o.isSymbol=ks,o.isTypedArray=bl,o.isUndefined=function(e){return void 0===e},o.isWeakMap=Es,o.isWeakSet=function(e){return ys(e)&&Ut(e)=="[object WeakSet]"},o.join=function(e,t){return null==e?"":zi.call(e,t)},o.kebabCase=ql,o.last=Ga,o.lastIndexOf=function(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var a=n;return void 0!==o&&(a=Ts(o),a=0>a?Hi(n+a,0):Ui(a,n-1)),t===t?X(e,t,a):S(e,E,a,!0)},o.lowerCase=Bl,o.lowerFirst=zl,o.lt=vl,o.lte=yl,o.max=function(e){return e&&e.length?It(e,Ws,Vt):void 0},o.maxBy=function(e,t){return e&&e.length?It(e,ia(t,2),Vt):void 0},o.mean=function(e){return C(e,Ws)},o.meanBy=function(e,t){return C(e,ia(t,2))},o.min=function(e){return e&&e.length?It(e,Ws,Co):void 0},o.minBy=function(e,t){return e&&e.length?It(e,ia(t,2),Co):void 0},o.stubArray=Ys,o.stubFalse=Xs,o.stubObject=function(){return{}},o.stubString=function(){return""},o.stubTrue=function(){return!0},o.multiply=id,o.nth=function(e,t){return e&&e.length?Io(e,Ts(t)):void 0},o.noConflict=function(){return oo._===this&&(oo._=bi),this},o.noop=$s,o.now=el,o.pad=function(e,t,o){e=Is(e),t=Ts(t);var n=t?K(e):0;if(!t||n>=t)return e;var a=(t-n)/2;return Fn(Li(a),o)+e+Fn(Di(a),o)},o.padEnd=function(e,t,o){e=Is(e),t=Ts(t);var n=t?K(e):0;return t&&n<t?e+Fn(t-n,o):e},o.padStart=function(e,t,o){e=Is(e),t=Ts(t);var n=t?K(e):0;return t&&n<t?Fn(t-n,o)+e:e},o.parseInt=function(e,t,o){return o||null==t?t=0:t&&(t=+t),Wi(Is(e).replace(dt,""),t||0)},o.random=function(e,t,o){if(o&&"boolean"!=typeof o&&ya(e,t,o)&&(t=o=void 0),void 0===o&&("boolean"==typeof t?(o=t,t=void 0):"boolean"==typeof e&&(o=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=As(e),void 0===t?(t=e,e=0):t=As(t)),e>t){var n=e;e=t,t=n}if(o||e%1||t%1){var a=Gi();return Ui(e+a*(t-e+Kt("1e-"+((a+"").length-1))),t)}return Bo(e,t)},o.reduce=function(e,t,o){var n=pl(e)?h:j,a=3>arguments.length;return n(e,ia(t,4),o,a,pr)},o.reduceRight=function(e,t,o){var n=pl(e)?f:j,a=3>arguments.length;return n(e,ia(t,4),o,a,ur)},o.repeat=function(e,t,o){return t=(o?ya(e,t,o):void 0===t)?1:Ts(t),Fo(Is(e),t)},o.replace=function(){var e=arguments,t=Is(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},o.result=function(e,t,o){t=cn(t,e);var n=-1,a=t.length;for(a||(a=1,e=void 0);++n<a;){var s=null==e?void 0:e[qa(t[n])];void 0===s&&(n=a,s=o),e=_s(s)?s.call(e):s}return e},o.round=rd,o.runInContext=e,o.sample=function(e){var t=pl(e)?mt:Uo;return t(e)},o.size=os,o.snakeCase=Fl,o.some=function(e,t,o){var n=pl(e)?b:$o;return o&&ya(e,t,o)&&(t=void 0),n(e,ia(t,3))},o.sortedIndex=function(e,t){return Qo(e,t)},o.sortedIndexBy=function(e,t,o){return Yo(e,t,ia(o,2))},o.sortedIndexOf=function(e,t){var o=null==e?0:e.length;if(o){var n=Qo(e,t);if(n<o&&ps(e[n],t))return n}return-1},o.sortedLastIndex=function(e,t){return Qo(e,t,!0)},o.sortedLastIndexBy=function(e,t,o){return Yo(e,t,ia(o,2),!0)},o.sortedLastIndexOf=function(e,t){var o=null==e?0:e.length;if(o){var n=Qo(e,t,!0)-1;if(ps(e[n],t))return n}return-1},o.startCase=Hl,o.startsWith=function(e,t,o){return e=Is(e),o=null==o?0:Et(Ts(o),0,e.length),t=Zo(t),e.slice(o,o+t.length)==t},o.subtract=ld,o.sum=function(e){return e&&e.length?M(e,Ws):0},o.sumBy=function(e,t){return e&&e.length?M(e,ia(t,2)):0},o.template=Fs,o.times=function(e,t){if(e=Ts(e),1>e||e>ke)return[];var o=Ce,a=Ui(e,Ce);t=ia(t),e-=Ce;for(var s=I(a,t);++o<e;)t(o);return s},o.toFinite=As,o.toInteger=Ts,o.toLength=js,o.toLower=function(e){return Is(e).toLowerCase()},o.toNumber=Ns,o.toSafeInteger=function(e){return e?Et(Ts(e),-ke,ke):0===e?e:0},o.toString=Is,o.toUpper=function(e){return Is(e).toUpperCase()},o.trim=function(e,t,o){if(e=Is(e),e&&(o||void 0===t))return e.replace(lt,"");if(!e||!(t=Zo(t)))return e;var n=Z(e),a=Z(t),s=P(n,a),i=q(n,a)+1;return pn(n,s,i).join("")},o.trimEnd=function(e,t,o){if(e=Is(e),e&&(o||void 0===t))return e.replace(/\s+$/,"");if(!e||!(t=Zo(t)))return e;var n=Z(e),a=q(n,Z(t))+1;return pn(n,0,a).join("")},o.trimStart=function(e,t,o){if(e=Is(e),e&&(o||void 0===t))return e.replace(dt,"");if(!e||!(t=Zo(t)))return e;var n=Z(e),a=P(n,Z(t));return pn(n,a).join("")},o.truncate=Hs,o.unescape=function(e){return e=Is(e),e&&nt.test(e)?e.replace(tt,bo):e},o.uniqueId=Ks,o.upperCase=Ul,o.upperFirst=Vl,o.each=Za,o.eachRight=es,o.first=Wa,Js(o,function(){var e={};return Lt(o,function(t,n){mi.call(o.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),o.VERSION="4.17.15",r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){o[e].placeholder=o}),r(["drop","take"],function(e,t){_.prototype[e]=function(o){o=void 0===o?1:Hi(Ts(o),0);var a=this.__filtered__&&!t?new _(this):this.clone();return a.__filtered__?a.__takeCount__=Ui(o,a.__takeCount__):a.__views__.push({size:Ui(o,Ce),type:e+(0>a.__dir__?"Right":"")}),a},_.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),r(["filter","map","takeWhile"],function(e,t){var o=t+1;_.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ia(e,3),type:o}),t.__filtered__=t.__filtered__||o==Se||o==3,t}}),r(["head","last"],function(e,t){var o="take"+(t?"Right":"");_.prototype[e]=function(){return this[o](1).value()[0]}}),r(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");_.prototype[e]=function(){return this.__filtered__?new _(this):this[o](1)}}),_.prototype.compact=function(){return this.filter(Ws)},_.prototype.find=function(e){return this.filter(e).head()},_.prototype.findLast=function(e){return this.reverse().find(e)},_.prototype.invokeMap=Ho(function(e,t){return"function"==typeof e?new _(this):this.map(function(o){return no(o,e,t)})}),_.prototype.reject=function(e){return this.filter(ds(ia(e)))},_.prototype.slice=function(e,t){e=Ts(e);var o=this;return o.__filtered__&&(0<e||0>t)?new _(o):(0>e?o=o.takeRight(-e):e&&(o=o.drop(e)),void 0!==t&&(t=Ts(t),o=0>t?o.dropRight(-t):o.take(t-e)),o)},_.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_.prototype.toArray=function(){return this.take(Ce)},Lt(_.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),s=/^(?:head|last)$/.test(t),i=o[s?"take"+("last"==t?"Right":""):t],r=s||/^find/.test(t);i&&(o.prototype[t]=function(){var t=this.__wrapped__,l=s?[1]:arguments,d=t instanceof _,c=l[0],p=d||pl(t),u=function(e){var t=i.apply(o,g([e],l));return s&&m?t[0]:t};p&&n&&"function"==typeof c&&1!=c.length&&(d=p=!1);var m=this.__chain__,h=!!this.__actions__.length,f=r&&!m,b=d&&!h;if(!r&&p){t=b?t:new _(this);var v=e.apply(t,l);return v.__actions__.push({func:Ka,args:[u],thisArg:void 0}),new a(v,m)}return f&&b?e.apply(this,l):(v=this.thru(u),f?s?v.value()[0]:v.value():v)})}),r(["pop","push","shift","sort","splice","unshift"],function(e){var t=li[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);o.prototype[e]=function(){var e=arguments;if(a&&!this.__chain__){var o=this.value();return t.apply(pl(o)?o:[],e)}return this[n](function(o){return t.apply(pl(o)?o:[],e)})}}),Lt(_.prototype,function(e,t){var n=o[t];if(n){var a=n.name+"";mi.call(tr,a)||(tr[a]=[]),tr[a].push({name:t,func:n})}}),tr[Pn(void 0,me).name]=[{name:"wrapper",func:void 0}],_.prototype.clone=function(){var e=new _(this.__wrapped__);return e.__actions__=Sn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Sn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Sn(this.__views__),e},_.prototype.reverse=function(){if(this.__filtered__){var e=new _(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},_.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,o=pl(e),n=0>t,a=o?e.length:0,s=pa(0,a,this.__views__),i=s.start,r=s.end,l=r-i,d=n?r:i-1,c=this.__iteratees__,p=c.length,u=0,m=Ui(l,this.__takeCount__);if(!o||!n&&a==l&&m==l)return an(e,this.__actions__);var g=[];outer:for(;l--&&u<m;){d+=t;for(var h=-1,_=e[d];++h<p;){var f=c[h],b=f.iteratee,v=f.type,y=b(_);if(v==2)_=y;else if(!y)if(v==Se)continue outer;else break outer}g[u++]=_}return g},o.prototype.at=Wr,o.prototype.chain=function(){return Xa(this)},o.prototype.commit=function(){return new a(this.value(),this.__chain__)},o.prototype.next=function(){void 0===this.__values__&&(this.__values__=Cs(this.value()));var e=this.__index__>=this.__values__.length,t=e?void 0:this.__values__[this.__index__++];return{done:e,value:t}},o.prototype.plant=function(e){for(var t=this,o,a;t instanceof n;){a=Fa(t),a.__index__=0,a.__values__=void 0,o?s.__wrapped__=a:o=a;var s=a;t=t.__wrapped__}return s.__wrapped__=e,o},o.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof _){var t=e;return this.__actions__.length&&(t=new _(this)),t=t.reverse(),t.__actions__.push({func:Ka,args:[$a],thisArg:void 0}),new a(t,this.__chain__)}return this.thru($a)},o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return an(this.__wrapped__,this.__actions__)},o.prototype.first=o.prototype.head,ji&&(o.prototype[ji]=function(){return this}),o}();oo._=vo,a=function(){return vo}.call(t,o,t,n),!(a!==void 0&&(n.exports=a))}).call(this)}).call(this,o(14),o(27)(e))},function(e,t,o){var n=o(448),a=o(108),s=/[&<>"']/g,i=RegExp(s.source);e.exports=function(e){return e=a(e),e&&i.test(e)?e.replace(s,n):e}},function(e,t,o){var n,a;n=[o(0)],a=function(e){return e.noConflict()}.apply(t,n),!(a!==void 0&&(e.exports=a))},function(e,t,o){var n;(function(a){function s(e,t,o,n){var a=t&&t.ownerDocument,s=t?t.nodeType:9,r,l,d,c,p,u,g;if(o=o||[],"string"!=typeof e||!e||1!==s&&9!==s&&11!==s)return o;if(!n&&((t?t.ownerDocument||t:A)!==ue&&pe(t),t=t||ue,ge)){if(11!==s&&(p=G.exec(e)))if(!(r=p[1])){if(p[2])return B.apply(o,t.getElementsByTagName(e)),o;if((r=p[3])&&te.getElementsByClassName&&t.getElementsByClassName)return B.apply(o,t.getElementsByClassName(r)),o}else if(9===s){if(!(d=t.getElementById(r)))return o;if(d.id===r)return o.push(d),o}else if(a&&(d=a.getElementById(r))&&be(t,d)&&d.id===r)return o.push(d),o;if(te.qsa&&!O[e+" "]&&(!he||!he.test(e))&&(1!==s||"object"!==t.nodeName.toLowerCase())){if(g=e,a=t,1===s&&U.test(e)){for((c=t.getAttribute("id"))?c=c.replace(Y,X):t.setAttribute("id",c=C),u=se(e),l=u.length;l--;)u[l]="#"+c+" "+b(u[l]);g=u.join(","),a=J.test(e)&&_(t.parentNode)||t}try{return B.apply(o,a.querySelectorAll(g)),o}catch(t){O(e,!0)}finally{c===C&&t.removeAttribute("id")}}}return re(e.replace(H,"$1"),t,o,n)}function r(){function e(o,n){return t.push(o+" ")>oe.cacheLength&&delete e[t.shift()],e[o+" "]=n}var t=[];return e}function l(e){return e[C]=!0,e}function d(e){var t=ue.createElement("fieldset");try{return!!e(t)}catch(t){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function c(e,t){for(var o=e.split("|"),n=o.length;n--;)oe.attrHandle[o[n]]=t}function p(e,t){var o=t&&e,n=o&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(o)for(;o=o.nextSibling;)if(o===t)return-1;return e?1:-1}function u(e){return function(t){var o=t.nodeName.toLowerCase();return"input"===o&&t.type===e}}function m(e){return function(t){var o=t.nodeName.toLowerCase();return("input"===o||"button"===o)&&t.type===e}}function g(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Z(t)===e:t.disabled===e:!!("label"in t)&&t.disabled===e}}function h(e){return l(function(t){return t=+t,l(function(o,n){for(var a=e([],o.length,t),s=a.length,r;s--;)o[r=a[s]]&&(o[r]=!(n[r]=o[r]))})})}function _(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function b(e){for(var t=0,o=e.length,n="";t<o;t++)n+=e[t].value;return n}function v(e,t,o){var n=t.dir,a=t.next,s=a||n,i=o&&"parentNode"===s,r=j++;return t.first?function(t,o,a){for(;t=t[n];)if(1===t.nodeType||i)return e(t,o,a);return!1}:function(t,o,l){var d=[T,r],c,p,u;if(l){for(;t=t[n];)if((1===t.nodeType||i)&&e(t,o,l))return!0;}else for(;t=t[n];)if(1===t.nodeType||i)if(u=t[C]||(t[C]={}),p=u[t.uniqueID]||(u[t.uniqueID]={}),a&&a===t.nodeName.toLowerCase())t=t[n]||t;else{if((c=p[s])&&c[0]===T&&c[1]===r)return d[2]=c[2];if(p[s]=d,d[2]=e(t,o,l))return!0}return!1}}function y(e){return 1<e.length?function(t,o,n){for(var a=e.length;a--;)if(!e[a](t,o,n))return!1;return!0}:e[0]}function x(e,t,o){for(var n=0,a=t.length;n<a;n++)s(e,t[n],o);return o}function S(e,t,o,n,a){for(var s=[],r=0,l=e.length,d;r<l;r++)(d=e[r])&&(!o||o(d,n,a))&&(s.push(d),null!=t&&t.push(r));return s}function w(e,t,o,n,a,s){return n&&!n[C]&&(n=w(n)),a&&!a[C]&&(a=w(a,s)),l(function(s,r,l,d){var c=[],p=[],u=r.length,m=s||x(t||"*",l.nodeType?[l]:l,[]),g=e&&(s||!t)?S(m,c,e,l,d):m,h=o?a||(s?e:u||n)?[]:r:g,_,f,b;if(o&&o(g,h,l,d),n)for(_=S(h,p),n(_,[],l,d),f=_.length;f--;)(b=_[f])&&(h[p[f]]=!(g[p[f]]=b));if(!s)h=S(h===r?h.splice(u,h.length):h),a?a(null,r,h,d):B.apply(r,h);else if(a||e){if(a){for(_=[],f=h.length;f--;)(b=h[f])&&_.push(g[f]=b);a(null,h=[],_,d)}for(f=h.length;f--;)(b=h[f])&&-1<(_=a?F(s,b):c[f])&&(s[_]=!(r[_]=b))}})}function k(e){for(var t=e.length,o=oe.relative[e[0].type],n=o||oe.relative[" "],a=o?1:0,s=v(function(e){return e===d},n,!0),r=v(function(e){return-1<F(d,e)},n,!0),l=[function(e,t,n){var a=!o&&(n||t!==le)||((d=t).nodeType?s(e,t,n):r(e,t,n));return d=null,a}],d,c,p;a<t;a++)if(c=oe.relative[e[a].type])l=[v(y(l),c)];else{if(c=oe.filter[e[a].type].apply(null,e[a].matches),c[C]){for(p=++a;p<t&&!oe.relative[e[p].type];p++);return w(1<a&&y(l),1<a&&b(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(H,"$1"),c,a<p&&k(e.slice(a,p)),p<t&&k(e=e.slice(p)),p<t&&b(e))}l.push(c)}return y(l)}function E(e,t){var o=0<t.length,n=0<e.length,a=function(a,r,l,d,c){var p=0,u="0",m=a&&[],g=[],h=le,_=a||n&&oe.find.TAG("*",c),f=T+=null==h?1:Math.random()||.1,b=_.length,v,y,x;for(c&&(le=r===ue||r||c);u!==b&&null!=(v=_[u]);u++){if(n&&v){for(y=0,r||v.ownerDocument===ue||(pe(v),l=!ge);x=e[y++];)if(x(v,r||ue,l)){d.push(v);break}c&&(T=f)}o&&((v=!x&&v)&&p--,a&&m.push(v))}if(p+=u,o&&u!==p){for(y=0;x=t[y++];)x(m,g,r,l);if(a){if(0<p)for(;u--;)m[u]||g[u]||(g[u]=P.call(d));g=S(g)}B.apply(d,g),c&&!a&&0<g.length&&1<p+t.length&&s.uniqueSort(d)}return c&&(T=f,le=h),m};return o?l(a):a}var C="sizzle"+1*new Date,A=a.document,T=0,j=0,N=r(),M=r(),I=r(),O=r(),R=function(e,t){return e===t&&(ce=!0),0},D={}.hasOwnProperty,L=[],P=L.pop,q=L.push,B=L.push,z=L.slice,F=function(e,t){for(var o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},H=/^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$/g,U=/[\x20\t\r\n\f]|>/,V={ID:/^#((?:\\.|[\w-]|[^\0-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\0-\xa0])+)/,TAG:/^((?:\\.|[\w-]|[^\0-\xa0])+|[*])/,ATTR:/^\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\0-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\0-\xa0])+))|)[\x20\t\r\n\f]*\]/,PSEUDO:/^:((?:\\.|[\w-]|[^\0-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\0-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\0-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/,CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},W=/^[^{]+\{\s*\[native \w/,G=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,$=/\\([\da-f]{1,6}[\x20\t\r\n\f]?|([\x20\t\r\n\f])|.)/ig,Q=function(e,t,o){var n="0x"+t-65536;return n!=n||o?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)},Y=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,X=function(e,t){return t?"\0"===e?"\uFFFD":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},K=function(){pe()},Z=v(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"}),ee,te,oe,ne,ae,se,ie,re,le,de,ce,pe,ue,me,ge,he,_e,fe,be;try{B.apply(L=z.call(A.childNodes),A.childNodes),L[A.childNodes.length].nodeType}catch(t){B={apply:L.length?function(e,t){q.apply(e,z.call(t))}:function(e,t){for(var o=e.length,n=0;e[o++]=t[n++];);e.length=o-1}}}for(ee in te=s.support={},ae=s.isXML=function(e){var t=e.namespaceURI,o=(e.ownerDocument||e).documentElement;return!/HTML$/i.test(t||o&&o.nodeName||"HTML")},pe=s.setDocument=function(e){var t=e?e.ownerDocument||e:A,o,n;return t!==ue&&9===t.nodeType&&t.documentElement?(ue=t,me=ue.documentElement,ge=!ae(ue),A!==ue&&(n=ue.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",K,!1):n.attachEvent&&n.attachEvent("onunload",K)),te.attributes=d(function(e){return e.className="i",!e.getAttribute("className")}),te.getElementsByTagName=d(function(e){return e.appendChild(ue.createComment("")),!e.getElementsByTagName("*").length}),te.getElementsByClassName=W.test(ue.getElementsByClassName),te.getById=d(function(e){return me.appendChild(e).id=C,!ue.getElementsByName||!ue.getElementsByName(C).length}),te.getById?(oe.filter.ID=function(e){var t=e.replace($,Q);return function(e){return e.getAttribute("id")===t}},oe.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&ge){var o=t.getElementById(e);return o?[o]:[]}}):(oe.filter.ID=function(e){var t=e.replace($,Q);return function(e){var o="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return o&&o.value===t}},oe.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&ge){var o=t.getElementById(e),n,a,s;if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(s=t.getElementsByName(e),a=0;o=s[a++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),oe.find.TAG=te.getElementsByTagName?function(e,t){return"undefined"==typeof t.getElementsByTagName?te.qsa?t.querySelectorAll(e):void 0:t.getElementsByTagName(e)}:function(e,t){var o=[],n=0,a=t.getElementsByTagName(e),s;if("*"===e){for(;s=a[n++];)1===s.nodeType&&o.push(s);return o}return a},oe.find.CLASS=te.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&ge)return t.getElementsByClassName(e)},_e=[],he=[],(te.qsa=W.test(ue.querySelectorAll))&&(d(function(e){me.appendChild(e).innerHTML="<a id='"+C+"'></a><select id='"+C+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&he.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||he.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)"),e.querySelectorAll("[id~="+C+"-]").length||he.push("~="),e.querySelectorAll(":checked").length||he.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||he.push(".#.+[+~]")}),d(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=ue.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&he.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&he.push(":enabled",":disabled"),me.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&he.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),he.push(",.*:")})),(te.matchesSelector=W.test(fe=me.matches||me.webkitMatchesSelector||me.mozMatchesSelector||me.oMatchesSelector||me.msMatchesSelector))&&d(function(e){te.disconnectedMatch=fe.call(e,"*"),fe.call(e,"[s!='']:x"),_e.push("!=",":((?:\\\\.|[\\w-]|[^\0-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\0-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\0-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)")}),he=he.length&&new RegExp(he.join("|")),_e=_e.length&&new RegExp(_e.join("|")),o=W.test(me.compareDocumentPosition),be=o||W.test(me.contains)?function(e,t){var o=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!!(n&&1===n.nodeType&&(o.contains?o.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},R=o?function(e,t){if(e===t)return ce=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o?o:(o=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&o||!te.sortDetached&&t.compareDocumentPosition(e)===o?e===ue||e.ownerDocument===A&&be(A,e)?-1:t===ue||t.ownerDocument===A&&be(A,t)?1:de?F(de,e)-F(de,t):0:4&o?-1:1)}:function(e,t){if(e===t)return ce=!0,0;var o=0,n=e.parentNode,a=t.parentNode,s=[e],r=[t],l;if(!n||!a)return e===ue?-1:t===ue?1:n?-1:a?1:de?F(de,e)-F(de,t):0;if(n===a)return p(e,t);for(l=e;l=l.parentNode;)s.unshift(l);for(l=t;l=l.parentNode;)r.unshift(l);for(;s[o]===r[o];)o++;return o?p(s[o],r[o]):s[o]===A?-1:r[o]===A?1:0},ue):ue},s.matches=function(e,t){return s(e,null,null,t)},s.matchesSelector=function(e,t){if((e.ownerDocument||e)!==ue&&pe(e),te.matchesSelector&&ge&&!O[t+" "]&&(!_e||!_e.test(t))&&(!he||!he.test(t)))try{var o=fe.call(e,t);if(o||te.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(o){O(t,!0)}return 0<s(t,ue,null,[e]).length},s.contains=function(e,t){return(e.ownerDocument||e)!==ue&&pe(e),be(e,t)},s.attr=function(e,t){(e.ownerDocument||e)!==ue&&pe(e);var o=oe.attrHandle[t.toLowerCase()],n=o&&D.call(oe.attrHandle,t.toLowerCase())?o(e,t,!ge):void 0;return void 0===n?te.attributes||!ge?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null:n},s.escape=function(e){return(e+"").replace(Y,X)},s.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},s.uniqueSort=function(e){var t=[],o=0,n=0,a;if(ce=!te.detectDuplicates,de=!te.sortStable&&e.slice(0),e.sort(R),ce){for(;a=e[n++];)a===e[n]&&(o=t.push(n));for(;o--;)e.splice(t[o],1)}return de=null,e},ne=s.getText=function(e){var t="",o=0,n=e.nodeType,a;if(!n)for(;a=e[o++];)t+=ne(a);else if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)t+=ne(e)}else if(3===n||4===n)return e.nodeValue;return t},oe=s.selectors={cacheLength:50,createPseudo:l,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,Q),e[3]=(e[3]||e[4]||e[5]||"").replace($,Q),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(!e[3]&&s.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&s.error(e[0]),e},PSEUDO:function(e){var t=!e[6]&&e[2],o;return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":t&&/:((?:\\.|[\w-]|[^\0-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\0-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\0-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/.test(t)&&(o=se(t,!0))&&(o=t.indexOf(")",t.length-o)-t.length)&&(e[0]=e[0].slice(0,o),e[2]=t.slice(0,o)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace($,Q).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"([\\x20\\t\\r\\n\\f]|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,o){return function(n){var a=s.attr(n,e);return null==a?"!="===t:!t||(a+="","="===t?a===o:"!="===t?a!==o:"^="===t?o&&0===a.indexOf(o):"*="===t?o&&-1<a.indexOf(o):"$="===t?o&&a.slice(-o.length)===o:"~="===t?-1<(" "+a.replace(/[\x20\t\r\n\f]+/g," ")+" ").indexOf(o):"|="==t&&(a===o||a.slice(0,o.length+1)===o+"-"))}},CHILD:function(e,t,o,n,a){var s="nth"!==e.slice(0,3),i="last"!==e.slice(-4),r="of-type"===t;return 1===n&&0===a?function(e){return!!e.parentNode}:function(t,o,l){var d=s===i?"previousSibling":"nextSibling",c=t.parentNode,p=r&&t.nodeName.toLowerCase(),u=!l&&!r,m=!1,g,h,_,f,b,v;if(c){if(s){for(;d;){for(f=t;f=f[d];)if(r?f.nodeName.toLowerCase()===p:1===f.nodeType)return!1;v=d="only"===e&&!v&&"nextSibling"}return!0}if(v=[i?c.firstChild:c.lastChild],i&&u){for(f=c,_=f[C]||(f[C]={}),h=_[f.uniqueID]||(_[f.uniqueID]={}),g=h[e]||[],b=g[0]===T&&g[1],m=b&&g[2],f=b&&c.childNodes[b];f=++b&&f&&f[d]||(m=b=0)||v.pop();)if(1===f.nodeType&&++m&&f===t){h[e]=[T,b,m];break}}else if(u&&(f=t,_=f[C]||(f[C]={}),h=_[f.uniqueID]||(_[f.uniqueID]={}),g=h[e]||[],b=g[0]===T&&g[1],m=b),!1===m)for(;(f=++b&&f&&f[d]||(m=b=0)||v.pop())&&!((r?f.nodeName.toLowerCase()===p:1===f.nodeType)&&++m&&(u&&(_=f[C]||(f[C]={}),h=_[f.uniqueID]||(_[f.uniqueID]={}),h[e]=[T,m]),f===t)););return m-=a,m===n||0==m%n&&0<=m/n}}},PSEUDO:function(e,t){var o=oe.pseudos[e]||oe.setFilters[e.toLowerCase()]||s.error("unsupported pseudo: "+e),n;return o[C]?o(t):1<o.length?(n=[e,e,"",t],oe.setFilters.hasOwnProperty(e.toLowerCase())?l(function(e,n){for(var a=o(e,t),s=a.length,r;s--;)r=F(e,a[s]),e[r]=!(n[r]=a[s])}):function(e){return o(e,0,n)}):o}},pseudos:{not:l(function(e){var t=[],o=[],n=ie(e.replace(H,"$1"));return n[C]?l(function(e,t,o,a){for(var s=n(e,null,a,[]),r=e.length,l;r--;)(l=s[r])&&(e[r]=!(t[r]=l))}):function(e,a,s){return t[0]=e,n(t,null,s,o),t[0]=null,!o.pop()}}),has:l(function(e){return function(t){return 0<s(e,t).length}}),contains:l(function(e){return e=e.replace($,Q),function(t){return-1<(t.textContent||ne(t)).indexOf(e)}}),lang:l(function(e){return /^(?:\\.|[\w-]|[^\0-\xa0])+$/.test(e||"")||s.error("unsupported lang: "+e),e=e.replace($,Q).toLowerCase(),function(t){var o;do if(o=ge?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return o=o.toLowerCase(),o===e||0===o.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=a.location&&a.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===me},focus:function(e){return e===ue.activeElement&&(!ue.hasFocus||ue.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:g(!1),disabled:g(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(6>e.nodeType)return!1;return!0},parent:function(e){return!oe.pseudos.empty(e)},header:function(e){return /^h\d$/i.test(e.nodeName)},input:function(e){return /^(?:input|select|textarea|button)$/i.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:h(function(){return[0]}),last:h(function(e,t){return[t-1]}),eq:h(function(e,t,o){return[0>o?o+t:o]}),even:h(function(e,t){for(var o=0;o<t;o+=2)e.push(o);return e}),odd:h(function(e,t){for(var o=1;o<t;o+=2)e.push(o);return e}),lt:h(function(e,t,o){for(var n=0>o?o+t:o>t?t:o;0<=--n;)e.push(n);return e}),gt:h(function(e,t,o){for(var n=0>o?o+t:o;++n<t;)e.push(n);return e})}},oe.pseudos.nth=oe.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})oe.pseudos[ee]=u(ee);for(ee in{submit:!0,reset:!0})oe.pseudos[ee]=m(ee);f.prototype=oe.filters=oe.pseudos,oe.setFilters=new f,se=s.tokenize=function(e,t){var o=M[e+" "],n,a,i,r,l,d,c;if(o)return t?0:o.slice(0);for(l=e,d=[],c=oe.preFilter;l;){for(r in(!n||(a=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/.exec(l)))&&(a&&(l=l.slice(a[0].length)||l),d.push(i=[])),n=!1,(a=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/.exec(l))&&(n=a.shift(),i.push({value:n,type:a[0].replace(H," ")}),l=l.slice(n.length)),oe.filter)(a=V[r].exec(l))&&(!c[r]||(a=c[r](a)))&&(n=a.shift(),i.push({value:n,type:r,matches:a}),l=l.slice(n.length));if(!n)break}return t?l.length:l?s.error(e):M(e,d).slice(0)},ie=s.compile=function(e,t){var o=[],n=[],a=I[e+" "],s;if(!a){for(t||(t=se(e)),s=t.length;s--;)a=k(t[s]),a[C]?o.push(a):n.push(a);a=I(e,E(n,o)),a.selector=e}return a},re=s.select=function(e,t,o,n){var a="function"==typeof e&&e,s=!n&&se(e=a.selector||e),r,l,d,c,p;if(o=o||[],1===s.length){if(l=s[0]=s[0].slice(0),2<l.length&&"ID"===(d=l[0]).type&&9===t.nodeType&&ge&&oe.relative[l[1].type]){if(t=(oe.find.ID(d.matches[0].replace($,Q),t)||[])[0],!t)return o;a&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(r=V.needsContext.test(e)?0:l.length;r--&&(d=l[r],!oe.relative[c=d.type]);)if((p=oe.find[c])&&(n=p(d.matches[0].replace($,Q),J.test(l[0].type)&&_(t.parentNode)||t))){if(l.splice(r,1),e=n.length&&b(l),!e)return B.apply(o,n),o;break}}return(a||ie(e,s))(n,t,!ge,o,!t||J.test(e)&&_(t.parentNode)||t),o},te.sortStable=C.split("").sort(R).join("")===C,te.detectDuplicates=!!ce,pe(),te.sortDetached=d(function(e){return 1&e.compareDocumentPosition(ue.createElement("fieldset"))}),d(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||c("type|href|height|width",function(e,t,o){if(!o)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),te.attributes&&d(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||c("value",function(e,t,o){if(!o&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),d(function(e){return null==e.getAttribute("disabled")})||c("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(e,t,o){var n;if(!o)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null});var ve=a.Sizzle;s.noConflict=function(){return a.Sizzle===s&&(a.Sizzle=ve),s},n=function(){return s}.call(t,o,t,e),!(void 0!==n&&(e.exports=n))})(window)},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/info.html -->\n<div class=\"message chat-info "+o(e.extra_classes)+"\" data-isodate=\""+o(e.isodate)+"\" ",e.data_name&&(t+=" data-"+o(e.data_name)+"=\""+o(e.data_value)+"\""),t+=">\n",t+=e.render_message?"\n    "+(null==(s=e.message)?"":s)+"\n":"\n    "+o(e.message)+"\n",t+="\n",e.retry&&(t+="\n    <a class=\"retry\">Retry</a>\n"),(t+="\n</div>\n",t)}},function(e,t,o){var n=o(67),a="object"==typeof self&&self&&self.Object===Object&&self,s=n||a||Function("return this")();e.exports=s},function(e){var t=Array.isArray;e.exports=t},function(e){!function(o,t){e.exports=t()}(this,function(){"use strict";var o=function(o,t,n){var e=o+"";return!e||e.length>=t?o:""+Array(t+1-e.length).join(n)+o},a="en",s={};s[a]={name:"en",weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]};var i=function(e){return e instanceof d},r=function(o,t,n){var e;if(!o)return a;if("string"==typeof o)s[o]&&(e=o),t&&(s[o]=t,e=o);else{var l=o.name;s[l]=o,e=l}return n||(a=e),e},p=function(o,t,n){if(i(o))return o.clone();var e=t?"string"==typeof t?{format:t,pl:n}:t:{};return e.date=o,new d(e)},_={s:o,z:function(a){var t=-a.utcOffset(),n=Math.abs(t),e=Math.floor(n/60);return(0>=t?"+":"-")+o(e,2,"0")+":"+o(n%60,2,"0")},m:function(o,t){var n=12*(t.year()-o.year())+(t.month()-o.month()),e=o.clone().add(n,"month"),a=0>t-e,i=o.clone().add(n+(a?-1:1),"month");return+(-(n+(t-e)/(a?e-i:i-e))||0)},a:function(e){return 0>e?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:"month",y:"year",w:"week",d:"day",h:"hour",m:"minute",s:"second",ms:"millisecond",Q:"quarter"}[e]||((e||"")+"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};_.l=r,_.i=i,_.w=function(e,t){return p(e,{locale:t.$L,utc:t.$u})};var d=function(){function e(e){this.$L=this.$L||r(e.locale,null,!0),this.parse(e)}var t=e.prototype;return t.parse=function(e){this.$d=function(o){var t=o.date,n=o.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var e=t.match(/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/);if(e)return n?new Date(Date.UTC(e[1],e[2]-1,e[3]||1,e[4]||0,e[5]||0,e[6]||0,e[7]||0)):new Date(e[1],e[2]-1,e[3]||1,e[4]||0,e[5]||0,e[6]||0,e[7]||0)}return new Date(t)}(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return _},t.isValid=function(){return"Invalid Date"!==this.$d.toString()},t.isSame=function(o,t){var n=p(o);return this.startOf(t)<=n&&n<=this.endOf(t)},t.isAfter=function(e,t){return p(e)<this.startOf(t)},t.isBefore=function(e,t){return this.endOf(t)<p(e)},t.$g=function(o,t,n){return _.u(o)?this[t]:this.set(n,o)},t.year=function(e){return this.$g(e,"$y","year")},t.month=function(e){return this.$g(e,"$M","month")},t.day=function(e){return this.$g(e,"$W","day")},t.date=function(e){return this.$g(e,"$D","date")},t.hour=function(e){return this.$g(e,"$H","hour")},t.minute=function(e){return this.$g(e,"$m","minute")},t.second=function(e){return this.$g(e,"$s","second")},t.millisecond=function(e){return this.$g(e,"$ms","millisecond")},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(e,t){var o=this,a=!!_.u(t)||t,n=_.p(e),s=function(s,t){var n=_.w(o.$u?Date.UTC(o.$y,t,s):new Date(o.$y,t,s),o);return a?n:n.endOf("day")},i=function(e,t){return _.w(o.toDate()[e].apply(o.toDate(),(a?[0,0,0,0]:[23,59,59,999]).slice(t)),o)},r=this.$W,l=this.$M,d=this.$D,c="set"+(this.$u?"UTC":"");switch(n){case"year":return a?s(1,0):s(31,11);case"month":return a?s(1,l):s(0,l+1);case"week":var p=this.$locale().weekStart||0,u=(r<p?r+7:r)-p;return s(a?d-u:d+(6-u),l);case"day":case"date":return i(c+"Hours",0);case"hour":return i(c+"Minutes",1);case"minute":return i(c+"Seconds",2);case"second":return i(c+"Milliseconds",3);default:return this.clone();}},t.endOf=function(e){return this.startOf(e,!1)},t.$set=function(e,t){var o=_.p(e),n="set"+(this.$u?"UTC":""),a=(i={},i.day=n+"Date",i.date=n+"Date",i.month=n+"Month",i.year=n+"FullYear",i.hour=n+"Hours",i.minute=n+"Minutes",i.second=n+"Seconds",i.millisecond=n+"Milliseconds",i)[o],s=o==="day"?this.$D+(t-this.$W):t,i;if(o==="month"||o==="year"){var r=this.clone().set("date",1);r.$d[a](s),r.init(),this.$d=r.set("date",Math.min(this.$D,r.daysInMonth())).toDate()}else a&&this.$d[a](s);return this.init(),this},t.set=function(e,t){return this.clone().$set(e,t)},t.get=function(e){return this[_.p(e)]()},t.add=function(a,e){var o=this,n;a=+a;var s=_.p(e),i=function(t){var n=p(o);return _.w(n.date(n.date()+Math.round(t*a)),o)};if(s==="month")return this.set("month",this.$M+a);if("year"===s)return this.set("year",this.$y+a);if("day"===s)return i(1);if("week"===s)return i(7);var r=(n={},n.minute=6e4,n.hour=36e5,n.second=1e3,n)[s]||1,d=this.valueOf()+a*r;return _.w(d,this)},t.subtract=function(e,t){return this.add(-1*e,t)},t.format=function(p){var m=this;if(!this.isValid())return"Invalid Date";var n=p||"YYYY-MM-DDTHH:mm:ssZ",e=_.z(this),t=this.$locale(),i=this.$H,s=this.$m,r=this.$M,o=t.weekdays,a=t.months,u=function(e,t,o,a){return e&&(e[t]||e(m,n))||o[t].substr(0,a)},c=function(e){return _.s(i%12||12,e,"0")},d=t.meridiem||function(o,t,n){var e=12>o?"AM":"PM";return n?e.toLowerCase():e},g={YY:(this.$y+"").slice(-2),YYYY:this.$y,M:r+1,MM:_.s(r+1,2,"0"),MMM:u(t.monthsShort,r,a,3),MMMM:a[r]||a(this,n),D:this.$D,DD:_.s(this.$D,2,"0"),d:this.$W+"",dd:u(t.weekdaysMin,this.$W,o,2),ddd:u(t.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:i+"",HH:_.s(i,2,"0"),h:c(1),hh:c(2),a:d(i,s,!0),A:d(i,s,!1),m:s+"",mm:_.s(s,2,"0"),s:this.$s+"",ss:_.s(this.$s,2,"0"),SSS:_.s(this.$ms,3,"0"),Z:e};return n.replace(/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,function(o,t){return t||g[o]||e.replace(":","")})},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(e,t,o){var n=_.p(t),a=p(e),s=6e4*(a.utcOffset()-this.utcOffset()),i=this-a,r=_.m(this,a),l;return r=(l={},l.year=r/12,l.month=r,l.quarter=r/3,l.week=(i-s)/6048e5,l.day=(i-s)/864e5,l.hour=i/36e5,l.minute=i/6e4,l.second=i/1e3,l)[n]||i,o?r:_.a(r)},t.daysInMonth=function(){return this.endOf("month").$D},t.$locale=function(){return s[this.$L]},t.locale=function(o,t){if(!o)return this.$L;var n=this.clone();return n.$L=r(o,t,!0),n},t.clone=function(){return _.w(this.toDate(),this)},t.toDate=function(){return new Date(this.$d)},t.toJSON=function(){return this.toISOString()},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},e}();return p.prototype=d.prototype,p.extend=function(e,t){return e(t,d,p),p},p.locale=r,p.isDayjs=i,p.unix=function(e){return p(1e3*e)},p.en=s[a],p.Ls=s,p})},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/spinner.html -->\n<span class=\"spinner fa fa-spinner centered\"/>\n",e}},function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,o){(function(n){var a,s;(function(i){var r="object"==typeof self&&self.self===self&&self||"object"==typeof n&&n.global===n&&n;a=[o(46),o(330),t],s=function(e,t,o){r.Backbone=i(r,o,e,t)}.apply(t,a),!(void 0!==s&&(e.exports=s))})(function(e,t,o,n){var a=e.Backbone,s=Array.prototype.slice;t.VERSION="1.4.0",t.$=n,t.noConflict=function(){return e.Backbone=a,this},t.emulateHTTP=!1,t.emulateJSON=!1;var i=t.Events={},r=/\s+/,l=function(e,t,n,a,s){var d=0,c;if(n&&"object"==typeof n)for(void 0!==a&&("context"in s)&&void 0===s.context&&(s.context=a),c=o.keys(n);d<c.length;d++)t=l(e,t,c[d],n[c[d]],s);else if(n&&r.test(n))for(c=n.split(r);d<c.length;d++)t=e(t,c[d],a,s);else t=e(t,n,a,s);return t},d;i.on=function(e,t,o){if(this._events=l(c,this._events||{},e,t,{context:o,ctx:this,listening:d}),d){var n=this._listeners||(this._listeners={});n[d.id]=d,d.interop=!1}return this},i.listenTo=function(e,t,n){if(!e)return this;var a=e._listenId||(e._listenId=o.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),i=d=s[a];i||(this._listenId||(this._listenId=o.uniqueId("l")),i=d=s[a]=new _(this,e));var r=p(e,t,n,this);if(d=void 0,r)throw r;return i.interop&&i.on(t,n),this};var c=function(e,t,o,n){if(o){var a=e[t]||(e[t]=[]),s=n.context,i=n.ctx,r=n.listening;r&&r.count++,a.push({callback:o,context:s,ctx:s||i,listening:r})}return e},p=function(e,t,o,n){try{e.on(t,o,n)}catch(t){return t}};i.off=function(e,t,o){return this._events?(this._events=l(u,this._events,e,t,{context:o,listeners:this._listeners}),this):this},i.stopListening=function(e,t,n){var a=this._listeningTo;if(!a)return this;for(var s=e?[e._listenId]:o.keys(a),r=0,l;r<s.length&&(l=a[s[r]],!!l);r++)l.obj.off(t,n,this),l.interop&&l.off(t,n);return o.isEmpty(a)&&(this._listeningTo=void 0),this};var u=function(e,t,n,a){if(e){var s=a.context,r=a.listeners,l=0,d;if(!t&&!s&&!n){for(d=o.keys(r);l<d.length;l++)r[d[l]].cleanup();return}for(d=t?[t]:o.keys(e);l<d.length;l++){t=d[l];var c=e[t];if(!c)break;for(var p=[],u=0,m;u<c.length;u++)if(m=c[u],n&&n!==m.callback&&n!==m.callback._callback||s&&s!==m.context)p.push(m);else{var g=m.listening;g&&g.off(t,n)}p.length?e[t]=p:delete e[t]}return e}};i.once=function(e,t,o){var n=l(m,{},e,t,this.off.bind(this));return"string"==typeof e&&null==o&&(t=void 0),this.on(n,t,o)},i.listenToOnce=function(e,t,o){var n=l(m,{},t,o,this.stopListening.bind(this,e));return this.listenTo(e,n)};var m=function(e,t,n,a){if(n){var s=e[t]=o.once(function(){a(t,s),n.apply(this,arguments)});s._callback=n}return e};i.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),o=Array(t),n=0;n<t;n++)o[n]=arguments[n+1];return l(g,this._events,e,void 0,o),this};var g=function(e,t,o,n){if(e){var a=e[t],s=e.all;a&&s&&(s=s.slice()),a&&h(a,n),s&&h(s,[t].concat(n))}return e},h=function(e,t){var o=-1,n=e.length,a=t[0],s=t[1],r=t[2],l;switch(t.length){case 0:for(;++o<n;)(l=e[o]).callback.call(l.ctx);return;case 1:for(;++o<n;)(l=e[o]).callback.call(l.ctx,a);return;case 2:for(;++o<n;)(l=e[o]).callback.call(l.ctx,a,s);return;case 3:for(;++o<n;)(l=e[o]).callback.call(l.ctx,a,s,r);return;default:for(;++o<n;)(l=e[o]).callback.apply(l.ctx,t);}},_=function(e,t){this.id=e._listenId,this.listener=e,this.obj=t,this.interop=!0,this.count=0,this._events=void 0};_.prototype.on=i.on,_.prototype.off=function(e,t){var o;this.interop?(this._events=l(u,this._events,e,t,{context:void 0,listeners:void 0}),o=!this._events):(this.count--,o=0===this.count),o&&this.cleanup()},_.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},i.bind=i.on,i.unbind=i.off,o.extend(t,i);var f=t.Model=function(e,t){var n=e||{};t||(t={}),this.preinitialize.apply(this,arguments),this.cid=o.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(n=this.parse(n,t)||{});var a=o.result(this,"defaults");n=o.defaults(o.extend({},a,n),a),this.set(n,t),this.changed={},this.initialize.apply(this,arguments)};o.extend(f.prototype,i,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(){return o.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return o.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!o.iteratee(e,this)(this.attributes)},set:function(e,t,n){if(null==e)return this;var a;if("object"==typeof e?(a=e,n=t):(a={})[e]=t,n||(n={}),!this._validate(a,n))return!1;var s=n.unset,r=n.silent,l=[],d=this._changing;this._changing=!0,d||(this._previousAttributes=o.clone(this.attributes),this.changed={});var c=this.attributes,p=this.changed,u=this._previousAttributes;for(var m in a)t=a[m],o.isEqual(c[m],t)||l.push(m),o.isEqual(u[m],t)?delete p[m]:p[m]=t,s?delete c[m]:c[m]=t;if(this.idAttribute in a&&(this.id=this.get(this.idAttribute)),!r){l.length&&(this._pending=n);for(var g=0;g<l.length;g++)this.trigger("change:"+l[g],this,c[l[g]],n)}if(d)return this;if(!r)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,o.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,o.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!o.isEmpty(this.changed):o.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&o.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,n={},a;for(var s in e){var i=e[s];o.isEqual(t[s],i)||(n[s]=i,a=!0)}return!!a&&n},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return o.clone(this._previousAttributes)},fetch:function(e){e=o.extend({parse:!0},e);var t=this,n=e.success;return e.success=function(o){var a=e.parse?t.parse(o,e):o;return!!t.set(a,e)&&void(n&&n.call(e.context,t,o,e),t.trigger("sync",t,o,e))},P(this,e),this.sync("read",this,e)},save:function(e,t,n){var a;null==e||"object"==typeof e?(a=e,n=t):(a={})[e]=t,n=o.extend({validate:!0,parse:!0},n);var s=n.wait;if(a&&!s){if(!this.set(a,n))return!1;}else if(!this._validate(a,n))return!1;var i=this,r=n.success,l=this.attributes;n.success=function(e){i.attributes=l;var t=n.parse?i.parse(e,n):e;return s&&(t=o.extend({},a,t)),(!t||i.set(t,n))&&void(r&&r.call(n.context,i,e,n),i.trigger("sync",i,e,n))},P(this,n),a&&s&&(this.attributes=o.extend({},l,a));var d=this.isNew()?"create":n.patch?"patch":"update";"patch"!=d||n.attrs||(n.attrs=a);var c=this.sync(d,this,n);return this.attributes=l,c},destroy:function(e){e=e?o.clone(e):{};var t=this,n=e.success,a=e.wait,s=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(o){a&&s(),n&&n.call(e.context,t,o,e),t.isNew()||t.trigger("sync",t,o,e)};var i=!1;return this.isNew()?o.defer(e.success):(P(this,e),i=this.sync("delete",this,e)),a||s(),i},url:function(){var e=o.result(this,"urlRoot")||o.result(this.collection,"url")||L();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},o.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=o.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;return!n||(this.trigger("invalid",this,n,o.extend(t,{validationError:n})),!1)}});var b=t.Collection=function(e,t){t||(t={}),this.preinitialize.apply(this,arguments),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,o.extend({silent:!0},t))},v={add:!0,remove:!0,merge:!0},y={add:!0,remove:!1},x=function(e,t,o){o=Math.min(Math.max(o,0),e.length);var n=Array(e.length-o),a=t.length,s;for(s=0;s<n.length;s++)n[s]=e[s+o];for(s=0;s<a;s++)e[s+o]=t[s];for(s=0;s<n.length;s++)e[s+a+o]=n[s]};o.extend(b.prototype,i,{model:f,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,o.extend({merge:!1},t,y))},remove:function(e,t){t=o.extend({},t);var n=!o.isArray(e);e=n?[e]:e.slice();var a=this._removeModels(e,t);return!t.silent&&a.length&&(t.changes={added:[],merged:[],removed:a},this.trigger("update",this,t)),n?a[0]:a},set:function(e,t){if(null!=e){t=o.extend({},v,t),t.parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var n=!o.isArray(e);e=n?[e]:e.slice();var a=t.at;null!=a&&(a=+a),a>this.length&&(a=this.length),0>a&&(a+=this.length+1);var s=[],r=[],l=[],d=[],c={},p=t.add,u=t.merge,m=t.remove,g=!1,h=this.comparator&&null==a&&!1!==t.sort,_=o.isString(this.comparator)?this.comparator:null,f,b;for(b=0;b<e.length;b++){f=e[b];var y=this.get(f);if(y){if(u&&f!==y){var S=this._isModel(f)?f.attributes:f;t.parse&&(S=y.parse(S,t)),y.set(S,t),l.push(y),h&&!g&&(g=y.hasChanged(_))}c[y.cid]||(c[y.cid]=!0,s.push(y)),e[b]=y}else p&&(f=e[b]=this._prepareModel(f,t),f&&(r.push(f),this._addReference(f,t),c[f.cid]=!0,s.push(f)))}if(m){for(b=0;b<this.length;b++)f=this.models[b],c[f.cid]||d.push(f);d.length&&this._removeModels(d,t)}var w=!1;if(s.length&&!h&&p&&m?(w=this.length!==s.length||o.some(this.models,function(e,t){return e!==s[t]}),this.models.length=0,x(this.models,s,0),this.length=this.models.length):r.length&&(h&&(g=!0),x(this.models,r,null==a?this.length:a),this.length=this.models.length),g&&this.sort({silent:!0}),!t.silent){for(b=0;b<r.length;b++)null!=a&&(t.index=a+b),f=r[b],f.trigger("add",f,this,t);(g||w)&&this.trigger("sort",this,t),(r.length||d.length||l.length)&&(t.changes={added:r,removed:d,merged:l},this.trigger("update",this,t))}return n?e[0]:e}},reset:function(e,t){t=t?o.clone(t):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],t);return t.previousModels=this.models,this._reset(),e=this.add(e,o.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,o.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,o.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return s.apply(this.models,arguments)},get:function(e){return null==e?void 0:this._byId[e]||this._byId[this.modelId(this._isModel(e)?e.attributes:e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return 0>e&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var n=t.length;return o.isFunction(t)&&(t=t.bind(this)),1===n||o.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){e=o.extend({parse:!0},e);var t=e.success,n=this;return e.success=function(o){var a=e.reset?"reset":"set";n[a](o,e),t&&t.call(e.context,n,o,e),n.trigger("sync",n,o,e)},P(this,e),this.sync("read",this,e)},create:function(e,t){t=t?o.clone(t):{};var n=t.wait;if(e=this._prepareModel(e,t),!e)return!1;n||this.add(e,t);var a=this,s=t.success;return t.success=function(e,t,o){n&&a.add(e,o),s&&s.call(o.context,e,t,o)},e.save(null,t),e},parse:function(e){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},values:function(){return new w(this,k)},keys:function(){return new w(this,E)},entries:function(){return new w(this,C)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;t=t?o.clone(t):{},t.collection=this;var n=new this.model(e,t);return n.validationError?(this.trigger("invalid",this,n.validationError,t),!1):n},_removeModels:function(e,t){for(var o=[],n=0,a;n<e.length;n++)if(a=this.get(e[n]),a){var s=this.indexOf(a);this.models.splice(s,1),this.length--,delete this._byId[a.cid];var r=this.modelId(a.attributes);null!=r&&delete this._byId[r],t.silent||(t.index=s,a.trigger("remove",a,this,t)),o.push(a),this._removeReference(a,t)}return o},_isModel:function(e){return e instanceof f},_addReference:function(e){this._byId[e.cid]=e;var t=this.modelId(e.attributes);null!=t&&(this._byId[t]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e){delete this._byId[e.cid];var t=this.modelId(e.attributes);null!=t&&delete this._byId[t],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,o,n){if(t){if(("add"===e||"remove"===e)&&o!==this)return;if("destroy"===e&&this.remove(t,n),"change"===e){var a=this.modelId(t.previousAttributes()),s=this.modelId(t.attributes);a!==s&&(null!=a&&delete this._byId[a],null!=s&&(this._byId[s]=t))}}this.trigger.apply(this,arguments)}});var S="function"==typeof Symbol&&Symbol.iterator;S&&(b.prototype[S]=b.prototype.values);var w=function(e,t){this._collection=e,this._kind=t,this._index=0},k=1,E=2,C=3;S&&(w.prototype[S]=function(){return this}),w.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var e=this._collection.at(this._index);this._index++;var t;if(this._kind===k)t=e;else{var o=this._collection.modelId(e.attributes);t=this._kind===E?o:[o,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var A=t.View=function(e){this.cid=o.uniqueId("view"),this.preinitialize.apply(this,arguments),o.extend(this,o.pick(e,T)),this._ensureElement(),this.initialize.apply(this,arguments)},T=["model","collection","el","id","attributes","className","tagName","events"];o.extend(A.prototype,i,{tagName:"div",$:function(e){return this.$el.find(e)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=o.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var n=e[t];if(o.isFunction(n)||(n=this[n]),n){var a=t.match(/^(\S+)\s*(.*)$/);this.delegate(a[1],a[2],n.bind(this))}}return this},delegate:function(e,t,o){return this.$el.on(e+".delegateEvents"+this.cid,t,o),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,o){return this.$el.off(e+".delegateEvents"+this.cid,t,o),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(!this.el){var e=o.extend({},o.result(this,"attributes"));this.id&&(e.id=o.result(this,"id")),this.className&&(e["class"]=o.result(this,"className")),this.setElement(this._createElement(o.result(this,"tagName"))),this._setAttributes(e)}else this.setElement(o.result(this,"el"))},_setAttributes:function(e){this.$el.attr(e)}});var j=function(e,t,o,n){return 1===t?function(){return e[o](this[n])}:2===t?function(t){return e[o](this[n],t)}:3===t?function(t,a){return e[o](this[n],M(t,this),a)}:4===t?function(t,a,s){return e[o](this[n],M(t,this),a,s)}:function(){var t=s.call(arguments);return t.unshift(this[n]),e[o].apply(e,t)}},N=function(e,t,n,a){o.each(n,function(o,n){t[n]&&(e.prototype[n]=j(t,o,n,a))})},M=function(e,t){return o.isFunction(e)?e:o.isObject(e)&&!t._isModel(e)?I(e):o.isString(e)?function(t){return t.get(e)}:e},I=function(e){var t=o.matches(e);return function(e){return t(e.attributes)}};o.each([[b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[f,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(e){var t=e[0],n=e[1],a=e[2];t.mixin=function(e){var n=o.reduce(o.functions(e),function(e,t){return e[t]=0,e},{});N(t,e,n,a)},N(t,o,n,a)}),t.sync=function(e,n,a){var s=O[e];o.defaults(a||(a={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var i={type:s,dataType:"json"};if(a.url||(i.url=o.result(n,"url")||L()),null==a.data&&n&&("create"===e||"update"===e||"patch"===e)&&(i.contentType="application/json",i.data=JSON.stringify(a.attrs||n.toJSON(a))),a.emulateJSON&&(i.contentType="application/x-www-form-urlencoded",i.data=i.data?{model:i.data}:{}),a.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){i.type="POST",a.emulateJSON&&(i.data._method=s);var r=a.beforeSend;a.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",s),r)return r.apply(this,arguments)}}"GET"===i.type||a.emulateJSON||(i.processData=!1);var l=a.error;a.error=function(e,t,o){a.textStatus=t,a.errorThrown=o,l&&l.call(a.context,e,t,o)};var d=a.xhr=t.ajax(o.extend(i,a));return n.trigger("request",n,d,a),d};var O={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var R=t.Router=function(e){e||(e={}),this.preinitialize.apply(this,arguments),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)};o.extend(R.prototype,i,{preinitialize:function(){},initialize:function(){},route:function(e,n,a){o.isRegExp(e)||(e=this._routeToRegExp(e)),o.isFunction(n)&&(a=n,n=""),a||(a=this[n]);var s=this;return t.history.route(e,function(o){var i=s._extractParameters(e,o);!1!==s.execute(a,i,n)&&(s.trigger.apply(s,["route:"+n].concat(i)),s.trigger("route",n,i),t.history.trigger("route",s,n,i))}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,o){return t.history.navigate(e,o),this},_bindRoutes:function(){if(this.routes){this.routes=o.result(this,"routes");for(var e=o.keys(this.routes),t;null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(e){return e=e.replace(/[\-{}\[\]+?.,\\\^$|#\s]/g,"\\$&").replace(/\((.*?)\)/g,"(?:$1)?").replace(/(\(\?)?:\w+/g,function(e,t){return t?e:"([^/?]+)"}).replace(/\*\w+/g,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return o.map(n,function(e,t){return t===n.length-1?e||null:e?decodeURIComponent(e):null})}});var D=t.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)};D.started=!1,o.extend(D.prototype,i,{interval:50,atRoot:function(){var e=this.location.pathname.replace(/[^\/]$/,"$&/");return e===this.root&&!this.getSearch()},matchRoot:function(){var e=this.decodeFragment(this.location.pathname),t=e.slice(0,this.root.length-1)+"/";return t===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(this._usePushState||!this._wantsHashChange?e=this.getPath():e=this.getHash()),e.replace(/^[#\/]|\s+$/g,"")},start:function(e){if(D.started)throw new Error("Backbone.history has already been started");if(D.started=!0,this.options=o.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||7<document.documentMode),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.history&&this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(/^\/+|\/+$/g,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,a=n.insertBefore(this.iframe,n.firstChild).contentWindow;a.document.open(),a.document.close(),a.location.hash="#"+this.fragment}var s=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),D.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e!==this.fragment&&void(this.iframe&&this.navigate(e),this.loadUrl())},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),o.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))},navigate:function(e,t){if(!D.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var o=this.root;(""===e||"?"===e.charAt(0))&&(o=o.slice(0,-1)||"/");var n=o+e;e=e.replace(/#.*$/,"");var a=this.decodeFragment(e);if(this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;t.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,o){if(o){var n=e.href.replace(/(javascript:|#).*$/,"");e.replace(n+"#"+t)}else e.hash="#"+t}}),t.history=new D;f.extend=b.extend=R.extend=A.extend=D.extend=function(e,t){var n=this,a;return a=e&&o.has(e,"constructor")?e.constructor:function(){return n.apply(this,arguments)},o.extend(a,n,t),a.prototype=o.create(n.prototype,e),a.prototype.constructor=a,a.__super__=n.prototype,a};var L=function(){throw new Error("A \"url\" property or function must be specified")},P=function(e,t){var o=t.error;t.error=function(n){o&&o.call(t.context,e,n,t),e.trigger("error",e,n,t)}};return t})}).call(this,o(14))},function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,o){(function(o){var n,a,s;(function(o,i){a=[],n=i,s="function"==typeof n?n.apply(t,a):n,!(void 0!==s&&(e.exports=s))})(this,function(){"use strict";var e="undefined"==typeof o?this||window:o,t=document,n=t.documentElement,a=e.BSN={},s=a.supports=[],i="onmouseleave"in t?["mouseenter","mouseleave"]:["mouseover","mouseout"],r=0,l="WebkitTransition"in n.style||"Transition".toLowerCase()in n.style,d="WebkitTransition"in n.style?"Webkit".toLowerCase()+"TransitionEnd":"Transition".toLowerCase()+"end",c="WebkitDuration"in n.style?"Webkit".toLowerCase()+"TransitionDuration":"Transition".toLowerCase()+"Duration",p=function(e){e.focus?e.focus():e.setActive()},u=function(e,t){e.classList.add(t)},m=function(e,t){e.classList.remove(t)},g=function(e,t){return e.classList.contains(t)},h=function(e,t){return[].slice.call(e.getElementsByClassName(t))},_=function(e,o){var n=o?o:t;return"object"==typeof e?e:n.querySelector(e)},f=function(e,o){var n=o.charAt(0),a=o.substr(1);if("."===n){for(;e&&e!==t;e=e.parentNode)if(null!==_(o,e.parentNode)&&g(e,a))return e;}else if("#"===n)for(;e&&e!==t;e=e.parentNode)if(e.id===a)return e;return!1},b=function(e,t,o){e.addEventListener(t,o,!1)},v=function(e,t,o){e.removeEventListener(t,o,!1)},y=function(t,o,n){b(t,o,function a(s){n(s),v(t,o,a)})},x=function(t){var o=l?e.getComputedStyle(t)[c]:0;return o=parseFloat(o),o="number"!=typeof o||isNaN(o)?0:1e3*o,o},S=function(e,t){var o=0,n=x(e);n?y(e,d,function(n){o||t(n),o=1}):setTimeout(function(){o||t(),o=1},17)},w=function(e,t,o){var n=new CustomEvent(e+".bs."+t);n.relatedTarget=o,this.dispatchEvent(n)},k=function(){return{y:e.pageYOffset||n.scrollTop,x:e.pageXOffset||n.scrollLeft}},E=function(e,o,a,s){var i={w:o.offsetWidth,h:o.offsetHeight},r=n.clientWidth||t.body.clientWidth,l=n.clientHeight||t.body.clientHeight,d=e.getBoundingClientRect(),c=s===t.body?k():{x:s.offsetLeft+s.scrollLeft,y:s.offsetTop+s.scrollTop},p={w:d.right-d.left,h:d.bottom-d.top},u=g(o,"popover"),m=_(".arrow",o),h=0>d.top+p.h/2-i.h/2,f=0>d.left+p.w/2-i.w/2,b=d.left+i.w/2+p.w/2>=r,v=d.top+i.h/2+p.h/2>=l,y=0>d.top-i.h,x=0>d.left-i.w,S=d.top+i.h+p.h>=l,w=d.left+i.w+p.w>=r,E,C,A,T,j,N;a=("left"===a||"right"===a)&&x&&w?"top":a,a="top"===a&&y?"bottom":a,a="bottom"===a&&S?"top":a,a="left"===a&&x?"right":a,a="right"===a&&w?"left":a,-1===o.className.indexOf(a)&&(o.className=o.className.replace(/\b(top|bottom|left|right)+/,a)),j=m.offsetWidth,N=m.offsetHeight,"left"===a||"right"===a?(C="left"===a?d.left+c.x-i.w-(u?j:0):d.left+c.x+p.w,h?(E=d.top+c.y,A=p.h/2-j):v?(E=d.top+c.y-i.h+p.h,A=i.h-p.h/2-j):(E=d.top+c.y-i.h/2+p.h/2,A=i.h/2-(u?.9*N:N/2))):("top"===a||"bottom"===a)&&(E="top"===a?d.top+c.y-i.h-(u?N:0):d.top+c.y+p.h,f?(C=0,T=d.left+p.w/2-j):b?(C=r-1.01*i.w,T=i.w-(r-d.left)+p.w/2-j/2):(C=d.left+c.x-i.w/2+p.w/2,T=i.w/2-j/2)),o.style.top=E+"px",o.style.left=C+"px",A&&(m.style.top=A+"px"),T&&(m.style.left=T+"px")};a.version="2.0.26";var C=function(t){t=_(t);var o=this,n=f(t,".alert"),a=function(){g(n,"fade")?S(n,i):i()},s=function(a){n=f(a.target,".alert"),t=_("[data-dismiss=\"alert\"]",n),t&&n&&(t===a.target||t.contains(a.target))&&o.close()},i=function(){w.call(n,"closed","alert"),v(t,"click",s),n.parentNode.removeChild(n)};this.close=function(){n&&t&&g(n,"show")&&(w.call(n,"close","alert"),m(n,"show"),n&&a())},"Alert"in t||b(t,"click",s),t.Alert=o};s.push(["Alert",C,"[data-dismiss=\"alert\"]"]);var A=function(e){e=_(e);var o=!1,n=function(t){var n="LABEL"===t.target.tagName?t.target:"LABEL"===t.target.parentNode.tagName?t.target.parentNode:null;if(n){var a=t.target,s=h(a.parentNode,"btn"),r=n.getElementsByTagName("INPUT")[0];if(r){if("checkbox"===r.type&&(r.checked?(m(n,"active"),r.getAttribute("checked"),r.removeAttribute("checked"),r.checked=!1):(u(n,"active"),r.getAttribute("checked"),r.setAttribute("checked","checked"),r.checked=!0),!o&&(o=!0,w.call(r,"change","button"),w.call(e,"change","button"))),"radio"===r.type&&!o&&!r.checked){u(n,"active"),r.setAttribute("checked","checked"),r.checked=!0,w.call(r,"change","button"),w.call(e,"change","button"),o=!0;for(var l=0,d=s.length;l<d;l++){var c=s[l],p=c.getElementsByTagName("INPUT")[0];c!==n&&g(c,"active")&&(m(c,"active"),p.removeAttribute("checked"),p.checked=!1,w.call(p,"change","button"))}}setTimeout(function(){o=!1},50)}}};"Button"in e||(b(e,"click",n),_("[tabindex]",e)&&b(e,"keyup",function(o){var e=o.which||o.keyCode;32===e&&o.target===t.activeElement&&n(o)}),b(e,"keydown",function(t){var e=t.which||t.keyCode;32===e&&t.preventDefault()}));for(var a=h(e,"btn"),s=a.length,r=0;r<s;r++)!g(a[r],"active")&&_("input:checked",a[r])&&u(a[r],"active");e.Button=this};s.push(["Button",A,"[data-toggle=\"buttons\"]"]);var T=function(e,t){e=_(e),t=t||{};var o=null,n=null,a=this,s=e.getAttribute("data-parent"),i=function(e,t){w.call(e,"show","collapse"),e.isAnimating=!0,u(e,"collapsing"),m(e,"collapse"),e.style.height=e.scrollHeight+"px",S(e,function(){e.isAnimating=!1,e.setAttribute("aria-expanded","true"),t.setAttribute("aria-expanded","true"),m(e,"collapsing"),u(e,"collapse"),u(e,"show"),e.style.height="",w.call(e,"shown","collapse")})},r=function(e,t){w.call(e,"hide","collapse"),e.isAnimating=!0,e.style.height=e.scrollHeight+"px",m(e,"collapse"),m(e,"show"),u(e,"collapsing"),e.offsetWidth,e.style.height="0px",S(e,function(){e.isAnimating=!1,e.setAttribute("aria-expanded","false"),t.setAttribute("aria-expanded","false"),m(e,"collapsing"),u(e,"collapse"),e.style.height="",w.call(e,"hidden","collapse")})},l=function(){var t=e.href&&e.getAttribute("href"),o=e.getAttribute("data-target"),n=t||o&&"#"===o.charAt(0)&&o;return n&&_(n)},d,c;this.toggle=function(t){t.preventDefault(),g(n,"show")?a.hide():a.show()},this.hide=function(){n.isAnimating||(r(n,e),u(e,"collapsed"))},this.show=function(){o&&(d=_(".collapse.show",o),c=d&&(_("[data-target=\"#"+d.id+"\"]",o)||_("[href=\"#"+d.id+"\"]",o))),n.isAnimating&&(!d||d.isAnimating)||(c&&d!==n&&(r(d,c),u(c,"collapsed")),i(n,e),m(e,"collapsed"))},"Collapse"in e||b(e,"click",a.toggle),n=l(),n.isAnimating=!1,o=_(t.parent)||s&&f(e,s),e.Collapse=a};s.push(["Collapse",T,"[data-toggle=\"collapse\"]"]);var j=function(o,n){o=_(o),this.persist=!0===n||"true"===o.getAttribute("data-persist")||!1;var a=this,s=o.parentNode,i=null,r=_(".dropdown-menu",s),l=function(){for(var e=r.children,t=[],o=0;o<e.length;o++)e[o].children.length&&"A"===e[o].children[0].tagName&&t.push(e[o].children[0]),"A"===e[o].tagName&&t.push(e[o]);return t}(),d=function(e){(e.href&&"#"===e.href.slice(-1)||e.parentNode&&e.parentNode.href&&"#"===e.parentNode.href.slice(-1))&&this.preventDefault()},c=function(){var e=o.open?b:v;e(t,"click",h),e(t,"keydown",y),e(t,"keyup",x)},h=function(t){var e=t.target,n=e&&("Dropdown"in e||"Dropdown"in e.parentNode);(e===r||r.contains(e))&&(a.persist||n)||(i=e===o||o.contains(e)?o:null,k(),d.call(t,e))},f=function(t){i=o,S(),d.call(t,t.target)},y=function(t){var e=t.which||t.keyCode;(38===e||40===e)&&t.preventDefault()},x=function(n){var e=n.which||n.keyCode,s=t.activeElement,d=l.indexOf(s),c=s===o,u=r.contains(s),m=s.parentNode===r||s.parentNode.parentNode===r;(m||c)&&(d=c?0:38===e?1<d?d-1:0:40===e?d<l.length-1?d+1:d:d,l[d]&&p(l[d])),(l.length&&m||!l.length&&(u||c)||!u)&&o.open&&27===e&&(a.toggle(),i=null)},S=function(){w.call(s,"show","dropdown",i),u(r,"show"),u(s,"show"),o.setAttribute("aria-expanded",!0),w.call(s,"shown","dropdown",i),o.open=!0,v(o,"click",f),setTimeout(function(){p(r.getElementsByTagName("INPUT")[0]||o),c()},1)},k=function(){w.call(s,"hide","dropdown",i),m(r,"show"),m(s,"show"),o.setAttribute("aria-expanded",!1),w.call(s,"hidden","dropdown",i),o.open=!1,c(),p(o),setTimeout(function(){b(o,"click",f)},1)};o.open=!1,this.toggle=function(){g(s,"show")&&o.open?k():S()},"Dropdown"in o||(!1 in r&&r.setAttribute("tabindex","0"),b(o,"click",f)),o.Dropdown=a};s.push(["Dropdown",j,"[data-toggle=\"dropdown\"]"]);var N=function(o,a){o=_(o);var s=o.getAttribute("data-target")||o.getAttribute("href"),i=_(s),d=g(o,"modal")?o:i;if(g(o,"modal")&&(o=null),!!d){a=a||{},this.keyboard=!1!==a.keyboard&&"false"!==d.getAttribute("data-keyboard"),this.backdrop="static"!==a.backdrop&&"static"!==d.getAttribute("data-backdrop")||"static",this.backdrop=!1!==a.backdrop&&"false"!==d.getAttribute("data-backdrop")&&this.backdrop,this.content=a.content;var c=this,f=null,y=h(n,"fixed-top").concat(h(n,"fixed-bottom")),k=function(){var t=n.getBoundingClientRect();return e.innerWidth||t.right-Math.abs(t.left)},E=function(){var o=e.getComputedStyle(t.body),n=parseInt(o.paddingRight,10),a;if(B&&(t.body.style.paddingRight=n+z+"px",d.style.paddingRight=z+"px",y.length))for(var s=0;s<y.length;s++)a=e.getComputedStyle(y[s]).paddingRight,y[s].style.paddingRight=parseInt(a)+z+"px"},C=function(){if(t.body.style.paddingRight="",d.style.paddingRight="",y.length)for(var e=0;e<y.length;e++)y[e].style.paddingRight=""},A=function(){var e=t.createElement("div"),o;return e.className="modal-scrollbar-measure",t.body.appendChild(e),o=e.offsetWidth-e.clientWidth,t.body.removeChild(e),o},T=function(){B=t.body.clientWidth<k(),z=A()},j=function(){r=1;var e=t.createElement("div");F=_(".modal-backdrop"),null===F&&(e.setAttribute("class","modal-backdrop fade"),F=e,t.body.appendChild(F))},N=function(){F=_(".modal-backdrop"),F&&null!==F&&"object"==typeof F&&(r=0,t.body.removeChild(F),F=null),w.call(d,"hidden","modal")},M=function(){g(d,"show")?b(t,"keydown",P):v(t,"keydown",P)},I=function(){g(d,"show")?b(e,"resize",c.update):v(e,"resize",c.update)},O=function(){g(d,"show")?b(d,"click",q):v(d,"click",q)},R=function(){I(),O(),M(),p(d),w.call(d,"shown","modal",f)},D=function(){d.style.display="",o&&p(o),function(){h(t,"modal show")[0]||(C(),m(t.body,"modal-open"),F&&g(F,"fade")?(m(F,"show"),S(F,N)):N(),I(),O(),M())}()},L=function(t){var e=t.target;e=e.hasAttribute("data-target")||e.hasAttribute("href")?e:e.parentNode,e!==o||g(d,"show")||(d.modalTrigger=o,f=o,c.show(),t.preventDefault())},P=function(t){c.keyboard&&27==t.which&&g(d,"show")&&c.hide()},q=function(t){var e=t.target;g(d,"show")&&("modal"===e.parentNode.getAttribute("data-dismiss")||"modal"===e.getAttribute("data-dismiss")||e===d&&"static"!==c.backdrop)&&(c.hide(),f=null,t.preventDefault())},B,z,F,H;this.toggle=function(){g(d,"show")?this.hide():this.show()},this.show=function(){w.call(d,"show","modal",f);var e=h(t,"modal show")[0];e&&e!==d&&("modalTrigger"in e&&e.modalTrigger.Modal.hide(),"Modal"in e&&e.Modal.hide()),this.backdrop&&!r&&j(),F&&r&&!g(F,"show")&&(F.offsetWidth,H=x(F),u(F,"show")),setTimeout(function(){d.style.display="block",T(),E(),u(t.body,"modal-open"),u(d,"show"),d.setAttribute("aria-hidden",!1),g(d,"fade")?S(d,R):R()},l&&F?H:0)},this.hide=function(){w.call(d,"hide","modal"),F=_(".modal-backdrop"),H=F&&x(F),m(d,"show"),d.setAttribute("aria-hidden",!0),setTimeout(function(){g(d,"fade")?S(d,D):D()},l&&F?H:0)},this.setContent=function(e){_(".modal-content",d).innerHTML=e},this.update=function(){g(d,"show")&&(T(),E())},!o||"Modal"in o||b(o,"click",L),!c.content||c.setContent(c.content),o?(o.Modal=c,d.modalTrigger=o):d.Modal=c}};s.push(["Modal",N,"[data-toggle=\"modal\"]"]);var M=function(o,n){o=_(o),n=n||{};var a=o.getAttribute("data-trigger"),s=o.getAttribute("data-animation"),r=o.getAttribute("data-placement"),l=o.getAttribute("data-dismissible"),d=o.getAttribute("data-delay"),c=o.getAttribute("data-container"),p=_(n.container),h=_(c),y=f(o,".modal"),x=f(o,".fixed-top"),k=f(o,".fixed-bottom");this.template=n.template?n.template:null,this.trigger=n.trigger?n.trigger:a||"hover",this.animation=n.animation&&"fade"!==n.animation?n.animation:s||"fade",this.placement=n.placement?n.placement:r||"top",this.delay=parseInt(n.delay||d)||200,this.dismissible=!!(n.dismissible||"true"===l),this.container=p?p:h?h:x?x:k?k:y?y:t.body;var C=this,A=o.getAttribute("data-title")||null,T=o.getAttribute("data-content")||null;if(T||this.template){var j=null,N=0,M=this.placement,I=function(t){null!==j&&t.target===_(".close",j)&&C.hide()},O=function(){C.container.removeChild(j),N=null,j=null},R=function(){A=n.title||o.getAttribute("data-title")||null,T=n.content||o.getAttribute("data-content")||null,j=t.createElement("div");var e=t.createElement("div");if(e.setAttribute("class","arrow"),j.appendChild(e),null!==T&&null===C.template){if(j.setAttribute("role","tooltip"),null!==A){var a=t.createElement("h3");a.setAttribute("class","popover-header"),a.innerHTML=C.dismissible?A+"<button type=\"button\" class=\"close\">\xD7</button>":A,j.appendChild(a)}var s=t.createElement("div");s.setAttribute("class","popover-body"),s.innerHTML=C.dismissible&&null===A?T+"<button type=\"button\" class=\"close\">\xD7</button>":T,j.appendChild(s)}else{var i=t.createElement("div");i.innerHTML=C.template,j.innerHTML=i.firstChild.innerHTML}C.container.appendChild(j),j.style.display="block",j.setAttribute("class","popover bs-popover-"+M+" "+C.animation)},D=function(){g(j,"show")||u(j,"show")},L=function(){E(o,j,M,C.container)},P=function(n){"click"!=C.trigger&&"focus"!=C.trigger||C.dismissible||n(o,"blur",C.hide),C.dismissible&&n(t,"click",I),n(e,"resize",C.hide)},q=function(){P(b),w.call(o,"shown","popover")},B=function(){P(v),O(),w.call(o,"hidden","popover")};this.toggle=function(){null===j?C.show():C.hide()},this.show=function(){clearTimeout(N),N=setTimeout(function(){null===j&&(M=C.placement,R(),L(),D(),w.call(o,"show","popover"),C.animation?S(j,q):q())},20)},this.hide=function(){clearTimeout(N),N=setTimeout(function(){j&&null!==j&&g(j,"show")&&(w.call(o,"hide","popover"),m(j,"show"),C.animation?S(j,B):B())},C.delay)},"Popover"in o||("hover"===C.trigger?(b(o,i[0],C.show),!C.dismissible&&b(o,i[1],C.hide)):("click"==C.trigger||"focus"==C.trigger)&&b(o,C.trigger,C.toggle)),o.Popover=C}};s.push(["Popover",M,"[data-toggle=\"popover\"]"]);var I=function(e,t){e=_(e);var o=e.getAttribute("data-height");t=t||{},this.height=!!l&&(t.height||"true"===o);var n=this,a=f(e,".nav"),s=!1,i=a&&_(".dropdown-toggle",a),r=function(){s.style.height="",m(s,"collapsing"),a.isAnimating=!1},d=function(){s?E?r():setTimeout(function(){s.style.height=C+"px",s.offsetWidth,S(s,r)},50):a.isAnimating=!1,w.call(p,"shown","tab",v)},c=function(){s&&(y.style.float="left",x.style.float="left",k=y.scrollHeight),u(x,"active"),w.call(p,"show","tab",v),m(y,"active"),w.call(v,"hidden","tab",p),s&&(C=x.scrollHeight,E=C===k,u(s,"collapsing"),s.style.height=k+"px",s.offsetHeight,y.style.float="",x.style.float=""),g(x,"fade")?setTimeout(function(){u(x,"show"),S(x,d)},20):d()},p,v,y,x,k,E,C;if(a){a.isAnimating=!1;var A=function(){var e=h(a,"active"),t;return 1!==e.length||g(e[0].parentNode,"dropdown")?1<e.length&&(t=e[e.length-1]):t=e[0],t},T=function(){return _(A().getAttribute("href"))},j=function(t){t.preventDefault(),p=t.currentTarget,a.isAnimating||g(p,"active")||n.show()};this.show=function(){p=p||e,x=_(p.getAttribute("href")),v=A(),y=T(),a.isAnimating=!0,m(v,"active"),v.setAttribute("aria-selected","false"),u(p,"active"),p.setAttribute("aria-selected","true"),i&&(g(e.parentNode,"dropdown-menu")?!g(i,"active")&&u(i,"active"):g(i,"active")&&m(i,"active")),w.call(v,"hide","tab",p),g(y,"fade")?(m(y,"show"),S(y,c)):c()},"Tab"in e||b(e,"click",j),n.height&&(s=T().parentNode),e.Tab=n}};s.push(["Tab",I,"[data-toggle=\"tab\"]"]);var O=function(e,t){e=_(e),t=t||{};var o=e.getAttribute("data-animation"),n=e.getAttribute("data-autohide"),a=e.getAttribute("data-delay");this.animation=!1===t.animation||"false"===o?0:1,this.autohide=!1===t.autohide||"false"===n?0:1,this.delay=parseInt(t.delay||a)||500;var s=this,i=0,r=f(e,".toast"),l=function(){m(r,"showing"),u(r,"show"),w.call(r,"shown","toast"),s.autohide&&s.hide()},d=function(){u(r,"hide"),w.call(r,"hidden","toast")},c=function(){m(r,"show"),s.animation?S(r,d):d()},p=function(){clearTimeout(i),i=null,u(r,"hide"),v(e,"click",s.hide),e.Toast=null,e=null,r=null};this.show=function(){r&&(w.call(r,"show","toast"),s.animation&&u(r,"fade"),m(r,"hide"),u(r,"showing"),s.animation?S(r,l):l())},this.hide=function(e){r&&g(r,"show")&&(w.call(r,"hide","toast"),e?c():i=setTimeout(c,s.delay))},this.dispose=function(){r&&g(r,"show")&&(m(r,"show"),s.animation?S(r,p):p())},"Toast"in e||b(e,"click",s.hide),e.Toast=s};s.push(["Toast",O,"[data-dismiss=\"toast\"]"]);var R=function(o,n){o=_(o),n=n||{};var a=o.getAttribute("data-animation"),s=o.getAttribute("data-placement"),r=o.getAttribute("data-delay"),l=o.getAttribute("data-container"),d=_(n.container),c=_(l),p=f(o,".modal"),h=f(o,".fixed-top"),y=f(o,".fixed-bottom");this.animation=n.animation&&"fade"!==n.animation?n.animation:a||"fade",this.placement=n.placement?n.placement:s||"top",this.delay=parseInt(n.delay||r)||200,this.container=d?d:c?c:h?h:y?y:p?p:t.body;var x=this,k=0,C=this.placement,A=null,T=o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title");if(T&&""!=T){var j=function(){x.container.removeChild(A),A=null,k=null},N=function(){if(T=o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title"),!T||""==T)return!1;A=t.createElement("div"),A.setAttribute("role","tooltip");var e=t.createElement("div");e.setAttribute("class","arrow"),A.appendChild(e);var n=t.createElement("div");n.setAttribute("class","tooltip-inner"),A.appendChild(n),n.innerHTML=T,x.container.appendChild(A),A.setAttribute("class","tooltip bs-tooltip-"+C+" "+x.animation)},M=function(){E(o,A,C,x.container)},I=function(){g(A,"show")||u(A,"show")},O=function(){b(e,"resize",x.hide),w.call(o,"shown","tooltip")},R=function(){v(e,"resize",x.hide),j(),w.call(o,"hidden","tooltip")};this.show=function(){clearTimeout(k),k=setTimeout(function(){if(null===A){if(C=x.placement,!1==N())return;M(),I(),w.call(o,"show","tooltip"),x.animation?S(A,O):O()}},20)},this.hide=function(){clearTimeout(k),k=setTimeout(function(){A&&g(A,"show")&&(w.call(o,"hide","tooltip"),m(A,"show"),x.animation?S(A,R):R())},x.delay)},this.toggle=function(){A?x.hide():x.show()},"Tooltip"in o||(o.setAttribute("data-original-title",T),o.removeAttribute("title"),b(o,i[0],x.show),b(o,i[1],x.hide)),o.Tooltip=x}};s.push(["Tooltip",R,"[data-toggle=\"tooltip\"]"]);var D=function(e,t){for(var o=0,n=t.length;o<n;o++)new e(t[o])},L=a.initCallback=function(e){e=e||t;for(var o=0,n=s.length;o<n;o++)D(s[o][1],e.querySelectorAll(s[o][2]))};return t.body?L():b(t,"DOMContentLoaded",function(){L()}),{Alert:C,Button:A,Collapse:T,Dropdown:j,Modal:N,Popover:M,Tab:I,Toast:O,Tooltip:R}})}).call(this,o(14))},function(e,t){var n,n;(function d(c,e,t){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof n&&n;if(!o&&r)return n(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,t)}return e[i].exports}for(var s="function"==typeof n&&n,i=0;i<t.length;i++)a(t[i]);return a})({1:[function(e,t,o){function n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}function a(e){return e.replace(_,"&lt;").replace(f,"&gt;")}function s(e){return e.replace(b,"&quot;")}function i(e){return e.replace(v,"\"")}function r(e){return e.replace(y,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function l(e){return e.replace(x,":").replace(S," ")}function d(e){for(var t="",o=0,n=e.length;o<n;o++)t+=32>e.charCodeAt(o)?" ":e.charAt(o);return g.trim(t)}function c(e){return e=i(e),e=r(e),e=l(e),e=d(e),e}function p(e){return e=s(e),e=a(e),e}var u=e("cssfilter").FilterCSS,m=e("cssfilter").getDefaultWhiteList,g=e("./util"),h=new u,_=/</g,f=/>/g,b=/"/g,v=/&quot;/g,y=/&#([a-zA-Z0-9]*);?/gim,x=/&colon;?/gim,S=/&newline;?/gim,w=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,k=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,E=/u\s*r\s*l\s*\(.*/gi;o.whiteList=n(),o.getDefaultWhiteList=n,o.onTag=function(){},o.onIgnoreTag=function(){},o.onTagAttr=function(){},o.onIgnoreTagAttr=function(){},o.safeAttrValue=function(e,t,o,n){if(o=c(o),"href"===t||"src"===t){if(o=g.trim(o),"#"===o)return"#";if("http://"!==o.substr(0,7)&&"https://"!==o.substr(0,8)&&"mailto:"!==o.substr(0,7)&&"tel:"!==o.substr(0,4)&&"#"!==o[0]&&"/"!==o[0])return""}else if("background"===t){if(w.lastIndex=0,w.test(o))return"";}else if("style"===t){if(k.lastIndex=0,k.test(o))return"";if(E.lastIndex=0,E.test(o)&&(w.lastIndex=0,w.test(o)))return"";!1!==n&&(n=n||h,o=n.process(o))}return o=p(o),o},o.escapeHtml=a,o.escapeQuote=s,o.unescapeQuote=i,o.escapeHtmlEntities=r,o.escapeDangerHtml5Entities=l,o.clearNonPrintableCharacter=d,o.friendlyAttrValue=c,o.escapeAttrValue=p,o.onIgnoreTagStripAll=function(){return""},o.StripTagBody=function(e,t){function o(t){return!!n||-1!==g.indexOf(e,t)}"function"!=typeof t&&(t=function(){});var n=!Array.isArray(e),a=[],s=!1;return{onIgnoreTag:function(e,n,i){if(o(e)){if(i.isClosing){var r=i.position+10;return a.push([!1===s?i.position:s,r]),s=!1,"[/removed]"}return s||(s=i.position),"[removed]"}return t(e,n,i)},remove:function(e){var t="",o=0;return g.forEach(a,function(n){t+=e.slice(o,n[0]),o=n[1]}),t+=e.slice(o),t}}},o.stripCommentTag=function(e){return e.replace(/<!--[\s\S]*?-->/g,"")},o.stripBlankChar=function(e){var t=e.split("");return t=t.filter(function(e){var t=e.charCodeAt(0);return 127!==t&&(!(31>=t)||10===t||13===t)}),t.join("")},o.cssFilter=h,o.getDefaultCSSWhiteList=m},{"./util":4,cssfilter:8}],2:[function(e,t,o){function n(e,t){var o=new r(t);return o.process(e)}var a=e("./default"),s=e("./parser"),r=e("./xss");for(var l in o=t.exports=n,o.filterXSS=n,o.FilterXSS=r,a)o[l]=a[l];for(var l in s)o[l]=s[l];"undefined"!=typeof window&&(window.filterXSS=t.exports),function(){return"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}()&&(self.filterXSS=t.exports)},{"./default":1,"./parser":3,"./xss":5}],3:[function(e,t,o){function n(e){var t=p.spaceIndex(e);if(-1===t)var o=e.slice(1,-1);else var o=e.slice(1,t+1);return o=p.trim(o).toLowerCase(),"/"===o.slice(0,1)&&(o=o.slice(1)),"/"===o.slice(-1)&&(o=o.slice(0,-1)),o}function a(e){return"</"===e.slice(0,2)}function s(e,t){for(;t<e.length;t++){var o=e[t];if(" "!==o)return"="===o?t:-1}}function r(e,t){for(;0<t;t--){var o=e[t];if(" "!==o)return"="===o?t:-1}}function l(e){return!(("\""!==e[0]||"\""!==e[e.length-1])&&("'"!==e[0]||"'"!==e[e.length-1]))}function d(e){return l(e)?e.substr(1,e.length-2):e}var p=e("./util");o.parseTag=function(e,t,o){"user strict";var s="",i=0,r=!1,l=!1,d=0,p=e.length,u="",m="";for(d=0;d<p;d++){var g=e.charAt(d);if(!1===r){if("<"===g){r=d;continue}}else if(!1===l){if("<"===g){s+=o(e.slice(i,d)),r=d,i=d;continue}if(">"===g){s+=o(e.slice(i,r)),m=e.slice(r,d+1),u=n(m),s+=t(r,s.length,u,m,a(m)),i=d+1,r=!1;continue}if(("\""===g||"'"===g)&&"="===e.charAt(d-1)){l=g;continue}}else if(g===l){l=!1;continue}}return i<e.length&&(s+=o(e.substr(i))),s},o.parseAttr=function(e,t){"user strict";function o(e,o){if(e=p.trim(e),e=e.replace(/[^a-zA-Z0-9_:\.\-]/gim,"").toLowerCase(),!(1>e.length)){var n=t(e,o||"");n&&a.push(n)}}for(var n=0,a=[],l=!1,u=e.length,m=0;m<u;m++){var g=e.charAt(m),c,h;if(!1===l&&"="===g){l=e.slice(n,m),n=m+1;continue}if(!1!==l&&m===n&&("\""===g||"'"===g)&&"="===e.charAt(m-1))if(h=e.indexOf(g,m+1),-1===h)break;else{c=p.trim(e.slice(n+1,h)),o(l,c),l=!1,m=h,n=m+1;continue}if(/\s|\n|\t/.test(g))if(e=e.replace(/\s|\n|\t/g," "),!1===l){if(h=s(e,m),-1===h){c=p.trim(e.slice(n,m)),o(c),l=!1,n=m+1;continue}else{m=h-1;continue}}else if(h=r(e,m-1),-1===h){c=p.trim(e.slice(n,m)),c=d(c),o(l,c),l=!1,n=m+1;continue}else continue}return n<e.length&&(!1===l?o(e.slice(n)):o(l,d(p.trim(e.slice(n))))),p.trim(a.join(" "))}},{"./util":4}],4:[function(e,t){t.exports={indexOf:function(e,t){var o,n;if(Array.prototype.indexOf)return e.indexOf(t);for(o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},forEach:function(e,t,o){var n,a;if(Array.prototype.forEach)return e.forEach(t,o);for(n=0,a=e.length;n<a;n++)t.call(o,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},{}],5:[function(e,t){function o(e){return e===void 0||null===e}function n(e){var t=p.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};e=p.trim(e.slice(t+1,-1));var o="/"===e[e.length-1];return o&&(e=p.trim(e.slice(0,-1))),{html:e,closing:o}}function a(e){var t={};for(var o in e)t[o]=e[o];return t}function s(e){e=a(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error("Notes: cannot use these two options \"stripIgnoreTag\" and \"onIgnoreTag\" at the same time"),e.onIgnoreTag=r.onIgnoreTagStripAll),e.whiteList=e.whiteList||r.whiteList,e.onTag=e.onTag||r.onTag,e.onTagAttr=e.onTagAttr||r.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||r.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||r.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,e.escapeHtml=e.escapeHtml||r.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new i(e.css))}var i=e("cssfilter").FilterCSS,r=e("./default"),l=e("./parser"),d=l.parseTag,c=l.parseAttr,p=e("./util");s.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,a=t.options,s=a.whiteList,i=a.onTag,l=a.onIgnoreTag,u=a.onTagAttr,m=a.onIgnoreTagAttr,g=a.safeAttrValue,h=a.escapeHtml,_=t.cssFilter;a.stripBlankChar&&(e=r.stripBlankChar(e)),a.allowCommentTag||(e=r.stripCommentTag(e));var f=!1;if(a.stripIgnoreTagBody){var f=r.StripTagBody(a.stripIgnoreTagBody,l);l=f.onIgnoreTag}var b=d(e,function(e,t,a,r,d){var f={sourcePosition:e,position:t,isClosing:d,isWhite:s.hasOwnProperty(a)},b=i(a,r,f);if(!o(b))return b;if(f.isWhite){if(f.isClosing)return"</"+a+">";var v=n(r),y=s[a],x=c(v.html,function(e,t){var n=-1!==p.indexOf(y,e),s=u(a,e,t,n);if(!o(s))return s;if(n)return t=g(a,e,t,_),t?e+"=\""+t+"\"":e;var s=m(a,e,t,n);return o(s)?void 0:s}),r="<"+a;return x&&(r+=" "+x),v.closing&&(r+=" /"),r+=">",r}var b=l(a,r,f);return o(b)?h(r):b},h);return f&&(b=f.remove(b)),b},t.exports=s},{"./default":1,"./parser":3,"./util":4,cssfilter:8}],6:[function(e,t){function o(e){return e===void 0||null===e}function n(e){var t={};for(var o in e)t[o]=e[o];return t}function a(e){e=n(e||{}),e.whiteList=e.whiteList||s.whiteList,e.onAttr=e.onAttr||s.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||s.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||s.safeAttrValue,this.options=e}var s=e("./default"),i=e("./parser"),r=e("./util");a.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,a=n.whiteList,s=n.onAttr,r=n.onIgnoreAttr,l=n.safeAttrValue,d=i(e,function(e,t,n,i,d){var c=a[n],p=!1;if(!0===c?p=c:"function"==typeof c?p=c(i):c instanceof RegExp&&(p=c.test(i)),!0!==p&&(p=!1),i=l(n,i),!!i){var u={position:t,sourcePosition:e,source:d,isWhite:p};if(p){var m=s(n,i,u);return o(m)?n+":"+i:m}var m=r(n,i,u);if(!o(m))return m}});return d},t.exports=a},{"./default":7,"./parser":9,"./util":10}],7:[function(e,t,o){function n(){return{"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1}}o.whiteList=n(),o.getDefaultWhiteList=n,o.onAttr=function(){},o.onIgnoreAttr=function(){},o.safeAttrValue=function(e,t){return /javascript\s*\:/img.test(t)?"":t}},{}],8:[function(e,t,o){function n(e,t){var o=new s(t);return o.process(e)}var a=e("./default"),s=e("./css");for(var r in o=t.exports=n,o.FilterCSS=s,a)o[r]=a[r];"undefined"!=typeof window&&(window.filterCSS=t.exports)},{"./css":6,"./default":7}],9:[function(e,t){var o=e("./util");t.exports=function(e,t){function n(){if(!s){var n=o.trim(e.slice(r,l)),a=n.indexOf(":");if(-1!==a){var i=o.trim(n.slice(0,a)),c=o.trim(n.slice(a+1));if(i){var p=t(r,d.length,i,c,n);p&&(d+=p+"; ")}}}r=l+1}e=o.trimRight(e),";"!==e[e.length-1]&&(e+=";");for(var a=e.length,s=!1,r=0,l=0,d="";l<a;l++){var p=e[l];if("/"===p&&"*"===e[l+1]){var c=e.indexOf("*/",l+2);if(-1===c)break;l=c+1,r=l+1,s=!1}else"("===p?s=!0:")"===p?s=!1:";"===p?s||n():"\n"===p&&n()}return o.trim(d)}},{"./util":10}],10:[function(e,t){t.exports={indexOf:function(e,t){var o,n;if(Array.prototype.indexOf)return e.indexOf(t);for(o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},forEach:function(e,t,o){var n,a;if(Array.prototype.forEach)return e.forEach(t,o);for(n=0,a=e.length;n<a;n++)t.call(o,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},{}]},{},[2]),t.filterXSS=filterXSS,t.filterCSS=filterCSS},function(e){var t=function(){return this}();try{t=t||new Function("return this")()}catch(o){"object"==typeof window&&(t=window)}e.exports=t},function(e,t,o){function n(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?s(e):i(e)}var a=o(29),s=o(336),i=o(337),r=a?a.toStringTag:void 0;e.exports=n},function(e,t,o){var n=o(354),a=o(357);e.exports=function(e,t){var o=a(e,t);return n(o)?o:void 0}},function(e,t,o){(function(t){var n,n;(function(t){e.exports=t()})(function(){return function d(c,e,t){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof n&&n;if(!o&&r)return n(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,t)}return e[i].exports}for(var s="function"==typeof n&&n,i=0;i<t.length;i++)a(t[i]);return a}({1:[function(e,o){(function(e){'use strict';function t(){p=!0;for(var e=c.length,t,o;e;){for(o=c,c=[],t=-1;++t<e;)o[t]();e=c.length}p=!1}function n(e){1!==c.push(e)||p||s()}var a=e.MutationObserver||e.WebKitMutationObserver,s;if(a){var i=0,r=new a(t),l=e.document.createTextNode("");r.observe(l,{characterData:!0}),s=function(){l.data=i=++i%2}}else if(!e.setImmediate&&"undefined"!=typeof e.MessageChannel){var d=new e.MessageChannel;d.port1.onmessage=t,s=function(){d.port2.postMessage(0)}}else s="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var o=e.document.createElement("script");o.onreadystatechange=function(){t(),o.onreadystatechange=null,o.parentNode.removeChild(o),o=null},e.document.documentElement.appendChild(o)}:function(){setTimeout(t,0)};var c=[],p;o.exports=n}).call(this,"undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)},{}],2:[function(e,t){'use strict';function o(){}function n(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,e!==o&&l(this,e)}function a(e,t,o){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof o&&(this.onRejected=o,this.callRejected=this.otherCallRejected)}function s(t,o,n){c(function(){var e;try{e=o(n)}catch(o){return p.reject(t,o)}e===t?p.reject(t,new TypeError("Cannot resolve promise with itself")):p.resolve(t,e)})}function r(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function l(e,t){function o(t){a||(a=!0,p.reject(e,t))}function n(t){a||(a=!0,p.resolve(e,t))}var a=!1,s=d(function(){t(n,o)});"error"===s.status&&o(s.value)}function d(e,t){var o={};try{o.value=e(t),o.status="success"}catch(t){o.status="error",o.value=t}return o}var c=e(1),p={},u=["REJECTED"],m=["FULFILLED"],g=["PENDING"];t.exports=n,n.prototype["catch"]=function(e){return this.then(null,e)},n.prototype.then=function(e,t){if("function"!=typeof e&&this.state===m||"function"!=typeof t&&this.state===u)return this;var n=new this.constructor(o);if(this.state!==g){var i=this.state===m?e:t;s(n,i,this.outcome)}else this.queue.push(new a(n,e,t));return n},a.prototype.callFulfilled=function(e){p.resolve(this.promise,e)},a.prototype.otherCallFulfilled=function(e){s(this.promise,this.onFulfilled,e)},a.prototype.callRejected=function(e){p.reject(this.promise,e)},a.prototype.otherCallRejected=function(e){s(this.promise,this.onRejected,e)},p.resolve=function(e,t){var o=d(r,t);if("error"===o.status)return p.reject(e,o.value);var n=o.value;if(n)l(e,n);else{e.state=m,e.outcome=t;for(var a=-1,s=e.queue.length;++a<s;)e.queue[a].callFulfilled(t)}return e},p.reject=function(e,t){e.state=u,e.outcome=t;for(var o=-1,n=e.queue.length;++o<n;)e.queue[o].callRejected(t);return e},n.resolve=function(e){return e instanceof this?e:p.resolve(new this(o),e)},n.reject=function(e){var t=new this(o);return p.reject(t,e)},n.all=function(e){function t(e,t){function o(e){r[t]=e,++l!==a||s||(s=!0,p.resolve(c,r))}n.resolve(e).then(o,function(e){s||(s=!0,p.reject(c,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var a=e.length,s=!1;if(!a)return this.resolve([]);for(var r=Array(a),l=0,d=-1,c=new this(o);++d<a;)t(e[d],d);return c},n.race=function(e){function t(e){n.resolve(e).then(function(e){s||(s=!0,p.resolve(l,e))},function(e){s||(s=!0,p.reject(l,e))})}var n=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var a=e.length,s=!1;if(!a)return this.resolve([]);for(var r=-1,l=new this(o);++r<a;)t(e[r]);return l}},{1:1}],3:[function(e){(function(t){'use strict';"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,"undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)},{2:2}],4:[function(e,t){'use strict';function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(s){if("TypeError"!==s.name)throw s;for(var o="undefined"==typeof BlobBuilder?"undefined"==typeof MSBlobBuilder?"undefined"==typeof MozBlobBuilder?WebKitBlobBuilder:MozBlobBuilder:MSBlobBuilder:BlobBuilder,n=new o,a=0;a<e.length;a+=1)n.append(e[a]);return n.getBlob(t.type)}}function a(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function s(e,t,o){"function"==typeof t&&e.then(t),"function"==typeof o&&e["catch"](o)}function i(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e+=""),e}function r(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function l(e){for(var t=e.length,o=new ArrayBuffer(t),n=new Uint8Array(o),a=0;a<t;a++)n[a]=e.charCodeAt(a);return o}function d(e){return new B(function(t){var o=e.transaction("local-forage-detect-blob-support","readwrite"),a=n([""]);o.objectStore("local-forage-detect-blob-support").put(a,"key"),o.onabort=function(o){o.preventDefault(),o.stopPropagation(),t(!1)},o.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),o=navigator.userAgent.match(/Edge\//);t(o||!e||43<=parseInt(e[1],10))}})["catch"](function(){return!1})}function c(e){return"boolean"==typeof z?B.resolve(z):d(e).then(function(e){return z=e,z})}function p(e){var t=F[e.name],o={};o.promise=new B(function(e,t){o.resolve=e,o.reject=t}),t.deferredOperations.push(o),t.dbReady=t.dbReady?t.dbReady.then(function(){return o.promise}):o.promise}function u(e){var t=F[e.name],o=t.deferredOperations.pop();if(o)return o.resolve(),o.promise}function m(e,t){var o=F[e.name],n=o.deferredOperations.pop();if(n)return n.reject(t),n.promise}function g(t,o){return new B(function(e,n){if(F[t.name]=F[t.name]||k(),t.db)if(o)p(t),t.db.close();else return e(t.db);var a=[t.name];o&&a.push(t.version);var s=q.open.apply(q,a);o&&(s.onupgradeneeded=function(o){var e=s.result;try{e.createObjectStore(t.storeName),1>=o.oldVersion&&e.createObjectStore("local-forage-detect-blob-support")}catch(e){if("ConstraintError"===e.name)console.warn("The database \""+t.name+"\" has been upgraded from version "+o.oldVersion+" to version "+o.newVersion+", but the storage \""+t.storeName+"\" already exists.");else throw e}}),s.onerror=function(t){t.preventDefault(),n(s.error)},s.onsuccess=function(){e(s.result),u(t)}})}function h(e){return g(e,!1)}function _(e){return g(e,!0)}function f(e,t){if(!e.db)return!0;var o=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,a=e.version>e.db.version;if(n&&(e.version!==t&&console.warn("The database \""+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),a||o){if(o){var s=e.db.version+1;s>e.version&&(e.version=s)}return!0}return!1}function b(t){return new B(function(o,n){var a=new FileReader;a.onerror=n,a.onloadend=function(n){var e=btoa(n.target.result||"");o({__local_forage_encoded_blob:!0,data:e,type:t.type})},a.readAsBinaryString(t)})}function v(e){var t=l(atob(e.data));return n([t],{type:e.type})}function y(e){return e&&e.__local_forage_encoded_blob}function x(e){var t=this,o=t._initReady().then(function(){var e=F[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return s(o,e,e),o}function S(e){p(e);for(var t=F[e.name],o=t.forages,n=0,a;n<o.length;n++)a=o[n],a._dbInfo.db&&(a._dbInfo.db.close(),a._dbInfo.db=null);return e.db=null,h(e).then(function(t){return e.db=t,f(e)?_(e):t}).then(function(n){e.db=t.db=n;for(var a=0;a<o.length;a++)o[a]._dbInfo.db=n})["catch"](function(t){throw m(e,t),t})}function w(e,t,o,n){n===void 0&&(n=1);try{var a=e.db.transaction(e.storeName,t);o(null,a)}catch(a){if(0<n&&(!e.db||"InvalidStateError"===a.name||"NotFoundError"===a.name))return B.resolve().then(function(){if(!e.db||"NotFoundError"===a.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),_(e)}).then(function(){return S(e).then(function(){w(e,t,o,n-1)})})["catch"](o);o(a)}}function k(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function E(e){var t=.75*e.length,o=e.length,n=0,a,s,r,l,d;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);var c=new ArrayBuffer(t),u=new Uint8Array(c);for(a=0;a<o;a+=4)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a]),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+1]),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+2]),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+3]),u[n++]=s<<2|r>>4,u[n++]=(15&r)<<4|l>>2,u[n++]=(3&l)<<6|63&d;return c}function C(e){var t=new Uint8Array(e),o="",n;for(n=0;n<t.length;n+=3)o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[t[n]>>2],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t[n])<<4|t[n+1]>>4],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t[n+1])<<2|t[n+2]>>6],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[63&t[n+2]];return 2==t.length%3?o=o.substring(0,o.length-1)+"=":1==t.length%3&&(o=o.substring(0,o.length-2)+"=="),o}function A(e,t,o,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],o,n)}function T(e,o,n,a,s,i){e.executeSql(n,a,s,function(e,r){r.code===r.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[o.storeName],function(e,t){t.rows.length?i(e,r):A(e,o,function(){e.executeSql(n,a,s,i)},i)},i):i(e,r)},i)}function j(e,t,o,n){var s=this;e=i(e);var r=new B(function(a,i){s.ready().then(function(){void 0===t&&(t=null);var r=t,l=s._dbInfo;l.serializer.serialize(t,function(d,c){c?i(c):l.db.transaction(function(o){T(o,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,d],function(){a(r)},function(e,t){i(t)})},function(t){if(t.code===t.QUOTA_ERR){if(0<n)return void a(j.apply(s,[e,r,o,n-1]));i(t)}})})})["catch"](i)});return a(r,o),r}function N(e){return new B(function(o,n){e.transaction(function(a){a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,t){for(var a=[],s=0;s<t.rows.length;s++)a.push(t.rows.item(s).name);o({db:e,storeNames:a})},function(e,t){n(t)})},function(e){n(e)})})}function M(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}function I(e,t){var o=e.name+"/";return e.storeName!==t.storeName&&(o+=e.storeName+"/"),o}function O(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}function R(){return!O()||0<localStorage.length}function D(e,t){e[t]=function(){var o=arguments;return e.ready().then(function(){return e[t].apply(e,o)})}}function L(){for(var e=1,t;e<arguments.length;e++)if(t=arguments[e],t)for(var o in t)t.hasOwnProperty(o)&&(arguments[0][o]=Z(t[o])?t[o].slice():t[o]);return arguments[0]}var P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){}}();"undefined"==typeof Promise&&e(3);var B=Promise,z=void 0,F={},H=Object.prototype.toString,U={_driver:"asyncStorage",_initStorage:function(e){function t(){return B.resolve()}var o=this,n={db:null};if(e)for(var a in e)n[a]=e[a];var s=F[n.name];s||(s=k(),F[n.name]=s),s.forages.push(o),o._initReady||(o._initReady=o.ready,o.ready=x);for(var i=[],r=0,l;r<s.forages.length;r++)l=s.forages[r],l!==o&&i.push(l._initReady()["catch"](t));var d=s.forages.slice(0);return B.all(i).then(function(){return n.db=s.db,h(n)}).then(function(e){return n.db=e,f(n,o._defaultConfig.version)?_(n):e}).then(function(e){n.db=s.db=e,o._dbInfo=n;for(var t=0,a;t<d.length;t++)a=d[t],a!==o&&(a._dbInfo.db=n.db,a._dbInfo.version=n.version)})},_support:function(){try{if(!q)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(e,t){var o=this,n=new B(function(t,n){o.ready().then(function(){w(o._dbInfo,"readonly",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=i.openCursor(),l=1;r.onsuccess=function(){var o=r.result;if(o){var n=o.value;y(n)&&(n=v(n));var a=e(n,o.key,l++);void 0===a?o["continue"]():t(a)}else t()},r.onerror=function(){n(r.error)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},getItem:function(e,t){var o=this;e=i(e);var n=new B(function(t,n){o.ready().then(function(){w(o._dbInfo,"readonly",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=i.get(e);r.onsuccess=function(){var e=r.result;void 0===e&&(e=null),y(e)&&(e=v(e)),t(e)},r.onerror=function(){n(r.error)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},setItem:function(e,t,o){var n=this;e=i(e);var s=new B(function(o,a){var s;n.ready().then(function(){return s=n._dbInfo,"[object Blob]"===H.call(t)?c(s.db).then(function(e){return e?t:b(t)}):t}).then(function(t){w(n._dbInfo,"readwrite",function(s,i){if(s)return a(s);try{var r=i.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var l=r.put(t,e);i.oncomplete=function(){void 0===t&&(t=null),o(t)},i.onabort=i.onerror=function(){var e=l.error?l.error:l.transaction.error;a(e)}}catch(t){a(t)}})})["catch"](a)});return a(s,o),s},removeItem:function(e,t){var o=this;e=i(e);var n=new B(function(t,n){o.ready().then(function(){w(o._dbInfo,"readwrite",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=i["delete"](e);s.oncomplete=function(){t()},s.onerror=function(){n(r.error)},s.onabort=function(){var e=r.error?r.error:r.transaction.error;n(e)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},clear:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){w(t._dbInfo,"readwrite",function(n,a){if(n)return o(n);try{var s=a.objectStore(t._dbInfo.storeName),i=s.clear();a.oncomplete=function(){e()},a.onabort=a.onerror=function(){var e=i.error?i.error:i.transaction.error;o(e)}}catch(t){o(t)}})})["catch"](o)});return a(o,e),o},length:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){w(t._dbInfo,"readonly",function(n,a){if(n)return o(n);try{var s=a.objectStore(t._dbInfo.storeName),i=s.count();i.onsuccess=function(){e(i.result)},i.onerror=function(){o(i.error)}}catch(t){o(t)}})})["catch"](o)});return a(o,e),o},key:function(e,t){var o=this,n=new B(function(t,n){return 0>e?void t(null):void o.ready().then(function(){w(o._dbInfo,"readonly",function(a,s){if(a)return n(a);try{var i=s.objectStore(o._dbInfo.storeName),r=!1,l=i.openCursor();l.onsuccess=function(){var o=l.result;return o?void(0===e?t(o.key):r?t(o.key):(r=!0,o.advance(e))):void t(null)},l.onerror=function(){n(l.error)}}catch(t){n(t)}})})["catch"](n)});return a(n,t),n},keys:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){w(t._dbInfo,"readonly",function(n,a){if(n)return o(n);try{var s=a.objectStore(t._dbInfo.storeName),i=s.openCursor(),r=[];i.onsuccess=function(){var t=i.result;return t?void(r.push(t.key),t["continue"]()):void e(r)},i.onerror=function(){o(i.error)}}catch(t){o(t)}})})["catch"](o)});return a(o,e),o},dropInstance:function(e,t){t=r.apply(this,arguments);var o=this.config();e="function"!=typeof e&&e||{},e.name||(e.name=e.name||o.name,e.storeName=e.storeName||o.storeName);var n=this,s;if(!e.name)s=B.reject("Invalid arguments");else{var i=e.name===o.name&&n._dbInfo.db,l=i?B.resolve(n._dbInfo.db):h(e).then(function(t){var o=F[e.name],n=o.forages;o.db=t;for(var a=0;a<n.length;a++)n[a]._dbInfo.db=t;return t});s=e.storeName?l.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var o=t.version+1;p(e);var n=F[e.name],a=n.forages;t.close();for(var s=0,r;s<a.length;s++)r=a[s],r._dbInfo.db=null,r._dbInfo.version=o;var l=new B(function(t,n){var a=q.open(e.name,o);a.onerror=function(e){var t=a.result;t.close(),n(e)},a.onupgradeneeded=function(){var t=a.result;t.deleteObjectStore(e.storeName)},a.onsuccess=function(){var e=a.result;e.close(),t(e)}});return l.then(function(e){n.db=e;for(var t=0,o;t<a.length;t++)o=a[t],o._dbInfo.db=e,u(o._dbInfo)})["catch"](function(t){throw(m(e,t)||B.resolve())["catch"](function(){}),t})}}):l.then(function(t){p(e);var o=F[e.name],n=o.forages;t.close();for(var a=0,s;a<n.length;a++)s=n[a],s._dbInfo.db=null;var r=new B(function(t,o){var n=q.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),o(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}});return r.then(function(e){o.db=e;for(var t=0,a;t<n.length;t++)a=n[t],u(a._dbInfo)})["catch"](function(t){throw(m(e,t)||B.resolve())["catch"](function(){}),t})})}return a(s,t),s}},V=/^~~local_forage_type~([^~]+)~/,W="__lfsc__:".length,G=W+"arbf".length,J=Object.prototype.toString,$={serialize:function(t,o){var n="";if(t&&(n=J.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===J.call(t.buffer))){var a="__lfsc__:",s;t instanceof ArrayBuffer?(s=t,a+="arbf"):(s=t.buffer,"[object Int8Array]"===n?a+="si08":"[object Uint8Array]"===n?a+="ui08":"[object Uint8ClampedArray]"===n?a+="uic8":"[object Int16Array]"===n?a+="si16":"[object Uint16Array]"===n?a+="ur16":"[object Int32Array]"===n?a+="si32":"[object Uint32Array]"===n?a+="ui32":"[object Float32Array]"===n?a+="fl32":"[object Float64Array]"===n?a+="fl64":o(new Error("Failed to get type for BinaryArray"))),o(a+C(s))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var e="~~local_forage_type~"+t.type+"~"+C(this.result);o("__lfsc__:blob"+e)},i.readAsArrayBuffer(t)}else try{o(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),o(null,n)}},deserialize:function(e){if(e.substring(0,W)!=="__lfsc__:")return JSON.parse(e);var t=e.substring(G),o=e.substring(W,G),a;if(o==="blob"&&V.test(t)){var s=t.match(V);a=s[1],t=t.substring(s[0].length)}var i=E(t);switch(o){case"arbf":return i;case"blob":return n([i],{type:a});case"si08":return new Int8Array(i);case"ui08":return new Uint8Array(i);case"uic8":return new Uint8ClampedArray(i);case"si16":return new Int16Array(i);case"ur16":return new Uint16Array(i);case"si32":return new Int32Array(i);case"ui32":return new Uint32Array(i);case"fl32":return new Float32Array(i);case"fl64":return new Float64Array(i);default:throw new Error("Unkown type: "+o);}},stringToBuffer:E,bufferToString:C},Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,o={db:null};if(e)for(var n in e)o[n]="string"==typeof e[n]?e[n]:e[n].toString();var a=new B(function(e,n){try{o.db=openDatabase(o.name,o.version+"",o.description,o.size)}catch(t){return n(t)}o.db.transaction(function(a){A(a,o,function(){t._dbInfo=o,e()},function(e,t){n(t)})},n)});return o.serializer=$,a},_support:function(){return"function"==typeof openDatabase}(),iterate:function(e,t){var o=this,n=new B(function(n,a){o.ready().then(function(){var s=o._dbInfo;s.db.transaction(function(o){T(o,s,"SELECT * FROM "+s.storeName,[],function(o,t){for(var a=t.rows,r=a.length,l=0;l<r;l++){var d=a.item(l),c=d.value;if(c&&(c=s.serializer.deserialize(c)),c=e(c,d.key,l+1),void 0!==c)return void n(c)}n()},function(e,t){a(t)})})})["catch"](a)});return a(n,t),n},getItem:function(e,t){var o=this;e=i(e);var n=new B(function(n,a){o.ready().then(function(){var s=o._dbInfo;s.db.transaction(function(o){T(o,s,"SELECT * FROM "+s.storeName+" WHERE key = ? LIMIT 1",[e],function(e,t){var o=t.rows.length?t.rows.item(0).value:null;o&&(o=s.serializer.deserialize(o)),n(o)},function(e,t){a(t)})})})["catch"](a)});return a(n,t),n},setItem:function(e,t,o){return j.apply(this,[e,t,o,1])},removeItem:function(e,t){var o=this;e=i(e);var n=new B(function(t,n){o.ready().then(function(){var a=o._dbInfo;a.db.transaction(function(o){T(o,a,"DELETE FROM "+a.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){n(t)})})})["catch"](n)});return a(n,t),n},clear:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(a){T(a,n,"DELETE FROM "+n.storeName,[],function(){e()},function(e,t){o(t)})})})["catch"](o)});return a(o,e),o},length:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(a){T(a,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],function(o,t){var n=t.rows.item(0).c;e(n)},function(e,t){o(t)})})})["catch"](o)});return a(o,e),o},key:function(e,t){var o=this,n=new B(function(n,a){o.ready().then(function(){var s=o._dbInfo;s.db.transaction(function(o){T(o,s,"SELECT key FROM "+s.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,t){var o=t.rows.length?t.rows.item(0).key:null;n(o)},function(e,t){a(t)})})})["catch"](a)});return a(n,t),n},keys:function(e){var t=this,o=new B(function(e,o){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(a){T(a,n,"SELECT key FROM "+n.storeName,[],function(o,t){for(var n=[],a=0;a<t.rows.length;a++)n.push(t.rows.item(a).key);e(n)},function(e,t){o(t)})})})["catch"](o)});return a(o,e),o},dropInstance:function(e,t){t=r.apply(this,arguments);var o=this.config();e="function"!=typeof e&&e||{},e.name||(e.name=e.name||o.name,e.storeName=e.storeName||o.storeName);var n=this,s;return s=e.name?new B(function(t){var a;a=e.name===o.name?n._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:a,storeNames:[e.storeName]}):t(N(a))}).then(function(e){return new B(function(t,o){e.db.transaction(function(n){function a(e){return new B(function(t,o){n.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){o(t)})})}for(var s=[],r=0,l=e.storeNames.length;r<l;r++)s.push(a(e.storeNames[r]));B.all(s).then(function(){t()})["catch"](function(t){o(t)})},function(e){o(e)})})}):B.reject("Invalid arguments"),a(s,t),s}},Y={_driver:"localStorageWrapper",_initStorage:function(e){var t=this,o={};if(e)for(var n in e)o[n]=e[n];return(o.keyPrefix=I(e,t._defaultConfig),!R())?B.reject():(t._dbInfo=o,o.serializer=$,B.resolve())},_support:M(),iterate:function(e,t){var o=this,n=o.ready().then(function(){for(var t=o._dbInfo,n=t.keyPrefix,a=n.length,s=localStorage.length,r=1,l=0,d;l<s;l++)if(d=localStorage.key(l),0===d.indexOf(n)){var c=localStorage.getItem(d);if(c&&(c=t.serializer.deserialize(c)),c=e(c,d.substring(a),r++),void 0!==c)return c}});return a(n,t),n},getItem:function(e,t){var o=this;e=i(e);var n=o.ready().then(function(){var t=o._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n});return a(n,t),n},setItem:function(e,t,o){var n=this;e=i(e);var s=n.ready().then(function(){void 0===t&&(t=null);var o=t;return new B(function(a,s){var i=n._dbInfo;i.serializer.serialize(t,function(t,n){if(n)s(n);else try{localStorage.setItem(i.keyPrefix+e,t),a(o)}catch(t){("QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&s(t),s(t)}})})});return a(s,o),s},removeItem:function(e,t){var o=this;e=i(e);var n=o.ready().then(function(){var t=o._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return a(n,t),n},clear:function(e){var t=this,o=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,o=localStorage.length-1,n;0<=o;o--)n=localStorage.key(o),0===n.indexOf(e)&&localStorage.removeItem(n)});return a(o,e),o},length:function(e){var t=this,o=t.keys().then(function(e){return e.length});return a(o,e),o},key:function(e,t){var o=this,n=o.ready().then(function(){var t=o._dbInfo,n;try{n=localStorage.key(e)}catch(e){n=null}return n&&(n=n.substring(t.keyPrefix.length)),n});return a(n,t),n},keys:function(e){var t=this,o=t.ready().then(function(){for(var e=t._dbInfo,o=localStorage.length,n=[],a=0,s;a<o;a++)s=localStorage.key(a),0===s.indexOf(e.keyPrefix)&&n.push(s.substring(e.keyPrefix.length));return n});return a(o,e),o},dropInstance:function(e,t){if(t=r.apply(this,arguments),e="function"!=typeof e&&e||{},!e.name){var o=this.config();e.name=e.name||o.name,e.storeName=e.storeName||o.storeName}var n=this,s;return s=e.name?new B(function(t){e.storeName?t(I(e,n._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1,o;0<=t;t--)o=localStorage.key(t),0===o.indexOf(e)&&localStorage.removeItem(o)}):B.reject("Invalid arguments"),a(s,t),s}},X=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},K=function(e,t){for(var o=e.length,n=0;n<o;){if(X(e[n],t))return!0;n++}return!1},Z=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},ee={},te={},oe={INDEXEDDB:U,WEBSQL:Q,LOCALSTORAGE:Y},ne=[oe.INDEXEDDB._driver,oe.WEBSQL._driver,oe.LOCALSTORAGE._driver],ae=["dropInstance"],se=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ae),ie={description:"",driver:ne.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},re=function(){function e(t){for(var n in o(this,e),oe)if(oe.hasOwnProperty(n)){var a=oe[n],s=a._driver;this[n]=s,ee[s]||this.defineDriver(a)}this._defaultConfig=L({},ie),this._config=L({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)["catch"](function(){})}return e.prototype.config=function(e){if("object"===("undefined"==typeof e?"undefined":P(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"==t&&(e[t]=e[t].replace(/\W/g,"_")),"version"==t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e&&e.driver)||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,o){var n=new B(function(t,o){try{var n=e._driver,s=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void o(s);for(var r=se.concat("_initStorage"),l=0,d=r.length;l<d;l++){var c=r[l],p=!K(ae,c);if((p||e[c])&&"function"!=typeof e[c])return void o(s)}var u=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),o=B.reject(t);return a(o,arguments[arguments.length-1]),o}},o=0,n=ae.length,s;o<n;o++)s=ae[o],e[s]||(e[s]=t(s))};u();var m=function(o){ee[n]&&console.info("Redefining LocalForage driver: "+n),ee[n]=e,te[n]=o,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(m,o):m(!!e._support):m(!0)}catch(t){o(t)}});return s(n,t,o),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,o){var n=ee[e]?B.resolve(ee[e]):B.reject(new Error("Driver not found."));return s(n,t,o),n},e.prototype.getSerializer=function(e){var t=B.resolve($);return s(t,e),t},e.prototype.ready=function(e){var t=this,o=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return s(o,e,e),o},e.prototype.setDriver=function(e,t,o){function n(){r._config.driver=r.driver()}function a(e){return r._extend(e),n(),r._ready=r._initStorage(r._config),r._ready}function i(e){return function(){function t(){for(;o<e.length;){var s=e[o];return o++,r._dbInfo=null,r._ready=null,r.getDriver(s).then(a)["catch"](t)}n();var i=new Error("No available storage method found.");return r._driverSet=B.reject(i),r._driverSet}var o=0;return t()}}var r=this;Z(e)||(e=[e]);var l=this._getSupportedDrivers(e),d=null===this._driverSet?B.resolve():this._driverSet["catch"](function(){return B.resolve()});return this._driverSet=d.then(function(){var e=l[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,n(),r._wrapLibraryMethodsWithReady(),r._initDriver=i(l)})})["catch"](function(){n();var e=new Error("No available storage method found.");return r._driverSet=B.reject(e),r._driverSet}),s(this._driverSet,t,o),this._driverSet},e.prototype.supports=function(e){return!!te[e]},e.prototype._extend=function(e){L(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],o=0,n=e.length,a;o<n;o++)a=e[o],this.supports(a)&&t.push(a);return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=se.length;e<t;e++)D(this,se[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),le=new re;t.exports=le},{3:3}]},{},[4])(4)})}).call(this,o(14))},function(e,t,o){var n=o(40),a=o(48);e.exports=function(e){return null!=e&&a(e.length)&&!n(e)}},function(e,t,o){var n=o(69),a=o(73),s=o(18);e.exports=function(e){return s(e)?n(e):a(e)}},function(e,t,o){var n,a,s;(function(i,r){'use strict';e.exports?e.exports=r(o(110),o(111),o(112)):(a=[o(110),o(111),o(112)],n=r,s="function"==typeof n?n.apply(t,a):n,!(s!==void 0&&(e.exports=s)))})(this,function(e,t,o,n){'use strict';function a(e,t){var o=1<=arguments.length,n=2<=arguments.length;if(!(this instanceof a))return o?n?new a(e,t):new a(e):new a;if(void 0===e){if(o)throw new TypeError("undefined is not a valid argument for URI");e="undefined"==typeof location?"":location.href+""}if(null===e&&o)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0===t?this:this.absoluteTo(t)}function s(e){return /^[0-9]+$/.test(e)}function i(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function r(e){return void 0===e?"Undefined":(Object.prototype.toString.call(e)+"").slice(8,-1)}function d(e){return"Array"===r(e)}function c(e,t){var o={},n,a;if("RegExp"===r(t))o=null;else if(d(t))for(n=0,a=t.length;n<a;n++)o[t[n]]=!0;else o[t]=!0;for(n=0,a=e.length;n<a;n++){var s=o&&void 0!==o[e[n]]||!o&&t.test(e[n]);s&&(e.splice(n,1),a--,n--)}return e}function u(e,t){var o,n;if(d(t)){for(o=0,n=t.length;o<n;o++)if(!u(e,t[o]))return!1;return!0}var a=r(t);for(o=0,n=e.length;o<n;o++)if("RegExp"===a){if("string"==typeof e[o]&&e[o].match(t))return!0;}else if(e[o]===t)return!0;return!1}function m(e,t){if(!d(e)||!d(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var o=0,n=e.length;o<n;o++)if(e[o]!==t[o])return!1;return!0}function g(e){return e.replace(/^\/+|\/+$/g,"")}function h(e){return escape(e)}function _(e){return encodeURIComponent(e).replace(/[!'()*]/g,h).replace(/\*/g,"%2A")}function f(e){return function(t,o){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!o),this)}}function b(e,t){return function(o,n){return void 0===o?this._parts[e]||"":(null!==o&&(o+="",o.charAt(0)===t&&(o=o.substring(1))),this._parts[e]=o,this.build(!n),this)}}var v=n&&n.URI;a.version="1.19.1";var y=a.prototype,l=Object.prototype.hasOwnProperty;a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return"input"===t&&"image"!==e.type?void 0:a.domAttributes[t]}},a.encode=_,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=_,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(e,t){var o=a.encode(e+"");return void 0===t&&(t=a.escapeQuerySpace),t?o.replace(/%20/g,"+"):o},a.decodeQuery=function(t,o){t+="",void 0===o&&(o=a.escapeQuerySpace);try{return a.decode(o?t.replace(/\+/g,"%20"):t)}catch(o){return t}};var p={encode:"encode",decode:"decode"},x=function(e,t){return function(o){try{return a[t](o+"").replace(a.characters[e][t].expression,function(o){return a.characters[e][t].map[o]})}catch(t){return o}}},S;for(S in p)a[S+"PathSegment"]=x("pathname",p[S]),a[S+"UrnPathSegment"]=x("urnpath",p[S]);var w=function(e,t,o){return function(n){var s=o?function(e){return a[t](a[o](e))}:a[t];for(var r=(n+"").split(e),l=0,d=r.length;l<d;l++)r[l]=s(r[l]);return r.join(e)}};a.decodePath=w("/","decodePathSegment"),a.decodeUrnPath=w(":","decodeUrnPathSegment"),a.recodePath=w("/","encodePathSegment","decode"),a.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),a.encodeReserved=x("reserved","encode"),a.parse=function(e,t){var o;return t||(t={preventInvalidHostname:a.preventInvalidHostname}),o=e.indexOf("#"),-1<o&&(t.fragment=e.substring(o+1)||null,e=e.substring(0,o)),o=e.indexOf("?"),-1<o&&(t.query=e.substring(o+1)||null,e=e.substring(0,o)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=a.parseAuthority(e,t)):(o=e.indexOf(":"),-1<o&&(t.protocol=e.substring(0,o)||null,t.protocol&&!t.protocol.match(a.protocol_expression)?t.protocol=void 0:"//"===e.substring(o+1,o+3)?(e=e.substring(o+3),e=a.parseAuthority(e,t)):(e=e.substring(o+1),t.urn=!0))),t.path=e,t},a.parseHost=function(e,o){e||(e=""),e=e.replace(/\\/g,"/");var n=e.indexOf("/"),s,i;if(-1===n&&(n=e.length),"["===e.charAt(0))s=e.indexOf("]"),o.hostname=e.substring(1,s)||null,o.port=e.substring(s+2,n)||null,"/"===o.port&&(o.port=null);else{var r=e.indexOf(":"),l=e.indexOf("/"),d=e.indexOf(":",r+1);-1!==d&&(-1===l||d<l)?(o.hostname=e.substring(0,n)||null,o.port=null):(i=e.substring(0,n).split(":"),o.hostname=i[0]||null,o.port=i[1]||null)}return o.hostname&&"/"!==e.substring(n).charAt(0)&&(n++,e="/"+e),o.preventInvalidHostname&&a.ensureValidHostname(o.hostname,o.protocol),o.port&&a.ensureValidPort(o.port),e.substring(n)||"/"},a.parseAuthority=function(e,t){return e=a.parseUserinfo(e,t),a.parseHost(e,t)},a.parseUserinfo=function(e,o){var n=e.indexOf("/"),s=e.lastIndexOf("@",-1<n?n:e.length-1),i;return-1<s&&(-1===n||s<n)?(i=e.substring(0,s).split(":"),o.username=i[0]?a.decode(i[0]):null,i.shift(),o.password=i[0]?a.decode(i.join(":")):null,e=e.substring(s+1)):(o.username=null,o.password=null),e},a.parseQuery=function(e,t){if(!e)return{};if(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!e)return{};for(var o={},n=e.split("&"),s=n.length,r=0,d,c,p;r<s;r++)d=n[r].split("="),c=a.decodeQuery(d.shift(),t),p=d.length?a.decodeQuery(d.join("="),t):null,l.call(o,c)?(("string"==typeof o[c]||null===o[c])&&(o[c]=[o[c]]),o[c].push(p)):o[c]=p;return o},a.build=function(e){var o="";return e.protocol&&(o+=e.protocol+":"),!e.urn&&(o||e.hostname)&&(o+="//"),o+=a.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&"string"==typeof e.hostname&&(o+="/"),o+=e.path),"string"==typeof e.query&&e.query&&(o+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(o+="#"+e.fragment),o},a.buildHost=function(e){var o="";return e.hostname?(o+=a.ip6_expression.test(e.hostname)?"["+e.hostname+"]":e.hostname,e.port&&(o+=":"+e.port),o):""},a.buildAuthority=function(e){return a.buildUserinfo(e)+a.buildHost(e)},a.buildUserinfo=function(e){var o="";return e.username&&(o+=a.encode(e.username)),e.password&&(o+=":"+a.encode(e.password)),o&&(o+="@"),o},a.buildQuery=function(e,o,n){var s="",r,c,p,u;for(c in e)if(l.call(e,c)&&c)if(d(e[c]))for(r={},p=0,u=e[c].length;p<u;p++)void 0!==e[c][p]&&void 0===r[e[c][p]+""]&&(s+="&"+a.buildQueryParameter(c,e[c][p],n),!0!==o&&(r[e[c][p]+""]=!0));else void 0!==e[c]&&(s+="&"+a.buildQueryParameter(c,e[c],n));return s.substring(1)},a.buildQueryParameter=function(e,t,o){return a.encodeQuery(e,o)+(null===t?"":"="+a.encodeQuery(t,o))},a.addQuery=function(e,t,o){if("object"==typeof t)for(var n in t)l.call(t,n)&&a.addQuery(e,n,t[n]);else if("string"==typeof t){if(void 0===e[t])return void(e[t]=o);"string"==typeof e[t]&&(e[t]=[e[t]]),d(o)||(o=[o]),e[t]=(e[t]||[]).concat(o)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(e,t,o){if("object"==typeof t)for(var n in t)l.call(t,n)&&a.setQuery(e,n,t[n]);else if("string"==typeof t)e[t]=void 0===o?null:o;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(e,t,o){var n,s,p;if(d(t))for(n=0,s=t.length;n<s;n++)e[t[n]]=void 0;else if("RegExp"===r(t))for(p in e)t.test(p)&&(e[p]=void 0);else if("object"==typeof t)for(p in t)l.call(t,p)&&a.removeQuery(e,p,t[p]);else if("string"==typeof t)void 0===o?e[t]=void 0:"RegExp"===r(o)?!d(e[t])&&o.test(e[t])?e[t]=void 0:e[t]=c(e[t],o):e[t]!==o+""||d(o)&&1!==o.length?d(e[t])&&(e[t]=c(e[t],o)):e[t]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(e,t,o,n){switch(r(t)){case"String":break;case"RegExp":for(var s in e)if(l.call(e,s)&&t.test(s)&&(void 0===o||a.hasQuery(e,s,o)))return!0;return!1;case"Object":for(var i in t)if(l.call(t,i)&&!a.hasQuery(e,i,t[i]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(r(o)){case"Undefined":return t in e;case"Boolean":var c=d(e[t])?!!e[t].length:!!e[t];return o===c;case"Function":return!!o(e[t],t,e);case"Array":if(!d(e[t]))return!1;var p=n?u:m;return p(e[t],o);case"RegExp":return d(e[t])?!!n&&u(e[t],o):!!(e[t]&&e[t].match(o));case"Number":o+="";case"String":return d(e[t])?!!n&&u(e[t],o):e[t]===o;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}},a.joinPaths=function(){for(var e=[],t=[],o=0,n=0,r;n<arguments.length;n++){r=new a(arguments[n]),e.push(r);for(var l=r.segment(),d=0;d<l.length;d++)"string"==typeof l[d]&&t.push(l[d]),l[d]&&o++}if(!t.length||!o)return new a("");var c=new a("").segment(t);return(""===e[0].path()||"/"===e[0].path().slice(0,1))&&c.path("/"+c.path()),c.normalize()},a.commonPath=function(e,t){var o=Math.min(e.length,t.length),n;for(n=0;n<o;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return 1>n?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":(("/"!==e.charAt(n)||"/"!==t.charAt(n))&&(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},a.withinString=function(e,t,o){o||(o={});var n=o.start||a.findUri.start,s=o.end||a.findUri.end,i=o.trim||a.findUri.trim,r=o.parens||a.findUri.parens;for(n.lastIndex=0;;){var l=n.exec(e);if(!l)break;var d=l.index;if(o.ignoreHtml){var c=e.slice(Math.max(d-3,0),d);if(c&&/[a-z0-9-]=["']?$/i.test(c))continue}for(var p=d+e.slice(d).search(s),u=e.slice(d,p),m=-1,g,h;g=r.exec(u),!!g;)h=g.index+g[0].length,m=Math.max(m,h);if((u=-1<m?u.slice(0,m)+u.slice(m).replace(i,""):u.replace(i,""),!(u.length<=l[0].length))&&!(o.ignore&&o.ignore.test(u))){p=d+u.length;var _=t(u,d,p,e);if(void 0===_){n.lastIndex=p;continue}_+="",e=e.slice(0,d)+_+e.slice(p),n.lastIndex=d+_.length}}return n.lastIndex=0,e},a.ensureValidHostname=function(t,o){var n=!1;if(!!o&&(n=u(a.hostProtocols,o)),n&&!!!t)throw new TypeError("Hostname cannot be empty, if protocol is "+o);else if(t&&t.match(a.invalid_hostname_characters)){if(!e)throw new TypeError("Hostname \""+t+"\" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available");if(e.toASCII(t).match(a.invalid_hostname_characters))throw new TypeError("Hostname \""+t+"\" contains characters other than [A-Z0-9.-:_]")}},a.ensureValidPort=function(e){if(e){var t=+e;if(!(s(t)&&0<t&&65536>t))throw new TypeError("Port \""+e+"\" is not a valid port")}},a.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=v),this},y.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},y.clone=function(){return new a(this)},y.valueOf=y.toString=function(){return this.build(!1)._string},y.protocol=f("protocol"),y.username=f("username"),y.password=f("password"),y.hostname=f("hostname"),y.port=f("port"),y.query=b("query","?"),y.fragment=b("fragment","#"),y.search=function(e,o){var n=this.query(e,o);return"string"==typeof n&&n.length?"?"+n:n},y.hash=function(e,o){var n=this.fragment(e,o);return"string"==typeof n&&n.length?"#"+n:n},y.pathname=function(e,t){if(void 0===e||!0===e){var o=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?a.decodeUrnPath:a.decodePath)(o):o}return this._parts.path=this._parts.urn?e?a.recodeUrnPath(e):"":e?a.recodePath(e):"/",this.build(!t),this},y.path=y.pathname,y.href=function(e,t){if(void 0===e)return this.toString();this._string="",this._parts=a._parts();var o=e instanceof a,n="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){var s=a.getDomAttribute(e);e=e[s]||"",n=!1}if(!o&&n&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=a.parse(e+"",this._parts);else if(o||n){var i=o?e._parts:e;for(var r in i)"query"!==r&&l.call(this._parts,r)&&(this._parts[r]=i[r]);i.query&&this.query(i.query,!1)}else throw new TypeError("invalid input");return this.build(!t),this},y.is=function(e){var t=!1,n=!1,s=!1,i=!1,r=!1,l=!1,d=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,n=a.ip4_expression.test(this._parts.hostname),s=a.ip6_expression.test(this._parts.hostname),t=n||s,i=!t,r=i&&o&&o.has(this._parts.hostname),l=i&&a.idn_expression.test(this._parts.hostname),d=i&&a.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return i;case"sld":return r;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return s;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return d;}return null};var k=y.protocol,E=y.port,C=y.hostname;y.protocol=function(e,t){if(e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(a.protocol_expression)))throw new TypeError("Protocol \""+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,e,t)},y.scheme=y.protocol,y.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),a.ensureValidPort(e))),E.call(this,e,t))},y.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var o={preventInvalidHostname:this._parts.preventInvalidHostname},n=a.parseHost(e,o);if("/"!==n)throw new TypeError("Hostname \""+e+"\" contains characters other than [A-Z0-9.-]");e=o.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(e,this._parts.protocol)}return C.call(this,e,t)},y.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var o=this.protocol(),n=this.authority();return n?(o?o+"://":"")+this.authority():""}var s=a(e);return this.protocol(s.protocol()).authority(s.authority()).build(!t),this},y.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildHost(this._parts):"";var o=a.parseHost(e,this._parts);if("/"!==o)throw new TypeError("Hostname \""+e+"\" contains characters other than [A-Z0-9.-]");return this.build(!t),this},y.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildAuthority(this._parts):"";var o=a.parseAuthority(e,this._parts);if("/"!==o)throw new TypeError("Hostname \""+e+"\" contains characters other than [A-Z0-9.-]");return this.build(!t),this},y.userinfo=function(e,o){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=a.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),a.parseUserinfo(e,this._parts),this.build(!o),this},y.resource=function(e,t){var o;return void 0===e?this.path()+this.search()+this.hash():(o=a.parse(e),this._parts.path=o.path,this._parts.query=o.query,this._parts.fragment=o.fragment,this.build(!t),this)},y.subdomain=function(t,o){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var s=this._parts.hostname.length-this.domain().length,e=this._parts.hostname.substring(0,s),r=new RegExp("^"+i(e));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&a.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(r,t),this.build(!o),this},y.domain=function(e,o){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(o=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&2>n.length)return this._parts.hostname;var t=this._parts.hostname.length-this.tld(o).length-1;return t=this._parts.hostname.lastIndexOf(".",t-1)+1,this._parts.hostname.substring(t)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var s=new RegExp(i(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(s,e)}return this.build(!o),this},y.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),a=this._parts.hostname.substring(n+1);return!0!==t&&o&&o.list[a.toLowerCase()]?o.get(this._parts.hostname)||a:a}var s;if(!e)throw new TypeError("cannot set TLD empty");else if(e.match(/[^a-zA-Z0-9-]/)){if(o&&o.is(e))s=new RegExp(i(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e);else throw new TypeError("TLD \""+e+"\" contains characters other than [A-Z0-9]");}else if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");else s=new RegExp(i(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e);return this.build(!t),this},y.directory=function(t,o){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,s=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?a.decodePath(s):s}var r=this._parts.path.length-this.filename().length,e=this._parts.path.substring(0,r),l=new RegExp("^"+i(e));return this.is("relative")||(!t&&(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=a.recodePath(t),this._parts.path=this._parts.path.replace(l,t),this.build(!o),this},y.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var o=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(o+1);return e?a.decodePathSegment(n):n}var s=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(s=!0);var r=new RegExp(i(this.filename())+"$");return e=a.recodePath(e),this._parts.path=this._parts.path.replace(r,e),s?this.normalizePath(t):this.build(!t),this},y.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var o=this.filename(),n=o.lastIndexOf("."),r,l;return-1===n?"":(r=o.substring(n+1),l=/^[a-z0-9%]+$/i.test(r)?r:"",e?a.decodePathSegment(l):l)}"."===e.charAt(0)&&(e=e.substring(1));var d=this.suffix(),c;if(!d){if(!e)return this;this._parts.path+="."+a.recodePath(e)}else c=e?new RegExp(i(d)+"$"):new RegExp(i("."+d)+"$");return c&&(e=a.recodePath(e),this._parts.path=this._parts.path.replace(c,e)),this.build(!t),this},y.segment=function(e,t,o){var n=this._parts.urn?":":"/",a=this.path(),s="/"===a.substring(0,1),r=a.split(n);if(void 0!==e&&"number"!=typeof e&&(o=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error("Bad segment \""+e+"\", must be 0-based integer");if(s&&r.shift(),0>e&&(e=Math.max(r.length+e,0)),void 0===t)return void 0===e?r:r[e];if(null!==e&&void 0!==r[e])t?r[e]=g(t):r.splice(e,1);else if(d(t)){r=[];for(var c=0,p=t.length;c<p;c++)(t[c].length||r.length&&r[r.length-1].length)&&(r.length&&!r[r.length-1].length&&r.pop(),r.push(g(t[c])))}else(t||"string"==typeof t)&&(t=g(t),""===r[r.length-1]?r[r.length-1]=t:r.push(t));return s&&r.unshift(""),this.path(r.join(n),o)},y.segmentCoded=function(e,t,o){var n,s,r;if("number"!=typeof e&&(o=t,t=e,e=void 0),void 0===t){if(n=this.segment(e,t,o),!d(n))n=void 0===n?void 0:a.decode(n);else for(s=0,r=n.length;s<r;s++)n[s]=a.decode(n[s]);return n}if(!d(t))t="string"==typeof t||t instanceof String?a.encode(t):t;else for(s=0,r=t.length;s<r;s++)t[s]=a.encode(t[s]);return this.segment(e,t,o)};var A=y.query;return y.query=function(e,t){if(!0===e)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var o=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,o);return this._parts.query=a.buildQuery(n||o,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=a.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):A.call(this,e,t)},y.setQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0===t?null:t;else if("object"==typeof e)for(var s in e)l.call(e,s)&&(n[s]=e[s]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(o=t),this.build(!o),this},y.addQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(n,e,void 0===t?null:t),this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(o=t),this.build(!o),this},y.removeQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(n,e,t),this._parts.query=a.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(o=t),this.build(!o),this},y.hasQuery=function(e,t,o){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(n,e,t,o)},y.setSearch=y.setQuery,y.addSearch=y.addQuery,y.removeSearch=y.removeQuery,y.hasSearch=y.hasQuery,y.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},y.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},y.normalizeHostname=function(o){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!o)),this},y.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},y.normalizePath=function(e){var t=this._parts.path;if(!t)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;t=a.recodePath(t);var o="",n,s,i;for("/"!==t.charAt(0)&&(n=!0,t="/"+t),("/.."===t.slice(-3)||"/."===t.slice(-2))&&(t+="/"),t=t.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),n&&(o=t.substring(1).match(/^(\.\.\/)+/)||"",o&&(o=o[0]));s=t.search(/\/\.\.(\/|$)/),-1!==s;){if(0===s){t=t.substring(3);continue}i=t.substring(0,s).lastIndexOf("/"),-1===i&&(i=s),t=t.substring(0,i)+t.substring(s+3)}return n&&this.is("relative")&&(t=o+t.substring(1)),this._parts.path=t,this.build(!e),this},y.normalizePathname=y.normalizePath,y.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},y.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},y.normalizeSearch=y.normalizeQuery,y.normalizeHash=y.normalizeFragment,y.iso8859=function(){var t=a.encode,e=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=t,a.decode=e}return this},y.unicode=function(){var t=a.encode,e=a.decode;a.encode=_,a.decode=unescape;try{this.normalize()}finally{a.encode=t,a.decode=e}return this},y.readable=function(){var o=this.clone();o.username("").password("").normalize();var n="";if(o._parts.protocol&&(n+=o._parts.protocol+"://"),o._parts.hostname&&(o.is("punycode")&&e?(n+=e.toUnicode(o._parts.hostname),o._parts.port&&(n+=":"+o._parts.port)):n+=o.host()),o._parts.hostname&&o._parts.path&&"/"!==o._parts.path.charAt(0)&&(n+="/"),n+=o.path(!0),o._parts.query){for(var s="",r=0,d=o._parts.query.split("&"),c=d.length,l;r<c;r++)l=(d[r]||"").split("="),s+="&"+a.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==l[1]&&(s+="="+a.decodeQuery(l[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"));n+="?"+s.substring(1)}return n+=a.decodeQuery(o.hash(),!0),n},y.absoluteTo=function(e){var t=this.clone(),o=["protocol","username","password","hostname","port"],n,s,r;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof a||(e=new a(e)),t._parts.protocol)return t;if(t._parts.protocol=e._parts.protocol,this._parts.hostname)return t;for(s=0;r=o[s];s++)t._parts[r]=e._parts[r];return t._parts.path?(".."===t._parts.path.substring(-2)&&(t._parts.path+="/"),"/"!==t.path().charAt(0)&&(n=e.directory(),n=n?n:0===e.path().indexOf("/")?"/":"",t._parts.path=(n?n+"/":"")+t._parts.path,t.normalizePath())):(t._parts.path=e._parts.path,!t._parts.query&&(t._parts.query=e._parts.query)),t.build(),t},y.relativeTo=function(e){var t=this.clone().normalize(),o,n,s,i,r;if(t._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new a(e).normalize(),o=t._parts,n=e._parts,i=t.path(),r=e.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==r.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(o.protocol===n.protocol&&(o.protocol=null),o.username!==n.username||o.password!==n.password)return t.build();if(null!==o.protocol||null!==o.username||null!==o.password)return t.build();if(o.hostname===n.hostname&&o.port===n.port)o.hostname=null,o.port=null;else return t.build();if(i===r)return o.path="",t.build();if(s=a.commonPath(i,r),!s)return t.build();var l=n.path.substring(s.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return o.path=l+o.path.substring(s.length)||"./",t.build()},y.equals=function(e){var t=this.clone(),o=new a(e),n={},s={},i={},r,c,p;if(t.normalize(),o.normalize(),t.toString()===o.toString())return!0;if(r=t.query(),c=o.query(),t.query(""),o.query(""),t.toString()!==o.toString())return!1;if(r.length!==c.length)return!1;for(p in n=a.parseQuery(r,this._parts.escapeQuerySpace),s=a.parseQuery(c,this._parts.escapeQuerySpace),n)if(l.call(n,p)){if(!d(n[p])){if(n[p]!==s[p])return!1;}else if(!m(n[p],s[p]))return!1;i[p]=!0}for(p in s)if(l.call(s,p)&&!i[p])return!1;return!0},y.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},y.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},y.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},a})},function(e,t,o){var n=o(84),a=o(18),s=o(85),i=o(47),r=o(59),l=Math.max;e.exports=function(e,t,o,d){e=a(e)?e:r(e),o=o&&!d?i(o):0;var c=e.length;return 0>o&&(o=l(c+o,0)),s(e)?o<=c&&-1<e.indexOf(t,o):!!c&&-1<n(e,t,o)}},function(e){e.exports=function(e,t){var o=typeof e;return t=null==t?9007199254740991:t,!!t&&("number"==o||"symbol"!=o&&/^(?:0|[1-9]\d*)$/.test(e))&&-1<e&&0==e%1&&e<t}},function(e){e.exports=function(e){return e}},function(e,t,o){var n=o(28);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-(1/0)?"-0":t}},function(e,t,o){e.exports=o(338)},function(e,t,o){e.exports=o(352)},function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],!e.children&&(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,o){var n=o(15),a=o(11);e.exports=function(e){return"symbol"==typeof e||a(e)&&n(e)=="[object Symbol]"}},function(e,t,o){var n=o(5),a=n.Symbol;e.exports=a},function(e){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,o){var n=o(51),a=o(9);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);}var o=n(e.prototype),s=e.apply(o,t);return a(s)?s:o}}},function(e){e.exports=function(e,t){for(var o=-1,n=e.length,a=0,s=[];++o<n;){var i=e[o];(i===t||i==="__lodash_placeholder__")&&(e[o]="__lodash_placeholder__",s[a++]=o)}return s}},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}var a=o(389),s=o(390),i=o(391),r=o(392),l=o(393);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=i,n.prototype.has=r,n.prototype.set=l,e.exports=n},function(e,t,o){var n=o(30);e.exports=function(e,t){for(var o=e.length;o--;)if(n(e[o][0],t))return o;return-1}},function(e,t,o){var n=o(16),a=n(Object,"create");e.exports=a},function(e,t,o){var n=o(407);e.exports=function(e,t){var o=e.__data__;return n(t)?o["string"==typeof t?"string":"hash"]:o.map}},function(e,t,o){var n=o(6),a=o(58),s=o(430),i=o(108);e.exports=function(e,t){return n(e)?e:a(e,t)?[e]:s(i(e))}},function(e,t,o){var n,a,s;(function(i){a=[o(46),o(10)],n=i,s="function"==typeof n?n.apply(t,a):n,!(s!==void 0&&(e.exports=s))})(function(e,t){var o="undefined"!=typeof Element&&Element.prototype||{},n=o.addEventListener?function(e,t){return this.addEventListener(e,t,!1)}:function(e,t){return this.attachEvent("on"+e,t)},a=o.removeEventListener?function(e,t){return this.removeEventListener(e,t,!1)}:function(e,t){return this.detachEvent("on"+e,t)},s=function(e,t){for(var o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},i=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||function(e){var t=(this.parentNode||document).querySelectorAll(e)||[];return~s(t,this)},r=t.View;return t.NativeViewMixin={_domEvents:null,constructor:function(){return this._domEvents=[],r.apply(this,arguments)},$:function(e){return this.el.querySelectorAll(e)},_removeElement:function(){this.undelegateEvents(),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},_setElement:function(t){if("string"!=typeof t)this.el=t&&!e.isElement(t)&&t.length?t[0]:t;else if(/^\s*</.test(t)){var o=document.createElement("div");o.innerHTML=t,this.el=o.firstChild}else this.el=document.querySelector(t)},_setAttributes:function(e){for(var t in e)t in this.el?this.el[t]=e[t]:this.el.setAttribute(t,e[t])},delegate:function(e,t,o){var a=this.el;if(a){if("function"==typeof t&&(o=t,t=null),-1!==["focus","blur"].indexOf(e)){for(var s=this.el.querySelectorAll(t),r=0,l=s.length,d;r<l;r++)d=s[r],n.call(d,e,o,!1),this._domEvents.push({el:d,eventName:e,handler:o});return o}var c=t?function(n){for(var e=n.target||n.srcElement;e&&e!=a;e=e.parentNode)i.call(e,t)&&(n.delegateTarget=e,o(n))}:o;return n.call(this.el,e,c,!1),this._domEvents.push({el:this.el,eventName:e,handler:c,listener:o,selector:t}),c}},undelegate:function(e,t,o){if("function"==typeof t&&(o=t,t=null),this.el)for(var n=this._domEvents.slice(),s=n.length;s--;){var r=n[s],l=r.eventName===e&&(!o||r.listener===o)&&(!t||r.selector===t);l&&(a.call(r.el,r.eventName,r.handler,!1),this._domEvents.splice(s,1))}return this},undelegateEvents:function(){if(this.el){for(var e=0,t=this._domEvents.length,o;e<t;e++)o=this._domEvents[e],a.call(o.el,o.eventName,o.handler,!1);this._domEvents.length=0}return this}},t.NativeView=t.View.extend(t.NativeViewMixin),t.NativeView})},function(){if("function"==typeof Blob&&("undefined"==typeof FormData||!FormData.prototype.keys)){function e([e,t]){return e instanceof Blob&&(e=new File([e],t,{type:e.type,lastModified:e.lastModified})),e}function t(e,t){if(e.length<t)throw new TypeError(`${t} argument required, but only ${e.length} present.`)}function o(e,t,o){return t instanceof Blob?[e+"",t,void 0===o?"string"==typeof t.name?t.name:"blob":o+""]:[e+"",t+""]}function n(e){return e.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n")}function a(e,t){for(let o=0;o<e.length;o++)t(e[o])}const s="object"==typeof window?window:"object"==typeof self?self:this,i=s.FormData,r=s.XMLHttpRequest&&s.XMLHttpRequest.prototype.send,l=s.Request&&s.fetch,d=s.navigator&&s.navigator.sendBeacon,p=s.Symbol&&Symbol.toStringTag;p&&(!Blob.prototype[p]&&(Blob.prototype[p]="Blob"),"File"in s&&!File.prototype[p]&&(File.prototype[p]="File"));try{new File([],"")}catch(e){s.File=function(e,o,n){const a=new Blob(e,n),s=n&&void 0!==n.lastModified?new Date(n.lastModified):new Date;return Object.defineProperties(a,{name:{value:o},lastModifiedDate:{value:s},lastModified:{value:+s},toString:{value(){return"[object File]"}}}),p&&Object.defineProperty(a,p,{value:"File"}),a}}class u{constructor(e){if(this._data=Object.create(null),!e)return this;const t=this;a(e.elements,e=>{if(e.name&&!e.disabled&&"submit"!==e.type&&"button"!==e.type)if("file"===e.type){const o=e.files&&e.files.length?e.files:[new File([],"",{type:"application/octet-stream"})];a(o,o=>{t.append(e.name,o)})}else if("select-multiple"===e.type||"select-one"===e.type)a(e.options,o=>{!o.disabled&&o.selected&&t.append(e.name,o.value)});else if("checkbox"===e.type||"radio"===e.type)e.checked&&t.append(e.name,e.value);else{const o="textarea"===e.type?n(e.value):e.value;t.append(e.name,o)}})}append(e,n,a){t(arguments,2),[e,n,a]=o.apply(null,arguments);const s=this._data;s[e]||(s[e]=[]),s[e].push([n,a])}delete(e){t(arguments,1),delete this._data[e+""]}*entries(){const t=this._data;for(let o in t)for(let n of t[o])yield[o,e(n)]}forEach(e,o){t(arguments,1);for(let[t,n]of this)e.call(o,n,t,this)}get(o){t(arguments,1);const n=this._data;return o+="",n[o]?e(n[o][0]):null}getAll(o){return t(arguments,1),(this._data[o+""]||[]).map(e)}has(e){return t(arguments,1),e+""in this._data}*keys(){for(let[e]of this)yield e}set(){t(arguments,2);const e=o.apply(null,arguments);this._data[e[0]]=[[e[1],e[2]]]}*values(){for(let[,e]of this)yield e}["_asNative"](){const e=new i;for(let[t,o]of this)e.append(t,o);return e}["_blob"](){const e="----formdata-polyfill-"+Math.random(),t=[];for(let[o,n]of this)t.push(`--${e}\r\n`),n instanceof Blob?t.push(`Content-Disposition: form-data; name="${o}"; filename="${n.name}"\r\n`,`Content-Type: ${n.type||"application/octet-stream"}\r\n\r\n`,n,"\r\n"):t.push(`Content-Disposition: form-data; name="${o}"\r\n\r\n${n}\r\n`);return t.push(`--${e}--`),new Blob(t,{type:"multipart/form-data; boundary="+e})}[Symbol.iterator](){return this.entries()}toString(){return"[object FormData]"}}if(p&&(u.prototype[p]="FormData"),r){const e=s.XMLHttpRequest.prototype.setRequestHeader;s.XMLHttpRequest.prototype.setRequestHeader=function(t,o){return"content-type"===t.toLowerCase()&&(this._hasContentType=!0),e.call(this,t,o)},s.XMLHttpRequest.prototype.send=function(e){if(e instanceof u){const t=e._blob();this._hasContentType||this.setRequestHeader("Content-Type",t.type),r.call(this,t)}else r.call(this,e)}}if(l){const e=s.fetch;s.fetch=function(t,o){return o&&o.body&&o.body instanceof u&&(o.body=o.body._blob()),e.call(this,t,o)}}d&&(s.navigator.sendBeacon=function(e,t){return t instanceof u&&(t=t._asNative()),d.call(this,e,t)}),s.FormData=u}},function(e,t,o){var n=o(15),a=o(9);e.exports=function(e){if(!a(e))return!1;var t=n(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"}},function(e,t,o){"use strict";(function(t){(function(){function t(t){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=[],r=0,l=void 0,d=void 0,c=void 0,p=void 0,u=void 0,m=void 0,g=void 0,h=void 0,_=void 0,f=void 0,b=void 0,v=void 0,y=void 0,x=void 0,S=void 0,w=void 0,k=void 0;if(isNaN(t))throw new TypeError("Invalid number");return(c=!0===s.bits,y=!0===s.unix,d=s.base||2,v=void 0===s.round?y?1:2:s.round,g=void 0===s.locale?"":s.locale,h=s.localeOptions||{},x=void 0===s.separator?"":s.separator,S=void 0===s.spacer?y?"":" ":s.spacer,k=s.symbols||{},w=2===d?s.standard||"jedec":"jedec",b=s.output||"string",u=!0===s.fullform,m=s.fullforms instanceof Array?s.fullforms:[],l=void 0===s.exponent?-1:s.exponent,f=+t,_=0>f,p=2<d?1e3:1024,_&&(f=-f),(-1===l||isNaN(l))&&(l=Math.floor(Math.log(f)/Math.log(p)),0>l&&(l=0)),8<l&&(l=8),"exponent"===b)?l:(0===f?(i[0]=0,i[1]=y?"":n[w][c?"bits":"bytes"][l]):(r=f/(2===d?Math.pow(2,10*l):Math.pow(1e3,l)),c&&(r*=8,r>=p&&8>l&&(r/=p,l++)),i[0]=+r.toFixed(0<l?v:0),i[0]===p&&8>l&&void 0===s.exponent&&(i[0]=1,l++),i[1]=10===d&&1===l?c?"kb":"kB":n[w][c?"bits":"bytes"][l],y&&(i[1]="jedec"===w?i[1].charAt(0):0<l?i[1].replace(/B$/,""):i[1],o.test(i[1])&&(i[0]=Math.floor(i[0]),i[1]=""))),_&&(i[0]=-i[0]),i[1]=k[i[1]]||i[1],!0===g?i[0]=i[0].toLocaleString():0<g.length?i[0]=i[0].toLocaleString(g,h):0<x.length&&(i[0]=i[0].toString().replace(".",x)),"array"===b)?i:(u&&(i[1]=m[l]?m[l]:a[w][l]+(c?"bit":"byte")+(1===i[0]?"":"s")),"object"===b?{value:i[0],symbol:i[1]}:i.join(S))}var o=/^(b|B)$/,n={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},a={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};t.partial=function(e){return function(o){return t(o,e)}},e.exports=t})("undefined"==typeof window?t:window)}).call(this,o(14))},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_input.html -->\n<div class=\"form-group\">\n    ","hidden"!==e.type&&(t+="\n        <label for=\""+o(e.id)+"\">"+o(e.label)+"</label>\n    "),t+="\n    ","password"===e.type&&e.fixed_username&&(t+="\n        <!-- This is a hack to prevent Chrome from auto-filling the username in\n            any of the other input fields in the MUC configuration form. -->\n        <input class=\"hidden-username\" type=\"text\" autocomplete=\"username\" value=\""+o(e.fixed_username)+"\"></input>\n    "),t+="\n    <input \n        class=\"form-control\" name=\""+o(e.name)+"\" type=\""+o(e.type)+"\" id=\""+o(e.id)+"\"\n        ",e.autocomplete&&(t+=" autocomplete=\""+o(e.autocomplete)+"\" "),t+="\n        ",e.placeholder&&(t+=" placeholder=\""+o(e.placeholder)+"\" "),t+="\n        ",e.value&&(t+=" value=\""+o(e.value)+"\" "),t+="\n        ",e.required&&(t+=" required=\"required\" "),(t+=" />\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_username.html -->\n<div class=\"form-group\">\n    ",e.label&&(t+="\n    <label>\n        "+o(e.label)+"\n    </label>\n    "),t+="\n    <div class=\"input-group\">\n        <div class=\"input-group-prepend\">\n            <input name=\""+o(e.name)+"\" type=\""+o(e.type)+"\"\n                ",e.value&&(t+=" value=\""+o(e.value)+"\" "),t+="\n                ",e.required&&(t+=" required=\"required\" "),(t+=" />\n            <div class=\"input-group-text col\" title=\""+o(e.domain)+"\">"+o(e.domain)+"</div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(e){var t="",o=Array.prototype.join;return t+="<!-- src/templates/chatbox.html -->\n<div class=\"flyout box-flyout\">\n    <div class=\"chat-body\">\n        <div class=\"chat-content ",e.show_send_button&&(t+="chat-content-sendbutton"),(t+="\" aria-live=\"polite\"></div>\n        <div class=\"bottom-panel\">\n            <div class=\"emoji-picker__container dropup\"></div>\n            <div class=\"message-form-container\">\n        </div>\n    </div>\n</div>\n",t)}},function(e,t){(function(o,n){function a(e){return m.PF.compile(e||"nplurals=2; plural=(n != 1);")}function s(e,t){this._key=e,this._i18n=t}var i=Array.prototype,r=Object.prototype,l=i.slice,d=r.hasOwnProperty,c=i.forEach,p={},u={forEach:function(e,t,o){var n,a,s;if(null!==e)if(c&&e.forEach===c)e.forEach(t,o);else if(e.length===+e.length){for(n=0,a=e.length;n<a;n++)if(n in e&&t.call(o,e[n],n,e)===p)return;}else for(s in e)if(d.call(e,s)&&t.call(o,e[s],s,e)===p)return},extend:function(e){return this.forEach(l.call(arguments,1),function(t){for(var o in t)e[o]=t[o]}),e}},m=function(e){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=u.extend({},this.defaults,e),this.textdomain(this.options.domain),e.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+e.domain+"`")};m.context_delimiter=String.fromCharCode(4),u.extend(s.prototype,{onDomain:function(e){return this._domain=e,this},withContext:function(e){return this._context=e,this},ifPlural:function(e,t){return this._val=e,this._pkey=t,this},fetch:function(e){return"[object Array]"!={}.toString.call(e)&&(e=[].slice.call(arguments,0)),(e&&e.length?m.sprintf:function(e){return e})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),e)}}),u.extend(m.prototype,{translate:function(e){return new s(e,this)},textdomain:function(e){return e?void(this._textdomain=e):this._textdomain},gettext:function(e){return this.dcnpgettext.call(this,n,n,e)},dgettext:function(e,t){return this.dcnpgettext.call(this,e,n,t)},dcgettext:function(e,t){return this.dcnpgettext.call(this,e,n,t)},ngettext:function(e,t,o){return this.dcnpgettext.call(this,n,n,e,t,o)},dngettext:function(e,t,o,a){return this.dcnpgettext.call(this,e,n,t,o,a)},dcngettext:function(e,t,o,a){return this.dcnpgettext.call(this,e,n,t,o,a)},pgettext:function(e,t){return this.dcnpgettext.call(this,n,e,t)},dpgettext:function(e,t,o){return this.dcnpgettext.call(this,e,t,o)},dcpgettext:function(e,t,o){return this.dcnpgettext.call(this,e,t,o)},npgettext:function(e,t,o,a){return this.dcnpgettext.call(this,n,e,t,o,a)},dnpgettext:function(e,t,o,n,a){return this.dcnpgettext.call(this,e,t,o,n,a)},dcnpgettext:function(e,t,o,n,s){n=n||o,e=e||this._textdomain;var i;if(!this.options)return i=new m,i.dcnpgettext.call(i,void 0,void 0,o,n,s);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[e])throw new Error("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])throw new Error("No locale meta information provided.");if(!o)throw new Error("No translation key found.");var r=t?t+m.context_delimiter+o:o,l=this.options.locale_data,d=l[e],c=(l.messages||this.defaults.locale_data.messages)[""],p=d[""].plural_forms||d[""]["Plural-Forms"]||d[""]["plural-forms"]||c.plural_forms||c["Plural-Forms"]||c["plural-forms"],u,g,h;if(void 0===s)h=0;else{if("number"!=typeof s&&(s=parseInt(s,10),isNaN(s)))throw new Error("The number that was passed in is not a number.");h=a(p)(s)}if(!d)throw new Error("No domain named `"+e+"` could be found.");return(u=d[r],!u||h>u.length)?(this.options.missing_key_callback&&this.options.missing_key_callback(r,e),g=[o,n],!0===this.options.debug&&console.log(g[a(p)(s)]),g[a()(s)]):(g=u[h],g?g:(g=[o,n],g[a()(s)]))}});var g=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function t(e,t){for(var o=[];0<t;o[--t]=e);return o.join("")}var o=function(){return o.cache.hasOwnProperty(arguments[0])||(o.cache[arguments[0]]=o.parse(arguments[0])),o.format.call(null,o.cache[arguments[0]],arguments)};return o.format=function(o,n){var a=1,s=o.length,r="",l=[],d,c,p,u,m,h,_;for(c=0;c<s;c++)if(r=e(o[c]),"string"===r)l.push(o[c]);else if("array"===r){if(u=o[c],u[2])for(d=n[a],p=0;p<u[2].length;p++){if(!d.hasOwnProperty(u[2][p]))throw g("[sprintf] property \"%s\" does not exist",u[2][p]);d=d[u[2][p]]}else d=u[1]?n[u[1]]:n[a++];if(/[^s]/.test(u[8])&&"number"!=e(d))throw g("[sprintf] expecting number but found %s",e(d));switch(("undefined"==typeof d||null===d)&&(d=""),u[8]){case"b":d=d.toString(2);break;case"c":d=String.fromCharCode(d);break;case"d":d=parseInt(d,10);break;case"e":d=u[7]?d.toExponential(u[7]):d.toExponential();break;case"f":d=u[7]?parseFloat(d).toFixed(u[7]):parseFloat(d);break;case"o":d=d.toString(8);break;case"s":d=(d+="")&&u[7]?d.substring(0,u[7]):d;break;case"u":d=Math.abs(d);break;case"x":d=d.toString(16);break;case"X":d=d.toString(16).toUpperCase();}d=/[def]/.test(u[8])&&u[3]&&0<=d?"+"+d:d,h=u[4]?"0"==u[4]?"0":u[4].charAt(1):" ",_=u[6]-(d+"").length,m=u[6]?t(h,_):"",l.push(u[5]?d+m:m+d)}return l.join("")},o.cache={},o.parse=function(e){for(var t=e,o=[],n=[],a=0;t;){if(null!==(o=/^[^\x25]+/.exec(t)))n.push(o[0]);else if(null!==(o=/^\x25{2}/.exec(t)))n.push("%");else if(null!==(o=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))){if(o[2]){a|=1;var s=[],i=o[2],r=[];if(null!==(r=/^([a-z_][a-z_\d]*)/i.exec(i))){for(s.push(r[1]);""!==(i=i.substring(r[0].length));)if(null!==(r=/^\.([a-z_][a-z_\d]*)/i.exec(i)))s.push(r[1]);else if(null!==(r=/^\[(\d+)\]/.exec(i)))s.push(r[1]);else throw"[sprintf] huh?";}else throw"[sprintf] huh?";o[2]=s}else a|=2;if(3===a)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";n.push(o)}else throw"[sprintf] huh?";t=t.substring(o[0].length)}return n},o}(),h=function(e,t){return t.unshift(e),g.apply(null,t)};m.parse_plural=function(e,t){return e=e.replace(/n/g,t),m.parse_expression(e)},m.sprintf=function(e,t){return"[object Array]"=={}.toString.call(t)?h(e,[].slice.call(t)):g.apply(this,[].slice.call(arguments))},m.prototype.sprintf=function(){return m.sprintf.apply(this,arguments)},m.PF={},m.PF.parse=function(e){var t=m.PF.extractPluralExpr(e);return m.PF.parser.parse.call(m.PF.parser,t)},m.PF.compile=function(e){function t(e){return!0===e?1:e?e:0}var o=m.PF.parse(e);return function(e){return t(m.PF.interpreter(o)(e))}},m.PF.interpreter=function(e){return function(t){switch(e.type){case"GROUP":return m.PF.interpreter(e.expr)(t);case"TERNARY":return m.PF.interpreter(e.expr)(t)?m.PF.interpreter(e.truthy)(t):m.PF.interpreter(e.falsey)(t);case"OR":return m.PF.interpreter(e.left)(t)||m.PF.interpreter(e.right)(t);case"AND":return m.PF.interpreter(e.left)(t)&&m.PF.interpreter(e.right)(t);case"LT":return m.PF.interpreter(e.left)(t)<m.PF.interpreter(e.right)(t);case"GT":return m.PF.interpreter(e.left)(t)>m.PF.interpreter(e.right)(t);case"LTE":return m.PF.interpreter(e.left)(t)<=m.PF.interpreter(e.right)(t);case"GTE":return m.PF.interpreter(e.left)(t)>=m.PF.interpreter(e.right)(t);case"EQ":return m.PF.interpreter(e.left)(t)==m.PF.interpreter(e.right)(t);case"NEQ":return m.PF.interpreter(e.left)(t)!=m.PF.interpreter(e.right)(t);case"MOD":return m.PF.interpreter(e.left)(t)%m.PF.interpreter(e.right)(t);case"VAR":return t;case"NUM":return e.val;default:throw new Error("Invalid Token found.");}}},m.PF.extractPluralExpr=function(e){e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(e)||(e=e.concat(";"));var t=/nplurals\=(\d+);/,o=e.match(t),n;if(1<o.length)({}).nplurals=o[1];else throw new Error("nplurals not found in plural_forms string: "+e);if(e=e.replace(t,""),n=e.match(/plural\=(.*);/),!(n&&1<n.length))throw new Error("`plural` expression not found: "+e);return n[1]},m.PF.parser=function(){var e={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(e,t,o,n,a,s){var i=s.length-1;switch(a){case 1:return{type:"GROUP",expr:s[i-1]};break;case 2:this.$={type:"TERNARY",expr:s[i-4],truthy:s[i-2],falsey:s[i]};break;case 3:this.$={type:"OR",left:s[i-2],right:s[i]};break;case 4:this.$={type:"AND",left:s[i-2],right:s[i]};break;case 5:this.$={type:"LT",left:s[i-2],right:s[i]};break;case 6:this.$={type:"LTE",left:s[i-2],right:s[i]};break;case 7:this.$={type:"GT",left:s[i-2],right:s[i]};break;case 8:this.$={type:"GTE",left:s[i-2],right:s[i]};break;case 9:this.$={type:"NEQ",left:s[i-2],right:s[i]};break;case 10:this.$={type:"EQ",left:s[i-2],right:s[i]};break;case 11:this.$={type:"MOD",left:s[i-2],right:s[i]};break;case 12:this.$={type:"GROUP",expr:s[i-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:+e};}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(e){throw new Error(e)},parse:function(e){function t(e){a.length-=2*e,s.length-=e,i.length-=e}function o(){var e;return e=n.lexer.lex()||1,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,a=[0],s=[null],i=[],l=this.table,d="",c=0,u=0,m=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var g=this.lexer.yylloc;i.push(g),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var h={},_,f,b,v,y,x,S,w,k;;){b=a[a.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==_&&(_=o()),v=l[b]&&l[b][_]);_handle_error:if("undefined"==typeof v||!v.length||!v[0]){if(!m){for(x in k=[],l[b])this.terminals_[x]&&2<x&&k.push("'"+this.terminals_[x]+"'");var E="";E=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+this.terminals_[_]+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[_]||_,line:this.lexer.yylineno,loc:g,expected:k})}if(3==m){if(1==_)throw new Error(E||"Parsing halted.");u=this.lexer.yyleng,d=this.lexer.yytext,c=this.lexer.yylineno,g=this.lexer.yylloc,_=o()}for(;!(2 .toString()in l[b]);){if(0==b)throw new Error(E||"Parsing halted.");t(1),b=a[a.length-1]}f=_,_=2,b=a[a.length-1],v=l[b]&&l[b][2],m=3}if(v[0]instanceof Array&&1<v.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(v[0]){case 1:a.push(_),s.push(this.lexer.yytext),i.push(this.lexer.yylloc),a.push(v[1]),_=null,f?(_=f,f=null):(u=this.lexer.yyleng,d=this.lexer.yytext,c=this.lexer.yylineno,g=this.lexer.yylloc,0<m&&m--);break;case 2:if(S=this.productions_[v[1]][1],h.$=s[s.length-S],h._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},y=this.performAction.call(h,d,u,c,this.yy,v[1],s,i),"undefined"!=typeof y)return y;S&&(a=a.slice(0,2*(-1*S)),s=s.slice(0,-1*S),i=i.slice(0,-1*S)),a.push(this.productions_[v[1]][0]),s.push(h.$),i.push(h._$),w=l[a[a.length-2]][a[a.length-1]],a.push(w);break;case 3:return!0;}}return!0}},t=function(){return{EOF:1,parseError:function(e,t){if(this.yy.parseError)this.yy.parseError(e,t);else throw new Error(e)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return 20>e.length&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,o;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if(t=this._input.match(this.rules[n[a]]),t)return o=t[0].match(/\n.*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n[a],this.conditionStack[this.conditionStack.length-1]),e?e:void 0;return""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"==typeof e?this.lex():e},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},performAction:function(e,t,o,n){switch(o){case 0:break;case 1:return 20;break;case 2:return 19;break;case 3:return 8;break;case 4:return 9;break;case 5:return 6;break;case 6:return 7;break;case 7:return 11;break;case 8:return 13;break;case 9:return 10;break;case 10:return 12;break;case 11:return 14;break;case 12:return 15;break;case 13:return 16;break;case 14:return 17;break;case 15:return 18;break;case 16:return 5;break;case 17:return"INVALID";}},rules:[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}}}();return e.lexer=t,e}(),e.exports&&(t=e.exports=m),t.Jed=m})(this)},function(e,t,o){var n,a;n=[o(0)],a=function(e){return e.noConflict()}.apply(t,n),!(a!==void 0&&(e.exports=a))},function(e,t,o){var n=o(334);e.exports=function(e){var t=n(e),o=t%1;return t===t?o?t-o:t:0}},function(e){e.exports=function(e){return"number"==typeof e&&-1<e&&0==e%1&&e<=9007199254740991}},function(e){e.exports=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2]);}return e.apply(t,o)}},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length,a=Array(n);++o<n;)a[o]=t(e[o],o,e);return a}},function(e,t,o){var n=o(9),a=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(a)return a(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();e.exports=s},function(e,t,o){function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}var a=o(51),s=o(53);n.prototype=a(s.prototype),n.prototype.constructor=n,e.exports=n},function(e){e.exports=function(){}},function(e){e.exports=function(e){return e.placeholder}},function(e,t,o){var n=o(16),a=o(5),s=n(a,"Map");e.exports=s},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}var a=o(399),s=o(406),i=o(408),r=o(409),l=o(410);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=i,n.prototype.has=r,n.prototype.set=l,e.exports=n},function(e,t,o){var n=o(37),a=o(24);e.exports=function(e,t){t=n(t,e);for(var o=0,s=t.length;null!=e&&o<s;)e=e[a(t[o++])];return o&&o==s?e:void 0}},function(e,t,o){function n(e,t){if(a(e))return!1;var o=typeof e;return!!("number"==o||"symbol"==o||"boolean"==o||null==e||s(e))||r.test(e)||!i.test(e)||null!=t&&e in Object(t)}var a=o(6),s=o(28),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.exports=n},function(e,t,o){var n=o(368),a=o(19);e.exports=function(e){return null==e?[]:n(e,a(e))}},function(e,t,o){var n=o(80),a=o(369),s=o(54),i=o(32),r=n(function(e,t){var o=i(t,s(r));return a(e,32,void 0,t,o)});r.placeholder={},e.exports=r},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/chatboxes.html -->\n<div class=\"converse-chatboxes row no-gutters\"></div>\n<div id=\"converse-modals\" class=\"modals\"></div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/image.html -->\n<a href=\""+o(e.url)+"\" target=\"_blank\" rel=\"noopener\"><img class=\"chat-image img-thumbnail\" src=\""+o(e.url)+"\"/></a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/prompt.html -->\n<div class=\"modal\" tabindex=\"-1\" role=\"dialog\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header "+o(e.level)+"\">\n        <h5 class=\"modal-title\">"+o(e.title)+"</h5>\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n          <span aria-hidden=\"true\">\xD7</span>\n        </button>\n      </div>\n      <div class=\"modal-body\">\n          <form class=\"converse-form converse-form--modal confirm\" action=\"#\">\n            <div class=\"form-group\">\n                ",e.messages.forEach(function(e){t+="\n                    <p>"+o(e)+"</p>\n                "}),t+="\n            </div>\n            ","prompt"===e.type&&(t+="\n              <div class=\"form-group\">\n                  <input type=\"text\" name=\"reason\" class=\"form-control\" placeholder=\""+o(e.placeholder)+"\"/>\n              </div>\n            "),(t+="\n            <div class=\"form-group\">\n                <button type=\"submit\" class=\"btn btn-primary\">"+o(e.__("OK"))+"</button>\n                <input type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\" value=\""+o(e.__("Cancel"))+"\"/>\n            </div>\n        </form>\n      </div>\n    </div>\n  </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/chatbox_minimize.html -->\n<a class=\"chatbox-btn toggle-chatbox-button fa fa-minus\" title=\""+o(e.info_minimize)+"\"></a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_invite.html -->\n<div class=\"suggestion-box room-invite\">\n    <form>\n        ",e.error_message&&(t+=" <div class=\"error error-feedback\">"+o(e.error_message)+"</div> "),(t+="\n        <div class=\"form-group\">\n            <input class=\"form-control invited-contact suggestion-box__input\"\n                   placeholder=\""+o(e.label_invitation)+"\"\n                   type=\"text\"/>\n            <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n        </div>\n    </form>\n    <ul class=\"suggestion-box__results suggestion-box__results--below\" hidden=\"\"></ul>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/rooms_results.html -->\n<li class=\"list-group-item active\">"+o(e.feedback_text)+"</li>\n",t}},function(e,t,o){(function(t){var o="object"==typeof t&&t&&t.Object===Object&&t;e.exports=o}).call(this,o(14))},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!(!1===t(e[o],o,e)););return e}},function(e,t,o){var n=o(343),a=o(70),s=o(6),i=o(71),r=o(22),l=o(72),d=Object.prototype,c=d.hasOwnProperty;e.exports=function(e,t){var o=s(e),d=!o&&a(e),p=!o&&!d&&i(e),u=!o&&!d&&!p&&l(e),m=o||d||p||u,g=m?n(e.length,String):[],h=g.length;for(var _ in e)(t||c.call(e,_))&&!(m&&("length"==_||p&&("offset"==_||"parent"==_)||u&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||r(_,h)))&&g.push(_);return g}},function(e,t,o){var n=o(344),a=o(11),s=Object.prototype,i=s.hasOwnProperty,r=s.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return a(e)&&i.call(e,"callee")&&!r.call(e,"callee")};e.exports=l},function(e,t,o){(function(e){var n=o(5),a=o(345),s=t&&!t.nodeType&&t,i=s&&"object"==typeof e&&e&&!e.nodeType&&e,r=i&&i.exports===s,l=r?n.Buffer:void 0,d=l?l.isBuffer:void 0;e.exports=d||a}).call(this,o(27)(e))},function(e,t,o){var n=o(346),a=o(347),s=o(348),i=s&&s.isTypedArray,r=i?a(i):n;e.exports=r},function(e,t,o){var n=o(74),a=o(349),s=Object.prototype,i=s.hasOwnProperty;e.exports=function(e){if(!n(e))return a(e);var t=[];for(var o in Object(e))i.call(e,o)&&"constructor"!=o&&t.push(o);return t}},function(e){var t=Object.prototype;e.exports=function(e){var o=e&&e.constructor,n="function"==typeof o&&o.prototype||t;return e===n}},function(e){e.exports=function(e,t){return function(o){return e(t(o))}}},function(e,t,o){function n(e,t,o){var n=e[t];r.call(e,t)&&s(n,o)&&(o!==void 0||t in e)||a(e,t,o)}var a=o(77),s=o(30),i=Object.prototype,r=i.hasOwnProperty;e.exports=n},function(e,t,o){var n=o(78);e.exports=function(e,t,o){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},function(e,t,o){var n=o(16),a=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},function(e){var t=Function.prototype,o=t.toString;e.exports=function(e){if(null!=e){try{return o.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t,o){var n=o(23),a=o(359),s=o(81);e.exports=function(e,t){return s(a(e,t,n),e+"")}},function(e,t,o){var n=o(360),a=o(82),s=a(n);e.exports=s},function(e){var t=Date.now;e.exports=function(e){var o=0,n=0;return function(){var a=t(),s=16-(a-n);if(n=a,!(0<s))o=0;else if(800<=++o)return arguments[0];return e.apply(void 0,arguments)}}},function(e,t,o){var n=o(69),a=o(363),s=o(18);e.exports=function(e){return s(e)?n(e,!0):a(e)}},function(e,t,o){var n=o(365),a=o(366),s=o(367);e.exports=function(e,t,o){return t===t?s(e,t,o):n(e,a,o)}},function(e,t,o){var n=o(15),a=o(6),s=o(11);e.exports=function(e){return"string"==typeof e||!a(e)&&s(e)&&n(e)=="[object String]"}},function(e,t,o){var n=o(23),a=o(87),s=a?function(e,t){return a.set(e,t),e}:n;e.exports=s},function(e,t,o){var n=o(88),a=n&&new n;e.exports=a},function(e,t,o){var n=o(16),a=o(5),s=n(a,"WeakMap");e.exports=s},function(e,t,o){function n(e,t,o,m,g,h,_,f,b,v){function y(){for(var A=arguments.length,T=Array(A),j=A;j--;)T[j]=arguments[j];if(k)var N=d(y),M=i(T,N);if(m&&(T=a(T,m,g,k)),h&&(T=s(T,h,_,k)),A-=M,k&&A<v){var I=p(T,N);return l(e,t,n,y.placeholder,o,T,I,f,b,v-A)}var O=S?o:this,R=w?O[e]:e;return A=T.length,f?T=c(T,f):E&&1<A&&T.reverse(),x&&b<A&&(T.length=b),this&&this!==u&&this instanceof y&&(R=C||r(R)),R.apply(O,T)}var x=t&128,S=t&1,w=t&2,k=t&24,E=t&512,C=w?void 0:r(e);return y}var a=o(90),s=o(91),i=o(372),r=o(31),l=o(92),d=o(54),c=o(383),p=o(32),u=o(5);e.exports=n},function(e){var t=Math.max;e.exports=function(e,o,n,a){for(var s=-1,i=e.length,r=n.length,l=-1,d=o.length,c=t(i-r,0),p=Array(d+c),u=!a;++l<d;)p[l]=o[l];for(;++s<r;)(u||s<i)&&(p[n[s]]=e[s]);for(;c--;)p[l++]=e[s++];return p}},function(e){var t=Math.max;e.exports=function(e,o,n,a){for(var s=-1,i=e.length,r=-1,l=n.length,d=-1,c=o.length,p=t(i-l,0),u=Array(p+c),m=!a;++s<p;)u[s]=e[s];for(var g=s;++d<c;)u[g+d]=o[d];for(;++r<l;)(m||s<i)&&(u[g+n[r]]=e[s++]);return u}},function(e,t,o){var n=o(373),a=o(96),s=o(97);e.exports=function(e,t,o,i,r,l,d,c,p,u){var m=8&t,g=m?d:void 0,h=m?void 0:d,_=m?l:void 0,f=m?void 0:l;t|=m?32:64,t&=~(m?64:32),4&t||(t&=-4);var b=[e,t,r,_,g,f,h,c,p,u],v=o.apply(void 0,b);return n(e)&&a(v,b),v.placeholder=i,s(v,e,t)}},function(e,t,o){var n=o(87),a=o(374),s=n?function(e){return n.get(e)}:a;e.exports=s},function(e,t,o){function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var a=o(51),s=o(53);n.prototype=a(s.prototype),n.prototype.constructor=n,e.exports=n},function(e){e.exports=function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o<n;)t[o]=e[o];return t}},function(e,t,o){var n=o(86),a=o(82),s=a(n);e.exports=s},function(e,t,o){var n=o(379),a=o(380),s=o(81),i=o(381);e.exports=function(e,t,o){var r=t+"";return s(e,a(r,i(n(r),o)))}},function(e,t,o){function n(e){var t=this.__data__=new a(e);this.size=t.size}var a=o(33),s=o(394),i=o(395),r=o(396),l=o(397),d=o(398);n.prototype.clear=s,n.prototype["delete"]=i,n.prototype.get=r,n.prototype.has=l,n.prototype.set=d,e.exports=n},function(e,t,o){function n(e,t,o,i,r){return!(e!==t)||(null!=e&&null!=t&&(s(e)||s(t))?a(e,t,o,i,n,r):e!==e&&t!==t)}var a=o(411),s=o(11);e.exports=n},function(e,t,o){var n=o(412),a=o(415),s=o(416);e.exports=function(e,t,o,i,r,l){var d=1&o,c=e.length,p=t.length;if(c!=p&&!(d&&p>c))return!1;var u=l.get(e);if(u&&l.get(t))return u==t;var m=-1,g=!0,h=2&o?new n:void 0;for(l.set(e,t),l.set(t,e);++m<c;){var _=e[m],f=t[m];if(i)var b=d?i(f,_,m,t,e,l):i(_,f,m,e,t,l);if(void 0!==b){if(b)continue;g=!1;break}if(h){if(!a(t,function(e,t){if(!s(h,t)&&(_===e||r(_,e,o,i,l)))return h.push(t)})){g=!1;break}}else if(!(_===f||r(_,f,o,i,l))){g=!1;break}}return l["delete"](e),l["delete"](t),g}},function(e,t,o){var n=o(102),a=o(6);e.exports=function(e,t,o){var s=t(e);return a(e)?s:n(s,o(e))}},function(e){e.exports=function(e,t){for(var o=-1,n=t.length,a=e.length;++o<n;)e[a+o]=t[o];return e}},function(e,t,o){var n=o(423),a=o(104),s=Object.prototype,i=s.propertyIsEnumerable,r=Object.getOwnPropertySymbols,l=r?function(e){return null==e?[]:(e=Object(e),n(r(e),function(t){return i.call(e,t)}))}:a;e.exports=l},function(e){e.exports=function(){return[]}},function(e,t,o){var n=o(424),a=o(55),s=o(425),i=o(426),r=o(88),l=o(15),d=o(79),c="[object Map]",p="[object Promise]",u="[object Set]",m="[object WeakMap]",g="[object DataView]",h=d(n),_=d(a),f=d(s),b=d(i),v=d(r),y=l;(n&&y(new n(new ArrayBuffer(1)))!=g||a&&y(new a)!=c||s&&y(s.resolve())!=p||i&&y(new i)!=u||r&&y(new r)!=m)&&(y=function(e){var t=l(e),o=t=="[object Object]"?e.constructor:void 0,n=o?d(o):"";if(n)switch(n){case h:return g;case _:return c;case f:return p;case b:return u;case v:return m;}return t}),e.exports=y},function(e,t,o){var n=o(9);e.exports=function(e){return e===e&&!n(e)}},function(e){e.exports=function(e,t){return function(o){return null!=o&&o[e]===t&&(t!==void 0||e in Object(o))}}},function(e,t,o){var n=o(433);e.exports=function(e){return null==e?"":n(e)}},function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,o){(function(e,n){var a;(function(s){function r(e){throw new RangeError(x[e])}function l(e,t){for(var o=e.length,n=[];o--;)n[o]=t(e[o]);return n}function d(e,t){var o=e.split("@"),n="";1<o.length&&(n=o[0]+"@",e=o[1]),e=e.replace(y,".");var a=e.split("."),s=l(a,t).join(".");return n+s}function c(e){for(var t=[],o=0,n=e.length,a,s;o<n;)a=e.charCodeAt(o++),55296<=a&&56319>=a&&o<n?(s=e.charCodeAt(o++),56320==(64512&s)?t.push(((1023&a)<<10)+(1023&s)+65536):(t.push(a),o--)):t.push(a);return t}function p(e){return l(e,function(e){var t="";return 65535<e&&(e-=65536,t+=w(55296|1023&e>>>10),e=56320|1023&e),t+=w(e),t}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:36}function m(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function g(e,t,o){var n=0;for(e=o?S(e/700):e>>1,e+=S(e/t);e>455;n+=36)e=S(e/35);return S(n+36*e/(e+38))}function h(e){var o=[],a=e.length,s=0,l=128,d=72,c,m,h,_,f,b,v,y,x,E;for(m=e.lastIndexOf("-"),0>m&&(m=0),h=0;h<m;++h)128<=e.charCodeAt(h)&&r("not-basic"),o.push(e.charCodeAt(h));for(_=0<m?m+1:0;_<a;){for(f=s,b=1,v=36;;v+=36){if(_>=a&&r("invalid-input"),y=u(e.charCodeAt(_++)),(36<=y||y>S((2147483647-s)/b))&&r("overflow"),s+=y*b,x=v<=d?1:v>=d+26?26:v-d,y<x)break;E=36-x,b>S(2147483647/E)&&r("overflow"),b*=E}c=o.length+1,d=g(s-f,c,0==f),S(s/c)>2147483647-l&&r("overflow"),l+=S(s/c),s%=c,o.splice(s++,0,l)}return p(o)}function _(e){var o=[],a,s,i,l,d,p,u,h,_,f,b,v,y,x,E;for(e=c(e),v=e.length,a=128,s=0,d=72,p=0;p<v;++p)b=e[p],128>b&&o.push(w(b));for(i=l=o.length,l&&o.push("-");i<v;){for(u=2147483647,p=0;p<v;++p)b=e[p],b>=a&&b<u&&(u=b);for(y=i+1,u-a>S((2147483647-s)/y)&&r("overflow"),s+=(u-a)*y,a=u,p=0;p<v;++p)if(b=e[p],b<a&&2147483647<++s&&r("overflow"),b==a){for(h=s,_=36;;_+=36){if(f=_<=d?1:_>=d+26?26:_-d,h<f)break;E=h-f,x=36-f,o.push(w(m(f+E%x,0))),h=S(E/x)}o.push(w(m(h,0))),d=g(s,y,i==l),s=0,++i}++s,++a}return o.join("")}var f=t&&!t.nodeType&&t,b=e&&!e.nodeType&&e,v="object"==typeof n&&n;(v.global===v||v.window===v||v.self===v)&&(s=v);var y=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=Math.floor,w=String.fromCharCode,k;k={version:"1.3.2",ucs2:{decode:c,encode:p},decode:h,encode:_,toASCII:function(e){return d(e,function(e){return /[^\x20-\x7E]/.test(e)?"xn--"+_(e):e})},toUnicode:function(e){return d(e,function(e){return /^xn--/.test(e)?h(e.slice(4).toLowerCase()):e})}},a=function(){return k}.call(t,o,t,e),!(a!==void 0&&(e.exports=a))})(this)}).call(this,o(27)(e),o(14))},function(e,t,o){var n,a;(function(s,i){'use strict';e.exports?e.exports=i():(n=i,a="function"==typeof n?n.call(t,o,t,e):n,!(a!==void 0&&(e.exports=a)))})(this,function(e){'use strict';var t=e&&e.IPv6;return{best:function(e){var t=e.toLowerCase(),o=t.split(":"),n=o.length,a=8;""===o[0]&&""===o[1]&&""===o[2]?(o.shift(),o.shift()):""===o[0]&&""===o[1]?o.shift():""===o[n-1]&&""===o[n-2]&&o.pop(),n=o.length,-1!==o[n-1].indexOf(".")&&(a=7);var s;for(s=0;s<n&&""!==o[s];s++);if(s<a)for(o.splice(s,1,"0000");o.length<a;)o.splice(s,0,"0000");for(var r=0,l;r<a;r++){l=o[r].split("");for(var d=0;3>d&&"0"===l[0]&&1<l.length;d++)l.splice(0,1);o[r]=l.join("")}var c=-1,p=0,u=0,m=-1,g=!1;for(r=0;r<a;r++)g?"0"===o[r]?u+=1:(g=!1,u>p&&(c=m,p=u)):"0"===o[r]&&(g=!0,m=r,u=1);u>p&&(c=m,p=u),1<p&&o.splice(c,p,""),n=o.length;var h="";for(""===o[0]&&(h=":"),r=0;r<n&&(h+=o[r],r!=n-1);r++)h+=":";return""===o[n-1]&&(h+=":"),h},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}})},function(e,t,o){var n,a;(function(s,i){'use strict';e.exports?e.exports=i():(n=i,a="function"==typeof n?n.call(t,o,t,e):n,!(a!==void 0&&(e.exports=a)))})(this,function(e){'use strict';var t=e&&e.SecondLevelDomains,o={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(0>=n||n>=t-1)return!1;var a=o.list[e.slice(t+1)];return!!a&&0<=a.indexOf(" "+e.slice(n+1,t)+" ")},is:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(0<=n)return!1;var a=o.list[e.slice(t+1)];return!!a&&0<=a.indexOf(" "+e.slice(0,t)+" ")},get:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(0>=n||n>=t-1)return null;var a=o.list[e.slice(t+1)];return a?0>a.indexOf(" "+e.slice(n+1,t)+" ")?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return o})},function(e,t,o){var n=n||{},a,s,i;n.nativeview=o(38),function(n,r){s=[o(450),o(451),o(452),o(453),o(454),o(455),o(456),o(46),o(10)],a=r,i="function"==typeof a?a.apply(t,s):a,!(i!==void 0&&(e.exports=i))}(this,function(e,t,o,n,a,s,i,r,l){"use strict";function d(e){if("string"!=typeof e)throw new Error("Invalid parameter type in parseHTMLToDOM");if(!("DOMParser"in window))throw new Error("DOMParser is not available, so parsing string to DOM node is not possible.");if(!e)return document.createTextNode("");c=c||new DOMParser;const t=c.parseFromString(e,"text/html");return t.body.firstChild?t.getElementsByTagName("body")[0].firstChild:t.head.firstChild&&("TITLE"!==t.head.firstChild.tagName||t.title)?t.head.firstChild:t.firstChild&&"HTML"!==t.firstChild.tagName?t.firstChild:document.createTextNode("")}let c=new DOMParser;const p=e.init([t.default,o.default,n.default,a.default,s.default]),u=r.isUndefined(l.NativeView)?l.View:l.NativeView;return l.VDOMView=u.extend({updateEventListeners(e,t){this.setElement(t.elm)},render(){r.isFunction(this.beforeRender)&&this.beforeRender();const e=i.toVNode(d(this.toHTML()));e.data.hook=r.extend({create:this.updateEventListeners.bind(this),update:this.updateEventListeners.bind(this)});const t=this.vnode?this.vnode.elm:this.el;return t.outerHTML!==e.elm.outerHTML&&(this.vnode=p(this.vnode||this.el,e)),r.isFunction(this.afterRender)&&this.afterRender(),this}}),l.VDOMView})},function(o){!function(n,e){o.exports=e()}(this,function(){"use strict";return function(a,e,t){var s=e.prototype,l=s.format;t.en.ordinal=function(o){var e=["th","st","nd","rd"],t=o%100;return"["+o+(e[(t-20)%10]||e[t]||e[0])+"]"},s.format=function(o){var a=this,t=this.$locale(),s=this.$utils(),e=(o||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|gggg|Do|X|x|k{1,2}|S/g,function(o){return"Q"===o?Math.ceil((a.$M+1)/3):"Do"===o?t.ordinal(a.$D):"gggg"===o?a.weekYear():"wo"===o?t.ordinal(a.week(),"W"):"k"===o||"kk"===o?s.s((0===a.$H?24:a.$H)+"","k"===o?1:2,"0"):"X"===o?Math.floor(a.$d.getTime()/1e3):"x"===o?a.$d.getTime():o});return l.bind(this)(e)}}})},function(e,t,o){var a=o(333),s=o(47);e.exports=function(e,t,o){var i=null==e?0:e.length;return i?(t=o||void 0===t?1:s(t),a(e,0>t?0:t,i)):[]}},function(e,t,o){var n=o(15),a=o(11);e.exports=function(e){return!0===e||!1===e||a(e)&&n(e)=="[object Boolean]"}},function(e){e.exports=function(e){return null==e}},function(e,t,o){var n=o(50),a=o(386),s=o(439),i=o(441);e.exports=function(e,t){if(null==e)return{};var o=n(i(e),function(e){return[e]});return t=a(t),s(e,o,function(e,o){return t(e,o[0])})}},function(e,t,o){var n=o(73),a=o(105),s=o(18),i=o(85),r=o(444);e.exports=function(e){if(null==e)return 0;if(s(e))return i(e)?r(e):e.length;var t=a(e);return"[object Map]"==t||"[object Set]"==t?e.size:n(e).length}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/headless/templates/field.html -->\n<field var=\""+o(e.name)+"\">\n",e.value.constructor===Array?(t+="\n    ",e.value.forEach(function(e){t+="<value>"+o(e)+"</value>"}),t+="\n"):t+="\n    <value>"+o(e.value)+"</value>\n",(t+="</field>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/avatar.svg -->\n<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" class=\""+o(e.classes)+"\" width=\""+o(e.width)+"\" height=\""+o(e.height)+"\">\n    <image width=\""+o(e.width)+"\" height=\""+o(e.height)+"\" preserveAspectRatio=\"xMidYMid meet\" xlink:href=\""+o(e.image)+"\"/>\n</svg>\n",t}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/background_logo.html -->\n<div class=\"inner-content converse-brand row\">\n    <div class=\"converse-brand__padding\"></div>\n    <div class=\"converse-brand__heading\">\n        <svg height=\"200px\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n            viewBox=\"0 0 364 364\"\n            version=\"1.1\">\n            <title>Logo Converse</title>\n            <defs>\n                <linearGradient id=\"gradient\" x1=\"92.14\" y1=\"27.64\" x2=\"267.65\" y2=\"331.62\" gradientUnits=\"userSpaceOnUse\">\n                    <stop offset=\"0\" stop-color=\"#fff1d1\"/>\n                    <stop offset=\"0.05\" stop-color=\"#fae8c1\"/>\n                    <stop offset=\"0.15\" stop-color=\"#f0d5a1\"/>\n                    <stop offset=\"0.27\" stop-color=\"#e7c687\"/>\n                    <stop offset=\"0.4\" stop-color=\"#e1bb72\"/>\n                    <stop offset=\"0.54\" stop-color=\"#dcb264\"/>\n                    <stop offset=\"0.71\" stop-color=\"#daad5c\"/>\n                    <stop offset=\"1\" stop-color=\"#d9ac59\"/>\n                </linearGradient>\n                <filter id=\"shadow\">\n                    <feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"2.3\" result=\"blur1\"/>\n                    <feOffset in=\"blur1\" dx=\"3\" dy=\"3\" result=\"blur2\"/>\n                    <feColorMatrix in=\"blur2\" type=\"matrix\" result=\"blur3\"\n                        values=\"1 0 0 0 0.1\n                                0 1 0 0 0.1\n                                0 0 1 0 0.1\n                                0 0 0 1 0\"/>\n                    <feMerge>\n                        <feMergeNode in=\"blur3\"/>\n                        <feMergeNode in=\"SourceGraphic\"/>\n                    </feMerge>\n                </filter>\n            </defs>\n            <g filter=\"url(#shadow)\">\n                <path d=\"M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z\" fill=\"#d9ac59\"/>\n                <path d=\"M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z\" fill=\"url(#gradient)\"/>\n            </g>\n        </svg>\n        <span class=\"converse-brand__text\">\n            <span>converse<span class=\"subdued\">.js</span></span>\n            <p class=\"byline\">messaging freedom</p>\n        </span>\n    </div>\n</div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/audio.html -->\n<audio controls src=\""+o(e.url)+"\"></audio>\n<a target=\"_blank\" rel=\"noopener\" href=\""+o(e.url)+"\">"+o(e.label_download)+"</a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/file.html -->\n<a target=\"_blank\" rel=\"noopener\" href=\""+o(e.url)+"\">"+o(e.label_download)+"</a>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_captcha.html -->\n",e.label&&(t+="\n<label>\n    "+o(e.label)+"\n</label>\n"),t+="\n<img src=\"data:"+o(e.type)+";base64,"+o(e.data)+"\">\n<input name=\""+o(e.name)+"\" type=\"text\" ",e.required&&(t+=" required=\"required\" "),(t+=" />\n\n\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/form_checkbox.html -->\n<div class=\"form-group\">\n    <input id=\""+o(e.id)+"\" name=\""+o(e.name)+"\" type=\"checkbox\" "+o(e.checked)+" ",e.required&&(t+=" required "),(t+=" />\n    <label class=\"form-check-label\" for=\""+o(e.id)+"\">"+o(e.label)+"</label>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/form_select.html -->\n<div class=\"form-group\">\n    <label for=\""+o(e.id)+"\">"+o(e.label)+"</label>\n    <select class=\"form-control\" id=\""+o(e.id)+"\" name=\""+o(e.name)+"\" ",e.multiple&&(t+=" multiple=\"multiple\" "),(t+=">"+(null==(s=e.options)?"":s)+"</select>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/form_textarea.html -->\n<label class=\"label-ta\">"+o(e.label)+"</label>\n<textarea name=\""+o(e.name)+"\">"+o(e.value)+"</textarea>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/form_url.html -->\n<label>\n    "+o(e.label)+"\n    <a class=\"form-url\" target=\"_blank\" rel=\"noopener\" href=\""+o(e.value)+"\">"+o(e.value)+"</a>\n</label>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/select_option.html -->\n<option value=\""+o(e.value)+"\" ",e.selected&&(t+=" selected=\"selected\" "),(t+=" >"+o(e.label)+"</option>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/video.html -->\n<video controls preload=\"metadata\" src=\""+o(e.url)+"\" style=\"max-height: 50vh\"></video>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/csn.html -->\n<div class=\"message chat-info chat-state-notification\"\n     data-isodate=\""+o(e.isodate)+"\"\n     data-csn=\""+o(e.from)+"\">"+o(e.message)+"</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/file_progress.html -->\n<div class=\"message chat-msg\" data-isodate=\""+o(e.time)+"\" data-msgid=\""+o(e.msgid)+"\">\n    <canvas class=\"avatar chat-msg__avatar\" height=\"36\" width=\"36\"></canvas>\n    <div class=\"chat-msg__content\">\n        <span class=\"chat-msg__text\">"+o(e.__("Uploading file:"))+" <strong>"+o(e.filename)+"</strong>, "+o(e.filesize)+"</span>\n        <progress value=\""+o(e.progress)+"\"/>\n    </div>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/message.html -->\n<div class=\"message chat-msg "+o(e.type)+" "+o(e.extra_classes)+" ",e.is_me_message&&(t+=" chat-msg--action "),t+="\"\n        data-isodate=\""+o(e.time)+"\" data-msgid=\""+o(e.msgid)+"\" data-from=\""+o(e.from)+"\" data-encrypted=\""+o(e.is_encrypted)+"\">\n    ","headline"===e.type||e.is_me_message||(t+="\n    <canvas class=\"avatar chat-msg__avatar\" height=\"36\" width=\"36\"></canvas>\n    "),t+="\n    <div class=\"chat-msg__content chat-msg__content--"+o(e.sender)+" "+o(e.is_me_message?"chat-msg__content--action":"")+"\">\n        ",t+="<span class=\"chat-msg__heading\">\n            ",e.is_me_message&&(t+="<time timestamp=\""+o(e.isodate)+"\" class=\"chat-msg__time\">"+o(e.pretty_time)+"</time>"),t+="\n            <span class=\"chat-msg__author\">",e.is_me_message&&(t+="**"),t+=o(e.username)+"</span>\n            ",e.is_me_message||(t+="\n                ",e.roles.forEach(function(e){t+=" <span class=\"badge badge-secondary\">"+o(e)+"</span> "}),t+="\n                <time timestamp=\""+o(e.isodate)+"\" class=\"chat-msg__time\">"+o(e.pretty_time)+"</time>\n            "),t+="\n            ",e.is_encrypted&&(t+="<span class=\"fa fa-lock\"></span>"),t+="\n        </span>\n        <div class=\"chat-msg__body chat-msg__body--"+o(e.type)+" "+o(e.received?"chat-msg__body--received":"")+" "+o(e.is_delayed?"chat-msg__body--delayed":"")+"\">\n            <div class=\"chat-msg__message\">\n                ",e.is_retracted?(t+="\n                    <div>"+o(e.retraction_text)+"</div>\n                    ",e.moderation_reason&&(t+="<q class=\"chat-msg--retracted__reason\">"+o(e.moderation_reason)+"</q>"),t+="\n                "):(t+="\n                    ",e.is_spoiler&&(t+="\n                        <div class=\"chat-msg__spoiler-hint\">\n                            <span class=\"spoiler-hint\">"+o(e.spoiler_hint)+"</span>\n                            <a class=\"badge badge-info spoiler-toggle\" data-toggle-state=\"closed\" href=\"#\"><i class=\"fa fa-eye\"></i>"+o(e.label_show)+"</a>\n                        </div>\n                    "),t+="\n\n                    ",e.subject&&(t+="\n                        <div class=\"chat-msg__subject\">"+o(e.subject)+"</div>\n                    "),e.first_unread&&(t+="<div class=\"message unread-separator date-separator\"><hr class=\"separator\"><span class=\"separator-text\">"+o(e.__("unread messages"))+"</span></div>\n"),t+="\n                    <div class=\"chat-msg__text\n                        ",e.is_only_emojis&&(t+=" chat-msg__text--larger"),t+="\n                        ",e.is_spoiler&&(t+=" spoiler collapsed"),t+="\"><!-- message gets added here via renderMessage --></div>\n                    <div class=\"chat-msg__media\"></div>\n                ",t+="<div class=\"chat-msg__reactions\"></div>\n"),t+="\n            </div>\n            ",!e.received||e.is_me_message||e.is_groupchat_message||(t+=" <span class=\"fa fa-check chat-msg__receipt\"></span> "),t+="\n            ",e.edited&&(t+=" <i title=\""+o(e.__("This message has been edited"))+"\" class=\"fa fa-edit chat-msg__edit-modal\"></i> "),t+="\n            <div class=\"chat-msg__actions\">\n                ",e.editable&&(t+="\n                    <button class=\"chat-msg__action chat-msg__action-edit fa fa-pencil-alt\" title=\""+o(e.__("Edit this message"))+"\"></button>\n                "),t+="\n                ",e.retractable&&(t+="\n                    <button class=\"chat-msg__action chat-msg__action-retract fa fa-trash-alt\" title=\""+o(e.__("Retract this message"))+"\"></button>\n                "),(t+="\n                    <button class=\"chat-msg__action chat-msg__action-react fa fa-smile\" title=\""+o(e.__("React to this message"))+"\"></button>\n                ",t+="\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/message_versions_modal.html -->\n<div class=\"modal\" id=\"message-versions-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"message-versions-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h4 class=\"modal-title\" id=\"message-versions-modal-label\">"+o(e.__("Message versions"))+"</h4>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                <h4>Older versions</h4>\n                ",Object.keys(e.older_versions).forEach(function(n){t+=" <p class=\"older-msg\"><time>"+o(e.dayjs(n).format("MMM D, YYYY, HH:mm:ss"))+"</time>: "+o(e.older_versions[n])+"</p> "}),(t+="\n                <hr/>\n                <h4>Current version</h4>\n                <p>"+o(e.message)+"</p>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">"+o(e.__("Close"))+"</button>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/alert.html -->\n<div class=\"alert "+o(e.type)+"\" role=\"alert\"><p>"+o(e.message)+"</p></div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/alert_modal.html -->\n<div class=\"modal\" tabindex=\"-1\" role=\"dialog\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header "+o(e.level)+"\">\n        <h5 class=\"modal-title\">"+o(e.title)+"</h5>\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n          <span aria-hidden=\"true\">\xD7</span>\n        </button>\n      </div>\n      <div class=\"modal-body\">",e.messages.forEach(function(e){t+="\n          <p>"+o(e)+"</p>\n      "}),t+="\n      </div>\n    </div>\n  </div>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatbox_head.html -->\n<div class=\"chat-head chat-head-chatbox row no-gutters\">\n    ",e._converse.singleton||(t+="\n        <div class=\"chatbox-navback\"><i class=\"fa fa-arrow-left\"></i></div>\n    "),t+="\n    <div class=\"chatbox-title\">\n        <div class=\"row no-gutters\">\n            ",e.type!==e._converse.HEADLINES_TYPE&&(t+="\n                <canvas class=\"avatar\" height=\"36\" width=\"36\"></canvas>\n            "),t+="\n            <div class=\"col chat-title\" title=\""+o(e.jid)+"\">\n                ",e.url&&(t+="\n                    <a href=\""+o(e.url)+"\" target=\"_blank\" rel=\"noopener\" class=\"user\">\n                "),t+="\n                        "+o(e.display_name)+"\n                ",e.url&&(t+="\n                    </a>\n                "),(t+="\n                <p class=\"user-custom-message\">"+o(e.status)+"</p>\n            </div>\n        </div>\n    </div>\n    <div class=\"chatbox-buttons row no-gutters\">\n        <a class=\"chatbox-btn close-chatbox-button fa fa-times\" title=\""+o(e.info_close)+"\"></a>\n        <a class=\"chatbox-btn show-user-details-modal fa fa-id-card\" title=\""+o(e.info_details)+"\"></a>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatbox_message_form.html -->\n<div class=\"new-msgs-indicator hidden\">\u25BC "+o(e.unread_msgs)+" \u25BC</div>\n<form class=\"setNicknameButtonForm hidden\">\n    <input type=\"submit\" class=\"btn btn-primary\" name=\"join\" value=\"Join\"/>\n</form>\n<form class=\"sendXMPPMessage\">\n    ",e.show_toolbar&&(t+="\n        <ul class=\"chat-toolbar no-text-select\"></ul>\n    "),t+="\n    <input type=\"text\" placeholder=\""+(null==(s=e.label_spoiler_hint)?"":s)+"\" value=\""+(null==(s=e.hint_value)?"":s)+"\"\n           class=\"",e.composing_spoiler||(t+=" hidden "),t+=" spoiler-hint\"/>\n\n    <div class=\"suggestion-box\">\n        <ul class=\"suggestion-box__results suggestion-box__results--above\" hidden=\"\"></ul>\n        <textarea\n            type=\"text\"\n            class=\"chat-textarea suggestion-box__input\n                ",e.show_send_button&&(t+=" chat-textarea-send-button "),t+="\n                ",e.composing_spoiler&&(t+=" spoiler "),t+="\"\n            placeholder=\""+o(e.label_message)+"\">"+(null==(s=e.message_value)?"":s)+"</textarea>\n        <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n\n        ",e.show_send_button&&(t+="\n            <button type=\"submit\" class=\"pure-button send-button\">"+o(e.label_send)+"</button>\n        "),(t+="\n    </div>\n</form>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/error_message.html -->\n<div class=\"message chat-info chat-error\" data-isodate=\""+o(e.isodate)+"\">"+o(e.message)+"</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/help_message.html -->\n<div class=\"message chat-info ","info"!==e.type&&(t+=" chat-"+o(e.type)+" "),(t+="\" data-isodate=\""+o(e.isodate)+"\">"+(null==(s=e.message)?"":s)+"</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/new_day.html -->\n<div class=\"message date-separator\" data-isodate=\""+o(e.isodate)+"\">\n    <hr class=\"separator\"/>\n    <time class=\"separator-text\" datetime=\""+o(e.isodate)+"\"><span>"+o(e.datestring)+"</span></time>\n</div>\n",t}},function(e,t,o){({escape:o(1)});e.exports=function(e){var t="",o=Array.prototype.join,n;return t+="<!-- src/templates/spoiler_button.html -->\n<li class=\"toggle-compose-spoiler fa ",e.composing_spoiler&&(t+=" fa-eye-slash "),t+=" ",e.composing_spoiler||(t+=" fa-eye "),(t+="\"\n    title=\""+(null==(n=e.label_toggle_spoiler)?"":n)+"\">\n</li>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/status_message.html -->\n<div class=\"message chat-info chat-status\"\n     data-isodate=\""+o(e.isodate)+"\"\n     data-status=\""+o(e.from)+"\">"+o(e.message)+"</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/toolbar.html -->\n",e.show_call_button&&(t+="\n<li class=\"toggle-call fa fa-phone\" title=\""+o(e.label_start_call)+"\"></li>\n"),t+="\n",e.show_occupants_toggle&&(t+="\n<li class=\"toggle-occupants float-right fa ",t+=e.hidden_occupants?" fa-angle-double-left ":" fa-angle-double-right ",t+="\"\n    title=\""+o(e.label_hide_occupants)+"\"></li>\n"),t+="\n",e.message_limit&&(t+="\n<li class=\"message-limit font-weight-bold float-right\" title=\""+o(e.label_message_limit)+"\">"+o(e.message_limit)+"</li>\n"),(t+="\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/toolbar_fileupload.html -->\n<li class=\"upload-file\">\n    <a class=\"fa fa-paperclip\" title=\""+o(e.tooltip_upload_file)+"\"></a>\n    <input type=\"file\" class=\"fileupload\" multiple=\"\" style=\"display:none\"/>\n</li> \n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/user_details_modal.html -->\n<div class=\"modal\" id=\"user-details-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"user-details-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"user-details-modal-label\">"+o(e.display_name)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.__("Close"))+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                ",e.image&&(t+="\n                <img alt=\""+o(e.__("The User's Profile Image"))+"\"\n                    class=\"img-thumbnail avatar align-self-center mb-3\"\n                    height=\"100\" width=\"100\" src=\"data:"+o(e.image_type)+";base64,"+o(e.image)+"\"/>\n                "),t+="\n                ",e.fullname&&(t+="\n                <p><label>"+o(e.__("Full Name:"))+"</label> "+o(e.fullname)+"</p>\n                "),t+="\n                <p><label>"+o(e.__("XMPP Address:"))+"</label> <a href=\"xmpp:"+o(e.jid)+"\">"+o(e.jid)+"</a></p>\n                ",e.nickname&&(t+="\n                <p><label>"+o(e.__("Nickname:"))+"</label> "+o(e.nickname)+"</p>\n                "),t+="\n                ",e.url&&(t+="\n                <p><label>"+o(e.__("URL:"))+"</label> <a target=\"_blank\" rel=\"noopener\" href=\""+o(e.url)+"\">"+o(e.url)+"</a></p>\n                "),t+="\n                ",e.email&&(t+="\n                <p><label>"+o(e.__("Email:"))+"</label> <a href=\"mailto:"+o(e.email)+"\">"+o(e.email)+"</a></p>\n                "),t+="\n                ",e.role&&(t+="\n                <p><label>"+o(e.__("Role:"))+"</label> "+o(e.role)+"</p>\n                "),t+="\n\n                ",e._converse.pluggable.plugins["converse-omemo"].enabled(e._converse)&&(t+="\n                    <hr/>\n                    <ul class=\"list-group fingerprints\">\n                        <li class=\"list-group-item active\">"+o(e.__("OMEMO Fingerprints"))+"</li>\n                        ",e.view.devicelist.devices||(t+="\n                            <li class=\"list-group-item\"><span class=\"spinner fa fa-spinner centered\"/></li>\n                        "),t+="\n                        ",e.view.devicelist.devices&&(t+="\n                            ",e.view.devicelist.devices.each(function(n){t+="\n                                ",n.get("bundle")&&n.get("bundle").fingerprint&&(t+="\n                                <li class=\"list-group-item\">\n                                    <form class=\"fingerprint-trust\">\n                                    <div class=\"btn-group btn-group-toggle\">\n                                        <label class=\"btn btn--small ",t+=-1===n.get("trusted")?"  btn-secondary ":" btn-primary active ",t+="\">\n                                            <input type=\"radio\" name=\""+o(n.get("id"))+"\" value=\"1\"\n                                                ",-1!==n.get("trusted")&&(t+=" checked=\"checked\" "),t+="/>"+o(e.__("Trusted"))+"\n                                        </label>\n                                        <label class=\"btn btn--small ",t+=-1===n.get("trusted")?" btn-primary active ":" btn-secondary ",t+="\">\n                                            <input type=\"radio\" name=\""+o(n.get("id"))+"\" value=\"-1\"\n                                                ",-1===n.get("trusted")&&(t+=" checked=\"checked\" "),t+="/>"+o(e.__("Untrusted"))+"\n                                        </label>\n                                    </div>\n                                    <span class=\"fingerprint\">"+o(e.utils.formatFingerprint(n.get("bundle").fingerprint))+"</span>\n                                    </form>\n                                </li>\n                                "),t+="\n                            "}),t+="\n                        "),t+="\n                    </ul>\n                "),t+="\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-warning\" data-dismiss=\"modal\">"+o(e.__("Close"))+"</button>\n                <button type=\"button\" class=\"btn btn-info refresh-contact\"><i class=\"fa fa-refresh\"> </i>"+o(e.__("Refresh"))+"</button>\n                ",e.allow_contact_removal&&e.is_roster_contact&&(t+="\n                    <button type=\"button\" class=\"btn btn-danger remove-contact\"><i class=\"far fa-trash-alt\"> </i>"+o(e.__("Remove as contact"))+"</button>\n                "),(t+="\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/headless/templates/vcard.html -->\n<vCard xmlns=\"vcard-temp\">\n    <FN>"+o(e.fn)+"</FN>\n    <NICKNAME>"+o(e.nickname)+"</NICKNAME>\n    <URL>"+o(e.url)+"</URL>\n    <ROLE>"+o(e.role)+"</ROLE>\n    <EMAIL><INTERNET/><PREF/><USERID>"+o(e.email)+"</USERID></EMAIL>\n    <PHOTO>\n      <TYPE>"+o(e.image_type)+"</TYPE>\n      <BINVAL>"+o(e.image)+"</BINVAL>\n    </PHOTO>\n</vCard>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/bookmarks_list.html -->\n<div class=\"list-container list-container--bookmarks "+o(!e.hidden&&"hidden"||"")+"\">\n    <a href=\"#\" class=\"list-toggle bookmarks-toggle controlbox-padded\" title=\""+o(e.desc_bookmarks)+"\">\n        <span class=\"fa ",t+=e.toggle_state===e._converse.OPENED?" fa-caret-down ":" fa-caret-right ",t+="\">\n        </span> "+o(e.label_bookmarks)+"</a>\n\n    <div class=\"items-list bookmarks rooms-list ",e.toggle_state!==e._converse.OPENED&&(t+=" hidden "),(t+="\">\n    ",e.bookmarks.forEach(function(n){t+="\n        <div class=\"list-item controlbox-padded room-item available-chatroom d-flex flex-row ",e.is_bookmark_hidden(n)&&(t+=" hidden "),t+="\" data-room-jid=\""+o(n.get("jid"))+"\">\n            <a class=\"list-item-link open-room w-100\" data-room-jid=\""+o(n.get("jid"))+"\" title=\""+o(e.open_title)+"\" href=\"#\">"+o(n.getDisplayName())+"</a>\n            <a class=\"list-item-action remove-bookmark fa fa-bookmark align-self-center ",n.get("bookmarked")&&(t+=" button-on "),t+="\"\n                data-room-jid=\""+o(n.get("jid"))+"\" data-bookmark-name=\""+o(n.getDisplayName())+"\"\n                title=\""+o(e.info_remove_bookmark)+"\" href=\"#\"></a>\n        </div>\n    "}),t+="\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/chatroom_bookmark_form.html -->\n<div class=\"chatroom-form-container muc-bookmark-form\">\n    <form class=\"converse-form chatroom-form\">\n        <legend>"+o(e.heading)+"</legend>\n        <fieldset class=\"form-group\">\n            <label for=\"converse_muc_bookmark_name\">"+o(e.label_name)+"</label>\n            <input class=\"form-control\" type=\"text\" value=\""+o(e.name)+"\" name=\"name\" required=\"required\" id=\"converse_muc_bookmark_name\"/>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <label for=\"converse_muc_bookmark_nick\">"+o(e.label_nick)+"</label>\n            <input class=\"form-control\" type=\"text\" name=\"nick\" value=\""+o(e.default_nick)+"\" id=\"converse_muc_bookmark_nick\"/>\n        </fieldset>\n        <fieldset class=\"form-group form-check\">\n            <input class=\"form-check-input\" id=\"converse_muc_bookmark_autojoin\" type=\"checkbox\" name=\"autojoin\"/>\n            <label class=\"form-check-label\" for=\"converse_muc_bookmark_autojoin\">"+o(e.label_autojoin)+"</label>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.label_submit)+"\"/>\n            <input class=\"btn btn-secondary button-cancel\" type=\"button\" value=\""+o(e.label_cancel)+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_bookmark_toggle.html -->\n<a class=\"chatbox-btn toggle-bookmark fa fa-bookmark\n   ",e.bookmarked&&(t+=" button-on "),(t+="\" title=\""+o(e.info_toggle_bookmark)+"\"></a>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/converse_brand_heading.html -->\n<span class=\"brand-heading-container\">\n    <a class=\"brand-heading\" href=\"https://conversejs.org\" target=\"_blank\" rel=\"noopener\">\n        <svg class=\"converse-svg-logo\"\n            xmlns:svg=\"http://www.w3.org/2000/svg\"\n            xmlns=\"http://www.w3.org/2000/svg\"\n            xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n            viewBox=\"0 0 364 364\">\n            <title>Converse</title>\n            <g class=\"cls-1\" id=\"g904\">\n                <g data-name=\"Layer 2\">\n                    <g data-name=\"Layer 7\">\n                        <path\n                            class=\"cls-3\"\n                            d=\"M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z\" />\n                        <path\n                            class=\"cls-4\"\n                            d=\"M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z\" />\n                    </g>\n                </g>\n            </g>\n        </svg>\n        <span class=\"brand-name\">\n            <span class=\"brand-name__text\">converse<span class=\"subdued\">.js</span></span>\n        </span>\n    </a>\n</span>\n",e}},function(e,t,o){({escape:o(1)});e.exports=function(e){var t="",o=Array.prototype.join;return t+="<!-- src/templates/controlbox.html -->\n<div class=\"flyout box-flyout\">\n    <div class=\"chat-head controlbox-head\">\n        ",e.sticky_controlbox||(t+="\n            <a class=\"chatbox-btn close-chatbox-button fa fa-times\"></a>\n        "),(t+="\n    </div>\n    <div class=\"controlbox-panes\"></div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/controlbox_toggle.html -->\n<span class=\"toggle-feedback\">"+o(e.label_toggle)+"</span>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/login_panel.html -->\n<div id=\"converse-login-panel\" class=\"controlbox-pane fade-in row no-gutters\">\n    <form id=\"converse-login\" class=\"converse-form\" method=\"post\">\n        <div class=\"conn-feedback fade-in ",e.conn_feedback_subject||(t+=" hidden "),t+=" "+o(e.conn_feedback_class)+"\">\n            <p class=\"feedback-subject\">"+o(e.conn_feedback_subject)+"</p>\n            <p class=\"feedback-message ",e.conn_feedback_message||(t+=" hidden "),t+="\">"+o(e.conn_feedback_message)+"</p>\n        </div>\n        ","CONNECTING"===e._converse.CONNECTION_STATUS[e.connection_status]?t+="\n            <span class=\"spinner fa fa-spinner centered\"/>\n        ":(t+="\n            ",(e.authentication==e.LOGIN||e.authentication==e.EXTERNAL)&&(t+="\n                <div class=\"form-group\">\n                    <label for=\"converse-login-jid\">"+o(e.__("XMPP Address:"))+"</label>\n                    <input id=\"converse-login-jid\" class=\"form-control\" required=\"required\" type=\"text\" name=\"jid\" placeholder=\""+o(e.placeholder_username)+"\"/>\n                </div>\n                ",e.authentication!==e.EXTERNAL&&(t+="\n                <div class=\"form-group\">\n                    <label for=\"converse-login-password\">"+o(e.__("Password:"))+"</label>\n                    <input id=\"converse-login-password\" class=\"form-control\" required=\"required\" type=\"password\" name=\"password\" placeholder=\""+o(e.__("password"))+"\"/>\n                </div>\n                "),t+="\n                ",e.show_trust_checkbox&&(t+="\n                    <div class=\"form-group form-check login-trusted\">\n                        <input id=\"converse-login-trusted\" type=\"checkbox\" class=\"form-check-input\" name=\"trusted\" ",e._converse.config.get("trusted")&&(t+=" checked=\"checked\" "),t+="/>\n                        <label for=\"converse-login-trusted\" class=\"form-check-label login-trusted__desc\">"+o(e.__("This is a trusted device"))+"</label>\n                        <i class=\"fa fa-info-circle\" data-toggle=\"popover\"\n                           data-title=\"Trusted device?\"\n                           data-content=\""+o(e.__("To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It's important that you explicitly log out, otherwise not all cached data might be deleted. Please note, when using an untrusted device, OMEMO encryption is NOT available."))+"\"></i>\n                    </div>\n                "),t+="\n\n                <fieldset class=\"buttons\">\n                    <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.__("Log in"))+"\"/>\n                </fieldset>\n            "),t+="\n            ",e.authentication==e.ANONYMOUS&&(t+="\n                <input class=\"btn btn-primary login-anon\" type=\"submit\" value=\""+o(e.__("Click here to log in anonymously"))+"\"/>\n            "),t+="\n            ",e.authentication==e.PREBIND&&(t+="\n                <p>Disconnected.</p>\n            "),t+="\n        "),(t+="\n    </form>\n</div>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/dragresize.html -->\n<div class=\"dragresize dragresize-top\"></div>\n<div class=\"dragresize dragresize-topleft\"></div>\n<div class=\"dragresize dragresize-left\"></div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/emoji_button.html -->\n<li class=\"toggle-toolbar-menu toggle-smiley__container\">\n    <a class=\"toggle-smiley far fa-smile\"\n       title=\""+o(e.tooltip_insert_smiley)+"\"\n       data-toggle=\"dropdown\"\n       aria-haspopup=\"true\"\n       aria-expanded=\"false\"></a>\n</li>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/emojis.html -->\n<div class=\"emoji-picker dropdown-menu toolbar-menu\">\n    <div class=\"emoji-picker__header\">\n        <input class=\"form-control emoji-search\" name=\"emoji-search\" placeholder=\""+o(e.__("Search"))+"\"/>\n        ",e.query||(t+="\n        <ul>\n            ",Object.keys(e.emoji_categories).forEach(function(n){t+="\n                ",e.emoji_categories[n]&&(t+="\n                <li data-category=\""+o(n)+"\" class=\"emoji-category "+o(e.current_category)+" "+o(n)+" ",e.current_category===n&&(t+=" picked "),t+="\"\n                    title=\""+o(e.__(e._converse.emoji_category_labels[n]))+"\">\n                    <a class=\"pick-category\" href=\"#emoji-picker-"+o(n)+"\" data-category=\""+o(n)+"\"> "+(null==(s=e.transformCategory(e.emoji_categories[n]))?"":s)+" </a>\n                </li>\n                "),t+="\n            "}),t+="\n        </ul>\n        "),t+="\n    </div>\n    <div class=\"emoji-picker__lists\">\n        ",e.query?(t+="\n            <a id=\"emoji-picker-search-results\" class=\"emoji-category__heading\">"+o(e.__("Search results"))+"</a>\n            <ul class=\"emoji-picker\">\n                ",e.search_results.forEach(function(n){t+="\n                <li class=\"emoji insert-emoji ",e.shouldBeHidden(n.sn)&&(t+=" hidden "),t+="\"\n                    data-emoji=\""+o(n.sn)+"\" title=\""+o(n.sn)+"\">\n                        <a href=\"#\" data-emoji=\""+o(n.sn)+"\"> "+(null==(s=e.transform(n.sn))?"":s)+"  </a>\n                </li>\n                "}),t+="\n            </ul>\n        "):(t+="\n            ",Object.keys(e.emoji_categories).forEach(function(n){t+="\n                ",e.emoji_categories[n]&&(t+="\n                    <a id=\"emoji-picker-"+o(n)+"\" class=\"emoji-category__heading\" data-category=\""+o(n)+"\">"+o(e.__(e._converse.emoji_category_labels[n]))+" </a>\n                    <ul class=\"emoji-picker\" data-category=\""+o(n)+"\">\n                        ",Object.values(e.emojis_by_category[n]).forEach(function(n){t+="\n                        <li class=\"emoji insert-emoji ",e.shouldBeHidden(n.sn)&&(t+=" hidden "),t+="\"\n                            data-emoji=\""+o(n.sn)+"\" title=\""+o(n.sn)+"\">\n                                <a href=\"#\" data-emoji=\""+o(n.sn)+"\"> "+(null==(s=e.transform(n.sn))?"":s)+"  </a>\n                        </li>\n                        "}),t+="\n                    </ul>\n                "),t+="\n            "}),t+="\n        "),t+="\n    </div>\n    <div class=\"emoji-skintone-picker\">\n        <label>Skin tone</label>\n        <ul>\n            ",e.skintones.forEach(function(n){t+="\n                <li data-skintone=\""+o(n)+"\" class=\"emoji-skintone ",e.current_skintone===n&&(t+=" picked "),t+="\">\n                    <a class=\"pick-skintone\" href=\"#\" data-skintone=\""+o(n)+"\"> "+(null==(s=e.transform(":"+n+":"))?"":s)+" </a>\n                </li>\n            "}),(t+="\n        </ul>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/inverse_brand_heading.html -->\n<div>\n    <div class=\"container brand-heading-container\">\n        <h1 class=\"brand-heading brand-heading--inverse\">\n            <svg class=\"converse-svg-logo\"\n                xmlns:svg=\"http://www.w3.org/2000/svg\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n                viewBox=\"0 0 364 364\">\n                <title>Converse</title>\n                <g class=\"cls-1\" id=\"g904\">\n                    <g data-name=\"Layer 2\">\n                        <g data-name=\"Layer 7\">\n                            <path\n                                class=\"cls-3\"\n                                d=\"M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z\" />\n                            <path\n                                class=\"cls-4\"\n                                d=\"M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z\" />\n                        </g>\n                    </g>\n                </g>\n            </svg>\n            <span class=\"brand-name\">\n                <span class=\"brand-name__text\">converse<span class=\"subdued\">.js</span></span>\n                <p class=\"byline\">messaging freedom</p>\n            </span>\n        </h1>\n        <p class=\"brand-subtitle\">"+o(e.version_name)+"</p>\n        <p class=\"brand-subtitle\"><a target=\"_blank\" rel=\"nofollow\" href=\"https://conversejs.org\">Open Source</a> XMPP chat client brought to you by <a target=\"_blank\" rel=\"nofollow\" href=\"https://opkode.com\">Opkode</a> </p>\n        <p class=\"brand-subtitle\"><a target=\"_blank\" rel=\"nofollow\" href=\"https://hosted.weblate.org/projects/conversejs/#languages\">Translate</a> it into your own language</p>\n    </div>\n</div>\n",t}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/chats_panel.html -->\n<a id=\"toggle-minimized-chats\" href=\"#\" class=\"row no-gutters\"></a>\n<div class=\"flyout minimized-chats-flyout row no-gutters\"></div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/toggle_chats.html -->\n"+o(e.num_minimized)+" "+o(e.Minimized)+"\n<span class=\"unread-message-count ",e.num_unread||(t+=" unread-message-count-hidden "),(t+="\" href=\"#\">"+o(e.num_unread)+"</span>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/trimmed_chat.html -->\n<div class=\"chat-head-"+o(e.type)+" chat-head row no-gutters\">\n    <a class=\"restore-chat w-100 align-self-center\" title=\""+o(e.tooltip)+"\">\n        ",e.num_unread&&(t+="\n            <span class=\"message-count badge badge-light\">"+o(e.num_unread)+"</span>\n        "),(t+="\n        "+o(e.title)+"\n    </a>\n    <a class=\"chatbox-btn close-chatbox-button fa fa-times\"></a>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/add_chatroom_modal.html -->\n<div class=\"modal\" id=\"add-chatroom-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"add-chatroom-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\"\n                    id=\"add-chatroom-modal-label\">"+o(e.__("Enter a new Groupchat"))+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body\">\n                <form class=\"converse-form add-chatroom\">\n                    <div class=\"form-group\">\n                        <label for=\"chatroom\">"+o(e.label_room_address)+":</label>\n                        <input type=\"text\" required=\"required\" name=\"chatroom\" class=\"form-control\" placeholder=\""+o(e.chatroom_placeholder)+"\"/>\n                    </div>\n                    ",e._converse.locked_muc_nickname||(t+="\n                    <div class=\"form-group\" >\n                        <label for=\"nickname\">"+o(e.__("Nickname"))+":</label>\n                        <input type=\"text\" pattern=\".*\\S+.*\" title=\""+o(e.__("This field is required"))+"\" required=\"required\" name=\"nickname\" value=\""+o(e.nick)+"\" class=\"form-control\"/>\n                    </div>\n                    "),(t+="\n                    <input type=\"submit\" class=\"btn btn-primary\" name=\"join\" value=\""+o(e.__("Join"))+"\"/>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatarea.html -->\n<div class=\"chat-area col\">\n    <div class=\"chat-content ",e.show_send_button&&(t+="chat-content-sendbutton"),t+="\" aria-live=\"polite\">\n        ",e.muc_show_logs_before_join&&(t+="\n            <div class=\"empty-history-feedback\"><span>"+o(e.__("No message history available."))+"</span></div>\n        "),(t+="\n    </div>\n    <div class=\"bottom-panel\"></div>\n</div>\n",t)}},function(e,t,o){({escape:o(1)});e.exports=function(){var e="";return e+="<!-- src/templates/chatroom.html -->\n<div class=\"flyout box-flyout\">\n    <div class=\"chat-head chat-head-chatroom row no-gutters\"></div>\n    <div class=\"chat-body chatroom-body row no-gutters\">\n        <div class=\"disconnect-container hidden\"></div>\n    </div>\n</div>\n",e}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_bottom_panel.html -->\n",e.entered?(t+="\n    ",t+=e.can_edit?"\n        <div class=\"emoji-picker__container dropup\"></div>\n        <div class=\"message-form-container\">\n    ":"\n        <div class=\"muc-bottom-panel\">"+o(e.__("You're not allowed to send messages in this room"))+"</div>\n    ",t+="\n"):t+="\n    <div class=\"muc-bottom-panel\"></div>\n",(t+="\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_destroyed.html -->\n<div class=\"alert alert-danger\">\n    <h3 class=\"alert-heading disconnect-msg\">"+o(e.__("This groupchat no longer exists"))+"</h3>\n\n    <p class=\"destroyed-reason\">"+o(e.reason)+"</p>\n\n    ",e.jid&&(t+="\n    <p class=\"moved-label\">\n        "+o(e.__("The conversation has moved. Click below to enter."))+"\n    </p>\n    <p class=\"moved-link\"><a class=\"switch-chat\" href=\"#\">"+o(e.jid)+"</a></p>\n    "),(t+="\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatroom_details_modal.html -->\n<div class=\"modal\" id=\"room-details-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"room-details-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"room-details-modal-label\">"+o(e.display_name)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"room-info\">\n                    <p class=\"room-info\"><strong>"+o(e.__("Name"))+"</strong>: "+o(e.name)+"</p>\n                    <p class=\"room-info\"><strong>"+o(e.__("Groupchat address (JID)"))+"</strong>: "+o(e.jid)+"</p>\n                    <p class=\"room-info\"><strong>"+o(e.__("Description"))+"</strong>: "+o(e.description)+"</p>\n                    ",e.subject&&(t+="\n                    <p class=\"room-info\"><strong>"+o(e.__("Topic"))+"</strong>: "+(null==(s=e.topic)?"":s)+"</p> <!-- Sanitized in converse-muc-views. We want to render links. -->\n                        <p class=\"room-info\"><strong>"+o(e.__("Topic author"))+"</strong>: "+o(e._.get(e.subject,"author"))+"</p>\n                    "),t+="\n                    <p class=\"room-info\"><strong>"+o(e.__("Online users"))+"</strong>: "+o(e.num_occupants)+"</p>\n                    <p class=\"room-info\"><strong>"+o(e.__("Features"))+"</strong>:\n                        <div class=\"chatroom-features\">\n                        <ul class=\"features-list\">\n                        ",e.features.passwordprotected&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-lock\"></span>"+o(e.__("Password protected"))+" - <em>"+o(e.__("This groupchat requires a password before entry"))+"</em></li>\n                        "),t+="\n                        ",e.features.unsecured&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-unlock\"></span>"+o(e.__("No password required"))+" - <em>"+o(e.__("This groupchat does not require a password upon entry"))+"</em></li>\n                        "),t+="\n                        ",e.features.hidden&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-eye-slash\"></span>"+o(e.__("Hidden"))+" - <em>"+o(e.__("This groupchat is not publicly searchable"))+"</em></li>\n                        "),t+="\n                        ",e.features.public_room&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-eye\"></span>"+o(e.__("Public"))+" - <em>"+o(e.__("This groupchat is publicly searchable"))+"</em></li>\n                        "),t+="\n                        ",e.features.membersonly&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-address-book\"></span>"+o(e.__("Members only"))+" - <em>"+o(e.__("This groupchat is restricted to members only"))+"</em></li>\n                        "),t+="\n                        ",e.features.open&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-globe\"></span>"+o(e.__("Open"))+" - <em>"+o(e.__("Anyone can join this groupchat"))+"</em></li>\n                        "),t+="\n                        ",e.features.persistent&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-save\"></span>"+o(e.__("Persistent"))+" - <em>"+o(e.__("This groupchat persists even if it's unoccupied"))+"</em></li>\n                        "),t+="\n                        ",e.features.temporary&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-snowflake-o\"></span>"+o(e.__("Temporary"))+" - <em>"+o(e.__("This groupchat will disappear once the last person leaves"))+"</em></li>\n                        "),t+="\n                        ",e.features.nonanonymous&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-id-card\"></span>"+o(e.__("Not anonymous"))+" - <em>"+o(e.__("All other groupchat participants can see your XMPP address"))+"</em></li>\n                        "),t+="\n                        ",e.features.semianonymous&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-user-secret\"></span>"+o(e.__("Semi-anonymous"))+" - <em>"+o(e.__("Only moderators can see your XMPP address"))+"</em></li>\n                        "),t+="\n                        ",e.features.moderated&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-gavel\"></span>"+o(e.__("Moderated"))+" - <em>"+o(e.__("Participants entering this groupchat need to request permission to write"))+"</em></li>\n                        "),t+="\n                        ",e.features.unmoderated&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-info-circle\"></span>"+o(e.__("Not moderated"))+" - <em>"+o(e.__("Participants entering this groupchat can write right away"))+"</em></li>\n                        "),t+="\n                        ",e.features.mam_enabled&&(t+="\n                        <li class=\"feature\" ><span class=\"fa fa-database\"></span>"+o(e.__("Message archiving"))+" - <em>"+o(e.__("Messages are archived on the server"))+"</em></li>\n                        "),(t+="\n                        </ul>\n                        </div>\n                    </p>\n                </div>\n            </div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-warning\" data-dismiss=\"modal\">"+o(e.__("Close"))+"</button>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_disconnect.html -->\n<div class=\"alert alert-danger\">\n    <h3 class=\"alert-heading disconnect-msg\">"+o(e.disconnect_messages[0])+"</h3>\n\n    ",e._.forEach(e.disconnect_messages.slice(1),function(e){t+="\n        <p class=\"disconnect-msg\">"+o(e)+"</p>\n    "}),(t+="\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chatroom_features.html -->\n<p class=\"occupants-heading\">"+o(e.__("Features"))+"</p>\n<ul class=\"features-list\">\n",e.passwordprotected&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat requires a password before entry"))+"\"><span class=\"fa fa-lock\"></span>"+o(e.__("Password protected"))+"</li>\n"),t+="\n",e.unsecured&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat does not require a password upon entry"))+"\"><span class=\"fa fa-unlock\"></span>"+o(e.__("No password"))+"</li>\n"),t+="\n",e.hidden&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat is not publicly searchable"))+"\"><span class=\"fa fa-eye-slash\"></span>"+o(e.__("Hidden"))+"</li>\n"),t+="\n",e.public_room&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat is publicly searchable"))+"\"><span class=\"fa fa-eye\"></span>"+o(e.__("Public"))+"</li>\n"),t+="\n",e.membersonly&&(t+="\n<li class=\"feature\" title=\""+o(e.__("this groupchat is restricted to members only"))+"\"><span class=\"fa fa-address-book\"></span>"+o(e.__("Members only"))+"</li>\n"),t+="\n",e.open&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Anyone can join this groupchat"))+"\"><span class=\"fa fa-globe\"></span>"+o(e.__("Open"))+"</li>\n"),t+="\n",e.persistent&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat persists even if it's unoccupied"))+"\"><span class=\"fa fa-save\"></span>"+o(e.__("Persistent"))+"</li>\n"),t+="\n",e.temporary&&(t+="\n<li class=\"feature\" title=\""+o(e.__("This groupchat will disappear once the last person leaves"))+"\"><span class=\"fa fa-snowflake\"></span>"+o(e.__("Temporary"))+"</li>\n"),t+="\n",e.nonanonymous&&(t+="\n<li class=\"feature\" title=\""+o(e.__("All other groupchat participants can see your XMPP address"))+"\"><span class=\"fa fa-id-card\"></span>"+o(e.__("Not anonymous"))+"</li>\n"),t+="\n",e.semianonymous&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Only moderators can see your XMPP address"))+"\"><span class=\"fa fa-user-secret\"></span>"+o(e.__("Semi-anonymous"))+"</li>\n"),t+="\n",e.moderated&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Participants entering this groupchat need to request permission to write"))+"\"><span class=\"fa fa-gavel\"></span>"+o(e.__("Moderated"))+"</li>\n"),t+="\n",e.unmoderated&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Participants entering this groupchat can write right away"))+"\"><span class=\"fa fa-info-circle\"></span>"+o(e.__("Not moderated"))+"</li>\n"),t+="\n",e.mam_enabled&&(t+="\n<li class=\"feature\" title=\""+o(e.__("Messages are archived on the server"))+"\"><span class=\"fa fa-database\"></span>"+o(e.__("Message archiving"))+"</li>\n"),(t+="\n</ul>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatroom_form.html -->\n<div class=\"chatroom-form-container muc-config-form\">\n    <form class=\"converse-form chatroom-form\" autocomplete=\"off\">\n        <fieldset class=\"form-group\">\n            <legend>"+o(e.title)+"</legend>\n            ",e.title!==e.instructions&&(t+="\n                <p class=\"form-help\">"+o(e.instructions)+"</p>\n            "),(t+="\n            <!-- Fields are generated internally, with xForm2webForm -->\n            ",e.fields.forEach(function(e){t+=" "+(null==(s=e)?"":s)+" "}),t+="\n        </fieldset>\n        <fieldset>\n            <input type=\"submit\" class=\"btn btn-primary\" value=\""+o(e.__("Save"))+"\"/>\n            <input type=\"button\" class=\"btn btn-secondary .button-cancel\" value=\""+o(e.__("Cancel"))+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join,s;return t+="<!-- src/templates/chatroom_head.html -->\n",e._converse.singleton||(t+="\n    <div class=\"chatbox-navback\"><i class=\"fa fa-arrow-left\"></i></div>\n"),t+="\n<div class=\"chatbox-title\">\n    <div class=\"chat-title\" ","hidden"!==e._converse.locked_muc_domain&&(t+=" title=\""+o(e.jid)+"\" "),t+=" >\n        "+o(e.title)+"\n    </div>\n    <!-- Sanitized in converse-muc-views. We want to render links. -->\n    <p class=\"chatroom-description\">"+(null==(s=e.description)?"":s)+"</p>\n</div>\n<div class=\"chatbox-buttons row no-gutters\">\n    ",e._converse.singleton||(t+="\n        <a class=\"chatbox-btn close-chatbox-button fa fa-sign-out-alt\" title=\""+o(e.info_close)+"\"></a>\n    "),t+="\n    ",e.isOwner&&(t+="\n        <a class=\"chatbox-btn configure-chatroom-button fa fa-wrench\" title=\""+o(e.info_configure)+" \"></a>\n    "),(t+="\n    <a class=\"chatbox-btn show-room-details-modal fa fa-info-circle\" title=\""+o(e.info_details)+"\"></a>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a;return t+="<!-- src/templates/chatroom_nickname_form.html -->\n<div class=\"chatroom-form-container muc-nickname-form\">\n    <form class=\"converse-form chatroom-form converse-centered-form\">\n        <fieldset class=\"form-group\">\n            <label>"+o(e.heading)+"</label>\n            <input type=\"text\" required=\"required\" name=\"nick\" value=\""+o(e.nickname)+"\"\n                   class=\"form-control "+(null==(a=e.error_class)?"":a)+"\" placeholder=\""+o(e.label_nickname)+"\"/>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <input type=\"submit\" class=\"btn btn-primary\" name=\"join\" value=\""+o(e.label_join)+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a;return t+="<!-- src/templates/chatroom_password_form.html -->\n<div class=\"chatroom-form-container muc-password-form\">\n    <form class=\"converse-form chatroom-form converse-centered-form\">\n        <fieldset class=\"form-group\">\n            <label>"+o(e.heading)+"</label>\n            <p class=\"validation-message\">"+o(e.validation_message)+"</p>\n            <input class=\"hidden-username\" type=\"text\" autocomplete=\"username\" value=\""+o(e.jid)+"\"></input>\n            <input type=\"password\" name=\"password\" required=\"required\"\n                   class=\"form-control "+(null==(a=e.error_class)?"":a)+"\" placeholder=\""+o(e.label_password)+"\"/>\n        </fieldset>\n        <fieldset class=\"form-group\">\n            <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.label_submit)+"\"/>\n        </fieldset>\n    </form>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/chatroom_sidebar.html -->\n<!-- <div class=\"occupants\"> -->\n<div class=\"occupants-header\">\n    <i class=\"hide-occupants fa fa-times\"></i>\n    <p class=\"occupants-heading\">"+o(e.label_occupants)+"</p>\n</div>\n<div class=\"dragresize dragresize-occupants-left\"></div>\n<ul class=\"occupant-list\"></ul>\n<div class=\"chatroom-features\"></div>\n<!-- </div> -->\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/list_chatrooms_modal.html -->\n<div class=\"modal\" id=\"list-chatrooms-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"list-chatrooms-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\"\n                    id=\"list-chatrooms-modal-label\">"+o(e.heading_list_chatrooms)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body d-flex flex-column\">\n                ",e.show_form&&(t+="\n                <form class=\"converse-form list-chatrooms\">\n                    <div class=\"form-group\">\n                        <label for=\"chatroom\">"+o(e.label_server_address)+":</label>\n                        <input type=\"text\" value=\""+o(e.muc_domain)+"\" required=\"required\" name=\"server\" class=\"form-control\" placeholder=\""+o(e.server_placeholder)+"\"/>\n                    </div>\n                    <input type=\"submit\" class=\"btn btn-primary\" name=\"list\" value=\""+o(e.label_query)+"\"/>\n                </form>\n                "),(t+="\n                <ul class=\"available-chatrooms list-group\"></ul>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/moderator_tools_modal.html -->\n<div class=\"modal\" id=\"converse-modtools-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"converse-modtools-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"converse-modtools-modal-label\">"+o(e.__("Moderator Tools"))+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body d-flex flex-column\">\n                <ul class=\"nav nav-pills justify-content-center\">\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link active\" id=\"roles-tab\" href=\"#roles-tabpanel\" aria-controls=\"roles-tabpanel\" role=\"tab\" data-toggle=\"tab\">Roles</a>\n                    </li>\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link\" id=\"affiliations-tab\" href=\"#affiliations-tabpanel\" aria-controls=\"affiliations-tabpanel\" role=\"tab\" data-toggle=\"tab\">Affiliations</a>\n                    </li>\n                </ul>\n\n                <div class=\"tab-content\">\n                    <div class=\"tab-pane tab-pane--columns active\" id=\"roles-tabpanel\" role=\"tabpanel\" aria-labelledby=\"roles-tab\">\n                        <form class=\"converse-form query-role\">\n                            <p class=\"helptext pb-3\">\n"+o(e.__("Roles are assigned to users to grant or deny them certain abilities in a multi-user chat. They're assigned either explicitly or implicitly as part of an affiliation. A role that's not due to an affiliation, is only valid for the duration of the user's session."))+"\n                            </p>\n                            <div class=\"form-group\">\n                                <label for=\"role\">\n                                    <strong>"+o(e.__("Role"))+":</strong>\n                                </label>\n                                <div class=\"row\">\n                                    <div class=\"col\">\n                                        <select class=\"custom-select select-role\" name=\"role\">\n                                            ",e.roles.forEach(function(n){t+="\n                                                <option value=\""+o(n)+"\" ",n===e.role&&(t+=" selected=\"selected\" "),t+="\n                                                    ","moderator"===n&&(t+="\n                                                    title=\""+o(e.__("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations."))+"\"\n                                                    "),t+="\n                                                    ","participant"===n&&(t+="\n                                                    title=\""+o(e.__("The default role, implies that you can read and write messages."))+"\"\n                                                    "),t+="\n                                                    ","visitor"===n&&(t+="\n                                                    title=\""+o(e.__("Visitors aren't allowed to write messages in a moderated multi-user chat."))+"\"\n                                                    "),t+=">"+o(n)+"</option>\n                                            "}),t+="\n                                        </select>\n                                    </div>\n                                    <div class=\"col\">\n                                        <input type=\"submit\" class=\"btn btn-primary\" name=\"users_with_role\" value=\""+o(e.__("Show users"))+"\"/>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col pt-2\">\n                                        ","moderator"===e.role&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations."))+"</p>\n                                        "),t+="\n                                        ","participant"===e.role&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("The default role, implies that you can read and write messages."))+"</p>\n                                        "),t+="\n                                        ","visitor"===e.role&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Visitors aren't allowed to write messages in a moderated multi-user chat."))+"</p>\n                                        "),t+="\n                                    </div>\n                                </div>\n                            </div>\n                        </form>\n                        <div class=\"scrollable-container\">\n                        <ul class=\"list-group list-group--users\">\n                            ",e.loading_users_with_role&&(t+="\n                                <li class=\"list-group-item\"> <span class=\"spinner fa fa-spinner centered\"/> </li>\n                            "),t+="\n                            ",e.users_with_role&&0===e.users_with_role.length&&(t+="\n                                <li class=\"list-group-item\">"+o(e.__("No users with that role found."))+"</li>\n                            "),t+="\n                            ",(e.users_with_role||[]).forEach(function(n){t+="\n                                <li class=\"list-group-item\">\n                                    <ul class=\"list-group\">\n                                        <li class=\"list-group-item active\">\n                                            <div><strong>JID:</strong> "+o(n.jid)+"</div>\n                                        </li>\n                                        <li class=\"list-group-item\">\n                                            <div><strong>Nickname:</strong> "+o(n.nick)+"</div>\n                                        </li>\n                                        <li class=\"list-group-item\">\n                                            <div><strong>Role:</strong> "+o(n.role)+"<a href=\"#\" data-form=\"role-form\" class=\"toggle-form right fa fa-wrench\"></a></div>\n                                            <form class=\"role-form hidden\">\n                                                <div class=\"form-group\">\n                                                    <input type=\"hidden\" name=\"jid\" value=\""+o(n.jid)+"\"/>\n                                                    <input type=\"hidden\" name=\"nick\" value=\""+o(n.nick)+"\"/>\n                                                    <div class=\"row\">\n                                                        <div class=\"col\">\n                                                            <label><strong>"+o(e.__("New Role"))+":</strong></label>\n                                                            <select class=\"custom-select select-role\" name=\"role\">\n                                                                ",e.allowed_roles.forEach(function(e){t+="\n                                                                    <option value=\""+o(e)+"\" ",e===n.role&&(t+=" selected=\"selected\" "),t+=">"+o(e)+"</option>\n                                                                "}),t+="\n                                                            </select>\n                                                        </div>\n                                                        <div class=\"col\">\n                                                            <label><strong>"+o(e.__("Reason"))+":</strong></label>\n                                                            <input class=\"form-control\" type=\"text\" name=\"reason\"/>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"form-group\">\n                                                    <input type=\"submit\" class=\"btn btn-primary\" value=\""+o(e.__("Change role"))+"\"/>\n                                                </div>\n                                            </form>\n                                        </li>\n                                    </ul>\n                                </li>\n                            "}),t+="\n                        </ul>\n                        </div>\n                    </div>\n\n\n                    <div class=\"tab-pane tab-pane--columns\" id=\"affiliations-tabpanel\" role=\"tabpanel\" aria-labelledby=\"affiliations-tab\">\n                        <form class=\"converse-form query-affiliation\">\n                            <p class=\"helptext pb-3\">\n"+o(e.__("An affiliation is a long-lived entitlement which typically implies a certain role and which grants privileges and responsibilities. For example admins and owners automatically have the moderator role."))+"\n                            </p>\n                            <div class=\"form-group\">\n                                <label for=\"affiliation\">\n                                    <strong>"+o(e.__("Affiliation"))+":</strong>\n                                </label>\n                                <div class=\"row\">\n                                    <div class=\"col\">\n                                        <select class=\"custom-select select-affiliation\" name=\"affiliation\">\n                                            ",e.affiliations.forEach(function(n){t+="\n                                                <option value=\""+o(n)+"\" ",n===e.affiliation&&(t+=" selected=\"selected\" "),t+="\n                                                    ","owner"===n&&(t+="\n                                                    title=\""+o(e.__("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users."))+"\"\n                                                    "),t+="\n                                                    ","admin"===n&&(t+="\n                                                    title=\""+o(e.__("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners."))+"\"\n                                                    "),t+="\n                                                    ","outcast"===n&&(t+="\n                                                    title=\""+o(e.__("To ban a user, you give them the affiliation of \"outcast\"."))+"\"\n                                                    "),t+=">"+o(n)+"</option>\n                                            "}),t+="\n                                        </select>\n                                    </div>\n                                    <div class=\"col\">\n                                        <input type=\"submit\" class=\"btn btn-primary\" name=\"users_with_affiliation\" value=\""+o(e.__("Show users"))+"\"/>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col pt-2\">\n                                        ","owner"===e.affiliation&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users."))+"</p>\n                                        "),t+="\n                                        ","admin"===e.affiliation&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners."))+"</p>\n                                        "),t+="\n                                        ","outcast"===e.affiliation&&(t+="\n                                        <p class=\"helptext pb-3\">"+o(e.__("To ban a user, you give them the affiliation of \"outcast\"."))+"</p>\n                                        "),t+="\n                                    </div>\n                                </div>\n                            </div>\n                        </form>\n                        <div class=\"scrollable-container\">\n                        <ul class=\"list-group list-group--users\">\n                            ",e.loading_users_with_affiliation?t+="\n                                <li class=\"list-group-item\"> <span class=\"spinner fa fa-spinner centered\"/> </li>\n                            ":(t+="\n                                ",e.users_with_affiliation&&0===e.users_with_affiliation.length?t+="\n                                    <li class=\"list-group-item\">"+o(e.__("No users with that affiliation found."))+"</li>\n                                ":e.users_with_affiliation instanceof Error?t+="\n                                    <li class=\"list-group-item\">"+o(e.users_with_affiliation.message)+"</li>\n                                ":(t+="\n                                    ",(e.users_with_affiliation||[]).forEach(function(n){t+="\n                                        <li class=\"list-group-item\">\n                                            <ul class=\"list-group\">\n                                                <li class=\"list-group-item active\">\n                                                    <div><strong>JID:</strong> "+o(n.jid)+"</div>\n                                                </li>\n                                                <li class=\"list-group-item\">\n                                                    <div><strong>Nickname:</strong> "+o(n.nick)+"</div>\n                                                </li>\n                                                <li class=\"list-group-item\">\n                                                    <div><strong>Affiliation:</strong> "+o(n.affiliation)+" <a href=\"#\" data-form=\"affiliation-form\" class=\"toggle-form right fa fa-wrench\"></a></div>\n                                                    <form class=\"affiliation-form hidden\">\n                                                        <div class=\"form-group\">\n                                                            <input type=\"hidden\" name=\"jid\" value=\""+o(n.jid)+"\"/>\n                                                            <input type=\"hidden\" name=\"nick\" value=\""+o(n.nick)+"\"/>\n                                                            <div class=\"row\">\n                                                                <div class=\"col\">\n                                                                    <label><strong>"+o(e.__("New affiliation"))+":</strong></label>\n                                                                    <select class=\"custom-select select-affiliation\" name=\"affiliation\">\n                                                                        ",e.allowed_affiliations.forEach(function(e){t+="\n                                                                            <option value=\""+o(e)+"\" ",e===n.affiliation&&(t+=" selected=\"selected\" "),t+=">"+o(e)+"</option>\n                                                                        "}),t+="\n                                                                    </select>\n                                                                </div>\n                                                                <div class=\"col\">\n                                                                    <label><strong>"+o(e.__("Reason"))+":</strong></label>\n                                                                    <input class=\"form-control\" type=\"text\" name=\"reason\"/>\n                                                                </div>\n                                                            </div>\n                                                        </div>\n                                                        <div class=\"form-group\">\n                                                            <input type=\"submit\" class=\"btn btn-primary\" name=\"change\" value=\""+o(e.__("Change affiliation"))+"\"/>\n                                                        </div>\n                                                    </form>\n                                                </li>\n                                            </ul>\n                                        </li>\n                                    "}),t+="\n                                "),t+="\n                            "),(t+="\n                        </ul>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/occupant.html -->\n<li class=\"occupant\" id=\""+o(e.id)+"\"\n    ","moderator"===e.role&&(t+="\n       title=\""+o(e.jid)+" "+o(e.desc_moderator)+" "+o(e.hint_occupant)+"\"\n    "),t+="\n    ","participant"===e.role&&(t+="\n       title=\""+o(e.jid)+" "+o(e.desc_participant)+" "+o(e.hint_occupant)+"\"\n    "),t+="\n    ","visitor"===e.role&&(t+="\n       title=\""+o(e.jid)+" "+o(e.desc_visitor)+" "+o(e.hint_occupant)+"\"\n    "),t+="\n    ",e._.includes(["visitor","participant","moderator"],e.role)||(t+="\n       title=\""+o(e.jid)+" "+o(e.hint_occupant)+"\"\n    "),t+=">\n    <div class=\"row no-gutters\">\n        <div class=\"col-auto\">\n            <div class=\"occupant-status occupant-"+o(e.show)+" circle\" title=\""+o(e.hint_show)+"\"></div>\n        </div>\n        <div class=\"col occupant-nick-badge\">\n            <span class=\"occupant-nick\">"+o(e.nick||e.jid)+"</span>\n            <span class=\"occupant-badges\">\n                ","owner"===e.affiliation&&(t+="\n                    <span class=\"badge badge-groupchat\">"+o(e.label_owner)+"</span>\n                "),t+="\n                ","admin"===e.affiliation&&(t+="\n                    <span class=\"badge badge-info\">"+o(e.label_admin)+"</span>\n                "),t+="\n                ","member"===e.affiliation&&(t+="\n                    <span class=\"badge badge-info\">"+o(e.label_member)+"</span>\n                "),t+="\n\n                ","moderator"===e.role&&(t+="\n                    <span class=\"badge badge-info\">"+o(e.label_moderator)+"</span>\n                "),t+="\n                ","visitor"===e.role&&(t+="\n                    <span class=\"badge badge-secondary\">"+o(e.label_visitor)+"</span>\n                "),(t+="\n            </span>\n        </div>\n    </div>\n</li>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/room_description.html -->\n<!-- FIXME: check markup in mockup -->\n<div class=\"room-info\">\n<p class=\"room-info\"><strong>"+o(e.label_jid)+"</strong> "+o(e.jid)+"</p>\n<p class=\"room-info\"><strong>"+o(e.label_desc)+"</strong> "+o(e.desc)+"</p>\n<p class=\"room-info\"><strong>"+o(e.label_occ)+"</strong> "+o(e.occ)+"</p>\n<p class=\"room-info\"><strong>"+o(e.label_features)+"</strong>\n    <ul>\n        ",e.passwordprotected&&(t+="\n        <li class=\"room-info locked\">"+o(e.label_requires_auth)+"</li>\n        "),t+="\n        ",e.hidden&&(t+="\n        <li class=\"room-info\">"+o(e.label_hidden)+"</li>\n        "),t+="\n        ",e.membersonly&&(t+="\n        <li class=\"room-info\">"+o(e.label_requires_invite)+"</li>\n        "),t+="\n        ",e.moderated&&(t+="\n        <li class=\"room-info\">"+o(e.label_moderated)+"</li>\n        "),t+="\n        ",e.nonanonymous&&(t+="\n        <li class=\"room-info\">"+o(e.label_non_anon)+"</li>\n        "),t+="\n        ",e.open&&(t+="\n        <li class=\"room-info\">"+o(e.label_open_room)+"</li>\n        "),t+="\n        ",e.persistent&&(t+="\n        <li class=\"room-info\">"+o(e.label_permanent_room)+"</li>\n        "),t+="\n        ",e.publicroom&&(t+="\n        <li class=\"room-info\">"+o(e.label_public)+"</li>\n        "),t+="\n        ",e.semianonymous&&(t+="\n        <li class=\"room-info\">"+o(e.label_semi_anon)+"</li>\n        "),t+="\n        ",e.temporary&&(t+="\n        <li class=\"room-info\">"+o(e.label_temp_room)+"</li>\n        "),t+="\n        ",e.unmoderated&&(t+="\n        <li class=\"room-info\">"+o(e.label_unmoderated)+"</li>\n        "),(t+="\n    </ul>\n</p>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/room_item.html -->\n<li class=\"room-item list-group-item\">\n  <div class=\"available-chatroom d-flex flex-row\">\n    <a class=\"open-room available-room w-100\"\n       data-room-jid=\""+o(e.jid)+"\"\n       data-room-name=\""+o(e.name)+"\"\n       title=\""+o(e.open_title)+"\"\n       href=\"#\">"+o(e.name)+"</a>\n    <a class=\"right room-info icon-room-info\"\n       data-room-jid=\""+o(e.jid)+"\"\n       title=\""+o(e.info_title)+"\" href=\"#\"></a>\n  </div>\n</li>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape;return t+="<!-- src/templates/room_panel.html -->\n<!-- <div id=\"chatrooms\"> -->\n<div class=\"d-flex controlbox-padded\">\n    <span class=\"w-100 controlbox-heading controlbox-heading--groupchats\">"+o(e.heading_chatrooms)+"</span>\n    <a class=\"controlbox-heading__btn show-list-muc-modal fa fa-list-ul\" title=\""+o(e.title_list_rooms)+"\" data-toggle=\"modal\" data-target=\"#list-chatrooms-modal\"></a>\n    <a class=\"controlbox-heading__btn show-add-muc-modal fa fa-plus\" title=\""+o(e.title_new_room)+"\" data-toggle=\"modal\" data-target=\"#add-chatrooms-modal\"></a>\n</div>\n<div class=\"list-container list-container--openrooms\"></div>\n<div class=\"list-container list-container--bookmarks\"></div>\n<!-- </div> -->\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/chat_status_modal.html -->\n<!-- Change status Modal -->\n<div class=\"modal\" id=\"modal-status-change\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"changeStatusModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"changeStatusModalLabel\">"+o(e.modal_title)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body\">\n                <form class=\"converse-form set-xmpp-status\" id=\"set-xmpp-status\">\n                    <div class=\"form-group\">\n                        <div class=\"custom-control custom-radio\">\n                            <input ","online"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-online\" value=\"online\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-online\">\n                                <span class=\"fa fa-circle chat-status chat-status--online\"></span>"+o(e.label_online)+"</label>\n                        </div>\n                        <div class=\"custom-control custom-radio\">\n                            <input ","busy"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-busy\" value=\"dnd\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-busy\">\n                                <span class=\"fa fa-minus-circle  chat-status chat-status--busy\"></span>"+o(e.label_busy)+"</label>\n                        </div>\n                        <div class=\"custom-control custom-radio\">\n                            <input ","away"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-away\" value=\"away\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-away\">\n                                <span class=\"fa fa-circle chat-status chat-status--away\"></span>"+o(e.label_away)+"</label>\n                        </div>\n                        <div class=\"custom-control custom-radio\">\n                            <input ","xa"===e.status&&(t+=" checked=\"checked\" "),t+="\n                                   type=\"radio\" id=\"radio-xa\" value=\"xa\" name=\"chat_status\" class=\"custom-control-input\"/>\n                            <label class=\"custom-control-label\" for=\"radio-xa\">\n                                <span class=\"far fa-circle chat-status chat-status--xa\"></span>"+o(e.label_xa)+"</label>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <div class=\"btn-group w-100\">\n                            <input name=\"status_message\" type=\"text\" class=\"form-control\" \n                                value=\""+o(e.status_message)+"\" placeholder=\""+o(e.placeholder_status_message)+"\"/>\n                            <span class=\"clear-input fa fa-times ",e.status_message||(t+=" hidden "),(t+="\"></span>\n                        </div>\n                    </div>\n                    <button type=\"submit\" class=\"btn btn-primary\">"+o(e.label_save)+"</button>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a;return t+="<!-- src/templates/client_info_modal.html -->\n<!-- Change status Modal -->\n<div class=\"modal\" id=\"modal-status-change\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"changeStatusModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"changeStatusModalLabel\">"+o(e.modal_title)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\">\n                    <span aria-hidden=\"true\">\xD7</span>\n                </button>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"container brand-heading-container\">\n                    <h6 class=\"brand-heading\">Converse</h6>\n                    <p class=\"brand-subtitle\">"+o(e.version_name)+"</p>\n                    <p class=\"brand-subtitle\">"+(null==(a=e.first_subtitle)?"":a)+"</p>\n                    <p class=\"brand-subtitle\">"+(null==(a=e.second_subtitle)?"":a)+"</p>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n",t}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/profile_modal.html -->\n<div class=\"modal\" id=\"user-profile-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"user-profile-modal-label\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"user-profile-modal-label\">"+o(e.heading_profile)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\""+o(e.label_close)+"\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <div class=\"modal-body\">\n                ",e._converse.pluggable.plugins["converse-omemo"].enabled(e._converse)&&(t+="\n                <ul class=\"nav nav-pills justify-content-center\">\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link active\" id=\"profile-tab\" href=\"#profile-tabpanel\" aria-controls=\"profile-tabpanel\" role=\"tab\" data-toggle=\"tab\">Profile</a>\n                    </li>\n                    <li role=\"presentation\" class=\"nav-item\">\n                        <a class=\"nav-link\" id=\"omemo-tab\" href=\"#omemo-tabpanel\" aria-controls=\"omemo-tabpanel\" role=\"tab\" data-toggle=\"tab\">OMEMO</a>\n                    </li>\n                </ul>\n                "),t+="\n                <div class=\"tab-content\">\n                    <div class=\"tab-pane active\" id=\"profile-tabpanel\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">\n                        <form class=\"converse-form converse-form--modal profile-form\" action=\"#\">\n                            <div class=\"row\">\n                                <div class=\"col-auto\">\n                                    <a class=\"change-avatar\" href=\"#\">\n                                        ",e.image&&(t+="\n                                            <img alt=\""+o(e.alt_avatar)+"\" class=\"img-thumbnail avatar align-self-center\" height=\"100px\" width=\"100px\" src=\"data:"+o(e.image_type)+";base64,"+o(e.image)+"\"/>\n                                        "),t+="\n                                        ",e.image||(t+="\n                                            <canvas class=\"avatar\" height=\"100px\" width=\"100px\"></canvas>\n                                        "),t+="\n                                    </a>\n                                    <input class=\"hidden\" name=\"image\" type=\"file\"/>\n                                </div>\n                                <div class=\"col\">\n                                    <div class=\"form-group\">\n                                        <label class=\"col-form-label\">"+o(e.label_jid)+":</label>\n                                        <div>"+o(e.jid)+"</div>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-fullname\" class=\"col-form-label\">"+o(e.label_fullname)+":</label>\n                                <input id=\"vcard-fullname\" type=\"text\" class=\"form-control\" name=\"fn\" value=\""+o(e.fullname)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-nickname\" class=\"col-form-label\">"+o(e.label_nickname)+":</label>\n                                <input id=\"vcard-nickname\" type=\"text\" class=\"form-control\" name=\"nickname\" value=\""+o(e.nickname)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-url\" class=\"col-form-label\">"+o(e.label_url)+":</label>\n                                <input id=\"vcard-url\" type=\"url\" class=\"form-control\" name=\"url\" value=\""+o(e.url)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-email\" class=\"col-form-label\">"+o(e.label_email)+":</label>\n                                <input id=\"vcard-email\" type=\"email\" class=\"form-control\" name=\"email\" value=\""+o(e.email)+"\"/>\n                            </div>\n                            <div class=\"form-group\">\n                                <label for=\"vcard-role\" class=\"col-form-label\">"+o(e.label_role)+":</label>\n                                <input id=\"vcard-role\" type=\"text\" class=\"form-control\" name=\"role\" value=\""+o(e.role)+"\" aria-describedby=\"vcard-role-help\"/>\n                                <small id=\"vcard-role-help\" class=\"form-text text-muted\">"+o(e.label_role_help)+"</small>\n                            </div>\n                            <hr/>\n                            <div class=\"form-group\">\n                                <button type=\"submit\" class=\"save-form btn btn-primary\">"+o(e.__("Save and close"))+"</button>\n                            </div>\n                        </form>\n                    </div>\n                    ",e._converse.pluggable.plugins["converse-omemo"].enabled(e._converse)&&(t+="\n                        <div class=\"tab-pane\" id=\"omemo-tabpanel\" role=\"tabpanel\" aria-labelledby=\"omemo-tab\">\n                            <form class=\"converse-form fingerprint-removal\">\n                                <ul class=\"list-group fingerprints\">\n                                    <li class=\"list-group-item active\">"+o(e.__("This device's OMEMO fingerprint"))+"</li>\n                                    <li class=\"list-group-item\">\n                                    ",t+=e.view.current_device&&e.view.current_device.get("bundle")&&e.view.current_device.get("bundle").fingerprint?"\n                                        <span class=\"fingerprint\">"+o(e.utils.formatFingerprint(e.view.current_device.get("bundle").fingerprint))+"</span>\n                                    ":"\n                                        <span class=\"spinner fa fa-spinner centered\"/>\n                                    ",t+="\n                                    </li>\n                                </ul>\n                                <div class=\"form-group\">\n                                    <button type=\"button\" class=\"generate-bundle btn btn-danger\">"+o(e.__("Generate new keys and fingerprint"))+"</button>\n                                </div>\n\n                                ",e.view.other_devices.length&&(t+="\n                                    <ul class=\"list-group fingerprints\">\n                                        <li class=\"list-group-item nopadding active\">\n                                            <label>\n                                            <input type=\"checkbox\" class=\"select-all\" title=\""+o(e.__("Select all"))+"\"\n                                                   aria-label=\""+o(e.__("Checkbox to select fingerprints of all other OMEMO devices"))+"\"/>\n                                            "+o(e.__("Other OMEMO-enabled devices"))+"\n                                            </label>\n                                        </li>\n                                        ",e.view.other_devices.forEach(function(n){t+="\n                                            ",t+=n.get("bundle")&&n.get("bundle").fingerprint?"\n                                            <li class=\"fingerprint-removal-item list-group-item nopadding\">\n                                                <label>\n                                                <input type=\"checkbox\" value=\""+o(n.get("id"))+"\"\n                                                       aria-label=\""+o(e.__("Checkbox for selecting the following fingerprint"))+"\"/>\n                                                <span class=\"fingerprint\">"+o(e.utils.formatFingerprint(n.get("bundle").fingerprint))+"</span>\n                                                </label>\n                                            </li>\n                                            ":"\n                                            <li class=\"fingerprint-removal-item list-group-item nopadding\">\n                                                <label>\n                                                <input type=\"checkbox\" value=\""+o(n.get("id"))+"\"\n                                                       aria-label=\""+o(e.__("Checkbox for selecting the following fingerprint"))+"\"/>\n                                                <span>"+o(e.__("Device without a fingerprint"))+"</span>\n                                                </label>\n                                            </li>\n                                            ",t+="\n                                        "}),t+="\n                                    </ul>\n                                    <div class=\"form-group\">\n                                        <button type=\"submit\" class=\"save-form btn btn-primary\">"+o(e.__("Remove checked devices and close"))+"</button>\n                                    </div>\n                                "),t+="\n                            </form>\n                        </div>\n                    "),(t+="\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/profile_view.html -->\n<div class=\"userinfo controlbox-padded\">\n<div class=\"controlbox-section profile d-flex\">\n    <a class=\"show-profile\" href=\"#\">\n        <canvas class=\"avatar align-self-center\" height=\"40\" width=\"40\"></canvas>\n    </a>\n    <span class=\"username w-100 align-self-center\">"+o(e.fullname)+"</span>\n    ",e._converse.show_client_info&&(t+="\n        <a class=\"controlbox-heading__btn show-client-info fa fa-info-circle align-self-center\" title=\""+o(e.info_details)+"\"></a>\n    "),t+="\n    ",e._converse.allow_logout&&(t+="\n        <a class=\"controlbox-heading__btn logout fa fa-sign-out-alt align-self-center\" title=\""+o(e.title_log_out)+"\"></a>\n    "),t+="\n</div>\n<div class=\"d-flex xmpp-status\">\n    <a class=\"change-status\" title=\""+o(e.title_change_status)+"\" data-toggle=\"modal\" data-target=\"#changeStatusModal\">\n        <span class=\""+o(e.chat_status)+" w-100 align-self-center\" data-value=\""+o(e.chat_status)+"\">\n            <span class=\"\n                ","online"===e.chat_status&&(t+=" fa fa-circle chat-status chat-status--online"),t+="\n                ","dnd"===e.chat_status&&(t+=" fa fa-minus-circle chat-status chat-status--busy "),t+="\n                ","away"===e.chat_status&&(t+=" fa fa-circle chat-status chat-status--away"),t+="\n                ","xa"===e.chat_status&&(t+=" far fa-circle chat-status chat-status--xa "),t+="\n                ","offline"===e.chat_status&&(t+=" fa fa-circle chat-status chat-status--offline"),(t+="\"></span> "+o(e.status_message)+"</span>\n    </a>\n</div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/toolbar_omemo.html -->\n<li class=\"toggle-omemo fa \n        ",e.omemo_supported||(t+=" disabled "),t+="\n        ",t+=e.omemo_active?" fa-lock ":" fa-unlock ",(t+="\"\n    title=\""+o(e.__("Messages are being sent in plaintext"))+"\"></li>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/register_link.html -->\n<fieldset class=\"switch-form\">\n    ",e._converse.auto_login||"CONNECTING"===e._converse.CONNECTION_STATUS[e.connection_status]||(t+="\n        <p>"+o(e.__("Don't have a chat account?"))+"</p>\n        <p><a class=\"register-account toggle-register-login\" href=\"#converse/register\">"+o(e.__("Create an account"))+"</a></p>\n    "),(t+="\n</fieldset>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/register_panel.html -->\n<div>\n    <form id=\"converse-register\" class=\"converse-form\">\n        <legend class=\"col-form-label\">"+o(e.__("Create your account"))+"</legend>\n\n        <div class=\"form-group\">\n            <label>"+o(e.__("Please enter the XMPP provider to register with:"))+"</label>\n            <div class=\"form-errors hidden\"></div>\n\n            ",t+=e.default_domain?"\n                "+o(e.default_domain)+"\n            </div>\n            ":"\n                <input class=\"form-control\" required=\"required\" type=\"text\" name=\"domain\" placeholder=\""+o(e.domain_placeholder)+"\"/>\n                <p class=\"form-text text-muted\">"+o(e.help_providers)+" <a href=\""+o(e.href_providers)+"\" class=\"url\" target=\"_blank\" rel=\"noopener\">"+o(e.help_providers_link)+"</a>.</p>\n            </div>\n            <fieldset class=\"buttons\">\n                <input class=\"btn btn-primary\" type=\"submit\" value=\""+o(e.label_register)+"\"/>\n                <div class=\"switch-form\">\n                    <p>"+o(e.__("Already have a chat account?"))+"</p>\n                    <p><a class=\"login-here toggle-register-login\" href=\"#converse/login\">"+o(e.__("Log in here"))+"</a></p>\n                </div>\n            </fieldset>\n            ",(t+="\n        <!--</div>-->\n    </form>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/registration_form.html -->\n<legend class=\"col-form-label\">"+o(e.__("Account Registration:"))+" "+o(e.domain)+"</legend>\n<p class=\"title\">"+o(e.title)+"</p>\n<p class=\"form-help instructions\">"+o(e.instructions)+"</p>\n<div class=\"form-errors hidden\"></div>\n\n<fieldset class=\"buttons\">\n    <input type=\"submit\" class=\"btn btn-primary\" value=\""+o(e.__("Register"))+"\"/>\n    ",e.registration_domain||(t+="\n        <input type=\"button\" class=\"btn btn-secondary button-cancel\" value=\""+o(e.__("Choose a different provider"))+"\"/>\n    "),(t+="\n    <div class=\"switch-form\">\n        <p>"+o(e.__("Already have a chat account?"))+"</p>\n        <p><a class=\"login-here toggle-register-login\" href=\"#converse/login\">"+o(e.__("Log in here"))+"</a></p>\n    </div>\n</fieldset>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/registration_request.html -->\n<span class=\"spinner login-submit fa fa-spinner\"></span>\n<p class=\"info\">"+o(e.__("Hold tight, we're fetching the registration form\u2026"))+"</p>\n",e.cancel&&(t+="\n    <button class=\"btn btn-secondary button-cancel hor_centered\">"+o(e.__("Cancel"))+"</button>\n"),(t+="\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/rooms_list.html -->\n<div class=\"list-container list-container--openrooms "+o(!e.rooms.length&&"hidden"||"")+"\">\n\n<a href=\"#\" class=\"list-toggle open-rooms-toggle controlbox-padded\" title=\""+o(e.desc_rooms)+"\">\n<span class=\"fa ",t+=e.toggle_state===e._converse.OPENED?" fa-caret-down ":" fa-caret-right ",(t+="\"></span>"+o(e.label_rooms)+"</a>\n\n<div class=\"items-list rooms-list open-rooms-list "+o(e.collapsed&&"collapsed")+"\">\n    ",e.rooms.forEach(function(n){t+="\n        <div class=\"list-item controlbox-padded available-chatroom d-flex flex-row\n            ",e.currently_open(n)&&(t+=" open "),t+="\n            ",n.get("num_unread_general")&&(t+=" unread-msgs "),t+="\"\n            data-room-jid=\""+o(n.get("jid"))+"\">\n\n        ",n.get("num_unread")&&(t+="\n            <span class=\"list-item-badge badge badge-room-color msgs-indicator\">"+o(n.get("num_unread"))+"</span>\n        "),t+="\n        <a class=\"list-item-link open-room available-room w-100\"\n            data-room-jid=\""+o(n.get("jid"))+"\"\n            title=\""+o(e.open_title)+"\" href=\"#\">"+o(n.getDisplayName())+"</a>\n\n        ",e.allow_bookmarks&&(t+="\n        <a class=\"list-item-action fa ",t+=e.bookmarked?" fa-bookmark remove-bookmark button-on ":" add-bookmark fa-bookmark ",t+="\"\n           data-room-jid=\""+o(n.get("jid"))+"\"\n           data-bookmark-name=\""+o(n.getDisplayName())+"\"\n           title=\"",t+=e.bookmarked?" "+o(e.info_remove_bookmark)+" ":" "+o(e.info_add_bookmark)+" ",t+="\"\n           href=\"#\"></a>\n        "),t+="\n\n        <a class=\"list-item-action room-info fa fa-info-circle\"\n           data-room-jid=\""+o(n.get("jid"))+"\"\n           title=\""+o(e.info_title)+"\" href=\"#\"></a>\n\n        <a class=\"list-item-action fa fa-sign-out-alt close-room\"\n           data-room-jid=\""+o(n.get("jid"))+"\"\n           data-room-name=\""+o(n.getDisplayName())+"\"\n           title=\""+o(e.info_leave_room)+"\" href=\"#\"></a>\n\n        </div>\n    "}),t+="\n</div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/add_contact_modal.html -->\n<!-- Add contact Modal -->\n<div class=\"modal\" id=\"add-contact-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addContactModalLabel\" aria-hidden=\"true\">\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h5 class=\"modal-title\" id=\"addContactModalLabel\">"+o(e.heading_new_contact)+"</h5>\n                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">\xD7</span></button>\n            </div>\n            <form class=\"converse-form add-xmpp-contact\">\n                <div class=\"modal-body\">\n                    <div class=\"form-group add-xmpp-contact__jid\">\n                        <label class=\"clearfix\" for=\"jid\">"+o(e.label_xmpp_address)+":</label>\n                        <div class=\"suggestion-box suggestion-box__jid\">\n                            <ul class=\"suggestion-box__results suggestion-box__results--above\" hidden=\"\"></ul>\n                            <input type=\"text\" name=\"jid\"\n                                   ",e._converse.xhr_user_search_url||(t+=" required=\"required\" "),(t+="\n                                   value=\""+o(e.jid)+"\"\n                                   class=\"form-control suggestion-box__input\"\n                                   placeholder=\""+o(e.contact_placeholder)+"\"/>\n                            <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n                        </div>\n                    </div>\n                    <div class=\"form-group add-xmpp-contact__name\">\n                        <label class=\"clearfix\" for=\"name\">"+o(e.label_nickname)+":</label>\n                        <div class=\"suggestion-box suggestion-box__name\">\n                            <ul class=\"suggestion-box__results suggestion-box__results--above\" hidden=\"\"></ul>\n                            <input type=\"text\" name=\"name\" value=\""+o(e.nickname)+"\"\n                                   class=\"form-control suggestion-box__input\"\n                                   placeholder=\""+o(e.nickname_placeholder)+"\"/>\n                            <span class=\"suggestion-box__additions visually-hidden\" role=\"status\" aria-live=\"assertive\" aria-relevant=\"additions\"></span>\n                        </div>\n                    </div>\n                    <div class=\"form-group\">\n                        <div class=\"invalid-feedback\">"+o(e.error_message)+"</div>\n                    </div>\n                    <button type=\"submit\" class=\"btn btn-primary\">"+o(e.label_add)+"</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/group_header.html -->\n<a href=\"#\" class=\"list-toggle group-toggle controlbox-padded\" title=\""+o(e.desc_group_toggle)+"\">\n    <span class=\"fa ",t+=e.toggle_state===e._converse.OPENED?" fa-caret-down ":" fa-caret-right ",t+="\">\n    </span> "+o(e.label_group)+"</a>\n<ul class=\"items-list roster-group-contacts ",e.toggle_state===e._converse.CLOSED&&(t+=" collapsed "),(t+="\"></ul>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/pending_contact.html -->\n",e.allow_chat_pending_contacts&&(t+="\n<a class=\"list-item-link open-chat w-100\" href=\"#\">\n"),t+="\n<span class=\"pending-contact-name\" title=\"JID: "+o(e.jid)+"\">"+o(e.display_name)+"</span> \n",e.allow_chat_pending_contacts&&(t+="</a>"),(t+="\n<a class=\"list-item-action remove-xmpp-contact far fa-trash-alt\" title=\""+o(e.desc_remove)+"\" href=\"#\"></a>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/requesting_contact.html -->\n",e.allow_chat_pending_contacts&&(t+="\n<a class=\"open-chat w-100\"href=\"#\">\n"),t+="\n<span class=\"req-contact-name w-100\" title=\"JID: "+o(e.jid)+"\">"+o(e.display_name)+"</span>\n",e.allow_chat_pending_contacts&&(t+="\n</a>\n"),(t+="\n<a class=\"accept-xmpp-request list-item-action list-item-action--visible fa fa-check\"\n   aria-label=\""+o(e.desc_accept)+"\" title=\""+o(e.desc_accept)+"\" href=\"#\"></a>\n<a class=\"decline-xmpp-request list-item-action list-item-action--visible  fa fa-times\"\n   aria-label=\""+o(e.desc_decline)+"\" title=\""+o(e.desc_decline)+"\" href=\"#\"></a>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/roster.html -->\n<div class=\"d-flex controlbox-padded\">\n    <span class=\"w-100 controlbox-heading controlbox-heading--contacts\">"+o(e.heading_contacts)+"</span>\n    <a class=\"controlbox-heading__btn sync-contacts fa fa-sync\" title=\""+o(e.title_sync_contacts)+"\"></a>\n    ",e.allow_contact_requests&&(t+="\n        <a class=\"controlbox-heading__btn add-contact fa fa-user-plus\"\n           title=\""+o(e.title_add_contact)+"\"\n           data-toggle=\"modal\"\n           data-target=\"#add-contact-modal\"></a>\n    "),(t+="\n</div>\n\n<form class=\"roster-filter-form\"></form>\n\n<div class=\"list-container roster-contacts\"></div>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/roster_filter.html -->\n<form class=\"controlbox-padded roster-filter-form input-button-group ",e.visible||(t+=" hidden "),t+="\">\n    <div class=\"form-inline flex-nowrap\">\n        <div class=\"filter-by d-flex flex-nowrap\">\n            <span class=\"fa fa-user ","contacts"===e.filter_type&&(t+=" selected "),t+="\" data-type=\"contacts\" title=\""+o(e.title_contact_filter)+"\"></span>\n            <span class=\"fa fa-users ","groups"===e.filter_type&&(t+=" selected "),t+="\" data-type=\"groups\" title=\""+o(e.title_group_filter)+"\"></span>\n            <span class=\"fa fa-circle ","state"===e.filter_type&&(t+=" selected "),t+="\" data-type=\"state\" title=\""+o(e.title_status_filter)+"\"></span>\n        </div>\n\n        <div class=\"btn-group\">\n            <input ",e.filter_text&&(t+=" value=\""+o(e.filter_text)+"\" "),t+="\n                class=\"roster-filter form-control ","state"===e.filter_type&&(t+=" hidden "),t+="\"\n                placeholder=\""+o(e.placeholder)+"\"/>\n            <span class=\"clear-input fa fa-times ",e.filter_text&&"state"!==e.filter_type||(t+=" hidden "),t+="\"></span>\n        </div>\n\n        <select class=\"form-control state-type ","state"!==e.filter_type&&(t+=" hidden "),t+="\">\n            <option value=\"\">"+o(e.label_any)+"</option>\n            <option ","unread_messages"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"unread_messages\">"+o(e.label_unread_messages)+"</option>\n            <option ","online"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"online\">"+o(e.label_online)+"</option>\n            <option ","chat"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"chat\">"+o(e.label_chatty)+"</option>\n            <option ","dnd"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"dnd\">"+o(e.label_busy)+"</option>\n            <option ","away"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"away\">"+o(e.label_away)+"</option>\n            <option ","xa"===e.chat_state&&(t+=" selected=\"selected\" "),t+="\n                value=\"xa\">"+o(e.label_xa)+"</option>\n            <option ","offline"===e.chat_state&&(t+=" selected=\"selected\" "),(t+="\n                value=\"offline\">"+o(e.label_offline)+"</option>\n        </select>\n    </div>\n</form>\n",t)}},function(e,t,o){var n={escape:o(1)};e.exports=function(e){var t="",o=n.escape,a=Array.prototype.join;return t+="<!-- src/templates/roster_item.html -->\n<a class=\"list-item-link cbox-list-item open-chat w-100 ",e.num_unread&&(t+=" unread-msgs "),t+="\"\n   title=\""+o(e.desc_chat)+"\" href=\"#\">\n\n    <canvas class=\"avatar\" height=\"30\" width=\"30\"></canvas>\n    <span class=\""+o(e.status_icon)+"\" title=\""+o(e.desc_status)+"\"></span>\n    ",e.num_unread&&(t+=" <span class=\"msgs-indicator\">"+o(e.num_unread)+"</span> "),t+="\n    <span class=\"contact-name contact-name--"+o(e.show)+" ",e.num_unread&&(t+=" unread-msgs "),t+="\">"+o(e.display_name)+"</span>\n</a>\n",e.allow_contact_removal&&(t+="\n<a class=\"list-item-action remove-xmpp-contact far fa-trash-alt\" title=\""+o(e.desc_remove)+"\" href=\"#\"></a>\n"),(t+="\n",t)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,o){"use strict";o.r(t);const n={},a={plugins:{add(e,t){if(n[e]!==void 0)throw new TypeError("Error: plugin with name \"".concat(e,"\" has already been ")+"registered!");n[e]=t}},initialize(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};a.load(e).initialize(e)},load(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.assets_path&&(o.p=e.assets_path),o(462),Object.keys(n).forEach(e=>a.plugins.add(e,n[e])),a}};window.converse=a,t["default"]=a},function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var o=document.createEvent("CustomEvent");return o.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),o}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e),String.prototype.includes||(String.prototype.includes=function(e,t){'use strict';return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var o=this.toString();(t===void 0||t>o.length)&&(t=o.length),t-=e.length;var n=o.indexOf(e,t);return-1!==n&&n===t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.splitOnce||(String.prototype.splitOnce=function(e){var t=this.split(e);return[t.shift(),t.join(e)]}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},function(e,t){var o,n;o=[],n=function(){return Object}.apply(t,o),!(n!==void 0&&(e.exports=n))},function(e,t,o){function n(t){if(!o.o(a,t))return Promise.resolve().then(function(){var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o});var n=a[t],s=n[0];return o.e(n[1]).then(function(){return o.t(s,3)})}var a={"./af/LC_MESSAGES/converse.po":[463,130],"./ar/LC_MESSAGES/converse.po":[464,131],"./bg/LC_MESSAGES/converse.po":[465,132],"./ca/LC_MESSAGES/converse.po":[466,133],"./cs/LC_MESSAGES/converse.po":[467,134],"./de/LC_MESSAGES/converse.po":[468,135],"./eo/LC_MESSAGES/converse.po":[469,136],"./es/LC_MESSAGES/converse.po":[470,137],"./eu/LC_MESSAGES/converse.po":[471,138],"./fr/LC_MESSAGES/converse.po":[472,139],"./gl/LC_MESSAGES/converse.po":[473,140],"./he/LC_MESSAGES/converse.po":[474,141],"./hi/LC_MESSAGES/converse.po":[475,142],"./hu/LC_MESSAGES/converse.po":[476,143],"./id/LC_MESSAGES/converse.po":[477,144],"./it/LC_MESSAGES/converse.po":[478,145],"./ja/LC_MESSAGES/converse.po":[479,146],"./lt/LC_MESSAGES/converse.po":[480,147],"./mr/LC_MESSAGES/converse.po":[481,148],"./nb/LC_MESSAGES/converse.po":[482,149],"./nl/LC_MESSAGES/converse.po":[483,150],"./nl_BE/LC_MESSAGES/converse.po":[484,151],"./oc/LC_MESSAGES/converse.po":[485,152],"./pl/LC_MESSAGES/converse.po":[486,153],"./pt/LC_MESSAGES/converse.po":[487,154],"./pt_BR/LC_MESSAGES/converse.po":[488,155],"./ro/LC_MESSAGES/converse.po":[489,156],"./ru/LC_MESSAGES/converse.po":[490,157],"./tr/LC_MESSAGES/converse.po":[491,158],"./uk/LC_MESSAGES/converse.po":[492,159],"./vi/LC_MESSAGES/converse.po":[493,160],"./zh_CN/LC_MESSAGES/converse.po":[494,161],"./zh_TW/LC_MESSAGES/converse.po":[495,162]};n.keys=function(){return Object.keys(a)},n.id=331,e.exports=n},function(e,t,o){function n(t){if(!o.o(a,t))return Promise.resolve().then(function(){var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o});var n=a[t],s=n[0];return o.e(n[1]).then(function(){return o.t(s,7)})}var a={"./af":[199,0],"./af.js":[199,0],"./ar":[206,1],"./ar-dz":[200,2],"./ar-dz.js":[200,2],"./ar-kw":[201,3],"./ar-kw.js":[201,3],"./ar-ly":[202,4],"./ar-ly.js":[202,4],"./ar-ma":[203,5],"./ar-ma.js":[203,5],"./ar-sa":[204,6],"./ar-sa.js":[204,6],"./ar-tn":[205,7],"./ar-tn.js":[205,7],"./ar.js":[206,1],"./az":[207,8],"./az.js":[207,8],"./be":[208,9],"./be.js":[208,9],"./bg":[209,10],"./bg.js":[209,10],"./bm":[210,11],"./bm.js":[210,11],"./bn":[211,12],"./bn.js":[211,12],"./bo":[212,13],"./bo.js":[212,13],"./br":[213,14],"./br.js":[213,14],"./bs":[214,15],"./bs.js":[214,15],"./ca":[215,16],"./ca.js":[215,16],"./cs":[216,17],"./cs.js":[216,17],"./cv":[217,18],"./cv.js":[217,18],"./cy":[218,19],"./cy.js":[218,19],"./da":[219,20],"./da.js":[219,20],"./de":[222,21],"./de-at":[220,22],"./de-at.js":[220,22],"./de-ch":[221,23],"./de-ch.js":[221,23],"./de.js":[222,21],"./dv":[223,24],"./dv.js":[223,24],"./el":[224,25],"./el.js":[224,25],"./en":[232,26],"./en-SG":[225,27],"./en-SG.js":[225,27],"./en-au":[226,28],"./en-au.js":[226,28],"./en-ca":[227,29],"./en-ca.js":[227,29],"./en-gb":[228,30],"./en-gb.js":[228,30],"./en-ie":[229,31],"./en-ie.js":[229,31],"./en-il":[230,32],"./en-il.js":[230,32],"./en-nz":[231,33],"./en-nz.js":[231,33],"./en.js":[232,26],"./eo":[233,34],"./eo.js":[233,34],"./es":[236,35],"./es-do":[234,36],"./es-do.js":[234,36],"./es-us":[235,37],"./es-us.js":[235,37],"./es.js":[236,35],"./et":[237,38],"./et.js":[237,38],"./eu":[238,39],"./eu.js":[238,39],"./fa":[239,40],"./fa.js":[239,40],"./fi":[240,41],"./fi.js":[240,41],"./fo":[241,42],"./fo.js":[241,42],"./fr":[244,43],"./fr-ca":[242,44],"./fr-ca.js":[242,44],"./fr-ch":[243,45],"./fr-ch.js":[243,45],"./fr.js":[244,43],"./fy":[245,46],"./fy.js":[245,46],"./ga":[246,47],"./ga.js":[246,47],"./gd":[247,48],"./gd.js":[247,48],"./gl":[248,49],"./gl.js":[248,49],"./gom-latn":[249,50],"./gom-latn.js":[249,50],"./gu":[250,51],"./gu.js":[250,51],"./he":[251,52],"./he.js":[251,52],"./hi":[252,53],"./hi.js":[252,53],"./hr":[253,54],"./hr.js":[253,54],"./hu":[254,55],"./hu.js":[254,55],"./hy-am":[255,56],"./hy-am.js":[255,56],"./id":[256,57],"./id.js":[256,57],"./is":[257,58],"./is.js":[257,58],"./it":[259,59],"./it-ch":[258,60],"./it-ch.js":[258,60],"./it.js":[259,59],"./ja":[260,61],"./ja.js":[260,61],"./jv":[261,62],"./jv.js":[261,62],"./ka":[262,63],"./ka.js":[262,63],"./kk":[263,64],"./kk.js":[263,64],"./km":[264,65],"./km.js":[264,65],"./kn":[265,66],"./kn.js":[265,66],"./ko":[266,67],"./ko.js":[266,67],"./ku":[267,68],"./ku.js":[267,68],"./ky":[268,69],"./ky.js":[268,69],"./lb":[269,70],"./lb.js":[269,70],"./lo":[270,71],"./lo.js":[270,71],"./lt":[271,72],"./lt.js":[271,72],"./lv":[272,73],"./lv.js":[272,73],"./me":[273,74],"./me.js":[273,74],"./mi":[274,75],"./mi.js":[274,75],"./mk":[275,76],"./mk.js":[275,76],"./ml":[276,77],"./ml.js":[276,77],"./mn":[277,78],"./mn.js":[277,78],"./mr":[278,79],"./mr.js":[278,79],"./ms":[280,80],"./ms-my":[279,81],"./ms-my.js":[279,81],"./ms.js":[280,80],"./mt":[281,82],"./mt.js":[281,82],"./my":[282,83],"./my.js":[282,83],"./nb":[283,84],"./nb.js":[283,84],"./ne":[284,85],"./ne.js":[284,85],"./nl":[286,86],"./nl-be":[285,87],"./nl-be.js":[285,87],"./nl.js":[286,86],"./nn":[287,88],"./nn.js":[287,88],"./oc-lnc":[288,89],"./oc-lnc.js":[288,89],"./pa-in":[289,90],"./pa-in.js":[289,90],"./pl":[290,91],"./pl.js":[290,91],"./pt":[292,92],"./pt-br":[291,93],"./pt-br.js":[291,93],"./pt.js":[292,92],"./ro":[293,94],"./ro.js":[293,94],"./ru":[294,95],"./ru.js":[294,95],"./sd":[295,96],"./sd.js":[295,96],"./se":[296,97],"./se.js":[296,97],"./si":[297,98],"./si.js":[297,98],"./sk":[298,99],"./sk.js":[298,99],"./sl":[299,100],"./sl.js":[299,100],"./sq":[300,101],"./sq.js":[300,101],"./sr":[302,102],"./sr-cyrl":[301,103],"./sr-cyrl.js":[301,103],"./sr.js":[302,102],"./ss":[303,104],"./ss.js":[303,104],"./sv":[304,105],"./sv.js":[304,105],"./sw":[305,106],"./sw.js":[305,106],"./ta":[306,107],"./ta.js":[306,107],"./te":[307,108],"./te.js":[307,108],"./tet":[308,109],"./tet.js":[308,109],"./tg":[309,110],"./tg.js":[309,110],"./th":[310,111],"./th.js":[310,111],"./tl-ph":[311,112],"./tl-ph.js":[311,112],"./tlh":[312,113],"./tlh.js":[312,113],"./tr":[313,114],"./tr.js":[313,114],"./tzl":[314,115],"./tzl.js":[314,115],"./tzm":[316,116],"./tzm-latn":[315,117],"./tzm-latn.js":[315,117],"./tzm.js":[316,116],"./ug-cn":[317,118],"./ug-cn.js":[317,118],"./uk":[318,119],"./uk.js":[318,119],"./ur":[319,120],"./ur.js":[319,120],"./uz":[321,121],"./uz-latn":[320,122],"./uz-latn.js":[320,122],"./uz.js":[321,121],"./vi":[322,123],"./vi.js":[322,123],"./x-pseudo":[323,124],"./x-pseudo.js":[323,124],"./yo":[324,125],"./yo.js":[324,125],"./zh-cn":[325,126],"./zh-cn.js":[325,126],"./zh-hk":[326,127],"./zh-hk.js":[326,127],"./zh-tw":[327,128],"./zh-tw.js":[327,128]};n.keys=function(){return Object.keys(a)},n.id=332,e.exports=n},function(e){e.exports=function(e,t,o){var n=-1,a=e.length;0>t&&(t=-t>a?0:a+t),o=o>a?a:o,0>o&&(o+=a),a=t>o?0:o-t>>>0,t>>>=0;for(var s=Array(a);++n<a;)s[n]=e[n+t];return s}},function(e,t,o){var n=o(335),a=1/0;e.exports=function(e){if(!e)return 0===e?e:0;if(e=n(e),e===a||e===-a){var t=0>e?-1:1;return 1.7976931348623157e+308*t}return e===e?e:0}},function(e,t,o){var n=o(9),a=o(28),s=0/0,i=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return s;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(/^\s+|\s+$/g,"");var o=/^0b[01]+$/i.test(e);return o||/^0o[0-7]+$/i.test(e)?i(e.slice(2),o?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?s:+e}},function(e,t,o){var n=o(29),a=Object.prototype,s=a.hasOwnProperty,i=a.toString,r=n?n.toStringTag:void 0;e.exports=function(e){var t=s.call(e,r),o=e[r];try{e[r]=void 0;var n=!0}catch(t){}var a=i.call(e);return n&&(t?e[r]=o:delete e[r]),a}},function(e){var t=Object.prototype,o=t.toString;e.exports=function(e){return o.call(e)}},function(e,t,o){var n=o(68),a=o(339),s=o(351),i=o(6);e.exports=function(e,t){var o=i(e)?n:a;return o(e,s(t))}},function(e,t,o){var n=o(340),a=o(350),s=a(n);e.exports=s},function(e,t,o){var n=o(341),a=o(19);e.exports=function(e,t){return e&&n(e,t,a)}},function(e,t,o){var n=o(342),a=n();e.exports=a},function(e){e.exports=function(e){return function(t,o,n){for(var a=-1,s=Object(t),i=n(t),r=i.length;r--;){var l=i[e?r:++a];if(!1===o(s[l],l,s))break}return t}}},function(e){e.exports=function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}},function(e,t,o){var n=o(15),a=o(11);e.exports=function(e){return a(e)&&n(e)=="[object Arguments]"}},function(e){e.exports=function(){return!1}},function(e,t,o){var n=o(15),a=o(48),s=o(11),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&a(e.length)&&!!i[n(e)]}},function(e){e.exports=function(e){return function(t){return e(t)}}},function(e,t,o){(function(e){var n=o(67),a=t&&!t.nodeType&&t,s=a&&"object"==typeof e&&e&&!e.nodeType&&e,i=s&&s.exports===a,r=i&&n.process,l=function(){try{var e=s&&s.require&&s.require("util").types;return e?e:r&&r.binding&&r.binding("util")}catch(t){}}();e.exports=l}).call(this,o(27)(e))},function(e,t,o){var n=o(75),a=n(Object.keys,Object);e.exports=a},function(e,t,o){var n=o(18);e.exports=function(e,t){return function(o,a){if(null==o)return o;if(!n(o))return e(o,a);for(var s=o.length,i=t?s:-1,r=Object(o);(t?i--:++i<s)&&!(!1===a(r[i],i,r)););return o}}},function(e,t,o){var n=o(23);e.exports=function(e){return"function"==typeof e?e:n}},function(e,t,o){var n=o(353),a=o(358),s=o(83),i=a(function(e,t){n(t,s(t),e)});e.exports=i},function(e,t,o){var n=o(76),a=o(77);e.exports=function(e,t,o,s){var i=!o;o||(o={});for(var r=-1,l=t.length;++r<l;){var d=t[r],c=s?s(o[d],e[d],d,o,e):void 0;c===void 0&&(c=e[d]),i?a(o,d,c):n(o,d,c)}return o}},function(e,t,o){var n=o(40),a=o(355),s=o(9),i=o(79),r=Function.prototype,l=Object.prototype,d=r.toString,c=l.hasOwnProperty,p=RegExp("^"+d.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){if(!s(e)||a(e))return!1;var t=n(e)?p:/^\[object .+?Constructor\]$/;return t.test(i(e))}},function(e,t,o){function n(e){return!!s&&s in e}var a=o(356),s=function(){var e=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t,o){var n=o(5),a=n["__core-js_shared__"];e.exports=a},function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,o){var n=o(80),a=o(362);e.exports=function(e){return n(function(t,o){var n=-1,s=o.length,i=1<s?o[s-1]:void 0,r=2<s?o[2]:void 0;for(i=3<e.length&&"function"==typeof i?(s--,i):void 0,r&&a(o[0],o[1],r)&&(i=3>s?void 0:i,s=1),t=Object(t);++n<s;){var l=o[n];l&&e(t,l,n,i)}return t})}},function(e,t,o){var n=o(49),a=Math.max;e.exports=function(e,t,o){return t=a(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,r=a(s.length-t,0),l=Array(r);++i<r;)l[i]=s[t+i];i=-1;for(var d=Array(t+1);++i<t;)d[i]=s[i];return d[t]=o(l),n(e,this,d)}}},function(e,t,o){var n=o(361),a=o(78),s=o(23),i=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;e.exports=i},function(e){e.exports=function(e){return function(){return e}}},function(e,t,o){function n(e,t,o){if(!r(o))return!1;var n=typeof t;return!("number"==n?!(s(o)&&i(t,o.length)):!("string"==n&&t in o))&&a(o[t],e)}var a=o(30),s=o(18),i=o(22),r=o(9);e.exports=n},function(e,t,o){var n=o(9),a=o(74),s=o(364),i=Object.prototype,r=i.hasOwnProperty;e.exports=function(e){if(!n(e))return s(e);var t=a(e),o=[];for(var i in e)("constructor"!=i||!t&&r.call(e,i))&&o.push(i);return o}},function(e){e.exports=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}},function(e){e.exports=function(e,t,o,n){for(var a=e.length,s=o+(n?1:-1);n?s--:++s<a;)if(t(e[s],s,e))return s;return-1}},function(e){e.exports=function(e){return e!==e}},function(e){e.exports=function(e,t,o){for(var n=o-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}},function(e,t,o){var n=o(50);e.exports=function(e,t){return n(t,function(t){return e[t]})}},function(e,t,o){var n=o(86),a=o(370),s=o(371),i=o(89),r=o(384),l=o(93),d=o(385),c=o(96),p=o(97),u=o(47),m=Math.max;e.exports=function(e,t,o,g,h,_,f,b){var v=2&t;if(!v&&"function"!=typeof e)throw new TypeError("Expected a function");var y=g?g.length:0;if(y||(t&=-97,g=h=void 0),f=void 0===f?f:m(u(f),0),b=void 0===b?b:u(b),y-=h?h.length:0,64&t){var x=g,S=h;g=h=void 0}var w=v?void 0:l(e),k=[e,t,o,g,h,x,S,_,f,b];if(w&&d(k,w),e=k[0],t=k[1],o=k[2],g=k[3],h=k[4],b=k[9]=void 0===k[9]?v?0:e.length:m(k[9]-y,0),!b&&24&t&&(t&=-25),!t||1==t)var E=a(e,t,o);else E=8==t||16==t?s(e,t,b):32!=t&&33!=t||h.length?i.apply(void 0,k):r(e,t,o,g);var C=w?n:c;return p(C(E,k),e,t)}},function(e,t,o){var n=o(31),a=o(5);e.exports=function(e,t,o){function s(){var t=this&&this!==a&&this instanceof s?r:e;return t.apply(i?o:this,arguments)}var i=t&1,r=n(e);return s}},function(e,t,o){var n=o(49),a=o(31),s=o(89),i=o(92),r=o(54),l=o(32),d=o(5);e.exports=function(e,t,o){function c(){for(var a=arguments.length,u=Array(a),m=a,g=r(c);m--;)u[m]=arguments[m];var h=3>a&&u[0]!==g&&u[a-1]!==g?[]:l(u,g);if(a-=h.length,a<o)return i(e,t,s,c.placeholder,void 0,u,h,void 0,void 0,o-a);var _=this&&this!==d&&this instanceof c?p:e;return n(_,this,u)}var p=a(e);return c}},function(e){e.exports=function(e,t){for(var o=e.length,n=0;o--;)e[o]===t&&++n;return n}},function(e,t,o){function n(e){var t=i(e),o=r[t];if("function"!=typeof o||!(t in a.prototype))return!1;if(e===o)return!0;var n=s(o);return!!n&&e===n[0]}var a=o(52),s=o(93),i=o(375),r=o(377);e.exports=n},function(e){e.exports=function(){}},function(e,t,o){var n=o(376),a=Object.prototype,s=a.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",o=n[t],a=s.call(n,t)?o.length:0;a--;){var i=o[a],r=i.func;if(null==r||r==e)return i.name}return t}},function(e){e.exports={}},function(e,t,o){function n(e){if(l(e)&&!r(e)&&!(e instanceof a)){if(e instanceof s)return e;if(p.call(e,"__wrapped__"))return d(e)}return new s(e)}var a=o(52),s=o(94),i=o(53),r=o(6),l=o(11),d=o(378),c=Object.prototype,p=c.hasOwnProperty;n.prototype=i.prototype,n.prototype.constructor=n,e.exports=n},function(e,t,o){var n=o(52),a=o(94),s=o(95);e.exports=function(e){if(e instanceof n)return e.clone();var t=new a(e.__wrapped__,e.__chain__);return t.__actions__=s(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},function(e){e.exports=function(e){var t=e.match(/\{\n\/\* \[wrapped with (.+)\] \*/);return t?t[1].split(/,? & /):[]}},function(e){e.exports=function(e,t){var o=t.length;if(!o)return e;var n=o-1;return t[n]=(1<o?"& ":"")+t[n],t=t.join(2<o?", ":" "),e.replace(/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,o){var n=o(68),a=o(382),s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(s,function(o){var n="_."+o[0];t&o[1]&&!a(e,n)&&e.push(n)}),e.sort()}},function(e,t,o){var n=o(84);e.exports=function(e,t){var o=null==e?0:e.length;return!!o&&-1<n(e,t,0)}},function(e,t,o){var n=o(95),a=o(22),s=Math.min;e.exports=function(e,t){for(var o=e.length,i=s(t.length,o),r=n(e);i--;){var l=t[i];e[i]=a(l,o)?r[l]:void 0}return e}},function(e,t,o){var n=o(49),a=o(31),s=o(5);e.exports=function(e,t,o,i){function r(){for(var t=-1,a=arguments.length,c=-1,p=i.length,u=Array(p+a),m=this&&this!==s&&this instanceof r?d:e;++c<p;)u[c]=i[c];for(;a--;)u[c++]=arguments[++t];return n(m,l?o:this,u)}var l=t&1,d=a(e);return r}},function(e,t,o){var n=o(90),a=o(91),s=o(32),i=Math.min;e.exports=function(e,t){var o=e[1],r=t[1],l=o|r,d=131>l,c=128==r&&8==o||128==r&&256==o&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==o;if(!(d||c))return e;1&r&&(e[2]=t[2],l|=1&o?0:4);var p=t[3];if(p){var u=e[3];e[3]=u?n(u,p,t[4]):p,e[4]=u?s(e[3],"__lodash_placeholder__"):t[4]}return p=t[5],p&&(u=e[5],e[5]=u?a(u,p,t[6]):p,e[6]=u?s(e[5],"__lodash_placeholder__"):t[6]),p=t[7],p&&(e[7]=p),128&r&&(e[8]=null==e[8]?t[8]:i(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}},function(e,t,o){var n=o(387),a=o(428),s=o(23),i=o(6),r=o(437);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?i(e)?a(e[0],e[1]):n(e):r(e)}},function(e,t,o){var n=o(388),a=o(427),s=o(107);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(o){return o===e||n(o,e,t)}}},function(e,t,o){function n(e,t,o,n){var i=o.length,r=i,l=!n;if(null==e)return!r;for(e=Object(e);i--;){var d=o[i];if(l&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++i<r;){d=o[i];var c=d[0],p=e[c],u=d[1];if(!(l&&d[2])){var m=new a;if(n)var g=n(p,u,c,e,t,m);if(void 0===g?!s(u,p,3,n,m):!g)return!1}else if(void 0===p&&!(c in e))return!1}return!0}var a=o(98),s=o(99);e.exports=n},function(e){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,o){var n=o(34),a=Array.prototype,s=a.splice;e.exports=function(e){var t=this.__data__,o=n(t,e);if(0>o)return!1;var a=t.length-1;return o==a?t.pop():s.call(t,o,1),--this.size,!0}},function(e,t,o){var n=o(34);e.exports=function(e){var t=this.__data__,o=n(t,e);return 0>o?void 0:t[o][1]}},function(e,t,o){var n=o(34);e.exports=function(e){return-1<n(this.__data__,e)}},function(e,t,o){var n=o(34);e.exports=function(e,t){var o=this.__data__,a=n(o,e);return 0>a?(++this.size,o.push([e,t])):o[a][1]=t,this}},function(e,t,o){var n=o(33);e.exports=function(){this.__data__=new n,this.size=0}},function(e){e.exports=function(e){var t=this.__data__,o=t["delete"](e);return this.size=t.size,o}},function(e){e.exports=function(e){return this.__data__.get(e)}},function(e){e.exports=function(e){return this.__data__.has(e)}},function(e,t,o){var n=o(33),a=o(55),s=o(56);e.exports=function(e,t){var o=this.__data__;if(o instanceof n){var i=o.__data__;if(!a||199>i.length)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new s(i)}return o.set(e,t),this.size=o.size,this}},function(e,t,o){var n=o(400),a=o(33),s=o(55);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||a),string:new n}}},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}var a=o(401),s=o(402),i=o(403),r=o(404),l=o(405);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=i,n.prototype.has=r,n.prototype.set=l,e.exports=n},function(e,t,o){var n=o(35);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,o){var n=o(35),a=Object.prototype,s=a.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var o=t[e];return o==="__lodash_hash_undefined__"?void 0:o}return s.call(t,e)?t[e]:void 0}},function(e,t,o){var n=o(35),a=Object.prototype,s=a.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?t[e]!==void 0:s.call(t,e)}},function(e,t,o){var n=o(35);e.exports=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,o){var n=o(36);e.exports=function(e){var t=n(this,e)["delete"](e);return this.size-=t?1:0,t}},function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,o){var n=o(36);e.exports=function(e){return n(this,e).get(e)}},function(e,t,o){var n=o(36);e.exports=function(e){return n(this,e).has(e)}},function(e,t,o){var n=o(36);e.exports=function(e,t){var o=n(this,e),a=o.size;return o.set(e,t),this.size+=o.size==a?0:1,this}},function(e,t,o){var n=o(98),a=o(100),s=o(417),i=o(421),r=o(105),l=o(6),d=o(71),c=o(72),p=Object.prototype,u=p.hasOwnProperty;e.exports=function(e,t,o,p,m,g){var h=l(e),_=l(t),f=h?"[object Array]":r(e),b=_?"[object Array]":r(t);f="[object Arguments]"==f?"[object Object]":f,b="[object Arguments]"==b?"[object Object]":b;var v="[object Object]"==f,y="[object Object]"==b,x=f==b;if(x&&d(e)){if(!d(t))return!1;h=!0,v=!1}if(x&&!v)return g||(g=new n),h||c(e)?a(e,t,o,p,m,g):s(e,t,f,o,p,m,g);if(!(1&o)){var S=v&&u.call(e,"__wrapped__"),w=y&&u.call(t,"__wrapped__");if(S||w){var k=S?e.value():e,E=w?t.value():t;return g||(g=new n),m(k,E,o,p,g)}}return!!x&&(g||(g=new n),i(e,t,o,p,m,g))}},function(e,t,o){function n(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new a;++t<o;)this.add(e[t])}var a=o(56),s=o(413),i=o(414);n.prototype.add=n.prototype.push=s,n.prototype.has=i,e.exports=n},function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e){e.exports=function(e){return this.__data__.has(e)}},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(t(e[o],o,e))return!0;return!1}},function(e){e.exports=function(e,t){return e.has(t)}},function(e,t,o){var n=o(29),a=o(418),s=o(30),i=o(100),r=o(419),l=o(420),d=n?n.prototype:void 0,c=d?d.valueOf:void 0;e.exports=function(e,t,o,n,d,p,u){switch(o){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!!(e.byteLength==t.byteLength&&p(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var m=r;case"[object Set]":var g=1&n;if(m||(m=l),e.size!=t.size&&!g)return!1;var h=u.get(e);if(h)return h==t;n|=2,u.set(e,t);var _=i(m(e),m(t),n,d,p,u);return u["delete"](e),_;case"[object Symbol]":if(c)return c.call(e)==c.call(t);}return!1}},function(e,t,o){var n=o(5),a=n.Uint8Array;e.exports=a},function(e){e.exports=function(e){var t=-1,o=Array(e.size);return e.forEach(function(e,n){o[++t]=[n,e]}),o}},function(e){e.exports=function(e){var t=-1,o=Array(e.size);return e.forEach(function(e){o[++t]=e}),o}},function(e,t,o){function n(e,t,o,n,s,r){var l=1&o,d=a(e),c=d.length,p=a(t),u=p.length;if(c!=u&&!l)return!1;for(var m=c,g;m--;)if(g=d[m],l?!(g in t):!i.call(t,g))return!1;var h=r.get(e);if(h&&r.get(t))return h==t;var _=!0;r.set(e,t),r.set(t,e);for(var f=l;++m<c;){g=d[m];var b=e[g],v=t[g];if(n)var y=l?n(v,b,g,t,e,r):n(b,v,g,e,t,r);if(void 0===y?!(b===v||s(b,v,o,n,r)):!y){_=!1;break}f||(f="constructor"==g)}if(_&&!f){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof S&&S instanceof S)&&(_=!1)}return r["delete"](e),r["delete"](t),_}var a=o(422),s=Object.prototype,i=s.hasOwnProperty;e.exports=n},function(e,t,o){var n=o(101),a=o(103),s=o(19);e.exports=function(e){return n(e,s,a)}},function(e){e.exports=function(e,t){for(var o=-1,n=null==e?0:e.length,a=0,s=[];++o<n;){var i=e[o];t(i,o,e)&&(s[a++]=i)}return s}},function(e,t,o){var n=o(16),a=o(5),s=n(a,"DataView");e.exports=s},function(e,t,o){var n=o(16),a=o(5),s=n(a,"Promise");e.exports=s},function(e,t,o){var n=o(16),a=o(5),s=n(a,"Set");e.exports=s},function(e,t,o){var n=o(106),a=o(19);e.exports=function(e){for(var t=a(e),o=t.length;o--;){var s=t[o],i=e[s];t[o]=[s,i,n(i)]}return t}},function(e,t,o){var n=o(99),a=o(429),s=o(434),i=o(58),r=o(106),l=o(107),d=o(24);e.exports=function(e,t){return i(e)&&r(t)?l(d(e),t):function(o){var i=a(o,e);return i===void 0&&i===t?s(o,e):n(t,i,3)}}},function(e,t,o){var n=o(57);e.exports=function(e,t,o){var a=null==e?void 0:n(e,t);return a===void 0?o:a}},function(e,t,o){var n=o(431),a=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(e,o,n,a){t.push(n?a.replace(/\\(\\)?/g,"$1"):o||e)}),t});e.exports=a},function(e,t,o){var n=o(432);e.exports=function(e){var t=n(e,function(e){return 500===o.size&&o.clear(),e}),o=t.cache;return t}},function(e,t,o){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var o=function(){var n=arguments,a=t?t.apply(this,n):n[0],s=o.cache;if(s.has(a))return s.get(a);var i=e.apply(this,n);return o.cache=s.set(a,i)||s,i};return o.cache=new(n.Cache||a),o}var a=o(56);n.Cache=a,e.exports=n},function(e,t,o){function n(e){if("string"==typeof e)return e;if(i(e))return s(e,n)+"";if(r(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}var a=o(29),s=o(50),i=o(6),r=o(28),l=1/0,d=a?a.prototype:void 0,c=d?d.toString:void 0;e.exports=n},function(e,t,o){var n=o(435),a=o(436);e.exports=function(e,t){return null!=e&&a(e,t,n)}},function(e){function t(e,t){return null!=e&&t in Object(e)}e.exports=t},function(e,t,o){var n=o(37),a=o(70),s=o(6),i=o(22),r=o(48),l=o(24);e.exports=function(e,t,o){t=n(t,e);for(var d=-1,c=t.length,p=!1,u;++d<c&&(u=l(t[d]),!!(p=null!=e&&o(e,u)));)e=e[u];return p||++d!=c?p:(c=null==e?0:e.length,!!c&&r(c)&&i(u,c)&&(s(e)||a(e)))}},function(e,t,o){var n=o(109),a=o(438),s=o(58),i=o(24);e.exports=function(e){return s(e)?n(i(e)):a(e)}},function(e,t,o){var n=o(57);e.exports=function(e){return function(t){return n(t,e)}}},function(e,t,o){var n=o(57),a=o(440),s=o(37);e.exports=function(e,t,o){for(var i=-1,r=t.length,l={};++i<r;){var d=t[i],c=n(e,d);o(c,d)&&a(l,s(d,e),c)}return l}},function(e,t,o){var n=o(76),a=o(37),s=o(22),i=o(9),r=o(24);e.exports=function(e,t,o,l){if(!i(e))return e;t=a(t,e);for(var d=-1,c=t.length,p=e;null!=p&&++d<c;){var u=r(t[d]),m=o;if(d!=c-1){var g=p[u];m=l?l(g,u,p):void 0,m===void 0&&(m=i(g)?g:s(t[d+1])?[]:{})}n(p,u,m),p=p[u]}return e}},function(e,t,o){var n=o(101),a=o(442),s=o(83);e.exports=function(e){return n(e,s,a)}},function(e,t,o){var n=o(102),a=o(443),s=o(103),i=o(104),r=Object.getOwnPropertySymbols,l=r?function(e){for(var t=[];e;)n(t,s(e)),e=a(e);return t}:i;e.exports=l},function(e,t,o){var n=o(75),a=n(Object.getPrototypeOf,Object);e.exports=a},function(e,t,o){var n=o(445),a=o(446),s=o(447);e.exports=function(e){return a(e)?s(e):n(e)}},function(e,t,o){var n=o(109),a=n("length");e.exports=a},function(e){var t=RegExp("["+"\\u200d"+"\\ud800-\\udfff"+"\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff"+"\\ufe0e\\ufe0f"+"]");e.exports=function(e){return t.test(e)}},function(e){var t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",n="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",i="(?:"+t+"|"+o+")"+"?",r="[\\ufe0e\\ufe0f]?",l="(?:"+"\\u200d"+"(?:"+[n,a,s].join("|")+")"+r+i+")*",d="(?:"+[n+t+"?",t,a,s,"[\\ud800-\\udfff]"].join("|")+")",c=RegExp(o+"(?="+o+")|"+d+(r+i+l),"g");e.exports=function(e){for(var t=c.lastIndex=0;c.test(e);)++t;return t}},function(e,t,o){var n=o(449),a=n({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=a},function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t,o){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==o&&void 0!==t)for(var a=0,s;a<t.length;++a)s=t[a].data,void 0!==s&&n(s,t[a].children,t[a].sel)}function a(e,t,o){var a={},l,d,c;if(void 0===o?void 0!==t&&(r.array(t)?l=t:r.primitive(t)?d=t:t&&t.sel?l=[t]:a=t):(a=t,r.array(o)?l=o:r.primitive(o)?d=o:o&&o.sel&&(l=[o])),r.array(l))for(c=0;c<l.length;++c)r.primitive(l[c])&&(l[c]=s.vnode(void 0,void 0,void 0,l[c]));return"s"===e[0]&&"v"===e[1]&&"g"===e[2]&&(3===e.length||"."===e[3]||"#"===e[3])&&n(a,l,e),s.vnode(e,a,l,d,void 0)}Object.defineProperty(o,"__esModule",{value:!0});var s=e("./vnode"),r=e("./is");o.h=a;o.default=a},{"./is":3,"./vnode":6}],2:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.htmlDomApi={createElement:function(e){return document.createElement(e)},createElementNS:function(e,t){return document.createElementNS(e,t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,o){e.insertBefore(t,o)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}},o.default=o.htmlDomApi},{}],3:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.array=Array.isArray,o.primitive=function(e){return"string"==typeof e||"number"==typeof e}},{}],4:[function(e,t,o){"use strict";function n(e){return e===void 0}function a(e){return e!==void 0}function s(e,t){return e.key===t.key&&e.sel===t.sel}function r(e){return e.sel!==void 0}function l(e,t,o){var n={},a,s,r;for(a=t;a<=o;++a)r=e[a],null!=r&&(s=r.key,void 0!==s&&(n[s]=a));return n}Object.defineProperty(o,"__esModule",{value:!0});var d=e("./vnode"),c=e("./is"),p=e("./htmldomapi"),u=d.default("",{},[],void 0,void 0),m=["create","update","remove","destroy","pre","post"],g=e("./h");o.h=g.h;var h=e("./thunk");o.thunk=h.thunk,o.init=function(e,t){function o(e){var t=e.id?"#"+e.id:"",o=e.className?"."+e.className.split(" ").join("."):"";return d.default(S.tagName(e).toLowerCase()+t+o,{},[],void 0,e)}function g(e,t){return function(){if(0==--t){var o=S.parentNode(e);S.removeChild(o,e)}}}function h(e,t){var o=e.data,s;o!==void 0&&a(s=o.hook)&&a(s=s.init)&&(s(e),o=e.data);var r=e.children,l=e.sel;if("!"===l)n(e.text)&&(e.text=""),e.elm=S.createComment(e.text);else if(l!==void 0){var d=l.indexOf("#"),p=l.indexOf(".",d),m=0<d?d:l.length,g=0<p?p:l.length,_=-1!==d||-1!==p?l.slice(0,Math.min(m,g)):l,f=e.elm=a(o)&&a(s=o.ns)?S.createElementNS(s,_):S.createElement(_);for(m<g&&f.setAttribute("id",l.slice(m+1,g)),0<p&&f.setAttribute("class",l.slice(g+1).replace(/\./g," ")),s=0;s<x.create.length;++s)x.create[s](u,e);if(c.array(r))for(s=0;s<r.length;++s){var b=r[s];null!=b&&S.appendChild(f,h(b,t))}else c.primitive(e.text)&&S.appendChild(f,S.createTextNode(e.text));s=e.data.hook,a(s)&&(s.create&&s.create(u,e),s.insert&&t.push(e))}else e.elm=S.createTextNode(e.text);return e.elm}function _(e,t,o,n,a,s){for(;n<=a;++n){var i=o[n];null!=i&&S.insertBefore(e,h(i,s),t)}}function f(e){var t=e.data,o,n;if(t!==void 0){for(a(o=t.hook)&&a(o=o.destroy)&&o(e),o=0;o<x.destroy.length;++o)x.destroy[o](e);if(e.children!==void 0)for(n=0;n<e.children.length;++n)o=e.children[n],null!=o&&"string"!=typeof o&&f(o)}}function b(e,t,o,n){for(;o<=n;++o){var s=void 0,i=void 0,r=void 0,l=t[o];if(null!=l)if(a(l.sel)){for(f(l),i=x.remove.length+1,r=g(l.elm,i),s=0;s<x.remove.length;++s)x.remove[s](l,r);a(s=l.data)&&a(s=s.hook)&&a(s=s.remove)?s(l,r):r()}else S.removeChild(e,l.elm)}}function v(e,t,o,a){for(var i=0,r=0,d=t.length-1,c=t[0],p=t[d],u=o.length-1,m=o[0],g=o[u],f,v,x,w;i<=d&&r<=u;)null==c?c=t[++i]:null==p?p=t[--d]:null==m?m=o[++r]:null==g?g=o[--u]:s(c,m)?(y(c,m,a),c=t[++i],m=o[++r]):s(p,g)?(y(p,g,a),p=t[--d],g=o[--u]):s(c,g)?(y(c,g,a),S.insertBefore(e,c.elm,S.nextSibling(p.elm)),c=t[++i],g=o[--u]):s(p,m)?(y(p,m,a),S.insertBefore(e,p.elm,c.elm),p=t[--d],m=o[++r]):(void 0===f&&(f=l(t,i,d)),v=f[m.key],n(v)?(S.insertBefore(e,h(m,a),c.elm),m=o[++r]):(x=t[v],x.sel===m.sel?(y(x,m,a),t[v]=void 0,S.insertBefore(e,x.elm,c.elm)):S.insertBefore(e,h(m,a),c.elm),m=o[++r]));i>d?(w=null==o[u+1]?null:o[u+1].elm,_(e,w,o,r,u,a)):r>u&&b(e,t,i,d)}function y(e,t,o){var s,r;a(s=t.data)&&a(r=s.hook)&&a(s=r.prepatch)&&s(e,t);var l=t.elm=e.elm,d=e.children,c=t.children;if(e!==t){if(void 0!==t.data){for(s=0;s<x.update.length;++s)x.update[s](e,t);s=t.data.hook,a(s)&&a(s=s.update)&&s(e,t)}n(t.text)?a(d)&&a(c)?d!==c&&v(l,d,c,o):a(c)?(a(e.text)&&S.setTextContent(l,""),_(l,null,c,0,c.length-1,o)):a(d)?b(l,d,0,d.length-1):a(e.text)&&S.setTextContent(l,""):e.text!==t.text&&S.setTextContent(l,t.text),a(r)&&a(s=r.postpatch)&&s(e,t)}}var x={},S=t===void 0?p.default:t,w,k;for(w=0;w<m.length;++w)for(x[m[w]]=[],k=0;k<e.length;++k){var E=e[k][m[w]];void 0!==E&&x[m[w]].push(E)}return function(e,t){var n=[],a,l,d;for(a=0;a<x.pre.length;++a)x.pre[a]();for(r(e)||(e=o(e)),s(e,t)?y(e,t,n):(l=e.elm,d=S.parentNode(l),h(t,n),null!==d&&(S.insertBefore(d,t.elm,S.nextSibling(l)),b(d,[e],0,0))),a=0;a<n.length;++a)n[a].data.hook.insert(n[a]);for(a=0;a<x.post.length;++a)x.post[a]();return t}}},{"./h":1,"./htmldomapi":2,"./is":3,"./thunk":5,"./vnode":6}],5:[function(e,t,o){"use strict";function n(e,t){t.elm=e.elm,e.data.fn=t.data.fn,e.data.args=t.data.args,t.data=e.data,t.children=e.children,t.text=e.text,t.elm=e.elm}function a(e){var t=e.data,o=t.fn.apply(void 0,t.args);n(o,e)}function s(e,t){var o=e.data,a=t.data,s=o.args,r=a.args,l;if(o.fn!==a.fn||s.length!==r.length)return void n(a.fn.apply(void 0,r),t);for(l=0;l<r.length;++l)if(s[l]!==r[l])return void n(a.fn.apply(void 0,r),t);n(e,t)}Object.defineProperty(o,"__esModule",{value:!0});var i=e("./h");o.thunk=function(e,t,o,n){return void 0===n&&(n=o,o=t,t=void 0),i.h(e,{key:t,hook:{init:a,prepatch:s},fn:o,args:n})},o.default=o.thunk},{"./h":1}],6:[function(e,t,o){"use strict";function n(e,t,o,n,a){var s=t===void 0?void 0:t.key;return{sel:e,data:t,children:o,text:n,elm:a,key:s}}Object.defineProperty(o,"__esModule",{value:!0}),o.vnode=n,o.default=n},{}]},{},[4])(4)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.attrs,a=t.data.attrs,i;if((n||a)&&n!==a){for(i in n=n||{},a=a||{},a){var r=a[i],l=n[i];l!==r&&(s[i]?r?o.setAttribute(i,""):o.removeAttribute(i):120===i.charCodeAt(0)?58===i.charCodeAt(3)?o.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,r):58===i.charCodeAt(5)?o.setAttributeNS("http://www.w3.org/1999/xlink",i,r):o.setAttribute(i,r):o.setAttribute(i,r))}for(i in n)i in a||o.removeAttribute(i)}}Object.defineProperty(o,"__esModule",{value:!0});for(var a=["allowfullscreen","async","autofocus","autoplay","checked","compact","controls","declare","default","defaultchecked","defaultmuted","defaultselected","defer","disabled","draggable","enabled","formnovalidate","hidden","indeterminate","inert","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","pauseonexit","readonly","required","reversed","scoped","seamless","selected","sortable","spellcheck","translate","truespeed","typemustmatch","visible"],s=Object.create(null),r=0,l=a.length;r<l;r++)s[a[r]]=!0;o.attributesModule={create:n,update:n},o.default=o.attributesModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.class,a=t.data.class,s,i;if((n||a)&&n!==a){for(i in n=n||{},a=a||{},n)a[i]||o.classList.remove(i);for(i in a)s=a[i],s!==n[i]&&o.classList[s?"add":"remove"](i)}}Object.defineProperty(o,"__esModule",{value:!0}),o.classModule={create:n,update:n},o.default=o.classModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.dataset,s=t.data.dataset,i;if((n||s)&&n!==s){n=n||{},s=s||{};var r=o.dataset;for(i in n)s[i]||(r?i in r&&delete r[i]:o.removeAttribute("data-"+i.replace(a,"-$&").toLowerCase()));for(i in s)n[i]!==s[i]&&(r?r[i]=s[i]:o.setAttribute("data-"+i.replace(a,"-$&").toLowerCase(),s[i]))}}Object.defineProperty(o,"__esModule",{value:!0});var a=/[A-Z]/g;o.datasetModule={create:n,update:n},o.default=o.datasetModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t){var o=t.elm,n=e.data.props,a=t.data.props,s,i,r;if((n||a)&&n!==a){for(s in n=n||{},a=a||{},n)a[s]||delete o[s];for(s in a)i=a[s],r=n[s],r!==i&&("value"!==s||o[s]!==i)&&(o[s]=i)}}Object.defineProperty(o,"__esModule",{value:!0}),o.propsModule={create:n,update:n},o.default=o.propsModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";function n(e,t,o){i(function(){e[t]=o})}function a(e,t){var o=t.elm,a=e.data.style,s=t.data.style,i,r;if((a||s)&&a!==s){a=a||{},s=s||{};var l=("delayed"in a);for(r in a)s[r]||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in s)if(i=s[r],"delayed"===r&&s.delayed)for(var d in s.delayed)i=s.delayed[d],l&&i===a.delayed[d]||n(o.style,d,i);else"remove"!==r&&i!==a[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,i):o.style[r]=i)}}Object.defineProperty(o,"__esModule",{value:!0});var s="undefined"!=typeof window&&window.requestAnimationFrame||setTimeout,i=function(e){s(function(){s(e)})};o.styleModule={create:a,update:a,destroy:function(e){var t=e.elm,o=e.data.style,n,a;if(o&&(n=o.destroy))for(a in n)t.style[a]=n[a]},remove:function(e,t){var o=e.data.style;if(!o||!o.remove)return void t();var n=e.elm,a=0,s=o.remove,r=0,l=[],d,c;for(d in s)l.push(d),n.style[d]=s[d];c=getComputedStyle(n);for(var p=c["transition-property"].split(", ");a<p.length;++a)-1!==l.indexOf(p[a])&&r++;n.addEventListener("transitionend",function(e){e.target===n&&--r,0===r&&t()})}},o.default=o.styleModule},{}]},{},[1])(1)})},function(e){var t,t;(function(t){e.exports=t()})(function(){return function d(c,e,n){function a(i,o){if(!e[i]){if(!c[i]){var r="function"==typeof t&&t;if(!o&&r)return t(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var u=e[i]={exports:{}};c[i][0].call(u.exports,function(t){var e=c[i][1][t];return a(e?e:t)},u,u.exports,d,c,e,n)}return e[i].exports}for(var s="function"==typeof t&&t,i=0;i<n.length;i++)a(n[i]);return a}({1:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.htmlDomApi={createElement:function(e){return document.createElement(e)},createElementNS:function(e,t){return document.createElementNS(e,t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,o){e.insertBefore(t,o)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}},o.default=o.htmlDomApi},{}],2:[function(e,t,o){"use strict";function a(e,t){var o=t===void 0?r.default:t,l;if(o.isElement(e)){var d=e.id?"#"+e.id:"",p=e.getAttribute("class"),u=p?"."+p.split(" ").join("."):"",c=o.tagName(e).toLowerCase()+d+u,m={},g=[],h=void 0,_=void 0,f=e.attributes,b=e.childNodes,v;for(h=0,_=f.length;h<_;h++)v=f[h].nodeName,"id"!==v&&"class"!==v&&(m[v]=f[h].nodeValue);for(h=0,_=b.length;h<_;h++)g.push(a(b[h]));return s.default(c,{attrs:m},g,void 0,e)}return o.isText(e)?(l=o.getTextContent(e),s.default(void 0,void 0,void 0,l,e)):o.isComment(e)?(l=o.getTextContent(e),s.default("!",{},[],l,e)):s.default("",{},[],void 0,void 0)}Object.defineProperty(o,"__esModule",{value:!0});var s=e("./vnode"),r=e("./htmldomapi");o.toVNode=a,o.default=a},{"./htmldomapi":1,"./vnode":3}],3:[function(e,t,o){"use strict";function n(e,t,o,n,a){var s=t===void 0?void 0:t.key;return{sel:e,data:t,children:o,text:n,elm:a,key:s}}Object.defineProperty(o,"__esModule",{value:!0}),o.vnode=n,o.default=n},{}]},{},[2])(2)})},function(e,t,o){var n=o(458);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0},s;a.transform=s,a.insertInto=void 0;o(460)(n,a);n.locals&&(e.exports=n.locals),!1},function(e,t,o){t=e.exports=o(459)(!0),t.push([e.i,"","",{version:3,sources:[],names:[],mappings:"",file:"converse.scss"}])},function(e){"use strict";function t(e,t){var n=e[1]||"",a=e[3];if(!a)return n;if(t&&"function"==typeof btoa){var s=o(a),i=a.sources.map(function(e){return"/*# sourceURL=".concat(a.sourceRoot).concat(e," */")});return[n].concat(i).concat([s]).join("\n")}return[n].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(o," */")}e.exports=function(e){var o=[];return o.toString=function(){return this.map(function(o){var n=t(o,e);return o[2]?"@media ".concat(o[2],"{").concat(n,"}"):n}).join("")},o.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},a=0,s;a<this.length;a++)s=this[a][0],null!=s&&(n[s]=!0);for(var r=0,l;r<e.length;r++)l=e[r],null!=l[0]&&n[l[0]]||(t&&!l[2]?l[2]=t:t&&(l[2]="(".concat(l[2],") and (").concat(t,")")),o.push(l))},o}},function(e,t,o){function n(e,t){for(var o=0;o<e.length;o++){var n=e[o],a=h[n.id];if(a){a.refs++;for(var s=0;s<a.parts.length;s++)a.parts[s](n.parts[s]);for(;s<n.parts.length;s++)a.parts.push(p(n.parts[s],t))}else{for(var r=[],s=0;s<n.parts.length;s++)r.push(p(n.parts[s],t));h[n.id]={id:n.id,refs:1,parts:r}}}}function a(e,t){for(var o=[],n={},a=0;a<e.length;a++){var s=e[a],r=t.base?s[0]+t.base:s[0],l=s[1],d=s[2],c=s[3],p={css:l,media:d,sourceMap:c};n[r]?n[r].parts.push(p):o.push(n[r]={id:r,parts:[p]})}return o}function s(e,t){var o=b(e.insertInto);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=x[x.length-1];if("top"===e.insertAt)n?n.nextSibling?o.insertBefore(t,n.nextSibling):o.appendChild(t):o.insertBefore(t,o.firstChild),x.push(t);else if("bottom"===e.insertAt)o.appendChild(t);else if("object"==typeof e.insertAt&&e.insertAt.before){var a=b(e.insertAt.before,o);o.insertBefore(t,a)}else throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n")}function i(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=x.indexOf(e);0<=t&&x.splice(t,1)}function r(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=c();o&&(e.attrs.nonce=o)}return d(t,e.attrs),s(e,t),t}function l(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",d(t,e.attrs),s(e,t),t}function d(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}function c(){return!1,o.nc}function p(e,t){var o,n,a,s;if(t.transform&&e.css)if(s="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css),s)e.css=s;else return function(){};if(t.singleton){var d=y++;o=v||(v=r(t)),n=u.bind(null,o,d,!1),a=u.bind(null,o,d,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=l(t),n=g.bind(null,o,t),a=function(){i(o),o.href&&URL.revokeObjectURL(o.href)}):(o=r(t),n=m.bind(null,o),a=function(){i(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}function u(e,t,o,n){var a=o?"":n.css;if(e.styleSheet)e.styleSheet.cssText=w(t,a);else{var s=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(s,i[t]):e.appendChild(s)}}function m(e,t){var o=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}function g(e,t,o){var n=o.css,a=o.sourceMap,s=t.convertToAbsoluteUrls===void 0&&a;(t.convertToAbsoluteUrls||s)&&(n=S(n)),a&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var i=new Blob([n],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var h={},_=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),f=function(e,t){return t?t.querySelector(e):document.querySelector(e)},b=function(){var e={};return function(t,o){if("function"==typeof t)return t();if("undefined"==typeof e[t]){var n=f.call(this,t,o);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),v=null,y=0,x=[],S=o(461);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=_()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var o=a(e,t);return n(o,t),function(e){for(var s=[],r=0;r<o.length;r++){var l=o[r],d=h[l.id];d.refs--,s.push(d)}if(e){var c=a(e,t);n(c,t)}for(var r=0,d;r<s.length;r++)if(d=s[r],0===d.refs){for(var p=0;p<d.parts.length;p++)d.parts[p]();delete h[d.id]}}};var w=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}()},function(e){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var o=t.protocol+"//"+t.host,n=o+t.pathname.replace(/\/[^\/]*$/,"/"),a=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a))return e;var s;return s=0===a.indexOf("//")?a:0===a.indexOf("/")?o+a:n+a.replace(/^\.\//,""),"url("+JSON.stringify(s)+")"});return a}},function(e,t,o){"use strict";function n(o,n){o[n>>5]|=128<<24-n%32,o[(n+64>>9<<4)+15]=n;var l=Array(80),u=1732584193,g=-271733879,h=-1732584194,_=271733878,f=-1009589776,v,y,x,S,w,k,E,C;for(v=0;v<o.length;v+=16){for(S=u,w=g,k=h,E=_,C=f,y=0;80>y;y++)l[y]=16>y?o[v+y]:m(l[y-3]^l[y-8]^l[y-14]^l[y-16],1),x=p(p(m(u,5),s(y,g,h,_)),p(p(f,l[y]),r(y))),f=_,_=h,h=m(g,30),g=u,u=x;u=p(u,S),g=p(g,w),h=p(h,k),_=p(_,E),f=p(f,C)}return[u,g,h,_,f]}function s(e,t,o,n){return 20>e?t&o|~t&n:40>e?t^o^n:60>e?t&o|t&n|o&n:t^o^n}function r(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function l(e,t){var o=g(e);16<o.length&&(o=n(o,8*e.length));for(var a=Array(16),s=Array(16),r=0;16>r;r++)a[r]=909522486^o[r],s[r]=1549556828^o[r];var l=n(a.concat(g(t)),512+8*t.length);return n(s.concat(l),672)}function p(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o}function m(e,t){return e<<t|e>>>32-t}function g(e){for(var t=[],o=0;o<8*e.length;o+=8)t[o>>5]|=(e.charCodeAt(o/8)&255)<<24-o%32;return t}function h(e){for(var t="",o=0,n,a;o<4*e.length;o+=3)for(n=(255&e[o>>2]>>8*(3-o%4))<<16|(255&e[o+1>>2]>>8*(3-(o+1)%4))<<8|255&e[o+2>>2]>>8*(3-(o+2)%4),a=0;4>a;a++)t+=8*o+6*a>32*e.length?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n>>6*(3-a));return t}function f(e){for(var t="",o=0;o<32*e.length;o+=8)t+=String.fromCharCode(e[o>>5]>>>24-o%32&255);return t}function b(e,t){return new Be.Builder(e,t)}function v(e){return new Be.Builder("iq",e)}function y(e){return new Be.Builder("presence",e)}function x(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function S(e){return"string"!=typeof e&&(console.warn(`${e} used as a key, but it is not a string.`),e+=""),e}function w(e){var t=.75*e.length,o=e.length,n=0,a,s,r,l,d;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);var c=new ArrayBuffer(t),u=new Uint8Array(c);for(a=0;a<o;a+=4)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a]),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+1]),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+2]),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e[a+3]),u[n++]=s<<2|r>>4,u[n++]=(15&r)<<4|l>>2,u[n++]=(3&l)<<6|63&d;return c}function k(e){var t=new Uint8Array(e),o="",n;for(n=0;n<t.length;n+=3)o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[t[n]>>2],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t[n])<<4|t[n+1]>>4],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t[n+1])<<2|t[n+2]>>6],o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[63&t[n+2]];return 2==t.length%3?o=o.substring(0,o.length-1)+"=":1==t.length%3&&(o=o.substring(0,o.length-2)+"=="),o}function E(){try{if(sessionStorage&&"setItem"in sessionStorage)return!0}catch(t){console.log(t)}return!1}function C(e,t){var o=e.name+"/";return e.storeName!==t.storeName&&(o+=e.storeName+"/"),o}function A(){return(0|65536*(1+Math.random())).toString(16).substring(1)}function a(){return A()+A()+"-"+A()+"-"+A()+"-"+A()+"-"+A()+A()+A()}function i(e){var t,o;if(window.navigator.userLanguage&&(t=T(window.navigator.userLanguage,e)),window.navigator.languages&&!t)for(o=0;o<window.navigator.languages.length&&!t;o++)t=T(window.navigator.languages[o],e);return window.navigator.browserLanguage&&!t&&(t=T(window.navigator.browserLanguage,e)),window.navigator.language&&!t&&(t=T(window.navigator.language,e)),window.navigator.systemLanguage&&!t&&(t=T(window.navigator.systemLanguage,e)),t||"en"}function d(e,t){return"string"==typeof e&&t.includes(e)}function c(e,t){return"string"==typeof e&&("en"===e||t(e))?e:i(t)||"en"}function T(e,t){if(t(e))return e;var o=e.split("-")[0];if(o!==e&&t(o))return o}function j(e,t){this.name=t,this.plugged=e,"undefined"==typeof this.plugged.__super__?this.plugged.__super__={}:"string"==typeof this.plugged.__super__&&(this.plugged.__super__={__string__:this.plugged.__super__}),this.plugged.__super__[t]=this.plugged,this.plugins={},this.initialized_plugins=[]}function N(e,t){clearTimeout(e),clearInterval(t)}function M(e){const t=io.promises[e];if(!t)throw new Error("Tried to replace non-existing promise: ".concat(e));if(t.replace){const o=Qt.getResolveablePromise();o.replace=t.replace,io.promises[e]=o}else vt.debug("Not replacing promise \"".concat(e,"\""))}async function I(){await it.sessionStorageInitialized,io.storage={session:it.localForage.createInstance({name:io.isTestEnv()?"converse-test-session":"converse-session",description:"sessionStorage instance",driver:["sessionStorageWrapper"]})}}function O(){if("persistent"===io.config.get("storage")){const e={name:io.isTestEnv()?"converse-test-persistent":"converse-persistent",storeName:io.bare_jid};"localStorage"===io.persistent_store?(e.description="localStorage instance",e.driver=[it.localForage.LOCALSTORAGE]):"IndexedDB"===io.persistent_store&&(e.description="indexedDB instance",e.driver=[it.localForage.INDEXEDDB]),io.storage.persistent=it.localForage.createInstance(e)}}function R(){io.pluggable.initialized_plugins=[];const e=so.concat(io.whitelisted_plugins);io.singleton&&["converse-bookmarks","converse-controlbox","converse-headline","converse-register"].forEach(e=>io.blacklisted_plugins.push(e)),io.pluggable.initializePlugins({_converse:io},e,io.blacklisted_plugins),io.api.trigger("pluginsInitialized")}function D(){io.config=new Backbone.Model({id:"converse.client-config",trusted:io.trusted&&!0||!1,storage:io.trusted?"persistent":"session"}),io.config.browserStorage=io.createStore("converse.client-config","session"),io.config.fetch(),io.api.trigger("clientConfigInitialized")}async function L(){return await io.api.trigger("beforeTearDown",{synchronous:!0}),window.removeEventListener("click",io.onUserActivity),window.removeEventListener("focus",io.onUserActivity),window.removeEventListener("keypress",io.onUserActivity),window.removeEventListener("mousemove",io.onUserActivity),window.removeEventListener(io.unloadevent,io.onUserActivity),window.clearInterval(io.everySecondTrigger),io.api.trigger("afterTearDown"),io}async function P(e,t){io.authentication===io.LOGIN?e?q(e):io.credentials_url?q(await X()):io.jid&&(io.password||io.connection.pass)?q():!io.isTestEnv()&&window.PasswordCredential?q(await K()):vt.warn("attemptNonPreboundSession: Could not find any credentials to log in with"):[io.ANONYMOUS,io.EXTERNAL].includes(io.authentication)&&(!t||io.auto_login)&&q()}function q(e){if([io.ANONYMOUS,io.EXTERNAL].includes(io.authentication)){if(!io.jid)throw new Error("Config Error: when using anonymous login you need to provide the server's domain via the 'jid' option. Either when calling converse.initialize, or when calling _converse.api.user.login.");io.connection.reconnecting||io.connection.reset(),io.connection.connect(io.jid.toLowerCase(),null,io.onConnectStatusChanged,ao)}else if(io.authentication===io.LOGIN){const t=e?e.password:lt.a.get(io.connection,"pass")||io.password;if(!t){if(io.auto_login)throw new Error("autoLogin: If you use auto_login and authentication='login' then you also need to provide a password.");return io.setDisconnectionCause(Zt.Status.AUTHFAIL,void 0,!0),void io.api.connection.disconnect()}io.connection.reconnecting||io.connection.reset(),io.connection.connect(io.jid,t,io.onConnectStatusChanged,ao)}}async function B(){return vt.debug("RECONNECTING: the connection has dropped, attempting to reconnect."),io.setConnectionStatus(Zt.Status.RECONNECTING,co("The connection has dropped, attempting to reconnect.")),io.api.trigger("will-reconnect"),io.connection.reconnecting=!0,await L(),io.api.user.login()}function z(){io.session!==void 0&&(io.session.destroy(),delete io.session),io.api.trigger("clearSession")}async function F(e){const t=await e.text(),o=new window.DOMParser().parseFromString(t,"text/xml").firstElementChild;if("XRD"!=o.nodeName||"http://docs.oasis-open.org/ns/xri/xrd-1.0"!=o.namespaceURI)return vt.warn("Could not discover XEP-0156 connection methods");const n=Wt()("Link[rel=\"urn:xmpp:alt-connections:xbosh\"]",o),a=Wt()("Link[rel=\"urn:xmpp:alt-connections:websocket\"]",o),s=n.map(e=>e.getAttribute("href")),i=a.map(e=>e.getAttribute("href"));io.websocket_url=i.pop(),io.bosh_service_url=s.pop(),0===s.length&&0===i.length&&vt.warn("onDomainDiscovered: neither BOSH nor WebSocket connection methods have been specified with XEP-0156.")}async function H(e){const t="https://".concat(e,"/.well-known/host-meta");let o;try{o=await fetch(t,{mode:"cors",headers:{Accept:"application/xrd+xml, text/xml"}})}catch(o){return vt.error("Failed to discover alternative connection methods at ".concat(t)),void vt.error(o)}200<=o.status&&400>o.status?await F(o):vt.warn("Could not discover XEP-0156 connection methods")}async function U(e){const t=Zt.getBareJidFromJid(e).toLowerCase(),o="converse.session-".concat(t);io.session&&io.session.get("id")===o?V(e):(io.session=new Backbone.Model({id:o}),io.session.browserStorage=io.createStore(o,"session"),await new Promise(e=>io.session.fetch({success:e,error:e})),io.session.get("active")&&(io.session.clear(),io.session.save({id:o})),V(e),O(),io.api.trigger("userSessionInitialized"))}function V(e){e=io.session.get("jid")||e,io.authentication===io.ANONYMOUS||Zt.getResourceFromJid(e)||(e=e.toLowerCase()+io.generateResource()),io.jid=e,io.bare_jid=Zt.getBareJidFromJid(e),io.resource=Zt.getResourceFromJid(e),io.domain=Zt.getDomainFromJid(e),io.session.save({jid:e,bare_jid:io.bare_jid,resource:io.resource,domain:io.domain,active:!0}),io.connection.jid=e}function W(){if(io.message_carbons&&io.session&&!io.session.get("carbons_enabled")){const e=new Zt.Builder("iq",{from:io.connection.jid,id:"enablecarbons",type:"set"}).c("enable",{xmlns:Zt.NS.CARBONS});io.connection.addHandler(e=>{0<e.querySelectorAll("error").length?vt.warn("An error occurred while trying to enable message carbons."):(io.session.save({carbons_enabled:!0}),vt.debug("Message carbons have been enabled."))},null,"iq",null,"enablecarbons"),io.connection.send(e)}}async function G(e){delete io.connection.reconnecting,io.connection.flush(),await io.setUserJID(io.connection.jid),await io.api.trigger("afterResourceBinding",e,{synchronous:!0}),W(),e?io.api.trigger("reconnected"):(io.api.trigger("initialized"),io.api.trigger("connected"))}function J(){const e={};e[Zt.LogLevel.DEBUG]="debug",e[Zt.LogLevel.INFO]="info",e[Zt.LogLevel.WARN]="warn",e[Zt.LogLevel.ERROR]="error",e[Zt.LogLevel.FATAL]="fatal",Zt.log=(t,o)=>vt.log(o,e[t]),Zt.error=e=>vt.error(e),io.connection.xmlInput=e=>vt.debug(e.outerHTML,"color: darkgoldenrod"),io.connection.xmlOutput=e=>vt.debug(e.outerHTML,"color: darkcyan")}async function $(){await I(),D(),R(),Z(),Backbone.History.started||Backbone.history.start(),0<io.idle_presence_timeout&&io.api.listen.on("addClientFeatures",()=>{io.api.disco.own.features.add(Zt.NS.IDLE)}),(io.auto_login||io.keepalive&&lt.a.invoke(io.pluggable.plugins["converse-bosh"],"enabled"))&&(await io.api.user.login(null,null,!0))}function Q(){vt.debug("DISCONNECTED"),delete io.connection.reconnecting,io.connection.reset(),L(),z(),delete io.connection,io.api.trigger("disconnected")}function Y(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0;return new Promise(lt.a.debounce((e,t)=>{const o=new XMLHttpRequest;o.open("GET",io.credentials_url,!0),o.setRequestHeader("Accept","application/json, text/javascript"),o.onload=()=>{if(200<=o.status&&400>o.status){const t=JSON.parse(o.responseText);io.setUserJID(t.jid).then(()=>{e({jid:t.jid,password:t.password})})}else t(new Error("".concat(o.status,": ").concat(o.responseText)))},o.onerror=t,o.send()},e))}async function X(){let e=0,t;for(;!t;){try{t=await Y(e)}catch(t){vt.error("Could not fetch login credentials"),vt.error(t)}e=2e3}return t}async function K(){const e=await navigator.credentials.get({password:!0});if(e&&"password"==e.type&&Qt.isValidJID(e.id))return await io.setUserJID(e.id),{jid:e.id,password:e.password}}function Z(){document.addEventListener("visibilitychange",io.saveWindowState),io.saveWindowState({type:document.hidden?"blur":"focus"}),io.api.trigger("registeredGlobalEventHandlers")}function ee(){document.removeEventListener("visibilitychange",io.saveWindowState),io.api.trigger("unregisteredGlobalEventHandlers")}function te(){Backbone.history.stop(),ee(),delete io.controlboxtoggle,io.chatboxviews&&delete io.chatboxviews,io.connection&&io.connection.reset(),io.stopListening(),io.off()}function oe(e){if(-1<e.indexOf("-")){const t=[],o=e.split("-");for(let e=0,n;e<o.length;e++){if(n=parseInt(o[e],16),65536<=n&&1114111>=n){const e=Math.floor((n-65536)/1024)+55296,t=(n-65536)%1024+56320;n=String.fromCharCode(e)+String.fromCharCode(t)}else n=String.fromCharCode(n);t.push(n)}return t.join("")}return Ao.convert.fromCodePoint(e)}function ne(e,t){return e.sort((e,o)=>e[t]>o[t]?-1:1)}function ae(e){const t=e.api.disco.own.identities.get(),o=e.api.disco.own.features.get();1<t.length&&(ne(t,"category"),ne(t,"type"),ne(t,"lang"));let n=an.reduce(t,(e,t)=>"".concat(e).concat(t.category,"/").concat(t.type,"/").concat(an.get(t,"lang",""),"/").concat(t.name,"<"),"");return o.sort(),n=an.reduce(o,(e,t)=>"".concat(e).concat(t,"<"),n),Pe.b64_sha1(n)}function se(e){return nn("c",{xmlns:on.NS.CAPS,hash:"sha-1",node:"https://conversejs.org",ver:ae(e)}).nodeTree}function ie(e,t){return{"muc#roomconfig_lang":"language","muc#roomconfig_roomsecret":t.new_password?"new-password":"current-password"}[e]}function re(e){e.removeAttribute("data-slider-marker"),e.classList.remove("collapsed"),e.style.overflow="",e.style.height=""}function le(e){return new Promise((t,o)=>{var n=new Image,a=window.setTimeout(function(){o(new Error("Could not determine whether it's an image")),n=null},3e3);n.onerror=n.onabort=function(){clearTimeout(a),o(new Error("Could not determine whether it's an image"))},n.onload=function(){clearTimeout(a),t(n)},n.src=e})}function de(e){try{return e instanceof Tn.a?e:new Tn.a(e)}catch(e){return vt.debug(e),null}}function ce(e){return"http:"===window.location.protocol||"https:"===window.location.protocol&&"https"===e.protocol().toLowerCase()}function pe(e,t){const o=de(t);if(null===o||!ce(o))return!1;const n=o.filename().toLowerCase();return!!e.filter(e=>n.endsWith(e)).length}function ue(e){try{return decodeURI(e.filename())}catch(t){return vt.debug(t),e.filename()}}function me(e,t){const{__:o}=e;return Nn()({url:t.toString(),label_download:o("Download audio file \"%1$s\"",ue(t))})}function ge(e,t){if(!e.show_images_inline)return Qt.convertToHyperlink(t);const{__:o}=e;return $n()({url:t.toString(),label_download:o("Download image \"%1$s\"",ue(t))})}function he(e,t){const{__:o}=e;return In()({url:t.toString(),label_download:o("Download file \"%1$s\"",ue(t))})}function _e(e,t){e.classList.remove("visible"),lt.a.isFunction(t)&&t()}function fe(e,t){const o=t.el.querySelector(".box-flyout"),n=document.createElement("div");n.innerHTML=si()(),o.insertBefore(n,o.firstChild)}function be(e){const t=e.getBoundingClientRect();return 0<=t.top&&0<=t.left&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function ve(e){let t=0;do isNaN(e.offsetTop)||(t+=e.offsetTop);while(e=e.offsetParent);return t}function ye(e){let t=0;do isNaN(e.offsetLeft)||(t+=e.offsetLeft);while(e=e.offsetParent);return t}function xe(e){const t=e.querySelector("signedPreKeyPublic"),o=e.querySelector("signedPreKeySignature"),n=Yr("prekeys > preKeyPublic",e).map(e=>({id:parseInt(e.getAttribute("preKeyId"),10),key:e.textContent}));return{identity_key:e.querySelector("identityKey").textContent.trim(),signed_prekey:{id:parseInt(t.getAttribute("signedPreKeyId"),10),public_key:t.textContent,signature:o.textContent},prekeys:n}}function Se(e){"controlbox"===e.model.get("id")||(Wl.safeSave(e.model,{hidden:!0}),e.hide())}function we(e){return 0<e.chatboxes.filter(e=>"controlbox"!==e.get("id")&&!e.get("hidden")).length}o.r(t);var ke=o(0);const Ee=function(e,t){const o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o},Ce=function(e,t){return e<<t|e>>>32-t},Ae=function(e){if("string"!=typeof e)throw new Error("str2binl was passed a non-string");const t=[];for(let o=0;o<8*e.length;o+=8)t[o>>5]|=(255&e.charCodeAt(o/8))<<o%32;return t},Te=function(e){let t="";for(let o=0;o<32*e.length;o+=8)t+=String.fromCharCode(255&e[o>>5]>>>o%32);return t},je=function(e){const t="0123456789abcdef";let o="";for(let n=0;n<4*e.length;n++)o+=t.charAt(15&e[n>>2]>>8*(n%4)+4)+t.charAt(15&e[n>>2]>>8*(n%4));return o},Ne=function(e,o,n,a,i,s){return Ee(Ce(Ee(Ee(o,e),Ee(a,s)),i),n)},Me=function(e,o,n,a,i,r,s){return Ne(o&n|~o&a,e,o,i,r,s)},Ie=function(e,o,n,a,i,r,s){return Ne(o&a|n&~a,e,o,i,r,s)},Oe=function(e,o,n,a,i,r,s){return Ne(o^n^a,e,o,i,r,s)},Re=function(e,o,n,a,i,r,s){return Ne(n^(o|~a),e,o,i,r,s)},De=function(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;let o=1732584193,n=-271733879,s=-1732584194,r=271733878,l,p,u,m;for(let a=0;a<e.length;a+=16)l=o,p=n,u=s,m=r,o=Me(o,n,s,r,e[a+0],7,-680876936),r=Me(r,o,n,s,e[a+1],12,-389564586),s=Me(s,r,o,n,e[a+2],17,606105819),n=Me(n,s,r,o,e[a+3],22,-1044525330),o=Me(o,n,s,r,e[a+4],7,-176418897),r=Me(r,o,n,s,e[a+5],12,1200080426),s=Me(s,r,o,n,e[a+6],17,-1473231341),n=Me(n,s,r,o,e[a+7],22,-45705983),o=Me(o,n,s,r,e[a+8],7,1770035416),r=Me(r,o,n,s,e[a+9],12,-1958414417),s=Me(s,r,o,n,e[a+10],17,-42063),n=Me(n,s,r,o,e[a+11],22,-1990404162),o=Me(o,n,s,r,e[a+12],7,1804603682),r=Me(r,o,n,s,e[a+13],12,-40341101),s=Me(s,r,o,n,e[a+14],17,-1502002290),n=Me(n,s,r,o,e[a+15],22,1236535329),o=Ie(o,n,s,r,e[a+1],5,-165796510),r=Ie(r,o,n,s,e[a+6],9,-1069501632),s=Ie(s,r,o,n,e[a+11],14,643717713),n=Ie(n,s,r,o,e[a+0],20,-373897302),o=Ie(o,n,s,r,e[a+5],5,-701558691),r=Ie(r,o,n,s,e[a+10],9,38016083),s=Ie(s,r,o,n,e[a+15],14,-660478335),n=Ie(n,s,r,o,e[a+4],20,-405537848),o=Ie(o,n,s,r,e[a+9],5,568446438),r=Ie(r,o,n,s,e[a+14],9,-1019803690),s=Ie(s,r,o,n,e[a+3],14,-187363961),n=Ie(n,s,r,o,e[a+8],20,1163531501),o=Ie(o,n,s,r,e[a+13],5,-1444681467),r=Ie(r,o,n,s,e[a+2],9,-51403784),s=Ie(s,r,o,n,e[a+7],14,1735328473),n=Ie(n,s,r,o,e[a+12],20,-1926607734),o=Oe(o,n,s,r,e[a+5],4,-378558),r=Oe(r,o,n,s,e[a+8],11,-2022574463),s=Oe(s,r,o,n,e[a+11],16,1839030562),n=Oe(n,s,r,o,e[a+14],23,-35309556),o=Oe(o,n,s,r,e[a+1],4,-1530992060),r=Oe(r,o,n,s,e[a+4],11,1272893353),s=Oe(s,r,o,n,e[a+7],16,-155497632),n=Oe(n,s,r,o,e[a+10],23,-1094730640),o=Oe(o,n,s,r,e[a+13],4,681279174),r=Oe(r,o,n,s,e[a+0],11,-358537222),s=Oe(s,r,o,n,e[a+3],16,-722521979),n=Oe(n,s,r,o,e[a+6],23,76029189),o=Oe(o,n,s,r,e[a+9],4,-640364487),r=Oe(r,o,n,s,e[a+12],11,-421815835),s=Oe(s,r,o,n,e[a+15],16,530742520),n=Oe(n,s,r,o,e[a+2],23,-995338651),o=Re(o,n,s,r,e[a+0],6,-198630844),r=Re(r,o,n,s,e[a+7],10,1126891415),s=Re(s,r,o,n,e[a+14],15,-1416354905),n=Re(n,s,r,o,e[a+5],21,-57434055),o=Re(o,n,s,r,e[a+12],6,1700485571),r=Re(r,o,n,s,e[a+3],10,-1894986606),s=Re(s,r,o,n,e[a+10],15,-1051523),n=Re(n,s,r,o,e[a+1],21,-2054922799),o=Re(o,n,s,r,e[a+8],6,1873313359),r=Re(r,o,n,s,e[a+15],10,-30611744),s=Re(s,r,o,n,e[a+6],15,-1560198380),n=Re(n,s,r,o,e[a+13],21,1309151649),o=Re(o,n,s,r,e[a+4],6,-145523070),r=Re(r,o,n,s,e[a+11],10,-1120210379),s=Re(s,r,o,n,e[a+2],15,718787259),n=Re(n,s,r,o,e[a+9],21,-343485551),o=Ee(o,l),n=Ee(n,p),s=Ee(s,u),r=Ee(r,m);return[o,n,s,r]},Le={hexdigest:function(e){return je(De(Ae(e),8*e.length))},hash:function(e){return Te(De(Ae(e),8*e.length))}},Pe={b64_hmac_sha1:function(e,t){return h(l(e,t))},b64_sha1:function(e){return h(n(g(e),8*e.length))},binb2str:f,core_hmac_sha1:l,str_hmac_sha1:function(e,t){return f(l(e,t))},str_sha1:function(e){return f(n(g(e),8*e.length))}},qe={utf16to8:function(e){var t="",o=e.length,n,a;for(n=0;n<o;n++)a=e.charCodeAt(n),0<=a&&127>=a?t+=e.charAt(n):2047<a?(t+=String.fromCharCode(224|15&a>>12),t+=String.fromCharCode(128|63&a>>6),t+=String.fromCharCode(128|63&a>>0)):(t+=String.fromCharCode(192|31&a>>6),t+=String.fromCharCode(128|63&a>>0));return t},addCookies:function(e){for(const t in e=e||{},e)if(Object.prototype.hasOwnProperty.call(e,t)){let o="",n="",a="";const s=e[t],i="object"==typeof s,r=escape(unescape(i?s.value:s));i&&(o=s.expires?";expires="+s.expires:"",n=s.domain?";domain="+s.domain:"",a=s.path?";path="+s.path:""),document.cookie=t+"="+r+o+n+a}}},Be={VERSION:"@VERSION@",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",FRAMING:"urn:ietf:params:xml:ns:xmpp-framing",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag:function(e){for(let t=0;t<Be.XHTML.tags.length;t++)if(e===Be.XHTML.tags[t])return!0;return!1},validAttribute:function(e,t){if("undefined"!=typeof Be.XHTML.attributes[e]&&0<Be.XHTML.attributes[e].length)for(let o=0;o<Be.XHTML.attributes[e].length;o++)if(t===Be.XHTML.attributes[e][o])return!0;return!1},validCSS:function(e){for(let t=0;t<Be.XHTML.css.length;t++)if(e===Be.XHTML.css[t])return!0;return!1}},Status:{ERROR:0,CONNECTING:1,CONNFAIL:2,AUTHENTICATING:3,AUTHFAIL:4,CONNECTED:5,DISCONNECTED:6,DISCONNECTING:7,ATTACHED:8,REDIRECT:9,CONNTIMEOUT:10,BINDREQUIRED:11},ErrorCondition:{BAD_FORMAT:"bad-format",CONFLICT:"conflict",MISSING_JID_NODE:"x-strophe-bad-non-anon-jid",NO_AUTH_MECH:"no-auth-mech",UNKNOWN_REASON:"unknown"},LogLevel:{DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4},ElementType:{NORMAL:1,TEXT:3,CDATA:4,FRAGMENT:11},TIMEOUT:1.1,SECONDARY_TIMEOUT:.1,addNamespace:function(e,t){Be.NS[e]=t},forEachChild:function(e,t,o){for(let n=0;n<e.childNodes.length;n++){const a=e.childNodes[n];a.nodeType===Be.ElementType.NORMAL&&(!t||this.isTagEqual(a,t))&&o(a)}},isTagEqual:function(e,t){return e.tagName===t},_xmlGenerator:null,_makeGenerator:function(){let e;return void 0===document.implementation.createDocument||document.implementation.createDocument&&document.documentMode&&10>document.documentMode?(e=this._getIEXmlDom(),e.appendChild(e.createElement("strophe"))):e=document.implementation.createDocument("jabber:client","strophe",null),e},xmlGenerator:function(){return Be._xmlGenerator||(Be._xmlGenerator=Be._makeGenerator()),Be._xmlGenerator},_getIEXmlDom:function(){let t=null;const o=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];for(let e=0;e<o.length&&null===t;e++)try{t=new ActiveXObject(o[e])}catch(o){t=null}return t},xmlElement:function(e){if(!e)return null;const t=Be.xmlGenerator().createElement(e);for(let o=1;o<arguments.length;o++){const e=arguments[o];if(e)if("string"==typeof e||"number"==typeof e)t.appendChild(Be.xmlTextNode(e));else if("object"==typeof e&&"function"==typeof e.sort)for(let o=0;o<e.length;o++){const n=e[o];"object"==typeof n&&"function"==typeof n.sort&&void 0!==n[1]&&null!==n[1]&&t.setAttribute(n[0],n[1])}else if("object"==typeof e)for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&void 0!==e[o]&&null!==e[o]&&t.setAttribute(o,e[o])}return t},xmlescape:function(e){return e=e.replace(/\&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/'/g,"&apos;"),e=e.replace(/"/g,"&quot;"),e},xmlunescape:function(e){return e=e.replace(/\&amp;/g,"&"),e=e.replace(/&lt;/g,"<"),e=e.replace(/&gt;/g,">"),e=e.replace(/&apos;/g,"'"),e=e.replace(/&quot;/g,"\""),e},xmlTextNode:function(e){return Be.xmlGenerator().createTextNode(e)},xmlHtmlNode:function(e){let t;if(DOMParser){const o=new DOMParser;t=o.parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},getText:function(e){if(!e)return null;let t="";0===e.childNodes.length&&e.nodeType===Be.ElementType.TEXT&&(t+=e.nodeValue);for(let o=0;o<e.childNodes.length;o++)e.childNodes[o].nodeType===Be.ElementType.TEXT&&(t+=e.childNodes[o].nodeValue);return Be.xmlescape(t)},copyElement:function(e){let t;if(e.nodeType===Be.ElementType.NORMAL){t=Be.xmlElement(e.tagName);for(let o=0;o<e.attributes.length;o++)t.setAttribute(e.attributes[o].nodeName,e.attributes[o].value);for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.copyElement(e.childNodes[o]))}else e.nodeType===Be.ElementType.TEXT&&(t=Be.xmlGenerator().createTextNode(e.nodeValue));return t},createHtml:function(e){let t;if(e.nodeType===Be.ElementType.NORMAL){const o=e.nodeName.toLowerCase();if(Be.XHTML.validTag(o))try{t=Be.xmlElement(o);for(let n=0;n<Be.XHTML.attributes[o].length;n++){const a=Be.XHTML.attributes[o][n];let s=e.getAttribute(a);if("undefined"!=typeof s&&null!==s&&""!==s&&!1!==s&&0!==s)if("style"===a&&"object"==typeof s&&"undefined"!=typeof s.cssText&&(s=s.cssText),"style"===a){const e=[],o=s.split(";");for(let t=0;t<o.length;t++){const n=o[t].split(":"),a=n[0].replace(/^\s*/,"").replace(/\s*$/,"").toLowerCase();if(Be.XHTML.validCSS(a)){const t=n[1].replace(/^\s*/,"").replace(/\s*$/,"");e.push(a+": "+t)}}0<e.length&&(s=e.join("; "),t.setAttribute(a,s))}else t.setAttribute(a,s)}for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.createHtml(e.childNodes[o]))}catch(o){t=Be.xmlTextNode("")}else{t=Be.xmlGenerator().createDocumentFragment();for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.createHtml(e.childNodes[o]))}}else if(e.nodeType===Be.ElementType.FRAGMENT){t=Be.xmlGenerator().createDocumentFragment();for(let o=0;o<e.childNodes.length;o++)t.appendChild(Be.createHtml(e.childNodes[o]))}else e.nodeType===Be.ElementType.TEXT&&(t=Be.xmlTextNode(e.nodeValue));return t},escapeNode:function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/\"/g,"\\22").replace(/\&/g,"\\26").replace(/\'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(/</g,"\\3c").replace(/>/g,"\\3e").replace(/@/g,"\\40"):e},unescapeNode:function(e){return"string"==typeof e?e.replace(/\\20/g," ").replace(/\\22/g,"\"").replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\"):e},getNodeFromJid:function(e){return 0>e.indexOf("@")?null:e.split("@")[0]},getDomainFromJid:function(e){const t=Be.getBareJidFromJid(e);if(0>t.indexOf("@"))return t;else{const e=t.split("@");return e.splice(0,1),e.join("@")}},getResourceFromJid:function(e){if(!e)return null;const t=e.split("/");return 2>t.length?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:function(e){return e?e.split("/")[0]:null},_handleError:function(t){"undefined"!=typeof t.stack&&Be.fatal(t.stack),t.sourceURL?Be.fatal("error: "+this.handler+" "+t.sourceURL+":"+t.line+" - "+t.name+": "+t.message):t.fileName?Be.fatal("error: "+this.handler+" "+t.fileName+":"+t.lineNumber+" - "+t.name+": "+t.message):Be.fatal("error: "+t.message)},log:function(e,t){e===this.LogLevel.FATAL&&"object"==typeof window.console&&"function"==typeof window.console.error&&window.console.error(t)},debug:function(e){this.log(this.LogLevel.DEBUG,e)},info:function(e){this.log(this.LogLevel.INFO,e)},warn:function(e){this.log(this.LogLevel.WARN,e)},error:function(e){this.log(this.LogLevel.ERROR,e)},fatal:function(e){this.log(this.LogLevel.FATAL,e)},serialize:function(e){if(!e)return null;"function"==typeof e.tree&&(e=e.tree());const t=[...Array(e.attributes.length).keys()].map(t=>e.attributes[t].nodeName);t.sort();let o=t.reduce((t,o)=>`${t} ${o}="${Be.xmlescape(e.attributes.getNamedItem(o).value)}"`,`<${e.nodeName}`);if(0<e.childNodes.length){o+=">";for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];switch(n.nodeType){case Be.ElementType.NORMAL:o+=Be.serialize(n);break;case Be.ElementType.TEXT:o+=Be.xmlescape(n.nodeValue);break;case Be.ElementType.CDATA:o+="<![CDATA["+n.nodeValue+"]]>";}}o+="</"+e.nodeName+">"}else o+="/>";return o},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(e,t){Be._connectionPlugins[e]=t}};Be.Builder=function(e,t){("presence"===e||"message"===e||"iq"===e)&&(t&&!t.xmlns?t.xmlns=Be.NS.CLIENT:!t&&(t={xmlns:Be.NS.CLIENT})),this.nodeTree=Be.xmlElement(e,t),this.node=this.nodeTree},Be.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return Be.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},root:function(){return this.node=this.nodeTree,this},attrs:function(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(void 0===e[t]?this.node.removeAttribute(t):this.node.setAttribute(t,e[t]));return this},c:function(e,t,o){const n=Be.xmlElement(e,t,o);return this.node.appendChild(n),"string"!=typeof o&&"number"!=typeof o&&(this.node=n),this},cnode:function(e){let t;const o=Be.xmlGenerator();try{t=void 0!==o.importNode}catch(o){t=!1}const n=t?o.importNode(e,!0):Be.copyElement(e);return this.node.appendChild(n),this.node=n,this},t:function(e){const t=Be.xmlTextNode(e);return this.node.appendChild(t),this},h:function(e){const t=document.createElement("body");t.innerHTML=e;for(const o=Be.createHtml(t);0<o.childNodes.length;)this.node.appendChild(o.childNodes[0]);return this}},Be.Handler=function(e,t,o,n,a,s,i){this.handler=e,this.ns=t,this.name=o,this.type=n,this.id=a,this.options=i||{matchBareFromJid:!1,ignoreNamespaceFragment:!1},this.options.matchBare&&(Be.warn("The \"matchBare\" option is deprecated, use \"matchBareFromJid\" instead."),this.options.matchBareFromJid=this.options.matchBare,delete this.options.matchBare),this.from=this.options.matchBareFromJid?s?Be.getBareJidFromJid(s):null:s,this.user=!0},Be.Handler.prototype={getNamespace:function(e){let t=e.getAttribute("xmlns");return t&&this.options.ignoreNamespaceFragment&&(t=t.split("#")[0]),t},namespaceMatch:function(e){let t=!1;return!this.ns||(Be.forEachChild(e,null,e=>{this.getNamespace(e)===this.ns&&(t=!0)}),t||this.getNamespace(e)===this.ns)},isMatch:function(e){let t=e.getAttribute("from");this.options.matchBareFromJid&&(t=Be.getBareJidFromJid(t));const o=e.getAttribute("type");return!(!this.namespaceMatch(e)||this.name&&!Be.isTagEqual(e,this.name)||this.type&&(Array.isArray(this.type)?-1===this.type.indexOf(o):o!==this.type)||this.id&&e.getAttribute("id")!==this.id||this.from&&t!==this.from)},run:function(e){let t=null;try{t=this.handler(e)}catch(t){throw Be._handleError(t),t}return t},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},Be.TimedHandler=function(e,t){this.period=e,this.handler=t,this.lastCalled=new Date().getTime(),this.user=!0},Be.TimedHandler.prototype={run:function(){return this.lastCalled=new Date().getTime(),this.handler()},reset:function(){this.lastCalled=new Date().getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},Be.Connection=function(e,t){this.service=e,this.options=t||{};const o=this.options.protocol||"";for(const n in this._proto=0===e.indexOf("ws:")||0===e.indexOf("wss:")||0===o.indexOf("ws")?new Be.Websocket(this):new Be.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.protocolErrorHandlers={HTTP:{},websocket:{}},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(()=>this._onIdle(),100),qe.addCookies(this.options.cookies),this.registerSASLMechanisms(this.options.mechanisms),Be._connectionPlugins)if(Object.prototype.hasOwnProperty.call(Be._connectionPlugins,n)){const e=function(){};e.prototype=Be._connectionPlugins[n],this[n]=new e,this[n].init(this)}},Be.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=0|16*Math.random(),o="x"===e?t:8|3&t;return o.toString(16)});return"string"==typeof e||"number"==typeof e?t+":"+e:t+""},addProtocolErrorHandler:function(e,t,o){this.protocolErrorHandlers[e][t]=o},connect:function(e,t,o,n,a,s,i){this.jid=e,this.authzid=Be.getBareJidFromJid(this.jid),this.authcid=i||Be.getNodeFromJid(this.jid),this.pass=t,this.servtype="xmpp",this.connect_callback=o,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=Be.getDomainFromJid(this.jid),this._changeConnectStatus(Be.Status.CONNECTING,null),this._proto._connect(n,a,s)},attach:function(e,t,o,n,a,s,i){if(this._proto instanceof Be.Bosh)this._proto._attach(e,t,o,n,a,s,i);else{const e=new Error("The \"attach\" method can only be used with a BOSH connection.");throw e.name="StropheSessionError",e}},restore:function(e,t,o,n,a){if(this._sessionCachingSupported())this._proto._restore(e,t,o,n,a);else{const e=new Error("The \"restore\" method can only be used with a BOSH connection.");throw e.name="StropheSessionError",e}},_sessionCachingSupported:function(){if(this._proto instanceof Be.Bosh){if(!JSON)return!1;try{sessionStorage.setItem("_strophe_","_strophe_"),sessionStorage.removeItem("_strophe_")}catch(t){return!1}return!0}return!1},xmlInput:function(){},xmlOutput:function(){},rawInput:function(){},rawOutput:function(){},nextValidRid:function(){},send:function(e){if(null!==e){if("function"==typeof e.sort)for(let t=0;t<e.length;t++)this._queueData(e[t]);else"function"==typeof e.tree?this._queueData(e.tree()):this._queueData(e);this._proto._send()}},flush:function(){clearTimeout(this._idleTimeout),this._onIdle()},sendPresence:function(e,t,o,n){let a=null;"function"==typeof e.tree&&(e=e.tree());let s=e.getAttribute("id");if(s||(s=this.getUniqueId("sendPresence"),e.setAttribute("id",s)),"function"==typeof t||"function"==typeof o){const e=this.addHandler(e=>{a&&this.deleteTimedHandler(a),"error"===e.getAttribute("type")?o&&o(e):t&&t(e)},null,"presence",null,s);n&&(a=this.addTimedHandler(n,()=>(this.deleteHandler(e),o&&o(null),!1)))}return this.send(e),s},sendIQ:function(e,t,o,n){let a=null;"function"==typeof e.tree&&(e=e.tree());let s=e.getAttribute("id");if(s||(s=this.getUniqueId("sendIQ"),e.setAttribute("id",s)),"function"==typeof t||"function"==typeof o){const e=this.addHandler(e=>{a&&this.deleteTimedHandler(a);const n=e.getAttribute("type");if("result"===n)t&&t(e);else if("error"===n)o&&o(e);else{const e=new Error(`Got bad IQ type of ${n}`);throw e.name="StropheError",e}},null,"iq",["error","result"],s);n&&(a=this.addTimedHandler(n,()=>(this.deleteHandler(e),o&&o(null),!1)))}return this.send(e),s},_queueData:function(e){if(null===e||!e.tagName||!e.childNodes){const e=new Error("Cannot queue non-DOMElement.");throw e.name="StropheError",e}this._data.push(e)},_sendRestart:function(){this._data.push("restart"),this._proto._sendRestart(),this._idleTimeout=setTimeout(()=>this._onIdle(),100)},addTimedHandler:function(e,t){const o=new Be.TimedHandler(e,t);return this.addTimeds.push(o),o},deleteTimedHandler:function(e){this.removeTimeds.push(e)},addHandler:function(e,t,o,n,a,s,i){const r=new Be.Handler(e,t,o,n,a,s,i);return this.addHandlers.push(r),r},deleteHandler:function(e){this.removeHandlers.push(e);const t=this.addHandlers.indexOf(e);0<=t&&this.addHandlers.splice(t,1)},registerSASLMechanisms:function(e){this.mechanisms={},e=e||[Be.SASLAnonymous,Be.SASLExternal,Be.SASLMD5,Be.SASLOAuthBearer,Be.SASLXOAuth2,Be.SASLPlain,Be.SASLSHA1],e.forEach(this.registerSASLMechanism.bind(this))},registerSASLMechanism:function(e){this.mechanisms[e.prototype.name]=e},disconnect:function(e){if(this._changeConnectStatus(Be.Status.DISCONNECTING,e),Be.warn("Disconnect was called because: "+e),this.connected){let e=!1;this.disconnecting=!0,this.authenticated&&(e=y({xmlns:Be.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(e)}else Be.warn("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests(),this._doDisconnect()},_changeConnectStatus:function(e,t,o){for(const n in Be._connectionPlugins)if(Object.prototype.hasOwnProperty.call(Be._connectionPlugins,n)){const o=this[n];if(o.statusChanged)try{o.statusChanged(e,t)}catch(e){Be.error(`${n} plugin caused an exception changing status: ${e}`)}}if(this.connect_callback)try{this.connect_callback(e,t,o)}catch(t){Be._handleError(t),Be.error(`User connection callback caused an exception: ${t}`)}},_doDisconnect:function(e){"number"==typeof this._idleTimeout&&clearTimeout(this._idleTimeout),null!==this._disconnectTimeout&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),Be.debug("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(Be.Status.DISCONNECTED,e),this.connected=!1},_dataRecv:function(e,t){Be.debug("_dataRecv called");const o=this._proto._reqToData(e);if(null!==o){for(this.xmlInput!==Be.Connection.prototype.xmlInput&&(o.nodeName===this._proto.strip&&o.childNodes.length?this.xmlInput(o.childNodes[0]):this.xmlInput(o)),this.rawInput!==Be.Connection.prototype.rawInput&&(t?this.rawInput(t):this.rawInput(Be.serialize(o)));0<this.removeHandlers.length;){const e=this.removeHandlers.pop(),t=this.handlers.indexOf(e);0<=t&&this.handlers.splice(t,1)}for(;0<this.addHandlers.length;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())return void this._doDisconnect();const e=o.getAttribute("type");if(null!==e&&"terminate"===e){if(this.disconnecting)return;let e=o.getAttribute("condition");const t=o.getElementsByTagName("conflict");return null===e?this._changeConnectStatus(Be.Status.CONNFAIL,Be.ErrorCondition.UNKOWN_REASON):("remote-stream-error"===e&&0<t.length&&(e="conflict"),this._changeConnectStatus(Be.Status.CONNFAIL,e)),void this._doDisconnect(e)}Be.forEachChild(o,null,e=>{const t=this.handlers;this.handlers=[];for(let o=0;o<t.length;o++){const n=t[o];try{n.isMatch(e)&&(this.authenticated||!n.user)?n.run(e)&&this.handlers.push(n):this.handlers.push(n)}catch(t){Be.warn("Removing Strophe handlers due to uncaught exception: "+t.message)}}})}},mechanisms:{},_connect_cb:function(e,t,o){Be.debug("_connect_cb was called"),this.connected=!0;let n;try{n=this._proto._reqToData(e)}catch(t){if(t.name!==Be.ErrorCondition.BAD_FORMAT)throw t;this._changeConnectStatus(Be.Status.CONNFAIL,Be.ErrorCondition.BAD_FORMAT),this._doDisconnect(Be.ErrorCondition.BAD_FORMAT)}if(!n)return;this.xmlInput!==Be.Connection.prototype.xmlInput&&(n.nodeName===this._proto.strip&&n.childNodes.length?this.xmlInput(n.childNodes[0]):this.xmlInput(n)),this.rawInput!==Be.Connection.prototype.rawInput&&(o?this.rawInput(o):this.rawInput(Be.serialize(n)));const a=this._proto._connect_cb(n);if(a===Be.Status.CONNFAIL)return;let s;if(s=n.getElementsByTagNameNS?0<n.getElementsByTagNameNS(Be.NS.STREAM,"features").length:0<n.getElementsByTagName("stream:features").length||0<n.getElementsByTagName("features").length,!s)return void this._proto._no_auth_received(t);const r=[],l=n.getElementsByTagName("mechanism");if(0<l.length)for(let e=0;e<l.length;e++){const t=Be.getText(l[e]);this.mechanisms[t]&&r.push(this.mechanisms[t])}return 0===r.length&&0===n.getElementsByTagName("auth").length?void this._proto._no_auth_received(t):void(!1!==this.do_authentication&&this.authenticate(r))},sortMechanismsByPriority:function(e){for(let t=0,o;t<e.length-1;++t){o=t;for(let n=t+1;n<e.length;++n)e[n].prototype.priority>e[o].prototype.priority&&(o=n);if(o!==t){const n=e[t];e[t]=e[o],e[o]=n}}return e},authenticate:function(e){this._attemptSASLAuth(e)||this._attemptLegacyAuth()},_attemptSASLAuth:function(e){e=this.sortMechanismsByPriority(e||[]);let t=!1;for(let o=0;o<e.length;++o){if(!e[o].prototype.test(this))continue;this._sasl_success_handler=this._addSysHandler(this._sasl_success_cb.bind(this),null,"success",null,null),this._sasl_failure_handler=this._addSysHandler(this._sasl_failure_cb.bind(this),null,"failure",null,null),this._sasl_challenge_handler=this._addSysHandler(this._sasl_challenge_cb.bind(this),null,"challenge",null,null),this._sasl_mechanism=new e[o],this._sasl_mechanism.onStart(this);const n=b("auth",{xmlns:Be.NS.SASL,mechanism:this._sasl_mechanism.name});if(this._sasl_mechanism.isClientFirst){const e=this._sasl_mechanism.onChallenge(this,null);n.t(btoa(e))}this.send(n.tree()),t=!0;break}return t},_sasl_challenge_cb:function(e){const t=atob(Be.getText(e)),o=this._sasl_mechanism.onChallenge(this,t),n=b("response",{xmlns:Be.NS.SASL});return""!==o&&n.t(btoa(o)),this.send(n.tree()),!0},_attemptLegacyAuth:function(){null===Be.getNodeFromJid(this.jid)?(this._changeConnectStatus(Be.Status.CONNFAIL,Be.ErrorCondition.MISSING_JID_NODE),this.disconnect(Be.ErrorCondition.MISSING_JID_NODE)):(this._changeConnectStatus(Be.Status.AUTHENTICATING,null),this._addSysHandler(this._onLegacyAuthIQResult.bind(this),null,null,null,"_auth_1"),this.send(v({type:"get",to:this.domain,id:"_auth_1"}).c("query",{xmlns:Be.NS.AUTH}).c("username",{}).t(Be.getNodeFromJid(this.jid)).tree()))},_onLegacyAuthIQResult:function(){const e=v({type:"set",id:"_auth_2"}).c("query",{xmlns:Be.NS.AUTH}).c("username",{}).t(Be.getNodeFromJid(this.jid)).up().c("password").t(this.pass);return Be.getResourceFromJid(this.jid)||(this.jid=Be.getBareJidFromJid(this.jid)+"/strophe"),e.up().c("resource",{}).t(Be.getResourceFromJid(this.jid)),this._addSysHandler(this._auth2_cb.bind(this),null,null,null,"_auth_2"),this.send(e.tree()),!1},_sasl_success_cb:function(e){if(this._sasl_data["server-signature"]){let t;const o=atob(Be.getText(e)),n=o.match(/([a-z]+)=([^,]+)(,|$)/);if("v"===n[1]&&(t=n[2]),t!==this._sasl_data["server-signature"])return this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_data={},this._sasl_failure_cb(null)}Be.info("SASL authentication succeeded."),this._sasl_mechanism&&this._sasl_mechanism.onSuccess(),this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null);const t=[],o=(e,t)=>{for(;e.length;)this.deleteHandler(e.pop());return this._onStreamFeaturesAfterSASL(t),!1};return t.push(this._addSysHandler(e=>o(t,e),null,"stream:features",null,null)),t.push(this._addSysHandler(e=>o(t,e),Be.NS.STREAM,"features",null,null)),this._sendRestart(),!1},_onStreamFeaturesAfterSASL:function(e){this.features=e;for(let t=0;t<e.childNodes.length;t++){const o=e.childNodes[t];"bind"===o.nodeName&&(this.do_bind=!0),"session"===o.nodeName&&(this.do_session=!0)}return this.do_bind?(this.options.explicitResourceBinding?this._changeConnectStatus(Be.Status.BINDREQUIRED,null):this.bind(),!1):(this._changeConnectStatus(Be.Status.AUTHFAIL,null),!1)},bind:function(){if(!this.do_bind)return void Be.log(Be.LogLevel.INFO,`Strophe.Connection.prototype.bind called but "do_bind" is false`);this._addSysHandler(this._onResourceBindResultIQ.bind(this),null,null,null,"_bind_auth_2");const e=Be.getResourceFromJid(this.jid);e?this.send(v({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:Be.NS.BIND}).c("resource",{}).t(e).tree()):this.send(v({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:Be.NS.BIND}).tree())},_onResourceBindResultIQ:function(e){if("error"===e.getAttribute("type")){Be.warn("Resource binding failed.");const t=e.getElementsByTagName("conflict");let o;return 0<t.length&&(o=Be.ErrorCondition.CONFLICT),this._changeConnectStatus(Be.Status.AUTHFAIL,o,e),!1}const t=e.getElementsByTagName("bind");if(0<t.length){const e=t[0].getElementsByTagName("jid");0<e.length&&(this.jid=Be.getText(e[0]),this.do_session?this._establishSession():(this.authenticated=!0,this._changeConnectStatus(Be.Status.CONNECTED,null)))}else return Be.warn("Resource binding failed."),this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),!1},_establishSession:function(){if(!this.do_session)throw new Error(`Strophe.Connection.prototype._establishSession `+`called but apparently ${Be.NS.SESSION} wasn't advertised by the server`);this._addSysHandler(this._onSessionResultIQ.bind(this),null,null,null,"_session_auth_2"),this.send(v({type:"set",id:"_session_auth_2"}).c("session",{xmlns:Be.NS.SESSION}).tree())},_onSessionResultIQ:function(e){if("result"===e.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(Be.Status.CONNECTED,null);else if("error"===e.getAttribute("type"))return Be.warn("Session creation failed."),this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),!1;return!1},_sasl_failure_cb:function(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),!1},_auth2_cb:function(e){return"result"===e.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(Be.Status.CONNECTED,null)):"error"===e.getAttribute("type")&&(this._changeConnectStatus(Be.Status.AUTHFAIL,null,e),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(e,t){const o=new Be.TimedHandler(e,t);return o.user=!1,this.addTimeds.push(o),o},_addSysHandler:function(e,t,o,n,a){const s=new Be.Handler(e,t,o,n,a);return s.user=!1,this.addHandlers.push(s),s},_onDisconnectTimeout:function(){return Be.debug("_onDisconnectTimeout was called"),this._changeConnectStatus(Be.Status.CONNTIMEOUT,null),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){for(;0<this.addTimeds.length;)this.timedHandlers.push(this.addTimeds.pop());for(;0<this.removeTimeds.length;){const e=this.removeTimeds.pop(),t=this.timedHandlers.indexOf(e);0<=t&&this.timedHandlers.splice(t,1)}const e=new Date().getTime(),t=[];for(let o=0;o<this.timedHandlers.length;o++){const n=this.timedHandlers[o];if(this.authenticated||!n.user){const o=n.lastCalled+n.period;0>=o-e?n.run()&&t.push(n):t.push(n)}}this.timedHandlers=t,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(()=>this._onIdle(),100))}},Be.SASLMechanism=function(e,t,o){this.name=e,this.isClientFirst=t,this.priority=o},Be.SASLMechanism.prototype={test:function(){return!0},onStart:function(e){this._connection=e},onChallenge:function(){throw new Error("You should implement challenge handling!")},onFailure:function(){this._connection=null},onSuccess:function(){this._connection=null}},Be.SASLAnonymous=function(){},Be.SASLAnonymous.prototype=new Be.SASLMechanism("ANONYMOUS",!1,20),Be.SASLAnonymous.prototype.test=function(e){return null===e.authcid},Be.SASLPlain=function(){},Be.SASLPlain.prototype=new Be.SASLMechanism("PLAIN",!0,50),Be.SASLPlain.prototype.test=function(e){return null!==e.authcid},Be.SASLPlain.prototype.onChallenge=function(e){let t=e.authzid;return t+="\0",t+=e.authcid,t+="\0",t+=e.pass,qe.utf16to8(t)},Be.SASLSHA1=function(){},Be.SASLSHA1.prototype=new Be.SASLMechanism("SCRAM-SHA-1",!0,70),Be.SASLSHA1.prototype.test=function(e){return null!==e.authcid},Be.SASLSHA1.prototype.onChallenge=function(e,t,o){const n=o||Le.hexdigest(""+1234567890*Math.random());let a="n="+qe.utf16to8(e.authcid);return a+=",r=",a+=n,e._sasl_data.cnonce=n,e._sasl_data["client-first-message-bare"]=a,a="n,,"+a,this.onChallenge=(e,t)=>{let o="c=biws,",n=`${e._sasl_data["client-first-message-bare"]},${t},`,a,s,r,l,d,c,p,u;const m=e._sasl_data.cnonce,g=/([a-z]+)=([^,]+)(,|$)/;for(;t.match(g);){const e=t.match(g);switch(t=t.replace(e[0],""),e[1]){case"r":a=e[2];break;case"s":s=e[2];break;case"i":r=e[2];}}if(a.substr(0,m.length)!==m)return e._sasl_data={},e._sasl_failure_cb();o+="r="+a,n+=o,s=atob(s),s+="\0\0\0\x01";const h=qe.utf16to8(e.pass);for(l=c=Pe.core_hmac_sha1(h,s),p=1;p<r;p++){for(d=Pe.core_hmac_sha1(h,Pe.binb2str(c)),u=0;5>u;u++)l[u]^=d[u];c=d}l=Pe.binb2str(l);const _=Pe.core_hmac_sha1(l,"Client Key"),f=Pe.str_hmac_sha1(l,"Server Key"),b=Pe.core_hmac_sha1(Pe.str_sha1(Pe.binb2str(_)),n);for(e._sasl_data["server-signature"]=Pe.b64_hmac_sha1(f,n),u=0;5>u;u++)_[u]^=b[u];return o+=",p="+btoa(Pe.binb2str(_)),o},a},Be.SASLMD5=function(){},Be.SASLMD5.prototype=new Be.SASLMechanism("DIGEST-MD5",!1,60),Be.SASLMD5.prototype.test=function(e){return null!==e.authcid},Be.SASLMD5.prototype._quote=function(e){return"\""+e.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+"\""},Be.SASLMD5.prototype.onChallenge=function(e,t,o){const n=/([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/,a=o||Le.hexdigest(""+1234567890*Math.random());let s="",i=null,r="";for(;t.match(n);){const e=t.match(n);switch(t=t.replace(e[0],""),e[2]=e[2].replace(/^"(.+)"$/,"$1"),e[1]){case"realm":s=e[2];break;case"nonce":r=e[2];break;case"qop":e[2];break;case"host":i=e[2];}}let l=e.servtype+"/"+e.domain;null!==i&&(l=l+"/"+i);const d=qe.utf16to8(e.authcid+":"+s+":"+this._connection.pass),c=Le.hash(d)+":"+r+":"+a,p="AUTHENTICATE:"+l;let u="";return u+="charset=utf-8,",u+="username="+this._quote(qe.utf16to8(e.authcid))+",",u+="realm="+this._quote(s)+",",u+="nonce="+this._quote(r)+",",u+="nc=00000001,",u+="cnonce="+this._quote(a)+",",u+="digest-uri="+this._quote(l)+",",u+="response="+Le.hexdigest(Le.hexdigest(c)+":"+r+":00000001:"+a+":auth:"+Le.hexdigest(p))+",",u+="qop=auth",this.onChallenge=()=>"",u},Be.SASLOAuthBearer=function(){},Be.SASLOAuthBearer.prototype=new Be.SASLMechanism("OAUTHBEARER",!0,40),Be.SASLOAuthBearer.prototype.test=function(e){return null!==e.pass},Be.SASLOAuthBearer.prototype.onChallenge=function(e){let t="n,";return null!==e.authcid&&(t=t+"a="+e.authzid),t+=",",t+="\x01",t+="auth=Bearer ",t+=e.pass,t+="\x01",t+="\x01",qe.utf16to8(t)},Be.SASLExternal=function(){},Be.SASLExternal.prototype=new Be.SASLMechanism("EXTERNAL",!0,10),Be.SASLExternal.prototype.onChallenge=function(e){return e.authcid===e.authzid?"":e.authzid},Be.SASLXOAuth2=function(){},Be.SASLXOAuth2.prototype=new Be.SASLMechanism("X-OAUTH2",!0,30),Be.SASLXOAuth2.prototype.test=function(e){return null!==e.pass},Be.SASLXOAuth2.prototype.onChallenge=function(e){let t="\0";return null!==e.authcid&&(t+=e.authzid),t+="\0",t+=e.pass,qe.utf16to8(t)};var ze={Strophe:Be,$build:b,$iq:v,$msg:function(e){return new Be.Builder("message",e)},$pres:y,SHA1:Pe,MD5:Le,b64_hmac_sha1:Pe.b64_hmac_sha1,b64_sha1:Pe.b64_sha1,str_hmac_sha1:Pe.str_hmac_sha1,str_sha1:Pe.str_sha1};const Fe=ze.Strophe,He=ze.$build;Fe.Websocket=function(e){this._conn=e,this.strip="wrapper";const t=e.service;if(0!==t.indexOf("ws:")&&0!==t.indexOf("wss:")){let o="";o+="ws"===e.options.protocol&&"https:"!==window.location.protocol?"ws":"wss",o+="://"+window.location.host,o+=0===t.indexOf("/")?t:window.location.pathname+t,e.service=o}},Fe.Websocket.prototype={_buildStream:function(){return He("open",{xmlns:Fe.NS.FRAMING,to:this._conn.domain,version:"1.0"})},_check_streamerror:function(e,t){let o;if(o=e.getElementsByTagNameNS?e.getElementsByTagNameNS(Fe.NS.STREAM,"error"):e.getElementsByTagName("stream:error"),0===o.length)return!1;const n=o[0];let a="",s="";for(let o=0;o<n.childNodes.length;o++){const t=n.childNodes[o];if(t.getAttribute("xmlns")!=="urn:ietf:params:xml:ns:xmpp-streams")break;"text"===t.nodeName?s=t.textContent:a=t.nodeName}let i="WebSocket stream error: ";return i+=a?a:"unknown",s&&(i+=" - "+s),Fe.error(i),this._conn._changeConnectStatus(t,a),this._conn._doDisconnect(),!0},_reset:function(){},_connect:function(){this._closeSocket(),this.socket=new WebSocket(this._conn.service,"xmpp"),this.socket.onopen=this._onOpen.bind(this),this.socket.onerror=this._onError.bind(this),this.socket.onclose=this._onClose.bind(this),this.socket.onmessage=this._connect_cb_wrapper.bind(this)},_connect_cb:function(e){const t=this._check_streamerror(e,Fe.Status.CONNFAIL);if(t)return Fe.Status.CONNFAIL},_handleStreamStart:function(e){let t=!1;const o=e.getAttribute("xmlns");"string"==typeof o?o!==Fe.NS.FRAMING&&(t="Wrong xmlns in <open />: "+o):t="Missing xmlns in <open />";const n=e.getAttribute("version");return"string"==typeof n?"1.0"!=n&&(t="Wrong version in <open />: "+n):t="Missing version in <open />",!t||(this._conn._changeConnectStatus(Fe.Status.CONNFAIL,t),this._conn._doDisconnect(),!1)},_connect_cb_wrapper:function(e){if(0===e.data.indexOf("<open ")||0===e.data.indexOf("<?xml")){const t=e.data.replace(/^(<\?.*?\?>\s*)*/,"");if(""===t)return;const o=new DOMParser().parseFromString(t,"text/xml").documentElement;this._conn.xmlInput(o),this._conn.rawInput(e.data),this._handleStreamStart(o)&&this._connect_cb(o)}else if(0===e.data.indexOf("<close ")){const t=new DOMParser().parseFromString(e.data,"text/xml").documentElement;this._conn.xmlInput(t),this._conn.rawInput(e.data);const o=t.getAttribute("see-other-uri");if(o){const e=this._conn.service,t=0<=e.indexOf("wss:")&&0<=o.indexOf("wss:")||0<=e.indexOf("ws:");t&&(this._conn._changeConnectStatus(Fe.Status.REDIRECT,"Received see-other-uri, resetting connection"),this._conn.reset(),this._conn.service=o,this._connect())}else this._conn._changeConnectStatus(Fe.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect()}else{const t=this._streamWrap(e.data),o=new DOMParser().parseFromString(t,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(o,null,e.data)}},_disconnect:function(e){if(this.socket&&this.socket.readyState!==WebSocket.CLOSED){e&&this._conn.send(e);const t=He("close",{xmlns:Fe.NS.FRAMING});this._conn.xmlOutput(t.tree());const o=Fe.serialize(t);this._conn.rawOutput(o);try{this.socket.send(o)}catch(t){Fe.warn("Couldn't send <close /> tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){Fe.debug("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(e){return"<wrapper>"+e+"</wrapper>"},_closeSocket:function(){if(this.socket)try{this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close()}catch(t){Fe.debug(t.message)}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(t){this._conn.connected&&!this._conn.disconnecting?(Fe.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):t&&1006===t.code&&!this._conn.connected&&this.socket?(Fe.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(Fe.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):Fe.debug("Websocket closed")},_no_auth_received:function(e){Fe.error("Server did not offer a supported authentication mechanism"),this._conn._changeConnectStatus(Fe.Status.CONNFAIL,Fe.ErrorCondition.NO_AUTH_MECH),e&&e.call(this._conn),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_abortAllRequests:function(){},_onError:function(e){Fe.error("Websocket error "+e),this._conn._changeConnectStatus(Fe.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._disconnect()},_onIdle:function(){const e=this._conn._data;if(0<e.length&&!this._conn.paused){for(let t=0;t<e.length;t++)if(null!==e[t]){let o="restart"===e[t]?this._buildStream().tree():e[t];const n=Fe.serialize(o);this._conn.xmlOutput(o),this._conn.rawOutput(n),this.socket.send(n)}this._conn._data=[]}},_onMessage:function(e){let t;if("<close xmlns=\"urn:ietf:params:xml:ns:xmpp-framing\" />"===e.data)return this._conn.rawInput("<close xmlns=\"urn:ietf:params:xml:ns:xmpp-framing\" />"),this._conn.xmlInput(e),void(this._conn.disconnecting||this._conn._doDisconnect());if(0!==e.data.search("<open ")){const o=this._streamWrap(e.data);t=new DOMParser().parseFromString(o,"text/xml").documentElement}else if(t=new DOMParser().parseFromString(e.data,"text/xml").documentElement,!this._handleStreamStart(t))return;return this._check_streamerror(t,Fe.Status.ERROR)?void 0:this._conn.disconnecting&&"presence"===t.firstChild.nodeName&&"unavailable"===t.firstChild.getAttribute("type")?(this._conn.xmlInput(t),void this._conn.rawInput(Fe.serialize(t))):void this._conn._dataRecv(t,e.data)},_onOpen:function(){Fe.debug("Websocket open");const e=this._buildStream();this._conn.xmlOutput(e.tree());const t=Fe.serialize(e);this._conn.rawOutput(t),this.socket.send(t)},_reqToData:function(e){return e},_send:function(){this._conn.flush()},_sendRestart:function(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}};var Ue=o(329),Ve=o(10),We=o.n(Ve),Ge=o(17),Je=function(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})},$e=function(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(s){if("TypeError"!==s.name)throw s;for(var o="undefined"==typeof BlobBuilder?"undefined"==typeof MSBlobBuilder?"undefined"==typeof MozBlobBuilder?WebKitBlobBuilder:MozBlobBuilder:MSBlobBuilder:BlobBuilder,n=new o,a=0;a<e.length;a+=1)n.append(e[a]);return n.getBlob(t.type)}},Qe=/^~~local_forage_type~([^~]+)~/,Ye="__lfsc__:".length,Xe=Ye+"arbf".length,Ke=Object.prototype.toString,Ze={serialize:function(t,o){var n="";if(t&&(n=Ke.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===Ke.call(t.buffer))){var a="__lfsc__:",s;t instanceof ArrayBuffer?(s=t,a+="arbf"):(s=t.buffer,"[object Int8Array]"===n?a+="si08":"[object Uint8Array]"===n?a+="ui08":"[object Uint8ClampedArray]"===n?a+="uic8":"[object Int16Array]"===n?a+="si16":"[object Uint16Array]"===n?a+="ur16":"[object Int32Array]"===n?a+="si32":"[object Uint32Array]"===n?a+="ui32":"[object Float32Array]"===n?a+="fl32":"[object Float64Array]"===n?a+="fl64":o(new Error("Failed to get type for BinaryArray"))),o(a+k(s))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var e="~~local_forage_type~"+t.type+"~"+k(this.result);o("__lfsc__:blob"+e)},i.readAsArrayBuffer(t)}else try{o(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),o(null,n)}},deserialize:function(e){if(e.substring(0,Ye)!=="__lfsc__:")return JSON.parse(e);var t=e.substring(Xe),o=e.substring(Ye,Xe),n;if(o==="blob"&&Qe.test(t)){var a=t.match(Qe);n=a[1],t=t.substring(a[0].length)}var s=w(t);switch(o){case"arbf":return s;case"blob":return $e([s],{type:n});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+o);}},stringToBuffer:w,bufferToString:k};const et=Ze.serialize,tt=Ze.deserialize,ot={serializer:{serialize:et,deserialize:tt}},nt={_driver:"sessionStorageWrapper",_initStorage:function(e){if(ot.keyPrefix=C(e,this._defaultConfig),e)for(var t in e)ot[t]=e[t]},_support:E(),iterate:function(e,t){var o=this,n=o.ready().then(function(){for(var t=ot.keyPrefix,o=t.length,n=sessionStorage.length,a=1,s=0,r;s<n;s++)if(r=sessionStorage.key(s),0===r.indexOf(t)){var l=sessionStorage.getItem(r);if(l&&(l=ot.serializer.deserialize(l)),l=e(l,r.substring(o),a++),void 0!==l)return l}});return Je(n,t),n},getItem:function(e,t){e=S(e);const o=this.ready().then(function(){let t=sessionStorage.getItem(ot.keyPrefix+e);return t&&(t=ot.serializer.deserialize(t)),t});return Je(o,t),o},setItem:function(e,t,o){e=S(e);const n=this.ready().then(function(){void 0===t&&(t=null);var o=t;return new Promise(function(n,a){ot.serializer.serialize(t,function(t,s){if(s)a(s);else try{sessionStorage.setItem(ot.keyPrefix+e,t),n(o)}catch(t){("QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&a(t),a(t)}})})});return Je(n,o),n},removeItem:function(e,t){e=S(e);const o=this.ready().then(function(){sessionStorage.removeItem(ot.keyPrefix+e)});return Je(o,t),o},clear:function(e){var t=this.ready().then(function(){const e=ot.keyPrefix;for(let t=sessionStorage.length-1;0<=t;t--){const o=sessionStorage.key(t);0===o.indexOf(e)&&sessionStorage.removeItem(o)}});return Je(t,e),t},length:function(e){var t=this,o=t.keys().then(function(e){return e.length});return Je(o,e),o},key:function(e,t){var o=this,n=o.ready().then(function(){var t;try{t=sessionStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(ot.keyPrefix.length)),t});return Je(n,t),n},keys:function(e){var t=this,o=t.ready().then(function(){for(var e=sessionStorage.length,t=[],o=0,n;o<e;o++)n=sessionStorage.key(o),0===n.indexOf(ot.keyPrefix)&&t.push(n.substring(ot.keyPrefix.length));return t});return Je(o,e),o},dropInstance:function(e,t){if(t=x.apply(this,arguments),e="function"!=typeof e&&e||{},!e.name){var o=this.config();e.name=e.name||o.name,e.storeName=e.storeName||o.storeName}var n=this,a;return a=e.name?new Promise(function(t){e.storeName?t(C(e,n._defaultConfig)):t(`${e.name}/`)}).then(function(e){for(var t=sessionStorage.length-1,o;0<=t;t--)o=sessionStorage.key(t),0===o.indexOf(e)&&sessionStorage.removeItem(o)}):Promise.reject(new Error("Invalid arguments")),Je(a,t),a}};var at=nt;class st{constructor(e,t){if("local"===t&&!window.localStorage)throw new Error("Backbone.browserStorage: Environment does not support localStorage.");else if("session"===t&&!window.sessionStorage)throw new Error("Backbone.browserStorage: Environment does not support sessionStorage.");Object(ke.isString)(t)?this.storeInitialized=this.initStore(t):(this.store=t,this.storeInitialized=Promise.resolve()),this.name=e}async initStore(e){if("session"===e)Ge.setDriver(at._driver);else if("local"===e)await Ge.config({driver:Ge.LOCALSTORAGE});else if("indexed"!==e)throw new Error("Backbone.browserStorage: No storage type was specified");this.store=Ge}async clear(){await this.store.removeItem(this.name).catch(t=>console.error(t));const e=new RegExp(`^${this.name}-`),t=await this.store.keys(),o=t.filter(t=>e.test(t));await Promise.all(o.map(e=>this.store.removeItem(e).catch(t=>console.error(t))))}sync(){async function e(e,o,n){let a,s,i,r;const l=o.collection;["patch","update"].includes(e)&&(r=Object(ke.cloneDeep)(o.attributes)),await t.storeInitialized;try{const s=o.attributes;"read"===e?a=void 0===o.id?await t.findAll():await t.find(o):"create"===e?a=await t.create(o,n):"patch"===e||"update"===e?(n.wait&&(o.attributes=r),i=t.update(o,n),n.wait&&(o.attributes=s),a=await i):"delete"===e?a=await t.destroy(o,l):void 0}catch(e){s=22===e.code&&0===t.getStorageSize()?"Private browsing is unsupported":e.message}if(!a)s=s?s:"Record Not Found",n&&n.error&&n.error(s);else if(n&&n.success){const t="read"===e?a:null;n.success(t,n)}}const t=this;return e.__name__="localSync",e}removeCollectionReference(e,t){if(t){const o=t.filter(t=>t.id!==e.id).map(e=>this.getItemName(e.id));return this.store.setItem(this.name,o)}}addCollectionReference(e,t){if(!t)return;const o=t.map(e=>this.getItemName(e.id)),n=this.getItemName(e.id);return o.includes(n)||o.push(n),this.store.setItem(this.name,o)}async save(e,t={}){const o=this.getItemName(e.id),n=await this.store.setItem(o,e.toJSON());return await this.addCollectionReference(e,e.collection),n}create(e,t){return e.id||(e.id=a(),e.set(e.idAttribute,e.id,t)),this.save(e)}update(e,t){return this.save(e,t)}find(e){return this.store.getItem(this.getItemName(e.id))}async findAll(){const e=await this.store.getItem(this.name);return e&&e.length?Promise.all(e.map(e=>this.store.getItem(e))):[]}async destroy(e,t){return await this.store.removeItem(this.getItemName(e.id)),await this.removeCollectionReference(e,t),e}getStorageSize(){return this.store.length}getItemName(e){return this.name+"-"+e}}st.sessionStorageInitialized=Ge.defineDriver(at),st.localForage=Ge,st.patch=function(e){e.BrowserStorage=st,e.ajaxSync=e.sync,e.getSyncMethod=function(t){const o=Object(ke.result)(t,"browserStorage")||Object(ke.result)(t.collection,"browserStorage");return o?o.sync():e.ajaxSync},e.sync=function(t,o,n){return e.getSyncMethod(o).apply(this,[t,o,n])}};var it=st,rt=o(2),lt=o.n(rt),dt=o(114),ct=o.n(dt),pt=o(7),ut=o.n(pt),mt=o(45),gt=o.n(mt);let ht;var _t={getLocale(e,t){return c(e,e=>d(e,t))},translate(e){if(!ht)return gt.a.sprintf.apply(gt.a,arguments);const o=ht.translate(e);return 1<arguments.length?o.fetch.apply(o,[].slice.call(arguments,1)):o.fetch()},async fetchTranslations(e){const t=e.locale;if(d(t,e.locales)&&"en"!==t){const{default:n}=await o(331)("./".concat(t,"/LC_MESSAGES/converse.po"));await o(332)("./".concat(t.toLowerCase().replace("_","-"))),ut.a.locale(c(e.locale,e=>ut.a.locale(e))),ht=new gt.a(n)}}};const ft={debug:0,info:1,warn:2,error:3,fatal:4},bt=Object.assign({debug:Object(ke.get)(console,"log")?console.log.bind(console):function(){},error:Object(ke.get)(console,"log")?console.log.bind(console):function(){},info:Object(ke.get)(console,"log")?console.log.bind(console):function(){},warn:Object(ke.get)(console,"log")?console.log.bind(console):function(){}},console);var vt={setLogLevel(e){if(!["debug","info","warn","error","fatal"].includes(e))throw new Error("Invalid loglevel: ".concat(e));this.loglevel=e},log(e,t){let o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"";if(!(ft[t]<ft[this.loglevel])){"error"===t||"fatal"===t?o=o||"color: maroon":"debug"===t&&(o=o||"color: green"),e instanceof Error?e=e.stack:Object(ke.isElement)(e)&&(e=e.outerHTML);const n=o?"%c":"";"error"===t?bt.error("".concat(n," ERROR: ").concat(e),o):"warn"===t?bt.warn("".concat(n," ").concat(new Date().toISOString()," WARNING: ").concat(e),o):"fatal"===t?bt.error("".concat(n," FATAL: ").concat(e),o):"debug"===t?bt.debug("".concat(n," ").concat(new Date().toISOString()," DEBUG: ").concat(e),o):bt.info("".concat(n," ").concat(new Date().toISOString()," INFO: ").concat(e),o)}},debug(e,t){this.log(e,"debug",t)},error(e,t){this.log(e,"error",t)},info(e,t){this.log(e,"info",t)},warn(e,t){this.log(e,"warn",t)},fatal(e,t){this.log(e,"fatal",t)}},yt=o(115),xt=o.n(yt),St=o(25),wt=o.n(St),kt=o(26),Et=o.n(kt),Ct=o(21),At=o.n(Ct),Tt=o(116),jt=o.n(Tt),Nt=o(40),Mt=o.n(Nt),It=o(117),Ot=o.n(It),Rt=o(19),Dt=o.n(Rt),Lt=o(60),Pt=o.n(Lt),qt=o(118),Bt=o.n(qt),zt=o(119),Ft=o.n(zt),Ht=o(59),Ut=o.n(Ht);Et()(j.prototype,{wrappedOverride:function(e,t,o,n){return"function"==typeof o&&("undefined"==typeof this.__super__&&(this.__super__=n),this.__super__[e]=o.bind(this)),t.apply(this,xt()(arguments,4))},_overrideAttribute:function(e,t){let o=t.overrides[e];if("function"==typeof o){let t={};t[this.name]=this.plugged;let n=Pt()(this.wrappedOverride,e,o,this.plugged[e],t);this.plugged[e]=n}else this.plugged[e]=o},_extendObject:function(e,t){e.prototype.__super__||(e.prototype.__super__={},e.prototype.__super__[this.name]=this.plugged);let o=this;wt()(t,function(t,n){if("events"===n)e.prototype[n]=Et()(t,e.prototype[n]);else if("function"==typeof t){let a={};a[o.name]=o.plugged;let s=Pt()(o.wrappedOverride,n,t,e.prototype[n],a);e.prototype[n]=s}else e.prototype[n]=t})},loadPluginDependencies:function(e){wt()(e.dependencies,t=>{let o=this.plugins[t];if(o){if(At()(o.dependencies,e.__name__))throw"Found a circular dependency between the plugins \""+e.__name__+"\" and \""+t+"\"";this.initializePlugin(o)}else this.throwUndefinedDependencyError("Could not find dependency \""+t+"\" for the plugin \""+e.__name__+"\". If it's needed, make sure it's loaded by require.js")})},throwUndefinedDependencyError:function(e){if(this.plugged.strict_plugin_dependencies)throw e;else console.warn?console.warn(e):console.log(e)},applyOverrides:function(e){wt()(Object.keys(e.overrides||{}),t=>{let o=e.overrides[t];"object"==typeof o?"undefined"==typeof this.plugged[t]?this.throwUndefinedDependencyError(`Plugin "${e.__name__}" tried to override "${t}" but it's not found.`):this._extendObject(this.plugged[t],o):this._overrideAttribute(t,e)})},initializePlugin:function(e){!At()(Dt()(this.allowed_plugins),e.__name__)||At()(this.initialized_plugins,e.__name__)||(jt()(e.enabled)&&e.enabled||Mt()(e.enabled)&&e.enabled(this.plugged)||Ot()(e.enabled))&&(Et()(e,this.properties),e.dependencies&&this.loadPluginDependencies(e),this.applyOverrides(e),"function"==typeof e.initialize&&e.initialize.bind(e)(this),this.initialized_plugins.push(e.__name__))},registerPlugin:function(e,t){if(e in this.plugins)throw new Error("Error: Plugin name "+e+" is already taken");t.__name__=e,this.plugins[e]=t},initializePlugins:function(e={},t=[],o=[]){Ft()(this.plugins)&&(this.properties=e,this.allowed_plugins=Bt()(this.plugins,function(e,n){return(!t.length||t.length&&At()(t,n))&&!At()(o,n)}),wt()(Ut()(this.allowed_plugins),this.initializePlugin.bind(this)))}});var Vt=o(3),Wt=o.n(Vt);const Gt=ze.Strophe,Jt={};Jt.isTagEqual=function(e,t){if(e.nodeTree)return Jt.isTagEqual(e.nodeTree,t);if(!(e instanceof Element))throw Error("isTagEqual called with value which isn't an element or Strophe.Builder instance");else return Gt.isTagEqual(e,t)};const u=new DOMParser,$t=u.parseFromString("invalid","text/xml").getElementsByTagName("parsererror")[0].namespaceURI;Jt.toStanza=function(e){const t=u.parseFromString(e,"text/xml");if(t.getElementsByTagNameNS($t,"parsererror").length)throw new Error("Parser Error: ".concat(e));return t.firstElementChild},Jt.isMAMMessage=function(e){return 0<Wt()("message > result[xmlns=\"".concat(Gt.NS.MAM,"\"]"),e).length},Jt.isCarbonMessage=function(e){const t=Gt.NS.CARBONS;return 0<Wt()("message > received[xmlns=\"".concat(t,"\"]"),e).length||0<Wt()("message > sent[xmlns=\"".concat(t,"\"]"),e).length},Jt.getLongestSubstring=function(e,t){return t.reduce(function(t,o){return e.startsWith(o)?o.length>t.length?o:t:t},"")},Jt.prefixMentions=function(e){let t=e.get("message");return(e.get("references")||[]).sort((e,t)=>t.begin-e.begin).forEach(e=>{t="".concat(t.slice(0,e.begin),"@").concat(t.slice(e.begin))}),t},Jt.isValidJID=function(e){return!!lt.a.isString(e)&&2===lt.a.compact(e.split("@")).length&&!e.startsWith("@")&&!e.endsWith("@")},Jt.isValidMUCJID=function(e){return!e.startsWith("@")&&!e.endsWith("@")},Jt.isSameBareJID=function(e,t){return!!(lt.a.isString(e)&&lt.a.isString(t))&&Gt.getBareJidFromJid(e).toLowerCase()===Gt.getBareJidFromJid(t).toLowerCase()},Jt.isSameDomain=function(e,t){return!!(lt.a.isString(e)&&lt.a.isString(t))&&Gt.getDomainFromJid(e).toLowerCase()===Gt.getDomainFromJid(t).toLowerCase()},Jt.isNewMessage=function(e){return e instanceof Element?!(Wt()("result[xmlns=\"".concat(Gt.NS.MAM,"\"]"),e).length&&Wt()("delay[xmlns=\"".concat(Gt.NS.DELAY,"\"]"),e).length):(e instanceof We.a.Model&&(e=e.attributes),!(e.is_delayed&&e.is_archived))},Jt.isEmptyMessage=function(e){return e instanceof We.a.Model&&(e=e.attributes),!e.oob_url&&!e.file&&!(e.is_encrypted&&e.plaintext)&&!e.message},Jt.isOnlyChatStateNotification=function(e){return e instanceof Element?null===e.querySelector("body")&&(null!==e.querySelector("active")||null!==e.querySelector("composing")||null!==e.querySelector("inactive")||null!==e.querySelector("paused")||null!==e.querySelector("gone")):(e instanceof We.a.Model&&(e=e.attributes),e.chat_state&&Jt.isEmptyMessage(e))},Jt.isOnlyMessageDeliveryReceipt=function(e){return e instanceof Element?null===e.querySelector("body")&&null!==e.querySelector("received"):(e instanceof We.a.Model&&(e=e.attributes),e.received&&Jt.isEmptyMessage(e))},Jt.isChatRoom=function(e){return e&&"chatroom"===e.get("type")},Jt.isHeadlineMessage=function(e,t){const o=t.getAttribute("from");if("headline"===t.getAttribute("type"))return!0;const n=e.chatboxes.get(Gt.getBareJidFromJid(o));return!Jt.isChatRoom(n)&&!("error"===t.getAttribute("type")||!o||lt.a.includes(o,"@"))},Jt.isErrorObject=function(e){return e instanceof Error},Jt.isErrorStanza=function(e){return!!lt.a.isElement(e)&&"error"===e.getAttribute("type")},Jt.isForbiddenError=function(e){return!!lt.a.isElement(e)&&0<Wt()("error[type=\"auth\"] forbidden[xmlns=\"".concat(Gt.NS.STANZAS,"\"]"),e).length},Jt.isServiceUnavailableError=function(e){return!!lt.a.isElement(e)&&0<Wt()("error[type=\"cancel\"] service-unavailable[xmlns=\"".concat(Gt.NS.STANZAS,"\"]"),e).length},Jt.merge=function e(t,o){for(var n in o)lt.a.isObject(t[n])?e(t[n],o[n]):t[n]=o[n]},Jt.applyUserSettings=function e(t,o,n){for(var a in o)void 0!==n[a]&&(lt.a.isObject(o[a])&&!Array.isArray(o[a])?e(t[a],o[a],n[a]):t[a]=n[a])},Jt.stringToNode=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild},Jt.getOuterWidth=function(e){let t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],o=e.offsetWidth;if(!t)return o;const n=window.getComputedStyle(e);return o+=parseInt(n.marginLeft?n.marginLeft:0,10)+parseInt(n.marginRight?n.marginRight:0,10),o},Jt.stringToElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild},Jt.matchesSelector=function(e,t){const o=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return!!o&&o.call(e,t)},Jt.queryChildren=function(e,t){return Array.from(e.childNodes).filter(e=>Jt.matchesSelector(e,t))},Jt.contains=function(e,t){return function(o){if("object"==typeof e){var n=!1;return lt.a.forEach(e,function(e){n=n||lt.a.includes(o.get(e).toLowerCase(),t.toLowerCase())}),n}if("string"==typeof e)return lt.a.includes(o.get(e).toLowerCase(),t.toLowerCase());throw new TypeError("contains: wrong attribute type. Must be string or array.")}},Jt.isOfType=function(e,t){return t.get("type")==e},Jt.isInstance=function(e,t){return t instanceof e},Jt.getAttribute=function(e,t){return t.get(e)},Jt.contains.not=function(e,t){return function(o){return!Jt.contains(e,t)(o)}},Jt.rootContains=function(e,t){return e!==document||e.contains?e.contains?e.contains(t):window.HTMLElement.prototype.contains.call(e,t):document.head.contains(t)||document.body.contains(t)},Jt.createFragmentFromText=function(e){var t=document.createDocumentFragment(),o=document.createElement("body"),n;for(o.innerHTML=e;n=o.firstChild;)t.appendChild(n);return t},Jt.isPersistableModel=function(e){return e.collection&&e.collection.browserStorage},Jt.getResolveablePromise=function(){const e={isResolved:!1,isPending:!0,isRejected:!1},t=new Promise((t,o)=>{e.resolve=t,e.reject=o});return lt.a.assign(t,e),t.then(function(e){return t.isResolved=!0,t.isPending=!1,t.isRejected=!1,e},function(o){throw t.isResolved=!1,t.isPending=!1,t.isRejected=!0,o}),t},Jt.interpolate=function(e,t){return e.replace(/{{{([^{}]*)}}}/g,(e,o)=>{var n=t[o];return"string"==typeof n||"number"==typeof n?n:e})},Jt.onMultipleEvents=function(){function t(e){a.push(e),o.length===a.length&&(n(a),a=[])}let o=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],n=1<arguments.length?arguments[1]:void 0,a=[];o.forEach(o=>o.object.on(o.event,t))},Jt.safeSave=function(e,t,o){Jt.isPersistableModel(e)?e.save(t,o):e.set(t,o)},Jt.siblingIndex=function(e){for(var t=0;e=e.previousElementSibling;t++);return t},Jt.getCurrentWord=function(e,t,o){t||(t=e.selectionEnd||void 0);let[n]=e.value.slice(0,t).split(" ").slice(-1);return o&&([n]=n.split(o).slice(-1)),n},Jt.replaceCurrentWord=function(e,t){const o=e.selectionEnd||void 0,n=lt.a.last(e.value.slice(0,o).split(" ")),a=e.value;e.value=a.slice(0,o-n.length)+"".concat(t," ")+a.slice(o),e.selectionEnd=o-n.length+t.length+1},Jt.triggerEvent=function(e,t){let o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"Event",n=!(3<arguments.length&&arguments[3]!==void 0)||arguments[3],a=!(4<arguments.length&&arguments[4]!==void 0)||arguments[4];const s=document.createEvent(o);s.initEvent(t,n,a),e.dispatchEvent(s)},Jt.geoUriToHttp=function(e,t){return e.replace(/geo:([\-0-9.]+),([\-0-9.]+)(?:,([\-0-9.]+))?(?:\?(.*))?/g,t)},Jt.httpToGeoUri=function(e,t){return e.replace(t.geouri_regex,"geo:$1,$2")},Jt.getSelectValues=function(e){const t=[],o=e&&e.options;for(var n=0,a=o.length;n<a;n++){const e=o[n];e.selected&&t.push(e.value||e.text)}return t},Jt.formatFingerprint=function(e){e=e.replace(/^05/,"");for(let t=1;8>t;t++){const o=8*t+t-1;e=e.slice(0,o)+" "+e.slice(o)}return e},Jt.appendArrayBuffer=function(e,t){const o=new Uint8Array(e.byteLength+t.byteLength);return o.set(new Uint8Array(e),0),o.set(new Uint8Array(t),e.byteLength),o.buffer},Jt.arrayBufferToHex=function(e){return Array.prototype.map.call(new Uint8Array(e),e=>("00"+e.toString(16)).slice(-2)).join("")},Jt.arrayBufferToString=function(e){return new TextDecoder("utf-8").decode(e)},Jt.stringToArrayBuffer=function(e){const t=new TextEncoder("utf-8").encode(e);return t.buffer},Jt.arrayBufferToBase64=function(e){return btoa(new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),""))},Jt.base64ToArrayBuffer=function(e){const t=window.atob(e),o=t.length,n=new Uint8Array(o);for(let a=0;a<o;a++)n[a]=t.charCodeAt(a);return n.buffer},Jt.getRandomInt=function(e){return Math.floor(Math.random()*Math.floor(e))},Jt.placeCaretAtEnd=function(e){e!==document.activeElement&&e.focus();const t=2*e.value.length;setTimeout(()=>e.setSelectionRange(t,t),1),this.scrollTop=999999},Jt.getUniqueId=function(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=0|16*Math.random(),o="x"===e?t:8|3&t;return o.toString(16)});return"string"==typeof e||"number"==typeof e?"id"+t+":"+e:"id"+t},Jt.waitUntil=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:300,o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:3;try{const t=e();if(t)return Promise.resolve(t)}catch(t){return Promise.reject(t)}const n=Jt.getResolveablePromise(),a=setInterval(function(){try{const t=e();t&&(N(s,a),n.resolve(t))}catch(t){N(s,a),n.reject(t)}},o),s=setTimeout(()=>{N(s,a);vt.error("Wait until promise timed out"),n.reject(new Error("Wait until promise timed out"))},t);return n};var Qt=Jt;const Yt=ze.Strophe,Xt={isReceipt(e){return 0<Wt()("received[xmlns=\"".concat(Yt.NS.RECEIPTS,"\"]"),e).length},isChatMarker(e){return 0<Wt()("received[xmlns=\"".concat(Yt.NS.MARKERS,"\"],\n             displayed[xmlns=\"").concat(Yt.NS.MARKERS,"\"],\n             acknowledged[xmlns=\"").concat(Yt.NS.MARKERS,"\"]"),e).length},isArchived(e){return!!Wt()("result[xmlns=\"".concat(Yt.NS.MAM,"\"]"),e).pop()},getStanzaIDs(e,t){const o={},n=Wt()("stanza-id[xmlns=\"".concat(Yt.NS.SID,"\"]"),e);n.length&&n.forEach(e=>o["stanza_id ".concat(e.getAttribute("by"))]=e.getAttribute("id"));const a=Wt()("message > result[xmlns=\"".concat(Yt.NS.MAM,"\"]"),t).pop();if(a){const e=t.getAttribute("from");o["stanza_id ".concat(e)]=a.getAttribute("id")}const s=Wt()("origin-id[xmlns=\"".concat(Yt.NS.SID,"\"]"),e).pop();return s&&(o.origin_id=s.getAttribute("id")),o.id=o.origin_id||o["stanza_id ".concat(o.from)]||Qt.getUniqueId(),o},getModerationAttributes(e,t,o){const n=Wt()("apply-to[xmlns=\"".concat(Yt.NS.FASTEN,"\"]"),e).pop();if(n){const a=n.getAttribute("id"),s=Wt()("moderated[xmlns=\"".concat(Yt.NS.MODERATE,"\"]"),n).pop();if(s){const n=Wt()("retract[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),s).pop();if(n){const n=e.getAttribute("from");return n===o.get("jid")?{edtiable:!1,moderated:"retracted",moderated_by:s.getAttribute("by"),moderated_id:a,moderation_reason:Object(ke.get)(s.querySelector("reason"),"textContent")}:(vt.warn("getModerationAttributes: ignore moderation stanza that's not from the MUC!"),vt.error(t),{})}}}else{const t=Wt()("> moderated[xmlns=\"".concat(Yt.NS.MODERATE,"\"]"),e).pop();if(t){const e=Wt()("retracted[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),t).pop();if(e)return{edtiable:!1,is_tombstone:!0,moderated_by:t.getAttribute("by"),retracted:t.getAttribute("stamp"),moderation_reason:Object(ke.get)(t.querySelector("reason"),"textContent")}}}return{}},getRetractionAttributes(e,t){const o=Wt()("> apply-to[xmlns=\"".concat(Yt.NS.FASTEN,"\"]"),e).pop();if(o){const e=o.getAttribute("id"),n=Wt()("> retract[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),o).pop();if(n){const o=Wt()("delay[xmlns=\"".concat(Yt.NS.DELAY,"\"]"),t).pop(),n=o?ut()(o.getAttribute("stamp")).toISOString():new Date().toISOString();return{editable:!1,retracted:n,retracted_id:e}}}else{const t=Wt()("> retracted[xmlns=\"".concat(Yt.NS.RETRACT,"\"]"),e).pop();if(t)return{editable:!1,is_tombstone:!0,retracted:t.getAttribute("stamp")}}return{}},getReferences(e){const t=Object(ke.propertyOf)(e.querySelector("body"))("textContent");return Wt()("reference[xmlns=\"".concat(Yt.NS.REFERENCE,"\"]"),e).map(e=>{const o=e.getAttribute("begin"),n=e.getAttribute("end");return{begin:o,end:n,type:e.getAttribute("type"),value:t.slice(o,n),uri:e.getAttribute("uri")}})},getSenderAttributes(e,t,o){if(Qt.isChatRoom(t)){const o=e.getAttribute("from"),n=Yt.unescapeNode(Yt.getResourceFromJid(o));return{from:o,nick:n,sender:n===t.get("nick")?"me":"them",received:new Date().toISOString()}}else{const n=Yt.getBareJidFromJid(e.getAttribute("from"));return n===o.bare_jid?{from:n,sender:"me",fullname:o.xmppstatus.get("fullname")}:{from:n,sender:"them",fullname:t.get("fullname")}}},getSpoilerAttributes(e){const t=Wt()("spoiler[xmlns=\"".concat(Yt.NS.SPOILER,"\"]"),e).pop();return{is_spoiler:!!t,spoiler_hint:Object(ke.get)(t,"textContent")}},getReactionAttributes(e){const t=Wt()("reactions[xmlns=\"".concat(Yt.NS.REACTION,"\"]"),e).pop();return t?{reaction_id:t.getAttribute("id"),reaction_emoji:Object(ke.get)(t.querySelector("reaction"),"textContent")}:{}},getOutOfBandAttributes(e){const t=Wt()("x[xmlns=\"".concat(Yt.NS.OUTOFBAND,"\"]"),e).pop();return t?{oob_url:Object(ke.get)(t.querySelector("url"),"textContent"),oob_desc:Object(ke.get)(t.querySelector("desc"),"textContent")}:{}},getCorrectionAttributes(e,t){const o=Wt()("replace[xmlns=\"".concat(Yt.NS.MESSAGE_CORRECT,"\"]"),e).pop();if(o){const e=o.getAttribute("id");if(e){const o=Wt()("delay[xmlns=\"".concat(Yt.NS.DELAY,"\"]"),t).pop(),n=o?ut()(o.getAttribute("stamp")).toISOString():new Date().toISOString();return{msgid:e,replaced_id:e,edited:n}}}return{}},getErrorMessage(e,t,o){const{__:n}=o;if(t){if(Wt()("forbidden[xmlns=\"".concat(Yt.NS.STANZAS,"\"]"),e).length)return n("Your message was not delivered because you're not allowed to send messages in this groupchat.");if(Wt()("not-acceptable[xmlns=\"".concat(Yt.NS.STANZAS,"\"]"),e).length)return n("Your message was not delivered because you're not present in the groupchat.")}const a=e.querySelector("error");return Object(ke.propertyOf)(a.querySelector("text"))("textContent")||n("Sorry, an error occurred:")+" "+a.innerHTML},getMessageBody(e,t,o){const n=e.getAttribute("type");if("error"===n)return Xt.getErrorMessage(e,t,o);else{const t=e.querySelector("body");if(t)return t.textContent.trim()}},getChatState(e){return e.getElementsByTagName("composing").length&&"composing"||e.getElementsByTagName("paused").length&&"paused"||e.getElementsByTagName("inactive").length&&"inactive"||e.getElementsByTagName("active").length&&"active"||e.getElementsByTagName("gone").length&&"gone"},getMessageAttributesFromStanza(e,t,o,n){const a=Qt.isChatRoom(o);let s=Object.assign(Xt.getStanzaIDs(e,t),Xt.getRetractionAttributes(e,t),a?Xt.getModerationAttributes(e,t,o):{});const i=Xt.getMessageBody(e,a,n)||void 0,r=Wt()("delay[xmlns=\"".concat(Yt.NS.DELAY,"\"]"),t).pop();return s=Object.assign({chat_state:Xt.getChatState(e),is_archived:Xt.isArchived(t),is_delayed:!!r,is_only_emojis:!!i&&Qt.isOnlyEmojis(i),message:i,msgid:e.getAttribute("id")||t.getAttribute("id"),references:Xt.getReferences(e),subject:Object(ke.propertyOf)(e.querySelector("subject"))("textContent"),thread:Object(ke.propertyOf)(e.querySelector("thread"))("textContent"),time:r?ut()(r.getAttribute("stamp")).toISOString():new Date().toISOString(),type:e.getAttribute("type")},s,Xt.getSenderAttributes(e,o,n),Xt.getOutOfBandAttributes(e),Xt.getSpoilerAttributes(e),Xt.getReactionAttributes(e),Xt.getCorrectionAttributes(e,t)),s}};var Kt=Xt;const Zt=ze.Strophe,eo=ze.$build,to=ze.$iq,oo=ze.$msg,no=ze.$pres;Backbone=We.a.noConflict(),it.patch(Backbone),ut.a.extend(ct.a),Zt.addNamespace("CARBONS","urn:xmpp:carbons:2"),Zt.addNamespace("CHATSTATES","http://jabber.org/protocol/chatstates"),Zt.addNamespace("CSI","urn:xmpp:csi:0"),Zt.addNamespace("DELAY","urn:xmpp:delay"),Zt.addNamespace("FASTEN","urn:xmpp:fasten:0"),Zt.addNamespace("FORWARD","urn:xmpp:forward:0"),Zt.addNamespace("HINTS","urn:xmpp:hints"),Zt.addNamespace("HTTPUPLOAD","urn:xmpp:http:upload:0"),Zt.addNamespace("IDLE","urn:xmpp:idle:1"),Zt.addNamespace("MAM","urn:xmpp:mam:2"),Zt.addNamespace("MODERATE","urn:xmpp:message-moderate:0"),Zt.addNamespace("NICK","http://jabber.org/protocol/nick"),Zt.addNamespace("OMEMO","eu.siacs.conversations.axolotl"),Zt.addNamespace("OUTOFBAND","jabber:x:oob"),Zt.addNamespace("REACTION","urn:xmpp:reactions:0"),Zt.addNamespace("PUBSUB","http://jabber.org/protocol/pubsub"),Zt.addNamespace("REGISTER","jabber:iq:register"),Zt.addNamespace("RETRACT","urn:xmpp:message-retract:0"),Zt.addNamespace("ROSTERX","http://jabber.org/protocol/rosterx"),Zt.addNamespace("RSM","http://jabber.org/protocol/rsm"),Zt.addNamespace("SID","urn:xmpp:sid:0"),Zt.addNamespace("SPOILER","urn:xmpp:spoiler:0"),Zt.addNamespace("STANZAS","urn:ietf:params:xml:ns:xmpp-stanzas"),Zt.addNamespace("VCARD","vcard-temp"),Zt.addNamespace("VCARDUPDATE","vcard-temp:x:update"),Zt.addNamespace("XFORM","jabber:x:data"),lt.a.templateSettings={escape:/\{\{\{([\s\S]+?)\}\}\}/g,evaluate:/\{\[([\s\S]+?)\]\}/g,interpolate:/\{\{([\s\S]+?)\}\}/g,imports:{_:lt.a}};const ao=59,so=["converse-bookmarks","converse-bosh","converse-caps","converse-chatboxes","converse-chat","converse-disco","converse-emoji","converse-mam","converse-muc","converse-headlines","converse-ping","converse-pubsub","converse-roster","converse-rsm","converse-smacks","converse-status","converse-vcard"],io={templates:{},promises:{}};io.VERSION_NAME="v6.0.0",Object.assign(io,Backbone.Events),io.Collection=Backbone.Collection.extend({async clearSession(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};await Promise.all(Array.from(this.models).map(t=>new Promise(o=>{t.destroy(Object.assign(e,{success:o,error:(t,n)=>{vt.error(n),o()}}))}))),await this.browserStorage.clear(),this.reset()}});class ro extends Error{}io.TimeoutError=ro;class lo extends Error{}io.IllegalMessage=lo,{enable:function(e,t,o){"undefined"==typeof o&&(o="pluginSocket"),"undefined"==typeof t&&(t="plugged");let n={};return n[o]=new j(e,t),Et()(e,n)}}.enable(io,"_converse","pluggable"),io.STATUS_WEIGHTS={offline:6,unavailable:5,xa:4,away:3,dnd:2,chat:1,online:1},io.PRETTY_CHAT_STATUS={offline:"Offline",unavailable:"Unavailable",xa:"Extended Away",away:"Away",dnd:"Do not disturb",chat:"Chattty",online:"Online"},io.ANONYMOUS="anonymous",io.CLOSED="closed",io.EXTERNAL="external",io.LOGIN="login",io.LOGOUT="logout",io.OPENED="opened",io.PREBIND="prebind",io.STANZA_TIMEOUT=1e4,io.CONNECTION_STATUS={0:"ERROR",1:"CONNECTING",2:"CONNFAIL",3:"AUTHENTICATING",4:"AUTHFAIL",5:"CONNECTED",6:"DISCONNECTED",7:"DISCONNECTING",8:"ATTACHED",9:"REDIRECT",10:"RECONNECTING"},io.SUCCESS="success",io.FAILURE="failure",io.DEFAULT_IMAGE_TYPE="image/svg+xml",io.DEFAULT_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+CiA8cmVjdCB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgZmlsbD0iIzU1NSIvPgogPGNpcmNsZSBjeD0iNjQiIGN5PSI0MSIgcj0iMjQiIGZpbGw9IiNmZmYiLz4KIDxwYXRoIGQ9Im0yOC41IDExMiB2LTEyIGMwLTEyIDEwLTI0IDI0LTI0IGgyMyBjMTQgMCAyNCAxMiAyNCAyNCB2MTIiIGZpbGw9IiNmZmYiLz4KPC9zdmc+Cg==",io.TIMEOUTS={PAUSED:1e4,INACTIVE:9e4},io.INACTIVE="inactive",io.ACTIVE="active",io.COMPOSING="composing",io.PAUSED="paused",io.GONE="gone",io.PRIVATE_CHAT_TYPE="chatbox",io.CHATROOMS_TYPE="chatroom",io.HEADLINES_TYPE="headline",io.CONTROLBOX_TYPE="controlbox",io.default_connection_options={explicitResourceBinding:!0},io.default_settings={allow_non_roster_messaging:!1,authentication:"login",auto_away:0,auto_login:!1,auto_reconnect:!0,auto_xa:0,blacklisted_plugins:[],connection_options:{},credentials_url:null,csi_waiting_time:0,loglevel:"info",default_state:"online",discover_connection_methods:!1,geouri_regex:/https\:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g,geouri_replacement:"https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2",idle_presence_timeout:300,jid:void 0,keepalive:!0,locales:["af","ar","bg","ca","cs","de","eo","es","eu","en","fr","gl","he","hi","hu","id","it","ja","nb","nl","mr","oc","pl","pt","pt_BR","ro","ru","tr","uk","vi","zh_CN","zh_TW"],message_carbons:!0,nickname:void 0,password:void 0,persistent_store:"localStorage",priority:0,rid:void 0,root:window.document,sid:void 0,singleton:!1,strict_plugin_dependencies:!1,trusted:!0,view_mode:"overlayed",websocket_url:void 0,whitelisted_plugins:[]},io.__=function(e){return void 0===_t?e:_t.translate.apply(_t,arguments)},io.___=function(e){return e};const co=io.__,po=["afterResourceBinding","connectionInitialized","initialized","pluginsInitialized","statusInitialized"];io.isTestEnv=function(){return"MockConnection"===Zt.Connection.name},io.haveResumed=function(){return io.api.connection.isType("bosh")?io.connfeedback.get("connection_status")===Zt.Status.ATTACHED:!io.connection.do_bind},io.isUniView=function(){return lt.a.includes(["mobile","fullscreen","embedded"],io.view_mode)},io.createStore=function(e,t){const o=io.storage[t?t:io.config.get("storage")];return new Backbone.BrowserStorage(e,o)},io.router=new Backbone.Router;const uo=lt.a.debounce(B,2e3);io.shouldClearCache=()=>!io.config.get("trusted")||io.isTestEnv(),io.initConnection=async function(e){if(io.discover_connection_methods&&(await H(e)),!io.bosh_service_url){if(io.authentication===io.PREBIND)throw new Error("authentication is set to 'prebind' but we don't have a BOSH connection");if(!io.websocket_url)throw new Error("initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.")}if(("WebSocket"in window||"MozWebSocket"in window)&&io.websocket_url)io.connection=new Zt.Connection(io.websocket_url,Object.assign(io.default_connection_options,io.connection_options));else if(io.bosh_service_url)io.connection=new Zt.Connection(io.bosh_service_url,Object.assign(io.default_connection_options,io.connection_options,{keepalive:io.keepalive}));else throw new Error("initConnection: this browser does not support websockets and bosh_service_url wasn't specified.");J(),io.api.trigger("connectionInitialized")},io.setUserJID=async function(e){if(!io.connection||!Qt.isSameDomain(io.connection.jid,e)){const t=Zt.getDomainFromJid(e);await io.initConnection(t)}return await U(e),io.api.trigger("setUserJID"),e},io.saveWindowState=function(e){let t;const o={focus:"visible",focusin:"visible",pageshow:"visible",blur:"hidden",focusout:"hidden",pagehide:"hidden"};e=e||document.createEvent("Events"),t=e.type in o?o[e.type]:document.hidden?"hidden":"visible",io.windowState=t,io.api.trigger("windowStateChanged",{state:t})},io.initialize=async function(e,t){if(te(),e=void 0===e?{}:e,po.forEach(e=>io.api.promises.add(e)),"onpagehide"in window?io.unloadevent="pagehide":"onbeforeunload"in window?io.unloadevent="beforeunload":"onunload"in window&&(io.unloadevent="unload"),lt.a.assignIn(this,this.default_settings),lt.a.assignIn(this,lt.a.pick(e,Object.keys(this.default_settings))),this.settings={},lt.a.assignIn(this.settings,lt.a.pick(e,Object.keys(this.default_settings))),vt.setLogLevel(io.loglevel),io.log=vt.log,this.authentication===io.ANONYMOUS&&this.auto_login&&!this.jid)throw new Error("Config Error: you need to provide the server's domain via the 'jid' option when using anonymous authentication with auto_login.");if(io.router.route(/^converse\?loglevel=(debug|info|warn|error|fatal)$/,"loglevel",e=>vt.setLogLevel(e)),void 0===_t||io.isTestEnv())io.locale="en";else try{io.locale=_t.getLocale(e.i18n,io.locales),await _t.fetchTranslations(io)}catch(t){vt.fatal(t.message)}return(this.callback=t||function(){},this.send_initial_presence=!0,this.user_settings=e,this.generateResource=()=>"/converse.js-".concat(Math.floor(139749528*Math.random()).toString()),this.setConnectionStatus=function(e,t){io.connfeedback.set({connection_status:e,message:t})},this.onDisconnected=function(){const e=io.disconnection_reason;return io.disconnection_cause===Zt.Status.AUTHFAIL?io.auto_reconnect&&(io.credentials_url||io.authentication===io.ANONYMOUS)?io.api.connection.reconnect():Q():io.disconnection_cause!==io.LOGOUT&&(void 0===e||e!==lt.a.get(Zt,"ErrorCondition.NO_AUTH_MECH"))&&"host-unknown"!==e&&"remote-connection-failed"!==e&&io.auto_reconnect?void io.api.connection.reconnect():Q()},this.setDisconnectionCause=function(e,t,o){void 0===e?(delete io.disconnection_cause,delete io.disconnection_reason):(void 0===io.disconnection_cause||o)&&(io.disconnection_cause=e,io.disconnection_reason=t)},this.onConnectStatusChanged=function(e,t){if(vt.debug("Status changed to: ".concat(io.CONNECTION_STATUS[e])),e===Zt.Status.CONNECTED||e===Zt.Status.ATTACHED)io.setConnectionStatus(e),io.send_initial_presence=!0,io.setDisconnectionCause(),io.connection.reconnecting?(vt.debug(e===Zt.Status.CONNECTED?"Reconnected":"Reattached"),G(!0)):(vt.debug(e===Zt.Status.CONNECTED?"Connected":"Attached"),io.connection.restored&&(io.send_initial_presence=!1),G());else if(e===Zt.Status.DISCONNECTED)io.setDisconnectionCause(e,t),io.onDisconnected();else if(e===Zt.Status.BINDREQUIRED)io.bindResource();else if(e===Zt.Status.ERROR)io.setConnectionStatus(e,co("An error occurred while connecting to the chat server."));else if(e===Zt.Status.CONNECTING)io.setConnectionStatus(e);else if(e===Zt.Status.AUTHENTICATING)io.setConnectionStatus(e);else if(e===Zt.Status.AUTHFAIL)t||(t=co("Your Jabber ID and/or password is incorrect. Please try again.")),io.setConnectionStatus(e,t),io.setDisconnectionCause(e,t,!0),io.onDisconnected();else if(e===Zt.Status.CONNFAIL){let o=t;"host-unknown"===t||"remote-connection-failed"==t?o=co("Sorry, we could not connect to the XMPP host with domain: %1$s","\"".concat(Zt.getDomainFromJid(io.connection.jid),"\"")):void 0!==t&&t===lt.a.get(Zt,"ErrorCondition.NO_AUTH_MECH")&&(o=co("The XMPP server did not offer a supported authentication mechanism")),io.setConnectionStatus(e,o),io.setDisconnectionCause(e,t)}else e===Zt.Status.DISCONNECTING&&io.setDisconnectionCause(e,t)},this.bindResource=async function(){await io.api.trigger("beforeResourceBinding",{synchronous:!0}),io.connection.bind()},this.ConnectionFeedback=Backbone.Model.extend({defaults:{connection_status:Zt.Status.DISCONNECTED,message:""},initialize(){this.on("change",()=>io.api.trigger("connfeedback",io.connfeedback))}}),this.connfeedback=new this.ConnectionFeedback,await $(),io.isTestEnv())?io:void 0},io.api={connection:{connected(){return lt.a.get(io,"connection",{}).connected&&!0},disconnect(){io.connection&&io.connection.disconnect()},async reconnect(){const e=io.connfeedback.get("connection_status");return io.authentication===io.ANONYMOUS&&(await L(),z()),e===Zt.Status.CONNFAIL&&(io.api.connection.isType("websocket")&&io.bosh_service_url?(await io.setUserJID(io.bare_jid),io.connection._proto._doDisconnect(),io.connection._proto=new Zt.Bosh(io.connection),io.connection.service=io.bosh_service_url):io.api.connection.isType("bosh")&&io.websocket_url&&(io.authentication===io.ANONYMOUS?await io.setUserJID(io.settings.jid):await io.setUserJID(io.bare_jid),io.connection._proto._doDisconnect(),io.connection._proto=new Zt.Websocket(io.connection),io.connection.service=io.websocket_url)),e===Zt.Status.AUTHFAIL&&io.authentication===io.ANONYMOUS&&(await io.setUserJID(io.settings.jid)),io.connection.reconnecting?void uo():B()},isType(e){if("websocket"===e.toLowerCase())return io.connection._proto instanceof Zt.Websocket;return"bosh"===e.toLowerCase()?io.connection._proto instanceof Zt.Bosh:void 0}},async trigger(e){const t=Array.from(arguments),o=t.pop();if(o&&o.synchronous){const o=io._events[e]||[];await Promise.all(o.map(o=>o.callback.apply(o.ctx,t.splice(1))))}else io.trigger.apply(io,arguments);const n=io.promises[e];n!==void 0&&n.resolve()},user:{jid(){return io.connection.jid},async login(e,t){let o=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2];(e||io.jid)&&(e=await io.setUserJID(e||io.jid));const n=io.pluggable.plugins["converse-bosh"];if(n&&n.enabled()){if(await io.restoreBOSHSession())return;if(io.authentication===io.PREBIND&&(!o||io.auto_login))return io.startNewPreboundBOSHSession()}t=t||io.password;const a=e&&t?{jid:e,password:t}:null;P(a,o)},logout(){const e=Qt.getResolveablePromise(),t=()=>{Object.keys(io.promises).forEach(M),delete io.jid,io.api.trigger("logout"),e.resolve()};return io.setDisconnectionCause(io.LOGOUT,void 0,!0),void 0===io.connection?t():(io.api.listen.once("disconnected",()=>t()),io.connection.disconnect()),e}},settings:{update(e){Qt.merge(io.default_settings,e),Qt.merge(io,e),Qt.applyUserSettings(io,e,io.user_settings)},get(e){if(lt.a.includes(Object.keys(io.default_settings),e))return io[e]},set(e,t){const n={};lt.a.isObject(e)?lt.a.assignIn(io,lt.a.pick(e,Object.keys(io.default_settings))):lt.a.isString("string")&&(n[e]=t,lt.a.assignIn(io,lt.a.pick(n,Object.keys(io.default_settings))))}},promises:{add(e){let t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];e=Array.isArray(e)?e:[e],e.forEach(e=>{const o=Qt.getResolveablePromise();o.replace=t,io.promises[e]=o})}},listen:{once:io.once.bind(io),on:io.on.bind(io),not:io.off.bind(io),stanza(e,t,o){lt.a.isFunction(t)?(o=t,t={}):t=t||{},io.connection.addHandler(o,t.ns,e,t.type,t.id,t.from,t)}},waitUntil(e){if(lt.a.isFunction(e))return Qt.waitUntil(e);else{const t=io.promises[e];return void 0===t?null:t}},send(e){return io.api.connection.connected()?(lt.a.isString(e)&&(e=Qt.toStanza(e)),"iq"===e.tagName?io.api.sendIQ(e):void(io.connection.send(e),io.api.trigger("send",e))):(vt.warn("Not sending stanza because we're not connected!"),void vt.warn(Zt.serialize(e)))},sendIQ(e,t){let o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];t=t||io.STANZA_TIMEOUT;let n;return n=o?new Promise((o,n)=>io.connection.sendIQ(e,o,n,t)):new Promise(o=>io.connection.sendIQ(e,o,o,t)),io.api.trigger("send",e),n}},window.converse=window.converse||{},Object.assign(window.converse,{keycodes:{TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESCAPE:27,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,FORWARD_SLASH:47,AT:50,META:91,META_RIGHT:93},initialize(e,t){return io.initialize(e,t)},plugins:{add(e,t){if(t.__name__=e,void 0!==io.pluggable.plugins[e])throw new TypeError("Error: plugin with name \"".concat(e,"\" has already been ")+"registered!");else io.pluggable.plugins[e]=t}},env:{$build:eo,$iq:to,$msg:oo,$pres:no,Backbone,BrowserStorage:it,Promise,Strophe:Zt,_:lt.a,dayjs:ut.a,log:vt,sizzle:Wt.a,stanza_utils:Kt,u:Qt,utils:Qt}}),window.dispatchEvent(new CustomEvent("converse-loaded"));var mo=converse,go=o(41),ho=o.n(go);const{$msg:_o,Backbone:fo,Strophe:bo,sizzle:vo,utils:yo}=mo.env,xo=mo.env.utils;mo.plugins.add("converse-chat",{dependencies:["converse-chatboxes","converse-disco"],initialize(){function e(e,t){o.api.send(_o({to:e.getAttribute("from"),type:"error",id:e.getAttribute("id")}).c("error",{type:"cancel"}).c("not-allowed",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("text",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).t(t)),vt.warn("Rejecting message stanza with the following reason: ".concat(t)),vt.warn(e)}async function t(e){const t=bo.getBareJidFromJid(e.getAttribute("from"));if(!yo.isSameBareJID(t,o.bare_jid)){const n=await o.api.chatboxes.get(t);if(n){const t=await n.shouldShowErrorMessage(e);if(t){const t=await n.getMessageAttributesFromStanza(e,e);await n.messages.create(t)}}}}const{_converse:o}=this,{__:n}=o;o.api.settings.update({auto_join_private_chats:[],clear_messages_on_reconnection:!1,filter_by_resource:!1,allow_message_corrections:"all",send_chat_state_notifications:!0});const a=fo.Model.extend({initialize(){this.rosterContactAdded=xo.getResolveablePromise()},async setRosterContact(e){const t=await o.api.contacts.get(e);t&&(this.contact=t,this.set("nickname",t.get("nickname")),this.rosterContactAdded.resolve())}});o.Message=a.extend({defaults(){return{msgid:xo.getUniqueId(),time:new Date().toISOString(),is_ephemeral:!1}},async initialize(){this.initialized=xo.getResolveablePromise(),"chat"===this.get("type")&&(a.prototype.initialize.apply(this,arguments),this.setRosterContact(bo.getBareJidFromJid(this.get("from")))),this.get("file")&&this.on("change:put",this.uploadFile,this),this.setTimerForEphemeralMessage(),await o.api.trigger("messageInitialized",this,{Synchronous:!0}),this.initialized.resolve()},setTimerForEphemeralMessage(){const e=()=>{this.ephemeral_timer=window.setTimeout(this.safeDestroy.bind(this),1e4)};return this.isEphemeral()?(e(),!0):(this.on("change:is_ephemeral",()=>this.isEphemeral()?e():clearTimeout(this.ephemeral_timer)),!1)},safeDestroy(){try{this.destroy()}catch(t){vt.error(t)}},isOnlyChatStateNotification(){return xo.isOnlyChatStateNotification(this)},isEphemeral(){return this.get("is_ephemeral")||xo.isOnlyChatStateNotification(this)},getDisplayName(){return"groupchat"===this.get("type")?this.get("nick"):this.contact?this.contact.getDisplayName():this.vcard?this.vcard.getDisplayName():this.get("from")},getMessageText(){return this.get("is_encrypted")?this.get("plaintext")||("debug"===o.loglevel?n("Unencryptable OMEMO message"):null):this.get("message")},isMeCommand(){const e=this.getMessageText();return!!e&&e.startsWith("/me ")},sendSlotRequestStanza(){if(!this.file)return Promise.reject(new Error("file is undefined"));const e=mo.env.$iq({from:o.jid,to:this.get("slot_request_url"),type:"get"}).c("request",{xmlns:bo.NS.HTTPUPLOAD,filename:this.file.name,size:this.file.size,"content-type":this.file.type});return o.api.sendIQ(e)},async getRequestSlotURL(){let e;try{e=await this.sendSlotRequestStanza()}catch(t){return vt.error(t),this.save({type:"error",message:n("Sorry, could not determine upload URL."),is_ephemeral:!0})}const t=e.querySelector("slot");return t?void this.save({get:t.querySelector("get").getAttribute("url"),put:t.querySelector("put").getAttribute("url")}):this.save({type:"error",message:n("Sorry, could not determine file upload URL."),is_ephemeral:!0})},uploadFile(){const e=new XMLHttpRequest;e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&(vt.info("Status: "+e.status),200===e.status||201===e.status?this.save({upload:o.SUCCESS,oob_url:this.get("get"),message:this.get("get")}):e.onerror())},e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.set("progress",e.loaded/e.total)},!1),e.onerror=()=>{let t;t=e.responseText?n("Sorry, could not succesfully upload your file. Your server\u2019s response: \"%1$s\"",e.responseText):n("Sorry, could not succesfully upload your file."),this.save({type:"error",upload:o.FAILURE,message:t,is_ephemeral:!0})},e.open("PUT",this.get("put"),!0),e.setRequestHeader("Content-type",this.file.type),e.send(this.file)}}),o.Messages=o.Collection.extend({model:o.Message,comparator:"time"}),o.ChatBox=a.extend({messagesCollection:o.Messages,defaults(){return{bookmarked:!1,chat_state:void 0,hidden:["mobile","fullscreen"].includes(o.view_mode),message_type:"chat",nickname:void 0,num_unread:0,time_sent:new Date(0).toISOString(),time_opened:this.get("time_opened")||new Date().getTime(),type:o.PRIVATE_CHAT_TYPE,url:""}},async initialize(){this.initialized=xo.getResolveablePromise(),a.prototype.initialize.apply(this,arguments);const e=this.get("jid");e&&(this.set({box_id:"box-".concat(btoa(e))}),this.get("type")===o.PRIVATE_CHAT_TYPE&&(this.presence=o.presences.findWhere({jid:e})||o.presences.create({jid:e}),await this.setRosterContact(e)),this.on("change:chat_state",this.sendChatState,this),this.initMessages(),await this.fetchMessages(),await o.api.trigger("chatBoxInitialized",this,{Synchronous:!0}),this.initialized.resolve())},getMessagesCacheKey(){return"converse.messages-".concat(this.get("jid"),"-").concat(o.bare_jid)},initMessages(){this.messages=new this.messagesCollection,this.messages.chatbox=this,this.messages.browserStorage=o.createStore(this.getMessagesCacheKey()),this.listenTo(this.messages,"change:upload",e=>{e.get("upload")===o.SUCCESS&&o.api.send(this.createMessageStanza(e))})},afterMessagesFetched(){o.api.trigger("afterMessagesFetched",this)},fetchMessages(){if(this.messages.fetched)return void vt.info("Not re-fetching messages for ".concat(this.get("jid")));this.messages.fetched=xo.getResolveablePromise();const e=this.messages.fetched.resolve;return this.messages.fetch({add:!0,success:()=>{this.afterMessagesFetched(),e()},error:()=>{this.afterMessagesFetched(),e()}}),this.messages.fetched},async onMessage(e,t,o){const n=await this.getDuplicateMessage(e);if(n)this.updateMessage(n,t);else if(!this.handleReceipt(e,o,t)&&!this.handleChatMarker(e,o)){const o=await this.getMessageAttributesFromStanza(e,t);if(this.handleReaction(e,t,o),this.handleRetraction(o))return;if(this.setEditable(o,o.time,e),o.chat_state||o.retracted||!xo.isEmptyMessage(o)){const e=this.handleCorrection(o)||this.messages.create(o);this.incrementUnreadMsgCounter(e)}}},async clearMessages(){try{await this.messages.clearSession()}catch(t){this.messages.trigger("reset"),vt.error(t)}finally{delete this.messages.fetched}},async close(){try{await new Promise((e,t)=>this.destroy({success:e,error:(o,n)=>t(n)}))}catch(t){vt.error(t)}finally{o.clear_messages_on_reconnection&&(await this.clearMessages())}},announceReconnection(){o.api.trigger("chatReconnected",this)},async onReconnection(){o.clear_messages_on_reconnection&&(await this.clearMessages()),this.announceReconnection()},validate(e){if(!e.jid)return"Ignored ChatBox without JID";const t=o.auto_join_rooms.map(e=>Object(ke.isObject)(e)?e.jid:e),n=o.auto_join_private_chats.concat(t);if(o.singleton&&!n.includes(e.jid)&&!o.auto_join_on_invite){const t="".concat(e.jid," is not allowed because singleton is true and it's not being auto_joined");return vt.warn(t),t}},getDisplayName(){return this.contact?this.contact.getDisplayName():this.vcard?this.vcard.getDisplayName():this.get("jid")},createMessageFromError(e){if(e instanceof o.TimeoutError){const t=this.messages.create({type:"error",message:e.message,retry:!0});t.error=e}},getOldestMessage(){for(let e=0;e<this.messages.length;e++){const t=this.messages.at(e);if(t.get("type")===this.get("message_type"))return t}},getMostRecentMessage(){for(let e=this.messages.length-1;0<=e;e--){const t=this.messages.at(e);if(t.get("type")===this.get("message_type"))return t}},getUpdatedMessageAttributes(e,t){return{is_archived:Kt.isArchived(t)}},updateMessage(e,t){const o=this.getUpdatedMessageAttributes(e,t);o&&e.save(o)},setChatState(e,t){return void 0!==this.chat_state_timeout&&(window.clearTimeout(this.chat_state_timeout),delete this.chat_state_timeout),e===o.COMPOSING?this.chat_state_timeout=window.setTimeout(this.setChatState.bind(this),o.TIMEOUTS.PAUSED,o.PAUSED):e===o.PAUSED&&(this.chat_state_timeout=window.setTimeout(this.setChatState.bind(this),o.TIMEOUTS.INACTIVE,o.INACTIVE)),this.set("chat_state",e,t),this},shouldShowErrorMessage(e){const t=e.getAttribute("id");if(t){const o=this.messages.where({msgid:t}),n=o.filter(e=>"error"!==e.get("type"));if(!n.length&&null===e.querySelector("body"))return;const a=o.filter(e=>"error"===e.get("type"));if(a.length)return}return!0},isSameUser(e,t){return xo.isSameBareJID(e,t)},findDanglingRetraction(e){if(!e.origin_id||!this.messages.length)return null;if(this.messages.last().get("time")>e.time){const t=Array.from(this.messages.models);return t.reverse(),t.find(t=>{let{attributes:o}=t;return o.retracted_id===e.origin_id&&o.from===e.from&&!o.moderated_by})}},handleReaction(e,t,o){const n=this.messages.findWhere({origin_id:o.reaction_id});n&&this.updateReactions(n,o.from,o.reaction_emoji)},updateReactions(e,t,o){let n=e.get("reactions");n||(n={}),n[o]||(n[o]=[]),n[o].includes(t)||n[o].push(t),e.set("reactions",void 0),e.save("reactions",n)},handleRetraction(e){const t=["retracted","retracted_id","editable"];if(e.retracted){if(e.is_tombstone)return!1;const o=this.messages.findWhere({origin_id:e.retracted_id,from:e.from});return o?(o.save(Object(ke.pick)(e,t)),!0):(e.dangling_retraction=!0,this.messages.create(e),!0)}else{const o=this.findDanglingRetraction(e);if(o){const n=Object(ke.pick)(o.attributes,t),a=Object.assign({dangling_retraction:!1},e,n);return delete a.id,o.save(a),!0}}return!1},handleCorrection(e){if(e.replaced_id&&e.from){const t=this.messages.findWhere({msgid:e.replaced_id,from:e.from});if(t){const o=t.get("older_versions")||{};return e.time<t.get("time")&&t.get("edited")?(o[e.time]=e.message,t.save({older_versions:o})):(o[t.get("time")]=t.get("message"),e=Object.assign(e,{older_versions:o}),delete e.id,t.save(e)),t}}},async getDuplicateMessage(e){return this.findDuplicateFromOriginID(e)||(await this.findDuplicateFromStanzaID(e))||this.findDuplicateFromMessage(e)},findDuplicateFromOriginID(e){const t=vo("origin-id[xmlns=\"".concat(bo.NS.SID,"\"]"),e).pop();return t?this.messages.findWhere({origin_id:t.getAttribute("id"),from:e.getAttribute("from")}):null},async findDuplicateFromStanzaID(e){const t=vo("stanza-id[xmlns=\"".concat(bo.NS.SID,"\"]"),e).pop();if(!t)return!1;const n=t.getAttribute("by");if(!(await o.api.disco.supports(bo.NS.SID,n)))return!1;const a={};return a["stanza_id ".concat(n)]=t.getAttribute("id"),this.messages.findWhere(a)},findDuplicateFromMessage(e){const t=Kt.getMessageBody(e)||void 0;if(!t)return!1;const o=e.getAttribute("id");return!!o&&this.messages.findWhere({message:t,from:e.getAttribute("from"),msgid:o})},sendRetractionMessage(e){const t=e.get("origin_id");if(!t)throw new Error("Can't retract message without a XEP-0359 Origin ID");const n=_o({id:xo.getUniqueId(),to:this.get("jid"),type:"chat"}).c("store",{xmlns:bo.NS.HINTS}).up().c("apply-to",{id:t,xmlns:bo.NS.FASTEN}).c("retract",{xmlns:bo.NS.RETRACT});return o.connection.send(n)},sendMarker(e,t,n,a){const s=_o({from:o.connection.jid,id:xo.getUniqueId(),to:e,type:a?a:"chat"}).c(n,{xmlns:bo.NS.MARKERS,id:t});o.api.send(s)},handleChatMarker(e,t){const n=bo.getBareJidFromJid(e.getAttribute("to")),a=bo.getBareJidFromJid(t);if(n!==o.bare_jid)return!1;const s=vo("[xmlns=\"".concat(bo.NS.MARKERS,"\"]"),e);if(0===s.length)return!1;if(1<s.length)return vt.error("handleChatMarker: Ignoring incoming stanza with multiple message markers"),vt.error(e),!1;else{const t=s.pop();if("markable"===t.nodeName)return!this.contact||xo.isMAMMessage(e)||xo.isCarbonMessage(e)||this.sendMarker(a,e.getAttribute("id"),"received",e.getAttribute("type")),!1;else{const e=t&&t.getAttribute("id"),o=e&&this.messages.findWhere({msgid:e}),n="marker_".concat(t.nodeName);return o&&!o.get(n)&&o.save({field_name:new Date().toISOString()}),!0}}},sendReceiptStanza(e,t){const n=_o({from:o.connection.jid,id:xo.getUniqueId(),to:e,type:"chat"}).c("received",{xmlns:bo.NS.RECEIPTS,id:t}).up().c("store",{xmlns:bo.NS.HINTS}).up();o.api.send(n)},handleReceipt(e,t,n){const a=bo.getBareJidFromJid(t)===o.bare_jid,s=vo("request[xmlns=\"".concat(bo.NS.RECEIPTS,"\"]"),e).pop()!==void 0;!s||a||xo.isCarbonMessage(e)||xo.isMAMMessage(n)||this.sendReceiptStanza(t,e.getAttribute("id"));const i=bo.getBareJidFromJid(e.getAttribute("to"));if(i===o.bare_jid){const t=vo("received[xmlns=\"".concat(bo.NS.RECEIPTS,"\"]"),e).pop();if(t){const e=t&&t.getAttribute("id"),o=e&&this.messages.findWhere({msgid:e});return o&&!o.get("received")&&o.save({received:new Date().toISOString()}),!0}}return!1},createMessageStanza(e){const t=_o({from:o.connection.jid,to:this.get("jid"),type:this.get("message_type"),id:e.get("edited")&&xo.getUniqueId()||e.get("msgid")}).c("body").t(e.get("message")).up().c(o.ACTIVE,{xmlns:bo.NS.CHATSTATES}).root();return"chat"===e.get("type")&&t.c("request",{xmlns:bo.NS.RECEIPTS}).root(),e.get("is_spoiler")&&(e.get("spoiler_hint")?t.c("spoiler",{xmlns:bo.NS.SPOILER},e.get("spoiler_hint")).root():t.c("spoiler",{xmlns:bo.NS.SPOILER}).root()),e.get("reaction_emoji")&&t.c("reactions",{xmlns:bo.NS.REACTION,id:e.get("reaction_id")}).c("reaction").t(e.get("reaction_emoji")).root(),(e.get("references")||[]).forEach(e=>{const o={xmlns:bo.NS.REFERENCE,begin:e.begin,end:e.end,type:e.type};e.uri&&(o.uri=e.uri),t.c("reference",o).root()}),e.get("oob_url")&&t.c("x",{xmlns:bo.NS.OUTOFBAND}).c("url").t(e.get("oob_url")).root(),e.get("edited")&&t.c("replace",{xmlns:bo.NS.MESSAGE_CORRECT,id:e.get("msgid")}).root(),e.get("origin_id")&&t.c("origin-id",{xmlns:bo.NS.SID,id:e.get("origin_id")}).root(),t},getOutgoingMessageAttributes(e,t){const n=this.get("composing_spoiler"),a=xo.getUniqueId();return{id:a,jid:this.get("jid"),nickname:this.get("nickname"),msgid:a,origin_id:a,fullname:o.xmppstatus.get("fullname"),from:o.bare_jid,is_only_emojis:!!e&&xo.isOnlyEmojis(e),sender:"me",time:new Date().toISOString(),message:e?xo.httpToGeoUri(xo.shortnameToUnicode(e),o):void 0,is_spoiler:n,spoiler_hint:n?t:void 0,type:this.get("message_type")}},setEditable(e,t,n){if(!(n&&xo.isHeadlineMessage(o,n))&&!(xo.isEmptyMessage(e)||"me"!==e.sender))if("all"===o.allow_message_corrections)e.editable=!(e.file||e.retracted||"oob_url"in e);else if("last"===o.allow_message_corrections&&t>this.get("time_sent")){this.set({time_sent:t});const o=this.messages.findWhere({editable:!0});o&&o.save({editable:!1}),e.editable=!(e.file||e.retracted||"oob_url"in e)}},sendMessage(e,t){const n=this.getOutgoingMessageAttributes(e,t);let a=this.messages.findWhere("correcting");if(a){const e=a.get("older_versions")||{};e[a.get("time")]=a.get("message"),a.save({correcting:!1,edited:new Date().toISOString(),message:n.message,older_versions:e,references:n.references,is_only_emojis:n.is_only_emojis,origin_id:xo.getUniqueId(),received:void 0})}else this.setEditable(n,new Date().toISOString()),a=this.messages.create(n);return o.api.send(this.createMessageStanza(a)),a},sendChatState(){if(o.send_chat_state_notifications&&this.get("chat_state")){const e=o.send_chat_state_notifications;if(Array.isArray(e)&&!e.includes(this.get("chat_state")))return;o.api.send(_o({id:xo.getUniqueId(),to:this.get("jid"),type:"chat"}).c(this.get("chat_state"),{xmlns:bo.NS.CHATSTATES}).up().c("no-store",{xmlns:bo.NS.HINTS}).up().c("no-permanent-store",{xmlns:bo.NS.HINTS}))}},async sendFiles(e){const t=await o.api.disco.features.get(bo.NS.HTTPUPLOAD,o.domain),a=t.pop();if(!a)return void this.messages.create({message:n("Sorry, looks like file upload is not supported by your server."),type:"error",is_ephemeral:!0});const s=a.dataforms.where({FORM_TYPE:{value:bo.NS.HTTPUPLOAD,type:"hidden"}}).pop(),i=window.parseInt(Object(ke.get)(s,"attributes.max-file-size.value")),r=Object(ke.get)(a,"id");return r?void Array.from(e).forEach(e=>{if(!window.isNaN(i)&&window.parseInt(e.size)>i)return this.messages.create({message:n("The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.",e.name,ho()(i)),type:"error",is_ephemeral:!0});else{const t=Object.assign(this.getOutgoingMessageAttributes(),{file:!0,progress:0,slot_request_url:r});this.setEditable(t,new Date().toISOString());const o=this.messages.create(t,{silent:!0});o.file=e,this.messages.trigger("add",o),o.getRequestSlotURL()}}):void this.messages.create({message:n("Sorry, looks like file upload is not supported by your server."),type:"error",is_ephemeral:!0})},getMessageAttributesFromStanza(e,t){return Kt.getMessageAttributesFromStanza(e,t,this,o)},maybeShow(){return this.trigger("show")},isHidden(){return this.get("hidden")||this.get("minimized")||this.isScrolledUp()||"hidden"===o.windowState},incrementUnreadMsgCounter(e){if(e&&e.get("message")&&yo.isNewMessage(e))if(this.isHidden()){let t=this.get("first_unread");if(0==this.get("num_unread")){if(t){const e=this.messages.where({msgid:t});0<e.length&&e[0].set("first_unread",!1)}e.set("first_unread",!0),t=e.get("msgid")}this.save({first_unread:t,num_unread:this.get("num_unread")+1}),o.incrementMsgCounter()}else this.sendDisplayedMarker(e)},sendDisplayedMarker(e){if(e){const t=bo.getBareJidFromJid(e.get("from"));this.sendMarker(t,e.get("msgid"),"displayed",e.get("type"))}},clearUnreadMsgCounter(){0<this.get("num_unread")&&this.sendDisplayedMarker(this.messages.last()),xo.safeSave(this,{num_unread:0})},isScrolledUp(){return this.get("scrolled",!0)}}),o.handleMessageStanza=async function(t){const n=t;let a=t.getAttribute("to");const s=bo.getResourceFromJid(a);if(o.filter_by_resource&&s&&s!==o.resource)return vt.info("onMessage: Ignoring incoming message intended for a different resource: ".concat(a));if(yo.isHeadlineMessage(o,t))return vt.info("onMessage: Ignoring incoming headline message from JID: ".concat(t.getAttribute("from")));const i=vo("message > forwarded[xmlns=\"".concat(bo.NS.FORWARD,"\"]"),t).length;if(i)return e(t,"Forwarded messages not part of an encapsulating protocol are not supported");let r=t.getAttribute("from")||o.bare_jid;if(xo.isCarbonMessage(t))if(r===o.bare_jid){const e="[xmlns=\"".concat(bo.NS.CARBONS,"\"] > forwarded[xmlns=\"").concat(bo.NS.FORWARD,"\"] > message");t=vo(e,t).pop(),a=t.getAttribute("to"),r=t.getAttribute("from")}else return e(t,"Rejecting carbon from invalid JID");if(xo.isMAMMessage(t))if(r===o.bare_jid){const e="[xmlns=\"".concat(bo.NS.MAM,"\"] > forwarded[xmlns=\"").concat(bo.NS.FORWARD,"\"] > message");t=vo(e,t).pop(),a=t.getAttribute("to"),r=t.getAttribute("from")}else return vt.warn("onMessage: Ignoring alleged MAM message from ".concat(t.getAttribute("from")));const l=bo.getBareJidFromJid(r),d=l===o.bare_jid;if(d&&null===a)return vt.error("Don't know how to handle message stanza without 'to' attribute. ".concat(t.outerHTML));const c=d?bo.getBareJidFromJid(a):l,p=await o.api.contacts.get(c);if(void 0===p&&!o.allow_non_roster_messaging)return vt.error("Blocking messaging with a JID not in our roster because allow_non_roster_messaging is false."),vt.error(t);const u=0<vo("body, encrypted[xmlns=\"".concat(bo.NS.OMEMO,"\"]"),t).length,m=Object(ke.get)(p,"attributes.nickname"),g=await o.api.chats.get(c,{nickname:m},u);g&&(await g.onMessage(t,n,r)),o.api.trigger("message",{stanza:n,chatbox:g})},o.router.route("converse/chat?jid=:jid",function(e){return yo.isValidJID(e)?void o.api.chats.open(e):vt.warn("Invalid JID \"".concat(e,"\" provided in URL fragment"))}),o.api.listen.on("chatBoxesFetched",function(){o.auto_join_private_chats.forEach(e=>{o.chatboxes.where({jid:e}).length||(Object(ke.isString)(e)?o.api.chats.open(e):vt.error("Invalid jid criteria specified for \"auto_join_private_chats\""))}),o.api.trigger("privateChatsAutoJoined")}),o.api.listen.on("presencesInitialized",function(){o.connection.addHandler(e=>vo("message > result[xmlns=\"".concat(bo.NS.MAM,"\"]"),e).pop()?(vt.warn("Received a MAM message with type \"chat\"."),!0):(o.handleMessageStanza(e),!0),null,"message","chat"),o.connection.addHandler(e=>null!==e.getAttribute("type")||(o.handleMessageStanza(e),!0),bo.NS.RECEIPTS,"message"),o.connection.addHandler(e=>(t(e),!0),null,"message","error")}),o.api.listen.on("clearSession",()=>{o.shouldClearCache()&&o.chatboxes.filter(e=>e.messages&&e.messages.clearSession({silent:!0}))}),Object.assign(o.api,{chats:{async create(e,t){if(Object(ke.isString)(e)){if(t&&!Object(ke.get)(t,"fullname")){const n=await o.api.contacts.get(e);t.fullname=Object(ke.get)(n,"attributes.fullname")}const n=o.api.chats.get(e,t,!0);return n?n:void vt.error("Could not open chatbox for JID: "+e)}return Array.isArray(e)?Promise.all(e.forEach(async n=>{const a=await o.api.contacts.get(e);return t.fullname=Object(ke.get)(a,"attributes.fullname"),o.api.chats.get(n,t,!0).maybeShow()})):(vt.error("chats.create: You need to provide at least one JID"),null)},async open(e,t,n){if(Object(ke.isString)(e)){const a=await o.api.chats.get(e,t,!0);return a?a.maybeShow(n):a}if(Array.isArray(e))return Promise.all(e.map(e=>o.api.chats.get(e,t,!0).then(e=>e&&e.maybeShow(n))).filter(e=>e));throw vt.error("chats.open: You need to provide at least one JID"),new Error("chats.open: You need to provide at least one JID")},async get(e){async function t(e){let t=await o.api.chatboxes.get(e);return!t&&a?t=await o.api.chatboxes.create(e,n,o.ChatBox):(t=t&&t.get("type")===o.PRIVATE_CHAT_TYPE?t:null,t&&Object.keys(n).length&&t.save(n)),t}let n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},a=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2];if(e===void 0){const e=await o.api.chatboxes.get();return e.filter(e=>e.get("type")===o.PRIVATE_CHAT_TYPE)}return Object(ke.isString)(e)?t(e):Promise.all(e.map(e=>t(e)))}}})}});const{Backbone:So,Strophe:wo,$iq:ko,utils:Eo}=mo.env;mo.plugins.add("converse-disco",{initialize(){function e(){return s.api.disco.own.identities.add("client","web","Converse"),s.api.disco.own.features.add(wo.NS.CHATSTATES),s.api.disco.own.features.add(wo.NS.DISCO_INFO),s.api.disco.own.features.add(wo.NS.ROSTERX),s.message_carbons&&s.api.disco.own.features.add(wo.NS.CARBONS),s.api.trigger("addClientFeatures"),this}function t(){if(!s.stream_features){const e=wo.getBareJidFromJid(s.jid),t="converse.stream-features-".concat(e);s.api.promises.add("streamFeaturesAdded"),s.stream_features=new s.Collection,s.stream_features.browserStorage=s.createStore(t,"session")}}function o(){s.api.trigger("streamFeaturesAdded")}function n(e){const t=e.getElementsByTagName("query")[0].getAttribute("node"),o={xmlns:wo.NS.DISCO_INFO};t&&(o.node=t);const n=ko({type:"result",id:e.getAttribute("id")}),a=e.getAttribute("from");return null!==a&&n.attrs({to:a}),n.c("query",o),r._identities.forEach(e=>{const t={category:e.category,type:e.type};e.name&&(t.name=e.name),e.lang&&(t["xml:lang"]=e.lang),n.c("identity",t).up()}),r._features.forEach(e=>n.c("feature",{var:e}).up()),s.api.send(n.tree()),!0}async function a(){e(),s.connection.addHandler(n,wo.NS.DISCO_INFO,"iq","get",null,null),s.disco_entities=new s.DiscoEntities;const t="converse.disco-entities-".concat(s.bare_jid);s.disco_entities.browserStorage=s.createStore(t,"session");const o=await s.disco_entities.fetchEntities();0!==o.length&&o.get(s.domain)||s.disco_entities.create({jid:s.domain}),s.api.trigger("discoInitialized")}const{_converse:s}=this;s.api.promises.add("discoInitialized"),s.api.promises.add("streamFeaturesAdded"),s.DiscoEntity=So.Model.extend({idAttribute:"jid",initialize(e,t){this.waitUntilFeaturesDiscovered=Eo.getResolveablePromise(),this.dataforms=new s.Collection;let o="converse.dataforms-".concat(this.get("jid"));this.dataforms.browserStorage=s.createStore(o,"session"),this.features=new s.Collection,o="converse.features-".concat(this.get("jid")),this.features.browserStorage=s.createStore(o,"session"),this.listenTo(this.features,"add",this.onFeatureAdded),this.fields=new s.Collection,o="converse.fields-".concat(this.get("jid")),this.fields.browserStorage=s.createStore(o,"session"),this.listenTo(this.fields,"add",this.onFieldAdded),this.identities=new s.Collection,o="converse.identities-".concat(this.get("jid")),this.identities.browserStorage=s.createStore(o,"session"),this.fetchFeatures(t),this.items=new s.DiscoEntities,o="converse.disco-items-".concat(this.get("jid")),this.items.browserStorage=s.createStore(o,"session"),this.items.fetch()},async getIdentity(e,t){return await this.waitUntilFeaturesDiscovered,this.identities.findWhere({category:e,type:t})},async hasFeature(e){if(await this.waitUntilFeaturesDiscovered,this.features.findWhere({var:e}))return this},onFeatureAdded(e){e.entity=this,s.api.trigger("serviceDiscovered",e)},onFieldAdded(e){e.entity=this,s.api.trigger("discoExtensionFieldDiscovered",e)},async fetchFeatures(e){if(e.ignore_cache)this.queryInfo();else{const e=this.features.browserStorage.name,t=await this.features.browserStorage.store.getItem(e);t&&0===t.length||null===t?this.queryInfo():(this.features.fetch({add:!0,success:()=>{this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),this.identities.fetch({add:!0}))}},async queryInfo(){let e;try{e=await s.api.disco.info(this.get("jid"),null)}catch(e){return vt.error(e),void this.waitUntilFeaturesDiscovered.resolve(this)}this.onInfo(e)},onDiscoItems(e){Wt()("query[xmlns=\"".concat(wo.NS.DISCO_ITEMS,"\"] item"),e).forEach(e=>{if(!e.getAttribute("node")){const t=e.getAttribute("jid");if(void 0===this.items.get(t)){const e=s.disco_entities.get(t);e?this.items.add(e):this.items.create({jid:t})}}})},async queryForItems(){if(!Object(ke.isEmpty)(this.identities.where({category:"server"}))){const e=await s.api.disco.items(this.get("jid"));this.onDiscoItems(e)}},onInfo(e){Array.from(e.querySelectorAll("identity")).forEach(e=>{this.identities.create({category:e.getAttribute("category"),type:e.getAttribute("type"),name:e.getAttribute("name")})}),Wt()("x[type=\"result\"][xmlns=\"".concat(wo.NS.XFORM,"\"]"),e).forEach(e=>{const t={};Wt()("field",e).forEach(e=>{t[e.getAttribute("var")]={value:Object(ke.get)(e.querySelector("value"),"textContent"),type:e.getAttribute("type")}}),this.dataforms.create(t)}),e.querySelector("feature[var=\"".concat(wo.NS.DISCO_ITEMS,"\"]"))&&this.queryForItems(),Array.from(e.querySelectorAll("feature")).forEach(t=>{this.features.create({var:t.getAttribute("var"),from:e.getAttribute("from")})}),Wt()("x[type=\"result\"][xmlns=\"jabber:x:data\"] field",e).forEach(t=>{this.fields.create({var:t.getAttribute("var"),value:Object(ke.get)(t.querySelector("value"),"textContent"),from:e.getAttribute("from")})}),this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),s.DiscoEntities=s.Collection.extend({model:s.DiscoEntity,fetchEntities(){return new Promise((e,t)=>{this.fetch({add:!0,success:e,error(o,n){vt.error(n),t(new Error("Could not fetch disco entities"))}})})}});const r=this;r._identities=[],r._features=[],s.api.listen.on("userSessionInitialized",async()=>{t(),s.connfeedback.get("connection_status")===wo.Status.ATTACHED&&(await new Promise((e,t)=>s.stream_features.fetch({success:e,error:t})),o())}),s.api.listen.on("beforeResourceBinding",function(){t(),Array.from(s.connection.features.childNodes).forEach(e=>{s.stream_features.create({name:e.nodeName,xmlns:e.getAttribute("xmlns")})}),o()}),s.api.listen.on("reconnected",a),s.api.listen.on("connected",a),s.api.listen.on("beforeTearDown",async()=>{s.api.promises.add("streamFeaturesAdded"),s.stream_features&&(await s.stream_features.clearSession(),delete s.stream_features)}),s.api.listen.on("clearSession",()=>{s.shouldClearCache()&&s.disco_entities&&(Array.from(s.disco_entities.models).forEach(t=>t.features.clearSession()),Array.from(s.disco_entities.models).forEach(t=>t.identities.clearSession()),Array.from(s.disco_entities.models).forEach(t=>t.dataforms.clearSession()),Array.from(s.disco_entities.models).forEach(t=>t.fields.clearSession()),s.disco_entities.clearSession(),delete s.disco_entities)}),Object.assign(s.api,{disco:{stream:{async getFeature(e,t){if(await s.api.waitUntil("streamFeaturesAdded"),!e||!t)throw new Error("name and xmlns need to be provided when calling disco.stream.getFeature");if(void 0===s.stream_features&&!s.api.connection.connected()){const o="Tried to get feature ".concat(e," ").concat(t," but _converse.stream_features has been torn down");return void vt.warn(o)}return s.stream_features.findWhere({name:e,xmlns:t})}},own:{identities:{add(e,t,o,n){for(var a=0;a<r._identities.length;a++)if(r._identities[a].category==e&&r._identities[a].type==t&&r._identities[a].name==o&&r._identities[a].lang==n)return!1;r._identities.push({category:e,type:t,name:o,lang:n})},clear(){r._identities=[]},get(){return r._identities}},features:{add(e){for(var t=0;t<r._features.length;t++)if(r._features[t]==e)return!1;r._features.push(e)},clear(){r._features=[]},get(){return r._features}}},info(e,t){const o={xmlns:wo.NS.DISCO_INFO};t&&(o.node=t);const n=ko({from:s.connection.jid,to:e,type:"get"}).c("query",o);return s.api.sendIQ(n)},items(e,t){const o={xmlns:wo.NS.DISCO_ITEMS};return t&&(o.node=t),s.api.sendIQ(ko({from:s.connection.jid,to:e,type:"get"}).c("query",o))},entities:{async get(e){let t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(await s.api.waitUntil("discoInitialized"),!e)return s.disco_entities;if(void 0===s.disco_entities&&!s.api.connection.connected()){const t="Tried to look up entity ".concat(e," but _converse.disco_entities has been torn down");return void vt.warn(t)}const o=s.disco_entities.get(e);return o||!t?o:s.api.disco.entities.create(e)},create(e,t){return s.disco_entities.create({jid:e},t)}},features:{async get(e,t){if(!t)throw new TypeError("You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let o=await s.api.disco.entities.get(t,!0);if(void 0===s.disco_entities&&!s.api.connection.connected()){const o="Tried to get feature ".concat(e," for ").concat(t," but _converse.disco_entities has been torn down");return void vt.warn(o)}o=await o.waitUntilFeaturesDiscovered;const n=[...o.items.map(t=>t.hasFeature(e)),o.hasFeature(e)],a=await Promise.all(n);return a.filter(ke.isObject)}},async supports(e,t){const o=await s.api.disco.features.get(e,t);return 0<o.length},async refreshFeatures(e){if(!e)throw new TypeError("api.disco.refreshFeatures: You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let t=await s.api.disco.entities.get(e);return t?(t.features.reset(),t.fields.reset(),t.identities.reset(),!t.waitUntilFeaturesDiscovered.isPending&&(t.waitUntilFeaturesDiscovered=Eo.getResolveablePromise()),t.queryInfo()):t=await s.api.disco.entities.create(e,{ignore_cache:!0}),t.waitUntilFeaturesDiscovered},async getFeatures(e){if(!e)throw new TypeError("api.disco.getFeatures: You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let t=await s.api.disco.entities.get(e,!0);return t=await t.waitUntilFeaturesDiscovered,t.features},async getFields(e){if(!e)throw new TypeError("api.disco.getFields: You need to provide an entity JID");await s.api.waitUntil("discoInitialized");let t=await s.api.disco.entities.get(e,!0);return t=await t.waitUntilFeaturesDiscovered,t.fields},async getIdentity(t,o,n){const a=await s.api.disco.entities.get(n,!0);if(void 0===a&&!s.api.connection.connected()){const e="Tried to look up category ".concat(t," for ").concat(n," but _converse.disco_entities has been torn down");return void vt.warn(e)}return a.getIdentity(t,o)}}})}});var Co=function(){function e(e,t){return document.createTextNode(t?e.replace(m,""):e)}function t(e){return e.replace(f,r)}function o(e,t){return"".concat(t.base,t.size,"/",e,t.ext)}function n(e,t){for(var o=e.childNodes,a=o.length,s,i;a--;)s=o[a],i=s.nodeType,3===i?t.push(s):1===i&&!("ownerSVGElement"in s)&&!b.test(s.nodeName.toLowerCase())&&n(s,t);return t}function a(e){return p(0>e.indexOf("\u200D")?e.replace(m,""):e)}function s(t,o){for(var s=n(t,[]),r=s.length,l,d,c,p,u,m,g,_,f,b,v,y,x;r--;){for(c=!1,p=document.createDocumentFragment(),u=s[r],m=u.nodeValue,_=0;g=h.exec(m);){if(f=g.index,f!==_&&p.appendChild(e(m.slice(_,f),!0)),v=g[0],y=a(v),_=f+v.length,x=o.callback(y,o),y&&x){for(d in b=new Image,b.onerror=o.onerror,b.setAttribute("draggable","false"),l=o.attributes(v,y),l)l.hasOwnProperty(d)&&0!==d.indexOf("on")&&!b.hasAttribute(d)&&b.setAttribute(d,l[d]);b.className=o.className,b.alt=v,b.src=x,c=!0,p.appendChild(b)}b||p.appendChild(e(v,!1)),b=null}c&&(_<m.length&&p.appendChild(e(m.slice(_),!0)),u.parentNode.replaceChild(p,u))}return t}function i(e,o){return c(e,function(e){var n=e,s=a(e),i=o.callback(s,o),r,l;if(s&&i){for(l in n="<img ".concat("class=\"",o.className,"\" ","draggable=\"false\" ","alt=\"",e,"\""," src=\"",i,"\""),r=o.attributes(e,s),r)r.hasOwnProperty(l)&&0!==l.indexOf("on")&&-1===n.indexOf(" "+l+"=")&&(n=n.concat(" ",l,"=\"",t(r[l]),"\""));n=n.concat("/>")}return n})}function r(e){return g[e]}function l(){return null}function d(e){return"number"==typeof e?e+"x"+e:e}function c(e,t){return(e+"").replace(h,t)}function p(e,t){for(var o=[],n=0,a=0,s=0;s<e.length;)n=e.charCodeAt(s++),a?(o.push((65536+(a-55296<<10)+(n-56320)).toString(16)),a=0):55296<=n&&56319>=n?a=n:o.push(n.toString(16));return o.join(t||"-")}var u={base:"https://twemoji.maxcdn.com/v/12.1.4/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(e){var t="string"==typeof e?parseInt(e,16):e;return 65536>t?v(t):(t-=65536,v(55296+(t>>10),56320+(1023&t)))},toCodePoint:p},onerror:function(){this.parentNode&&this.parentNode.replaceChild(e(this.alt,!1),this)},parse:function(e,t){return t&&"function"!=typeof t||(t={callback:t}),("string"==typeof e?i:s)(e,{callback:t.callback||o,attributes:"function"==typeof t.attributes?t.attributes:l,base:"string"==typeof t.base?t.base:u.base,ext:t.ext||u.ext,size:t.folder||d(t.size||u.size),className:t.className||u.className,onerror:t.onerror||u.onerror})},replace:c,test:function(e){h.lastIndex=0;var t=h.test(e);return h.lastIndex=0,t}},g={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},h=/(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69])(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5\udeeb\udeec\udef4-\udefa\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd71\udd73-\udd76\udd7a-\udda2\udda5-\uddaa\uddae-\uddb4\uddb7\uddba\uddbc-\uddca\uddd0\uddde-\uddff\ude70-\ude73\ude78-\ude7a\ude80-\ude82\ude90-\ude95]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,m=/\uFE0F/g,_=String.fromCharCode(8205),f=/[&<>'"]/g,b=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,v=String.fromCharCode;return u}(),Ao=Co;const{Backbone:To}=mo.env,jo=mo.env.utils,No={"*\\0/*":"1f646","*\\O/*":"1f646","-___-":"1f611",":'-)":"1f602","':-)":"1f605","':-D":"1f605",">:-)":"1f606","':-(":"1f613",">:-(":"1f620",":'-(":"1f622","O:-)":"1f607","0:-3":"1f607","0:-)":"1f607","0;^)":"1f607","O;-)":"1f607","0;-)":"1f607","O:-3":"1f607","-__-":"1f611",":-Þ":"1f61b","</3":"1f494",":')":"1f602",":-D":"1f603","':)":"1f605","'=)":"1f605","':D":"1f605","'=D":"1f605",">:)":"1f606",">;)":"1f606",">=)":"1f606",";-)":"1f609","*-)":"1f609",";-]":"1f609",";^)":"1f609","':(":"1f613","'=(":"1f613",":-*":"1f618",":^*":"1f618",">:P":"1f61c","X-P":"1f61c",">:[":"1f61e",":-(":"1f61e",":-[":"1f61e",">:(":"1f620",":'(":"1f622",";-(":"1f622",">.<":"1f623","#-)":"1f635","%-)":"1f635","X-)":"1f635","\\0/":"1f646","\\O/":"1f646","0:3":"1f607","0:)":"1f607","O:)":"1f607","O=)":"1f607","O:3":"1f607","B-)":"1f60e","8-)":"1f60e","B-D":"1f60e","8-D":"1f60e","-_-":"1f611",">:\\":"1f615",">:/":"1f615",":-/":"1f615",":-.":"1f615",":-P":"1f61b",":Þ":"1f61b",":-b":"1f61b",":-O":"1f62e",O_O:"1f62e",">:O":"1f62e",":-X":"1f636",":-#":"1f636",":-)":"1f642","(y)":"1f44d","<3":"2764",":D":"1f603","=D":"1f603",";)":"1f609","*)":"1f609",";]":"1f609",";D":"1f609",":*":"1f618","=*":"1f618",":(":"1f61e",":[":"1f61e","=(":"1f61e",":@":"1f620",";(":"1f622","D:":"1f628",":$":"1f633","=$":"1f633","#)":"1f635","%)":"1f635","X)":"1f635","B)":"1f60e","8)":"1f60e",":/":"1f615",":\\":"1f615","=/":"1f615","=\\":"1f615",":L":"1f615","=L":"1f615",":P":"1f61b","=P":"1f61b",":b":"1f61b",":O":"1f62e",":X":"1f636",":#":"1f636","=X":"1f636","=#":"1f636",":)":"1f642","=]":"1f642","=)":"1f642",":]":"1f642"},Mo=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)"+"(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:'\\-\\)|'\\:\\-\\)|'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-\xDE|\\:\\-\xDE|\\<\\/3|<\\/3|\\:'\\)|\\:\\-D|'\\:\\)|'\\=\\)|'\\:D|'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|'\\:\\(|'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:\xDE|\\:\xDE|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])"+"(?=\\s|$|[!,.?]))","gi");mo.plugins.add("converse-emoji",{async initialize(){const{_converse:e}=this,{___:t}=e;e.api.settings.update({emoji_image_path:Ao.base,emoji_categories:{recent:":clock1:",smileys:":grinning:",people:":thumbsup:",activity:":soccer:",travel:":motorcycle:",objects:":bomb:",nature:":rainbow:",food:":hotdog:",symbols:":musical_note:",flags:":flag_ac:",custom:null},emoji_category_labels:{recent:t("Recent"),smileys:t("Smileys and emotions"),people:t("People"),activity:t("Activities"),travel:t("Travel"),objects:t("Objects"),nature:t("Animals and nature"),food:t("Food and drink"),symbols:t("Symbols"),flags:t("Flags"),custom:t("Stickers")}}),e.api.promises.add("emojisInitialized",!1),Ao.base=e.emoji_image_path,e.EmojiPicker=To.Model.extend({defaults:{current_category:"smileys",current_skintone:"",scroll_position:0}}),e.emojis={};const n={};Object.assign(jo,{addEmoji(e){return jo.getEmojiRenderer()(e)},getEmojiRenderer(){const t={attributes:e=>{const t=Ao.convert.toCodePoint(e);return{title:"".concat(jo.getEmojisByAtrribute("cp")[t].sn," ").concat(e)}}},o=jo.shortnamesToEmojis;return e.use_system_emojis?o:e=>Ao.parse(o(e),t)},shortnamesToEmojis(t){let o=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];return t=t.replace(e.emojis.shortnames_regex,t=>{if("undefined"==typeof t||""===t||!e.emoji_shortnames.includes(t))return t;const n=e.emojis_map[t].cp;return n?oe(n.toUpperCase()):o?t:"<img class=\"emoji\" draggable=\"false\" alt=\"".concat(t,"\" src=\"").concat(e.emojis_map[t].url,"\"/>")}),t=t.replace(Mo,(e,t,o,n)=>{if("undefined"==typeof n||""===n||!(jo.unescapeHTML(n)in No))return e;n=jo.unescapeHTML(n);const a=No[n].toUpperCase();return o+oe(a)}),t},shortnameToUnicode(e){return this.shortnamesToEmojis(e,!0)},isOnlyEmojis(e){const t=e.trim().split(/\s+/);if(0===t.length||3<t.length)return!1;const o=t.filter(e=>{const t=Ao.parse(jo.shortnameToUnicode(e)),o=t.match(/<img class="emoji" draggable="false" alt=".*?" src=".*?\.png"\/>/);return!o||1!==o.length});return 0===o.length},getEmojisByAtrribute(t){if(n[t])return n[t];if("category"===t)return e.emojis.json;const o=e.emojis_list.map(o=>o[t]).filter((e,t,o)=>o.indexOf(e)==t);return n[t]={},o.forEach(o=>n[t][o]=lt.a.find(e.emojis_list,e=>e[t]===o)),n[t]}});const{default:a}=await o.e(129).then(o.t.bind(null,496,3));e.emojis.json=a,e.emojis.categories=Object.keys(e.emojis.json),e.emojis_map=e.emojis.categories.reduce((t,o)=>Object.assign(t,e.emojis.json[o]),{}),e.emojis_list=Object.values(e.emojis_map),e.emojis_list.sort((e,t)=>e.sn<t.sn?-1:e.sn>t.sn?1:0),e.emoji_shortnames=e.emojis_list.map(e=>e.sn);e.emojis.shortnames_regex=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+(()=>e.emoji_shortnames.map(e=>e.replace(/[+]/g,"\\$&")).join("|"))()+")","gi"),e.emojis.toned=function(){return e.toned_emojis||(e.toned_emojis=lt.a.uniq(Object.values(e.emojis.json.people).filter(e=>e.sn.includes("_tone")).map(e=>e.sn.replace(/_tone[1-5]/,"")))),e.toned_emojis}(),e.api.trigger("emojisInitialized"),e.api.listen.on("clearSession",()=>{e.emojipicker&&(e.emojipicker.destroy(),delete e.emojipicker)})}});const{Strophe:Io,sizzle:Oo}=mo.env;var Ro={computeAffiliationsDelta(e,t,o,n){const a=o.map(e=>e.jid),s=n.map(e=>e.jid);let i=Object(ke.difference)(a,s).map(e=>o[Object(ke.indexOf)(a,e)]);return e||(i=i.concat(o.filter(e=>{const t=Object(ke.indexOf)(s,e.jid);return!!(0<=t)&&e.affiliation!==n[t].affiliation}))),t&&(i=i.concat(Object(ke.difference)(s,a).map(e=>({jid:e,affiliation:"none"})))),i},parseMemberListIQ(e){return Oo("query[xmlns=\"".concat(Io.NS.MUC_ADMIN,"\"] item"),e).map(e=>{const t={affiliation:e.getAttribute("affiliation")},o=e.getAttribute("jid");Qt.isValidJID(o)?t.jid=o:t.nick=o;const n=e.getAttribute("nick");n&&(t.nick=n);const a=e.getAttribute("role");return a&&(t.role=n),t})}},Do=o(120),Lo=o.n(Do);Qt.webForm2xForm=function(e){let t;return t="checkbox"===e.getAttribute("type")?e.checked&&1||0:"TEXTAREA"==e.tagName?lt.a.filter(e.value.split("\n"),lt.a.trim):"SELECT"==e.tagName?Qt.getSelectValues(e):e.value,Qt.stringToNode(Lo()({name:e.getAttribute("name"),value:t}))};var Po=Qt;const qo={moderator:1,participant:2,visitor:3,none:2},{Strophe:Bo,Backbone:zo,$iq:Fo,$build:Ho,$msg:Uo,$pres:Vo,sizzle:Wo}=mo.env;Bo.addNamespace("MUC_ADMIN",Bo.NS.MUC+"#admin"),Bo.addNamespace("MUC_OWNER",Bo.NS.MUC+"#owner"),Bo.addNamespace("MUC_REGISTER","jabber:iq:register"),Bo.addNamespace("MUC_ROOMCONF",Bo.NS.MUC+"#roomconfig"),Bo.addNamespace("MUC_USER",Bo.NS.MUC+"#user"),mo.MUC_NICK_CHANGED_CODE="303",mo.ROOM_FEATURES=["passwordprotected","unsecured","hidden","publicroom","membersonly","open","persistent","temporary","nonanonymous","semianonymous","moderated","unmoderated","mam_enabled"],mo.ROOMSTATUS={CONNECTED:0,CONNECTING:1,NICKNAME_REQUIRED:2,PASSWORD_REQUIRED:3,DISCONNECTED:4,ENTERED:5,DESTROYED:6},mo.plugins.add("converse-muc",{dependencies:["converse-chatboxes","converse-chat","converse-disco","converse-controlbox"],overrides:{ChatBoxes:{model(e,t){const{_converse:o}=this.__super__;return e&&e.type==o.CHATROOMS_TYPE?new o.ChatRoom(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){async function e(e,t){t.type=o.CHATROOMS_TYPE,t.id=e;const n=await o.api.rooms.get(e,t,!0);return n.maybeShow(!0),n}function t(){return o.chatboxes.filter(e=>e.get("type")===o.CHATROOMS_TYPE).forEach(e=>e.session.save({connection_status:mo.ROOMSTATUS.DISCONNECTED}))}const{_converse:o}=this,{__:n,___:a}=o;if(o.api.settings.update({allow_muc:!0,allow_muc_invitations:!0,auto_join_on_invite:!1,auto_join_rooms:[],auto_register_muc_nickname:!1,locked_muc_domain:!1,muc_domain:void 0,muc_fetch_members:!0,muc_history_max_stanzas:void 0,muc_instant_rooms:!0,muc_nickname_from_jid:!1,muc_show_logs_before_join:!1}),o.api.promises.add(["roomsAutoJoined"]),o.locked_muc_domain&&!Object(ke.isString)(o.muc_domain))throw new Error("Config Error: it makes no sense to set locked_muc_domain to true when muc_domain is not set");o.muc={info_messages:{100:n("This groupchat is not anonymous"),102:n("This groupchat now shows unavailable members"),103:n("This groupchat does not show unavailable members"),104:n("The groupchat configuration has changed"),170:n("Groupchat logging is now enabled"),171:n("Groupchat logging is now disabled"),172:n("This groupchat is now no longer anonymous"),173:n("This groupchat is now semi-anonymous"),174:n("This groupchat is now fully-anonymous"),201:n("A new groupchat has been created")},new_nickname_messages:{210:a("Your nickname has been automatically set to %1$s"),303:a("Your nickname has been changed to %1$s")},disconnect_messages:{301:n("You have been banned from this groupchat"),307:n("You have been kicked from this groupchat"),321:n("You have been removed from this groupchat because of an affiliation change"),322:n("You have been removed from this groupchat because the groupchat has changed to members-only and you're not a member"),332:n("You have been removed from this groupchat because the service hosting it is being shut down")},action_info_messages:{301:a("%1$s has been banned"),303:a("%1$s's nickname has changed"),307:a("%1$s has been kicked out"),321:a("%1$s has been removed because of an affiliation change"),322:a("%1$s has been removed for not being a member")}},o.router.route("converse/room?jid=:jid",async function(e){return Po.isValidMUCJID(e)?void(await o.api.waitUntil("roomsAutoJoined"),o.allow_bookmarks&&(await o.api.waitUntil("bookmarksInitialized")),o.api.rooms.open(e)):vt.warn("invalid jid \"".concat(e,"\" provided in url fragment"))}),o.getDefaultMUCNickname=function(){if(!o.xmppstatus)throw new Error("Can't call _converse.getDefaultMUCNickname before the statusInitialized has been fired.");const e=o.xmppstatus.getNickname();return e?e:o.muc_nickname_from_jid?Bo.unescapeNode(Bo.getNodeFromJid(o.bare_jid)):void 0},o.ChatRoomMessage=o.Message.extend({initialize(){this.get("file")&&this.on("change:put",this.uploadFile,this),this.setTimerForEphemeralMessage()||this.setOccupant(),o.api.trigger("chatRoomMessageInitialized",this)},onOccupantRemoved(){this.stopListening(this.occupant),delete this.occupant;const e=Object(ke.get)(this,"collection.chatbox");return e?void this.listenTo(e.occupants,"add",this.onOccupantAdded):vt.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())))},onOccupantAdded(e){if(e.get("nick")===Bo.getResourceFromJid(this.get("from"))){this.occupant=e,this.listenTo(this.occupant,"destroy",this.onOccupantRemoved);const t=Object(ke.get)(this,"collection.chatbox");if(!t)return vt.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));this.stopListening(t.occupants,"add",this.onOccupantAdded)}},setOccupant(){if("groupchat"===this.get("type")){const e=Object(ke.get)(this,"collection.chatbox");if(!e)return vt.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));const t=Bo.getResourceFromJid(this.get("from"));this.occupant=e.occupants.findWhere({nick:t}),this.occupant?this.listenTo(this.occupant,"destroy",this.onOccupantRemoved):this.listenTo(e.occupants,"add",this.onOccupantAdded)}}});const s=zo.Model.extend({defaults(){return{connection_status:mo.ROOMSTATUS.DISCONNECTED}}});if(o.ChatRoomMessages=o.Collection.extend({model:o.ChatRoomMessage,comparator:"time"}),o.ChatRoom=o.ChatBox.extend({messagesCollection:o.ChatRoomMessages,defaults(){return{num_unread_general:0,bookmarked:!1,chat_state:void 0,description:"",hidden:["mobile","fullscreen"].includes(o.view_mode),message_type:"groupchat",name:"",num_unread:0,roomconfig:{},time_sent:new Date(0).toISOString(),time_opened:this.get("time_opened")||new Date().getTime(),type:o.CHATROOMS_TYPE}},async initialize(){this.initialized=Po.getResolveablePromise(),this.set("box_id","box-".concat(btoa(this.get("jid")))),this.initMessages(),this.initOccupants(),this.initFeatures(),this.registerHandlers(),this.on("change:chat_state",this.sendChatState,this),await this.restoreSession(),this.session.on("change:connection_status",this.onConnectionStatusChanged,this);const e=await this.restoreFromCache();e||this.join(),await o.api.trigger("chatRoomInitialized",this,{Synchronous:!0}),this.initialized.resolve()},async restoreFromCache(){return this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&(await this.isJoined())?(await new Promise(e=>this.features.fetch({success:e,error:e})),await this.fetchOccupants(),await this.fetchMessages(),!0):(await this.clearCache(),!1)},async join(e,t){if(this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED)return this;if(await this.refreshRoomFeatures(),e=await this.getAndPersistNickname(e),!e)return Po.safeSave(this.session,{connection_status:mo.ROOMSTATUS.NICKNAME_REQUIRED}),o.muc_show_logs_before_join&&(await this.fetchMessages()),this;const n=Vo({from:o.connection.jid,to:this.getRoomJIDAndNick()}).c("x",{xmlns:Bo.NS.MUC}).c("history",{maxstanzas:this.features.get("mam_enabled")?0:o.muc_history_max_stanzas}).up();return t&&n.cnode(Bo.xmlElement("password",[],t)),this.session.save("connection_status",mo.ROOMSTATUS.CONNECTING),o.api.send(n),this},async clearCache(){this.session.save("connection_status",mo.ROOMSTATUS.DISCONNECTED),this.occupants.length?this.occupants.filter(e=>!e.isMember()).forEach(e=>e.destroy()):this.occupants.clearSession(),o.clear_messages_on_reconnection&&(await this.clearMessages())},rejoin(){return this.clearCache(),this.join()},async onConnectionStatusChanged(){this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&(o.muc_fetch_members&&(await this.occupants.fetchMembers()),await this.fetchMessages(),o.api.trigger("enteredNewRoom",this),o.auto_register_muc_nickname&&(await o.api.disco.supports(Bo.NS.MUC_REGISTER,this.get("jid")))&&this.registerNickname())},async onReconnection(){this.registerHandlers(),await this.rejoin(),this.announceReconnection()},restoreSession(){const e="muc.session-".concat(o.bare_jid,"-").concat(this.get("jid"));return this.session=new s({id:e}),this.session.browserStorage=o.createStore(e,"session"),new Promise(e=>this.session.fetch({success:e,error:e}))},initFeatures(){const e="converse.muc-features-".concat(o.bare_jid,"-").concat(this.get("jid"));this.features=new zo.Model(Object.assign({id:e},Object(ke.zipObject)(mo.ROOM_FEATURES,mo.ROOM_FEATURES.map(()=>!1)))),this.features.browserStorage=o.createStore(e,"session")},initOccupants(){this.occupants=new o.ChatRoomOccupants;const e="converse.occupants-".concat(o.bare_jid).concat(this.get("jid"));this.occupants.browserStorage=o.createStore(e,"session"),this.occupants.chatroom=this},fetchOccupants(){return this.occupants.fetched=new Promise(e=>{this.occupants.fetch({add:!0,silent:!0,success:e,error:e})}),this.occupants.fetched},handleAffiliationChangedMessage(e){const t=Wo("x[xmlns=\"".concat(Bo.NS.MUC_USER,"\"] item"),e).pop();if(t){const o=e.getAttribute("from"),n=e.getAttribute("type"),a=t.getAttribute("affiliation"),s=t.getAttribute("jid"),i={from:o,type:n,affiliation:a,nick:Bo.getNodeFromJid(s),states:[],show:"unavailable"==n?"offline":"online",role:t.getAttribute("role"),jid:Bo.getBareJidFromJid(s),resource:Bo.getResourceFromJid(s)},r=this.occupants.findOccupant({jid:i.jid});r?r.save(i):this.occupants.create(i)}},registerHandlers(){const e=this.get("jid");this.removeHandlers(),this.presence_handler=o.connection.addHandler(e=>this.onPresence(e)||!0,null,"presence",null,null,e,{ignoreNamespaceFragment:!0,matchBareFromJid:!0}),this.message_handler=o.connection.addHandler(e=>Wo("message > result[xmlns=\"".concat(Bo.NS.MAM,"\"]"),e).pop()?(vt.warn("received a mam message with type \"chat\"."),!0):(this.onMessage(e),!0),null,"message","groupchat",null,e,{matchBareFromJid:!0}),this.affiliation_message_handler=o.connection.addHandler(e=>this.handleAffiliationChangedMessage(e)||!0,Bo.NS.MUC_USER,"message",null,null,e)},removeHandlers(){return this.message_handler&&(o.connection&&o.connection.deleteHandler(this.message_handler),delete this.message_handler),this.presence_handler&&(o.connection&&o.connection.deleteHandler(this.presence_handler),delete this.presence_handler),this.affiliation_message_handler&&(o.connection&&o.connection.deleteHandler(this.affiliation_message_handler),delete this.affiliation_message_handler),this},getDisplayName(){const e=this.get("name");return e?e:"hidden"===o.locked_muc_domain?Bo.getNodeFromJid(this.get("jid")):this.get("jid")},sendTimedMessage(e){"function"==typeof e.tree&&(e=e.tree());let t=e.getAttribute("id");t||(t=this.getUniqueId("sendIQ"),e.setAttribute("id",t));const n=Po.getResolveablePromise(),a=o.connection.addTimedHandler(o.STANZA_TIMEOUT,()=>(o.connection.deleteHandler(s),n.reject(new o.TimeoutError("Timeout Error: No response from server")),!1)),s=o.connection.addHandler(e=>{a&&o.connection.deleteTimedHandler(a),"groupchat"===e.getAttribute("type")?n.resolve(e):n.reject(e)},null,"message",["error","groupchat"],t);return o.api.send(e),n},sendRetractionMessage(e){const t=e.get("origin_id");if(!t)throw new Error("Can't retract message without a XEP-0359 Origin ID");const o=Uo({id:Po.getUniqueId(),to:this.get("jid"),type:"groupchat"}).c("store",{xmlns:Bo.NS.HINTS}).up().c("apply-to",{id:t,xmlns:Bo.NS.FASTEN}).c("retract",{xmlns:Bo.NS.RETRACT});return this.sendTimedMessage(o)},sendRetractionIQ(e,t){const n=Fo({to:this.get("jid"),type:"set"}).c("apply-to",{id:e.get("stanza_id ".concat(this.get("jid"))),xmlns:Bo.NS.FASTEN}).c("moderate",{xmlns:Bo.NS.MODERATE}).c("retract",{xmlns:Bo.NS.RETRACT}).up().c("reason").t(t);return o.api.sendIQ(n,null,!1)},sendDestroyIQ(e,t){const n=Ho("destroy");t&&n.attrs({jid:t});const a=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_OWNER}).cnode(n.node);return e&&0<e.length&&a.c("reason",e),o.api.sendIQ(a)},async leave(e){if(this.features.destroy(),this.occupants.clearSession(),o.disco_entities){const e=o.disco_entities.get(this.get("jid"));e&&(await new Promise((t,o)=>e.destroy({success:t,error:o})))}o.api.connection.connected()&&this.sendUnavailablePresence(e),Po.safeSave(this.session,{connection_status:mo.ROOMSTATUS.DISCONNECTED}),this.removeHandlers()},async close(){return await new Promise(t=>this.session.destroy({success:t,error:(o,n)=>{vt.error(n),t()}})),await new Promise(t=>this.features.destroy({success:t,error:(o,n)=>{vt.error(n),t()}})),o.ChatBox.prototype.close.call(this)},canRetractMessages(){const e=this.getOwnOccupant();return e&&e.isModerator()&&o.api.disco.supports(Bo.NS.MODERATE,this.get("jid"))},sendUnavailablePresence(e){const t=Vo({type:"unavailable",from:o.connection.jid,to:this.getRoomJIDAndNick()});null!==e&&t.c("status",e),o.connection.sendPresence(t)},getReferenceForMention(e,t){const o=Po.getLongestSubstring(e,this.occupants.map(e=>e.getDisplayName()));if(!o)return null;if((e[o.length]||"").match(/[A-Za-zäëïöüâêîôûáéíóúàèìòùÄËÏÖÜÂÊÎÔÛÁÉÍÓÚÀÈÌÒÙ0-9]/i))return null;const n=this.occupants.findOccupant({nick:o})||this.occupants.findOccupant({jid:o});if(!n)return null;const a={begin:t,end:t+o.length,value:o,type:"mention"};return a.uri=n.get("jid")?encodeURI("xmpp:".concat(n.get("jid"))):encodeURI("xmpp:".concat(this.get("jid"),"/").concat(n.get("nick"))),a},extractReference(e,t){for(let o=t;o<e.length;o++)if("@"===e[o]&&(0===o||" "===e[o-1])){const t=e.slice(o+1),n=this.getReferenceForMention(t,o);if(n)return[e.slice(0,o)+t,n,o]}},parseTextForReferences(e){const t=[];for(let o=0;o<(e||"").length;){const n=this.extractReference(e,o);if(n)e=n[0],t.push(n[1]),o=n[2];else break}return[e,t]},getOutgoingMessageAttributes(e,t){const n=this.get("composing_spoiler");var a;[e,a]=this.parseTextForReferences(e);const s=Po.getUniqueId();return{id:s,msgid:s,origin_id:s,from:"".concat(this.get("jid"),"/").concat(this.get("nick")),fullname:this.get("nick"),is_only_emojis:!!e&&Po.isOnlyEmojis(e),is_spoiler:n,message:e?Po.httpToGeoUri(Po.shortnameToUnicode(e),o):void 0,nick:this.get("nick"),references:a,sender:"me",spoiler_hint:n?t:void 0,type:"groupchat"}},getRoomJIDAndNick(){const e=this.get("nick"),t=Bo.getBareJidFromJid(this.get("jid"));return t+(null===e?"":"/".concat(e))},sendChatState(){if(o.send_chat_state_notifications&&this.get("chat_state")&&this.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&(!this.features.get("moderated")||"visitor"!==this.getOwnRole())){const e=o.send_chat_state_notifications;if(!Array.isArray(e)||e.includes(this.get("chat_state"))){const e=this.get("chat_state");e===o.GONE||o.api.send(Uo({to:this.get("jid"),type:"groupchat"}).c(e,{xmlns:Bo.NS.CHATSTATES}).up().c("no-store",{xmlns:Bo.NS.HINTS}).up().c("no-permanent-store",{xmlns:Bo.NS.HINTS}))}}},directInvite(e,t){this.features.get("membersonly")&&this.updateMemberLists([{jid:e,affiliation:"member",reason:t}]);const n={xmlns:"jabber:x:conference",jid:this.get("jid")};null!==t&&(n.reason=t),this.get("password")&&(n.password=this.get("password"));const a=Uo({from:o.connection.jid,to:e,id:Po.getUniqueId()}).c("x",n);o.api.send(a),o.api.trigger("roomInviteSent",{room:this,recipient:e,reason:t})},async refreshRoomFeatures(){return await o.api.disco.refreshFeatures(this.get("jid")),this.getRoomFeatures()},async getRoomFeatures(){let e;try{e=await o.api.disco.getIdentity("conference","text",this.get("jid"))}catch(t){return vt.error(t)}const t=await o.api.disco.getFields(this.get("jid"));this.save({name:e&&e.get("name"),description:Object(ke.get)(t.findWhere({var:"muc#roominfo_description"}),"attributes.value")});const n=await o.api.disco.getFeatures(this.get("jid")),a=Object.assign(Object(ke.zipObject)(mo.ROOM_FEATURES,mo.ROOM_FEATURES.map(()=>!1)),{fetched:new Date().toISOString()});n.each(e=>{const t=e.get("var");return t.startsWith("muc_")?void(a[t.replace("muc_","")]=!0):void(t===Bo.NS.MAM&&(a.mam_enabled=!0))}),a.description=Object(ke.get)(t.findWhere({var:"muc#roominfo_description"}),"attributes.value"),this.features.save(a)},setAffiliation(e,t){return t=t.filter(t=>void 0===t.affiliation||t.affiliation===e),Promise.all(t.map(t=>this.sendAffiliationIQ(e,t)))},saveConfiguration(e){const t=e?Wo(":input:not([type=button]):not([type=submit])",e):[],o=t.map(Po.webForm2xForm);return this.sendConfiguration(o)},addFieldValue(e){const t=e.getAttribute("type");if("fixed"===t)return e;const o=e.getAttribute("var").replace("muc#roomconfig_",""),n=this.get("roomconfig");if(o in n){let a;a="boolean"===t?[n[o]?1:0]:"list-multi"===t?n[o]:[n[o]],e.innerHTML=a.map(e=>Ho("value").t(e)).join("")}return e},async autoConfigureChatRoom(){const e=await this.fetchRoomConfiguration(),t=Wo("field",e),o=t.map(e=>this.addFieldValue(e));if(o.length)return this.sendConfiguration(o)},fetchRoomConfiguration(){return o.api.sendIQ(Fo({to:this.get("jid"),type:"get"}).c("query",{xmlns:Bo.NS.MUC_OWNER}))},sendConfiguration(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];const t=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_OWNER}).c("x",{xmlns:Bo.NS.XFORM,type:"submit"});return e.forEach(e=>t.cnode(e).up()),o.api.sendIQ(t)},getOwnRole(){return Object(ke.get)(this.getOwnOccupant(),"attributes.role")},getOwnAffiliation(){return Object(ke.get)(this.getOwnOccupant(),"attributes.affiliation")},getOwnOccupant(){return this.occupants.findWhere({jid:o.bare_jid})},sendAffiliationIQ(e,t){const n=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_ADMIN}).c("item",{affiliation:t.affiliation||e,nick:t.nick,jid:t.jid});return void 0!==t.reason&&n.c("reason",t.reason),o.api.sendIQ(n)},setAffiliations(e){const t=Object(ke.uniq)(e.map(e=>e.affiliation));return Promise.all(t.map(t=>this.setAffiliation(t,e)))},setRole(e,t,n,a,s){const i=Ho("item",{nick:e.get("nick"),role:t}),r=Fo({to:this.get("jid"),type:"set"}).c("query",{xmlns:Bo.NS.MUC_ADMIN}).cnode(i.node);return null!==n&&r.c("reason",n),o.api.sendIQ(r).then(a).catch(s)},getOccupant(e){return Po.isValidJID(e)&&this.occupants.findWhere({jid:e})||this.occupants.findWhere({nick:e})},async getAffiliationList(e){const t=Fo({to:this.get("jid"),type:"get"}).c("query",{xmlns:Bo.NS.MUC_ADMIN}).c("item",{affiliation:e}),n=await o.api.sendIQ(t,null,!1);if(null===n){const t="Error: timeout while fetching ".concat(e," list for MUC ").concat(this.get("jid")),o=new Error(t);return vt.warn(t),vt.warn(n),o}if(Po.isErrorStanza(n)){const t="Error: not allowed to fetch ".concat(e," list for MUC ").concat(this.get("jid")),o=new Error(t);return vt.warn(t),vt.warn(n),o}return Ro.parseMemberListIQ(n).filter(e=>e)},async updateMemberLists(e){const t=await Promise.all(["member","admin","owner"].map(e=>this.getAffiliationList(e))),n=t.reduce((e,t)=>Po.isErrorObject(t)?e:[...t,...e],[]);if(await this.setAffiliations(Ro.computeAffiliationsDelta(!0,!1,e,n)),o.muc_fetch_members)return this.occupants.fetchMembers()},async getAndPersistNickname(e){return e=e||this.get("nick")||(await this.getReservedNick())||o.getDefaultMUCNickname(),e&&this.save({nick:e},{silent:!0}),e},async getReservedNick(){const e=Fo({to:this.get("jid"),from:o.connection.jid,type:"get"}).c("query",{xmlns:Bo.NS.DISCO_INFO,node:"x-roomuser-item"}),t=await o.api.sendIQ(e,null,!1);if(Po.isErrorObject(t))throw t;const n=t.querySelector("query[node=\"x-roomuser-item\"] identity");return n?n.getAttribute("name"):null},async registerNickname(){const e=this.get("nick"),t=this.get("jid");let a,s;try{a=await o.api.sendIQ(Fo({to:t,from:o.connection.jid,type:"get"}).c("query",{xmlns:Bo.NS.MUC_REGISTER}))}catch(t){return Wo("not-allowed[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length?s=n("You're not allowed to register yourself in this groupchat."):Wo("registration-required[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length&&(s=n("You're not allowed to register in this groupchat because it's members-only.")),vt.error(t),s}const i=Wo("field required",a).map(e=>e.parentElement);if(1<i.length&&"muc#register_roomnick"!==i[0].getAttribute("var"))return vt.error("Can't register the user register in the groupchat ".concat(t," due to the required fields"));try{await o.api.sendIQ(Fo({to:t,from:o.connection.jid,type:"set"}).c("query",{xmlns:Bo.NS.MUC_REGISTER}).c("x",{xmlns:Bo.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#register").up().up().c("field",{var:"muc#register_roomnick"}).c("value").t(e))}catch(t){return Wo("service-unavailable[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length?s=n("Can't register your nickname in this groupchat, it doesn't support registration."):Wo("bad-request[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length&&(s=n("Can't register your nickname in this groupchat, invalid data form supplied.")),vt.error(s),vt.error(t),s}},updateOccupantsOnPresence(e){const t=this.parsePresence(e);if("error"===t.type||!t.jid&&!t.nick)return!0;const o=this.occupants.findOccupant(t);if("unavailable"===t.type&&o&&!t.states.includes(mo.MUC_NICK_CHANGED_CODE)&&!o.isMember())return o.set(t),void o.destroy();const n=t.jid||"",a=Object.assign(t,{jid:Bo.getBareJidFromJid(n)||Object(ke.get)(o,"attributes.jid"),resource:Bo.getResourceFromJid(n)||Object(ke.get)(o,"attributes.resource")});o?o.save(a):this.occupants.create(a)},parsePresence(e){const t=e.getAttribute("from"),o=e.getAttribute("type"),n={from:t,nick:Bo.getResourceFromJid(t),type:o,states:[],show:"unavailable"===o?"offline":"online"};return e.childNodes.forEach(e=>{switch(e.nodeName){case"status":n.status=e.textContent||null;break;case"show":n.show=e.textContent||"online";break;case"x":e.getAttribute("xmlns")===Bo.NS.MUC_USER?e.childNodes.forEach(e=>{switch(e.nodeName){case"item":n.affiliation=e.getAttribute("affiliation"),n.role=e.getAttribute("role"),n.jid=e.getAttribute("jid"),n.nick=e.getAttribute("nick")||n.nick;break;case"status":e.getAttribute("code")&&n.states.push(e.getAttribute("code"));}}):e.getAttribute("xmlns")===Bo.NS.VCARDUPDATE&&(n.image_hash=Object(ke.get)(e.querySelector("photo"),"textContent"));}}),n},fetchFeaturesIfConfigurationChanged(e){const t=["104","170","171","172","173","174"];Wo("status",e).filter(o=>t.includes(o.getAttribute("status"))).length&&this.refreshRoomFeatures()},isSameUser(e,t){const o=Bo.getBareJidFromJid(e),n=Bo.getBareJidFromJid(t),a=Bo.getResourceFromJid(e),s=Bo.getResourceFromJid(t);if(Po.isSameBareJID(e,t))return o!==this.get("jid")||a===s;else{const e=o===this.get("jid")?this.occupants.findOccupant({nick:a}):this.occupants.findOccupant({jid:o}),t=n===this.get("jid")?this.occupants.findOccupant({nick:s}):this.occupants.findOccupant({jid:n});return e===t}},subjectChangeHandled(e){return!(!e.subject||e.thread||e.message)&&(Po.safeSave(this,{subject:{author:e.nick,text:e.subject||""}}),!0)},setSubject(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";o.api.send(Uo({to:this.get("jid"),from:o.connection.jid,type:"groupchat"}).c("subject",{xmlns:"jabber:client"}).t(e).tree())},ignorableCSN(e){const t=Po.isOnlyChatStateNotification(e);return t&&(e.is_delayed||this.isOwnMessage(e))},isOwnMessage(e){let t;return t=Object(ke.isElement)(e)?e.getAttribute("from"):e instanceof o.Message?e.get("from"):e.from,Bo.getResourceFromJid(t)==this.get("nick")},getUpdatedMessageAttributes(e,t){const n=o.ChatBox.prototype.getUpdatedMessageAttributes.call(this,e,t);if(this.isOwnMessage(e)){const o=Wo("stanza-id[xmlns=\"".concat(Bo.NS.SID,"\"]"),t).pop(),a=o?o.getAttribute("by"):void 0;if(a){const e="stanza_id ".concat(a);n[e]=o.getAttribute("id")}e.get("received")||(n.received=new Date().toISOString())}return n},async isJoined(){const e=Fo({to:"".concat(this.get("jid"),"/").concat(this.get("nick")),type:"get"}).c("ping",{xmlns:Bo.NS.PING});try{await o.api.sendIQ(e)}catch(t){return null===t?vt.error("Timeout error while checking whether we're joined to MUC: ".concat(this.get("jid"))):(vt.error("Apparently we're no longer connected to MUC: ".concat(this.get("jid"))),vt.error(t)),!1}return!0},async rejoinIfNecessary(){if(!(await this.isJoined()))return this.rejoin(),!0},async shouldShowErrorMessage(e){return!(Wo("not-acceptable[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),e).length&&(await this.rejoinIfNecessary()))&&o.ChatBox.prototype.shouldShowErrorMessage.call(this,e)},findDanglingModeration(e){if(!this.messages.length)return null;if(this.messages.last().get("time")>e.time){const t=Array.from(this.messages.models),o=e["stanza_id ".concat(this.get("jid"))];return o?(t.reverse(),t.find(e=>{let{attributes:t}=e;return"retraction"===t.moderation&&t.moderated_id===o&&t.moderated_by})):null}},handleModeration(e){const t=["editable","moderated","moderated_by","moderated_id","moderation_reason"];if("retracted"===e.moderated){const o={},n="stanza_id ".concat(this.get("jid"));o[n]=e.moderated_id;const a=this.messages.findWhere(o);return a?(a.save(Object(ke.pick)(e,t)),!0):(e.dangling_moderation=!0,this.messages.create(e),!0)}else{const o=this.findDanglingModeration(e);if(o){const n=Object(ke.pick)(o.attributes,t),a=Object.assign({dangling_moderation:!1},e,n);return delete a.id,o.save(a),!0}}return!1},createMessageObject(e){return new Promise((t,o)=>{this.messages.create(e,{success:t,error:(t,n)=>o(n)})})},async onMessage(e){if(Wo("message > forwarded[xmlns=\"".concat(Bo.NS.FORWARD,"\"]"),e).length)return vt.warn("onMessage: Ignoring unencapsulated forwarded groupchat message");if(Po.isCarbonMessage(e))return vt.warn("onMessage: Ignoring XEP-0280 \"groupchat\" message carbon, according to the XEP groupchat messages SHOULD NOT be carbon copied");const t=e;if(Po.isMAMMessage(e))if(t.getAttribute("from")===this.get("jid")){const t="[xmlns=\"".concat(Bo.NS.MAM,"\"] > forwarded[xmlns=\"").concat(Bo.NS.FORWARD,"\"] > message");e=Wo(t,e).pop()}else return vt.warn("onMessage: Ignoring alleged MAM groupchat message from ".concat(e.getAttribute("from")));this.createInfoMessages(e),this.fetchFeaturesIfConfigurationChanged(e);const n=await this.getDuplicateMessage(t);n&&this.updateMessage(n,t);const a=await this.getMessageAttributesFromStanza(e,t);if(this.handleReaction(e,t,a),n||Kt.isReceipt(e)||Kt.isChatMarker(e))return o.api.trigger("message",{stanza:t});if(this.handleRetraction(a)||this.handleModeration(a)||this.subjectChangeHandled(a)||this.ignorableCSN(a))return o.api.trigger("message",{stanza:t});if(this.setEditable(a,a.time),a.nick&&(a.is_tombstone||Po.isNewMessage(a)||!Po.isEmptyMessage(a))){const e=this.handleCorrection(a)||(await this.createMessageObject(a));this.incrementUnreadMsgCounter(e)}o.api.trigger("message",{stanza:t,chatbox:this})},handleModifyError(e){const t=Object(ke.get)(e.querySelector("error text"),"textContent");if(t)if(this.session.get("connection_status")===mo.ROOMSTATUS.CONNECTING)this.setDisconnectionMessage(t);else{this.messages.create({type:"error",message:t,is_ephemeral:!0})}},handleDisconnection(e){const t=null!==e.querySelector("status[code='110']"),n=Wo("x[xmlns=\"".concat(Bo.NS.MUC_USER,"\"]"),e).pop();if(!n)return;const a=Wo("status",n).map(e=>e.getAttribute("code")),s=Object(ke.intersection)(a,Object.keys(o.muc.disconnect_messages)),i=t&&0<s.length;if(!i)return;const r=n.querySelector("item"),l=r?Object(ke.get)(r.querySelector("reason"),"textContent"):void 0,d=r?Object(ke.invoke)(r.querySelector("actor"),"getAttribute","nick"):void 0,c=o.muc.disconnect_messages[s[0]];this.setDisconnectionMessage(c,l,d)},createInfoMessages(e){const t=null!==e.querySelector("status[code='110']"),a=Wo("x[xmlns=\"".concat(Bo.NS.MUC_USER,"\"]"),e).pop();if(a){const s=Wo("status",a).map(e=>e.getAttribute("code"));s.forEach(s=>{let i;if("110"!==s&&("100"!==s||t)){if(s in o.muc.info_messages)i=o.muc.info_messages[s];else if(!t&&s in o.muc.action_info_messages){const t=Bo.getResourceFromJid(e.getAttribute("from"));i=n(o.muc.action_info_messages[s],t);const r=a.querySelector("item"),l=r?Object(ke.get)(r.querySelector("reason"),"textContent"):void 0,d=r?Object(ke.invoke)(r.querySelector("actor"),"getAttribute","nick"):void 0;d&&(i+="\n"+n("This action was done by %1$s.",d)),l&&(i+="\n"+n("The reason given is: \"%1$s\".",l))}else if(t&&s in o.muc.new_nickname_messages){let a;t&&"210"===s?a=Bo.getResourceFromJid(e.getAttribute("from")):t&&"303"==s&&(a=e.querySelector("x item").getAttribute("nick")),this.save("nick",a),i=n(o.muc.new_nickname_messages[s],a)}if(i){if("201"===s&&this.messages.findWhere({type:"info",message:i}))return;if(s in o.muc.info_messages&&this.messages.length&&this.messages.pop().get("message")===i)return;o.api.settings.get("muc_show_room_info")&&this.messages.create({type:"info",message:i})}}})}},setDisconnectionMessage(e,t,o){this.save({disconnection_message:e,disconnection_reason:t,disconnection_actor:o}),this.session.save({connection_status:mo.ROOMSTATUS.DISCONNECTED})},onNicknameClash(e){if(o.muc_nickname_from_jid){const t=e.getAttribute("from").split("/")[1];if(t===o.getDefaultMUCNickname())this.join(t+"-2");else{const e=t.lastIndexOf("-"),o=t.substring(e+1,t.length);this.join(t.substring(0,e+1)+(+o+1+""))}}else this.save({nickname_validation_message:n("The nickname you chose is reserved or currently in use, please choose a different one.")}),this.session.save({connection_status:mo.ROOMSTATUS.NICKNAME_REQUIRED})},onErrorPresence(e){const t=e.querySelector("error"),o=t.getAttribute("type"),a=Object(ke.get)(Wo("text[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).pop(),"textContent");if("modify"===o)this.handleModifyError(e);else if("auth"===o){if(Wo("not-authorized[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length&&(this.save({password_validation_message:a||n("Password incorrect")}),this.session.save({connection_status:mo.ROOMSTATUS.PASSWORD_REQUIRED})),t.querySelector("registration-required")){const e=n("You are not on the member list of this groupchat.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("forbidden")){const e=n("You have been banned from this groupchat.");this.setDisconnectionMessage(e,a)}}else if("cancel"===o)if(t.querySelector("not-allowed")){const e=n("You are not allowed to create new groupchats.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("not-acceptable")){const e=n("Your nickname doesn't conform to this groupchat's policies.");this.setDisconnectionMessage(e,a)}else if(Wo("gone[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).length){const e=Object(ke.get)(Wo("gone[xmlns=\"".concat(Bo.NS.STANZAS,"\"]"),t).pop(),"textContent").replace(/^xmpp:/,"").replace(/\?join$/,"");this.save({moved_jid:e,destroyed_reason:a}),this.session.save({connection_status:mo.ROOMSTATUS.DESTROYED})}else if(t.querySelector("conflict"))this.onNicknameClash(e);else if(t.querySelector("item-not-found")){const e=n("This groupchat does not (yet) exist.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("service-unavailable")){const e=n("This groupchat has reached its maximum number of participants.");this.setDisconnectionMessage(e,a)}else if(t.querySelector("remote-server-not-found")){const e=n("Remote server not found"),t=a?n("The explanation given is: \"%1$s\".",a):void 0;this.setDisconnectionMessage(e,t)}},onPresence(e){return"error"===e.getAttribute("type")?this.onErrorPresence(e):void(this.createInfoMessages(e),e.querySelector("status[code='110']")?(this.onOwnPresence(e),"none"!==this.getOwnRole()&&this.session.get("connection_status")===mo.ROOMSTATUS.CONNECTING&&this.session.save("connection_status",mo.ROOMSTATUS.CONNECTED)):this.updateOccupantsOnPresence(e))},onOwnPresence(e){if("unavailable"!==e.getAttribute("type")&&this.session.save("connection_status",mo.ROOMSTATUS.ENTERED),this.updateOccupantsOnPresence(e),"unavailable"===e.getAttribute("type"))this.handleDisconnection(e);else{const t=e.querySelector("status[code='201']");if(!t)this.features.get("fetched")||("owner"===this.getOwnAffiliation()&&this.get("auto_configure")?this.autoConfigureChatRoom().then(()=>this.refreshRoomFeatures()):this.getRoomFeatures());else if(this.get("auto_configure"))this.autoConfigureChatRoom().then(()=>this.refreshRoomFeatures());else if(o.muc_instant_rooms)this.saveConfiguration().then(()=>this.refreshRoomFeatures());else return void this.trigger("configurationNeeded")}this.session.save({connection_status:mo.ROOMSTATUS.ENTERED})},isUserMentioned(e){const t=this.get("nick");if(e.get("references").length){const o=e.get("references").filter(e=>"mention"===e.type).map(e=>e.value);return o.includes(t)}return new RegExp("\\b".concat(t,"\\b")).test(e.get("message"))},incrementUnreadMsgCounter(e){if(e){const t=e.get("message");if(t&&Po.isNewMessage(e))if(this.isHidden()){let t=this.get("first_unread");if(0==this.get("num_unread_general")){if(t){const e=this.messages.where({msgid:t});0<e.length&&e[0].set("first_unread",!1)}e.set("first_unread",!0),t=e.get("msgid")}const n={first_unread:t,num_unread_general:this.get("num_unread_general")+1};this.isUserMentioned(e)&&(n.num_unread=this.get("num_unread")+1,o.incrementMsgCounter()),this.save(n)}else this.sendDisplayedMarker(e)}},clearUnreadMsgCounter(){(0<this.get("num_unread_general")||0<this.get("num_unread"))&&this.sendDisplayedMarker(this.messages.last()),Po.safeSave(this,{num_unread:0,num_unread_general:0})}}),o.ChatRoomOccupant=zo.Model.extend({defaults:{show:"offline",states:[]},initialize(e){this.set(Object.assign({id:Po.getUniqueId()},e)),this.on("change:image_hash",this.onAvatarChanged,this)},onAvatarChanged(){const e=this.get("image_hash"),t=[];this.get("jid")&&t.push(o.vcards.findWhere({jid:this.get("jid")})),t.push(o.vcards.findWhere({jid:this.get("from")})),t.filter(e=>e).forEach(t=>{e&&t.get("image_hash")!==e&&o.api.vcard.update(t,!0)})},getDisplayName(){return this.get("nick")||this.get("jid")},isMember(){return["admin","owner","member"].includes(this.get("affiliation"))},isModerator(){return["admin","owner"].includes(this.get("affiliation"))||"moderator"===this.get("role")},isSelf(){return this.get("states").includes("110")}}),o.ChatRoomOccupants=o.Collection.extend({model:o.ChatRoomOccupant,comparator(e,t){const o=e.get("role")||"none",n=t.get("role")||"none";if(qo[o]===qo[n]){const o=e.getDisplayName().toLowerCase(),n=t.getDisplayName().toLowerCase();return o<n?-1:o>n?1:0}return qo[o]<qo[n]?-1:1},async fetchMembers(){const e=["member","admin","owner"],t=await Promise.all(e.map(e=>this.chatroom.getAffiliationList(e))),n=t.reduce((e,t)=>Po.isErrorObject(t)?e:[...t,...e],[]),a=e.filter(o=>!Po.isErrorObject(t[e.indexOf(o)])),s=n.map(e=>e.jid).filter(e=>void 0!==e),i=n.map(e=>!e.jid&&e.nick||void 0).filter(e=>void 0!==e),r=this.filter(e=>a.includes(e.get("affiliation"))&&!i.includes(e.get("nick"))&&!s.includes(e.get("jid")));r.forEach(e=>{e.get("jid")===o.bare_jid||("offline"===e.get("show")?e.destroy():e.save("affiliation",null))}),n.forEach(e=>{const t=e.jid?this.findOccupant({jid:e.jid}):this.findOccupant({nick:e.nick});t?t.save(e):this.create(e)}),o.api.trigger("membersFetched")},findOccupant(e){const t=Bo.getBareJidFromJid(e.jid);return null===t?this.findWhere({nick:e.nick}):this.findWhere({jid:t})}}),o.RoomsPanelModel=zo.Model.extend({defaults:function(){return{muc_domain:o.muc_domain,nick:o.getDefaultMUCNickname()}},setDomain(e){o.locked_muc_domain||this.save("muc_domain",Bo.getDomainFromJid(e))}}),o.onDirectMUCInvitation=async function(t){const a=Wo("x[xmlns=\"jabber:x:conference\"]",t).pop(),s=Bo.getBareJidFromJid(t.getAttribute("from")),i=a.getAttribute("jid"),r=a.getAttribute("reason");let l=o.roster.get(s),d;if(o.auto_join_on_invite?d=!0:(l=l?l.getDisplayName():Bo.getNodeFromJid(s),d=r?confirm(n("%1$s has invited you to join a groupchat: %2$s, and left the following reason: \"%3$s\"",l,i,r)):confirm(n("%1$s has invited you to join a groupchat: %2$s",l,i))),!0===d){const t=await e(i,{password:a.getAttribute("password")});t.session.get("connection_status")===mo.ROOMSTATUS.DISCONNECTED&&o.chatboxes.get(i).rejoin()}},o.allow_muc_invitations){const e=function(){o.connection.addHandler(e=>(o.onDirectMUCInvitation(e),!0),"jabber:x:conference","message")};o.api.listen.on("connected",e),o.api.listen.on("reconnected",e)}const i=function(e,t){return e.startsWith("xmpp:")&&e.endsWith("?join")&&(e=e.replace(/^xmpp:/,"").replace(/\?join$/,"")),o.api.rooms.get(e,t,!0)};o.api.listen.on("beforeTearDown",()=>{const e=o.chatboxes.where({type:o.CHATROOMS_TYPE});e.forEach(e=>Po.safeSave(e.session,{connection_status:mo.ROOMSTATUS.DISCONNECTED}))}),o.api.listen.on("windowStateChanged",async function(e){if("visible"===e.state&&o.api.connection.connected()){const e=await o.api.rooms.get();e.forEach(e=>e.rejoinIfNecessary())}}),o.api.listen.on("addClientFeatures",()=>{o.allow_muc&&o.api.disco.own.features.add(Bo.NS.MUC),o.allow_muc_invitations&&o.api.disco.own.features.add("jabber:x:conference")}),o.api.listen.on("chatBoxesFetched",function(){o.auto_join_rooms.forEach(e=>{if(Object(ke.isString)(e)){if(o.chatboxes.where({jid:e}).length)return;o.api.rooms.open(e)}else Object(ke.isObject)(e)?o.api.rooms.open(e.jid,Object(ke.clone)(e)):vt.error("Invalid groupchat criteria specified for \"auto_join_rooms\"")}),o.api.trigger("roomsAutoJoined")}),o.api.listen.on("disconnected",t),o.api.listen.on("statusInitialized",()=>{window.addEventListener(o.unloadevent,()=>{const e=o.api.connection.isType("websocket");!e||o.enable_smacks&&o.session.get("smacks_stream_id")||t()})}),mo.env.muc_utils=Ro,Object.assign(o.api,{rooms:{create(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(t=Object(ke.isString)(t)?{nick:t}:t||{},!t.nick&&o.muc_nickname_from_jid&&(t.nick=Bo.getNodeFromJid(o.bare_jid)),void 0===e)throw new TypeError("rooms.create: You need to provide at least one JID");else if(Object(ke.isString)(e))return i(e,t);return e.map(e=>i(e,t))},async open(e,t){let n=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];if(await o.api.waitUntil("chatBoxesFetched"),void 0===e){throw vt.error("rooms.open: You need to provide at least one JID"),new TypeError("rooms.open: You need to provide at least one JID")}else if(Object(ke.isString)(e)){const a=await o.api.rooms.create(e,t);return a&&a.maybeShow(n),a}else{const a=await Promise.all(e.map(e=>o.api.rooms.create(e,t)));return a.forEach(e=>e.maybeShow(n)),a}},async get(e){async function t(e){let t=await o.api.chatboxes.get(e);return!t&&a?t=await o.api.chatboxes.create(e,n,o.ChatRoom):(t=t&&t.get("type")===o.CHATROOMS_TYPE?t:null,t&&Object.keys(n).length&&t.save(n)),t}let n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];if(void 0===e){const e=await o.api.chatboxes.get();return e.filter(e=>e.get("type")===o.CHATROOMS_TYPE)}return Object(ke.isString)(e)?t(e):Promise.all(e.map(e=>t(e)))}}})}});const{Backbone:Go,Strophe:Jo,$iq:$o,sizzle:Qo}=mo.env,Yo=mo.env.utils;mo.plugins.add("converse-bookmarks",{dependencies:["converse-chatboxes","converse-muc"],overrides:{ChatRoom:{getDisplayName(){const{_converse:e}=this.__super__;if(this.get("bookmarked")&&e.bookmarks){const t=e.bookmarks.findWhere({jid:this.get("jid")});if(t)return t.get("name")}return this.__super__.getDisplayName.apply(this,arguments)},getAndPersistNickname(e){const{_converse:t}=this.__super__;return e=e||t.getNicknameFromBookmark(this.get("jid")),this.__super__.getAndPersistNickname.call(this,e)}}},initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({allow_bookmarks:!0,allow_public_bookmarks:!1}),e.api.promises.add("bookmarksInitialized"),e.getNicknameFromBookmark=function(t){if(!e.bookmarks||!e.allow_bookmarks)return null;const o=e.bookmarks.findWhere({jid:t});if(o)return o.get("nick")},e.Bookmark=Go.Model.extend({getDisplayName(){return Jo.xmlunescape(this.get("name"))}}),e.Bookmarks=e.Collection.extend({model:e.Bookmark,comparator:e=>e.get("name").toLowerCase(),initialize(){this.on("add",e=>this.openBookmarkedRoom(e).then(e=>this.markRoomAsBookmarked(e)).catch(t=>vt.fatal(t))),this.on("remove",this.markRoomAsUnbookmarked,this),this.on("remove",this.sendBookmarkStanza,this);const t="converse.room-bookmarks".concat(e.bare_jid);this.fetched_flag=t+"fetched",this.browserStorage=e.createStore(t)},async openBookmarkedRoom(t){if(e.muc_respect_autojoin&&t.get("autojoin")){const o=await e.api.rooms.create(t.get("jid"),t.get("nick"));o.maybeShow()}return t},fetchBookmarks(){const e=Yo.getResolveablePromise();return window.sessionStorage.getItem(this.fetched_flag)?this.fetch({success:()=>e.resolve(),error:()=>e.resolve()}):this.fetchBookmarksFromServer(e),e},createBookmark(e){this.create(e),this.sendBookmarkStanza().catch(t=>this.onBookmarkError(t,e))},sendBookmarkStanza(){const t=$o({type:"set",from:e.connection.jid}).c("pubsub",{xmlns:Jo.NS.PUBSUB}).c("publish",{node:"storage:bookmarks"}).c("item",{id:"current"}).c("storage",{xmlns:"storage:bookmarks"});return this.forEach(e=>{t.c("conference",{name:e.get("name"),autojoin:e.get("autojoin"),jid:e.get("jid")}).c("nick").t(e.get("nick")).up().up()}),t.up().up().up(),t.c("publish-options").c("x",{xmlns:Jo.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t("http://jabber.org/protocol/pubsub#publish-options").up().up().c("field",{var:"pubsub#persist_items"}).c("value").t("true").up().up().c("field",{var:"pubsub#access_model"}).c("value").t("whitelist"),e.api.sendIQ(t)},onBookmarkError(o,n){vt.error("Error while trying to add bookmark"),vt.error(o),e.api.alert("error",t("Error"),[t("Sorry, something went wrong while trying to save your bookmark.")]),this.findWhere({jid:n.jid}).destroy()},fetchBookmarksFromServer(t){const o=$o({from:e.connection.jid,type:"get"}).c("pubsub",{xmlns:Jo.NS.PUBSUB}).c("items",{node:"storage:bookmarks"});e.api.sendIQ(o).then(e=>this.onBookmarksReceived(t,e)).catch(e=>this.onBookmarksReceivedError(t,e))},markRoomAsBookmarked(t){const o=e.chatboxes.get(t.get("jid"));o!==void 0&&o.save("bookmarked",!0)},markRoomAsUnbookmarked(t){const o=e.chatboxes.get(t.get("jid"));o!==void 0&&o.save("bookmarked",!1)},createBookmarksFromStanza(e){const t=Qo("items[node=\"storage:bookmarks\"] item storage[xmlns=\"storage:bookmarks\"] conference",e);t.forEach(e=>{const t=e.getAttribute("jid");this.create({jid:t,name:e.getAttribute("name")||t,autojoin:"true"===e.getAttribute("autojoin"),nick:Object(ke.get)(e.querySelector("nick"),"textContent")})})},onBookmarksReceived(e,t){if(this.createBookmarksFromStanza(t),window.sessionStorage.setItem(this.fetched_flag,!0),void 0!==e)return e.resolve()},onBookmarksReceivedError(o,n){if(null===n?(vt.error("Error: timeout while fetching bookmarks"),e.api.alert("error",t("Timeout Error"),[t("The server did not return your bookmarks within the allowed time. You can reload the page to request them again.")])):(vt.error("Error while fetching bookmarks"),vt.error(n)),o)return n.querySelector("error[type=\"cancel\"] item-not-found")?(window.sessionStorage.setItem(this.fetched_flag,!0),o.resolve()):o.reject(new Error("Could not fetch bookmarks"))},getUnopenedBookmarks(){return this.filter(t=>!e.chatboxes.get(t.get("jid")))}}),e.BookmarksList=Go.Model.extend({defaults:{"toggle-state":e.OPENED}}),e.checkBookmarksSupport=async function(){const t=await e.api.disco.getIdentity("pubsub","pep",e.bare_jid);return e.allow_public_bookmarks?!!t:e.api.disco.supports(Jo.NS.PUBSUB+"#publish-options",e.bare_jid)};const o=async function(){!e.allow_bookmarks||(await e.checkBookmarksSupport())&&(e.bookmarks=new e.Bookmarks,await e.bookmarks.fetchBookmarks(),e.api.trigger("bookmarksInitialized"))};e.api.listen.on("clearSession",()=>{e.bookmarks!==void 0&&(e.bookmarks.clearSession({silent:!0}),window.sessionStorage.removeItem(e.bookmarks.fetched_flag),delete e.bookmarks)}),e.api.listen.on("reconnected",o),e.api.listen.on("connected",async()=>{e.connection.addHandler(t=>{Qo("event[xmlns=\""+Jo.NS.PUBSUB+"#event\"] items[node=\"storage:bookmarks\"]",t).length&&e.api.waitUntil("bookmarksInitialized").then(()=>e.bookmarks.createBookmarksFromStanza(t)).catch(t=>vt.fatal(t))},null,"message","headline",null,e.bare_jid),await Promise.all([e.api.waitUntil("chatBoxesFetched")]),o()})}});const Xo=ze.Strophe,Ko=ze.$build;Xo.Request=function(e,t,o,n){this.id=++Xo._requestId,this.xmlData=e,this.data=Xo.serialize(e),this.origFunc=t,this.func=t,this.rid=o,this.date=NaN,this.sends=n||0,this.abort=!1,this.dead=null,this.age=function(){if(!this.date)return 0;const e=new Date;return(e-this.date)/1e3},this.timeDead=function(){if(!this.dead)return 0;const e=new Date;return(e-this.dead)/1e3},this.xhr=this._newXHR()},Xo.Request.prototype={getResponse:function(){let e=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if(e=this.xhr.responseXML.documentElement,"parsererror"===e.tagName)throw Xo.error("invalid response received"),Xo.error("responseText: "+this.xhr.responseText),Xo.error("responseXML: "+Xo.serialize(this.xhr.responseXML)),new Error("parsererror");}else if(this.xhr.responseText)if(Xo.debug("Got responseText but no responseXML; attempting to parse it with DOMParser..."),e=new DOMParser().parseFromString(this.xhr.responseText,"application/xml").documentElement,!e)throw new Error("Parsing produced null node");else if(e.querySelector("parsererror")){Xo.error("invalid response received: "+e.querySelector("parsererror").textContent),Xo.error("responseText: "+this.xhr.responseText);const t=new Error;throw t.name=Xo.ErrorCondition.BAD_FORMAT,t}return e},_newXHR:function(){let e=null;return window.XMLHttpRequest?(e=new XMLHttpRequest,e.overrideMimeType&&e.overrideMimeType("text/xml; charset=utf-8")):window.ActiveXObject&&(e=new ActiveXObject("Microsoft.XMLHTTP")),e.onreadystatechange=this.func.bind(null,this),e}},Xo.Bosh=function(e){this._conn=e,this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.hold=1,this.wait=60,this.window=5,this.errors=0,this.inactivity=null,this.lastResponseHeaders=null,this._requests=[]},Xo.Bosh.prototype={strip:null,_buildBody:function(){const e=Ko("body",{rid:this.rid++,xmlns:Xo.NS.HTTPBIND});return null!==this.sid&&e.attrs({sid:this.sid}),this._conn.options.keepalive&&this._conn._sessionCachingSupported()&&this._cacheSession(),e},_reset:function(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.errors=0,this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_connect:function(e,t,o){this.wait=e||this.wait,this.hold=t||this.hold,this.errors=0;const n=this._buildBody().attrs({to:this._conn.domain,"xml:lang":"en",wait:this.wait,hold:this.hold,content:"text/xml; charset=utf-8",ver:"1.6","xmpp:version":"1.0","xmlns:xmpp":Xo.NS.BOSH});o&&n.attrs({route:o});const a=this._conn._connect_cb;this._requests.push(new Xo.Request(n.tree(),this._onRequestStateChange.bind(this,a.bind(this._conn)),n.tree().getAttribute("rid"))),this._throttledRequestHandler()},_attach:function(e,t,o,n,a,s,i){this._conn.jid=e,this.sid=t,this.rid=o,this._conn.connect_callback=n,this._conn.domain=Xo.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=a||this.wait,this.hold=s||this.hold,this.window=i||this.window,this._conn._changeConnectStatus(Xo.Status.ATTACHED,null)},_restore:function(e,t,o,n,a){const s=JSON.parse(window.sessionStorage.getItem("strophe-bosh-session"));if("undefined"!=typeof s&&null!==s&&s.rid&&s.sid&&s.jid&&("undefined"==typeof e||null===e||Xo.getBareJidFromJid(s.jid)===Xo.getBareJidFromJid(e)||null===Xo.getNodeFromJid(e)&&Xo.getDomainFromJid(s.jid)===e))this._conn.restored=!0,this._attach(s.jid,s.sid,s.rid,t,o,n,a);else{const e=new Error("_restore: no restoreable session.");throw e.name="StropheSessionError",e}},_cacheSession:function(){this._conn.authenticated?this._conn.jid&&this.rid&&this.sid&&window.sessionStorage.setItem("strophe-bosh-session",JSON.stringify({jid:this._conn.jid,rid:this.rid,sid:this.sid})):window.sessionStorage.removeItem("strophe-bosh-session")},_connect_cb:function(e){const t=e.getAttribute("type");if(null!==t&&"terminate"===t){let t=e.getAttribute("condition");Xo.error("BOSH-Connection failed: "+t);const o=e.getElementsByTagName("conflict");return null===t?this._conn._changeConnectStatus(Xo.Status.CONNFAIL,"unknown"):("remote-stream-error"===t&&0<o.length&&(t="conflict"),this._conn._changeConnectStatus(Xo.Status.CONNFAIL,t)),this._conn._doDisconnect(t),Xo.Status.CONNFAIL}this.sid||(this.sid=e.getAttribute("sid"));const o=e.getAttribute("requests");o&&(this.window=parseInt(o,10));const n=e.getAttribute("hold");n&&(this.hold=parseInt(n,10));const a=e.getAttribute("wait");a&&(this.wait=parseInt(a,10));const s=e.getAttribute("inactivity");s&&(this.inactivity=parseInt(s,10))},_disconnect:function(e){this._sendTerminate(e)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_emptyQueue:function(){return 0===this._requests.length},_callProtocolErrorHandlers:function(e){const t=this._getRequestStatus(e),o=this._conn.protocolErrorHandlers.HTTP[t];o&&o.call(this,t)},_hitError:function(e){this.errors++,Xo.warn("request errored, status: "+e+", number of errors: "+this.errors),4<this.errors&&this._conn._onDisconnectTimeout()},_no_auth_received:function(e){Xo.warn("Server did not yet offer a supported authentication mechanism. Sending a blank poll request."),e=e?e.bind(this._conn):this._conn._connect_cb.bind(this._conn);const t=this._buildBody();this._requests.push(new Xo.Request(t.tree(),this._onRequestStateChange.bind(this,e),t.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){this._abortAllRequests()},_abortAllRequests:function(){for(;0<this._requests.length;){const e=this._requests.pop();e.abort=!0,e.xhr.abort(),e.xhr.onreadystatechange=function(){}}},_onIdle:function(){const e=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===e.length&&!this._conn.disconnecting&&(Xo.debug("no requests during idle cycle, sending blank request"),e.push(null)),!this._conn.paused){if(2>this._requests.length&&0<e.length){const t=this._buildBody();for(let o=0;o<e.length;o++)null!==e[o]&&("restart"===e[o]?t.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":Xo.NS.BOSH}):t.cnode(e[o]).up());delete this._conn._data,this._conn._data=[],this._requests.push(new Xo.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"))),this._throttledRequestHandler()}if(0<this._requests.length){const e=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(Xo.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),e>Math.floor(Xo.TIMEOUT*this.wait)&&(Xo.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(Xo.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}},_getRequestStatus:function(e,t){let o;if(4===e.xhr.readyState)try{o=e.xhr.status}catch(t){Xo.error("Caught an error while retrieving a request's status, reqStatus: "+o)}return"undefined"==typeof o&&(o="number"==typeof t?t:0),o},_onRequestStateChange:function(e,t){if(Xo.debug("request id "+t.id+"."+t.sends+" state changed to "+t.xhr.readyState),t.abort)return void(t.abort=!1);if(4!==t.xhr.readyState)return;const o=this._getRequestStatus(t);if(this.lastResponseHeaders=t.xhr.getAllResponseHeaders(),this.disconnecting&&400<=o)return this._hitError(o),void this._callProtocolErrorHandlers(t);const n=0<o&&500>o,a=t.sends>this._conn.maxRetries;if((n||a)&&(this._removeRequest(t),Xo.debug("request id "+t.id+" should now be removed")),200===o){const o=this._requests[0]===t,n=this._requests[1]===t;(n||o&&0<this._requests.length&&this._requests[0].age()>Math.floor(Xo.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(+t.rid+1),Xo.debug("request id "+t.id+"."+t.sends+" got 200"),e(t),this.errors=0}else 0===o||400<=o&&600>o||12e3<=o?(Xo.error("request id "+t.id+"."+t.sends+" error "+o+" happened"),this._hitError(o),this._callProtocolErrorHandlers(t),400<=o&&500>o&&(this._conn._changeConnectStatus(Xo.Status.DISCONNECTING,null),this._conn._doDisconnect())):Xo.error("request id "+t.id+"."+t.sends+" error "+o+" happened");n||a?a&&!this._conn.connected&&this._conn._changeConnectStatus(Xo.Status.CONNFAIL,"giving-up"):this._throttledRequestHandler()},_processRequest:function(e){let t=this._requests[e];const o=this._getRequestStatus(t,-1);if(t.sends>this._conn.maxRetries)return void this._conn._onDisconnectTimeout();const n=t.age(),a=!isNaN(n)&&n>Math.floor(Xo.TIMEOUT*this.wait),s=null!==t.dead&&t.timeDead()>Math.floor(Xo.SECONDARY_TIMEOUT*this.wait),i=4===t.xhr.readyState&&(1>o||500<=o);if((a||s||i)&&(s&&Xo.error(`Request ${this._requests[e].id} timed out (secondary), restarting`),t.abort=!0,t.xhr.abort(),t.xhr.onreadystatechange=function(){},this._requests[e]=new Xo.Request(t.xmlData,t.origFunc,t.rid,t.sends),t=this._requests[e]),0===t.xhr.readyState){Xo.debug("request id "+t.id+"."+t.sends+" posting");try{const e=this._conn.options.contentType||"text/xml; charset=utf-8";t.xhr.open("POST",this._conn.service,!this._conn.options.sync),"undefined"!=typeof t.xhr.setRequestHeader&&t.xhr.setRequestHeader("Content-Type",e),this._conn.options.withCredentials&&(t.xhr.withCredentials=!0)}catch(e){return Xo.error("XHR open failed: "+e.toString()),this._conn.connected||this._conn._changeConnectStatus(Xo.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}const e=()=>{if(t.date=new Date,this._conn.options.customHeaders){const e=this._conn.options.customHeaders;for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.xhr.setRequestHeader(o,e[o])}t.xhr.send(t.data)};if(1<t.sends){const o=1e3*Math.min(Math.floor(Xo.TIMEOUT*this.wait),Math.pow(t.sends,3));setTimeout(function(){e()},o)}else e();t.sends++,this._conn.xmlOutput!==Xo.Connection.prototype.xmlOutput&&(t.xmlData.nodeName===this.strip&&t.xmlData.childNodes.length?this._conn.xmlOutput(t.xmlData.childNodes[0]):this._conn.xmlOutput(t.xmlData)),this._conn.rawOutput!==Xo.Connection.prototype.rawOutput&&this._conn.rawOutput(t.data)}else Xo.debug("_processRequest: "+(0===e?"first":"second")+" request has readyState of "+t.xhr.readyState)},_removeRequest:function(e){Xo.debug("removing request");for(let t=this._requests.length-1;0<=t;t--)e===this._requests[t]&&this._requests.splice(t,1);e.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(e){const t=this._requests[e];null===t.dead&&(t.dead=new Date),this._processRequest(e)},_reqToData:function(e){try{return e.getResponse()}catch(t){if("parsererror"!==t.message)throw t;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(e){Xo.debug("_sendTerminate was called");const t=this._buildBody().attrs({type:"terminate"});e&&t.cnode(e.tree());const o=new Xo.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"));this._requests.push(o),this._throttledRequestHandler()},_send:function(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(()=>this._conn._onIdle(),100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?Xo.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):Xo.debug("_throttledRequestHandler called with undefined requests");this._requests&&0!==this._requests.length&&(0<this._requests.length&&this._processRequest(0),1<this._requests.length&&Math.abs(this._requests[0].rid-this._requests[1].rid)<this.window&&this._processRequest(1))}};const{Backbone:Zo,Strophe:en}=mo.env,tn="converse.bosh-session";mo.plugins.add("converse-bosh",{enabled(){return!0},initialize(){async function e(){const e=tn;if(t.bosh_session||(t.bosh_session=new Zo.Model({id:e}),t.bosh_session.browserStorage=t.createStore(e,"session"),await new Promise(e=>t.bosh_session.fetch({success:e,error:e}))),!t.jid){const e=t.bosh_session.get("jid");e&&(await t.setUserJID(e))}else if(t.bosh_session.get("jid")!==t.jid){const e=await t.setUserJID(t.jid);t.bosh_session.clear({silent:!0}),t.bosh_session.save({jid:e})}return t.bosh_session}const{_converse:t}=this;t.api.settings.update({bosh_service_url:void 0,prebind_url:null}),t.startNewPreboundBOSHSession=function(){if(!t.prebind_url)throw new Error("startNewPreboundBOSHSession: If you use prebind then you MUST supply a prebind_url");const e=new XMLHttpRequest;e.open("GET",t.prebind_url,!0),e.setRequestHeader("Accept","application/json, text/javascript"),e.onload=async function(){if(200<=e.status&&400>e.status){const o=JSON.parse(e.responseText),n=await t.setUserJID(o.jid);t.connection.attach(n,o.sid,o.rid,t.onConnectStatusChanged)}else e.onerror()},e.onerror=function(){delete t.connection,t.api.trigger("noResumeableBOSHSession",t)},e.send()},t.restoreBOSHSession=async function(){const o=(await e()).get("jid");if(o&&t.connection._proto instanceof en.Bosh)try{return t.connection.restore(o,t.onConnectStatusChanged),!0}catch(t){return vt.warn("Could not restore session for jid: "+o+" Error message: "+t.message),!1}return!1},t.api.listen.on("clearSession",()=>{if(t.bosh_session===void 0){const e=tn;sessionStorage.removeItem(e),sessionStorage.removeItem("".concat(e,"-").concat(e))}else t.bosh_session.destroy(),delete t.bosh_session}),t.api.listen.on("setUserJID",()=>{t.bosh_session!==void 0&&t.bosh_session.save({jid:t.jid})}),t.api.listen.on("addClientFeatures",()=>t.api.disco.own.features.add(en.NS.BOSH)),Object.assign(t.api,{tokens:{get(e){if(t.connection===void 0)return null;return"rid"===e.toLowerCase()?t.connection.rid||t.connection._proto.rid:"sid"===e.toLowerCase()?t.connection.sid||t.connection._proto.sid:void 0}}})}});const{Strophe:on,$build:nn,_:an}=mo.env;on.addNamespace("CAPS","http://jabber.org/protocol/caps"),mo.plugins.add("converse-caps",{overrides:{XMPPStatus:{constructPresence(){const e=this.__super__.constructPresence.apply(this,arguments);return e.root().cnode(se(this.__super__._converse)),e}}}});const{Strophe:_}=mo.env;_.addNamespace("MESSAGE_CORRECT","urn:xmpp:message-correct:0"),_.addNamespace("RECEIPTS","urn:xmpp:receipts"),_.addNamespace("REFERENCE","urn:xmpp:reference:0"),_.addNamespace("MARKERS","urn:xmpp:chat-markers:0"),mo.plugins.add("converse-chatboxes",{dependencies:["converse-emoji","converse-roster","converse-vcard"],initialize(){async function e(e,o,n){e=_.getBareJidFromJid(e.toLowerCase()),Object.assign(o,{jid:e,id:e});let a;try{a=new n(o,{collection:t.chatboxes})}catch(t){return vt.error(t),null}return(await a.initialized,!a.isValid())?(a.destroy(),null):(t.chatboxes.add(a),await a.messages.fetched,a)}const{_converse:t}=this;t.api.promises.add(["chatBoxesFetched","chatBoxesInitialized","privateChatsAutoJoined"]);let o=0;t.incrementMsgCounter=function(){o+=1;const e=document.title;e&&(-1===e.search(/^Messages \(\d+\) /)?document.title="Messages (".concat(o,") ").concat(e):document.title=e.replace(/^Messages \(\d+\) /,"Messages (".concat(o,")")))},t.clearMsgCounter=function(){o=0;const e=document.title;e&&(-1===e.search(/^Messages \(\d+\) /)||(document.title=e.replace(/^Messages \(\d+\) /,"")))},t.ChatBoxes=t.Collection.extend({comparator:"time_opened",model(e,o){return new t.ChatBox(e,o)},onChatBoxesFetched(e){e.filter(e=>!e.isValid()).forEach(e=>e.destroy()),e.forEach(e=>e.maybeShow()),t.api.trigger("chatBoxesFetched")},onConnected(e){e||(this.browserStorage=t.createStore("converse.chatboxes-".concat(t.bare_jid)),this.fetch({add:!0,success:e=>this.onChatBoxesFetched(e)}))}}),t.api.listen.on("addClientFeatures",()=>{t.api.disco.own.features.add(_.NS.MESSAGE_CORRECT),t.api.disco.own.features.add(_.NS.HTTPUPLOAD),t.api.disco.own.features.add(_.NS.OUTOFBAND)}),t.api.listen.on("pluginsInitialized",()=>{t.chatboxes=new t.ChatBoxes,t.api.trigger("chatBoxesInitialized")}),t.api.listen.on("presencesInitialized",e=>t.chatboxes.onConnected(e)),t.api.listen.on("reconnected",()=>t.chatboxes.forEach(e=>e.onReconnection())),t.api.listen.on("windowStateChanged",e=>"visible"===e.state&&t.clearMsgCounter()),Object.assign(t.api,{chatboxes:{async create(){let o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=2<arguments.length?arguments[2]:void 0;return await t.api.waitUntil("chatBoxesFetched"),Object(ke.isString)(o)?e(o,n,a):Promise.all(o.map(t=>e(t,n,a)))},async get(e){return await t.api.waitUntil("chatBoxesFetched"),void 0===e?t.chatboxes.models:Object(ke.isString)(e)?t.chatboxes.get(e.toLowerCase()):(e=e.map(e=>e.toLowerCase()),t.chatboxes.models.filter(t=>e.includes(t.get("jid"))))}}})}});const{Strophe:sn,$build:rn}=mo.env;sn.addNamespace("RSM","http://jabber.org/protocol/rsm"),mo.plugins.add("converse-rsm",{initialize(){const{_converse:e}=this,t=["max","first","last","after","before","index","count"];e.RSM_ATTRIBUTES=t;class o{constructor(e){if("undefined"!=typeof e.xml)this.fromXMLElement(e.xml);else for(let o=0;o<t.length;o++){const n=t[o];this[n]=e[n]}}toXML(){let e=rn("set",{xmlns:sn.NS.RSM});for(let o=0;o<t.length;o++){const n=t[o];"undefined"!=typeof this[n]&&(e=e.c(n).t(this[n].toString()).up())}return e.tree()}next(e,t){return new o({max:e,after:this.last,before:t})}previous(e,t){return new o({max:e,before:this.first,after:t})}fromXMLElement(e){for(var o=0;o<t.length;o++){const n=t[o],a=e.getElementsByTagName(n)[0];"undefined"!=typeof a&&null!==a&&(this[n]=sn.getText(a),"first"==n&&(this.index=a.getAttribute("index")))}}}e.RSM=o}});const{Strophe:ln,$iq:dn,dayjs:cn}=mo.env,pn=mo.env.utils,un=["with","start","end"];mo.plugins.add("converse-mam",{dependencies:["converse-rsm","converse-disco","converse-muc"],overrides:{ChatBox:{async getDuplicateMessage(e){const t=await this.__super__.getDuplicateMessage.apply(this,arguments);return t?t:this.findDuplicateFromArchiveID(e)}}},initialize(){function e(e){t.muc_show_logs_before_join&&e.features.get("mam_enabled")&&e.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&!e.get("prejoin_mam_fetched")&&(e.fetchNewestMessages(),e.save({prejoin_mam_fetched:!0}))}const{_converse:t}=this;t.api.settings.update({archived_messages_page_size:"50",message_archiving:void 0,message_archiving_timeout:2e4});Object.assign(t.ChatBox.prototype,{fetchNewestMessages(){if(!this.disable_mam){const e=this.getMostRecentMessage();if(e){const t=e.get("stanza_id ".concat(this.get("jid")));t?this.fetchArchivedMessages({after:t},"forwards"):this.fetchArchivedMessages({start:e.get("time")},"forwards")}else this.fetchArchivedMessages({before:""})}},async fetchArchivedMessages(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o=1<arguments.length?arguments[1]:void 0;if(this.disable_mam)return;const n=this.get("type")===t.CHATROOMS_TYPE,a=n?this.get("jid"):t.bare_jid;if(!(await t.api.disco.supports(ln.NS.MAM,a)))return;const s=n?this.onMessage.bind(this):t.handleMessageStanza.bind(t.chatboxes),i=Object.assign({groupchat:n,max:t.archived_messages_page_size,with:this.get("jid")},e),r=await t.api.archive.query(i);for(const e of r.messages)try{await s(e)}catch(t){vt.error(t)}if(r.error&&(r.error.retry=()=>this.fetchArchivedMessages(e,o),this.createMessageFromError(r.error)),o&&r.rsm)return"forwards"===o?e=r.rsm.next(t.archived_messages_page_size,e.before):"backwards"===o&&(e=r.rsm.previous(t.archived_messages_page_size,e.after)),this.fetchArchivedMessages(e,o)},async findDuplicateFromArchiveID(e){const o=Wt()("result[xmlns=\"".concat(ln.NS.MAM,"\"]"),e).pop();if(!o)return null;const n=e.getAttribute("from")||this.get("jid"),a=await t.api.disco.supports(ln.NS.MAM,n);if(!a)return null;const s={};return s["stanza_id ".concat(n)]=o.getAttribute("id"),this.messages.findWhere(s)}}),Object.assign(t.ChatRoom.prototype,{}),t.onMAMError=function(e){e&&e.querySelectorAll("feature-not-implemented").length?vt.warn("Message Archive Management (XEP-0313) not supported by this server"):(vt.error("An error occured while trying to set archiving preferences."),vt.error(e))},t.onMAMPreferences=function(e,o){const n=Wt()("prefs[xmlns=\"".concat(ln.NS.MAM,"\"]"),e).pop(),a=n.getAttribute("default");if(a!==t.message_archiving){const e=dn({type:"set"}).c("prefs",{xmlns:ln.NS.MAM,default:t.message_archiving});Array.from(n.children).forEach(t=>e.cnode(t).up()),t.api.sendIQ(e).then(()=>o.save({preferences:{default:t.message_archiving}})).catch(t.onMAMError)}else o.save({preferences:{default:t.message_archiving}})},t.api.listen.on("addClientFeatures",()=>t.api.disco.own.features.add(ln.NS.MAM)),t.api.listen.on("serviceDiscovered",function(e){const o=e.get("preferences")||{};e.get("var")!==ln.NS.MAM||void 0===t.message_archiving||o["default"]!==t.message_archiving&&t.api.sendIQ(dn({type:"get"}).c("prefs",{xmlns:ln.NS.MAM})).then(o=>t.onMAMPreferences(o,e)).catch(t.onMAMError)}),t.api.listen.on("chatRoomViewInitialized",o=>{t.muc_show_logs_before_join&&o.model.features.on("change:mam_enabled",e(o.model))}),t.api.listen.on("enteredNewRoom",e=>e.features.get("mam_enabled")&&e.fetchNewestMessages()),t.api.listen.on("chatReconnected",e=>{e.get("type")===t.PRIVATE_CHAT_TYPE&&e.fetchNewestMessages()}),t.api.listen.on("afterMessagesFetched",e=>{e.get("type")!==t.PRIVATE_CHAT_TYPE||t.connection.restored||e.fetchNewestMessages()}),Object.assign(t.api,{archive:{async query(e){if(!t.api.connection.connected())throw new Error("Can't call `api.archive.query` before having established an XMPP session");const o={type:"set"};if(e&&e.groupchat){if(!e["with"])throw new Error("You need to specify a \"with\" value containing the chat room JID, when querying groupchat messages.");o.to=e["with"]}const n=o.to||t.bare_jid,a=await t.api.disco.supports(ln.NS.MAM,n);if(!a)return vt.warn("Did not fetch MAM archive for ".concat(n," because it doesn't support ").concat(ln.NS.MAM)),{messages:[]};const s=pn.getUniqueId(),i=dn(o).c("query",{xmlns:ln.NS.MAM,queryid:s});e&&(i.c("x",{xmlns:ln.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t(ln.NS.MAM).up().up(),e["with"]&&!e.groupchat&&i.c("field",{var:"with"}).c("value").t(e["with"]).up().up(),["start","end"].forEach(o=>{if(e[o]){const t=cn(e[o]);if(t.isValid())i.c("field",{var:o}).c("value").t(t.toISOString()).up().up();else throw new TypeError("archive.query: invalid date provided for: ".concat(o))}}),i.up(),e instanceof t.RSM?i.cnode(e.toXML()):Object(ke.intersection)(t.RSM_ATTRIBUTES,Object.keys(e)).length&&i.cnode(new t.RSM(e).toXML()));const r=[],l=t.connection.addHandler(o=>{const n=Wt()("message > result[xmlns=\"".concat(ln.NS.MAM,"\"]"),o).pop();if(void 0===n||n.getAttribute("queryid")!==s)return!0;const a=o.getAttribute("from")||t.bare_jid;if(e.groupchat){if(a!==e["with"])return vt.warn("Ignoring alleged groupchat MAM message from ".concat(o.getAttribute("from"))),!0;}else if(a!==t.bare_jid)return vt.warn("Ignoring alleged MAM message from ".concat(o.getAttribute("from"))),!0;return r.push(o),!0},ln.NS.MAM);let d;const c=await t.api.sendIQ(i,t.message_archiving_timeout,!1);if(null===c){return vt.error("Timeout while trying to fetch archived messages."),d=new t.TimeoutError("Timeout while trying to fetch archived messages."),{messages:r,error:d}}if(pn.isErrorStanza(c))return vt.error("Error stanza received while trying to fetch archived messages"),vt.error(c),{messages:r};t.connection.deleteHandler(l);let p;const u=c&&Wt()("fin[xmlns=\"".concat(ln.NS.MAM,"\"]"),c).pop();if(u&&[null,"false"].includes(u.getAttribute("complete"))){const o=Wt()("set[xmlns=\"".concat(ln.NS.RSM,"\"]"),u).pop();o&&(p=new t.RSM({xml:o}),Object.assign(p,Object.assign(Object(ke.pick)(e,[...un,...t.RSM_ATTRIBUTES]),p)))}return{messages:r,rsm:p,error:d}}}})}});o(38);const mn=Backbone.NativeView===void 0?Backbone.View:Backbone.NativeView,gn=Backbone.Overview=function(){this.views={},this.keys=()=>Object.keys(this.views),this.getAll=()=>this.views,this.get=e=>this.views[e],this.xget=e=>this.keys().filter(t=>t!==e).reduce((e,t)=>(e[t]=this.views[t],e),{}),this.add=(e,t)=>(this.views[e]=t,t),this.remove=e=>{"undefined"==typeof e&&new mn().remove.apply(this);const t=this.views[e];if(t)return delete this.views[e],t.remove(),t},this.removeAll=()=>(this.keys().forEach(e=>this.remove(e)),this),mn.apply(this,Array.prototype.slice.apply(arguments))},hn={chain:ke.chain,includes:ke.includes,difference:ke.difference,drop:ke.drop,every:ke.every,filter:ke.filter,find:ke.find,first:ke.first,forEach:ke.forEach,head:ke.head,indexOf:ke.indexOf,initial:ke.initial,invoke:ke.invoke,isEmpty:ke.isEmpty,last:ke.last,lastIndexOf:ke.lastIndexOf,map:ke.map,max:ke.max,min:ke.min,reduce:ke.reduce,reduceRight:ke.reduceRight,reject:ke.reject,rest:ke.rest,sample:ke.sample,shuffle:ke.shuffle,size:ke.size,some:ke.some,sortBy:ke.sortBy,tail:ke.tail,take:ke.take,toArray:ke.toArray,without:ke.without};Object.keys(hn).forEach(e=>{gn.prototype[e]=function(){const t=Array.prototype.slice.call(arguments);return t.unshift(this.views),hn[e].apply(this,t)}}),Object(ke.extend)(gn.prototype,mn.prototype),gn.extend=mn.extend;const _n=Backbone.OrderedListView=Backbone.Overview.extend({listItems:"model",sortEvent:"change",sortImmediatelyOnAdd:!1,listSelector:".ordered-items",ItemView:void 0,subviewIndex:"id",initialize(){this.sortEventually=Object(ke.debounce)(()=>this.sortAndPositionAllItems(),100),this.items=Object(ke.get)(this,this.listItems),this.items.on("remove",this.removeView,this),this.items.on("reset",this.removeAll,this),this.items.on("add",()=>{this.sortImmediatelyOnAdd?this.sortAndPositionAllItems():this.sortEventually()}),this.sortEvent&&this.items.on(this.sortEvent,this.sortEventually,this)},createItemView(e){let t=this.get(e.get(this.subviewIndex));return t?(t.model=e,t.initialize()):(t=new this.ItemView({model:e}),this.add(e.get(this.subviewIndex),t)),t.render(),t},removeView(e){this.remove(e.get(this.subviewIndex))},sortAndPositionAllItems(){if(!this.items.length)return;this.items.sort();const e=this.el.querySelector(this.listSelector),t=document.createElement("div");e.parentNode.replaceChild(t,e),this.items.forEach(t=>{let o=this.get(t.get(this.subviewIndex));o||(o=this.createItemView(t)),e.insertAdjacentElement("beforeend",o.el)}),t.parentNode.replaceChild(e,t)}});var fn=o(121),bn=o.n(fn),vn=o(122),yn=o.n(vn),xn=o(61),Sn=o.n(xn);const{Backbone:wn,_:kn,utils:En}=mo.env,Cn={renderAvatar(e){e=e||this.el;const t=e.querySelector("canvas.avatar, svg.avatar");if(null!==t&&this.model.vcard){const e={classes:t.getAttribute("class"),width:t.getAttribute("width"),height:t.getAttribute("height")},o=this.model.vcard.get("image_type"),n=this.model.vcard.get("image");e.image="data:"+o+";base64,"+n,t.outerHTML=bn()(e)}}};mo.plugins.add("converse-chatboxviews",{dependencies:["converse-chatboxes","converse-vcard"],initialize(){function e(){const e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))}const{_converse:t}=this;t.api.promises.add(["chatBoxViewsInitialized"]),t.api.settings.update({animate:!0,theme:"default"}),t.ViewWithAvatar=wn.NativeView.extend(Cn),t.VDOMViewWithAvatar=wn.VDOMView.extend(Cn),t.ChatBoxViews=gn.extend({_ensureElement(){if(!this.el){let e=t.root.querySelector("#conversejs");if(null===e){e=document.createElement("div"),e.setAttribute("id","conversejs"),En.addClass("theme-".concat(t.theme),e);const o=t.root.querySelector("body");o?o.appendChild(e):t.root.appendChild(e)}e.innerHTML="",this.setElement(e,!1)}else this.setElement(kn.result(this,"el"),!1)},initialize(){this.listenTo(this.model,"destroy",this.removeChat);const e=document.getElementById("conversejs-bg");e&&!e.innerHTML.trim()&&(e.innerHTML=yn()());const o=document.querySelector("body");o.classList.add("converse-".concat(t.view_mode)),this.el.classList.add("converse-".concat(t.view_mode)),t.singleton&&this.el.classList.add("converse-singleton"),this.render()},render(){try{this.el.innerHTML=Sn()()}catch(t){this._ensureElement(),this.el.innerHTML=Sn()()}this.row_el=this.el.querySelector(".row")},insertRowColumn(e){this.row_el.insertAdjacentElement("afterBegin",e)},removeChat(e){this.remove(e.get("id"))},closeAllChatBoxes(){return Promise.all(this.map(e=>e.close({name:"closeAllChatBoxes"})))}}),t.api.listen.on("chatBoxesInitialized",()=>{t.chatboxviews=new t.ChatBoxViews({model:t.chatboxes}),t.api.trigger("chatBoxViewsInitialized")}),t.api.listen.on("clearSession",()=>t.chatboxviews.closeAllChatBoxes()),t.api.listen.on("chatBoxViewsInitialized",()=>e()),window.addEventListener("resize",()=>e())}});var An=o(20),Tn=o.n(An),jn=o(123),Nn=o.n(jn),Mn=o(124),In=o.n(Mn),On=o(125),Rn=o.n(On),Dn=o(126),Ln=o.n(Dn),Pn=o(42),qn=o.n(Pn),Bn=o(127),zn=o.n(Bn),Fn=o(128),Hn=o.n(Fn),Un=o(129),Vn=o.n(Un),Wn=o(43),Gn=o.n(Wn),Jn=o(62),$n=o.n(Jn),Qn=o(130),Yn=o.n(Qn),Xn=o(131),Kn=o.n(Xn);const Zn={"text-private":"password","text-single":"text",fixed:"label",boolean:"checkbox",hidden:"hidden","jid-multi":"textarea","list-single":"dropdown","list-multi":"dropdown"};Qt.isAudioURL=e=>pe([".ogg",".mp3",".m4a"],e),Qt.isImageURL=e=>pe([".jpg",".jpeg",".png",".gif",".bmp",".tiff",".svg"],e),Qt.isVideoURL=e=>pe([".mp4",".webm"],e),Qt.getOOBURLMarkup=function(e,t){const o=de(t);return null===o?t:Qt.isVideoURL(o)?Kn()({url:t}):Qt.isAudioURL(o)?me(e,o):Qt.isImageURL(o)?ge(e,o):he(e,o)},Qt.applyDragResistance=function(e,t){if(void 0===e)return;if(void 0===t)return e;return e!==t&&10>Math.abs(e-t)?t:e},Qt.renderImageURLs=function(e,t){if(!e.show_images_inline)return Promise.resolve();const o=t.textContent.match(/\b(https?\:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b\/?/g)||[];return Promise.all(o.map(o=>new Promise(n=>Qt.isImageURL(o)?le(o).then(a=>{const s=new Image;s.src=a.src,s.addEventListener("load",n),s.addEventListener("error",n);const{__:i}=e;Wt()("a[href=\"".concat(o,"\"]"),t).forEach(e=>e.outerHTML=$n()({url:o,label_download:i("Download")}))}).catch(n):n())))},Qt.renderNewLines=function(e){return e.replace(/\n\n+/g,"<br/><br/>").replace(/\n/g,"<br/>")},Qt.calculateElementHeight=function(e){return lt.a.reduce(e.children,(e,t)=>e+t.offsetHeight,0)},Qt.getNextElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.nextElementSibling;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.nextElementSibling;return o},Qt.getPreviousElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.previousElementSibling;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.previousElementSibling;return o},Qt.getFirstChildElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.firstElementChild;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.nextElementSibling;return o},Qt.getLastChildElement=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"*",o=e.lastElementChild;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.previousElementSibling;return o},Qt.hasClass=function(e,t){return t instanceof Element&&t.classList.contains(e)},Qt.addClass=function(e,t){return t instanceof Element&&t.classList.add(e),t},Qt.removeClass=function(e,t){return t instanceof Element&&t.classList.remove(e),t},Qt.removeElement=function(e){return e instanceof Element&&e.parentNode&&e.parentNode.removeChild(e),e},Qt.showElement=lt.a.flow(lt.a.partial(Qt.removeClass,"collapsed"),lt.a.partial(Qt.removeClass,"hidden")),Qt.hideElement=function(e){return e instanceof Element&&e.classList.add("hidden"),e},Qt.ancestor=function(e,t){let o=e;for(;null!==o&&!Wt.a.matchesSelector(o,t);)o=o.parentElement;return o},Qt.nextUntil=function(e,t){const o=[];for(let n=e.nextElementSibling;null!==n&&!n.matches(t);)o.push(n),n=n.nextElementSibling;return o},Qt.unescapeHTML=function(e){var t=document.createElement("div");return t.innerHTML=e,t.innerText},Qt.escapeHTML=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},Qt.addMentionsMarkup=function(e,t,o){if("groupchat"!==o.get("message_type"))return e;const n=o.get("nick");return t.sort((e,t)=>t.begin-e.begin).forEach(t=>{const a=e.slice(0,t.begin),s=3*((a.match(/&lt;/g)||[]).length+(a.match(/&gt;/g)||[]).length),i=parseInt(t.begin)+parseInt(s),r=parseInt(t.end)+parseInt(s),l=e.slice(i,r);o,e=l===n?e.slice(0,i)+"<span class=\"mention mention--self badge badge-info\">".concat(l,"</span>")+e.slice(r):e.slice(0,i)+"<span class=\"mention\">".concat(l,"</span>")+e.slice(r)}),e},Qt.convertToHyperlink=function(e){const t=de(e);if(null===t)return e;e=t.normalize()._string;const o=t._parts.urn?e:t.readable();return t._parts.protocol||e.startsWith("http://")||e.startsWith("https://")||(e="http://"+e),"xmpp"===t._parts.protocol&&"join"===t._parts.query?"<a target=\"_blank\" rel=\"noopener\" class=\"open-chatroom\" href=\"".concat(e,"\">").concat(Qt.escapeHTML(o),"</a>"):"<a target=\"_blank\" rel=\"noopener\" href=\"".concat(e,"\">").concat(Qt.escapeHTML(o),"</a>")},Qt.addHyperlinks=function(e){return Tn.a.withinString(e,e=>Qt.convertToHyperlink(e),{start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi})},Qt.slideInAllElements=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:300;return Promise.all(lt.a.map(e,lt.a.partial(Qt.slideIn,lt.a,t)))},Qt.slideToggleElement=function(e,t){return lt.a.includes(e.classList,"collapsed")||lt.a.includes(e.classList,"hidden")?Qt.slideOut(e,t):Qt.slideIn(e,t)},Qt.slideOut=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:200;return new Promise((o,n)=>{function a(){l+=i/r,l<i?(e.style.height=l+"px",e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))):(e.removeAttribute("data-slider-marker"),e.style.height=Qt.calculateElementHeight(e)+"px",e.style.overflow="",e.style.height="",o())}if(!e){return vt.warn("An element needs to be passed in to slideOut"),void n(new Error("An element needs to be passed in to slideOut"))}const s=e.getAttribute("data-slider-marker");s&&(e.removeAttribute("data-slider-marker"),window.cancelAnimationFrame(s));const i=Qt.calculateElementHeight(e);if(window.converse_disable_effects)return e.style.height=i+"px",re(e),void o();if(!Qt.hasClass("collapsed",e)&&!Qt.hasClass("hidden",e))return void o();const r=t/17;let l=0;e.style.height="0",e.style.overflow="hidden",e.classList.remove("hidden"),e.classList.remove("collapsed"),e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))})},Qt.slideIn=function(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:200;return new Promise((o,n)=>{function a(){l-=i/r,0<l?(e.style.height=l+"px",e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))):(e.removeAttribute("data-slider-marker"),e.classList.add("collapsed"),e.style.height="",o(e))}if(!e){return vt.warn("An element needs to be passed in to slideIn"),n(new Error("An element needs to be passed in to slideIn"))}if(lt.a.includes(e.classList,"collapsed"))return o(e);if(window.converse_disable_effects)return e.classList.add("collapsed"),e.style.height="",o(e);const s=e.getAttribute("data-slider-marker");s&&(e.removeAttribute("data-slider-marker"),window.cancelAnimationFrame(s));const i=e.offsetHeight,r=t/17;let l=i;e.style.overflow="hidden",e.setAttribute("data-slider-marker",window.requestAnimationFrame(a))})},Qt.isInDOM=function(e){return document.querySelector("body").contains(e)},Qt.isVisible=function(e){return null!==e&&!Qt.hasClass("hidden",e)&&(0<e.offsetWidth||0<e.offsetHeight||0<e.getClientRects().length)},Qt.fadeIn=function(e,t){return e||vt.warn("An element needs to be passed in to fadeIn"),window.converse_disable_effects?(e.classList.remove("hidden"),_e(e,t)):void(lt.a.includes(e.classList,"hidden")?(e.classList.add("visible"),e.classList.remove("hidden"),e.addEventListener("webkitAnimationEnd",lt.a.partial(_e,e,t)),e.addEventListener("animationend",lt.a.partial(_e,e,t)),e.addEventListener("oanimationend",lt.a.partial(_e,e,t))):_e(e,t))},Qt.xForm2webForm=function(e,t,o){if("list-single"===e.getAttribute("type")||"list-multi"===e.getAttribute("type")){const t=lt.a.map(Qt.queryChildren(e,"value"),lt.a.partial(lt.a.get,lt.a,"textContent")),o=lt.a.map(Qt.queryChildren(e,"option"),function(o){const n=lt.a.get(o.querySelector("value"),"textContent");return Yn()({value:n,label:o.getAttribute("label"),selected:lt.a.includes(t,n),required:!!e.querySelector("required")})});return zn()({id:Qt.getUniqueId(),name:e.getAttribute("var"),label:e.getAttribute("label"),options:o.join(""),multiple:"list-multi"===e.getAttribute("type"),required:!!e.querySelector("required")})}if("fixed"===e.getAttribute("type")){const t=lt.a.get(e.querySelector("value"),"textContent");return"<p class=\"form-help\">"+t+"</p>"}if("jid-multi"===e.getAttribute("type"))return Hn()({name:e.getAttribute("var"),label:e.getAttribute("label")||"",value:lt.a.get(e.querySelector("value"),"textContent"),required:!!e.querySelector("required")});if("boolean"===e.getAttribute("type"))return Ln()({id:Qt.getUniqueId(),name:e.getAttribute("var"),label:e.getAttribute("label")||"",checked:"1"===lt.a.get(e.querySelector("value"),"textContent")&&"checked=\"1\""||"",required:!!e.querySelector("required")});if("url"===e.getAttribute("var"))return Vn()({label:e.getAttribute("label")||"",value:lt.a.get(e.querySelector("value"),"textContent")});if("username"===e.getAttribute("var"))return Gn()({domain:" @"+o.domain,name:e.getAttribute("var"),type:Zn[e.getAttribute("type")],label:e.getAttribute("label")||"",value:lt.a.get(e.querySelector("value"),"textContent"),required:!!e.querySelector("required")});if("ocr"===e.getAttribute("var")){const o=e.querySelector("uri"),n=Wt()("data[cid=\""+o.textContent.replace(/^cid:/,"")+"\"]",t)[0];return Rn()({label:e.getAttribute("label"),name:e.getAttribute("var"),data:lt.a.get(n,"textContent"),type:o.getAttribute("type"),required:!!e.querySelector("required")})}else{const t=e.getAttribute("var");return qn()({id:Qt.getUniqueId(),label:e.getAttribute("label")||"",name:t,fixed_username:o.fixed_username,autocomplete:ie(t,o),placeholder:null,required:!!e.querySelector("required"),type:Zn[e.getAttribute("type")],value:lt.a.get(e.querySelector("value"),"textContent")})}};var ea=Qt,ta=o(132),oa=o.n(ta),na=o(133),aa=o.n(na),sa=o(4),ia=o.n(sa),ra=o(134),la=o.n(ra),da=o(135),ca=o.n(da),pa=o(8),ua=o.n(pa),ma=o(13),ga=o.n(ma);const{Strophe:ha,dayjs:_a}=mo.env,fa=mo.env.utils;mo.plugins.add("converse-message-view",{dependencies:["converse-modal","converse-chatboxviews"],initialize(){function e(e,t,o){if(o.isClosing)return;const n=new Tn.a(e),a=n.protocol().toLowerCase();return["https","http","xmpp","ftp"].includes(a)?n.equals(e)&&"<".concat(e,">")===t.toLocaleLowerCase()?t:void 0:void 0}const{_converse:t}=this,{__:o}=t;t.api.settings.update({show_images_inline:!0,allow_message_retraction:"all"}),t.MessageVersionsModal=t.BootstrapModal.extend({toHTML(){return ca()(Object.assign(this.model.toJSON(),{__:o,dayjs:_a}))}}),t.MessageView=t.ViewWithAvatar.extend({events:{"click .chat-msg__edit-modal":"showMessageVersionsModal","click .retry":"onRetryClicked"},initialize(){this.debouncedRender=Object(ke.debounce)(()=>{this.model.collection&&this.render()},50),this.model.rosterContactAdded&&this.model.rosterContactAdded.then(()=>{this.listenTo(this.model.contact,"change:nickname",this.debouncedRender),this.debouncedRender()}),this.model.occupant&&(this.listenTo(this.model.occupant,"change:role",this.debouncedRender),this.listenTo(this.model.occupant,"change:affiliation",this.debouncedRender),this.debouncedRender()),this.listenTo(this.model,"change",this.onChanged),this.listenTo(this.model,"destroy",this.fadeOut),this.listenTo(this.model,"vcard:change",this.debouncedRender)},async render(){if(this.model.get("reaction_id"))return this.el;const e=fa.hasClass("chat-msg--followup",this.el);if(this.model.isOnlyChatStateNotification())this.renderChatStateNotification();else if(this.model.get("file")&&!this.model.get("oob_url")){if(!this.model.file)return vt.error("Attempted to render a file upload message with no file data"),this.el;this.renderFileUploadProgresBar()}else"error"===this.model.get("type")?this.renderErrorMessage():"info"===this.model.get("type")?this.renderInfoMessage():await this.renderChatMessage();return e&&fa.addClass("chat-msg--followup",this.el),this.el},async onChanged(e){const t=e.changed.edited;if(this.model.changed.progress)return this.renderFileUploadProgresBar();["moderated","retracted","correcting","message","type","upload","received","editable","first_unread","reactions"].filter(e=>Object.prototype.hasOwnProperty.call(this.model.changed,e)).length&&(await this.debouncedRender()),t&&this.onMessageEdited()},fadeOut(){t.animate?(setTimeout(()=>this.remove(),600),fa.addClass("fade-out",this.el)):this.remove()},async onRetryClicked(){this.showSpinner(),await this.model.error.retry(),this.model.destroy()},showSpinner(){this.el.innerHTML=ua()()},onMessageEdited(){this.model.get("is_archived")||(this.el.addEventListener("animationend",()=>fa.removeClass("onload",this.el),{once:!0}),fa.addClass("onload",this.el))},replaceElement(e){return this.el.parentElement&&this.el.parentElement.replaceChild(e,this.el),this.setElement(e),this.el},transformOOBURL(e){return fa.getOOBURLMarkup(t,e)},transformReactions(e){let t="<div>";return Object.getOwnPropertyNames(e).forEach(function(o){const n=e[o].length,a=mo.env.utils.shortnamesToEmojis(o);t=t+"<span class=\"chat-msg__reaction\">"+a+"&nbsp"+n+"</span>"}),t+="</div>",t},async transformBodyText(o){return await t.api.trigger("beforeMessageBodyTransformed",this,o,{Synchronous:!0}),o=this.model.isMeCommand()?o.substring(4):o,o=ga.a.filterXSS(o,{whiteList:{},onTag:e}),o=fa.geoUriToHttp(o,t.geouri_replacement),o=fa.addMentionsMarkup(o,this.model.get("references"),this.model.collection.chatbox),o=fa.addHyperlinks(o),o=fa.renderNewLines(o),o=fa.addEmoji(o),await t.api.trigger("afterMessageBodyTransformed",this,o,{Synchronous:!0}),o},async renderChatMessage(){await t.api.waitUntil("emojisInitialized");const e=_a(this.model.get("time")),n=this.model.vcard?this.model.vcard.get("role"):null,a=n?n.split(","):[],s=this.model.get("retracted")||"retracted"===this.model.get("moderated"),i="groupchat"===this.model.get("type"),r="me"===this.model.get("sender"),l=this.model.collection.chatbox,d=r&&["all","own"].includes(t.allow_message_retraction),c=!r&&i&&["all","moderator"].includes(t.allow_message_retraction)&&(await l.canRetractMessages()),p=fa.stringToElement(la()(Object.assign(this.model.toJSON(),{__:o,is_retracted:s,retractable:!s&&(c||d),extra_classes:this.getExtraMessageClasses(),is_groupchat_message:i,is_me_message:this.model.isMeCommand(),label_show:o("Show more"),occupant:this.model.occupant,pretty_time:e.format(t.time_format),retraction_text:s?this.getRetractionText():null,first_unread:this.model.get("first_unread"),roles:a,time:e.toISOString(),username:this.model.getDisplayName()}))),u=this.model.get("oob_url");u&&(p.querySelector(".chat-msg__media").innerHTML=this.transformOOBURL(u));const m=this.model.get("reactions"),g=p.querySelector(".chat-msg__reactions");if(m&&g&&(g.innerHTML=this.transformReactions(m)),!s){const e=this.model.getMessageText(),o=p.querySelector(".chat-msg__text");e&&e!==u&&(o.innerHTML=await this.transformBodyText(e),await fa.renderImageURLs(t,o))}"headline"!==this.model.get("type")&&this.renderAvatar(p),this.replaceElement(p),this.model.collection&&this.model.collection.trigger("rendered",this)},renderInfoMessage(){const e=fa.stringToElement(ia()(Object.assign(this.model.toJSON(),{extra_classes:"chat-info",isodate:_a(this.model.get("time")).toISOString()})));return this.replaceElement(e)},getRetractionText(){if("groupchat"===this.model.get("type")&&this.model.get("moderated_by")){const e=this.model.get("moderated_by"),t=this.model.collection.chatbox;this.model.mod||(this.model.mod=t.occupants.findOccupant({jid:e})||t.occupants.findOccupant({nick:ha.getResourceFromJid(e)}));const n=this.model.mod?this.model.mod.getDisplayName():"A moderator";return o("%1$s has removed this message",n)}return o("%1$s has removed this message",this.model.getDisplayName())},renderErrorMessage(){const e=fa.stringToElement(ia()(Object.assign(this.model.toJSON(),{extra_classes:"chat-error",isodate:_a(this.model.get("time")).toISOString()})));return this.replaceElement(e)},renderChatStateNotification(){let e;const n=this.model.get("from"),a=this.model.getDisplayName();if(this.model.get("chat_state")===t.COMPOSING)e="me"===this.model.get("sender")?o("Typing from another device"):o("%1$s is typing",a);else if(this.model.get("chat_state")===t.PAUSED)e="me"===this.model.get("sender")?o("Stopped typing on the other device"):o("%1$s has stopped typing",a);else if(this.model.get("chat_state")===t.GONE)e=o("%1$s has gone away",a);else return;const s=new Date().toISOString();this.replaceElement(fa.stringToElement(oa()({message:e,from:n,isodate:s})))},renderFileUploadProgresBar(){const e=fa.stringToElement(aa()(Object.assign(this.model.toJSON(),{__:o,filename:this.model.file.name,filesize:ho()(this.model.file.size)})));this.replaceElement(e),this.renderAvatar()},showMessageVersionsModal(e){e.preventDefault(),this.model.message_versions_modal===void 0&&(this.model.message_versions_modal=new t.MessageVersionsModal({model:this.model})),this.model.message_versions_modal.show(e)},getExtraMessageClasses(){const e=this.model.get("retracted")||"retracted"===this.model.get("moderated"),t=[...(this.model.get("is_delayed")?["delayed"]:[]),...(e?["chat-msg--retracted"]:[])];return"groupchat"===this.model.get("type")&&(this.model.occupant&&(t.push(this.model.occupant.get("role")),t.push(this.model.occupant.get("affiliation"))),"them"===this.model.get("sender")&&this.model.collection.chatbox.isUserMentioned(this.model)&&t.push("mentioned")),this.model.get("correcting")&&t.push("correcting"),t.filter(e=>e).join(" ")}})}});var ba=o(113),va=o(12),ya=o.n(va),xa=o(136),Sa=o.n(xa),wa=o(137),ka=o.n(wa),Ea=o(63),Ca=o.n(Ea);const{Backbone:Aa,sizzle:Ta}=mo.env,ja=mo.env.utils;mo.plugins.add("converse-modal",{initialize(){const{_converse:e}=this,{__:t}=e;e.BootstrapModal=Aa.VDOMView.extend({events:{"click  .nav-item .nav-link":"switchTab"},initialize(){this.render().insertIntoDOM(),this.modal=new ya.a.Modal(this.el,{backdrop:"static",keyboard:!0}),this.el.addEventListener("hide.bs.modal",()=>ja.removeClass("selected",this.trigger_el),!1)},insertIntoDOM(){const t=e.chatboxviews.el.querySelector("#converse-modals");t.insertAdjacentElement("beforeEnd",this.el)},switchTab(e){e.stopPropagation(),e.preventDefault(),Ta(".nav-link.active",this.el).forEach(e=>{ja.removeClass("active",this.el.querySelector(e.getAttribute("href"))),ja.removeClass("active",e)}),ja.addClass("active",e.target),ja.addClass("active",this.el.querySelector(e.target.getAttribute("href")))},alert(e){let t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"primary";const o=this.el.querySelector(".modal-body");o.insertAdjacentHTML("afterBegin",Sa()({type:"alert-".concat(t),message:e}));const n=o.firstElementChild;setTimeout(()=>{ja.addClass("fade-out",n),setTimeout(()=>ja.removeElement(n),600)},5e3)},show(e){e&&(e.preventDefault(),this.trigger_el=e.target,this.trigger_el.classList.add("selected")),this.modal.show()}}),e.Confirm=e.BootstrapModal.extend({events:{"submit .confirm":"onConfimation"},initialize(){this.confirmation=ja.getResolveablePromise(),e.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.el.addEventListener("closed.bs.modal",()=>this.confirmation.reject(),!1)},toHTML(){return Ca()(Object.assign({__:t},this.model.toJSON()))},afterRender(){this.close_handler_registered||(this.el.addEventListener("closed.bs.modal",()=>{this.confirmation.isResolved||this.confirmation.reject()},!1),this.close_handler_registered=!0)},onConfimation(e){e.preventDefault(),this.confirmation.resolve(!0),this.modal.hide()}}),e.Prompt=e.Confirm.extend({toHTML(){return Ca()(Object.assign({__:t},this.model.toJSON()))},onConfimation(e){e.preventDefault();const t=new FormData(e.target);this.confirmation.resolve(t.get("reason")),this.modal.hide()}}),e.Alert=e.BootstrapModal.extend({initialize(){e.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render)},toHTML(){return ka()(Object.assign({__:t},this.model.toJSON()))}}),e.api.listen.on("disconnect",()=>{const e=document.querySelector("#converse-modals");e&&(e.innerHTML="")});let o,n,a;Object.assign(e.api,{async confirm(t){let o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];if(Object(ke.isString)(o)&&(o=[o]),void 0===a){const n=new Aa.Model({title:t,messages:o,type:"confirm"});a=new e.Confirm({model:n})}else a.confirmation=ja.getResolveablePromise(),a.model.set({title:t,messages:o,type:"confirm"});a.show();try{return await a.confirmation}catch(t){return!1}},async prompt(t){let o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"";if(Object(ke.isString)(o)&&(o=[o]),void 0===n){const s=new Aa.Model({title:t,messages:o,placeholder:a,type:"prompt"});n=new e.Prompt({model:s})}else n.confirmation=ja.getResolveablePromise(),n.model.set({title:t,messages:o,type:"prompt"});n.show();try{return await n.confirmation}catch(t){return!1}},alert(t,n,a){Object(ke.isString)(a)&&(a=[a]);let s;if("error"===t?s="alert-danger":"info"===t?s="alert-info":"warn"==t&&(s="alert-warning"),void 0===o){const t=new Aa.Model({title:n,messages:a,level:s,type:"alert"});o=new e.Alert({model:t})}else o.model.set({title:n,messages:a,level:s});o.show()}})}});var Na=o(44),Ma=o.n(Na),Ia=o(138),Oa=o.n(Ia),Ra=o(139),Da=o.n(Ra),La=o(140),Pa=o.n(La),qa=o(141),Ba=o.n(qa),za=o(142),Fa=o.n(za),Ha=o(143),Ua=o.n(Ha),Va=o(144),Wa=o.n(Va),Ga=o(145),Ja=o.n(Ga),$a=o(146),Qa=o.n($a),Ya=o(147),Xa=o.n(Ya);const{Backbone:Ka,Strophe:Za,sizzle:es,dayjs:ts}=mo.env,os=mo.env.utils;mo.plugins.add("converse-chatview",{dependencies:["converse-chatboxviews","converse-chat","converse-disco","converse-message-view","converse-modal"],initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({auto_focus:!0,message_limit:0,show_send_button:!1,show_retraction_warning:!0,show_toolbar:!0,time_format:"HH:mm",visible_toolbar_buttons:{call:!1,clear:!0,spoiler:!0}}),e.ChatBoxHeading=e.ViewWithAvatar.extend({initialize(){this.listenTo(this.model,"change:status",this.onStatusMessageChanged),this.debouncedRender=Object(ke.debounce)(this.render,50),this.listenTo(this.model,"vcard:change",this.debouncedRender),this.model.contact&&this.listenTo(this.model.contact,"destroy",this.debouncedRender),this.model.rosterContactAdded&&this.model.rosterContactAdded.then(()=>{this.listenTo(this.model.contact,"change:nickname",this.debouncedRender),this.debouncedRender()})},render(){const o=Object(ke.get)(this.model,"vcard"),n=o?o.toJSON():{};return this.el.innerHTML=Oa()(Object.assign(n,this.model.toJSON(),{_converse:e,info_close:t("Close this chat box"),display_name:this.model.getDisplayName()})),this.renderAvatar(),this},onStatusMessageChanged(t){this.debouncedRender(),e.api.trigger("contactStatusMessageChanged",{contact:t.attributes,message:t.get("status")})}}),e.UserDetailsModal=e.BootstrapModal.extend({events:{"click button.remove-contact":"removeContact","click button.refresh-contact":"refreshContact","click .fingerprint-trust .btn input":"toggleDeviceTrust"},initialize(){e.BootstrapModal.prototype.initialize.apply(this,arguments),this.model.rosterContactAdded.then(()=>this.registerContactEventHandlers()),this.listenTo(this.model,"change",this.render),this.registerContactEventHandlers(),e.api.trigger("userDetailsModalInitialized",this.model)},toHTML(){const o=Object(ke.get)(this.model,"vcard"),n=o?o.toJSON():{};return Xa()(Object.assign(this.model.toJSON(),n,{__:t,view:this,_converse:e,allow_contact_removal:e.allow_contact_removal,display_name:this.model.getDisplayName(),is_roster_contact:void 0!==this.model.contact,utils:os}))},registerContactEventHandlers(){this.model.contact!==void 0&&(this.listenTo(this.model.contact,"change",this.render),this.listenTo(this.model.contact.vcard,"change",this.render),this.model.contact.on("destroy",()=>{delete this.model.contact,this.render()}))},async refreshContact(o){o&&o.preventDefault&&o.preventDefault();const n=this.el.querySelector(".fa-refresh");os.addClass("fa-spin",n);try{await e.api.vcard.update(this.model.contact.vcard,!0)}catch(o){vt.fatal(o),this.alert(t("Sorry, something went wrong while trying to refresh"),"danger")}os.removeClass("fa-spin",n)},removeContact(o){if(o&&o.preventDefault&&o.preventDefault(),!!e.allow_contact_removal){const o=confirm(t("Are you sure you want to remove this contact?"));!0===o&&(this.modal.hide(),this.model.contact.removeFromRoster(()=>this.model.contact.destroy(),o=>{vt.error(o),e.api.alert("error",t("Error"),[t("Sorry, there was an error while trying to remove %1$s as a contact.",this.model.contact.getDisplayName())])}))}}}),e.ChatBoxView=gn.extend({length:200,className:"chatbox hidden",is_chatroom:!1,events:{"change input.fileupload":"onFileSelection","click .chat-msg__action-edit":"onMessageEditButtonClicked","click .chat-msg__action-retract":"onMessageRetractButtonClicked","click .chat-msg__action-react":"onMessageReactButtonClicked","click .chatbox-navback":"showControlBox","click .close-chatbox-button":"close","click .new-msgs-indicator":"viewUnreadMessages","click .send-button":"onFormSubmitted","click .show-user-details-modal":"showUserDetailsModal","click .spoiler-toggle":"toggleSpoilerMessage","click .toggle-call":"toggleCall","click .toggle-clear":"clearMessages","click .toggle-compose-spoiler":"toggleComposeSpoilerMessage","click .upload-file":"toggleFileUpload","input .chat-textarea":"inputChanged","keydown .chat-textarea":"onKeyDown","keyup .chat-textarea":"onKeyUp","paste .chat-textarea":"onPaste","dragover .chat-textarea":"onDragOver","drop .chat-textarea":"onDrop"},async initialize(){this.initDebounced(),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"rendered",this.scrollDown),this.model.messages.on("reset",()=>{this.content.innerHTML="",this.removeAll()}),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model.presence,"change:show",this.onPresenceChanged),this.render(),await this.updateAfterMessagesFetched(),e.api.trigger("chatBoxViewInitialized",this)},initDebounced(){this.scrollDown=Object(ke.debounce)(this._scrollDown,50),this.markScrolled=Object(ke.debounce)(this._markScrolled,100)},render(){return this.el.innerHTML=Ma()(Object.assign(this.model.toJSON(),{unread_msgs:t("You have unread messages")})),this.content=this.el.querySelector(".chat-content"),this.renderMessageForm(),this.insertHeading(),this},renderToolbar(){if(!e.show_toolbar)return this;const t=Object.assign(this.model.toJSON(),this.getToolbarOptions());return this.el.querySelector(".chat-toolbar").innerHTML=Ja()(t),this.addSpoilerButton(t),this.addFileUploadButton(),e.api.trigger("renderToolbar",this),this},renderMessageForm(){const o=this.el.querySelector(".message-form-container");o.innerHTML=Da()(Object.assign(this.model.toJSON(),{message_limit:e.message_limit,hint_value:Object(ke.get)(this.el.querySelector(".spoiler-hint"),"value"),label_message:this.model.get("composing_spoiler")?t("Hidden message"):t("Message"),label_send:t("Send"),label_spoiler_hint:t("Optional hint"),message_value:Object(ke.get)(this.el.querySelector(".chat-textarea"),"value"),show_send_button:e.show_send_button,show_toolbar:e.show_toolbar,unread_msgs:t("You have unread messages")}));const n=this.el.querySelector(".chat-textarea");n.addEventListener("focus",e=>this.emitFocused(e)),n.addEventListener("blur",e=>this.emitBlurred(e)),this.renderToolbar()},showControlBox(){const t=e.chatboxviews.get("controlbox");t.show(),this.hide()},showUserDetailsModal(t){t.preventDefault(),this.user_details_modal===void 0&&(this.user_details_modal=new e.UserDetailsModal({model:this.model})),this.user_details_modal.show(t)},toggleFileUpload(){this.el.querySelector("input.fileupload").click()},onFileSelection(e){this.model.sendFiles(e.target.files)},onDragOver(e){e.preventDefault()},onDrop(e){0==e.dataTransfer.files.length||(e.preventDefault(),this.model.sendFiles(e.dataTransfer.files))},async addFileUploadButton(){if(await e.api.disco.supports(Za.NS.HTTPUPLOAD,e.domain)){if(this.el.querySelector(".chat-toolbar .upload-file"))return;this.el.querySelector(".chat-toolbar").insertAdjacentHTML("beforeend",Qa()({tooltip_upload_file:t("Choose a file to send")}))}},async addSpoilerButton(t){if(!t.show_spoiler_button||this.model.get("type")===e.CHATROOMS_TYPE)return;const o=this.model.get("jid");if(0===this.model.presence.resources.length)return;const n=await Promise.all(this.model.presence.resources.map(t=>e.api.disco.supports(Za.NS.SPOILER,"".concat(o,"/").concat(t.get("name"))))),a=n.reduce((e,t)=>e&&t,!0);if(a){const e=Ua()(this.model.toJSON());this.el.querySelector(".chat-toolbar").insertAdjacentHTML("afterBegin",e)}},insertHeading(){this.heading=new e.ChatBoxHeading({model:this.model}),this.heading.render(),this.heading.chatview=this;const t=this.el.querySelector(".flyout");return t.insertBefore(this.heading.el,t.querySelector(".chat-body")),this},getToolbarOptions(){let o;return o=this.model.get("composing_spoiler")?t("Click to write as a normal (non-spoiler) message"):t("Click to write your message as a spoiler"),{label_clear:t("Clear all messages"),label_message_limit:t("Message characters remaining"),label_toggle_spoiler:o,message_limit:e.message_limit,show_call_button:e.visible_toolbar_buttons.call,show_spoiler_button:e.visible_toolbar_buttons.spoiler,tooltip_start_call:t("Start a call")}},async updateAfterMessagesFetched(){await this.model.messages.fetched,await Promise.all(this.model.messages.map(e=>this.onMessageAdded(e))),this.insertIntoDOM(),this.scrollDown(),this.content.addEventListener("scroll",()=>this.markScrolled()),e.api.trigger("afterMessagesFetched",this)},insertIntoDOM(){return e.chatboxviews.insertRowColumn(this.el),e.api.trigger("chatBoxInsertedIntoDOM",this),this},showChatEvent(e){const t=new Date().toISOString();return this.content.insertAdjacentHTML("beforeend",ia()({extra_classes:"chat-event",message:e,isodate:t})),this.insertDayIndicator(this.content.lastElementChild),this.scrollDown(),t},showErrorMessage(e){this.content.insertAdjacentHTML("beforeend",Pa()({message:e,isodate:new Date().toISOString()})),this.scrollDown()},addSpinner(){let e=!!(0<arguments.length&&arguments[0]!==void 0)&&arguments[0];null===this.el.querySelector(".spinner")&&(e?(this.content.insertAdjacentHTML("beforeend",ua()()),this.scrollDown()):this.content.insertAdjacentHTML("afterbegin",ua()()))},clearSpinner(){this.content.querySelectorAll(".spinner").forEach(os.removeElement)},insertDayIndicator(e){const t=os.getPreviousElement(e,".message:not(.chat-state-notification)"),o=null===t?null:t.getAttribute("data-isodate"),n=e.getAttribute("data-isodate");if((null!==o||null!==n)&&(null===o||ts(n).isAfter(o,"day"))){const t=ts(n).startOf("day");e.insertAdjacentHTML("beforeBegin",Fa()({isodate:t.toISOString(),datestring:t.format("dddd MMM Do YYYY")}))}},getLastMessageDate(e){const t=os.getFirstChildElement(this.content,".message:not(.chat-state-notification)"),o=t?t.getAttribute("data-isodate"):null;if(null!==o&&ts(o).isAfter(e))return null;const n=os.getLastChildElement(this.content,".message:not(.chat-state-notification)"),a=n?n.getAttribute("data-isodate"):null;if(null===a)return null;if(ts(a).isBefore(e))return ts(a).toDate();const s=es(".message:not(.chat-state-notification)",this.content).map(t=>t.getAttribute("data-isodate")),i=e.toISOString();s.push(i),s.sort();const r=s.lastIndexOf(i);return 0===r?null:ts(s[r-1]).toDate()},setScrollPosition(e){if(this.model.get("scrolled")){const t=os.getNextElement(e,".chat-msg");if(t&&(0===this.content.scrollTop||this.model.get("top_visible_message"))){const e=this.model.get("top_visible_message")||t;this.model.set("top_visible_message",e),this.content.scrollTop=e.offsetTop-30}}else this.scrollDown()},showHelpMessages(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"info",o=2<arguments.length?arguments[2]:void 0;return e.forEach(e=>{this.content.insertAdjacentHTML("beforeend",Ba()({isodate:new Date().toISOString(),type:t,message:ga.a.filterXSS(e,{whiteList:{strong:[]}})}))}),!0===o?this.addSpinner():!1===o&&this.clearSpinner(),this.scrollDown()},shouldShowOnTextMessage(){return!os.isVisible(this.el)},insertMessage(e){if("error"===e.model.get("type")){const t=this.content.querySelector("[data-msgid=\"".concat(e.model.get("msgid"),"\"]"));if(t)return t.insertAdjacentElement("afterend",e.el),this.trigger("messageInserted",e.el)}const t=ts(e.model.get("time")).toDate()||new Date,o=this.getLastMessageDate(t);if(null===o)this.content.insertAdjacentElement("afterbegin",e.el);else{const t=es("[data-isodate=\"".concat(o.toISOString(),"\"]:last"),this.content).pop();if("error"===e.model.get("type")&&os.hasClass("chat-error",t)&&t.textContent===e.model.get("message"))return;t.insertAdjacentElement("afterend",e.el),this.markFollowups(e.el)}return this.trigger("messageInserted",e.el)},markFollowups(e){const t=e.getAttribute("data-from"),o=e.previousElementSibling,n=ts(e.getAttribute("data-isodate")),a=e.nextElementSibling;os.hasClass("chat-msg--action",e)||os.hasClass("chat-msg--action",o)||os.hasClass("chat-info",e)||os.hasClass("chat-info",o)||o.getAttribute("data-from")!==t||!n.isBefore(ts(o.getAttribute("data-isodate")).add(10,"minutes"))||e.getAttribute("data-encrypted")!==o.getAttribute("data-encrypted")||os.addClass("chat-msg--followup",e);a&&(!os.hasClass("chat-msg--action",e)&&os.hasClass("chat-info",e)&&a.getAttribute("data-from")===t&&ts(a.getAttribute("data-isodate")).isBefore(n.add(10,"minutes"))&&e.getAttribute("data-encrypted")===a.getAttribute("data-encrypted")?os.addClass("chat-msg--followup",a):os.removeClass("chat-msg--followup",a))},async showMessage(t){await t.initialized;const o=this.add(t.get("id"),new e.MessageView({model:t}));await o.render(),es(".chat-state-notification[data-csn=\"".concat(t.get("from"),"\"]"),this.content).forEach(os.removeElement),this.insertMessage(o),this.insertDayIndicator(o.el),this.setScrollPosition(o.el),os.isNewMessage(t)&&("me"===t.get("sender")?this.model.set("scrolled",!1):this.model.get("scrolled",!0)&&!os.isOnlyChatStateNotification(t)&&this.showNewMessagesIndicator()),this.shouldShowOnTextMessage()?this.show():this.scrollDown(),t.get("correcting")&&this.insertIntoTextArea(t.get("message"),!0,!0)},async onMessageAdded(t){const o=t.get("id");o&&this.get(o)||(!t.get("dangling_retraction")&&(await this.showMessage(t)),e.api.trigger("messageAdded",{message:t,chatbox:this.model}))},parseMessageForCommands(e){const o=e.replace(/^\s*/,"").match(/^\/(.*)\s*$/);if(o){if("clear"===o[1])return this.clearMessages(),!0;if("close"===o[1])return this.close(),!0;if("help"===o[1]){const e=["<strong>/clear</strong>: ".concat(t("Remove messages")),"<strong>/close</strong>: ".concat(t("Close this chat")),"<strong>/me</strong>: ".concat(t("Write in the third person")),"<strong>/help</strong>: ".concat(t("Show this menu"))];return this.showHelpMessages(e),!0}}},async onFormSubmitted(t){t.preventDefault();const o=this.el.querySelector(".chat-textarea"),n=o.value.trim();if(e.message_limit&&n.length>e.message_limit||!n.replace(/\s/g,"").length)return;if(!e.connection.authenticated)return this.showHelpMessages(["Sorry, the connection has been lost, and your message could not be sent"],"error"),void e.api.connection.reconnect();let a={},s;this.model.get("composing_spoiler")&&(a=this.el.querySelector("form.sendXMPPMessage input.spoiler-hint"),s=a.value),os.addClass("disabled",o),o.setAttribute("disabled","disabled");const i=this.parseMessageForCommands(n),r=i?null:await this.model.sendMessage(n,s);(i||r)&&(a.value="",o.value="",os.removeClass("correcting",o),o.style.height="auto"),r&&e.api.trigger("messageSend",r),o.removeAttribute("disabled"),os.removeClass("disabled",o),o.focus(),this.model.setChatState(e.ACTIVE,{silent:!0})},updateCharCounter(t){if(e.message_limit){const o=this.el.querySelector(".message-limit"),n=e.message_limit-t.length;o.textContent=n,1>n?os.addClass("error",o):os.removeClass("error",o)}},onPaste(e){return 0===e.clipboardData.files.length?void this.updateCharCounter(e.clipboardData.getData("text/plain")):(e.preventDefault(),void this.model.sendFiles(Array.from(e.clipboardData.files)))},onKeyUp(e){this.updateCharCounter(e.target.value)},onKeyDown(t){if(!t.ctrlKey){if(!t.shiftKey&&!t.altKey&&!t.metaKey){if(t.keyCode===mo.keycodes.FORWARD_SLASH)return;if(t.keyCode===mo.keycodes.ESCAPE)return this.onEscapePressed(t);if(t.keyCode===mo.keycodes.ENTER)return this.onEnterPressed(t);if(t.keyCode===mo.keycodes.UP_ARROW&&!t.target.selectionEnd){const e=this.el.querySelector(".chat-textarea");if(!e.value||os.hasClass("correcting",e))return this.editEarlierMessage()}else if(t.keyCode===mo.keycodes.DOWN_ARROW&&t.target.selectionEnd===t.target.value.length&&os.hasClass("correcting",this.el.querySelector(".chat-textarea")))return this.editLaterMessage()}[mo.keycodes.SHIFT,mo.keycodes.META,mo.keycodes.META_RIGHT,mo.keycodes.ESCAPE,mo.keycodes.ALT].includes(t.keyCode)||this.model.get("chat_state")!==e.COMPOSING&&this.model.setChatState(e.COMPOSING)}},getOwnMessages(){return this.model.messages.filter({sender:"me"})},onEnterPressed(e){return this.onFormSubmitted(e)},onEscapePressed(e){e.preventDefault();const t=this.model.messages.findLastIndex("correcting"),o=0<=t?this.model.messages.at(t):null;o&&o.save("correcting",!1),this.insertIntoTextArea("",!0,!1)},handleEmojiSelected(t,o,n){const a=this.model.get("reaction");if(a){const o=a.msgid,n=a.time;this.model.set("reaction",void 0);const s=this.model.messages.findWhere({msgid:o,time:n});if(s){"chat"==s.get("type")&&this.model.updateReactions(s,this.model.get("from"),t);const o=s.get("origin_id");let n=window.getSelection().toString();n&&""!=n||(n=s.get("message"));const a=n.indexOf("\n");n=-1==a?n:n.substring(0,a);const i="/me "+t+" "+n,r=this.model.getOutgoingMessageAttributes(i);r.reaction_id=o,r.reaction_emoji=t,this.model.setEditable(r,new Date().toISOString());const l=this.model.messages.create(r);e.api.send(this.model.createMessageStanza(l))}}else this.insertIntoTextArea(t,o,!1,n)},onMessageReactButtonClicked(e){e.preventDefault();const t=os.ancestor(e.target,".message"),o=t.getAttribute("data-msgid"),n=t.getAttribute("data-isodate");this.model.set("reaction",{msgid:o,time:n}),this.toggleEmojiMenu(e)},retractOwnMessage(e){this.model.sendRetractionMessage(e),e.save({retracted:new Date().toISOString(),retracted_id:e.get("origin_id"),is_ephemeral:!0})},async onMessageRetractButtonClicked(o){o.preventDefault();const n=os.ancestor(o.target,".message"),a=n.getAttribute("data-msgid"),s=n.getAttribute("data-isodate"),i=this.model.messages.findWhere({msgid:a,time:s});if("me"!==i.get("sender"))return vt.error("onMessageEditButtonClicked called for someone else's message!");const r=t("Be aware that other XMPP/Jabber clients (and servers) may not yet support retractions and that this message may not be removed everywhere."),l=[t("Are you sure you want to retract this message?")];e.show_retraction_warning&&(l[1]=r);const d=await e.api.confirm(t("Confirm"),l);d&&this.retractOwnMessage(i)},onMessageEditButtonClicked(e){e.preventDefault();const o=this.model.messages.findLastIndex("correcting"),n=0<=o?this.model.messages.at(o):null,a=os.ancestor(e.target,".chat-msg"),s=this.model.messages.findWhere({msgid:a.getAttribute("data-msgid")}),i=this.el.querySelector(".chat-textarea");i.value&&(null===n||n.get("message")!==i.value)&&!confirm(t("You have an unsent message which will be lost if you continue. Are you sure?"))||(n===s?(s.save("correcting",!1),this.insertIntoTextArea("",!0,!1)):(null!==n&&n.save("correcting",!1),s.save("correcting",!0),this.insertIntoTextArea(os.prefixMentions(s),!0,!0)))},editLaterMessage(){let e=this.model.messages.findLastIndex("correcting"),t;if(0<=e)for(this.model.messages.at(e).save("correcting",!1);e<this.model.messages.length-1;){e+=1;const o=this.model.messages.at(e);if(o.get("editable")){t=o;break}}t?(this.insertIntoTextArea(os.prefixMentions(t),!0,!0),t.save("correcting",!0)):this.insertIntoTextArea("",!0,!1)},editEarlierMessage(){let e=this.model.messages.findLastIndex("correcting"),t;if(0<=e)for(this.model.messages.at(e).save("correcting",!1);0<e;){e-=1;const o=this.model.messages.at(e);if(o.get("editable")){t=o;break}}t=t||this.getOwnMessages().reverse().find(e=>e.get("editable")),t&&(this.insertIntoTextArea(os.prefixMentions(t),!0,!0),t.save("correcting",!0))},inputChanged(e){const t=e.target.scrollHeight+"px";e.target.style.height!=t&&(e.target.style.height="auto",e.target.style.height=t)},async clearMessages(e){e&&e.preventDefault&&e.preventDefault();const o=confirm(t("Are you sure you want to clear the messages from this conversation?"));return!0===o&&(await this.model.clearMessages()),this},insertIntoTextArea(e){let t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],o=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],n=3<arguments.length?arguments[3]:void 0;const a=this.el.querySelector(".chat-textarea");if(o?os.addClass("correcting",a):os.removeClass("correcting",a),t)a.value=n&&"string"==typeof t?a.value.replace(new RegExp(t,"g"),(o,a)=>a==n-t.length?e+" ":o):e;else{let t=a.value;t&&" "!==t[t.length-1]&&(t+=" "),a.value=t+e+" "}this.updateCharCounter(a.value),os.placeCaretAtEnd(a)},toggleCall(t){t.stopPropagation(),e.api.trigger("callButtonClicked",{connection:e.connection,model:this.model})},toggleComposeSpoilerMessage(){this.model.set("composing_spoiler",!this.model.get("composing_spoiler")),this.renderMessageForm(),this.focus()},toggleSpoilerMessage(e){e&&e.preventDefault&&e.preventDefault();const t=e.target,o=t.firstElementChild;os.slideToggleElement(t.parentElement.parentElement.querySelector(".spoiler")),"closed"==t.getAttribute("data-toggle-state")?(t.textContent="Show less",o.classList.remove("fa-eye"),o.classList.add("fa-eye-slash"),t.insertAdjacentElement("afterBegin",o),t.setAttribute("data-toggle-state","open")):(t.textContent="Show more",o.classList.remove("fa-eye-slash"),o.classList.add("fa-eye"),t.insertAdjacentElement("afterBegin",o),t.setAttribute("data-toggle-state","closed"))},onPresenceChanged(e){const o=e.get("show"),n=this.model.getDisplayName();let a;os.isVisible(this.el)&&("offline"===o?a=t("%1$s has gone offline",n):"away"===o?a=t("%1$s has gone away",n):"dnd"===o?a=t("%1$s is busy",n):"online"===o&&(a=t("%1$s is online",n)),a&&(this.content.insertAdjacentHTML("beforeend",Wa()({message:a,isodate:new Date().toISOString()})),this.scrollDown()))},async close(t){return t&&t.preventDefault&&t.preventDefault(),Ka.history.getFragment()==="converse/chat?jid="+this.model.get("jid")&&e.router.navigate(""),e.api.connection.connected()&&(this.model.setChatState(e.INACTIVE),this.model.sendChatState()),await this.model.close(),this.remove(),e.api.trigger("chatBoxClosed",this),this},emitBlurred(t){this.el.contains(document.activeElement)||e.api.trigger("chatBoxBlurred",this,t)},emitFocused(t){e.api.trigger("chatBoxFocused",this,t)},focus(){const e=this.el.getElementsByClassName("chat-textarea")[0];return e&&document.activeElement!==e&&e.focus(),this},maybeFocus(){e.auto_focus&&this.focus()},hide(){return this.el.classList.add("hidden"),this},afterShown(){this.model.clearUnreadMsgCounter(),this.model.setChatState(e.ACTIVE),this.scrollDown(),this.maybeFocus()},show(){return os.isVisible(this.el)?void this.maybeFocus():void(e.api.trigger("beforeShowingChatView",this),e.animate?os.fadeIn(this.el,()=>this.afterShown()):(os.showElement(this.el),this.afterShown()))},showNewMessagesIndicator(){os.showElement(this.el.querySelector(".new-msgs-indicator"))},hideNewMessagesIndicator(){const e=this.el.querySelector(".new-msgs-indicator");null!==e&&e.classList.add("hidden")},_markScrolled:function(){let e=!0;const t=this.content.scrollTop+this.content.clientHeight>=this.content.scrollHeight-62;t&&(e=!1,this.onScrolledDown()),os.safeSave(this.model,{scrolled:e,top_visible_message:null})},viewUnreadMessages(){this.model.save({scrolled:!1,top_visible_message:null}),this.scrollDown()},_scrollDown(){void 0===this.content||os.isVisible(this.content)&&!this.model.get("scrolled")&&(0===this.content.scrollTop||this.content.scrollTop<this.content.scrollHeight/2?os.removeClass("smooth-scroll",this.content):e.api.settings.get("animate")&&os.addClass("smooth-scroll",this.content),this.content.scrollTop=this.content.scrollHeight)},onScrolledDown(){this.hideNewMessagesIndicator(),"hidden"!==e.windowState&&this.model.clearUnreadMsgCounter(),e.api.trigger("chatBoxScrolledDown",{chatbox:this.model})},onWindowStateChanged(t){"visible"===t?!this.model.isHidden()&&this.model.get("num_unread",0)&&this.model.clearUnreadMsgCounter():"hidden"==t&&(this.model.setChatState(e.INACTIVE,{silent:!0}),this.model.sendChatState())}}),e.api.listen.on("chatBoxViewsInitialized",()=>{const t=e.chatboxviews;e.chatboxes.on("add",async o=>{t.get(o.get("id"))||o.get("type")!==e.PRIVATE_CHAT_TYPE||(await o.initialized,t.add(o.get("id"),new e.ChatBoxView({model:o})))})}),e.api.listen.on("windowStateChanged",function(t){e.chatboxviews&&e.chatboxviews.forEach(e=>{"controlbox"!==e.model.get("id")&&e.onWindowStateChanged(t.state)})}),e.api.listen.on("connected",()=>e.api.disco.own.features.add(Za.NS.SPOILER)),Object.assign(e.api,{chatviews:{get(t){return void 0===t?Object.values(e.chatboxviews.getAll()):Object(ke.isString)(t)?e.chatboxviews.get(t):t.map(t=>e.chatboxviews.get(t))}}})}});const{utils:ns}=mo.env;mo.plugins.add("converse-headlines",{dependencies:["converse-chat"],overrides:{ChatBoxes:{model(e,t){const{_converse:o}=this.__super__;return e.type==o.HEADLINES_TYPE?new o.HeadlinesBox(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){async function e(e){if(ns.isHeadlineMessage(o,e)){const t=e.getAttribute("from");if(t.includes("@")&&!o.roster.get(t)&&!o.allow_non_roster_messaging)return;if(null===e.querySelector("body"))return;const n=o.chatboxes.create({id:t,jid:t,type:o.HEADLINES_TYPE,from:t}),a=await n.getMessageAttributesFromStanza(e,e);await n.messages.create(a),o.api.trigger("message",{chatbox:n,stanza:e})}}function t(){o.connection.addHandler(t=>(e(t),!0),null,"message")}const{_converse:o}=this;o.HeadlinesBox=o.ChatBox.extend({defaults(){return{bookmarked:!1,hidden:["mobile","fullscreen"].includes(o.view_mode),message_type:"headline",num_unread:0,time_opened:this.get("time_opened")||new Date().getTime(),type:o.HEADLINES_TYPE}},initialize(){this.initMessages(),this.set({box_id:"box-".concat(btoa(this.get("jid")))})}}),o.api.listen.on("connected",t),o.api.listen.on("reconnected",t),Object.assign(o.api,{headlines:{async get(e){async function t(e){let t=await o.api.chatboxes.get(e);return!t&&a?t=await o.api.chatboxes.create(e,n,o.HeadlinesBox):(t=t&&t.get("type")===o.HEADLINES_TYPE?t:null,t&&Object.keys(n).length&&t.save(n)),t}let n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},a=!!(2<arguments.length&&arguments[2]!==void 0)&&arguments[2];if(e===void 0){const e=await o.api.chatboxes.get();return e.filter(e=>e.get("type")===o.HEADLINES_TYPE)}return Object(ke.isString)(e)?t(e):Promise.all(e.map(e=>t(e)))}}})}});const{Strophe:as,$iq:ss}=mo.env,is=mo.env.utils;as.addNamespace("PING","urn:xmpp:ping"),mo.plugins.add("converse-ping",{initialize(){function e(e){a=new Date;const t=e.getAttribute("from"),o=e.getAttribute("id"),s=ss({type:"result",to:t,id:o});return n.connection.sendIQ(s),!0}function t(){return void 0!==n.connection.disco&&n.api.disco.own.features.add(as.NS.PING),n.connection.addHandler(e,as.NS.PING,"iq","get")}function o(){n.connection.addHandler(()=>{if(0<n.ping_interval)return a=new Date,!0})}const{_converse:n}=this;let a;n.api.settings.update({ping_interval:60}),setTimeout(()=>{if(0<n.ping_interval){const e=new Date;return a||(a=e),!((e-a)/1e3>n.ping_interval)||n.api.ping()}},1e3);const s=function(){t(),o()};n.api.listen.on("connected",s),n.api.listen.on("reconnected",s),n.api.listen.on("windowStateChanged",function(e){"visible"===e.state&&n.api.connection.connected()&&n.api.ping(null,5e3)}),Object.assign(n.api,{async ping(e,t){if(a=new Date,e=e||as.getDomainFromJid(n.bare_jid),n.connection){const o=ss({type:"get",to:e,id:is.getUniqueId("ping")}).c("ping",{xmlns:as.NS.PING}),a=await n.api.sendIQ(o,t||1e4,!1);return null===a?(vt.warn("Timeout while pinging ".concat(e)),e===as.getDomainFromJid(n.bare_jid)&&n.api.connection.reconnect()):is.isErrorStanza(a)&&(vt.error("Error while pinging ".concat(e)),vt.error(a)),!0}return!1}})}});const{Strophe:rs,$iq:ls}=mo.env;rs.addNamespace("PUBSUB_ERROR",rs.NS.PUBSUB+"#errors"),mo.plugins.add("converse-pubsub",{dependencies:["converse-disco"],initialize(){const{_converse:e}=this;Object.assign(e.api,{pubsub:{async"publish"(t,o,n,a){let s=!(4<arguments.length&&void 0!==arguments[4])||arguments[4];const i=ls({from:e.bare_jid,type:"set",to:t}).c("pubsub",{xmlns:rs.NS.PUBSUB}).c("publish",{node:o}).cnode(n.tree()).up().up();a&&(t=t||e.bare_jid,(await e.api.disco.supports(rs.NS.PUBSUB+"#publish-options",t))?(i.c("publish-options").c("x",{xmlns:rs.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t("".concat(rs.NS.PUBSUB,"#publish-options")).up().up(),Object.keys(a).forEach(e=>i.c("field",{var:e}).c("value").t(a[e]).up().up())):vt.warn("_converse.api.publish: ".concat(t," does not support #publish-options, ")+"so we didn't set them even though they were provided."));try{e.api.sendIQ(i)}catch(t){if(t instanceof Element&&s&&t.querySelector("precondition-not-met[xmlns=\"".concat(rs.NS.PUBSUB_ERROR,"\"]"))){const t=i.nodeTree;t.querySelector("publish-options").outerHTML="",vt.warn("PubSub: Republishing without publish options. ".concat(t.outerHTML)),e.api.sendIQ(t)}else throw t}}}})}});const{Backbone:ds,Strophe:cs,$build:ps,$pres:us}=mo.env;mo.plugins.add("converse-status",{initialize(){function e(e){o.api.trigger("statusInitialized",e)}function t(t){if(t=void 0!==o.xmppstatus&&t,t)e(t);else{const n="converse.xmppstatus-".concat(o.bare_jid);o.xmppstatus=new o.XMPPStatus({id:n}),o.xmppstatus.browserStorage=o.createStore(n,"session"),o.xmppstatus.fetch({success:()=>e(t),error:()=>e(t),silent:!0})}}const{_converse:o}=this;o.XMPPStatus=ds.Model.extend({defaults(){return{status:o.default_state}},initialize(){this.on("change",e=>{!Object(ke.isObject)(e.changed)||("status"in e.changed||"status_message"in e.changed)&&this.sendPresence(this.get("status"),this.get("status_message"))})},getNickname(){return o.nickname},getFullname(){return""},constructPresence(e,t){let n;if(e=Object(ke.isString)(e)?e:this.get("status")||o.default_state,t=Object(ke.isString)(t)?t:this.get("status_message"),n="unavailable"===e||"probe"===e||"error"===e||"unsubscribe"===e||"unsubscribed"===e||"subscribe"===e||"subscribed"===e?us({type:e}):"offline"===e?us({type:"unavailable"}):"online"===e?us():us().c("show").t(e).up(),t&&n.c("status").t(t).up(),n.c("priority").t(Object(ke.isNaN)(+o.priority)?0:o.priority).up(),o.idle){const e=new Date;e.setSeconds(e.getSeconds()-o.idle_seconds),n.c("idle",{xmlns:cs.NS.IDLE,since:e.toISOString()})}return n},sendPresence(e,t){o.api.send(this.constructPresence(e,t))}}),o.sendCSI=function(e){o.api.send(ps(e,{xmlns:cs.NS.CSI})),o.inactive=!(e!==o.INACTIVE)},o.onUserActivity=function(){0<o.idle_seconds&&(o.idle_seconds=0);Object(ke.get)(o.connection,"authenticated")&&(o.inactive&&o.sendCSI(o.ACTIVE),o.idle&&(o.idle=!1,o.xmppstatus.sendPresence()),!0===o.auto_changed_status&&(o.auto_changed_status=!1,o.xmppstatus.set("status",o.default_state)))},o.onEverySecond=function(){if(Object(ke.get)(o.connection,"authenticated")){const e=o.xmppstatus.get("status");o.idle_seconds++,0<o.csi_waiting_time&&o.idle_seconds>o.csi_waiting_time&&!o.inactive&&o.sendCSI(o.INACTIVE),0<o.idle_presence_timeout&&o.idle_seconds>o.idle_presence_timeout&&!o.idle&&(o.idle=!0,o.xmppstatus.sendPresence()),0<o.auto_away&&o.idle_seconds>o.auto_away&&"away"!==e&&"xa"!==e&&"dnd"!==e?(o.auto_changed_status=!0,o.xmppstatus.set("status","away")):0<o.auto_xa&&o.idle_seconds>o.auto_xa&&"xa"!==e&&"dnd"!==e&&(o.auto_changed_status=!0,o.xmppstatus.set("status","xa"))}},o.registerIntervalHandler=function(){if(!(1>o.auto_away&&1>o.auto_xa&&1>o.csi_waiting_time&&1>o.idle_presence_timeout)){o.idle_seconds=0,o.auto_changed_status=!1,window.addEventListener("click",o.onUserActivity),window.addEventListener("focus",o.onUserActivity),window.addEventListener("keypress",o.onUserActivity),window.addEventListener("mousemove",o.onUserActivity);window.addEventListener(o.unloadevent,o.onUserActivity,{once:!0,passive:!0}),window.addEventListener(o.unloadevent,()=>{o.session&&o.session.save("active",!1)}),o.everySecondTrigger=window.setInterval(o.onEverySecond,1e3)}},o.api.listen.on("presencesInitialized",e=>{e||o.registerIntervalHandler()}),o.api.listen.on("clearSession",()=>{o.shouldClearCache()&&o.xmppstatus&&(o.xmppstatus.destroy(),delete o.xmppstatus)}),o.api.listen.on("connected",()=>t(!1)),o.api.listen.on("reconnected",()=>t(!0)),Object.assign(o.api.user,{status:{get(){return o.xmppstatus.get("status")},set(e,t){const n={status:e};if(!Object.keys(o.STATUS_WEIGHTS).includes(e))throw new Error("Invalid availability value. See https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.2.2.1");Object(ke.isString)(t)&&(n.status_message=t),o.xmppstatus.sendPresence(e),o.xmppstatus.save(n)},message:{get(){return o.xmppstatus.get("status_message")},set(e){o.xmppstatus.save({status_message:e})}}}})}});const{Backbone:ms,Strophe:gs,$iq:hs,$pres:_s,dayjs:fs,sizzle:bs}=mo.env,vs=mo.env.utils;mo.plugins.add("converse-roster",{dependencies:["converse-status"],initialize(){function e(e){const t=n.roster&&n.roster.findWhere({jid:e.get("jid")});t!==void 0&&t.save({num_unread:e.get("num_unread")})}function t(){n.presences&&(n.presences.forEach(e=>{e.resources.reject(e=>e===void 0).forEach(e=>e.destroy({silent:!0}))}),n.presences.clearSession())}async function o(){await n.api.waitUntil("VCardsInitialized"),n.roster=new n.RosterContacts;let e="converse.contacts-".concat(n.bare_jid);n.roster.browserStorage=n.createStore(e),n.roster.data=new ms.Model,e="converse-roster-model-".concat(n.bare_jid),n.roster.data.id=e,n.roster.data.browserStorage=n.createStore(e),n.roster.data.fetch(),e="converse.roster.groups".concat(n.bare_jid),n.rostergroups=new n.RosterGroups,n.rostergroups.browserStorage=n.createStore(e),n.api.trigger("rosterInitialized")}const{_converse:n}=this,{__:a}=n;n.api.settings.update({allow_contact_requests:!0,auto_subscribe:!1,synchronize_availability:!0}),n.api.promises.add(["cachedRoster","roster","rosterContactsFetched","rosterGroupsFetched","rosterInitialized"]),n.HEADER_CURRENT_CONTACTS=a("My contacts"),n.HEADER_PENDING_CONTACTS=a("Pending contacts"),n.HEADER_REQUESTING_CONTACTS=a("Contact requests"),n.HEADER_UNGROUPED=a("Ungrouped"),n.HEADER_UNREAD=a("New messages");const s={};s[n.HEADER_UNREAD]=0,s[n.HEADER_REQUESTING_CONTACTS]=1,s[n.HEADER_CURRENT_CONTACTS]=2,s[n.HEADER_UNGROUPED]=3,s[n.HEADER_PENDING_CONTACTS]=4,n.registerPresenceHandler=function(){n.unregisterPresenceHandler(),n.presence_ref=n.connection.addHandler(e=>(n.roster.presenceHandler(e),!0),null,"presence",null)},n.rejectPresenceSubscription=function(e,t){const o=_s({to:e,type:"unsubscribed"});t&&""!==t&&o.c("status").t(t),n.api.send(o)},n.sendInitialPresence=function(){n.send_initial_presence&&n.xmppstatus.sendPresence()},n.populateRoster=async function(){let e=!!(0<arguments.length&&arguments[0]!==void 0)&&arguments[0];e&&(n.send_initial_presence=!0);try{await n.rostergroups.fetchRosterGroups(),n.api.trigger("rosterGroupsFetched"),await n.roster.fetchRosterContacts(),n.api.trigger("rosterContactsFetched")}catch(e){vt.error(e)}finally{n.sendInitialPresence()}};const i=ms.Model.extend({idAttribute:"name"}),r=n.Collection.extend({model:i});n.Presence=ms.Model.extend({defaults:{show:"offline"},initialize(){this.resources=new r;const e="converse.identities-".concat(this.get("jid"));this.resources.browserStorage=n.createStore(e,"session"),this.listenTo(this.resources,"update",this.onResourcesChanged),this.listenTo(this.resources,"change",this.onResourcesChanged)},onResourcesChanged(){const e=this.getHighestPriorityResource(),t=Object(ke.get)(e,"attributes.show","offline");this.get("show")!==t&&this.save({show:t})},getHighestPriorityResource(){return this.resources.sortBy(e=>"".concat(e.get("priority"),"-").concat(e.get("timestamp"))).reverse()[0]},addResource(e){const t=e.getAttribute("from"),o=gs.getResourceFromJid(t),n=bs("delay[xmlns=\"".concat(gs.NS.DELAY,"\"]"),e).pop(),a=Object(ke.propertyOf)(e.querySelector("priority"))("textContent")||0,s=this.resources.get(o),i={name:o,priority:Object(ke.isNaN)(parseInt(a,10))?0:parseInt(a,10),show:Object(ke.propertyOf)(e.querySelector("show"))("textContent")||"online",timestamp:n?fs(n.getAttribute("stamp")).toISOString():new Date().toISOString()};s?s.save(i):this.resources.create(i)},removeResource(e){const t=this.resources.get(e);t&&t.destroy()}}),n.Presences=n.Collection.extend({model:n.Presence}),n.RosterContact=ms.Model.extend({defaults:{chat_state:void 0,image:n.DEFAULT_IMAGE,image_type:n.DEFAULT_IMAGE_TYPE,num_unread:0,status:void 0},async initialize(e){this.initialized=vs.getResolveablePromise(),this.setPresence();const{jid:t}=e,o=gs.getBareJidFromJid(t).toLowerCase();e.jid=o,this.set(Object.assign({groups:[],id:o,jid:o,user_id:gs.getNodeFromJid(t)},e)),this.listenTo(this.presence,"change:show",()=>n.api.trigger("contactPresenceChanged",this)),this.listenTo(this.presence,"change:show",()=>this.trigger("presenceChanged")),await n.api.trigger("rosterContactInitialized",this,{Synchronous:!0}),this.initialized.resolve()},setPresence(){const e=this.get("jid");this.presence=n.presences.findWhere({jid:e})||n.presences.create({jid:e})},getDisplayName(){return this.get("nickname")?this.get("nickname"):this.get("jid")},getFullname(){return this.get("jid")},subscribe(e){const t=_s({to:this.get("jid"),type:"subscribe"});e&&""!==e&&t.c("status").t(e).up();const o=n.xmppstatus.getNickname()||n.xmppstatus.getFullname();return o&&t.c("nick",{xmlns:gs.NS.NICK}).t(o).up(),n.api.send(t),this.save("ask","subscribe"),this},ackSubscribe(){n.api.send(_s({type:"subscribe",to:this.get("jid")}))},ackUnsubscribe(){n.api.send(_s({type:"unsubscribe",to:this.get("jid")})),this.removeFromRoster(),this.destroy()},unauthorize(e){return n.rejectPresenceSubscription(this.get("jid"),e),this},authorize(e){const t=_s({to:this.get("jid"),type:"subscribed"});return e&&""!==e&&t.c("status").t(e),n.api.send(t),this},removeFromRoster(){const e=hs({type:"set"}).c("query",{xmlns:gs.NS.ROSTER}).c("item",{jid:this.get("jid"),subscription:"remove"});return n.api.sendIQ(e)}}),n.RosterContacts=n.Collection.extend({model:n.RosterContact,comparator(e,t){const o=e.presence.get("show")||"offline",a=t.presence.get("show")||"offline";if(n.STATUS_WEIGHTS[o]===n.STATUS_WEIGHTS[a]){const o=e.getDisplayName().toLowerCase(),n=t.getDisplayName().toLowerCase();return o<n?-1:o>n?1:0}return n.STATUS_WEIGHTS[o]<n.STATUS_WEIGHTS[a]?-1:1},onConnected(){this.registerRosterHandler(),this.registerRosterXHandler()},registerRosterHandler(){n.connection.addHandler(e=>(n.roster.onRosterPush(e),!0),gs.NS.ROSTER,"iq","set")},registerRosterXHandler(){let e=0;n.connection.addHandler(function(t){return window.setTimeout(function(){n.connection.flush(),n.roster.subscribeToSuggestedItems.bind(n.roster)(t)},e),e+=250*t.querySelectorAll("item").length,!0},gs.NS.ROSTERX,"message",null)},async fetchRosterContacts(){const e=await new Promise((e,t)=>{this.fetch({add:!0,silent:!0,success:e,error:(o,n)=>t(n)})});return vs.isErrorObject(e)&&(vt.error(e),n.session.set("roster_cached",!1),this.data.save("version",void 0)),n.session.get("roster_cached")?void n.api.trigger("cachedRoster",e):(n.send_initial_presence=!0,n.roster.fetchFromServer())},subscribeToSuggestedItems(e){return Array.from(e.querySelectorAll("item")).forEach(e=>{"add"===e.getAttribute("action")&&n.roster.addAndSubscribe(e.getAttribute("jid"),n.xmppstatus.getNickname()||n.xmppstatus.getFullname())}),!0},isSelf(e){return vs.isSameBareJID(e,n.connection.jid)},addAndSubscribe(e,t,o,a,s){const i=e=>{e instanceof n.RosterContact&&e.subscribe(a)};this.addContactToRoster(e,t,o,s).then(i,i)},sendContactAddIQ(e,t,o){t=Object(ke.isEmpty)(t)?null:t;const a=hs({type:"set"}).c("query",{xmlns:gs.NS.ROSTER}).c("item",{jid:e,name:t});return o.forEach(e=>a.c("group").t(e).up()),n.api.sendIQ(a)},async addContactToRoster(t,o,n,s){n=n||[];try{await this.sendContactAddIQ(t,o,n)}catch(n){return vt.error(n),alert(a("Sorry, there was an error while trying to add %1$s as a contact.",o||t)),n}return this.create(Object.assign({ask:void 0,nickname:o,groups:n,jid:t,requesting:!1,subscription:"none"},s),{sort:!1})},subscribeBack(e,t){const o=this.get(e);if(o instanceof n.RosterContact)o.authorize().subscribe();else{const o=e=>{e instanceof n.RosterContact&&e.authorize().subscribe()},a=Object(ke.get)(bs("nick[xmlns=\"".concat(gs.NS.NICK,"\"]"),t).pop(),"textContent",null);this.addContactToRoster(e,a,[],{subscription:"from"}).then(o,o)}},getNumOnlineContacts(){const e=["offline","unavailable"];return Object(ke.sum)(this.models.filter(t=>!e.includes(t.presence.get("show"))))},onRosterPush(e){const t=e.getAttribute("id"),o=e.getAttribute("from");if(o&&o!==n.bare_jid)return void vt.warn("Ignoring roster illegitimate roster push message from ".concat(e.getAttribute("from")));n.api.send(hs({type:"result",id:t,from:n.connection.jid}));const a=bs("query[xmlns=\"".concat(gs.NS.ROSTER,"\"]"),e).pop();this.data.save("version",a.getAttribute("ver"));const s=bs("item",a);if(1<s.length)throw vt.error(e),new Error("Roster push query may not contain more than one \"item\" element.");return 0===s.length?(vt.warn(e),void vt.warn("Received a roster push stanza without an \"item\" element.")):(this.updateContact(s.pop()),void n.api.trigger("rosterPush",e))},rosterVersioningSupported(){return n.api.disco.stream.getFeature("ver","urn:xmpp:features:rosterver")&&this.data.get("version")},async fetchFromServer(){const e=hs({type:"get",id:vs.getUniqueId("roster")}).c("query",{xmlns:gs.NS.ROSTER});this.rosterVersioningSupported()&&e.attrs({ver:this.data.get("version")});const t=await n.api.sendIQ(e,null,!1);if("error"!==t.getAttribute("type")){const e=bs("query[xmlns=\"".concat(gs.NS.ROSTER,"\"]"),t).pop();if(e){const t=bs("item",e);t.forEach(e=>this.updateContact(e)),this.data.save("version",e.getAttribute("ver"))}}else if(!vs.isServiceUnavailableError(t))return vt.error(t),void vt.error("Error while trying to fetch roster from the server");n.session.save("roster_cached",!0),n.api.trigger("roster",t)},updateContact(e){const t=e.getAttribute("jid");if(this.isSelf(t))return;const o=this.get(t),n=e.getAttribute("subscription"),a=e.getAttribute("ask"),s=Array.from(e.getElementsByTagName("group")).map(t=>t.textContent);if(!o){if("none"===n&&null===a||"remove"===n)return;this.create({ask:a,nickname:e.getAttribute("name"),groups:s,jid:t,subscription:n},{sort:!1})}else{if("remove"===n)return o.destroy();o.save({subscription:n,ask:a,nickname:e.getAttribute("name"),requesting:null,groups:s})}},createRequestingContact(e){const t=gs.getBareJidFromJid(e.getAttribute("from")),o=Object(ke.get)(bs("nick[xmlns=\"".concat(gs.NS.NICK,"\"]"),e).pop(),"textContent",null);n.api.trigger("contactRequest",this.create({jid:t,subscription:"none",ask:null,requesting:!0,nickname:o}))},handleIncomingSubscription(e){const t=e.getAttribute("from"),o=gs.getBareJidFromJid(t),s=this.get(o);n.allow_contact_requests||n.rejectPresenceSubscription(t,a("This client does not allow presence subscriptions")),n.auto_subscribe?s&&"to"===s.get("subscription")?s.authorize():this.subscribeBack(o,e):s?"none"===s.get("subscription")?"subscribe"===s.get("ask")&&s.authorize():s.authorize():this.createRequestingContact(e)},handleOwnPresence(e){const t=e.getAttribute("from"),o=gs.getResourceFromJid(t),a=e.getAttribute("type");if(n.connection.jid!==t&&"unavailable"!==a&&(!0===n.synchronize_availability||n.synchronize_availability===o)){const t=Object(ke.propertyOf)(e.querySelector("show"))("textContent")||"online";n.xmppstatus.save({status:t},{silent:!0});const o=Object(ke.propertyOf)(e.querySelector("status"))("textContent");o&&n.xmppstatus.save({status_message:o})}n.jid===t&&"unavailable"===a&&n.xmppstatus.sendPresence()},presenceHandler(e){const t=e.getAttribute("type");if("error"===t)return!0;const o=e.getAttribute("from"),n=gs.getBareJidFromJid(o);if(this.isSelf(n))return this.handleOwnPresence(e);if(!bs("query[xmlns=\"".concat(gs.NS.MUC,"\"]"),e).length){const a=Object(ke.propertyOf)(e.querySelector("status"))("textContent"),s=this.get(n);if(s&&a!==s.get("status")&&s.save({status:a}),"subscribed"===t&&s)s.ackSubscribe();else if("unsubscribed"===t&&s)s.ackUnsubscribe();else{if("unsubscribe"===t)return;if("subscribe"===t)this.handleIncomingSubscription(e);else if("unavailable"===t&&s){const e=gs.getResourceFromJid(o);s.presence.removeResource(e)}else s&&s.presence.addResource(e)}}}}),n.RosterGroup=ms.Model.extend({initialize(e){this.set(Object.assign({description:a("Click to hide these contacts"),state:n.OPENED},e)),this.contacts=new n.RosterContacts}}),n.RosterGroups=n.Collection.extend({model:n.RosterGroup,comparator(e,t){e=e.get("name"),t=t.get("name");const o=s,i=Object.keys(s),r=i.includes(e),l=i.includes(t);if(!r&&!l)return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0;if(r&&l)return o[e]<o[t]?-1:o[e]>o[t]?1:0;if(!r&&l){const e=n.HEADER_CURRENT_CONTACTS;return o[e]<o[t]?-1:o[e]>o[t]?1:0}if(r&&!l){const t=n.HEADER_CURRENT_CONTACTS;return o[e]<o[t]?-1:o[e]>o[t]?1:0}},fetchRosterGroups(){return new Promise(e=>{this.fetch({success:e,silent:!0})})}}),n.unregisterPresenceHandler=function(){n.presence_ref!==void 0&&(n.connection.deleteHandler(n.presence_ref),delete n.presence_ref)},n.api.listen.on("chatBoxesInitialized",()=>{n.chatboxes.on("change:num_unread",e),n.chatboxes.on("add",e=>{e.get("type")===n.PRIVATE_CHAT_TYPE&&e.setRosterContact(e.get("jid"))})}),n.api.listen.on("beforeTearDown",()=>n.unregisterPresenceHandler()),n.api.waitUntil("rosterContactsFetched").then(()=>{n.roster.on("add",e=>{const t=n.chatboxes.findWhere({jid:e.get("jid")});t&&t.setRosterContact(e.get("jid"))})}),n.api.listen.on("streamResumptionFailed",()=>n.session.set("roster_cached",!1)),n.api.listen.on("clearSession",()=>{t(),n.shouldClearCache()&&(n.roster&&(Object(ke.invoke)(n,"roster.data.destroy"),n.roster.clearSession(),delete n.roster),n.rostergroups&&(n.rostergroups.clearSession(),delete n.rostergroups))}),n.api.listen.on("statusInitialized",e=>{if(e)n.haveResumed()||t();else{n.presences=new n.Presences;const e="converse.presences-".concat(n.bare_jid);n.presences.browserStorage=n.createStore(e,"session"),n.presences.fetch()}n.api.trigger("presencesInitialized",e)}),n.api.listen.on("presencesInitialized",async e=>{e?n.api.trigger("rosterReadyAfterReconnection"):await o(),n.roster.onConnected(),n.registerPresenceHandler(),n.populateRoster(!n.connection.restored)}),Object.assign(n.api,{contacts:{async get(e){await n.api.waitUntil("rosterContactsFetched");const t=e=>n.roster.get(gs.getBareJidFromJid(e));if(e===void 0)e=n.roster.pluck("jid");else if(Object(ke.isString)(e))return t(e);return e.map(t)},async add(e,t){if(await n.api.waitUntil("rosterContactsFetched"),!Object(ke.isString)(e)||!e.includes("@"))throw new TypeError("contacts.add: invalid jid");n.roster.addAndSubscribe(e,Object(ke.isEmpty)(t)?e:t)}}})}});const{Strophe:ys}=mo.env,xs=mo.env.utils;ys.addNamespace("SM","urn:xmpp:sm:3"),mo.plugins.add("converse-smacks",{initialize(){function e(){return(!c.api.connection.isType("bosh")||c.isTestEnv())&&c.api.disco.stream.getFeature("sm",ys.NS.SM)}function t(e){if(!c.session.get("smacks_enabled"))return!0;const t=parseInt(e.getAttribute("h"),10),o=c.session.get("num_stanzas_handled_by_server"),n=t-o;if(0>n){const e="New reported stanza count lower than previous. "+"New: ".concat(t," - Previous: ").concat(o);vt.error(e)}const a=c.session.get("unacked_stanzas");if(n>a.length){const e="Higher reported acknowledge count than unacknowledged stanzas. "+"Reported Acknowledged Count: ".concat(n," -")+"Unacknowledged Stanza Count: ".concat(a.length," -")+"New: ".concat(t," - Previous: ").concat(o);vt.error(e)}return c.session.save({num_stanzas_handled_by_server:t,num_stanzas_since_last_ack:0,unacked_stanzas:a.slice(n)}),!0}function o(){if(c.session.get("smacks_enabled")){const e=c.session.get("num_stanzas_handled"),t=xs.toStanza("<a xmlns=\"".concat(ys.NS.SM,"\" h=\"").concat(e,"\"/>"));c.api.send(t)}return!0}function n(e){if(c.session.get("smacks_enabled")&&(xs.isTagEqual(e,"iq")||xs.isTagEqual(e,"presence")||xs.isTagEqual(e,"message"))){const e=c.session.get("num_stanzas_handled");c.session.save("num_stanzas_handled",e+1)}return!0}function a(){c.session&&c.session.save({smacks_enabled:!1,num_stanzas_handled:0,num_stanzas_handled_by_server:0,num_stanzas_since_last_ack:0,unacked_stanzas:[]})}function s(e){const t={smacks_enabled:!0};return["1","true"].includes(e.getAttribute("resume"))&&(t.smacks_stream_id=e.getAttribute("id")),c.session.save(t),!0}function i(e){return e.querySelector("item-not-found")?vt.warn("Could not resume previous SMACKS session, session id not found. A new session will be established."):(vt.error("Failed to enable stream management"),vt.error(e.outerHTML)),a(),c.api.trigger("streamResumptionFailed"),!0}function r(){const e=c.session.get("unacked_stanzas");c.session.save("unacked_stanzas",[]),e.forEach(e=>c.api.send(e))}function l(e){s(e),t(e),r(),c.connection.do_bind=!1,c.connection.authenticated=!0,c.connection.restored=!0,c.connection._changeConnectStatus(ys.Status.CONNECTED,null)}async function d(){const e=xs.getResolveablePromise();c.connection._addSysHandler(t=>e.resolve(l(t)),ys.NS.SM,"resumed"),c.connection._addSysHandler(t=>e.resolve(i(t)),ys.NS.SM,"failed");const t=c.session.get("smacks_stream_id"),o=c.session.get("num_stanzas_handled"),n=xs.toStanza("<resume xmlns=\"".concat(ys.NS.SM,"\" h=\"").concat(o,"\" previd=\"").concat(t,"\"/>"));c.api.send(n),c.connection.flush(),await e}const{_converse:c}=this;c.api.settings.update({enable_smacks:!0,smacks_max_unacked_stanzas:5}),c.api.listen.on("userSessionInitialized",function(){c.session.save({smacks_enabled:c.session.get("smacks_enabled")||!1,num_stanzas_handled:c.session.get("num_stanzas_handled")||0,num_stanzas_handled_by_server:c.session.get("num_stanzas_handled_by_server")||0,num_stanzas_since_last_ack:c.session.get("num_stanzas_since_last_ack")||0,unacked_stanzas:c.session.get("unacked_stanzas")||[]})}),c.api.listen.on("beforeResourceBinding",async function(){c.enable_smacks&&(await e())&&(c.connection.addHandler(n),c.connection.addHandler(o,ys.NS.SM,"r"),c.connection.addHandler(t,ys.NS.SM,"a"),c.session.get("smacks_stream_id")?await d():a())}),c.api.listen.on("afterResourceBinding",async function(){if(c.enable_smacks&&!c.session.get("smacks_enabled")&&(await e())){const e=xs.getResolveablePromise();c.connection._addSysHandler(t=>e.resolve(s(t)),ys.NS.SM,"enabled"),c.connection._addSysHandler(t=>e.resolve(i(t)),ys.NS.SM,"failed");const t=c.api.connection.isType("websocket")||c.isTestEnv(),o=xs.toStanza("<enable xmlns=\"".concat(ys.NS.SM,"\" resume=\"").concat(t,"\"/>"));c.api.send(o),c.connection.flush(),await e}}),c.api.listen.on("send",function(e){if(!c.session)return void vt.warn("No _converse.session!");if(c.session.get("smacks_enabled")&&(xs.isTagEqual(e,"iq")||xs.isTagEqual(e,"presence")||xs.isTagEqual(e,"message"))){const t=ys.serialize(e);c.session.save("unacked_stanzas",(c.session.get("unacked_stanzas")||[]).concat([t]));const o=c.smacks_max_unacked_stanzas;if(0<o){const e=c.session.get("num_stanzas_since_last_ack")+1;0==e%o&&c.api.send(xs.toStanza("<r xmlns=\"".concat(ys.NS.SM,"\"/>"))),c.session.save({num_stanzas_since_last_ack:e})}}})}});var Ss=o(148),ws=o.n(Ss);const{Backbone:ks,Strophe:Es,$iq:Cs,dayjs:As}=mo.env,Ts=mo.env.utils;mo.plugins.add("converse-vcard",{dependencies:["converse-status","converse-roster"],overrides:{XMPPStatus:{getNickname(){const{_converse:e}=this.__super__,t=this.__super__.getNickname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("nickname"):t},getFullname(){const{_converse:e}=this.__super__,t=this.__super__.getFullname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("fullname"):t}},RosterContact:{getDisplayName(){return!this.get("nickname")&&this.vcard?this.vcard.getDisplayName():this.__super__.getDisplayName.apply(this)},getFullname(){return this.vcard?this.vcard.get("fullname"):this.__super__.getFullname.apply(this)}}},initialize(){async function e(e,t){const o=t.querySelector("vCard");let n={};if(null!==o&&(n={stanza:t,fullname:Object(ke.get)(o.querySelector("FN"),"textContent"),nickname:Object(ke.get)(o.querySelector("NICKNAME"),"textContent"),image:Object(ke.get)(o.querySelector("PHOTO BINVAL"),"textContent"),image_type:Object(ke.get)(o.querySelector("PHOTO TYPE"),"textContent"),url:Object(ke.get)(o.querySelector("URL"),"textContent"),role:Object(ke.get)(o.querySelector("ROLE"),"textContent"),email:Object(ke.get)(o.querySelector("EMAIL USERID"),"textContent"),vcard_updated:new Date().toISOString(),vcard_error:void 0}),n.image){const e=Ts.base64ToArrayBuffer(n.image),t=await crypto.subtle.digest("SHA-1",e);n.image_hash=Ts.arrayBufferToHex(t)}return n}function t(e,t,o){const n=Cs(t?{type:e,to:t}:{type:e});return o?n.cnode(o):n.c("vCard",{xmlns:Es.NS.VCARD}),n}async function o(o,n){const a=Es.getBareJidFromJid(n)===o.bare_jid?null:n;let s;try{s=await o.api.sendIQ(t("get",a))}catch(e){return{stanza:e,jid:n,vcard_error:new Date().toISOString()}}return e(n,s)}async function n(e){let t;if(e instanceof r.Message){if("error"===e.get("type"))return;t=e.get("from")}else t=e.get("jid");await r.api.waitUntil("VCardsInitialized"),e.vcard=r.vcards.findWhere({jid:t}),e.vcard||(e.vcard=r.vcards.create({jid:t})),e.vcard.on("change",()=>e.trigger("vcard:change"))}function a(e){const t=Object(ke.get)(e,"collection.chatbox"),o=Es.getResourceFromJid(e.get("from"));if(t&&t.get("nick")===o)return r.xmppstatus.vcard;else{const t=e.occupant&&e.occupant.get("jid")||e.get("from");return t?r.vcards.findWhere({jid:t})||r.vcards.create({jid:t}):void vt.error("Could not assign VCard for message because no JID found! msgid: ".concat(e.get("msgid")))}}async function s(e){await r.api.waitUntil("VCardsInitialized");["error","info"].includes(e.get("type"))||(e.vcard=a(e))}function i(){r.shouldClearCache()&&(r.api.promises.add("VCardsInitialized"),r.vcards&&(r.vcards.clearSession(),delete r.vcards))}const{_converse:r}=this;r.api.promises.add("VCardsInitialized"),r.VCard=ks.Model.extend({defaults:{image:r.DEFAULT_IMAGE,image_type:r.DEFAULT_IMAGE_TYPE},set(e,t,o){let n;return"object"==typeof e?(n=e,o=t):(n={})[e]=t,Object(ke.has)(n,"image")&&!n.image?(n.image=r.DEFAULT_IMAGE,n.image_type=r.DEFAULT_IMAGE_TYPE,ks.Model.prototype.set.call(this,n,o)):ks.Model.prototype.set.apply(this,arguments)},getDisplayName(){return this.get("nickname")||this.get("fullname")||this.get("jid")}}),r.VCards=r.Collection.extend({model:r.VCard,initialize(){this.on("add",e=>{r.api.vcard.update(e)})}}),r.initVCardCollection=async function(){r.vcards=new r.VCards,r.vcards.browserStorage=r.createStore("".concat(r.bare_jid,"-converse.vcards")),await new Promise(e=>{r.vcards.fetch({success:e,error:e},{silent:!0})});const e=r.vcards;if(r.session){const t=r.session.get("bare_jid");r.xmppstatus.vcard=e.findWhere({jid:t})||e.create({jid:t})}r.api.trigger("VCardsInitialized")},r.api.listen.on("chatBoxInitialized",e=>n(e)),r.api.listen.on("chatRoomInitialized",e=>n(e)),r.api.listen.on("chatRoomMessageInitialized",e=>s(e)),r.api.listen.on("addClientFeatures",()=>r.api.disco.own.features.add(Es.NS.VCARD)),r.api.listen.on("clearSession",()=>i()),r.api.listen.on("messageInitialized",e=>n(e)),r.api.listen.on("rosterContactInitialized",e=>n(e)),r.api.listen.on("statusInitialized",r.initVCardCollection),Object.assign(r.api,{vcard:{set(e,o){if(!e)throw Error("No jid provided for the VCard data");const n=Es.xmlHtmlNode(ws()(o)).firstElementChild;return r.api.sendIQ(t("set",e,n))},get(e,t){if(Object(ke.isString)(e))return o(r,e);if(t||!e.get("vcard_updated")||!As(e.get("vcard_error")).isSame(new Date,"day")){const t=e.get("jid");if(!t)throw new Error("No JID to get vcard for!");return o(r,t)}return Promise.resolve({})},async update(e,t){const o=await this.get(e,t);delete o.stanza,e.save(o)}}})}});const{_:js,Backbone:Ns}=mo.env,Ms=mo.env.utils;mo.plugins.add("converse-autocomplete",{initialize(){const{_converse:e}=this;e.FILTER_CONTAINS=function(e,t){return RegExp(s.regExpEscape(t.trim()),"i").test(e)},e.FILTER_STARTSWITH=function(e,t){return RegExp("^"+s.regExpEscape(t.trim()),"i").test(e)};const t=function(e,t){return e.length===t.length?e<t?-1:1:e.length-t.length},o=(e,t)=>{t=t.trim();const o=document.createElement("li");o.setAttribute("aria-selected","false");const n=new RegExp("("+t+")","ig"),a=t?e.split(n):[e];return a.forEach(e=>{if(t&&e.match(n)){const t=document.createElement("mark");t.textContent=e,o.appendChild(t)}else o.appendChild(document.createTextNode(e))}),o};class n extends String{constructor(e){super();const t=Array.isArray(e)?{label:e[0],value:e[1]}:"object"==typeof e&&"label"in e&&"value"in e?e:{label:e,value:e};this.label=t.label||t.value,this.value=t.value}get lenth(){return this.label.length}toString(){return""+this.label}valueOf(){return this.toString()}}class a{constructor(n){let a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};this.is_opened=!1,this.container=Ms.hasClass(".suggestion-box",n)?n:n.querySelector(".suggestion-box"),this.input=this.container.querySelector(".suggestion-box__input"),this.input.setAttribute("aria-autocomplete","list"),this.ul=this.container.querySelector(".suggestion-box__results"),this.status=this.container.querySelector(".suggestion-box__additions"),js.assignIn(this,{match_current_word:!1,ac_triggers:[],include_triggers:[],min_chars:2,max_items:10,auto_evaluate:!0,auto_first:!1,data:js.identity,filter:e.FILTER_CONTAINS,sort:!1!==a.sort&&t,item:o},a),this.index=-1,this.bindEvents(),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||a.list||[]}bindEvents(){const e={blur:()=>this.close({reason:"blur"})};this.auto_evaluate&&(e.input=()=>this.evaluate()),this._events={input:e,form:{submit:()=>this.close({reason:"submit"})},ul:{mousedown:e=>this.onMouseDown(e),mouseover:e=>this.onMouseOver(e)}},s.bind(this.input,this._events.input),s.bind(this.input.form,this._events.form),s.bind(this.ul,this._events.ul)}set list(e){if(Array.isArray(e)||"function"==typeof e)this._list=e;else if("string"==typeof e&&js.includes(e,","))this._list=e.split(/\s*,\s*/);else if(e=s.getElement(e),e&&e.children){const t=[];Array.prototype.slice.apply(e.children).forEach(function(e){if(!e.disabled){const o=e.textContent.trim(),n=e.value||o,a=e.label||o;""!==n&&t.push({label:a,value:n})}}),this._list=t}document.activeElement===this.input&&this.evaluate()}get selected(){return-1<this.index}get opened(){return this.is_opened}close(e){this.opened&&(this.ul.setAttribute("hidden",""),this.is_opened=!1,this.index=-1,this.trigger("suggestion-box-close",e||{}))}insertValue(e){this.match_current_word?Ms.replaceCurrentWord(this.input,e.value):this.input.value=e.value}open(){this.ul.removeAttribute("hidden"),this.is_opened=!0,this.auto_first&&-1===this.index&&this.goto(0),this.trigger("suggestion-box-open")}destroy(){s.unbind(this.input,this._events.input),s.unbind(this.input.form,this._events.form),this.input.removeAttribute("aria-autocomplete")}next(){const e=this.ul.children.length;this.goto(this.index<e-1?this.index+1:e?0:-1)}previous(){const e=this.ul.children.length,t=this.index-1;this.goto(this.selected&&-1!==t?t:e-1)}goto(e){const t=this.ul.children;this.selected&&t[this.index].setAttribute("aria-selected","false"),this.index=e,-1<e&&0<t.length&&(t[e].setAttribute("aria-selected","true"),t[e].focus(),this.status.textContent=t[e].textContent,this.ul.scrollTop=t[e].offsetTop-this.ul.clientHeight+t[e].clientHeight,this.trigger("suggestion-box-highlight",{text:this.suggestions[this.index]}))}select(e){if(e?this.index=Ms.siblingIndex(e):e=this.ul.children[this.index],e){const e=this.suggestions[this.index];this.insertValue(e),this.close({reason:"select"}),this.auto_completing=!1,this.trigger("suggestion-box-selectcomplete",{text:e})}}onMouseOver(e){const t=Ms.ancestor(e.target,"li");t&&this.goto(Array.prototype.slice.call(this.ul.children).indexOf(t))}onMouseDown(e){if(0===e.button){const t=Ms.ancestor(e.target,"li");t&&(e.preventDefault(),this.select(t,e.target))}}onKeyDown(e){if(this.opened){if(js.includes([mo.keycodes.ENTER,mo.keycodes.TAB],e.keyCode)&&this.selected)return e.preventDefault(),e.stopPropagation(),this.select(),!0;if(e.keyCode===mo.keycodes.ESCAPE)return this.close({reason:"esc"}),!0;if(js.includes([mo.keycodes.UP_ARROW,mo.keycodes.DOWN_ARROW],e.keyCode))return e.preventDefault(),e.stopPropagation(),this[e.keyCode===mo.keycodes.UP_ARROW?"previous":"next"](),!0}if(!js.includes([mo.keycodes.SHIFT,mo.keycodes.META,mo.keycodes.META_RIGHT,mo.keycodes.ESCAPE,mo.keycodes.ALT],e.keyCode))if(this.ac_triggers.includes(e.key))"Tab"===e.key&&e.preventDefault(),this.auto_completing=!0;else if("Backspace"===e.key){const t=Ms.getCurrentWord(e.target,e.target.selectionEnd-1);this.ac_triggers.includes(t[0])&&(this.auto_completing=!0)}}evaluate(e){const t=this.selected&&e&&(e.keyCode===mo.keycodes.UP_ARROW||e.keyCode===mo.keycodes.DOWN_ARROW);if(!this.auto_evaluate&&!this.auto_completing||t)return;const o="function"==typeof this._list?this._list():this._list;if(0===o.length)return;let a=this.match_current_word?Ms.getCurrentWord(this.input):this.input.value;const s=this.ac_triggers.includes(a[0]);s&&(this.auto_completing=!0,!this.include_triggers.includes(e.key)&&(a=a.slice("1"))),(s||a.length)&&a.length>=this.min_chars?(this.index=-1,this.ul.innerHTML="",this.suggestions=o.map(e=>new n(this.data(e,a))).filter(e=>this.filter(e,a)),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.max_items),this.suggestions.forEach(e=>this.ul.appendChild(this.item(e,a))),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):(this.close({reason:"nomatches"}),!s&&(this.auto_completing=!1))}}Object.assign(a.prototype,Ns.Events);const s={getElement(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null},bind(e,t){if(e)for(var o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const n=t[o];o.split(/\s+/).forEach(t=>e.addEventListener(t,n))}},unbind(e,t){if(e)for(var o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const n=t[o];o.split(/\s+/).forEach(t=>e.removeEventListener(t,n))}},regExpEscape(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}};e.AutoComplete=a}});var Is=o(149),Os=o.n(Is),Rs=o(150),Ds=o.n(Rs),Ls=o(151),Ps=o.n(Ls);const{Backbone:qs,Strophe:Bs,_:zs}=mo.env,Fs=mo.env.utils;mo.plugins.add("converse-bookmark-views",{dependencies:["converse-chatboxes","converse-muc","converse-muc-views"],overrides:{ChatRoomView:{events:{"click .toggle-bookmark":"toggleBookmark"},async renderHeading(){this.__super__.renderHeading.apply(this,arguments);const{_converse:e}=this.__super__;if(e.allow_bookmarks){const t=await e.checkBookmarksSupport();t&&this.renderBookmarkToggle()}}}},initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({hide_open_bookmarks:!0,muc_respect_autojoin:!0}),Object.assign(e,{removeBookmarkViaEvent(o){o.preventDefault();const n=o.target.getAttribute("data-bookmark-name"),a=o.target.getAttribute("data-room-jid");confirm(t("Are you sure you want to remove the bookmark \"%1$s\"?",n))&&zs.invokeMap(e.bookmarks.where({jid:a}),qs.Model.prototype.destroy)},addBookmarkViaEvent(t){t.preventDefault();const o=t.target.getAttribute("data-room-jid");e.api.rooms.open(o,{bring_to_foreground:!0}),e.chatboxviews.get(o).renderBookmarkForm()}});Object.assign(e.ChatRoomView.prototype,{renderBookmarkToggle(){if(this.el.querySelector(".chat-head .toggle-bookmark"))return;const{_converse:e}=this.__super__,{__:t}=e,o=Ps()(zs.assignIn(this.model.toJSON(),{info_toggle_bookmark:this.model.get("bookmarked")?t("Unbookmark this groupchat"):t("Bookmark this groupchat"),bookmarked:this.model.get("bookmarked")})),n=this.el.querySelector(".chatbox-buttons"),a=n.querySelector(".close-chatbox-button");a?a.insertAdjacentHTML("afterend",o):n.insertAdjacentHTML("beforeEnd",o)},setBookmarkState(){if(e.bookmarks!==void 0){const t=e.bookmarks.where({jid:this.model.get("jid")});t.length?this.model.save("bookmarked",!0):this.model.save("bookmarked",!1)}},renderBookmarkForm(){if(this.hideChatRoomContents(),!this.bookmark_form){this.bookmark_form=new e.MUCBookmarkForm({model:this.model,chatroomview:this});const t=this.el.querySelector(".chatroom-body");t.insertAdjacentElement("beforeend",this.bookmark_form.el)}Fs.showElement(this.bookmark_form.el)},toggleBookmark(t){t&&(t.preventDefault(),t.stopPropagation());const o=e.bookmarks.where({jid:this.model.get("jid")});o.length?o.forEach(e=>e.destroy()):this.renderBookmarkForm()}}),e.MUCBookmarkForm=qs.VDOMView.extend({className:"muc-bookmark-form",events:{"submit form":"onBookmarkFormSubmitted","click .button-cancel":"closeBookmarkForm"},initialize(e){this.chatroomview=e.chatroomview,this.render()},toHTML(){return Ds()({default_nick:this.model.get("nick"),heading:t("Bookmark this groupchat"),label_autojoin:t("Would you like this groupchat to be automatically joined upon startup?"),label_cancel:t("Cancel"),label_name:t("The name for this bookmark:"),label_nick:t("What should your nickname for this groupchat be?"),label_submit:t("Save"),name:this.model.get("name")})},onBookmarkFormSubmitted(t){t.preventDefault(),e.bookmarks.createBookmark({jid:this.model.get("jid"),autojoin:zs.get(t.target.querySelector("input[name=\"autojoin\"]"),"checked")||!1,name:zs.get(t.target.querySelector("input[name=name]"),"value"),nick:zs.get(t.target.querySelector("input[name=nick]"),"value")}),this.closeBookmarkForm(t)},closeBookmarkForm(e){e.preventDefault(),this.chatroomview.closeForm()}}),e.BookmarksView=qs.VDOMView.extend({tagName:"div",className:"bookmarks-list list-container rooms-list-container",events:{"click .add-bookmark":"addBookmark","click .bookmarks-toggle":"toggleBookmarksList","click .remove-bookmark":"removeBookmark","click .open-room":"openRoom"},initialize(){this.listenTo(this.model,"add",this.render),this.listenTo(this.model,"remove",this.render),this.listenTo(e.chatboxes,"add",this.render),this.listenTo(e.chatboxes,"remove",this.render);const t="converse.room-bookmarks".concat(e.bare_jid,"-list-model");this.list_model=new e.BookmarksList({id:t}),this.list_model.browserStorage=e.createStore(t);const o=()=>{this.render(),this.insertIntoControlBox()};this.list_model.fetch({success:o,error:o})},toHTML(){return Os()({_converse:e,bookmarks:this.model,desc_bookmarks:t("Click to toggle the bookmarks list"),info_leave_room:t("Leave this groupchat"),info_remove:t("Remove this bookmark"),info_remove_bookmark:t("Unbookmark this groupchat"),info_title:t("Show more information on this groupchat"),label_bookmarks:t("Bookmarks"),open_title:t("Click to open this groupchat"),toggle_state:this.list_model.get("toggle-state"),is_bookmark_hidden:t=>!!(e.hide_open_bookmarks&&e.chatboxes.get(t.get("jid"))),hidden:this.model.getUnopenedBookmarks().length&&!0})},insertIntoControlBox(){const t=e.chatboxviews.get("controlbox");if(t!==void 0&&!Fs.rootContains(e.root,this.el)){const e=t.el.querySelector(".list-container--bookmarks");e&&e.parentNode.replaceChild(this.el,e)}},openRoom(t){t.preventDefault();const o=t.target.textContent,n=t.target.getAttribute("data-room-jid"),a={name:o||Bs.unescapeNode(Bs.getNodeFromJid(n))||n};e.api.rooms.open(n,a,!0)},removeBookmark:e.removeBookmarkViaEvent,addBookmark:e.addBookmarkViaEvent,toggleBookmarksList(t){t&&t.preventDefault&&t.preventDefault();const o=t.target.matches(".fa")?t.target:t.target.querySelector(".fa");Fs.hasClass("fa-caret-down",o)?(Fs.slideIn(this.el.querySelector(".bookmarks")),this.list_model.save({"toggle-state":e.CLOSED}),o.classList.remove("fa-caret-down"),o.classList.add("fa-caret-right")):(o.classList.remove("fa-caret-right"),o.classList.add("fa-caret-down"),Fs.slideOut(this.el.querySelector(".bookmarks")),this.list_model.save({"toggle-state":e.OPENED}))}});e.api.listen.on("bookmarksInitialized",async function(){await e.api.waitUntil("roomsPanelRendered"),e.bookmarksview=new e.BookmarksView({model:e.bookmarks}),e.api.trigger("bookmarkViewsInitialized")}),e.api.listen.on("chatRoomViewInitialized",e=>e.setBookmarkState())}});var Hs=o(39),Us=o(152),Vs=o.n(Us),Ws=o(153),Gs=o.n(Ws),Js=o(154),$s=o.n(Js),Qs=o(155),Ys=o.n(Qs);const{Strophe:Xs,Backbone:Ks,dayjs:Zs}=mo.env,ei=mo.env.utils,ti={Error:"error",Connecting:"info","Connection failure":"error",Authenticating:"info","Authentication failure":"error",Connected:"info",Disconnected:"error",Disconnecting:"warn",Attached:"info",Redirect:"info",Reconnecting:"warn"},oi={0:"Error",1:"Connecting",2:"Connection failure",3:"Authenticating",4:"Authentication failure",5:"Connected",6:"Disconnected",7:"Disconnecting",8:"Attached",9:"Redirect",10:"Reconnecting"},ni=[0,1,2,3,4,7,10];mo.plugins.add("converse-controlbox",{dependencies:["converse-modal","converse-chatboxes","converse-chat","converse-rosterview","converse-chatview"],enabled(e){return!e.singleton},overrides:{ChatBoxes:{model(e,t){const{_converse:o}=this.__super__;return e&&"controlbox"==e.id?new o.ControlBox(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){function e(){const e=new t.ControlBox({id:"controlbox"});return t.chatboxes.add(e)}const{_converse:t}=this,{__:o}=t;t.api.settings.update({allow_logout:!0,default_domain:void 0,locked_domain:void 0,show_controlbox_by_default:!1,sticky_controlbox:!1}),t.api.promises.add("controlBoxInitialized"),t.ControlBox=t.ChatBox.extend({defaults(){return{bookmarked:!1,box_id:"controlbox",chat_state:void 0,closed:!t.show_controlbox_by_default,num_unread:0,time_opened:this.get("time_opened")||new Date().getTime(),type:t.CONTROLBOX_TYPE,url:""}},initialize(){"controlbox"===this.get("id")?this.set({time_opened:Zs(0).valueOf()}):t.ChatBox.prototype.initialize.apply(this,arguments)},validate(e){return e.type===t.CONTROLBOX_TYPE?"embedded"===t.view_mode&&t.singleton?"Controlbox not relevant in embedded view mode":void 0:t.ChatBox.prototype.validate.call(this,e)},maybeShow(e){return e||"controlbox"!==this.get("id")?t.ChatBox.prototype.maybeShow.call(this,e):this},onReconnection:function(){}}),t.ControlBoxView=t.ChatBoxView.extend({tagName:"div",className:"chatbox",id:"controlbox",events:{"click a.close-chatbox-button":"close"},initialize(){t.controlboxtoggle===void 0&&(t.controlboxtoggle=new t.ControlBoxToggle),t.controlboxtoggle.el.insertAdjacentElement("afterend",this.el),this.listenTo(this.model,"change:connected",this.onConnected),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"hide",this.hide),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"change:closed",this.ensureClosedState),this.render(),t.api.trigger("controlBoxInitialized",this)},render(){this.model.get("connected")&&void 0===this.model.get("closed")&&this.model.set("closed",!t.show_controlbox_by_default),this.el.innerHTML=Gs()(Object.assign(this.model.toJSON())),this.model.get("closed")?this.hide():this.show();const e=Object(ke.get)(t,"connection",{});return e.connected&&e.authenticated&&!e.disconnecting?this.model.get("connected")&&this.renderControlBoxPane():this.renderLoginPanel(),this},onConnected(){this.model.get("connected")&&this.render()},createBrandHeadingHTML(){return Vs()({sticky_controlbox:t.sticky_controlbox})},insertBrandHeading(){const e=this.el.querySelector(".brand-heading-container");if(null===e){const e=this.el.querySelector(".controlbox-head");e.insertAdjacentHTML("beforeend",this.createBrandHeadingHTML())}else e.outerHTML=this.createBrandHeadingHTML()},renderLoginPanel(){if(this.el.classList.add("logged-out"),this.loginpanel)this.loginpanel.render();else{this.loginpanel=new t.LoginPanel({model:new t.LoginPanelModel});const e=this.el.querySelector(".controlbox-panes");e.innerHTML="",e.appendChild(this.loginpanel.render().el),this.insertBrandHeading()}return this.loginpanel.initPopovers(),this},renderControlBoxPane(){this.loginpanel&&(this.loginpanel.remove(),delete this.loginpanel);this.controlbox_pane&&ei.isVisible(this.controlbox_pane.el)||(this.el.classList.remove("logged-out"),this.controlbox_pane=new t.ControlBoxPane,this.el.querySelector(".controlbox-panes").insertAdjacentElement("afterBegin",this.controlbox_pane.el))},async close(e){if((e&&e.preventDefault&&e.preventDefault(),!("closeAllChatBoxes"===Object(ke.get)(e,"name")&&(t.disconnection_cause!==t.LOGOUT||t.show_controlbox_by_default)))&&!t.sticky_controlbox){const e=Object(ke.get)(t,"connection",{});return e.connected&&!e.disconnecting?await new Promise((e,t)=>this.model.save({closed:!0},{success:e,error:t})):this.model.trigger("hide"),t.api.trigger("controlBoxClosed",this),this}},ensureClosedState(){this.model.get("closed")?this.hide():this.show()},hide(e){if(!t.sticky_controlbox)return ei.addClass("hidden",this.el),t.api.trigger("chatBoxClosed",this),t.api.connection.connected()||t.controlboxtoggle.render(),t.controlboxtoggle.show(e),this},onControlBoxToggleHidden(){this.model.set("closed",!1),this.el.classList.remove("hidden"),t.api.trigger("controlBoxOpened",this)},show(){return t.controlboxtoggle.hide(this.onControlBoxToggleHidden.bind(this)),this},showHelpMessages(){}}),t.LoginPanelModel=Ks.Model.extend({defaults:{errors:[]}}),t.LoginPanel=Ks.VDOMView.extend({tagName:"div",id:"converse-login-panel",className:"controlbox-pane fade-in",events:{"submit form#converse-login":"authenticate","change input":"validate"},initialize(){this.listenTo(this.model,"change",this.render),this.listenTo(t.connfeedback,"change",this.render),this.render()},toHTML(){const e=t.connfeedback.get("connection_status");let n,a;return ni.includes(e)&&(a=oi[e],n=ti[a]),Ys()(Object.assign(this.model.toJSON(),{__:o,_converse:t,ANONYMOUS:t.ANONYMOUS,EXTERNAL:t.EXTERNAL,LOGIN:t.LOGIN,PREBIND:t.PREBIND,auto_login:t.auto_login,authentication:t.authentication,connection_status:e,conn_feedback_class:n,conn_feedback_subject:a,conn_feedback_message:t.connfeedback.get("message"),placeholder_username:(t.locked_domain||t.default_domain)&&o("Username")||o("user@domain"),show_trust_checkbox:"on"!==t.trusted&&"off"!==t.trusted}))},initPopovers(){Array.from(this.el.querySelectorAll("[data-title]")).forEach(e=>{new ya.a.Popover(e,{trigger:"mobile"===t.view_mode&&"click"||"hover",dismissible:"mobile"===t.view_mode&&!0||!1,container:this.el.parentElement.parentElement.parentElement})})},validate(){const e=this.el.querySelector("form"),n=e.querySelector("input[name=jid]");return!n.value||t.locked_domain||t.default_domain||ei.isValidJID(n.value)?(n.setCustomValidity(""),!0):(n.setCustomValidity(o("Please enter a valid XMPP address")),!1)},authenticate(e){if(e&&e.preventDefault&&e.preventDefault(),t.authentication===t.ANONYMOUS)return this.connect(t.jid,null);if(!this.validate())return;const o=new FormData(e.target);"on"===t.trusted||"off"===t.trusted?t.config.save({trusted:"on"===t.trusted,storage:"on"===t.trusted?"persistent":"session"}):t.config.save({trusted:o.get("trusted")&&!0||!1,storage:o.get("trusted")?"persistent":"session"});let n=o.get("jid");if(t.locked_domain){const e="@"+t.locked_domain;n.endsWith(e)&&(n=n.substr(0,n.length-e.length)),n=Xs.escapeNode(n)+e}else t.default_domain&&!n.includes("@")&&(n=n+"@"+t.default_domain);this.connect(n,o.get("password"))},connect(e,o){["converse/login","converse/register"].includes(Ks.history.getFragment())&&t.router.navigate("",{replace:!0}),t.connection&&t.connection.reset(),t.api.user.login(e,o)}}),t.ControlBoxPane=Ks.NativeView.extend({tagName:"div",className:"controlbox-pane",initialize(){t.api.trigger("controlBoxPaneInitialized",this)}}),t.ControlBoxToggle=Ks.NativeView.extend({tagName:"a",className:"toggle-controlbox hidden",id:"toggle-controlbox",events:{click:"onClick"},attributes:{href:"#"},initialize(){t.chatboxviews.insertRowColumn(this.render().el),t.api.waitUntil("initialized").then(this.render.bind(this)).catch(t=>vt.fatal(t))},render(){return this.el.innerHTML=$s()({label_toggle:t.api.connection.connected()?o("Chat Contacts"):o("Toggle chat")}),this},hide(e){ei.hideElement(this.el),e()},show(e){ei.fadeIn(this.el,e)},showControlBox(){let o=t.chatboxes.get("controlbox");o||(o=e()),t.api.connection.connected()?o.save({closed:!1}):o.trigger("show")},onClick(o){if(o.preventDefault(),ei.isVisible(t.root.querySelector("#controlbox"))){const e=t.chatboxes.get("controlbox");t.api.connection.connected?e.save({closed:!0}):e.trigger("hide")}else this.showControlBox()}}),t.api.listen.on("chatBoxViewsInitialized",()=>{t.chatboxes.on("add",e=>{if(e.get("type")===t.CONTROLBOX_TYPE){const o=t.chatboxviews,n=o.get(e.get("id"));n?(n.model=e,n.initialize()):o.add(e.get("id"),new t.ControlBoxView({model:e}))}})}),t.api.listen.on("clearSession",()=>{const e=Object(ke.get)(t,"chatboxviews",null),o=e&&e.get("controlbox");o&&(ei.safeSave(o.model,{connected:!1}),Object(ke.get)(o,"controlbox_pane")&&(o.controlbox_pane.remove(),delete o.controlbox_pane))}),t.api.waitUntil("chatBoxViewsInitialized").then(e).catch(t=>vt.fatal(t)),t.api.listen.on("chatBoxesFetched",()=>{const o=t.chatboxes.get("controlbox")||e();o.save({connected:!0})});const n=function(){const e=t.chatboxviews.get("controlbox");return e.model.set({connected:!1}),e};t.api.listen.on("disconnected",()=>n().renderLoginPanel()),t.api.listen.on("will-reconnect",n),Object.assign(t.api,{controlbox:{async open(){await t.api.waitUntil("chatBoxesFetched");const e=(await t.api.chatboxes.get("controlbox"))||t.api.chatboxes.create("controlbox",{},t.Controlbox);return e.trigger("show"),e},get(){return t.chatboxviews.get("controlbox")}}})}});var ai=o(156),si=o.n(ai);const ii=mo.env.utils;mo.plugins.add("converse-dragresize",{dependencies:["converse-chatview","converse-headlines-view","converse-muc-views"],enabled(e){return"overlayed"==e.view_mode},overrides:{ChatBox:{initialize(){const e=this.__super__.initialize.apply(this,arguments),t=this.get("height"),o=this.get("width"),n="controlbox"===this.get("id")?e=>this.set(e):e=>this.save(e);return n({height:ii.applyDragResistance(t,this.get("default_height")),width:ii.applyDragResistance(o,this.get("default_width"))}),e}},ChatBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e}},HeadlinesBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e}},ControlBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e},renderLoginPanel(){const e=this.__super__.renderLoginPanel.apply(this,arguments);return this.initDragResize().setDimensions(),e},renderControlBoxPane(){const e=this.__super__.renderControlBoxPane.apply(this,arguments);return this.initDragResize().setDimensions(),e}},ChatRoomView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return fe(this.__super__._converse,this),this.setWidth(),e}}},initialize(){function e(e){return!(o.resizing&&o.allow_dragresize)||void(e.preventDefault(),o.resizing.chatbox.resizeChatBox(e))}function t(e){if(!o.resizing||!o.allow_dragresize)return!0;e.preventDefault();const t=ii.applyDragResistance(o.resizing.chatbox.height,o.resizing.chatbox.model.get("default_height")),n=ii.applyDragResistance(o.resizing.chatbox.width,o.resizing.chatbox.model.get("default_width"));o.api.connection.connected()?(o.resizing.chatbox.model.save({height:t}),o.resizing.chatbox.model.save({width:n})):(o.resizing.chatbox.model.set({height:t}),o.resizing.chatbox.model.set({width:n})),o.resizing=null}const{_converse:o}=this;o.api.settings.update({allow_dragresize:!0});Object.assign(o.ChatBoxView.prototype,{initDragResize(){const e=this,t=Object(ke.debounce)(()=>e.setDimensions());window.addEventListener("resize",e.debouncedSetDimensions),this.listenTo(this.model,"destroy",()=>window.removeEventListener("resize",t));const n=this.el.querySelector(".box-flyout"),a=window.getComputedStyle(n);if(void 0===this.model.get("height")){const e=parseInt(a.height.replace(/px$/,""),10),t=parseInt(a.width.replace(/px$/,""),10);this.model.set("height",e),this.model.set("default_height",e),this.model.set("width",t),this.model.set("default_width",t)}const s=a["min-width"],i=a["min-height"];return this.model.set("min_width",s.endsWith("px")?+s.replace(/px$/,""):0),this.model.set("min_height",i.endsWith("px")?+i.replace(/px$/,""):0),this.prev_pageY=0,this.prev_pageX=0,Object(ke.get)(o.connection,"connected")&&(this.height=this.model.get("height"),this.width=this.model.get("width")),this},resizeChatBox(e){let t;0===o.resizing.direction.indexOf("top")&&(t=e.pageY-this.prev_pageY,t&&(this.height=this.height-t>(this.model.get("min_height")||0)?this.height-t:this.model.get("min_height"),this.prev_pageY=e.pageY,this.setChatBoxHeight(this.height))),o.resizing.direction.includes("left")&&(t=this.prev_pageX-e.pageX,t&&(this.width=this.width+t>(this.model.get("min_width")||0)?this.width+t:this.model.get("min_width"),this.prev_pageX=e.pageX,this.setChatBoxWidth(this.width)))},setWidth(){this.model.get("width")&&(this.el.style.width=this.model.get("width"))},setDimensions(){this.adjustToViewport(),this.setChatBoxHeight(this.model.get("height")),this.setChatBoxWidth(this.model.get("width"))},setChatBoxHeight(e){e=e?ii.applyDragResistance(e,this.model.get("default_height"))+"px":"";const t=this.el.querySelector(".box-flyout");null!==t&&(t.style.height=e)},setChatBoxWidth(e){e=e?ii.applyDragResistance(e,this.model.get("default_width"))+"px":"",this.el.style.width=e;const t=this.el.querySelector(".box-flyout");null!==t&&(t.style.width=e)},adjustToViewport(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);480>=e?(this.model.set("height",void 0),this.model.set("width",void 0)):e<=this.model.get("width")?this.model.set("width",void 0):t<=this.model.get("height")&&this.model.set("height",void 0)},onStartVerticalResize(e){let t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];if(!o.allow_dragresize)return!0;const n=this.el.querySelector(".box-flyout"),a=window.getComputedStyle(n);this.height=parseInt(a.height.replace(/px$/,""),10),o.resizing={chatbox:this,direction:"top"},this.prev_pageY=e.pageY,t&&o.api.trigger("startVerticalResize",this)},onStartHorizontalResize(e){let t=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];if(!o.allow_dragresize)return!0;const n=this.el.querySelector(".box-flyout"),a=window.getComputedStyle(n);this.width=parseInt(a.width.replace(/px$/,""),10),o.resizing={chatbox:this,direction:"left"},this.prev_pageX=e.pageX,t&&o.api.trigger("startHorizontalResize",this)},onStartDiagonalResize(e){this.onStartHorizontalResize(e,!1),this.onStartVerticalResize(e,!1),o.resizing.direction="topleft",o.api.trigger("startDiagonalResize",this)}}),ii.applyDragResistance=function(e,t){if(void 0===e)return;if(void 0===t)return e;return e!==t&&10>Math.abs(e-t)?t:e},o.api.listen.on("registeredGlobalEventHandlers",function(){document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)}),o.api.listen.on("unregisteredGlobalEventHandlers",function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}),o.api.listen.on("beforeShowingChatView",e=>e.initDragResize().setDimensions())}});class ri{static get DIRECTION(){return{down:"down",end:"end",home:"home",left:"left",right:"right",up:"up"}}static get DEFAULTS(){return{home:["".concat(converse.keycodes.SHIFT,"+").concat(converse.keycodes.UP_ARROW)],end:["".concat(converse.keycodes.SHIFT,"+").concat(converse.keycodes.DOWN_ARROW)],up:[converse.keycodes.UP_ARROW],down:[converse.keycodes.DOWN_ARROW],left:[converse.keycodes.LEFT_ARROW,"".concat(converse.keycodes.SHIFT,"+").concat(converse.keycodes.TAB)],right:[converse.keycodes.RIGHT_ARROW,converse.keycodes.TAB],getSelector:null,jump_to_picked:null,jump_to_picked_direction:null,jump_to_picked_selector:"picked",onSelected:null,selected:"selected",selector:"li"}}static getClosestElement(e,t){const o=e.reduce((e,o)=>{const n=t(o);return n<e.distance?{distance:n,element:o}:e},{distance:1/0});return o.element}constructor(e,t){this.doc=window.document,this.container=e,this.scroll_container=t.scroll_container||e,this.options=Object.assign({},ri.DEFAULTS,t),this.init()}init(){this.selected=null,this.keydownHandler=null,this.elements={},this.keys={},this.options.down.forEach(e=>this.keys[e]=ri.DIRECTION.down),this.options.end.forEach(e=>this.keys[e]=ri.DIRECTION.end),this.options.home.forEach(e=>this.keys[e]=ri.DIRECTION.home),this.options.left.forEach(e=>this.keys[e]=ri.DIRECTION.left),this.options.right.forEach(e=>this.keys[e]=ri.DIRECTION.right),this.options.up.forEach(e=>this.keys[e]=ri.DIRECTION.up)}enable(){this.getElements(),this.keydownHandler=e=>this.handleKeydown(e),this.doc.addEventListener("keydown",this.keydownHandler),this.enabled=!0}disable(){this.keydownHandler&&this.doc.removeEventListener("keydown",this.keydownHandler),this.unselect(),this.elements={},this.enabled=!1}destroy(){this.disable(),this.container.domNavigator&&delete this.container.domNavigator}getNextElement(e){let t;if(e===ri.DIRECTION.home)t=this.getElements(e)[0];else if(e===ri.DIRECTION.end)t=Array.from(this.getElements(e)).pop();else if(!this.selected)t=e===ri.DIRECTION.right||e===ri.DIRECTION.down?this.getElements(e)[1]:this.getElements(e)[0];else if(e===ri.DIRECTION.right){const o=this.getElements(e);t=o.slice(o.indexOf(this.selected))[1]}else if(e==ri.DIRECTION.left){const o=this.getElements(e);t=o.slice(0,o.indexOf(this.selected)).pop()||this.selected}else if(e==ri.DIRECTION.down){const e=this.selected.offsetLeft,o=this.selected.offsetTop+this.selected.offsetHeight,n=this.elementsAfter(0,o),a=t=>Math.abs(t.offsetLeft-e)+Math.abs(t.offsetTop-o);t=ri.getClosestElement(n,a)}else if(e==ri.DIRECTION.up){const e=this.selected.offsetLeft,o=this.selected.offsetTop-1,n=this.elementsBefore(1/0,o),a=t=>Math.abs(e-t.offsetLeft)+Math.abs(o-t.offsetTop);t=ri.getClosestElement(n,a)}else throw new Error("getNextElement: invalid direction value");return this.options.jump_to_picked&&t&&t.matches(this.options.jump_to_picked)&&e===this.options.jump_to_picked_direction&&(t=this.container.querySelector(this.options.jump_to_picked_selector)||t),t}select(e,t){e&&e!==this.selected&&(this.unselect(),t&&this.scrollTo(e,t),e.matches("input")?e.focus():ea.addClass(this.options.selected,e),this.selected=e,this.options.onSelected&&this.options.onSelected(e))}unselect(){this.selected&&(ea.removeClass(this.options.selected,this.selected),delete this.selected)}scrollTo(e,t){if(!this.inScrollContainerViewport(e)){const o=this.scroll_container;if(!o.contains(e))return;t===ri.DIRECTION.left?(o.scrollLeft=e.offsetLeft-o.offsetLeft,o.scrollTop=e.offsetTop-o.offsetTop):t===ri.DIRECTION.up?o.scrollTop=e.offsetTop-o.offsetTop:t===ri.DIRECTION.right?(o.scrollLeft=e.offsetLeft-o.offsetLeft-(o.offsetWidth-e.offsetWidth),o.scrollTop=e.offsetTop-o.offsetTop-(o.offsetHeight-e.offsetHeight)):t===ri.DIRECTION.down?o.scrollTop=e.offsetTop-o.offsetTop-(o.offsetHeight-e.offsetHeight):void 0}else be(e)||(t===ri.DIRECTION.left?document.body.scrollLeft=ye(e)-document.body.offsetLeft:t===ri.DIRECTION.up?document.body.scrollTop=ve(e)-document.body.offsetTop:t===ri.DIRECTION.right?document.body.scrollLeft=ye(e)-document.body.offsetLeft-(document.documentElement.clientWidth-e.offsetWidth):t===ri.DIRECTION.down?document.body.scrollTop=ve(e)-document.body.offsetTop-(document.documentElement.clientHeight-e.offsetHeight):void 0)}inScrollContainerViewport(e){const t=this.scroll_container;return!(e.offsetLeft-t.scrollLeft<t.offsetLeft)&&!(e.offsetTop-t.scrollTop<t.offsetTop)&&!(e.offsetLeft+e.offsetWidth-t.scrollLeft>t.offsetLeft+t.offsetWidth)&&!(e.offsetTop+e.offsetHeight-t.scrollTop>t.offsetTop+t.offsetHeight)}getElements(e){const t=this.options.getSelector?this.options.getSelector(e):this.options.selector;return this.elements[t]||(this.elements[t]=Array.from(this.container.querySelectorAll(t))),this.elements[t]}elementsAfter(e,t){return this.getElements(ri.DIRECTION.down).filter(o=>o.offsetLeft>=e&&o.offsetTop>=t)}elementsBefore(e,t){return this.getElements(ri.DIRECTION.up).filter(o=>o.offsetLeft<=e&&o.offsetTop<=t)}handleKeydown(e){const t=converse.keycodes,o=e.shiftKey?this.keys["".concat(t.SHIFT,"+").concat(e.which)]:this.keys[e.which];if(o){e.preventDefault(),e.stopPropagation();const t=this.getNextElement(o,e);this.select(t,o)}}}var li=ri,di=o(157),ci=o.n(di),pi=o(158),ui=o.n(pi);const{Backbone:mi,sizzle:gi}=converse.env,hi=converse.env.utils;converse.plugins.add("converse-emoji-views",{dependencies:["converse-emoji","converse-chatview","converse-muc-views"],overrides:{ChatBoxView:{events:{"click .toggle-smiley":"toggleEmojiMenu"},onEnterPressed(){this.emoji_dropdown&&hi.isVisible(this.emoji_dropdown.el.querySelector(".emoji-picker"))&&this.emoji_dropdown.toggle(),this.__super__.onEnterPressed.apply(this,arguments)},onKeyDown(e){if(e.keyCode===converse.keycodes.TAB){const t=hi.getCurrentWord(e.target,null,/(:.*?:)/g);if(t.startsWith(":"))return e.preventDefault(),e.stopPropagation(),this.autocompleteInPicker(e.target,t)}return this.__super__.onKeyDown.call(this,e)}},ChatRoomView:{events:{"click .toggle-smiley":"toggleEmojiMenu"}}},initialize(){const{_converse:t}=this,{__:o}=t;t.api.settings.update({use_system_emojis:!0,visible_toolbar_buttons:{emoji:!0}});Object.assign(t.ChatBoxView.prototype,{async autocompleteInPicker(e,t){await this.createEmojiDropdown(),this.emoji_picker_view.model.set({autocompleting:t,position:e.selectionStart},{silent:!0}),this.emoji_picker_view.filter(t,!0),this.emoji_dropdown.toggle()},async createEmojiPicker(){if(this.emoji_picker_view)return void this.insertEmojiPicker();if(!t.emojipicker){t.emojis.json.recent={};const e="converse.emoji-".concat(t.bare_jid);t.emojipicker=new t.EmojiPicker({id:e}),t.emojipicker.browserStorage=t.createStore(e),await t.emojipicker.fetch();const o=t.emojipicker.get("recent");o&&(t.emojis.json.recent=t.emojipicker.get("recent"))}this.emoji_picker_view=new t.EmojiPickerView({model:t.emojipicker}),this.emoji_picker_view.chatview=this,this.insertEmojiPicker()},async createEmojiDropdown(){if(!this.emoji_dropdown){await t.api.waitUntil("emojisInitialized");const e=this.el.querySelector(".emoji-picker");this.emoji_dropdown=new ya.a.Dropdown(e,!0),this.emoji_dropdown.el=e}},async toggleEmojiMenu(e){e.stopPropagation(),await this.emoji_picker_view.render(),await this.createEmojiDropdown(),this.emoji_dropdown.toggle(),this.emoji_picker_view.setScrollPosition()},insertEmojiPicker(){const e=this.el.querySelector(".emoji-picker__container");e.innerHTML="",e.appendChild(this.emoji_picker_view.el)}}),t.EmojiPickerView=mi.VDOMView.extend({className:"emoji-picker",events:{"click .emoji-picker__header li.emoji-category .pick-category":"chooseCategory","click .emoji-skintone-picker li.emoji-skintone":"chooseSkinTone","click .insert-emoji":"insertEmoji","focus .emoji-search":"disableArrowNavigation","keydown .emoji-search":"onKeyDown"},async initialize(){this.onGlobalKeyDown=e=>this._onGlobalKeyDown(e);const e=document.querySelector("body");e.addEventListener("keydown",this.onGlobalKeyDown),this.search_results=[],this.debouncedFilter=Object(ke.debounce)(e=>this.filter(e.value),150),this.listenTo(this.model,"change:query",this.render),this.listenTo(this.model,"change:current_skintone",this.render),this.listenTo(this.model,"change:current_category",()=>{this.render();const e=this.model.get("current_category"),t=this.el.querySelector(".emoji-category[data-category=\"".concat(e,"\"]"));this.navigator.select(t),this.navigator.enabled||this.navigator.enable()}),await t.api.waitUntil("emojisInitialized"),this.render()},toHTML(){return ui()(Object.assign(this.model.toJSON(),{__:o,_converse:t,emoji_categories:t.emoji_categories,emojis_by_category:t.emojis.json,shouldBeHidden:e=>this.shouldBeHidden(e),skintones:["tone1","tone2","tone3","tone4","tone5"],toned_emojis:t.emojis.toned,transform:hi.getEmojiRenderer(),transformCategory:e=>hi.getEmojiRenderer()(this.getTonedShortname(e)),search_results:this.search_results}))},remove(){const e=document.querySelector("body");e.removeEventListener("keydown",this.onGlobalKeyDown),mi.VDOMView.prototype.remove.call(this)},afterRender(){this.initIntersectionObserver();const e=this.el.querySelector(".emoji-search");e.addEventListener("focus",e=>this.chatview.emitFocused(e)),e.addEventListener("blur",e=>this.chatview.emitBlurred(e)),this.initArrowNavigation()},initArrowNavigation(){if(!this.navigator){const e={jump_to_picked:".emoji-category",jump_to_picked_selector:".emoji-category.picked",jump_to_picked_direction:li.DIRECTION.down,picked_selector:".picked",scroll_container:this.el.querySelector(".emoji-picker__lists"),getSelector:e=>{if(e===li.DIRECTION.down){const e=this.navigator.selected&&this.navigator.selected.getAttribute("data-category");return e?"ul[data-category=\"".concat(e,"\"] li:not(.hidden):not(.emoji-skintone), .emoji-search"):"li:not(.hidden):not(.emoji-skintone), .emoji-search"}return"li:not(.hidden):not(.emoji-skintone), .emoji-search"},onSelected:e=>{e.matches(".insert-emoji")&&this.setCategoryForElement(e.parentElement),e.matches(".insert-emoji, .emoji-category")&&e.firstElementChild.focus(),e.matches(".emoji-search")&&e.focus()}};this.navigator=new li(this.el,e),this.listenTo(this.chatview.model,"destroy",()=>this.navigator.destroy())}},enableArrowNavigation(e){e&&(e.preventDefault(),e.stopPropagation()),this.disableArrowNavigation(),this.navigator.enable(),this.navigator.handleKeydown(e)},disableArrowNavigation(){this.navigator.disable()},filter(o,n){const a=this.model.get("query");if(this.search_results=o?a&&o.includes(a)?this.search_results.filter(n=>t.FILTER_CONTAINS(n.sn,o)):t.emojis_list.filter(n=>t.FILTER_CONTAINS(n.sn,o)):[],this.model.set({query:o}),n){const e=this.el.querySelector(".emoji-search");e.value=o}},setCategoryForElement(e){const t=e.getAttribute("data-category"),o=this.model.get("current_category");if(o!==t){this.model.set({current_category:t},{silent:!0});const e=gi(".emoji-picker__header .emoji-category",this.el);e.forEach(e=>hi.removeClass("picked",e));const o=e.filter(e=>e.getAttribute("data-category")===t).pop();o&&hi.addClass("picked",o)}},setCategoryOnVisibilityChange(e){const t=this.navigator.selected,o=e.filter(e=>e.target.contains(t)).pop();let n;n=o?o:e.reduce((e,t)=>t.intersectionRatio>=Object(ke.get)(e,"intersectionRatio",0)?t:e,null),n&&n.isIntersecting&&this.setCategoryForElement(n.target)},initIntersectionObserver(){if(window.IntersectionObserver){if(this.observer)this.observer.disconnect();else{const e={root:this.el.querySelector(".emoji-picker__lists"),threshold:[.1]};this.observer=new IntersectionObserver(e=>this.setCategoryOnVisibilityChange(e),e)}gi(".emoji-picker",this.el).forEach(e=>this.observer.observe(e))}},insertIntoTextArea(e){const t=this.model.get("autocompleting"),o=this.model.get("position");this.model.set({autocompleting:null,position:null}),this.chatview.handleEmojiSelected(e,t,o),this.chatview.emoji_dropdown&&this.chatview.emoji_dropdown.toggle(),this.filter("",!0),this.disableArrowNavigation(),this.saveEmoji(e)},onEnterPressed(e){e.preventDefault(),e.stopPropagation(),t.emoji_shortnames.includes(e.target.value)?this.insertIntoTextArea(e.target.value):1===this.search_results.length?this.insertIntoTextArea(this.search_results[0].sn):this.navigator.selected&&this.navigator.selected.matches(".insert-emoji")?this.insertIntoTextArea(this.navigator.selected.getAttribute("data-emoji")):this.navigator.selected&&this.navigator.selected.matches(".emoji-category")&&this.chooseCategory({target:this.navigator.selected})},_onGlobalKeyDown(e){this.navigator&&(e.keyCode===converse.keycodes.ENTER&&this.navigator.selected&&hi.isVisible(this.el)?this.onEnterPressed(e):e.keyCode===converse.keycodes.DOWN_ARROW&&!this.navigator.enabled&&hi.isVisible(this.el)&&this.enableArrowNavigation(e))},onKeyDown(e){if(e.keyCode===converse.keycodes.RIGHT_ARROW){e.preventDefault(),e.stopPropagation(),e.target.blur();const t=this.el.querySelector(".pick-category");this.navigator.select(t,"right")}else if(!(e.keyCode===converse.keycodes.TAB))e.keyCode!==converse.keycodes.DOWN_ARROW||this.navigator.enabled?e.keyCode===converse.keycodes.ENTER?this.onEnterPressed(e):e.keyCode!==converse.keycodes.ENTER&&e.keyCode!==converse.keycodes.DOWN_ARROW&&this.debouncedFilter(e.target):this.enableArrowNavigation(e);else if(e.target.value){e.preventDefault();const o=Object(ke.find)(t.emoji_shortnames,o=>t.FILTER_CONTAINS(o,e.target.value));o&&this.filter(o,!0)}else this.navigator.enabled||this.enableArrowNavigation(e)},shouldBeHidden(e){const o=this.model.get("current_skintone");if(e.includes("_tone")){if(!o||!e.includes(o))return!0;}else if(o&&t.emojis.toned.includes(e))return!0;const n=this.model.get("query");return!(!n||t.FILTER_CONTAINS(e,n))},getTonedShortname(e){return t.emojis.toned.includes(e)&&this.model.get("current_skintone")?"".concat(e.slice(0,e.length-1),"_").concat(this.model.get("current_skintone"),":"):e},chooseSkinTone(e){e.preventDefault(),e.stopPropagation();const t="IMG"===e.target.nodeName?e.target.parentElement:e.target,o=t.getAttribute("data-skintone").trim();this.model.get("current_skintone")===o?this.model.save({current_skintone:""}):this.model.save({current_skintone:o})},chooseCategory(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();const t=this.el.querySelector(".emoji-search");t.value="";const o=e.target.matches("li")?e.target:hi.ancestor(e.target,"li");this.setCategoryForElement(o),this.navigator.select(o),this.setScrollPosition()},setScrollPosition(){const e=this.model.get("current_category"),t=this.el.querySelector(".emoji-picker__lists"),o=this.el.querySelector("#emoji-picker-".concat(e));o&&(t.scrollTop=o.offsetTop-3*o.offsetHeight+4)},saveEmoji(o){const n=t.emojis_list.filter(n=>t.FILTER_CONTAINS(n.sn,o)),a=n[0];"recent"!=a.c&&(a.c="recent",t.emojis.json.recent[o]=a,t.emojipicker.save("recent",t.emojis.json.recent),this.render())},insertEmoji(e){e.preventDefault(),e.stopPropagation();const t="IMG"===e.target.nodeName?e.target.parentElement:e.target,o=this.model.get("autocompleting"),n=this.model.get("position");this.model.set({autocompleting:null,position:null}),this.chatview.handleEmojiSelected(t.getAttribute("data-emoji"),o,n),this.chatview.emoji_dropdown.toggle(),this.filter("",!0),this.saveEmoji(t.getAttribute("data-emoji"))}}),t.api.listen.on("chatBoxClosed",e=>e.emoji_picker_view&&e.emoji_picker_view.remove()),t.api.listen.on("renderToolbar",e=>{if(t.visible_toolbar_buttons.emoji){const t=ci()({tooltip_insert_smiley:o("Insert emojis")});e.el.querySelector(".chat-toolbar").insertAdjacentHTML("afterBegin",t),e.createEmojiPicker()}})}}),mo.plugins.add("converse-singleton",{enabled(e){return e.singleton},initialize(){this._converse.api.settings.update({allow_logout:!1,allow_muc_invitations:!1,hide_muc_server:!0});const{_converse:e}=this;if(!Array.isArray(e.auto_join_rooms)&&!Array.isArray(e.auto_join_private_chats))throw new Error("converse-singleton: auto_join_rooms must be an Array");if(1<e.auto_join_rooms.length||1<e.auto_join_private_chats.length)throw new Error("It doesn't make sense to have singleton set to true and auto_join_rooms or auto_join_private_chats set to more then one, since only one chat room may be open at any time.")}});var _i=o(159),fi=o.n(_i);mo.plugins.add("converse-fullscreen",{enabled(e){return e.isUniView()},overrides:{ControlBoxView:{createBrandHeadingHTML(){const{_converse:e}=this.__super__;return fi()({version_name:e.VERSION_NAME})},insertBrandHeading(){const{_converse:e}=this.__super__,t=e.root.getElementById("converse-login-panel");t.parentNode.insertAdjacentHTML("afterbegin",this.createBrandHeadingHTML())}}},initialize(){this._converse.api.settings.update({chatview_avatar_height:50,chatview_avatar_width:50,hide_open_bookmarks:!0,show_controlbox_by_default:!0,sticky_controlbox:!0})}}),mo.plugins.add("converse-mam-views",{dependencies:["converse-mam","converse-chatview","converse-muc-views"],overrides:{ChatBoxView:{render(){const e=this.__super__.render.apply(this,arguments);return this.disable_mam||this.content.addEventListener("scroll",Object(ke.debounce)(this.onScroll.bind(this),100)),e},async onScroll(){if(0===this.content.scrollTop&&this.model.messages.length){const e=this.model.getOldestMessage();if(e){const t=this.model.get("jid"),o=e&&e.get("stanza_id ".concat(t));this.addSpinner(),o?await this.model.fetchArchivedMessages({before:o}):await this.model.fetchArchivedMessages({end:e.get("time")}),this.clearSpinner()}}}},ChatRoomView:{renderChatArea(){const e=this.__super__.renderChatArea.apply(this,arguments);return this.disable_mam||this.content.addEventListener("scroll",Object(ke.debounce)(this.onScroll.bind(this),100)),e}}}});var bi=o(64),vi=o.n(bi),yi=o(160),xi=o.n(yi),Si=o(161),wi=o.n(Si),ki=o(162),Ei=o.n(ki);const{_:Ci,Backbone:Ai,dayjs:Ti}=mo.env,ji=mo.env.utils;mo.plugins.add("converse-minimize",{dependencies:["converse-chatview","converse-controlbox","converse-muc-views","converse-headlines-view","converse-dragresize"],enabled(e){return"overlayed"===e.view_mode},overrides:{ChatBox:{initialize(){this.__super__.initialize.apply(this,arguments),this.on("show",this.maximize,this);"controlbox"===this.get("id")||this.save({minimized:this.get("minimized")||!1,time_minimized:this.get("time_minimized")||Ti()})},maybeShow(e){return!e&&this.get("minimized")?this:this.__super__.maybeShow.apply(this,arguments)}},ChatBoxView:{events:{"click .toggle-chatbox-button":"minimize"},initialize(){return this.listenTo(this.model,"change:minimized",this.onMinimizedChanged),this.__super__.initialize.apply(this,arguments)},show(){const{_converse:e}=this.__super__;return"overlayed"===e.view_mode&&this.model.get("minimized")?(this.model.minimize(),this):this.__super__.show.apply(this,arguments)},isNewMessageHidden(){return this.model.get("minimized")||this.__super__.isNewMessageHidden.apply(this,arguments)},shouldShowOnTextMessage(){return!this.model.get("minimized")&&this.__super__.shouldShowOnTextMessage.apply(this,arguments)},setChatBoxHeight(e){if(!this.model.get("minimized"))return this.__super__.setChatBoxHeight.call(this,e)},setChatBoxWidth(e){if(!this.model.get("minimized"))return this.__super__.setChatBoxWidth.call(this,e)}},ChatBoxHeading:{render(){const{_converse:e}=this.__super__,{__:t}=e;this.__super__.render.apply(this,arguments);const o=vi()({info_minimize:t("Minimize this chat box")}),n=this.el.querySelector(".toggle-chatbox-button");if(n)n.outerHTML=o;else{const e=this.el.querySelector(".close-chatbox-button");e.insertAdjacentHTML("afterEnd",o)}}},ChatRoomView:{events:{"click .toggle-chatbox-button":"minimize"},initialize(){this.listenTo(this.model,"change:minimized",this.onMinimizedChanged);const e=this.__super__.initialize.apply(this,arguments);return this.model.get("minimized")&&this.hide(),e},generateHeadingHTML(){const{_converse:e}=this.__super__,{__:t}=e,o=this.__super__.generateHeadingHTML.apply(this,arguments),n=document.createElement("div");n.innerHTML=o;const a=n.querySelector(".chatbox-buttons"),s=a.querySelector(".close-chatbox-button"),i=vi()({info_minimize:t("Minimize this chat box")});return s?s.insertAdjacentHTML("afterend",i):a.insertAdjacentHTML("beforeEnd",i),n.innerHTML}}},initialize(){function e(){t.minimized_chats=new t.MinimizedChats({model:t.chatboxes}),t.api.trigger("minimizedChatsInitialized")}const{_converse:t}=this,{__:o}=t;t.api.settings.update({no_trimming:!1});Object.assign(t.ChatBox.prototype,{maximize(){ji.safeSave(this,{minimized:!1,time_opened:new Date().getTime()})},minimize(){ji.safeSave(this,{minimized:!0,time_minimized:new Date().toISOString()})}});Object.assign(t.ChatBoxView.prototype,{onMaximized(){const{_converse:e}=this.__super__;return this.insertIntoDOM(),this.model.isScrolledUp()||this.model.clearUnreadMsgCounter(),this.model.setChatState(e.ACTIVE),this.show(),e.api.trigger("chatBoxMaximized",this),this},onMinimized(e){const{_converse:t}=this.__super__;return e&&e.preventDefault&&e.preventDefault(),this.model.collection&&this.model.collection.browserStorage?this.model.save({scroll:this.content.scrollTop}):this.model.set({scroll:this.content.scrollTop}),this.model.setChatState(t.INACTIVE),this.hide(),t.api.trigger("chatBoxMinimized",this),this},minimize(){return this.model.minimize(),this},onMinimizedChanged(e){e.get("minimized")?this.onMinimized():this.onMaximized()}});Object.assign(t.ChatBoxViews.prototype,{getChatBoxWidth(e){if("controlbox"===e.model.get("id")){const e=this.get("controlbox");return e&&ji.isVisible(e.el)?ji.getOuterWidth(e.el,!0):ji.getOuterWidth(t.controlboxtoggle.el,!0)}return!e.model.get("minimized")&&ji.isVisible(e.el)?ji.getOuterWidth(e.el,!0):0},getShownChats(){return this.filter(e=>!e.model.get("minimized")&&!e.model.get("closed")&&ji.isVisible(e.el))},getMinimizedWidth(){const e=Ci.get(t.minimized_chats,"el");return Ci.includes(this.model.pluck("minimized"),!0)?ji.getOuterWidth(e,!0):0},getBoxesWidth(e){const t=e?e.model.get("id"):null,o=e?ji.getOuterWidth(e.el,!0):0;return Object.values(this.xget(t)).reduce((e,t)=>e+this.getChatBoxWidth(t),o)},async trimChats(e){if(!t.no_trimming&&t.api.connection.connected()&&"overlayed"===t.view_mode){const o=this.getShownChats();if(!(1>=o.length)){const n=ji.getOuterWidth(document.querySelector("body"),!0);if(this.getChatBoxWidth(o[0])!==n){await t.api.waitUntil("minimizedChatsInitialized");const o=Ci.get(t.minimized_chats,"el");if(o)for(;this.getMinimizedWidth()+this.getBoxesWidth(e)>n;){const t=e?e.model.get("id"):null,o=this.getOldestMaximizedChat([t]);if(o){const e=this.get(o.get("id"));e&&e.hide(),o.minimize()}else break}}}}},getOldestMaximizedChat(e){e.push("controlbox");let t=0,o=this.model.sort().at(t);for(;Ci.includes(e,o.get("id"))||!0===o.get("minimized");)if(t++,o=this.model.at(t),!o)return null;return o}}),t.api.promises.add("minimizedChatsInitialized"),t.MinimizedChatBoxView=Ai.NativeView.extend({tagName:"div",events:{"click .close-chatbox-button":"close","click .restore-chat":"restore"},initialize(){this.listenTo(this.model,"change:num_unread",this.render),this.listenTo(this.model,"change:name",this.render),this.listenTo(this.model,"change:fullname",this.render),this.listenTo(this.model,"change:jid",this.render),this.listenTo(this.model,"destroy",this.remove),t.api.trigger("minimizedChatViewInitialized",this)},render(){const e=Object.assign(this.model.toJSON(),{tooltip:o("Click to restore this chat"),title:this.model.getDisplayName()});return this.el.innerHTML=Ei()(e),this.el},close(e){e&&e.preventDefault&&e.preventDefault(),this.remove();const o=t.chatboxviews.get(this.model.get("id"));return o?o.close():(this.model.destroy(),t.api.trigger("chatBoxClosed",this)),this},restore:Ci.debounce(function(e){e&&e.preventDefault&&e.preventDefault(),this.model.off("change:num_unread",null,this),this.remove(),this.model.maximize()},200,{leading:!0})}),t.MinimizedChats=gn.extend({tagName:"div",id:"minimized-chats",className:"hidden",events:{"click #toggle-minimized-chats":"toggle"},initialize(){this.render(),this.initToggle(),this.addMultipleChats(this.model.where({minimized:!0})),this.listenTo(this.model,"add",this.onChanged),this.listenTo(this.model,"destroy",this.removeChat),this.listenTo(this.model,"change:minimized",this.onChanged),this.listenTo(this.model,"change:num_unread",this.updateUnreadMessagesCounter)},render(){return this.el.parentElement||(this.el.innerHTML=xi()(),t.chatboxviews.insertRowColumn(this.el)),0===this.keys().length?this.el.classList.add("hidden"):0<this.keys().length&&!ji.isVisible(this.el)&&this.el.classList.remove("hidden"),this.el},initToggle(){const e="converse.minchatstoggle-".concat(t.bare_jid);this.toggleview=new t.MinimizedChatsToggleView({model:new t.MinimizedChatsToggle({id:e})}),this.toggleview.model.browserStorage=t.createStore(e),this.toggleview.model.fetch()},toggle(e){e&&e.preventDefault&&e.preventDefault(),this.toggleview.model.save({collapsed:!this.toggleview.model.get("collapsed")}),ji.slideToggleElement(this.el.querySelector(".minimized-chats-flyout"),200)},onChanged(e){"controlbox"===e.get("id")||(e.get("minimized")?this.addChat(e):this.get(e.get("id"))&&this.removeChat(e))},addChatView(e){const o=this.get(e.get("id"));if(!(o&&o.el.parentNode)){const o=new t.MinimizedChatBoxView({model:e});this.el.querySelector(".minimized-chats-flyout").insertAdjacentElement("beforeEnd",o.render()),this.add(e.get("id"),o)}},addMultipleChats(e){e.forEach(e=>this.addChatView(e)),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},addChat(e){this.addChatView(e),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},removeChat(e){this.remove(e.get("id")),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},updateUnreadMessagesCounter(){this.toggleview.model.save({num_unread:Ci.sum(this.model.pluck("num_unread"))}),this.render()}}),t.MinimizedChatsToggle=Ai.Model.extend({defaults:{collapsed:!1,num_minimized:0,num_unread:0}}),t.MinimizedChatsToggleView=Ai.NativeView.extend({_setElement(){this.el=t.root.querySelector("#toggle-minimized-chats")},initialize(){this.listenTo(this.model,"change:num_minimized",this.render),this.listenTo(this.model,"change:num_unread",this.render),this.flyout=this.el.parentElement.querySelector(".minimized-chats-flyout")},render(){return this.el.innerHTML=wi()(Object.assign(this.model.toJSON(),{Minimized:o("Minimized")})),this.model.get("collapsed")?ji.hideElement(this.flyout):ji.showElement(this.flyout),this.el}}),t.api.listen.on("chatBoxViewsInitialized",()=>e()),t.api.listen.on("chatBoxInsertedIntoDOM",e=>t.chatboxviews.trimChats(e)),t.api.listen.on("controlBoxOpened",e=>t.chatboxviews.trimChats(e));const n=Ci.debounce(()=>t.chatboxviews.trimChats(),250);t.api.listen.on("registeredGlobalEventHandlers",()=>window.addEventListener("resize",n)),t.api.listen.on("unregisteredGlobalEventHandlers",()=>window.removeEventListener("resize",n))}});var Ni=o(163),Mi=o.n(Ni),Ii=o(164),Oi=o.n(Ii),Ri=o(165),Di=o.n(Ri),Li=o(166),Pi=o.n(Li),qi=o(167),Bi=o.n(qi),zi=o(168),Fi=o.n(zi),Hi=o(169),Ui=o.n(Hi),Vi=o(170),Wi=o.n(Vi),Gi=o(171),Ji=o.n(Gi),$i=o(172),Qi=o.n($i),Yi=o(65),Xi=o.n(Yi),Ki=o(173),Zi=o.n(Ki),er=o(174),tr=o.n(er),or=o(175),nr=o.n(or),ar=o(176),sr=o.n(ar),ir=o(177),rr=o.n(ir),lr=o(178),dr=o.n(lr),cr=o(179),pr=o.n(cr),ur=o(180),mr=o.n(ur),gr=o(181),hr=o.n(gr),_r=o(66),fr=o.n(_r);const{Backbone:br,Strophe:vr,sizzle:yr,_:xr,$iq:Sr,$pres:wr}=mo.env,kr=mo.env.utils,Er=["moderator","participant","visitor"],Cr=["admin","member","outcast","owner"],Ar=["owner"],Tr=["admin","ban","deop","destroy","member","op","revoke"],jr=["kick","mute","voice","modtools"],Nr=["nick"],Mr={deop:"participant",kick:"none",mute:"visitor",op:"moderator",voice:"participant"},Ir={admin:"admin",ban:"outcast",member:"member",owner:"owner",revoke:"none"};mo.plugins.add("converse-muc-views",{dependencies:["converse-autocomplete","converse-modal","converse-controlbox","converse-chatview"],overrides:{ControlBoxView:{renderControlBoxPane(){const{_converse:e}=this.__super__;this.__super__.renderControlBoxPane.apply(this,arguments),e.allow_muc&&this.renderRoomsPanel()}}},initialize(){function e(e,t){e.querySelector("span.spinner").remove(),e.querySelector("a.room-info").classList.add("selected"),e.insertAdjacentHTML("beforeEnd",pr()({jid:t.getAttribute("from"),desc:xr.get(xr.head(yr("field[var=\"muc#roominfo_description\"] value",t)),"textContent"),occ:xr.get(xr.head(yr("field[var=\"muc#roominfo_occupants\"] value",t)),"textContent"),hidden:yr("feature[var=\"muc_hidden\"]",t).length,membersonly:yr("feature[var=\"muc_membersonly\"]",t).length,moderated:yr("feature[var=\"muc_moderated\"]",t).length,nonanonymous:yr("feature[var=\"muc_nonanonymous\"]",t).length,open:yr("feature[var=\"muc_open\"]",t).length,passwordprotected:yr("feature[var=\"muc_passwordprotected\"]",t).length,persistent:yr("feature[var=\"muc_persistent\"]",t).length,publicroom:yr("feature[var=\"muc_publicroom\"]",t).length,semianonymous:yr("feature[var=\"muc_semianonymous\"]",t).length,temporary:yr("feature[var=\"muc_temporary\"]",t).length,unmoderated:yr("feature[var=\"muc_unmoderated\"]",t).length,label_desc:i("Description:"),label_jid:i("Groupchat Address (JID):"),label_occ:i("Participants:"),label_features:i("Features:"),label_requires_auth:i("Requires authentication"),label_hidden:i("Hidden"),label_requires_invite:i("Requires an invitation"),label_moderated:i("Moderated"),label_non_anon:i("Non-anonymous"),label_open_room:i("Open"),label_permanent_room:i("Permanent"),label_public:i("Public"),label_semi_anon:i("Semi-anonymous"),label_temp_room:i("Temporary"),label_unmoderated:i("Unmoderated")}))}function t(t){const o=kr.ancestor(t.target,".room-item"),n=o.querySelector("div.room-info");n?(kr.slideIn(n).then(kr.removeElement),o.querySelector("a.room-info").classList.remove("selected")):(o.insertAdjacentHTML("beforeend",ua()()),s.api.disco.info(t.target.getAttribute("data-room-jid"),null).then(t=>e(o,t)).catch(t=>vt.error(t)))}function o(e,t){t.getRoomsPanel().model.save("muc_domain",vr.getDomainFromJid(e))}function n(e){function t(t){t&&(t.get("var")!==vr.NS.MUC||t.entity.getIdentity("conference","text").then(n=>{n&&o(t.get("from"),e)}))}s.api.waitUntil("discoInitialized").then(()=>{s.api.listen.on("serviceDiscovered",t),s.disco_entities.each(e=>t(e.features.findWhere({var:vr.NS.MUC})))}).catch(t=>vt.error(t))}function a(e){e.model.get("connected")&&!e.getRoomsPanel().model.get("muc_domain")&&(s.muc_domain===void 0?n(e):o(s.muc_domain,e))}const{_converse:s}=this,{__:i}=s;s.api.promises.add(["roomsPanelRendered"]),s.api.settings.update({auto_list_rooms:!1,cache_muc_messages:!0,locked_muc_nickname:!1,show_retraction_warning:!0,muc_disable_slash_commands:!1,muc_show_room_info:!1,muc_show_join_leave:!0,muc_show_join_leave_status:!0,muc_mention_autocomplete_min_chars:0,muc_mention_autocomplete_filter:"contains",muc_mention_autocomplete_show_avatar:!0,roomconfig_whitelist:[],visible_toolbar_buttons:{toggle_occupants:!0}});s.ControlBoxView&&Object.assign(s.ControlBoxView.prototype,{renderRoomsPanel(){if(this.roomspanel&&kr.isInDOM(this.roomspanel.el))return this.roomspanel;const e="converse.roomspanel".concat(s.bare_jid);return this.roomspanel=new s.RoomsPanel({model:new(s.RoomsPanelModel.extend({id:e,browserStorage:s.createStore(e)}))}),this.roomspanel.model.fetch(),this.el.querySelector(".controlbox-pane").insertAdjacentElement("beforeEnd",this.roomspanel.render().el),s.api.trigger("roomsPanelRendered"),this.roomspanel},getRoomsPanel(){return this.roomspanel&&kr.isInDOM(this.roomspanel.el)?this.roomspanel:this.renderRoomsPanel()}}),s.ModeratorToolsModal=s.BootstrapModal.extend({events:{"submit .affiliation-form":"assignAffiliation","submit .role-form":"assignRole","submit .query-affiliation":"queryAffiliation","submit .query-role":"queryRole","click  .nav-item .nav-link":"switchTab","click .toggle-form":"toggleForm"},initialize(e){this.chatroomview=e.chatroomview,s.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:role",()=>{this.users_with_role=this.getUsersWithRole(),this.render()}),this.listenTo(this.model,"change:affiliation",async()=>{this.loading_users_with_affiliation=!0,this.users_with_affiliation=null,this.render();const e=this.model.get("affiliation");this.users_with_affiliation=s.muc_fetch_members&&"outcast"!==e?this.getUsersWithAffiliation():await this.chatroomview.model.getAffiliationList(e),this.loading_users_with_affiliation=!1,this.render()})},toHTML(){const e=this.chatroomview.getAllowedCommands(),t=e.map(e=>Ir[e]).filter(e=>e),o=xr.uniq(e.map(e=>Mr[e]).filter(e=>e));return t.sort(),o.sort(),rr()(Object.assign(this.model.toJSON(),{__:i,affiliations:[...Cr,"none"],allowed_affiliations:t,allowed_roles:o,loading_users_with_affiliation:this.loading_users_with_affiliation,roles:Er,users_with_affiliation:this.users_with_affiliation,users_with_role:this.users_with_role}))},toggleForm(e){e.stopPropagation(),e.preventDefault();const t=e.target.getAttribute("data-form"),o=kr.ancestor(e.target,".list-group-item").querySelector(".".concat(t));kr.hasClass("hidden",o)?kr.removeClass("hidden",o):kr.addClass("hidden",o)},getUsersWithAffiliation(){return this.chatroomview.model.occupants.where({affiliation:this.model.get("affiliation")}).map(e=>({jid:e.get("jid"),nick:e.get("nick"),affiliation:e.get("affiliation")}))},getUsersWithRole(){return this.chatroomview.model.occupants.where({role:this.model.get("role")}).map(e=>({jid:e.get("jid"),nick:e.get("nick"),role:e.get("role")}))},queryRole(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=t.get("role");this.model.set({role:null},{silent:!0}),this.model.set({role:o})},queryAffiliation(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=t.get("affiliation");this.model.set({affiliation:null},{silent:!0}),this.model.set({affiliation:o})},assignAffiliation(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=t.get("affiliation"),n={jid:t.get("jid"),reason:t.get("reason")},a=this.model.get("affiliation");this.chatroomview.model.setAffiliation(o,[n]).then(async()=>{this.alert(i("Affiliation changed"),"primary"),await this.chatroomview.model.occupants.fetchMembers(),this.model.set({affiliation:null},{silent:!0}),this.model.set({affiliation:a})}).catch(e=>{this.alert(i("Sorry, something went wrong while trying to set the affiliation"),"danger"),vt.error(e)})},assignRole(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),o=this.chatroomview.model.getOccupant(t.get("jid")||t.get("nick")),n=t.get("role"),a=t.get("reason"),s=this.model.get("role");this.chatroomview.model.setRole(o,n,a,()=>{this.alert(i("Role changed"),"primary"),this.model.set({role:null},{silent:!0}),this.model.set({role:s})},t=>{yr("not-allowed[xmlns=\"".concat(vr.NS.STANZAS,"\"]"),t).length?this.alert(i("You're not allowed to make that change"),"danger"):(this.alert(i("Sorry, something went wrong while trying to set the role"),"danger"),kr.isErrorObject(t)&&vt.error(t))})}}),s.ListChatRoomsModal=s.BootstrapModal.extend({events:{"submit form":"showRooms","click a.room-info":"toggleRoomInfo","change input[name=nick]":"setNick","change input[name=server]":"setDomainFromEvent","click .open-room":"openRoom"},initialize(){s.BootstrapModal.prototype.initialize.apply(this,arguments),s.muc_domain&&!this.model.get("muc_domain")&&this.model.save("muc_domain",s.muc_domain),this.listenTo(this.model,"change:muc_domain",this.onDomainChange)},toHTML(){const e=this.model.get("muc_domain")||s.muc_domain;return sr()(Object.assign(this.model.toJSON(),{heading_list_chatrooms:i("Query for Groupchats"),label_server_address:i("Server address"),label_query:i("Show groupchats"),show_form:!s.locked_muc_domain,server_placeholder:e?e:i("conference.example.org")}))},afterRender(){s.locked_muc_domain?this.updateRoomsList():this.el.addEventListener("shown.bs.modal",()=>this.el.querySelector("input[name=\"server\"]").focus(),!1)},openRoom(e){e.preventDefault();const t=e.target.getAttribute("data-room-jid"),o=e.target.getAttribute("data-room-name");this.modal.hide(),s.api.rooms.open(t,{name:o})},toggleRoomInfo(e){e.preventDefault(),t(e)},onDomainChange(){s.auto_list_rooms&&this.updateRoomsList()},roomStanzaItemToHTMLElement(e){const t=vr.unescapeNode(e.getAttribute("name")||e.getAttribute("jid")),o=document.createElement("div");return o.innerHTML=mr()({name:vr.xmlunescape(t),jid:e.getAttribute("jid"),open_title:i("Click to open this groupchat"),info_title:i("Show more information on this groupchat")}),o.firstElementChild},removeSpinner(){yr(".spinner",this.el).forEach(kr.removeElement)},informNoRoomsFound(){const e=this.el.querySelector(".available-chatrooms");e.innerHTML=fr()({feedback_text:i("No groupchats found")});const t=this.el.querySelector("input[name=\"server\"]");t.classList.remove("hidden"),this.removeSpinner()},onRoomsFound(e){const t=this.el.querySelector(".available-chatrooms"),o=yr("query item",e);if(o.length){t.innerHTML=fr()({feedback_text:i("Groupchats found:")});const e=document.createDocumentFragment();o.map(this.roomStanzaItemToHTMLElement).filter(e=>e).forEach(t=>e.appendChild(t)),t.appendChild(e),this.removeSpinner()}else this.informNoRoomsFound();return!0},updateRoomsList(){const e=Sr({to:this.model.get("muc_domain"),from:s.connection.jid,type:"get"}).c("query",{xmlns:vr.NS.DISCO_ITEMS});s.api.sendIQ(e).then(e=>this.onRoomsFound(e)).catch(()=>this.informNoRoomsFound())},showRooms(e){e.preventDefault();const t=new FormData(e.target);this.model.setDomain(t.get("server")),this.updateRoomsList()},setDomainFromEvent(e){this.model.setDomain(e.target.value)},setNick(e){this.model.save({nick:e.target.value})}}),s.AddChatRoomModal=s.BootstrapModal.extend({events:{"submit form.add-chatroom":"openChatRoom"},initialize(){s.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:muc_domain",this.render)},toHTML(){let e="";if(!s.locked_muc_domain){const t=this.model.get("muc_domain")||s.muc_domain;e=t?"name@".concat(t):i("name@conference.example.org")}return Mi()(Object.assign(this.model.toJSON(),{__:s.__,_converse:s,label_room_address:s.muc_domain?i("Groupchat name"):i("Groupchat address"),chatroom_placeholder:e}))},afterRender(){this.el.addEventListener("shown.bs.modal",()=>{this.el.querySelector("input[name=\"chatroom\"]").focus()},!1)},parseRoomDataFromEvent(e){const t=new FormData(e),o=t.get("chatroom");let n;if(!s.locked_muc_nickname)n=t.get("nickname").trim();else if(n=s.getDefaultMUCNickname(),!n)throw new Error("Using locked_muc_nickname but no nickname found!");return{jid:o,nick:n}},openChatRoom(e){e.preventDefault();const t=this.parseRoomDataFromEvent(e.target);""===t.nick&&(t.nick=void 0);let o;s.locked_muc_domain||s.muc_domain&&!kr.isValidJID(t.jid)?o="".concat(vr.escapeNode(t.jid),"@").concat(s.muc_domain):(o=t.jid,this.model.setDomain(o)),s.api.rooms.open(o,Object.assign(t,{jid:o})),this.modal.hide(),e.target.reset()}}),s.RoomDetailsModal=s.BootstrapModal.extend({initialize(){s.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.listenTo(this.model.occupants,"add",this.render),this.listenTo(this.model.occupants,"change",this.render)},toHTML(){return Fi()(Object.assign(this.model.toJSON(),{_:xr,__:i,display_name:i("Groupchat info for %1$s",this.model.getDisplayName()),features:this.model.features.toJSON(),num_occupants:this.model.occupants.length,topic:kr.addHyperlinks(ga.a.filterXSS(xr.get(this.model.get("subject"),"text"),{whiteList:{}}))}))}}),s.ChatRoomView=s.ChatBoxView.extend({length:300,tagName:"div",className:"chatbox chatroom hidden",is_chatroom:!0,events:{"change input.fileupload":"onFileSelection","click .chat-msg__action-edit":"onMessageEditButtonClicked","click .chat-msg__action-react":"onMessageReactButtonClicked","click .chat-msg__action-retract":"onMessageRetractButtonClicked","click .chatbox-navback":"showControlBox","click .close-chatbox-button":"close","click .configure-chatroom-button":"getAndRenderConfigurationForm","click .hide-occupants":"hideOccupants","click .new-msgs-indicator":"viewUnreadMessages","click .occupant-nick":function(e){this.insertIntoTextArea(e.target.textContent)},"click .send-button":"onFormSubmitted","click .show-room-details-modal":"showRoomDetailsModal","click .toggle-call":"toggleCall","click .toggle-occupants":"toggleOccupants","click .upload-file":"toggleFileUpload","dragover .chat-textarea":"onDragOver","drop .chat-textarea":"onDrop","input .chat-textarea":"inputChanged","keydown .chat-textarea":"onKeyDown","keyup .chat-textarea":"onKeyUp","mousedown .dragresize-occupants-left":"onStartResizeOccupants","paste .chat-textarea":"onPaste","submit .muc-nickname-form":"submitNickname"},async initialize(){this.initDebounced(),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"rendered",this.scrollDown),this.model.messages.on("reset",()=>{this.content.innerHTML="",this.removeAll()}),this.listenTo(this.model,"change",this.renderHeading),this.listenTo(this.model.session,"change:connection_status",this.onConnectionStatusChanged),this.listenTo(this.model,"change:hidden_occupants",this.updateOccupantsToggle),this.listenTo(this.model,"change:subject",this.setChatRoomSubject),this.listenTo(this.model,"configurationNeeded",this.getAndRenderConfigurationForm),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"show",this.show),this.listenTo(this.model.features,"change:moderated",this.renderBottomPanel),this.listenTo(this.model.occupants,"add",this.onOccupantAdded),this.listenTo(this.model.occupants,"remove",this.onOccupantRemoved),this.listenTo(this.model.occupants,"change:show",this.showJoinOrLeaveNotification),this.listenTo(this.model.occupants,"change:role",this.onOccupantRoleChanged),this.listenTo(this.model.occupants,"change:affiliation",this.onOccupantAffiliationChanged),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.render(),this.createOccupantsView(),await this.updateAfterMessagesFetched(),this.onConnectionStatusChanged(),s.api.trigger("chatRoomViewInitialized",this)},render(){return this.el.setAttribute("id",this.model.get("box_id")),this.el.innerHTML=Di()(),this.renderHeading(),this.renderChatArea(),this.renderBottomPanel(),s.muc_show_logs_before_join||this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED||this.showSpinner(),this.model.get("hidden")||this.show(),this},renderHeading(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;const t=xr.get(e,"changed",{});(null===e||xr.intersection(Object.keys(t),["affiliation","bookmarked","jid","name","description","subject"]).length)&&(this.el.querySelector(".chat-head-chatroom").innerHTML=this.generateHeadingHTML())},renderBottomPanel(){const e=this.el.querySelector(".bottom-panel"),t=this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED,o=t&&!(this.model.features.get("moderated")&&"visitor"===this.model.getOwnRole());e.innerHTML=Pi()({__:i,can_edit:o,entered:t}),t&&o&&(this.renderMessageForm(),this.initMentionAutoComplete())},renderChatArea(){if(null===this.el.querySelector(".chat-area")){const e=this.el.querySelector(".chatroom-body");e.insertAdjacentHTML("beforeend",Oi()({__:i,muc_show_logs_before_join:s.muc_show_logs_before_join,show_send_button:s.show_send_button})),this.content=this.el.querySelector(".chat-content")}return this},createOccupantsView(){this.model.occupants.chatroomview=this,this.occupants_view=new s.ChatRoomOccupantsView({model:this.model.occupants});const e=this.el.querySelector(".chatroom-body"),t=this.model.get("occupants_width");this.occupants_view&&t!==void 0&&(this.occupants_view.el.style.flex="0 0 "+t+"px"),e.insertAdjacentElement("beforeend",this.occupants_view.el)},onStartResizeOccupants(e){this.resizing=!0,this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseup",this.onMouseUp);const t=window.getComputedStyle(this.occupants_view.el);this.width=parseInt(t.width.replace(/px$/,""),10),this.prev_pageX=e.pageX},onMouseMove(e){if(this.resizing){e.preventDefault();const t=this.prev_pageX-e.pageX;this.resizeOccupantsView(t,e.pageX),this.prev_pageX=e.pageX}},onMouseUp(e){if(this.resizing){e.preventDefault(),this.resizing=!1,this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseup",this.onMouseUp);const t=this.occupants_view.el.getBoundingClientRect(),o=this.calculateOccupantsWidth(t,0),n={occupants_width:o};s.connection.connected?this.model.save(n):this.model.set(n)}},resizeOccupantsView(e,t){const o=this.occupants_view.el.getBoundingClientRect();if(this.is_minimum)this.is_minimum=o.left<t;else if(this.is_maximum)this.is_maximum=o.left>t;else{const t=this.calculateOccupantsWidth(o,e);this.occupants_view.el.style.flex="0 0 "+t+"px"}},calculateOccupantsWidth(e,t){let o=e.width+t;const n=this.el.clientWidth;return o<.2*n?(o=.2*n,this.is_minimum=!0):o>.75*n?(o=.75*n,this.is_maximum=!0):250>n-o?(o=n-250,this.is_maximum=!0):(this.is_maximum=!1,this.is_minimum=!1),o},getAutoCompleteList(){return this.model.occupants.filter("nick").map(e=>({label:e.get("nick"),value:"@".concat(e.get("nick"))}))},getAutoCompleteListItem(e,t){t=t.trim();const o=document.createElement("li");if(o.setAttribute("aria-selected","false"),s.muc_mention_autocomplete_show_avatar){const t=document.createElement("img");let n="data:"+s.DEFAULT_IMAGE_TYPE+";base64,"+s.DEFAULT_IMAGE;if(s.vcards){const t=s.vcards.findWhere({nickname:e});t&&(n="data:"+t.get("image_type")+";base64,"+t.get("image"))}t.setAttribute("src",n),t.setAttribute("width","22"),t.setAttribute("class","avatar avatar-autocomplete"),o.appendChild(t)}const n=new RegExp("("+t+")","ig"),a=t?e.split(n):[e];return a.forEach(e=>{if(t&&e.match(n)){const t=document.createElement("mark");t.textContent=e,o.appendChild(t)}else o.appendChild(document.createTextNode(e))}),o},initMentionAutoComplete(){this.mention_auto_complete=new s.AutoComplete(this.el,{auto_first:!0,auto_evaluate:!1,min_chars:s.muc_mention_autocomplete_min_chars,match_current_word:!0,list:()=>this.getAutoCompleteList(),filter:"contains"==s.muc_mention_autocomplete_filter?s.FILTER_CONTAINS:s.FILTER_STARTSWITH,ac_triggers:["Tab","@"],include_triggers:[],item:this.getAutoCompleteListItem}),this.mention_auto_complete.on("suggestion-box-selectcomplete",()=>this.auto_completing=!1)},submitNickname(e){e.preventDefault();const t=e.target.nick.value.trim();t&&this.model.join(t)},onKeyDown(e){return this.mention_auto_complete.onKeyDown(e)?void 0:s.ChatBoxView.prototype.onKeyDown.call(this,e)},onKeyUp(e){return this.mention_auto_complete.evaluate(e),s.ChatBoxView.prototype.onKeyUp.call(this,e)},async onMessageRetractButtonClicked(e){e.preventDefault();const t=kr.ancestor(e.target,".message"),o=t.getAttribute("data-msgid"),n=t.getAttribute("data-isodate"),a=this.model.messages.findWhere({msgid:o,time:n}),r=i("Be aware that other XMPP/Jabber clients (and servers) may not yet support retractions and that this message may not be removed everywhere.");if("me"===a.get("sender")){const e=[i("Are you sure you want to retract this message?")];s.show_retraction_warning&&(e[1]=r);const t=await s.api.confirm(i("Confirm"),e);t&&this.retractOwnMessage(a)}else{let e=[i("You are about to retract this message."),i("You may optionally include a message, explaining the reason for the retraction.")];s.show_retraction_warning&&(e=[e[0],r,e[1]]);const t=await s.api.prompt(i("Message Retraction"),e,i("Optional reason"));!1!==t&&this.retractOtherMessage(a,t)}},retractOwnMessage(t){this.model.sendRetractionMessage(t).catch(o=>{t.save({retracted:void 0,retracted_id:void 0});const e=i("Sorry, something went wrong while trying to retract your message.");kr.isErrorStanza(o)?this.showErrorMessage(e):(this.showErrorMessage(e),this.showErrorMessage(o.message)),vt.error(o)}),t.save({retracted:new Date().toISOString(),retracted_id:t.get("origin_id")})},async retractOtherMessage(e,t){const o=await this.model.sendRetractionIQ(e,t);if(null===o){const e=i("A timeout occurred while trying to retract the message");s.api.alert("error",i("Error"),e),s.log(e,vr.LogLevel.WARN)}else if(kr.isErrorStanza(o)){const e=i("Sorry, you're not allowed to retract this message.");s.api.alert("error",i("Error"),e),s.log(e,vr.LogLevel.WARN),s.log(o,vr.LogLevel.WARN)}else e.save({moderated:"retracted",moderated_by:s.bare_jid,moderated_id:e.get("msgid"),moderation_reason:t})},showModeratorToolsModal(e){if(this.verifyRoles(["moderator"])){if(xr.isUndefined(this.model.modtools_modal)){const t=new br.Model({affiliation:e});this.modtools_modal=new s.ModeratorToolsModal({model:t,chatroomview:this})}else this.modtools_modal.set("affiliation",e);this.modtools_modal.show()}},showRoomDetailsModal(e){e.preventDefault(),this.model.room_details_modal===void 0&&(this.model.room_details_modal=new s.RoomDetailsModal({model:this.model})),this.model.room_details_modal.show(e)},showChatStateNotification(e){return"me"===e.get("sender")?void 0:s.ChatBoxView.prototype.showChatStateNotification.apply(this,arguments)},onOccupantAffiliationChanged(e){e.get("jid")===s.bare_jid&&this.renderHeading(),this.informOfOccupantsAffiliationChange(e)},informOfOccupantsAffiliationChange(e){const t=e._previousAttributes.affiliation,o=e.get("affiliation");"admin"===t?this.showChatEvent(i("%1$s is no longer an admin of this groupchat",e.get("nick"))):"owner"===t?this.showChatEvent(i("%1$s is no longer an owner of this groupchat",e.get("nick"))):"outcast"===t&&this.showChatEvent(i("%1$s is no longer banned from this groupchat",e.get("nick"))),"none"===o&&"member"===t&&this.showChatEvent(i("%1$s is no longer a member of this groupchat",e.get("nick"))),"member"===o?this.showChatEvent(i("%1$s is now a member of this groupchat",e.get("nick"))):"outcast"===o?this.showChatEvent(i("%1$s has been banned from this groupchat",e.get("nick"))):("admin"===o||"owner"==o)&&this.showChatEvent(i("%1$s is now an %2$s of this groupchat",e.get("nick"),o))},onOccupantRoleChanged(e,t){e.get("jid")===s.bare_jid&&this.renderBottomPanel(),this.informOfOccupantsRoleChange(e,t)},informOfOccupantsRoleChange(e,t){if(!("none"===t||e.changed.affiliation)){const t=e._previousAttributes.role;"moderator"===t&&this.showChatEvent(i("%1$s is no longer a moderator",e.get("nick"))),"visitor"===t&&this.showChatEvent(i("%1$s has been given a voice",e.get("nick"))),"visitor"===e.get("role")&&this.showChatEvent(i("%1$s has been muted",e.get("nick"))),"moderator"!==e.get("role")||["owner","admin"].includes(e.get("affiliation"))||this.showChatEvent(i("%1$s is now a moderator",e.get("nick")))}},generateHeadingHTML(){return Qi()(Object.assign(this.model.toJSON(),{isOwner:"owner"===this.model.getOwnAffiliation(),title:this.model.getDisplayName(),Strophe:vr,_converse:s,info_close:i("Close and leave this groupchat"),info_configure:i("Configure this groupchat"),info_details:i("Show more details about this groupchat"),description:kr.addHyperlinks(ga.a.filterXSS(xr.get(this.model.get("subject"),"text"),{whiteList:{}}))}))},afterShown(){kr.isPersistableModel(this.model)&&this.model.clearUnreadMsgCounter(),this.scrollDown()},onConnectionStatusChanged(){const e=this.model.session.get("connection_status");e===mo.ROOMSTATUS.NICKNAME_REQUIRED?this.renderNicknameForm():e===mo.ROOMSTATUS.PASSWORD_REQUIRED?this.renderPasswordForm():e===mo.ROOMSTATUS.CONNECTING?this.showSpinner():e===mo.ROOMSTATUS.ENTERED?(this.renderBottomPanel(),this.hideSpinner(),this.maybeFocus()):e===mo.ROOMSTATUS.DISCONNECTED?this.showDisconnectMessage():e===mo.ROOMSTATUS.DESTROYED&&this.showDestroyedMessage()},getToolbarOptions(){return Object.assign(s.ChatBoxView.prototype.getToolbarOptions.apply(this,arguments),{label_hide_occupants:i("Hide the list of participants"),show_occupants_toggle:s.visible_toolbar_buttons.toggle_occupants})},async close(){return this.hide(),br.history.getFragment()==="converse/room?jid="+this.model.get("jid")&&s.router.navigate(""),await this.model.leave(),s.ChatBoxView.prototype.close.apply(this,arguments)},updateOccupantsToggle(){const e=this.el.querySelector(".toggle-occupants"),t=this.el.querySelector(".chat-area");this.model.get("hidden_occupants")?(kr.removeClass("fa-angle-double-right",e),kr.addClass("fa-angle-double-left",e),kr.addClass("full",t)):(kr.addClass("fa-angle-double-right",e),kr.removeClass("fa-angle-double-left",e),kr.removeClass("full",t))},hideOccupants(e){e&&(e.preventDefault(),e.stopPropagation()),this.model.save({hidden_occupants:!0}),this.scrollDown()},toggleOccupants(e){e&&(e.preventDefault(),e.stopPropagation()),this.model.save({hidden_occupants:!this.model.get("hidden_occupants")}),this.scrollDown()},verifyRoles(e,t){let o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(!Array.isArray(e))throw new TypeError("roles must be an Array");if(!e.length)return!0;t||(t=this.model.occupants.findWhere({jid:s.bare_jid}));const n=t.get("role");return!!e.includes(n)||(o&&this.showErrorMessage(i("Forbidden: you do not have the necessary role in order to do that.")),!1)},verifyAffiliations(e,t){let o=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(!Array.isArray(e))throw new TypeError("affiliations must be an Array");if(!e.length)return!0;t||(t=this.model.occupants.findWhere({jid:s.bare_jid}));const n=t.get("affiliation");return!!e.includes(n)||(o&&this.showErrorMessage(i("Forbidden: you do not have the necessary affiliation in order to do that.")),!1)},validateRoleOrAffiliationChangeArgs(e,t){return!!t||(this.showErrorMessage(i("Error: the \"%1$s\" command takes two arguments, the user's nickname and optionally a reason.",e)),!1)},getNickOrJIDFromCommandArgs(e){e.startsWith("@")||(e="@"+e);const[t,o]=this.model.parseTextForReferences(e);if(!o.length)return void this.showErrorMessage(i("Error: couldn't find a groupchat participant based on your arguments"));if(1<o.length)return void this.showErrorMessage(i("Error: found multiple groupchat participant based on your arguments"));const n=o.pop().value,a=e.split(n,2)[1];return a&&!a.startsWith(" ")?void this.showErrorMessage(i("Error: couldn't find a groupchat participant based on your arguments")):n},setAffiliation(e,t,o){const n=Ir[e];if(!n)throw Error("ChatRoomView#setAffiliation called with invalid command: ".concat(e));if(!this.verifyAffiliations(o))return!1;if(!this.validateRoleOrAffiliationChangeArgs(e,t))return!1;const a=this.getNickOrJIDFromCommandArgs(t);if(!a)return!1;const i=t.split(a,2)[1].trim(),r=this.model.getOccupant(a),l={jid:r.get("jid"),reason:i};s.auto_register_muc_nickname&&r&&(l.nick=r.get("nick")),this.model.setAffiliation(n,[l]).then(()=>this.model.occupants.fetchMembers()).catch(e=>this.onCommandError(e))},getReason(e){return e.includes(",")?e.slice(e.indexOf(",")+1).trim():null},setRole(e,t){let o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:[];const a=Mr[e];if(!a)throw Error("ChatRoomView#setRole called with invalid command: ".concat(e));if(!this.verifyAffiliations(o)||!this.verifyRoles(n))return!1;if(!this.validateRoleOrAffiliationChangeArgs(e,t))return!1;const s=this.getNickOrJIDFromCommandArgs(t);if(!s)return!1;const i=t.split(s,2)[1].trim(),r=this.model.getOccupant(s);return this.model.setRole(r,a,i,void 0,this.onCommandError.bind(this)),!0},onCommandError(e){vt.fatal(e),this.showErrorMessage(i("Sorry, an error happened while running the command. Check your browser's developer console for details."))},getAllowedCommands(){let e=["clear","help","me","nick","subject","topic","register"];const t=this.model.occupants.findWhere({jid:s.bare_jid});return this.verifyAffiliations(["owner"],t,!1)?e=e.concat(Ar).concat(Tr):this.verifyAffiliations(["admin"],t,!1)&&(e=e.concat(Tr)),this.verifyRoles(["moderator"],t,!1)?e=e.concat(jr).concat(Nr):!this.verifyRoles(["visitor","participant","moderator"],t,!1)&&(e=e.concat(Nr)),e},parseMessageForCommands(e){if(s.muc_disable_slash_commands&&!Array.isArray(s.muc_disable_slash_commands))return s.ChatBoxView.prototype.parseMessageForCommands.apply(this,arguments);e=e.replace(/^\s*/,"");const t=(e.match(/^\/([a-zA-Z]*) ?/)||[""]).pop().toLowerCase();if(!t)return!1;const o=e.slice(("/"+t).length+1).trim();let n=[];if(Array.isArray(s.muc_disable_slash_commands)&&(n=s.muc_disable_slash_commands,n.includes(t)))return!1;switch(t){case"admin":{this.setAffiliation(t,o,["owner"]);break}case"ban":{this.setAffiliation(t,o,["admin","owner"]);break}case"modtools":{this.showModeratorToolsModal(o);break}case"deop":{this.setRole(t,o,["admin","owner"]);break}case"destroy":{if(!this.verifyAffiliations(["owner"]))break;this.model.sendDestroyIQ(o).then(()=>this.close()).catch(t=>this.onCommandError(t));break}case"help":{const e=this.getAllowedCommands();this.showHelpMessages(["<strong>".concat(i("You can run the following commands"),"</strong>")]),this.showHelpMessages(["<strong>/admin</strong>: ".concat(i("Change user's affiliation to admin")),"<strong>/ban</strong>: ".concat(i("Ban user by changing their affiliation to outcast")),"<strong>/clear</strong>: ".concat(i("Clear the chat area")),"<strong>/close</strong>: ".concat(i("Close this groupchat")),"<strong>/deop</strong>: ".concat(i("Change user role to participant")),"<strong>/destroy</strong>: ".concat(i("Remove this groupchat")),"<strong>/help</strong>: ".concat(i("Show this menu")),"<strong>/kick</strong>: ".concat(i("Kick user from groupchat")),"<strong>/me</strong>: ".concat(i("Write in 3rd person")),"<strong>/member</strong>: ".concat(i("Grant membership to a user")),"<strong>/modtools</strong>: ".concat(i("Opens up the moderator tools GUI")),"<strong>/mute</strong>: ".concat(i("Remove user's ability to post messages")),"<strong>/nick</strong>: ".concat(i("Change your nickname")),"<strong>/op</strong>: ".concat(i("Grant moderator role to user")),"<strong>/owner</strong>: ".concat(i("Grant ownership of this groupchat")),"<strong>/register</strong>: ".concat(i("Register your nickname")),"<strong>/revoke</strong>: ".concat(i("Revoke the user's current affiliation")),"<strong>/subject</strong>: ".concat(i("Set groupchat subject")),"<strong>/topic</strong>: ".concat(i("Set groupchat subject (alias for /subject)")),"<strong>/voice</strong>: ".concat(i("Allow muted user to post messages"))].filter(e=>n.every(t=>!e.startsWith(t+"<",9))).filter(t=>e.some(e=>t.startsWith(e+"<",9))));break}case"kick":{this.setRole(t,o,[],["moderator"]);break}case"mute":{this.setRole(t,o,[],["moderator"]);break}case"member":{this.setAffiliation(t,o,["admin","owner"]);break}case"nick":{if(!this.verifyRoles(["visitor","participant","moderator"]))break;else if(0===o.length)this.showErrorMessage(i("Your nickname is \"%1$s\"",this.model.get("nick")));else{const e=vr.getBareJidFromJid(this.model.get("jid"));s.api.send(wr({from:s.connection.jid,to:"".concat(e,"/").concat(o),id:kr.getUniqueId()}).tree())}break}case"owner":this.setAffiliation(t,o,["owner"]);break;case"op":{this.setRole(t,o,["admin","owner"]);break}case"register":{1<o.length?this.showErrorMessage(i("Error: invalid number of arguments")):this.model.registerNickname().then(e=>{e&&this.showErrorMessage(e)});break}case"revoke":{this.setAffiliation(t,o,["admin","owner"]);break}case"topic":case"subject":this.model.setSubject(o);break;case"voice":{this.setRole(t,o,[],["moderator"]);break}default:return s.ChatBoxView.prototype.parseMessageForCommands.apply(this,arguments);}return!0},renderConfigurationForm(e){if(this.hideChatRoomContents(),this.model.save("config_stanza",e.outerHTML),!this.config_form){const{_converse:e}=this.__super__;this.config_form=new e.MUCConfigForm({model:this.model,chatroomview:this});const t=this.el.querySelector(".chatroom-body");t.insertAdjacentElement("beforeend",this.config_form.el)}kr.showElement(this.config_form.el)},renderNicknameForm(){const e=s.muc_show_logs_before_join?i("Choose a nickname to enter"):i("Please choose your nickname"),t=Zi()(Object.assign({heading:e,label_nickname:i("Nickname"),label_join:i("Enter groupchat")},this.model.toJSON()));if(s.muc_show_logs_before_join){const e=this.el.querySelector(".muc-bottom-panel");e.innerHTML=t,kr.addClass("muc-bottom-panel--nickname",e)}else{this.hideChatRoomContents();const e=this.el.querySelector(".chatroom-body");e.insertAdjacentHTML("beforeend",t)}kr.safeSave(this.model.session,{connection_status:mo.ROOMSTATUS.NICKNAME_REQUIRED})},closeForm(){yr(".chatroom-form-container",this.el).forEach(t=>kr.addClass("hidden",t)),this.renderAfterTransition()},getAndRenderConfigurationForm(){this.config_form&&kr.isVisible(this.config_form.el)?this.closeForm():(this.showSpinner(),this.model.fetchRoomConfiguration().then(e=>this.renderConfigurationForm(e)).catch(t=>vt.error(t)))},hideChatRoomContents(){const e=this.el.querySelector(".chatroom-body");null!==e&&[].forEach.call(e.children,e=>e.classList.add("hidden"))},renderPasswordForm(){this.hideChatRoomContents();const e=this.model.get("password_validation_message");if(this.model.save("password_validation_message",void 0),!this.password_form){this.password_form=new s.MUCPasswordForm({model:new br.Model({validation_message:e}),chatroomview:this});const t=this.el.querySelector(".chatroom-body");t.insertAdjacentElement("beforeend",this.password_form.el)}else this.password_form.model.set("validation_message",e);kr.showElement(this.password_form.el),this.model.session.save("connection_status",mo.ROOMSTATUS.PASSWORD_REQUIRED)},showDestroyedMessage(){kr.hideElement(this.el.querySelector(".chat-area")),kr.hideElement(this.el.querySelector(".occupants")),yr(".spinner",this.el).forEach(kr.removeElement);const e=this.model.get("destroyed_reason"),t=this.model.get("moved_jid");this.model.save({destroyed_reason:void 0,moved_jid:void 0});const o=this.el.querySelector(".disconnect-container");o.innerHTML=Bi()({_:xr,__:i,jid:t,reason:e?"\"".concat(e,"\""):null});const n=o.querySelector("a.switch-chat");n&&n.addEventListener("click",async e=>{e.preventDefault();const o=await s.api.rooms.get(t,null,!0);o.maybeShow(!0),this.model.destroy()}),kr.showElement(o)},showDisconnectMessage(){const e=this.model.get("disconnection_message");if(!e)return;kr.hideElement(this.el.querySelector(".chat-area")),kr.hideElement(this.el.querySelector(".occupants")),yr(".spinner",this.el).forEach(kr.removeElement);const t=[e],o=this.model.get("disconnection_actor");o&&t.push(i("This action was done by %1$s.",o));const n=this.model.get("disconnection_reason");n&&t.push(i("The reason given is: \"%1$s\".",n)),this.model.save({disconnection_message:void 0,disconnection_reason:void 0,disconnection_actor:void 0});const a=this.el.querySelector(".disconnect-container");a.innerHTML=Ui()({_:xr,disconnect_messages:t}),kr.showElement(a)},getNotificationWithMessage(e){for(let t=this.content.lastElementChild;t;){if(!xr.includes(xr.get(t,"classList",[]),"chat-info"))return;if(t.textContent===e)return t;t=t.previousElementSibling}},removeEmptyHistoryFeedback(){s.muc_show_logs_before_join&&this.content.firstElementChild.matches(".empty-history-feedback")&&this.content.removeChild(this.content.firstElementChild)},insertDayIndicator(){return this.removeEmptyHistoryFeedback(),s.ChatBoxView.prototype.insertDayIndicator.apply(this,arguments)},insertMessage(e){return this.removeEmptyHistoryFeedback(),s.ChatBoxView.prototype.insertMessage.call(this,e)},insertNotification(e){this.removeEmptyHistoryFeedback(),this.content.insertAdjacentHTML("beforeend",ia()({isodate:new Date().toISOString(),extra_classes:"chat-event",message:e}))},onOccupantAdded(e){e.get("jid")===s.bare_jid&&(this.renderHeading(),this.renderBottomPanel()),"online"===e.get("show")&&this.showJoinNotification(e)},onOccupantRemoved(e){this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED&&"online"===e.get("show")&&this.showLeaveNotification(e)},showJoinOrLeaveNotification(e){xr.includes(e.get("states"),"303")||("offline"===e.get("show")?this.showLeaveNotification(e):"online"===e.get("show")&&this.showJoinNotification(e))},getPreviousJoinOrLeaveNotification(e,t){for(const o=new Date().toISOString().split("T")[0];null!==e;){if(!e.classList.contains("chat-info"))return;const n=e.getAttribute("data-isodate");if(n&&n.split("T")[0]!==o)return;const a=xr.get(e,"dataset",{});if(a.join===t||a.leave===t||a.leavejoin===t||a.joinleave===t)return e;e=e.previousElementSibling}},showJoinNotification(e){if(s.muc_show_join_leave&&this.model.session.get("connection_status")===mo.ROOMSTATUS.ENTERED){const t=e.get("nick"),o=s.muc_show_join_leave_status?e.get("status"):null,n=this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild,t),a=xr.get(n,"dataset",{});if(a.leave===t){let e=o?i("%1$s has left and re-entered the groupchat. \"%2$s\"",t,o):i("%1$s has left and re-entered the groupchat",t);const a={data_name:"leavejoin",data_value:t,isodate:new Date().toISOString(),extra_classes:"chat-event",message:e};this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a));const s=this.content.lastElementChild;setTimeout(()=>kr.addClass("fade-out",s),5e3),setTimeout(()=>s.parentElement&&s.parentElement.removeChild(s),5500)}else{let e=o?i("%1$s has entered the groupchat. \"%2$s\"",t,o):i("%1$s has entered the groupchat",t);const a={data_name:"join",data_value:t,isodate:new Date().toISOString(),extra_classes:"chat-event",message:e};n?(this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a))):(this.content.insertAdjacentHTML("beforeend",ia()(a)),this.insertDayIndicator(this.content.lastElementChild))}this.scrollDown()}},showLeaveNotification(e){if(!(!s.muc_show_join_leave||xr.includes(e.get("states"),"303")||xr.includes(e.get("states"),"307"))){const t=e.get("nick"),o=s.muc_show_join_leave_status?e.get("status"):null,n=this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild,t),a=xr.get(n,"dataset",{});if(a.join===t){let e=o?i("%1$s has entered and left the groupchat. \"%2$s\"",t,o):i("%1$s has entered and left the groupchat",t);const a={data_name:"joinleave",data_value:t,isodate:new Date().toISOString(),extra_classes:"chat-event",message:e};this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a));const s=this.content.lastElementChild;setTimeout(()=>kr.addClass("fade-out",s),5e3),setTimeout(()=>s.parentElement&&s.parentElement.removeChild(s),5500)}else{let e=o?i("%1$s has left the groupchat. \"%2$s\"",t,o):i("%1$s has left the groupchat",t);const a={message:e,isodate:new Date().toISOString(),extra_classes:"chat-event",data_name:"leave",data_value:t};n?(this.content.removeChild(n),this.content.insertAdjacentHTML("beforeend",ia()(a))):(this.content.insertAdjacentHTML("beforeend",ia()(a)),this.insertDayIndicator(this.content.lastElementChild))}this.scrollDown()}},renderAfterTransition(){const e=this.model.session.get("connection_status");e==mo.ROOMSTATUS.NICKNAME_REQUIRED?this.renderNicknameForm():e==mo.ROOMSTATUS.PASSWORD_REQUIRED?this.renderPasswordForm():e==mo.ROOMSTATUS.ENTERED&&(this.hideChatRoomContents(),kr.showElement(this.el.querySelector(".chat-area")),kr.showElement(this.el.querySelector(".occupants")),this.scrollDown())},showSpinner(){yr(".spinner",this.el).forEach(kr.removeElement),this.hideChatRoomContents();const e=this.el.querySelector(".chatroom-body");e.insertAdjacentHTML("afterbegin",ua()())},hideSpinner(){const e=this.el.querySelector(".spinner");return null!==e&&(kr.removeElement(e),this.renderAfterTransition()),this},setChatRoomSubject(){const e=this.model.get("subject"),t=e.text?i("Topic set by %1$s",e.author):i("Topic cleared by %1$s",e.author),o=new Date().toISOString();this.content.insertAdjacentHTML("beforeend",ia()({isodate:o,extra_classes:"chat-event",message:t})),e.text&&this.content.insertAdjacentHTML("beforeend",ia()({isodate:o,extra_classes:"chat-topic",message:kr.addHyperlinks(ga.a.filterXSS(xr.get(this.model.get("subject"),"text"),{whiteList:{}})),render_message:!0})),this.scrollDown()}}),s.RoomsPanel=br.NativeView.extend({tagName:"div",className:"controlbox-section",id:"chatrooms",events:{"click a.controlbox-heading__btn.show-add-muc-modal":"showAddRoomModal","click a.controlbox-heading__btn.show-list-muc-modal":"showListRoomsModal"},render(){return this.el.innerHTML=hr()({heading_chatrooms:i("Groupchats"),title_new_room:i("Add a new groupchat"),title_list_rooms:i("Query for groupchats")}),this},showAddRoomModal(e){this.add_room_modal===void 0&&(this.add_room_modal=new s.AddChatRoomModal({model:this.model})),this.add_room_modal.show(e)},showListRoomsModal(e){this.list_rooms_modal===void 0&&(this.list_rooms_modal=new s.ListChatRoomsModal({model:this.model})),this.list_rooms_modal.show(e)}}),s.MUCConfigForm=br.VDOMView.extend({className:"muc-config-form",events:{"submit .chatroom-form":"submitConfigForm","click .button-cancel":"closeConfigForm"},initialize(e){this.chatroomview=e.chatroomview,this.listenTo(this.chatroomview.model.features,"change:passwordprotected",this.render),this.listenTo(this.chatroomview.model.features,"change:config_stanza",this.render),this.render()},toHTML(){const e=kr.toStanza(this.model.get("config_stanza")),t=s.roomconfig_whitelist;let o=yr("field",e);t.length&&(o=o.filter(e=>xr.includes(t,e.getAttribute("var"))));const n=this.model.features.get("passwordprotected"),a={new_password:!n,fixed_username:this.model.get("jid")};return Ji()({__:i,title:xr.get(e.querySelector("title"),"textContent"),instructions:xr.get(e.querySelector("instructions"),"textContent"),fields:o.map(t=>kr.xForm2webForm(t,e,a))})},submitConfigForm(e){e.preventDefault(),this.model.saveConfiguration(e.target).then(()=>this.model.refreshRoomFeatures()),this.chatroomview.closeForm()},closeConfigForm(e){e.preventDefault(),this.chatroomview.closeForm()}}),s.MUCPasswordForm=br.VDOMView.extend({className:"muc-password-form",events:{"submit form":"submitPassword"},initialize(e){this.chatroomview=e.chatroomview,this.listenTo(this.model,"change:validation_message",this.render),this.render()},toHTML(){const e=this.model.get("validation_message");return tr()({jid:this.model.get("jid"),heading:i("This groupchat requires a password"),label_password:i("Password: "),label_submit:i("Submit"),error_class:e?"error":"",validation_message:e})},submitPassword(e){e.preventDefault();const t=this.el.querySelector("input[type=password]").value;this.chatroomview.model.join(this.chatroomview.model.get("nick"),t),this.model.set("validation_message",null)}}),s.ChatRoomOccupantView=br.VDOMView.extend({tagName:"li",initialize(){this.listenTo(this.model,"change",this.render)},toHTML(){const e=this.model.get("show");return dr()(Object.assign({_:xr,jid:"",show:e,hint_show:s.PRETTY_CHAT_STATUS[e],hint_occupant:i("Click to mention %1$s in your message.",this.model.get("nick")),desc_moderator:i("This user is a moderator."),desc_participant:i("This user can send messages in this groupchat."),desc_visitor:i("This user can NOT send messages in this groupchat."),label_moderator:i("Moderator"),label_visitor:i("Visitor"),label_owner:i("Owner"),label_member:i("Member"),label_admin:i("Admin")},this.model.toJSON()))},destroy(){this.el.parentElement.removeChild(this.el)}}),s.ChatRoomOccupantsView=_n.extend({tagName:"div",className:"occupants col-md-3 col-4",listItems:"model",sortEvent:"change:role",listSelector:".occupant-list",ItemView:s.ChatRoomOccupantView,async initialize(){_n.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"add",this.maybeRenderInviteWidget),this.listenTo(this.model,"change:affiliation",this.maybeRenderInviteWidget),this.chatroomview=this.model.chatroomview,this.listenTo(this.chatroomview.model.features,"change",this.renderRoomFeatures),this.listenTo(this.chatroomview.model.features,"change:open",this.renderInviteWidget),this.listenTo(this.chatroomview.model,"change:hidden_occupants",this.setVisibility),this.render(),await this.model.fetched,this.sortAndPositionAllItems()},render(){return this.el.innerHTML=nr()(Object.assign(this.chatroomview.model.toJSON(),{allow_muc_invitations:s.allow_muc_invitations,label_occupants:i("Participants")})),s.allow_muc_invitations&&s.api.waitUntil("rosterContactsFetched").then(()=>this.renderInviteWidget()),this.setVisibility(),this.renderRoomFeatures()},setVisibility(){this.chatroomview.model.get("hidden_occupants")?kr.hideElement(this.el):(kr.showElement(this.el),this.setOccupantsHeight())},maybeRenderInviteWidget(e){e.get("jid")===s.bare_jid&&this.renderInviteWidget()},renderInviteWidget(){const e=this.el.querySelector(".room-invite");if(!this.shouldInviteWidgetBeShown())null!==e&&e.remove();else if(null===e){const e=this.el.querySelector(".occupants-heading");e.insertAdjacentHTML("afterend",Xi()({error_message:null,label_invitation:i("Invite")})),this.initInviteWidget()}return this},renderRoomFeatures(){const e=this.chatroomview.model.features,t=xr.pick(e.attributes,mo.ROOM_FEATURES);if(xr.reduce(Object.values(t),(e,t)=>e||t)){const t=this.el.querySelector(".chatroom-features");t.innerHTML=Wi()(Object.assign(e.toJSON(),{__:i})),this.setOccupantsHeight()}return this},setOccupantsHeight(){const e=this.el.querySelector(".chatroom-features");this.el.querySelector(".occupant-list").style.cssText="height: calc(100% - ".concat(e.offsetHeight,"px - 5em);")},promptForInvite(e){let t="";s.auto_join_on_invite||(t=prompt(i("You are about to invite %1$s to the groupchat \"%2$s\". You may optionally include a message, explaining the reason for the invitation.",e.text.label,this.chatroomview.model.getDisplayName()))),null!==t&&this.chatroomview.model.directInvite(e.text.value,t);const o=this.el.querySelector(".room-invite form"),n=o.querySelector(".invited-contact"),a=o.querySelector(".error");null!==a&&a.parentNode.removeChild(a),n.value=""},inviteFormSubmitted(e){e.preventDefault();const t=e.target.querySelector("input.invited-contact"),o=t.value;return!o||2>xr.compact(o.split("@")).length?(e.target.outerHTML=Xi()({error_message:i("Please enter a valid XMPP address"),label_invitation:i("Invite")}),void this.initInviteWidget()):void this.promptForInvite({target:t,text:{label:o,value:o}})},shouldInviteWidgetBeShown(){return s.allow_muc_invitations&&(this.chatroomview.model.features.get("open")||"owner"===this.chatroomview.model.getOwnAffiliation())},initInviteWidget(){const e=this.el.querySelector(".room-invite form");if(null===e)return;e.addEventListener("submit",this.inviteFormSubmitted.bind(this),!1);const t=s.roster.map(e=>({label:e.getDisplayName(),value:e.get("jid")})),o=this.el.querySelector(".suggestion-box").parentElement;this.invite_auto_complete&&this.invite_auto_complete.destroy(),this.invite_auto_complete=new s.AutoComplete(o,{min_chars:1,list:t}),this.invite_auto_complete.on("suggestion-box-selectcomplete",e=>this.promptForInvite(e)),this.invite_auto_complete.on("suggestion-box-open",()=>{this.invite_auto_complete.ul.setAttribute("style","max-height: calc(".concat(this.el.offsetHeight,"px - 80px);"))})}}),s.api.listen.on("chatBoxViewsInitialized",()=>{s.chatboxviews.delegate("click","a.open-chatroom",function(e){e.preventDefault(),s.api.rooms.open(e.target.href)}),s.chatboxes.on("add",async function(e){const t=s.chatboxviews;if(!t.get(e.get("id"))&&e.get("type")===s.CHATROOMS_TYPE&&e.isValid())return await e.initialized,t.add(e.get("id"),new s.ChatRoomView({model:e}))})}),s.api.listen.on("clearSession",()=>{const e=s.chatboxviews.get("controlbox");e&&e.roomspanel&&(e.roomspanel.model.destroy(),e.roomspanel.remove(),delete e.roomspanel)}),s.api.listen.on("controlBoxInitialized",e=>{s.allow_muc&&(a(e),e.model.on("change:connected",()=>a(e)))}),Object.assign(s.api,{roomviews:{get(e){if(Array.isArray(e)){const t=s.api.chatviews.get(e);return t.filter(e=>e.model.get("type")===s.CHATROOMS_TYPE)}else{const t=s.api.chatviews.get(e);return t.model.get("type")===s.CHATROOMS_TYPE?t:null}},close(e){let t;return void 0===e?t=s.chatboxviews:xr.isString(e)?t=[s.chatboxviews.get(e)].filter(e=>e):Array.isArray(e)&&(t=e.map(e=>s.chatboxviews.get(e))),Promise.all(t.map(e=>e.is_chatroom&&e.model&&e.close()))}}})}}),mo.plugins.add("converse-headlines-view",{dependencies:["converse-headlines","converse-chatview"],initialize(){const{_converse:e}=this;e.HeadlinesBoxView=e.ChatBoxView.extend({className:"chatbox headlines",events:{"click .close-chatbox-button":"close","click .toggle-chatbox-button":"minimize","keypress textarea.chat-textarea":"onKeyDown"},initialize(){this.initDebounced(),this.model.disable_mam=!0,this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"change:minimized",this.onMinimizedChanged),this.render().insertHeading(),this.updateAfterMessagesFetched(),this.insertIntoDOM().hide(),e.api.trigger("headlinesBoxViewInitialized",this)},render(){return this.el.setAttribute("id",this.model.get("box_id")),this.el.innerHTML=Ma()(Object.assign(this.model.toJSON(),{info_close:"",label_personal_message:"",show_send_button:!1,show_toolbar:!1,unread_msgs:""})),this.content=this.el.querySelector(".chat-content"),this},renderMessageForm:function(){},afterShown:function(){}}),e.api.listen.on("chatBoxViewsInitialized",()=>{const t=e.chatboxviews;e.chatboxes.on("add",o=>{t.get(o.get("id"))||o.get("type")!==e.HEADLINES_TYPE||t.add(o.get("id"),new e.HeadlinesBoxView({model:o}))})})}});const{Strophe:Or,sizzle:Rr}=mo.env,Dr=mo.env.utils;mo.plugins.add("converse-notification",{dependencies:["converse-chatboxes"],initialize(){const{_converse:e}=this,{__:t}=e;e.supports_html5_notification="Notification"in window,e.api.settings.update({notify_all_room_messages:!1,show_desktop_notifications:!0,show_chat_state_notifications:!1,chatstate_notification_blacklist:[],play_sounds:!0,sounds_path:"sounds/",notification_icon:"logo/conversejs-filled.svg",notification_delay:5e3}),e.shouldNotifyOfGroupMessage=function(t){let o=e.notify_all_room_messages;const n=t.getAttribute("from"),a=Or.getResourceFromJid(n),s=Or.getBareJidFromJid(n),i=a&&Or.unescapeNode(a)||"";if(""===i||0<t.querySelectorAll("delay").length)return!1;const r=e.chatboxes.get(s),l=t.querySelector("body");if(null===l)return!1;const d=new RegExp("\\b".concat(r.get("nick"),"\\b")).test(l.textContent);return o=!0===o||Array.isArray(o)&&o.includes(s),!!(i!==r.get("nick")&&(o||d))},e.isMessageToHiddenChat=function(t){if(e.isUniView()){const o=Or.getBareJidFromJid(t.getAttribute("from")),n=e.chatboxviews.get(o);return!n||n.model.get("hidden")||"hidden"===e.windowState||!Dr.isVisible(n.el)}return"hidden"===e.windowState},e.shouldNotifyOfMessage=function(t){const o=t.querySelector("forwarded");if(null!==o)return!1;if("groupchat"===t.getAttribute("type"))return e.shouldNotifyOfGroupMessage(t);if(Dr.isHeadlineMessage(e,t))return e.isMessageToHiddenChat(t);const n=Or.getBareJidFromJid(t.getAttribute("from"))===e.bare_jid;return!Dr.isOnlyChatStateNotification(t)&&!Dr.isOnlyMessageDeliveryReceipt(t)&&!n&&("all"===e.show_desktop_notifications||e.isMessageToHiddenChat(t))},e.playSoundNotification=function(){if(e.play_sounds&&window.Audio!==void 0){const t=new Audio(e.sounds_path+"msg_received.ogg"),o=t.canPlayType("audio/ogg");if("probably"===o)return t.play();const n=new Audio(e.sounds_path+"msg_received.mp3"),a=n.canPlayType("audio/mp3");"probably"===a?n.play():"maybe"===o?t.play():"maybe"===a&&n.play()}},e.areDesktopNotificationsEnabled=function(){return e.supports_html5_notification&&e.show_desktop_notifications&&"granted"===Notification.permission},e.showMessageNotification=function(o){if(!e.areDesktopNotificationsEnabled())return;let a,s;const i=o.getAttribute("from"),r=Or.getBareJidFromJid(i);if("headline"===o.getAttribute("type")){if(!r.includes("@")||e.allow_non_roster_messaging)a=t("Notification from %1$s",r);else return;}else if(!r.includes("@"))a=t("Notification from %1$s",r);else if("groupchat"===o.getAttribute("type"))a=t("%1$s says",Or.getResourceFromJid(i));else{if(void 0===e.roster)return void vt.error("Could not send notification, because roster is undefined");if(s=e.roster.get(r),void 0!==s)a=t("%1$s says",s.getDisplayName());else if(e.allow_non_roster_messaging)a=t("%1$s says",r);else return}const l=Rr("encrypted[xmlns=\"".concat(Or.NS.OMEMO,"\"]"),o).length?t("OMEMO Message received"):Object(ke.get)(o.querySelector("body"),"textContent");if(l){const t=new Notification(a,{body:l,lang:e.locale,icon:e.notification_icon,requireInteraction:!e.notification_delay});e.notification_delay&&setTimeout(t.close.bind(t),e.notification_delay)}},e.showChatStateNotification=function(o){if(e.chatstate_notification_blacklist.includes(o.jid))return;const n=o.chat_status;let a=null;if("offline"===n?a=t("has gone offline"):"away"===n?a=t("has gone away"):"dnd"===n?a=t("is busy"):"online"===n&&(a=t("has come online")),null!==a){const t=new Notification(o.getDisplayName(),{body:a,lang:e.locale,icon:e.notification_icon});setTimeout(t.close.bind(t),5e3)}},e.showContactRequestNotification=function(o){const a=new Notification(o.getDisplayName(),{body:t("wants to be your contact"),lang:e.locale,icon:e.notification_icon});setTimeout(a.close.bind(a),5e3)},e.showFeedbackNotification=function(t){if("error"===t.klass||"warn"===t.klass){const o=new Notification(t.subject,{body:t.message,lang:e.locale,icon:e.notification_icon});setTimeout(o.close.bind(o),5e3)}},e.handleChatStateNotification=function(t){e.areDesktopNotificationsEnabled()&&e.show_chat_state_notifications&&e.showChatStateNotification(t)},e.handleMessageNotification=function(t){const o=t.stanza;return!!e.shouldNotifyOfMessage(o)&&void(e.api.trigger("messageNotification",o),e.playSoundNotification(),e.showMessageNotification(o))},e.handleContactRequestNotification=function(t){e.areDesktopNotificationsEnabled(!0)&&e.showContactRequestNotification(t)},e.handleFeedback=function(t){e.areDesktopNotificationsEnabled(!0)&&e.showFeedbackNotification(t)},e.requestPermission=function(){e.supports_html5_notification&&!["denied","granted"].includes(Notification.permission)&&Notification.requestPermission()},e.api.listen.on("pluginsInitialized",function(){e.api.listen.on("contactRequest",e.handleContactRequestNotification),e.api.listen.on("contactPresenceChanged",e.handleChatStateNotification),e.api.listen.on("message",e.handleMessageNotification),e.api.listen.on("feedback",e.handleFeedback),e.api.listen.on("connected",e.requestPermission)})}});var Lr=o(182),Pr=o.n(Lr),qr=o(183),Br=o.n(qr),zr=o(184),Fr=o.n(zr),Hr=o(185),Ur=o.n(Hr);const{sizzle:Vr}=mo.env,Wr=mo.env.utils;mo.plugins.add("converse-profile",{dependencies:["converse-status","converse-modal","converse-vcard","converse-chatboxviews"],initialize(){const{_converse:e}=this,{__:t}=e;e.api.settings.update({show_client_info:!0}),e.ProfileModal=e.BootstrapModal.extend({events:{'change input[type="file"':"updateFilePreview","click .change-avatar":"openFileSelection","submit .profile-form":"onFormSubmitted"},initialize(){this.listenTo(this.model,"change",this.render),e.BootstrapModal.prototype.initialize.apply(this,arguments),e.api.trigger("profileModalInitialized",this.model)},toHTML(){return Fr()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{__:t,_converse:e,alt_avatar:t("Your avatar image"),heading_profile:t("Your Profile"),label_close:t("Close"),label_email:t("Email"),label_fullname:t("Full Name"),label_jid:t("XMPP Address (JID)"),label_nickname:t("Nickname"),label_role:t("Role"),label_role_help:t("Use commas to separate multiple roles. Your roles are shown next to your name on your chat messages."),label_url:t("URL"),utils:Wr,view:this}))},afterRender(){this.tabs=Vr(".nav-item .nav-link",this.el).map(t=>new ya.a.Tab(t))},openFileSelection(e){e.preventDefault(),this.el.querySelector("input[type=\"file\"]").click()},updateFilePreview(e){const t=e.target.files[0],o=new FileReader;o.onloadend=()=>{this.el.querySelector(".avatar").setAttribute("src",o.result)},o.readAsDataURL(t)},setVCard(o){e.api.vcard.set(e.bare_jid,o).then(()=>e.api.vcard.update(this.model.vcard,!0)).catch(o=>{vt.fatal(o),e.api.show("error",t("Error"),[t("Sorry, an error happened while trying to save your profile data."),t("You can check your browser's developer console for any error output.")])}),this.modal.hide()},onFormSubmitted(e){e.preventDefault();const t=new FileReader,o=new FormData(e.target),n=o.get("image"),a={fn:o.get("fn"),nickname:o.get("nickname"),role:o.get("role"),email:o.get("email"),url:o.get("url")};n.size?(t.onloadend=()=>{Object.assign(a,{image:btoa(t.result),image_type:n.type}),this.setVCard(a)},t.readAsBinaryString(n)):(Object.assign(a,{image:this.model.vcard.get("image"),image_type:this.model.vcard.get("image_type")}),this.setVCard(a))}}),e.ChatStatusModal=e.BootstrapModal.extend({events:{"submit form#set-xmpp-status":"onFormSubmitted","click .clear-input":"clearStatusMessage"},toHTML(){return Pr()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{label_away:t("Away"),label_close:t("Close"),label_busy:t("Busy"),label_cancel:t("Cancel"),label_custom_status:t("Custom status"),label_offline:t("Offline"),label_online:t("Online"),label_save:t("Save"),label_xa:t("Away for long"),modal_title:t("Change chat status"),placeholder_status_message:t("Personal status message")}))},afterRender(){this.el.addEventListener("shown.bs.modal",()=>{this.el.querySelector("input[name=\"status_message\"]").focus()},!1)},clearStatusMessage(e){e&&e.preventDefault&&(e.preventDefault(),Wr.hideElement(this.el.querySelector(".clear-input")));const t=this.el.querySelector("input[name=\"status_message\"]");t.value=""},onFormSubmitted(e){e.preventDefault();const t=new FormData(e.target);this.model.save({status_message:t.get("status_message"),status:t.get("chat_status")}),this.modal.hide()}}),e.ClientInfoModal=e.BootstrapModal.extend({toHTML(){return Br()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{__:t,modal_title:t("About"),version_name:e.VERSION_NAME,first_subtitle:t("%1$s Open Source %2$s XMPP chat client brought to you by %3$s Opkode %2$s","<a target=\"_blank\" rel=\"nofollow\" href=\"https://conversejs.org\">","</a>","<a target=\"_blank\" rel=\"nofollow\" href=\"https://opkode.com\">"),second_subtitle:t("%1$s Translate %2$s it into your own language","<a target=\"_blank\" rel=\"nofollow\" href=\"https://hosted.weblate.org/projects/conversejs/#languages\">","</a>")}))}}),e.XMPPStatusView=e.VDOMViewWithAvatar.extend({tagName:"div",events:{"click a.show-profile":"showProfileModal","click a.change-status":"showStatusChangeModal","click .show-client-info":"showClientInfoModal","click .logout":"logOut"},initialize(){this.listenTo(this.model,"change",this.render),this.listenTo(this.model.vcard,"change",this.render)},toHTML(){const o=this.model.get("status")||"offline";return Ur()(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{__:t,fullname:this.model.vcard.get("fullname")||e.bare_jid,status_message:this.model.get("status_message")||t("I am %1$s",this.getPrettyStatus(o)),chat_status:o,_converse:e,title_change_settings:t("Change settings"),title_change_status:t("Click to change your chat status"),title_log_out:t("Log out"),info_details:t("Show details about this chat client"),title_your_profile:t("Your profile")}))},afterRender(){this.renderAvatar()},showProfileModal(t){this.profile_modal===void 0&&(this.profile_modal=new e.ProfileModal({model:this.model})),this.profile_modal.show(t)},showStatusChangeModal(t){this.status_modal===void 0&&(this.status_modal=new e.ChatStatusModal({model:this.model})),this.status_modal.show(t)},showClientInfoModal(t){this.client_info_modal===void 0&&(this.client_info_modal=new e.ClientInfoModal({model:this.model})),this.client_info_modal.show(t)},logOut(o){o.preventDefault();const n=confirm(t("Are you sure you want to log out?"));!0===n&&e.api.user.logout()},getPrettyStatus(e){return"chat"===e?t("online"):"dnd"===e?t("busy"):"xa"===e?t("away for long"):"away"===e?t("away"):"offline"===e?t("offline"):t(e)||t("online")}}),e.api.listen.on("controlBoxPaneInitialized",async t=>{await e.api.waitUntil("VCardsInitialized"),e.xmppstatusview=new e.XMPPStatusView({model:e.xmppstatus}),t.el.insertAdjacentElement("afterBegin",e.xmppstatusview.render().el)})}});var Gr=o(186),Jr=o.n(Gr);const{Backbone:$r,Strophe:Qr,sizzle:Yr,$build:Xr,$iq:Kr,$msg:Zr,_:el}=mo.env,tl=mo.env.utils;Qr.addNamespace("OMEMO_DEVICELIST",Qr.NS.OMEMO+".devicelist"),Qr.addNamespace("OMEMO_VERIFICATION",Qr.NS.OMEMO+".verification"),Qr.addNamespace("OMEMO_WHITELISTED",Qr.NS.OMEMO+".whitelisted"),Qr.addNamespace("OMEMO_BUNDLES",Qr.NS.OMEMO+".bundles");const ol=128,nl={name:"AES-GCM",length:128};class al extends Error{constructor(e,t){super(e,t),this.name="IQError",this.iq=t}}mo.plugins.add("converse-omemo",{enabled(e){return window.libsignal&&!e.blacklisted_plugins.includes("converse-omemo")&&e.config.get("trusted")},dependencies:["converse-chatview","converse-pubsub","converse-profile"],overrides:{ProfileModal:{events:{"change input.select-all":"selectAll","click .generate-bundle":"generateOMEMODeviceBundle","submit .fingerprint-removal":"removeSelectedFingerprints"},initialize(){const{_converse:e}=this.__super__;return this.debouncedRender=el.debounce(this.render,50),this.devicelist=e.devicelists.get(e.bare_jid),this.listenTo(this.devicelist.devices,"change:bundle",this.debouncedRender),this.listenTo(this.devicelist.devices,"reset",this.debouncedRender),this.listenTo(this.devicelist.devices,"reset",this.debouncedRender),this.listenTo(this.devicelist.devices,"remove",this.debouncedRender),this.listenTo(this.devicelist.devices,"add",this.debouncedRender),this.__super__.initialize.apply(this,arguments)},beforeRender(){const{_converse:e}=this.__super__,t=e.omemo_store.get("device_id");if(t&&(this.current_device=this.devicelist.devices.get(t)),this.other_devices=this.devicelist.devices.filter(e=>e.get("id")!==t),this.__super__.beforeRender)return this.__super__.beforeRender.apply(this,arguments)},selectAll(e){for(let t=tl.ancestor(e.target,"li");t;)t.querySelector("input[type=\"checkbox\"]").checked=e.target.checked,t=t.nextElementSibling},removeSelectedFingerprints(e){e.preventDefault(),e.stopPropagation(),e.target.querySelector(".select-all").checked=!1;const t=Yr(".fingerprint-removal-item input[type=\"checkbox\"]:checked",e.target).map(e=>e.value);this.devicelist.removeOwnDevices(t).then(this.modal.hide).catch(e=>{const{_converse:t}=this.__super__,{__:o}=t;vt.error(e),t.api.alert(Qr.LogLevel.ERROR,o("Error"),[o("Sorry, an error occurred while trying to remove the devices.")])})},generateOMEMODeviceBundle(e){const{_converse:t}=this.__super__,{__:o,api:n}=t;e.preventDefault(),confirm(o("Are you sure you want to generate new OMEMO keys? This will remove your old keys and all previously encrypted messages will no longer be decryptable on this device."))&&n.omemo.bundle.generate()}},UserDetailsModal:{events:{"click .fingerprint-trust .btn input":"toggleDeviceTrust"},initialize(){const{_converse:e}=this.__super__,t=this.model.get("jid");return this.devicelist=e.devicelists.getDeviceList(t),this.listenTo(this.devicelist.devices,"change:bundle",this.render),this.listenTo(this.devicelist.devices,"change:trusted",this.render),this.listenTo(this.devicelist.devices,"remove",this.render),this.listenTo(this.devicelist.devices,"add",this.render),this.listenTo(this.devicelist.devices,"reset",this.render),this.__super__.initialize.apply(this,arguments)},toggleDeviceTrust(e){const t=e.target,o=this.devicelist.devices.get(t.getAttribute("name"));o.save("trusted",parseInt(t.value,10))}},ChatBox:{async getMessageAttributesFromStanza(e,t){const{_converse:o}=this.__super__,n=Yr("encrypted[xmlns=\"".concat(Qr.NS.OMEMO,"\"]"),t).pop(),a=await this.__super__.getMessageAttributesFromStanza.apply(this,arguments);return n&&o.config.get("trusted")?this.getEncryptionAttributesfromStanza(e,t,a):a},async sendMessage(e,t){if(this.get("omemo_active")&&e){const{_converse:o}=this.__super__,n=this.getOutgoingMessageAttributes(e,t);n.is_encrypted=!0,n.plaintext=n.message;let a,s;try{const e=await o.getBundlesAndBuildSessions(this);a=this.messages.create(n),s=await o.createOMEMOMessageStanza(this,a,e)}catch(t){return this.handleMessageSendError(t),null}return o.api.send(s),a}return this.__super__.sendMessage.apply(this,arguments)}},ChatBoxView:{events:{"click .toggle-omemo":"toggleOMEMO"},initialize(){this.__super__.initialize.apply(this,arguments),this.listenTo(this.model,"change:omemo_active",this.renderOMEMOToolbarButton),this.listenTo(this.model,"change:omemo_supported",this.onOMEMOSupportedDetermined)},showMessage(e){if(!e.get("is_only_key"))return this.__super__.showMessage.apply(this,arguments)}},ChatRoomView:{events:{"click .toggle-omemo":"toggleOMEMO"},initialize(){this.__super__.initialize.apply(this,arguments),this.listenTo(this.model,"change:omemo_active",this.renderOMEMOToolbarButton),this.listenTo(this.model,"change:omemo_supported",this.onOMEMOSupportedDetermined)}}},initialize(){async function e(e){if(!el.get(e.get("bundle"),"fingerprint")){const t=await e.getBundle();t.fingerprint=tl.arrayBufferToHex(tl.base64ToArrayBuffer(t.identity_key)),e.save("bundle",t),e.trigger("change:bundle")}}async function t(e){await m.api.waitUntil("OMEMOInitialized");const t=m.devicelists.get(e)||m.devicelists.create({jid:e});return await t.fetchDevices(),t.devices}function o(){const e=m.devicelists.get(m.bare_jid).devices.pluck("id");let t=libsignal.KeyHelper.generateRegistrationId(),o=0;for(;el.includes(e,t);)if(t=libsignal.KeyHelper.generateRegistrationId(),o++,10==o)throw new Error("Unable to generate a unique device ID");return t.toString()}async function n(e){const t=new libsignal.SignalProtocolAddress(e.get("jid"),e.get("id")),o=new libsignal.SessionBuilder(m.omemo_store,t),n=e.getRandomPreKey(),a=await e.getBundle();return o.processPreKey({registrationId:parseInt(e.get("id"),10),identityKey:tl.base64ToArrayBuffer(a.identity_key),signedPreKey:{keyId:a.signed_prekey.id,publicKey:tl.base64ToArrayBuffer(a.signed_prekey.public_key),signature:tl.base64ToArrayBuffer(a.signed_prekey.signature)},preKey:{keyId:n.id,publicKey:tl.base64ToArrayBuffer(n.key)}})}async function a(t){const o=new libsignal.SignalProtocolAddress(t.get("jid"),t.get("id")),a=await m.omemo_store.loadSession(o.toString());if(a)return Promise.resolve(a);try{const e=await n(t);return e}catch(o){return vt.error("Could not build an OMEMO session for device ".concat(t.get("id"))),vt.error(o),null}}function s(e,t,o){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const a=t[n].payload,s=t[n].device,i=3==parseInt(a.type,10);e.c("key",{rid:s.get("id")}).t(btoa(a.body)),i&&e.attrs({prekey:i}),e.up(),n==t.length-1&&e.c("iv").t(o).up().up()}return Promise.resolve(e)}function i(){return new Promise((e,t)=>m.devicelists.fetch({success:e,error:(o,n)=>t(n)}))}async function r(){await i();let e=m.devicelists.get(m.bare_jid);return e||(e=m.devicelists.create({jid:m.bare_jid})),e.fetchDevices()}function l(e){const t=Yr("items",e).pop();if(t&&t.getAttribute("node").startsWith(Qr.NS.OMEMO_BUNDLES)){const o=t.getAttribute("node").split(":")[1],n=e.getAttribute("from"),a=Yr("item > bundle",t).pop(),s=m.devicelists.getDeviceList(n),i=s.devices.get(o)||s.devices.create({id:o,jid:n});i.save({bundle:xe(a)})}}function d(e){const t=Yr("items[node=\"".concat(Qr.NS.OMEMO_DEVICELIST,"\"]"),e).pop();if(!t)return;const o="item list[xmlns=\"".concat(Qr.NS.OMEMO,"\"] device"),n=Yr(o,t).map(e=>e.getAttribute("id")),a=e.getAttribute("from"),s=m.devicelists.getDeviceList(a),i=s.devices,r=el.difference(i.pluck("id"),n);r.forEach(e=>{a===m.bare_jid&&e===m.omemo_store.get("device_id")||i.get(e).save("active",!1)}),n.forEach(e=>{const t=i.get(e);t?t.save("active",!0):i.create({id:e,jid:a})}),tl.isSameBareJID(a,m.bare_jid)&&s.publishCurrentDevice(n)}function c(){if(m.omemo_store===void 0){const e="converse.omemosession-".concat(m.bare_jid);m.omemo_store=new m.OMEMOStore({id:e}),m.omemo_store.browserStorage=m.createStore(e)}return m.omemo_store.fetchSession()}async function p(e,t){if(!t.isSelf()&&e.features.get("nonanonymous")&&e.features.get("membersonly")&&e.get("omemo_active")){const o=await m.contactHasOMEMOSupport(t.get("jid"));o||(e.messages.create({message:g("%1$s doesn't appear to have a client that supports OMEMO. Encrypted chat will no longer be possible in this grouchat.",t.get("nick")),type:"error"}),e.save({omemo_active:!1,omemo_supported:!1}))}}async function u(e){let t;e.get("type")===m.CHATROOMS_TYPE?(await m.api.waitUntil("OMEMOInitialized"),t=e.features.get("nonanonymous")&&e.features.get("membersonly")):e.get("type")===m.PRIVATE_CHAT_TYPE&&(t=await m.contactHasOMEMOSupport(e.get("jid"))),e.set("omemo_supported",t),t&&m.omemo_default&&e.set("omemo_active",!0)}const{_converse:m}=this,{__:g}=m;m.api.settings.update({omemo_default:!1}),m.api.promises.add(["OMEMOInitialized"]),m.NUM_PREKEYS=100;Object.assign(m.ChatBox.prototype,{async encryptMessage(e){const t=crypto.getRandomValues(new window.Uint8Array(12)),o=await crypto.subtle.generateKey(nl,!0,["encrypt","decrypt"]),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:t,tagLength:ol},o,tl.stringToArrayBuffer(e)),a=n.byteLength-16,s=n.slice(0,a),i=n.slice(a),r=await crypto.subtle.exportKey("raw",o);return Promise.resolve({key:r,tag:i,key_and_tag:tl.appendArrayBuffer(r,i),payload:tl.arrayBufferToBase64(s),iv:tl.arrayBufferToBase64(t)})},async decryptMessage(e){const t=await crypto.subtle.importKey("raw",e.key,nl,!0,["encrypt","decrypt"]),o=tl.appendArrayBuffer(tl.base64ToArrayBuffer(e.payload),e.tag),n={name:"AES-GCM",iv:tl.base64ToArrayBuffer(e.iv),tagLength:ol};return tl.arrayBufferToString(await crypto.subtle.decrypt(n,t,o))},reportDecryptionError(t){if("debug"===m.loglevel){const{__:e}=m;this.messages.create({message:e("Sorry, could not decrypt a received OMEMO message due to an error.")+" ".concat(t.name," ").concat(t.message),type:"error"})}vt.error("".concat(t.name," ").concat(t.message))},async handleDecryptedWhisperMessage(e,t){const o=e.encrypted,n=m.devicelists.getDeviceList(this.get("jid"));this.save("omemo_supported",!0);let a=n.get(o.device_id);if(a||(a=n.devices.create({id:o.device_id,jid:e.from})),o.payload){const e=t.slice(0,16),n=t.slice(16),s=await this.decryptMessage(Object.assign(o,{key:e,tag:n}));return a.save("active",!0),s}},decrypt(t){const o=this.getSessionCipher(t.from,parseInt(t.encrypted.device_id,10));if(!0===t.encrypted.prekey){let e;return o.decryptPreKeyWhisperMessage(tl.base64ToArrayBuffer(t.encrypted.key),"binary").then(e=>this.handleDecryptedWhisperMessage(t,e)).then(t=>(e=t,m.omemo_store.generateMissingPreKeys())).then(()=>m.omemo_store.publishBundle()).then(()=>e?Object.assign(t,{plaintext:e}):Object.assign(t,{is_only_key:!0})).catch(o=>(this.reportDecryptionError(o),t))}return o.decryptWhisperMessage(tl.base64ToArrayBuffer(t.encrypted.key),"binary").then(e=>this.handleDecryptedWhisperMessage(t,e)).then(e=>Object.assign(t,{plaintext:e})).catch(o=>(this.reportDecryptionError(o),t))},getEncryptionAttributesfromStanza(e,t,o){const n=Yr("encrypted[xmlns=\"".concat(Qr.NS.OMEMO,"\"]"),t).pop(),a=n.querySelector("header"),s=Yr("key[rid=\"".concat(m.omemo_store.get("device_id"),"\"]"),n).pop();return s?(o.is_encrypted=!0,o.encrypted={device_id:a.getAttribute("sid"),iv:a.querySelector("iv").textContent,key:s.textContent,payload:el.get(n.querySelector("payload"),"textContent",null),prekey:el.includes(["true","1"],s.getAttribute("prekey"))},this.decrypt(o)):Promise.resolve(o)},getSessionCipher(e,t){const o=new libsignal.SignalProtocolAddress(e,t);return this.session_cipher=new window.libsignal.SessionCipher(m.omemo_store,o),this.session_cipher},encryptKey(e,t){return this.getSessionCipher(t.get("jid"),t.get("id")).encrypt(e).then(e=>({payload:e,device:t}))},handleMessageSendError(t){if("IQError"===t.name){this.save("omemo_supported",!1);const e=[];Yr("presence-subscription-required[xmlns=\"".concat(Qr.NS.PUBSUB_ERROR,"\"]"),t.iq).length?e.push(g("Sorry, we're unable to send an encrypted message because %1$s requires you to be subscribed to their presence in order to see their OMEMO information",t.iq.getAttribute("from"))):Yr("remote-server-not-found[xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"]",t.iq).length?e.push(g("Sorry, we're unable to send an encrypted message because the remote server for %1$s could not be found",t.iq.getAttribute("from"))):(e.push(g("Unable to send an encrypted message due to an unexpected error.")),e.push(t.iq.outerHTML)),m.api.alert("error",g("Error"),e),vt.error(t)}else if(t.user_facing)m.api.alert("error",g("Error"),[t.message]),vt.error(t);else throw t}});Object.assign(m.ChatBoxView.prototype,{onOMEMOSupportedDetermined(){!this.model.get("omemo_supported")&&this.model.get("omemo_active")?this.model.set("omemo_active",!1):this.renderOMEMOToolbarButton()},renderOMEMOToolbarButton(){if(this.model.get("type")!==m.CHATROOMS_TYPE||this.model.features.get("membersonly")&&this.model.features.get("nonanonymous")){const e=this.el.querySelector(".toggle-omemo"),t=Jr()(Object.assign(this.model.toJSON(),{__:g}));e?e.outerHTML=t:this.el.querySelector(".chat-toolbar").insertAdjacentHTML("beforeend",t)}else{const e=this.el.querySelector(".toggle-omemo");e&&e.parentElement.removeChild(e)}},toggleOMEMO(e){if(!this.model.get("omemo_supported")){let e;return e=this.model.get("type")===m.CHATROOMS_TYPE?[g("Cannot use end-to-end encryption in this groupchat, either the groupchat has some anonymity or not all participants support OMEMO.")]:[g("Cannot use end-to-end encryption because %1$s uses a client that doesn't support OMEMO.",this.model.contact.getDisplayName())],m.api.alert("error",g("Error"),e)}e.preventDefault(),this.model.save({omemo_active:!this.model.get("omemo_active")})}}),m.generateFingerprints=async function(o){const n=await t(o);return Promise.all(n.map(t=>e(t)))},m.getDeviceForContact=function(e,o){return t(e).then(e=>e.get(o))},m.contactHasOMEMOSupport=async function(e){const o=await t(e);return 0<o.length},m.getBundlesAndBuildSessions=async function(e){const o=g("Sorry, no devices found to which we can send an OMEMO encrypted message.");let n;if(e.get("type")===m.CHATROOMS_TYPE){const o=await Promise.all(e.occupants.map(e=>t(e.get("jid"))));n=o.reduce((e,t)=>el.concat(e,t.models),[])}else if(e.get("type")===m.PRIVATE_CHAT_TYPE){const a=await t(e.get("jid"));if(0===a.length){const e=new Error(o);throw e.user_facing=!0,e}const s=m.devicelists.get(m.bare_jid).devices;n=[...s.models,...a.models]}const s=m.omemo_store.get("device_id");n=n.filter(e=>e.get("id")!==s),await Promise.all(n.map(e=>e.getBundle()));const i=await Promise.all(n.map(e=>a(e)));if(i.includes(null)&&(n=n.filter(e=>i[n.indexOf(e)]),0===n.length)){const e=new Error(o);throw e.user_facing=!0,e}return n},m.createOMEMOMessageStanza=function(e,t,o){const{__:n}=m,a=n("This is an OMEMO encrypted message which your client doesn\u2019t seem to support. Find more information on https://conversations.im/omemo");if(!t.get("message"))throw new Error("No message body to encrypt!");const i=Zr({from:m.connection.jid,to:e.get("jid"),type:e.get("message_type"),id:t.get("msgid")}).c("body").t(a).up();return"chat"===t.get("type")&&i.c("request",{xmlns:Qr.NS.RECEIPTS}).up(),i.c("encrypted",{xmlns:Qr.NS.OMEMO}).c("header",{sid:m.omemo_store.get("device_id")}),e.encryptMessage(t.get("message")).then(t=>{const n=o.filter(e=>e.get("trusted")!=-1&&e.get("active")).map(o=>e.encryptKey(t.key_and_tag,o));return Promise.all(n).then(e=>s(i,e,t.iv)).then(e=>(e.c("payload").t(t.payload).up().up(),e.c("store",{xmlns:Qr.NS.HINTS}),e))})},m.OMEMOStore=$r.Model.extend({Direction:{SENDING:1,RECEIVING:2},getIdentityKeyPair(){const e=this.get("identity_keypair");return Promise.resolve({privKey:tl.base64ToArrayBuffer(e.privKey),pubKey:tl.base64ToArrayBuffer(e.pubKey)})},getLocalRegistrationId(){return Promise.resolve(parseInt(this.get("device_id"),10))},isTrustedIdentity(e,t){if(null===e||e===void 0)throw new Error("Can't check identity key for invalid key");if(!(t instanceof ArrayBuffer))throw new Error("Expected identity_key to be an ArrayBuffer");const o=this.get("identity_key"+e);return void 0===o?Promise.resolve(!0):Promise.resolve(tl.arrayBufferToBase64(t)===o)},loadIdentityKey(e){if(null===e||e===void 0)throw new Error("Can't load identity_key for invalid identifier");return Promise.resolve(tl.base64ToArrayBuffer(this.get("identity_key"+e)))},saveIdentity(e,t){if(null===e||void 0===e)throw new Error("Can't save identity_key for invalid identifier");const o=new libsignal.SignalProtocolAddress.fromString(e),n=this.get("identity_key"+o.getName()),a=tl.arrayBufferToBase64(t);return this.save("identity_key"+o.getName(),a),n&&a!==n?Promise.resolve(!0):Promise.resolve(!1)},getPreKeys(){return this.get("prekeys")||{}},loadPreKey(e){const t=this.getPreKeys()[e];return t?Promise.resolve({privKey:tl.base64ToArrayBuffer(t.privKey),pubKey:tl.base64ToArrayBuffer(t.pubKey)}):Promise.resolve()},storePreKey(e,t){const o={};return o[e]={pubKey:tl.arrayBufferToBase64(t.pubKey),privKey:tl.arrayBufferToBase64(t.privKey)},this.save("prekeys",Object.assign(this.getPreKeys(),o)),Promise.resolve()},removePreKey(e){return this.save("prekeys",el.omit(this.getPreKeys(),e)),Promise.resolve()},loadSignedPreKey(){const e=this.get("signed_prekey");return e?Promise.resolve({privKey:tl.base64ToArrayBuffer(e.privKey),pubKey:tl.base64ToArrayBuffer(e.pubKey)}):Promise.resolve()},storeSignedPreKey(e){if("object"!=typeof e)throw new Error("storeSignedPreKey: expected an object");return this.save("signed_prekey",{id:e.keyId,privKey:tl.arrayBufferToBase64(e.keyPair.privKey),pubKey:tl.arrayBufferToBase64(e.keyPair.pubKey),signature:tl.arrayBufferToBase64(e.signature)}),Promise.resolve()},removeSignedPreKey(e){return this.get("signed_prekey").id===e&&(this.unset("signed_prekey"),this.save()),Promise.resolve()},loadSession(e){return Promise.resolve(this.get("session"+e))},storeSession(e,t){return Promise.resolve(this.save("session"+e,t))},removeSession(e){return Promise.resolve(this.unset("session"+e))},removeAllSessions(e){const t=el.filter(Object.keys(this.attributes),t=>{if(t.startsWith("session"+e))return t}),o={};return el.forEach(t,e=>{o[e]=void 0}),this.save(o),Promise.resolve()},publishBundle(){const e=this.get("signed_prekey"),t="".concat(Qr.NS.OMEMO_BUNDLES,":").concat(this.get("device_id")),o=Xr("item").c("bundle",{xmlns:Qr.NS.OMEMO}).c("signedPreKeyPublic",{signedPreKeyId:e.id}).t(e.pubKey).up().c("signedPreKeySignature").t(e.signature).up().c("identityKey").t(this.get("identity_keypair").pubKey).up().c("prekeys");el.forEach(this.get("prekeys"),(e,t)=>o.c("preKeyPublic",{preKeyId:t}).t(e.pubKey).up());return m.api.pubsub.publish(null,t,o,{"pubsub#access_model":"open"},!1)},async generateMissingPreKeys(){const e=el.difference(el.invokeMap(el.range(0,m.NUM_PREKEYS),Number.prototype.toString),Object.keys(this.getPreKeys()));if(1>e.length)return vt.warn("No missing prekeys to generate for our own device"),Promise.resolve();const t=await Promise.all(e.map(e=>libsignal.KeyHelper.generatePreKey(parseInt(e,10))));t.forEach(e=>this.storePreKey(e.keyId,e.keyPair));const o=Object.keys(this.getPreKeys()).map(e=>({id:e.keyId,key:tl.arrayBufferToBase64(e.pubKey)})),n=m.devicelists.get(m.bare_jid),a=n.devices.get(this.get("device_id")),s=await a.getBundle();a.save("bundle",Object.assign(s,{prekeys:o}))},async generateBundle(){const e=await libsignal.KeyHelper.generateIdentityKeyPair(),t={},n=tl.arrayBufferToBase64(e.pubKey),a=o();t.identity_key=n,t.device_id=a,this.save({device_id:a,identity_keypair:{privKey:tl.arrayBufferToBase64(e.privKey),pubKey:n},identity_key:n});const s=await libsignal.KeyHelper.generateSignedPreKey(e,0);m.omemo_store.storeSignedPreKey(s),t.signed_prekey={id:s.keyId,public_key:tl.arrayBufferToBase64(s.keyPair.privKey),signature:tl.arrayBufferToBase64(s.signature)};const i=await Promise.all(el.range(0,m.NUM_PREKEYS).map(e=>libsignal.KeyHelper.generatePreKey(e)));i.forEach(e=>m.omemo_store.storePreKey(e.keyId,e.keyPair));const r=m.devicelists.get(m.bare_jid),l=r.devices.create({id:t.device_id,jid:m.bare_jid}),d=i.map(e=>({id:e.keyId,key:tl.arrayBufferToBase64(e.keyPair.pubKey)}));t.prekeys=d,l.save("bundle",t)},fetchSession(){return void 0===this._setup_promise&&(this._setup_promise=new Promise((e,t)=>{this.fetch({success:()=>{m.omemo_store.get("device_id")?e():this.generateBundle().then(e).catch(t)},error:(o,n)=>{vt.warn("Could not fetch OMEMO session from cache, we'll generate a new one."),vt.warn(n),this.generateBundle().then(e).catch(t)}})})),this._setup_promise}}),m.Device=$r.Model.extend({defaults:{trusted:0,active:!0},getRandomPreKey(){const e=this.get("bundle");return e.prekeys[tl.getRandomInt(e.prekeys.length)]},async fetchBundleFromServer(){const e=Kr({type:"get",from:m.bare_jid,to:this.get("jid")}).c("pubsub",{xmlns:Qr.NS.PUBSUB}).c("items",{node:"".concat(Qr.NS.OMEMO_BUNDLES,":").concat(this.get("id"))});let t;try{t=await m.api.sendIQ(e)}catch(e){throw new al("Could not fetch bundle",e)}if(t.querySelector("error"))throw new al("Could not fetch bundle",t);const o=Yr("items[node=\"".concat(Qr.NS.OMEMO_BUNDLES,":").concat(this.get("id"),"\"]"),t).pop(),n=Yr("bundle[xmlns=\"".concat(Qr.NS.OMEMO,"\"]"),o).pop(),a=xe(n);return this.save("bundle",a),a},getBundle(){return this.get("bundle")?Promise.resolve(this.get("bundle"),this):this.fetchBundleFromServer()}}),m.Devices=m.Collection.extend({model:m.Device}),m.DeviceList=$r.Model.extend({idAttribute:"jid",initialize(){this.devices=new m.Devices;const e="converse.devicelist-".concat(m.bare_jid,"-").concat(this.get("jid"));this.devices.browserStorage=m.createStore(e),this.fetchDevices()},async onDevicesFound(e){if(0===e.length){let e;try{e=await this.fetchDevicesFromServer()}catch(t){null===t?vt.error("Timeout error while fetching devices for ".concat(this.get("jid"))):(vt.error("Could not fetch devices for ".concat(this.get("jid"))),vt.error(t)),this.destroy()}this.get("jid")===m.bare_jid&&(await this.publishCurrentDevice(e))}},fetchDevices(){return void 0===this._devices_promise&&(this._devices_promise=new Promise(t=>{this.devices.fetch({success:e=>t(this.onDevicesFound(e)),error:(o,n)=>{vt.error(n),t()}})})),this._devices_promise},async publishCurrentDevice(e){if(this.get("jid")!==m.bare_jid)return;await c();let t=m.omemo_store.get("device_id");if(this.devices.findWhere({id:t})||(await m.omemo_store.generateBundle(),t=m.omemo_store.get("device_id")),!el.includes(e,t))return this.publishDevices()},async fetchDevicesFromServer(){const e=Kr({type:"get",from:m.bare_jid,to:this.get("jid")}).c("pubsub",{xmlns:Qr.NS.PUBSUB}).c("items",{node:Qr.NS.OMEMO_DEVICELIST});let t;try{t=await m.api.sendIQ(e)}catch(t){return vt.error(t),[]}const o=Yr("list[xmlns=\"".concat(Qr.NS.OMEMO,"\"] device"),t).map(e=>e.getAttribute("id"));return el.forEach(o,e=>this.devices.create({id:e,jid:this.get("jid")})),o},publishDevices(){const e=Xr("item").c("list",{xmlns:Qr.NS.OMEMO});this.devices.filter(e=>e.get("active")).forEach(t=>e.c("device",{id:t.get("id")}).up());return m.api.pubsub.publish(null,Qr.NS.OMEMO_DEVICELIST,e,{"pubsub#access_model":"open"},!1)},removeOwnDevices(e){if(this.get("jid")!==m.bare_jid)throw new Error("Cannot remove devices from someone else's device list");return el.forEach(e,e=>this.devices.get(e).destroy()),this.publishDevices()}}),m.DeviceLists=m.Collection.extend({model:m.DeviceList,getDeviceList(e){return this.get(e)||this.create({jid:e})}}),m.api.waitUntil("chatBoxesInitialized").then(()=>m.chatboxes.on("add",e=>{u(e),e.get("type")===m.CHATROOMS_TYPE&&(e.occupants.on("add",t=>p(e,t)),e.features.on("change",()=>u(e)))})),m.api.listen.on("connected",function(){m.connection.addHandler(e=>{try{Yr("event[xmlns=\"".concat(Qr.NS.PUBSUB,"#event\"]"),e).length&&(d(e),l(e))}catch(t){vt.error(t.message)}return!0},null,"message","headline")}),m.api.listen.on("renderToolbar",e=>e.renderOMEMOToolbarButton()),m.api.listen.on("statusInitialized",async function(){if(m.config.get("trusted")){m.devicelists=new m.DeviceLists;const e="converse.devicelists-".concat(m.bare_jid);m.devicelists.browserStorage=m.createStore(e);try{await r(),await c(),await m.omemo_store.publishBundle()}catch(t){return vt.error("Could not initialize OMEMO support"),void vt.error(t)}m.api.trigger("OMEMOInitialized")}}),m.api.listen.on("addClientFeatures",()=>m.api.disco.own.features.add("".concat(Qr.NS.OMEMO_DEVICELIST,"+notify"))),m.api.listen.on("userDetailsModalInitialized",e=>{const t=e.get("jid");m.generateFingerprints(t).catch(t=>vt.error(t))}),m.api.listen.on("profileModalInitialized",()=>{m.generateFingerprints(m.bare_jid).catch(t=>vt.error(t))}),m.api.listen.on("afterTearDown",()=>delete m.omemo_store),m.api.listen.on("clearSession",()=>{m.shouldClearCache()&&m.devicelists&&(m.devicelists.clearSession(),delete m.devicelists)}),Object.assign(m.api,{omemo:{bundle:{generate:async()=>{const t=m.devicelists.get(m.bare_jid),o=m.omemo_store.get("device_id");if(o){const e=t.devices.get(o);m.omemo_store.unset(o),e&&(await new Promise(t=>e.destroy({success:t,error:t}))),t.devices.trigger("remove")}await m.omemo_store.generateBundle(),await t.publishDevices();const n=t.devices.get(m.omemo_store.get("device_id"));return e(n)}}}})}});const{Strophe:sl,$iq:il,_:rl}=mo.env;sl.addNamespace("PUSH","urn:xmpp:push:0"),mo.plugins.add("converse-push",{initialize(){async function e(e,t){if(t.jid){if(!(await a.api.disco.supports(sl.NS.PUSH,e||a.bare_jid)))return void vt.warn("Not disabling push app server \"".concat(t.jid,"\", no disco support from your server."));const o=il({type:"set"});e!==a.bare_jid&&o.attrs({to:e}),o.c("disable",{xmlns:sl.NS.PUSH,jid:t.jid}),t.node&&o.attrs({node:t.node}),a.api.sendIQ(o).catch(o=>{vt.error("Could not disable push app server for ".concat(t.jid)),vt.error(o)})}}async function t(e,t){if(t.jid&&t.node){const o=await a.api.disco.getIdentity("pubsub","push",t.jid);if(!o)return vt.warn("Not enabling push the service \"".concat(t.jid,"\", it doesn't have the right disco identtiy."));const n=await Promise.all([a.api.disco.supports(sl.NS.PUSH,t.jid),a.api.disco.supports(sl.NS.PUSH,e)]);if(!n[0]&&!n[1])return void vt.warn("Not enabling push app server \"".concat(t.jid,"\", no disco support from your server."));const s=il({type:"set"});return e!==a.bare_jid&&s.attrs({to:e}),s.c("enable",{xmlns:sl.NS.PUSH,jid:t.jid,node:t.node}),t.secret&&s.c("x",{xmlns:sl.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE"}).c("value").t("".concat(sl.NS.PUBSUB,"#publish-options")).up().up().c("field",{var:"secret"}).c("value").t(t.secret),a.api.sendIQ(s)}}async function o(o){o=o||a.bare_jid;const n=a.session.get("push_enabled")||[];if(rl.includes(n,o))return;const s=rl.reject(a.push_app_servers,"disable"),i=rl.filter(a.push_app_servers,"disable"),r=rl.map(s,rl.partial(t,o)),l=rl.map(i,rl.partial(e,o));try{await Promise.all(r.concat(l))}catch(t){vt.error("Could not enable or disable push App Server"),t&&vt.error(t)}finally{n.push(o)}a.session.save("push_enabled",n)}function n(e){e.get("type")==a.CHATROOMS_TYPE&&o(sl.getDomainFromJid(e.get("jid")))}const{_converse:a}=this;a.api.settings.update({push_app_servers:[],enable_muc_push:!1}),a.api.listen.on("statusInitialized",()=>o()),a.enable_muc_push&&a.api.listen.on("chatBoxesInitialized",()=>a.chatboxes.on("add",n))}});var ll=o(187),dl=o.n(ll),cl=o(188),pl=o.n(cl),ul=o(189),ml=o.n(ul),gl=o(190),hl=o.n(gl);const{Strophe:_l,Backbone:fl,sizzle:bl,$iq:vl,_:yl}=mo.env,xl=mo.env.utils;_l.addNamespace("REGISTER","jabber:iq:register");const Sl=Object.keys(_l.Status).reduce((e,t)=>Math.max(e,_l.Status[t]),0);_l.Status.REGIFAIL=Sl+1,_l.Status.REGISTERED=Sl+2,_l.Status.CONFLICT=Sl+3,_l.Status.NOTACCEPTABLE=Sl+5,mo.plugins.add("converse-register",{overrides:{LoginPanel:{render(){const{_converse:e}=this.__super__;return this.__super__.render.apply(this,arguments),e.allow_registration&&!e.auto_login&&this.insertRegisterLink(),this}},ControlBoxView:{renderLoginPanel(){return this.__super__.renderLoginPanel.apply(this,arguments),this.renderRegistrationPanel(),this}}},initialize(){function e(e){t.api.waitUntil("controlBoxInitialized").then(()=>{const o=t.chatboxes.get("controlbox");o.set({"active-form":e})}).catch(t=>vt.fatal(t))}const{_converse:t}=this,{__:o}=t;t.CONNECTION_STATUS[_l.Status.REGIFAIL]="REGIFAIL",t.CONNECTION_STATUS[_l.Status.REGISTERED]="REGISTERED",t.CONNECTION_STATUS[_l.Status.CONFLICT]="CONFLICT",t.CONNECTION_STATUS[_l.Status.NOTACCEPTABLE]="NOTACCEPTABLE",t.api.settings.update({allow_registration:!0,domain_placeholder:o(" e.g. conversejs.org"),providers_link:"https://compliance.conversations.im/",registration_domain:""}),Object.assign(t.LoginPanel.prototype,{insertRegisterLink(){if(this.registerlinkview===void 0){this.registerlinkview=new t.RegisterLinkView({model:this.model}),this.registerlinkview.render();const e=this.el.querySelector(".buttons");e&&e.insertAdjacentElement("afterend",this.registerlinkview.el)}this.registerlinkview.render()}}),Object.assign(t.ControlBoxView.prototype,{showLoginOrRegisterForm(){this.registerpanel&&("register"==this.model.get("active-form")?(this.loginpanel.el.classList.add("hidden"),this.registerpanel.el.classList.remove("hidden")):(this.loginpanel.el.classList.remove("hidden"),this.registerpanel.el.classList.add("hidden")))},renderRegistrationPanel(){if(t.allow_registration){this.registerpanel=new t.RegisterPanel({model:this.model}),this.registerpanel.render(),this.registerpanel.el.classList.add("hidden");const e=this.el.querySelector("#converse-login-panel");e&&e.insertAdjacentElement("afterend",this.registerpanel.el),this.showLoginOrRegisterForm()}return this}}),t.router.route("converse/login",()=>e("login")),t.router.route("converse/register",()=>e("register")),t.RegisterLinkView=fl.VDOMView.extend({toHTML(){return dl()(Object.assign(this.model.toJSON(),{__:t.__,_converse:t,connection_status:t.connfeedback.get("connection_status")}))}}),t.RegisterPanel=fl.NativeView.extend({tagName:"div",id:"converse-register-panel",className:"controlbox-pane fade-in",events:{"submit form#converse-register":"onFormSubmission","click .button-cancel":"renderProviderChoiceForm"},initialize(){this.reset(),t.api.listen.on("connectionInitialized",()=>this.registerHooks())},render(){return this.model.set("registration_form_rendered",!1),this.el.innerHTML=pl()({__:o,default_domain:t.registration_domain,label_register:o("Fetch registration form"),help_providers:o("Tip: A list of public XMPP providers is available"),help_providers_link:o("here"),href_providers:t.providers_link,domain_placeholder:t.domain_placeholder}),t.registration_domain&&this.fetchRegistrationForm(t.registration_domain),this},registerHooks(){const e=t.connection,o=e._connect_cb.bind(e);e._connect_cb=(e,t,n)=>{this._registering?this.getRegistrationFields(e,t)&&(this._registering=!1):o(e,t,n)}},getRegistrationFields(e,n){const a=t.connection;a.connected=!0;const s=a._proto._reqToData(e);if(!s)return;if(a._proto._connect_cb(s)===_l.Status.CONNFAIL)return this.showValidationError(o("Sorry, we're unable to connect to your chosen provider.")),!1;const i=s.getElementsByTagName("register"),r=s.getElementsByTagName("mechanism");if(0===i.length&&0===r.length)return a._proto._no_auth_received(n),!1;if(0===i.length)return a._changeConnectStatus(_l.Status.REGIFAIL),this.showValidationError(o("Sorry, the given provider does not support in band account registration. Please try with a different provider.")),!0;a._addSysHandler(this.onRegistrationFields.bind(this),null,"iq",null,null);const l=vl({type:"get"}).c("query",{xmlns:_l.NS.REGISTER}).tree();return l.setAttribute("id",a.getUniqueId("sendIQ")),a.send(l),a.connected=!1,!0},onRegistrationFields(e){return"error"===e.getAttribute("type")?(t.connection._changeConnectStatus(_l.Status.REGIFAIL,o("Something went wrong while establishing a connection with \"%1$s\". Are you sure it exists?",this.domain)),!1):1===e.getElementsByTagName("query").length?(this.setFields(e),this.model.get("registration_form_rendered")||this.renderRegistrationForm(e),!1):(t.connection._changeConnectStatus(_l.Status.REGIFAIL,"unknown"),!1)},reset(e){const t={fields:{},urls:[],title:"",instructions:"",registered:!1,_registering:!1,domain:null,form_type:null};Object.assign(this,t),e&&Object.assign(this,yl.pick(e,Object.keys(t)))},onFormSubmission(e){e&&e.preventDefault&&e.preventDefault(),null===e.target.querySelector("input[name=domain]")?this.submitRegistrationForm(e.target):this.onProviderChosen(e.target)},onProviderChosen(e){const t=e.querySelector("input[name=domain]"),o=yl.get(t,"value");return o?void(e.querySelector("input[type=submit]").classList.add("hidden"),this.fetchRegistrationForm(o.trim())):void t.classList.add("error")},async fetchRegistrationForm(e){return this.model.get("registration_form_rendered")||this.renderRegistrationRequest(),this.reset({domain:_l.getDomainFromJid(e),_registering:!0}),await t.initConnection(this.domain),t.connection.connect(this.domain,"",e=>this.onConnectStatusChanged(e)),!1},renderRegistrationRequest(){this.clearRegistrationForm().insertAdjacentHTML("beforeend",hl()({__:t.__,cancel:t.registration_domain}))},giveFeedback(e,t){let o=this.el.querySelector(".reg-feedback");null!==o&&o.parentNode.removeChild(o);const n=this.el.querySelector("form");n.insertAdjacentHTML("afterbegin","<span class=\"reg-feedback\"></span>"),o=n.querySelector(".reg-feedback"),o.textContent=e,t&&o.classList.add(t)},clearRegistrationForm(){const e=this.el.querySelector("form");return e.innerHTML="",this.model.set("registration_form_rendered",!1),e},showSpinner(){const e=this.el.querySelector("form");return e.innerHTML=ua()(),this.model.set("registration_form_rendered",!1),this},onConnectStatusChanged(e){vt.debug("converse-register: onConnectStatusChanged"),yl.includes([_l.Status.DISCONNECTED,_l.Status.CONNFAIL,_l.Status.REGIFAIL,_l.Status.NOTACCEPTABLE,_l.Status.CONFLICT],e)?(vt.error("Problem during registration: Strophe.Status is ".concat(t.CONNECTION_STATUS[e])),this.abortRegistration()):e===_l.Status.REGISTERED&&(vt.debug("Registered successfully."),t.connection.reset(),this.showSpinner(),yl.includes(["converse/login","converse/register"],fl.history.getFragment())&&t.router.navigate("",{replace:!0}),this.fields.password&&this.fields.username?(t.connection.connect(this.fields.username.toLowerCase()+"@"+this.domain.toLowerCase(),this.fields.password,t.onConnectStatusChanged),this.giveFeedback(o("Now logging you in"),"info")):(t.chatboxviews.get("controlbox").renderLoginPanel(),t.giveFeedback(o("Registered successfully"))),this.reset())},renderLegacyRegistrationForm(e){Object.keys(this.fields).forEach(t=>{"username"===t?e.insertAdjacentHTML("beforeend",Gn()({domain:" @".concat(this.domain),name:t,type:"text",label:t,value:"",required:!0})):e.insertAdjacentHTML("beforeend",qn()({label:t,name:t,placeholder:t,required:!0,type:"password"===t||"email"===t?t:"text",value:""}))}),this.urls.forEach(t=>e.insertAdjacentHTML("afterend","<a target=\"blank\" rel=\"noopener\" href=\""+t+"\">"+t+"</a>"))},renderRegistrationForm(e){const o=this.el.querySelector("form");o.innerHTML=ml()({__:t.__,domain:this.domain,title:this.title,instructions:this.instructions,registration_domain:t.registration_domain});const n=o.querySelector("fieldset.buttons");"xform"===this.form_type?e.querySelectorAll("field").forEach(t=>{n.insertAdjacentHTML("beforebegin",Po.xForm2webForm(t,e,{domain:this.domain}))}):this.renderLegacyRegistrationForm(o),this.fields||o.querySelector(".button-primary").classList.add("hidden"),o.classList.remove("hidden"),this.model.set("registration_form_rendered",!0)},showValidationError(e){const t=this.el.querySelector("form");let o=t.querySelector(".form-errors");if(null===o){o="<div class=\"form-errors hidden\"></div>";const e=t.querySelector("p.instructions");null===e?t.insertAdjacentHTML("afterbegin",o):e.insertAdjacentHTML("afterend",o),o=t.querySelector(".form-errors")}else o.innerHTML="";o.insertAdjacentHTML("beforeend","<p class=\"form-help error\">"+e+"</p>"),o.classList.remove("hidden")},reportErrors(e){const t=e.querySelectorAll("error");if(t.forEach(t=>this.showValidationError(t.textContent)),!t.length){const e=o("The provider rejected your registration attempt. Please check the values you entered for correctness.");this.showValidationError(e)}},renderProviderChoiceForm(e){e&&e.preventDefault&&e.preventDefault(),t.connection._proto._abortAllRequests(),t.connection.reset(),this.render()},abortRegistration(){t.connection._proto._abortAllRequests(),t.connection.reset(),this.model.get("registration_form_rendered")?t.registration_domain&&this.model.get("registration_form_rendered")&&this.fetchRegistrationForm(t.registration_domain):this.render()},submitRegistrationForm(e){const o=yl.reduce(this.el.querySelectorAll("input.required"),function(e,t){return""===t.value?(t.classList.add("error"),e+1):e},0);if(o)return;const n=bl(":input:not([type=button]):not([type=submit])",e),a=vl({type:"set",id:xl.getUniqueId()}).c("query",{xmlns:_l.NS.REGISTER});"xform"===this.form_type?(a.c("x",{xmlns:_l.NS.XFORM,type:"submit"}),n.forEach(e=>a.cnode(Po.webForm2xForm(e)).up())):n.forEach(e=>a.c(e.getAttribute("name"),{},e.value)),t.connection._addSysHandler(this._onRegisterIQ.bind(this),null,"iq",null,null),t.connection.send(a),this.setFields(a.tree())},setFields(e){const t=e.querySelector("query"),o=bl("x[xmlns=\"".concat(_l.NS.XFORM,"\"]"),t);0<o.length?this._setFieldsFromXForm(o.pop()):this._setFieldsFromLegacy(t)},_setFieldsFromLegacy(e){[].forEach.call(e.children,e=>"instructions"===e.tagName.toLowerCase()?void(this.instructions=_l.getText(e)):"x"===e.tagName.toLowerCase()?void("jabber:x:oob"===e.getAttribute("xmlns")&&this.urls.concat(bl("url",e).map(e=>e.textContent))):void(this.fields[e.tagName.toLowerCase()]=_l.getText(e))),this.form_type="legacy"},_setFieldsFromXForm(e){this.title=yl.get(e.querySelector("title"),"textContent"),this.instructions=yl.get(e.querySelector("instructions"),"textContent"),e.querySelectorAll("field").forEach(e=>{const t=e.getAttribute("var");t?this.fields[t.toLowerCase()]=yl.get(e.querySelector("value"),"textContent",""):vt.warn("Found field we couldn't parse")}),this.form_type="xform"},_onRegisterIQ(e){if("error"===e.getAttribute("type")){vt.error("Registration failed."),this.reportErrors(e);let o=e.getElementsByTagName("error");if(1!==o.length)return t.connection._changeConnectStatus(_l.Status.REGIFAIL,"unknown"),!1;o=o[0].firstChild.tagName.toLowerCase(),"conflict"===o?t.connection._changeConnectStatus(_l.Status.CONFLICT,o):"not-acceptable"===o?t.connection._changeConnectStatus(_l.Status.NOTACCEPTABLE,o):t.connection._changeConnectStatus(_l.Status.REGIFAIL,o)}else t.connection._changeConnectStatus(_l.Status.REGISTERED,null);return!1}}),t.api.listen.on("controlBoxInitialized",e=>{e.model.on("change:active-form",e.showLoginOrRegisterForm,e)})}});var wl=o(191),kl=o.n(wl);const{Backbone:El,Strophe:Cl}=mo.env,Al=mo.env.utils;mo.plugins.add("converse-roomslist",{dependencies:["converse-singleton","converse-controlbox","converse-muc","converse-bookmarks"],initialize(){const{_converse:e}=this,{__:t}=e;e.api.promises.add("roomsListInitialized"),e.RoomsList=El.Model.extend({defaults:{"toggle-state":e.OPENED}}),e.RoomsListView=El.VDOMView.extend({tagName:"div",className:"list-container list-container--openrooms",events:{"click .add-bookmark":"addBookmark","click .close-room":"closeRoom","click .list-toggle":"toggleRoomsList","click .remove-bookmark":"removeBookmark","click .open-room":"openRoom","click .room-info":"showRoomDetailsModal"},initialize(){this.listenTo(this.model,"add",this.renderIfChatRoom),this.listenTo(this.model,"remove",this.renderIfChatRoom),this.listenTo(this.model,"destroy",this.renderIfChatRoom),this.listenTo(this.model,"change",this.renderIfRelevantChange);const t="converse.roomslist".concat(e.bare_jid);this.list_model=new e.RoomsList({id:t}),this.list_model.browserStorage=e.createStore(t),this.list_model.fetch(),this.render(),this.insertIntoControlBox()},renderIfChatRoom(e){Al.isChatRoom(e)&&this.render()},renderIfRelevantChange(e){const t=["bookmarked","hidden","name","num_unread","num_unread_general"],o=e.changed||{};Al.isChatRoom(e)&&Object.keys(o).filter(e=>t.includes(e)).length&&this.render()},toHTML(){return kl()({rooms:this.model.filter(t=>t.get("type")===e.CHATROOMS_TYPE),allow_bookmarks:e.allow_bookmarks&&e.bookmarks,collapsed:this.list_model.get("toggle-state")!==e.OPENED,desc_rooms:t("Click to toggle the list of open groupchats"),info_add_bookmark:t("Bookmark this groupchat"),info_leave_room:t("Leave this groupchat"),info_remove_bookmark:t("Unbookmark this groupchat"),info_title:t("Show more information on this groupchat"),open_title:t("Click to open this groupchat"),currently_open:t=>e.isUniView()&&!t.get("hidden"),toggle_state:this.list_model.get("toggle-state"),label_rooms:t("Open Groupchats"),_converse:e})},insertIntoControlBox(){const t=e.chatboxviews.get("controlbox");if(t!==void 0&&!Al.rootContains(e.root,this.el)){const e=t.el.querySelector(".list-container--openrooms");e&&e.parentNode.replaceChild(this.el,e)}},showRoomDetailsModal(t){const o=t.target.getAttribute("data-room-jid"),n=e.chatboxes.get(o);t.preventDefault(),n.room_details_modal===void 0&&(n.room_details_modal=new e.RoomDetailsModal({model:n})),n.room_details_modal.show(t)},async openRoom(t){t.preventDefault();const o=t.target.textContent,n=t.target.getAttribute("data-room-jid"),a={name:o||Cl.unescapeNode(Cl.getNodeFromJid(n))||n};await e.api.rooms.open(n,a,!0),e.api.chatviews.get(n).maybeFocus()},closeRoom(o){o.preventDefault();const n=o.target.getAttribute("data-room-name"),a=o.target.getAttribute("data-room-jid");confirm(t("Are you sure you want to leave the groupchat %1$s?",n))&&e.chatboxviews.get(a).close()},removeBookmark:e.removeBookmarkViaEvent,addBookmark:e.addBookmarkViaEvent,toggleRoomsList(t){t&&t.preventDefault&&t.preventDefault();const o=t.target.matches(".fa")?t.target:t.target.querySelector(".fa");o.classList.contains("fa-caret-down")?Al.slideIn(this.el.querySelector(".open-rooms-list")).then(()=>{this.list_model.save({"toggle-state":e.CLOSED}),o.classList.remove("fa-caret-down"),o.classList.add("fa-caret-right")}):Al.slideOut(this.el.querySelector(".open-rooms-list")).then(()=>{this.list_model.save({"toggle-state":e.OPENED}),o.classList.remove("fa-caret-right"),o.classList.add("fa-caret-down")})}});const o=function(){e.rooms_list_view=new e.RoomsListView({model:e.chatboxes}),e.api.trigger("roomsListInitialized")};e.api.listen.on("connected",async()=>{e.allow_bookmarks?await e.api.waitUntil("bookmarksInitialized"):await Promise.all([e.api.waitUntil("chatBoxesFetched"),e.api.waitUntil("roomsPanelRendered")]),o()}),e.api.listen.on("reconnected",o)}});var Tl=o(192),jl=o.n(Tl),Nl=o(193),Ml=o.n(Nl),Il=o(194),Ol=o.n(Il),Rl=o(195),Dl=o.n(Rl),Ll=o(196),Pl=o.n(Ll),ql=o(197),Bl=o.n(ql),zl=o(198),Fl=o.n(zl);const{Backbone:Hl,Strophe:Ul}=mo.env,Vl=mo.env.utils;mo.plugins.add("converse-rosterview",{dependencies:["converse-roster","converse-modal","converse-chatboxviews"],initialize(){function e(){t.authentication===t.ANONYMOUS||(t.rosterview=new t.RosterView({model:t.rostergroups}),t.rosterview.render(),t.api.trigger("rosterViewInitialized"))}const{_converse:t}=this,{__:o}=t;t.api.settings.update({autocomplete_add_contact:!0,allow_chat_pending_contacts:!0,allow_contact_removal:!0,hide_offline_users:!1,roster_groups:!0,show_toolbar:!0,xhr_user_search_url:null}),t.api.promises.add("rosterViewInitialized");const n={dnd:o("This contact is busy"),online:o("This contact is online"),offline:o("This contact is offline"),unavailable:o("This contact is unavailable"),xa:o("This contact is away for an extended period"),away:o("This contact is away")};t.AddContactModal=t.BootstrapModal.extend({events:{"submit form":"addContactFromForm"},initialize(){t.BootstrapModal.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render)},toHTML(){const e=t.xhr_user_search_url?o("Contact name"):o("Optional nickname");return jl()(Object.assign(this.model.toJSON(),{_converse:t,heading_new_contact:o("Add a Contact"),label_xmpp_address:o("XMPP Address"),label_nickname:e,contact_placeholder:o("name@example.org"),label_add:o("Add"),error_message:o("Please enter a valid XMPP address")}))},afterRender(){t.xhr_user_search_url&&Object(ke.isString)(t.xhr_user_search_url)?this.initXHRAutoComplete():this.initJIDAutoComplete();const e=this.el.querySelector("input[name=\"jid\"]");this.el.addEventListener("shown.bs.modal",()=>e.focus(),!1)},initJIDAutoComplete(){if(t.autocomplete_add_contact){const e=this.el.querySelector(".suggestion-box__jid").parentElement;this.jid_auto_complete=new t.AutoComplete(e,{data:(e,t)=>"".concat(t.slice(0,t.indexOf("@")),"@").concat(e),filter:t.FILTER_STARTSWITH,list:Object(ke.uniq)(t.roster.map(e=>Ul.getDomainFromJid(e.get("jid"))))})}},initXHRAutoComplete(){if(!t.autocomplete_add_contact)return this.initXHRFetch();const e=this.el.querySelector(".suggestion-box__name").parentElement;this.name_auto_complete=new t.AutoComplete(e,{auto_evaluate:!1,filter:t.FILTER_STARTSWITH,list:[]});const o=new window.XMLHttpRequest;o.onload=()=>{if(o.responseText){const e=o.responseText;this.name_auto_complete.list=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid})),this.name_auto_complete.auto_completing=!0,this.name_auto_complete.evaluate()}};const n=this.el.querySelector("input[name=\"name\"]");n.addEventListener("input",Object(ke.debounce)(()=>{o.open("GET","".concat(t.xhr_user_search_url,"q=").concat(encodeURIComponent(n.value)),!0),o.send()},300)),this.name_auto_complete.on("suggestion-box-selectcomplete",e=>{this.el.querySelector("input[name=\"name\"]").value=e.text.label,this.el.querySelector("input[name=\"jid\"]").value=e.text.value})},initXHRFetch(){this.xhr=new window.XMLHttpRequest,this.xhr.onload=()=>{if(this.xhr.responseText){const e=this.xhr.responseText,t=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid}));if(1!==t.length){const e=this.el.querySelector(".invalid-feedback");return e.textContent=o("Sorry, could not find a contact with that name"),void Vl.addClass("d-block",e)}const n=t[0].value;if(this.validateSubmission(n)){const e=this.el.querySelector("form"),o=t[0].label;this.afterSubmission(e,n,o)}}}},validateSubmission(e){const n=this.el.querySelector(".invalid-feedback");return!e||2>Object(ke.compact)(e.split("@")).length?(Vl.addClass("is-invalid",this.el.querySelector("input[name=\"jid\"]")),Vl.addClass("d-block",n),!1):t.roster.get(Ul.getBareJidFromJid(e))?(n.textContent=o("This contact has already been added"),Vl.addClass("d-block",n),!1):(Vl.removeClass("d-block",n),!0)},afterSubmission(e,o,n){t.roster.addAndSubscribe(o,n),this.model.clear(),this.modal.hide()},addContactFromForm(e){e.preventDefault();const o=new FormData(e.target),n=(o.get("jid")||"").trim();if(!n&&t.xhr_user_search_url&&Object(ke.isString)(t.xhr_user_search_url)){const e=this.el.querySelector("input[name=\"name\"]");return this.xhr.open("GET","".concat(t.xhr_user_search_url,"q=").concat(encodeURIComponent(e.value)),!0),void this.xhr.send()}this.validateSubmission(n)&&this.afterSubmission(e.target,n,o.get("name"))}}),t.RosterFilter=Hl.Model.extend({initialize(){this.set({filter_text:"",filter_type:"contacts",chat_state:"online"})}}),t.RosterFilterView=Hl.VDOMView.extend({tagName:"form",className:"roster-filter-form",events:{"keydown .roster-filter":"liveFilter",submit:"submitFilter","click .clear-input":"clearFilter","click .filter-by span":"changeTypeFilter","change .state-type":"changeChatStateFilter"},initialize(){this.listenTo(this.model,"change:filter_type",this.render),this.listenTo(this.model,"change:filter_text",this.render)},toHTML(){return Bl()(Object.assign(this.model.toJSON(),{visible:this.shouldBeVisible(),placeholder:o("Filter"),title_contact_filter:o("Filter by contact name"),title_group_filter:o("Filter by group name"),title_status_filter:o("Filter by status"),label_any:o("Any"),label_unread_messages:o("Unread"),label_online:o("Online"),label_chatty:o("Chatty"),label_busy:o("Busy"),label_away:o("Away"),label_xa:o("Extended Away"),label_offline:o("Offline")}))},changeChatStateFilter(e){e&&e.preventDefault&&e.preventDefault(),this.model.save({chat_state:this.el.querySelector(".state-type").value})},changeTypeFilter(e){e&&e.preventDefault&&e.preventDefault();const t=e.target.dataset.type;"state"===t?this.model.save({filter_type:t,chat_state:this.el.querySelector(".state-type").value}):this.model.save({filter_type:t,filter_text:this.el.querySelector(".roster-filter").value})},liveFilter:Object(ke.debounce)(function(){this.model.save({filter_text:this.el.querySelector(".roster-filter").value})},250),submitFilter(e){e&&e.preventDefault&&e.preventDefault(),this.liveFilter(),this.render()},isActive(){return!!("state"===this.model.get("filter_type")||this.model.get("filter_text"))},shouldBeVisible(){return t.roster&&5<=t.roster.length||this.isActive()},showOrHide(){this.shouldBeVisible()?this.show():this.hide()},show(){return Vl.isVisible(this.el)?this:(this.el.classList.add("fade-in"),this.el.classList.remove("hidden"),this)},hide(){return Vl.isVisible(this.el)?(this.model.save({filter_text:"",chat_state:"online"}),this.el.classList.add("hidden"),this):this},clearFilter(e){e&&e.preventDefault&&(e.preventDefault(),Vl.hideElement(this.el.querySelector(".clear-input")));const t=this.el.querySelector(".roster-filter");t.value="",this.model.save({filter_text:""})}}),t.RosterContactView=t.ViewWithAvatar.extend({tagName:"li",className:"list-item d-flex hidden controlbox-padded",events:{"click .accept-xmpp-request":"acceptRequest","click .decline-xmpp-request":"declineRequest","click .open-chat":"openChat","click .remove-xmpp-contact":"removeContact"},async initialize(){await this.model.initialized,this.debouncedRender=Object(ke.debounce)(this.render,50),this.listenTo(this.model,"change",this.debouncedRender),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"highlight",this.highlight),this.listenTo(this.model,"open",this.openChat),this.listenTo(this.model,"remove",this.remove),this.listenTo(this.model,"vcard:change",this.debouncedRender),this.listenTo(this.model.presence,"change:show",this.debouncedRender),this.render()},render(){if(!this.mayBeShown())return Vl.hideElement(this.el),this;const e=this.model.get("ask"),a=this.model.presence.get("show"),s=this.model.get("requesting"),i=this.model.get("subscription"),r=["current-xmpp-contact","pending-xmpp-contact","requesting-xmpp-contact"].concat(Object.keys(n));if(r.forEach(e=>Vl.removeClass(e,this.el)),this.el.classList.add(a),this.el.setAttribute("data-status",a),this.highlight(),t.isUniView()){const e=t.chatboxes.get(this.model.get("jid"));e&&(e.get("hidden")?this.el.classList.remove("open"):this.el.classList.add("open"))}if("subscribe"===e||"from"===i){const e=this.model.getDisplayName();this.el.classList.add("pending-xmpp-contact"),this.el.innerHTML=Ol()(Object.assign(this.model.toJSON(),{display_name:e,desc_remove:o("Click to remove %1$s as a contact",e),allow_chat_pending_contacts:t.allow_chat_pending_contacts}))}else if(!0===s){const e=this.model.getDisplayName();this.el.classList.add("requesting-xmpp-contact"),this.el.innerHTML=Dl()(Object.assign(this.model.toJSON(),{display_name:e,desc_accept:o("Click to accept the contact request from %1$s",e),desc_decline:o("Click to decline the contact request from %1$s",e),allow_chat_pending_contacts:t.allow_chat_pending_contacts}))}else("both"===i||"to"===i)&&(this.el.classList.add("current-xmpp-contact"),this.el.classList.remove(Object(ke.without)(["both","to"],i)[0]),this.el.classList.add(i),this.renderRosterItem(this.model));return this},highlight(){if(t.isUniView()){const e=t.chatboxes.get(this.model.get("jid"));e&&e.get("hidden")||!e?this.el.classList.remove("open"):this.el.classList.add("open")}},renderRosterItem(e){const a=e.presence.get("show")||"offline";let s="online"===a?"fa fa-circle chat-status chat-status--online":"away"===a?"fa fa-circle chat-status chat-status--away":"xa"===a?"far fa-circle chat-status chat-status-xa":"dnd"===a?"fa fa-minus-circle chat-status chat-status--busy":"fa fa-times-circle chat-status chat-status--offline";const i=e.getDisplayName();return this.el.innerHTML=Fl()(Object.assign(e.toJSON(),{show:a,display_name:i,status_icon:s,desc_status:n[a],desc_chat:o("Click to chat with %1$s (JID: %2$s)",i,e.get("jid")),desc_remove:o("Click to remove %1$s as a contact",i),allow_contact_removal:t.allow_contact_removal,num_unread:e.get("num_unread")||0,classes:""})),this.renderAvatar(),this},mayBeShown(){const e=this.model.presence.get("show");return!(t.hide_offline_users&&"offline"===e)||"subscribe"===this.model.get("ask")||"from"===this.model.get("subscription")||!0===this.model.get("requesting")},openChat(e){e&&e.preventDefault&&e.preventDefault();const o=this.model.attributes;t.api.chats.open(o.jid,o,!0)},async removeContact(e){if((e&&e.preventDefault&&e.preventDefault(),!!t.allow_contact_removal)&&confirm(o("Are you sure you want to remove this contact?")))try{await this.model.removeFromRoster(),this.remove(),this.model.collection&&this.model.destroy()}catch(n){vt.error(n),t.api.alert("error",o("Error"),[o("Sorry, there was an error while trying to remove %1$s as a contact.",this.model.getDisplayName())])}},async acceptRequest(e){e&&e.preventDefault&&e.preventDefault(),await t.roster.sendContactAddIQ(this.model.get("jid"),this.model.getFullname(),[]),this.model.authorize().subscribe()},declineRequest(e){e&&e.preventDefault&&e.preventDefault();const t=confirm(o("Are you sure you want to decline this contact request?"));return!0===t&&this.model.unauthorize().destroy(),this}}),t.RosterGroupView=_n.extend({tagName:"div",className:"roster-group hidden",events:{"click a.group-toggle":"toggle"},sortImmediatelyOnAdd:!0,ItemView:t.RosterContactView,listItems:"model.contacts",listSelector:".roster-group-contacts",sortEvent:"presenceChanged",initialize(){_n.prototype.initialize.apply(this,arguments),this.model.get("name")===t.HEADER_UNREAD&&this.listenTo(this.model.contacts,"change:num_unread",e=>!this.model.get("unread_messages")&&this.removeContact(e)),this.model.get("name")===t.HEADER_REQUESTING_CONTACTS&&this.listenTo(this.model.contacts,"change:requesting",e=>!e.get("requesting")&&this.removeContact(e)),this.model.get("name")===t.HEADER_PENDING_CONTACTS&&this.listenTo(this.model.contacts,"change:subscription",e=>"from"!==e.get("subscription")&&this.removeContact(e)),this.listenTo(this.model.contacts,"remove",this.onRemove),this.listenTo(t.roster,"change:groups",this.onContactGroupChange),t.rosterview.on("rosterContactsFetchedAndProcessed",()=>this.sortAndPositionAllItems())},render(){return this.el.setAttribute("data-group",this.model.get("name")),this.el.innerHTML=Ml()({label_group:this.model.get("name"),desc_group_toggle:this.model.get("description"),toggle_state:this.model.get("state"),_converse:t}),this.contacts_el=this.el.querySelector(".roster-group-contacts"),this},show(){return Vl.showElement(this.el),this.model.get("state")===t.OPENED&&Object.values(this.getAll()).filter(e=>e.mayBeShown()).forEach(e=>Vl.showElement(e.el)),this},collapse(){return Vl.slideIn(this.contacts_el)},filterOutContacts(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],t=0;this.model.contacts.forEach(o=>{const n=this.get(o.get("id"));e.includes(o)?Vl.hideElement(n.el):n.mayBeShown()&&(Vl.showElement(n.el),t+=1)}),t?Vl.showElement(this.el):Vl.hideElement(this.el)},getFilterMatches(e,o){if(0===e.length)return[];let n;if(e=e.toLowerCase(),"state"===o){const o=[t.HEADER_REQUESTING_CONTACTS,t.HEADER_UNREAD];if(o.includes(this.model.get("name")))return[];n="unread_messages"===e?this.model.contacts.filter({num_unread:0}):"online"===e?this.model.contacts.filter(e=>["offline","unavailable"].includes(e.presence.get("show"))):this.model.contacts.filter(t=>!t.presence.get("show").includes(e))}else n=this.model.contacts.filter(t=>!t.getDisplayName().toLowerCase().includes(e.toLowerCase()));return n},filter(e,o){(null===e||e===void 0)&&(o=o||t.rosterview.filter_view.model.get("filter_type"),e="state"===o?t.rosterview.filter_view.model.get("chat_state"):t.rosterview.filter_view.model.get("filter_text")),this.filterOutContacts(this.getFilterMatches(e,o))},async toggle(e){e&&e.preventDefault&&e.preventDefault();const o=e.target.matches(".fa")?e.target:e.target.querySelector(".fa");Vl.hasClass("fa-caret-down",o)?(this.model.save({state:t.CLOSED}),await this.collapse(),o.classList.remove("fa-caret-down"),o.classList.add("fa-caret-right")):(o.classList.remove("fa-caret-right"),o.classList.add("fa-caret-down"),this.model.save({state:t.OPENED}),this.filter(),Vl.showElement(this.el),Vl.slideOut(this.contacts_el))},onContactGroupChange(e){const t=e.get("groups").includes(this.model.get("name")),o=e.get("id"),n=!this.get(o);t&&!n?this.items.trigger("add",e):!t&&this.removeContact(e)},removeContact(e){this.model.contacts.remove(e,{silent:!0}),this.onRemove(e)},onRemove(e){this.remove(e.get("jid")),0===this.model.contacts.length&&this.remove()}}),t.RosterView=_n.extend({tagName:"div",id:"converse-roster",className:"controlbox-section",ItemView:t.RosterGroupView,listItems:"model",listSelector:".roster-contacts",sortEvent:null,subviewIndex:"name",sortImmediatelyOnAdd:!0,events:{"click a.controlbox-heading__btn.add-contact":"showAddContactModal","click a.controlbox-heading__btn.sync-contacts":"syncContacts"},initialize(){_n.prototype.initialize.apply(this,arguments),this.listenTo(t.roster,"add",this.onContactAdded),this.listenTo(t.roster,"change:groups",this.onContactAdded),this.listenTo(t.roster,"change",this.onContactChange),this.listenTo(t.roster,"destroy",this.update),this.listenTo(t.roster,"remove",this.update),t.presences.on("change:show",()=>{this.update(),this.updateFilter()}),this.listenTo(this.model,"reset",this.reset),t.api.listen.on("rosterGroupsFetched",this.sortAndPositionAllItems.bind(this)),t.api.listen.on("rosterContactsFetched",()=>{t.roster.each(e=>this.addRosterContact(e,{silent:!0})),this.update(),this.updateFilter(),this.trigger("rosterContactsFetchedAndProcessed")}),this.createRosterFilter()},render(){this.el.innerHTML=Pl()({allow_contact_requests:t.allow_contact_requests,heading_contacts:o("Contacts"),title_add_contact:o("Add a contact"),title_sync_contacts:o("Re-sync your contacts")});const e=this.el.querySelector(".roster-filter-form");return this.el.replaceChild(this.filter_view.render().el,e),this.roster_el=this.el.querySelector(".roster-contacts"),this},showAddContactModal(e){this.add_contact_modal===void 0&&(this.add_contact_modal=new t.AddContactModal({model:new Hl.Model})),this.add_contact_modal.show(e)},createRosterFilter(){const e=new t.RosterFilter;e.id="_converse.rosterfilter-".concat(t.bare_jid),e.browserStorage=t.createStore(e.id),this.filter_view=new t.RosterFilterView({model:e}),this.listenTo(this.filter_view.model,"change",this.updateFilter),this.filter_view.model.fetch()},updateFilter:Object(ke.debounce)(function(){const e=this.filter_view.model.get("filter_type");"state"===e?this.filter(this.filter_view.model.get("chat_state"),e):this.filter(this.filter_view.model.get("filter_text"),e)},100),update(){return Vl.isVisible(this.roster_el)||Vl.showElement(this.roster_el),this.filter_view.showOrHide(),this},filter(e,t){const o=Object.values(this.getAll());o.forEach(e=>0<e.model.contacts.length&&e.show().filter("")),e=e.toLowerCase(),"groups"===t?o.forEach(t=>{t.model.get("name").toLowerCase().includes(e)?0<t.model.contacts.length&&Vl.slideOut(t.el):Vl.slideIn(t.el)}):o.forEach(o=>o.filter(e,t))},async syncContacts(e){e.preventDefault(),Vl.addClass("fa-spin",e.target),t.roster.data.save("version",null),await t.roster.fetchFromServer(),t.xmppstatus.sendPresence(),Vl.removeClass("fa-spin",e.target)},reset(){return this.removeAll(),this.render().update(),this},onContactAdded(e){this.addRosterContact(e),this.update(),this.updateFilter()},onContactChange(e){this.update(),Object(ke.has)(e.changed,"subscription")&&("from"===e.changed.subscription?this.addContactToGroup(e,t.HEADER_PENDING_CONTACTS):["both","to"].includes(e.get("subscription"))&&this.addExistingContact(e)),Object(ke.has)(e.changed,"num_unread")&&e.get("num_unread")&&this.addContactToGroup(e,t.HEADER_UNREAD),Object(ke.has)(e.changed,"ask")&&"subscribe"===e.changed.ask&&this.addContactToGroup(e,t.HEADER_PENDING_CONTACTS),Object(ke.has)(e.changed,"subscription")&&"true"===e.changed.requesting&&this.addContactToGroup(e,t.HEADER_REQUESTING_CONTACTS),this.updateFilter()},getGroup(e){const t=this.get(e);return t?t.model:this.model.create({name:e,id:Pe.b64_sha1(e)})},addContactToGroup(e,t,o){this.getGroup(t).contacts.add(e,o),this.sortAndPositionAllItems()},addExistingContact(e,o){let n;t.roster_groups?(n=e.get("groups"),n=0===n.length?[t.HEADER_UNGROUPED]:n):n=[t.HEADER_CURRENT_CONTACTS],e.get("num_unread")&&n.push(t.HEADER_UNREAD),n.forEach(t=>this.addContactToGroup(e,t,o))},addRosterContact(e,o){if("both"===e.get("subscription")||"to"===e.get("subscription"))this.addExistingContact(e,o);else{if(!t.allow_contact_requests)return void vt.debug("Not adding requesting or pending contact ".concat(e.get("jid")," ")+"because allow_contact_requests is false");"subscribe"===e.get("ask")||"from"===e.get("subscription")?this.addContactToGroup(e,t.HEADER_PENDING_CONTACTS,o):!0===e.get("requesting")&&this.addContactToGroup(e,t.HEADER_REQUESTING_CONTACTS,o)}return this}}),t.api.listen.on("chatBoxesInitialized",()=>{function e(e){const o=t.roster&&t.roster.findWhere({jid:e.get("jid")});o!==void 0&&o.trigger("highlight")}t.chatboxes.on("destroy",t=>e(t)),t.chatboxes.on("change:hidden",t=>e(t))}),t.api.listen.on("controlBoxInitialized",e=>{function o(){e.model.get("connected")&&t.authentication!==t.ANONYMOUS&&t.api.waitUntil("rosterViewInitialized").then(()=>e.controlbox_pane.el.insertAdjacentElement("beforeEnd",t.rosterview.el)).catch(t=>vt.fatal(t))}o(),e.model.on("change:connected",o)}),t.api.listen.on("rosterInitialized",e),t.api.listen.on("rosterReadyAfterReconnection",e),t.api.listen.on("afterTearDown",()=>{mo.rosterview&&(mo.rosterview.model.off().reset(),mo.rosterview.each(e=>e.removeAll().remove()),mo.rosterview.removeAll().remove(),delete mo.rosterview)})}});const Wl=mo.env.utils;mo.plugins.add("converse-uniview",{dependencies:["converse-chatboxes","converse-muc-views","converse-controlbox","converse-rosterview"],overrides:{ChatBoxes:{createChatBox(e,t){const{_converse:o}=this.__super__;return o.isUniView()&&(t=t||{},t.hidden=!0),this.__super__.createChatBox.call(this,e,t)}},ChatBox:{maybeShow(){const{_converse:e}=this.__super__;return!e.isUniView()||this.get("hidden")&&we(e)?this.__super__.maybeShow.apply(this,arguments):this.trigger("show")}},ChatBoxView:{shouldShowOnTextMessage(){const{_converse:e}=this.__super__;return!e.isUniView()&&this.__super__.shouldShowOnTextMessage.apply(this,arguments)}}},initialize(){const{_converse:e}=this;e.api.listen.on("beforeShowingChatView",t=>{if(e.isUniView()&&(Object.values(e.chatboxviews.xget(t.model.get("id"))).filter(e=>!e.model.get("hidden")).forEach(Se),t.model.get("hidden")))return new Promise(e=>{Wl.safeSave(t.model,{hidden:!1},{success:e,failure:e})})})}});o(457);const Gl=["converse-autocomplete","converse-bookmark-views","converse-chatboxviews","converse-chatview","converse-controlbox","converse-dragresize","converse-emoji-views","converse-fullscreen","converse-mam-views","converse-message-view","converse-minimize","converse-modal","converse-muc-views","converse-headlines-view","converse-notification","converse-omemo","converse-profile","converse-push","converse-register","converse-roomslist","converse-rosterview","converse-singleton","converse-uniview"],Jl=mo.initialize;mo.initialize=function(e,t){return e.whitelisted_plugins=Array.isArray(e.whitelisted_plugins)?e.whitelisted_plugins.concat(Gl):Gl,Jl(e,t)};t["default"]=mo}]);
\ No newline at end of file
diff --git a/src/plugins/converse-rai.js b/src/plugins/converse-rai.js
index 25ad5723d463965c7e33cebf6602d31a9fff6e7a..33ba090b4f7ca40518a527f8315368357e2589f6 100644
--- a/src/plugins/converse-rai.js
+++ b/src/plugins/converse-rai.js
@@ -5,8 +5,7 @@
         factory(converse);
     }
 }(this, function (converse) {
-    var raiDialog = null,
-        _converse = null;
+    var Strophe, $iq, $msg, $pres, $build, b64_sha1, _ ,Backbone, dayjs, _converse;
 
     converse.plugins.add("rai", {
         'dependencies': [],
@@ -14,6 +13,16 @@
         'initialize': function () {
             _converse = this._converse;
 
+            Strophe = converse.env.Strophe;
+            $iq = converse.env.$iq;
+            $msg = converse.env.$msg;
+            $pres = converse.env.$pres;
+            $build = converse.env.$build;
+            b64_sha1 = converse.env.b64_sha1;
+            _ = converse.env._;
+            Backbone = converse.env.Backbone;
+            dayjs = converse.env.dayjs;
+
             _converse.api.settings.update({
                 rai_notification: true,
                 rai_notification_label: "Room Activity Indicator"
@@ -25,10 +34,77 @@
                 });
             });
 
+            _converse.api.listen.on('chatRoomViewInitialized', function (view)
+            {
+                const jid = view.model.get("jid");
+                console.debug("chatRoomViewInitialized", jid);
+
+                if (view.model.get("num_unread") > 0 || view.model.get("num_unread_general") > 0) {
+                    emitNotification(jid);
+                }
+            });
+
+
+            _converse.api.listen.on('chatBoxScrolledDown', function (view)
+            {
+                const jid = view.chatbox.get('jid');
+                const id_attr = 'stanza_id ' + jid;
+                const messages = view.chatbox.messages;
+
+                if(!getUnreadStatus(jid)) {
+                    return;
+                }
+
+                for (let i = messages.length - 1; i >= 0; i--) {
+                    const message = messages.at(i);
+
+                    if (message.has(id_attr)) {
+                        let id = message.get(id_attr);
+                        if(id != sessionStorage.getItem("rai_displayed." + jid)) {
+                            sessionStorage.setItem("rai_displayed." + jid, id);
+                            setUnreadStatus(jid, false);
+                            setTimeout(() => sendMarker(jid, id, "displayed"), 0);
+                        }
+                        break;
+                    }
+                }
+            });
+
+            _converse.api.listen.on('chatBoxInsertedIntoDOM', function (view)
+            {
+                const jid = view.model.get("jid");
+                console.debug("chatBoxInsertedIntoDOM", jid, view.model);
+
+                if (view.model.get("num_unread") > 0)
+                {
+                    emitNotification(jid);
+                }
+
+            });
+
+            _converse.on('message', function (data)
+            {
+                var chatbox = data.chatbox;
+                var message = data.stanza;
+                var history = message.querySelector('forwarded');
+                var body = message.querySelector('body');
+
+                if (!history && body && chatbox)
+                {
+                    const alert = chatbox.get("num_unread") > 0;
+                    const notify = chatbox.get("num_unread_general") > 0;
+
+                    if ( alert || notify)
+                    {
+                        emitNotification(chatbox.get("jid"),  alert);
+                    }
+                }
+            });
         }
     });
 
-    function setupRoomActivityIndicators(callback) {
+    function setupRoomActivityIndicators(callback)
+    {
         try {
             const id = Math.random().toString(36).substr(2, 9);
             const to = "conference." + _converse.domain;
@@ -45,40 +121,84 @@
         }
     }
 
-    function listenForRoomActivityIndicators() {
+    function listenForRoomActivityIndicators()
+    {
+        console.debug("listenForRoomActivityIndicators");
+
+        // If we already have unread notifications stored for this session, emit them now
+        for (var i = 0; i < sessionStorage.length; i++)
+        {
+            if (sessionStorage.key(i).indexOf("rai_notify.") == 0)
+            {
+                const jid = sessionStorage.key(i).substring(11);
+                emitNotification(jid);
+            }
+        }
 
+	// Listen for incoming RAI from the server
         _converse.connection.addHandler(function (message) {
-
-            message.querySelectorAll('activity').forEach(function (activity) {
-                if (activity && activity.getAttribute("xmlns") == "xmpp:prosody.im/protocol/rai") {
-                    const jid = activity.innerHTML;
-                    _converse.api.trigger('chatRoomActivityIndicators', jid);
-
-                    if (_converse.api.settings.get("rai_notification")) {
-                        notifyText(_converse.api.settings.get("rai_notification_label"), jid, null, function (notificationId, buttonIndex) {
-                            _converse.api.rooms.open(jid);
-                        });
-                    }
+            message.querySelectorAll('activity').forEach(function (activity)
+            {
+                console.debug("listenForRoomActivityIndicators - activity", activity);
+
+                if (activity && activity.namespaceURI == "xmpp:prosody.im/protocol/rai")
+                {
+                    const jid = activity.textContent;
+                    console.debug("listenForRoomActivityIndicators - activity", activity);
+                    setUnreadStatus(jid, true);
+                    emitNotification(jid);
                 }
             });
 
-            const subject = message.querySelector('subject');
-            const body = message.querySelector('body');
-            if (subject && !body) sendMarker(message.getAttribute('from'), message.getAttribute('id'), 'received');
-
             return true;
+        }, null, 'message');
+    }
 
-        }, null, 'message', 'groupchat');
+    function setUnreadStatus(jid, flag)
+    {
+        console.debug("setUnreadStatus", jid, flag);
+        if(flag) {
+            sessionStorage.setItem("rai_notify." + jid, "true");
+        } else {
+            sessionStorage.removeItem("rai_notify." + jid);
+        }
+    }
+
+    function getUnreadStatus(jid) {
+        return sessionStorage.getItem("rai_notify." + jid) == "true";
+    }
+
+    function emitNotification(jid, alert)
+    {
+        console.debug("emitNotification", jid, alert);
+
+        _converse.api.trigger('chatRoomActivityIndicators', jid);
+
+        if (_converse.api.settings.get("rai_notification") && alert)
+        {
+            notifyText(_converse.api.settings.get("rai_notification_label"), jid, null, function (notificationId, buttonIndex) {
+
+                if (buttonIndex == 0)
+                {
+                    if (jid.includes("conference.")) {
+                        _converse.api.rooms.open(jid);
+                    } else {
+                        _converse.api.chats.open(jid);
+                    }
+                }
+            });
+        }
     }
 
     function sendMarker(to_jid, id, type)
     {
+        console.debug("sendMarker", to_jid, id, type);
 
         const stanza = converse.env.$msg({
           'from': _converse.connection.jid,
           'id': Math.random().toString(36).substr(2,9),
           'to': to_jid,
-          'type': 'chat'
+          'type': 'groupchat'
         }).c(type, {
           'xmlns': converse.env.Strophe.NS.MARKERS,
           'id': id
@@ -87,10 +207,12 @@
         _converse.api.send(stanza);
     }
 
-    function notifyText(message, title, notifyId, callback) {
-
+    function notifyText(message, title, notifyId, callback)
+    {
         if (!notifyId) notifyId = Math.random().toString(36).substr(2, 9);
 
+        console.debug("notifyText", message, title, notifyId);
+
         var prompt = new Notification(title, {
             body: message,
             requireInteraction: true
@@ -106,4 +228,4 @@
             if (callback) callback(notifyId, 1);
         }
     }
-}));
\ No newline at end of file
+}));